Files
antiwear-web/hwICSUiSdk/HwICSUiSdk.js
ZF sun bd98ae0083 feat: 添加华为交互数字人SDK集成示例项目
添加完整的华为交互数字人SDK集成示例项目,包括:
- 项目配置文件package.json
- 详细说明文档README.md
- 主页面index.html
- 核心逻辑脚本main.js
- 样式文件main.css
- SDK类型定义文件HwICSUiSdk.d.ts
- 相关图片资源
2026-04-29 16:58:23 +08:00

1 line
4.1 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function e(t,r){if(typeof exports==="object"&&typeof module==="object")module.exports=r();else if(typeof define==="function"&&define.amd)define([],r);else{var n=r();for(var i in n)(typeof exports==="object"?exports:t)[i]=n[i]}})(self,(()=>(()=>{var e={49:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toggleShowCaError=t.setWebsocketError=t.setSparkRTCError=t.setHttpError=t.resetErrorState=t.mainSlice=t["default"]=t.clearHttpError=void 0;var n=r(84303);var i=r(39595);var o=r(21537);var a=r(75625);const s=e=>{const{httpError:t}=e;return!!(t!==null&&t!==void 0&&t.error_code&&(t===null||t===void 0?void 0:t.error_code)!==a.RetCodes.SUCCESS&&(t===null||t===void 0?void 0:t.error_code)!==a.MPSRetCodes.SUCCESS)};const u=e=>{const{sparkRTCError:t}=e;return!!(t!==null&&t!==void 0&&t.error_code&&(t===null||t===void 0?void 0:t.error_code)!==o.SparkRTCErrorCode.RTC_ERR_CODE_SUCCESS)};const c=e=>{const{websocketError:t}=e;return!!(t!==null&&t!==void 0&&t.error_code&&(t===null||t===void 0?void 0:t.error_code)!==a.RetCodes.SUCCESS)};const l=e=>{e.showErrorPage=s(e)||u(e)||c(e)};const f={httpError:undefined,websocketError:undefined,sparkRTCError:undefined,showCaError:false,caErrorUrl:"",showErrorPage:false};const d=t.mainSlice=(0,n.createSlice)({name:i.ReduxModule.ERROR,initialState:f,reducers:{resetErrorState:e=>{Object.assign(e,f)},setHttpError:(e,t)=>{if(t.payload&&!e.httpError){e.httpError=t.payload;l(e)}},clearHttpError:e=>{e.httpError=undefined;l(e)},setWebsocketError:(e,t)=>{if(t.payload&&!e.websocketError){e.websocketError=t.payload;l(e)}},setSparkRTCError:(e,t)=>{if(t.payload&&!e.sparkRTCError){e.sparkRTCError=t.payload;l(e)}},toggleShowCaError:(e,t)=>{if(t.payload){e.showCaError=t.payload.showCaError;e.caErrorUrl=t.payload.caErrorUrl;l(e)}}}});const{resetErrorState:h,setHttpError:p,setWebsocketError:v,setSparkRTCError:m,toggleShowCaError:y,clearHttpError:g}=d.actions;t.clearHttpError=g;t.toggleShowCaError=y;t.setSparkRTCError=m;t.setWebsocketError=v;t.setHttpError=p;t.resetErrorState=h;var b=t["default"]=d},122:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(91955);var a=r(79306);var s=r(22812);var u=r(79039);var c=r(43724);var l=u((function(){return c&&Object.getOwnPropertyDescriptor(i,"queueMicrotask").value.length!==1}));n({global:true,enumerable:true,dontCallGetSet:true,forced:l},{queueMicrotask:function e(t){s(arguments.length,1);o(a(t))}})},221:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(20034);var a=r(22195);var s=r(15652);var u=Object.isSealed;var c=s||i((function(){u(1)}));n({target:"Object",stat:true,forced:c},{isSealed:function e(t){if(!o(t))return true;if(s&&a(t)==="ArrayBuffer")return true;return u?u(t):false}})},373:(e,t,r)=>{"use strict";var n=r(44576);var i=r(27476);var o=r(79039);var a=r(79306);var s=r(74488);var u=r(94644);var c=r(13709);var l=r(13763);var f=r(39519);var d=r(3607);var h=u.aTypedArray;var p=u.exportTypedArrayMethod;var v=n.Uint16Array;var m=v&&i(v.prototype.sort);var y=!!m&&!(o((function(){m(new v(2),null)}))&&o((function(){m(new v(2),{})})));var g=!!m&&!o((function(){if(f)return f<74;if(c)return c<67;if(l)return true;if(d)return d<602;var e=new v(516);var t=Array(516);var r,n;for(r=0;r<516;r++){n=r%4;e[r]=515-r;t[r]=r-2*n+3}m(e,(function(e,t){return(e/4|0)-(t/4|0)}));for(r=0;r<516;r++){if(e[r]!==t[r])return true}}));var b=function(e){return function(t,r){if(e!==undefined)return+e(t,r)||0;if(r!==r)return-1;if(t!==t)return 1;if(t===0&&r===0)return 1/t>0&&1/r<0?1:-1;return t>r}};p("sort",(function e(t){if(t!==undefined)a(t);if(g)return m(this,t);return s(h(this),b(t))}),!g||y)},637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RemoteManager=void 0;var n=r(44086);var i=r(11686);var o=r(44772);var a=r(23830);var s=r(44104);var u=r(57160);var c=r(76264);var l=r(26440);var f=r(43260);var d=r(91606);var h=r(21013);var p=r(63226);var v=r(85484);var m=r(21537);var y=r(30455);var g=r(50306);var b=r(94855);var _=r(39595);var S=r(19993);var E=r(65268);function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function I(e,t,r){return t&&T(e.prototype,t),r&&T(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function R(e){var t=C(e,"string");return"symbol"==typeof t?t:t+""}function C(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const k=new s.Log({module:"RemoteManager"});let A=t.RemoteManager=function(){function e(){w(this,e)}return I(e,null,[{key:"dealPeerLeave",value:function t(){k.info("dealPeerLeave");e.showUploadingInfo("dealPeerLeave");c.ChatDataManager.resetChatData("dealPeerLeave");e.timer.cancel().schedule(new a.TimerTask(e.waitWorkerResume("peerLeave")),e.peerRejoinTime)}},{key:"dealKickRoom",value:function t(){k.info("dealKickRoom");e.showUploadingInfo("dealKickRoom");c.ChatDataManager.resetChatData("dealKickRoom");S.PrivateNotifyManager.sendRejoinRoomEvent("dealKickRoom");e.timer.cancel().schedule(new a.TimerTask(e.waitWorkerResume("dealKickRoom")),e.peerRejoinTime)}},{key:"clearPeerLeaveTimer",value:function t(r){k.info("clearPeerLeaveTimer",r);e.timer.cancel()}},{key:"showUploadingInfo",value:async function t(r){k.info("showUploadingInfo",r);if(await d.JobManager.checkJobAlive(r)&&!e.getRemoteStream()){(0,l.$dispatch)((0,f.toggleShowLoading)({show:true,contentKey:u.RejoinReason.SYSTEM_OPEN}))}}},{key:"dealStreamRemove",value:async function t(){k.info("dealStreamRemove");if(await d.JobManager.checkJobTimeout("dealStreamRemove")){(0,n.dealNormalEnd)({error:{error_code:i.SDKErrorCode.WORKER_JOB_STOP_BY_MUTE_OVERTIME,error_msg:E.JOB_SUCCEED_REASON.MUTE_TIMEOUT,request_id:""},entry:"removedStreamEvent"});return}e.showUploadingInfo("removedStreamEvent")}},{key:"waitWorkerResume",value:function t(r){return async t=>{k.info("waitWorkerResume",r,t);e.timer.cancel();(0,n.dealSparkRTCError)({error:{error_code:i.SDKErrorCode.RTC_PEER_LEAVE,error_msg:"",request_id:""},entry:"waitWorkerResume"});if(!await d.JobManager.checkJobAlive(r)){k.info("waitWorkerResume","job not alive, no need rejoin");return}S.PrivateNotifyManager.sendRejoinRobotEvent({method:i.InnerICSEventMethod.REJOIN,entry:"waitWorkerResume",reason:u.RejoinReason.SYSTEM_OPEN,errorCode:i.SDKErrorCode.RTC_PEER_LEAVE})}}},{key:"handleRemoteStreamError",value:function t(r){k.error("remoteStream error",r.errCode,r.errMessage);if(String(r.errCode)===m.SparkRTCErrorCode.RTC_ERR_CODE_AUDIO_ERROR){var n;k.info("remoteStream replayAudio");(n=e.remoteStream)===null||n===void 0?void 0:n.replayAudio()}}},{key:"setRemoteStream",value:function t(r,n){k.info("setRemoteStream",n);e.remoteStream=r;e.setSpeaker();e.remoteStream.on("Error",e.handleRemoteStreamError)}},{key:"getRemoteStream",value:function t(){return e.remoteStream}},{key:"closeRemoteStream",value:function t(r){var n,i;k.info("closeRemoteStream",r);(n=e.remoteStream)===null||n===void 0?void 0:n.close();delete e.remoteStream;(i=e.transparentBg)===null||i===void 0?void 0:i.destroy();delete e.transparentBg}},{key:"playRemoteStream",value:async function t(r){var n;k.info("playRemoteStream",r,e.isMute);(n=e.remoteStream)===null||n===void 0?void 0:n.setAudioVolume(100);if(!e.audioLevelTimer){e.startLoopTrack()}const i=document.querySelector(`#${e._remoteContainerId}`);const o=(0,l.$getState)();if(o.main.isShowTransparentBg&&i){i.style.display="none"}if(e.isMute){e.muteRemoteAudio("playRemoteStream")}if(b.ConfigManager.getConfig(_.ConfigKey.AUTO_PLAY_REMOTE_VIDEO)){await e.playRemoteVideo()}}},{key:"handleTransparentBg",value:function t(){const r=(0,l.$getState)();k.info("handleTransparentBg",r.main.isShowTransparentBg);if(!r.main.isShowTransparentBg){return}e.transparentBg=new v.TransparentBg}},{key:"startLoopTrack",value:function t(r=0){e._trackAudioLevel(e.remoteStream,r);e.audioLevelTimer=setTimeout((()=>{r++;e.startLoopTrack(r)}),e._audioLevelCheckTime)}},{key:"_trackAudioLevel",value:function t(r,n){if(r){const t=r.getAudioLevel();k.debug("_trackAudioLevel",n,t);if(t>0||t!==e.remoteAudioLevel){h.UserTrack.addUserTrack({arg1:p.Arg1Map.SPARK_RTC,arg2:"remoteAudioLevel",args:{entry:n.toString(),result:t.toString()}});e.remoteAudioLevel=t}}}},{key:"playRemoteVideo",value:async function t(){var r,n;let i={result:true};await((r=e.remoteStream)===null||r===void 0?void 0:(n=r.play(e._remoteContainerId,{muted:false,objectFit:"contain"}))===null||n===void 0?void 0:n.catch((t=>{k.error("playRemoteStream error",t);if(t.code===m.SparkRTCErrorCode.RTC_ERR_CODE_PLAY_NOT_ALLOW){g.Modal.alert({content:(0,y.getErrorMessage)({errorCode:m.SparkRTCErrorCode.RTC_ERR_CODE_PLAY_NOT_ALLOW})}).then((()=>{var t;(t=e.remoteStream)===null||t===void 0?void 0:t.resume()}))}i={result:false,errorCode:t.code,errorMsg:m.ErrorMsg[t.code]}})));e.handleTransparentBg();return i}},{key:"setSpeaker",value:async function t(r){e.speakerId=r||e.speakerId;k.info("setSpeaker",e.speakerId,e.remoteStream);if(e.speakerId){var n;await((n=e.remoteStream)===null||n===void 0?void 0:n.setAudioOutput(e.speakerId))}}},{key:"muteRemoteAudio",value:function t(r){var n;k.info("muteRemoteAudio",r,!!e.remoteStream);e.isMute=true;return((n=e.remoteStream)===null||n===void 0?void 0:n.muteAudio())||false}},{key:"unmuteRemoteAudio",value:function t(r){var n;k.info("unmuteRemoteAudio",r,!!e.remoteStream);e.isMute=false;return((n=e.remoteStream)===null||n===void 0?void 0:n.unmuteAudio())||true}},{key:"handleVisibilityChange",value:function t(){if(document.visibilityState==="visible"&&!e.isMute){e.unmuteRemoteAudio("visibilitychange visible")}}}])}();A.timer=new o.Timer;A.peerRejoinTime=9e4;A._remoteContainerId="remoteContainer";A._audioLevelCheckTime=5e3;A.isMute=false;window.addEventListener("visibilitychange",A.handleVisibilityChange)},655:(e,t,r)=>{"use strict";var n=r(36955);var i=String;e.exports=function(e){if(n(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},1068:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getElementScreenPosition=void 0;var t=e.getElementScreenPosition=function e(t){if(!t){return{left:0,top:0}}var r=t;var n=0;var i=0;while(r){n+=r.offsetLeft-r.scrollLeft;i+=r.offsetTop-r.scrollTop;r=r.offsetParent}return{left:n,top:i}}}))},1103:e=>{"use strict";e.exports=function(e){try{return{error:false,value:e()}}catch(e){return{error:true,value:e}}}},1141:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2953)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.QRCodeKit=void 0;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:t+""}function s(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let u=e.QRCodeKit=function(){function e(){r(this,e)}return i(e,null,[{key:"createQRCode",value:function r({data:n,hint:i,width:o,height:a,needCodePadding:s,pointColor:u,backgroundColor:c}){return new t.RoundSquareQRCodeWriter(s,u,c||e.WHITE).encodeGetImage(n,o,a,i)}}])}();o(u,"WHITE","#ffffff")}))},1381:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getAudioProcessorUrl=void 0;var t="\nconst throttle = (fn, delay, self) => {\n let time = Date.now();\n return function (...args) {\n const currTime = Date.now();\n const _mergeTime = currTime - time;\n if (_mergeTime > delay) {\n fn.call(self, ...args);\n time = currTime;\n }\n };\n};\n\nconst SMOOTHING_FACTOR = 0.8;\n\nclass AudioVolumeProcessor extends AudioWorkletProcessor {\n _volume;\n _updateIntervalInMS = 25;\n _nextUpdateFrame;\n\n constructor() {\n super();\n this._volume = 0;\n this._nextUpdateFrame = this._updateIntervalInMS;\n this.throttlePostMessage = throttle(({ volume }) => this.port.postMessage({\n volume,\n currentFrame,\n currentTime,\n sampleRate,\n }), 100, this);\n }\n\n get intervalInFrames() {\n return (this._updateIntervalInMS / 1000) * sampleRate;\n }\n\n process(inputs) {\n const input = inputs[0];\n if (0 < input.length) {\n const samples = input[0];\n let sum = 0;\n for (let i = 0; i < samples.length; i += 1) {\n sum += samples[i] * samples[i];\n }\n const rms = Math.sqrt(sum / samples.length);\n this._volume = Math.max(rms, this._volume * SMOOTHING_FACTOR);\n this._nextUpdateFrame -= samples.length;\n if (0 > this._nextUpdateFrame) {\n this._nextUpdateFrame += this.intervalInFrames;\n this.throttlePostMessage({ volume: Math.floor(this._volume * 100) });\n }\n }\n return true;\n }\n}\n\nregisterProcessor('AudioVolumeProcessor', AudioVolumeProcessor);\n";var r=e.getAudioProcessorUrl=function e(){return"data:text/javascript;base64,".concat(btoa(t))}}))},1469:(e,t,r)=>{"use strict";var n=r(87433);e.exports=function(e,t){return new(n(e))(t===0?0:t)}},1480:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(10298).f;var a=i((function(){return!Object.getOwnPropertyNames(1)}));n({target:"Object",stat:true,forced:a},{getOwnPropertyNames:o})},1548:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79039);var o=r(39519);var a=r(84215);var s=n.structuredClone;e.exports=!!s&&!i((function(){if(a==="DENO"&&o>92||a==="NODE"&&o>94||a==="BROWSER"&&o>97)return false;var e=new ArrayBuffer(8);var t=s(e,{transfer:[e]});return e.byteLength!==0||t.byteLength!==8}))},1625:(e,t,r)=>{"use strict";var n=r(79504);e.exports=n({}.isPrototypeOf)},1688:(e,t,r)=>{"use strict";var n=r(46518);var i=r(70380);n({target:"Date",proto:true,forced:Date.prototype.toISOString!==i},{toISOString:i})},1767:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:false}}},1874:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(58683),r(8556),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=a(r);var o;function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t=p(t),f(e,h()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let _=e.default=function(e){function t(){s(this,t);return l(this,t,arguments)}v(t,e);return c(t,[{key:"render",value:function e(){let{viewBox:t,xlinkHref:n,className:o="",useClassName:a,type:s,color:u,size:c,hoverColor:l,activeColor:f}=this.props;o+=" meta-svg-icon";let d="";u&&(d+=` ${u}`);l&&(d+=` hover-${l}`);f&&(d+=` active-${f}`);c&&(d+=` ${c}`);if(s&&r.default[s]){const e=r.default[s];return(0,i.jsx)("div",{className:o,children:(0,i.jsx)(e,{className:d})})}if(n){return(0,i.jsx)("div",{className:o,children:(0,i.jsx)("svg",{className:d,viewBox:t,children:(0,i.jsx)("use",{xlinkHref:n,className:a})})})}return(0,i.jsx)("div",{})}}])}(t.Component);o=_;y(_,"typeMap",n.typeMap);y(_,"sizeMap",{size24:"size24",size42:"size42"});y(_,"viewBoxMap",{viewBox42:"0 0 42 42"});y(_,"colorMap",{col999999:"col999999",col666666:"col666666",col333333:"col333333",col0d94ff:"col0d94ff"});y(_,"defaultProps",{viewBox:"",xlinkHref:"",className:"",useClassName:"",type:"",color:o.colorMap.col999999,size:o.sizeMap.size24,hoverColor:o.colorMap.col0d94ff,activeColor:o.colorMap.col0d94ff})}))},1951:(e,t,r)=>{"use strict";var n=r(78227);t.f=n},2008:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).filter;var o=r(70597);var a=o("filter");n({target:"Array",proto:true,forced:!a},{filter:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},2087:(e,t,r)=>{"use strict";var n=r(20034);var i=Math.floor;e.exports=Number.isInteger||function e(t){return!n(t)&&isFinite(t)&&i(t)===t}},2222:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(79039);var a=r(22812);var s=r(655);var u=r(67416);var c=i("URL");var l=u&&o((function(){c.canParse()}));var f=o((function(){return c.canParse.length!==1}));n({target:"URL",stat:true,forced:!l||f},{canParse:function e(t){var r=a(arguments.length,1);var n=s(t);var i=r<2||arguments[1]===undefined?undefined:s(arguments[1]);try{return!!new c(n,i)}catch(e){return false}}})},2259:(e,t,r)=>{"use strict";var n=r(70511);n("iterator")},2265:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.setSessionStorageItem=e.setLocalStorageItem=void 0;var r=function e(r){return function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{key:"",value:""};if(!e){return false}var n=e.key,i=e.value,o=e.isForce;var a=r?window.localStorage:window.sessionStorage;if(!a){(0,t.getPLogger)().warn("setStorageItem no Storage",{isLocalStorage:r,key:n});return false}if(!n){(0,t.getPLogger)().warn("setStorageItem no key",{isLocalStorage:r,key:n});return false}if((0,t.formatType)(i)!==t.formatType.STRING){(0,t.getPLogger)().warn("setStorageItem value not string",{isLocalStorage:r,key:n});return false}try{(0,t.getPLogger)().info("setStorageItem",{isLocalStorage:r,key:n});a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}catch(e){(0,t.getPLogger)().error("setStorageItem",{isLocalStorage:r,key:n,isForce:o,e});if(!o){return false}a.clear();a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}}};var n=e.setLocalStorageItem=r(true);var i=e.setSessionStorageItem=r(false)}))},2293:(e,t,r)=>{"use strict";var n=r(28551);var i=r(35548);var o=r(64117);var a=r(78227);var s=a("species");e.exports=function(e,t){var r=n(e).constructor;var a;return r===undefined||o(a=n(r)[s])?t:i(a)}},2360:(e,t,r)=>{"use strict";var n=r(28551);var i=r(96801);var o=r(88727);var a=r(30421);var s=r(20397);var u=r(4055);var c=r(66119);var l=">";var f="<";var d="prototype";var h="script";var p=c("IE_PROTO");var v=function(){};var m=function(e){return f+h+l+e+f+"/"+h+l};var y=function(e){e.write(m(""));e.close();var t=e.parentWindow.Object;e=null;return t};var g=function(){var e=u("iframe");var t="java"+h+":";var r;e.style.display="none";s.appendChild(e);e.src=String(t);r=e.contentWindow.document;r.open();r.write(m("document.F=Object"));r.close();return r.F};var b;var _=function(){try{b=new ActiveXObject("htmlfile")}catch(e){}_=typeof document!="undefined"?document.domain&&b?y(b):g():y(b);var e=o.length;while(e--)delete _[d][o[e]];return _()};a[p]=true;e.exports=Object.create||function e(t,r){var o;if(t!==null){v[d]=n(t);o=new v;v[d]=null;o[p]=t}else o=_();return r===undefined?o:i.f(o,r)}},2478:(e,t,r)=>{"use strict";var n=r(79504);var i=r(48981);var o=Math.floor;var a=n("".charAt);var s=n("".replace);var u=n("".slice);var c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g;var l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,f,d){var h=r+e.length;var p=n.length;var v=l;if(f!==undefined){f=i(f);v=c}return s(d,v,(function(i,s){var c;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,r);case"'":return u(t,h);case"<":c=f[u(s,1,-1)];break;default:var l=+s;if(l===0)return i;if(l>p){var d=o(l/10);if(d===0)return i;if(d<=p)return n[d-1]===undefined?a(s,1):n[d-1]+a(s,1);return i}c=n[l-1]}return c===undefined?"":c}))}},2583:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WorkerManager=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=e.WorkerManager=function(){function e(r){var n=this;o(this,e);u(this,"worker",void 0);u(this,"messageMap",new Map);u(this,"opts",{url:"",enablePromiseMethod:true});u(this,"customOnMessage",void 0);u(this,"customOnError",void 0);u(this,"createWorker",(function(){(0,t.getPLogger)().debug("createWorker");if(n.worker){return}n.worker=new Worker(n.opts.url);n.worker.onmessage=n.onMessage.bind(n);n.worker.onerror=n.dealError.bind(n);n.worker.onmessageerror=n.dealError.bind(n)}));(0,t.getPLogger)().debug("WorkerManager.constructor",r);if(r.url){this.opts.url=r.url}if(r.enablePromiseMethod){this.opts.enablePromiseMethod=r.enablePromiseMethod}this.customOnMessage=r.onMessage;this.customOnError=r.onError}return s(e,[{key:"promisePostMessage",value:function e(r){var n=this;if(!this.worker){this.createWorker()}return new Promise((function(e){var o;r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(o=n.worker)===null||o===void 0||o.postMessage(r);if(!n.opts.enablePromiseMethod){e({result:true});return}n.messageMap.set(r.sno,e)}))}},{key:"postMessage",value:function e(r){var n;if(!this.worker){this.createWorker()}r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(n=this.worker)===null||n===void 0||n.postMessage(r)}},{key:"setOnMessage",value:function e(r){(0,t.getPLogger)().debug("WorkerManager.setOnMessage");this.customOnMessage=r}},{key:"onMessage",value:function e(t){var r,n;if((r=t.data)!==null&&r!==void 0&&r.sno&&this.opts.enablePromiseMethod){var i=this.messageMap.get(t.data.sno);if(i){i===null||i===void 0||i(t.data);this.messageMap["delete"](t.data.sno);return}}(n=this.customOnMessage)===null||n===void 0||n.call(this,t.data)}},{key:"dealError",value:function e(r){var n;(0,t.getPLogger)().error("WorkerManager.dealError",r);delete this.worker;(n=this.customOnError)===null||n===void 0||n.call(this,r)}}])}()}))},2731:(e,t)=>{const r=new Uint8Array(512);const n=new Uint8Array(256);(function e(){let t=1;for(let e=0;e<255;e++){r[e]=t;n[t]=e;t<<=1;if(t&256){t^=285}}for(let e=255;e<512;e++){r[e]=r[e-255]}})();t.log=function e(t){if(t<1)throw new Error("log("+t+")");return n[t]};t.exp=function e(t){return r[t]};t.mul=function e(t,i){if(t===0||i===0)return 0;return r[n[t]+n[i]]}},2813:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(62293),r(7336)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;t=n(t);r=n(r);function n(e){return e&&e.__esModule?e:{default:e}}var i=e.default={DefaultBigAvatar:t.default,DefaultSmallAvatar:r.default}}))},2867:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(47057),r(95162),r(59969),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioWorkletNodeRecord=void 0;t=c(t);var o,s,u;function c(e){return e&&e.__esModule?e:{default:e}}function l(){"use strict";l=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,c,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){f(o,n,i,a,s,"next",e)}function s(e){f(o,n,i,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==a(t)?t:t+""}function g(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var _=e.AudioWorkletNodeRecord=(o=(0,n.printfDecorator)((0,i.getPLogger)()),s=(0,n.printfDecorator)((0,i.getPLogger)()),u=function(){function e(n){h(this,e);m(this,"audioContext",void 0);this.audioContext=new t["default"]({url:(0,r.getLocalRecorderUrl)(),processorName:"LocalRecorderProcessor",processorOptions:{bufferSize:n.bufferSize},audioCallback:n.audioCallback})}return v(e,[{key:"startRecord",value:function(){var e=d(l().mark((function e(t){return l().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.audioContext.start(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=d(l().mark((function e(){return l().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.audioContext.stop());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}}])}(),b(u.prototype,"startRecord",[o],Object.getOwnPropertyDescriptor(u.prototype,"startRecord"),u.prototype),b(u.prototype,"stopRecord",[s],Object.getOwnPropertyDescriptor(u.prototype,"stopRecord"),u.prototype),u)}))},2892:(e,t,r)=>{"use strict";var n=r(46518);var i=r(96395);var o=r(43724);var a=r(44576);var s=r(19167);var u=r(79504);var c=r(92796);var l=r(39297);var f=r(23167);var d=r(1625);var h=r(10757);var p=r(72777);var v=r(79039);var m=r(38480).f;var y=r(77347).f;var g=r(24913).f;var b=r(31240);var _=r(43802).trim;var S="Number";var E=a[S];var w=s[S];var T=E.prototype;var I=a.TypeError;var R=u("".slice);var C=u("".charCodeAt);var k=function(e){var t=p(e,"number");return typeof t=="bigint"?t:A(t)};var A=function(e){var t=p(e,"number");var r,n,i,o,a,s,u,c;if(h(t))throw new I("Cannot convert a Symbol value to a number");if(typeof t=="string"&&t.length>2){t=_(t);r=C(t,0);if(r===43||r===45){n=C(t,2);if(n===88||n===120)return NaN}else if(r===48){switch(C(t,1)){case 66:case 98:i=2;o=49;break;case 79:case 111:i=8;o=55;break;default:return+t}a=R(t,2);s=a.length;for(u=0;u<s;u++){c=C(a,u);if(c<48||c>o)return NaN}return parseInt(a,i)}}return+t};var O=c(S,!E(" 0o1")||!E("0b1")||E("+0x1"));var P=function(e){return d(T,e)&&v((function(){b(e)}))};var x=function e(t){var r=arguments.length<1?0:E(k(t));return P(this)?f(Object(r),this,x):r};x.prototype=T;if(O&&!i)T.constructor=x;n({global:true,constructor:true,wrap:true,forced:O},{Number:x});var L=function(e,t){for(var r=o?m(t):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,"+"fromString,range").split(","),n=0,i;r.length>n;n++){if(l(t,i=r[n])&&!l(e,i)){g(e,i,y(t,i))}}};if(i&&w)L(s[S],w);if(O||i)L(s[S],E)},2945:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(97751);var a=r(79504);var s=r(69565);var u=r(79039);var c=r(655);var l=r(22812);var f=r(92804).c2i;var d=/[^\d+/a-z]/i;var h=/[\t\n\f\r ]+/g;var p=/[=]{1,2}$/;var v=o("atob");var m=String.fromCharCode;var y=a("".charAt);var g=a("".replace);var b=a(d.exec);var _=!!v&&!u((function(){return v("aGk=")!=="hi"}));var S=_&&u((function(){return v(" ")!==""}));var E=_&&!u((function(){v("a")}));var w=_&&!u((function(){v()}));var T=_&&v.length!==1;var I=!_||S||E||w||T;n({global:true,bind:true,enumerable:true,forced:I},{atob:function e(t){l(arguments.length,1);if(_&&!S&&!E)return s(v,i,t);var r=g(c(t),h,"");var n="";var a=0;var u=0;var w,T,I;if(r.length%4===0){r=g(r,p,"")}w=r.length;if(w%4===1||b(d,r)){throw new(o("DOMException"))("The string is not correctly encoded","InvalidCharacterError")}while(a<w){T=y(r,a++);I=u%4?I*64+f[T]:f[T];if(u++%4)n+=m(255&I>>(-2*u&6))}return n}})},2953:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(87583),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RoundSquareQRCodeWriter=void 0;t=n(t);function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const l="http://www.w3.org/2000/svg";let f=e.RoundSquareQRCodeWriter=function(){function e(t,r,n){i(this,e);s(this,"needCodePadding",void 0);s(this,"pointColor",void 0);s(this,"bgColor",void 0);this.needCodePadding=t||false;this.pointColor=r;this.bgColor=n}return a(e,[{key:"encodeGetImage",value:function e(r,n,i,o){const a=(o===null||o===void 0?void 0:o.get("errorCorrectionLevel"))||"L";const s=t.default.create(r,{errorCorrectionLevel:a});return this.renderBufferedImage(s,n,i)}},{key:"renderBufferedImage",value:function e(t,n,i){const o=t.modules;(0,r.getPLogger)().debug("renderBufferedImage input",o);const a=o.size;const s=o.size;const u=Math.max(n,a);const c=Math.max(i,s);const l=Math.min(Math.floor(u/a),Math.floor(c/s));const f=this.needCodePadding?Math.max(0,Math.floor(l/3)):0;(0,r.getPLogger)().debug("renderBufferedImage",{multiple:l,inputWidth:a,codePointPadding:f});const d=Math.max(l-f,1);const h=Math.floor(f/2);const p=this.createSVGElement(String(a*l),String(s*l));p.style.backgroundColor=this.bgColor;const v=this.findCodeEyesWidth(o);const m=v*l;this.drawCodeEyesRect(0,0,m,l,p);this.drawCodeEyesRect(parseInt(p.getAttribute("width"))-m,0,m,l,p);this.drawCodeEyesRect(0,parseInt(p.getAttribute("height"))-m,m,l,p);for(let e=0,t=0;e<s;e++,t+=l){let r=0;let n=0;let i=a;if(e<v){r+=v;n=v*l;i=a-v}else if(e>s-1-v){r+=v;n=v*l}for(;r<i;r++,n+=l){if(o.data[e+r*o.size]===1){const e=this.createSvgRectElement({x:n+h,y:t+h,w:d,h:d,stroke:undefined,strokeWidth:undefined,radius:undefined});p.appendChild(e)}}}return p}},{key:"findCodeEyesWidth",value:function e(t){let n=0;for(let e=0;e<t.size;e++){if(t.data[e]===1){n++}else{break}}(0,r.getPLogger)().debug("findCodeEyesWidth",n);return n}},{key:"createSvgRectElement",value:function e({x:t,y:r,w:n,h:i,radius:o,fill:a=this.pointColor,stroke:s,strokeWidth:u}){const c=document.createElementNS(l,"rect");c.setAttribute("x",t.toString());c.setAttribute("y",r.toString());o&&c.setAttribute("rx",o.toString());o&&c.setAttribute("ry",o.toString());c.setAttribute("height",n.toString());c.setAttribute("width",i.toString());c.setAttribute("fill",a);s&&c.setAttribute("stroke",s);u&&c.setAttribute("stroke-width",u);return c}},{key:"drawCodeEyesRect",value:function e(t,n,i,o,a){(0,r.getPLogger)().debug("drawCodeEyesRect",{x:t,y:n,size:i,multiple:o,svgElement:a});this.drawRoundRect({x:t+o/2,y:n+o/2,size:i-o,svgElement:a,stroke:this.pointColor,strokeWidth:o.toString(),fill:"none"});this.drawRoundRect({x:t+o*2,y:n+o*2,size:i-o*4,svgElement:a})}},{key:"drawRoundRect",value:function e({x:t,y:r,size:n,fill:i,svgElement:o,stroke:a,strokeWidth:s}){const u=this.createSvgRectElement({x:t,y:r,w:n,h:n,radius:n/4,fill:i,stroke:a,strokeWidth:s});o.appendChild(u)}},{key:"createSVGElement",value:function e(t,r){const n=document.createElementNS(l,"svg");n.setAttribute("height",t);n.setAttribute("width",r);n.setAttribute("viewBox",`0 0 ${t} ${r}`);return n}}])}()}))},3238:(e,t,r)=>{"use strict";var n=r(44576);var i=r(77811);var o=r(67394);var a=n.DataView;e.exports=function(e){if(!i||o(e)!==0)return false;try{new a(e);return false}catch(e){return true}}},3296:(e,t,r)=>{"use strict";r(45806)},3362:(e,t,r)=>{"use strict";r(10436);r(16499);r(82003);r(7743);r(51481);r(40280)},3451:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(30421);var a=r(20034);var s=r(39297);var u=r(24913).f;var c=r(38480);var l=r(10298);var f=r(34124);var d=r(33392);var h=r(92744);var p=false;var v=d("meta");var m=0;var y=function(e){u(e,v,{value:{objectID:"O"+m++,weakData:{}}})};var g=function(e,t){if(!a(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!s(e,v)){if(!f(e))return"F";if(!t)return"E";y(e)}return e[v].objectID};var b=function(e,t){if(!s(e,v)){if(!f(e))return true;if(!t)return false;y(e)}return e[v].weakData};var _=function(e){if(h&&p&&f(e)&&!s(e,v))y(e);return e};var S=function(){E.enable=function(){};p=true;var e=c.f;var t=i([].splice);var r={};r[v]=1;if(e(r).length){c.f=function(r){var n=e(r);for(var i=0,o=n.length;i<o;i++){if(n[i]===v){t(n,i,1);break}}return n};n({target:"Object",stat:true,forced:true},{getOwnPropertyNames:l.f})}};var E=e.exports={enable:S,fastKey:g,getWeakData:b,onFreeze:_};o[v]=true},3470:e=>{"use strict";e.exports=Object.is||function e(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}},3607:(e,t,r)=>{"use strict";var n=r(82839);var i=n.match(/AppleWebKit\/(\d+)\./);e.exports=!!i&&+i[1]},3667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=c(r(65299));var o=r(13288);var a=r(64895);var s=c(r(83585));var u=c(r(47513));function c(e){return e&&e.__esModule?e:{default:e}}const l=({showMode:e,message:t,enableVerbatim:r,scrollIntoView:c,itemKey:l,text:f})=>{switch(e){case a.ShowMode.WAITING:return(0,n.jsx)(u.default,{});case a.ShowMode.MEDIA:return(0,n.jsx)(o.MediaCard,{message:t,scrollIntoView:c});case a.ShowMode.TEXT_CONTENT:return(0,n.jsx)(s.default,{message:t,scrollIntoView:c,enableVerbatim:r,itemKey:l,text:f||(t===null||t===void 0?void 0:t.text)});default:return(0,n.jsx)(i.default,{message:t,scrollIntoView:c,enableVerbatim:r,itemKey:l,text:f||(t===null||t===void 0?void 0:t.text)})}};var f=t["default"]=l},3690:(e,t,r)=>{"use strict";var n=r(15823);n("Uint16",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},3717:(e,t,r)=>{"use strict";var n=r(79504);var i=2147483647;var o=36;var a=1;var s=26;var u=38;var c=700;var l=72;var f=128;var d="-";var h=/[^\0-\u007E]/;var p=/[.\u3002\uFF0E\uFF61]/g;var v="Overflow: input needs wider integers to process";var m=o-a;var y=RangeError;var g=n(p.exec);var b=Math.floor;var _=String.fromCharCode;var S=n("".charCodeAt);var E=n([].join);var w=n([].push);var T=n("".replace);var I=n("".split);var R=n("".toLowerCase);var C=function(e){var t=[];var r=0;var n=e.length;while(r<n){var i=S(e,r++);if(i>=55296&&i<=56319&&r<n){var o=S(e,r++);if((o&64512)===56320){w(t,((i&1023)<<10)+(o&1023)+65536)}else{w(t,i);r--}}else{w(t,i)}}return t};var k=function(e){return e+22+75*(e<26)};var A=function(e,t,r){var n=0;e=r?b(e/c):e>>1;e+=b(e/t);while(e>m*s>>1){e=b(e/m);n+=o}return b(n+(m+1)*e/(e+u))};var O=function(e){var t=[];e=C(e);var r=e.length;var n=f;var u=0;var c=l;var h,p;for(h=0;h<e.length;h++){p=e[h];if(p<128){w(t,_(p))}}var m=t.length;var g=m;if(m){w(t,d)}while(g<r){var S=i;for(h=0;h<e.length;h++){p=e[h];if(p>=n&&p<S){S=p}}var T=g+1;if(S-n>b((i-u)/T)){throw new y(v)}u+=(S-n)*T;n=S;for(h=0;h<e.length;h++){p=e[h];if(p<n&&++u>i){throw new y(v)}if(p===n){var I=u;var R=o;while(true){var O=R<=c?a:R>=c+s?s:R-c;if(I<O)break;var P=I-O;var x=o-O;w(t,_(k(O+P%x)));I=b(P/x);R+=o}w(t,_(k(I)));c=A(u,T,g===m);u=0;g++}}u++;n++}return E(t,"")};e.exports=function(e){var t=[];var r=I(T(R(e),p,"."),".");var n,i;for(n=0;n<r.length;n++){i=r[n];w(t,g(h,i)?"xn--"+O(i):i)}return E(t,".")}},3995:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(24194);var a=r(57696);var s=r(67787);var u=r(53602);var c=Math.pow;var l=65520;var f=61005353927612305e-21;var d=16777216;var h=1024;var p=function(e){if(e!==e)return 32256;if(e===0)return(1/e===-Infinity)<<15;var t=e<0;if(t)e=-e;if(e>=l)return t<<15|31744;if(e<f)return t<<15|u(e*d);var r=s(e)|0;if(r===-15){return t<<15|h}var n=u((e*c(2,-r)-1)*h);if(n===h){return t<<15|r+16<<10}return t<<15|r+15<<10|n};var v=i(DataView.prototype.setUint16);n({target:"DataView",proto:true},{setFloat16:function e(t,r){o(this);var n=a(t);var i=p(+r);return v(this,n,i,arguments.length>2?arguments[2]:false)}})},4015:(e,t,r)=>{"use strict";r.r(t)},4055:(e,t,r)=>{"use strict";var n=r(44576);var i=r(20034);var o=n.document;var a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},4146:(e,t,r)=>{"use strict";var n=r(44363);var i={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true};var o={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var a={$$typeof:true,render:true,defaultProps:true,displayName:true,propTypes:true};var s={$$typeof:true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true};var u={};u[n.ForwardRef]=a;u[n.Memo]=s;function c(e){if(n.isMemo(e)){return s}return u[e["$$typeof"]]||i}var l=Object.defineProperty;var f=Object.getOwnPropertyNames;var d=Object.getOwnPropertySymbols;var h=Object.getOwnPropertyDescriptor;var p=Object.getPrototypeOf;var v=Object.prototype;function m(e,t,r){if(typeof t!=="string"){if(v){var n=p(t);if(n&&n!==v){m(e,n,r)}}var i=f(t);if(d){i=i.concat(d(t))}var a=c(e);var s=c(t);for(var u=0;u<i.length;++u){var y=i[u];if(!o[y]&&!(r&&r[y])&&!(s&&s[y])&&!(a&&a[y])){var g=h(t,y);try{l(e,y,g)}catch(e){}}}}return e}e.exports=m},4294:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(18745);var a=r(79039);var s=r(14601);var u="AggregateError";var c=i(u);var l=!a((function(){return c([1]).errors[0]!==1}))&&a((function(){return c([1],u,{cause:7}).cause!==7}));n({global:true,constructor:true,arity:2,forced:l},{AggregateError:s(u,(function(e){return function t(r,n){return o(e,this,arguments)}}),l,true)})},4360:(e,t,r)=>{"use strict";var n=r(46518);var i=r(33164);var o=.0009765625;var a=65504;var s=6103515625e-14;n({target:"Math",stat:true},{f16round:function e(t){return i(t,o,a,s)}})},4495:(e,t,r)=>{"use strict";var n=r(39519);var i=r(79039);var o=r(44576);var a=o.String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(4742);var i=u(r(75540));var o=r(44772);var a=r(44104);var s=u(r(88763));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new a.Log({module:"HwICS.UI.CaptionPagePortrait"});let w=function(e){function t(){var e;c(this,t);e=p(this,t,arguments);e._pageName="CaptionPagePortrait";return e}b(t,e);return f(t,[{key:"render",value:function e(){return(0,n.jsx)("div",{className:"caption-portrait transparent-scrollbar",children:(0,n.jsx)("div",{className:"message-container transparent-scrollbar",children:(0,n.jsx)(s.default,{})})},"caption-portrait")}}])}(i.default);w=S([(0,o.componentDecorator)(E)],w);var T=t["default"]=w},4731:(e,t,r)=>{"use strict";var n=r(44576);var i=r(10687);i(n.JSON,"JSON",true)},4742:(e,t,r)=>{"use strict";r.r(t)},4752:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyA=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return u(e)||s(e,t)||o(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function u(e){if(Array.isArray(e))return e}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==r(t)?t:t+""}function y(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=e.ChromaKeyA=function(){function e(t){d(this,e);v(this,"gl",void 0);v(this,"keyColor",void 0);v(this,"opts",void 0);v(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return p(e,[{key:"dealVideoFrame",value:function t(r,n){if(!this.keyColor){this.keyColor=e.handleGetKeyColor(r)}if(!this.gl){this.gl=this.handleInitGl(n);this.handleInitTexture(this.gl)}this.drawImg(r)}},{key:"dealVideoFrameToImage",value:function(){var t=f(c().mark((function t(r){var n;return c().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:if(!this.keyColor){this.keyColor=e.handleGetKeyColor(r)}if(!this.gl){n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n;this.handleInitTexture(this.gl)}this.drawImg(r);return i.abrupt("return",createImageBitmap(this.optCvs,{imageOrientation:"none"}));case 4:case"end":return i.stop()}}),t,this)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"drawImg",value:function e(t){if(!this.gl){return}this.gl.viewport(0,0,t.videoWidth,t.videoHeight);this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,t);this.gl.drawArrays(this.gl.TRIANGLES,0,6)}},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{premultipliedAlpha:false,alpha:true});if(!n){throw Error("Cant create gl context")}var i=this.handleInitShaderProgram(n,e.vertexShader,e.fragmentShader);n.useProgram(i);n.uniform3fv(n.getUniformLocation(i,"keyColor"),this.keyColor.map((function(e){return e/255})));n.uniform1f(n.getUniformLocation(i,"similarity"),this.opts.similarity);n.uniform1f(n.getUniformLocation(i,"smoothness"),this.opts.smoothness);n.uniform1f(n.getUniformLocation(i,"spill"),this.opts.spill);var o=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,o);var a=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1];n.bufferData(n.ARRAY_BUFFER,new Float32Array(a),n.STATIC_DRAW);var s=n.getAttribLocation(i,"a_position");n.vertexAttribPointer(s,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(s);var u=[0,1,0,0,1,0,1,0,1,1,0,1];var c=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,c);n.bufferData(n.ARRAY_BUFFER,new Float32Array(u),n.STATIC_DRAW);var l=n.getAttribLocation(i,"a_texCoord");n.vertexAttribPointer(l,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(l);n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,1);return n}},{key:"handleInitShaderProgram",value:function e(t,r,n){var i=this.handleLoadShader(t,t.VERTEX_SHADER,r);var o=this.handleLoadShader(t,t.FRAGMENT_SHADER,n);var a=t.createProgram();t.attachShader(a,i);t.attachShader(a,o);t.linkProgram(a);if(!t.getProgramParameter(a,t.LINK_STATUS)){var s;throw Error((s=t.getProgramInfoLog(a))!==null&&s!==void 0?s:"Unable to initialize the shader program")}return a}},{key:"handleLoadShader",value:function e(t,r,n){var i=t.createShader(r);t.shaderSource(i,n);t.compileShader(i);if(!t.getShaderParameter(i,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(i);t.deleteShader(i);throw Error(o!==null&&o!==void 0?o:"An error occurred compiling the shaders")}return i}},{key:"handleInitTexture",value:function e(t){var r=t.createTexture();if(!r){throw Error("Create WebGL texture error")}t.bindTexture(t.TEXTURE_2D,r);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);return r}}],[{key:"handleGetKeyColor",value:function e(r){var i=new OffscreenCanvas(1,1);var o=i.getContext("2d");o.drawImage(r,0,0);var a=o.getImageData(0,0,1,1),s=n(a.data,3),u=s[0],c=s[1],l=s[2];(0,t.getPLogger)().info("handleGetKeyColor: ",[u,c,l]);return[u,c,l]}}])}();v(g,"vertexShader","#version 300 es\nlayout (location = 0) in vec4 a_position;\nlayout (location = 1) in vec2 a_texCoord;\nout vec2 v_texCoord;\nvoid main () {\n gl_Position = a_position;\n v_texCoord = a_texCoord;\n}\n");v(g,"fragmentShader","#version 300 es\nprecision mediump float;\nout vec4 FragColor;\nin vec2 v_texCoord;\nuniform sampler2D frameTexture;\nuniform vec3 keyColor;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\n\nvoid main() {\n vec4 rgba = texture(frameTexture, v_texCoord);\n vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);\n float chromaDist = sqrt(dot(chromaVec, chromaVec));\n float baseMask = chromaDist - similarity;\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n rgba.a = fullMask;\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.);\n rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);\n FragColor = rgba;\n}\n")}))},5240:(e,t,r)=>{"use strict";var n=r(16468);var i=r(91625);n("WeakSet",(function(e){return function t(){return e(this,arguments.length?arguments[0]:undefined)}}),i)},5338:(e,t,r)=>{"use strict";var n=r(40961);if(true){t.createRoot=n.createRoot;t.hydrateRoot=n.hydrateRoot}else{var i}},5506:(e,t,r)=>{"use strict";var n=r(46518);var i=r(32357).entries;n({target:"Object",stat:true},{entries:function e(t){return i(t)}})},5555:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(74994),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AtomicAction=e.ATOMIC_ACTION_STATUS=e.ATOMIC_ACTION_RESULT=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=d(e,"string");return"symbol"==n(t)?t:t+""}function d(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=e.ATOMIC_ACTION_RESULT=function(e){e[e["SUCCESS"]=0]="SUCCESS";e[e["FAILED"]=1]="FAILED";return e}({});var p=e.ATOMIC_ACTION_STATUS=function(e){e[e["NOT_INIT"]=0]="NOT_INIT";e[e["IN_INIT"]=1]="IN_INIT";e[e["HAS_INIT"]=2]="HAS_INIT";return e}({});var v=e.AtomicAction=u((function e(n,o){var s=this;c(this,e);l(this,"initPromiseObject",void 0);l(this,"initStatue",void 0);l(this,"name",void 0);l(this,"args",void 0);l(this,"atomicFunction",void 0);l(this,"setArgs",function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:s.args=t;case 1:case"end":return r.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());l(this,"reset",a(i().mark((function e(){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:s.initPromiseObject=new t.CustomPromise;s.initStatue=p.NOT_INIT;case 2:case"end":return r.stop()}}),e)}))));l(this,"wait",a(i().mark((function e(){var n;return i().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(!(s.initPromiseObject.status==="resolved")){i.next=2;break}return i.abrupt("return",s.initPromiseObject.waitPromise());case 2:if(!(s.initStatue===p.NOT_INIT)){i.next=18;break}s.initStatue=p.IN_INIT;n=h.FAILED;s.initPromiseObject=new t.CustomPromise;i.prev=6;i.next=9;return s.atomicFunction(s.args);case 9:n=i.sent;if(n===h.SUCCESS){s.initStatue=p.HAS_INIT;s.initPromiseObject.dealResolve(undefined)}else{s.initStatue=p.NOT_INIT;(0,r.getPLogger)().warn("[AtomicAction] name: "+s.name+" finish init ,atomicResult : "+n+", 0:ok,1:failed");s.initPromiseObject.dealReject(new Error("[AtomicAction] name: "+s.name+" finish init ,atomicResult : "+n+", 0:ok,1:failed"))}i.next=18;break;case 13:i.prev=13;i.t0=i["catch"](6);s.initStatue=p.NOT_INIT;(0,r.getPLogger)().warn("[AtomicAction] name1: "+s.name+" exception : ",i.t0);s.initPromiseObject.dealReject(i.t0);case 18:return i.abrupt("return",s.initPromiseObject.waitPromise());case 19:case"end":return i.stop()}}),e,null,[[6,13]])}))));this.initPromiseObject=new t.CustomPromise;this.initStatue=p.NOT_INIT;this.name=n;this.atomicFunction=o}))}))},5745:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("bold")},{bold:function e(){return i(this,"b","","")}})},5746:(e,t,r)=>{"use strict";var n=r(69565);var i=r(89228);var o=r(28551);var a=r(20034);var s=r(67750);var u=r(3470);var c=r(655);var l=r(55966);var f=r(56682);i("search",(function(e,t,r){return[function t(r){var i=s(this);var o=a(r)?l(r,e):undefined;return o?n(o,r,i):new RegExp(r)[e](c(i))},function(e){var n=o(this);var i=c(e);var a=r(t,n,i);if(a.done)return a.value;var s=n.lastIndex;if(!u(s,0))n.lastIndex=0;var l=f(n,i);if(!u(n.lastIndex,s))n.lastIndex=s;return l===null?-1:l.index}]}))},5914:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77782);n({target:"Math",stat:true},{sign:i})},5930:(e,t,r)=>{var n=r(29349);function i(e){var t=n.spaceIndex(e);var r;if(t===-1){r=e.slice(1,-1)}else{r=e.slice(1,t+1)}r=n.trim(r).toLowerCase();if(r.slice(0,1)==="/")r=r.slice(1);if(r.slice(-1)==="/")r=r.slice(0,-1);return r}function o(e){return e.slice(0,2)==="</"}function a(e,t,r){"use strict";var n="";var a=0;var s=false;var u=false;var c=0;var l=e.length;var f="";var d="";e:for(c=0;c<l;c++){var h=e.charAt(c);if(s===false){if(h==="<"){s=c;continue}}else{if(u===false){if(h==="<"){n+=r(e.slice(a,c));s=c;a=c;continue}if(h===">"||c===l-1){n+=r(e.slice(a,s));d=e.slice(s,c+1);f=i(d);n+=t(s,n.length,f,d,o(d));a=c+1;s=false;continue}if(h==='"'||h==="'"){var p=1;var v=e.charAt(c-p);while(v.trim()===""||v==="="){if(v==="="){u=h;continue e}v=e.charAt(c-++p)}}}else{if(h===u){u=false;continue}}}}if(a<l){n+=r(e.substr(a))}return n}var s=/[^a-zA-Z0-9\\_:.-]/gim;function u(e,t){"use strict";var r=0;var i=0;var o=[];var a=false;var u=e.length;function d(e,r){e=n.trim(e);e=e.replace(s,"").toLowerCase();if(e.length<1)return;var i=t(e,r||"");if(i)o.push(i)}for(var p=0;p<u;p++){var v=e.charAt(p);var m,y;if(a===false&&v==="="){a=e.slice(r,p);r=p+1;i=e.charAt(r)==='"'||e.charAt(r)==="'"?r:l(e,p+1);continue}if(a!==false){if(p===i){y=e.indexOf(v,p+1);if(y===-1){break}else{m=n.trim(e.slice(i+1,y));d(a,m);a=false;p=y;r=p+1;continue}}}if(/\s|\n|\t/.test(v)){e=e.replace(/\s|\n|\t/g," ");if(a===false){y=c(e,p);if(y===-1){m=n.trim(e.slice(r,p));d(m);a=false;r=p+1;continue}else{p=y-1;continue}}else{y=f(e,p-1);if(y===-1){m=n.trim(e.slice(r,p));m=h(m);d(a,m);a=false;r=p+1;continue}else{continue}}}}if(r<e.length){if(a===false){d(e.slice(r))}else{d(a,h(n.trim(e.slice(r))))}}return n.trim(o.join(" "))}function c(e,t){for(;t<e.length;t++){var r=e[t];if(r===" ")continue;if(r==="=")return t;return-1}}function l(e,t){for(;t<e.length;t++){var r=e[t];if(r===" ")continue;if(r==="'"||r==='"')return t;return-1}}function f(e,t){for(;t>0;t--){var r=e[t];if(r===" ")continue;if(r==="=")return t;return-1}}function d(e){if(e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"){return true}else{return false}}function h(e){if(d(e)){return e.substr(1,e.length-2)}else{return e}}t.parseTag=a;t.parseAttr=u},6372:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if((e>>24&255)===255){var t=e>>16&255;var r=e>>8&255;var n=e&255;if(t===255){t=0;if(r===255){r=0;if(n===255){n=0}else{++n}}else{++r}}else{++t}e=0;e+=t<<16;e+=r<<8;e+=n}else{e+=1<<24}return e}function n(e){if((e[0]=r(e[0]))===0){e[1]=r(e[1])}return e}var i=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var i=r.blockSize;var o=this._iv;var a=this._counter;if(o){a=this._counter=o.slice(0);this._iv=undefined}n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var u=0;u<i;u++){e[t+u]^=s[u]}}});t.Decryptor=i;return t}();return e.mode.CTRGladman}))},6421:(e,t,r)=>{const n=r(56886).getSymbolSize;t.getRowColCoords=function e(t){if(t===1)return[];const r=Math.floor(t/7)+2;const i=n(t);const o=i===145?26:Math.ceil((i-13)/(2*r-2))*2;const a=[i-7];for(let e=1;e<r-1;e++){a[e]=a[e-1]-o}a.push(6);return a.reverse()};t.getPositions=function e(r){const n=[];const i=t.getRowColCoords(r);const o=i.length;for(let e=0;e<o;e++){for(let t=0;t<o;t++){if(e===0&&t===0||e===0&&t===o-1||e===o-1&&t===0){continue}n.push([i[e],i[t]])}}return n}},6440:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){if(typeof ArrayBuffer!="function"){return}var t=e;var r=t.lib;var n=r.WordArray;var i=n.init;var o=n.init=function(e){if(e instanceof ArrayBuffer){e=new Uint8Array(e)}if(e instanceof Int8Array||typeof Uint8ClampedArray!=="undefined"&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array){e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}if(e instanceof Uint8Array){var t=e.byteLength;var r=[];for(var n=0;n<t;n++){r[n>>>2]|=e[n]<<24-n%4*8}i.call(this,r,t)}else{i.apply(this,arguments)}};o.prototype=n})();return e.lib.WordArray}))},6469:(e,t,r)=>{"use strict";var n=r(78227);var i=r(2360);var o=r(24913).f;var a=n("unscopables");var s=Array.prototype;if(s[a]===undefined){o(s,a,{configurable:true,value:i(null)})}e.exports=function(e){s[a][e]=true}},6630:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WEBSOCKET_TIMEOUT=t.SPEAKING_TIMEOUT=t.PUNCTUATION_USE_TIME_MAP=t.PROGRESS_INTERVAL=t.LIMIT_SYN_TIME=t.ICS_WS_HEART_BEAT_TIMEOUT=t.ICS_WS_HEART_BEAT_TIME=t.HTTP_HEART_BEAT_INVALID_TIME=t.HRTC_JOIN_ROOM_TIMEOUT=t.HEART_BEAT_TIME=t.English_WORD_USE_TIME=t.CHINESE_WORD_USE_TIME=void 0;const r=t.PROGRESS_INTERVAL=100;const n=t.HEART_BEAT_TIME=9e3;const i=t.ICS_WS_HEART_BEAT_TIME=5e3;const o=t.ICS_WS_HEART_BEAT_TIMEOUT=5e3;const a=t.HTTP_HEART_BEAT_INVALID_TIME=5e3;const s=t.HRTC_JOIN_ROOM_TIMEOUT=5*6e4;const u=t.SPEAKING_TIMEOUT=800;const c=t.LIMIT_SYN_TIME=1e3;const l=t.WEBSOCKET_TIMEOUT=2e4;const f=t.CHINESE_WORD_USE_TIME=180;const d=350;const h=180;const p=1;const v=t.PUNCTUATION_USE_TIME_MAP={"。":d,"?":d,":":d,"—":h,"…":h,".":h,"?":h,"、":h,",":p,",":p," ":p,"’":p,"“":p,'"':p,"《":p,"》":p,"*":p};const m=t.English_WORD_USE_TIME=50},6761:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(69565);var a=r(79504);var s=r(96395);var u=r(43724);var c=r(4495);var l=r(79039);var f=r(39297);var d=r(1625);var h=r(28551);var p=r(25397);var v=r(56969);var m=r(655);var y=r(6980);var g=r(2360);var b=r(71072);var _=r(38480);var S=r(10298);var E=r(33717);var w=r(77347);var T=r(24913);var I=r(96801);var R=r(48773);var C=r(36840);var k=r(62106);var A=r(25745);var O=r(66119);var P=r(30421);var x=r(33392);var L=r(78227);var M=r(1951);var N=r(70511);var D=r(58242);var j=r(10687);var U=r(91181);var V=r(59213).forEach;var W=O("hidden");var B="Symbol";var G="prototype";var Z=U.set;var F=U.getterFor(B);var H=Object[G];var X=i.Symbol;var Y=X&&X[G];var K=i.RangeError;var z=i.TypeError;var J=i.QObject;var Q=w.f;var q=T.f;var $=S.f;var ee=R.f;var te=a([].push);var re=A("symbols");var ne=A("op-symbols");var ie=A("wks");var oe=!J||!J[G]||!J[G].findChild;var ae=function(e,t,r){var n=Q(H,t);if(n)delete H[t];q(e,t,r);if(n&&e!==H){q(H,t,n)}};var se=u&&l((function(){return g(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a!==7}))?ae:q;var ue=function(e,t){var r=re[e]=g(Y);Z(r,{type:B,tag:e,description:t});if(!u)r.description=t;return r};var ce=function e(t,r,n){if(t===H)ce(ne,r,n);h(t);var i=v(r);h(n);if(f(re,i)){if(!n.enumerable){if(!f(t,W))q(t,W,y(1,g(null)));t[W][i]=true}else{if(f(t,W)&&t[W][i])t[W][i]=false;n=g(n,{enumerable:y(0,false)})}return se(t,i,n)}return q(t,i,n)};var le=function e(t,r){h(t);var n=p(r);var i=b(n).concat(ve(n));V(i,(function(e){if(!u||o(de,n,e))ce(t,e,n[e])}));return t};var fe=function e(t,r){return r===undefined?g(t):le(g(t),r)};var de=function e(t){var r=v(t);var n=o(ee,this,r);if(this===H&&f(re,r)&&!f(ne,r))return false;return n||!f(this,r)||!f(re,r)||f(this,W)&&this[W][r]?n:true};var he=function e(t,r){var n=p(t);var i=v(r);if(n===H&&f(re,i)&&!f(ne,i))return;var o=Q(n,i);if(o&&f(re,i)&&!(f(n,W)&&n[W][i])){o.enumerable=true}return o};var pe=function e(t){var r=$(p(t));var n=[];V(r,(function(e){if(!f(re,e)&&!f(P,e))te(n,e)}));return n};var ve=function(e){var t=e===H;var r=$(t?ne:p(e));var n=[];V(r,(function(e){if(f(re,e)&&(!t||f(H,e))){te(n,re[e])}}));return n};if(!c){X=function e(){if(d(Y,this))throw new z("Symbol is not a constructor");var t=!arguments.length||arguments[0]===undefined?undefined:m(arguments[0]);var r=x(t);var n=function(e){var t=this===undefined?i:this;if(t===H)o(n,ne,e);if(f(t,W)&&f(t[W],r))t[W][r]=false;var a=y(1,e);try{se(t,r,a)}catch(e){if(!(e instanceof K))throw e;ae(t,r,a)}};if(u&&oe)se(H,r,{configurable:true,set:n});return ue(r,t)};Y=X[G];C(Y,"toString",(function e(){return F(this).tag}));C(X,"withoutSetter",(function(e){return ue(x(e),e)}));R.f=de;T.f=ce;I.f=le;w.f=he;_.f=S.f=pe;E.f=ve;M.f=function(e){return ue(L(e),e)};if(u){k(Y,"description",{configurable:true,get:function e(){return F(this).description}});if(!s){C(H,"propertyIsEnumerable",de,{unsafe:true})}}}n({global:true,constructor:true,wrap:true,forced:!c,sham:!c},{Symbol:X});V(b(ie),(function(e){N(e)}));n({target:B,stat:true,forced:!c},{useSetter:function(){oe=true},useSimple:function(){oe=false}});n({target:"Object",stat:true,forced:!c,sham:!u},{create:fe,defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he});n({target:"Object",stat:true,forced:!c},{getOwnPropertyNames:pe});D();j(X,B);P[W]=true},6980:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}},7040:(e,t,r)=>{"use strict";var n=r(4495);e.exports=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},7298:(e,t,r)=>{"use strict";r.r(t)},7336:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=r;function r(){return(0,t.jsxs)("defs",{children:[(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-0",children:(0,t.jsx)("path",{d:"M60.13,24A26.18,26.18,0,0,1,86.27,50.22V68.8A26.14,26.14,0,1,1,34,68.8V50.22A26.18,26.18,0,0,1,60.13,24Zm0,3.8A22.37,22.37,0,0,0,37.8,50.22V68.8a22.34,22.34,0,1,0,44.67,0V50.22A22.37,22.37,0,0,0,60.13,27.8Zm0,15.36a7,7,0,0,0-7,7.06V68.8a7,7,0,1,0,14,0V50.22A7,7,0,0,0,60.13,43.16Zm0-3.8A10.84,10.84,0,0,1,71,50.22V68.8a10.83,10.83,0,1,1-21.65,0V50.22A10.84,10.84,0,0,1,60.13,39.36Zm-.35-7A18.48,18.48,0,0,1,78.26,50.85v18.7a18.48,18.48,0,0,1-37,0V50.85A18.48,18.48,0,0,1,59.78,32.37Zm0,3.8A14.68,14.68,0,0,0,45.1,50.85v18.7a14.68,14.68,0,0,0,29.36,0V50.85A14.68,14.68,0,0,0,59.78,36.17Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-1",children:(0,t.jsx)("path",{d:"M51.22,58.3a1.9,1.9,0,0,1-2.49-2.87l6.64-5.77a1.9,1.9,0,0,1,3.15,1.43V93.68a1.9,1.9,0,1,1-3.8,0V55.26Zm-10-11.17a1.9,1.9,0,1,1-2.5-2.86C47,37.09,53.67,31.19,57.83,27.47a9.23,9.23,0,0,1,15.37,7V93.68a1.9,1.9,0,0,1-3.8,0V34.46a5.43,5.43,0,0,0-9-4.16C56.19,34,49.47,39.94,41.25,47.13Zm4,6.36a1.9,1.9,0,1,1-2.52-2.85l20-17A1.9,1.9,0,0,1,66,35.12V94.34a1.9,1.9,0,1,1-3.8,0v-55Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-2",children:(0,t.jsx)("path",{d:"M82.58,76.24a1.9,1.9,0,0,1,0,3.8h-19a1.9,1.9,0,0,1-1.46-3.12Q74,62.55,76.42,59.73c5.2-6.21,6.5-13.35,3.75-19.82A20.16,20.16,0,0,0,67.84,28.78c-6.33-2-13.83-.91-18.88,2.59A23.32,23.32,0,0,0,38.79,48.93,1.9,1.9,0,1,1,35,48.57,27.11,27.11,0,0,1,46.8,28.24c6-4.17,14.74-5.39,22.16-3.09A24,24,0,0,1,83.67,38.43C87,46.26,85.43,54.9,79.34,62.17q-2.1,2.49-11.72,14.07Zm0,15.6a1.9,1.9,0,1,1,0,3.8H47a9.7,9.7,0,0,1-7.44-15.91q21.71-26.13,25-30C66,47.93,66.24,46.94,65.85,46a4.71,4.71,0,0,0-2.6-2.34,7.49,7.49,0,0,0-5.44.52,7.77,7.77,0,0,0-3.53,6.23,1.9,1.9,0,1,1-3.78-.36,11.53,11.53,0,0,1,5.15-9c2.09-1.46,5.87-1.91,8.72-1a8.5,8.5,0,0,1,5,4.48c1,2.41.38,4.84-1.93,7.6s-10.51,12.62-25,30A5.91,5.91,0,0,0,47,91.84Zm0-7.8a1.9,1.9,0,1,1,0,3.8H47a1.9,1.9,0,0,1-1.46-3.12q21.68-26.08,25-30C73.88,50.64,74.55,46.6,73,43a12.44,12.44,0,0,0-7.47-6.73c-4.11-1.27-9.13-.55-12.15,1.55a15.5,15.5,0,0,0-6.85,11.9,1.9,1.9,0,0,1-3.79-.36,19.34,19.34,0,0,1,8.47-14.66c4-2.77,10.23-3.67,15.45-2.06a16.22,16.22,0,0,1,9.84,8.88c2.11,5,1.18,10.52-3.13,15.67Q70.31,60.83,51,84Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-3",children:(0,t.jsx)("path",{d:"M45.08,45.27a1.9,1.9,0,1,1,0-3.8H60.81A1.9,1.9,0,0,1,62.4,44.4l-4.73,7.31a5.77,5.77,0,0,0,3.52,8.74c6.18,1.51,9.23,4.39,10,9.55.4,3.42-1,6.23-4.29,9.14l-.11.08a9.58,9.58,0,0,1-6,1.89c-4.71,0-8.06-2.26-10.64-7.45a1.9,1.9,0,1,1,3.4-1.7c2,4,4,5.35,7.24,5.35a5.86,5.86,0,0,0,3.61-1.07c2.4-2.13,3.21-3.79,3-5.76-.48-3.44-2.31-5.18-7.08-6.33a9.58,9.58,0,0,1-5.81-14.5l2.84-4.38ZM86.47,68l0,.12c1.07,8.9-2.3,16.39-9.62,22.74l-.33.27a25,25,0,0,1-15.76,5.37c-10.55,0-19.26-5.49-24.5-16a1.9,1.9,0,1,1,3.4-1.7c4.6,9.24,12,13.9,21.1,13.9a21.25,21.25,0,0,0,13.4-4.54l.2-.17c6.41-5.57,9.25-11.85,8.34-19.4v-.09A21.05,21.05,0,0,0,73,53a1.91,1.91,0,0,1-.57-2.63l7.45-11.51A5.78,5.78,0,0,0,75,29.9H45.08a1.9,1.9,0,0,1,0-3.8H75a9.58,9.58,0,0,1,8.09,14.78l-6.45,10A24.8,24.8,0,0,1,86.47,68ZM45.08,37.59a1.9,1.9,0,1,1,0-3.8H75a1.9,1.9,0,0,1,1.59,2.93l-11,17C73.29,56.3,77.79,61.44,78.81,69c.79,6.5-1.92,11.6-7.09,16.09a17.29,17.29,0,0,1-10.94,3.68c-7.22,0-13.46-3.47-17.57-11.72a1.9,1.9,0,1,1,3.4-1.7C50,82.27,54.94,85,60.78,85a13.49,13.49,0,0,0,8.51-2.8C73.54,78.5,75.65,74.52,75,69.5c-.9-6.71-5.09-10.92-12.91-12.82A1.9,1.9,0,0,1,61,53.8l10.5-16.21Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-4",children:(0,t.jsx)("path",{d:"M69.65,28a1.9,1.9,0,1,1,3.8,0l.23,63.91a1.91,1.91,0,0,1-1.9,1.9,1.88,1.88,0,0,1-1.9-1.89Zm8,51a1.9,1.9,0,0,1,0-3.8h5.7a1.9,1.9,0,0,1,0,3.8Zm-12.13-3.8a1.9,1.9,0,0,1,0,3.8h-24a1.89,1.89,0,0,1-1.85-2.31l11-49.08a1.9,1.9,0,0,1,3.71.84L43.87,75.17Zm1.8,8.22V91.9a1.9,1.9,0,1,1-3.8,0V85.23H41.28c-6.09,0-9.49-4.91-7.7-10.78L37,59.6c.19-.85,2.37-10.3,2.95-12.8C42.1,37.55,43.4,32,44.52,27.54a1.9,1.9,0,1,1,3.68.92c-1.1,4.45-2.4,10-4.53,19.2-.58,2.5-2.75,11.94-3,12.79C39.43,66,38.36,70.66,37.26,75.38l0,.13c-1.1,3.51.56,5.92,4.05,5.92h24.1a1.9,1.9,0,0,1,1.9,1.9ZM79.6,85.23V91.9a1.9,1.9,0,1,1-3.8,0V83.33a1.91,1.91,0,0,1,1.9-1.9h5.92a1.9,1.9,0,0,1,0,3.8ZM75.81,70.79s0-.06,0-.09V28a1.9,1.9,0,1,1,3.8,0V69h4a1.9,1.9,0,0,1,0,3.8H77.7a1.91,1.91,0,0,1-1.9-1.9S75.81,70.82,75.81,70.79Zm-8.65.58a1.91,1.91,0,0,1-1.83,1.41H49.55a1.91,1.91,0,0,1-1.86-2.31L57,27.61a1.9,1.9,0,1,1,3.71.81L51.91,69H63.48V28a1.9,1.9,0,0,1,3.8,0V70.7A1.85,1.85,0,0,1,67.16,71.37Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-5",children:(0,t.jsx)("path",{d:"M48.48,75a1.9,1.9,0,0,1,3.33-1.83,7.17,7.17,0,0,0,1.61,1.59,8.06,8.06,0,0,0,3.8,1.59,6.26,6.26,0,0,0,6.94-3.81c1.06-2.28-.11-5.6-2.22-6.58a19,19,0,0,0-6.67-.93h-8A9.44,9.44,0,0,1,38,54.49l2.38-22.05a9.42,9.42,0,0,1,9.34-8.34H74a1.9,1.9,0,1,1,0,3.8H49.68a5.63,5.63,0,0,0-5.57,5L41.73,54.92a5.65,5.65,0,0,0,5.57,6.34h8a21.85,21.85,0,0,1,8.28,1.28c4,1.88,6,7.47,4.06,11.63a10,10,0,0,1-10.89,6,11.83,11.83,0,0,1-5.58-2.31A10.06,10.06,0,0,1,48.48,75ZM69.85,48.81c11.56,5.39,16.81,20,11.37,31.74A25,25,0,0,1,54.77,95.14c-8.27-1.09-15.85-6.25-19.44-12.79a1.9,1.9,0,0,1,3.34-1.83c3,5.48,9.52,9.92,16.59,10.85A21.2,21.2,0,0,0,77.77,79c4.56-9.87.13-22.21-9.53-26.7a31.07,31.07,0,0,0-12.5-2.33,1.89,1.89,0,0,1-1.87-2L54.44,41a1.9,1.9,0,0,1,1.9-1.74H74A1.9,1.9,0,1,1,74,43H58.09l-.27,3.16A32.57,32.57,0,0,1,69.85,48.81Zm-14,5.56c4.54,0,8.61.67,11.43,2C75.05,60,78.7,70.05,75,78A17.53,17.53,0,0,1,56.33,88.32c-6.23-.82-11.57-4.81-13.84-8.95a1.9,1.9,0,0,1,3.33-1.83c1.72,3.13,6,6.36,11,7a13.72,13.72,0,0,0,14.73-8.11c2.81-6.09,0-13.91-5.88-16.64a24.93,24.93,0,0,0-9.82-1.63h-8A1.9,1.9,0,0,1,46,56.07l2.38-22a1.9,1.9,0,0,1,1.89-1.7H74.62a1.9,1.9,0,0,1,0,3.8H52L50,54.37Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-6",children:(0,t.jsx)("path",{d:"M50.22,63.2l.05-.09L73.75,21.4a1.9,1.9,0,1,1,3.31,1.86L53.58,65l-.08.13-.07.13a4.27,4.27,0,0,0-.64,2.2c0,2.8,3,5.32,6.85,5.32s6.84-2.52,6.84-5.32c0-2.32-2.07-4.53-5.11-5.15a1.9,1.9,0,1,1,.77-3.72c4.7,1,8.14,4.62,8.14,8.87,0,5-4.79,9.12-10.64,9.12S49,72.49,49,67.44a8.11,8.11,0,0,1,1.17-4.15Zm-13-7.41L56.57,21.41a1.9,1.9,0,0,1,3.31,1.87L40.4,57.87a1.14,1.14,0,0,1-.15.23,19,19,0,0,0-2.45,9.34c0,11.19,9.78,20.22,21.84,20.22s21.84-9,21.84-20.22c0-8.06-5.08-15.19-12.86-18.44a1.9,1.9,0,1,1,1.47-3.51c9.15,3.83,15.19,12.31,15.19,21.95,0,13.36-11.55,24-25.64,24S34,80.8,34,67.44A22.74,22.74,0,0,1,37.08,56Zm6.64,3.52L65.68,21A1.9,1.9,0,0,1,69,22.86L46.43,62.47a11.34,11.34,0,0,0-1.13,5c0,7,6.38,12.77,14.34,12.77S74,74.45,74,67.44c0-5.21-3.55-9.87-8.91-11.83A1.9,1.9,0,1,1,66.37,52c6.81,2.49,11.41,8.53,11.41,15.4,0,9.2-8.16,16.57-18.14,16.57S41.5,76.64,41.5,67.44a15.34,15.34,0,0,1,2.17-7.87A1.51,1.51,0,0,1,43.85,59.31Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-7",children:(0,t.jsx)("path",{d:"M41,47.8A1.9,1.9,0,1,1,41,44H66.55a1.9,1.9,0,0,1,1.74,2.67L45.59,98.22a1.9,1.9,0,1,1-3.48-1.53L63.64,47.8Zm0-14.9a1.9,1.9,0,0,1,0-3.8H78.35a9.35,9.35,0,0,1,8.54,13.27L62.18,98.17a1.9,1.9,0,1,1-3.47-1.54L83.43,40.8a5.55,5.55,0,0,0-5.08-7.9Zm0,7.45a1.9,1.9,0,0,1,0-3.8H78.35a1.9,1.9,0,0,1,1.74,2.67L53.83,98.91a1.9,1.9,0,0,1-3.47-1.54l25.07-57Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-8",children:(0,t.jsx)("path",{d:"M61.25,58.49l-.26,0c-9.75.24-15.61,6.63-15.61,13.63S52.7,84.22,61,84.22s14.58-6.36,14.58-12.08a11,11,0,0,0-.66-3.74c0-.1-.06-.19-.1-.29a1.9,1.9,0,1,1,3.54-1.37c.05.12.1.25.14.37a14.79,14.79,0,0,1,.88,5C79.37,80.41,70.44,88,61,88S41.58,81.35,41.58,72.14,49.09,55,60.85,54.71l.25,0c6.68,0,11.34-3.63,11.34-9S67.75,35.6,61.1,35.21,48.71,39,48.71,44.32c0,.2,0,.41,0,.61.07,1,0,2.57-1.76,2.7S45,46.27,45,45.22c0-.3,0-.6,0-.9,0-7.61,7.54-12.91,16.19-12.91s15.14,6.69,15.14,14.3S69.83,58.43,61.25,58.49ZM60.18,47.44h.25c2.6,0,4.48-1.36,4.48-2.39S63,42.65,60.43,42.65a5.25,5.25,0,0,0-4.18,1.67,1.9,1.9,0,1,1-3-2.27,9,9,0,0,1,7.23-3.2c4.48,0,8.28,2.74,8.28,6.19S65,51.17,60.58,51.23h-.26c-12.38,0-22.42,9-22.42,20.23s10,20.22,22.42,20.22,22.42-9,22.42-20.22a18.58,18.58,0,0,0-2.25-8.87,1.9,1.9,0,0,1,3.35-1.8,22.42,22.42,0,0,1,2.7,10.67c0,13.4-11.83,24-26.22,24S34.1,84.87,34.1,71.47,45.85,47.51,60.18,47.44Zm.39,18.69h-.25c-4.22,0-7.43,2.59-7.43,5.33s3.21,5.32,7.43,5.32,7.43-2.58,7.43-5.32a3.48,3.48,0,0,0-.11-.85,1.05,1.05,0,0,0,0-.19,1.9,1.9,0,1,1,3.64-1.09c0,.12.07.24.1.37a7,7,0,0,1,.22,1.76c0,5-5.08,9.12-11.23,9.12s-11.23-4.08-11.23-9.12,5-9.06,11.08-9.13h.26C71.18,62.33,79.9,54.65,79.9,45S71.18,27.75,60.43,27.75,41,35.43,41,45a15.54,15.54,0,0,0,.62,4.37,1.9,1.9,0,1,1-3.65,1.06A19.36,19.36,0,0,1,37.16,45C37.16,33.22,47.67,24,60.43,24S83.7,33.22,83.7,45,73.26,66.06,60.57,66.13Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-9",children:(0,t.jsx)("path",{d:"M70.51,53.36l-.05.09L47,95.16a1.9,1.9,0,1,1-3.31-1.86L67.15,51.58l.08-.13.07-.13a4.27,4.27,0,0,0,.64-2.2c0-2.8-3-5.32-6.85-5.32s-6.84,2.52-6.84,5.32c0,2.32,2.07,4.53,5.11,5.15A1.9,1.9,0,0,1,58.6,58c-4.71-1-8.15-4.63-8.15-8.88,0-5,4.8-9.12,10.64-9.12s10.65,4.07,10.65,9.12a8.11,8.11,0,0,1-1.17,4.15Zm13,7.41L64.17,95.15a1.91,1.91,0,0,1-3.32-1.87L80.33,58.69a1.14,1.14,0,0,1,.15-.23,19,19,0,0,0,2.45-9.34c0-11.19-9.78-20.22-21.84-20.22s-21.84,9-21.84,20.22c0,8.06,5.08,15.19,12.86,18.44a1.9,1.9,0,1,1-1.47,3.51c-9.15-3.83-15.19-12.31-15.19-21.95,0-13.36,11.55-24,25.64-24s25.64,10.66,25.64,24a22.81,22.81,0,0,1-3.08,11.46C83.61,60.65,83.56,60.71,83.52,60.77Zm-6.64-3.52L55.05,95.58a1.9,1.9,0,0,1-3.31-1.88L74.31,54.09a11.47,11.47,0,0,0,1.12-5c0-7-6.38-12.77-14.34-12.77S46.75,42.11,46.75,49.12c0,5.21,3.55,9.87,8.91,11.83a1.9,1.9,0,1,1-1.3,3.57C47.55,62,43,56,43,49.12c0-9.2,8.16-16.57,18.14-16.57s18.14,7.37,18.14,16.57A15.34,15.34,0,0,1,77.06,57,1.51,1.51,0,0,1,76.88,57.25Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-*",children:(0,t.jsx)("path",{d:"M54,90.19a1.9,1.9,0,0,1-3.8,0V29.69a1.9,1.9,0,0,1,3.8,0Zm12.25-60.5a1.9,1.9,0,1,1,3.8,0v60.5a1.9,1.9,0,1,1-3.8,0ZM74.7,40.62l.54-.31,9-6.38A1.9,1.9,0,0,1,86.4,37l-9,6.43-.15.1-.62.35a1.9,1.9,0,1,1-1.9-3.29Zm2.67,35.16,9.74,7.81a1.9,1.9,0,0,1-2.38,3L75,78.75a1.9,1.9,0,1,1,2.37-3Zm-2.49-26,.2-.11,13-8.71a1.9,1.9,0,0,1,2.12,3.16l-13,8.74-.11.07-.25.14a1.9,1.9,0,1,1-1.9-3.29Zm2.45,17.11L91,77A1.9,1.9,0,0,1,88.78,80L75.07,69.94a1.9,1.9,0,0,1,2.26-3.06Zm-32-26.26a1.9,1.9,0,1,1-1.9,3.29l-.62-.35-.15-.1L33.6,37a1.9,1.9,0,0,1,2.21-3.1l8.95,6.38Zm-.47-.26-.07,0-.08-.05-1,1.65Zm-2.2,35.42a1.9,1.9,0,1,1,2.37,3l-9.73,7.8a1.9,1.9,0,0,1-2.38-3Zm2.49-26a1.9,1.9,0,1,1-1.9,3.29L43,52.92l-.11-.07-13-8.74A1.9,1.9,0,0,1,31.94,41l13,8.71ZM42.67,66.88a1.9,1.9,0,0,1,2.26,3.06L31.22,80A1.9,1.9,0,0,1,29,77ZM58.24,28.72a1.9,1.9,0,0,1,3.8,0V91.16a1.9,1.9,0,0,1-3.8,0ZM40.72,60.42l-14.6-9.21a1.9,1.9,0,0,1,2-3.21L44.88,58.55l.17.12a2,2,0,0,1,.68.61,1.9,1.9,0,0,1-.49,2.64L28.53,73.44a1.9,1.9,0,1,1-2.15-3.13ZM75,58.67l.17-.12L91.85,48a1.9,1.9,0,0,1,2,3.21l-14.6,9.21,14.34,9.89a1.9,1.9,0,0,1-2.15,3.13L74.76,61.92a1.9,1.9,0,0,1-.49-2.64A2,2,0,0,1,75,58.67Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-#",children:(0,t.jsx)("path",{d:"M60.79,41.38a1.9,1.9,0,1,1,0-3.8h5.5a1.9,1.9,0,0,1,0,3.8Zm3.84,8.36a1.9,1.9,0,1,1,0,3.8H59.05a1.9,1.9,0,0,1,0-3.8ZM61.31,78.25a1.9,1.9,0,0,1,0,3.8H55.6a1.9,1.9,0,0,1,0-3.8Zm-4-8.37a1.9,1.9,0,0,1,0-3.8H63a1.9,1.9,0,0,1,0,3.8Zm9.45,21.81A1.9,1.9,0,1,1,63,91.27l7.09-63.33a1.9,1.9,0,0,1,3.78.43ZM55.39,28a1.9,1.9,0,0,1,3.78.45L51.72,91.77A1.9,1.9,0,1,1,48,91.33Zm4.53,19.43a1.9,1.9,0,1,1,0-3.8h5.55a1.9,1.9,0,1,1,0,3.8ZM56.46,76a1.9,1.9,0,1,1,0-3.8h5.65a1.9,1.9,0,1,1,0,3.8ZM76.16,28a1.9,1.9,0,0,1,3.77.43L72.76,91.74A1.9,1.9,0,1,1,69,91.32Zm-26.92-.09a1.9,1.9,0,0,1,3.78.43l-7.3,63.38a1.9,1.9,0,1,1-3.78-.44ZM41.48,41.38H31.42a1.9,1.9,0,1,1,0-3.8h10.5L43,27.94a1.9,1.9,0,0,1,3.78.43L39.49,91.75a1.9,1.9,0,1,1-3.77-.43l1.07-9.27H31.42a1.9,1.9,0,0,1,0-3.8h5.81L37.49,76H31.42a1.9,1.9,0,1,1,0-3.8h6.51l.26-2.29H31.42a1.9,1.9,0,0,1,0-3.8h7.21l1.45-12.54H31.42a1.9,1.9,0,0,1,0-3.8h9.09l.27-2.28H31.42a1.9,1.9,0,0,1,0-3.8h9.8Zm42.78,0L84,43.66h5.46a1.9,1.9,0,0,1,0,3.8h-5.9l-.26,2.28h6.16a1.9,1.9,0,1,1,0,3.8h-6.6L81.42,66.08h8a1.9,1.9,0,1,1,0,3.8H81l-.26,2.29h8.74a1.9,1.9,0,1,1,0,3.8H80.28L80,78.25h9.44a1.9,1.9,0,1,1,0,3.8H79.58l-1.11,9.67a1.9,1.9,0,0,1-3.78-.44L82,28.07a1.9,1.9,0,1,1,3.77.44l-1,9.07h4.76a1.9,1.9,0,1,1,0,3.8Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-A",children:(0,t.jsx)("path",{d:"M36.47,88.72A1.9,1.9,0,0,1,33.08,87L58.87,36.16a1.9,1.9,0,0,1,3.39,0L88.05,87a1.9,1.9,0,0,1-3.39,1.72L60.57,41.22Zm-6.53,0A1.9,1.9,0,0,1,26.55,87L58.87,23.28a1.91,1.91,0,0,1,3.39,0L94.51,86.85a1.9,1.9,0,0,1-3.39,1.72L60.57,28.34Zm16.39-15,0,0L58.87,49a1.9,1.9,0,0,1,3.39,0L81.52,87a1.9,1.9,0,0,1-3.39,1.72L60.57,54.1,51.13,72.7h16a1.9,1.9,0,0,1,0,3.8h-18L43,88.72A1.9,1.9,0,0,1,39.61,87Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-B",children:(0,t.jsx)("path",{d:"M53.72,29.79V57.85H65.53c9,0,16.25-6.34,16.25-14s-7.22-14-16.25-14Zm0,59.92H73.33c9.12,0,16.42-6.35,16.42-14s-7.3-14-16.42-14H53.72Zm-8-31.84h4.18V29.79H45.75Zm0,31.84h4.18v-28H45.75Zm-8,0H42V29.79H37.79ZM35.9,93.5A1.9,1.9,0,0,1,34,91.6V27.9A1.9,1.9,0,0,1,35.9,26H65.53c11,0,20,7.92,20,17.82a17.24,17.24,0,0,1-8.2,14.39C86.56,59.85,93.54,67,93.54,75.68c0,9.9-9.1,17.82-20.21,17.82Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-C",children:(0,t.jsx)("path",{d:"M77.29,68.84a1.9,1.9,0,1,1,3.3,1.88,21.65,21.65,0,1,1,0-21.48,1.9,1.9,0,1,1-3.3,1.88,18.39,18.39,0,0,0-2.93-3.82,17.93,17.93,0,1,0,2.93,21.54Zm5.35,3a1.9,1.9,0,0,1,3.28,1.91A27.92,27.92,0,1,1,61.62,32.3,28.09,28.09,0,0,1,85.94,46.19a1.9,1.9,0,0,1-3.29,1.91,24.13,24.13,0,1,0-21,35.76A24.28,24.28,0,0,0,82.64,71.88Zm5.37,3a1.9,1.9,0,1,1,3.27,1.93A34.35,34.35,0,0,1,61.62,93.58c-18.9,0-34.25-15-34.25-33.6s15.35-33.6,34.25-33.6A34.35,34.35,0,0,1,91.28,43.16,1.9,1.9,0,1,1,88,45.09,30.57,30.57,0,0,0,61.62,30.18C44.8,30.18,31.17,43.53,31.17,60s13.63,29.8,30.45,29.8A30.57,30.57,0,0,0,88,74.87Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-D",children:(0,t.jsx)("path",{d:"M62.05,81.1H48.74a1.91,1.91,0,0,1-1.9-1.9V41.13a1.91,1.91,0,0,1,1.9-1.9H62.05C74.14,39.23,84,48.58,84,60.16S74.14,81.1,62.05,81.1Zm0-3.8c10,0,18.12-7.69,18.12-17.14S72.08,43,62.05,43H50.64V77.3Zm-.17,10.36h-20a1.9,1.9,0,0,1-1.9-1.9V34.89a1.9,1.9,0,0,1,1.9-1.9h20C77.67,33,90.5,45.21,90.5,60.33S77.67,87.66,61.88,87.66Zm0-3.8c13.73,0,24.82-10.55,24.82-23.53S75.61,36.79,61.88,36.79H43.77V83.86Zm-.25,10H35A1.9,1.9,0,0,1,33.1,92V28A1.9,1.9,0,0,1,35,26.1H61.63C81.16,26.1,97,41.26,97,60S81.16,93.9,61.63,93.9Zm0-3.8c17.47,0,31.6-13.5,31.6-30.1S79.1,29.9,61.63,29.9H36.9V90.1Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-E",children:(0,t.jsx)("path",{d:"M56.41,68.62a1.9,1.9,0,1,1,0-3.8H82.23a1.9,1.9,0,0,1,0,3.8Zm0-6.57a1.9,1.9,0,1,1,0-3.8H82.23a1.9,1.9,0,0,1,0,3.8Zm.11-6.57a1.9,1.9,0,0,1,0-3.8h25.7a1.9,1.9,0,0,1,0,3.8ZM85.2,77.11a1.9,1.9,0,0,1,0,3.8H50.4A1.9,1.9,0,0,1,48.5,79V40.89A1.9,1.9,0,0,1,50.4,39H85.2a1.9,1.9,0,0,1,0,3.8H52.3V77.11Zm0,6.41a1.9,1.9,0,0,1,0,3.8H43.84a1.9,1.9,0,0,1-1.9-1.9V34.48a1.91,1.91,0,0,1,1.9-1.9H85.2a1.9,1.9,0,0,1,0,3.8H45.74V83.52Zm0,6.41a1.9,1.9,0,0,1,0,3.8H37.15a1.9,1.9,0,0,1-1.9-1.9V28.07a1.91,1.91,0,0,1,1.9-1.9H85.2a1.9,1.9,0,0,1,0,3.8H39.05v60Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-F",children:(0,t.jsx)("path",{d:"M56.81,69.47a1.9,1.9,0,0,1,0-3.8h25a1.9,1.9,0,0,1,0,3.8Zm0-6.37a1.9,1.9,0,0,1,0-3.8h25a1.9,1.9,0,0,1,0,3.8Zm.11-6.37a1.9,1.9,0,0,1,0-3.8H81.84a1.9,1.9,0,0,1,0,3.8ZM53.06,94a1.9,1.9,0,1,1-3.8,0V42.55a1.9,1.9,0,0,1,1.9-1.9H85a1.9,1.9,0,1,1,0,3.8H53.06ZM46.7,94a1.9,1.9,0,1,1-3.8,0V36.39a1.9,1.9,0,0,1,1.9-1.9H85a1.9,1.9,0,1,1,0,3.8H46.7Zm-6.5,0a1.9,1.9,0,1,1-3.8,0V30.24a1.9,1.9,0,0,1,1.9-1.9H85a1.9,1.9,0,1,1,0,3.8H40.2Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-G",children:(0,t.jsx)("path",{d:"M76.3,63.79H66A1.9,1.9,0,0,1,66,60H88.33a1.91,1.91,0,0,1,1.9,1.9v14a2,2,0,0,1-.24.92A32.29,32.29,0,0,1,61.83,93.64C43.88,93.64,29.35,78.57,29.35,60S43.88,26.35,61.83,26.35A32.28,32.28,0,0,1,90,43.2a1.9,1.9,0,0,1-3.32,1.85,28.49,28.49,0,0,0-24.84-14.9C46,30.15,33.15,43.5,33.15,60S46,89.84,61.83,89.84a28.46,28.46,0,0,0,24.6-14.47V63.79H85.16v9.08a1.86,1.86,0,0,1-.24.92A26.41,26.41,0,0,1,61.83,87.71C47.12,87.71,35.22,75.29,35.22,60s11.9-27.72,26.61-27.72a26.41,26.41,0,0,1,23.1,13.95,1.9,1.9,0,1,1-3.32,1.83,22.65,22.65,0,0,0-19.78-12C49.25,36.08,39,46.77,39,60S49.25,83.91,61.83,83.91A22.6,22.6,0,0,0,81.36,72.37V63.79H80.1v6a1.9,1.9,0,0,1-.22.9,20.57,20.57,0,0,1-18,11.05C50.37,81.76,41.11,72,41.11,60s9.26-21.77,20.72-21.77a20.19,20.19,0,0,1,14.69,6.41,21.88,21.88,0,0,1,3.36,4.65,1.9,1.9,0,0,1-3.35,1.8,17.82,17.82,0,0,0-2.77-3.83A16.37,16.37,0,0,0,61.83,42c-9.32,0-16.92,8-16.92,18s7.6,18,16.92,18A16.72,16.72,0,0,0,76.3,69.32Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-H",children:(0,t.jsx)("path",{d:"M51.11,68.2a1.9,1.9,0,1,1,0-3.8h17.6a1.9,1.9,0,1,1,0,3.8Zm0-6.4a1.9,1.9,0,1,1,0-3.8h17.6a1.9,1.9,0,1,1,0,3.8Zm0-6.4a1.9,1.9,0,0,1,0-3.8h17.6a1.9,1.9,0,1,1,0,3.8ZM88.72,91.9a1.9,1.9,0,0,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Zm-6.58,0a1.9,1.9,0,0,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Zm-6.72,0a1.9,1.9,0,0,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Zm-27.32,0a1.9,1.9,0,1,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Zm-6.58,0a1.9,1.9,0,1,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Zm-6.72,0a1.9,1.9,0,1,1-3.8,0v-64a1.9,1.9,0,0,1,3.8,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-I",children:(0,t.jsx)("path",{d:"M67.79,92A1.9,1.9,0,0,1,64,92V28.32a1.9,1.9,0,0,1,3.8,0Zm-6.37,0a1.9,1.9,0,0,1-3.8,0V28.32a1.9,1.9,0,0,1,3.8,0ZM54.9,92a1.9,1.9,0,0,1-3.8,0V28.32a1.9,1.9,0,0,1,3.8,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-J",children:(0,t.jsx)("path",{d:"M60.78,28.32a1.9,1.9,0,0,1,3.8,0V73.07a7.66,7.66,0,0,1-15.32,0,1.9,1.9,0,1,1,3.8,0,3.86,3.86,0,0,0,7.72,0Zm6.49,0a1.9,1.9,0,1,1,3.8,0v44.8a14.16,14.16,0,1,1-28.31,0,1.9,1.9,0,0,1,3.8,0,10.36,10.36,0,1,0,20.71,0Zm6.5,0a1.9,1.9,0,1,1,3.8,0V73.07a20.66,20.66,0,1,1-41.31,0,1.9,1.9,0,1,1,3.8,0,16.86,16.86,0,1,0,33.71,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-K",children:(0,t.jsx)("path",{d:"M51,92a1.9,1.9,0,0,1-3.8,0V28A1.9,1.9,0,1,1,51,28ZM44.6,92a1.9,1.9,0,0,1-3.8,0V28a1.9,1.9,0,0,1,3.8,0Zm-6.7,0a1.9,1.9,0,0,1-3.8,0V28a1.9,1.9,0,0,1,3.8,0Zm51.7-3.33a1.9,1.9,0,0,1-3.26,2L68.22,60.57a1.89,1.89,0,0,1,0-2L87,27.36a1.9,1.9,0,0,1,3.26,1.95L72.06,59.58Zm-6.39,1a1.9,1.9,0,1,1-3.27,1.94L61.51,60.46a1.86,1.86,0,0,1,0-1.93L79.94,27.37a1.9,1.9,0,0,1,3.27,1.93L65.35,59.5ZM75.5,90A1.9,1.9,0,1,1,72.23,92L53.8,60.57a1.91,1.91,0,0,1,0-1.93L72.16,27.37a1.9,1.9,0,1,1,3.27,1.93L57.64,59.61Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-L",children:(0,t.jsx)("path",{d:"M84.32,75.27a1.9,1.9,0,1,1,0,3.8h-29a1.9,1.9,0,0,1-1.9-1.9V26.25a1.9,1.9,0,1,1,3.8,0v49Zm0,6.49a1.9,1.9,0,1,1,0,3.8H48.73a1.9,1.9,0,0,1-1.9-1.9V26.25a1.9,1.9,0,0,1,3.8,0V81.76Zm0,6.09a1.9,1.9,0,0,1,0,3.8H42a1.9,1.9,0,0,1-1.9-1.9V26.25a1.9,1.9,0,0,1,3.8,0v61.6Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-M",children:(0,t.jsx)("path",{d:"M89.33,29.66A1.9,1.9,0,0,1,92.58,31V89a1.9,1.9,0,1,1-3.8,0V35.63l-2.94,3V89A1.9,1.9,0,0,1,82,89V42.46l-3.27,3.31V89A1.9,1.9,0,1,1,75,89V49.61l-13.78,14a1.9,1.9,0,0,1-2.7,0l-13.78-14V89a1.9,1.9,0,0,1-3.8,0V45.77l-2.94-3V89a1.9,1.9,0,0,1-3.8,0V38.94l-3.25-3.3L31.1,89a1.9,1.9,0,0,1-3.8,0l-.2-58a1.9,1.9,0,0,1,3.25-1.35L59.84,59.52Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-N",children:(0,t.jsx)("path",{d:"M81.48,82.22,84.77,86V29a1.9,1.9,0,1,1,3.8,0V91a1.9,1.9,0,0,1-3.33,1.26L48.07,50.09V90.66a1.9,1.9,0,0,1-3.8,0V45.79L41,42.06V91a1.9,1.9,0,0,1-3.8,0V37.75L33.9,34V91a1.9,1.9,0,0,1-3.8,0V29a1.9,1.9,0,0,1,3.32-1.26L70.26,69.5V29a1.9,1.9,0,0,1,3.8,0V73.8l3.62,4.11V29a1.9,1.9,0,0,1,3.8,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-O",children:(0,t.jsx)("path",{d:"M93.78,60A33.78,33.78,0,1,1,60,26.22,33.79,33.79,0,0,1,93.78,60ZM90,60A30,30,0,1,0,60,90,30,30,0,0,0,90,60Zm-2.43,0A27.55,27.55,0,1,1,60,32.47,27.55,27.55,0,0,1,87.55,60Zm-3.8,0A23.75,23.75,0,1,0,60,83.76,23.75,23.75,0,0,0,83.75,60Zm-2.42.14A21.21,21.21,0,1,1,60.12,39,21.21,21.21,0,0,1,81.33,60.16Zm-3.8,0a17.41,17.41,0,1,0-17.41,17.4A17.41,17.41,0,0,0,77.53,60.16Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-P",children:(0,t.jsx)("path",{d:"M53.58,94a1.9,1.9,0,0,1-3.8,0V40.76H70.36a10.64,10.64,0,1,1,0,21.27H58.16a1.9,1.9,0,1,1,0-3.8h12.2a6.84,6.84,0,1,0,0-13.67H53.58Zm-6.42,0a1.9,1.9,0,0,1-3.8,0V34.51h27a16.89,16.89,0,1,1,0,33.77H58.15a1.9,1.9,0,1,1,0-3.8H70.31a13.09,13.09,0,1,0,0-26.17H47.16ZM41,94a1.9,1.9,0,0,1-3.8,0V28.2H70.65A23.46,23.46,0,0,1,94.37,51.4c0,12.82-10.63,23.19-23.72,23.19H58.16a1.9,1.9,0,1,1,0-3.8H70.65A19.66,19.66,0,0,0,90.57,51.4,19.66,19.66,0,0,0,70.65,32H41Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-Q",children:(0,t.jsx)("path",{d:"M70.55,86.13a1.9,1.9,0,1,1,1.31,3.57A32.63,32.63,0,1,1,90.6,71.79a1.9,1.9,0,1,1-3.5-1.48A28.67,28.67,0,1,0,60.68,87.88,28.58,28.58,0,0,0,70.55,86.13ZM66.91,81a1.9,1.9,0,1,1,1,3.65A26.65,26.65,0,1,1,87.2,59a26.75,26.75,0,0,1-.86,6.75,1.9,1.9,0,0,1-3.68-1A22.69,22.69,0,1,0,66.91,81ZM63.27,75.7a1.9,1.9,0,1,1,.56,3.76A20.53,20.53,0,1,1,81.21,58.21c0,.31,0,.63,0,.95a1.9,1.9,0,0,1-3.8,0c0-.27,0-.53,0-.79A16.64,16.64,0,1,0,60.79,75.88,17,17,0,0,0,63.27,75.7Zm35,14.66a1.9,1.9,0,0,1-3,2.29l-23.37-31a1.9,1.9,0,1,1,3-2.29Zm-7.58,0a1.9,1.9,0,0,1-3,2.29L67.13,65.25a1.9,1.9,0,1,1,3-2.28Zm-8.07-.42a1.9,1.9,0,1,1-3,2.27L62.24,68.93a1.9,1.9,0,0,1,3.05-2.28Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-R",children:(0,t.jsx)("path",{d:"M89.76,90.86a1.9,1.9,0,1,1-3.3,1.88L77.14,76.36a1.9,1.9,0,0,1,3.3-1.88Zm-7.39,0a1.9,1.9,0,0,1-3.31,1.88L69.74,76.36A1.9,1.9,0,0,1,73,74.48Zm-7.55,0a1.9,1.9,0,1,1-3.3,1.88L62.19,76.36a1.9,1.9,0,1,1,3.3-1.88Zm-26.29.85a1.9,1.9,0,0,1-3.8,0V41a1.9,1.9,0,0,1,1.9-1.9H66.69a9.16,9.16,0,0,1,0,18.31h-14a1.9,1.9,0,0,1,0-3.8h14a5.36,5.36,0,0,0,0-10.71H48.53Zm-6.54,0a1.9,1.9,0,0,1-3.8,0V34.44a1.9,1.9,0,0,1,1.9-1.9H66.63a15.72,15.72,0,0,1,0,31.43H52.71a1.9,1.9,0,0,1,0-3.8H66.63a11.92,11.92,0,0,0,0-23.83H42Zm-6,0a1.9,1.9,0,0,1-3.8,0V28.07a1.9,1.9,0,0,1,1.9-1.9H66.89a22.11,22.11,0,0,1,0,44.21H52.71a1.9,1.9,0,0,1,0-3.8H66.89a18.31,18.31,0,0,0,0-36.61H36Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-S",children:(0,t.jsx)("path",{d:"M39.81,87.1a1.9,1.9,0,1,1,0-3.8H65.55c6.77,0,12.18-4.83,12.18-10.68S72.32,62,65.55,62H60.2l-5.49,0c-8.78,0-16-6.43-16-14.47S45.93,33,54.71,33H80.45a1.9,1.9,0,0,1,0,3.8H54.71c-6.78,0-12.19,4.83-12.19,10.68S47.93,58.18,54.7,58.18l5.49,0h5.36c8.78,0,16,6.43,16,14.47s-7.2,14.48-16,14.48Zm0,6.7a1.9,1.9,0,0,1,0-3.8H65.62c10.81,0,19.51-7.83,19.51-17.38s-8.7-17.37-19.51-17.37H60.2l-5.24,0c-4.81,0-8.83-3.4-8.83-7.76s4-7.77,8.83-7.77H80.45a1.9,1.9,0,0,1,0,3.8H55c-2.84,0-5,1.85-5,4s2.19,4,5,4l5.23,0h5.43c12.83,0,23.31,9.43,23.31,21.17S78.45,93.8,65.62,93.8Zm0-13.41a1.9,1.9,0,0,1,0-3.8H65.29c2.85,0,5-1.85,5-4s-2.19-4-5-4H60.2l-5.56,0c-12.83,0-23.31-9.43-23.31-21.18S41.81,26.33,54.64,26.33H80.45a1.9,1.9,0,0,1,0,3.8H54.64C43.82,30.13,35.13,38,35.13,47.5s8.69,17.38,19.5,17.38l5.56,0h5.1c4.82,0,8.84,3.4,8.84,7.76s-4,7.77-8.84,7.77Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-T",children:(0,t.jsx)("path",{d:"M30,29H90a2,2,0,0,1,0,4H30a2,2,0,0,1,0-4ZM67.94,93a1.9,1.9,0,1,1-3.8,0V38.42a1.9,1.9,0,1,1,3.8,0Zm-6.75,0a1.9,1.9,0,0,1-3.8,0V38.42a1.9,1.9,0,1,1,3.8,0Zm-6.75,0a1.9,1.9,0,0,1-3.8,0V38.42a1.9,1.9,0,1,1,3.8,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-U",children:(0,t.jsx)("path",{d:"M73.25,33a1.9,1.9,0,1,1,3.8,0V68.48a17.08,17.08,0,1,1-34.15,0V33a1.9,1.9,0,0,1,3.8,0V68.48a13.28,13.28,0,1,0,26.55,0Zm6.38,0a1.9,1.9,0,0,1,3.8,0V68.47c0,13.27-10.5,24-23.47,24S36.5,81.74,36.5,68.47V33a1.9,1.9,0,1,1,3.8,0V68.47c0,11.2,8.82,20.25,19.66,20.25s19.67-9,19.67-20.25ZM86,33a1.9,1.9,0,0,1,3.8,0V68.28C89.81,85.18,76.45,98.9,60,98.9S30.1,85.18,30.1,68.28V33a1.9,1.9,0,0,1,3.8,0V68.28C33.9,83.1,45.58,95.1,60,95.1S86,83.1,86,68.28Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-V",children:(0,t.jsx)("path",{d:"M71.79,31.53a1.9,1.9,0,0,1,3.46,1.56L61.4,63.81a1.9,1.9,0,0,1-3.46,0L44.12,33.09a1.9,1.9,0,0,1,3.47-1.56L59.67,58.4Zm7.27.1a1.9,1.9,0,0,1,3.47,1.56L61.42,80.12a1.89,1.89,0,0,1-3.46,0L36.85,33.19a1.9,1.9,0,0,1,3.47-1.56L59.69,74.71ZM57.94,96.76,29.39,33.19a1.9,1.9,0,1,1,3.46-1.56L59.69,91.32,86.54,31.6A1.9,1.9,0,0,1,90,33.16L61.54,96.48a1.9,1.9,0,0,1-1.06,1.23,2,2,0,0,1-.82.17A1.9,1.9,0,0,1,57.94,96.76Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-W",children:(0,t.jsx)("path",{d:"M60,48.79a1.87,1.87,0,0,1,1.89,1.12l8.36,18.64L79.61,34.4a1.9,1.9,0,0,1,3.67,1L72.67,74l1.42,3.19L85.84,34.45a1.9,1.9,0,0,1,3.66,1l-13,47.16L78,86,92.22,34.42a1.9,1.9,0,0,1,3.66,1L80.31,92.09a2.23,2.23,0,0,1-4,.24L60,55.71,43.64,92.33a1.91,1.91,0,0,1-1.82,1.13,1.9,1.9,0,0,1-2.18-1.37L24.07,35.43a1.9,1.9,0,0,1,3.66-1L41.91,86l1.5-3.36-13-47.16a1.9,1.9,0,0,1,3.66-1L45.86,77.18,47.28,74,36.67,35.4a1.9,1.9,0,0,1,3.67-1l9.38,34.15,8.36-18.64A1.89,1.89,0,0,1,60,48.79Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-X",children:(0,t.jsx)("path",{d:"M90.27,27.25a1.9,1.9,0,0,1,3.06,2.26L74,55.69a1.9,1.9,0,1,1-3-2.26ZM54.41,75.76A1.9,1.9,0,1,1,57.47,78L46.32,93.1a1.9,1.9,0,1,1-3.06-2.26ZM82.2,27.11a1.9,1.9,0,1,1,3,2.26L69.82,50.25A1.9,1.9,0,0,1,66.76,48ZM50.34,70.22a1.9,1.9,0,0,1,3,2.25L38.29,92.91a1.9,1.9,0,0,1-3.06-2.26Zm23.41-43a1.9,1.9,0,0,1,3.06,2.26L65.57,44.71a1.9,1.9,0,1,1-3.06-2.26ZM46.15,64.59a1.9,1.9,0,0,1,3.06,2.26L29.94,92.9a1.9,1.9,0,1,1-3.05-2.25Zm47,26.06a1.9,1.9,0,0,1-3.05,2.26L43.26,29.51a1.9,1.9,0,0,1,3.06-2.26Zm-8.17,0A1.9,1.9,0,0,1,82,92.91L35.09,29.51a1.9,1.9,0,1,1,3-2.26Zm-8.2.19a1.9,1.9,0,1,1-3.06,2.26l-47-63.59a1.9,1.9,0,1,1,3.06-2.26Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-Y",children:(0,t.jsx)("path",{d:"M90,31.17a1.9,1.9,0,0,1,3,2.33l-19,24.35a1.9,1.9,0,1,1-3-2.34ZM82.11,31a1.9,1.9,0,1,1,3,2.34L70,52.79a1.9,1.9,0,0,1-3-2.34Zm-8.28.13a1.9,1.9,0,0,1,3,2.33l-11,14.14a1.9,1.9,0,0,1-3-2.34ZM44,33.5a1.9,1.9,0,0,1,3-2.33l23.36,30V96a1.9,1.9,0,0,1-3.8,0V62.46Zm-8,0a1.9,1.9,0,0,1,3-2.33l25,32.08V96a1.9,1.9,0,0,1-3.8,0V64.55Zm-8.17,0a1.9,1.9,0,0,1,3-2.33L57.21,65.11V96a1.9,1.9,0,0,1-3.8,0V66.41Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-Z",children:(0,t.jsx)("path",{d:"M35.3,43.61a1.9,1.9,0,1,1,0-3.8h27A1.9,1.9,0,0,1,64,42.61L38.69,90h47a1.9,1.9,0,0,1,0,3.8H35.52A1.9,1.9,0,0,1,33.85,91L59.16,43.61Zm0-13.52a1.9,1.9,0,1,1,0-3.8H85.49a1.9,1.9,0,0,1,1.68,2.79L61.83,76.43H85.69a1.9,1.9,0,1,1,0,3.8h-27A1.9,1.9,0,0,1,57,77.44L82.32,30.09Zm0,6.69a1.9,1.9,0,1,1,0-3.8H73.89a1.9,1.9,0,0,1,1.68,2.79L50.34,83.13H85.69a1.9,1.9,0,0,1,0,3.8H47.17a1.9,1.9,0,0,1-1.67-2.8L70.73,36.78Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-OT",children:(0,t.jsx)("path",{d:"M37.8,87.29H34V75A14.05,14.05,0,0,1,48.14,61H71.66A14.05,14.05,0,0,1,85.8,75V87.29H82V75A10.25,10.25,0,0,0,71.66,64.8H48.14A10.25,10.25,0,0,0,37.8,75ZM59.9,53A11.1,11.1,0,1,0,48.8,41.9,11.1,11.1,0,0,0,59.9,53Zm0,3.8A14.9,14.9,0,1,1,74.8,41.9,14.9,14.9,0,0,1,59.9,56.8Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 120 120",id:"round-avatar-default-HARDWARE-TERMINAL",children:(0,t.jsx)("path",{d:"M83.1,34.8H66.9c0,0.3,0,0.6,0,0.9c0,1.2-0.3,2.4-0.9,3.6h17.1 c0.9,0,1.5,0.6,1.5,1.2v25.2c0,0.6-0.6,1.2-1.5,1.2H36.9c-0.9,0-1.5-0.6-1.5-1.2V40.5c0-0.6,0.6-1.2,1.5-1.2h16.5c-0.6-0.9-0.9-2.1-0.9-3.6c0-0.3,0-0.6,0-0.9 H36.9c-3.3,0-6,2.4-6,5.7v25.2c0,3.3,2.7,5.7,6,5.7h4.8l-3.6,17.7c-0.3,1.2,0.6,2.4,1.8,2.7s2.4-0.6,2.7-1.8l3.6-18.6h28.2L78,90 c0.6,3,5.1,2.1,4.5-0.9l-3.6-17.7h3.9c3.3,0,6-2.4,6-5.7V40.5C89.4,37.2,86.4,34.8,83.1,34.8z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 40 40",id:"round-avatar-default-phoneNumber",children:(0,t.jsx)("path",{id:"Shape",d:"M20,38.3c10.1,0,18.3-8.2,18.3-18.3S30.1,1.7,20,1.7S1.7,9.9,1.7,20S9.9,38.3,20,38.3z M20,40C9,40,0,31,0,20 S9,0,20,0s20,9,20,20S31,40,20,40z M26.9,14.2H13.1v14.4h13.8V14.2z M26.9,12.6V9.7H13.1v2.9H26.9z M12.7,8.3h14.6 c0.6,0,1,0.4,1,1V29c0,0.5-0.5,1-1,1H12.7c-0.6,0-1-0.4-1-1V9.3C11.7,8.8,12.1,8.3,12.7,8.3z M17.6,27c-0.4,0-0.7-0.4-0.7-0.8 s0.3-0.8,0.7-0.8h4.5c0.4,0,0.7,0.4,0.7,0.8S22.6,27,22.2,27H17.6z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 40 40",id:"round-avatar-default-email",children:(0,t.jsx)("path",{id:"Shape",d:"M31.56,40.99 L31.56,79.54 C31.5332215,79.9507547 31.684744,80.3531279 31.9758081,80.6441919 C32.2668721,80.935256 32.6692453,81.0867785 33.08,81.06 L87.72,81.06 C88.1307547,81.0867785 88.5331279,80.935256 88.8241919,80.6441919 C89.115256,80.3531279 89.2667785,79.9507547 89.24,79.54 L89.24,41.29 L65.56,60.42 C62.5485909,62.8484585 58.2514091,62.8484585 55.24,60.42 L31.56,40.99 Z M85.9,38.56 L35.5,38.56 L57.97,57.08 C59.3645197,58.2887647 61.4354803,58.2887647 62.83,57.08 L85.9,38.56 Z M33.08,34 L87.72,34 C91.0733341,34.0109766 93.7890234,36.7266659 93.8,40.08 L93.8,79.54 C93.7890234,82.8933341 91.0733341,85.6090234 87.72,85.62 L33.08,85.62 C29.7266659,85.6090234 27.0109766,82.8933341 27,79.54 L27,40.08 C27.0109766,36.7266659 29.7266659,34.0109766 33.08,34 Z"})})]})}}))},7438:(e,t,r)=>{"use strict";r.r(t)},7452:e=>{var t=function(e){"use strict";var t=Object.prototype;var r=t.hasOwnProperty;var n=Object.defineProperty||function(e,t,r){e[t]=r.value};var i;var o=typeof Symbol==="function"?Symbol:{};var a=o.iterator||"@@iterator";var s=o.asyncIterator||"@@asyncIterator";var u=o.toStringTag||"@@toStringTag";function c(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true});return e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof y?t:y;var a=Object.create(o.prototype);var s=new O(i||[]);n(a,"_invoke",{value:R(e,r,s)});return a}e.wrap=l;function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var d="suspendedStart";var h="suspendedYield";var p="executing";var v="completed";var m={};function y(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var S=Object.getPrototypeOf;var E=S&&S(S(P([])));if(E&&E!==t&&r.call(E,a)){_=E}var w=b.prototype=y.prototype=Object.create(_);g.prototype=b;n(w,"constructor",{value:b,configurable:true});n(b,"constructor",{value:g,configurable:true});g.displayName=c(b,u,"GeneratorFunction");function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}e.isGeneratorFunction=function(e){var t=typeof e==="function"&&e.constructor;return t?t===g||(t.displayName||t.name)==="GeneratorFunction":false};e.mark=function(e){if(Object.setPrototypeOf){Object.setPrototypeOf(e,b)}else{e.__proto__=b;c(e,u,"GeneratorFunction")}e.prototype=Object.create(w);return e};e.awrap=function(e){return{__await:e}};function I(e,t){function i(n,o,a,s){var u=f(e[n],e,o);if(u.type==="throw"){s(u.arg)}else{var c=u.arg;var l=c.value;if(l&&typeof l==="object"&&r.call(l,"__await")){return t.resolve(l.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)}))}return t.resolve(l).then((function(e){c.value=e;a(c)}),(function(e){return i("throw",e,a,s)}))}}var o;function a(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}n(this,"_invoke",{value:a})}T(I.prototype);c(I.prototype,s,(function(){return this}));e.AsyncIterator=I;e.async=function(t,r,n,i,o){if(o===void 0)o=Promise;var a=new I(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))};function R(e,t,r){var n=d;return function i(o,a){if(n===p){throw new Error("Generator is already running")}if(n===v){if(o==="throw"){throw a}return x()}r.method=o;r.arg=a;while(true){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===m)continue;return u}}if(r.method==="next"){r.sent=r._sent=r.arg}else if(r.method==="throw"){if(n===d){n=v;throw r.arg}r.dispatchException(r.arg)}else if(r.method==="return"){r.abrupt("return",r.arg)}n=p;var c=f(e,t,r);if(c.type==="normal"){n=r.done?v:h;if(c.arg===m){continue}return{value:c.arg,done:r.done}}else if(c.type==="throw"){n=v;r.method="throw";r.arg=c.arg}}}}function C(e,t){var r=t.method;var n=e.iterator[r];if(n===i){t.delegate=null;if(r==="throw"&&e.iterator["return"]){t.method="return";t.arg=i;C(e,t);if(t.method==="throw"){return m}}if(r!=="return"){t.method="throw";t.arg=new TypeError("The iterator does not provide a '"+r+"' method")}return m}var o=f(n,e.iterator,t.arg);if(o.type==="throw"){t.method="throw";t.arg=o.arg;t.delegate=null;return m}var a=o.arg;if(!a){t.method="throw";t.arg=new TypeError("iterator result is not an object");t.delegate=null;return m}if(a.done){t[e.resultName]=a.value;t.next=e.nextLoc;if(t.method!=="return"){t.method="next";t.arg=i}}else{return a}t.delegate=null;return m}T(w);c(w,u,"Generator");c(w,a,(function(){return this}));c(w,"toString",(function(){return"[object Generator]"}));function k(e){var t={tryLoc:e[0]};if(1 in e){t.catchLoc=e[1]}if(2 in e){t.finallyLoc=e[2];t.afterLoc=e[3]}this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal";delete t.arg;e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}];e.forEach(k,this);this.reset(true)}e.keys=function(e){var t=Object(e);var r=[];for(var n in t){r.push(n)}r.reverse();return function e(){while(r.length){var n=r.pop();if(n in t){e.value=n;e.done=false;return e}}e.done=true;return e}};function P(e){if(e!=null){var t=e[a];if(t){return t.call(e)}if(typeof e.next==="function"){return e}if(!isNaN(e.length)){var n=-1,o=function t(){while(++n<e.length){if(r.call(e,n)){t.value=e[n];t.done=false;return t}}t.value=i;t.done=true;return t};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}e.values=P;function x(){return{value:i,done:true}}O.prototype={constructor:O,reset:function(e){this.prev=0;this.next=0;this.sent=this._sent=i;this.done=false;this.delegate=null;this.method="next";this.arg=i;this.tryEntries.forEach(A);if(!e){for(var t in this){if(t.charAt(0)==="t"&&r.call(this,t)&&!isNaN(+t.slice(1))){this[t]=i}}}},stop:function(){this.done=true;var e=this.tryEntries[0];var t=e.completion;if(t.type==="throw"){throw t.arg}return this.rval},dispatchException:function(e){if(this.done){throw e}var t=this;function n(r,n){s.type="throw";s.arg=e;t.next=r;if(n){t.method="next";t.arg=i}return!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];var s=a.completion;if(a.tryLoc==="root"){return n("end")}if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc");var c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc){return n(a.catchLoc,true)}else if(this.prev<a.finallyLoc){return n(a.finallyLoc)}}else if(u){if(this.prev<a.catchLoc){return n(a.catchLoc,true)}}else if(c){if(this.prev<a.finallyLoc){return n(a.finallyLoc)}}else{throw new Error("try statement without catch or finally")}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}if(o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc){o=null}var a=o?o.completion:{};a.type=e;a.arg=t;if(o){this.method="next";this.next=o.finallyLoc;return m}return this.complete(a)},complete:function(e,t){if(e.type==="throw"){throw e.arg}if(e.type==="break"||e.type==="continue"){this.next=e.arg}else if(e.type==="return"){this.rval=this.arg=e.arg;this.method="return";this.next="end"}else if(e.type==="normal"&&t){this.next=t}return m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e){this.complete(r.completion,r.afterLoc);A(r);return m}}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(n.type==="throw"){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){this.delegate={iterator:P(e),resultName:t,nextLoc:r};if(this.method==="next"){this.arg=i}return m}};return e}(true?e.exports:0);try{regeneratorRuntime=t}catch(e){if(typeof globalThis==="object"){globalThis.regeneratorRuntime=t}else{Function("r","regeneratorRuntime = r")(t)}}},7463:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,i=e[n];if(0<o(i,t))e[n]=t,e[r]=i,r=n;else break e}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length,a=i>>>1;n<a;){var s=2*(n+1)-1,u=e[s],c=s+1,l=e[c];if(0>o(u,r))c<i&&0>o(l,u)?(e[n]=l,e[c]=r,n=c):(e[n]=u,e[s]=r,n=s);else if(c<i&&0>o(l,r))e[n]=l,e[c]=r,n=c;else break e}}return t}function o(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],l=[],f=1,d=null,h=3,p=!1,v=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,g="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(e){for(var t=n(l);null!==t;){if(null===t.callback)i(l);else if(t.startTime<=e)i(l),t.sortIndex=t.expirationTime,r(c,t);else break;t=n(l)}}function S(e){m=!1;_(e);if(!v)if(null!==n(c))v=!0,L(E);else{var t=n(l);null!==t&&M(S,t.startTime-e)}}function E(e,r){v=!1;m&&(m=!1,g(I),I=-1);p=!0;var o=h;try{_(r);for(d=n(c);null!==d&&(!(d.expirationTime>r)||e&&!k());){var a=d.callback;if("function"===typeof a){d.callback=null;h=d.priorityLevel;var s=a(d.expirationTime<=r);r=t.unstable_now();"function"===typeof s?d.callback=s:d===n(c)&&i(c);_(r)}else i(c);d=n(c)}if(null!==d)var u=!0;else{var f=n(l);null!==f&&M(S,f.startTime-r);u=!1}return u}finally{d=null,h=o,p=!1}}var w=!1,T=null,I=-1,R=5,C=-1;function k(){return t.unstable_now()-C<R?!1:!0}function A(){if(null!==T){var e=t.unstable_now();C=e;var r=!0;try{r=T(!0,e)}finally{r?O():(w=!1,T=null)}}else w=!1}var O;if("function"===typeof b)O=function(){b(A)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,x=P.port2;P.port1.onmessage=A;O=function(){x.postMessage(null)}}else O=function(){y(A,0)};function L(e){T=e;w||(w=!0,O())}function M(e,r){I=y((function(){e(t.unstable_now())}),r)}t.unstable_IdlePriority=5;t.unstable_ImmediatePriority=1;t.unstable_LowPriority=4;t.unstable_NormalPriority=3;t.unstable_Profiling=null;t.unstable_UserBlockingPriority=2;t.unstable_cancelCallback=function(e){e.callback=null};t.unstable_continueExecution=function(){v||p||(v=!0,L(E))};t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<e?Math.floor(1e3/e):5};t.unstable_getCurrentPriorityLevel=function(){return h};t.unstable_getFirstCallbackNode=function(){return n(c)};t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var r=h;h=t;try{return e()}finally{h=r}};t.unstable_pauseExecution=function(){};t.unstable_requestPaint=function(){};t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=h;h=e;try{return t()}finally{h=r}};t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();"object"===typeof o&&null!==o?(o=o.delay,o="number"===typeof o&&0<o?a+o:a):o=a;switch(e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}s=o+s;e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s,sortIndex:-1};o>a?(e.sortIndex=o,r(l,e),null===n(c)&&e===n(l)&&(m?(g(I),I=-1):m=!0,M(S,o-a))):(e.sortIndex=s,r(c,e),v||p||(v=!0,L(E)));return e};t.unstable_shouldYield=k;t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},7588:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(72652);var a=r(79306);var s=r(28551);var u=r(1767);var c=r(9539);var l=r(84549);var f=l("forEach",TypeError);n({target:"Iterator",proto:true,real:true,forced:f},{forEach:function e(t){s(this);try{a(t)}catch(e){c(this,"throw",e)}if(f)return i(f,this,t);var r=u(this);var n=0;o(r,(function(e){t(e,n++)}),{IS_RECORD:true})}})},7628:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=r.BlockCipher;var o=t.algo;var a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4];var s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32];var u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];var c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}];var l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];var f=o.DES=i.extend({_doReset:function(){var e=this._key;var t=e.words;var r=[];for(var n=0;n<56;n++){var i=a[n]-1;r[n]=t[i>>>5]>>>31-i%32&1}var o=this._subKeys=[];for(var c=0;c<16;c++){var l=o[c]=[];var f=u[c];for(var n=0;n<24;n++){l[n/6|0]|=r[(s[n]-1+f)%28]<<31-n%6;l[4+(n/6|0)]|=r[28+(s[n+24]-1+f)%28]<<31-n%6}l[0]=l[0]<<1|l[0]>>>31;for(var n=1;n<7;n++){l[n]=l[n]>>>(n-1)*4+3}l[7]=l[7]<<5|l[7]>>>27}var d=this._invSubKeys=[];for(var n=0;n<16;n++){d[n]=o[15-n]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t];this._rBlock=e[t+1];d.call(this,4,252645135);d.call(this,16,65535);h.call(this,2,858993459);h.call(this,8,16711935);d.call(this,1,1431655765);for(var n=0;n<16;n++){var i=r[n];var o=this._lBlock;var a=this._rBlock;var s=0;for(var u=0;u<8;u++){s|=c[u][((a^i[u])&l[u])>>>0]}this._lBlock=a;this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock;this._rBlock=f;d.call(this,1,1431655765);h.call(this,8,16711935);h.call(this,2,858993459);d.call(this,16,65535);d.call(this,4,252645135);e[t]=this._lBlock;e[t+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r;this._lBlock^=r<<e}function h(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r;this._rBlock^=r<<e}t.DES=i._createHelper(f);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key;var t=e.words;if(t.length!==2&&t.length!==4&&t.length<6){throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.")}var r=t.slice(0,2);var i=t.length<4?t.slice(0,2):t.slice(2,4);var o=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=f.createEncryptor(n.create(r));this._des2=f.createEncryptor(n.create(i));this._des3=f.createEncryptor(n.create(o))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t);this._des2.decryptBlock(e,t);this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t);this._des2.encryptBlock(e,t);this._des1.decryptBlock(e,t)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=i._createHelper(p)})();return e.TripleDES}))},7740:e=>{"use strict";var t=Math.log;e.exports=Math.log1p||function e(r){var n=+r;return n>-1e-8&&n<1e-8?n-n*n/2:t(1+n)}},7743:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(36043);var s=r(1103);var u=r(72652);var c=r(90537);n({target:"Promise",stat:true,forced:c},{race:function e(t){var r=this;var n=a.f(r);var c=n.reject;var l=s((function(){var e=o(r.resolve);u(t,(function(t){i(e,r,t).then(n.resolve,c)}))}));if(l.error)c(l.value);return n.promise}})},7756:(e,t,r)=>{const n=r(56886).getSymbolSize;const i=7;t.getPositions=function e(t){const r=n(t);return[[0,0],[r-i,0],[0,r-i]]}},7860:(e,t,r)=>{"use strict";var n=r(82839);e.exports=/web0s(?!.*chrome)/i.test(n)},7878:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(46942),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=o(r);function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return t=h(t),l(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let b=function(e){function t(e){var r;a(this,t);r=c(this,t,[e]);m(r,"handleChange",(e=>{const{disabled:t,dataTestid:i,indeterminate:o,invalid:a}=r.props;(0,n.getPLogger)().info("Checkbox click",i,e.target.checked,{disabled:t,indeterminate:o,invalid:a});if(r.props.disabled){return}r.setState({active:e.target.checked});if(r.props.onChange){r.props.onChange(e)}}));r.state={active:r.props.defaultChecked};return r}p(t,e);return u(t,[{key:"render",value:function e(){const{children:t,disabled:n,dataTestid:o,checked:a,indeterminate:s,invalid:u,className:c}=this.props;let{active:l}=this.state;if(typeof a==="boolean"){l=a}const f=(0,r.default)("meta-checkbox",c,{active:l,disabled:n,indeterminate:s,invalid:u});return(0,i.jsxs)("label",{className:f,children:[(0,i.jsx)("input",{type:"checkbox",className:"meta-checkbox-input",checked:l,onChange:this.handleChange,"data-testid":o}),(0,i.jsx)("span",{className:"meta-checkbox-border",children:(0,i.jsx)("span",{className:"meta-checkbox-inner"})}),(0,i.jsx)("span",{className:"meta-checkbox-label",children:t})]})}}])}(t.Component);m(b,"defaultProps",{disabled:false,defaultChecked:false});var _=e.default=b}))},7904:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(42551);var a=r(48981);var s=r(56969);var u=r(42787);var c=r(77347).f;if(i){n({target:"Object",proto:true,forced:o},{__lookupSetter__:function e(t){var r=a(this);var n=s(t);var i;do{if(i=c(r,n))return i.set}while(r=u(r))}})}},8085:(e,t,r)=>{"use strict";var n=r(46518);var i=Math.floor;var o=Math.log;var a=Math.LOG2E;n({target:"Math",stat:true},{clz32:function e(t){var r=t>>>0;return r?31-i(o(r+.5)*a):32}})},8283:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(46942),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;t=n(t);function n(e){return e&&e.__esModule?e:{default:e}}var i=({className:e="",progress:n=0,color:i,backColor:o})=>{e=(0,t.default)("meta-line-progress",e);return(0,r.jsx)("div",{className:e,style:{background:o},children:(0,r.jsx)("div",{className:"progress-content",style:{transform:`translateX(-${100-n}%)`,background:i}})})};e.default=i}))},8327:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(46942),r(20885),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Select=e.Option=void 0;t=a(t);r=o(r);n=o(n);function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(a=function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(i=t?n:r){if(i.has(e))return i.get(e);i.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(a,t,o):a[t]=e[t]);return a})(e,t)}function s(e){const{color:t="#d9d9d9"}=e;return(0,i.jsx)("div",{className:"meta-select-arrow",children:(0,i.jsxs)("svg",{viewBox:"0 0 12 12",fill:"none",children:[(0,i.jsx)("path",{id:"Fill 1",d:"M0 12L12 12L12 0L0 0L0 12Z",fill:"none"}),(0,i.jsx)("path",{id:"Stroke 2",d:"M10.24 3.87L5.99 8.12L1.75 3.87",stroke:t,strokeOpacity:"1.000000",strokeWidth:"0.900000",strokeLinejoin:"round",strokeLinecap:"round"})]})})}const u=({className:e,title:t,value:n,children:o,onClick:a})=>(0,i.jsx)("div",{className:(0,r.default)("meta-select-option",e),title:t,onClick:()=>a===null||a===void 0?void 0:a(n),tabIndex:0,children:o});e.Option=u;const c=({className:e,defaultValue:o,value:a,disabled:u,children:c,onChange:l})=>{const f=(0,t.useRef)(null);const[d,h]=(0,t.useState)(undefined);const[p,v]=(0,t.useState)(false);const[m,y]=(0,t.useState)(o);const[g,b]=(0,t.useState)(false);const _=()=>{if(u){return}v(!p)};const S=e=>{var t,r;y(e);v(false);f===null||f===void 0?void 0:(t=f.current)===null||t===void 0?void 0:(r=t.focus)===null||r===void 0?void 0:r.call(t);l===null||l===void 0?void 0:l(e)};const E=e=>{if(e){if(d){clearTimeout(d);h(undefined)}b(e)}else{const e=setTimeout((()=>{b(false);v(false)}),200);h(e)}};const w=e=>{let r="";t.Children.forEach(c,(t=>{if((t===null||t===void 0?void 0:t.props.value)===e){r=t===null||t===void 0?void 0:t.props.title}}));return r};(0,t.useEffect)((()=>{y(a!==undefined?a:o)}),[a,o]);return(0,i.jsxs)("div",{className:(0,r.default)("meta-select",e),onFocus:()=>E(true),onBlur:()=>E(false),children:[(0,i.jsxs)("div",{className:(0,r.default)("meta-select-selection",e,{focus:g,show:p,disabled:u}),tabIndex:1,ref:f,onClick:_,children:[(0,i.jsx)("span",{className:"meta-select-selection-item",children:w(m)}),(0,i.jsx)(s,{})]}),p&&(0,i.jsx)(n.default,{className:"meta-select-options",children:t.Children.map(c,(e=>e&&(0,t.cloneElement)(e,{onClick:S,className:m===e.props.value?"active":""})))})]})};e.Select=c}))},8379:(e,t,r)=>{"use strict";var n=r(18745);var i=r(25397);var o=r(91291);var a=r(26198);var s=r(34598);var u=Math.min;var c=[].lastIndexOf;var l=!!c&&1/[1].lastIndexOf(1,-0)<0;var f=s("lastIndexOf");var d=l||!f;e.exports=d?function e(t){if(l)return n(c,this,arguments)||0;var r=i(this);var s=a(r);if(s===0)return-1;var f=s-1;if(arguments.length>1)f=u(f,o(arguments[1]));if(f<0)f=s+f;for(;f>=0;f--)if(f in r&&r[f]===t)return f||0;return-1}:c},8556:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.typeMap=void 0;const t=e.typeMap={close:"close",bigClose:"maxHubClose"}}))},8707:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkIPV4=void 0;var r=e.checkIPV4=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING){return false}var n=r.split(".").filter((function(e){return!!e.trim()}));if(n.length!==4){return false}for(var i=0;i<n.length;i++){var o=parseInt(n[i]);if(isNaN(o)){return false}if(o<0||o>255){return false}}return true}}))},8820:e=>{function t(e){if(!e||e<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=e;this.data=new Uint8Array(e*e);this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r;if(n)this.reservedBit[i]=true};t.prototype.get=function(e,t){return this.data[e*this.size+t]};t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};e.exports=t},8921:(e,t,r)=>{"use strict";var n=r(46518);var i=r(8379);n({target:"Array",proto:true,forced:i!==[].lastIndexOf},{lastIndexOf:i})},8995:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).map;var o=n.aTypedArray;var a=n.getTypedArrayConstructor;var s=n.exportTypedArrayMethod;s("map",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(a(e))(t)}))}))},9065:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(28551);var a=r(77347);n({target:"Reflect",stat:true,sham:!i},{getOwnPropertyDescriptor:function e(t,r){return a.f(o(t),r)}})},9220:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(42551);var a=r(48981);var s=r(56969);var u=r(42787);var c=r(77347).f;if(i){n({target:"Object",proto:true,forced:o},{__lookupGetter__:function e(t){var r=a(this);var n=s(t);var i;do{if(i=c(r,n))return i.get}while(r=u(r))}})}},9391:(e,t,r)=>{"use strict";var n=r(46518);var i=r(96395);var o=r(80550);var a=r(79039);var s=r(97751);var u=r(94901);var c=r(2293);var l=r(93438);var f=r(36840);var d=o&&o.prototype;var h=!!o&&a((function(){d["finally"].call({then:function(){}},(function(){}))}));n({target:"Promise",proto:true,real:true,forced:h},{finally:function(e){var t=c(this,s("Promise"));var r=u(e);return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}});if(!i&&u(o)){var p=s("Promise").prototype["finally"];if(d["finally"]!==p){f(d,"finally",p,{unsafe:true})}}},9417:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},9539:(e,t,r)=>{"use strict";var n=r(69565);var i=r(28551);var o=r(55966);e.exports=function(e,t,r){var a,s;i(e);try{a=o(e,"return");if(!a){if(t==="throw")throw r;return r}a=n(a,e)}catch(e){s=true;a=e}if(t==="throw")throw r;if(s)throw a;i(a);return r}},9678:(e,t,r)=>{"use strict";var n=r(46518);var i=r(37628);var o=r(25397);var a=r(6469);var s=Array;n({target:"Array",proto:true},{toReversed:function e(){return i(o(this),s)}});a("toReversed")},9868:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(91291);var a=r(31240);var s=r(72333);var u=r(79039);var c=RangeError;var l=String;var f=Math.floor;var d=i(s);var h=i("".slice);var p=i(1..toFixed);var v=function(e,t,r){return t===0?r:t%2===1?v(e,t-1,r*e):v(e*e,t/2,r)};var m=function(e){var t=0;var r=e;while(r>=4096){t+=12;r/=4096}while(r>=2){t+=1;r/=2}return t};var y=function(e,t,r){var n=-1;var i=r;while(++n<6){i+=t*e[n];e[n]=i%1e7;i=f(i/1e7)}};var g=function(e,t){var r=6;var n=0;while(--r>=0){n+=e[r];e[r]=f(n/t);n=n%t*1e7}};var b=function(e){var t=6;var r="";while(--t>=0){if(r!==""||t===0||e[t]!==0){var n=l(e[t]);r=r===""?n:r+d("0",7-n.length)+n}}return r};var _=u((function(){return p(8e-5,3)!=="0.000"||p(.9,0)!=="1"||p(1.255,2)!=="1.25"||p(0xde0b6b3a7640080,0)!=="1000000000000000128"}))||!u((function(){p({})}));n({target:"Number",proto:true,forced:_},{toFixed:function e(t){var r=a(this);var n=o(t);var i=[0,0,0,0,0,0];var s="";var u="0";var f,p,_,S;if(n<0||n>20)throw new c("Incorrect fraction digits");if(r!==r)return"NaN";if(r<=-1e21||r>=1e21)return l(r);if(r<0){s="-";r=-r}if(r>1e-21){f=m(r*v(2,69,1))-69;p=f<0?r*v(2,-f,1):r/v(2,f,1);p*=4503599627370496;f=52-f;if(f>0){y(i,0,p);_=n;while(_>=7){y(i,1e7,0);_-=7}y(i,v(10,_,1),0);_=f-1;while(_>=23){g(i,1<<23);_-=23}g(i,1<<_);y(i,1,1);g(i,2);u=b(i)}else{y(i,0,p);y(i,1<<-f,0);u=b(i)+d("0",n)}}if(n>0){S=u.length;u=s+(S<=n?"0."+d("0",n-S)+u:h(u,0,S-n)+"."+h(u,S-n))}else{u=s+u}return u}})},10255:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=Math.pow;var a=31;var s=1023;var u=o(2,-24);var c=.0009765625;var l=function(e){var t=e>>>15;var r=e>>>10&a;var n=e&s;if(r===a)return n===0?t===0?Infinity:-Infinity:NaN;if(r===0)return n*(t===0?u:-u);return o(2,r-15)*(t===0?1+n*c:-1-n*c)};var f=i(DataView.prototype.getUint16);n({target:"DataView",proto:true},{getFloat16:function e(t){var r=f(this,t,arguments.length>1?arguments[1]:false);return l(r)}})},10287:(e,t,r)=>{"use strict";var n=r(46518);var i=r(52967);n({target:"Object",stat:true},{setPrototypeOf:i})},10298:(e,t,r)=>{"use strict";var n=r(22195);var i=r(25397);var o=r(38480).f;var a=r(67680);var s=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var u=function(e){try{return o(e)}catch(e){return a(s)}};e.exports.f=function e(t){return s&&n(t)==="Window"?u(t):o(i(t))}},10350:(e,t,r)=>{"use strict";var n=r(43724);var i=r(39297);var o=Function.prototype;var a=n&&Object.getOwnPropertyDescriptor;var s=i(o,"name");var u=s&&function e(){}.name==="something";var c=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},10436:(e,t,r)=>{"use strict";var n=r(46518);var i=r(96395);var o=r(38574);var a=r(44576);var s=r(69565);var u=r(36840);var c=r(52967);var l=r(10687);var f=r(87633);var d=r(79306);var h=r(94901);var p=r(20034);var v=r(90679);var m=r(2293);var y=r(59225).set;var g=r(91955);var b=r(90757);var _=r(1103);var S=r(18265);var E=r(91181);var w=r(80550);var T=r(10916);var I=r(36043);var R="Promise";var C=T.CONSTRUCTOR;var k=T.REJECTION_EVENT;var A=T.SUBCLASSING;var O=E.getterFor(R);var P=E.set;var x=w&&w.prototype;var L=w;var M=x;var N=a.TypeError;var D=a.document;var j=a.process;var U=I.f;var V=U;var W=!!(D&&D.createEvent&&a.dispatchEvent);var B="unhandledrejection";var G="rejectionhandled";var Z=0;var F=1;var H=2;var X=1;var Y=2;var K,z,J,Q;var q=function(e){var t;return p(e)&&h(t=e.then)?t:false};var $=function(e,t){var r=t.value;var n=t.state===F;var i=n?e.ok:e.fail;var o=e.resolve;var a=e.reject;var u=e.domain;var c,l,f;try{if(i){if(!n){if(t.rejection===Y)ie(t);t.rejection=X}if(i===true)c=r;else{if(u)u.enter();c=i(r);if(u){u.exit();f=true}}if(c===e.promise){a(new N("Promise-chain cycle"))}else if(l=q(c)){s(l,c,o,a)}else o(c)}else a(r)}catch(e){if(u&&!f)u.exit();a(e)}};var ee=function(e,t){if(e.notified)return;e.notified=true;g((function(){var r=e.reactions;var n;while(n=r.get()){$(n,e)}e.notified=false;if(t&&!e.rejection)re(e)}))};var te=function(e,t,r){var n,i;if(W){n=D.createEvent("Event");n.promise=t;n.reason=r;n.initEvent(e,false,true);a.dispatchEvent(n)}else n={promise:t,reason:r};if(!k&&(i=a["on"+e]))i(n);else if(e===B)b("Unhandled promise rejection",r)};var re=function(e){s(y,a,(function(){var t=e.facade;var r=e.value;var n=ne(e);var i;if(n){i=_((function(){if(o){j.emit("unhandledRejection",r,t)}else te(B,t,r)}));e.rejection=o||ne(e)?Y:X;if(i.error)throw i.value}}))};var ne=function(e){return e.rejection!==X&&!e.parent};var ie=function(e){s(y,a,(function(){var t=e.facade;if(o){j.emit("rejectionHandled",t)}else te(G,t,e.value)}))};var oe=function(e,t,r){return function(n){e(t,n,r)}};var ae=function(e,t,r){if(e.done)return;e.done=true;if(r)e=r;e.value=t;e.state=H;ee(e,true)};var se=function(e,t,r){if(e.done)return;e.done=true;if(r)e=r;try{if(e.facade===t)throw new N("Promise can't be resolved itself");var n=q(t);if(n){g((function(){var r={done:false};try{s(n,t,oe(se,r,e),oe(ae,r,e))}catch(t){ae(r,t,e)}}))}else{e.value=t;e.state=F;ee(e,false)}}catch(t){ae({done:false},t,e)}};if(C){L=function e(t){v(this,M);d(t);s(K,this);var r=O(this);try{t(oe(se,r),oe(ae,r))}catch(e){ae(r,e)}};M=L.prototype;K=function e(t){P(this,{type:R,done:false,notified:false,parent:false,reactions:new S,rejection:false,state:Z,value:null})};K.prototype=u(M,"then",(function e(t,r){var n=O(this);var i=U(m(this,L));n.parent=true;i.ok=h(t)?t:true;i.fail=h(r)&&r;i.domain=o?j.domain:undefined;if(n.state===Z)n.reactions.add(i);else g((function(){$(i,n)}));return i.promise}));z=function(){var e=new K;var t=O(e);this.promise=e;this.resolve=oe(se,t);this.reject=oe(ae,t)};I.f=U=function(e){return e===L||e===J?new z(e):V(e)};if(!i&&h(w)&&x!==Object.prototype){Q=x.then;if(!A){u(x,"then",(function e(t,r){var n=this;return new L((function(e,t){s(Q,n,e,t)})).then(t,r)}),{unsafe:true})}try{delete x.constructor}catch(e){}if(c){c(x,M)}}}n({global:true,constructor:true,wrap:true,forced:C},{Promise:L});l(L,R,false,true);f(R)},10482:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1));e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t);t.sigBytes--}};return e.pad.Iso97971}))},10687:(e,t,r)=>{"use strict";var n=r(24913).f;var i=r(39297);var o=r(78227);var a=o("toStringTag");e.exports=function(e,t,r){if(e&&!r)e=e.prototype;if(e&&!i(e,a)){n(e,a,{configurable:true,value:t})}}},10757:(e,t,r)=>{"use strict";var n=r(97751);var i=r(94901);var o=r(1625);var a=r(7040);var s=Object;e.exports=a?function(e){return typeof e=="symbol"}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,s(e))}},10838:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43839).findLast;var o=r(6469);n({target:"Array",proto:true},{findLast:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}});o("findLast")},10916:(e,t,r)=>{"use strict";var n=r(44576);var i=r(80550);var o=r(94901);var a=r(92796);var s=r(33706);var u=r(78227);var c=r(84215);var l=r(96395);var f=r(39519);var d=i&&i.prototype;var h=u("species");var p=false;var v=o(n.PromiseRejectionEvent);var m=a("Promise",(function(){var e=s(i);var t=e!==String(i);if(!t&&f===66)return true;if(l&&!(d["catch"]&&d["finally"]))return true;if(!f||f<51||!/native code/.test(e)){var r=new i((function(e){e(1)}));var n=function(e){e((function(){}),(function(){}))};var o=r.constructor={};o[h]=n;p=r.then((function(){}))instanceof n;if(!p)return true}return!t&&(c==="BROWSER"||c==="DENO")&&!v}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:p}},11056:(e,t,r)=>{"use strict";var n=r(24913).f;e.exports=function(e,t,r){r in e||n(e,r,{configurable:true,get:function(){return t[r]},set:function(e){t[r]=e}})}},11367:(e,t,r)=>{"use strict";var n=r(46518);var i=r(67787);n({target:"Math",stat:true},{log2:i})},11392:(e,t,r)=>{"use strict";var n=r(46518);var i=r(27476);var o=r(77347).f;var a=r(18014);var s=r(655);var u=r(60511);var c=r(67750);var l=r(41436);var f=r(96395);var d=i("".slice);var h=Math.min;var p=l("startsWith");var v=!f&&!p&&!!function(){var e=o(String.prototype,"startsWith");return e&&!e.writable}();n({target:"String",proto:true,forced:!v&&!p},{startsWith:function e(t){var r=s(c(this));u(t);var n=a(h(arguments.length>1?arguments[1]:undefined,r.length));var i=s(t);return d(r,n,n+i.length)===i}})},11433:(e,t,r)=>{const n=r(30208);const i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=n.ALPHANUMERIC;this.data=e}o.getBitsLength=function e(t){return 11*Math.floor(t/2)+6*(t%2)};o.prototype.getLength=function e(){return this.data.length};o.prototype.getBitsLength=function e(){return o.getBitsLength(this.data.length)};o.prototype.write=function e(t){let r;for(r=0;r+2<=this.data.length;r+=2){let e=i.indexOf(this.data[r])*45;e+=i.indexOf(this.data[r+1]);t.put(e,11)}if(this.data.length%2){t.put(i.indexOf(this.data[r]),6)}};e.exports=o},11558:(e,t,r)=>{"use strict";var n=r(46518);var i=r(39928);var o=r(25397);var a=Array;n({target:"Array",proto:true},{with:function(e,t){return i(o(this),a,e,t)}})},11686:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.msgMap=t.WakeupType=t.SDKErrorCode=t.InnerICSEventMethod=t.InnerICSEventKey=t.ICSEventKey=t.BrowserType=void 0;var r;(function(e){e["MPS_JOB_STATE_NULL"]="999000001";e["MPS_JOB_STATE_ERROR"]="999000002";e["RTC_PROMISE_ERROR"]="999100001";e["RTC_CATCH_ERROR"]="999100002";e["RTC_KICK_OUT"]="999100003";e["RTC_AUDIO_DEVICE_ERROR"]="999100004";e["RTC_PEER_LEAVE"]="999100005";e["RTC_KICK_ROOM"]="999100006";e["RTC_NOT_INIT"]="999100007";e["RTC_JOIN_TIMEOUT"]="999100008";e["WEBSOCKET_CONNECT_ERROR"]="999200001";e["WEBSOCKET_RESPONSE_TIMEOUT"]="999200002";e["WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL"]="999200003";e["WEBSOCKET_NETWORK_ERROR"]="999200004";e["WEBSOCKET_KICK_OUT"]="999200005";e["WEBSOCKET_CONNECT_TIMEOUT"]="999200006";e["UI_NO_PARENT"]="999300001";e["UI_PARAM_ERROR"]="999300002";e["UI_LANGUAGE_LIST_EMPTY"]="999300003";e["UI_LANGUAGE_CODE_NOT_SUPPORT"]="999300004";e["METHOD_PROHIBITED_EXECUTION"]="999400001";e["METHOD_NOT_ALLOW_NOT_AUTH"]="999400002";e["WORKER_JOB_STOP_BY_MUTE_OVERTIME"]="999400003";e["METHOD_REPEAT_CALLS"]="999400004";e["JOB_NOT_READY"]="999400005"})(r||(t.SDKErrorCode=r={}));var n;(function(e){e["ERROR"]="error";e["JOB_INFO_CHANGE"]="jobInfoChange";e["SPEAKING_START"]="speakingStart";e["SPEAKING_STOP"]="speakingStop";e["SPEECH_RECOGNIZED"]="speechRecognized";e["SEMANTIC_RECOGNIZED"]="semanticRecognized";e["ENTER_SLEEP"]="enterSleep";e["ENTER_ACTIVE"]="enterActive";e["LANGUAGE_INFO_CHANGE"]="languageInfoChange";e["JOB_END_MENTION"]="jobEndMention";e["JOB_END"]="jobEnd"})(n||(t.ICSEventKey=n={}));var i;(function(e){e["REJOIN_EVENT"]="icsSDKRejoinEvent";e["STOP_CHAT_EVENT"]="stopChatEvent";e["HEARTBEAT_EVENT"]="heartbeatEvent";e["WS_CHANGE_LANGUAGE"]="wsChangeLanguage";e["STREAM_ADDED"]="streamAdded";e["REJOIN_ROOM"]="rejoinRoomEvent";e["ENTER_SLEEP"]="enterSleepEvent"})(i||(t.InnerICSEventKey=i={}));var o;(function(e){e["STOP_HEARTBEAT"]="stopHeartBeat";e["REJOIN"]="rejoin";e["WAIT_REJOIN"]="waitRejoin"})(o||(t.InnerICSEventMethod=o={}));var a;(function(e){e["CHROME"]="CHROME";e["EDGE"]="EDGE";e["SAFARI"]="SAFARI";e["WE_CHAT"]="WE_CHAT";e["UNSUPPORTED"]="UNSUPPORTED"})(a||(t.BrowserType=a={}));const s=t.msgMap={[r.RTC_NOT_INIT]:"rtc not init",[r.METHOD_PROHIBITED_EXECUTION]:"method prohibited execution",[r.RTC_AUDIO_DEVICE_ERROR]:"audio device check error",[r.UI_LANGUAGE_LIST_EMPTY]:"language list is empty, make sure job is created",[r.UI_LANGUAGE_CODE_NOT_SUPPORT]:"langCode is not support",[r.METHOD_NOT_ALLOW_NOT_AUTH]:"not create or create failed, method not allowed",[r.METHOD_REPEAT_CALLS]:"do not call the same method repeatedly",[r.JOB_NOT_READY]:"the job is not ready"};var u;(function(e){e["VOICE"]="VOICE";e["RADAR"]="RADAR";e["INFRARED"]="INFRARED";e["CAMERA"]="CAMERA"})(u||(t.WakeupType=u={}))},11745:(e,t,r)=>{"use strict";var n=r(46518);var i=r(27476);var o=r(79039);var a=r(66346);var s=r(28551);var u=r(35610);var c=r(18014);var l=a.ArrayBuffer;var f=a.DataView;var d=f.prototype;var h=i(l.prototype.slice);var p=i(d.getUint8);var v=i(d.setUint8);var m=o((function(){return!new l(2).slice(1,undefined).byteLength}));n({target:"ArrayBuffer",proto:true,unsafe:true,forced:m},{slice:function e(t,r){if(h&&r===undefined){return h(s(this),t)}var n=s(this).byteLength;var i=u(t,n);var o=u(r===undefined?n:r,n);var a=new l(c(o-i));var d=new f(this);var m=new f(a);var y=0;while(i<o){v(m,y++,p(d,i++))}return a}})},11898:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("big")},{big:function e(){return i(this,"big","","")}})},12211:(e,t,r)=>{"use strict";var n=r(79039);e.exports=!n((function(){function e(){}e.prototype.constructor=null;return Object.getPrototypeOf(new e)!==e.prototype}))},12574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReduxManager=void 0;var n=r(26440);var i=r(39595);var o=r(44104);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const f=new o.Log({module:"ReduxManager"});let d=t.ReduxManager=function(){function e(){a(this,e)}return u(e,null,[{key:"checkHasError",value:function e(){const t=(0,n.$getState)();const r=t.error.httpError||t.error.sparkRTCError||t.error.websocketError;f.info("checkHasError",r);return r}},{key:"checkUserAuth",value:function e(){const t=(0,n.$getState)();f.info("checkUserAuth",t.main.pageState,t.main.showLoading);return!t.main.showLoading&&t.main.pageState===i.PageState.MAIN}},{key:"checkMainPage",value:function e(){const t=(0,n.$getState)();f.info("checkMainPage",t.main.pageState);return t.main.pageState===i.PageState.MAIN}}])}()},12887:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79039);var o=r(79504);var a=r(94644);var s=r(23792);var u=r(78227);var c=u("iterator");var l=n.Uint8Array;var f=o(s.values);var d=o(s.keys);var h=o(s.entries);var p=a.aTypedArray;var v=a.exportTypedArrayMethod;var m=l&&l.prototype;var y=!i((function(){m[c].call([1])}));var g=!!m&&m.values&&m[c]===m.values&&m.values.name==="values";var b=function e(){return f(p(this))};v("entries",(function e(){return h(p(this))}),y);v("keys",(function e(){return d(p(this))}),y);v("values",b,y||!g,{name:"values"});v(c,b,y||!g,{name:"values"})},13190:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(27831),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DefaultFooter=void 0;t=n(t);function n(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(n=function(e,t){if(!t&&e&&e.__esModule)return e;var n,o,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(n=t?i:r){if(n.has(e))return n.get(e);n.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?n(a,t,o):a[t]=e[t]);return a})(e,t)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const c=({cancelText:e,cancelButtonProps:n={},cancelClick:i,okText:a,okButtonProps:s={},okClick:u})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.default,o(o({className:"meta-modal-footer-button",type:t.typeMap.STROKE,size:t.sizeMap.SMALL,title:e,onClick:i,color:t.colorMap.BLUE},n),{},{dataTestid:"confirmButtonCancel0123",children:e})),(0,r.jsx)(t.default,o(o({className:"meta-modal-footer-button",type:t.typeMap.FILL,size:t.sizeMap.SMALL,title:a,onClick:u,color:t.colorMap.BLUE},s),{},{style:{marginLeft:"10px"},dataTestid:"confirmButtonOk0123",children:a}))]});e.DefaultFooter=c}))},13288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MediaCard=void 0;var n=r(74848);var i=r(95739);var o=r(25127);var a=r(53639);var s=r(82836);r(41644);var u=r(96540);var c=r(44104);var l=f(r(46942));function f(e){return e&&e.__esModule?e:{default:e}}const d=new c.Log({module:"UI.MediaCard"});const h=({message:e,scrollIntoView:t})=>{const[r,c]=(0,u.useState)(false);const[f,h]=(0,u.useState)(false);if(!(e!==null&&e!==void 0&&e.text)){return null}const p=o.XssManager.getRenderNode(e.text);if(!i.RichTextUtils.hasMedia(p)){return null}const{imgList:v,videoList:m}=i.RichTextUtils.getMediaInfo(p);const y=()=>{var e,r;d.info("dealLoad",v===null||v===void 0?void 0:(e=v[0])===null||e===void 0?void 0:e.src,m===null||m===void 0?void 0:(r=m[0])===null||r===void 0?void 0:r.src);h(true);setTimeout((()=>{t===null||t===void 0?void 0:t()}))};const g=()=>{var e,t;d.error("dealError",v===null||v===void 0?void 0:(e=v[0])===null||e===void 0?void 0:e.src,m===null||m===void 0?void 0:(t=m[0])===null||t===void 0?void 0:t.src);c(true);y()};if(r){return null}if(v[0]){var b;return(0,n.jsx)(a.ImageItem,{chatId:e.chatId,src:((b=v[0])===null||b===void 0?void 0:b.getAttribute("src"))||"",alt:v[0].alt,title:v[0].title,dealLoad:y,dealError:g,className:(0,l.default)("media-card",{show:f})})}if(m[0]){var _,S;const e=[];(_=m[0].querySelectorAll("source"))===null||_===void 0?void 0:_.forEach((t=>{e.push({src:t.src,type:t.type})}));return(0,n.jsx)(s.VideoItem,{src:((S=m[0])===null||S===void 0?void 0:S.getAttribute("src"))||"",sources:e,controls:m[0].controls,dealLoad:y,dealError:g,className:(0,l.default)("media-card",{show:f})})}return null};t.MediaCard=h},13451:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43839).findLastIndex;var o=r(6469);n({target:"Array",proto:true},{findLastIndex:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}});o("findLastIndex")},13579:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(72652);var a=r(79306);var s=r(28551);var u=r(1767);var c=r(9539);var l=r(84549);var f=l("some",TypeError);n({target:"Iterator",proto:true,real:true,forced:f},{some:function e(t){s(this);try{a(t)}catch(e){c(this,"throw",e)}if(f)return i(f,this,t);var r=u(this);var n=0;return o(r,(function(e,r){if(t(e,n++))return r()}),{IS_RECORD:true,INTERRUPTED:true}).stopped}})},13609:(e,t,r)=>{"use strict";var n=r(46518);var i=r(48981);var o=r(26198);var a=r(34527);var s=r(84606);var u=r(96837);var c=[].unshift(0)!==1;var l=function(){try{Object.defineProperty([],"length",{writable:false}).unshift()}catch(e){return e instanceof TypeError}};var f=c||!l();n({target:"Array",proto:true,arity:1,forced:f},{unshift:function e(t){var r=i(this);var n=o(r);var c=arguments.length;if(c){u(n+c);var l=n;while(l--){var f=l+c;if(l in r)r[f]=r[l];else s(r,f)}for(var d=0;d<c;d++){r[d]=arguments[d]}}return a(r,n+c)}})},13611:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(62106);var a=r(43724);var s=TypeError;var u=Object.defineProperty;var c=i.self!==i;try{if(a){var l=Object.getOwnPropertyDescriptor(i,"self");if(c||!l||!l.get||!l.enumerable){o(i,"self",{get:function e(){return i},set:function e(t){if(this!==i)throw new s("Illegal invocation");u(i,"self",{value:t,writable:true,configurable:true,enumerable:true})},configurable:true,enumerable:true})}}else n({global:true,simple:true,forced:c},{self:i})}catch(e){}},13620:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(46942),r(72648),r(75637),r(65219),r(26885),r(44772),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=l(r);o=l(o);a=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function S(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function w(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let T=e.default=function(e){function t(e){var r;f(this,t);r=p(this,t,[e]);S(r,"_close",(e=>{(0,u.getPLogger)().info("userclick _close",r.props.entry);(0,s.reactStopPropagation)(e);const{clickClose:t}=r.props;if(t){t()}else{(0,n.handleClose)(e)}}));S(r,"_maxFun",(e=>{(0,u.getPLogger)().info("userclick maxFun",r.props.entry);(0,s.reactStopPropagation)(e);const{isMaximize:t}=r.state;if(t){(0,n.unMaximize)()}else{(0,n.handleMaximize)()}r.setState({isMaximize:!t})}));S(r,"_doubleClick",(e=>{const{isUseMaxBtn:t,entry:i}=r.props;if(t){(0,s.reactStopPropagation)(e);const{isMaximize:o}=r.state;(0,u.getPLogger)().info("_doubleClick",{entry:i,isUseMaxBtn:t,isMaximize:o});if(o){(0,n.unMaximize)(`${i} _doubleClick`)}else{(0,n.handleMaximize)(`${i} _doubleClick`)}r.setState({isMaximize:!o})}}));S(r,"_setMaximize",(()=>{(0,u.getPLogger)().info("_setMaximize",r.props.entry);r.setState({isMaximize:true})}));S(r,"_setUnMaximize",(()=>{(0,u.getPLogger)().info("_setUnMaximize",r.props.entry);r.setState({isMaximize:false})}));S(r,"_correctMaxState",(0,s.debounce)((async()=>{var e,t;(0,u.getPLogger)().info("_correctMaxState",r.props.entry);if(await((e=window)===null||e===void 0?void 0:(t=e.Pedestal)===null||t===void 0?void 0:t.remote.getCurrentWindow().isMaximized())){r._setMaximize()}else{r._setUnMaximize()}}),100));r.state={isMaximize:false};(0,u.getPLogger)().info("WindowHeader constructor",r.props.entry);return r}b(t,e);return h(t,[{key:"componentDidMount",value:function e(){if(this.props.isUseMaxBtn){var t,r;(t=window.Pedestal)===null||t===void 0?void 0:t.remote.getCurrentWindow().on("maximize",this._setMaximize);(r=window.Pedestal)===null||r===void 0?void 0:r.remote.getCurrentWindow().on("unmaximize",this._setUnMaximize);window.addEventListener("resize",this._correctMaxState)}(0,u.getPLogger)().info("WindowHeader componentDidMount",this.props.entry)}},{key:"componentWillUnmount",value:function e(){var t,r;(t=window.Pedestal)===null||t===void 0?void 0:t.remote.getCurrentWindow().removeListener("maximize",this._setMaximize);(r=window.Pedestal)===null||r===void 0?void 0:r.remote.getCurrentWindow().removeListener("unmaximize",this._setUnMaximize);(0,u.getPLogger)().info("WindowHeader componentWillUnmount",this.props.entry);window.removeEventListener("resize",this._correctMaxState)}},{key:"render",value:function e(){const{isUseMinBtn:t,isUseMaxBtn:s,className:u,closeTestId:l,minTestId:f,maxTestId:d,langCode:h,title:p}=this.props;const{isMaximize:v}=this.state;const m=(0,r.default)(`meta-window-header ${u}`);const y=h==="2052"?o.default:a.default;return(0,c.jsxs)("div",{className:m,onDoubleClick:this._doubleClick,children:[(0,c.jsx)("div",{className:"meta-window-header-title",children:p}),(0,c.jsxs)("div",{className:"meta-window-header-btns",children:[t?(0,c.jsx)(i.Minimize,{onClick:n.handleMinimize,testId:f,title:y.minimize}):null,s?(0,c.jsx)(i.Maximize,{isMaximize:v,testId:d,onClick:this._maxFun,title:v?y.restore:y.maximize}):null,(0,c.jsx)(i.Close,{onClick:this._close,testId:l,title:y.close})]})]})}}])}(t.PureComponent);S(T,"defaultProps",{isUseMinBtn:true,isUseMaxBtn:true,langCode:"2052",entry:"default"})}))},13709:(e,t,r)=>{"use strict";var n=r(82839);var i=n.match(/firefox\/(\d+)/i);e.exports=!!i&&+i[1]},13763:(e,t,r)=>{"use strict";var n=r(82839);e.exports=/MSIE|Trident/.test(n)},13925:(e,t,r)=>{"use strict";var n=r(20034);e.exports=function(e){return n(e)||e===null}},14601:(e,t,r)=>{"use strict";var n=r(97751);var i=r(39297);var o=r(66699);var a=r(1625);var s=r(52967);var u=r(77740);var c=r(11056);var l=r(23167);var f=r(32603);var d=r(77584);var h=r(80747);var p=r(43724);var v=r(96395);e.exports=function(e,t,r,m){var y="stackTraceLimit";var g=m?2:1;var b=e.split(".");var _=b[b.length-1];var S=n.apply(null,b);if(!S)return;var E=S.prototype;if(!v&&i(E,"cause"))delete E.cause;if(!r)return S;var w=n("Error");var T=t((function(e,t){var r=f(m?t:e,undefined);var n=m?new S(e):new S;if(r!==undefined)o(n,"message",r);h(n,T,n.stack,2);if(this&&a(E,this))l(n,this,T);if(arguments.length>g)d(n,arguments[g]);return n}));T.prototype=E;if(_!=="Error"){if(s)s(T,w);else u(T,w,{name:true})}else if(p&&y in S){c(T,S,y);c(T,S,"prepareStackTrace")}u(T,S);if(!v)try{if(E.name!==_){o(E,"name",_)}E.constructor=T}catch(e){}return T}},14603:(e,t,r)=>{"use strict";var n=r(36840);var i=r(79504);var o=r(655);var a=r(22812);var s=URLSearchParams;var u=s.prototype;var c=i(u.append);var l=i(u["delete"]);var f=i(u.forEach);var d=i([].push);var h=new s("a=1&a=2&b=3");h["delete"]("a",1);h["delete"]("b",undefined);if(h+""!=="a=2"){n(u,"delete",(function(e){var t=arguments.length;var r=t<2?undefined:arguments[1];if(t&&r===undefined)return l(this,e);var n=[];f(this,(function(e,t){d(n,{key:t,value:e})}));a(t,1);var i=o(e);var s=o(r);var u=0;var h=0;var p=false;var v=n.length;var m;while(u<v){m=n[u++];if(p||m.key===i){p=true;l(this,m.key)}else h++}while(h<v){m=n[h++];if(!(m.key===i&&m.value===s))c(this,m.key,m.value)}}),{enumerable:true,unsafe:true})}},14628:(e,t,r)=>{"use strict";var n=r(46518);var i=r(36043);n({target:"Promise",stat:true},{withResolvers:function e(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},15024:(e,t,r)=>{"use strict";var n=r(46518);var i=r(83650);var o=r(84916);n({target:"Set",proto:true,real:true,forced:!o("symmetricDifference")},{symmetricDifference:i})},15029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RecordToast=void 0;var n=r(89906);var i=r(26440);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l;(function(e){e[e["FIXED"]=0]="FIXED";e[e["UNFIXED"]=1]="UNFIXED"})(l||(l={}));let f=t.RecordToast=function(){function e(){o(this,e)}return s(e,null,[{key:"startRecordToast",value:function t(){var r;const o={content:(0,i.$getState)().lang.language.startRecordAudioToast,type:l.FIXED,className:"hide-icon hide-close-icon"};(r=e._recordToast)===null||r===void 0?void 0:r.hide();e._recordToast=(0,n.toast)(o)}},{key:"recordCompleteToast",value:function t(){var r;const o={content:(0,i.$getState)().lang.language.completeRecordAudioToast,type:l.UNFIXED,className:"hide-icon hide-close-icon"};(r=e._recordToast)===null||r===void 0?void 0:r.hide();e._recordToast=(0,n.toast)(o)}}])}()},15086:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).some;var o=r(34598);var a=o("some");n({target:"Array",proto:true,forced:!a},{some:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},15287:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function p(e){if(null===e||"object"!==typeof e)return null;e=h&&e[h]||e["@@iterator"];return"function"===typeof e?e:null}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,y={};function g(e,t,r){this.props=e;this.context=t;this.refs=y;this.updater=r||v}g.prototype.isReactComponent={};g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function b(){}b.prototype=g.prototype;function _(e,t,r){this.props=e;this.context=t;this.refs=y;this.updater=r||v}var S=_.prototype=new b;S.constructor=_;m(S,g.prototype);S.isPureReactComponent=!0;var E=Array.isArray,w=Object.prototype.hasOwnProperty,T={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,i)&&!I.hasOwnProperty(i)&&(o[i]=t[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(i in u=e.defaultProps,u)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:e,key:a,ref:s,props:o,_owner:T.current}}function C(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function k(e){return"object"===typeof e&&null!==e&&e.$$typeof===r}function A(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}var O=/\/+/g;function P(e,t){return"object"===typeof e&&null!==e&&null!=e.key?A(""+e.key):t.toString(36)}function x(e,t,i,o,a){var s=typeof e;if("undefined"===s||"boolean"===s)e=null;var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case r:case n:u=!0}}if(u)return u=e,a=a(u),e=""===o?"."+P(u,0):o,E(a)?(i="",null!=e&&(i=e.replace(O,"$&/")+"/"),x(a,t,i,"",(function(e){return e}))):null!=a&&(k(a)&&(a=C(a,i+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e)),t.push(a)),1;u=0;o=""===o?".":o+":";if(E(e))for(var c=0;c<e.length;c++){s=e[c];var l=o+P(s,c);u+=x(s,t,i,l,a)}else if(l=p(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)s=s.value,l=o+P(s,c++),u+=x(s,t,i,l,a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function L(e,t,r){if(null==e)return e;var n=[],i=0;x(e,n,"","",(function(e){return t.call(r,e,i++)}));return n}function M(e){if(-1===e._status){var t=e._result;t=t();t.then((function(t){if(0===e._status||-1===e._status)e._status=1,e._result=t}),(function(t){if(0===e._status||-1===e._status)e._status=2,e._result=t}));-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},D={transition:null},j={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:T};function U(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:L,forEach:function(e,t,r){L(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;L(e,(function(){t++}));return t},toArray:function(e){return L(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Component=g;t.Fragment=i;t.Profiler=a;t.PureComponent=_;t.StrictMode=o;t.Suspense=l;t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j;t.act=U;t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,s=T.current);void 0!==t.key&&(o=""+t.key);if(e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)w.call(t,c)&&!I.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}return{$$typeof:r,type:e.type,key:o,ref:a,props:i,_owner:s}};t.createContext=function(e){e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};e.Provider={$$typeof:s,_context:e};return e.Consumer=e};t.createElement=R;t.createFactory=function(e){var t=R.bind(null,e);t.type=e;return t};t.createRef=function(){return{current:null}};t.forwardRef=function(e){return{$$typeof:c,render:e}};t.isValidElement=k;t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}};t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}};t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}};t.unstable_act=U;t.useCallback=function(e,t){return N.current.useCallback(e,t)};t.useContext=function(e){return N.current.useContext(e)};t.useDebugValue=function(){};t.useDeferredValue=function(e){return N.current.useDeferredValue(e)};t.useEffect=function(e,t){return N.current.useEffect(e,t)};t.useId=function(){return N.current.useId()};t.useImperativeHandle=function(e,t,r){return N.current.useImperativeHandle(e,t,r)};t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)};t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)};t.useMemo=function(e,t){return N.current.useMemo(e,t)};t.useReducer=function(e,t,r){return N.current.useReducer(e,t,r)};t.useRef=function(e){return N.current.useRef(e)};t.useState=function(e){return N.current.useState(e)};t.useSyncExternalStore=function(e,t,r){return N.current.useSyncExternalStore(e,t,r)};t.useTransition=function(){return N.current.useTransition()};t.version="18.3.1"},15361:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}},15457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(53410);var o=r(69733);var a=r(44772);var s=r(44104);var u=r(20942);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=3e3;const w=.8;const T=new s.Log({module:"HwICS.UI.HotIssues"});let I=function(e){function t(e){var r;c(this,t);r=p(this,t,[e]);r._computeSize=e=>{var t,n,i;T.debug("_computeSize",e.type||e,(t=r.textElem)===null||t===void 0?void 0:t.clientWidth,(n=r.textElem)===null||n===void 0?void 0:n.textContent,(i=r.contentElem)===null||i===void 0?void 0:i.clientWidth);if(r.contentElem&&r.textElem){if(r.contentElem.clientWidth===0){return}const e=r.textElem.clientWidth>r.contentElem.clientWidth;if(e!==r.state.isScroll){r.setState({isScroll:e,animationName:e?"digital-intelligent-keyframes-move":"digital-intelligent-keyframes-restart"})}}};r._setTextRef=e=>{if(e){r.textElem=e}};r._setContentRef=e=>{if(e){r.contentElem=e}};r._handleMouseEnter=()=>{r.expandTimer.cancel()};r._handleMouseLeave=()=>{r.expandTimer.cancel().schedule(r.expandTask,E)};r._expandContent=()=>{const{expandStatusChange:e}=r.props;if(!r.state.isExpand){r.setState({isExpand:true});e(true)}};r._expandReset=()=>{const{expandStatusChange:e}=r.props;r.setState({isExpand:false});e(false)};r._getHotQuestion=async()=>{r.setState({hotQuestions:[]});const{langCode:e}=r.props;const t=await u.RtcInfoManager.getInstance().getHotQuestion({language:e,entry:"_getHotQuestion"});if(t&&t.data){r.setState({hotQuestions:t.data.map((e=>e.hot_question))})}};r.state={hotQuestions:[],isExpand:false,isScroll:false,animationName:"move"};const{expandStatusChange:n}=r.props;n(r.state.isExpand);r.expandTimer=new a.Timer;r.expandTask=new a.Timer.TimerTask((()=>{r._expandReset()}));return r}b(t,e);return f(t,[{key:"componentDidMount",value:function e(){this._getHotQuestion();window.addEventListener("resize",this._computeSize);window.addEventListener("documentFontsizeChange",this._computeSize)}},{key:"componentWillUnmount",value:function e(){window.removeEventListener("resize",this._computeSize);window.removeEventListener("documentFontsizeChange",this._computeSize)}},{key:"componentDidUpdate",value:function e(t,r){if(r.hotQuestions!==this.state.hotQuestions){this._computeSize({type:"componentDidUpdate"})}if(t.langCode!==this.props.langCode){this._getHotQuestion()}}},{key:"render",value:function e(){const{language:t}=this.props;const{hotQuestions:r,isExpand:i,isScroll:o,animationName:a}=this.state;const s=r.map((e=>`“${e}”`));const u=s.join("");const c={"--animation-time":`${u.length*w}s`,animationName:a};return(0,n.jsxs)("div",{className:`hot-issues box-shadow ${i?"expand":"normal"}`,"data-testid":"hot-issues-expand",onClick:this._expandContent,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave,style:{visibility:r.length>0?"visible":"hidden"},children:[(0,n.jsxs)("div",{className:"hot-issues-placeholder",children:[t.guessYouWantToAsk,":"]}),(0,n.jsx)("div",{className:"hot-issues-content transparent-scrollbar",ref:this._setContentRef,children:(0,n.jsxs)("div",{className:`hot-issues-text ${o?"animation-run":"animation-paused"}`,style:i?{}:c,ref:this._setTextRef,children:[i?s.map(((e,t)=>(0,n.jsx)("span",{className:"hot-issues-content-item",children:e},t))):u,!i&&(0,n.jsx)("span",{className:"hot-issues-text-copy",children:u})]})}),i&&(0,n.jsx)("div",{className:"hot-issues-expand","data-testid":"hot-issues-reset",onClick:this._expandReset})]})}}])}(i.Component);I=S([(0,a.componentDecorator)(T)],I);const R=e=>({language:e.lang.language,langCode:e.lang.langCode,captionList:e.caption.captionList});var C=t["default"]=(0,o.connect)(R)(I)},15472:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(10687);n({global:true},{Reflect:{}});o(i.Reflect,"Reflect",true)},15575:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(79472);var a=o(i.setInterval,true);n({global:true,bind:true,forced:i.setInterval!==a},{setInterval:a})},15617:(e,t,r)=>{"use strict";var n=r(33164);var i=1.1920928955078125e-7;var o=34028234663852886e22;var a=11754943508222875e-54;e.exports=Math.fround||function e(t){return n(t,i,o,a)}},15652:(e,t,r)=>{"use strict";var n=r(79039);e.exports=n((function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);if(Object.isExtensible(e))Object.defineProperty(e,"a",{value:8})}}))},15823:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(69565);var a=r(43724);var s=r(72805);var u=r(94644);var c=r(66346);var l=r(90679);var f=r(6980);var d=r(66699);var h=r(2087);var p=r(18014);var v=r(57696);var m=r(58229);var y=r(58319);var g=r(56969);var b=r(39297);var _=r(36955);var S=r(20034);var E=r(10757);var w=r(2360);var T=r(1625);var I=r(52967);var R=r(38480).f;var C=r(43251);var k=r(59213).forEach;var A=r(87633);var O=r(62106);var P=r(24913);var x=r(77347);var L=r(35370);var M=r(91181);var N=r(23167);var D=M.get;var j=M.set;var U=M.enforce;var V=P.f;var W=x.f;var B=i.RangeError;var G=c.ArrayBuffer;var Z=G.prototype;var F=c.DataView;var H=u.NATIVE_ARRAY_BUFFER_VIEWS;var X=u.TYPED_ARRAY_TAG;var Y=u.TypedArray;var K=u.TypedArrayPrototype;var z=u.isTypedArray;var J="BYTES_PER_ELEMENT";var Q="Wrong length";var q=function(e,t){O(e,t,{configurable:true,get:function(){return D(this)[t]}})};var $=function(e){var t;return T(Z,e)||(t=_(e))==="ArrayBuffer"||t==="SharedArrayBuffer"};var ee=function(e,t){return z(e)&&!E(t)&&t in e&&h(+t)&&t>=0};var te=function e(t,r){r=g(r);return ee(t,r)?f(2,t[r]):W(t,r)};var re=function e(t,r,n){r=g(r);if(ee(t,r)&&S(n)&&b(n,"value")&&!b(n,"get")&&!b(n,"set")&&!n.configurable&&(!b(n,"writable")||n.writable)&&(!b(n,"enumerable")||n.enumerable)){t[r]=n.value;return t}return V(t,r,n)};if(a){if(!H){x.f=te;P.f=re;q(K,"buffer");q(K,"byteOffset");q(K,"byteLength");q(K,"length")}n({target:"Object",stat:true,forced:!H},{getOwnPropertyDescriptor:te,defineProperty:re});e.exports=function(e,t,r){var a=e.match(/\d+/)[0]/8;var u=e+(r?"Clamped":"")+"Array";var c="get"+e;var f="set"+e;var h=i[u];var g=h;var b=g&&g.prototype;var _={};var E=function(e,t){var r=D(e);return r.view[c](t*a+r.byteOffset,true)};var T=function(e,t,n){var i=D(e);i.view[f](t*a+i.byteOffset,r?y(n):n,true)};var O=function(e,t){V(e,t,{get:function(){return E(this,t)},set:function(e){return T(this,t,e)},enumerable:true})};if(!H){g=t((function(e,t,r,n){l(e,b);var i=0;var s=0;var u,c,f;if(!S(t)){f=v(t);c=f*a;u=new G(c)}else if($(t)){u=t;s=m(r,a);var d=t.byteLength;if(n===undefined){if(d%a)throw new B(Q);c=d-s;if(c<0)throw new B(Q)}else{c=p(n)*a;if(c+s>d)throw new B(Q)}f=c/a}else if(z(t)){return L(g,t)}else{return o(C,g,t)}j(e,{buffer:u,byteOffset:s,byteLength:c,length:f,view:new F(u)});while(i<f)O(e,i++)}));if(I)I(g,Y);b=g.prototype=w(K)}else if(s){g=t((function(e,t,r,n){l(e,b);return N(function(){if(!S(t))return new h(v(t));if($(t))return n!==undefined?new h(t,m(r,a),n):r!==undefined?new h(t,m(r,a)):new h(t);if(z(t))return L(g,t);return o(C,g,t)}(),e,g)}));if(I)I(g,Y);k(R(h),(function(e){if(!(e in g)){d(g,e,h[e])}}));g.prototype=b}if(b.constructor!==g){d(b,"constructor",g)}U(b).TypedArrayConstructor=g;if(X){d(b,X,u)}var P=g!==h;_[u]=g;n({global:true,constructor:true,forced:P,sham:!H},_);if(!(J in g)){d(g,J,a)}if(!(J in b)){d(b,J,a)}A(u)}}else e.exports=function(){}},16034:(e,t,r)=>{"use strict";var n=r(46518);var i=r(32357).values;n({target:"Object",stat:true},{values:function e(t){return i(t)}})},16193:(e,t,r)=>{"use strict";var n=r(79504);var i=Error;var o=n("".replace);var a=function(e){return String(new i(e).stack)}("zxcasd");var s=/\n\s*at [^:]*:[^\n]*/;var u=s.test(a);e.exports=function(e,t){if(u&&typeof e=="string"&&!i.prepareStackTrace){while(t--)e=o(e,s,"")}return e}},16280:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(18745);var a=r(14601);var s="WebAssembly";var u=i[s];var c=new Error("e",{cause:7}).cause!==7;var l=function(e,t){var r={};r[e]=a(e,t,c);n({global:true,constructor:true,arity:1,forced:c},r)};var f=function(e,t){if(u&&u[e]){var r={};r[e]=a(s+"."+e,t,c);n({target:s,stat:true,constructor:true,arity:1,forced:c},r)}};l("Error",(function(e){return function t(r){return o(e,this,arguments)}}));l("EvalError",(function(e){return function t(r){return o(e,this,arguments)}}));l("RangeError",(function(e){return function t(r){return o(e,this,arguments)}}));l("ReferenceError",(function(e){return function t(r){return o(e,this,arguments)}}));l("SyntaxError",(function(e){return function t(r){return o(e,this,arguments)}}));l("TypeError",(function(e){return function t(r){return o(e,this,arguments)}}));l("URIError",(function(e){return function t(r){return o(e,this,arguments)}}));f("CompileError",(function(e){return function t(r){return o(e,this,arguments)}}));f("LinkError",(function(e){return function t(r){return o(e,this,arguments)}}));f("RuntimeError",(function(e){return function t(r){return o(e,this,arguments)}}))},16308:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("sup")},{sup:function e(){return i(this,"sup","","")}})},16468:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(79504);var a=r(92796);var s=r(36840);var u=r(3451);var c=r(72652);var l=r(90679);var f=r(94901);var d=r(64117);var h=r(20034);var p=r(79039);var v=r(84428);var m=r(10687);var y=r(23167);e.exports=function(e,t,r){var g=e.indexOf("Map")!==-1;var b=e.indexOf("Weak")!==-1;var _=g?"set":"add";var S=i[e];var E=S&&S.prototype;var w=S;var T={};var I=function(e){var t=o(E[e]);s(E,e,e==="add"?function e(r){t(this,r===0?0:r);return this}:e==="delete"?function(e){return b&&!h(e)?false:t(this,e===0?0:e)}:e==="get"?function e(r){return b&&!h(r)?undefined:t(this,r===0?0:r)}:e==="has"?function e(r){return b&&!h(r)?false:t(this,r===0?0:r)}:function e(r,n){t(this,r===0?0:r,n);return this})};var R=a(e,!f(S)||!(b||E.forEach&&!p((function(){(new S).entries().next()}))));if(R){w=r.getConstructor(t,e,g,_);u.enable()}else if(a(e,true)){var C=new w;var k=C[_](b?{}:-0,1)!==C;var A=p((function(){C.has(1)}));var O=v((function(e){new S(e)}));var P=!b&&p((function(){var e=new S;var t=5;while(t--)e[_](t,t);return!e.has(-0)}));if(!O){w=t((function(e,t){l(e,E);var r=y(new S,e,w);if(!d(t))c(t,r[_],{that:r,AS_ENTRIES:g});return r}));w.prototype=E;E.constructor=w}if(A||P){I("delete");I("has");g&&I("get")}if(P||k)I(_);if(b&&E.clear)delete E.clear}T[e]=w;n({global:true,constructor:true,forced:w!==S},T);m(w,e);if(!b)r.setStrong(w,e,g);return w}},16499:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(36043);var s=r(1103);var u=r(72652);var c=r(90537);n({target:"Promise",stat:true,forced:c},{all:function e(t){var r=this;var n=a.f(r);var c=n.resolve;var l=n.reject;var f=s((function(){var e=o(r.resolve);var n=[];var a=0;var s=1;u(t,(function(t){var o=a++;var u=false;s++;i(e,r,t).then((function(e){if(u)return;u=true;n[o]=e;--s||c(n)}),l)}));--s||c(n)}));if(f.error)l(f.value);return n.promise}})},16573:(e,t,r)=>{"use strict";var n=r(43724);var i=r(62106);var o=r(3238);var a=ArrayBuffer.prototype;if(n&&!("detached"in a)){i(a,"detached",{configurable:true,get:function e(){return o(this)}})}},16575:(e,t,r)=>{"use strict";var n=r(39297);e.exports=function(e){return e!==undefined&&(n(e,"value")||n(e,"writable"))}},16809:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.setDialogCloseFunc=e.getDialogCloseFuncList=void 0;const t=[];const r=e=>{t.push(e)};e.setDialogCloseFunc=r;const n=()=>t;e.getDialogCloseFuncList=n}))},16823:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},17145:(e,t,r)=>{"use strict";var n=r(46518);var i=r(1625);var o=r(42787);var a=r(52967);var s=r(77740);var u=r(2360);var c=r(66699);var l=r(6980);var f=r(77584);var d=r(80747);var h=r(72652);var p=r(32603);var v=r(78227);var m=v("toStringTag");var y=Error;var g=[].push;var b=function e(t,r){var n=i(_,this);var s;if(a){s=a(new y,n?o(this):_)}else{s=n?this:u(_);c(s,m,"Error")}if(r!==undefined)c(s,"message",p(r));d(s,b,s.stack,1);if(arguments.length>2)f(s,arguments[2]);var l=[];h(t,g,{that:l});c(s,"errors",l);return s};if(a)a(b,y);else s(b,y,{name:true});var _=b.prototype=u(y.prototype,{constructor:l(1,b),message:l(1,""),name:l(1,"AggregateError")});n({global:true,constructor:true,arity:2},{AggregateError:b})},17308:(e,t,r)=>{"use strict";r.r(t)},17427:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(42551);var a=r(79306);var s=r(48981);var u=r(24913);if(i){n({target:"Object",proto:true,forced:o},{__defineGetter__:function e(t,r){u.f(s(this),t,{get:a(r),enumerable:true,configurable:true})}})}},17642:(e,t,r)=>{"use strict";var n=r(46518);var i=r(83440);var o=r(84916);var a=!o("difference",(function(e){return e.size===0}));n({target:"Set",proto:true,real:true,forced:a},{difference:i})},17825:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.setDialogCloseFunc=e.getDialogCloseFuncList=void 0;const t=[];const r=e=>{t.push(e)};e.setDialogCloseFunc=r;const n=()=>t;e.getDialogCloseFuncList=n}))},18014:(e,t,r)=>{"use strict";var n=r(91291);var i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},18107:(e,t,r)=>{"use strict";var n=r(46518);var i=r(48981);var o=r(26198);var a=r(91291);var s=r(6469);n({target:"Array",proto:true},{at:function e(t){var r=i(this);var n=o(r);var s=a(t);var u=s>=0?s:n+s;return u<0||u>=n?undefined:r[u]}});s("at")},18111:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(90679);var a=r(28551);var s=r(94901);var u=r(42787);var c=r(62106);var l=r(97040);var f=r(79039);var d=r(39297);var h=r(78227);var p=r(57657).IteratorPrototype;var v=r(43724);var m=r(96395);var y="constructor";var g="Iterator";var b=h("toStringTag");var _=TypeError;var S=i[g];var E=m||!s(S)||S.prototype!==p||!f((function(){S({})}));var w=function e(){o(this,p);if(u(this)===p)throw new _("Abstract class Iterator not directly constructable")};var T=function(e,t){if(v){c(p,e,{configurable:true,get:function(){return t},set:function(t){a(this);if(this===p)throw new _("You can't redefine this property");if(d(this,e))this[e]=t;else l(this,e,t)}})}else p[e]=t};if(!d(p,b))T(b,g);if(E||!d(p,y)||p[y]===Object){T(y,w)}w.prototype=p;n({global:true,constructor:true,forced:E},{Iterator:w})},18237:(e,t,r)=>{"use strict";var n=r(46518);var i=r(72652);var o=r(79306);var a=r(28551);var s=r(1767);var u=r(9539);var c=r(84549);var l=r(18745);var f=r(79039);var d=TypeError;var h=f((function(){[].keys().reduce((function(){}),undefined)}));var p=!h&&c("reduce",d);n({target:"Iterator",proto:true,real:true,forced:h||p},{reduce:function e(t){a(this);try{o(t)}catch(e){u(this,"throw",e)}var r=arguments.length<2;var n=r?undefined:arguments[1];if(p){return l(p,this,r?[t]:[t,n])}var c=s(this);var f=0;i(c,(function(e){if(r){r=false;n=e}else{n=t(n,e,f)}f++}),{IS_RECORD:true});if(r)throw new d("Reduce of empty iterator with no initial value");return n}})},18265:e=>{"use strict";var t=function(){this.head=null;this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};var r=this.tail;if(r)r.next=t;else this.head=t;this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;if(t===null)this.tail=null;return e.item}}};e.exports=t},18327:(e,t,r)=>{var n=r(56018).FilterCSS;var i=r(22048);var o=r(5930);var a=o.parseTag;var s=o.parseAttr;var u=r(29349);function c(e){return e===undefined||e===null}function l(e){var t=u.spaceIndex(e);if(t===-1){return{html:"",closing:e[e.length-2]==="/"}}e=u.trim(e.slice(t+1,-1));var r=e[e.length-1]==="/";if(r)e=u.trim(e.slice(0,-1));return{html:e,closing:r}}function f(e){var t={};for(var r in e){t[r]=e[r]}return t}function d(e){var t={};for(var r in e){if(Array.isArray(e[r])){t[r.toLowerCase()]=e[r].map((function(e){return e.toLowerCase()}))}else{t[r.toLowerCase()]=e[r]}}return t}function h(e){e=f(e||{});if(e.stripIgnoreTag){if(e.onIgnoreTag){console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time')}e.onIgnoreTag=i.onIgnoreTagStripAll}if(e.whiteList||e.allowList){e.whiteList=d(e.whiteList||e.allowList)}else{e.whiteList=i.whiteList}this.attributeWrapSign=e.singleQuotedAttributeValue===true?"'":i.attributeWrapSign;e.onTag=e.onTag||i.onTag;e.onTagAttr=e.onTagAttr||i.onTagAttr;e.onIgnoreTag=e.onIgnoreTag||i.onIgnoreTag;e.onIgnoreTagAttr=e.onIgnoreTagAttr||i.onIgnoreTagAttr;e.safeAttrValue=e.safeAttrValue||i.safeAttrValue;e.escapeHtml=e.escapeHtml||i.escapeHtml;this.options=e;if(e.css===false){this.cssFilter=false}else{e.css=e.css||{};this.cssFilter=new n(e.css)}}h.prototype.process=function(e){e=e||"";e=e.toString();if(!e)return"";var t=this;var r=t.options;var n=r.whiteList;var o=r.onTag;var f=r.onIgnoreTag;var d=r.onTagAttr;var h=r.onIgnoreTagAttr;var p=r.safeAttrValue;var v=r.escapeHtml;var m=t.attributeWrapSign;var y=t.cssFilter;if(r.stripBlankChar){e=i.stripBlankChar(e)}if(!r.allowCommentTag){e=i.stripCommentTag(e)}var g=false;if(r.stripIgnoreTagBody){g=i.StripTagBody(r.stripIgnoreTagBody,f);f=g.onIgnoreTag}var b=a(e,(function(e,t,r,i,a){var g={sourcePosition:e,position:t,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(n,r)};var b=o(r,i,g);if(!c(b))return b;if(g.isWhite){if(g.isClosing){return"</"+r+">"}var _=l(i);var S=n[r];var E=s(_.html,(function(e,t){var n=u.indexOf(S,e)!==-1;var i=d(r,e,t,n);if(!c(i))return i;if(n){t=p(r,e,t,y);if(t){return e+"="+m+t+m}else{return e}}else{i=h(r,e,t,n);if(!c(i))return i;return}}));i="<"+r;if(E)i+=" "+E;if(_.closing)i+=" /";i+=">";return i}else{b=f(r,i,g);if(!c(b))return b;return v(i)}}),v);if(g){b=g.remove(b)}return b};e.exports=h},18496:(e,t,r)=>{"use strict";r.r(t)},18727:(e,t,r)=>{"use strict";var n=r(36955);e.exports=function(e){var t=n(e);return t==="BigInt64Array"||t==="BigUint64Array"}},18745:(e,t,r)=>{"use strict";var n=r(40616);var i=Function.prototype;var o=i.apply;var a=i.call;e.exports=typeof Reflect=="object"&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},18814:(e,t,r)=>{"use strict";var n=r(79039);var i=r(44576);var o=i.RegExp;e.exports=n((function(){var e=o("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}))},18839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HttpHeartBeatManager=void 0;var n=r(44772);var i=r(6630);var o=r(94855);var a=r(44104);var s=r(65268);var u=r(72640);var c=r(11686);var l=r(75625);var f=r(44086);var d=r(26440);var h=r(49);var p=r(40494);var v=r(57160);var m=r(78435);var y=r(91606);var g=r(19993);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return(t=I(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I(n.key),n)}}function T(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e){var t=R(e,"string");return"symbol"==typeof t?t:t+""}function R(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const k=new a.Log({module:"HttpHeartBeatManager"});let A=t.HttpHeartBeatManager=function(){function e(){E(this,e)}return T(e,null,[{key:"startHeartBeat",value:function t(r){k.info("startHeartBeat",r);e._heartBeatTask=new n.Timer.TimerTask(e._roomHeartbeat);e._heartCount=0;e._timerManager.cancel().schedule(e._heartBeatTask,i.HEART_BEAT_TIME)}},{key:"stopHeartBeat",value:function t(r){r+=",stopHeartBeat";k.info("stopHeartBeat",r);e._heartCount=0;e._heartFailCount=0;e._timerManager.cancel();y.JobManager.stopChatJobState("stopChatJobState");u.PortalWssManager.getInstance().closeOldWebsocket(r);p.StreamAdapter.destroy(r);p.StreamAdapter.clearPeerLeaveTimer(r)}},{key:"_roomHeartbeat",value:async function t(){e._heartCount++;const r=`_roomHeartbeat,${e._heartCount}`;const i=o.ConfigManager.getChatInfo(r);const a=Date.now();const s=await y.JobManager.getChatJobState({entry:r,jobId:(i===null||i===void 0?void 0:i.job_id)||""});p.StreamAdapter.setHeartbeatState(s===null||s===void 0?void 0:s.state);const u=Date.now()-a;k.debug(r,{result:s});k.info("_roomHeartbeat",r,(0,n.formatType)(s),u);await e.handleHeartbeatResult({result:s,consummTime:u,entry:r})}},{key:"handleHeartbeatResult",value:async function t({result:r,consummTime:o,entry:a}){a+=",handleHeartbeatResult";if(!r||(0,n.formatType)(r)!==n.formatType.OBJECT){e.handleHeartbeatRequestFailed(r,a);return}if(r.chat_state===s.CHAT_STATE.SUSPEND&&o<i.HTTP_HEART_BEAT_INVALID_TIME&&u.PortalWssManager.getInstance().checkCanSynChatState()){u.PortalWssManager.getInstance().recordStop(a)}if(e.ignoreErrorCodes.includes(r===null||r===void 0?void 0:r.error_code)){return}e._heartFailCount=0;if(await y.JobManager.checkJobEnd({entry:a,state:r.state})){e.handleJobEnd(r,a);return}if(e.checkError(r,a)){return}p.StreamAdapter.checkSignature({result:r,entry:a});await e.checkLanguage({result:r,entry:a});const{httpError:c}=(0,d.$getState)().error;c&&(0,d.$dispatch)((0,h.clearHttpError)())}},{key:"handleHeartbeatRequestFailed",value:function t(r,n){if(e.checkMaxErrorCount({error:{error_code:c.SDKErrorCode.MPS_JOB_STATE_NULL,error_msg:"no job state,"+JSON.stringify(r),request_id:""},entry:n})){e._heartFailCount=0;g.PrivateNotifyManager.sendRejoinRobotEvent({method:c.InnerICSEventMethod.REJOIN,entry:"heartbeat failed",reason:v.RejoinReason.NETWORK_ERROR,errorCode:c.SDKErrorCode.MPS_JOB_STATE_NULL})}}},{key:"checkError",value:function t(r,n){if(e.checkRejoinErrorCodes(r===null||r===void 0?void 0:r.error_code)){return true}if(r!==null&&r!==void 0&&r.error_code&&r.error_code!==l.RetCodes.SUCCESS){(0,f.dealHttpError)({url:"_roomHeartbeat",error:{error_code:r.error_code,error_msg:r.error_msg||"",request_id:r.request_id||""},entry:n});return true}return false}},{key:"handleJobEnd",value:function t(r,n){n+=",handleJobEnd";e.stopHeartBeat(n);if(r.state===s.JOB_STATE.SUCCEED&&r.job_finish_reason===s.JOB_SUCCEED_REASON.MUTE_TIMEOUT){(0,f.dealNormalEnd)({error:{error_code:c.SDKErrorCode.WORKER_JOB_STOP_BY_MUTE_OVERTIME,error_msg:r.job_finish_reason,request_id:""},entry:n});return}const i=r.error_info?_(_({},r.error_info),{},{request_id:""}):{error_code:c.SDKErrorCode.MPS_JOB_STATE_ERROR,error_msg:"job state error: "+r.state,request_id:""};if(e.checkRejoinErrorCodes(i.error_code)){return}(0,f.dealHttpError)({url:"_roomHeartbeat state not normal",error:i,entry:n})}},{key:"checkMaxErrorCount",value:function t({error:r,entry:n}){n+=",checkMaxErrorCount";e._heartFailCount++;k.info("checkMaxErrorCount",n,e._heartFailCount);if(e._heartFailCount>e.MAX_HEART_FAIL_COUNT){(0,f.dealHttpError)({url:"checkMaxErrorCount",error:r,entry:n});e.stopHeartBeat(n);return true}return false}},{key:"checkLanguage",value:async function e({result:t,entry:r}){r+=",checkLanguage";await m.LanguageManager.setLanguageInfo({chatInfo:t,entry:r});o.ConfigManager.setChatInfo({chatInfo:t,entry:r});await m.LanguageManager.setLocalLangCode({entry:r,remember:false})}},{key:"checkRejoinErrorCodes",value:function t(r){if(e.upgradeErrorCodes.includes(r)){g.PrivateNotifyManager.sendRejoinRobotEvent({method:c.InnerICSEventMethod.REJOIN,entry:"heartbeat handleJobEnd",reason:v.RejoinReason.SYSTEM_OPEN,errorCode:r});return true}if(e.netErrorCodes.includes(r)){g.PrivateNotifyManager.sendRejoinRobotEvent({method:c.InnerICSEventMethod.REJOIN,entry:"heartbeat handleJobEnd",reason:v.RejoinReason.NETWORK_ERROR,errorCode:r});return true}return false}}])}();A._timerManager=new n.Timer({userWebWorker:false});A._heartCount=0;A._heartFailCount=0;A.MAX_HEART_FAIL_COUNT=3;A.upgradeErrorCodes=[l.MPSRetCodes.MPS_JOB_HEARTBEAT_FAILED,l.WorkerRetCodes.DHICIS_RTSA_REPORT_LEAVE_ROOM];A.netErrorCodes=[l.RetCodes.FAILED_TO_QUERY_TENANT_ID];A.ignoreErrorCodes=[l.RetCodes.SHOW_SMART_CHAT_FAILED];C([(0,n.printfDecorator)(k)],A,"startHeartBeat",null);C([(0,n.printfDecorator)(k)],A,"stopHeartBeat",null);C([(0,n.printfDecorator)(k)],A,"_roomHeartbeat",null);C([(0,n.printfDecorator)(k)],A,"handleHeartbeatResult",null);C([(0,n.printfDecorator)(k)],A,"handleHeartbeatRequestFailed",null);C([(0,n.printfDecorator)(k)],A,"checkError",null);C([(0,n.printfDecorator)(k)],A,"handleJobEnd",null);C([(0,n.printfDecorator)(k)],A,"checkMaxErrorCount",null);C([(0,n.printfDecorator)(k)],A,"checkLanguage",null);C([(0,n.printfDecorator)(k)],A,"checkRejoinErrorCodes",null);window.addEventListener(c.InnerICSEventKey.HEARTBEAT_EVENT,(e=>{const{method:t,entry:r}=e.detail;if(t===c.InnerICSEventMethod.STOP_HEARTBEAT){A.stopHeartBeat(r)}}))},18863:(e,t,r)=>{"use strict";var n=r(46518);var i=r(80926).right;var o=r(34598);var a=r(39519);var s=r(38574);var u=!s&&a>79&&a<83;var c=u||!o("reduceRight");n({target:"Array",proto:true,forced:c},{reduceRight:function e(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:undefined)}})},18866:(e,t,r)=>{"use strict";var n=r(43802).end;var i=r(60706);e.exports=i("trimEnd")?function e(){return n(this)}:"".trimEnd},18981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.whiteList=t.stripIgnoreTagBody=t.onTagAttr=t.onTag=t.onIgnoreTagAttr=t.onIgnoreTag=t.cssWhiteList=void 0;var n=r(44104);const i=new n.Log({module:"xss"});const o=t.whiteList={b:[],br:[],code:[],div:[],em:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title"],video:["src","controls"],source:["src","type"],p:[],pre:[],span:[],strong:[],u:[],"human-service":[]};const a=t.cssWhiteList={color:true};const s=t.stripIgnoreTagBody=["script","style","head-area"];const u=function(e,t,r){i.debug("onTag",e,t,r)};t.onTag=u;const c=function(e,t,r,n){i.debug("onTagAttr",e,t,r,n)};t.onTagAttr=c;const l=function(e,t,r){i.debug("onIgnoreTag",e,t,r)};t.onIgnoreTag=l;const f=function(e,t,r){i.debug("onIgnoreTagAttr",e,t,r)};t.onIgnoreTagAttr=f},19021:function(e,t,r){(function(r,n){if(true){e.exports=t=n()}else{}})(this,(function(){var e=e||function(e,t){var n;if(typeof window!=="undefined"&&window.crypto){n=window.crypto}if(typeof self!=="undefined"&&self.crypto){n=self.crypto}if(typeof globalThis!=="undefined"&&globalThis.crypto){n=globalThis.crypto}if(!n&&typeof window!=="undefined"&&window.msCrypto){n=window.msCrypto}if(!n&&typeof r.g!=="undefined"&&r.g.crypto){n=r.g.crypto}if(!n&&"function"==="function"){try{n=r(50477)}catch(e){}}var i=function(){if(n){if(typeof n.getRandomValues==="function"){try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}}if(typeof n.randomBytes==="function"){try{return n.randomBytes(4).readInt32LE()}catch(e){}}}throw new Error("Native crypto module could not be used to get secure random number.")};var o=Object.create||function(){function e(){}return function(t){var r;e.prototype=t;r=new e;e.prototype=null;return r}}();var a={};var s=a.lib={};var u=s.Base=function(){return{extend:function(e){var t=o(this);if(e){t.mixIn(e)}if(!t.hasOwnProperty("init")||this.init===t.init){t.init=function(){t.$super.init.apply(this,arguments)}}t.init.prototype=t;t.$super=this;return t},create:function(){var e=this.extend();e.init.apply(e,arguments);return e},init:function(){},mixIn:function(e){for(var t in e){if(e.hasOwnProperty(t)){this[t]=e[t]}}if(e.hasOwnProperty("toString")){this.toString=e.toString}},clone:function(){return this.init.prototype.extend(this)}}}();var c=s.WordArray=u.extend({init:function(e,r){e=this.words=e||[];if(r!=t){this.sigBytes=r}else{this.sigBytes=e.length*4}},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words;var r=e.words;var n=this.sigBytes;var i=e.sigBytes;this.clamp();if(n%4){for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}}else{for(var s=0;s<i;s+=4){t[n+s>>>2]=r[s>>>2]}}this.sigBytes+=i;return this},clamp:function(){var t=this.words;var r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8;t.length=e.ceil(r/4)},clone:function(){var e=u.clone.call(this);e.words=this.words.slice(0);return e},random:function(e){var t=[];for(var r=0;r<e;r+=4){t.push(i())}return new c.init(t,e)}});var l=a.enc={};var f=l.Hex={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16));n.push((o&15).toString(16))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var n=0;n<t;n+=2){r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4}return new c.init(r,t/2)}};var d=l.Latin1={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var n=0;n<t;n++){r[n>>>2]|=(e.charCodeAt(n)&255)<<24-n%4*8}return new c.init(r,t)}};var h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}};var p=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init;this._nDataBytes=0},_append:function(e){if(typeof e=="string"){e=h.parse(e)}this._data.concat(e);this._nDataBytes+=e.sigBytes},_process:function(t){var r;var n=this._data;var i=n.words;var o=n.sigBytes;var a=this.blockSize;var s=a*4;var u=o/s;if(t){u=e.ceil(u)}else{u=e.max((u|0)-this._minBufferSize,0)}var l=u*a;var f=e.min(l*4,o);if(l){for(var d=0;d<l;d+=a){this._doProcessBlock(i,d)}r=i.splice(0,l);n.sigBytes-=f}return new c.init(r,f)},clone:function(){var e=u.clone.call(this);e._data=this._data.clone();return e},_minBufferSize:0});var v=s.Hasher=p.extend({cfg:u.extend(),init:function(e){this.cfg=this.cfg.extend(e);this.reset()},reset:function(){p.reset.call(this);this._doReset()},update:function(e){this._append(e);this._process();return this},finalize:function(e){if(e){this._append(e)}var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new m.HMAC.init(e,r).finalize(t)}}});var m=a.algo={};return a}(Math);return e}))},19167:(e,t,r)=>{"use strict";var n=r(44576);e.exports=n},19369:(e,t,r)=>{"use strict";var n=r(94644);var i=r(79504);var o=n.aTypedArray;var a=n.exportTypedArrayMethod;var s=i([].join);a("join",(function e(t){return s(o(this),t)}))},19462:(e,t,r)=>{"use strict";var n=r(69565);var i=r(2360);var o=r(66699);var a=r(56279);var s=r(78227);var u=r(91181);var c=r(55966);var l=r(57657).IteratorPrototype;var f=r(62529);var d=r(9539);var h=s("toStringTag");var p="IteratorHelper";var v="WrapForValidIterator";var m=u.set;var y=function(e){var t=u.getterFor(e?v:p);return a(i(l),{next:function r(){var n=t(this);if(e)return n.nextHandler();if(n.done)return f(undefined,true);try{var i=n.nextHandler();return n.returnHandlerResult?i:f(i,n.done)}catch(e){n.done=true;throw e}},return:function(){var r=t(this);var i=r.iterator;r.done=true;if(e){var o=c(i,"return");return o?n(o,i):f(undefined,true)}if(r.inner)try{d(r.inner.iterator,"normal")}catch(e){return d(i,"throw",e)}if(i)d(i,"normal");return f(undefined,true)}})};var g=y(true);var b=y(false);o(b,h,"Iterator Helper");e.exports=function(e,t,r){var n=function n(i,o){if(o){o.iterator=i.iterator;o.next=i.next}else o=i;o.type=t?v:p;o.returnHandlerResult=!!r;o.nextHandler=e;o.counter=0;o.done=false;m(this,o)};n.prototype=t?g:b;return n}},19617:(e,t,r)=>{"use strict";var n=r(25397);var i=r(35610);var o=r(26198);var a=function(e){return function(t,r,a){var s=n(t);var u=o(s);if(u===0)return!e&&-1;var c=i(a,u);var l;if(e&&r!==r)while(u>c){l=s[c++];if(l!==l)return true}else for(;u>c;c++){if((e||c in s)&&s[c]===r)return e||c||0}return!e&&-1}};e.exports={includes:a(true),indexOf:a(false)}},19760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=c(r(86425));var i=r(21013);var o=r(63226);var a=r(75625);var s=r(94855);var u=r(84743);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const v="x-request-id";const m=[a.BaseUrl.REPORT];var y;(function(e){e["MATCH"]="match";e["MISMATCH"]="mismatch"})(y||(y={}));var g;(function(e){e["REQUEST_ERROR"]="request_error";e["RESPONSE_ERROR"]="response_error";e["RESPONSE"]="response"})(g||(g={}));function b(e){var t,r,n,i,o;return(e===null||e===void 0?void 0:(t=e.headers)===null||t===void 0?void 0:t[v])||(e===null||e===void 0?void 0:(r=e.response)===null||r===void 0?void 0:(n=r.headers)===null||n===void 0?void 0:n[v])||(e===null||e===void 0?void 0:(i=e.config)===null||i===void 0?void 0:(o=i.headers)===null||o===void 0?void 0:o[v])||""}function _(e){var t;const{config:r}=e;const n=r===null||r===void 0?void 0:(t=r.headers)===null||t===void 0?void 0:t[v];const i=b(e);return n===i}function S(e,t){const{config:r}=t;if(!m.includes((r===null||r===void 0?void 0:r.url)||"")){var n,a,s;const u={arg1:o.Arg1Map.SERVER_API,arg2:`${r===null||r===void 0?void 0:r.method}-${r===null||r===void 0?void 0:r.url}`,args:{error:(t===null||t===void 0?void 0:(n=t.response)===null||n===void 0?void 0:(a=n.status)===null||a===void 0?void 0:a.toString())||"",key:b(t),result:(t===null||t===void 0?void 0:(s=t.response)===null||s===void 0?void 0:s.data)||""}};i.UserTrack.endUserTrack(f(f({},u),{},{eventKey:b(t),args:f(f({},u.args),{},{type:`${y.MATCH}-${e}`})}));if(!_(t)){i.UserTrack.addUserTrack(f(f({},u),{},{args:f(f({},u.args),{},{type:`${y.MISMATCH}-${e}`})}))}}}function E(e){const{headers:t}=e;if(!m.includes((e===null||e===void 0?void 0:e.url)||"")){const r={arg1:o.Arg1Map.SERVER_API,arg2:`${e===null||e===void 0?void 0:e.method}-${e===null||e===void 0?void 0:e.url}`,args:{param:JSON.stringify(u.Utils.handleHttpParam(e.data)),key:t===null||t===void 0?void 0:t[v]}};i.UserTrack.startUserTrack(f(f({},r),{},{eventKey:t===null||t===void 0?void 0:t[v]}));i.UserTrack.addUserTrack(r)}}function w(e){const{config:t}=e;if(!m.includes((t===null||t===void 0?void 0:t.url)||"")){var r;const n={arg1:o.Arg1Map.SERVER_API,arg2:`${t===null||t===void 0?void 0:t.method}-${t===null||t===void 0?void 0:t.url}`,args:{error:e===null||e===void 0?void 0:(r=e.status)===null||r===void 0?void 0:r.toString(),result:JSON.stringify(u.Utils.handleHttpResult(e.data)),key:b(e)}};i.UserTrack.endUserTrack(f(f({},n),{},{eventKey:b(e),args:f(f({},n.args),{},{type:y.MATCH})}));if(!_(e)){i.UserTrack.addUserTrack(f(f({},n),{},{args:f(f({},n.args),{},{type:y.MISMATCH})}))}}}const T=e=>{const t=[];Object.keys(e).forEach((r=>{const n=e[r];if(n===null||typeof n==="undefined"){return}t.push(`${r}=${encodeURIComponent(n)}`)}));return t.join("&")};const I=n.default.create({timeout:3e4,paramsSerializer:T});I.interceptors.request.use((e=>{var t;const{headers:r}=e;r[v]=u.Utils.getRequestId();r["x-request-terminal-version"]="5.0.4";r["x-request-terminal-platform"]="websdk";e.baseURL=(t=s.ConfigManager.getBaseUrl())===null||t===void 0?void 0:t.origin;E(e);return e}),(e=>{S(g.REQUEST_ERROR,e);return Promise.reject(e)}));I.interceptors.response.use((e=>{w(e);return e}),(e=>{S(g.RESPONSE_ERROR,e);if(e!==null&&e!==void 0&&e.response){return e===null||e===void 0?void 0:e.response}return{error:e}}));var R=t["default"]=I},19888:(e,t,r)=>{"use strict";if(true){e.exports=r(58493)}else{}},19993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PrivateNotifyManager=void 0;var n=r(11686);var i=r(44104);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const l=new i.Log({module:"InnerNotifyManager"});let f=t.PrivateNotifyManager=function(){function e(){o(this,e)}return s(e,null,[{key:"sendRejoinRobotEvent",value:function e(t){l.info("sendRejoinRobotEvent",t);window.dispatchEvent(new CustomEvent(n.InnerICSEventKey.REJOIN_EVENT,{detail:t}))}},{key:"sendRejoinRoomEvent",value:function e(t){l.info("sendRejoinRoomEvent",t);window.dispatchEvent(new CustomEvent(n.InnerICSEventKey.REJOIN_ROOM,{detail:{entry:t}}))}}])}()},20034:(e,t,r)=>{"use strict";var n=r(94901);e.exports=function(e){return typeof e=="object"?e!==null:n(e)}},20116:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(72652);var a=r(79306);var s=r(28551);var u=r(1767);var c=r(9539);var l=r(84549);var f=l("find",TypeError);n({target:"Iterator",proto:true,real:true,forced:f},{find:function e(t){s(this);try{a(t)}catch(e){c(this,"throw",e)}if(f)return i(f,this,t);var r=u(this);var n=0;return o(r,(function(e,r){if(t(e,n++))return r(e)}),{IS_RECORD:true,INTERRUPTED:true}).result}})},20326:(e,t,r)=>{"use strict";var n=r(70511);n("unscopables")},20362:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752),r(30258),r(55113)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LocalTransparentVideoBg=e.BasicLocalTransparentVideoBg=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t,r){return t=d(t),a(e,u()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function a(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function t(){return!!e})()}function c(e,t,r,n){var i=l(d(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=f(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},l.apply(null,arguments)}function f(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(){"use strict";v=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=d(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:p,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=w(e,"string");return"symbol"==i(t)?t:t+""}function w(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T=e.BasicLocalTransparentVideoBg=function(){function e(i){var o=this;g(this,e);S(this,"transparentCanvasElem",void 0);S(this,"videoElem",void 0);S(this,"chromakey",void 0);S(this,"similarity",void 0);S(this,"smoothness",void 0);S(this,"spill",void 0);S(this,"keyColor",void 0);S(this,"render",y(v().mark((function e(){return v().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(o.transparentCanvasElem){t.next=3;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","transparentCanvasElem not exist");return t.abrupt("return");case 3:t.next=5;return o.preRender();case 5:try{o.chromakey.dealVideoFrame(o.videoElem,o.transparentCanvasElem)}catch(e){(0,r.getPLogger)().error("LocalTransparentVideoBg.render error",e)}o.videoElem.requestVideoFrameCallback(o.render);case 7:case"end":return t.stop()}}),e)}))));this.videoElem=i.videoElem;this.similarity=i.similarity||.03;this.smoothness=i.smoothness||.22;this.spill=i.spill||.1;this.keyColor=i.keyColor;this.transparentCanvasElem=document.createElement("canvas");this.transparentCanvasElem.setAttribute("id",i.canvasId||"transparentCanvasElem");this.transparentCanvasElem.width=this.videoElem.videoWidth;this.transparentCanvasElem.height=this.videoElem.videoHeight;(0,r.getPLogger)().info("LocalTransparentVideoBg.constructor",this.videoElem.videoWidth,this.videoElem.videoHeight);if(i.algorithmPattern==="B"){this.chromakey=new n.ChromaKeyB({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}else{this.chromakey=new t.ChromaKeyA({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}if(!i.rootElem){return}i.rootElem.append(this.transparentCanvasElem);(0,r.getPLogger)().info("LocalTransparentVideoBg.constructor","start render transparent background")}return _(e,[{key:"destroy",value:function e(){(0,r.getPLogger)().info("LocalTransparentVideoBg.destroy");if(this.transparentCanvasElem){this.transparentCanvasElem.remove();this.transparentCanvasElem=null}}},{key:"preRender",value:function(){var e=y(v().mark((function e(){return v().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(this.transparentCanvasElem){t.next=2;break}return t.abrupt("return");case 2:if(!(this.videoElem.videoWidth===0)){t.next=6;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","videoWidth is 0");t.next=6;return(0,r.sleep)(50);case 6:if(this.transparentCanvasElem.width!==this.videoElem.videoWidth){(0,r.getPLogger)().info("LocalTransparentVideoBg.render","re set canvas size",this.videoElem.videoWidth,this.videoElem.videoHeight);this.transparentCanvasElem.width=this.videoElem.videoWidth;this.transparentCanvasElem.height=this.videoElem.videoHeight}case 7:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}])}();var I=e.LocalTransparentVideoBg=function(e){function t(e){var n;var i;g(this,t);i=o(this,t,[e]);S(i,"ctx",void 0);S(i,"render",y(v().mark((function e(){var t,n,o;return v().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:if(i.transparentCanvasElem){a.next=3;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","transparentCanvasElem not exist");return a.abrupt("return");case 3:a.next=5;return i.preRender();case 5:a.prev=5;a.next=8;return i.chromakey.dealVideoFrameToImage(i.videoElem);case 8:o=a.sent;(t=i.ctx)===null||t===void 0||t.clearRect(0,0,i.transparentCanvasElem.width,i.transparentCanvasElem.height);(n=i.ctx)===null||n===void 0||n.drawImage(o,0,0,i.transparentCanvasElem.width,i.transparentCanvasElem.height);a.next=16;break;case 13:a.prev=13;a.t0=a["catch"](5);(0,r.getPLogger)().error("LocalTransparentVideoBg.render error",a.t0);case 16:i.videoElem.requestVideoFrameCallback(i.render);case 17:case"end":return a.stop()}}),e,null,[[5,13]])}))));i.ctx=(n=i.transparentCanvasElem)===null||n===void 0?void 0:n.getContext("2d",{alpha:true});return i}h(t,e);return _(t,[{key:"destroy",value:function e(){c(t,"destroy",this,3)([]);delete this.ctx}}])}(T)}))},20397:(e,t,r)=>{"use strict";var n=r(97751);e.exports=n("document","documentElement")},20781:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("italics")},{italics:function e(){return i(this,"i","","")}})},20816:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(82284);function i(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=(0,n.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function o(e){var t=i(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},20885:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t=l(t),s(e,c()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function s(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let m=e.default=function(e){function t(...e){var r;n(this,t);r=a(this,t,[...e]);h(r,"scroller",void 0);h(r,"style",{});h(r,"_setScrollerElem",(e=>{if(e){r.scroller=e}}));h(r,"getScrollerElem",(()=>r.scroller||null));return r}f(t,e);return o(t,[{key:"render",value:function e(){const{tagName:t="div",children:n,onWheel:i,onWheelCapture:o,onScroll:a,onContextMenu:s,style:u}=this.props;let{className:c}=this.props;c+=" meta-scroller";if(t==="ul"){return(0,r.jsx)("ul",{style:u,className:c,onWheelCapture:o,onWheel:i,onScroll:a,onContextMenu:s,ref:this._setScrollerElem,children:n})}return(0,r.jsx)("div",{style:u,className:c,onWheelCapture:o,onWheel:i,onScroll:a,onContextMenu:s,ref:this._setScrollerElem,children:n})}}])}(t.PureComponent)}))},20927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WakeupIntentions=void 0;var r;(function(e){e["START"]="start";e["INTERRUPT"]="interrupt";e["STOP"]="stop"})(r||(t.WakeupIntentions=r={}))},20942:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RtcInfoManager=void 0;var n=l(r(19760));var i=r(75625);var o=r(44772);var a=r(44104);var s=r(94855);var u=r(46677);var c=r(90228);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var m=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const y=new a.Log({module:"HwICS.RtcInfoManager"});let g=t.RtcInfoManager=function(){function e(){f(this,e)}return h(e,[{key:"getHotQuestion",value:async function e({limit:t,language:r=u.LanguageCode.ZH_CN,entry:o}){var a;o+=",getHotQuestion";const c=await n.default.get(i.BaseUrl.GET_HOT_QUESTION,{headers:{[i.HttpHeaders.AUTH_TOKEN]:((a=s.ConfigManager.getAuthInfo(o))===null||a===void 0?void 0:a.access_token)||""},params:{limit:t,language:u.Webclient2VoiceLanguage[r]}});return c===null||c===void 0?void 0:c.data}},{key:"deleteToken",value:async function e({entry:t}){var r;t+=",deleteToken";if((r=s.ConfigManager.getAuthInfo(t))!==null&&r!==void 0&&r.access_token){var o;await n.default.delete(i.BaseUrl.TOKEN,{headers:{[i.HttpHeaders.AUTH_TOKEN]:((o=s.ConfigManager.getAuthInfo(t))===null||o===void 0?void 0:o.access_token)||""}})}}},{key:"queryJigsaw",value:async function e({width:t,height:r,entry:o}){var a;o+=",queryJigsaw";const u=await n.default.post(i.BaseUrl.VERIFICATION_SLIDE,{verify_type:0,user_key:s.ConfigManager.getRobotId(o),width:t,height:r});let l=false;if((u===null||u===void 0?void 0:(a=u.data)===null||a===void 0?void 0:a.error_code)===i.RetCodes.NO_PERMISSION_USE){l=true}return c.HttpRequestManager.dealHttpResult({entry:o,result:u,url:i.BaseUrl.VERIFICATION_SLIDE,showErrorTips:l})}},{key:"verifyJigsaw",value:async function e({verification_id:t,point_x:r,slide_time:o,entry:a}){a+=",verifyJigsaw";const s=await n.default.post(i.BaseUrl.VERIFICATION_SLIDE_VERIFY,{verification_id:t,point_x:r,slide_time:o});return c.HttpRequestManager.dealHttpResult({entry:a,result:s,url:i.BaseUrl.VERIFICATION_SLIDE_VERIFY,showErrorTips:false})}}],[{key:"getInstance",value:function t(){if(!e.rtcManager){e.rtcManager=new e}return e.rtcManager}}])}();m([(0,o.printfDecorator)(y)],g.prototype,"getHotQuestion",null);m([(0,o.printfDecorator)(y)],g.prototype,"deleteToken",null);m([(0,o.printfDecorator)(y)],g.prototype,"queryJigsaw",null);m([(0,o.printfDecorator)(y)],g.prototype,"verifyJigsaw",null)},20998:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}},21013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UserTrack=void 0;var n=r(44772);var i=l(r(92224));var o=l(r(86425));var a=r(75625);var s,u,c;function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var b;(function(e){e["ui"]="meta_studio_web_client"})(b||(b={}));const _=`${"websdk"}-${"5.0.4"}-${((s=window.hwIcsElectron)===null||s===void 0?void 0:s.version)||""}-${i.default.VERSION}-${"202601091418"}`;window.icsSDKBuildVersion=_;let S=t.UserTrack=function(){function e(){p(this,e)}return m(e,null,[{key:"addUserTrack",value:function t({arg1:r,arg2:n=location.hash,arg3:i=-1,args:o={}}){try{var a;const t={eventId:b.ui,timestamp:Date.now(),version:e._version,userAgent:e._userAgent,devicePixelRatio,args:d(d({},o),{},{arg1:r,arg2:n,arg3:i,currPageId:e._currPageId,availHeight:screen.availHeight,availWidth:screen.availWidth,pixelDepth:screen.pixelDepth,innerHeight,innerWidth,appId:e._rtcAppId,jobId:e._rtcJobId,roomId:e._rtcRoomId,token:e._robotId,domain:(a=e._baseUrl)===null||a===void 0?void 0:a.hostname,region:e._region,lineno:this._order,pageName:e.customInfoStr})};e.setCacheInfo(t);this._order++;if(!e._uploading){e._uploadUserTrack()}}catch(e){var s;(s=window.console)===null||s===void 0?void 0:s.warn("addUserTrack",{arg1:r,arg2:n,arg3:i,args:o},e)}}},{key:"startUserTrack",value:function t({arg1:r,eventKey:n="",args:i}){if(!e._eventMap[r+n]){e._eventMap[r+n]={arg1:r,args:i,startTime:Date.now()}}e._checkEventMap()}},{key:"endUserTrack",value:function t({eventKey:r="",arg1:n,arg2:i=location.hash,arg3:o=-1,args:a}){try{const t=e._eventMap[n+r];if(t){const o=Date.now()-t.startTime;e.addUserTrack({arg1:n,arg2:i,arg3:o,args:d(d({eventKey:r},t.args),a)});delete e._eventMap[n+r]}}catch(e){var s;(s=window.console)===null||s===void 0?void 0:s.warn("endUserTrack",{eventKey:r,arg1:n,arg2:i,arg3:o,args:a},e)}}},{key:"toggleBusinessTrack",value:function t({enableBusinessTrack:r=true}){e._enableBusinessTrack=r;if(r){e._userAgent=navigator.userAgent;return}e._userAgent=""}},{key:"updateUtParam",value:function t({chatInfo:r,random:i,baseUrl:o,robotId:a,customInfoStr:s,enableStorageCache:u}){if(r){var c,l,f;e._rtcAppId=r===null||r===void 0?void 0:(c=r.rtc_room_info)===null||c===void 0?void 0:(l=c.app_id)===null||l===void 0?void 0:l.slice(0,4);e._rtcJobId=r===null||r===void 0?void 0:r.job_id;e._region=r===null||r===void 0?void 0:r.region;e._rtcRoomId=r===null||r===void 0?void 0:(f=r.rtc_room_info)===null||f===void 0?void 0:f.room_id}if(i){e._token=i}if(o){e._baseUrl=o}if(a){e._robotId=a}if(n.StringUtil.safeJSONParse(s)){e.customInfoStr=s}if(u&&window.sessionStorage){e.enableStorageCache=u;e.initCacheInfo()}}},{key:"resetUtParam",value:function t(){e._rtcAppId="";e._rtcJobId="";e._rtcRoomId="";e._token="";delete e._baseUrl;e._robotId="";e._enableBusinessTrack=false;e.customInfoStr="";e.enableStorageCache=false}},{key:"_uploadUserTrack",value:async function t(){var r;const i=e.getCacheInfoList();if(i.length>0&&(r=e._baseUrl)!==null&&r!==void 0&&r.origin&&e._enableBusinessTrack&&e._token){var s;e._uploading=true;await(0,n.sleep)(e._uploadCycle);if(i.length<e._uploadSize&&Date.now()-e._lastUploadTime<e._uploadCycle*5){e._uploadUserTrack();return}const t=await o.default.post(`${a.BaseUrl.REPORT}`,{data:i.map((({value:e})=>e))},{baseURL:(s=e._baseUrl)===null||s===void 0?void 0:s.origin,headers:{[a.HttpHeaders.AUTH_TOKEN]:e._token,"x-request-terminal-version":"5.0.4","x-request-terminal-platform":"websdk"}}).catch((e=>{window.console.error("_uploadUserTrack",e)}));if((t===null||t===void 0?void 0:t.status)===a.HttpCodes.OK){e.deleteCacheInfoList(i);e._lastUploadTime=Date.now();e._uploadUserTrack();return}}e._uploading=false}},{key:"_checkEventMap",value:function t(){Object.keys(e._eventMap).forEach((t=>{const r=Date.now()-e._eventMap[t].startTime;if(Date.now()-e._eventMap[t].startTime>e._maxCacheTime){const n=e._eventMap[t];e.addUserTrack(d(d({},n),{},{arg3:r,args:d({error:"wait end timeout",message:"wait end timeout"},n.args||{})}));delete e._eventMap[t]}}))}},{key:"preUpload",value:function t(r){return r.map((t=>{if(!t.value.args.token){t.value.args.token=e._robotId}if(!t.value.args.jobId){t.value.args.jobId=e._rtcJobId}if(!t.value.args.roomId){t.value.args.roomId=e._rtcRoomId}return t}))}},{key:"initCacheInfo",value:function t(){const r=e.getAllSessionCacheList();r.forEach((t=>{if(!e.cacheList.find((({key:e})=>t.key===e))){e.cacheList.push(t)}}))}},{key:"setCacheInfo",value:function t(r){const i={value:r,key:`${e.cacheKeyPrefix}${(0,n.getClientId)()}`};e.cacheList.push(i);if(e.cacheList.length>e._cacheDataSize){e.cacheList.shift()}if(e.enableStorageCache){if(sessionStorage.length<e._cacheDataSize){sessionStorage.setItem(i.key,JSON.stringify(i.value))}}}},{key:"getCacheInfoList",value:function t(){if(e.cacheList.length===0){return[]}const r=Math.min(e._uploadSize,e.cacheList.length);return e.preUpload(e.cacheList.slice(0,r))}},{key:"getAllSessionCacheList",value:function t(){if(window.sessionStorage){const t=[];const r=Math.min(sessionStorage.length,e._cacheDataSize);for(let n=0;n<r;n++){const r=sessionStorage.key(n);if(!r||!r.startsWith(e.cacheKeyPrefix)){continue}const i=sessionStorage.getItem(r);if(i){t[n]={key:r,value:JSON.parse(i)}}}return t}return[]}},{key:"deleteCacheInfoList",value:function t(r){r.forEach((t=>{const r=e.cacheList.findIndex((({key:e})=>e===t.key));if(r>-1){e.cacheList.splice(r,1)}if(e.enableStorageCache){sessionStorage.removeItem(t.key)}}))}}])}();S.cacheList=[];S._currPageId=`${Date.now().toString()}-${((u=window.hwIcsElectron)===null||u===void 0?void 0:u.pid)||""}-${((c=window.hwIcsElectron)===null||c===void 0?void 0:c.appId)||""}`;S._version=_;S._eventMap={};S._cacheDataSize=5e3;S._maxCacheTime=72e5;S._uploading=false;S._uploadSize=20;S._uploadCycle=1e3;S._lastUploadTime=0;S._rtcAppId="";S._rtcJobId="";S._rtcRoomId="";S._token="";S._robotId="";S._region="";S._order=0;S._enableBusinessTrack=false;S._userAgent="";S.customInfoStr="";S.enableStorageCache=false;S.cacheKeyPrefix="userTrack"},21020:(e,t,r)=>{"use strict";var n=r(96540),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,l=null;void 0!==r&&(c=""+r);void 0!==t.key&&(c=""+t.key);void 0!==t.ref&&(l=t.ref);for(n in t)a.call(t,n)&&!u.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:s.current}}t.Fragment=o;t.jsx=c;t.jsxs=c},21211:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28551);var o=r(77347).f;n({target:"Reflect",stat:true},{deleteProperty:function e(t,r){var n=o(i(t),r);return n&&!n.configurable?false:delete t[r]}})},21361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setLanguageList=t.setLangCode=t.setDefaultLanguage=t.resetLangState=t.langSlice=t["default"]=void 0;var n=r(84303);var i=r(39595);var o=c(r(62523));var a=r(46677);var s=c(r(88521));var u=r(84743);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const v={[a.LanguageCode.ZH_CN]:o.default,[a.LanguageCode.EN_US]:f(f({},o.default),s.default)};const m=u.Utils.formatLangCode(navigator.language);const y={language:v[m],langCode:m,languageList:[],defaultLanguage:a.LanguageCode.ZH_CN};const g=t.langSlice=(0,n.createSlice)({name:i.ReduxModule.LANG,initialState:y,reducers:{resetLangState:e=>{Object.assign(e,y)},setLangCode:(e,t)=>{if(t.payload){const r=t.payload;e.langCode=r;e.language=v[r]||s.default}},setLanguageList:(e,t)=>{e.languageList=t.payload},setDefaultLanguage:(e,t)=>{e.defaultLanguage=t.payload||a.LanguageCode.ZH_CN}}});const{resetLangState:b,setLangCode:_,setLanguageList:S,setDefaultLanguage:E}=g.actions;t.setDefaultLanguage=E;t.setLanguageList=S;t.setLangCode=_;t.resetLangState=b;var w=t["default"]=g},21396:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(43240),r(6440),r(45503),r(80754),r(64725),r(84636),r(45471),r(63009),r(36308),r(81380),r(89557),r(45953),r(78056),r(51025),r(70019),r(39506),r(57165),r(82169),r(96939),r(6372),r(73797),r(38454),r(42073),r(54905),r(10482),r(52155),r(58124),r(70025),r(40955),r(7628),r(77193),r(96298),r(22696),r(43128))}else{}})(this,(function(e){return e}))},21421:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Clipboard=void 0;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=s(e,"string");return"symbol"==a(t)?t:t+""}function s(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}var f=(0,t.getPLogger)();var d=function e(t){var r=document.createElement("textarea");r.value=t;document.body.appendChild(r);r.focus();r.select();var n=true;try{document.execCommand("copy")}catch(e){f.error("execCommand copy error");n=false}document.body.removeChild(r);return n};var h=function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e){navigator.clipboard.writeText(t).then((function(){e(true)}),(function(t){f.error("writeText error");e(false)}))})));case 1:case"end":return r.stop()}}),e)})));return function t(r){return e.apply(this,arguments)}}();var p=e.Clipboard=function(){function e(){r(this,e)}return i(e,null,[{key:"copyTextToClipboard",value:function(){var e=l(u().mark((function e(t){var r;return u().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=false;if(!(navigator.clipboard&&window.isSecureContext)){n.next=5;break}n.next=4;return h(t);case 4:r=n.sent;case 5:if(!r){r=d(t)}return n.abrupt("return",new Promise((function(e,t){if(r){e()}else{t(new Error("no result"))}})));case 7:case"end":return n.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},21489:(e,t,r)=>{"use strict";var n=r(15823);n("Uint8",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},21537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SparkRTCErrorCode=t.NetworkQualityToast=t.NETWORK_QUALITY_LEVEL=t.ErrorMsg=void 0;var r;(function(e){e["RTC_ERR_CODE_SUCCESS"]="0";e["RTC_ERR_CODE_RTC_SDK_ERROR"]="90000001";e["RTC_ERR_CODE_WAIT_RSP_TIMEOUT"]="90000004";e["RTC_ERR_CODE_INVALID_PARAMETER"]="90000005";e["RTC_ERR_CODE_INVALID_OPERATION"]="90100001";e["RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES"]="90100002";e["RTC_ERR_CODE_NO_AVAILABLE_DEVICES"]="90100003";e["RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES"]="90100004";e["RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES"]="90100005";e["RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES"]="90100006";e["RTC_ERR_CODE_STATUS_ERROR"]="90100007";e["RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED"]="90100008";e["RTC_ERR_CODE_WAIT_CONFIG_FAIL"]="90100009";e["RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL"]="90100010";e["RTC_ERR_CODE_REGION_NOT_COVERED"]="90100011";e["RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT"]="90100012";e["RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT"]="90100013";e["RTC_ERR_CODE_WEBSOCKET_NOT_OPEN"]="90100014";e["RTC_ERR_CODE_WEBSOCKET_INTERRUPTED"]="90100015";e["RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR"]="90100016";e["RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED"]="90100017";e["RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED"]="90100018";e["RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND"]="90100019";e["RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE"]="90100020";e["RTC_ERR_CODE_PLAY_NOT_ALLOW"]="90100021";e["RTC_ERR_CODE_ROLE_NO_PERMISSION"]="90100022";e["RTC_ERR_CODE_ANSWER_SDP_INVALID"]="90100023";e["RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED"]="90100024";e["RTC_ERR_CODE_WEBRTC_UNSUPPORTED"]="90100025";e["RTC_ERR_CODE_MEDIA_NETWORK_ERROR"]="90100026";e["RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM"]="90100027";e["RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM"]="90100028";e["RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED"]="90100029";e["RTC_ERR_CODE_SIGNATURE_EXPIRED"]="90100030";e["RTC_ERR_CODE_SIGNATURE_INVALID"]="90100031";e["RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED"]="90100032";e["RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED"]="90100033";e["RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED"]="90100034";e["RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED"]="90100035";e["RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED"]="90100036";e["RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED"]="90100037";e["RTC_ERR_CODE_AUDIO_ERROR"]="90100038";e["RTC_ERR_CODE_RTC_ACS"]="90100100";e["RTC_ERR_CODE_RTC_CONTROL_ERROR"]="90100200";e["RTC_ERR_CODE_SFU_ERROR"]="90100600";e["RTC_WEBSOCKET_ERR_NEED_REJOIN"]="4005"})(r||(t.SparkRTCErrorCode=r={}));const n=t.ErrorMsg={[r.RTC_ERR_CODE_SUCCESS]:"success",[r.RTC_ERR_CODE_RTC_SDK_ERROR]:"sdk internal error",[r.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES]:"not support enumerate devices",[r.RTC_ERR_CODE_NO_AVAILABLE_DEVICES]:"no available devices",[r.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES]:"no available video input devices",[r.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES]:"no available audio input devices",[r.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES]:"no available audio output devices",[r.RTC_ERR_CODE_STATUS_ERROR]:"room status error",[r.RTC_ERR_CODE_INVALID_PARAMETER]:"invalid parameter",[r.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED]:'websocket connection state is not "CONNECTED"',[r.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN]:"websocket is not open",[r.RTC_ERR_CODE_WAIT_CONFIG_FAIL]:"wait server config fail",[r.RTC_ERR_CODE_WAIT_RSP_TIMEOUT]:"message response timeout",[r.RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL]:"publish response fail",[r.RTC_ERR_CODE_REGION_NOT_COVERED]:"current region is not covered, service unavailable",[r.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT]:"websocket connect timeout",[r.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT]:"websocket reconnect timeout",[r.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED]:"websocket connection state is idle, interrupt operation",[r.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED]:"capture failed, permission denied",[r.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED]:"capture failed, Constraint parameter invalid",[r.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND]:"capture failed, requested device not found",[r.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE]:"capture failed, maybe device is occupied by other application",[r.RTC_ERR_CODE_PLAY_NOT_ALLOW]:"the user didn't interact with the document first, please trigger by gesture",[r.RTC_ERR_CODE_ROLE_NO_PERMISSION]:"the user role have no permission to operate",[r.RTC_ERR_CODE_ANSWER_SDP_INVALID]:"the answer sdp is invalid",[r.RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED]:"the upstream media is not supported",[r.RTC_ERR_CODE_WEBRTC_UNSUPPORTED]:"the browser does not support",[r.RTC_ERR_CODE_MEDIA_NETWORK_ERROR]:"media connection establish failed, please switch network or try again later",[r.RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM]:"relay room number over maxium number.",[r.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED]:"room stream status paused",[r.RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM]:"joiner already exist in relay rooms.",[r.RTC_ERR_CODE_SIGNATURE_INVALID]:"signature invalid",[r.RTC_ERR_CODE_SIGNATURE_EXPIRED]:"signature expired"};var i;(function(e){e[e["UNKNOWN"]=0]="UNKNOWN";e[e["GREAT"]=1]="GREAT";e[e["GOOD"]=2]="GOOD";e[e["NOT_BAD"]=3]="NOT_BAD";e[e["BAD"]=4]="BAD";e[e["VERY_BAD"]=5]="VERY_BAD";e[e["DISCONNECTED"]=6]="DISCONNECTED"})(i||(t.NETWORK_QUALITY_LEVEL=i={}));const o=t.NetworkQualityToast={LOCALE_STREAM:{rtt:180},REMOTE_AUDIO_STREAM:{pktLossRate:4,jitter:25},REMOTE_VIDEO_STREAM:{pktLossRate:4,jitter:15}}},21699:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(60511);var a=r(67750);var s=r(655);var u=r(41436);var c=i("".indexOf);n({target:"String",proto:true,forced:!u("includes")},{includes:function e(t){return!!~c(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:undefined)}})},21873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);var o=r(69733);r(29098);var a=r(39595);var s=h(r(33528));var u=h(r(46241));var c=h(r(46942));var l=r(44246);var f=r(44772);var d=r(38475);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=w(t),_(e,E()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}const R=f.UrlUtil.getSearchValue(location.href,"showDebugTools");let C=function(e){function t(){p(this,t);return b(this,t,arguments)}T(t,e);return m(t,[{key:"render",value:function e(){const{language:t,enableDeviceSetting:r,showLanguageUI:i,className:o}=this.props;const a=l.HWIcsElectron.isHWIcsElectron();return(0,n.jsxs)("div",{className:(0,c.default)("caption-container-tools",o),children:[R==="1"?(0,n.jsx)(d.DebugTools,{}):null,r&&!a&&(0,n.jsxs)("div",{className:"tools-item audio-item",children:[(0,n.jsx)("div",{className:"audio-ico"}),(0,n.jsx)(s.default,{children:(0,n.jsx)("span",{className:"audio-item-text",children:t.audioDevice})})]}),i&&(0,n.jsx)("div",{className:"tools-item",children:(0,n.jsx)(u.default,{})})]})}}])}(i.Component);const k=e=>({language:e.lang.language,enableDeviceSetting:e.config.enableDeviceSetting,showLanguageUI:e.config[a.ConfigKey.SHOW_LANGUAGE_UI]});var A=t["default"]=(0,o.connect)(k)(C)},21878:(e,t)=>{t.isValid=function e(t){return!isNaN(t)&&t>=1&&t<=40}},21896:e=>{(function t(r,n){if(true)e.exports=n();else{var i,o}})(self,(()=>(()=>{var e={258:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.throttle=e.sleep=e.setPLogger=e.isNullOrEmpty=e.getPLogger=e.getClientId=e.formatType=e.formatDate=e.deepCopy=e.debounce=e.createEntry=e.Noop=void 0;var t=e.Noop=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return r};var r={debug:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},info:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},warn:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},error:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)}};var n=e.getPLogger=function e(){return r};var i=e.formatType=function e(t){return Object.prototype.toString.apply(t).match(/\[object\s(.*)]/)[1].toLowerCase()};i.STRING="string";i.OBJECT="object";i.PROXYOBJECT="proxyobject";i.FUNCTION="function";i.ARRAY="array";i.BOOLEAN="boolean";i.NUMBER="number";i.PROMISE="promise";i.NULL="null";i.UNDEFINED="undefined";i.NODELIST="nodelist";i.HTMLCOLLECTION="htmlcollection";i.EVENT="event";i.XMLDOCUMENT="xmldocument";i.DOCUMENT="document";i.ASYNCFUNCTION="asyncfunction";var o=e.setPLogger=function e(t){if(i(t===null||t===void 0?void 0:t.debug)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.info)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.warn)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.error)===i.FUNCTION){r=t}};var a=e.isNullOrEmpty=function e(t){var r=i(t);if(r===i.OBJECT){return Object.keys(t).length===0}return t===undefined||t===null||t.toString()==="NaN"||t===""||t.length===0};var s=e.deepCopy=function e(t){if(a(t)){return t}if(i(t)===i.STRING||i(t)===i.NUMBER||i(t)===i.BOOLEAN){return t}return JSON.parse(JSON.stringify(t))};var u=e.formatDate=function e(t,r){var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:parseInt((t.getMilliseconds()/1e3).toFixed(3).substr(2))};if(/(y+)/.test(r)){r=r.replace(RegExp.$1,String(t.getFullYear()).substr(4-RegExp.$1.length))}for(var i in n){if(new RegExp("("+i+")").test(r)){r=r.replace(RegExp.$1,RegExp.$1.length===1?n[i].toString():("00"+n[i]).substr(String(n[i]).length))}}return r};var c=e.getClientId=function(){var e=0;var t=(new Date).getTime();return function(){var r=(new Date).getTime();if(r===t){e++;if(e>999){e=1}}else{t=r;e=0}return t*1e3+e}}();var l=e.createEntry=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";return"".concat(t," ").concat(c())};var f=e.sleep=function e(t){return new Promise((function(e){return setTimeout(e,t)}))};var d=e.debounce=function e(t,r){var n=0;return function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++){i[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){t.apply(void 0,i)}),r)}};var h=e.throttle=function e(t,r){var n;return function(){if(!n){t.apply(void 0,arguments);n=setTimeout((function(){n=null}),r)}}}}))},260:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(5651),r(5969),r(9611),r(7354),r(8024),r(9974)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RTCVideoPlayer=void 0;r=l(r);i=u(i);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function e(n){return n?r:t})(e)}function l(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=a(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n["default"]=e,r&&r.set(e,n),n}function f(){"use strict";f=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==a(t)?t:t+""}function g(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=R(t),_(e,E()?Reflect.construct(t,r||[],R(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function t(){return!!e})()}function w(e,t,r,n){var i=T(R(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=I(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},T.apply(null,arguments)}function I(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=R(e)););return e}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var A=e.RTCVideoPlayer=function(e){function t(e){var i;p(this,t);i=b(this,t,[{track:e.track,playerDiv:e.parentDiv,playerId:e.playerId}]);i.module_="RTCVideoPlayer";i.objectFit_=e.objectFit;i.loadingUtils=new r.LoadingMask(e.parentDiv);i.autoPlay_=e.autoPlay||false;i.videoBufferedReday=false;i.poster_=e.poster;if(i.poster_){r.PosterMask.attachPoster(e.parentDiv,i.poster_.url,i.poster_.mode||n.PosterMode.FILL);if(!i.autoPlay_&&i.poster_.startEnable){r.PosterMask.disPlayPoster(true,i.poster_.url)}}return i}C(t,e);return m(t,[{key:"play",value:function(){var e=h(f().mark((function e(){var t=this;return f().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){var n=t.playerDiv_.querySelector("#video_".concat(t.playerId_));var a=true;if(!n){n=document.createElement("video");n.muted=true;n.setAttribute("id","video_".concat(t.playerId_));n.style.width="100%";n.style.height="100%";n.style.position="absolute";n.style["object-fit"]=t.objectFit_;t.autoPlay_&&n.setAttribute("autoplay","");n.setAttribute("playsinline","");n.setAttribute("webkit-playsinline","");i["default"].isTencentX5BrowserKernel()&&n.setAttribute("x5-playsinline","");n.setAttribute("muted","");t.playerDiv_.appendChild(n);a=false}if(t.mediaStream_.getVideoTracks().length===0){t.mediaStream_.addTrack(t.track_)}n.srcObject=t.mediaStream_;t.playerElement_=n;t.addFirstFrameCallBackListener();t.closeAllEvents();t.handleEvents();if(!t.autoPlay_){return}clearTimeout(t.playTimeOutTimer);t.playTimeOutTimer=setTimeout((function(){o.LoggerFactory.info(t.module_,"trigger videoCanPlay event by Timer");t.event_.emit("videoCanPlay");clearTimeout(t.playTimeOutTimer);t.playTimeOutTimer=setTimeout((function(){o.LoggerFactory.info(t.module_,"video playing timeout");clearTimeout(t.playTimeOutTimer);delete t.playTimeOutTimer;r(new s.HwLLSError(s.ErrorCode.HWLLS_PLAY_TIMEOUT));t.listenHandlers.playInterruptHandler&&t.event_.removeListener("playInterrupt",t.listenHandlers.playInterruptHandler)}),a?1e4:8e3)}),a?0:2e3);if(t.module_.indexOf("Video")>0){t.listenHandlers.playInterruptHandler&&t.event_.removeListener("playInterrupt",t.listenHandlers.playInterruptHandler);t.listenHandlers.playInterruptHandler=t.playInterruptHandler.bind(t,r);t.event_.once("playInterrupt",t.listenHandlers.playInterruptHandler)}t.listenHandlers.playHandler&&t.event_.removeListener("videoCanPlay",t.listenHandlers.playHandler);t.listenHandlers.playHandler=t.doPlay.bind(t,e,r,{objectFit:t.objectFit_});t.event_.on("videoCanPlay",t.listenHandlers.playHandler)})));case 1:case"end":return r.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=h(f().mark((function e(t){return f().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:o.LoggerFactory.info("setSinkId",t);case 1:case"end":return r.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resume",value:function(){var e=h(f().mark((function e(){var n=this;return f().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(this.poster_){r.PosterMask.disPlayPoster(false,this.poster_.url)}if(this.manualStartedPlay()){i.next=7;break}this.listenHandlers.playHandler&&this.event_.removeListener("videoCanPlay",this.listenHandlers.playHandler);this.listenHandlers.playHandler=function(){n.loadingMask(false);n.resume()};this.event_.on("videoCanPlay",this.listenHandlers.playHandler);i.next=7;return r.PlayerAdapter.multiPlatformAdapter();case 7:i.next=9;return w(t,"resume",this,3)([{streamId:this.playerId_,screentFit:this.objectFit_}]);case 9:return i.abrupt("return",i.sent);case 10:case"end":return i.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}()},{key:"pause",value:function e(){var n;w(t,"pause",this,3)([]);if((n=this.poster_)!==null&&n!==void 0&&n.pauseEnable){r.PosterMask.disPlayPoster(true,this.poster_.url)}}},{key:"stop",value:function e(){w(t,"stop",this,3)([]);this.loadingUtils.stopLoadingMask();this.poster_&&r.PosterMask.detachPoster(this.playerDiv_,this.poster_.url);this.videoBufferedReday=false}},{key:"loadingMask",value:function e(t){if(t){if(this.autoPlay_||this.manualStartedPlay()){this.loadingUtils.loadingMask(true)}}else{this.loadingUtils.loadingMask(false)}}},{key:"addFirstFrameCallBackListener",value:function e(){var t=this;if(!this.playerElement_.requestVideoFrameCallback){return}this.playerElement_.requestVideoFrameCallback((function(){o.LoggerFactory.debug(t.module_,"first video frame received.");t.event_.emit(n.HWLLSEvents.VIDEO_START)}))}},{key:"exitFullScreen",value:function e(){r["default"].exitFullScreen()}},{key:"enterFullScreen",value:function e(){r["default"].enterFullScreen(this.playerDiv_,this.playerElement_,this.event_)}},{key:"manualStartedPlay",value:function e(){return this.event_.eventNames().includes("videoCanPlay")}}])}(t.RTCPlayer)}))},362:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752),r(258),r(5113)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LocalTransparentVideoBg=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==i(t)?t:t+""}function h(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=e.LocalTransparentVideoBg=function(){function e(i){var a=this;u(this,e);f(this,"transparentCanvasElem",void 0);f(this,"videoElem",void 0);f(this,"chromakey",void 0);f(this,"similarity",void 0);f(this,"smoothness",void 0);f(this,"spill",void 0);f(this,"keyColor",void 0);f(this,"ctx",void 0);f(this,"render",s(o().mark((function e(){var t,r;var n;return o().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(a.transparentCanvasElem){i.next=2;break}return i.abrupt("return");case 2:i.next=4;return a.chromakey.dealVideoFrame(a.videoElem);case 4:n=i.sent;(t=a.ctx)===null||t===void 0||t.clearRect(0,0,a.transparentCanvasElem.width,a.transparentCanvasElem.height);(r=a.ctx)===null||r===void 0||r.drawImage(n,0,0,a.transparentCanvasElem.width,a.transparentCanvasElem.height);a.videoElem.requestVideoFrameCallback(a.render);case 8:case"end":return i.stop()}}),e)}))));this.videoElem=i.videoElem;this.similarity=i.similarity||.03;this.smoothness=i.smoothness||.22;this.spill=i.spill||.1;this.keyColor=i.keyColor;this.transparentCanvasElem=document.createElement("canvas");this.ctx=this.transparentCanvasElem.getContext("2d",{alpha:true});this.transparentCanvasElem.setAttribute("id",i.canvasId||"transparentCanvasElem");this.transparentCanvasElem.width=this.videoElem.videoWidth;this.transparentCanvasElem.height=this.videoElem.videoHeight;if(i.algorithmPattern==="B"){this.chromakey=new n.ChromaKeyB({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}else{this.chromakey=new t.ChromaKeyA({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}if(!i.rootElem){return}i.rootElem.append(this.transparentCanvasElem);(0,r.getPLogger)().info("LocalTransparentVideoBg","start render transparent background");this.render()}return l(e,[{key:"destroy",value:function e(){(0,r.getPLogger)().info("destroy");if(this.transparentCanvasElem){this.transparentCanvasElem.remove();this.transparentCanvasElem=null}}}])}()}))},375:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DownloadAudio=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.DownloadAudio=function(){function e(){n(this,e);a(this,"list",[]);a(this,"id",(0,t.getClientId)())}return o(e,[{key:"addDownloadData",value:function e(t){this.list.push(t)}},{key:"downloadFile",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"test";(0,t.getPLogger)().info("downloadFile",this.id,r);var n=new Blob(this.list);var i=document.createElement("a");var o=URL.createObjectURL(n);i.href=o;i.download=r;document.body.appendChild(i);i.click();document.body.removeChild(i);URL.revokeObjectURL(o)}},{key:"clearData",value:function e(){(0,t.getPLogger)().info("clearData",this.id);this.list=[]}}])}()}))},394:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.mergeByDay=void 0;var t=e.mergeByDay=function e(t,r){if(t<0||r<0){return false}if(!Number.isInteger(t)||!Number.isInteger(r)){return false}var n=new Date(t);var i=new Date(r);return!(n.getFullYear()!==i.getFullYear()||n.getMonth()!==i.getMonth()||n.getDate()!==i.getDate())}}))},491:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.startsWith=e.getIsInWhiteListFn=void 0;function r(){return/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi}function n(e){var t=e.url,n=e.whiterList,i=e.ignoreIp;var o=new URL(t);var a=r();if(i&&a.test(o.hostname)){return true}n=n.filter((function(e){return!!e}));for(var s=0;s<n.length;s++){if(o.hostname.endsWith(n[s])){return true}}return false}var i=e.startsWith=function e(t){return function(e){return e.toLowerCase().startsWith(t)}};var o=e.getIsInWhiteListFn=function e(r){return function(e){var i=e.url,o=e.whiterList,a=e.ignoreIp,s=a===void 0?true:a;try{if((0,t.isNullOrEmpty)(i)){return false}if(r(i)){return n({url:i,whiterList:o,ignoreIp:s})}return false}catch(e){return false}}}}))},724:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354),r(8094),r(5268),r(3652),r(1516)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Stream=void 0;t=a(t);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new TypeError('"'+e+'" is read-only')}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new P(n||[]);return i(a,"_invoke",{value:C(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};l(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=g.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==M(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function C(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function k(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(M(t)+" is not iterable")}return b.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(R.prototype),l(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new R(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),l(T,c,"Generator"),l(T,a,(function(){return this})),l(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=x,P.prototype={constructor:P,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:x(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}function f(e){return p(e)||h(e)||_(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(e){if(Array.isArray(e))return S(e)}function v(e,t){return g(e)||y(e,t)||_(e,t)||m()}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function g(e){if(Array.isArray(e))return e}function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function _(e,t){if(e){if("string"==typeof e)return S(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I(n.key),n)}}function T(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e){var t=R(e,"string");return"symbol"==M(t)?t:t+""}function R(e,t){if("object"!=M(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function C(e,t,r){return t=P(t),k(e,O()?Reflect.construct(t,r||[],P(e).constructor):t.apply(e,r))}function k(e,t){if(t&&("object"==M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function t(){return!!e})()}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function M(e){"@babel/helpers - typeof";return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}var N=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":M(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var D=new i.Log({module:"Stream"});var j=e.Stream=function(e){function r(e){var n;E(this,r);n=C(this,r);n.module_="Stream";n.isRemote_=e.isRemote;n.id_=t["default"].generateStreamId();n.type_=e.type;n.tracks={video:new Map,audio:new Map};n.playDivContainers=new Map;return n}x(r,e);return T(r,[{key:"getStreamInfo",value:function e(){return this.getStreamInfoImpl()}},{key:"getStreamInfoImpl",value:function e(){var t={videoProfiles:[]};var r=b(this.tracks[n.MediaType.TRACK_TYPE_VIDEO]),i;try{for(r.s();!(i=r.n()).done;){var o=v(i.value,2),a=o[0],s=o[1];if(s.getTrackType()===n.MediaType.TRACK_TYPE_VIDEO){var u;var c={resolutionId:a,hasTrack:!!s.getTrack(),width:s.getTrackProfile().width,height:s.getTrackProfile().height,frameRate:s.getTrackProfile().frameRate,minBitrate:s.getTrackProfile().minBitrate,maxBitrate:s.getTrackProfile().maxBitrate};(u=t.videoProfiles)===null||u===void 0||u.push(c)}}}catch(e){r.e(e)}finally{r.f()}var l=this.getAnyAudioHRTCTrack();if(l){t.audioProfile={sampleRate:l.getTrackProfile().sampleRate,channelCount:l.getTrackProfile().channelCount,bitrate:l.getTrackProfile().bitrate}}D.info(this.module_,"getStreamInfoImpl success: ".concat(JSON.stringify(t)));return t}},{key:"getMaxResolutionHRTCTrack",value:function e(t){var r;var i=Array.from(this.tracks[n.MediaType.TRACK_TYPE_VIDEO].values());var o=t?i:i.filter((function(e){return e.getTrack()}));var a=b(o),s;try{for(a.s();!(s=a.n()).done;){var u=s.value;if(!r){r=u;continue}if(r&&Math.max(u.getTrackProfile().width,u.getTrackProfile().height)-Math.max(r.getTrackProfile().width,r.getTrackProfile().height)>0){r=u}}}catch(e){a.e(e)}finally{a.f()}return r}},{key:"getMaxResolutionProfile",value:function e(t){if(t.size===0){return null}var r;var n="";var i=b(t),o;try{for(i.s();!(o=i.n()).done;){var a=v(o.value,2),s=a[0],u=a[1];if(!r){r=u;n=s;continue}if(Math.max(u.width,u.height)-Math.max(r.width,r.height)>0){r=u;n=s}}}catch(e){i.e(e)}finally{i.f()}return r?{resolutionId:n,width:r.width,height:r.height,frameRate:r.frameRate,minBitrate:r.minBitrate,maxBitrate:r.maxBitrate}:null}},{key:"getHRTCTracks",value:function e(t){var r=[];var i=Array.from(this.tracks[n.MediaType.TRACK_TYPE_AUDIO].values());var o=Array.from(this.tracks[n.MediaType.TRACK_TYPE_VIDEO].values());if(!t){return[].concat(i,o)}var a=t.hasTrack===undefined?i:i.filter((function(e){return!!e.getTrack()===t.hasTrack}));var s=t.hasTrack===undefined?o:o.filter((function(e){return!!e.getTrack()===t.hasTrack}));if(!t.mediaType){r.push.apply(r,f(a));r.push.apply(r,f(s))}else{if(t.mediaType===n.MediaType.TRACK_TYPE_VIDEO){r.push.apply(r,f(s))}else{r.push.apply(r,f(a))}}return r}},{key:"getHRTCTrackIds",value:function e(t){var r=[];var n=b(this.getHRTCTracks(t)),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;r.push(o.getTrackId()||"")}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getAnyVideoHRTCTrack",value:function e(t){var r;if(t){r=this.tracks[n.MediaType.TRACK_TYPE_VIDEO].get(t)}else{r=this.getMaxResolutionHRTCTrack(true)}return r}},{key:"getVideoHRTCTrack",value:function e(t){var r;var i;if(t){i=this.tracks[n.MediaType.TRACK_TYPE_VIDEO].get(t)}else{i=this.getMaxResolutionHRTCTrack()}return(r=i)!==null&&r!==void 0&&r.getTrack()?i:null}},{key:"getAnyAudioHRTCTrack",value:function e(){return this.tracks[n.MediaType.TRACK_TYPE_AUDIO].get("mainAudio")}},{key:"getUninitializedAudioHRTCTrack",value:function e(){var t=this.getAnyAudioHRTCTrack();return t!==null&&t!==void 0&&t.getTrack()?t:undefined}},{key:"getUninitializedVideoHRTCTrack",value:function e(t){var r;var i;if(t){i=this.tracks[n.MediaType.TRACK_TYPE_VIDEO].get(t)}else{i=this.getMaxResolutionHRTCTrack(true)}return(r=i)!==null&&r!==void 0&&r.getTrack()?null:i}},{key:"getAudioHRTCTrack",value:function e(){var t=this.getAnyAudioHRTCTrack();return t!==null&&t!==void 0&&t.getTrack()?t:undefined}},{key:"getUniqueId",value:function e(){return this.id_}},{key:"getInfo",value:function e(){return{moduleName:"Stream",appId:"",roomId:"",userName:"",userId:"",domain:""}}},{key:"stop",value:function e(t){this.stopImpl(t)}},{key:"stopImpl",value:function e(t){var r,i=this;D.info(this.module_,"stopImpl begin, option:".concat(JSON.stringify(t)));var o=this.getHRTCTracks({hasTrack:true,mediaType:n.MediaType.TRACK_TYPE_VIDEO});var a=[];if(!t||t.video&&!t.resolutionIds){a.push.apply(a,f(o))}else if(t.video&&(r=t.resolutionIds)!==null&&r!==void 0&&r.length){t.resolutionIds.forEach((function(e){var t=i.getVideoHRTCTrack(e);t&&a.push(t)}))}a.forEach((function(e){e.stop()}));if(!t||t.audio){var s;(s=this.getAudioHRTCTrack())===null||s===void 0||s.stop()}}},{key:"resume",value:function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return this.resumeImpl(t);case 2:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resumeImpl",value:function(){var e=l(u().mark((function e(t){var r,i=this;var o,a,s,c;return u().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:D.info(this.module_,"resumeImpl begin, option:".concat(JSON.stringify(t)));o=this.getHRTCTracks({hasTrack:true,mediaType:n.MediaType.TRACK_TYPE_VIDEO});a=[];if(!t||t.video&&!t.resolutionIds){a.push.apply(a,f(o))}else if(t.video&&(r=t.resolutionIds)!==null&&r!==void 0&&r.length){t.resolutionIds.forEach((function(e){var t=i.getVideoHRTCTrack(e);t&&a.push(t)}))}s=[];a.forEach((function(e){s.push(e.resume())}));if(!t||t.audio){c=this.getAudioHRTCTrack();c&&s.push(c.resume())}u.next=9;return Promise.all(s);case 9:case"end":return u.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"close",value:function e(t){this.closeImpl(t)}},{key:"closeImpl",value:function e(t){D.info(this.module_,"closeImpl begin, options:".concat(JSON.stringify(t)));if(!t||t.video&&!t.resolutionIds&&t.audio){var r=b(this.getHRTCTracks({hasTrack:true})),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.close()}}catch(e){r.e(e)}finally{r.f()}var o=b(this.playDivContainers.values()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.HTMLElement&&s.HTMLElement.remove()}}catch(e){o.e(e)}finally{o.f()}this.playDivContainers.clear();return}if(t.audio){this.closeAudio()}var u=this.getHRTCTracks({hasTrack:true}).every((function(e){return e.isClosed()}));if(u){this.mediaStream=undefined}}},{key:"closeAudio",value:function e(){var t=this.getAudioHRTCTrack();if(t){var r=t.getElementId();t.close();if(r){var n=this.playDivContainers.get(r);if(n){var i;n.hasAudioTrack=false;D.debug(this.module_,"closeAudio, elementId:".concat(r,", divInfo: ").concat((i=n.HTMLElement)===null||i===void 0?void 0:i.id,", hasAudioTrack: ").concat(n.hasAudioTrack,", hasVideoTrack: ").concat(n.hasVideoTrack,"}"));if(!n.hasVideoTrack){var o;(o=this.playDivContainers.get(r))===null||o===void 0||(o=o.HTMLElement)===null||o===void 0||o.remove();this.playDivContainers["delete"](r);D.info(this.module_,"closeAudio, release elementId: ".concat(r))}}}}}},{key:"muteAudio",value:function e(){return this.muteAudioImpl()}},{key:"muteAudioImpl",value:function e(){try{var t=this.getAudioHRTCTrack();if(t){t.muteTrack();return true}return false}catch(e){D.error(this.module_,"muteAudio failed: ".concat(e));return false}}},{key:"muteVideo",value:function e(){return this.muteVideoImpl()}},{key:"muteVideoImpl",value:function e(){try{if(!this.hasVideoTrack()){return false}var t=b(this.getHRTCTracks({hasTrack:true,mediaType:n.MediaType.TRACK_TYPE_VIDEO})),r;try{for(t.s();!(r=t.n()).done;){var i=r.value;i.muteTrack()}}catch(e){t.e(e)}finally{t.f()}return true}catch(e){D.error(this.module_,"muteVideo failed: ".concat(e));return false}}},{key:"unmuteAudio",value:function e(){return this.unmuteAudioImpl()}},{key:"unmuteAudioImpl",value:function e(){try{var t=this.getAudioHRTCTrack();if(t){t.unmuteTrack();return true}return false}catch(e){D.error(this.module_,"unmuteAudio failed: ".concat(e));return false}}},{key:"unmuteVideo",value:function e(){return this.unmuteVideoImpl()}},{key:"unmuteVideoImpl",value:function e(){try{if(!this.hasVideoTrack()){return false}var t=b(this.getHRTCTracks({hasTrack:true,mediaType:n.MediaType.TRACK_TYPE_VIDEO})),r;try{for(t.s();!(r=t.n()).done;){var i=r.value;i.unmuteTrack()}}catch(e){t.e(e)}finally{t.f()}return true}catch(e){D.error(this.module_,"unmuteVideo failed: ".concat(e));return false}}},{key:"getId",value:function e(){var t;return(t=this.getMaxResolutionHRTCTrack(true))===null||t===void 0?void 0:t.getTrackId()}},{key:"getUserId",value:function e(){return this.userId_}},{key:"getType",value:function e(){return this.type_}},{key:"setAudioOutput",value:function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.setAudioOutputImpl(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setAudioOutputImpl",value:function(){var e=l(u().mark((function e(t){var r;return u().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=this.getAudioHRTCTrack();if(!r){n.next=4;break}n.next=4;return r.setSinkId(t);case 4:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setAudioVolume",value:function e(t){this.setAudioVolumeImpl(t)}},{key:"setAudioVolumeImpl",value:function e(t){var r=this.getAudioHRTCTrack();if(r){r.setAudioVolume(t)}}},{key:"getAudioLevel",value:function e(){var t=this.getAudioHRTCTrack();if(t){return t.getAudioLevel()}return 0}},{key:"hasAudioTrack",value:function e(){return!!this.getAudioHRTCTrack()}},{key:"hasVideoTrack",value:function e(){var t=Array.from(this.tracks[n.MediaType.TRACK_TYPE_VIDEO].values()).filter((function(e){return e.getTrack()}));return t.length>0}},{key:"getAudioTrack",value:function e(){var t=this.getAudioHRTCTrack();if(t){return t.getTrack()}return undefined}},{key:"getVideoTrack",value:function e(t){var r=this.getVideoHRTCTrack(t);if(r){return r.getTrack()}return undefined}},{key:"restart",value:function(){var e=l(u().mark((function e(t){var r,n,i,o,a;return u().wrap((function e(s){while(1)switch(s.prev=s.next){case 0:if(!t){s.next=4;break}s.next=3;return(r=this.getVideoHRTCTrack(t))===null||r===void 0?void 0:r.restart();case 3:return s.abrupt("return");case 4:n=[];i=b(this.getHRTCTracks({hasTrack:true}));try{for(i.s();!(o=i.n()).done;){a=o.value;n.push(a.restart())}}catch(e){i.e(e)}finally{i.f()}s.next=9;return Promise.all(n);case 9:case"end":return s.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getStatInfo",value:function e(){return{isRemote_:this.isRemote_,type_:this.type_,userId_:this.userId_,id_:this.id_}}},{key:"getStatExtraInfo",value:function e(){return{isRemote:this.isRemote_,id:this.id_,userId:this.userId_}}},{key:"hasAudio",value:function e(){var t;var r=(t=this.getAudioHRTCTrack())===null||t===void 0?void 0:t.getTrack();var e=!!r;D.debug(this.module_,"hasAudio: ".concat(e));return e}}])}(o.EmitterAbleAndStatisticAbleBase);N([(0,r.api)("Stream$getStreamInfo#StreamInfo")],j.prototype,"getStreamInfo",null);N([(0,r.api)("Stream$stop#void#StreamOption")],j.prototype,"stop",null);N([(0,r.asyncApi)("Stream$resume#Promise<void>#StreamOption")],j.prototype,"resume",null);N([(0,r.api)("Stream$close#void#StreamOption")],j.prototype,"close",null);N([(0,r.api)("Stream$muteAudio#boolean")],j.prototype,"muteAudio",null);N([(0,r.api)("Stream$muteVideo#boolean")],j.prototype,"muteVideo",null);N([(0,r.api)("Stream$unmuteAudio#boolean")],j.prototype,"unmuteAudio",null);N([(0,r.api)("Stream$unmuteVideo#boolean")],j.prototype,"unmuteVideo",null);N([(0,r.asyncApi)("Stream$setAudioOutput#Promise<void>#string")],j.prototype,"setAudioOutput",null);N([(0,r.api)("Stream$setAudioVolume#void#number")],j.prototype,"setAudioVolume",null)}))},916:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9524),r(2867)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioContextLocalRecorder=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=d(e,"string");return"symbol"==n(t)?t:t+""}function d(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=e.AudioContextLocalRecorder=function(){function e(n){s(this,e);l(this,"instance",void 0);var i=new AudioContext({sampleRate:16e3});if(n.useScriptProcessor&&!!i.createScriptProcessor){this.instance=new t.ScriptProcessorRecord(n)}else{this.instance=new r.AudioWorkletNodeRecord(n)}}return c(e,[{key:"startRecord",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.startRecord(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=a(i().mark((function e(){return i().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.instance.stopRecord());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.setSinkId(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},960:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(3442),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getLogger=void 0;var n=function e(){};var i=function e(n){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";return function(e){try{var o,a;if(n==="none"){return""}var s=(0,r.formatDate)(new Date,"yyyy-MM-dd hh:mm:ss.S");for(var u=arguments.length,c=new Array(u>1?u-1:0),l=1;l<u;l++){c[l-1]=arguments[l]}(o=window.console)===null||o===void 0||(a=o[n])===null||a===void 0||a.call.apply(a,[o,"[".concat(s,"][").concat(n,"][").concat(i,"]"),e].concat(c));var f="[".concat(s,"][").concat(n,"][").concat(i,"] ").concat(e," ").concat(JSON.stringify(c));if(n!=="debug"){t.UserTrack===null||t.UserTrack===void 0||t.UserTrack.addUserTrack({arg1:"ut_event_p2p_sdk",arg2:i,args:{type:n,entry:e,message:JSON.stringify(c)}})}return f}catch(e){return""}}};var o=e.getLogger=function e(t){return{debug:i("debug",t),info:i("info",t),log:n,warn:i("warn",t),error:i("error",t),none:n}}}))},1068:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getElementScreenPosition=void 0;var t=e.getElementScreenPosition=function e(t){if(!t){return{left:0,top:0}}var r=t;var n=0;var i=0;while(r){n+=r.offsetLeft-r.scrollLeft;i+=r.offsetTop-r.scrollTop;r=r.offsetParent}return{left:n,top:i}}}))},1156:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2216),r(7354),r(2363),r(8024),r(9611),r(8066),r(4404),r(5472),r(6620),r(5268),r(4772),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HWLLSStat=void 0;r=h(r);u=h(u);c=h(c);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=S(e,"string");return"symbol"==E(t)?t:t+""}function S(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){"@babel/helpers - typeof";return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":E(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var T=new d.Log({module:"MediaStats"});var I=10;var R=e.HWLLSStat=function(){function e(n){y(this,e);this.identifiedId=n;this.module_="HWLLSStat";this.commInfo={};this.commInfo.deviceId=r["default"].getDeviceID();this.commInfo.v="web-".concat(t.configs.SDK_VERSION,"-").concat(t.configs.COMMIT_ID);this.commInfo.userAgent=navigator.userAgent}return b(e,[{key:"reportStartPullStreamReqEvent",value:function e(t){var n,i,a;if(!this.isStatiscEnable()){return}var c=(n=s.GlobalVariableManager.getInstance(this.identifiedId))===null||n===void 0?void 0:n.getSfuInfo();var l=(i=s.GlobalVariableManager.getInstance(this.identifiedId))===null||i===void 0?void 0:i.getStreamParams();var f=(a=s.GlobalVariableManager.getInstance(this.identifiedId))===null||a===void 0?void 0:a.getPlayTrackKpi();var d=this.generateCommonReportInfo({accessAddr:(l===null||l===void 0?void 0:l.accessAddr)||"",SFUAddr:(c===null||c===void 0?void 0:c.ipAddress)||"",aPort:(c===null||c===void 0?void 0:c.audioPort)||0,vPort:(c===null||c===void 0?void 0:c.videoPort)||0,httpCode:t.httpCode,resultCode:t.retCode,resultMessage:t.retMsg,startTime:f===null||f===void 0?void 0:f.negotiateSDPRequest,endTime:f===null||f===void 0?void 0:f.negotiateSDPRespone,playQos:JSON.stringify(t.joinQos||{}),appUrl:r["default"].getAppUrl(),gslbCostTime:((f===null||f===void 0?void 0:f.glsbRespone)||0)-((f===null||f===void 0?void 0:f.glsbRequest)||0),sigCostTime:((f===null||f===void 0?void 0:f.negotiateSDPRespone)||0)-((f===null||f===void 0?void 0:f.negotiateSDPRequest)||0),platform:r["default"].getPlatform(),bv:r["default"].getBrowserVersion(),timeDiff:r["default"].getTimeDiff(),autoRetry:t.autoRetry},o.StatEvents.EVENT_START_PULL_STREAM_REQ,"event^startPlay^SDK^ACS");u["default"].addRecord(d);u["default"].immediateReportRecords()}},{key:"reportStopPullStreamReqEvent",value:function e(t){var n,i,a,c;if(!this.isStatiscEnable()){return}var l=(n=s.GlobalVariableManager.getInstance(this.identifiedId))===null||n===void 0?void 0:n.calcAverageStatistic();var f=(i=s.GlobalVariableManager.getInstance(this.identifiedId))===null||i===void 0?void 0:i.getStreamParams();var d=(a=s.GlobalVariableManager.getInstance(this.identifiedId))===null||a===void 0?void 0:a.getSfuInfo();var h=this.generateCommonReportInfo({reason:"stopPlay",elapsed:(c=s.GlobalVariableManager.getInstance(this.identifiedId))===null||c===void 0?void 0:c.calcPlayDuration(),aRecvRttMean:l.aRecvRttMean,vRecvRttMean:l.vRecvRttMean,aRecvLostMean:l.aRecvLostMean,vRecvLostMean:l.vRecvLostMean,aRecvBandwidthMean:l.aRecvBandwidthMean,vRecvBandwidthMean:l.vRecvBandwidthMean,aRecvJitter:l.aRecvJitter,vRecvJitter:l.vRecvJitter,afreeze200Cnt:l.afreeze200Cnt,vfreeze200Cnt:l.vfreeze200Cnt,vfreeze600Cnt:l.vfreeze600Cnt,afreeze200Rate:l.afreeze200Rate,vfreeze200Rate:l.vfreeze200Rate,vfreeze600Rate:l.vfreeze600Rate,resultCode:0,startTime:t,endTime:r["default"].getCurrentLocalTimestamp(),accessAddr:(f===null||f===void 0?void 0:f.accessAddr)||"",SFUAddr:(d===null||d===void 0?void 0:d.ipAddress)||""},o.StatEvents.EVENT_STOP_PULL_STREAM_REQ,"event^stopPlay^SDK^ACS");u["default"].addRecord(h);u["default"].immediateReportRecords()}},{key:"reportConnectionStatus",value:function e(t,r){var n;if(!this.isStatiscEnable()){return}var i=(n=s.GlobalVariableManager.getInstance(this.identifiedId))===null||n===void 0?void 0:n.getSfuInfo();var a={SFUAddr:i===null||i===void 0?void 0:i.ipAddress,ssrc:(i===null||i===void 0?void 0:i.vSsrc)||(i===null||i===void 0?void 0:i.aSsrc),on:t,protocol:r||""};a=this.generateCommonReportInfo(a,o.StatEvents.EVENT_CONNECTION_CHANNEL_STATUS,"event^connectionState^SDK^ACS");u["default"].addRecord(a);u["default"].immediateReportRecords()}},{key:"reportPullMediaStreamResult",value:function e(t,n,i){var a,c,f,d;if(!this.isStatiscEnable()){return}var h=(i===null||i===void 0?void 0:i.sfuInfo)||((a=s.GlobalVariableManager.getInstance(this.identifiedId))===null||a===void 0?void 0:a.getSfuInfo());var p=(i===null||i===void 0?void 0:i.streamParams)||((c=s.GlobalVariableManager.getInstance(this.identifiedId))===null||c===void 0?void 0:c.getStreamParams());var v=(i===null||i===void 0?void 0:i.mediaParams)||((f=s.GlobalVariableManager.getInstance(this.identifiedId))===null||f===void 0?void 0:f.getPullMediaParams());var m=(i===null||i===void 0?void 0:i.playTrackKpi)||((d=s.GlobalVariableManager.getInstance(this.identifiedId))===null||d===void 0?void 0:d.getPlayTrackKpi());var y=t===l.MediaType.TRACK_TYPE_AUDIO;var g={accessAddr:p===null||p===void 0?void 0:p.accessAddr,SFUAddr:h===null||h===void 0?void 0:h.ipAddress,streamType:y?0:1,ssrc:y?(h===null||h===void 0?void 0:h.aSsrc)||0:(h===null||h===void 0?void 0:h.vSsrc)||0,result:n,startTime:m.icePairStart,endTime:r["default"].getCurrentLocalTimestamp(),playQoS:JSON.stringify((v===null||v===void 0?void 0:v.keyInfoMsg)||[]),mediaCostTime:(m.iceComplete||r["default"].getCurrentLocalTimestamp())-m.icePairStart,totalTime:(m[y?"audioPlaySucc":"videoPlaySucc"]||r["default"].getCurrentLocalTimestamp())-m.startPlayTime};g=this.generateCommonReportInfo(g,o.StatEvents.EVENT_PULL_MEDIA_STREAM,"event^pullstreamResult^SDK^ACS");u["default"].addRecord(g);u["default"].immediateReportRecords()}},{key:"reportApiCallInfo",value:function e(t,n,i,a,s){if(!this.isStatiscEnable()){return}var c="API^web#".concat(t,"^APP^SDK");for(var l=arguments.length,f=new Array(l>5?l-5:0),d=5;d<l;d++){f[d-5]=arguments[d]}var h={apiCallId:r["default"].generateUuid(0),apiName:c,params:JSON.stringify(f),startTime:n,endTime:i};if(a){h.exception="".concat(a.code," - ").concat(a.message)}else{h.ret=s?JSON.stringify(s):""}h=this.generateCommonReportInfo(h,o.ApiEvents.API_CALL,c);if(/checkSystemRequirements/.test(t)){u["default"].addRecord(h);u["default"].immediateReportRecords()}else{u["default"].addRecord(h)}}},{key:"reportCallbackInfo",value:function e(t,n,i,a,s,c){if(!this.isStatiscEnable()){return}var l=c((s===null||s===void 0?void 0:s.stream)||s);var f={callbackId:r["default"].generateUuid(0),callbackName:"CALLBACK^web#".concat(n,"$#").concat(t,"#^SDK^APP"),callbackType:t,params:l,startTime:i,endTime:a};f=this.generateCommonReportInfo(f,o.ApiEvents.CALLBACK_API,"CALLBACK^web#".concat(n,"$#").concat(t,"#^SDK^APP"));u["default"].addRecord(f)}},{key:"reportVideoQos",value:function e(t){var r,n;if(!this.isStatiscEnable()||!t){return}var i=(r=s.GlobalVariableManager.getInstance(this.identifiedId))===null||r===void 0?void 0:r.getSfuInfo();var a=(n=s.GlobalVariableManager.getInstance(this.identifiedId))===null||n===void 0?void 0:n.getStreamParams();var c={ssrc:(i===null||i===void 0?void 0:i.vSsrc)||0,accessAddr:(a===null||a===void 0?void 0:a.accessAddr)||"",SFUAddr:(i===null||i===void 0?void 0:i.ipAddress)||"",codec:"h264",picW:t.width,picH:t.height,bitrate:t.bitRate,frameRate:t.frameRate,lostPktCnt:t.lostPktCnt,finalLostPktCnt:t.lostPktCnt,maxContLostPkts:t.lostPktCnt,rtt:t.rtt,jitter:t.jitter,bytes:t.totalByteReceived,packets:t.totalPacketsReceived,JBDepth:0,playTotalTime:t.totalStatisticTime,decFrameCnt:t.totalDecodeFrames,freeze200Cnt:t.total200FreezeCnt,freeze200Duration:t.total200FreezeTime,freeze600Cnt:t.total600VFreezeCnt,freeze600Duration:t.total600VFreezeTime,iFrameCnt:t.keyFrames,pFrameCnt:t.totalDecodeFrames,bFrameCnt:0,downloadDelay:t.downloadDelay,delayInfo:t.delayInfo,framesReceived:t.framesReceived,framesDropped:t.framesDropped,framesDecoded:t.framesDecoded,nackCnt:t.nackCnt,pliCnt:t.pliCnt,firCnt:t.firCnt};c=this.generateCommonReportInfo(c,o.QosEvents.EVENT_VIDEO_QOS,"qos^video_downstreams_qos^SDK^APP");u["default"].addRecord(c)}},{key:"reportAudioQos",value:function e(t){var r,n;if(!this.isStatiscEnable()||!t){return}var i=(r=s.GlobalVariableManager.getInstance(this.identifiedId))===null||r===void 0?void 0:r.getSfuInfo();var a=(n=s.GlobalVariableManager.getInstance(this.identifiedId))===null||n===void 0?void 0:n.getStreamParams();var c={ssrc:i===null||i===void 0?void 0:i.aSsrc,accessAddr:(a===null||a===void 0?void 0:a.accessAddr)||"",SFUAddr:(i===null||i===void 0?void 0:i.ipAddress)||"",codec:"opus",bitrate:t.bitRate,lostPktCnt:t.lostPktCnt,finalLostPktCnt:t.lostPktCnt,maxContLostPkts:t.lostPktCnt,rtt:t.rtt,jitter:t.jitter,bytes:t.totalByteReceived,packets:t.totalPacketsReceived,JBDepth:0,playTotalTime:t.totalStatisticTime,freeze200Cnt:t.total200FreezeCnt,freeze200Duration:t.total200FreezeTime,nackCnt:t.nackCnt};c=this.generateCommonReportInfo(c,o.QosEvents.EVENT_AUDIO_QOS,"qos^audio_downstreams_qos^SDK^APP");u["default"].addRecord(c)}},{key:"startMediaStatistic",value:function e(){var t=this;if(this.mediaStatisticTimer){return}this.mediaStatisticTimer=setTimeout((function(){try{t.mediaStatisticHandler()}catch(e){i.LoggerFactory.error(t.module_,"Media Statistic occur error: ".concat(e))}finally{clearTimeout(t.mediaStatisticTimer);delete t.mediaStatisticTimer;t.startMediaStatistic()}}),I*1e3)}},{key:"cancelMediaStatistic",value:function e(){this.mediaStatisticHandler();clearTimeout(this.mediaStatisticTimer);delete this.mediaStatisticTimer}},{key:"mediaStatisticHandler",value:function e(){var t;var r=(t=s.GlobalVariableManager.getInstance(this.identifiedId))===null||t===void 0?void 0:t.getSfuInfo();if(!r){return}if(r.aSsrc){var n=a.MediaStats.getMediaStatistic(r.connectionId||"",r.aSsrc,l.MediaType.TRACK_TYPE_AUDIO);if(n){var i;this.reportAudioQos(n);(i=s.GlobalVariableManager.getInstance(this.identifiedId))===null||i===void 0||i.addAudioStatisticCache(n)}}if(r.vSsrc){var o=a.MediaStats.getMediaStatistic(r.connectionId||"",r.vSsrc,l.MediaType.TRACK_TYPE_VIDEO);if(o){var u;this.reportVideoQos(o);(u=s.GlobalVariableManager.getInstance(this.identifiedId))===null||u===void 0||u.addVideoStatisticCache(o)}}}},{key:"generateCommonReportInfo",value:function e(t,n,i){var o,u,l;var f=(o=s.GlobalVariableManager.getInstance(this.identifiedId))===null||o===void 0?void 0:o.getStreamParams();var d=(u=s.GlobalVariableManager.getInstance(this.identifiedId))===null||u===void 0?void 0:u.getPullMediaParams();var h=(l=s.GlobalVariableManager.getInstance(this.identifiedId))===null||l===void 0?void 0:l.getSfuInfo();if(f){this.commInfo=v(v({},this.commInfo),{session:(f===null||f===void 0?void 0:f.sessionId)||"",domain:(f===null||f===void 0?void 0:f.streamDomain)||"",appName:(f===null||f===void 0?void 0:f.appName)||"",streamName:(f===null||f===void 0?void 0:f.streamName)||"",svrSid:(d===null||d===void 0?void 0:d.svrSid)||"",clientAddr:(d===null||d===void 0?void 0:d.clientAddr)||""})}return v(v(v({},t),this.commInfo),{ctime:r["default"].getCurrentSyncTimestamp(),event:n,eventName:i,netType:c["default"].getNetworkType()||a.MediaStats.getConnectionNetType((h===null||h===void 0?void 0:h.connectionId)||"")})}},{key:"isStatiscEnable",value:function e(){return n.parametersUtil.getParameter(n.parameterValidKeys.OPS_STATISC_ENABLE)!==false}}])}();w([(0,f.printfDecorator)(T)],R.prototype,"startMediaStatistic",null)}))},1236:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974),r(4341),r(3444),r(3652),r(5268),r(6799),r(8441),r(260),r(4772),r(6334)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HRTCTrack=void 0;n=f(n);a=f(a);function f(e){return e&&e.__esModule?e:{default:e}}function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(L([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=g.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==C(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(C(t)+" is not iterable")}return b.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(R.prototype),c(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new R(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),c(T,u,"Generator"),c(T,a,(function(){return this})),c(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=b(e,"string");return"symbol"==C(t)?t:t+""}function b(e,t){if("object"!=C(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _(e,t,r){return t=T(t),S(e,w()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}function S(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function t(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function C(e){"@babel/helpers - typeof";return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var k=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":C(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var A=new i.Log({module:"HRTCTrack"});var O="HRTCTrack";var P=e.HRTCTrack=function(e){function i(e){var t;v(this,i);t=_(this,i,[e]);t.streamType_=e.streamType;t.isRemote_=e.isRemote;t.resolutionId_=e.resolutionId;if(e.track){t.setLocalProfileByTrack(e.track)}else{t.setTrackProfile(e.trackProfile)}if(t.trackType_===o.MediaType.TRACK_TYPE_AUDIO){t.statusChangeReporter_=function(e){t.event_.emit(r.RTCStreamEvent.PLAYER_STATE_CHANGED,{type:o.MediaType.TRACK_TYPE_AUDIO,id:t.getResolutionId(),state:e.state,reason:e.reason})}}else{t.statusChangeReporter_=function(e){t.event_.emit(r.RTCStreamEvent.PLAYER_STATE_CHANGED,{type:o.MediaType.TRACK_TYPE_VIDEO,id:t.getResolutionId(),state:e.state,reason:e.reason})}}t.statusTraceReporter_=function(e){t.event_.emit(r.RTCStreamEvent.PLAYER_STATE_TRACE,e)};return t}I(i,e);return y(i,[{key:"initAudioCapture",value:function(){var e=p(d().mark((function e(t){var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=a["default"].initAudioConstraint(t,this.profile_);n.next=3;return this.getUserMedia(r,o.MediaType.TRACK_TYPE_AUDIO,o.ContentType.main);case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"initVideoCapture",value:function(){var e=p(d().mark((function e(t,r){var n;return d().wrap((function e(s){while(1)switch(s.prev=s.next){case 0:A.info(O,"initVideoCapture, try getOptimalVideoConstraint");s.next=3;return this.getUserMedia(a["default"].getOptimalVideoConstraint(t,this.profile_),o.MediaType.TRACK_TYPE_VIDEO,r);case 3:n=s.sent;if(!i.isTrackAvailable(n.track)){s.next=6;break}return s.abrupt("return",n);case 6:A.info(O,"initVideoCapture, try getSuboptimalVideoConstraint");s.next=9;return this.getUserMedia(a["default"].getSuboptimalVideoConstraint(t,this.profile_),o.MediaType.TRACK_TYPE_VIDEO,r);case 9:n=s.sent;if(!i.isTrackAvailable(n.track)){s.next=12;break}return s.abrupt("return",n);case 12:A.info(O,"initVideoCapture, try getNextVideoConstraint");s.next=15;return this.getUserMedia(a["default"].getNextVideoConstraint(t,this.profile_),o.MediaType.TRACK_TYPE_VIDEO,r);case 15:n=s.sent;if(!i.isTrackAvailable(n.track)){s.next=18;break}return s.abrupt("return",n);case 18:A.info(O,"initVideoCapture, try getWorstVideoConstraint");s.next=21;return this.getUserMedia(a["default"].getWorstVideoConstraint(t,this.profile_),o.MediaType.TRACK_TYPE_VIDEO,r);case 21:n=s.sent;if(!i.isTrackAvailable(n.track)){s.next=24;break}return s.abrupt("return",n);case 24:A.info(O,"initVideoCapture, try getRecoveryVideoConstraint");s.next=27;return this.getUserMedia(a["default"].getRecoveryVideoConstraint(),o.MediaType.TRACK_TYPE_VIDEO,r);case 27:return s.abrupt("return",s.sent);case 28:case"end":return s.stop()}}),e,this)})));function t(t,r){return e.apply(this,arguments)}return t}()},{key:"getUserMedia",value:function(){var e=p(d().mark((function e(t,r,n){var i,a,s,u;return d().wrap((function e(c){while(1)switch(c.prev=c.next){case 0:i={type:r};c.prev=1;(a=this.track_)===null||a===void 0||a.stop();c.next=5;return navigator.mediaDevices.getUserMedia(t);case 5:s=c.sent;u=r===o.MediaType.TRACK_TYPE_VIDEO?s.getVideoTracks()[0]:s.getAudioTracks()[0];c.next=9;return this.replaceTrack(u);case 9:i.track=this.track_;this.content=n;if(i.type===o.MediaType.TRACK_TYPE_VIDEO){this.setCameraCaptureReport()}return c.abrupt("return",i);case 15:c.prev=15;c.t0=c["catch"](1);i.error=this.handleCaptureError(c.t0,r);return c.abrupt("return",i);case 19:case"end":return c.stop()}}),e,this,[[1,15]])})));function t(t,r,n){return e.apply(this,arguments)}return t}()},{key:"setCameraCaptureReport",value:function e(){var t=this;if(this.cameraCaptureHandleTimer){clearInterval(this.cameraCaptureHandleTimer)}this.cameraCaptureHandleTimer=setInterval((function(){if(t.track_&&t.profile_){var e;var n=t.track_.getSettings();var i={width:t.profile_.width,height:t.profile_.height,frameRate:parseInt((e=t.profile_.frameRate)===null||e===void 0?void 0:e.toString())||0};t.event_.emit(r.RTCStreamInternalEvent.CameraCapture,n,i)}}),2e3)}},{key:"clearCameraCaptureReport",value:function e(){if(this.cameraCaptureHandleTimer){clearInterval(this.cameraCaptureHandleTimer)}}},{key:"handleCaptureError",value:function e(r,n){if(/.*Malformed constraints.*/gi.test(r.message)){A.warn(O,"init ".concat(n||"screen","capture getUserMedia failed, handleCaptureError: ").concat(r));return undefined}var i=r.name||"";var o;if(/.*NotAllowedError.*/gi.test(i)){o=new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED)}else if(/.*OverConstrainedError.*/gi.test(i)){o=new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED)}else if(/.*NotReadableError.*/gi.test(i)){o=new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE)}else if(/.*NotFoundError.*/gi.test(i)){o=new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND)}else{o=new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_RTC_SDK_ERROR,r.message)}A.error(O,"init ".concat(n||"screen","capture getUserMedia failed, handleCaptureError: ").concat(o));return o}},{key:"isClosed",value:function e(){return this.playState_===2}},{key:"isPlaying",value:function e(){return this.playState_===1}},{key:"getResolutionId",value:function e(){return this.resolutionId_}},{key:"setTrackId",value:function e(t){this.trackId_=t}},{key:"getTrackProfile",value:function e(){return this.profile_}},{key:"setTrackContentType",value:function e(t){this.content=t}},{key:"getTrackContentType",value:function e(){return this.content||o.ContentType.main}},{key:"updateTrackProfile",value:function e(t){if(this.trackType_!==o.MediaType.TRACK_TYPE_VIDEO||!t){return}this.profile_.width=t.width;this.profile_.height=t.height}},{key:"setTrackProfile",value:function e(t){A.info(O,"setTrackProfile begin,uniqueId_:".concat(this.resolutionId_,", ").concat(this.trackType_,",")+"".concat(this.streamType_,", profile:").concat(JSON.stringify(t)));if(this.trackType_===o.MediaType.TRACK_TYPE_AUDIO){this.profile_=n["default"].formatAudioProfile(t);return}if(this.trackType_===o.MediaType.TRACK_TYPE_VIDEO&&this.streamType_===o.StreamType.STREAM_TYPE_MAIN){this.profile_=n["default"].formatVideoProfile(t)}}},{key:"replaceTrack",value:function(){var e=p(d().mark((function e(t){var r;var n;return d().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(t){i.next=2;break}return i.abrupt("return");case 2:(r=this.player_)===null||r===void 0||r.replaceTrack(t);if(!this.isRemote_){(n=this.track_)===null||n===void 0||n.stop()}this.track_=t;this.track_.enabled=!this.trackMuted_;if(this.isRemote_){i.next=11;break}this.setLocalProfileByTrack(t);if(!(this.playState_===1)){i.next=11;break}i.next=11;return this.restart();case 11:case"end":return i.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setLocalProfileByTrack",value:function e(t){this.profile_=n["default"].getLocalProfileByTrack(t);A.info(O,"setLocalProfileByTrack, this.profile_:".concat(JSON.stringify(this.profile_)))}},{key:"removeTrack",value:function e(){this.player_&&this.player_.stop();if(!this.isRemote_){var t;(t=this.track_)===null||t===void 0||t.stop()}this.track_=undefined}},{key:"play",value:function(){var e=p(d().mark((function e(n,i,a){var c,l;return d().wrap((function e(f){while(1)switch(f.prev=f.next){case 0:c=this.getTrackType();A.info(O,"".concat(c," track begin play, elementId:").concat(i,", playerDiv.id:").concat(n.id,", options:").concat(JSON.stringify(a)," "));if(!(this.playState_===1)){f.next=5;break}A.info(O,"".concat(c," track is playing, return"));return f.abrupt("return",{trackType:c});case 5:if(this.track_){f.next=8;break}A.error(O,"".concat(c," track is empty"));return f.abrupt("return",{trackType:c,error:new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION,"".concat(c," track is empty"))});case 8:this.elementId_=i;f.t0=this.trackType_;f.next=f.t0===o.MediaType.TRACK_TYPE_AUDIO?12:f.t0===o.MediaType.TRACK_TYPE_VIDEO?14:17;break;case 12:if(!this.player_){A.info(O,"create AudioPlayer");this.player_=new s.RTCAudioPlayer({playerDiv:n,playerId:this.getTrackId()||this.getResolutionId(),track:this.track_,muted:a===null||a===void 0?void 0:a.muted,volume:this.audioVolume_})}return f.abrupt("break",18);case 14:this.objectFit_=(a===null||a===void 0?void 0:a.objectFit)||"fill";if(!this.player_){A.info(O,"create VideoPlayer");this.player_=new u.RTCVideoPlayer({parentDiv:n,playerId:this.getTrackId()||this.getResolutionId(),track:this.track_,objectFit:a===null||a===void 0?void 0:a.objectFit})}return f.abrupt("break",18);case 17:return f.abrupt("break",18);case 18:this.player_.off(r.RTCStreamEvent.PLAYER_STATE_CHANGED,this.statusChangeReporter_);this.player_.on(r.RTCStreamEvent.PLAYER_STATE_CHANGED,this.statusChangeReporter_);this.player_.off(r.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_);this.player_.on(r.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_);A.info(O,"play ".concat(c," track start"));this.playState_=1;f.prev=24;f.next=27;return this.player_.play();case 27:return f.abrupt("return",{trackType:c});case 30:f.prev=30;f.t1=f["catch"](24);l=f.t1 instanceof t.HwLLSError&&/.*timeout.*/i.test(f.t1.getMsg());A[l?"warn":"error"](O,"play ".concat(c," failed: ").concat(f.t1));this.playState_=0;return f.abrupt("return",{trackType:c,error:f.t1});case 36:case"end":return f.stop()}}),e,this,[[24,30]])})));function n(t,r,n){return e.apply(this,arguments)}return n}()},{key:"replay",value:function(){var e=p(d().mark((function e(){return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:if(this.player_){n.next=3;break}A.info(O,"".concat(this.getTrackType()," player is null"));return n.abrupt("return",new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION,"".concat(this.getTrackType()," player is null")));case 3:this.player_.off(r.RTCStreamEvent.PLAYER_STATE_CHANGED,this.statusChangeReporter_);this.player_.on(r.RTCStreamEvent.PLAYER_STATE_CHANGED,this.statusChangeReporter_);this.player_.off(r.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_);this.player_.on(r.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_);A.info(O,"rePlay ".concat(this.getTrackType()," track start"));this.playState_=1;n.prev=9;n.next=12;return this.player_.play();case 12:return n.abrupt("return",undefined);case 15:n.prev=15;n.t0=n["catch"](9);A.error(O,"replay".concat(this.getTrackType(),", replay failed: ").concat(n.t0));this.playState_=0;return n.abrupt("return",n.t0);case 20:case"end":return n.stop()}}),e,this,[[9,15]])})));function n(){return e.apply(this,arguments)}return n}()},{key:"stop",value:function e(){if(!this.player_){A.info(O,"".concat(this.getTrackType()," player is null"));return}this.player_.off(r.RTCStreamEvent.PLAYER_STATE_CHANGED,this.statusChangeReporter_);this.player_.stop();this.player_=null;this.playState_=0;this.trackMuted_=false;A.info(O,"".concat(this.getTrackType()," stop player success"))}},{key:"close",value:function e(){this.stop();if(!this.isRemote_){var t;(t=this.track_)===null||t===void 0||t.stop()}this.elementId_="";A.info(O,"".concat(this.getTrackType()," close success"));this.playState_=2;this.clearCameraCaptureReport()}},{key:"resume",value:function(){var e=p(d().mark((function e(){return d().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(this.player_){t.next=3;break}A.info(O,"".concat(this.getTrackType()," player is null"));return t.abrupt("return",undefined);case 3:t.prev=3;t.next=6;return this.player_.resume();case 6:return t.abrupt("return",undefined);case 9:t.prev=9;t.t0=t["catch"](3);A.error(O,"".concat(this.getTrackType()," resume failed: ").concat(t.t0));return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),e,this,[[3,9]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"restart",value:function(){var e=p(d().mark((function e(){return d().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(!this.player_){t.next=5;break}this.player_.stop();t.next=4;return this.player_.play();case 4:A.info(O,"restart success");case 5:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setAudioOutput",value:function e(t){if(this.trackType_!==o.MediaType.TRACK_TYPE_AUDIO||!this.player_){return}this.player_.setSinkId(t)}},{key:"unmuteTrack",value:function e(){if(this.track_){this.track_.enabled=true}this.trackMuted_=false}},{key:"setSinkId",value:function(){var e=p(d().mark((function e(t){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!(this.trackType_!==o.MediaType.TRACK_TYPE_AUDIO||!this.player_)){r.next=2;break}return r.abrupt("return");case 2:r.next=4;return this.player_.setSinkId(t);case 4:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getVideoFrame",value:function e(){if(this.trackType_!==o.MediaType.TRACK_TYPE_VIDEO||!this.player_){return""}return this.player_.getVideoFrame()}}],[{key:"isTrackAvailable",value:function e(t){if(!t){return false}return t.enabled&&!t.muted&&t.readyState==="live"}}])}(l.BaseTrack);k([(0,c.printfDecorator)(A)],P.prototype,"initAudioCapture",null);k([(0,c.printfDecorator)(A)],P.prototype,"getUserMedia",null)}))},1308:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getRTCCameras=m;e.getRTCDeviceGroups=p;e.getRTCDevices=d;e.getRTCMicrophones=g;e.getRTCSpeakers=_;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(){return h.apply(this,arguments)}function h(){h=f(c().mark((function e(){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES))}navigator.mediaDevices.enumerateDevices().then((function(n){if(!n||n.length===0){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NO_AVAILABLE_DEVICES))}else{e(n)}}))["catch"]((function(e){r(e)}))})));case 1:case"end":return r.stop()}}),e)})));return h.apply(this,arguments)}function p(){return v.apply(this,arguments)}function v(){v=f(c().mark((function e(){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES))}navigator.mediaDevices.enumerateDevices().then((function(i){if(!i||i.length===0){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NO_AVAILABLE_DEVICES))}else{var o={};i.forEach((function(e){if(e.deviceId!=="default"&&e.deviceId!=="communications"){o[e.kind]=[].concat(n(o[e.kind]||[]),[e])}}));e(o)}}))["catch"]((function(e){r(e)}))})));case 1:case"end":return r.stop()}}),e)})));return v.apply(this,arguments)}function m(){return y.apply(this,arguments)}function y(){y=f(c().mark((function e(){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){d().then((function(n){var i=n.filter((function(e){return e.kind==="videoinput"}));if(!i||i.length===0){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES))}else{e(i)}}))["catch"]((function(e){r(e)}))})));case 1:case"end":return r.stop()}}),e)})));return y.apply(this,arguments)}function g(){return b.apply(this,arguments)}function b(){b=f(c().mark((function e(){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){d().then((function(n){var i=n.filter((function(e){return e.kind==="audioinput"&&e.deviceId!=="communications"&&e.deviceId!=="default"}));if(!i||i.length===0){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES))}else{e(i)}}))["catch"]((function(e){r(e)}))})));case 1:case"end":return r.stop()}}),e)})));return b.apply(this,arguments)}function _(){return S.apply(this,arguments)}function S(){S=f(c().mark((function e(){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e,r){d().then((function(n){var i=n.filter((function(e){return e.kind==="audiooutput"}));if(!i||i.length===0){r(new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES))}else{e(i)}}))["catch"]((function(e){r(e)}))})));case 1:case"end":return r.stop()}}),e)})));return S.apply(this,arguments)}}))},1516:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7007),r(5575)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.EmitterAbleAndStatisticAbleBase=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=e.EmitterAbleAndStatisticAbleBase=function(){function e(){s(this,e);this.eventEmitter=new t.EventEmitter;this.onCallbackMap_=new Map}return c(e,[{key:"on",value:function e(t,r,n){var i;n?this.onWithTimeout(t,r):(i=this.eventEmitter)===null||i===void 0?void 0:i.on(t,r)}},{key:"off",value:function e(t,r,n){var i;n?this.offWithTimeout(t,r):(i=this.eventEmitter)===null||i===void 0?void 0:i.off(t,r)}},{key:"emit",value:function e(t,r){var n;(n=this.eventEmitter)===null||n===void 0||n.emit(t,r)}},{key:"onWithTimeout",value:function e(t,r){var n;var i=this.getOnCallback(t,r);(n=this.eventEmitter)===null||n===void 0||n.on(t,i)}},{key:"offWithTimeout",value:function e(t,r){var n;(n=this.eventEmitter)===null||n===void 0||n.off(t,this.getOffCallback(t,r)||r)}},{key:"getOnCallback",value:function e(t,n){var o=function(){var e=a(i().mark((function e(t){return i().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:i.t0=r.FunctionUtil;i.t1=Promise;i.next=4;return n;case 4:i.t2=i.sent;if(!i.t2){i.next=7;break}i.t2=n(t);case 7:i.t3=i.t2;i.t4=i.t1.resolve.call(i.t1,i.t3);i.next=11;return i.t0.callWithTimeout.call(i.t0,i.t4,1e4);case 11:case"end":return i.stop()}}),e)})));return function t(r){return e.apply(this,arguments)}}();var s=this.onCallbackMap_.get(t)||[];s.push({func:n,callbackFun:o});this.onCallbackMap_.set(t,s);return o}},{key:"getOffCallback",value:function e(t,r){var n=this.onCallbackMap_.get(t)||[];var i=n.findIndex((function(e){return e.func===r}));if(i>-1){var o;var a=(o=n[i])===null||o===void 0?void 0:o.callbackFun;n.splice(i,1);return a}return null}}])}()}))},1762:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PlayerStateTraceType=e.PlayerStateTraceEvent=void 0;var t;(function(e){e["PLAYER_PAUSE"]="playerPause";e["FOREGROUND"]="foreground";e["BACKGROUND"]="background";e["PALYER_CANPLAY"]="playerCanplay";e["PALYER_PLAYING"]="playerPlaying";e["PLAYER_ENDED"]="playerEnded";e["TRACK_ENDED"]="trackEnded";e["TRACK_MUTE"]="trackMute";e["TRACK_UNMUTE"]="trackUnmute"})(t||(e.PlayerStateTraceEvent=t={}));var r;(function(e){e["RTC_VIDEO_PLAYER"]="RTCVideoPlayer";e["RTC_AUDIO_PLAYER"]="RTCAudioPlayer";e["RTC_PLAYER"]="RTCPlayer"})(r||(e.PlayerStateTraceType=r={}))}))},1913:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(6360),r(7007),r(8024)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DataChannelMsgManager=void 0;r=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function o(e){"@babel/helpers - typeof";return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==o(t)?t:t+""}function l(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f="DataChannelMsgManager";var d=function(){function e(t){a(this,e);this.event_=new r["default"];if(t&&t instanceof RTCPeerConnection){this.dataChannel=t.createDataChannel("command",{ordered:true});this.dataChannel.binaryType="arraybuffer";this.dataChannel.onopen=this.onopen.bind(this);this.dataChannel.onerror=this.onerror.bind(this);this.dataChannel.onmessage=this.onmessage.bind(this);this.dataChannel.onclose=this.onclose.bind(this)}}return u(e,[{key:"on",value:function e(t,r){this.event_.on(t,r)}},{key:"off",value:function e(t,r){if(r){this.event_.removeListener(t,r)}else{this.event_.removeAllListeners(t)}}},{key:"sendMessage",value:function e(t){if(!this.dataChannel||this.dataChannel.readyState!=="open"){var r;n.LoggerFactory.error(f,"send message with dataChannel failed for dataChannel unavaliable: ".concat((r=this.dataChannel)===null||r===void 0?void 0:r.readyState,"."));return false}try{if(this.dataChannel.bufferedAmount>=1024*1e3*1e3){n.LoggerFactory.warn(f,"buffer over high threshold of 1M: ".concat(this.dataChannel.bufferedAmount,", send message may blocked and delay."))}this.dataChannel.send(t);return true}catch(e){n.LoggerFactory.error(f,"send message with dataChannel occur error: ".concat(e,"."));return false}}},{key:"close",value:function e(){if(this.dataChannel){this.dataChannel.onopen=null;this.dataChannel.onerror=null;this.dataChannel.onmessage=null;this.dataChannel.onclose=null;this.dataChannel.close();delete this.dataChannel}}},{key:"onopen",value:function e(){var t;n.LoggerFactory.info(f,"onopen, RTCDataChannel connection status: ".concat((t=this.dataChannel)===null||t===void 0?void 0:t.readyState));clearTimeout(this.dataChannelDisConnectTimer);this.event_.emit("CMD_CHANNEL_ESTABLISHED")}},{key:"onmessage",value:function e(t){if(!t.data){n.LoggerFactory.error(f,"onerror, RTCDataChannel message is null.");return}this.event_.emit("CMD_MSG_REVEIVED",t.data)}},{key:"onerror",value:function e(t){var r=this;n.LoggerFactory.error(f,"onerror, RTCDataChannel occur error: ".concat(t));if(!this.dataChannelDisConnectTimer){this.dataChannelDisConnectTimer=setTimeout((function(){clearTimeout(r.dataChannelDisConnectTimer);r.event_.emit("CMD_CHANNEL_DISCONNECT")}),3e4)}}},{key:"onclose",value:function e(t){var r=this;n.LoggerFactory.info(f,"onclose, RTCDataChannel closed: ".concat(t));if(!this.dataChannelDisConnectTimer){this.dataChannelDisConnectTimer=setTimeout((function(){clearTimeout(r.dataChannelDisConnectTimer);r.event_.emit("CMD_CHANNEL_DISCONNECT")}),3e4)}}}])}();var h=e.DataChannelMsgManager=function(){function e(t){a(this,e);this.event=t}return u(e,[{key:"initChannel",value:function e(r){var i=this;this.connection=r.connection;this.isCmd=r.isCmd||false;if(!this.dataChannel){this.dataChannel=new d(this.connection);this.cmdBuilder=new t.CmdMessageBuilder(r.uid||0,r.sendSsrc||0,r.receiveSsrc||0,r.msgFormat||0)}this.dataChannel.on("CMD_MSG_REVEIVED",(function(e){if(i.isCmd){var t=i.cmdBuilder.parseCmdMessage(e);i.event.emit("data-msg-received",t)}else{i.event.emit("data-msg-received",{msg:e})}}));this.dataChannel.on("CMD_CHANNEL_ESTABLISHED",(function(){n.LoggerFactory.info(f,"cmd dataChannel connection established.");i.event.emit("data-channel-established","DataChannel")}));this.dataChannel.on("CMD_CHANNEL_DISCONNECT",(function(){n.LoggerFactory.info(f,"cmd dataChannel connection disconnect.");i.event.emit("data-channel-disconnect","DataChannel")}))}},{key:"sendMessage",value:function e(r,n){var i;if(this.isCmd){var o;var a=this.cmdBuilder.buildCmdMessage({msg:n,userUid:r});return((o=this.dataChannel)===null||o===void 0?void 0:o.sendMessage(a))||false}var s=t.CmdMsgPacketUtils.msgBodyToArrayBuffer(n);return((i=this.dataChannel)===null||i===void 0?void 0:i.sendMessage(s))||false}},{key:"reset",value:function e(){if(this.dataChannel){this.dataChannel.off("CMD_MSG_REVEIVED");this.dataChannel.off("CMD_CHANNEL_ESTABLISHED");this.dataChannel.close();delete this.dataChannel}}}])}()}))},1960:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SysEventsBus=e.InternalSysEventsBus=void 0;t=r(t);function r(e){return e&&e.__esModule?e:{default:e}}function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 a,s=!0,u=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return s=t.done,t},e:function e(t){u=!0,a=t},f:function e(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=e.InternalSysEventsBus=function(){function e(){var r=this;s(this,e);this.eventHandlers={visibilitychange:function e(){var t="FOREGROUND";if(document.hidden){t="BACKGROUND"}var n=i(r.eventBus.values()),o;try{for(n.s();!(o=n.n()).done;){var a=o.value;a.emit(t)}}catch(e){n.e(e)}finally{n.f()}}};this.eventListeners={visibilitychange:function e(t){if(t==="ADD"){document.addEventListener("visibilitychange",r.eventHandlers.visibilitychange)}else{document.removeEventListener("visibilitychange",r.eventHandlers.visibilitychange)}}};this.eventBus=new Map;this.addListener("visibilitychange",t["default"].isMobileDevice.bind(t["default"]))}return c(e,[{key:"register",value:function e(r){var n=t["default"].generateRandomId(32);this.eventBus.set(n,r);return n}},{key:"unregister",value:function e(t){if(!t){return}this.eventBus["delete"](t)}},{key:"addListener",value:function e(t,r){if(r&&!r()){return}if(this.eventListeners[t]){this.eventListeners[t]("ADD")}}},{key:"removeListener",value:function e(t){if(this.eventListeners[t]){this.eventListeners[t]("REMOVE")}}}])}();var h=e.SysEventsBus=new d}))},2144:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PCMPlayer=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){"use strict";n=function e(){return t};var e,t={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(r,o){function a(){return new t((function(e,t){n(r,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,u,"next",e)}function u(e){i(a,n,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==r(t)?t:t+""}function h(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p={Int8:128,Int16:32768,Int32:2147483648,Float32:1};var v={Int8:Int8Array,Int16:Int16Array,Int32:Int32Array,Float32:Float32Array};var m=e.PCMPlayer=function(){function e(t){u(this,e);f(this,"option",{inputCodec:"Int16",channelNums:1,sampleRate:8e3,flushTime:1e3});f(this,"convertValue",void 0);f(this,"typedArray",void 0);f(this,"audioCtx",void 0);f(this,"audioMediaStreamDestination",void 0);f(this,"gainNode",void 0);f(this,"startTime",void 0);f(this,"muted",false);this.option=s({},t);this.checkCodec();this.convertValue=p[this.option.inputCodec];this.typedArray=v[this.option.inputCodec];this.initAudioContext();this.addAudioContextEvent();this.flush()}return l(e,[{key:"checkCodec",value:function e(){if(!["Int8","Int16","Int32","Float32"].includes(this.option.inputCodec)){throw new Error("wrong codec.please input one of these codecs:Int8,Int16,Int32,Float32")}return true}},{key:"initAudioContext",value:function e(){var t;this.audioCtx=new window.AudioContext;this.audioMediaStreamDestination=(t=this.audioCtx)===null||t===void 0?void 0:t.createMediaStreamDestination();this.gainNode=this.audioCtx.createGain();this.gainNode.gain.value=0;this.gainNode.connect(this.audioCtx.destination);this.startTime=this.audioCtx.currentTime;var r=this.audioCtx.createBufferSource();r.buffer=null;r.connect(this.audioMediaStreamDestination);r.connect(this.gainNode);r.start(0)}},{key:"addAudioContextEvent",value:function e(){var t=this;if(this.audioCtx&&typeof t.option.onstatechange==="function"){this.audioCtx.onstatechange=function(e){var r,n;t.audioCtx&&((r=(n=t.option).onstatechange)===null||r===void 0?void 0:r.call(n,this,e,t.audioCtx.state))};return true}return false}},{key:"getFormattedValue",value:function e(t){var r;if(t.constructor===ArrayBuffer){r=new this.typedArray(t)}else{r=new this.typedArray(t.buffer)}var n=new Float32Array(r.length);for(var i=0;i<r.length;i++){n[i]=r[i]/this.convertValue}return n}},{key:"feed",value:function r(n){var i="feed";if(!e.isTypedArray(n)){(0,t.getPLogger)().error(i,"请传入ArrayBuffer或者任意TypedArray");return false}var o=this.getFormattedValue(n);if(this.muted){return false}this.flush(o);return true}},{key:"getMediaStream",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream}},{key:"getAudioMediaTrack",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream.getAudioTracks()[0]}},{key:"setVolume",value:function e(t){if(!this.gainNode){return}this.gainNode.gain.value=t}},{key:"destroy",value:function e(){var t,r,n;(t=this.audioCtx)===null||t===void 0||t.close();(r=this.audioMediaStreamDestination)===null||r===void 0||r.disconnect();(n=this.gainNode)===null||n===void 0||n.disconnect();delete this.audioCtx;delete this.audioMediaStreamDestination;delete this.gainNode}},{key:"pause",value:function(){var e=o(n().mark((function e(){var t;return n().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.suspend();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"continue",value:function(){var e=o(n().mark((function e(){var t;return n().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.resume();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"flush",value:function e(r){var n="flush";if(!this.audioCtx||!this.gainNode||!this.audioMediaStreamDestination){(0,t.getPLogger)().debug(n,"未初始化或已销毁",!r,!this.audioCtx,!this.gainNode,!this.audioMediaStreamDestination);return false}if(!r||!(r!==null&&r!==void 0&&r.length)){return false}var i=r.length/this.option.channelNums;var o=this.audioCtx.createBuffer(this.option.channelNums,i,this.option.sampleRate);for(var a=0;a<this.option.channelNums;a++){var s=o.getChannelData(a);var u=a;var c=50;for(var l=0;l<i;l++){s[l]=r[u];if(l>=i-51){s[l]=s[l]*c--/50}if(l<50){s[l]=s[l]*l/50}u+=this.option.channelNums}}this.playAudioBuffer(o);return true}},{key:"playAudioBuffer",value:function e(r){var n=this;if(!this.audioCtx||!this.gainNode||!this.audioMediaStreamDestination){(0,t.getPLogger)().debug("play","未初始化或已销毁",!this.audioCtx,!this.gainNode,!this.audioMediaStreamDestination);return false}if(!this.startTime||this.startTime<this.audioCtx.currentTime){this.startTime=this.audioCtx.currentTime}var i=this;var o=this.audioCtx.createBufferSource();o.buffer=r;o.connect(this.audioMediaStreamDestination);o.connect(this.gainNode);o.onended=function(e){if(typeof n.option.onended==="function"){var t,r;(t=(r=i.option).onended)===null||t===void 0||t.call(r,n,e)}};o.start(this.startTime);this.startTime+=r.duration;return true}},{key:"playNow",value:function e(){var t;this.startTime=(t=this.audioCtx)===null||t===void 0?void 0:t.currentTime}},{key:"muteAudio",value:function e(){(0,t.getPLogger)().info("muteAudio");this.muted=true}},{key:"unmuteAudio",value:function e(){(0,t.getPLogger)().info("unmuteAudio");this.muted=false}}],[{key:"isTypedArray",value:function e(t){return t.constructor===ArrayBuffer||!!(t.length&&t.buffer&&t.buffer.constructor===ArrayBuffer)}}])}()}))},2216:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.configs=void 0;var t=e.configs={SDK_VERSION:"2.5.3",COMMIT_ID:"df77da8",NEGOTIATE_SDP_URL_PATH:"/webrtc/v1/pullstream",STOP_PLAY_URL_PATH:"/webrtc/v1/stopstream",OPS_REPORT_DOMAIN:"log-collection-new.hwcloudlive.com",SHARE_PULL_DOMAIN:["global-lll.huaweicloud.com","global-lll.huaweicloud.cn"],GSLB_DOMAIN:"hcdnl.pull302.global.gslb.livehwc3.cn",GSLB_REQUEST_TIMEOUT:4e3,DNS_REQUEST_TIMEOUT:3e3,PULLSTREAM_REQUEST_TIMEOUT:6e3,REQUEST_DEFAULT_TIMEOUT:5e3,OPS_AUTH_TOKEN:"Token 1dc3549b538515311e23d68684a67fb93341f3f5",OPS_REPORT_INTERVAL:5e3,STATISTIC_INTERVAL:100,PUBLIC_DNS_SERVER:["dns.alidns.com","doh.pub"]}}))},2265:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.setSessionStorageItem=e.setLocalStorageItem=void 0;var r=function e(r){return function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{key:"",value:""};if(!e){return false}var n=e.key,i=e.value,o=e.isForce;var a=r?window.localStorage:window.sessionStorage;if(!a){(0,t.getPLogger)().warn("setStorageItem no Storage",{isLocalStorage:r,key:n});return false}if(!n){(0,t.getPLogger)().warn("setStorageItem no key",{isLocalStorage:r,key:n});return false}if((0,t.formatType)(i)!==t.formatType.STRING){(0,t.getPLogger)().warn("setStorageItem value not string",{isLocalStorage:r,key:n});return false}try{(0,t.getPLogger)().info("setStorageItem",{isLocalStorage:r,key:n});a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}catch(e){(0,t.getPLogger)().error("setStorageItem",{isLocalStorage:r,key:n,isForce:o,e});if(!o){return false}a.clear();a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}}};var n=e.setLocalStorageItem=r(true);var i=e.setSessionStorageItem=r(false)}))},2363:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8024)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.parametersUtil=e.parameterValidKeys=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u=e.parameterValidKeys={OPS_STATISC_ENABLE:"OPS_STATISC_ENABLE",LOADING_CONFIG:"LOADING_CONFIG",ACCESS_DOMAIN:"ACCESS_DOMAIN",DNS_QUERY_ENABLE:"DNS_QUERY_ENABLE",GLSB_DOMAIN:"GLSB_DOMAIN"};var c="ParametersUtil";var l=function(){function e(){n(this,e);this.parameters=new Map}return o(e,[{key:"setParameter",value:function e(r,n){if(!r){t.LoggerFactory.error(c,"setParameter, parameterKey is null");return false}try{t.LoggerFactory.debug(c,"setParameter, parameterKey: ".concat(r,", parameterValue: ").concat(n));this.parameters.set(r.toLowerCase(),n);return true}catch(e){t.LoggerFactory.error(c,"setParameter occur error: ".concat(e));return false}}},{key:"getParameter",value:function e(r){try{if(!r||!this.parameters.has(r.toLowerCase())){return null}return this.parameters.get(r.toLowerCase())}catch(e){t.LoggerFactory.error(c,"getParameter occur error: ".concat(e));return null}}}])}();var f=e.parametersUtil=new l}))},2441:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354),r(5575),r(7007),r(1156)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.EmitterAble=void 0;t=o(t);function o(e){return e&&e.__esModule?e:{default:e}}function a(){"use strict";a=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function s(e){"@babel/helpers - typeof";return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=p(e,"string");return"symbol"==s(t)?t:t+""}function p(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v=e.EmitterAble=function(){function e(r,o,a){l(this,e);this.callbackMap_=new Map;this.onCallbackMap_=new Map;this.identifiedId_=t["default"].generateStandardUuid();this.eventEmitter_=a||new n.EventEmitter;this.stats_=o||new i.HWLLSStat(this.identifiedId_);this.moudle_=r||""}return d(e,[{key:"on",value:function e(t,r,n){n?this.onWithTimeout(t,r):this.eventEmitter_.on(t,r)}},{key:"once",value:function e(t,r){this.eventEmitter_.once(t,r)}},{key:"off",value:function e(t,r,n){if(!r){this.eventEmitter_.removeAllListeners(t)}else{n?this.offWithTimeout(t,r):this.eventEmitter_.removeListener(t,r)}}},{key:"offAllEvents",value:function e(){this.eventEmitter_.removeAllListeners();this.callbackMap_.clear();this.onCallbackMap_.clear()}},{key:"emit",value:function e(t,r){this.eventEmitter_.emit(t,r)}},{key:"onWithTimeout",value:function e(t,r){var n=this.getOnCallback(t,r);this.eventEmitter_.on(t,n)}},{key:"offWithTimeout",value:function e(t,r){var n=this.getOffCallback(t,r);if(n){var i;(i=this.eventEmitter_)===null||i===void 0||i.removeListener(t,n)}}},{key:"getOnCallback",value:function e(n,i){var o=this;var u="".concat(n,"_").concat(i===null||i===void 0?void 0:i.name);var l=function(){var e=c(a().mark((function e(i){var c,l,f,d;return a().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:if(!o.callbackMap_.get(u)){a.next=15;break}c=t["default"].getCurrentLocalTimestamp();l=0;a.prev=3;a.next=6;return r.FunctionUtil.callWithTimeout((f=o.callbackMap_.get(u))===null||f===void 0?void 0:f(i),1e4);case 6:l=t["default"].getCurrentLocalTimestamp();a.next=12;break;case 9:a.prev=9;a.t0=a["catch"](3);l=c+5e3;case 12:a.prev=12;(d=o.stats_)===null||d===void 0||d.reportCallbackInfo(n.toString(),o.moudle_,c,l,i,(function(e){if(["object","function"].includes(s(e))&&e.getInfo){return JSON.stringify(e.getInfo())}return JSON.stringify(e||{})}));return a.finish(12);case 15:case"end":return a.stop()}}),e,null,[[3,9,12,15]])})));return function t(r){return e.apply(this,arguments)}}();this.callbackMap_.set(u,i);this.onCallbackMap_.set(u,l);return l}},{key:"getOffCallback",value:function e(t,r){var n="".concat(t,"_").concat(r===null||r===void 0?void 0:r.name);var i=this.onCallbackMap_.get(n);if(this.onCallbackMap_.get(n)){this.onCallbackMap_["delete"](n)}if(this.callbackMap_.get(n)){this.callbackMap_["delete"](n)}return i}},{key:"eventEmitter",get:function e(){return this.eventEmitter_}},{key:"identifiedId",get:function e(){return this.identifiedId_}},{key:"stats",get:function e(){return this.stats_}}])}()}))},2583:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WorkerManager=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=e.WorkerManager=function(){function e(r){var n=this;o(this,e);u(this,"worker",void 0);u(this,"messageMap",new Map);u(this,"opts",{url:"",enablePromiseMethod:true});u(this,"customOnMessage",void 0);u(this,"customOnError",void 0);u(this,"createWorker",(function(){(0,t.getPLogger)().debug("createWorker");if(n.worker){return}n.worker=new Worker(n.opts.url);n.worker.onmessage=n.onMessage.bind(n);n.worker.onerror=n.dealError.bind(n);n.worker.onmessageerror=n.dealError.bind(n)}));(0,t.getPLogger)().debug("WorkerManager.constructor",r);if(r.url){this.opts.url=r.url}if(r.enablePromiseMethod){this.opts.enablePromiseMethod=r.enablePromiseMethod}this.customOnMessage=r.onMessage;this.customOnError=r.onError}return s(e,[{key:"promisePostMessage",value:function e(r){var n=this;if(!this.worker){this.createWorker()}return new Promise((function(e){var o;r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(o=n.worker)===null||o===void 0||o.postMessage(r);if(!n.opts.enablePromiseMethod){e({result:true});return}n.messageMap.set(r.sno,e)}))}},{key:"postMessage",value:function e(r){var n;if(!this.worker){this.createWorker()}r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(n=this.worker)===null||n===void 0||n.postMessage(r)}},{key:"setOnMessage",value:function e(r){(0,t.getPLogger)().debug("WorkerManager.setOnMessage");this.customOnMessage=r}},{key:"onMessage",value:function e(t){var r,n;if((r=t.data)!==null&&r!==void 0&&r.sno&&this.opts.enablePromiseMethod){var i=this.messageMap.get(t.data.sno);if(i){i===null||i===void 0||i(t.data);this.messageMap["delete"](t.data.sno);return}}(n=this.customOnMessage)===null||n===void 0||n.call(this,t.data)}},{key:"dealError",value:function e(r){var n;(0,t.getPLogger)().error("WorkerManager.dealError",r);delete this.worker;(n=this.customOnError)===null||n===void 0||n.call(this,r)}}])}()}))},2615:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2583),r(258),r(4706)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WebWorkerUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==i(t)?t:t+""}function h(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=function(e){e["CLEAR"]="clear";e["SET"]="set";return e}(p||{});var v=e.WebWorkerUtil=function(){function e(){u(this,e)}return l(e,null,[{key:"getManagerInstance",value:function r(){if(!e.timeoutWorker){e.timeoutWorker=new t.WorkerManager({url:(0,n.getTimeWorkerUrl)(),enablePromiseMethod:true,onMessage:e.dealTimeoutMessage})}return e.timeoutWorker}},{key:"setWorkerTimeout",value:function t(n,i){var o=(0,r.getClientId)();(0,r.getPLogger)().debug("setWorkerTimeout",o);e.timeoutCallbackMap.set(o,n);e.getManagerInstance().postMessage({timerId:o,method:p.SET,delay:i});return o}},{key:"workerSleep",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:i=(0,r.getClientId)();return o.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:i,method:p.SET,delay:n}));case 2:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"clearWorkerTimeout",value:function(){var t=s(o().mark((function t(r){return o().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:e.timeoutCallbackMap["delete"](r);return n.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:r,method:p.CLEAR}));case 2:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"dealTimeoutMessage",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:(0,r.getPLogger)().debug("dealTimeoutMessage",n);if(n.timerId){o.next=3;break}return o.abrupt("return");case 3:i=e.timeoutCallbackMap.get(n.timerId);i===null||i===void 0||i();e.timeoutCallbackMap["delete"](n.timerId);case 6:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()}])}();f(v,"timeoutWorker",void 0);f(v,"timeoutCallbackMap",new Map)}))},2771:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ReactUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==r(t)?t:t+""}function h(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=e.ReactUtil=function(){function e(){c(this,e)}return f(e,null,[{key:"showDifferentProperty",value:function e(t,r,n){var i=[];if(false){}return i}},{key:"reactStopPropagation",value:function e(t){var r,n,i,o,a,s;t===null||t===void 0||(r=(n=t).stopPropagation)===null||r===void 0||r.call(n);t===null||t===void 0||(i=t.nativeEvent)===null||i===void 0||(o=i.stopPropagation)===null||o===void 0||o.call(i);t===null||t===void 0||(a=t.nativeEvent)===null||a===void 0||(s=a.stopImmediatePropagation)===null||s===void 0||s.call(a)}}])}()}))},2867:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(7057),r(5162),r(9969),r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioWorkletNodeRecord=void 0;t=c(t);var o,s,u;function c(e){return e&&e.__esModule?e:{default:e}}function l(){"use strict";l=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,c,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){f(o,n,i,a,s,"next",e)}function s(e){f(o,n,i,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==a(t)?t:t+""}function g(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var _=e.AudioWorkletNodeRecord=(o=(0,n.printfDecorator)((0,i.getPLogger)()),s=(0,n.printfDecorator)((0,i.getPLogger)()),u=function(){function e(n){h(this,e);m(this,"audioContext",void 0);this.audioContext=new t["default"]({url:(0,r.getLocalRecorderUrl)(),processorName:"LocalRecorderProcessor",processorOptions:{bufferSize:n.bufferSize},audioCallback:n.audioCallback})}return v(e,[{key:"startRecord",value:function(){var e=d(l().mark((function e(t){return l().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.audioContext.start(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=d(l().mark((function e(){return l().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.audioContext.stop());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}}])}(),b(u.prototype,"startRecord",[o],Object.getOwnPropertyDescriptor(u.prototype,"startRecord"),u.prototype),b(u.prototype,"stopRecord",[s],Object.getOwnPropertyDescriptor(u.prototype,"stopRecord"),u.prototype),u)}))},2897:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AutoQueryData=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==r(t)?t:t+""}function b(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=e.AutoQueryData=function(){function e(t){p(this,e);y(this,"_opts",void 0);y(this,"_data",void 0);y(this,"_timer",void 0);y(this,"_count",0);y(this,"_firstProm",void 0);this._opts=this._getOpts(t);this._dealGetDataFunc("constructor")}return m(e,[{key:"_getOpts",value:function e(r){if((0,t.formatType)(r)!==t.formatType.OBJECT){throw new Error("opts must a object")}(0,t.getPLogger)().debug("_getOpts",(0,t.formatType)(r.getDataFunc),(0,t.formatType)(r.args));if((0,t.formatType)(r.getDataFunc)!==t.formatType.FUNCTION&&(0,t.formatType)(r.getDataFunc)!==t.formatType.ASYNCFUNCTION){throw new Error("opts.getDataFunc must a function")}if((0,t.formatType)(r.args)!==t.formatType.ARRAY&&(0,t.formatType)(r.args)!==t.formatType.UNDEFINED){throw new Error("opts.args must a array or undefined")}var n=h({},r);if((0,t.formatType)(n.delay)!==t.formatType.NUMBER){n.delay=3e4}return n}},{key:"getSyncData",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";r+=",getSyncData";if(!this._timer){this._dealGetDataFunc(r)}(0,t.getPLogger)().debug(r,this._data);return this._data}},{key:"getData",value:function(){var e=f(c().mark((function e(){var r,n=arguments;return c().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:r=n.length>0&&n[0]!==undefined?n[0]:"";r+=",getData";if(this._timer){i.next=5;break}i.next=5;return this._dealGetDataFunc(r);case 5:if(!this._firstProm){i.next=8;break}i.next=8;return this._firstProm;case 8:(0,t.getPLogger)().debug(r,this._data);return i.abrupt("return",this._data);case 10:case"end":return i.stop()}}),e,this)})));function r(){return e.apply(this,arguments)}return r}()},{key:"stop",value:function e(){(0,t.getPLogger)().debug("stop",this._data);if(this._timer){clearInterval(this._timer)}delete this._timer;delete this._data;delete this._firstProm;this._count=0}},{key:"_dealGetDataFunc",value:function(){var e=f(c().mark((function e(r){var i=this,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:r+=",_dealGetDataFunc";this._timer=setInterval(f(c().mark((function e(){var o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.next=2;return(o=i._opts).getDataFunc.apply(o,n(i._opts.args||[]));case 2:i._data=a.sent;i._count++;(0,t.getPLogger)().debug(r,i._count,i._data);case 5:case"end":return a.stop()}}),e)}))),this._opts.delay);this._count++;this._firstProm=(o=this._opts).getDataFunc.apply(o,n(this._opts.args||[]));a.next=6;return this._firstProm;case 6:this._data=a.sent;(0,t.getPLogger)().debug(r,this._count,this._data);case 8:case"end":return a.stop()}}),e,this)})));function r(t){return e.apply(this,arguments)}return r}()}])}()}))},3388:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RTCClientEvent=void 0;var t=e.RTCClientEvent={Error:"Error",StreamAdded:"stream-added",StreamRemoved:"stream-removed",StreamUpdated:"stream-updated",StreamSubscribed:"stream-subscribed",ClientBanned:"client-banned",NetworkQuality:"network-quality",ConnectionStateChanged:"connection-state-changed",PeerJoin:"peer-join",PeerLeave:"peer-leave",MuteAudio:"mute-audio",UnmuteAudio:"unmute-audio",MuteVideo:"mute-video",UnmuteVideo:"unmute-video",LogUploaded:"log-upload-result",SignatureExpired:"signature-expired",CameraChanged:"camera-changed",RecordingDeviceChanged:"recording-device-changed",PlaybackDeviceChanged:"playback-device-changed",StreamInterrupted:"stream-interrupted",StreamRecovered:"stream-recovered",VolumeIndicator:"volume-indicator",UserNameChanged:"remote-user-name-changed",BatchSubscribeFailed:"batch-subscribe-failed",LiveStreamingUpdated:"live-streaming-updated",RtcStats:"rtc-stats",CmdMsgReceived:"cmd-msg-received",CmdChannelEstablished:"cmd-channel-established",CmdChannelDisconnect:"cmd-channel-disconnect",MediaConnectionStateChanged:"media-connection-state-changed",TransportProtocolChanged:"transport-protocol-changed",TransportStats:"transport-stats",RoomStreamStatus:"room-stream-status"}}))},3399:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(3830),r(258),r(4521),r(9969),r(2615)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Timer=void 0;var s,u,c,l,f,d,h,p,v;function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){var t=S(e,"string");return"symbol"==a(t)?t:t+""}function S(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var w=(0,r.getPLogger)();var T=function e(r,n){var i;return(r===null||r===void 0||(i=r.constructor)===null||i===void 0?void 0:i.name)===t.TimerTask.name&&n>0};var I=e.Timer=(s=(0,i.printfDecorator)(w),u=(0,i.printfDecorator)(w),c=(0,i.printfDecorator)(w),l=(0,i.customDecorator)({preMethodDeal:T}),f=(0,i.printfDecorator)(w),d=(0,i.customDecorator)({preMethodDeal:T}),h=(0,i.printfDecorator)(w),p=(v=function(){function e(t){var r=this;m(this,e);b(this,"_timerHandlers",[]);b(this,"_cancelTaskIdList",[]);b(this,"userWebWorker",false);b(this,"setTimeout",(function(e,t){if(r.userWebWorker){return o.WebWorkerUtil.setWorkerTimeout(e,t)}return setTimeout(e,t)}));b(this,"clearTimeout",(function(e){if(r.userWebWorker){return o.WebWorkerUtil.clearWorkerTimeout(e)}return clearTimeout(e)}));if(t!==null&&t!==void 0&&t.userWebWorker){this.userWebWorker=true}this.schedule=this.schedule.bind(this);this.scheduleFixedInterval=this.scheduleFixedInterval.bind(this);this.cancel=this.cancel.bind(this);w.debug("Timer.constructor",t)}return g(e,[{key:"cancel",value:function e(){var t=this;w.debug("Timer.cancel");this._timerHandlers.forEach((function(e){return t._cancelTask(e)}));this._timerHandlers=[];return this}},{key:"purge",value:function e(){w.debug("Timer.purge");var t;var r;for(var n=this._timerHandlers.length-1;n>-1;n--){t=this._timerHandlers[n].task;if(t.isCancel()){r=this._timerHandlers.splice(n,1);w.debug("Timer.purge",t,r[0]);this._cancelTask(r[0])}}return this}},{key:"schedule",value:function e(t,r){var i=this;w.debug("Timer.schedule",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){return t.run()["catch"]((function(e){return w.error("schedule",e)}))["finally"]((function(){var e=Date.now();w.debug("Timer.schedule run",e-o);if(i._cancelTaskIdList.includes(t.id)){w.warn("schedule, this task has already canceled",t.id)}else{i.schedule(t,r)}}))}),r)});return this}},{key:"scheduleFixedInterval",value:function e(t,r){var i=this;w.debug("Timer.scheduleFixedInterval",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){var e=Date.now();w.debug("Timer.scheduleFixedInterval run",e-o);t.run()["catch"]((function(e){return w.error("scheduleFixedInterval",e)}));i.scheduleFixedInterval(t,r)}),r)});return this}},{key:"_cancelTask",value:function e(t){w.debug("Timer._cancelTask");this.clearTimeout(t.handle);if(this._cancelTaskIdList.includes(t.id)){w.warn("_cancelTask, this task has already canceled",t.id)}else{this._cancelTaskIdList.push(t.id)}return this}}])}(),b(v,"TimerTask",t.TimerTask),v),E(p.prototype,"cancel",[s],Object.getOwnPropertyDescriptor(p.prototype,"cancel"),p.prototype),E(p.prototype,"purge",[u],Object.getOwnPropertyDescriptor(p.prototype,"purge"),p.prototype),E(p.prototype,"schedule",[c,l],Object.getOwnPropertyDescriptor(p.prototype,"schedule"),p.prototype),E(p.prototype,"scheduleFixedInterval",[f,d],Object.getOwnPropertyDescriptor(p.prototype,"scheduleFixedInterval"),p.prototype),E(p.prototype,"_cancelTask",[h],Object.getOwnPropertyDescriptor(p.prototype,"_cancelTask"),p.prototype),p)}))},3442:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UserTrack=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=e.UserTrack=function(){function e(){r(this,e)}return i(e,null,[{key:"setUserTrackCallback",value:function t(r){if(typeof r!=="function"){return}e.addUserTrack=r}}])}();s.addUserTrack=function(){}}))},3444:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4341),r(5268)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){var r=t.RTCVideoProfileList.find((function(r){return r.startsWith("".concat(e.height))&&t.RTCVideoProfileMap[r].width===e.width||parseInt(r)>(e.height||0)}));if(r){if(!e.maxBitrate||!e.minBitrate){e.maxBitrate=t.RTCVideoProfileMap[r].maxBitrate;e.minBitrate=t.RTCVideoProfileMap[r].minBitrate}if(!e.frameRate){e.frameRate=t.RTCVideoProfileMap[r].frameRate}}}var h=e["default"]=function(){function e(){s(this,e)}return c(e,null,[{key:"getLocalProfileByTrack",value:function e(t){var n={};var i=t.getSettings();if(t.kind===r.MediaType.TRACK_TYPE_AUDIO){n.sampleRate=i.sampleRate;n.channelCount=1}else{var o,a,s,u;var c=t.getConstraints();n.width=(typeof c.width==="number"?c.width:(o=c.width)===null||o===void 0?void 0:o.ideal)||i.width;n.height=(typeof c.height==="number"?c.height:(a=c.height)===null||a===void 0?void 0:a.ideal)||i.height;n.frameRate=(typeof c.frameRate==="number"?c.frameRate:(s=c.frameRate)===null||s===void 0?void 0:s.ideal)||parseInt(((u=i.frameRate)===null||u===void 0?void 0:u.toString())||"0");n.minBitrate=null;n.maxBitrate=null;d(n)}return n}},{key:"formatVideoProfile",value:function e(r){var n={height:0,width:0};if(!r){var i=t.RTCVideoProfileMap["360p_2"];n=o({},i);return n}if(typeof r==="string"){if(t.RTCVideoProfileList.includes(r)){var a=t.RTCVideoProfileMap[r];n=o({},a)}}else{n.height=r.height;n.width=r.width;n.frameRate=r.frameRate;n.maxBitrate=r.maxBitrate;n.minBitrate=r.minBitrate;if(n.width===undefined||n.height===undefined){n.width=t.RTCVideoProfileMap["360p_2"].width;n.height=t.RTCVideoProfileMap["360p_2"].height}d(n)}return n}},{key:"formatAudioProfile",value:function e(r){var n={};if(!r){var i=t.RTCAudioProfileMap.standard;n=o({},i);return n}if(typeof r==="string"){if(t.RTCAudioProfileList.includes(r)){var a=t.RTCAudioProfileMap[r];n=o({},a)}}else{n.bitrate=r.bitrate;n.channelCount=r.channelCount;n.sampleRate=r.sampleRate;if(!n.sampleRate){n.sampleRate=16e3}if(!n.channelCount){n.channelCount=1}if(!n.bitrate){n.bitrate=24e3}}return n}},{key:"formatScreenProfile",value:function e(r){var n={};if(!r){var i=t.RTCScreenProfileMap["720p"];n=o({},i);return n}if(typeof r==="string"){if(t.RTCScreenProfileList.includes(r)){var a=t.RTCScreenProfileMap[r];n=o({},a)}}else{n.height=r.height;n.width=r.width;n.bitrate=r.bitrate;n.frameRate=r.frameRate;if(!n.width||!n.height){n.width=t.RTCScreenProfileMap["720p"].width;n.height=t.RTCScreenProfileMap["720p"].height}if(!n.frameRate){n.frameRate=15}if(!n.bitrate){n.bitrate=t.RTCScreenProfileMap["720p"].bitrate}}return n}}])}()}))},3652:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(960)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Log=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u=e.Log=function(){function e(r){var i=r.module;n(this,e);this._logger=(0,t.getLogger)(i);this.debug=this.printf("debug");this.info=this.printf("info");this.warn=this.printf("warn");this.error=this.printf("error")}return o(e,[{key:"printf",value:function t(r){var n=this;var i=e._logLevelList.indexOf(r);return function(){if(e._logLevelIndex>-1&&i>=e._logLevelIndex){var t,o;for(var a=arguments.length,s=new Array(a),u=0;u<a;u++){s[u]=arguments[u]}(t=(o=n._logger)[r])===null||t===void 0||t.call.apply(t,[o].concat(s))}}}}],[{key:"setLogLevel",value:function t(r){e._logLevelIndex=e._logLevelList.indexOf(r)}}])}();u._logLevelList=["debug","info","warn","error","none"];u._logLevelIndex=1}))},3736:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSuffix=e.getFileName=e.formatFileSize=void 0;var r=function e(t){var r=[];for(var n=0;n<(t===null||t===void 0?void 0:t.length);n++){if(t[n]!==""){r.push(t[n])}}return r};var n=e.getFileName=function e(t){var n;var i=t.split("/");i=r(i);i=(n=i[i.length-1])===null||n===void 0?void 0:n.split("\\");i=r(i);return i[i.length-1]||t};var i=e.getSuffix=function e(r){if((0,t.isNullOrEmpty)(r)){r=""}return r.slice((r.lastIndexOf(".")-1>>>0)+2).toLowerCase()};var o=e.formatFileSize=function e(t){if(t<1e3){return t+"B"}else if(t>=1e3&&t<1e6){return Math.round(t*100/1024)/100+"KB"}else if(t>=1e6&&t<1e9){return Math.round(t*100/1024/1024)/100+"MB"}return Math.round(t*100/1024/1024/1024)/100+"GB"}}))},3803:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.handleUrlPrint=e.handleTokenPrint=e.handlePhoneNumberPrint=e.handleNickNamePrint=e.handleIpPrint=e.handleAccountPrint=e.formatConfName=void 0;var r=e.handlePhoneNumberPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}var n=r.toString();var i=/^1[3456789]\d{9}$/g;var o=n.length;var a=Math.floor((o-3)/2);if(o<3){return n}else if(o<5){return n.substr(0,1)+"***"}else if(o>11){return n.substr(0,2)+"*****"+n.substr(-3)}return i.test(n)?n.substr(0,3)+"****"+n.substr(7):n.substr(0,a)+"***"+n.substr(a+3)};var n=e.handleAccountPrint=function e(n){if((0,t.isNullOrEmpty)(n)||!n){return""}n=n.toString();var i=/^1[3456789]\d{9}$/g;if(i.test(n)){return r(n)}var o=/^\+99|\+8657\d+/g;if(o.test(n)){return n.substr(0,2)+"*****"+n.substr(-3)}if(n.length<=5){return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}if(n.length<=13){return n.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return n.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))};var i=e.handleIpPrint=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||!r){return""}return r.replace(/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi,(function(e){return e.replace(/(\d{1,3})$/gi,(function(e,t){return t.replace(/\d/gi,"*")}))}))};var o=e.handleUrlPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.split("?")[0]};var a=e.handleTokenPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.substr(0,2)+"***"+r.substr(-3)};var s=e.handleNickNamePrint=function e(n){if((0,t.isNullOrEmpty)(n)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(n))){return""}n=n.toString();var i=/^1[3|4|5|6|7|8|9][0-9]{9}$/g;if(i.test(n)){return r(n)}return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))};var u=e.formatConfName=function e(r){if((0,t.isNullOrEmpty)(r)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(r))){return""}r=r.toString();var n=r.length;if(n<5){return r.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}else if(n<=13){return r.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return r.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}}))},3804:(e,t,r)=>{var n=r(5602);var i=/%[sdv%]/g;var o=function(e){var t=1;var r=arguments;var n=r.length;return e.replace(i,(function(e){if(t>=n){return e}var i=r[t];t+=1;switch(e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))};var a=function(e,t,r){var n=t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format;var i=[e+"="+n];if(t.names){for(var a=0;a<t.names.length;a+=1){var s=t.names[a];if(t.name){i.push(r[t.name][s])}else{i.push(r[t.names[a]])}}}else{i.push(r[t.name])}return o.apply(null,i)};var s=["v","o","s","i","u","e","p","c","b","t","r","z","a"];var u=["i","c","b","a"];e.exports=function(e,t){t=t||{};if(e.version==null){e.version=0}if(e.name==null){e.name=" "}e.media.forEach((function(e){if(e.payloads==null){e.payloads=""}}));var r=t.outerOrder||s;var i=t.innerOrder||u;var o=[];r.forEach((function(t){n[t].forEach((function(r){if(r.name in e&&e[r.name]!=null){o.push(a(t,r,e))}else if(r.push in e&&e[r.push]!=null){e[r.push].forEach((function(e){o.push(a(t,r,e))}))}}))}));e.media.forEach((function(e){o.push(a("m",n.m[0],e));i.forEach((function(t){n[t].forEach((function(r){if(r.name in e&&e[r.name]!=null){o.push(a(t,r,e))}else if(r.push in e&&e[r.push]!=null){e[r.push].forEach((function(e){o.push(a(t,r,e))}))}}))}))}));return o.join("\r\n")+"\r\n"}},3830:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258),r(9969)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TimerTask=void 0;var n,i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=(0,t.getPLogger)();var _=e.TimerTask=(n=(0,r.printfDecorator)(b),i=(0,r.printfDecorator)(b),o=(0,r.printfDecorator)(b),s=(0,r.printfDecorator)(b),u=function(){function e(r){d(this,e);v(this,"id",(0,t.getClientId)());v(this,"_isCancel",false);v(this,"_task",void 0);v(this,"_runCount",0);v(this,"_lastRuntime",0);b.info("TimerTask,".concat(this.id),"constructor",(0,t.formatType)(r));if((0,t.formatType)(r)!==t.formatType.FUNCTION&&(0,t.formatType)(r)!==t.formatType.ASYNCFUNCTION){throw new Error("task is not a function,"+r)}this._task=r}return p(e,[{key:"cancel",value:function e(){b.info("TimerTask,".concat(this.id),"cancel");this._isCancel=true;this._lastRuntime=0;this._runCount=0;return this}},{key:"isCancel",value:function e(){return this._isCancel}},{key:"run",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:b.info("TimerTask,".concat(this.id),"run",this._isCancel,this._runCount);if(!(!this._isCancel&&this._task)){r.next=6;break}this._runCount++;this._lastRuntime=Date.now();r.next=6;return(t=this._task)===null||t===void 0?void 0:t.call(this,this._runCount);case 6:return r.abrupt("return",this);case 7:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"scheduledExecutionTime",value:function e(){return this._lastRuntime}}])}(),g(u.prototype,"cancel",[n],Object.getOwnPropertyDescriptor(u.prototype,"cancel"),u.prototype),g(u.prototype,"isCancel",[i],Object.getOwnPropertyDescriptor(u.prototype,"isCancel"),u.prototype),g(u.prototype,"run",[o],Object.getOwnPropertyDescriptor(u.prototype,"run"),u.prototype),g(u.prototype,"scheduledExecutionTime",[s],Object.getOwnPropertyDescriptor(u.prototype,"scheduledExecutionTime"),u.prototype),u)}))},3898:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(491),r(8707)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UrlUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){return l(e)||c(e,t)||s(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function l(e){if(Array.isArray(e))return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=m(e,"string");return"symbol"==i(t)?t:t+""}function m(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=e.UrlUtil=function(){function e(){f(this,e)}return h(e,null,[{key:"addQuery",value:function r(n,i,o){if((0,t.isNullOrEmpty)(n)||(0,t.isNullOrEmpty)(i)){return n}var a=/\?/.test(n)?"&":"?";var s=(0,t.formatType)(i)===t.formatType.OBJECT?i:e.parseQuery(i);return"".concat(n).concat(a).concat(e.stringfyQuery(s,o))}},{key:"parseQuery",value:function e(r,n){if(!r||(0,t.formatType)(r)!==t.formatType.STRING){return{}}var i=n!==null&&n!==void 0?n:{},a=i.decode,s=a===void 0?true:a;var u=r[0]==="?"?r.slice(1):r;return u.split("&").reduce((function(e,t){var r=t.split("=")||[],n=o(r,2),i=n[0],a=n[1];if(s){i=decodeURIComponent(i);a=decodeURIComponent(a)}e[i]=a;return e}),{})}},{key:"stringfyQuery",value:function e(r,n){if((0,t.isNullOrEmpty)(r)||(0,t.formatType)(r)!==t.formatType.OBJECT||(0,t.formatType)(r)===t.formatType.ARRAY){return""}var i=n!==null&&n!==void 0?n:{},a=i.encode,s=a===void 0?true:a,u=i.addQueryPrefix,c=u===void 0?false:u;var l=Object.entries(r).reduce((function(e,t){var r=o(t,2),n=r[0],i=r[1];var a=s?"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i)):"".concat(n,"=").concat(i);e.push(a);return e}),[]).join("&");return c?"?".concat(l):l}},{key:"getAllUrlSearch",value:function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return{}}try{var n=new URL(r);var i=n.searchParams.entries();var o=i.next();var a={};while(!o.done){a[o.value[0]]=decodeURIComponent(o.value[1]);o=i.next()}return a}catch(e){return{}}}},{key:"getSearchValue",value:function e(r,n){if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return null}try{var i=new URL(r);return i.searchParams.get(n)}catch(e){return null}}}])}();p(y,"checkHttpsUrl",(0,r.startsWith)("https://"));p(y,"checkHttpUrl",(0,r.startsWith)("http://"));p(y,"isInHttpsWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("https:")));p(y,"isInHttpWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("http:")));p(y,"checkIPV4Url",(function(e){try{if(e.hostname){return(0,n.checkIPV4)(e.hostname)}var t=new URL(e);return(0,n.checkIPV4)(t.hostname)}catch(e){return false}}))}))},4046:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7363),r(8024),r(8487),r(3652),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PlanbSDPEditor=void 0;function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==g(t)?t:t+""}function l(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t,r){return t=v(t),d(e,p()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}function d(e,t){if(t&&("object"==g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function t(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e){"@babel/helpers - typeof";return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":g(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var _=new i.Log({module:"PlanbSDPEditor"});var S=e.PlanbSDPEditor=function(e){function n(){a(this,n);return f(this,n,arguments)}m(n,e);return u(n,[{key:"transformAnswerSdp",value:function e(n){r.LoggerFactory.debug(this.module_,"transformAnswerSdp, answerSdp: ".concat(this.printSdpInfo(n)));var i=this.parseSdp(n);if(!i){r.LoggerFactory.error(this.module_,"transformAnswerSdp failed,the sdp is invalid");return""}var o=(0,t.write)(i);r.LoggerFactory.debug(this.module_,"transformAnswerSdp success,answerSdp: ".concat(this.printSdpInfo(o)));return o}}])}(n.SDPEditor);b([(0,o.printfDecorator)(_)],S.prototype,"transformAnswerSdp",null)}))},4081:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBase64Image=void 0;var t=e.checkBase64Image=function e(t){return t.startsWith("data:image/png;base64,")||t.startsWith("data:image/jpeg;base64,")}}))},4317:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(6125)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var r=new t.HWLLSEnter;var n=e["default"]=r}))},4341:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RTCVideoProfileMap=e.RTCVideoProfileList=e.RTCStreamInternalEventValue=e.RTCStreamInternalEvent=e.RTCStreamEvent=e.RTCStream=e.RTCScreenProfileMap=e.RTCScreenProfileList=e.RTCMediaAbility=e.RTCAudioProfileMap=e.RTCAudioProfileList=void 0;var t=e.RTCStreamEvent={PLAYER_STATE_CHANGED:"player-state-change",SCREEN_SHARING_STOPPED:"screen-sharing-stopped",AudioMixingFinished:"audio-mixing-finished",AudioMixingPlayed:"audio-mixing-played",PLAYER_STATE_TRACE:"player-state-trace"};var r=e.RTCStreamInternalEventValue=["camera-capture"];var n=e.RTCStreamInternalEvent={CameraCapture:r[0]};var i;(function(e){e[e["encode"]=0]="encode";e[e["decode"]=1]="decode";e[e["codec"]=2]="codec"})(i||(e.RTCMediaAbility=i={}));var o=e.RTCAudioProfileMap={low:{sampleRate:16e3,channelCount:1,bitrate:24e3},standard:{sampleRate:48e3,channelCount:1,bitrate:4e4},high:{sampleRate:48e3,channelCount:1,bitrate:128e3}};var a=e.RTCAudioProfileList=["low","standard","high"];var s=e.RTCVideoProfileMap={"90p_1":{width:160,height:90,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"90p_2":{width:120,height:90,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"120p_1":{width:160,height:120,frameRate:15,minBitrate:64e3,maxBitrate:12e4},"120p_2":{width:120,height:120,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"180p_1":{width:320,height:180,frameRate:15,minBitrate:8e4,maxBitrate:32e4},"180p_2":{width:240,height:180,frameRate:15,minBitrate:8e4,maxBitrate:17e4},"180p_3":{width:180,height:180,frameRate:15,minBitrate:64e3,maxBitrate:13e4},"240p_1":{width:320,height:240,frameRate:15,minBitrate:1e5,maxBitrate:4e5},"240p_2":{width:240,height:240,frameRate:15,minBitrate:8e4,maxBitrate:32e4},"270p_1":{width:480,height:270,frameRate:15,minBitrate:16e4,maxBitrate:6e5},"300p_1":{width:400,height:300,frameRate:15,minBitrate:2e5,maxBitrate:5e5},"360p_1":{width:640,height:360,frameRate:15,minBitrate:2e5,maxBitrate:8e5},"360p_2":{width:480,height:360,frameRate:15,minBitrate:2e5,maxBitrate:7e5},"360p_3":{width:360,height:360,frameRate:15,minBitrate:15e4,maxBitrate:6e5},"450p_1":{width:800,height:450,frameRate:15,minBitrate:3e5,maxBitrate:95e4},"480p_1":{width:640,height:480,frameRate:15,minBitrate:25e4,maxBitrate:9e5},"480p_2":{width:480,height:480,frameRate:15,minBitrate:2e5,maxBitrate:8e5},"540p_1":{width:960,height:540,frameRate:15,minBitrate:4e5,maxBitrate:1e6},"630p_1":{width:1120,height:630,frameRate:15,minBitrate:45e4,maxBitrate:115e4},"720p_1":{width:1280,height:720,frameRate:15,minBitrate:5e5,maxBitrate:15e5},"720p_2":{width:960,height:720,frameRate:15,minBitrate:45e4,maxBitrate:11e5},"1080p_1":{width:1920,height:1080,frameRate:15,minBitrate:6e5,maxBitrate:2e6},"1080p_2":{width:1440,height:1080,frameRate:15,minBitrate:55e4,maxBitrate:17e5}};var u=e.RTCVideoProfileList=["90p_1","90p_2","120p_1","120p_2","180p_1","180p_2","180p_3","240p_1","240p_2","270p_1","300p_1","360p_1","360p_2","360p_3","450p_1","480p_1","480p_2","540p_1","630p_1","720p_1","720p_2","1080p_1","1080p_2"];var c=e.RTCScreenProfileMap={"720p":{width:1280,height:720,frameRate:15,bitrate:12e5},"1080p":{width:1920,height:1080,frameRate:15,bitrate:2e6}};var l=e.RTCScreenProfileList=["720p","1080p"];var f=e.RTCStream={InboundRTPAudio:"inbound-rtp-audio",InboundRTPVideo:"inbound-rtp-video",OutboundRTPAudio:"outbound-rtp-audio",OutboundRTPVideo:"outbound-rtp-video",RemoteInboundRtpAudio:"remote-inbound-rtp-audio",RemoteInboundRtpVideo:"remote-inbound-rtp-video"}}))},4404:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8024),r(7354),r(5268),r(4772),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.GlobalVariables=e.GlobalVariableManager=void 0;r=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==g(t)?t:t+""}function y(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e){"@babel/helpers - typeof";return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":g(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var _=new o.Log({module:"GlobalVariables"});var S=e.GlobalVariables=function(){function e(){h(this,e);this.audioStatisticCache=[];this.videoStatisticCache=[];this.playTrackKpi={startPlayTime:0,iceCandidateStart:0,iceCandidateComplete:0,icePairStart:0,iceChecking:0,iceComplete:0,dtlsComplete:0,glsbRequest:0,glsbRespone:0,negotiateSDPRequest:0,negotiateSDPRespone:0,audioPlaySucc:0,videoPlaySucc:0,endPlayTime:0,videoTimeOut:0,audioTimeOut:0};this.pullMediaParams={}}return v(e,[{key:"updatePlayTrackKpi",value:function e(n){this.playTrackKpi[n]=r["default"].getCurrentLocalTimestamp();if(/^(ice|dtls).*/gi.test(n)){this.addKeyInfoMsg(n,this.playTrackKpi[n])}if(["endPlayTime","videoTimeOut","audioTimeOut"].includes(n)){return}var i=this.checkKpiDataReady();if(i){t.LoggerFactory.info("KPI","startPlay time spent analysis( gslbDispatch cost: ".concat((this.playTrackKpi.glsbRespone||0)-(this.playTrackKpi.glsbRequest||0),"ms; negotiateSDP cost: ").concat(this.playTrackKpi.negotiateSDPRespone-this.playTrackKpi.negotiateSDPRequest,"ms; localICE candidate collect cost: ").concat(this.playTrackKpi.iceCandidateComplete-this.playTrackKpi.iceCandidateStart,"ms; Connection establish total cost: ").concat((this.playTrackKpi.dtlsComplete||0)-this.playTrackKpi.icePairStart,"ms; ICE Connectivity check: ").concat((this.playTrackKpi.iceComplete||0)-(this.playTrackKpi.iceChecking||0),"ms; DTLS negotiate cost: ").concat((this.playTrackKpi.dtlsComplete||0)-(this.playTrackKpi.iceComplete||0),"ms; first frame cost: ").concat(Math.max(this.playTrackKpi.videoPlaySucc,this.playTrackKpi.audioPlaySucc)-this.playTrackKpi.startPlayTime,"ms"))}}},{key:"checkKpiDataReady",value:function e(){var t=true;for(var r in this.playTrackKpi){if(!["videoTimeOut","audioTimeOut","endPlayTime","glsbRespone","glsbRequest"].includes(r)&&!this.playTrackKpi[r]){if(["videoPlaySucc","audioPlaySucc"].includes(r)){if(!this.sfuInfo.aSsrc&&!this.sfuInfo.vSsrc){t=false;break}if(r==="audioPlaySucc"&&this.sfuInfo.aSsrc){t=false;break}if(r==="videoPlaySucc"&&this.sfuInfo.vSsrc){t=false;break}}else{t=false;break}}}return t}},{key:"getPlayTrackKpi",value:function e(){return this.playTrackKpi}},{key:"getSfuInfo",value:function e(){return this.sfuInfo}},{key:"getLocalSfuInfo",value:function e(){return this.localSfuInfo}},{key:"setSfuInfo",value:function e(t){if(t.ipAddress){t.ipAddress=r["default"].isIpv6(t.ipAddress)?"[".concat(t.ipAddress,"]"):t.ipAddress}this.sfuInfo=t}},{key:"setLocalSfuInfo",value:function e(t){if(t.ipAddress){t.ipAddress=r["default"].isIpv6(t.ipAddress)?"[".concat(t.ipAddress,"]"):t.ipAddress}this.localSfuInfo=t}},{key:"setStreamParams",value:function e(t){if(!this.streamParams){this.streamParams=t}else{this.streamParams=f(f({},this.streamParams),t)}}},{key:"getStreamParams",value:function e(){return this.streamParams}},{key:"updateAccessAddr",value:function e(t){if(!this.streamParams){this.streamParams={accessAddr:r["default"].isIpv6(t)?"[".concat(t,"]"):t}}else{this.streamParams.accessAddr=r["default"].isIpv6(t)?"[".concat(t,"]"):t}}},{key:"setPullMediaParams",value:function e(t){if(this.pullMediaParams.clientAddr){delete t.clientAddr}else{t.clientAddr=r["default"].isIpv6(t.clientAddr)?"[".concat(t.clientAddr,"]"):t.clientAddr}this.pullMediaParams=f(f({},this.pullMediaParams),t)}},{key:"updateClientAddr",value:function e(t){if(!t){return}if(!this.pullMediaParams.clientAddr){this.pullMediaParams.clientAddr=r["default"].isIpv6(t)?"[".concat(t,"]"):t}}},{key:"getPullMediaParams",value:function e(){return this.pullMediaParams}},{key:"addVideoStatisticCache",value:function e(t){this.videoStatisticCache.push(t)}},{key:"addAudioStatisticCache",value:function e(t){this.audioStatisticCache.push(t)}},{key:"calcPlayDuration",value:function e(){return Math.round((this.playTrackKpi.endPlayTime-this.playTrackKpi.startPlayTime)/1e3)}},{key:"getMediaFreezeStatistic",value:function e(t){var r=this[t===n.MediaType.TRACK_TYPE_AUDIO?"audioStatisticCache":"videoStatisticCache"];var i=0;var o=0;var a=0;var u=0;var c=s(r),l;try{for(c.s();!(l=c.n()).done;){var f=l.value;o+=f.total200FreezeCnt;i+=f.total200FreezeTime;if(t===n.MediaType.TRACK_TYPE_VIDEO){u+=f.total600VFreezeCnt;a+=f.total600VFreezeTime}}}catch(e){c.e(e)}finally{c.f()}if(t===n.MediaType.TRACK_TYPE_VIDEO){return{freeze200Count:o,freeze200Duration:i,freeze600Count:u,freeze600Duration:a}}return{freeze200Count:o,freeze200Duration:i}}},{key:"calcAverageStatistic",value:function e(){var t={afreeze200Cnt:0,vfreeze200Cnt:0,vfreeze600Cnt:0};var r=0;var n=this.audioStatisticCache.length>0?this.audioStatisticCache[this.audioStatisticCache.length-1].totalPacketsReceived:0;var i=0;var o=0;var a=0;var u=0;var c=0;var l=0;var f=s(this.audioStatisticCache),d;try{for(f.s();!(d=f.n()).done;){var h=d.value;t.afreeze200Cnt+=h.total200FreezeCnt;a+=h.total200FreezeTime;c+=h.totalStatisticTime;r+=h.lostPktCnt;i+=h.bitRate;o+=h.jitter;l+=h.rtt}}catch(e){f.e(e)}finally{f.f()}t.afreeze200Rate=Math.round(a*100/Math.max(c,1));t.aRecvBandwidthMean=Math.round(i/Math.max(this.audioStatisticCache.length,1));t.aRecvLostMean=Math.round(r*100/Math.max(n+r,1));t.aRecvJitter=Math.round(o/Math.max(this.audioStatisticCache.length,1));t.aRecvRttMean=Math.round(l/Math.max(this.audioStatisticCache.length,1));r=0;n=this.videoStatisticCache.length>0?this.videoStatisticCache[this.videoStatisticCache.length-1].totalPacketsReceived:0;i=0;o=0;a=0;c=0;l=0;var p=s(this.videoStatisticCache),v;try{for(p.s();!(v=p.n()).done;){var m=v.value;t.vfreeze200Cnt+=m.total200FreezeCnt;t.vfreeze600Cnt+=m.total600VFreezeCnt;a+=m.total200FreezeTime;u+=m.total600VFreezeTime;c+=m.totalStatisticTime;r+=m.lostPktCnt;i+=m.bitRate;o+=m.jitter;l+=m.rtt}}catch(e){p.e(e)}finally{p.f()}t.vfreeze200Rate=Math.round(a*100/Math.max(c,1));t.vfreeze600Rate=Math.round(u*100/Math.max(c,1));t.vRecvBandwidthMean=Math.round(i/Math.max(this.videoStatisticCache.length,1));t.vRecvLostMean=Math.round(r*100/Math.max(n+r,1));t.vRecvJitter=Math.round(o/Math.max(this.videoStatisticCache.length,1));t.vRecvRttMean=Math.round(l/Math.max(this.videoStatisticCache.length,1));return t}},{key:"addKeyInfoMsg",value:function e(t,r){if(!this.pullMediaParams.keyInfoMsg){this.pullMediaParams.keyInfoMsg={}}if(t==="iceCandidateComplete"&&this.pullMediaParams.keyInfoMsg.iceCandidateStart){this.pullMediaParams.keyInfoMsg[t]=r-this.pullMediaParams.keyInfoMsg.iceCandidateStart}else if(t==="iceChecking"&&this.pullMediaParams.keyInfoMsg.icePairStart){this.pullMediaParams.keyInfoMsg[t]=r-this.pullMediaParams.keyInfoMsg.icePairStart}else if(t==="iceComplete"&&this.pullMediaParams.keyInfoMsg.icePairStart){this.pullMediaParams.keyInfoMsg[t]=r-this.pullMediaParams.keyInfoMsg.icePairStart-(this.pullMediaParams.keyInfoMsg.iceChecking||0)}else if(t==="dtlsComplete"&&this.pullMediaParams.keyInfoMsg.icePairStart){this.pullMediaParams.keyInfoMsg[t]=r-this.pullMediaParams.keyInfoMsg.icePairStart-((this.pullMediaParams.keyInfoMsg.iceChecking||0)+(this.pullMediaParams.keyInfoMsg.iceComplete||0))}else{this.pullMediaParams.keyInfoMsg[t]=r}}}])}();b([(0,i.printfDecorator)(_)],S.prototype,"setSfuInfo",null);b([(0,i.printfDecorator)(_)],S.prototype,"setLocalSfuInfo",null);var E=e.GlobalVariableManager=function(){function e(){h(this,e)}return v(e,null,[{key:"addInstance",value:function t(r){e.globalVariableMap.set(r,new S)}},{key:"getInstance",value:function t(r){return e.globalVariableMap.get(r)}},{key:"delInstance",value:function t(r){if(r){e.globalVariableMap["delete"](r)}else{e.globalVariableMap.clear()}}}])}();E.globalVariableMap=new Map}))},4521:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.updateArrayItemByKeys=e.splitArrayByNum=e.queryItemByKeys=e.hasOneInArray=e.deleteItemByKeys=void 0;function r(e){return a(e)||o(e)||i(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return s(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u=e.splitArrayByNum=function e(n,i){if((0,t.formatType)(n)!==t.formatType.ARRAY){return n}if((0,t.formatType)(i)!==t.formatType.NUMBER){return n}if(i<0){return[n]}var o=[];var a=r(n);while(a.length>i){o.push(a.splice(0,i))}o.push(a);return o};var c=e.updateArrayItemByKeys=function e(r,n,i){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.ARRAY){return r}if((0,t.isNullOrEmpty)(i)){return r}if((0,t.formatType)(i)===t.formatType.ARRAY){i.forEach((function(e){c(r,n,e)}));return r}else if((0,t.formatType)(i)!==t.formatType.OBJECT){return r}var o=r.findIndex((function(e){var r=true;n.forEach((function(n){if((0,t.isNullOrEmpty)(e[n])||(0,t.isNullOrEmpty)(i[n])){r=false}if(e[n]!==i[n]){r=false}}));return r}));if(o===-1){r.push(i);return r}r[o]=i;return r};var l=e.queryItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return undefined}if((0,t.formatType)(n)!==t.formatType.OBJECT){return undefined}return r===null||r===void 0?void 0:r.find((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}))};var f=e.hasOneInArray=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return false}if((0,t.formatType)(n)!==t.formatType.ARRAY){return false}for(var i=0;i<n.length;i++){if(r.includes(n[i])){return true}}return false};var d=e.deleteItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.OBJECT){return r}var i=r.findIndex((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}));if(i!==-1){r.splice(i,1)}return r}}))},4643:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SoundMeter=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=e.SoundMeter=function(){function e(){var t=this;r(this,e);this.context_=new AudioContext;this.script_=this.context_.createScriptProcessor(2048,1,1);this.script_.onaudioprocess=function(e){var r=e.inputBuffer.getChannelData(0);var n=0;var i=0;for(var o=0;o<r.length;o++){n+=r[o]*r[o];if(Math.abs(r[o])>.99){i+=1}}t.instant_=Math.sqrt(n/r.length);t.slow_=.95*t.slow_+.05*t.instant_;t.clip_=i/r.length};this.instant_=0;this.slow_=0;this.clip_=0}return i(e,[{key:"connectToSource",value:function e(t){var r=this;return new Promise((function(e,n){try{var i=new MediaStream;i.addTrack(t);r.mic_=r.context_.createMediaStreamSource(i);r.mic_.connect(r.script_);r.script_.connect(r.context_.destination);e()}catch(e){n(e)}}))}},{key:"stop",value:function e(){this.mic_.disconnect();this.script_.disconnect();this.context_.close()}},{key:"getVolume",value:function e(){return parseFloat(this.instant_.toFixed(2))}}])}()}))},4706:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.timeWorkerScript=e.getTimeWorkerUrl=void 0;var t=e.timeWorkerScript="\nclass TimerWorker {\n static timeoutMap = new Map();\n\n static eventListener(e) {\n const { data } = e;\n switch (data.method) {\n case 'clear':\n TimerWorker.clearTimer(data);\n break;\n case 'set':\n TimerWorker.setTimer(data);\n break;\n default:\n break;\n }\n }\n\n static deleteTimerByKey(key) {\n const timer = TimerWorker.timeoutMap.get(key);\n if (timer) {\n clearInterval(timer);\n TimerWorker.timeoutMap.delete(key);\n return true;\n }\n return false;\n }\n\n static clearTimer(data) {\n const { sno, timerId } = data;\n TimerWorker.sendToMain({ sno, timerId, result: TimerWorker.deleteTimerByKey(timerId) });\n }\n\n static setTimer(data) {\n const { now = 0, sno, timerId, delay = 0 } = data;\n const remainingDelay = TimerWorker.getRealTimeInterval(delay, now);\n TimerWorker.timeoutMap.set(timerId, setTimeout(TimerWorker.dealTimer, remainingDelay, { sno, timerId }));\n }\n\n static getRealTimeInterval(delay, now) {\n const workerNow = performance.now();\n return delay + now - workerNow - performance.timeOrigin;\n }\n\n static dealTimer({ timerId, sno }) {\n TimerWorker.timeoutMap.delete(timerId);\n TimerWorker.sendToMain({ result: true, timerId, sno });\n }\n\n static sendToMain(data) {\n postMessage(data);\n }\n}\n\naddEventListener('message', TimerWorker.eventListener);\n";var r=e.getTimeWorkerUrl=function e(){return URL.createObjectURL(new Blob([t]))}}))},4752:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyA=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return u(e)||s(e,t)||o(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function u(e){if(Array.isArray(e))return e}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==r(t)?t:t+""}function y(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=e.ChromaKeyA=function(){function e(t){d(this,e);v(this,"gl",void 0);v(this,"keyColor",void 0);v(this,"opts",void 0);v(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return p(e,[{key:"dealVideoFrame",value:function(){var t=f(c().mark((function t(r){var n;return c().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:if(!this.keyColor){this.keyColor=e.handleGetKeyColor(r)}if(!this.gl){n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n;this.handleInitTexture(this.gl)}this.gl.viewport(0,0,r.videoWidth,r.videoHeight);this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,r);this.gl.drawArrays(this.gl.TRIANGLES,0,6);return i.abrupt("return",createImageBitmap(this.optCvs,{imageOrientation:"none"}));case 6:case"end":return i.stop()}}),t,this)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{premultipliedAlpha:false,alpha:true});if(!n){throw Error("Cant create gl context")}var i=this.handleInitShaderProgram(n,e.vertexShader,e.fragmentShader);n.useProgram(i);n.uniform3fv(n.getUniformLocation(i,"keyColor"),this.keyColor.map((function(e){return e/255})));n.uniform1f(n.getUniformLocation(i,"similarity"),this.opts.similarity);n.uniform1f(n.getUniformLocation(i,"smoothness"),this.opts.smoothness);n.uniform1f(n.getUniformLocation(i,"spill"),this.opts.spill);var o=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,o);var a=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1];n.bufferData(n.ARRAY_BUFFER,new Float32Array(a),n.STATIC_DRAW);var s=n.getAttribLocation(i,"a_position");n.vertexAttribPointer(s,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(s);var u=[0,1,0,0,1,0,1,0,1,1,0,1];var c=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,c);n.bufferData(n.ARRAY_BUFFER,new Float32Array(u),n.STATIC_DRAW);var l=n.getAttribLocation(i,"a_texCoord");n.vertexAttribPointer(l,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(l);n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,1);return n}},{key:"handleInitShaderProgram",value:function e(t,r,n){var i=this.handleLoadShader(t,t.VERTEX_SHADER,r);var o=this.handleLoadShader(t,t.FRAGMENT_SHADER,n);var a=t.createProgram();t.attachShader(a,i);t.attachShader(a,o);t.linkProgram(a);if(!t.getProgramParameter(a,t.LINK_STATUS)){var s;throw Error((s=t.getProgramInfoLog(a))!==null&&s!==void 0?s:"Unable to initialize the shader program")}return a}},{key:"handleLoadShader",value:function e(t,r,n){var i=t.createShader(r);t.shaderSource(i,n);t.compileShader(i);if(!t.getShaderParameter(i,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(i);t.deleteShader(i);throw Error(o!==null&&o!==void 0?o:"An error occurred compiling the shaders")}return i}},{key:"handleInitTexture",value:function e(t){var r=t.createTexture();if(!r){throw Error("Create WebGL texture error")}t.bindTexture(t.TEXTURE_2D,r);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);return r}}],[{key:"handleGetKeyColor",value:function e(r){var i=new OffscreenCanvas(1,1);var o=i.getContext("2d");o.drawImage(r,0,0);var a=o.getImageData(0,0,1,1),s=n(a.data,3),u=s[0],c=s[1],l=s[2];(0,t.getPLogger)().info("handleGetKeyColor: ",[u,c,l]);return[u,c,l]}}])}();v(g,"vertexShader","#version 300 es\nlayout (location = 0) in vec4 a_position;\nlayout (location = 1) in vec2 a_texCoord;\nout vec2 v_texCoord;\nvoid main () {\n gl_Position = a_position;\n v_texCoord = a_texCoord;\n}\n");v(g,"fragmentShader","#version 300 es\nprecision mediump float;\nout vec4 FragColor;\nin vec2 v_texCoord;\nuniform sampler2D frameTexture;\nuniform vec3 keyColor;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\n\nvoid main() {\n vec4 rgba = texture(frameTexture, v_texCoord);\n vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);\n float chromaDist = sqrt(dot(chromaVec, chromaVec));\n float baseMask = chromaDist - similarity;\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n rgba.a = fullMask;\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.);\n rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);\n FragColor = rgba;\n}\n")}))},4772:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2771),r(3898),r(258),r(4081),r(3736),r(3803),r(1068),r(9220),r(9222),r(394),r(4521),r(9969),r(8707),r(8360),r(8159),r(3399),r(2897),r(2265),r(2615),r(375),r(2144),r(362),r(916),r(7867),r(9403),r(7360),r(5246)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_,S,E,w,T,I,R,C){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"AudioContextLocalRecorder",{enumerable:true,get:function e(){return w.AudioContextLocalRecorder}});Object.defineProperty(e,"AutoQueryData",{enumerable:true,get:function e(){return y.AutoQueryData}});Object.defineProperty(e,"Clipboard",{enumerable:true,get:function e(){return C.Clipboard}});Object.defineProperty(e,"DownloadAudio",{enumerable:true,get:function e(){return _.DownloadAudio}});Object.defineProperty(e,"LazyLoad",{enumerable:true,get:function e(){return p.LazyLoad}});Object.defineProperty(e,"LocalTransparentVideoBg",{enumerable:true,get:function e(){return E.LocalTransparentVideoBg}});Object.defineProperty(e,"MediaDeviceManager",{enumerable:true,get:function e(){return T.MediaDeviceManager}});Object.defineProperty(e,"MediaStreamUtil",{enumerable:true,get:function e(){return R.MediaStreamUtil}});Object.defineProperty(e,"PCMPlayer",{enumerable:true,get:function e(){return S.PCMPlayer}});Object.defineProperty(e,"PromiseUtil",{enumerable:true,get:function e(){return I.PromiseUtil}});Object.defineProperty(e,"RequestTasksQueue",{enumerable:true,get:function e(){return u.RequestTasksQueue}});Object.defineProperty(e,"StringUtil",{enumerable:true,get:function e(){return v.StringUtil}});Object.defineProperty(e,"Timer",{enumerable:true,get:function e(){return m.Timer}});Object.defineProperty(e,"UrlUtil",{enumerable:true,get:function e(){return r.UrlUtil}});Object.defineProperty(e,"WebWorkerUtil",{enumerable:true,get:function e(){return b.WebWorkerUtil}});e.beforeJsonParse=void 0;Object.defineProperty(e,"checkBase64Image",{enumerable:true,get:function e(){return i.checkBase64Image}});e.checkHttpsUrl=e.checkHttpUrl=void 0;Object.defineProperty(e,"checkIPV4",{enumerable:true,get:function e(){return h.checkIPV4}});Object.defineProperty(e,"componentDecorator",{enumerable:true,get:function e(){return d.componentDecorator}});Object.defineProperty(e,"createEntry",{enumerable:true,get:function e(){return n.createEntry}});Object.defineProperty(e,"customDecorator",{enumerable:true,get:function e(){return d.customDecorator}});Object.defineProperty(e,"debounce",{enumerable:true,get:function e(){return n.debounce}});Object.defineProperty(e,"deepCopy",{enumerable:true,get:function e(){return n.deepCopy}});Object.defineProperty(e,"deleteItemByKeys",{enumerable:true,get:function e(){return f.deleteItemByKeys}});Object.defineProperty(e,"escapeRegExp",{enumerable:true,get:function e(){return c.escapeRegExp}});Object.defineProperty(e,"formatConfName",{enumerable:true,get:function e(){return a.formatConfName}});Object.defineProperty(e,"formatDate",{enumerable:true,get:function e(){return n.formatDate}});Object.defineProperty(e,"formatFileSize",{enumerable:true,get:function e(){return o.formatFileSize}});e.formatString=void 0;Object.defineProperty(e,"formatType",{enumerable:true,get:function e(){return n.formatType}});Object.defineProperty(e,"frequentTasksDecoratorFactory",{enumerable:true,get:function e(){return d.frequentTasksDecoratorFactory}});Object.defineProperty(e,"getClientId",{enumerable:true,get:function e(){return n.getClientId}});Object.defineProperty(e,"getElementScreenPosition",{enumerable:true,get:function e(){return s.getElementScreenPosition}});Object.defineProperty(e,"getEmailReg",{enumerable:true,get:function e(){return c.getEmailReg}});Object.defineProperty(e,"getFileName",{enumerable:true,get:function e(){return o.getFileName}});Object.defineProperty(e,"getMobilePhoneReg",{enumerable:true,get:function e(){return c.getMobilePhoneReg}});Object.defineProperty(e,"getNumberReg",{enumerable:true,get:function e(){return c.getNumberReg}});Object.defineProperty(e,"getSipNumberReg",{enumerable:true,get:function e(){return c.getSipNumberReg}});Object.defineProperty(e,"getSuffix",{enumerable:true,get:function e(){return o.getSuffix}});Object.defineProperty(e,"handleAccountPrint",{enumerable:true,get:function e(){return a.handleAccountPrint}});Object.defineProperty(e,"handleIpPrint",{enumerable:true,get:function e(){return a.handleIpPrint}});Object.defineProperty(e,"handleNickNamePrint",{enumerable:true,get:function e(){return a.handleNickNamePrint}});Object.defineProperty(e,"handlePhoneNumberPrint",{enumerable:true,get:function e(){return a.handlePhoneNumberPrint}});Object.defineProperty(e,"handleTokenPrint",{enumerable:true,get:function e(){return a.handleTokenPrint}});Object.defineProperty(e,"handleUrlPrint",{enumerable:true,get:function e(){return a.handleUrlPrint}});Object.defineProperty(e,"hasOneInArray",{enumerable:true,get:function e(){return f.hasOneInArray}});e.isInHttpsWhiteList=e.isInHttpWhiteList=void 0;Object.defineProperty(e,"isNullOrEmpty",{enumerable:true,get:function e(){return n.isNullOrEmpty}});Object.defineProperty(e,"mergeByDay",{enumerable:true,get:function e(){return l.mergeByDay}});Object.defineProperty(e,"printfDecorator",{enumerable:true,get:function e(){return d.printfDecorator}});Object.defineProperty(e,"queryItemByKeys",{enumerable:true,get:function e(){return f.queryItemByKeys}});e.replaceStringPlaceholder=e.reactStopPropagation=void 0;Object.defineProperty(e,"setLocalStorageItem",{enumerable:true,get:function e(){return g.setLocalStorageItem}});Object.defineProperty(e,"setPLogger",{enumerable:true,get:function e(){return n.setPLogger}});Object.defineProperty(e,"setSessionStorageItem",{enumerable:true,get:function e(){return g.setSessionStorageItem}});e.showDifferentProperty=void 0;Object.defineProperty(e,"sleep",{enumerable:true,get:function e(){return n.sleep}});Object.defineProperty(e,"splitArrayByNum",{enumerable:true,get:function e(){return f.splitArrayByNum}});e.splitStringByChar=void 0;Object.defineProperty(e,"throttle",{enumerable:true,get:function e(){return n.throttle}});Object.defineProperty(e,"updateArrayItemByKeys",{enumerable:true,get:function e(){return f.updateArrayItemByKeys}});var k=e.reactStopPropagation=t.ReactUtil.reactStopPropagation;var A=e.showDifferentProperty=t.ReactUtil.showDifferentProperty;var O=e.beforeJsonParse=v.StringUtil.beforeJsonParse;var P=e.splitStringByChar=v.StringUtil.splitStringByChar;var x=e.formatString=v.StringUtil.formatString;var L=e.replaceStringPlaceholder=v.StringUtil.replaceStringPlaceholder;var M=e.checkHttpsUrl=r.UrlUtil.checkHttpsUrl;var N=e.checkHttpUrl=r.UrlUtil.checkHttpUrl;var D=e.isInHttpWhiteList=r.UrlUtil.isInHttpWhiteList;var j=e.isInHttpsWhiteList=r.UrlUtil.isInHttpsWhiteList}))},4868:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4046),r(8880),r(8024),r(7098),r(9974),r(9611),r(8066),r(4404),r(1913),r(6360),r(5268),r(7423),r(3652),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PeerConnectionsManager=void 0;i=v(i);function v(e){return e&&e.__esModule?e:{default:e}}function m(){"use strict";m=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function g(){}function b(){}function _(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(L([])));w&&w!==r&&n.call(w,a)&&(S=w);var I=_.prototype=g.prototype=Object.create(S);function R(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==T(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?v:h,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(T(t)+" is not iterable")}return b.prototype=_,i(I,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),c(I,u,"Generator"),c(I,a,(function(){return this})),c(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){y(o,n,i,a,s,"next",e)}function s(e){y(o,n,i,a,s,"throw",e)}a(void 0)}))}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function S(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=w(e,"string");return"symbol"==T(t)?t:t+""}function w(e,t){if("object"!=T(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function T(e){"@babel/helpers - typeof";return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}var I=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":T(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var R=new h.Log({module:"PeerConnectionsManager"});var C="PeerConnectionsManager";var k=e.PeerConnectionsManager=function(){function e(o,a,s){b(this,e);this.connectionId=s;this.eventEmitter=a;this.stats=o;if(i["default"].isOnlySupportUnfiedPlan()){this.sdpDescMode="unified-plan";this.rtcSdp=new r.UnifiedPlanSDPEditor}else{this.sdpDescMode="plan-b";this.rtcSdp=new t.PlanbSDPEditor}n.LoggerFactory.debug(C,"ConnectionsManager, SDP mode: ".concat(this.sdpDescMode))}return S(e,[{key:"getConnectionId",value:function e(){return this.connectionId}},{key:"isConnectionsExist",value:function e(){return!!this.peerConnection}},{key:"isConnectionEstablished",value:function e(){var t;return!!(this.peerConnection&&((t=this.peerConnection.connection)===null||t===void 0?void 0:t.connectionState)==="connected")}},{key:"initConnectionAndSdp",value:function(){var e=g(m().mark((function e(t,r,i){var o=this,a;var s,u,l,f,d,h;return m().wrap((function e(p){while(1)switch(p.prev=p.next){case 0:s=this.peerConnection||this.createPeerConnection();if(this.dataChanel){this.dataChanel.reset()}R.info("initConnectionAndSdp",t);this.dataChanel=new c.DataChannelMsgManager(this.eventEmitter);u={uid:(i===null||i===void 0?void 0:i.uid)||0,isCmd:(i===null||i===void 0?void 0:i.isCmd)||false,connection:this.getConnection(),sendSsrc:(i===null||i===void 0?void 0:i.sendSsrc)||0,receiveSsrc:(i===null||i===void 0?void 0:i.receiveSsrc)||0,msgFormat:0};R.info("connection:".concat(u.connection));this.dataChanel.initChannel(u);this.innerChanel=s.connection.createDataChannel("_inner");this.innerChanel.onmessage=function(){var e=g(m().mark((function e(t){var r;return m().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t.data)));R.info("innerChanel onmessage",r);if(!(r.type==="answer")){n.next=5;break}n.next=5;return o.setRemoteDescription({type:"answer",sdp:r.msg},"innerChanel");case 5:case"end":return n.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();R.info("initConnectionAndSdp, receiveAudio : "+t.receiveAudio+", receiveVideo : "+t.receiveVideo);p.next=12;return this.createOffer({offerToReceiveAudio:t.receiveAudio,offerToReceiveVideo:t.receiveVideo});case 12:l=p.sent;if(l){p.next=15;break}return p.abrupt("return");case 15:f=this.rtcSdp.getBrowserDefaultSsrc(l.sdp);if(f.audioSsrc){s.audioSendSsrc=f.audioSsrc;s.sendSsrcsMapping.set(2,f.audioSsrc)}d=this.rtcSdp.transformOfferSdp(l===null||l===void 0?void 0:l.sdp);R.info("initConnectionAndSdp transformedSdp",l===null||l===void 0?void 0:l.sdp,d);p.next=21;return this.setLocalDescription({type:"offer",sdp:d},"initConnectionAndSdp");case 21:this.onConnection(s,r.onTrackHandler);this.iceAddressCollect(s.connection);h=(a=s.connection.localDescription)===null||a===void 0?void 0:a.sdp;n.LoggerFactory.debug(C,"setLocalDescription, sdp offer: ".concat(this.rtcSdp.printSdpInfo(h)));p.next=27;return this.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(h)},"initConnectionAndSdp noTCPCandidateSdp");case 27:case"end":return p.stop()}}),e,this)})));function t(t,r,n){return e.apply(this,arguments)}return t}()},{key:"getLocalSDP",value:function e(){var t,r;return this.rtcSdp.modifySdpCandidates((t=this.peerConnection)===null||t===void 0||(t=t.connection.localDescription)===null||t===void 0?void 0:t.sdp,(r=this.peerConnection)===null||r===void 0?void 0:r.candidate)}},{key:"destroyPeerConnection",value:function e(t){var r=this;if(this.peerConnection){clearTimeout(this.peerConnection.disConnectDelayHandleTimer);clearTimeout(this.peerConnection.connectionStatisticTimeOut);if(this.peerConnection.connection.signalingState!=="closed"){t===null||t===void 0||t.forEach((function(e){var t;return(t=r.peerConnection)===null||t===void 0?void 0:t.connection.removeTrack(e)}));this.peerConnection.connection.close();this.peerConnection.connectFailedTimes=0}this.eventEmitter.removeAllListeners("STARTUP_MEDIA_STATS");s.MediaStats.shutDownMediaStats(this.connectionId);delete this.peerConnection}if(this.dataChanel){this.dataChanel.reset();delete this.dataChanel}}},{key:"handleAnswerSdpFromServer",value:function(){var e=g(m().mark((function e(t){var r,i,a;var s,c;return m().wrap((function e(l){while(1)switch(l.prev=l.next){case 0:(r=u.GlobalVariableManager.getInstance(this.connectionId))===null||r===void 0||r.updatePlayTrackKpi("icePairStart");s=(i=this.peerConnection)===null||i===void 0?void 0:i.connection;c=this.rtcSdp.transformAnswerSdp(t,s===null||s===void 0||(a=s.localDescription)===null||a===void 0?void 0:a.sdp);n.LoggerFactory.debug(C,"handleAnswerSdpFromServer, sdp answer: ".concat(this.rtcSdp.printSdpInfo(c)));l.prev=4;l.next=7;return this.setRemoteDescription({type:"answer",sdp:c},"handleAnswerSdpFromServer");case 7:l.next=13;break;case 9:l.prev=9;l.t0=l["catch"](4);n.LoggerFactory.error(C,"setRemoteDescription error, answer sdp invalid or offer sdp invalid: ".concat(l.t0));throw new o.HwLLSError(o.ErrorCode.HWLLS_INTERNAL_ERROR,(l.t0===null||l.t0===void 0?void 0:l.t0.message)||"setRemoteDescription error, answer sdp invalid or offer sdp invalid");case 13:case"end":return l.stop()}}),e,this,[[4,9]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getSfuInfoFromSdp",value:function e(t){var r=this.rtcSdp.getSfuInfo(t);r.connectionId=this.getConnectionId();return r}},{key:"getConnection",value:function e(){var t;if(!this.isConnectionsExist()){return undefined}return(t=this.peerConnection)===null||t===void 0?void 0:t.connection}},{key:"sendMessage",value:function e(t,r){var n;return(n=this.dataChanel)===null||n===void 0?void 0:n.sendMessage(t,r)}},{key:"modifyPublishOfferSdp",value:function(){var e=g(m().mark((function e(t){var r,n;var i,o,a,s,u,c,l,f,d=arguments;return m().wrap((function e(h){while(1)switch(h.prev=h.next){case 0:i=d.length>1&&d[1]!==undefined?d[1]:0;o=d.length>2&&d[2]!==undefined?d[2]:0;a=(r=this.peerConnection)===null||r===void 0?void 0:r.connection;if(a){h.next=5;break}return h.abrupt("return","");case 5:h.next=7;return this.createOffer();case 7:h.t1=n=h.sent;h.t0=h.t1===null;if(h.t0){h.next=11;break}h.t0=n===void 0;case 11:if(!h.t0){h.next=15;break}h.t2=void 0;h.next=16;break;case 15:h.t2=n.sdp;case 16:s=h.t2;if(o){if(this.sdpDescMode==="plan-b"){s=this.rtcSdp.deleteSSRC(s,o)}else{u=this.rtcSdp.deleteSSRC(s,(c=a.remoteDescription)===null||c===void 0?void 0:c.sdp,this.getMappingSsrcs(0),this.getMappingSsrcs(o))}}if(this.sdpDescMode==="plan-b"){s=this.rtcSdp.modifyPublishOfferSdp(s,i)}else{u=this.rtcSdp.modifyPublishOfferSdp(u?u.offerSdp:s,u?u.answerSdp:(l=a.remoteDescription)===null||l===void 0?void 0:l.sdp,t,this.getMappingSsrcs(i))}if(!(this.sdpDescMode==="plan-b")){h.next=27;break}h.next=22;return this.setLocalDescription({type:"offer",sdp:s},"modifyPublishOfferSdp");case 22:h.next=24;return this.setRemoteDescription(a.remoteDescription,"modifyPublishOfferSdp:"+this.sdpDescMode);case 24:f=s;h.next=32;break;case 27:h.next=29;return this.setLocalDescriptionShim(u.offerSdp);case 29:h.next=31;return this.setRemoteDescription({type:"answer",sdp:u.answerSdp},"modifyPublishOfferSdp:"+this.sdpDescMode);case 31:f=u.offerSdp;case 32:return h.abrupt("return",f);case 33:case"end":return h.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"addTrack",value:function(){var e=g(m().mark((function e(t,r){var n,i;var o,a,s,u,c;return m().wrap((function e(l){while(1)switch(l.prev=l.next){case 0:o=(n=this.peerConnection)===null||n===void 0?void 0:n.connection;if(o){l.next=3;break}return l.abrupt("return",undefined);case 3:if(!(this.sdpDescMode==="plan-b")){l.next=5;break}return l.abrupt("return",o.addTrack(t,r));case 5:a=(i=o.localDescription)===null||i===void 0?void 0:i.sdp;s=this.getIdleSendTransceiver(o,t.kind==="audio"?f.MediaType.TRACK_TYPE_AUDIO:f.MediaType.TRACK_TYPE_VIDEO,a);if(!s){l.next=18;break}l.next=10;return s.sender.replaceTrack(t);case 10:s.direction=s.currentDirection===d.MediaDirection.RECV_ONLY?d.MediaDirection.SEND_RECV:d.MediaDirection.SEND_ONLY;c=this.rtcSdp.modifyAnswerDirection((u=o.remoteDescription)===null||u===void 0?void 0:u.sdp,s.mid);l.next=14;return this.setLocalDescriptionShim();case 14:l.next=16;return this.setRemoteDescription({type:"answer",sdp:c},"addTrack");case 16:l.next=25;break;case 18:R.info(C,"addTrack, no available sender, addTranscevier");l.next=21;return this.addTransceiver(o,t.kind==="audio"?f.MediaType.TRACK_TYPE_AUDIO:f.MediaType.TRACK_TYPE_VIDEO);case 21:s=l.sent;l.next=24;return s.sender.replaceTrack(t);case 24:s.direction=s.currentDirection===d.MediaDirection.RECV_ONLY?d.MediaDirection.SEND_RECV:d.MediaDirection.SEND_ONLY;case 25:return l.abrupt("return",s.sender);case 26:case"end":return l.stop()}}),e,this)})));function t(t,r){return e.apply(this,arguments)}return t}()},{key:"addTransceiver",value:function(){var e=g(m().mark((function e(t,r,n){var i,o;var a,s,u;return m().wrap((function e(c){while(1)switch(c.prev=c.next){case 0:t.addTransceiver(r,{direction:d.MediaDirection.INACTIVE});c.next=3;return this.createOffer();case 3:a=c.sent;c.next=6;return this.setLocalDescriptionShim(a===null||a===void 0?void 0:a.sdp);case 6:s=this.rtcSdp.getLeastMid(a===null||a===void 0?void 0:a.sdp);u=this.rtcSdp.generateMatchedAnswerWithOffer((n===null||n===void 0?void 0:n.answerSdp)||((i=t.remoteDescription)===null||i===void 0?void 0:i.sdp),s,r);if(n){n.offerSdp=a===null||a===void 0?void 0:a.sdp;n.answerSdp=u}c.next=11;return this.setRemoteDescription({type:"answer",sdp:u},"addTransceiver");case 11:return c.abrupt("return",(o=t.getTransceivers())===null||o===void 0?void 0:o.find((function(e){return"".concat(e.mid)===s})));case 12:case"end":return c.stop()}}),e,this)})));function t(t,r,n){return e.apply(this,arguments)}return t}()},{key:"setLocalDescriptionShim",value:function(){var e=g(m().mark((function e(t){var r,n;return m().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(t){i.next=13;break}i.next=3;return this.createOffer();case 3:i.t1=n=i.sent;i.t0=i.t1===null;if(i.t0){i.next=7;break}i.t0=n===void 0;case 7:if(!i.t0){i.next=11;break}i.t2=void 0;i.next=12;break;case 11:i.t2=n.sdp;case 12:r=i.t2;case 13:i.next=15;return this.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(r||t)},"setLocalDescriptionShim");case 15:case"end":return i.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getIdleSendTransceiver",value:function e(t,r,n){var i=t.getTransceivers();var o=this.rtcSdp.getAllMidsByType(n,r);return i===null||i===void 0?void 0:i.find((function(e){return o.includes("".concat(e.mid))&&e.currentDirection!==d.MediaDirection.SEND_ONLY&&e.currentDirection!==d.MediaDirection.SEND_RECV}))}},{key:"removeTrack",value:function e(t){var r;var n=(r=this.peerConnection)===null||r===void 0?void 0:r.connection;if(!n){return}if(n.signalingState!=="closed"){n.removeTrack(t)}}},{key:"getMappingSsrcs",value:function e(t){if(!t){return undefined}var r=this.peerConnection;if(!r){return undefined}if(!r.sendSsrcsMapping||r.sendSsrcsMapping.size<1){return t}if(typeof t==="number"){if(r.sendSsrcsMapping.has(t)){return r.sendSsrcsMapping.get(t)}return t}return t.map((function(e){if(r.sendSsrcsMapping.has(e)){return r.sendSsrcsMapping.get(e)}return e}))}},{key:"createOffer",value:function(){var e=g(m().mark((function e(t){var r;var n,i;return m().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:n=(r=this.peerConnection)===null||r===void 0?void 0:r.connection;o.next=3;return n===null||n===void 0?void 0:n.createOffer(t);case 3:i=o.sent;return o.abrupt("return",i);case 5:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"iceCandidateListener",value:function e(t){n.LoggerFactory.info(C,"iceCandidate add listener");t.connection.onicecandidate=function(e){var r;n.LoggerFactory.info(C,"###onicecandidate: ".concat(n.LoggerFactory.shieldIpAddress(((r=e.candidate)===null||r===void 0?void 0:r.candidate)||"")));if(!e.candidate){return}if(!t.candidate){t.candidate=[]}t.candidate.push(e.candidate)}}},{key:"iceRestart",value:function e(t,r){var i=this;this.stats.reportConnectionStatus(0);this.createOffer({iceRestart:true}).then((function(e){var r;i.setLocalDescription({type:"offer",sdp:i.rtcSdp.transformOfferSdp(e===null||e===void 0?void 0:e.sdp)},"iceRestart");i.setRemoteDescription({sdp:(r=t.connection.remoteDescription)===null||r===void 0?void 0:r.sdp,type:"answer"},"iceRestart")}))["finally"]((function(){r&&r()}));t.connectFailedTimes++;if(t.connectFailedTimes>=1){n.LoggerFactory.error(C,"onconnectionstatechange, emit media error event.");this.eventEmitter.emit(a.HWLLSEvents.ERROR,{errCode:o.ErrorCode.HWLLS_MEDIA_NETWORK_ERROR,errDesc:o.ErrorMsg[o.ErrorCode.HWLLS_MEDIA_NETWORK_ERROR]});t.connectFailedTimes=0}}},{key:"onConnection",value:function e(t,r){var i=this;t.connection.ontrack=function(e){r(e)};t.connection.onnegotiationneeded=g(m().mark((function e(){var t;var r,n;return m().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:R.info("onnegotiationneeded");o.next=3;return i.createOffer({offerToReceiveAudio:true,offerToReceiveVideo:true});case 3:r=o.sent;if(r){o.next=6;break}return o.abrupt("return");case 6:n=i.rtcSdp.transformOfferSdp(r===null||r===void 0?void 0:r.sdp);o.next=9;return i.setLocalDescription({type:"offer",sdp:n},"onnegotiationneeded");case 9:(t=i.innerChanel)===null||t===void 0||t.send(l.CmdMsgPacketUtils.msgBodyToArrayBuffer(JSON.stringify({type:"offer",msg:n})));case 10:case"end":return o.stop()}}),e)})));t.connection.onconnectionstatechange=function(){n.LoggerFactory.info(C,"onconnectionstatechange, connect state is: ".concat(t.connection.connectionState));i.eventEmitter.emit(a.HWLLSEvents.MEDIA_CONNECTION_STATE_CHANGED,t.connection.connectionState);if(t.connection.connectionState==="connected"){var e;(e=u.GlobalVariableManager.getInstance(i.connectionId))===null||e===void 0||e.updatePlayTrackKpi("dtlsComplete");clearTimeout(t.connectionStatisticTimeOut);i.eventEmitter.emit("STARTUP_MEDIA_STATS");i.eventEmitter.emit(a.HWLLSEvents.PEER_JOIN)}if(["closed","disconnected","failed"].includes(t.connection.connectionState)){i.eventEmitter.emit(a.HWLLSEvents.STREAM_REMOVED);i.eventEmitter.emit(a.HWLLSEvents.PEER_LEAVE)}};t.connection.oniceconnectionstatechange=g(m().mark((function e(){var r,o,a;return m().wrap((function e(c){while(1)switch(c.prev=c.next){case 0:n.LoggerFactory.info(C,"oniceconnectionstatechange, iceConnectionState: ".concat(t.connection.iceConnectionState));if(!(t.connection.iceConnectionState==="disconnected")){c.next=6;break}if(!t.disConnectDelayHandleTimer){c.next=4;break}return c.abrupt("return");case 4:t.disConnectDelayHandleTimer=setTimeout((function(){n.LoggerFactory.info(C,"oniceconnectionstatechange, disConnect state delay handler, go iceRestart: ".concat(t.connection.iceConnectionState));i.iceRestart(t,(function(){clearTimeout(t.disConnectDelayHandleTimer);delete t.disConnectDelayHandleTimer}))}),5e3);return c.abrupt("return");case 6:clearTimeout(t.disConnectDelayHandleTimer);delete t.disConnectDelayHandleTimer;if(!(t.connection.iceConnectionState==="failed"||t.connection.iceConnectionState==="closed")){c.next=13;break}n.LoggerFactory.info(C,"[KPI] oniceconnectionstatechange, iceconnect failed, go iceRestart: ".concat(t.connection.iceConnectionState));i.iceRestart(t);c.next=24;break;case 13:if(!["connected","completed"].includes(t.connection.iceConnectionState)){c.next=23;break}n.LoggerFactory.info(C,"[KPI] oniceconnectionstatechange, iceconnect state: ".concat(t.connection.iceConnectionState));(r=u.GlobalVariableManager.getInstance(i.connectionId))===null||r===void 0||r.updatePlayTrackKpi("iceComplete");t.connectFailedTimes=0;c.next=19;return s.MediaStats.getCandidatePairProtocol(i.connectionId);case 19:o=c.sent;i.stats.reportConnectionStatus(1,o);c.next=24;break;case 23:if(t.connection.iceConnectionState==="checking"){n.LoggerFactory.info(C,"[KPI] oniceconnectionstatechange, iceconnect state: ".concat(t.connection.iceConnectionState));(a=u.GlobalVariableManager.getInstance(i.connectionId))===null||a===void 0||a.updatePlayTrackKpi("iceChecking")}case 24:case"end":return c.stop()}}),e)})))}},{key:"iceAddressCollect",value:function(){var e=g(m().mark((function e(t){var r,i=this;var o;return m().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:o=6e3;n.LoggerFactory.info(C,"[KPI] begin to do ice candidate");(r=u.GlobalVariableManager.getInstance(this.connectionId))===null||r===void 0||r.updatePlayTrackKpi("iceCandidateStart");a.next=5;return new Promise((function(e){var r;var a=function o(){n.LoggerFactory.info(C,"[KPI] ICE collect status: ".concat(t.iceGatheringState));if(t.iceGatheringState==="complete"){var s;clearTimeout(r);n.LoggerFactory.info(C,"[KPI] ICE collect complete");(s=u.GlobalVariableManager.getInstance(i.connectionId))===null||s===void 0||s.updatePlayTrackKpi("iceCandidateComplete");t.removeEventListener("icegatheringstatechange",a);e()}};t.addEventListener("icegatheringstatechange",a);r=setTimeout((function(){n.LoggerFactory.error(C,"[KPI] ICE collect fail");clearTimeout(r);t.removeEventListener("icegatheringstatechange",a);e()}),o)}));case 5:case"end":return a.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"createPeerConnection",value:function e(){var t=this;var r={rtcpMuxPolicy:"require",bundlePolicy:"max-bundle"};if(this.peerConnection){var n;(n=this.peerConnection.connection)===null||n===void 0||n.close()}var i=new RTCPeerConnection(r);this.peerConnection={connection:i,connectFailedTimes:0,sendSsrcsMapping:new Map};this.iceCandidateListener(this.peerConnection);this.eventEmitter.removeAllListeners("STARTUP_MEDIA_STATS");this.eventEmitter.once("STARTUP_MEDIA_STATS",(function(){R.info("startUp Media Stats");s.MediaStats.startUpMediaStats(t)}));this.peerConnection.connectionStatisticTimeOut=setTimeout((function(){var e;clearTimeout((e=t.peerConnection)===null||e===void 0?void 0:e.connectionStatisticTimeOut);t.eventEmitter.emit("STARTUP_MEDIA_STATS")}),6e3);return this.peerConnection}},{key:"setRemoteDescription",value:function e(t,r){var n,i;R.info("setRemoteDescription",r,t);var o=this.getSfuInfoFromSdp(t.sdp||"");(n=u.GlobalVariableManager.getInstance(this.connectionId))===null||n===void 0||n.setSfuInfo(o);return(i=this.peerConnection)===null||i===void 0||(i=i.connection)===null||i===void 0?void 0:i.setRemoteDescription(t)}},{key:"setLocalDescription",value:function e(t,r){var n,i;R.info("setLocalDescription",r,t);var o=this.getSfuInfoFromSdp(t.sdp||"");(n=u.GlobalVariableManager.getInstance(this.connectionId))===null||n===void 0||n.setLocalSfuInfo(o);return(i=this.peerConnection)===null||i===void 0?void 0:i.connection.setLocalDescription(t)}}])}();I([(0,p.printfDecorator)(R)],k.prototype,"initConnectionAndSdp",null);I([(0,p.printfDecorator)(R)],k.prototype,"getLocalSDP",null);I([(0,p.printfDecorator)(R)],k.prototype,"handleAnswerSdpFromServer",null);I([(0,p.printfDecorator)(R)],k.prototype,"addTransceiver",null);I([(0,p.printfDecorator)(R)],k.prototype,"createOffer",null);I([(0,p.printfDecorator)(R)],k.prototype,"setRemoteDescription",null)}))},4878:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8024),r(9974),r(7354),r(2216)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;n=o(n);function o(e){return e&&e.__esModule?e:{default:e}}function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(){"use strict";l=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,c,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){f(o,n,i,a,s,"next",e)}function s(e){f(o,n,i,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g="httpRequest";var b=function(){function e(){h(this,e);this.defaultRequestOption={method:"GET",mode:"cors",cache:"default",referrerPolicy:"strict-origin-when-cross-origin"}}return v(e,[{key:"fetch",value:function(){var e=d(l().mark((function e(r){var o,a,s,u,c,f,d,h,p,v,m,y=arguments;return l().wrap((function e(l){while(1)switch(l.prev=l.next){case 0:o=y.length>1&&y[1]!==undefined?y[1]:{};a=y.length>2&&y[2]!==undefined?y[2]:{};s=y.length>3&&y[3]!==undefined?y[3]:i.configs.REQUEST_DEFAULT_TIMEOUT;u=y.length>4&&y[4]!==undefined?y[4]:1;c=y.length>5?y[5]:undefined;f="";d=null;u=u||1;h=null;p=0;case 10:if(!(p<u)){l.next=42;break}v=0;case 12:if(!(v<r.length)){l.next=40;break}m={};f=n["default"].generateRandomId(16,10);t.LoggerFactory.debug(g,"[HTTP_ID:".concat(f,"] fetch request start: ").concat(t.LoggerFactory.shieldUrlParameters(r[v])));l.prev=16;this.extendInfosHandle(r[v],"start",m,c);l.next=20;return this.doFetch(r[v],o,a,s,f);case 20:h=l.sent;this.extendInfosHandle(r[v],"end",m,c,h);t.LoggerFactory.debug(g,"[HTTP_ID:".concat(f,"] fetch request success"));l.next=35;break;case 25:l.prev=25;l.t0=l["catch"](16);t.LoggerFactory.error(g,"[HTTP_ID:".concat(f,"], requestUrl: ").concat(t.LoggerFactory.shieldUrlParameters(r[v]),", fetch request failed"));this.extendInfosHandle(r[v],"end",m,c,l.t0);if(!(v>=r.length-1)){l.next=34;break}p++;if(!(p<u)){l.next=34;break}l.next=34;return n["default"].sleep(n["default"].getRandom()*500+500);case 34:d=l.t0;case 35:if(!h){l.next=37;break}return l.abrupt("return",h);case 37:v++;l.next=12;break;case 40:l.next=10;break;case 42:if(!d){l.next=44;break}throw d;case 44:return l.abrupt("return",h);case 45:case"end":return l.stop()}}),e,this,[[16,25]])})));function r(t){return e.apply(this,arguments)}return r}()},{key:"doFetch",value:function e(i){var o=this;var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var c=arguments.length>3?arguments[3]:undefined;var l=arguments.length>4?arguments[4]:undefined;var f;var d;var h;if(AbortController){d=new AbortController;h=d.signal}var p=new Promise((function(e,t){f=setTimeout((function(){clearTimeout(f);t(new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_SERVER_NO_RESPONSE));d&&d.abort()}),c)}));var v=new Promise((function(e,c){var d;if(h){d=fetch(i,u(u(u(u({},o.defaultRequestOption),a),{headers:s}),{signal:h}))}else{d=fetch(i,u(u(u({},o.defaultRequestOption),a),{headers:s}))}d.then((function(o){if(/webrtc\/v1\/pullstream/gi.test(i)){n["default"].syncLocalTime(o.headers.get("Date"))}if(!o.ok){t.LoggerFactory.error(g,"[HTTP_ID:".concat(l,"] doFetch failed: ").concat(o.status));if(o.status>=500||o.status===0){c(new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_SERVER_CONNECT_FAIL,"".concat(o.status," _ ").concat(o.statusText||"fetch failed",".")))}else{e({httpCode:o.status})}return}var a;var u=o.headers.get("Content-Type")||s["Content-Type"];if(/.*application\/json.*/.test(u)){var f=Number(o.headers.get("content-length"));a=f>0?o.json():Promise.resolve()}else if(/^text.*/.test(u)){a=o.text()}else{a=o.arrayBuffer()}a.then((function(t){e({httpCode:o.status,data:t})}))["catch"]((function(e){t.LoggerFactory.error(g,"[HTTP_ID:".concat(l,"], requestUrl: ").concat(t.LoggerFactory.shieldUrlParameters(i),", doFetch get response failed: ").concat(e));c(new r.HwLLSError(r.ErrorCode.HWLLS_INTERNAL_ERROR,e.message||"get respone error."))}))}))["catch"]((function(e){t.LoggerFactory.error(g,"[HTTP_ID:".concat(l,"], requestUrl: ").concat(t.LoggerFactory.shieldUrlParameters(i),", doFetch failed for exception: ").concat(e));c(new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_SERVER_CONNECT_FAIL,e.getMsg?e.getMsg():e.message))}))["finally"]((function(){clearTimeout(f)}))}));return Promise.race([p,v])}},{key:"extendInfosHandle",value:function e(i,o,a,s,u){if(s){if(o==="start"){Object.assign(a,{id:s.length+1,domain:i,start_ms:n["default"].getCurrentLocalTimestamp(),end_ms:0,rspCode:"",errMsg:""})}else if(o==="end"){if(u instanceof r.HwLLSError){a.end_ms=n["default"].getCurrentLocalTimestamp();a.rspCode=u.getCode();a.errMsg=u.getMsg()}else{a.end_ms=n["default"].getCurrentLocalTimestamp();a.rspCode=u.httpCode}a.delay_ms=a.end_ms-a.start_ms;s.push(a)}else{t.LoggerFactory.info(g,"cannot handle")}}}}])}();var _=new b;var S=e["default"]=_}))},5020:(e,t,r)=>{var n=function(e){return String(Number(e))===e?Number(e):e};var i=function(e,t,r,i){if(i&&!r){t[i]=n(e[1])}else{for(var o=0;o<r.length;o+=1){if(e[o+1]!=null){t[r[o]]=n(e[o+1])}}}};var o=function(e,t,r){var n=e.name&&e.names;if(e.push&&!t[e.push]){t[e.push]=[]}else if(n&&!t[e.name]){t[e.name]={}}var o=e.push?{}:n?t[e.name]:t;i(r.match(e.reg),o,e.names,e.name);if(e.push){t[e.push].push(o)}};var a=r(5602);var s=RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse=function(e){var t={},r=[],n=t;e.split(/(\r\n|\r|\n)/).filter(s).forEach((function(e){var t=e[0];var i=e.slice(2);if(t==="m"){r.push({rtp:[],fmtp:[]});n=r[r.length-1]}for(var s=0;s<(a[t]||[]).length;s+=1){var u=a[t][s];if(u.reg.test(i)){return o(u,n,i)}}}));t.media=r;return t};var u=function(e,t){var r=t.split(/=(.+)/,2);if(r.length===2){e[r[0]]=n(r[1])}else if(r.length===1&&t.length>1){e[r[0]]=undefined}return e};t.parseParams=function(e){return e.split(/;\s?/).reduce(u,{})};t.parseFmtpConfig=t.parseParams;t.parsePayloads=function(e){return e.toString().split(" ").map(Number)};t.parseRemoteCandidates=function(e){var t=[];var r=e.split(" ").map(n);for(var i=0;i<r.length;i+=3){t.push({component:r[i],ip:r[i+1],port:r[i+2]})}return t};t.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(u,{})}))};t.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var t,r=false;if(e[0]!=="~"){t=n(e)}else{t=n(e.substring(1,e.length));r=true}return{scid:t,paused:r}}))}))}},5113:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyB=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.ChromaKeyB=function(){function e(t){n(this,e);a(this,"gl",void 0);a(this,"keyColor",void 0);a(this,"opts",void 0);a(this,"texLoc",void 0);a(this,"texWidthLoc",void 0);a(this,"texHeightLoc",void 0);a(this,"keyColorLoc",void 0);a(this,"similarityLoc",void 0);a(this,"smoothnessLoc",void 0);a(this,"spillLoc",void 0);a(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return o(e,[{key:"dealVideoFrame",value:function e(r){if(!this.keyColor){this.keyColor=t.ChromaKeyA.handleGetKeyColor(r)}if(!this.gl){var n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n}var i=this.gl;i.viewport(0,0,r.videoWidth,r.videoHeight);i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,r);i.uniform1i(this.texLoc,0);i.uniform1f(this.texWidthLoc,r.videoWidth);i.uniform1f(this.texHeightLoc,r.videoHeight);i.uniform3fv(this.keyColorLoc,this.keyColor.map((function(e){return e/255})));i.uniform1f(this.similarityLoc,this.opts.similarity);i.uniform1f(this.smoothnessLoc,this.opts.smoothness);i.uniform1f(this.spillLoc,this.opts.spill);i.drawArrays(i.TRIANGLE_FAN,0,4);return createImageBitmap(this.optCvs,{imageOrientation:"none"})}},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{premultipliedAlpha:false,alpha:true})||r.getContext("webgl",{premultipliedAlpha:false,alpha:true});if(!n){throw Error("Cant create gl context")}var i=n.createShader(n.VERTEX_SHADER);n.shaderSource(i,e.vertexShader);n.compileShader(i);var o=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(o,e.fragmentShader);n.compileShader(o);var a=n.createProgram();n.attachShader(a,i);n.attachShader(a,o);n.linkProgram(a);n.useProgram(a);var s=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,s);n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,1,-1,-1,1,-1,1,1]),n.STATIC_DRAW);var u=n.getAttribLocation(a,"c");n.vertexAttribPointer(u,2,n.FLOAT,false,0,0);n.enableVertexAttribArray(u);n.activeTexture(n.TEXTURE0);var c=n.createTexture();n.bindTexture(n.TEXTURE_2D,c);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR);this.texLoc=n.getUniformLocation(a,"tex");this.texWidthLoc=n.getUniformLocation(a,"texWidth");this.texHeightLoc=n.getUniformLocation(a,"texHeight");this.keyColorLoc=n.getUniformLocation(a,"keyColor");this.similarityLoc=n.getUniformLocation(a,"similarity");this.smoothnessLoc=n.getUniformLocation(a,"smoothness");this.spillLoc=n.getUniformLocation(a,"spill");return n}}])}();a(c,"vertexShader","attribute vec2 c; void main(void) { gl_Position=vec4(c, 0.0, 1.0); }");a(c,"fragmentShader","\nprecision mediump float;\nuniform sampler2D tex;\nuniform float texWidth;\nuniform float texHeight;\nuniform vec3 keyColor;\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\nvec4 GetRgba(float detaX, float detaY) {\n vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);\n vec4 rgba = texture2D(tex, texCoord);\n float green = rgba.g - max(rgba.r, rgba.b);\n float greenKey = keyColor.g - max(keyColor.r, keyColor.b);\n float mask = smoothstep(greenKey-0.1, 0.0, green);\n rgba.a = mask;\n return rgba;\n}\nvec4 ProcessChromaKey() {\n vec4 rgba = GetRgba(0.0, 0.0);\n if (rgba.a > 0.0 && rgba.a < 1.0) {\n vec4 rgbas[9];\n float maxMask = 0.0;\n vec4 minRgba = rgba;\n for (int i = -1; i <= 1; i++) {\n for (int j = -1; j <= 1; j++) {\n vec4 tmp;\n if (i == 0 && j == 0) {\n tmp = rgba;\n } else {\n tmp = GetRgba(float(i), float(j));\n }\n rgbas[(i+1)*3 + (j+1)] = tmp;\n if (tmp.a > maxMask) {\n maxMask = tmp.a;\n minRgba = tmp;\n }\n }\n }\n rgbas[4] = minRgba;\n rgbas[4].a = rgba.a;\n vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);\n\n float gs[9];\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.05;\n gs[4] = 0.6;\n for(int i = 0; i < 9; i++) {\n dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];\n }\n\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.15;\n gs[4] = 0.2;\n for(int i = 0; i < 9; i++) {\n dest.a = dest.a + rgbas[i].a* gs[i];\n }\n rgba.rgb = dest.rgb;\n rgba.a = dest.a;\n if (rgba.g > rgba.r && rgba.g > rgba.b) {\n rgba.g = max(rgba.r, rgba.b);\n }\n rgba.rgb = rgba.rgb * rgba.a;\n } else {\n rgba.rgb = rgba.rgb * rgba.a;\n }\n return rgba;\n}\n\nvoid main(void) {\n gl_FragColor = ProcessChromaKey();\n}")}))},5162:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getLocalRecorderUrl=void 0;var t="class LocalRecorder extends AudioWorkletProcessor {\n constructor(e) {\n super(e);\n const bufferSize = e.processorOptions.bufferSize;\n this.bufferSize = bufferSize;\n this.buffer = new Float32Array(bufferSize * 2);\n this.pos = 0;\n this.total = 0;\n this.id = Date.now();\n this.port.onmessage = function (e) {\n if (e.data.kill) {\n this.kill = true;\n }\n };\n }\n\n process(inputs) {\n const input = (inputs[0] || [])[0] || [];\n if (input.length) {\n this.buffer.set(input, this.pos);\n this.pos += input.length;\n const offset = ~~(this.pos / this.bufferSize) * this.bufferSize;\n if (offset) {\n this.port.postMessage(this.formatData(this.buffer.slice(0, offset)));\n const nextBuffer = this.buffer.subarray(offset, this.pos);\n this.buffer = new Float32Array(this.bufferSize * 2);\n this.buffer.set(nextBuffer);\n this.pos = nextBuffer.length;\n }\n }\n return !this.kill;\n }\n\n formatData(float32Arr) {\n const size = float32Arr.length;\n const pcm = new Int16Array(size);\n let sum = 0;\n for (let j = 0; j < size; j++) { // floatTo16BitPCM\n let s = Math.max(-1, Math.min(1, float32Arr[j]));\n s = s < 0 ? s * 0x8000 : s * 0x7FFF;\n pcm[j] = s;\n sum += Math.abs(s);\n }\n this.total+=pcm.byteLength;\n return { pcm, sum, total: this.total, recordId: this.id };\n }\n}\nregisterProcessor('LocalRecorderProcessor', LocalRecorder);";var r=e.getLocalRecorderUrl=function e(){return"data:text/javascript;base64,".concat(btoa(t))}}))},5246:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Clipboard=void 0;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=s(e,"string");return"symbol"==a(t)?t:t+""}function s(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}var f=(0,t.getPLogger)();var d=function e(t){var r=document.createElement("textarea");r.value=t;document.body.appendChild(r);r.focus();r.select();var n=true;try{document.execCommand("copy")}catch(e){f.error("execCommand copy error",e);n=false}document.body.removeChild(r);return n};var h=function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e){navigator.clipboard.writeText(t).then((function(){e(true)}),(function(t){f.error("writeText error",t);e(false)}))})));case 1:case"end":return r.stop()}}),e)})));return function t(r){return e.apply(this,arguments)}}();var p=e.Clipboard=function(){function e(){r(this,e)}return i(e,null,[{key:"copyTextToClipboard",value:function(){var e=l(u().mark((function e(t){var r;return u().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=false;if(!(navigator.clipboard&&window.isSecureContext)){n.next=5;break}n.next=4;return h(t);case 4:r=n.sent;case 5:if(!r){r=d(t)}return n.abrupt("return",new Promise((function(e,t){if(r){e()}else{t()}})));case 7:case"end":return n.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},5268:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StreamType=e.MediaType=e.ContentType=void 0;var t;(function(e){e["TRACK_TYPE_AUDIO"]="audio";e["TRACK_TYPE_VIDEO"]="video"})(t||(e.MediaType=t={}));var r;(function(e){e["STREAM_TYPE_MAIN"]="main"})(r||(e.StreamType=r={}));var n;(function(e){e["main"]="main";e["middle1"]="middle1";e["middle2"]="middle2";e["middle3"]="middle3";e["middle4"]="middle4";e["slides"]="slides";e["desktop"]="desktop"})(n||(e.ContentType=n={}))}))},5442:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(9974),r(7354),r(9611),r(8024),r(260),r(8441),r(5268),r(6334),r(4341)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HLLSTrack=void 0;r=f(r);function f(e){return e&&e.__esModule?e:{default:e}}function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=b(e,"string");return"symbol"==a(t)?t:t+""}function b(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _(e,t,r){return t=T(t),S(e,w()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}function S(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function t(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var C="HLLSTrack";var k=e.HLLSTrack=function(e){function a(e){var t;v(this,a);t=_(this,a,[e]);t.trackId_=r["default"].generateStandardUuid();if(t.trackType_===u.MediaType.TRACK_TYPE_AUDIO){t.audioStart=function(){t.event_.emit(n.HWLLSEvents.AUDIO_START)}}else{t.videoStart=function(){t.event_.emit(n.HWLLSEvents.VIDEO_START)};t.fullScreenStatusHandler=function(e){t.event_.emit(n.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,e)}}t.statusTraceReporter_=function(e){t.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,e)};return t}I(a,e);return y(a,[{key:"replaceTrack",value:function(){var e=p(d().mark((function e(t){var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:if(t){n.next=2;break}return n.abrupt("return");case 2:(r=this.player_)===null||r===void 0||r.replaceTrack(t);this.track_=t;this.track_.enabled=!this.trackMuted_;case 5:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"removeTrack",value:function e(){this.player_&&this.player_.stop();delete this.track_}},{key:"play",value:function(){var e=p(d().mark((function e(r,n,o){var a,s;return d().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:a=this.getTrackType();i.LoggerFactory.info(C,"".concat(a," track begin play, elementId: ").concat(n,", playerDiv.id: ").concat(r.id,", options: ").concat(JSON.stringify(o)," "));if(!(this.playState_===1)){u.next=5;break}i.LoggerFactory.info(C,"".concat(a," track is playing, return "));return u.abrupt("return",{trackType:a});case 5:if(this.track_){u.next=8;break}i.LoggerFactory.error(C,"".concat(a," track is empty"));return u.abrupt("return",{trackType:a,error:new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR,"".concat(a," track is empty"))});case 8:this.elementId_=n;this.initPlyer(r,o);this.addPlayerEvent();i.LoggerFactory.info(C,"play ".concat(a," track start"));this.playState_=1;u.prev=13;u.next=16;return this.player_.play();case 16:return u.abrupt("return",{trackType:a});case 19:u.prev=19;u.t0=u["catch"](13);s=u.t0 instanceof t.HwLLSError&&/.*timeout.*/i.test(u.t0.getMsg());i.LoggerFactory[s?"warn":"error"](C,"play ".concat(a," failed: ").concat(u.t0," "));if(!s){this.playState_=2}return u.abrupt("return",{trackType:a,error:u.t0});case 25:case"end":return u.stop()}}),e,this,[[13,19]])})));function r(t,r,n){return e.apply(this,arguments)}return r}()},{key:"initPlyer",value:function e(t,r){switch(this.trackType_){case u.MediaType.TRACK_TYPE_AUDIO:{if(!this.player_){i.LoggerFactory.info(C,"create AudioPlayer");this.player_=new s.RTCAudioPlayer({playerDiv:t,playerId:"player",track:this.track_,muted:r===null||r===void 0?void 0:r.muted,volume:this.audioVolume_,autoPlay:r===null||r===void 0?void 0:r.autoPlay})}break}case u.MediaType.TRACK_TYPE_VIDEO:{this.objectFit_=r===null||r===void 0?void 0:r.objectFit;if(!this.player_){i.LoggerFactory.info(C,"create VideoPlayer");this.player_=new o.RTCVideoPlayer({parentDiv:t,playerId:"player",track:this.track_,objectFit:r===null||r===void 0?void 0:r.objectFit,autoPlay:r===null||r===void 0?void 0:r.autoPlay,poster:r===null||r===void 0?void 0:r.poster})}break}default:break}}},{key:"addPlayerEvent",value:function e(){if(this.trackType_===u.MediaType.TRACK_TYPE_AUDIO){this.player_.off(n.HWLLSEvents.AUDIO_START,this.audioStart);this.player_.on(n.HWLLSEvents.AUDIO_START,this.audioStart)}else{this.player_.off(n.HWLLSEvents.VIDEO_START,this.videoStart);this.player_.on(n.HWLLSEvents.VIDEO_START,this.videoStart);this.player_.off(n.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,this.fullScreenStatusHandler);this.player_.on(n.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,this.fullScreenStatusHandler)}this.player_.off(l.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_);this.player_.on(l.RTCStreamEvent.PLAYER_STATE_TRACE,this.statusTraceReporter_)}},{key:"stop",value:function e(){if(!this.player_){i.LoggerFactory.info(C,"".concat(this.getTrackType()," player is null"));return}if(this.trackType_===u.MediaType.TRACK_TYPE_AUDIO){this.player_.off(n.HWLLSEvents.AUDIO_START,this.audioStart)}else{this.player_.off(n.HWLLSEvents.VIDEO_START,this.videoStart)}this.player_.stop();this.player_=null;this.trackMuted_=false;i.LoggerFactory.info(C,"".concat(this.getTrackType()," stop player success"));this.elementId_="";i.LoggerFactory.info(C,"".concat(this.getTrackType()," close success"));this.playState_=2}},{key:"resume",value:function(){var e=p(d().mark((function e(){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(this.player_){r.next=3;break}i.LoggerFactory.info(C,"".concat(this.getTrackType()," player is null"));throw new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR,"".concat(this.getTrackType()," player is null"));case 3:r.prev=3;r.next=6;return this.player_.resume();case 6:r.next=12;break;case 8:r.prev=8;r.t0=r["catch"](3);i.LoggerFactory.error(C,"".concat(this.getTrackType()," resume failed: ").concat(r.t0," "));throw r.t0;case 12:case"end":return r.stop()}}),e,this,[[3,8]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"pause",value:function e(){if(!this.player_){i.LoggerFactory.info(C,"".concat(this.getTrackType()," player is null"));throw new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR,"".concat(this.getTrackType()," player is null"))}this.player_.pause()}},{key:"setAudioOutput",value:function(){var e=p(d().mark((function e(r){var n;return d().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:if(this.player_){o.next=3;break}i.LoggerFactory.info(C,"".concat(this.getTrackType()," player is null"));throw new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR,"".concat(this.getTrackType()," player is null"));case 3:o.next=5;return(n=this.player_)===null||n===void 0?void 0:n.setSinkId(r);case 5:case"end":return o.stop()}}),e,this)})));function r(t){return e.apply(this,arguments)}return r}()},{key:"unmuteTrack",value:function e(){if(this.track_){this.track_.enabled=true}if(this.player_.isMuted&&this.player_.isMuted()){this.player_.setVolume()}this.trackMuted_=false}},{key:"muteAudio",value:function e(t){this.player_.muteAudio(t)}},{key:"replay",value:function(){var e=p(d().mark((function e(){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(this.player_){r.next=3;break}i.LoggerFactory.info(C,"".concat(this.getTrackType()," player is null"));throw new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR,"".concat(this.getTrackType()," player is null"));case 3:this.addPlayerEvent();i.LoggerFactory.info(C,"rePlay ".concat(this.getTrackType()," track start"));this.playState_=1;r.prev=6;r.next=9;return this.player_.play();case 9:r.next=16;break;case 11:r.prev=11;r.t0=r["catch"](6);i.LoggerFactory.error(C,"replay".concat(this.getTrackType(),", replay failed: ").concat(r.t0));this.playState_=2;throw r.t0;case 16:case"end":return r.stop()}}),e,this,[[6,11]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"exitFullScreen",value:function e(){var t;if(this.trackType_===u.MediaType.TRACK_TYPE_AUDIO){return}(t=this.player_)===null||t===void 0||t.exitFullScreen()}},{key:"enterFullScreen",value:function e(){var t;if(this.trackType_===u.MediaType.TRACK_TYPE_AUDIO){return}(t=this.player_)===null||t===void 0||t.enterFullScreen()}}])}(c.BaseTrack)}))},5457:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ValidatorUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u=e.ValidatorUtil=function(){function e(){n(this,e)}return o(e,null,[{key:"checkStringParameter",value:function e(r){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Infinity;var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var o=arguments.length>3?arguments[3]:undefined;if(!r&&i<=0){return true}if(typeof r!=="string"){throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"invalid type: ".concat(r))}var a=this.getStringBytes(r);if(a>n||a<i){throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"invalid length: ".concat(r))}if(o){var s=new RegExp(o);var u=s.test(r);if(!u){throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"invalid format: ".concat(r))}}return true}},{key:"checkPlayOpt",value:function e(t){if(!t.elementId){return false}if(Object.prototype.hasOwnProperty.call(t,"objectFit")&&!["cover","contain","fill"].includes(t.objectFit||"")){return false}return!!t.p2pUserId}},{key:"getStringBytes",value:function e(t){if(!t){return 0}var r=0;if(window.TextEncoder){var n=new TextEncoder;r=n.encode(t).length;return r}var i=t.length;for(var o=0;o<i;o++){if(t.charCodeAt(o)>255){r+=2}else{r++}}return r}}])}()}))},5472:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2216),r(9974),r(8024),r(7354),r(4878)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;i=a(i);o=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){"@babel/helpers - typeof";return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e){return d(e)||f(e)||l(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){if(e){if("string"==typeof e)return h(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return h(e)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(){"use strict";p=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,a)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,u){var c=d(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function v(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){v(o,n,i,a,s,"next",e)}function s(e){v(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=S(e,"string");return"symbol"==s(t)?t:t+""}function S(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=1e4;var w=50;var T="HWLLSReport";var I=function(){function e(){y(this,e);this.records=[]}return b(e,[{key:"addRecord",value:function(){var e=m(p().mark((function e(t){return p().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:this.records.push(t);if(this.records.length>E){this.records.splice(0,this.records.length-E)}case 2:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"immediateReportRecords",value:function e(){if(this.records.length!==0&&i["default"].getAreaDetectionCompleted()){this.reportRecords(this.records)}}},{key:"sendRequest",value:function(){var e=m(p().mark((function e(a,s){var c,l,f;return p().wrap((function e(d){while(1)switch(d.prev=d.next){case 0:d.prev=0;l=this.getReportUrl();d.next=4;return o["default"].fetch([l],{method:"POST",body:JSON.stringify({request_id:i["default"].generateStandardUuid(),timestamp:Math.round(i["default"].getCurrentSyncTimestamp()/1e3),logs:a})},{"Content-Type":"application/json;charset=UTF-8",Authorization:t.configs.OPS_AUTH_TOKEN});case 4:f=d.sent;if(!(f.httpCode&&((c=f.data)===null||c===void 0?void 0:c.Code)!==0)){d.next=8;break}n.LoggerFactory.error(T,"sendRequest and get fail Respone: ".concat(JSON.stringify(f)));throw new r.HwLLSError(r.ErrorCode.HWLLS_INTERNAL_ERROR);case 8:d.next=14;break;case 10:d.prev=10;d.t0=d["catch"](0);n.LoggerFactory.error(T,"sendRequest failed");s.push.apply(s,u(a));case 14:case"end":return d.stop()}}),e,this,[[0,10]])})));function a(t,r){return e.apply(this,arguments)}return a}()},{key:"reportRecords",value:function(){var e=m(p().mark((function e(t){var r=this;var n,i;return p().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:n=[];i=[];do{i.push(this.sendRequest(t.splice(0,w),n))}while(t.length>0);Promise.all(i)["finally"]((function(){var e;(e=r.records).push.apply(e,n);n.length=0;if(r.records.length>E){r.records.splice(0,r.records.length-E)}}));case 4:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getReportUrl",value:function e(){return"https://".concat(t.configs.OPS_REPORT_DOMAIN,"/v2/log/log_report?service=LLL")}}])}();var R=new I;var C=e["default"]=R}))},5575:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.FunctionUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u=e.FunctionUtil=function(){function e(){n(this,e)}return o(e,null,[{key:"callWithTimeout",value:function e(r,n){var i;var o=new Promise((function(e,t){i=t}));var a;if(n){a=setTimeout((function(){clearTimeout(a);i(new t.HwLLSError(t.ErrorCode.HWLLS_INTERNAL_ERROR))}),n)}return Promise.race([r,o])["finally"]((function(){clearTimeout(a)}))}}])}()}))},5602:e=>{var t=e.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return e.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return e.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return e.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";t+=e.raddr!=null?" raddr %s rport %d":"%v%v";t+=e.tcptype!=null?" tcptype %s":"%v";if(e.generation!=null){t+=" generation %d"}t+=e["network-id"]!=null?" network-id %d":"%v";t+=e["network-cost"]!=null?" network-cost %d":"%v";return t}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";if(e.attribute!=null){t+=" %s";if(e.value!=null){t+=":%s"}}return t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return e.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)"+"[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)"+"(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:"+"(send|recv) ([a-zA-Z0-9\\-_~;,]+)"+"(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?"+"$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(e.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";t+=e.id!=null?"id=%s %s":"%v%s";t+=e.mediaClockValue!=null?"=%s":"";t+=e.rateNumerator!=null?" rate=%s":"";t+=e.rateDenominator!=null?"/%s":"";return t}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(t).forEach((function(e){var r=t[e];r.forEach((function(e){if(!e.reg){e.reg=/(.*)/}if(!e.format){e.format="%s"}}))}))},5651:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7007),r(9611),r(9974),r(8024),r(1960),r(7354),r(5969),r(3652),r(1762),r(4341)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RTCPlayer=void 0;a=h(a);s=d(s);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function e(n){return n?r:t})(e)}function d(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=p(e)&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n["default"]=e,r&&r.set(e,n),n}function h(e){return e&&e.__esModule?e:{default:e}}function p(e){"@babel/helpers - typeof";return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function v(){"use strict";v=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};c(E,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,a)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==p(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=d;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?y:h,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(p(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=c(S,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,c(e,u,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),c(I,u,"Generator"),c(I,a,(function(){return this})),c(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e){var t=E(e,"string");return"symbol"==p(t)?t:t+""}function E(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var w=new u.Log({module:"RTCPlayer"});var T=e.RTCPlayer=function(){function e(r){var n=this;g(this,e);w.info("constructor",r);this.module_="RTCPlayer";this.mediaStream_=new MediaStream;this.track_=r.track;this.playerDiv_=r.playerDiv;this.playerId_=r.playerId;this.playerElement_=null;this.state_="NONE";this.manualPauseFlag_=false;this.event_=new t.EventEmitter;this.pauseCount=0;this.customEvent=document.createEvent("CustomEvent");this.customEvent.initEvent("appPause");this.listenHandlers={canPlayHandler:this.canPlayHandler.bind(this),playingHandler:this.playingHandler.bind(this),playerEndedHandler:this.playerEndedHandler.bind(this),playerPausedHandler:this.playerPausedHandler.bind(this),trackEndedHandler:this.trackEndedHandler.bind(this),trackMutedHandler:this.trackMutedHandler.bind(this),trackUnmutedHandler:this.trackUnmutedHandler.bind(this),playHandler:null,backgroundHandler:this.backgroundHandler.bind(this),foregroundHandler:this.foregroundHandler.bind(this),appPauseHandler:this.appPauseHandler.bind(this),playInterruptHandler:null};this.deBounceHandlers={videoHandler:a["default"].debounce((function(){i.LoggerFactory.debug("".concat(n.module_,"#").concat(n.playerId_),"handleEvents, player is paused");n.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.PLAYER_PAUSE,type:"".concat(n.module_),streamId:n.playerId_});n.state_="PAUSED";i.LoggerFactory.debug("".concat(n.module_,"#").concat(n.playerId_),"try to play again");n.event_.emit("videoCanPlay")}),800,false),audioHandler:a["default"].debounce((function(){i.LoggerFactory.debug("".concat(n.module_,"#").concat(n.playerId_),"handleEvents, player is paused");n.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.PLAYER_PAUSE,type:"".concat(n.module_),streamId:n.playerId_});n.state_="PAUSED";i.LoggerFactory.debug("".concat(n.module_,"#").concat(n.playerId_),"try to play again");n.event_.emit("audioCanPlay")}),800,false)}}return _(e,[{key:"on",value:function e(t,r){this.event_.on(t,r)}},{key:"off",value:function e(t,r){this.event_.removeListener(t,r)}},{key:"stop",value:function e(){this.closeAllEvents();clearTimeout(this.playTimeOutTimer);if(this.playerElement_){this.playerElement_.srcObject=null}this.playerElement_=null;this.mediaStream_=new MediaStream;this.manualPauseFlag_=false;this.event_.emit("playInterrupt");i.LoggerFactory.info(this.module_,"stop success")}},{key:"replaceTrack",value:function e(t){i.LoggerFactory.info(this.module_,"replaceTrack start");var r=this.module_.indexOf("Audio")>0?this.mediaStream_.getAudioTracks():this.mediaStream_.getVideoTracks();var n=r.length?r[0]:null;if(n===t){return}n&&this.mediaStream_.removeTrack(n);this.mediaStream_.addTrack(t);this.track_=t;this.manualPauseFlag_=false}},{key:"resume",value:function(){var e=y(v().mark((function e(t){var r=this;return v().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:this.manualPauseFlag_=false;return o.abrupt("return",new Promise((function(e,o){if(r.playerElement_){r.playerElement_.play().then((function(){i.LoggerFactory.info(r.module_,"audio player resume success, streamId:".concat(r.playerId_,", playParameters: ").concat(JSON.stringify(t)));e()}))["catch"]((function(e){i.LoggerFactory.error(r.module_,"player resume failed, errmsg=".concat(e," , playParameters: ").concat(JSON.stringify(t)));if(e.name==="NotAllowedError"){o(new n.HwLLSError(n.ErrorCode.HWLLS_PLAY_NOT_ALLOW))}else{o(new n.HwLLSError(n.ErrorCode.HWLLS_INTERNAL_ERROR,e.message))}}))}else{o(new n.HwLLSError(n.ErrorCode.HWLLS_INTERNAL_ERROR,"resume failed, element is null"))}})));case 2:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"pause",value:function e(){if(this.playerElement_){this.playerElement_.pause();if(this.state_!=="STOPPED"){this.manualPauseFlag_=true}}}},{key:"doPlay",value:function(){var e=y(v().mark((function e(t,r,o){var a=this;var u;return v().wrap((function e(c){while(1)switch(c.prev=c.next){case 0:this.manualPauseFlag_=false;c.next=3;return s.PlayerAdapter.multiPlatformAdapter();case 3:if(this.module_.indexOf("Video")>0){u=", screenFit:".concat(o.objectFit)}else{u=", volume:".concat(o.volume,", muted:").concat(o.muted)}return c.abrupt("return",this.playerElement_.play().then((function(){var e,r;i.LoggerFactory.info(a.module_,"play success, parentDiv id:".concat((e=a.playerDiv_)===null||e===void 0?void 0:e.id,", resolutionId or streamId:").concat(a.playerId_,", physical track id:").concat((r=a.track_)===null||r===void 0?void 0:r.id).concat(u));a.afterPlayStrategy();t(null)}))["catch"]((function(e){var t,o;i.LoggerFactory.error(a.module_,"play failed, errmsg=".concat(e,",parentDiv id:").concat((t=a.playerDiv_)===null||t===void 0?void 0:t.id,", resolutionId or streamId:").concat(a.playerId_,", physical track id:").concat((o=a.track_)===null||o===void 0?void 0:o.id).concat(u));if(e.name==="NotAllowedError"){r(new n.HwLLSError(n.ErrorCode.HWLLS_PLAY_NOT_ALLOW))}else{r(new n.HwLLSError(n.ErrorCode.HWLLS_INTERNAL_ERROR,e.message))}}))["finally"]((function(){clearTimeout(a.playTimeOutTimer);a.listenHandlers.playInterruptHandler&&a.event_.removeListener("playInterrupt",a.listenHandlers.playInterruptHandler)})));case 5:case"end":return c.stop()}}),e,this)})));function t(t,r,n){return e.apply(this,arguments)}return t}()},{key:"closeAllEvents",value:function e(){var t,r,n,i,a,s,u,c,l,f;(t=this.playerElement_)===null||t===void 0||t.removeEventListener("canplay",this.listenHandlers.canPlayHandler);(r=this.playerElement_)===null||r===void 0||r.removeEventListener("playing",this.listenHandlers.playingHandler);(n=this.playerElement_)===null||n===void 0||n.removeEventListener("ended",this.listenHandlers.playerEndedHandler);(i=this.playerElement_)===null||i===void 0||i.removeEventListener("pause",this.listenHandlers.playerPausedHandler);(a=this.playerElement_)===null||a===void 0||a.removeEventListener("appPause",this.listenHandlers.appPauseHandler);this.deBounceHandlers.videoHandler.cancel();this.deBounceHandlers.audioHandler.cancel();(s=this.track_)===null||s===void 0||s.removeEventListener("ended",this.listenHandlers.trackEndedHandler);(u=this.track_)===null||u===void 0||u.removeEventListener("mute",this.listenHandlers.trackMutedHandler);(c=this.track_)===null||c===void 0||c.removeEventListener("unmute",this.listenHandlers.trackUnmutedHandler);this.listenHandlers.playHandler&&((l=this.event_)===null||l===void 0?void 0:l.removeListener("videoCanPlay",this.listenHandlers.playHandler));this.listenHandlers.playHandler&&((f=this.event_)===null||f===void 0?void 0:f.removeListener("audioCanPlay",this.listenHandlers.playHandler));this.event_.removeListener("FOREGROUND",this.listenHandlers.foregroundHandler);this.event_.removeListener("BACKGROUND",this.listenHandlers.backgroundHandler);o.SysEventsBus.unregister(this.sysEventRegisterUid)}},{key:"handleEvents",value:function e(){this.playerElement_.addEventListener("canplay",this.listenHandlers.canPlayHandler);this.playerElement_.addEventListener("playing",this.listenHandlers.playingHandler);this.playerElement_.addEventListener("ended",this.listenHandlers.playerEndedHandler);this.playerElement_.addEventListener("pause",this.listenHandlers.playerPausedHandler);this.playerElement_.addEventListener("appPause",this.listenHandlers.appPauseHandler);this.track_.addEventListener("ended",this.listenHandlers.trackEndedHandler);this.track_.addEventListener("mute",this.listenHandlers.trackMutedHandler);this.track_.addEventListener("unmute",this.listenHandlers.trackUnmutedHandler);this.event_.on("FOREGROUND",this.listenHandlers.foregroundHandler);this.event_.on("BACKGROUND",this.listenHandlers.backgroundHandler);this.sysEventRegisterUid=o.SysEventsBus.register(this.event_)}},{key:"playInterruptHandler",value:function e(t){t(new n.HwLLSError(n.ErrorCode.HWLLS_INTERNAL_ERROR,"AbortError: The play() request was interrupted by a new load request."))}},{key:"afterPlayStrategy",value:function e(){var t=this;if(!this.pauseCount&&a["default"].getPlatform().indexOf("Ios 15")>=0){i.LoggerFactory.error(this.module_,a["default"].getPlatform());var r=setTimeout((function(){clearTimeout(r);t.playerElement_.pause();t.pauseCount++}),100)}}},{key:"appPauseHandler",value:function e(){this.manualPauseFlag_=true}},{key:"foregroundHandler",value:function e(){i.LoggerFactory.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, application is foreground");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.FOREGROUND,type:this.module_});if(this.module_.indexOf("Audio")>0&&this.track_){if(this.trackEnable!==this.track_.enabled){this.track_.enabled=this.trackEnable}}if(this.state_==="PAUSED"){if(this.module_.indexOf("Video")>0){this.event_.emit("videoCanPlay")}else{this.event_.emit("audioCanPlay")}}}},{key:"backgroundHandler",value:function e(){i.LoggerFactory.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, application is background");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.BACKGROUND,type:this.module_});if(this.module_.indexOf("Audio")>0&&this.track_){this.trackEnable=this.track_.enabled;if(this.trackEnable){this.track_.enabled=false}}}},{key:"canPlayHandler",value:function e(){i.LoggerFactory.info("".concat(this.module_,"#").concat(this.playerId_),"[KPI] handleEvents, player is canplay status");this.event_.emit(this.module_.indexOf("Video")>0?"videoCanPlay":"audioCanPlay");if(this.module_.indexOf("Video")){this.videoBufferedReday=true}this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.PALYER_CANPLAY,type:"".concat(this.module_),streamId:this.playerId_})}},{key:"playingHandler",value:function e(t){i.LoggerFactory.info("".concat(this.module_,"#").concat(this.playerId_),"[KPI] handleEvents, player is starting playing");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.PALYER_PLAYING,type:"".concat(this.module_),streamId:this.playerId_});this.state_="PLAYING";this.manualPauseFlag_=false;if(s["default"].getFullScreenStatus()&&(!t.target.offsetParent||/^(<body>|<div\sid="player_container").*/.test(t.target.offsetParent.outerHTML))&&this.module_.indexOf("Video")>0){var n;var o=(n=this.playerDiv_)===null||n===void 0?void 0:n.querySelector("#audio_".concat(this.playerId_));o===null||o===void 0||o.play();this.event_.emit(r.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:s["default"].getFullScreenStatus(),isPause:false})}}},{key:"playerEndedHandler",value:function e(){i.LoggerFactory.info("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player is ended");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.TRACK_ENDED,type:"".concat(this.module_),streamId:this.playerId_});if(this.state_!=="STOPPED"){this.state_="STOPPED"}}},{key:"playerPausedHandler",value:function e(t){if(this.manualPauseFlag_){return}if(s["default"].getFullScreenStatus()&&(!t.target.offsetParent||/^(<body>|<div\sid="player_container").*/.test(t.target.offsetParent.outerHTML))&&this.playerElement_.paused&&this.module_.indexOf("Video")>0){var n;var i=(n=this.playerDiv_)===null||n===void 0?void 0:n.querySelector("#audio_".concat(this.playerId_));if(i){i.dispatchEvent(this.customEvent);i.pause();this.event_.emit(r.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:s["default"].getFullScreenStatus(),isPause:true})}return}if(this.module_.indexOf("Video")>0){this.deBounceHandlers.videoHandler.exec()}else{this.deBounceHandlers.audioHandler.exec()}}},{key:"trackEndedHandler",value:function e(){i.LoggerFactory.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player track is ended");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.TRACK_ENDED,type:"".concat(this.module_),streamId:this.playerId_});if(this.state_!=="STOPPED"){this.state_="STOPPED"}}},{key:"trackMutedHandler",value:function e(){i.LoggerFactory.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, track is muted");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.TRACK_MUTE,type:"".concat(this.module_),streamId:this.playerId_});if(this.state_!=="PAUSED"){this.state_="PAUSED"}}},{key:"trackUnmutedHandler",value:function e(){i.LoggerFactory.debug("".concat(this.module_,"#[").concat(this.playerId_,"]"),"handleEvents, track is unmuted");this.event_.emit(l.RTCStreamEvent.PLAYER_STATE_TRACE,{event:c.PlayerStateTraceEvent.TRACK_UNMUTE,type:"".concat(this.module_),streamId:this.playerId_});if(this.state_==="PAUSED"){this.state_="PLAYING"}}}])}()}))},5951:function(e){(function(t,r){true?e.exports=r():0})(this,(function(){"use strict";var e=Math.imul,t=Math.clz32;function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e){if(Array.isArray(e))return e}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,r){return t=f(t),y(e,p()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&g(i,r.prototype),i}function u(e,t){for(var r,n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S(r.key),r)}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f: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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function h(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e,t){return n(e)||v(e,t)||w(e,t)||m()}function _(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=_(e,"string");return"symbol"==typeof t?t:t+""}function E(e){"@babel/helpers - typeof";return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function w(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function T(e){var t="function"==typeof Map?new Map:void 0;return T=function(e){function r(){return s(e,arguments,f(this).constructor)}if(null===e||!h(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},T(e)}var I=function(e){var t=Math.abs,r=Math.max,n=Math.floor;function i(e,t){var r;if(a(this,i),r=o(this,i,[e]),r.sign=t,Object.setPrototypeOf(r,i.prototype),e>i.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return r}return d(i,e),c(i,[{key:"toDebugString",value:function e(){var t,r=["BigInt["],n=l(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;r.push((i?(i>>>0).toString(16):i)+", ")}}catch(e){n.e(e)}finally{n.f()}return r.push("]"),r.join("")}},{key:"toString",value:function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10;if(2>t||36<t)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(t&t-1)?i.__toStringBasePowerOfTwo(this,t):i.__toStringGeneric(this,t,!1)}},{key:"valueOf",value:function e(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function e(){for(var t=new i(this.length,this.sign),r=0;r<this.length;r++)t[r]=this[r];return t}},{key:"__trim",value:function e(){for(var t=this.length,r=this[t-1];0===r;)t--,r=this[t-1],this.pop();return 0===t&&(this.sign=!1),this}},{key:"__initializeDigits",value:function e(){for(var t=0;t<this.length;t++)this[t]=0}},{key:"__clzmsd",value:function e(){return i.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function e(t,r,n){n>this.length&&(n=this.length);for(var o=32767&t,a=t>>>15,s=0,u=r,c=0;c<n;c++){var l=this.__digit(c),f=32767&l,d=l>>>15,h=i.__imul(f,o),p=i.__imul(f,a),v=i.__imul(d,o),m=i.__imul(d,a),y=u+h+s;s=y>>>30,y&=1073741823,y+=((32767&p)<<15)+((32767&v)<<15),s+=y>>>30,u=m+(p>>>15)+(v>>>15),this.__setDigit(c,1073741823&y)}if(0!==s||0!==u)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function e(t,r,n){for(var i,o=0,a=0;a<n;a++)i=this.__halfDigit(r+a)+t.__halfDigit(a)+o,o=i>>>15,this.__setHalfDigit(r+a,32767&i);return o}},{key:"__inplaceSub",value:function e(t,r,n){var i=n-1>>>1,o=0;if(1&r){r>>=1;for(var a=this.__digit(r),s=32767&a,u=0;u<i;u++){var c=t.__digit(u),l=(a>>>15)-(32767&c)-o;o=1&l>>>15,this.__setDigit(r+u,(32767&l)<<15|32767&s),a=this.__digit(r+u+1),s=(32767&a)-(c>>>15)-o,o=1&s>>>15}var f=t.__digit(u),d=(a>>>15)-(32767&f)-o;o=1&d>>>15,this.__setDigit(r+u,(32767&d)<<15|32767&s);var h=f>>>15;if(r+u+1>=this.length)throw new RangeError("out of bounds");0==(1&n)&&(a=this.__digit(r+u+1),s=(32767&a)-h-o,o=1&s>>>15,this.__setDigit(r+t.length,1073709056&a|32767&s))}else{r>>=1;for(var p=0;p<t.length-1;p++){var v=this.__digit(r+p),m=t.__digit(p),y=(32767&v)-(32767&m)-o;o=1&y>>>15;var g=(v>>>15)-(m>>>15)-o;o=1&g>>>15,this.__setDigit(r+p,(32767&g)<<15|32767&y)}var b=this.__digit(r+p),_=t.__digit(p),S=(32767&b)-(32767&_)-o;o=1&S>>>15;var E=0;0==(1&n)&&(E=(b>>>15)-(_>>>15)-o,o=1&E>>>15),this.__setDigit(r+p,(32767&E)<<15|32767&S)}return o}},{key:"__inplaceRightShift",value:function e(t){if(0!==t){for(var r,n=this.__digit(0)>>>t,i=this.length-1,o=0;o<i;o++)r=this.__digit(o+1),this.__setDigit(o,1073741823&r<<30-t|n),n=r>>>t;this.__setDigit(i,n)}}},{key:"__digit",value:function e(t){return this[t]}},{key:"__unsignedDigit",value:function e(t){return this[t]>>>0}},{key:"__setDigit",value:function e(t,r){this[t]=0|r}},{key:"__setDigitGrow",value:function e(t,r){this[t]=0|r}},{key:"__halfDigitLength",value:function e(){var t=this.length;return 32767>=this.__unsignedDigit(t-1)?2*t-1:2*t}},{key:"__halfDigit",value:function e(t){return 32767&this[t>>>1]>>>15*(1&t)}},{key:"__setHalfDigit",value:function e(t,r){var n=t>>>1,i=this.__digit(n),o=1&t?32767&i|r<<15:1073709056&i|32767&r;this.__setDigit(n,o)}}],[{key:"BigInt",value:function e(t){var r=Number.isFinite;if("number"==typeof t){if(0===t)return i.__zero();if(i.__isOneDigitInt(t))return 0>t?i.__oneDigit(-t,!0):i.__oneDigit(t,!1);if(!r(t)||n(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return i.__fromDouble(t)}if("string"==typeof t){var o=i.__fromString(t);if(null===o)throw new SyntaxError("Cannot convert "+t+" to a BigInt");return o}if("boolean"==typeof t)return!0===t?i.__oneDigit(1,!1):i.__zero();if("object"===E(t)){if(t.constructor===i)return t;var a=i.__toPrimitive(t);return i.BigInt(a)}throw new TypeError("Cannot convert "+t+" to a BigInt")}},{key:"toNumber",value:function e(t){var r=t.length;if(0===r)return 0;if(1===r){var n=t.__unsignedDigit(0);return t.sign?-n:n}var o=t.__digit(r-1),a=i.__clz30(o),s=30*r-a;if(1024<s)return t.sign?-Infinity:1/0;var u=s-1,c=o,l=r-1,f=a+3,d=32===f?0:c<<f;d>>>=12;var h=f-12,p=12<=f?0:c<<20+f,v=20+f;for(0<h&&0<l&&(l--,c=t.__digit(l),d|=c>>>30-h,p=c<<h+2,v=h+2);0<v&&0<l;)l--,c=t.__digit(l),p|=30<=v?c<<v-30:c>>>30-v,v-=30;var m=i.__decideRounding(t,v,l,c);if((1===m||0===m&&1==(1&p))&&(p=p+1>>>0,0===p&&(d++,0!=d>>>20&&(d=0,u++,1023<u))))return t.sign?-Infinity:1/0;var y=t.sign?-2147483648:0;return u=u+1023<<20,i.__kBitConversionInts[i.__kBitConversionIntHigh]=y|u|d,i.__kBitConversionInts[i.__kBitConversionIntLow]=p,i.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function e(t){if(0===t.length)return t;var r=t.__copy();return r.sign=!t.sign,r}},{key:"bitwiseNot",value:function e(t){return t.sign?i.__absoluteSubOne(t).__trim():i.__absoluteAddOne(t,!0)}},{key:"exponentiate",value:function e(t,r){if(r.sign)throw new RangeError("Exponent must be positive");if(0===r.length)return i.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return t.sign&&0==(1&r.__digit(0))?i.unaryMinus(t):t;if(1<r.length)throw new RangeError("BigInt too big");var n=r.__unsignedDigit(0);if(1===n)return t;if(n>=i.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var o=1+(0|n/30),a=t.sign&&0!=(1&n),s=new i(o,a);s.__initializeDigits();var u=1<<n%30;return s.__setDigit(o-1,u),s}var c=null,l=t;for(0!=(1&n)&&(c=t),n>>=1;0!==n;n>>=1)l=i.multiply(l,l),0!=(1&n)&&(null===c?c=l:c=i.multiply(c,l));return c}},{key:"multiply",value:function e(t,r){if(0===t.length)return t;if(0===r.length)return r;var n=t.length+r.length;30<=t.__clzmsd()+r.__clzmsd()&&n--;var o=new i(n,t.sign!==r.sign);o.__initializeDigits();for(var a=0;a<t.length;a++)i.__multiplyAccumulate(r,t.__digit(a),o,a);return o.__trim()}},{key:"divide",value:function e(t,r){if(0===r.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(t,r))return i.__zero();var n,o=t.sign!==r.sign,a=r.__unsignedDigit(0);if(1===r.length&&32767>=a){if(1===a)return o===t.sign?t:i.unaryMinus(t);n=i.__absoluteDivSmall(t,a,null)}else n=i.__absoluteDivLarge(t,r,!0,!1);return n.sign=o,n.__trim()}},{key:"remainder",value:function e(t,r){if(0===r.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(t,r))return t;var n=r.__unsignedDigit(0);if(1===r.length&&32767>=n){if(1===n)return i.__zero();var o=i.__absoluteModSmall(t,n);return 0===o?i.__zero():i.__oneDigit(o,t.sign)}var e=i.__absoluteDivLarge(t,r,!1,!0);return e.sign=t.sign,e.__trim()}},{key:"add",value:function e(t,r){var n=t.sign;return n===r.sign?i.__absoluteAdd(t,r,n):0<=i.__absoluteCompare(t,r)?i.__absoluteSub(t,r,n):i.__absoluteSub(r,t,!n)}},{key:"subtract",value:function e(t,r){var n=t.sign;return n===r.sign?0<=i.__absoluteCompare(t,r)?i.__absoluteSub(t,r,n):i.__absoluteSub(r,t,!n):i.__absoluteAdd(t,r,n)}},{key:"leftShift",value:function e(t,r){return 0===r.length||0===t.length?t:r.sign?i.__rightShiftByAbsolute(t,r):i.__leftShiftByAbsolute(t,r)}},{key:"signedRightShift",value:function e(t,r){return 0===r.length||0===t.length?t:r.sign?i.__leftShiftByAbsolute(t,r):i.__rightShiftByAbsolute(t,r)}},{key:"unsignedRightShift",value:function e(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function e(t,r){return 0>i.__compareToBigInt(t,r)}},{key:"lessThanOrEqual",value:function e(t,r){return 0>=i.__compareToBigInt(t,r)}},{key:"greaterThan",value:function e(t,r){return 0<i.__compareToBigInt(t,r)}},{key:"greaterThanOrEqual",value:function e(t,r){return 0<=i.__compareToBigInt(t,r)}},{key:"equal",value:function e(t,r){if(t.sign!==r.sign)return!1;if(t.length!==r.length)return!1;for(var n=0;n<t.length;n++)if(t.__digit(n)!==r.__digit(n))return!1;return!0}},{key:"notEqual",value:function e(t,r){return!i.equal(t,r)}},{key:"bitwiseAnd",value:function e(t,n){if(!t.sign&&!n.sign)return i.__absoluteAnd(t,n).__trim();if(t.sign&&n.sign){var o=r(t.length,n.length)+1,a=i.__absoluteSubOne(t,o),s=i.__absoluteSubOne(n);return a=i.__absoluteOr(a,s,a),i.__absoluteAddOne(a,!0,a).__trim()}if(t.sign){var u=[n,t];t=u[0],n=u[1]}return i.__absoluteAndNot(t,i.__absoluteSubOne(n)).__trim()}},{key:"bitwiseXor",value:function e(t,n){if(!t.sign&&!n.sign)return i.__absoluteXor(t,n).__trim();if(t.sign&&n.sign){var o=r(t.length,n.length),a=i.__absoluteSubOne(t,o),s=i.__absoluteSubOne(n);return i.__absoluteXor(a,s,a).__trim()}var u=r(t.length,n.length)+1;if(t.sign){var c=[n,t];t=c[0],n=c[1]}var l=i.__absoluteSubOne(n,u);return l=i.__absoluteXor(l,t,l),i.__absoluteAddOne(l,!0,l).__trim()}},{key:"bitwiseOr",value:function e(t,n){var o=r(t.length,n.length);if(!t.sign&&!n.sign)return i.__absoluteOr(t,n).__trim();if(t.sign&&n.sign){var a=i.__absoluteSubOne(t,o),s=i.__absoluteSubOne(n);return a=i.__absoluteAnd(a,s,a),i.__absoluteAddOne(a,!0,a).__trim()}if(t.sign){var u=[n,t];t=u[0],n=u[1]}var c=i.__absoluteSubOne(n,o);return c=i.__absoluteAndNot(c,t,c),i.__absoluteAddOne(c,!0,c).__trim()}},{key:"asIntN",value:function e(t,r){if(0===r.length)return r;if(t=n(t),0>t)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return i.__zero();if(t>=i.__kMaxLengthBits)return r;var o=0|(t+29)/30;if(r.length<o)return r;var a=r.__unsignedDigit(o-1),s=1<<(t-1)%30;if(r.length===o&&a<s)return r;var u=(a&s)===s;if(!u)return i.__truncateToNBits(t,r);if(!r.sign)return i.__truncateAndSubFromPowerOfTwo(t,r,!0);if(0==(a&s-1)){for(var c=o-2;0<=c;c--)if(0!==r.__digit(c))return i.__truncateAndSubFromPowerOfTwo(t,r,!1);return r.length===o&&a===s?r:i.__truncateToNBits(t,r)}return i.__truncateAndSubFromPowerOfTwo(t,r,!1)}},{key:"asUintN",value:function e(t,r){if(0===r.length)return r;if(t=n(t),0>t)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return i.__zero();if(r.sign){if(t>i.__kMaxLengthBits)throw new RangeError("BigInt too big");return i.__truncateAndSubFromPowerOfTwo(t,r,!1)}if(t>=i.__kMaxLengthBits)return r;var o=0|(t+29)/30;if(r.length<o)return r;var a=t%30;if(r.length==o){if(0===a)return r;var s=r.__digit(o-1);if(0==s>>>a)return r}return i.__truncateToNBits(t,r)}},{key:"ADD",value:function e(t,r){if(t=i.__toPrimitive(t),r=i.__toPrimitive(r),"string"==typeof t)return"string"!=typeof r&&(r=r.toString()),t+r;if("string"==typeof r)return t.toString()+r;if(t=i.__toNumeric(t),r=i.__toNumeric(r),i.__isBigInt(t)&&i.__isBigInt(r))return i.add(t,r);if("number"==typeof t&&"number"==typeof r)return t+r;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function e(t,r){return i.__compare(t,r,0)}},{key:"LE",value:function e(t,r){return i.__compare(t,r,1)}},{key:"GT",value:function e(t,r){return i.__compare(t,r,2)}},{key:"GE",value:function e(t,r){return i.__compare(t,r,3)}},{key:"EQ",value:function e(t,r){for(;!0;){if(i.__isBigInt(t))return i.__isBigInt(r)?i.equal(t,r):i.EQ(r,t);if("number"==typeof t){if(i.__isBigInt(r))return i.__equalToNumber(r,t);if("object"!==E(r))return t==r;r=i.__toPrimitive(r)}else if("string"==typeof t){if(i.__isBigInt(r))return t=i.__fromString(t),null!==t&&i.equal(t,r);if("object"!==E(r))return t==r;r=i.__toPrimitive(r)}else if("boolean"==typeof t){if(i.__isBigInt(r))return i.__equalToNumber(r,+t);if("object"!==E(r))return t==r;r=i.__toPrimitive(r)}else if("symbol"===E(t)){if(i.__isBigInt(r))return!1;if("object"!==E(r))return t==r;r=i.__toPrimitive(r)}else if("object"===E(t)){if("object"===E(r)&&r.constructor!==i)return t==r;t=i.__toPrimitive(t)}else return t==r}}},{key:"NE",value:function e(t,r){return!i.EQ(t,r)}},{key:"DataViewGetBigInt64",value:function e(t,r){var n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return i.asIntN(64,i.DataViewGetBigUint64(t,r,n))}},{key:"DataViewGetBigUint64",value:function e(t,r){var n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],o=n?[4,0]:[0,4],a=b(o,2),s=a[0],u=a[1],c=t.getUint32(r+s,n),l=t.getUint32(r+u,n),f=new i(3,!1);return f.__setDigit(0,1073741823&l),f.__setDigit(1,(268435455&c)<<2|l>>>30),f.__setDigit(2,c>>>28),f.__trim()}},{key:"DataViewSetBigInt64",value:function e(t,r,n){var o=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];i.DataViewSetBigUint64(t,r,n,o)}},{key:"DataViewSetBigUint64",value:function e(t,r,n){var o=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];n=i.asUintN(64,n);var a=0,s=0;if(0<n.length&&(s=n.__digit(0),1<n.length)){var u=n.__digit(1);s|=u<<30,a=u>>>2,2<n.length&&(a|=n.__digit(2)<<28)}var c=o?[4,0]:[0,4],l=b(c,2),f=l[0],d=l[1];t.setUint32(r+f,a,o),t.setUint32(r+d,s,o)}},{key:"__zero",value:function e(){return new i(0,!1)}},{key:"__oneDigit",value:function e(t,r){var n=new i(1,r);return n.__setDigit(0,t),n}},{key:"__decideRounding",value:function e(t,r,n,i){if(0<r)return-1;var o;if(0>r)o=-r-1;else{if(0===n)return-1;n--,i=t.__digit(n),o=29}var a=1<<o;if(0==(i&a))return-1;if(a-=1,0!=(i&a))return 1;for(;0<n;)if(n--,0!==t.__digit(n))return 1;return 0}},{key:"__fromDouble",value:function e(t){var r=0>t;i.__kBitConversionDouble[0]=t;var n,o=2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20,a=o-1023,s=(0|a/30)+1,u=new i(s,r),c=1048576,l=1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh]|c,f=i.__kBitConversionInts[i.__kBitConversionIntLow],d=20,h=a%30,p=0;if(h<d){var v=d-h;p=v+32,n=l>>>v,l=l<<32-v|f>>>v,f<<=32-v}else if(h===d)p=32,n=l,l=f,f=0;else{var m=h-d;p=32-m,n=l<<m|f>>>32-m,l=f<<m,f=0}u.__setDigit(s-1,n);for(var y=s-2;0<=y;y--)0<p?(p-=30,n=l>>>2,l=l<<30|f>>>2,f<<=30):n=0,u.__setDigit(y,n);return u.__trim()}},{key:"__isWhitespace",value:function e(t){return!!(13>=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?(t&=131071,10>=t||40==t||41==t||47==t||95==t||4096==t):65279==t)}},{key:"__fromString",value:function e(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=0,o=t.length,a=0;if(a===o)return i.__zero();for(var s=t.charCodeAt(a);i.__isWhitespace(s);){if(++a===o)return i.__zero();s=t.charCodeAt(a)}if(43===s){if(++a===o)return null;s=t.charCodeAt(a),n=1}else if(45===s){if(++a===o)return null;s=t.charCodeAt(a),n=-1}if(0===r){if(r=10,48===s){if(++a===o)return i.__zero();if(s=t.charCodeAt(a),88===s||120===s){if(r=16,++a===o)return null;s=t.charCodeAt(a)}else if(79===s||111===s){if(r=8,++a===o)return null;s=t.charCodeAt(a)}else if(66===s||98===s){if(r=2,++a===o)return null;s=t.charCodeAt(a)}}}else if(16===r&&48===s){if(++a===o)return i.__zero();if(s=t.charCodeAt(a),88===s||120===s){if(++a===o)return null;s=t.charCodeAt(a)}}if(0!==n&&10!==r)return null;for(;48===s;){if(++a===o)return i.__zero();s=t.charCodeAt(a)}var u=o-a,c=i.__kMaxBitsPerChar[r],l=i.__kBitsPerCharTableMultiplier-1;if(u>1073741824/c)return null;var f=c*u+l>>>i.__kBitsPerCharTableShift,d=0|(f+29)/30,h=new i(d,!1),p=10>r?r:10,v=10<r?r-10:0;if(0==(r&r-1)){c>>=i.__kBitsPerCharTableShift;var m=[],y=[],g=!1;do{for(var b,_=0,S=0;!0;){if(b=void 0,s-48>>>0<p)b=s-48;else if((32|s)-97>>>0<v)b=(32|s)-87;else{g=!0;break}if(S+=c,_=_<<c|b,++a===o){g=!0;break}if(s=t.charCodeAt(a),30<S+c)break}m.push(_),y.push(S)}while(!g);i.__fillFromParts(h,m,y)}else{h.__initializeDigits();var E=!1,w=0;do{for(var T,I=0,R=1;!0;){if(T=void 0,s-48>>>0<p)T=s-48;else if((32|s)-97>>>0<v)T=(32|s)-87;else{E=!0;break}var C=R*r;if(1073741823<C)break;if(R=C,I=I*r+T,w++,++a===o){E=!0;break}s=t.charCodeAt(a)}l=30*i.__kBitsPerCharTableMultiplier-1;var k=0|(c*w+l>>>i.__kBitsPerCharTableShift)/30;h.__inplaceMultiplyAdd(R,I,k)}while(!E)}if(a!==o){if(!i.__isWhitespace(s))return null;for(a++;a<o;a++)if(s=t.charCodeAt(a),!i.__isWhitespace(s))return null}return h.sign=-1===n,h.__trim()}},{key:"__fillFromParts",value:function e(t,r,n){for(var i=0,o=0,a=0,s=r.length-1;0<=s;s--){var u=r[s],c=n[s];o|=u<<a,a+=c,30===a?(t.__setDigit(i++,o),a=0,o=0):30<a&&(t.__setDigit(i++,1073741823&o),a-=30,o=u>>>c-a)}if(0!==o){if(i>=t.length)throw new Error("implementation bug");t.__setDigit(i++,o)}for(;i<t.length;i++)t.__setDigit(i,0)}},{key:"__toStringBasePowerOfTwo",value:function e(t,r){var n=t.length,o=r-1;o=(85&o>>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o);var a=o,s=r-1,u=t.__digit(n-1),c=i.__clz30(u),l=30*n-c,f=0|(l+a-1)/a;if(t.sign&&f++,268435456<f)throw new Error("string too long");for(var d=Array(f),h=f-1,p=0,v=0,m=0;m<n-1;m++){var y=t.__digit(m),g=(p|y<<v)&s;d[h--]=i.__kConversionChars[g];var b=a-v;for(p=y>>>b,v=30-b;v>=a;)d[h--]=i.__kConversionChars[p&s],p>>>=a,v-=a}var _=(p|u<<v)&s;for(d[h--]=i.__kConversionChars[_],p=u>>>a-v;0!==p;)d[h--]=i.__kConversionChars[p&s],p>>>=a;if(t.sign&&(d[h--]="-"),-1!==h)throw new Error("implementation bug");return d.join("")}},{key:"__toStringGeneric",value:function e(t,r,n){var o=t.length;if(0===o)return"";if(1===o){var a=t.__unsignedDigit(0).toString(r);return!1===n&&t.sign&&(a="-"+a),a}var s=30*o-i.__clz30(t.__digit(o-1)),u=i.__kMaxBitsPerChar[r],c=u-1,l=s*i.__kBitsPerCharTableMultiplier;l+=c-1,l=0|l/c;var f,d,h=l+1>>1,p=i.exponentiate(i.__oneDigit(r,!1),i.__oneDigit(h,!1)),v=p.__unsignedDigit(0);if(1===p.length&&32767>=v){f=new i(t.length,!1),f.__initializeDigits();for(var m,y=0,g=2*t.length-1;0<=g;g--)m=y<<15|t.__halfDigit(g),f.__setHalfDigit(g,0|m/v),y=0|m%v;d=y.toString(r)}else{var b=i.__absoluteDivLarge(t,p,!0,!0);f=b.quotient;var _=b.remainder.__trim();d=i.__toStringGeneric(_,r,!0)}f.__trim();for(var S=i.__toStringGeneric(f,r,!0);d.length<h;)d="0"+d;return!1===n&&t.sign&&(S="-"+S),S+d}},{key:"__unequalSign",value:function e(t){return t?-1:1}},{key:"__absoluteGreater",value:function e(t){return t?-1:1}},{key:"__absoluteLess",value:function e(t){return t?1:-1}},{key:"__compareToBigInt",value:function e(t,r){var n=t.sign;if(n!==r.sign)return i.__unequalSign(n);var o=i.__absoluteCompare(t,r);return 0<o?i.__absoluteGreater(n):0>o?i.__absoluteLess(n):0}},{key:"__compareToNumber",value:function e(r,n){if(i.__isOneDigitInt(n)){var o=r.sign,a=0>n;if(o!==a)return i.__unequalSign(o);if(0===r.length){if(a)throw new Error("implementation bug");return 0===n?0:-1}if(1<r.length)return i.__absoluteGreater(o);var s=t(n),u=r.__unsignedDigit(0);return u>s?i.__absoluteGreater(o):u<s?i.__absoluteLess(o):0}return i.__compareToDouble(r,n)}},{key:"__compareToDouble",value:function e(t,r){if(r!==r)return r;if(r===1/0)return-1;if(r===-Infinity)return 1;var n=t.sign,o=0>r;if(n!==o)return i.__unequalSign(n);if(0===r)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;i.__kBitConversionDouble[0]=r;var a=2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20;if(2047==a)throw new Error("implementation bug: handled elsewhere");var s=a-1023;if(0>s)return i.__absoluteGreater(n);var u=t.length,c=t.__digit(u-1),l=i.__clz30(c),f=30*u-l,d=s+1;if(f<d)return i.__absoluteLess(n);if(f>d)return i.__absoluteGreater(n);var h=1048576,p=1048576|1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh],v=i.__kBitConversionInts[i.__kBitConversionIntLow],m=20,y=29-l;if(y!==(0|(f-1)%30))throw new Error("implementation bug");var g,b=0;if(y<m){var _=m-y;b=_+32,g=p>>>_,p=p<<32-_|v>>>_,v<<=32-_}else if(y===m)b=32,g=p,p=v,v=0;else{var S=y-m;b=32-S,g=p<<S|v>>>32-S,p=v<<S,v=0}if(c>>>=0,g>>>=0,c>g)return i.__absoluteGreater(n);if(c<g)return i.__absoluteLess(n);for(var E=u-2;0<=E;E--){0<b?(b-=30,g=p>>>2,p=p<<30|v>>>2,v<<=30):g=0;var w=t.__unsignedDigit(E);if(w>g)return i.__absoluteGreater(n);if(w<g)return i.__absoluteLess(n)}if(0!==p||0!==v){if(0===b)throw new Error("implementation bug");return i.__absoluteLess(n)}return 0}},{key:"__equalToNumber",value:function e(r,n){return i.__isOneDigitInt(n)?0===n?0===r.length:1===r.length&&r.sign===0>n&&r.__unsignedDigit(0)===t(n):0===i.__compareToDouble(r,n)}},{key:"__comparisonResultToBool",value:function e(t,r){return 0===r?0>t:1===r?0>=t:2===r?0<t:3===r?0<=t:void 0}},{key:"__compare",value:function e(t,r,n){if(t=i.__toPrimitive(t),r=i.__toPrimitive(r),"string"==typeof t&&"string"==typeof r)switch(n){case 0:return t<r;case 1:return t<=r;case 2:return t>r;case 3:return t>=r}if(i.__isBigInt(t)&&"string"==typeof r)return r=i.__fromString(r),null!==r&&i.__comparisonResultToBool(i.__compareToBigInt(t,r),n);if("string"==typeof t&&i.__isBigInt(r))return t=i.__fromString(t),null!==t&&i.__comparisonResultToBool(i.__compareToBigInt(t,r),n);if(t=i.__toNumeric(t),r=i.__toNumeric(r),i.__isBigInt(t)){if(i.__isBigInt(r))return i.__comparisonResultToBool(i.__compareToBigInt(t,r),n);if("number"!=typeof r)throw new Error("implementation bug");return i.__comparisonResultToBool(i.__compareToNumber(t,r),n)}if("number"!=typeof t)throw new Error("implementation bug");if(i.__isBigInt(r))return i.__comparisonResultToBool(i.__compareToNumber(r,t),2^n);if("number"!=typeof r)throw new Error("implementation bug");return 0===n?t<r:1===n?t<=r:2===n?t>r:3===n?t>=r:void 0}},{key:"__absoluteAdd",value:function e(t,r,n){if(t.length<r.length)return i.__absoluteAdd(r,t,n);if(0===t.length)return t;if(0===r.length)return t.sign===n?t:i.unaryMinus(t);var o=t.length;(0===t.__clzmsd()||r.length===t.length&&0===r.__clzmsd())&&o++;for(var a,s=new i(o,n),u=0,c=0;c<r.length;c++)a=t.__digit(c)+r.__digit(c)+u,u=a>>>30,s.__setDigit(c,1073741823&a);for(;c<t.length;c++){var l=t.__digit(c)+u;u=l>>>30,s.__setDigit(c,1073741823&l)}return c<s.length&&s.__setDigit(c,u),s.__trim()}},{key:"__absoluteSub",value:function e(t,r,n){if(0===t.length)return t;if(0===r.length)return t.sign===n?t:i.unaryMinus(t);for(var o,a=new i(t.length,n),s=0,u=0;u<r.length;u++)o=t.__digit(u)-r.__digit(u)-s,s=1&o>>>30,a.__setDigit(u,1073741823&o);for(;u<t.length;u++){var c=t.__digit(u)-s;s=1&c>>>30,a.__setDigit(u,1073741823&c)}return a.__trim()}},{key:"__absoluteAddOne",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=t.length;null===n?n=new i(o,r):n.sign=r;for(var a,s=1,u=0;u<o;u++)a=t.__digit(u)+s,s=a>>>30,n.__setDigit(u,1073741823&a);return 0!==s&&n.__setDigitGrow(o,1),n}},{key:"__absoluteSubOne",value:function e(t,r){var n=t.length;r=r||n;for(var o,a=new i(r,!1),s=1,u=0;u<n;u++)o=t.__digit(u)-s,s=1&o>>>30,a.__setDigit(u,1073741823&o);if(0!==s)throw new Error("implementation bug");for(var c=n;c<r;c++)a.__setDigit(c,0);return a}},{key:"__absoluteAnd",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=t.length,a=r.length,s=a;if(o<a){s=o;var u=t,c=o;t=r,o=a,r=u,a=c}var l=s;null===n?n=new i(l,!1):l=n.length;for(var f=0;f<s;f++)n.__setDigit(f,t.__digit(f)&r.__digit(f));for(;f<l;f++)n.__setDigit(f,0);return n}},{key:"__absoluteAndNot",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=t.length,a=r.length,s=a;o<a&&(s=o);var u=o;null===n?n=new i(u,!1):u=n.length;for(var c=0;c<s;c++)n.__setDigit(c,t.__digit(c)&~r.__digit(c));for(;c<o;c++)n.__setDigit(c,t.__digit(c));for(;c<u;c++)n.__setDigit(c,0);return n}},{key:"__absoluteOr",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=t.length,a=r.length,s=a;if(o<a){s=o;var u=t,c=o;t=r,o=a,r=u,a=c}var l=o;null===n?n=new i(l,!1):l=n.length;for(var f=0;f<s;f++)n.__setDigit(f,t.__digit(f)|r.__digit(f));for(;f<o;f++)n.__setDigit(f,t.__digit(f));for(;f<l;f++)n.__setDigit(f,0);return n}},{key:"__absoluteXor",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=t.length,a=r.length,s=a;if(o<a){s=o;var u=t,c=o;t=r,o=a,r=u,a=c}var l=o;null===n?n=new i(l,!1):l=n.length;for(var f=0;f<s;f++)n.__setDigit(f,t.__digit(f)^r.__digit(f));for(;f<o;f++)n.__setDigit(f,t.__digit(f));for(;f<l;f++)n.__setDigit(f,0);return n}},{key:"__absoluteCompare",value:function e(t,r){var n=t.length-r.length;if(0!=n)return n;for(var i=t.length-1;0<=i&&t.__digit(i)===r.__digit(i);)i--;return 0>i?0:t.__unsignedDigit(i)>r.__unsignedDigit(i)?1:-1}},{key:"__multiplyAccumulate",value:function e(t,r,n,o){if(0!==r){for(var a=32767&r,s=r>>>15,u=0,c=0,l=0;l<t.length;l++,o++){var f=n.__digit(o),d=t.__digit(l),h=32767&d,p=d>>>15,v=i.__imul(h,a),m=i.__imul(h,s),y=i.__imul(p,a),g=i.__imul(p,s);f+=c+v+u,u=f>>>30,f&=1073741823,f+=((32767&m)<<15)+((32767&y)<<15),u+=f>>>30,c=g+(m>>>15)+(y>>>15),n.__setDigit(o,1073741823&f)}for(;0!==u||0!==c;o++){var b=n.__digit(o);b+=u+c,c=0,u=b>>>30,n.__setDigit(o,1073741823&b)}}}},{key:"__internalMultiplyAdd",value:function e(t,r,n,o,a){for(var s=n,u=0,c=0;c<o;c++){var l=t.__digit(c),f=i.__imul(32767&l,r),d=i.__imul(l>>>15,r),h=f+((32767&d)<<15)+u+s;s=h>>>30,u=d>>>15,a.__setDigit(c,1073741823&h)}if(a.length>o)for(a.__setDigit(o++,s+u);o<a.length;)a.__setDigit(o++,0);else if(0!==s+u)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function e(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=new i(t.length,!1));for(var o=0,a=2*t.length-1;0<=a;a-=2){var s=(o<<15|t.__halfDigit(a))>>>0,u=0|s/r;o=0|s%r,s=(o<<15|t.__halfDigit(a-1))>>>0;var c=0|s/r;o=0|s%r,n.__setDigit(a>>>1,u<<15|c)}return n}},{key:"__absoluteModSmall",value:function e(t,r){for(var n,i=0,o=2*t.length-1;0<=o;o--)n=(i<<15|t.__halfDigit(o))>>>0,i=0|n%r;return i}},{key:"__absoluteDivLarge",value:function e(t,r,n,o){var a=r.__halfDigitLength(),s=r.length,u=t.__halfDigitLength()-a,c=null;n&&(c=new i(u+2>>>1,!1),c.__initializeDigits());var l=new i(a+2>>>1,!1);l.__initializeDigits();var f=i.__clz15(r.__halfDigit(a-1));0<f&&(r=i.__specialLeftShift(r,f,0));for(var d=i.__specialLeftShift(t,f,1),h=r.__halfDigit(a-1),p=0,v=u;0<=v;v--){var m=32767,y=d.__halfDigit(v+a);if(y!==h){var g=(y<<15|d.__halfDigit(v+a-1))>>>0;m=0|g/h;for(var b=0|g%h,_=r.__halfDigit(a-2),S=d.__halfDigit(v+a-2);i.__imul(m,_)>>>0>(b<<16|S)>>>0&&(m--,b+=h,!(32767<b)););}i.__internalMultiplyAdd(r,m,0,s,l);var E=d.__inplaceSub(l,v,a+1);0!==E&&(E=d.__inplaceAdd(r,v,a),d.__setHalfDigit(v+a,32767&d.__halfDigit(v+a)+E),m--),n&&(1&v?p=m<<15:c.__setDigit(v>>>1,p|m))}if(o)return d.__inplaceRightShift(f),n?{quotient:c,remainder:d}:d;if(n)return c;throw new Error("unreachable")}},{key:"__clz15",value:function e(t){return i.__clz30(t)-15}},{key:"__specialLeftShift",value:function e(t,r,n){var o=t.length,a=o+n,s=new i(a,!1);if(0===r){for(var u=0;u<o;u++)s.__setDigit(u,t.__digit(u));return 0<n&&s.__setDigit(o,0),s}for(var c,l=0,f=0;f<o;f++)c=t.__digit(f),s.__setDigit(f,1073741823&c<<r|l),l=c>>>30-r;return 0<n&&s.__setDigit(o,l),s}},{key:"__leftShiftByAbsolute",value:function e(t,r){var n=i.__toShiftAmount(r);if(0>n)throw new RangeError("BigInt too big");var o=0|n/30,a=n%30,s=t.length,u=0!==a&&0!=t.__digit(s-1)>>>30-a,c=s+o+(u?1:0),l=new i(c,t.sign);if(0===a){for(var f=0;f<o;f++)l.__setDigit(f,0);for(;f<c;f++)l.__setDigit(f,t.__digit(f-o))}else{for(var d=0,h=0;h<o;h++)l.__setDigit(h,0);for(var p,v=0;v<s;v++)p=t.__digit(v),l.__setDigit(v+o,1073741823&p<<a|d),d=p>>>30-a;if(u)l.__setDigit(s+o,d);else if(0!==d)throw new Error("implementation bug")}return l.__trim()}},{key:"__rightShiftByAbsolute",value:function e(t,r){var n=t.length,o=t.sign,a=i.__toShiftAmount(r);if(0>a)return i.__rightShiftByMaximum(o);var s=0|a/30,u=a%30,c=n-s;if(0>=c)return i.__rightShiftByMaximum(o);var l=!1;if(o){var f=(1<<u)-1;if(0!=(t.__digit(s)&f))l=!0;else for(var d=0;d<s;d++)if(0!==t.__digit(d)){l=!0;break}}if(l&&0===u){var h=t.__digit(n-1),p=0==~h;p&&c++}var v=new i(c,o);if(0===u){v.__setDigit(c-1,0);for(var m=s;m<n;m++)v.__setDigit(m-s,t.__digit(m))}else{for(var y,g=t.__digit(s)>>>u,b=n-s-1,_=0;_<b;_++)y=t.__digit(_+s+1),v.__setDigit(_,1073741823&y<<30-u|g),g=y>>>u;v.__setDigit(b,g)}return l&&(v=i.__absoluteAddOne(v,!0,v)),v.__trim()}},{key:"__rightShiftByMaximum",value:function e(t){return t?i.__oneDigit(1,!0):i.__zero()}},{key:"__toShiftAmount",value:function e(t){if(1<t.length)return-1;var r=t.__unsignedDigit(0);return r>i.__kMaxLengthBits?-1:r}},{key:"__toPrimitive",value:function e(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"default";if("object"!==E(t))return t;if(t.constructor===i)return t;if("undefined"!=typeof Symbol&&"symbol"===E(Symbol.toPrimitive)&&t[Symbol.toPrimitive]){var n=t[Symbol.toPrimitive](r);if("object"!==E(n))return n;throw new TypeError("Cannot convert object to primitive value")}var o=t.valueOf;if(o){var a=o.call(t);if("object"!==E(a))return a}var s=t.toString;if(s){var u=s.call(t);if("object"!==E(u))return u}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function e(t){return i.__isBigInt(t)?t:+t}},{key:"__isBigInt",value:function e(t){return"object"===E(t)&&null!==t&&t.constructor===i}},{key:"__truncateToNBits",value:function e(t,r){for(var n=0|(t+29)/30,o=new i(n,r.sign),a=n-1,s=0;s<a;s++)o.__setDigit(s,r.__digit(s));var u=r.__digit(a);if(0!=t%30){var c=32-t%30;u=u<<c>>>c}return o.__setDigit(a,u),o.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function e(t,r,n){for(var o=Math.min,a,s=0|(t+29)/30,u=new i(s,n),c=0,l=s-1,f=0,d=o(l,r.length);c<d;c++)a=0-r.__digit(c)-f,f=1&a>>>30,u.__setDigit(c,1073741823&a);for(;c<l;c++)u.__setDigit(c,0|1073741823&-f);var h,p=l<r.length?r.__digit(l):0,v=t%30;if(0===v)h=0-p-f,h&=1073741823;else{var m=32-v;p=p<<m>>>m;var y=1<<32-m;h=y-p-f,h&=y-1}return u.__setDigit(l,h),u.__trim()}},{key:"__digitPow",value:function e(t,r){for(var n=1;0<r;)1&r&&(n*=t),r>>>=1,t*=t;return n}},{key:"__detectBigEndian",value:function e(){return i.__kBitConversionDouble[0]=-0,0!==i.__kBitConversionInts[0]}},{key:"__isOneDigitInt",value:function e(t){return(1073741823&t)===t}}])}(T(Array));return I.__kMaxLength=33554432,I.__kMaxLengthBits=I.__kMaxLength<<5,I.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],I.__kBitsPerCharTableShift=5,I.__kBitsPerCharTableMultiplier=1<<I.__kBitsPerCharTableShift,I.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],I.__kBitConversionBuffer=new ArrayBuffer(8),I.__kBitConversionDouble=new Float64Array(I.__kBitConversionBuffer),I.__kBitConversionInts=new Int32Array(I.__kBitConversionBuffer),I.__kBitConversionIntHigh=I.__detectBigEndian()?0:1,I.__kBitConversionIntLow=I.__detectBigEndian()?1:0,I.__clz30=t?function(e){return t(e)-2}:function(e){var t=Math.LN2,r=Math.log;return 0===e?30:0|29-(0|r(e>>>0)/t)},I.__imul=e||function(e,t){return 0|e*t},I}))},5969:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9611),r(8024),r(7098),r(7354)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=e.PosterMask=e.PlayerAdapter=e.LoadingMask=e.FullScreen=void 0;n=o(n);i=o(i);function o(e){return e&&e.__esModule?e:{default:e}}function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(){"use strict";l=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,c,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){f(o,n,i,a,s,"next",e)}function s(e){f(o,n,i,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g="PlayerUtils";var b=e.PlayerAdapter=function(){function e(){h(this,e)}return v(e,null,[{key:"multiPlatformAdapter",value:function(){var e=d(l().mark((function e(){return l().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(e){if(i["default"].isWKWebview()){var t=window.WeixinJSBridge;if(t){r.LoggerFactory.info(g,"multiPlatformAdapter handle begin");t.invoke("getNetworkType",{},(function(){e()}),false)}else{document.addEventListener("WeixinJSBridgeReady",(function(){r.LoggerFactory.info(g,"multiPlatformAdapter WeixinJSBridgeReady, handle begin");t.invoke("getNetworkType",{},(function(){e()}),false)}))}}else{e()}})));case 1:case"end":return t.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()}])}();var _=e.LoadingMask=function(){function e(t){h(this,e);this.loadingTimer={lastLoadingStatus:""};this.loadingParentDiv=t}return v(e,[{key:"loadingMask",value:function e(t){var r=this;var n=this.loadingParentDiv.querySelector("#loadingMask");if(!n&&t){n=i["default"].createLoadingMask();this.loadingParentDiv.appendChild(n)}if(n){var o=t?"block":"none";if(this.loadingTimer.timer){this.loadingTimer.lastLoadingStatus=o;return}if(n.style.display!==o){n.style.display=o}if(!t){return}this.loadingTimer.timer=setTimeout((function(){clearTimeout(r.loadingTimer.timer);delete r.loadingTimer.timer;if(r.loadingTimer.lastLoadingStatus==="none"){n.style.display="none"}r.loadingTimer.lastLoadingStatus=""}),300)}}},{key:"stopLoadingMask",value:function e(){clearTimeout(this.loadingTimer.timer);delete this.loadingTimer.timer;this.loadingTimer.lastLoadingStatus="";var t=this.loadingParentDiv.querySelector("#loadingMask");if(t){var r;(r=this.loadingParentDiv)===null||r===void 0||r.removeChild(t)}}}])}();var S=e.PosterMask=function(){function e(){h(this,e)}return v(e,null,[{key:"preLoadPoster",value:function t(n){if(e.preLoadImages.has(n)){return}var i=document.createElement("div");i.setAttribute("id","poster_div");i.style.width="100%";i.style.height="100%";i.style.position="absolute";i.style.display="none";i.style["z-index"]=98;i.style["justify-content"]="center";i.style["align-items"]="center";i.style.overflow="hidden";var o=new Image;o.src=n;i.appendChild(o);e.preLoadImages.set(n,i);if(e.preLoadImages.size>5){var a=s(e.preLoadImages.keys()),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;e.preLoadImages["delete"](c);break}}catch(e){a.e(e)}finally{a.f()}}o.onload=function(){i.style["background-color"]="#000";r.LoggerFactory.info(g,"preLoadPoster success")};o.onerror=function(){r.LoggerFactory.error(g,"preLoadPoster failed");e.disPlayPoster(false,n);e.preLoadImages["delete"](n)}}},{key:"attachPoster",value:function r(n,i,o){var a=e.preLoadImages.get(i);if(!a){return}var s=a.querySelector("img");if(o===t.PosterMode.FILL){s.style.width="100%";s.style.height="100%"}else{s.style.width="auto";s.style.height="auto"}if(!n.querySelector("#poster_div img")){n.appendChild(a)}}},{key:"detachPoster",value:function t(r,n){var i=e.preLoadImages.get(n);if(!i){return}r.removeChild(i);i.style.display="none"}},{key:"disPlayPoster",value:function t(r,n){var i=e.preLoadImages.get(n);if(!i){return}if(r){i.style.display="flex"}else{i.style.display="none"}}}])}();S.preLoadImages=new Map;var E=e.FullScreen=function(){function e(){h(this,e);this.supportFullScreenApi={};this.fullScreenApiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];this.isFullScreen=false;var t=s(this.fullScreenApiMap),r;try{for(t.s();!(r=t.n()).done;){var n=r.value;if(n[1]in document){for(var i=0;i<this.fullScreenApiMap[0].length;i++){this.supportFullScreenApi[this.fullScreenApiMap[0][i]]=n[i]}break}}}catch(e){t.e(e)}finally{t.f()}if(Object.keys(this.supportFullScreenApi).length<1){this.supportFullScreenApi={requestFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenElement:"webkitFullscreenElement",fullscreenEnabled:"webkitFullscreenEnabled",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"}}this.addFullScreenEventsListener()}return v(e,[{key:"enterFullScreen",value:function e(t,i,o){this.videoElement=i;this.event=o;try{if(this.supportFullScreenApi.requestFullscreen){if(n["default"].isSafari&&i.webkitEnterFullscreen){i.webkitEnterFullscreen();return}if(t[this.supportFullScreenApi.requestFullscreen]){r.LoggerFactory.info(g,"enter fullScreen with ".concat(this.supportFullScreenApi.requestFullscreen," on player element."));t[this.supportFullScreenApi.requestFullscreen]();return}if(this.supportFullScreenApi.requestFullscreen&&i[this.supportFullScreenApi.requestFullscreen]){r.LoggerFactory.info(g,"enter fullScreen with ".concat(this.supportFullScreenApi.requestFullscreen," on video element."));i[this.supportFullScreenApi.requestFullscreen]()}}}catch(e){r.LoggerFactory.error(g,"enterFullScreen occur error: ".concat(e,"."))}}},{key:"exitFullScreen",value:function e(){try{if(this.supportFullScreenApi.exitFullscreen&&document[this.supportFullScreenApi.exitFullscreen]){r.LoggerFactory.info(g,"exit fullScreen with ".concat(this.supportFullScreenApi.exitFullscreen,"."));document[this.supportFullScreenApi.exitFullscreen]()}}catch(e){r.LoggerFactory.error(g,"exitFullScreen occur error: ".concat(e,"."))}}},{key:"getFullScreenStatus",value:function e(){return this.isFullScreen}},{key:"addFullScreenEventsListener",value:function e(){var i=this;if(Object.keys(this.supportFullScreenApi).length<1){r.LoggerFactory.error(g,"addFullScreenEventsListener failed.");return}var o=function e(){var o;if(!n["default"].isSafari){if(document[i.supportFullScreenApi.fullscreenElement]){r.LoggerFactory.info(g,"trigger enter-full-screen event.");i.isFullScreen=true;i.event.emit(t.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:true,isPause:i.videoElement.paused})}else{r.LoggerFactory.info(g,"trigger exit-full-screen event.");i.isFullScreen=false;i.event.emit(t.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:false,isPause:i.videoElement.paused})}return}if(i.isFullScreen!==!!((o=i.videoElement)!==null&&o!==void 0&&o.webkitDisplayingFullscreen)){var a;if((a=i.videoElement)!==null&&a!==void 0&&a.webkitDisplayingFullscreen){r.LoggerFactory.info(g,"trigger enter-full-screen event.");i.isFullScreen=true;i.event.emit(t.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:true,isPause:i.videoElement.paused})}else{r.LoggerFactory.info(g,"trigger exit-full-screen event.");i.isFullScreen=false;i.event.emit(t.HWLLSEvents.FULLSCREEN_STATUS_CHANGED,{isFullScreen:false,isPause:i.videoElement.paused})}}};if(n["default"].isSafari){setInterval(o,100)}else{document.addEventListener(this.supportFullScreenApi.fullscreenchange,o)}}}])}();var w=new E;var T=e["default"]=w}))},6125:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8024),r(7098),r(2216),r(2363),r(7808),r(2441),r(7354),r(3652),r(4772),r(7169),r(9974),r(3442)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HWLLSEnter=void 0;r=h(r);s=h(s);function h(e){return e&&e.__esModule?e:{default:e}}function p(){"use strict";p=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:C(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(L([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=g.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==A(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function C(t,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?m:h,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function k(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(A(t)+" is not iterable")}return b.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(R.prototype),c(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new R(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),c(T,u,"Generator"),c(T,a,(function(){return this})),c(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function v(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){v(o,n,i,a,s,"next",e)}function s(e){v(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=S(e,"string");return"symbol"==A(t)?t:t+""}function S(e,t){if("object"!=A(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t,r){return t=R(t),w(e,I()?Reflect.construct(t,r||[],R(e).constructor):t.apply(e,r))}function w(e,t){if(t&&("object"==A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function t(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function A(e){"@babel/helpers - typeof";return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}var O=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":A(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var P=new u.Log({module:"HWLLSEnter"});var x=e.HWLLSEnter=function(e){function a(){var e;y(this,a);e=E(this,a,["HWLLSEnter"]);s["default"].configurationEnvironment();return e}C(a,e);return b(a,[{key:"getVersion",value:function e(){return n.configs.SDK_VERSION}},{key:"checkSystemRequirements",value:function(){var e=m(p().mark((function e(){return p().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return r["default"].checkSystemRequirements();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setParameter",value:function e(t,r){return i.parametersUtil.setParameter(t,r)}},{key:"createClient",value:function e(){return new o.HWLLSClient}},{key:"createStream",value:function e(t){if(t.audio!==true&&!t.audioSource){throw new f.HwLLSError(f.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION)}if(t.audio===true&&t.audioSource){throw new f.HwLLSError(f.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION)}return new l.LocalStream(t)}},{key:"setLogLevel",value:function e(r){u.Log.setLogLevel(r);return t.LoggerFactory.setLogLevel(r)}},{key:"setUserTrackCallback",value:function e(t){d.UserTrack.setUserTrackCallback(t)}}])}(a.EmitterAble);O([(0,c.printfDecorator)(P)],x.prototype,"getVersion",null);O([(0,c.printfDecorator)(P)],x.prototype,"checkSystemRequirements",null);O([(0,c.printfDecorator)(P)],x.prototype,"setParameter",null);O([(0,c.printfDecorator)(P)],x.prototype,"createClient",null);O([(0,c.printfDecorator)(P)],x.prototype,"createStream",null);O([(0,c.printfDecorator)(P)],x.prototype,"setLogLevel",null);O([(0,c.printfDecorator)(P)],x.prototype,"setUserTrackCallback",null)}))},6334:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7007),r(5268)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BaseTrack=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==n(t)?t:t+""}function u(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.BaseTrack=function(){function e(r){i(this,e);this.trackType_=r.trackType;this.track_=r.track;this.playState_=2;this.trackMuted_=false;this.event_=r.event||new t.EventEmitter}return a(e,[{key:"getTrackType",value:function e(){return this.trackType_}},{key:"getTrackId",value:function e(){return this.trackId_}},{key:"getElementId",value:function e(){return this.elementId_}},{key:"getObjectFit",value:function e(){return this.objectFit_}},{key:"getTrack",value:function e(){return this.track_}},{key:"getTrackMuted",value:function e(){if(this.track_){return!this.track_.enabled}return this.trackMuted_}},{key:"muteTrack",value:function e(){if(this.track_){this.track_.enabled=false}this.trackMuted_=true}},{key:"setAudioVolume",value:function e(t){if(this.trackType_!==r.MediaType.TRACK_TYPE_AUDIO){return}this.audioVolume_=t/100;if(this.player_){this.player_.setVolume(this.audioVolume_)}}},{key:"getAudioLevel",value:function e(){if(this.trackType_!==r.MediaType.TRACK_TYPE_AUDIO||!this.player_){return 0}return this.player_.getAudioLevel()}}])}()}))},6347:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258),r(9969),r(7360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i,o,s,u,c,l,f;function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=_(e,"string");return"symbol"==a(t)?t:t+""}function _(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var E=e["default"]=(i=(0,r.printfDecorator)((0,t.getPLogger)()),o=(0,r.printfDecorator)((0,t.getPLogger)()),s=(0,r.printfDecorator)((0,t.getPLogger)()),u=(0,r.printfDecorator)((0,t.getPLogger)()),c=(0,r.printfDecorator)((0,t.getPLogger)()),l=(f=function(){function e(r){var n=this;v(this,e);g(this,"audioContext",void 0);g(this,"url",void 0);g(this,"processorName",void 0);g(this,"audioCallback",void 0);g(this,"input",void 0);g(this,"processorOptions",void 0);g(this,"stream",void 0);g(this,"startProm",void 0);g(this,"audioWorkletNode",void 0);g(this,"autoCollectAudio",void 0);g(this,"onMessage",(function(e){var t;(t=n.audioCallback)===null||t===void 0||t.call(n,e.data)}));g(this,"dealStart",function(){var r=p(d().mark((function r(i){var o,a,s;return d().wrap((function r(u){while(1)switch(u.prev=u.next){case 0:u.prev=0;u.next=3;return n.stop();case 3:n.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(i!==null&&i!==void 0&&i.stream)){u.next=8;break}n.stream=i.stream;u.next=12;break;case 8:s=i!==null&&i!==void 0&&i.deviceId?{deviceId:{exact:i.deviceId}}:true;u.next=11;return navigator.mediaDevices.getUserMedia({audio:s});case 11:n.stream=u.sent;case 12:(o=n.input)===null||o===void 0||o.disconnect();n.input=n.audioContext.createMediaStreamSource(n.stream);u.next=16;return n.audioContext.audioWorklet.addModule(n.url);case 16:if(n.audioWorkletNode){n.audioWorkletNode.port.onmessage=null}(a=n.audioWorkletNode)===null||a===void 0||a.disconnect();n.audioWorkletNode=new AudioWorkletNode(n.audioContext,n.processorName,{processorOptions:n.processorOptions});n.input.connect(n.audioWorkletNode).connect(n.audioContext.destination);n.audioWorkletNode.port.onmessage=n.onMessage;u.next=26;break;case 23:u.prev=23;u.t0=u["catch"](0);(0,t.getPLogger)().error("dealStart",u.t0);case 26:delete n.startProm;case 27:case"end":return u.stop()}}),r,null,[[0,23]])})));return function(e){return r.apply(this,arguments)}}());(0,t.getPLogger)().debug("constructor",r.processorName);this.url=r.url;this.processorName=r.processorName;this.audioCallback=r.audioCallback;this.processorOptions=r.processorOptions}return y(e,[{key:"start",value:function(){var e=p(d().mark((function e(t){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!this.startProm){this.startProm=this.dealStart(t)}this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stop",value:function(){var e=p(d().mark((function e(){var r,i,o;return d().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(r=this.input)===null||r===void 0||r.disconnect();delete this.input;(i=this.audioWorkletNode)===null||i===void 0||i.disconnect();delete this.audioWorkletNode;a.next=7;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 7:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=14;break;case 11:a.prev=11;a.t0=a["catch"](0);(0,t.getPLogger)().error("stop",a.t0);case 14:case"end":return a.stop()}}),e,this,[[0,11]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"mute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=false;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"unmute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=true;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=p(d().mark((function e(t){var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:(r=this.audioContext)===null||r===void 0||r.setSinkId(t);case 1:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}(),g(f,"sampleRate",16e3),f),S(l.prototype,"start",[i],Object.getOwnPropertyDescriptor(l.prototype,"start"),l.prototype),S(l.prototype,"stop",[o],Object.getOwnPropertyDescriptor(l.prototype,"stop"),l.prototype),S(l.prototype,"mute",[s],Object.getOwnPropertyDescriptor(l.prototype,"mute"),l.prototype),S(l.prototype,"unmute",[u],Object.getOwnPropertyDescriptor(l.prototype,"unmute"),l.prototype),S(l.prototype,"setSinkId",[c],Object.getOwnPropertyDescriptor(l.prototype,"setSinkId"),l.prototype),l)}))},6360:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8024),r(5951)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CmdMsgPacketUtils=e.CmdMessageBuilder=void 0;r=n(r);function n(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==i(t)?t:t+""}function c(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l="CmdMessageBuilder";var f=e.CmdMessageBuilder=function(){function e(t,r,n,i){o(this,e);this.RTP_HEADER_V_P_X_CC=144;this.RTP_HEADER_V_P_X_CC_BRODACAST=128;this.cmdMsgPacketSeqNum=0;this.selfUserUid=t;this.cmdSendSsrc=r;this.cmdReceiveSsrc=n;this.msgFormat=i;this.RTP_HEADER_M_PT=99}return s(e,[{key:"parseCmdMessage",value:function e(n){var i=new DataView(n);var o=i.getUint16(2);var a=i.getUint32(4);t.LoggerFactory.debug(l,"receive ".concat(o," msg of timeStamp ").concat(a));var s=i.getUint32(8);t.LoggerFactory.info(l,"receiveSsrc:".concat(s,", cmdReceiveSsrc:").concat(this.cmdReceiveSsrc));if(s!==this.cmdReceiveSsrc){t.LoggerFactory.error(l,"receive msg ssrc not matched, ".concat(this.cmdReceiveSsrc," - ").concat(s));return null}var u=(i.getUint8(0)&16)===0;var c=0;if(u){c=12}else{var f=i.getUint16(14);c=16+f*4}var h=r["default"].toNumber(r["default"].DataViewGetBigUint64(i,c));var p=i.buffer.slice(c+16);var v;if(this.msgFormat===1){v=d.ArrayBufferToMsg(p)}else{v=p}return{msg:v,srcUserId:h}}},{key:"buildCmdMessage",value:function e(t){var n=!(t!==null&&t!==void 0&&t.userUid);var i=new DataView(new ArrayBuffer(n?28:44));if(n){i.setUint8(0,this.RTP_HEADER_V_P_X_CC_BRODACAST)}else{i.setUint8(0,this.RTP_HEADER_V_P_X_CC)}i.setUint8(1,this.RTP_HEADER_M_PT);i.setUint16(2,this.cmdMsgPacketSeqNum++);i.setUint32(4,Math.floor((new Date).getTime()/1e3));i.setUint32(8,this.cmdSendSsrc);var o=t||{},a=o.userUid,s=a===void 0?0:a,u=o.msg;var c=0;if(!n){i.setUint16(12,4096);i.setUint16(14,3);i.setUint8(16,21);i.setUint8(17,8);r["default"].DataViewSetBigUint64(i,18,r["default"].BigInt(s));i.setUint16(26,0);c=28}else{c=12}r["default"].DataViewSetBigUint64(i,c,r["default"].BigInt(this.selfUserUid));r["default"].DataViewSetBigUint64(i,c+8,r["default"].BigInt(0));return d.concatArrayBuffer(i.buffer,d.msgBodyToArrayBuffer(u||""))}}])}();var d=e.CmdMsgPacketUtils=function(){function e(){o(this,e)}return s(e,null,[{key:"msgBodyToArrayBuffer",value:function e(t){if(typeof t==="string"){var r=new TextEncoder;var n=r.encode(t);return n.buffer}return t}},{key:"ArrayBufferToMsg",value:function e(t){var r=new TextDecoder("utf-8");var n=r.decode(t);return n}},{key:"concatArrayBuffer",value:function e(){var t=0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}for(var o=0,a=n;o<a.length;o++){var s=a[o];t+=s.byteLength}var u=new Uint8Array(t);var c=0;for(var l=0,f=n;l<f.length;l++){var d=f[l];var h=new Uint8Array(d);u.set(h,c);c+=d.byteLength}return u.buffer}},{key:"arrayBufferToNumberArray",value:function e(t){var r=[];for(var n=0;n<t.byteLength;n+=4){r.push(t.getUint32(n))}return r}},{key:"numberArrayToArrayBuffer",value:function e(t){var r=new DataView(new ArrayBuffer(t.length*4));for(var n=0;n<t.length;n++){r.setUint32(n*4,t[n])}return r.buffer}}])}()}))},6620:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=function(){function e(){var t=this;r(this,e);var n=navigator.connection;if(!n){return}this.networkType=n.type||"";this.networkRTT=n.rtt||-1;this.downlink=n.downlink||-1;if(Object.prototype.hasOwnProperty.call(navigator.connection,"onchange")){navigator.connection.onchange=function(){var e=navigator.connection;t.networkType=(e===null||e===void 0?void 0:e.type)||"";t.networkRTT=(e===null||e===void 0?void 0:e.rtt)||-1;t.downlink=(e===null||e===void 0?void 0:e.downlink)||-1}}}return i(e,[{key:"getNetworkType",value:function e(){return this.networkType}},{key:"getNetworkRTT",value:function e(){return this.networkRTT}},{key:"getNetworkInfo",value:function e(){return{networkType:this.networkType,networkRTT:this.networkRTT,downlink:this.downlink}}}])}();var u=new s;var c=e["default"]=u}))},6799:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354),r(4341),r(4772),r(3652),r(7098)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;t=a(t);o=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==d(t)?t:t+""}function f(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){"@babel/helpers - typeof";return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var h=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":d(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var p=new i.Log({module:"ConstraintUtil"});var v=function e(n,i){if(t["default"].isSupportConstraints("aspectRatio")&&!o["default"].isSafari){n.aspectRatio={ideal:i.width/i.height}}n.width=o["default"].isSafari?{min:r.RTCVideoProfileMap["90p_2"].width}:{min:r.RTCVideoProfileMap["90p_2"].width,ideal:i.width};n.height=o["default"].isSafari?{min:r.RTCVideoProfileMap["90p_2"].height}:{min:r.RTCVideoProfileMap["90p_2"].height,ideal:i.height};n.frameRate=i.frameRate};var m=e["default"]=function(){function e(){s(this,e)}return c(e,null,[{key:"getOptimalVideoConstraint",value:function e(t,r){var n={};var i=[];if(["user","environment","left","right"].includes(t)){n.facingMode={exact:t}}else{n.deviceId={exact:t}}var o=[{width:r.width,height:r.height},{aspectRatio:r.width/r.height}];i.push.apply(i,o);v(n,r);n.advanced=i;var a={};a.video=n;return a}},{key:"getSuboptimalVideoConstraint",value:function e(t,r){var n={};if(["user","environment","left","right"].includes(t)){n.facingMode={exact:t}}else{n.deviceId={exact:t}}v(n,r);var i={};i.video=n;return i}},{key:"getNextVideoConstraint",value:function e(t,r){var n={};if(["user","environment","left","right"].includes(t)){n.facingMode={exact:t}}else{n.deviceId={exact:t}}v(n,r);var i={};i.video=n;return i}},{key:"getWorstVideoConstraint",value:function e(t,r){var n={};if(["user","environment","left","right"].includes(t)){n.facingMode={ideal:t}}else{n.deviceId={ideal:t}}v(n,r);var i={};i.video=n;return i}},{key:"getRecoveryVideoConstraint",value:function e(){var t={};t.video=true;return t}},{key:"initAudioConstraint",value:function e(t,r){var n={};var i={sampleRate:r.sampleRate,channelCount:r.channelCount,deviceId:t,echoCancellation:true};i.noiseSuppression=true;i.autoGainControl=true;n.audio=i;return n}}])}();h([(0,n.printfDecorator)(p)],m,"initAudioConstraint",null)}))},7007:e=>{"use strict";var t=typeof Reflect==="object"?Reflect:null;var r=t&&typeof t.apply==="function"?t.apply:function e(t,r,n){return Function.prototype.apply.call(t,r,n)};var n;if(t&&typeof t.ownKeys==="function"){n=t.ownKeys}else if(Object.getOwnPropertySymbols){n=function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}}else{n=function e(t){return Object.getOwnPropertyNames(t)}}function i(e){if(console&&console.warn)console.warn(e)}var o=Number.isNaN||function e(t){return t!==t};function a(){a.init.call(this)}e.exports=a;e.exports.once=g;a.EventEmitter=a;a.prototype._events=undefined;a.prototype._eventsCount=0;a.prototype._maxListeners=undefined;var s=10;function u(e){if(typeof e!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:true,get:function(){return s},set:function(e){if(typeof e!=="number"||e<0||o(e)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".")}s=e}});a.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};a.prototype.setMaxListeners=function e(t){if(typeof t!=="number"||t<0||o(t)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".")}this._maxListeners=t;return this};function c(e){if(e._maxListeners===undefined)return a.defaultMaxListeners;return e._maxListeners}a.prototype.getMaxListeners=function e(){return c(this)};a.prototype.emit=function e(t){var n=[];for(var i=1;i<arguments.length;i++)n.push(arguments[i]);var o=t==="error";var a=this._events;if(a!==undefined)o=o&&a.error===undefined;else if(!o)return false;if(o){var s;if(n.length>0)s=n[0];if(s instanceof Error){throw s}var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));u.context=s;throw u}var c=a[t];if(c===undefined)return false;if(typeof c==="function"){r(c,this,n)}else{var l=c.length;var f=v(c,l);for(var i=0;i<l;++i)r(f[i],this,n)}return true};function l(e,t,r,n){var o;var a;var s;u(r);a=e._events;if(a===undefined){a=e._events=Object.create(null);e._eventsCount=0}else{if(a.newListener!==undefined){e.emit("newListener",t,r.listener?r.listener:r);a=e._events}s=a[t]}if(s===undefined){s=a[t]=r;++e._eventsCount}else{if(typeof s==="function"){s=a[t]=n?[r,s]:[s,r]}else if(n){s.unshift(r)}else{s.push(r)}o=c(e);if(o>0&&s.length>o&&!s.warned){s.warned=true;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");l.name="MaxListenersExceededWarning";l.emitter=e;l.type=t;l.count=s.length;i(l)}}return e}a.prototype.addListener=function e(t,r){return l(this,t,r,false)};a.prototype.on=a.prototype.addListener;a.prototype.prependListener=function e(t,r){return l(this,t,r,true)};function f(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function d(e,t,r){var n={fired:false,wrapFn:undefined,target:e,type:t,listener:r};var i=f.bind(n);i.listener=r;n.wrapFn=i;return i}a.prototype.once=function e(t,r){u(r);this.on(t,d(this,t,r));return this};a.prototype.prependOnceListener=function e(t,r){u(r);this.prependListener(t,d(this,t,r));return this};a.prototype.removeListener=function e(t,r){var n,i,o,a,s;u(r);i=this._events;if(i===undefined)return this;n=i[t];if(n===undefined)return this;if(n===r||n.listener===r){if(--this._eventsCount===0)this._events=Object.create(null);else{delete i[t];if(i.removeListener)this.emit("removeListener",t,n.listener||r)}}else if(typeof n!=="function"){o=-1;for(a=n.length-1;a>=0;a--){if(n[a]===r||n[a].listener===r){s=n[a].listener;o=a;break}}if(o<0)return this;if(o===0)n.shift();else{m(n,o)}if(n.length===1)i[t]=n[0];if(i.removeListener!==undefined)this.emit("removeListener",t,s||r)}return this};a.prototype.off=a.prototype.removeListener;a.prototype.removeAllListeners=function e(t){var r,n,i;n=this._events;if(n===undefined)return this;if(n.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(n[t]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete n[t]}return this}if(arguments.length===0){var o=Object.keys(n);var a;for(i=0;i<o.length;++i){a=o[i];if(a==="removeListener")continue;this.removeAllListeners(a)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}r=n[t];if(typeof r==="function"){this.removeListener(t,r)}else if(r!==undefined){for(i=r.length-1;i>=0;i--){this.removeListener(t,r[i])}}return this};function h(e,t,r){var n=e._events;if(n===undefined)return[];var i=n[t];if(i===undefined)return[];if(typeof i==="function")return r?[i.listener||i]:[i];return r?y(i):v(i,i.length)}a.prototype.listeners=function e(t){return h(this,t,true)};a.prototype.rawListeners=function e(t){return h(this,t,false)};a.listenerCount=function(e,t){if(typeof e.listenerCount==="function"){return e.listenerCount(t)}else{return p.call(e,t)}};a.prototype.listenerCount=p;function p(e){var t=this._events;if(t!==undefined){var r=t[e];if(typeof r==="function"){return 1}else if(r!==undefined){return r.length}}return 0}a.prototype.eventNames=function e(){return this._eventsCount>0?n(this._events):[]};function v(e,t){var r=new Array(t);for(var n=0;n<t;++n)r[n]=e[n];return r}function m(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function y(e){var t=new Array(e.length);for(var r=0;r<t.length;++r){t[r]=e[r].listener||e[r]}return t}function g(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o);n(r)}function o(){if(typeof e.removeListener==="function"){e.removeListener("error",i)}r([].slice.call(arguments))}_(e,t,o,{once:true});if(t!=="error"){b(e,i,{once:true})}}))}function b(e,t,r){if(typeof e.on==="function"){_(e,"error",t,r)}}function _(e,t,r,n){if(typeof e.on==="function"){if(n.once){e.once(t,r)}else{e.on(t,r)}}else if(typeof e.addEventListener==="function"){e.addEventListener(t,(function i(o){if(n.once){e.removeEventListener(t,i)}r(o)}))}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}}},7057:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(6347)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;t=r(t);function r(e){return e&&e.__esModule?e:{default:e}}var n=e["default"]=t["default"]}))},7098:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974),r(8418),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,s=!0,u=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return s=t.done,t},e:function e(t){u=!0,o=t},f:function e(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw o}}}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==i(t)?t:t+""}function v(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var m=new n.Log({module:"System"});var y=function(){function e(){f(this,e)}return h(e,null,[{key:"checkSystemRequirements",value:function(){var e=l(u().mark((function e(){return u().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return this.webRTCCapabilityCheck();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"isOnlySupportUnfiedPlan",value:function t(){var r=true;if(e.isChrome){var n=e.getBrowserVersion();r=n>90}else if(e.isSafari){r=!!(window.RTCRtpTransceiver&&"currentDirection"in window.RTCRtpTransceiver.prototype)}m.info("isOnlySupportUnfiedPlan",r);return r}},{key:"webRTCCapabilityCheck",value:function(){var r=l(u().mark((function r(){var n,i;return u().wrap((function r(o){while(1)switch(o.prev=o.next){case 0:if(!(!window||!navigator)){o.next=2;break}throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_WEBRTC_UNSUPPORTED,"window or navigator error");case 2:if(window.RTCPeerConnection){o.next=4;break}throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_WEBRTC_UNSUPPORTED,"RTCPeerConnection Object not exist");case 4:o.prev=4;i=new RTCPeerConnection;o.next=8;return i.createOffer({offerToReceiveAudio:false,offerToReceiveVideo:true});case 8:n=o.sent;if(!(e.isChrome&&!/H264/i.test(n.sdp))){o.next=15;break}i.close();i=new RTCPeerConnection;o.next=14;return i.createOffer({offerToReceiveAudio:false,offerToReceiveVideo:true});case 14:n=o.sent;case 15:i.close();o.next=21;break;case 18:o.prev=18;o.t0=o["catch"](4);throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_WEBRTC_UNSUPPORTED,"RTCPeerConnection construct error: ".concat(o.t0.message));case 21:if(/H264/i.test(n.sdp)){o.next=23;break}throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_WEBRTC_UNSUPPORTED,"RTCPeerConnection unsupport AVC codec.");case 23:if(!(e.isChrome&&!e.browserSupportCheckByPolicy())){o.next=25;break}throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_WEBRTC_UNSUPPORTED,"browser version not support: ".concat(navigator.userAgent));case 25:return o.abrupt("return",true);case 26:case"end":return o.stop()}}),r,null,[[4,18]])})));function n(){return r.apply(this,arguments)}return n}()},{key:"browserSupportCheckByPolicy",value:function e(){var t=false;var n=r.browserConfigs.POLICY===0?r.browserConfigs.WEBRTC_UNSUPPORT_BLACKLIST:r.browserConfigs.WEBRTC_UNSUPPORT_WHITELIST;var i=o(n),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;if(s.test(navigator.userAgent)){t=true;break}}}catch(e){i.e(e)}finally{i.f()}return r.browserConfigs.POLICY===0?!t:t}},{key:"getBrowserVersion",value:function t(){var r=e.detectBrowser();if(r.browser==="safari"){var n=/.*Version\/(\d+).*/gi.exec(navigator.userAgent);if(n&&n.length===2){return parseInt(n[1])}}if(r.browser==="chrome"){return r.version||91}return r.version||0}},{key:"detectBrowser",value:function t(){var r={browser:"",version:0,supportsUnifiedPlan:false};if(navigator.webkitGetUserMedia||!window.isSecureContext&&window.webkitRTCPeerConnection&&!window.RTCIceGatherer){r.browser="chrome";r.version=e.extractVersion(navigator.userAgent,/Chrom(e|ium)\/(\d+)\./,2)}else if(window.RTCPeerConnection&&navigator.userAgent.match(/AppleWebKit\/(\d+)\./)){r.browser="safari";r.version=e.extractVersion(navigator.userAgent,/AppleWebKit\/(\d+)\./,1);r.supportsUnifiedPlan=window.RTCRtpTransceiver&&"currentDirection"in window.RTCRtpTransceiver.prototype}else{r.browser="Not a supported browser.";return r}return r}},{key:"extractVersion",value:function e(t,r,n){var i=t.match(r);return i&&i.length>=n&&parseInt(i[n],10)}}])}();y.isChrome=!!navigator.webkitGetUserMedia||!window.isSecureContext&&window.webkitRTCPeerConnection&&!window.RTCIceGatherer;y.isSafari=window.RTCPeerConnection&&!!navigator.userAgent.match(/AppleWebKit\/(\d+)\./);var g=e["default"]=y}))},7169:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974),r(5268),r(3652),r(724),r(7354),r(8094),r(8736),r(3388),r(1236),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LocalStream=void 0;o=f(o);function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return v(e)||p(e,t)||y(e,t)||h()}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function v(e){if(Array.isArray(e))return e}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function y(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(){"use strict";b=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(n||[]);return i(a,"_invoke",{value:C(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",m={};function y(){}function g(){}function _(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=y.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==j(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function C(t,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?v:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function k(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:g,configurable:!0}),g.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(R.prototype),c(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new R(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),c(T,u,"Generator"),c(T,a,(function(){return this})),c(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=x,P.prototype={constructor:P,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:x(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),m}},t}function _(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){_(o,n,i,a,s,"next",e)}function s(e){_(o,n,i,a,s,"throw",e)}a(void 0)}))}}function E(e,t,r,n){var i=w(M(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=T(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},w.apply(null,arguments)}function T(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k(n.key),n)}}function C(e,t,r){return t&&R(e.prototype,t),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){var t=A(e,"string");return"symbol"==j(t)?t:t+""}function A(e,t){if("object"!=j(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function O(e,t,r){return t=M(t),P(e,L()?Reflect.construct(t,r||[],M(e).constructor):t.apply(e,r))}function P(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function t(){return!!e})()}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function j(e){"@babel/helpers - typeof";return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}var U=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":j(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var V=new n.Log({module:"LocalStream"});var W=function(e){function t(e,r,n){var i;I(this,t);i=O(this,t,[e,r]);i.captureResults=n;return i}N(t,e);return C(t,[{key:"getMediaCaptureResult",value:function e(){return this.captureResults}},{key:"getMediaCaptureResultByType",value:function e(t){var r;return(r=this.captureResults)===null||r===void 0?void 0:r.find((function(e){return e.type===t}))}},{key:"toString",value:function e(){return'["code": '.concat(this.code,', "message": "').concat(this.message," : ").concat(JSON.stringify(this.captureResults),'"]')}}])}(t.HwLLSError);var B=e.LocalStream=function(e){function n(e){var t;I(this,n);t=O(this,n,[{isRemote:false,type:"local"}]);t.client_=[];t.module_="LocalStream";t.userId_=e.userId;t.audio_=e.audio;t.microphoneId_=e.microphoneId;t.audioSource_=e.audioSource;V.info(t.module_,"new local stream, stream config: ".concat(JSON.stringify(e)));return t}N(n,e);return C(n,[{key:"setMediaStream",value:function e(t){if(!this.mediaStream){this.mediaStream=new MediaStream}this.mediaStream.addTrack(t)}},{key:"getMediaStream",value:function e(){return this.mediaStream}},{key:"getLocalId",value:function e(){return this.id_}},{key:"addClient",value:function e(t){this.client_=this.client_.filter((function(e){return e&&e.getSymbol()!==t.getSymbol()}));if(t){this.client_.push(t)}}},{key:"initialize",value:function(){var e=S(b().mark((function e(){return b().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return this.initializeImpl();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"reset",value:function(){var e=S(b().mark((function e(){var t,n,i,o;return b().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:this.closeImpl();t=m(this.getHRTCTracks({hasTrack:true}));a.prev=2;t.s();case 4:if((n=t.n()).done){a.next=12;break}i=n.value;o=i.getTrack();if(!o){a.next=10;break}a.next=10;return this.removeTrack(o);case 10:a.next=4;break;case 12:a.next=17;break;case 14:a.prev=14;a.t0=a["catch"](2);t.e(a.t0);case 17:a.prev=17;t.f();return a.finish(17);case 20:this.tracks[r.MediaType.TRACK_TYPE_AUDIO].clear();case 21:case"end":return a.stop()}}),e,this,[[2,14,17,20]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"initMainStream",value:function(){var e=S(b().mark((function e(){var t=this;return b().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return s.deviceChangeListener.initDeviceChangedNotify(this.eventEmitter,true);case 2:this.on(u.RTCClientEvent.CameraChanged,(function(e){if(e.state==="REMOVE"){t.clearEffectiveDeviceId(e.deviceId,"videoInput")}}));this.on(u.RTCClientEvent.RecordingDeviceChanged,(function(e){if(e.state==="REMOVE"){t.clearEffectiveDeviceId(e.deviceId,"audioInput")}}));if(!this.audioSource_){r.next=6;break}return r.abrupt("return",this.initMainStreamWithTrack(this.audioSource_));case 6:r.next=8;return this.addCaptureWithCfg(this.audioProfile_);case 8:return r.abrupt("return",r.sent);case 9:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initializeImpl",value:function(){var e=S(b().mark((function e(){return b().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:V.info(this.module_,"initializeImpl begin");t.prev=1;t.next=4;return this.reset();case 4:t.next=6;return this.initMainStream();case 6:return t.abrupt("return",t.sent);case 9:t.prev=9;t.t0=t["catch"](1);V.error(this.module_,"initializeImpl fail, errMsg:".concat(t.t0));if(!(typeof t.t0.getMediaCaptureResult!=="function"&&typeof t.t0.getCode==="function")){t.next=16;break}throw new W(t.t0.getCode(),t.t0.getMsg());case 16:throw t.t0;case 17:case"end":return t.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"removeTrack",value:function(){var e=S(b().mark((function e(t){return b().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return this.removeTrackImpl(t);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"removeTrackImpl",value:function(){var e=S(b().mark((function e(n){var i;var o,a,s,u,c,l;return b().wrap((function e(f){while(1)switch(f.prev=f.next){case 0:if(n){f.next=3;break}V.error(this.module_,"removeTrack, track is null");throw new t.HwLLSError(t.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION,"track is null");case 3:if(n.kind===r.MediaType.TRACK_TYPE_AUDIO){o=m(this.tracks[r.MediaType.TRACK_TYPE_AUDIO]);try{for(o.s();!(a=o.n()).done;){u=d(a.value,2),c=u[0],l=u[1];if(n.id===(l===null||l===void 0||(s=l.getTrack())===null||s===void 0?void 0:s.id)){l.removeTrack();this.tracks[r.MediaType.TRACK_TYPE_AUDIO].set(c,l);V.info(this.module_,"removeTrackImpl success , track type is ".concat(l.getTrackType(),",")+"physical track id:".concat(n.id))}}}catch(e){o.e(e)}finally{o.f()}}(i=this.mediaStream)===null||i===void 0||i.removeTrack(n);case 5:case"end":return f.stop()}}),e,this)})));function n(t){return e.apply(this,arguments)}return n}()},{key:"addCaptureWithCfg",value:function(){var e=S(b().mark((function e(n){var i,o,a,s,u,l,f,d;return b().wrap((function e(h){while(1)switch(h.prev=h.next){case 0:V.info(this.module_,"addCaptureWithCfg begin microphone:".concat(this.getCurrentMicrophoneId(),",audioProfile:").concat(JSON.stringify(n)));i=[];o=new c.HRTCTrack({streamType:r.StreamType.STREAM_TYPE_MAIN,trackType:r.MediaType.TRACK_TYPE_AUDIO,isRemote:false,trackProfile:n,resolutionId:this.generateResolutionId(),event:this.eventEmitter});i.push(o.initAudioCapture(this.getCurrentMicrophoneId()));h.next=6;return Promise.all(i);case 6:a=h.sent;u=m(a);h.prev=8;u.s();case 10:if((l=u.n()).done){h.next=21;break}f=l.value;if(!f.error){h.next=15;break}s="".concat(s).concat(s?"":";").concat(f.error.getMsg());return h.abrupt("continue",19);case 15:if(f.type===r.MediaType.TRACK_TYPE_AUDIO){this.tracks[r.MediaType.TRACK_TYPE_AUDIO].set("mainAudio",o)}this.setMediaStream(f.track);this.appendDefaultLocalTrack(n);this.updateEffectiveDeviceInfo(f);case 19:h.next=10;break;case 21:h.next=26;break;case 23:h.prev=23;h.t0=h["catch"](8);u.e(h.t0);case 26:h.prev=26;u.f();return h.finish(26);case 29:if(!s){h.next=33;break}d=new W(t.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION,"browser initialize capture fail, ".concat(s),a);V.error(this.module_,"addCaptureWithCfg fail, errMsg= ".concat(d));throw d;case 33:V.info(this.module_,"addCaptureWithCfg success, microphone:".concat(this.getCurrentMicrophoneId()));return h.abrupt("return",new W(t.ErrorCode.RTC_ERR_CODE_SUCCESS,"",a));case 35:case"end":return h.stop()}}),e,this,[[8,23,26,29]])})));function n(t){return e.apply(this,arguments)}return n}()},{key:"appendDefaultLocalTrack",value:function e(t){if(!this.getAnyAudioHRTCTrack()){var n=new c.HRTCTrack({streamType:r.StreamType.STREAM_TYPE_MAIN,trackType:r.MediaType.TRACK_TYPE_AUDIO,isRemote:false,trackProfile:t,resolutionId:this.generateResolutionId(),event:this.eventEmitter});n.setTrackContentType(r.ContentType.main);this.tracks[r.MediaType.TRACK_TYPE_AUDIO].set("mainAudio",n);V.info(this.module_,"addDefaultEmptyTrack success, audioTrack:".concat(n.getResolutionId(),",")+"track profile:".concat(JSON.stringify(n.getTrackProfile())))}}},{key:"generateResolutionId",value:function e(){return this.id_+"-"+o["default"].generateRandomId(8,16)}},{key:"initMainStreamWithTrack",value:function e(n){var i=[];if(n){var o=new c.HRTCTrack({streamType:r.StreamType.STREAM_TYPE_MAIN,trackType:r.MediaType.TRACK_TYPE_AUDIO,isRemote:false,resolutionId:this.generateResolutionId(),track:n,event:this.eventEmitter});this.tracks[r.MediaType.TRACK_TYPE_AUDIO].set("mainAudio",o);i.push({type:r.MediaType.TRACK_TYPE_AUDIO,track:n})}this.appendDefaultLocalTrack(this.audioProfile_);return new W(t.ErrorCode.RTC_ERR_CODE_SUCCESS,"",i)}},{key:"updateEffectiveDeviceInfo",value:function e(t){if(t.type===r.MediaType.TRACK_TYPE_AUDIO){var n;this.effectiveMicrophoneId_=(n=t.track)===null||n===void 0?void 0:n.getSettings().deviceId;V.info(this.module_,"updateEffectiveDeviceInfo, effectiveMicrophoneId_: ".concat(this.effectiveMicrophoneId_))}}},{key:"getCurrentMicrophoneId",value:function e(){return this.microphoneId_||this.effectiveMicrophoneId_}},{key:"getAudioSendBitrate",value:function e(){var t=this.getAudioHRTCTrack();if(t){return t.getTrackProfile().bitrate}return 0}},{key:"isAudioMuted",value:function e(){var t=this.getAudioHRTCTrack();if(t){return t.getTrackMuted()}return true}},{key:"setAudioProfile",value:function e(t){this.setAudioProfileImpl(t)}},{key:"setAudioProfileImpl",value:function e(t){var r=this.getAudioHRTCTrack();this.audioProfile_=t;r===null||r===void 0||r.setTrackProfile(t)}},{key:"switchAudioDevice",value:function(){var e=S(b().mark((function e(t){var r,n,i=this;var o,a;return b().wrap((function e(s){while(1)switch(s.prev=s.next){case 0:V.info(this.module_,"switchAudioDevice begin, microphoneId is ".concat(t));if(!("default"!==t&&(this.effectiveMicrophoneId_===t||this.audioSource_))){s.next=3;break}return s.abrupt("return");case 3:o=this.getAudioHRTCTrack();if(o){s.next=7;break}V.error(this.module_,"switchAudioDevice failed, no audio tracks");return s.abrupt("return");case 7:(r=this.mediaStream)===null||r===void 0||r.removeTrack(o.getTrack());s.next=10;return o.initAudioCapture(t);case 10:a=s.sent;if(!a.error){s.next=13;break}throw a.error;case 13:(n=this.mediaStream)===null||n===void 0||n.addTrack(a.track);this.client_.forEach((function(e){var t=e.getPublishAudioSender();var r=i.getPublishAudioTrack();if(t&&r){t.replaceTrack(r)}}));this.microphoneId_=t;this.effectiveMicrophoneId_=t;case 17:case"end":return s.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clearEffectiveDeviceId",value:function e(t,r){V.info(this.module_,"clearEffectiveDeviceId, Input:".concat(t,", type:").concat(r));if(r==="audioInput"){if(this.effectiveMicrophoneId_===t){this.effectiveMicrophoneId_="";V.info(this.module_,"clearEffectiveDeviceId, audioInput:".concat(t))}}}},{key:"getPublishAudioTrack",value:function e(){var t;return(t=E(n,"getAudioHRTCTrack",this,3)([]))===null||t===void 0?void 0:t.getTrack()}},{key:"getStatInfo",value:function e(){return{audioProfile_:this.audioProfile_,audio_:this.audio_,microphoneId_:this.getCurrentMicrophoneId()}}}])}(i.Stream);U([(0,a.asyncApi)("LocalStream$initialize#Promise<StreamInitializeResult>")],B.prototype,"initialize",null);U([(0,l.printfDecorator)(V)],B.prototype,"initMainStream",null);U([(0,a.asyncApi)("LocalStream$removeTrack#Promise<void>#MediaStreamTrack#string")],B.prototype,"removeTrack",null);U([(0,l.printfDecorator)(V)],B.prototype,"addCaptureWithCfg",null);U([(0,l.printfDecorator)(V)],B.prototype,"initMainStreamWithTrack",null);U([(0,a.api)("LocalStream$setAudioProfile#void#string|RTCAudioProfile")],B.prototype,"setAudioProfile",null);U([(0,l.printfDecorator)(V)],B.prototype,"clearEffectiveDeviceId",null)}))},7354:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2216)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){"use strict";n=function e(){return t};var e,t={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(r,o){function a(){return new t((function(e,t){n(r,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,u,"next",e)}function u(e){i(a,n,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f={Mac:/(mac os x)\s+([\w_]+)/,Windows:/(windows nt)\s+([\w.]+)/,Ios:/(i(?:pad|phone|pod)).*cpu(?: i(?:pad|phone|pod))? os (\d+(?:[.|_]\d+)+)/,Android:/(android)\s+([\d.]+)/,Ipad:/(ipad).*os\s([\d_]+)/,Iphone:/(iphone\sos)\s([\d_]+)/,Linux:/(x11;)\s(linux)\s(x86_64|mips64|aarch64)/,ChromiumOS:/(x11;)\s(cros)\s(x86_64|mips64|aarch64)\s([\w.]+)\)/};var d=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","_"];var h=function e(){var t=navigator.userAgent.toLowerCase();var r=t.match(/(micromessenger)\/([\w.()]+)/i);var n=r?" -WeChat".concat(r[2]):"";var i;for(var o in f){if(Object.prototype.hasOwnProperty.call(f,o)){var a=t.match(f[o]);if(a){if(o==="Ios"){i=a[2].replace(/_/g,".")}else if(o==="Linux"){i=a[3]}else if(o==="ChromiumOS"){i=a[4]}else{i=a[2]}return"".concat(o," ").concat(i).concat(n)}}}return"unknown"};var p=function e(){var t=navigator.userAgent.match(/(chrome|CriOS|safari|firefox|microMessenger)\/(\d+(\.\d+)*)/i);if(t&&t.length>2){var r=t[2];if(/safari/gi.test(t[1])){var n=/.*Version\/([\d.]+)\s.*/gi.exec(navigator.userAgent);if(n&&n.length===2){r=n[1]}}return"".concat(t[1]==="CriOS"?"Chrome":t[1],"-").concat(r)}return t&&t.length>1?t[1]:""};var v=function(){function e(){a(this,e);this.uuidCount=0;this.timeDiff=0;this.platform=h();this.browserVersion=p();this.areaDetectionCompleted=false}return u(e,[{key:"sleep",value:function(){var e=o(n().mark((function e(t){return n().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e){var r=setTimeout((function(){clearTimeout(r);e()}),t)})));case 1:case"end":return r.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getDeviceID",value:function e(){if(!this.deviceID){this.deviceID=this.generateStandardUuid();return this.deviceID}return this.deviceID}},{key:"generateStandardUuid",value:function e(){var t,r=this;var n="";if((t=window.crypto)!==null&&t!==void 0&&t.randomUUID){n=window.crypto.randomUUID()}if(!n){var i=(new Date).getTime();if(window.performance&&typeof window.performance.now==="function"){i+=performance.now()}n="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g,(function(){var e=(i+r.getRandom()*16)%16|0;i=Math.floor(i/16);return e.toString(16)}))}return n}},{key:"getRandom",value:function e(){return this.getRandomArray(1)[0]/256}},{key:"generateUuid",value:function e(t){var r="";var n=this.getRandomArray(33);var i=t?22:33;for(var o=0;o<i;o++){r+=d[Math.round(n[o]%64)]}var a="";for(var s=0;s<33-i;s++){a+=d[t&63];t=t>>6}var u=this.uuidCount.toString(16);for(var c=3-u.length;c>0;c--){u="0"+u}this.uuidCount>4094?this.uuidCount=0:this.uuidCount++;return"".concat(r).concat(a).concat(u)}},{key:"generateRandomId",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:62;var n="";var i=this.getRandomArray(t);for(var o=0;o<t;o++){n+=d[Math.round(i[o]%r)]}return n}},{key:"getPlatform",value:function e(){return this.platform}},{key:"getBrowserVersion",value:function e(){return this.browserVersion}},{key:"syncLocalTime",value:function e(t){if(t){var r=new Date(t).getTime();this.timeDiff=(new Date).getTime()-r}}},{key:"getTimeDiff",value:function e(){return this.timeDiff}},{key:"getCurrentLocalTimestamp",value:function e(){return(new Date).getTime()}},{key:"getCurrentSyncTimestamp",value:function e(){if(Math.abs(this.timeDiff)>=60*60*1e3){return(new Date).getTime()-this.timeDiff}return(new Date).getTime()}},{key:"getCurrentTimeInfo",value:function e(){var t=new Date(this.getCurrentLocalTimestamp());var r=t.getFullYear();var n=t.getMonth()+1;var i=n<10?"0".concat(n):n;var o=t.getDate();var a=o<10?"0".concat(o):o;var s=t.getHours();var u=s<10?"0".concat(s):s;var c=t.getMinutes();var l=c<10?"0".concat(c):c;var f=t.getSeconds();var d=f<10?"0".concat(f):f;var h=t.getMilliseconds();var p="".concat(h+1e3).substring(1);var v=t.getTimezoneOffset()/60;var m=v<=0?"+":"-";var y=v>=0?v:-v;var g=m+(y<10?"0".concat(y):"".concat(y))+":00";return{year:"".concat(r),month:"".concat(i),day:"".concat(a),hour:"".concat(u),min:"".concat(l),sec:"".concat(d),millsec:p,zoneOff:g}}},{key:"adjustTimeByServerTime",value:function e(t){return t-this.timeDiff}},{key:"convertString2Timestamp",value:function e(t){return new Date(t).getTime()}},{key:"generateStreamId",value:function e(){var t=this;return"2xxxxxxx-8xxx-xxxx-yxxx-xxxx".replace(/[xy]/g,(function(e){var r=16*t.getRandom()|0;return(e==="x"?r:3&r|8).toString(16)}))}},{key:"isWKWebview",value:function e(){return/I.*-WeChat.*/gi.test(this.platform)}},{key:"isAppleDevice",value:function e(){return/^(Mac|I).*/gi.test(this.platform)}},{key:"isMobileDevice",value:function e(){return!/^(Mac|Windows).*/gi.test(this.platform)}},{key:"isTencentX5BrowserKernel",value:function e(){return/.*(tbs|xweb).*/gi.test(navigator.userAgent)}},{key:"isMobileWeChatBrowser",value:function e(){return this.isMobileDevice()&&/.*MicroMessenger.*/gi.test(navigator.userAgent)}},{key:"getAppUrl",value:function e(){var t=window.location,r=t.origin,n=t.pathname;return"".concat(r).concat(n)}},{key:"getValue",value:function e(t,r){return t||r}},{key:"setValue",value:function e(t,r){if(!t||t<0){return r}return t}},{key:"createLoadingMask",value:function e(){var t=document.createElement("div");t.setAttribute("id","loadingMask");t.style.display="block";t.style.width="100%";t.style.height="100%";t.style.position="absolute";t.style["z-index"]=99;t.style.background="rgba(0,0,0,0.8) url(data:image/jpeg;base64,R0lGODlhgACAAOMAAP///93d3bu7u5mZmf///wAAAAAAAAAAAP///////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oCKxA6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEgLYwIlaGngHVlE2a+KOvt/wZzz2FbvotJrDJpPMobh8rqnbVW9nel58G35/IHgeg3uFGIdagD+Cg450h5I5IoxgloaYMoEgnJ6XfqGTo4ylpqcfihqcnax9oB6wGaS0n7YcuBeyu61sr6IcusK8dbfGsavJw20dvxXI0LWuRM0Y1tcZkJEa1BLB3tGIGOME3eaPkNqpueztF+/wQM6VfAL8Ain24vDJ03cCzYl+/VAATDEvT5wSCCOe6IXiGRyCISJqLEGxIEaH/g05aBxJYlkMPSRkNQIxkuQIaTUMUlIJseVGetxUrhRh0yVOcjp3kuh5s11QoSaISjR3lJANpQihNZ21A2pCVlOPWOVXKmuSrZaaVoEaVuccomVDRumZ9uO+oo7cWoqKFenPu3jz6t3Lt6/fv4ADCx5MuDDhqeWMIrZIYXHia467RX4sbLI1y4wrY0Y5YTNnqZ5lAg3tFDRpqutIKw4NzDNO1oZjy55Nu7bt27hz697Nu/cO0Z6Ad/0cl3ghymqQW6FZXC2SoG2d9xDb3GwSr9GZC8EenDoP7rTAvxCv+ehJ70zRmyCf3vx693vVq7K+ya7H0iC155eeUzjDhzPx2NeagAMC6EJm8yG4iIIJ+veecfXJtaCD+1GYEoMNohahhgFa2Jl9o0E403EYfuhhiAb2pVxjEprY4k/SlYjiiau9OCN+/dnYnogWyHgjjncJ6OOPHNIjpI5E6kXgkEkGuSSSRBZpGo850sgilN0x+WOGVmZJZZUg9qgliVi62OWVXw5X5pYVhlldih+MaeaZYay4gZxRTglnnGvO6WZyffop5TGBOoGnoBftWRedYqZ5p6Lh/TkQpHwCKduhvrGZ6YaMbqqpp5VSCiqYlo6aj6SmupjqqqZGAAAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oGKxB6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEgRYwYlaAngBVlE2a+KOvt/wZzz2FbvotJrDJpPMobh8rqnbVW9nel58G35/IHgeg3uFGIdagD+Cg450h5I5IoxgloaYMoEgnJ6XfqGTo4ylpqcfihqcnax9oB6wGaS0n7YcuBeyu61sr6IcusK8dbfGsavJw20dvxXI0LWuRM0Y1tcZkJEa1BLB3tGIGOME3eaPkNqpueztF+/wQM6VfAP8Ayn24vDJ03einz8TBvmhAJhiXoiEB0dA7HeiF4pnJSYqlKhx4wiL/icwiujo8SHJkiCWxdBD4iTKDy5fepBWA03LmBljRqRnQedOjjp5UvD5M2dQekRjJDW3tEbTXU9vRHU0dUdVNVd5+LS0VQpOqi7nnORKEqxGsmc9TSy1FipFVgaFyp1Lt67du3jz6t3Lt6/fv4AD9yTakSfhwoMPp/WmGPGExmWvQXZMYPLiZJbbSsgMkTHnuI8/v4UmevRm0e1KX/hsmLPg17Bjy55Nu7bt27hz6959U+Y+02w7qxWOVvPvy1gjFxqbnPnysF6PPv+KJKsV60q7BpduVbtb7jCwDwePQvx26gW9tyZvEj1d9SDYdwDtFDhM9/edt7dfPmFv5fsZ4hcgf0b595+A+RF3IIEL+paggUAx+CB9KVC2YHoOxofcahKehmCE0ymIgYgcfviehYlBOCKKJ5o4lIuhwYgUixVsmCKJctFYo4we4riejzd2GCOQTNlYoooa6OgZj0NSuIGSmEH5IpE7GkmalUc6+SSW3zHZpJBTelkckhxwGSSYY2pZpphfohkimWtSmaWatEg5Z4YZ2CmWnlXCGSebVfDZJ51/+pkmnkkCGiahZhlaqJtnFgWXo48imiij40mqoZxbWsqXmbytyGmokZI6kqKkgmrqopCuWhmlrh4Z66yuRgAAIfkEBQUABAAsAAAAAIAAgAAABP6QyEmrvTjrzbv/YCiOZGmeqCisQuq+cMiycW3b83zvfJnTvaBw81sNj8hJsZVsBpfO6A4qrRIG2MGJWgp4A1ZRNmvijr7f8Gc89hW76LSawyaTzKG4fK6p21VvZ3pefBt+fyB4HoN7hRiHWoA/goOOdIeSOSKMYJaGmDKBIJyel36hk6OMpaanH4oanJ2sfaAesBmktJ+2HLgXsrutbK+iHLrCvHW3xrGrycNtHb8VyNC1rkTNGNbXGZCRGtQSwd7RiBjjBN3mj5Daqbns7Rfv8EDOlXzSJ/bi+PL0nQBAEEA/YgezpZgXomDBEv5I9ELxrITDixLBQVRIUaCIi/4gM4ILF2JZDD0kQKoUOZLlDTQpVYZk2ZIeBpkrTYxEaFMCzpwodvIz93PmC6HokhXFaAMpFmhLHQZxStJS1IdDqJa6SrCJU6tXqwgFW3ROzUJlC2l09LMURz5AWQ0la7Cn3bt48+rdy7ev37+AAwseTLhwBapr2yGOOGFx4muOGUd+LGxyRMsTd2FWuNkktM48r4BOSms0OtOKR9frbBO04dewY8ueTbu27du4c+ve7VIuaUdvzXoGzlgN5TBn9x2PMpZ4cq9ILX1NotVTdSHXrU/nkb309hjdk4VP2Dx19BTjzaVfc17v95Ll4T9t+vtc8A7xQQx3sZ/9c/+ZAdU4F3kDCtifB8XJF1pQ9xlYXzQMNjhCggrOt5GFOgV42IMSUKigWhpScOCGEva0nIglnmiXh42VKJqL6rHYoYsq0iPjjCOSmKN5O6LYY4swiheijgWuFqRmQxLJoY8/Ipkkk0UaeaR2Uz4JZZSV3XglhvZxCZmVW1bVpY1ghilGmcpNieOC+KFpnJtrYvkNnFLUOGeTFtiZJp55qgkkn1bQGeeSd7Lplp9/yomNoYcquqijhXrppJgVErpobYLylulum+rWaW6f4haqqIzyBqCpqKbKQQQAIfkEBQUABAAsAAAAAIAAgAAABP6QyEmrvTjrzbv/YCiOZGmeqDisQ+q+cMiycW3b83zvfJnTvaBw81sNj8hJsZVsBpfO6A4qrRJ0JmpJwBVYVbls0dTtfj9a8G9bNp85admY1Ha/NUumOjyq2+8YeXogcR5+f4AXeSOFHYdeiUSNkmshj5Fwk3hzIJeYlJVonIaHn5maiqMcj5Cmm6qgWKR+rqewGagVrLW2fB25FJ68sbLERo6lw73Fr74bwsrNzri3FtDR1MDAu9jLQNLfGdfdgYvgx+Lj5KnVFKHptHfMJObNq8knAfoBJ+/0wJ3wldi3zwfAc4NQCBxBsOG/envmkYnHsKFDRoLQyZF4og4Ji/4gH2YUeaPMR5AWDWbUuK4CypBiVrJc9xImCpnhsNVMCQPnTF47L9bwmdBUUIJPfLo6WnAI0U9M9TVRmihqFZmRjr4ZWbVmIkFZX35qZ8WmKY5vkLZcy7at27dw48qdS7eu3bt48+qNSZSsKwCAAwseTHgwu74HARVezFhwBcQrsTWezNgdZLDRKGs2rOQyRF6bQwOw7NlvItGbH5eeNgz15MOlW7pevLe27du4c+vezbu379/Ag/NAe4b4Vn/ykB9PfARz8s/FnVvB+jWyFKqAsDfXnp37cO/dcSYVP+wpDvC1zL9Q3409X+ts3UeU7hb9L+p7bhjPxnW+6XL7zdAnEnQe9OdfUe/lRAh9ovyHUE8O8sdagwoeiKBKym1U4YI/WWiLNx1qGF6GpG1Y4oT1EXiiiRIwmKJp2jBXnoorhtiZjOkBpCOOZx3kI4+Y0KgaiUMSGY2QRQbYIpDPRZiYi0cyJyWTX0AJIIpXGtljhEtqmaSS1XHZJZYSgtkkmVmymKaakSC55oXG2BimmGOaeSOdUbj55oB2XodnnWyWKeeZge7J56CEJohome0VKiicBTpKF5XBUQqcpb9h6pumvXHaKZrC3bdoqKSWSkAEACH5BAUFAAQALAAAAACAAIAAAAT+kMhJq7046827/2AojmRpnqg4rEPqvnDIsnFt2/N873yZ072gcPNbDY/ISbGVbAaXzugOKq0SdCaqD2gF/bJFMLbb0arCJDM5o/aiR+21Zck8f+FxOYVed99ldHpEeYN/foaCGIGAiGWEiUqPim8fi5Aalh6Sc5uXfIdjjp2eoxKlV6eJn5qUha2XmKWyqaSvk423uLCxthejmbuiuhWdwMEcq7w5yMbHrsvPXGy0x8m5ob7NztHS133e3VbYaZvjnL0hAuoCJ8OV1NPoH+vrW/LC5vbQJfT95Nr4wonZJ6KfwX/WQH1L4U6DwYcIE74zgkNgh4cQI0rchgFjRn3+fChyvODxY7uQ+Y6VPAgDZUpYK/1VdLnwUkx6T2jWlHOz3hCdO7v0VNdEZ6KhVVwejbkm5FKPgjZaKVnrZRWTVXfhHMm1q9evYMOKHUu2rNmzaNOqXcs2HtB7sALInUu3rt262d4CjHu3r9+5xPQ65fi3sN89gqVeMswYb6TE8KI0nhwAMWS4eig3DnzZKiTNhfN2/gq6b9vTqFOrXs26tevXsGPLnn3WcxUAuAFUayglt++qvJv4Hq5bz2A9xIc3RZkoOfGkNJs7f54E6KXpyY9Yh4WdOo/tx7orn6mUq/jfLY16PZ/bBXiw7HGfLF82Psi9ym7YvsBeI2bRIr3GEBx/4vm3H4AWGVhCdwYGxcqADxI0wnT3oYAfIxBm4B1CDJWT4GMZatieHBfydqFXiplyT4pflQjXiSOxiIqJMG5zYjGRqfLLfzUGA+OO//k4C4Q9QiIjiAceCUuPpxRpHJNBzhjlk1Om4iQZTtJypThaTimlhLt5+eWHboG55JXUKNnFlvBsWZSYKoZomZlGwjlmgBgeuCadEep5Dpk64mkHnxHGliNtcRKKaECCLqpQo472CWik4DhIqTKQXiqMppx2akEEACH5BAUFAAQALAAAAACAAIAAAAT+kMhJq7046827/2AojmRpnqg4rEPqvnDIsnFt2/N873yZ072gcPNbDY/ISbGVbAaXzugOKq0SdCaqD2gF/bJFMLbb0arCJDM5o/aiR+21Zck8f+FxOYVed99ldHpEeYN/foaCGIGAiGWEiUqPim8fi5Aalh6Sc5uXfIdjjp2eoxKlV6eJn5qUha2XmKWyqaSvk423uLCxthejmbuiuhWdwMEcq7w5yMbHrsvPXGy0x8m5ob7NztHS133e3VbYaZvjnL2M33bh69Au2qDqldR76HjDrPbK+vvsW/jczAmDF60GwGl85A0kqOyGQGYJFS5kuC1SRIn5LlZEqDHFRX/+1T5ivNdxo8iR/0oGO/lE5C6WQ2CqcpmEph6bTlSu0Skl4UyKNYEGpdfSnSB+XR6SUbqxqdOnUKNKnUq1qtWrWLNq3cq160lrGwWIHUu2rNmy2b4K1XO2rVuyxNT6rPi2rtt6cteSscsXrcW8SOX0HSwAL+CDbAnzjXuYKSTFddM2hgq5bdfLmDNr3sy5s+fPoEOLHv3ZcZUAqAOENKontetagZG4nq36JlgytGfvjJgoN+0qONf4zt1EpqDhxGMGP45cdw/ju5o7N7j8mPTXMKBXvJ76XfWm3FGf+A41fMrbGW8AWA+ABHdyc9uhFMGevXvp8IkSvVC/fonm+bHKJp8RL/RnnwnDnTdfQAt6YOCBCE6Xn0flgDTBg+ulgN1u/ByEYXtaoWcYUx+CiBVFm3yYlYgjWihBiScWg5SKVgk1Co1U2RgYjlKtVQqPT7F4joAZwBiVXqcAaRKSsRFgpFN6oYIYBUo6E6WURG5Q5Uq00LIlLFdiaZoFX/7U5F9jVvAkl2ei6WKRGG6jX5sXPignnabg6aSdd6YpmZ9k9tcUoEMSqiaEpelJWosELipGlo7OM2Wk4DRIaaFvXspRo5qS1OmnoGYQAQAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oOKxD6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEnQmqg9oBf2yRTC229GqwiQzOaP2okfttWXJPH/hcTmFXnffZXR6RHmDf36GghiBgIhlhIlKj4pvH4uQGpYeknObl3yHY46dnqMSpVeniZ+alIWtl5ilsqmkr5ONt7iwsbYXo5m7oroVncDBHKu8OcjGx67Lz1xstMfJuaG+zc7R0td93t1W2Gmb45y9jN924evQLtqg6pXUe+h4w6z2yvr77Fv43MwJgxetBsBpfOQNJKjshkBmCRUuZLgtUkSJ+S5WRKgxxUV//tU+YrzXcaPIkf9KBjv5ROQulkNgqnKZhKYem05UrtEpJeFMijWBBqXX0p0gfl0eklG6sanTp1CjSp1KtarVq1izat3KtetJaya/xhEL1hlZYGfLvkxrhi3RnG4NxT14c24ou0yP4jVSz67TvdniQvXbtbDhw4gTK17MuLHjx5AjM85bRYBlASGN6rnMuRbSJJxDY64rFIno0DsjJjotugrONaxPN5EpKLbsmK9r20bdg/au3bwN5j4GvDMM3xWLX343vKlyyyeaQ32eUq2wGwGyByChnJxPknxhaNfOHbh3om8tjB9fYvd5ze1AjlhP3kTs6igh0v1Av7794Od5xrQJAAQCwEF/2aVgXGr8FFjggQhuZd0EDjq4AYIJZkVRhQ9eGCFWE1LIoYEefmgVUCOSWCJ9VwmVogcYnjjKix3ESFVpNNZo4mA4jsifjTx+JkGOOvYXVYgWEAnhjmEJOaSPIADZ5H4UKFkki02VJiKHIkhpFjVWXrleRUhiEOaSRn7pZJVQdskkLESdKaZ/K63JJpckvAknfCDIOWeW8nXg55WQDSqZB4YeykGiimrAaKNmtgmpCI9OmmSFlppgYaacdopBBAAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oOKxD6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEnQmqg9oBf2yRTC229GqwiQzOaP2okfttWXJPH/hcTmFXnffZXR6RHmDf36GghiBgIhlhIlKj4pvH4uQGpYeknObl3yHY46dnqMSpVeniZ+alIWtl5ilsqmkr5ONt7iwsbYXo5m7oroVncDBHKu8OcjGx67Lz1xstMfJuaG+zc7R0td93t1W2Gmb45y9jN924evQLtqg6pXUe+h4w6z2yvr77Fv43MwJgxetBsBpfOQNJKjshkBmCRUuZLgtUkSJ+S5WRKgxxUV//tU+YrzXcaPIkf9KBjv5ROQulkNgqnKZhKYem05UrtEpJeFMijWBBqXX0p0gfl0eklG6sanTp1CjSp1KtarVq1izat3KtetJaya/xhEL1hlZYGfLvkxrhi3RnG4NxT14c24ou0yP4jVSz67TvdniQvXbtbDhw4gTK17MuLHjx5AjM85bhbI4unCN1n3rUOgRn3o99+CZNGLljz9NDyW9FOdo16FZw5C5EvY727VRz8YdUjcK2oN5ZwRtVXhAzBYAKAdwQ4BzAeRUt6O3fHmN58+jq51o+UL16jCwY0+JNDByDN+tvxCfXcx5YppHpFfvgn1793xTppivnEOA/wFw2GCfcx6B5AR/zG0AIIACDrgVgglmsOCCGwxIYFYI+jfhfw3ah2GGCm4YYIUWYgViiBt2UKJVJ6I4oQcrUtWiBiKO2CF7Vc1Io4gfxAgVhB/U2KOPTum4Y4pDevijkRLymKSSRfIXgpAgELkNAFhmmaUIVFbpYFNahsmlk15CeWWYW46JZAhWwoKmliN0WaaZu7yJJQlyzinemWiWkKee9wVjp59kivClM30SuuYIOG4Epwl/shkoY5FKpuaLlp5QaaZBFsrppRR+iqenooKwaKmXoqrqqhlEAAAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oOKxD6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEnQmqg9oBf2yRTC229GqwiQzOaP2okfttWXJPH/hcTmFXnffZXR6RHmDf36GghiBgIhlhIlKj4pvH4uQGpYeknObl3yHY46dnqMSpVeniZ+alIWtl5ilsqmkr5ONt7iwsbYXo5m7oroVncDBHKu8OcjGx67Lz1xstMfJuaG+zc7R0td93t1W2Gmb45y9jN924evQLtqg6pXUe+h4w6z2yvr77Fv43MwJgxetBsBpfOQNJKjshkBmCRUuZLgtUkSJ+S5WRKgxxUV//tU+YrzXcaPIkf9KBjv5ROQulkNgqnKZhKYem05UrtEpJeFMijWBBqXX0p0gfl0eklG6sanTp1CjSp1KtarVq1izat3KtetJaya/xhEL1hlZYGfLvkxrhi3RnG4NxT14c24ou0yP4jVSz67TvdniQvXbtbDhw4gTK17MuLHjx5AjMwZAGcBavrsqa66VN4rmz5b1vrUB+vPP0S9Kgz4t9Ibq0qzV9ngNG5LMILRXw7rtOvdmszhh+P4d9mOM4ZUHBy+BnDJV3iKaY13+ATmJANgDOAQZkO6F4dezYzdoNB7S77RLiBcPg6jPEQDiy5d/Yn329uc5lgcxPz4K+/e92NCafihtMF8KAI63gQAMCgCRd67okaB2CzbI4IP7VTUhhRlYaGF3BTY1IQceNohhZxttSGKJDoKI1YgrljgRZlTBGKOHGWX4lI0VyjhjiMHw2COOOaIIi4oesNjij0BCIuSQH86TXyJIJsmiedzt8iSUJmLZpBxbcnlhOjpqmaAISrZj5BphirmklxVVCUKaaq5ZRZtukjPlnQCWQCdJdkpxJgl/1vkln+z5eWVKNDqTqKI+pgRZoZJBSmSlJlCKKZqLbkpop55yGmmoonZJ6qdjnqrqqhdEAAAh+QQFBQAEACwAAAAAgACAAAAE/pDISau9OOvNu/9gKI5kaZ6oOKxD6r5wyLJxbdvzfO98mdO9oHDzWw2PyEmxlWwGl87oDiqtEnQmqg9oBf2yRTC229GqwiQzOaP2okfttWXJPH/hcTmFXnffZXR6RHmDf36GghiBgIhlhIlKj4pvH4uQGpYeknObl3yHY46dnqMSpVeniZ+alIWtl5ilsqmkr5ONt7iwsbYXo5m7oroVncDBHKu8OcjGx67Lz1xstMfJuaG+zc7R0td93t1W2Gmb45y9jN924evQLtqg6pXUe+h4w6z2yvr77Fv43MwJgxetBsBpfOQNJKjshkBmCRUuZLgtUkSJ+S5WRKgxxUV//tU+YrzXcaPIkf9KBjv5ROQulkNgqnKZhKYem05UrtEpJeFMijWBBqXX0p0gfl0eklG6sanTp1CjSp1KtarVq1izat3KtSuAr2DDih0rFupJaxPIql0b1ulZnxTYyl1r8i1cCXPzlq1o9y4BvYAB1O1rJrDewYQRGZbrNrHRtIvJmnVspKvly5gza97MubPnz6BDi+4coHSAlyDlmF5di6mU1bBPHxV6JDbsn0Rj2I6Nm7aN3bZ7oxUCPDgkmUGK84aF/Iby286av3jOuqn0E9RNT/7oIntpqtdBeMeKM0R2EgLSC3CYuh896ujVpzf4eJ5f8cVLyJcPg+j9D8Cd0LCfev0h5V5lIyxnwoAEvuCbN9hphwKD87kC0UHC6EHhegUFhNJTG3LIEVPDUbXhha49eEyIKLaHSm6JnNgiggd+uI2MM9qo4iU4BpRRfSBSaB+Q4NAYpJA/umiRgTwimaSRHkbF4pCu1QOjFD1OZOOSRAaTpZbtVCnIlzmGqaSGTsYDpZZbdjFlOmISs6MTZIJJUpdjMphSnOfgieaAe56ZDYZrABromlS2SQZ/Yvh5YWhXjvaio5KWWWmjfF7aZ6aaWklppxCCmpKopJaaQQQAIfkEBQUABAAsAAAAAIAAgAAABP6QyEmrvTjrzbv/YCiOZGmeqDisQ+q+cMiycW3b83zvfJnTvaBw81sNj8hJsZVsBpfO6A4qrRJ0JqoPaAX9skUwttvRqsIkMzmj9qJH7bVlyTx/4XE5hV5332V0ekR5g39+hoIYgYCIZYSJSo+Kbx+LkBqWHpJzm5d8h2OOnZ6jEqVXp4mfmpSFrZeYpbKppK+Tjbe4sLG2F6OZu6K6FZ3AwRyrvDnIxseuy89cbLTHybmhvs3O0dLXfd7dVgDjACnae+GcvYzfIuTkKOd465XQI+/4J9TTw6z0GvgCbulnx17BfxkCKkxj0AVBftZAKFw4r53DdMIiSpwocFtGjf4hOFL0mI0PthIiO5I0ZfLkiZT5VrZ0mQLmu20zMcKwCQ9WTiNDeI6rNbOJUFU5q9hEanJNSqb7doiE+jDKSEEIu9z0qXOl169gw4odS7as2bNo06pdy7btygBw48qdS3cu2J9NLdTdy1euV7wtK/QdzJck4KITCCu26/Fw4MSLIxt2bC2y5MaUgVkm/Dczrs2Fv3qm6ba06dOoU6tezbq169ewY4MVQFvALtJyausm2rWK7t+2scpzAvw31apCigM/nnWH8uLMo5Z4Dh0S3iPUl3NN2iO7cWfXbXjfLfNnjPG175pPgZ422fDT0aNdP0J+xRu4lYHsMJ5h/opAHbW0T3YDNaRPcyUNqNyByPljIDsPeqCdGA1+1NtHJ5DH4EP/DeegHh5yKN12/0iyn1ghIuRheZu0uCJmWRUzIoi/NPdiNTUid+NtszS4o3U39oggkEOe8iONRhZ55Bo/prJkF0fS8mQVUQ7JkpVQUqPljEecqN+FCVZI5T5kcilEVGhiGUWaYqLTphRvRhLnlWAiaREodUL0mpmw8bmnmrIRA2igckZIqIP/Hfqlohsy6uijHEQAACH5BAkFAAQALAAAAACAAIAAAAT+kMhJq7046827/2AojmRpnqg4rEPqvnDIsnFt2/N873yZ072gcPNbDY/ISbGVbAaXzugOKq0SAFjAieoDWkHZrIk7+n0/4XDXTCKfM2lxu7jOvTlxuYpedt8teXogfh1LRn8agVp7bDKEiBWKjHaOfJCJgZM6lY2XcJmDlh6GnniSH48YhkylmHmhnRykrRuKi4WiRLO0rnGouRq7vL1po8CqqcMUp7LHF8LKn6/NscjO0ZHMGckSq9gd2taUwdzfEra61RXe5qbT5Jvw6lIB9QEp4c9e2+W4hyX27KHIN6Zfun0hAio8AcqFQX7XNiicWKJhiocWVrFKOJHiCF/+MeZRYyeiY0cSanAg/KVxI0eTC9uJ03gC5kmZSlquJGHTozmdO030jIkN6L8YQwMqM+rSRlKBpZgeeVrPk9QkVCEZrZJUa8s3Pb1C+2JTbESuPhGdPaM0alCccOPKnUu3rt27ePPq3cu3r9++AgILHky4MGGZTElSMMy48eCfiRUTcEy5cdHINCdU3nw4GubMEjiLFnD5M5nRnEubjoWaMuTV8Ra3NowY9tG/uHPr3s27t+/fwIMLH068RmyzvNZGUe5E8hnnVkDfkV5Fp9mxSLaqBdrk6nXqPLxfEn+DvFvuKtGr/grD/FLtKNx/k8+SPV34mrD7a+rw7UHo++nNN9JtF43DiYD/iTSgf/kRWB9zGWGkj4IN8gcLhfI4eOBxW0g4IYMjFbgWhxFCKM8fCHZj4EwkygVgThS+iFOKBJRD43w02nijZ/306OF5GKoYZI0/jmfQkUVuB+FDOwI5JJFPypgcRlQm+YWU65iIpVUSdmmlFE3CuGKALbYSppBjLgiikk9S8OOZ1cEJZZpqrvlckXh+eUSSfJoYZ5tZAuqmn3/ayaKGxpTJJaKJ0lnfb3oKF2lwkwJXKaSEFiemopom2GlBjH4qqqgRAAA7) no-repeat center/80px";return t}},{key:"debounce",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:500;var i=arguments.length>2?arguments[2]:undefined;var o;return{exec:function e(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++){s[u]=arguments[u]}if(o){clearTimeout(o);o=null}if(i&&!o){t.apply(r,s)}o=setTimeout((function(){t.apply(r,s)}),n)},cancel:function e(){clearTimeout(o);o=null}}}},{key:"isIpv6",value:function e(t){return!(!t||/^(\d{1,3}\.){3}\d{1,3}$/gi.test(t))}},{key:"configurationEnvironment",value:function e(){var t=Intl.DateTimeFormat().resolvedOptions().timeZone;var r=!/Shanghai/.test(t);this.configuringTheEnvironment(r)}},{key:"getAreaDetectionCompleted",value:function e(){return this.areaDetectionCompleted}},{key:"isSupportConstraints",value:function e(t){var r;var n=(r=navigator.mediaDevices)===null||r===void 0?void 0:r.getSupportedConstraints();return!!n[t]}},{key:"getCurrentTimestamp",value:function e(){return(new Date).getTime()-this.timeDiff}},{key:"configuringTheEnvironment",value:function e(r){if(r){t.configs.OPS_REPORT_DOMAIN="log-collection-ap-southeast-3.rocket-cdn.com";t.configs.PUBLIC_DNS_SERVER=["dns.google","cloudflare-dns.com"]}else{t.configs.OPS_REPORT_DOMAIN="log-collection-new.hwcloudlive.com";t.configs.PUBLIC_DNS_SERVER=["dns.alidns.com","doh.pub"]}}},{key:"getRandomArray",value:function e(t){var r=new Uint8Array(t);if(window.crypto){window.crypto.getRandomValues(r)}return r}}])}();var m=new v;var y=e["default"]=m}))},7360:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaStreamUtil=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=e.MediaStreamUtil=function(){function e(){r(this,e)}return i(e,null,[{key:"stopAudioTrack",value:function e(t){var r;t===null||t===void 0||(r=t.getAudioTracks)===null||r===void 0||(r=r.call(t))===null||r===void 0||r.forEach((function(e){var t;(t=e.stop)===null||t===void 0||t.call(e)}))}}])}()}))},7363:(e,t,r)=>{var n=r(5020);var i=r(3804);var o=r(5602);t.grammar=o;t.write=i;t.parse=n.parse;t.parseParams=n.parseParams;t.parseFmtpConfig=n.parseFmtpConfig;t.parsePayloads=n.parsePayloads;t.parseRemoteCandidates=n.parseRemoteCandidates;t.parseImageAttributes=n.parseImageAttributes;t.parseSimulcastStreamList=n.parseSimulcastStreamList},7423:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.videopayloadTypes=e.audioPayloadTypes=e.RTCMediaCodec=e.MediaDirection=void 0;var t;(function(e){e["SEND_RECV"]="sendrecv";e["SEND_ONLY"]="sendonly";e["RECV_ONLY"]="recvonly";e["INACTIVE"]="inactive"})(t||(e.MediaDirection=t={}));var r=e.audioPayloadTypes={opusPayload:116};var n=e.videopayloadTypes={rtxPayLoad:107,h264PayLoad:109,redPayLoad:110,ulpfecPayLoad:112};var i;(function(e){e["H264"]="H264";e["OPUS"]="opus";e["RED"]="red"})(i||(e.RTCMediaCodec=i={}))}))},7808:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2441),r(9974),r(4404),r(4868),r(8495),r(8066),r(9034),r(7354),r(5457),r(9611),r(1762),r(5268),r(3652),r(4772),r(4341)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HWLLSClient=void 0;o=m(o);u=m(u);function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return(t=R(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(){"use strict";_=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(n||[]);return i(a,"_invoke",{value:C(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",m={};function y(){}function g(){}function b(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=b.prototype=y.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==U(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function C(t,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?v:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function k(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(U(t)+" is not iterable")}return g.prototype=b,i(T,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(R.prototype),c(R.prototype,s,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new R(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),c(T,u,"Generator"),c(T,a,(function(){return this})),c(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=x,P.prototype={constructor:P,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:x(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),m}},t}function S(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){S(o,n,i,a,s,"next",e)}function s(e){S(o,n,i,a,s,"throw",e)}a(void 0)}))}}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function I(e,t,r){return t&&T(e.prototype,t),r&&T(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function R(e){var t=C(e,"string");return"symbol"==U(t)?t:t+""}function C(e,t){if("object"!=U(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function k(e,t,r){return t=N(t),A(e,P()?Reflect.construct(t,r||[],N(e).constructor):t.apply(e,r))}function A(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function t(){return!!e})()}function x(e,t,r,n){var i=L(N(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=M(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},L.apply(null,arguments)}function M(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=N(e)););return e}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function D(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function U(e){"@babel/helpers - typeof";return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}var V=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":U(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var W="HWLLSClient";var B=new h.Log({module:"HWLLSClient"});var G=function e(t){var r=t.reduce((function(e,t){return e+t}),0);return r/t.length};var Z=e.HWLLSClient=function(e){function t(){var e;w(this,t);e=k(this,t,[W]);e.debugStatisticTimer={interval:1};e.detectTimer={interval:3,interruptRetry:undefined};e.recoveryInfo={retryTimes:0};e.videoRecoveryInfo={interval:3,retryTimes:30};e.firstFrameHandler={videoHandler:function t(){var r,i;(r=n.GlobalVariableManager.getInstance(e.identifiedId))===null||r===void 0||r.updatePlayTrackKpi("videoPlaySucc");e.receivedFirstFrame=true;var o=0;if((((i=n.GlobalVariableManager.getInstance(e.identifiedId))===null||i===void 0?void 0:i.getPlayTrackKpi().videoTimeOut)||0)>0){o=4}e.stats.reportPullMediaStreamResult(d.MediaType.TRACK_TYPE_VIDEO,o)},audioHandler:function t(){var r,i;(r=n.GlobalVariableManager.getInstance(e.identifiedId))===null||r===void 0||r.updatePlayTrackKpi("audioPlaySucc");var o=0;if((((i=n.GlobalVariableManager.getInstance(e.identifiedId))===null||i===void 0?void 0:i.getPlayTrackKpi().audioTimeOut)||0)>0){o=4}e.stats.reportPullMediaStreamResult(d.MediaType.TRACK_TYPE_AUDIO,o)}};e.preNetQuality=-1;e.preRemoteStreamStatistic={packetsReceived:[0,0],packetsLost:[0,0],nackCnt:[0,0],preLostRate:[]};e.connectionsManager=new i.PeerConnectionsManager(e.stats,e.eventEmitter,e.identifiedId);e.initErrorMap();e.receivedFirstFrame=false;return e}D(t,e);return I(t,[{key:"getInfo",value:function e(){return{clientId:this.identifiedId,userAgent:navigator.userAgent}}},{key:"getSymbol",value:function e(){return this.identifiedId_}},{key:"getPublishAudioSender",value:function e(){var t;B.info("getPublishAudioSender");var r=(t=this.connectionsManager)===null||t===void 0?void 0:t.getConnection();if(!r){B.error("getPublishAudioSender no connection");return undefined}var n=r.getSenders();if(!n||n.length<=0){B.error("getPublishAudioSender no senders");return undefined}return n===null||n===void 0?void 0:n.filter((function(e){var t;return((t=e.track)===null||t===void 0?void 0:t.kind)==="audio"}))[0]}},{key:"p2pPlay",value:function(){var e=E(_().mark((function e(t){var i;var o,a,s;return _().wrap((function e(l){while(1)switch(l.prev=l.next){case 0:if(this.liveStream){o=u["default"].getCurrentLocalTimestamp();try{this.liveStream.stop();(a=n.GlobalVariableManager.getInstance(this.identifiedId))===null||a===void 0||a.updatePlayTrackKpi("endPlayTime")}catch(e){B.error("stopPlay occur error: ".concat(e))}finally{this.stats.reportStopPullStreamReqEvent(o);this.resetClient4Switch()}}n.GlobalVariableManager.addInstance(this.identifiedId);(i=n.GlobalVariableManager.getInstance(this.identifiedId))===null||i===void 0||i.updatePlayTrackKpi("startPlayTime");s=c.ValidatorUtil.checkPlayOpt(t);if(s){l.next=7;break}B.error("p2pPlay failed, invalid Parameter: ".concat(JSON.stringify(t)));throw new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER);case 7:this.startPlayOptions=t;t.sessionId=u["default"].generateStandardUuid();this.checkRecover(t.recover);l.next=12;return this.initPeerConnection(t);case 12:this.netQualityRegularReport();if(this.debugStatisticTimer.timer){this.streamStatistic(true,this.debugStatisticTimer.interval)}if(this.detectTimer.timer){B.info("video stream start play , this.detectTimer.timer : ".concat(this.detectTimer.timer));this.enableStreamStateDetection(true,this.detectTimer.interval,this.detectTimer.interruptRetry)}case 15:case"end":return l.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"createPeerConnection",value:function(){var e=E(_().mark((function e(){return _().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:this.connectionsManager.createPeerConnection();t.next=3;return this.connectionsManager.initConnectionAndSdp({receiveVideo:true,receiveAudio:true},{onTrackHandler:this.onTrackHandler.bind(this)});case 3:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getLocalSDP",value:function e(){return this.connectionsManager.getLocalSDP()}},{key:"stopPlay",value:function(){var e=E(_().mark((function e(){var t,r;return _().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:this.receivedFirstFrame=false;if(this.liveStream){i.next=3;break}return i.abrupt("return",false);case 3:t=u["default"].getCurrentLocalTimestamp();i.prev=4;this.liveStream.stop();this.connectionsManager.destroyPeerConnection();i.next=9;return this.stopSignal();case 9:(r=n.GlobalVariableManager.getInstance(this.identifiedId))===null||r===void 0||r.updatePlayTrackKpi("endPlayTime");return i.abrupt("return",true);case 13:i.prev=13;i.t0=i["catch"](4);B.error("stopPlay",i.t0);case 16:this.stats.reportStopPullStreamReqEvent(t);this.resetClient4Stop();return i.abrupt("return",false);case 19:case"end":return i.stop()}}),e,this,[[4,13]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"replay",value:function(){var e=E(_().mark((function e(){return _().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(this.liveStream){t.next=2;break}return t.abrupt("return",false);case 2:t.prev=2;t.next=5;return this.liveStream.resume();case 5:return t.abrupt("return",true);case 8:t.prev=8;t.t0=t["catch"](2);B.error("resume failed: ".concat(t.t0));return t.abrupt("return",false);case 12:case"end":return t.stop()}}),e,this,[[2,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"resume",value:function(){var e=E(_().mark((function e(){return _().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(this.liveStream){t.next=2;break}return t.abrupt("return",false);case 2:t.prev=2;t.next=5;return this.liveStream.resume();case 5:return t.abrupt("return",true);case 8:t.prev=8;t.t0=t["catch"](2);B.error("resume failed: ".concat(t.t0));return t.abrupt("return",false);case 12:case"end":return t.stop()}}),e,this,[[2,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"getRemoteStream",value:function e(){return this.liveStream}},{key:"setPlayoutVolume",value:function e(t){var r;var n=(r=this.liveStream)===null||r===void 0?void 0:r.getAudioHRTCTrack();if(n){n.setAudioVolume(t);return true}return false}},{key:"on",value:function e(r,n){x(t,"on",this,3)([r,n])}},{key:"off",value:function e(r,n){x(t,"off",this,3)([r,n])}},{key:"getPlayoutVolume",value:function e(){if(!this.liveStream){return 0}try{var t=this.liveStream.getAudioHRTCTrack();if(t){return t.getAudioLevel()*100}}catch(e){B.error("getPlayoutVolume occur error: ".concat(e))}return 0}},{key:"muteAudio",value:function e(t){try{var r;var n=(r=this.liveStream)===null||r===void 0?void 0:r.getAudioHRTCTrack();if(n){n.muteAudio(t)}}catch(e){B.error("muteAudio occur error: ".concat(e))}}},{key:"streamStatistic",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;if(t){if(!Number.isInteger(n)||n<1||n>60){B.error("streamStatistic, invalid parameter of interval.");throw new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER)}var i={audioReceiveBytes:0,videoReceiveBytes:0,videoFrames:0,audioSendBytes:0};this.getStreamStatisticInfo(i,n)}else{clearTimeout(this.debugStatisticTimer.timer);this.debugStatisticTimer={interval:1}}}},{key:"destroyClient",value:function e(){window.onbeforeunload=null;this.resetClient();this.offAllEvents()}},{key:"fullScreenToggle",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(t){var r;(r=this.liveStream)===null||r===void 0||r.exitFullScreen()}else{var n;(n=this.liveStream)===null||n===void 0||n.enterFullScreen()}}},{key:"enableStreamStateDetection",value:function e(t){var i,o,s;var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:3;var l=arguments.length>2?arguments[2]:undefined;if(!t){clearTimeout(this.detectTimer.timer);this.detectTimer={interval:c,interruptRetry:undefined};return true}if(!Number.isInteger(c)||c<1||c>60){B.error("enableStreamStateDetection, invalid parameter of interval.");throw new r.HwLLSError(r.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER)}clearTimeout(this.detectTimer.timer);var f={preVideoStat:{preFramesDecoded:0,isInterrupted:false},preAudioStat:{prePacketReceived:0,isInterrupted:false}};var d=(i=n.GlobalVariableManager.getInstance(this.identifiedId))===null||i===void 0?void 0:i.getSfuInfo();if((o=this.liveStream)!==null&&o!==void 0&&o.getVideoHRTCTrack()){var h;f.preVideoStat.preFramesDecoded=u["default"].getValue((h=a.MediaStats.getLeastestVideoInfo(this.connectionsManager.getConnectionId(),d===null||d===void 0?void 0:d.vSsrc))===null||h===void 0?void 0:h.framesDecoded,0)}if((s=this.liveStream)!==null&&s!==void 0&&s.getAudioHRTCTrack()){var p;f.preAudioStat.prePacketReceived=u["default"].getValue((p=a.MediaStats.getLeastestVideoInfo(this.connectionsManager.getConnectionId(),d===null||d===void 0?void 0:d.aSsrc))===null||p===void 0?void 0:p.packetsReceived,0)}this.detectTimer.interval=c;this.detectTimer.interruptRetry=l;B.info("video stream , enableStreamStateDetection ,\n detect interval : ".concat(c,",\n recoverenable:").concat(l===null||l===void 0?void 0:l.enable," ,\n recover interval:").concat(l===null||l===void 0?void 0:l.retryInterval,",\n recovertimes:").concat(l===null||l===void 0?void 0:l.retryTimes));this.judgeStreamInterrupted(f,c,l);return true}},{key:"sendMessage",value:function e(t){if(!t.msg){B.error("send msg is null");return false}return!!this.connectionsManager.sendMessage(t.userUid||0,t.msg)}},{key:"publishStream",value:function(){var e=E(_().mark((function e(t){var r,n,i;return _().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:B.info("publishStream");this.validatePublishRequest(t);t.addClient(this);r=t.getPublishAudioTrack();n=t.getMediaStream();if(r&&n){(i=this.connectionsManager.getConnection())===null||i===void 0||i.addTrack(r,n)}this.localStream=t;case 7:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"validatePublishRequest",value:function e(t){if(!t){B.error(W,"stream is null");throw new r.HwLLSError(r.ErrorCode.RTC_ERR_CODE_INVALID_PARAMETER)}if(!t.hasAudioTrack()&&!t.hasVideoTrack()){B.warn(W,"stream has no audio and video")}if(t.getType()!=="local"){B.error(W,"stream type: ".concat(t.getType()," cannot publish"));throw new r.HwLLSError(r.ErrorCode.RTC_ERR_CODE_INVALID_OPERATION,"stream type: ".concat(t.getType()," cannot publish"))}}},{key:"judgeStreamInterrupted",value:function e(t,r,i){var o=this;this.detectTimer.timer=setTimeout((function(){var e,s,c;clearTimeout(o.detectTimer.timer);var l;var f;var d=false;var h=false;var p=(e=n.GlobalVariableManager.getInstance(o.identifiedId))===null||e===void 0?void 0:e.getSfuInfo();if((s=o.liveStream)!==null&&s!==void 0&&s.getVideoHRTCTrack()){var v;l=a.MediaStats.getLeastestVideoInfo(o.connectionsManager.getConnectionId(),p===null||p===void 0?void 0:p.vSsrc);d=u["default"].getValue((v=l)===null||v===void 0?void 0:v.framesDecoded,0)-u["default"].getValue(t.preVideoStat.preFramesDecoded,0)<=0;if(!d){clearTimeout(o.recoveryInfo.recoveryTimer);o.recoveryInfo.retryTimes=0}if(l){t.preVideoStat.preFramesDecoded=u["default"].getValue(l.framesDecoded,0)}}if((c=o.liveStream)!==null&&c!==void 0&&c.getAudioHRTCTrack()){var m;f=a.MediaStats.getLeastestAudioInfo(o.connectionsManager.getConnectionId(),p===null||p===void 0?void 0:p.aSsrc);h=u["default"].getValue((m=f)===null||m===void 0?void 0:m.packetsReceived,0)-u["default"].getValue(t.preAudioStat.prePacketReceived,0)<=0;if(f){t.preAudioStat.prePacketReceived=u["default"].getValue(f.packetsReceived,0)}}o.dealVideoJudgeStreamInterrupted(t,d,i);o.dealAudioJudgeStreamInterrupted(t,h);o.judgeStreamInterrupted(t,r,i)}),r*1e3)}},{key:"dealVideoJudgeStreamInterrupted",value:function e(t,r,n){if(t.preVideoStat.isInterrupted&&!r){this.eventEmitter.emit(l.HWLLSEvents.VIDEO_RECOVERY);t.preVideoStat.isInterrupted=false;B.info("video stream recovery ...")}else if(!t.preVideoStat.isInterrupted&&r){this.eventEmitter.emit(l.HWLLSEvents.VIDEO_INTERRUPTED);t.preVideoStat.isInterrupted=true;B.info("video stream interrupt, retry enable : ".concat(n===null||n===void 0?void 0:n.enable));if(n!==null&&n!==void 0&&n.enable){var i,o;clearTimeout(this.recoveryInfo.recoveryTimer);var a=(i=n.retryInterval)!==null&&i!==void 0?i:3;var s=(o=n===null||n===void 0?void 0:n.retryTimes)!==null&&o!==void 0?o:30;this.autoRecoverPlay(a,s)}}}},{key:"dealAudioJudgeStreamInterrupted",value:function e(t,r){if(t.preAudioStat.isInterrupted&&!r){this.eventEmitter.emit(l.HWLLSEvents.AUDIO_RECOVERY);t.preAudioStat.isInterrupted=false}else if(!t.preAudioStat.isInterrupted&&r){this.eventEmitter.emit(l.HWLLSEvents.AUDIO_INTERRUPTED);t.preAudioStat.isInterrupted=true}}},{key:"autoRecoverPlay",value:function e(t,n){var i=this;var o=0;var a=this.recoveryInfo.retryTimes===0?0:t;this.recoveryInfo.recoveryTimer=setTimeout(E(_().mark((function e(){return _().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:B.info("video stream , autoRecoverPlay every ".concat(t," sencond, currentRetryTimes : ").concat(i.recoveryInfo.retryTimes));clearTimeout(i.recoveryInfo.recoveryTimer);delete i.recoveryInfo.recoveryTimer;a.prev=3;i.recoveryInfo.retryTimes++;o=i.recoveryInfo.retryTimes;B.info("autoRecoverPlay , startPlayOptions:".concat(JSON.stringify(i.startPlayOptions)));a.next=9;return i.p2pPlay(g(g({},i.startPlayOptions),{recover:true})).then((function(){i.recoveryInfo.retryTimes=0}));case 9:a.next=16;break;case 11:a.prev=11;a.t0=a["catch"](3);B.error("video stream , recovery failed, err : ".concat(a.t0));i.recoveryInfo.retryTimes=o;if(o<n){i.autoRecoverPlay(t,n)}else{i.recoveryInfo.retryTimes=0;i.eventEmitter.emit(l.HWLLSEvents.ERROR,{errCode:r.ErrorCode.HWLLS_PLAY_WEBRTC_RETRY_FAILED,errDesc:r.ErrorMsg[r.ErrorCode.HWLLS_PLAY_WEBRTC_RETRY_FAILED]})}case 16:case"end":return a.stop()}}),e,null,[[3,11]])}))),a*1e3)}},{key:"initErrorMap",value:function e(){this.errMap=new Map;this.errMap.set(100,r.ErrorCode.HWLLS_ERROR_INVALID_URL);this.errMap.set(101,r.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER);this.errMap.set(102,r.ErrorCode.HWLLS_ERROR_ENCODING_NOT_ACCEPTED);this.errMap.set(400,r.ErrorCode.HWLLS_ERROR_BAD_REQUEST);this.errMap.set(401,r.ErrorCode.HWLLS_ERROR_STREAM_INVALID_PARAMETER);this.errMap.set(403,r.ErrorCode.HWLLS_ERROR_AUTH_FAIL);this.errMap.set(404,r.ErrorCode.HWLLS_ERROR_STREAM_NOT_EXIST);this.errMap.set(500,r.ErrorCode.HWLLS_ERROR_SERVER_CONNECT_FAIL);this.errMap.set(503,r.ErrorCode.HWLLS_ERROR_SERVER_CONNECT_FAIL);this.errMap.set(601,r.ErrorCode.HWLLS_BUSSINESS_DOWNGRADE)}},{key:"calcNetworkQuality",value:function(){var e=E(_().mark((function e(){var t,r;return _().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:t=this.connectionsManager.getConnection();if(t){n.next=3;break}return n.abrupt("return",0);case 3:if(!(t&&["disconnected","failed","closed"].includes(t.connectionState))){n.next=5;break}return n.abrupt("return",6);case 5:n.next=7;return this.getDownloadStatistic(d.MediaType.TRACK_TYPE_VIDEO);case 7:r=n.sent;if(!(r<0)){n.next=12;break}n.next=11;return this.getDownloadStatistic(d.MediaType.TRACK_TYPE_AUDIO);case 11:r=n.sent;case 12:if(!(r===-1)){n.next=14;break}return n.abrupt("return",0);case 14:if(!(r<1)){n.next=16;break}return n.abrupt("return",1);case 16:if(!(r<5)){n.next=18;break}return n.abrupt("return",2);case 18:if(!(r<12)){n.next=20;break}return n.abrupt("return",3);case 20:if(!(r<20)){n.next=22;break}return n.abrupt("return",4);case 22:if(!(r<30)){n.next=24;break}return n.abrupt("return",5);case 24:return n.abrupt("return",6);case 25:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getDownloadStatistic",value:function(){var e=E(_().mark((function e(t){var r;var i,o,s,c,l,f,h,p,v,m;return _().wrap((function e(y){while(1)switch(y.prev=y.next){case 0:i=(r=n.GlobalVariableManager.getInstance(this.identifiedId))===null||r===void 0?void 0:r.getSfuInfo();o=t===d.MediaType.TRACK_TYPE_VIDEO?a.MediaStats.getLeastestVideoInfo(this.connectionsManager.getConnectionId(),i===null||i===void 0?void 0:i.vSsrc):a.MediaStats.getLeastestAudioInfo(this.connectionsManager.getConnectionId(),i===null||i===void 0?void 0:i.aSsrc);if(o){y.next=4;break}return y.abrupt("return",-1);case 4:s=t===d.MediaType.TRACK_TYPE_VIDEO?0:1;c={packetsReceived:0,packetsLost:0,nackCnt:0};c.packetsReceived=u["default"].getValue(o.packetsReceived,0);c.packetsLost=u["default"].getValue(o.packetsLost,0);c.nackCnt=u["default"].getValue(o.nackCount,0);if(!(c.packetsReceived===0)){y.next=11;break}return y.abrupt("return",-1);case 11:l=Math.max(c.packetsReceived-this.preRemoteStreamStatistic.packetsReceived[s],1);f=Math.max(c.packetsLost-this.preRemoteStreamStatistic.packetsLost[s],0);h=Math.max(c.nackCnt-this.preRemoteStreamStatistic.nackCnt[s],0);v=h*100/(h+l);if(v<=20){p=h*.9*100/(h*.9+l)}else if(v<=30){p=h*.86*100/(h*.86+l)}else if(v<=40){p=h*.82*100/(h*.82+l)}else if(v<=50){p=h*.78*100/(h*.78+l)}else{p=h*.7*100/(h*.7+l)}this.preRemoteStreamStatistic.preLostRate.push(Math.min(Math.max(f*100/(f+l),p),100));if(this.preRemoteStreamStatistic.preLostRate.length>3){this.preRemoteStreamStatistic.preLostRate.shift()}this.preRemoteStreamStatistic.packetsReceived[s]=c.packetsReceived;this.preRemoteStreamStatistic.packetsLost[s]=c.packetsLost;this.preRemoteStreamStatistic.nackCnt[s]=c.nackCnt;m=this.smoothData(this.preRemoteStreamStatistic.preLostRate,.9);return y.abrupt("return",m[m.length-1]);case 23:case"end":return y.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"smoothData",value:function e(t,r){var n=G(t)*r;var i=[];for(var o=0;o<t.length;o++){var a=t[o];var s=o>0?i[o-1]:t[t.length-1];var u=o<t.length-1?t[o+1]:t[0];var c=Number(G([n,s,a,u]).toFixed(2));i.push(c)}return i}},{key:"netQualityRegularReport",value:function e(){var t=this;clearTimeout(this.netQualityTimer);this.netQualityTimer=setTimeout((function(){clearTimeout(t.netQualityTimer);t.calcNetworkQuality().then((function(e){if(t.preNetQuality===-1||t.preNetQuality!==e){B.info("emit: ".concat(l.HWLLSEvents.NET_QUALITY,", quality: ").concat(e," "));t.eventEmitter.emit(l.HWLLSEvents.NET_QUALITY,e)}t.preNetQuality=e}))["finally"](t.netQualityRegularReport.bind(t))}),1e3)}},{key:"checkRecover",value:function e(t){if(t){delete this.startPlayOptions.recover;this.playOption=g(g({},this.startPlayOptions),{autoPlay:true})}else{this.playOption=this.startPlayOptions}}},{key:"initPeerConnection",value:function(){var e=E(_().mark((function e(t){var r=this;return _().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:this.addStartPlayEvent(true,true);n.next=3;return this.connectionsManager.handleAnswerSdpFromServer(t.answerSdp);case 3:B.info("initPeerConnection, addIceCandidate");t.iceCandidates.forEach((function(e){var t;(t=r.connectionsManager.getConnection())===null||t===void 0||t.addIceCandidate({candidate:e,sdpMid:"0",sdpMLineIndex:0})["catch"]((function(t){B.error("addIceCandidate",e,t)}))}));case 5:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"addStartPlayEvent",value:function e(r,n){var i=this;B.info("addStartPlayEvent",r,n);if(r){x(t,"off",this,3)([l.HWLLSEvents.AUDIO_START,this.firstFrameHandler.audioHandler]);x(t,"once",this,3)([l.HWLLSEvents.AUDIO_START,this.firstFrameHandler.audioHandler]);o["default"].off("audio_start_".concat(this.connectionsManager.getConnectionId()));o["default"].on("audio_start_".concat(this.connectionsManager.getConnectionId()),(function(){B.info("addStartPlayEvent","audio_start_".concat(i.connectionsManager.getConnectionId()));var e=i.eventEmitter.listeners(l.HWLLSEvents.AUDIO_START).find((function(e){return e===i.firstFrameHandler.audioHandler}));if(e){i.eventEmitter.emit(l.HWLLSEvents.AUDIO_START)}}))}if(n){x(t,"off",this,3)([l.HWLLSEvents.VIDEO_START,this.firstFrameHandler.videoHandler]);x(t,"once",this,3)([l.HWLLSEvents.VIDEO_START,this.firstFrameHandler.videoHandler]);o["default"].off("video_start_".concat(this.connectionsManager.getConnectionId()));o["default"].on("video_start_".concat(this.connectionsManager.getConnectionId()),(function(){var e=i.eventEmitter.listeners(l.HWLLSEvents.VIDEO_START).find((function(e){return e===i.firstFrameHandler.videoHandler}));if(e){i.eventEmitter.emit(l.HWLLSEvents.VIDEO_START)}}));o["default"].off("video_broken_".concat(this.connectionsManager.getConnectionId()));o["default"].on("video_broken_".concat(this.connectionsManager.getConnectionId()),(function(){if(i.recoveryInfo.recoveryTimer||i.recoveryInfo.retryTimes!==0){B.info("the recovery timer is running...");return}i.autoRecoverPlay(i.videoRecoveryInfo.interval,i.videoRecoveryInfo.retryTimes)}))}}},{key:"stopSignal",value:function(){var e=E(_().mark((function e(){return _().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:B.info("stop signal...");case 1:case"end":return t.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"playerStateChange",value:function e(t){B.info("playerStateChange: ",t);if(t.event===f.PlayerStateTraceEvent.PALYER_PLAYING&&t.type===f.PlayerStateTraceType.RTC_VIDEO_PLAYER){this.eventEmitter.emit(l.HWLLSEvents.STREAM_ADDED,{stream:this.liveStream})}}},{key:"onTrackHandler",value:function e(t){var i=this;B.info("onTrackHandler: ".concat(t.track.kind));var o=t.track.kind;if(o===d.MediaType.TRACK_TYPE_VIDEO||o===d.MediaType.TRACK_TYPE_AUDIO){var a,u,c;if(!this.liveStream){this.liveStream=new s.RemoteStream(this.stats,this.eventEmitter)}this.liveStream.addRemoteTrack(t.track);this.liveStream.on(v.RTCStreamEvent.PLAYER_STATE_TRACE,this.playerStateChange.bind(this));var f=o===d.MediaType.TRACK_TYPE_VIDEO;if(f){this.dealVideoTrackHandler()}var h=(a=n.GlobalVariableManager.getInstance(this.identifiedId))===null||a===void 0?void 0:a.getSfuInfo();var p=(u=n.GlobalVariableManager.getInstance(this.identifiedId))===null||u===void 0?void 0:u.getStreamParams();var m=(c=n.GlobalVariableManager.getInstance(this.identifiedId))===null||c===void 0?void 0:c.getPullMediaParams();this.liveStream.play(g(g({},this.playOption),{},{audio:!f,video:f}))["catch"]((function(e){var t=e instanceof r.HwLLSError&&(e.getCode()===r.ErrorCode.HWLLS_PLAY_NOT_ALLOW||/The operation was aborted/gi.test(e.getMsg()));if(t){i.eventEmitter.emit(l.HWLLSEvents.ERROR,{errCode:e.getCode(),errDesc:e.getMsg()});return}i.dealStreamPlayError({error:e,sfuInfo:h,streamParams:p,mediaParams:m,isVideo:f,trackType:o})}));this.stats.startMediaStatistic()}}},{key:"dealVideoTrackHandler",value:function e(){var t=this;o["default"].off("video_stuck_".concat(this.connectionsManager.getConnectionId()));o["default"].on("video_stuck_".concat(this.connectionsManager.getConnectionId()),(function(e){t.eventEmitter.emit(l.HWLLSEvents.VIDEO_STUCK,e)}));o["default"].off("video_broken_".concat(this.connectionsManager.getConnectionId()));o["default"].on("video_broken_".concat(this.connectionsManager.getConnectionId()),(function(){if(t.recoveryInfo.recoveryTimer||t.recoveryInfo.retryTimes!==0){B.info("video broken, the recovery timer is running...");return}t.autoRecoverPlay(t.videoRecoveryInfo.interval,t.videoRecoveryInfo.retryTimes)}))}},{key:"dealStreamPlayError",value:function e(t){var i=t.error,o=t.isVideo,a=t.sfuInfo,s=t.trackType,u=t.streamParams,c=t.mediaParams;var f=1;if(i instanceof r.HwLLSError){if(i.getCode()!==r.ErrorCode.HWLLS_PLAY_TIMEOUT){if(/interrupted by a new load request/gi.test(i.getMsg())){f=2}if(o&&a!==null&&a!==void 0&&a.aSsrc){this.dealAudioPlayError(f,a,u,c)}this.eventEmitter.emit(l.HWLLSEvents.ERROR,{errCode:i.getCode(),errDesc:i.getMsg()})}else{var d;if(!this.connectionsManager.isConnectionEstablished()){f=3}if(o&&a!==null&&a!==void 0&&a.aSsrc){this.dealAudioPlayError(f,a,u,c)}(d=n.GlobalVariableManager.getInstance(this.identifiedId))===null||d===void 0||d.updatePlayTrackKpi("".concat(o?"video":"audio","TimeOut"));if(!this.receivedFirstFrame){this.eventEmitter.emit(l.DowngradeEvent,i)}}}else{this.eventEmitter.emit(l.HWLLSEvents.ERROR,{errCode:r.ErrorCode.HWLLS_INTERNAL_ERROR,errDesc:r.ErrorMsg[r.ErrorCode.HWLLS_INTERNAL_ERROR]})}this.stats.reportPullMediaStreamResult(s,f,{playTrackKpi:this.prePlayTrackCache,sfuInfo:a,streamParams:u,mediaParams:c})}},{key:"dealAudioPlayError",value:function e(t,r,i,o){var a=this;var s=this.eventEmitter.listeners(l.HWLLSEvents.AUDIO_START).find((function(e){return e===a.firstFrameHandler.audioHandler}));if(s){var u;(u=n.GlobalVariableManager.getInstance(this.identifiedId))===null||u===void 0||u.updatePlayTrackKpi("audioTimeOut");this.stats.reportPullMediaStreamResult(d.MediaType.TRACK_TYPE_AUDIO,t,{playTrackKpi:this.prePlayTrackCache,sfuInfo:r,streamParams:i,mediaParams:o})}}},{key:"resetClient4Switch",value:function e(){var t;this.stats.cancelMediaStatistic();this.connectionsManager.destroyPeerConnection();this.prePlayTrackCache=(t=n.GlobalVariableManager.getInstance(this.identifiedId))===null||t===void 0?void 0:t.getPlayTrackKpi();n.GlobalVariableManager.delInstance(this.identifiedId);clearTimeout(this.debugStatisticTimer.timer);clearTimeout(this.detectTimer.timer);clearTimeout(this.recoveryInfo.recoveryTimer);this.recoveryInfo.retryTimes=0}},{key:"resetClient4Stop",value:function e(){var t;this.resetClient4Switch();clearTimeout(this.netQualityTimer);delete this.netQualityTimer;this.preNetQuality=-1;(t=this.liveStream)===null||t===void 0||t.destory();delete this.liveStream;this.startPlayOptions={answerSdp:"",iceCandidates:[],p2pUserId:"",elementId:""}}},{key:"resetClient",value:function e(t){var r,i;this.stats.cancelMediaStatistic();this.connectionsManager.destroyPeerConnection();this.prePlayTrackCache=(r=n.GlobalVariableManager.getInstance(this.identifiedId))===null||r===void 0?void 0:r.getPlayTrackKpi();if(!t){n.GlobalVariableManager.delInstance(this.identifiedId)}clearTimeout(this.debugStatisticTimer.timer);this.debugStatisticTimer={interval:1};clearTimeout(this.detectTimer.timer);this.detectTimer={interval:3};clearTimeout(this.netQualityTimer);delete this.netQualityTimer;clearTimeout(this.recoveryInfo.recoveryTimer);this.recoveryInfo.retryTimes=0;(i=this.liveStream)===null||i===void 0||i.destory();delete this.liveStream;this.startPlayOptions={answerSdp:"",iceCandidates:[],p2pUserId:"",elementId:""};this.preNetQuality=-1}},{key:"getStreamStatisticInfo",value:function e(t,r){var i=this;this.debugStatisticTimer.interval=r;this.debugStatisticTimer.timer=setTimeout((function(){var e,o;console.log("debugStatisticTimer1");clearTimeout(i.debugStatisticTimer.timer);var s=(e=n.GlobalVariableManager.getInstance(i.identifiedId))===null||e===void 0?void 0:e.getSfuInfo();var c=(o=n.GlobalVariableManager.getInstance(i.identifiedId))===null||o===void 0?void 0:o.getLocalSfuInfo();var f={};if(c!==null&&c!==void 0&&c.aSsrc){var h=a.MediaStats.getSendAudioMediaStatistic(i.connectionsManager.getConnectionId(),c.aSsrc);if(h){f.localAudio={mediaType:d.MediaType.TRACK_TYPE_AUDIO,codec:"OPUS",bitRate:h.bitRate,packetsLost:h.lostPktCnt,jitter:h.jitter,rtt:h.rtt};t.audioSendBytes=u["default"].getValue(h.totalByteSend,0)}}if(s!==null&&s!==void 0&&s.aSsrc){var p=a.MediaStats.getMediaStatistic(i.connectionsManager.getConnectionId(),s.aSsrc,d.MediaType.TRACK_TYPE_AUDIO);if(p){f.audio={mediaType:d.MediaType.TRACK_TYPE_AUDIO,codec:"OPUS",bitRate:p.bitRate,packetsLost:p.lostPktCnt,jitter:p.jitter,rtt:p.rtt};t.audioReceiveBytes=u["default"].getValue(p.totalByteReceived,0)}}if(s!==null&&s!==void 0&&s.vSsrc){var v=a.MediaStats.getMediaStatistic(i.connectionsManager.getConnectionId(),s.vSsrc,d.MediaType.TRACK_TYPE_VIDEO);if(v){t.videoFrames=u["default"].getValue(v.framesDecoded,0);f.video={mediaType:d.MediaType.TRACK_TYPE_VIDEO,codec:"H264",bitRate:v.bitRate,packetsLost:v.lostPktCnt,jitter:v.jitter,rtt:v.rtt,frameRate:v.frameRate};t.videoReceiveBytes=u["default"].getValue(v.totalByteReceived,0)}}i.eventEmitter.emit(l.HWLLSEvents.MEDIA_STATISTIC,f);i.getStreamStatisticInfo(t,r)}),r*1e3)}},{key:"setSendBitrate",value:function(){var e=E(_().mark((function e(t,r,n){var i;return _().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:if(t){o.next=3;break}B.info(W,"sender is null");return o.abrupt("return");case 3:if(!(typeof t.getParameters!=="function")){o.next=6;break}B.info(W,"sender not support getParameters");return o.abrupt("return");case 6:if(!(typeof t.setParameters!=="function")){o.next=9;break}B.info(W,"sender not support setParameters");return o.abrupt("return");case 9:i=t.getParameters();if(!(i.encodings.length<=0)){o.next=13;break}B.info(W,"sender has no track, can not set maxBitRate");return o.abrupt("return");case 13:i.encodings[0].maxBitrate=r;o.next=16;return t.setParameters(i);case 16:B.info(W,"success set ".concat(n," sender maxBitrate: ").concat(r));case 17:case"end":return o.stop()}}),e)})));function t(t,r,n){return e.apply(this,arguments)}return t}()}])}(t.EmitterAble);V([(0,p.printfDecorator)(B)],Z.prototype,"getInfo",null);V([(0,p.printfDecorator)(B)],Z.prototype,"getSymbol",null);V([(0,p.printfDecorator)(B)],Z.prototype,"getPublishAudioSender",null);V([(0,p.printfDecorator)(B)],Z.prototype,"p2pPlay",null);V([(0,p.printfDecorator)(B)],Z.prototype,"createPeerConnection",null);V([(0,p.printfDecorator)(B)],Z.prototype,"getLocalSDP",null);V([(0,p.printfDecorator)(B)],Z.prototype,"stopPlay",null);V([(0,p.printfDecorator)(B)],Z.prototype,"replay",null);V([(0,p.printfDecorator)(B)],Z.prototype,"resume",null);V([(0,p.printfDecorator)(B)],Z.prototype,"getRemoteStream",null);V([(0,p.printfDecorator)(B)],Z.prototype,"setPlayoutVolume",null);V([(0,p.printfDecorator)(B)],Z.prototype,"getPlayoutVolume",null);V([(0,p.printfDecorator)(B)],Z.prototype,"muteAudio",null);V([(0,p.printfDecorator)(B)],Z.prototype,"streamStatistic",null);V([(0,p.printfDecorator)(B)],Z.prototype,"destroyClient",null);V([(0,p.printfDecorator)(B)],Z.prototype,"fullScreenToggle",null);V([(0,p.printfDecorator)(B)],Z.prototype,"enableStreamStateDetection",null);V([(0,p.printfDecorator)(B)],Z.prototype,"sendMessage",null)}))},7867:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaDeviceManager=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var r=l(e,"string");return"symbol"==t(r)?r:r+""}function l(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var f=e.MediaDeviceManager=function(){function e(){o(this,e)}return s(e,null,[{key:"getDefaultDeviceId",value:function(){var t=i(r().mark((function t(n){var i;var o,a,s;return r().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:o=r.sent;a=o.filter((function(e){return e.kind===n}));s=a.find((function(e){return e.deviceId==="default"}));return r.abrupt("return",s?((i=a.find((function(t){return t.groupId===s.groupId&&!e.defaultDeviceIdList.includes(t.deviceId)})))===null||i===void 0?void 0:i.deviceId)||"":"");case 6:case"end":return r.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"checkDeviceIdExist",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:n=r.sent;return r.abrupt("return",!!n.find((function(e){return e.deviceId===t})));case 4:case"end":return r.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}();u(f,"defaultDeviceIdList",["default","communications"])}))},8024:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974),r(7354)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LoggerFactory=void 0;r=n(r);function n(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==i(t)?t:t+""}function c(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l={none:0,error:1,warn:2,log:3,info:3,debug:4,trace:5,verbose:5};var f={domain:"",appName:"",streamName:"",svrsid:""};var d=e.LoggerFactory=function(){function e(){o(this,e)}return s(e,null,[{key:"setLogLevel",value:function r(n){if(l[n]>=0){e.logLevel=n}else{throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"log level is invalid")}return true}},{key:"setExtraInfos",value:function e(t){if(t.domain!==undefined){f.domain=t.domain}if(t.appName!==undefined){f.appName=t.appName}if(t.streamName!==undefined){f.streamName=t.streamName}if(t.svrsid!==undefined){f.svrsid=t.svrsid}}},{key:"shieldIpAddress",value:function e(t){if(!t){return""}return t.replace(/\b(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\b/g,"$1.*.*.$2")}},{key:"shieldUrlParameters",value:function t(r){if(!r){return r}var n=r.match(/([^?|=|&]+)=([^&]+)/g);if(n){n.forEach((function(t){var n=/([^=]*)=(.*)/g.exec(t);if(n&&n.length>2){r=r.replace(t,"".concat(n[1],"=").concat(e.secretString(n[2])))}}))}return r}},{key:"secretString",value:function e(t){if(!t){return""}var r="********";var n=Math.ceil(t.length/3);var i=Math.ceil((t.length-n)/2);if(i===0){return"".concat(t.substr(0,n)).concat(r)}return"".concat(t.substr(0,n)).concat(r).concat(t.substr(-i,i))}},{key:"error",value:function t(r,n){e.print("error",r,n)}},{key:"warn",value:function t(r,n){e.print("warn",r,n)}},{key:"info",value:function t(r,n){e.print("info",r,n)}},{key:"log",value:function t(r,n){e.print("log",r,n)}},{key:"debug",value:function t(r,n){e.print("debug",r,n)}},{key:"trace",value:function t(r,n){e.print("trace",r,n)}},{key:"verbose",value:function t(r,n){e.print("verbose",r,n)}},{key:"clearLogs",value:function t(){e.logBuffer=[]}},{key:"setlogBufferSize",value:function t(r){e.logBufferSize=r}},{key:"getlogBufferSize",value:function t(){return e.logBufferSize}},{key:"getLogBuffer",value:function t(){return e.logBuffer}},{key:"print",value:function t(n,i,o){var a=r["default"].getCurrentTimeInfo();var s="".concat(a.year,"-").concat(a.month,"-").concat(a.day," ").concat(a.hour,":").concat(a.min,":").concat(a.sec,".").concat(a.millsec," [HWLLS] [").concat(n,"] [").concat(i,"] [").concat(o,"]");this.logBuffer.push(s);while(this.logBuffer.length>=this.logBufferSize){this.logBuffer.shift()}if(l[e.logLevel]>=l[n]){console[l[n]>=4?"debug":n](s)}}}])}();d.logLevel="log";d.logBuffer=[];d.logBufferSize=1e4}))},8066:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8495),r(7354),r(2216),r(5268),r(4772),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaStats=void 0;t=s(t);r=s(r);function s(e){return e&&e.__esModule?e:{default:e}}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function _(){}function S(){}var E={};l(E,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,a)&&(E=T);var I=S.prototype=g.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==b(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function d(e,t){if(e){if("string"==typeof e)return h(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==b(t)?t:t+""}function g(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){"@babel/helpers - typeof";return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}var _=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":b(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var S=new a.Log({module:"MediaStats"});var E={audio:function e(){return"packetsReceived"},video:function e(t){if(Object.prototype.hasOwnProperty.call(t,"framesDecoded")){return"framesDecoded"}if(Object.prototype.hasOwnProperty.call(t,"framesReceived")){return"framesReceived"}return"packetsReceived"}};var w={audio200:200,video200:200,video600:600};var T=2e3;var I=e.MediaStats=function(){function e(){p(this,e)}return m(e,null,[{key:"startUpMediaStats",value:function e(r){t["default"].connectionRegister(r)}},{key:"shutDownMediaStats",value:function e(r){t["default"].reset(r)}},{key:"getLeastestVideoInfo",value:function e(r,n){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;if(!n){return null}return t["default"].getleastestStats(r,i?"inbound-rtp_video_".concat(n):"remote-inbound-rtp_video_".concat(n))}},{key:"getLeastestAudioInfo",value:function e(r,n){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;if(!n){return null}return t["default"].getleastestStats(r,i?"inbound-rtp_audio_".concat(n):"remote-inbound-rtp_audio_".concat(n))}},{key:"getConnectionNetType",value:function e(r){var n;var i=(n=t["default"].getleastestStats(r))===null||n===void 0?void 0:n.data;if(!i){return""}var o="";var a=f(i.values()),s;try{for(a.s();!(s=a.n()).done;){var u=s.value;if(u.type==="local-candidate"){o=u.networkType;break}}}catch(e){a.e(e)}finally{a.f()}return o!=="unknown"?o:"other"}},{key:"getCandidatePairProtocol",value:function(){var e=l(u().mark((function e(n){var i,o,a;var s;return u().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:u.next=2;return r["default"].sleep(800);case 2:s=(i=t["default"].getleastestStats(n))===null||i===void 0?void 0:i.data;if(s){u.next=5;break}return u.abrupt("return","udp");case 5:return u.abrupt("return",((o=s.get((a=s.get("candidate-pair"))===null||a===void 0?void 0:a.localCandidateId))===null||o===void 0?void 0:o.protocol)||"udp");case 6:case"end":return u.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()},{key:"getSendAudioMediaStatistic",value:function e(r,n){var i,o,a,s;var u=t["default"].getHistoryDatas(r);if(!u||u.size()<1){return null}var c=u.size();var l=u.getElement(0);var f=u.getElement(c-1);if(!l||!f){return{rtt:0,totalPacketsSend:0,totalByteSend:0,bitRate:0,lostPktCnt:0,jitter:0}}var d=(i=l.data)===null||i===void 0?void 0:i.get("outbound-rtp_audio_".concat(n));var h=(o=l.data)===null||o===void 0?void 0:o.get("remote-inbound-rtp_audio_".concat(n));var p=(a=f.data)===null||a===void 0?void 0:a.get("outbound-rtp_audio_".concat(n));var v=(s=f.data)===null||s===void 0?void 0:s.get("remote-inbound-rtp_audio_".concat(n));if(!d||!h||!p||!v){return null}var m=d.timestamp-p.timestamp;var y=h.timestamp-v.timestamp;var g=d.bytesSent-p.bytesSent;var b=h.packetsLost-v.packetsLost;return{rtt:h.roundTripTime,totalPacketsSend:d.packetsSent,totalByteSend:d.bytesSent,bitRate:Math.round(g*8/(m||1)),lostPktCnt:Math.round(b*1e3/(y||1)),jitter:Math.round(h.jitter*1e3)}}},{key:"getMediaStatistic",value:function n(o,a,s){var u=t["default"].getHistoryDatas(o);if(!u||u.size()<1){return null}var c=s===i.MediaType.TRACK_TYPE_AUDIO?1:2;var l=[];var f=0;for(var d=0;d<u.size();d++){var h=u.getElement(d);if(!h){continue}if((h.processed&c)>0){continue}h.processed=h.processed|c;var p=h.data;if(!p){continue}var v=p.get("inbound-rtp_".concat(s,"_").concat(a));if(v){l.push(v);var m=p.get("candidate-pair");if(!m){continue}if(Object.prototype.hasOwnProperty.call(m,"currentRoundTripTime")){f+=r["default"].getValue(m.currentRoundTripTime,0)*1e3}else{f+=Math.abs(r["default"].getValue(m.lastPacketReceivedTimestamp,0)-r["default"].getValue(m.lastPacketSentTimestamp,0))}}}var y=l.length;if(y===0){return null}var g=l[0];var b=y>1?l[y-1]:{};var _=E[s](g);var S=r["default"].getValue(g.bytesReceived,0);var w=r["default"].getValue(g.packetsReceived,0);var T=Math.max(S-r["default"].getValue(b.bytesReceived,0),0);var I=Math.max(g.packetsLost-r["default"].getValue(b.packetsLost,0),0);var R=e.calcFreezeStatistic(l,_,s),C=R.total200FreezeTime,k=R.total200FreezeCnt,A=R.total600VFreezeTime,O=R.total600VFreezeCnt,P=R.totalJetter,x=R.totalStatisticTime,L=R.validSampleCount;var M={rtt:Math.ceil(f/y),total200FreezeTime:C,total200FreezeCnt:k,totalStatisticTime:x,totalPacketsReceived:w,totalByteReceived:S,bitRate:Math.round(T*8/(x||1)),lostPktCnt:I,jitter:Math.round(P*1e3/L),nackCnt:r["default"].getValue(g.nackCount,0)};if(s===i.MediaType.TRACK_TYPE_AUDIO){return M}return e.getVideoMediaStatistic({oldestSample:b,newestSample:g,totalStatisticTime:x,statisticInfo:M,total600VFreezeTime:A,total600VFreezeCnt:O})}},{key:"getVideoMediaStatistic",value:function e(t){var n=t.oldestSample,i=t.newestSample,o=t.totalStatisticTime,a=t.statisticInfo,s=t.total600VFreezeTime,u=t.total600VFreezeCnt;var c=r["default"].getValue(i.framesReceived,0);var l=r["default"].getValue(i.framesDecoded,0);var f=r["default"].getValue(i.framesDropped,0);var d=Math.max(l-r["default"].getValue(n.framesDecoded,0),0);var h=Math.max(i.keyFramesDecoded-r["default"].getValue(n.keyFramesDecoded,0),0);var p=d*1e3/(o||1);var v=(r["default"].getValue(i.jitterBufferDelay,0)-r["default"].getValue(n.jitterBufferDelay,0))/Math.max(r["default"].getValue(i.jitterBufferEmittedCount,0)-r["default"].getValue(n.jitterBufferEmittedCount,0),1)*1e3;var m={rtt:a.rtt,jitterBufferDelay:r["default"].getValue(i.jitterBufferDelay,0),jitterBufferEmittedCount:r["default"].getValue(i.jitterBufferEmittedCount,0),framesPerSecond:i.framesPerSecond||Math.ceil(p),jbDelay:Math.ceil(Math.max(v,0)),frameDelay:Math.max((c-l-f)/r["default"].getValue(p,1),0)*1e3};var y=Math.ceil(m.rtt+m.jbDelay+m.frameDelay);Object.assign(a,{width:r["default"].getValue(i.frameWidth,0),height:r["default"].getValue(i.frameHeight,0),totalDecodeFrames:d,frameRate:Math.ceil(p),keyFrames:h,delayInfo:m,downloadDelay:y,framesReceived:c,framesDecoded:l,framesDropped:f,total600VFreezeTime:s,total600VFreezeCnt:u,pliCnt:r["default"].getValue(i.pliCount,0),firCnt:r["default"].getValue(i.firCount,0)});return a}},{key:"calcFreezeStatistic",value:function t(o,a,s){var u=0;var c=0;var l=0;var f=0;var d=0;var h=0;var p=0;var v=0;var m=0;var y=s!==i.MediaType.TRACK_TYPE_AUDIO;var g=Object.prototype.hasOwnProperty.call(o[0],"timestamp");if(o.length<2){return{total200FreezeTime:f,total200FreezeCnt:d,total600VFreezeTime:p,total600VFreezeCnt:v,totalJetter:r["default"].getValue(o[0].jitter,0),totalStatisticTime:n.configs.STATISTIC_INTERVAL,validSampleCount:1}}for(var b=0;b<o.length;b++){if(b===0){u++;m+=r["default"].getValue(o[b].jitter,0);continue}var _=g?Math.round(r["default"].getValue(o[b-1].timestamp,0)-r["default"].getValue(o[b].timestamp,0)):n.configs.STATISTIC_INTERVAL;if(e.loopContinueCheckFreezeStatistic(o[b],o[b-1],_,a)){break}u++;m+=r["default"].getValue(o[b].jitter,0);c+=_;if(o[b-1][a]===o[b][a]){var S=_;l+=S;if(y){h+=S}continue}if(l>=w["".concat(s,"200")]){f+=l;d++}l=0;if(y&&h>=w["".concat(s,"600")]){p+=h;v++}h=0}if(l>=w["".concat(s,"200")]){f+=l;d++}if(y&&h>=w["".concat(s,"600")]){p+=h;v++}return{total200FreezeTime:f,total200FreezeCnt:d,total600VFreezeTime:p,total600VFreezeCnt:v,totalJetter:m,totalStatisticTime:c,validSampleCount:u}}},{key:"loopContinueCheckFreezeStatistic",value:function e(t,r,n,i){if(!t||t.bytesReceived===0&&t.packetsReceived===0){S.error("loopContinueCheckFreezeStatistic Has no data at start, ignore sample: ".concat(t.timestamp));return true}if(n>T){S.error("loopContinueCheckFreezeStatistic Has huge gap between ".concat(t.timestamp," - ").concat(r.timestamp,", ignore sample: ").concat(t.timestamp,", deltaTimeStamp: ").concat(n));return true}var o=t[i]!==0;if(!o){S.error("first frame has not received yet, ignore stuck statistic");return true}return false}}])}();_([(0,o.printfDecorator)(S)],I,"calcFreezeStatistic",null)}))},8094:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354),r(8024),r(2363)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.api=w;e.asyncApi=E;t=i(t);function i(e){return e&&e.__esModule?e:{default:e}}function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=g.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==b(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function a(e){return l(e)||c(e)||u(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==b(t)?t:t+""}function g(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){"@babel/helpers - typeof";return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function _(e){try{return e.map((function(e){if(!["object","function"].includes(b(e))){return e}return e.getInfo?e.getInfo():e}))}catch(t){return e}}function S(e,t,r,n){if(e==="sendMessage"){return false}if(e===t){if(r&&r.length>1){return r[0]===n}}return true}function E(e){return function(n,i,s){var u=s.value;var c=e.substr(0,e.indexOf("$"));return v(v({},s),{},{value:function n(){var i=arguments,s=this;return h(o().mark((function n(){var l,f,d,h,p,v,m,y,g,b,S,E,w;return o().wrap((function n(o){while(1)switch(o.prev=o.next){case 0:d=t["default"].getCurrentLocalTimestamp();for(h=i.length,p=new Array(h),v=0;v<h;v++){p[v]=i[v]}m=p||[];y=_(m);o.prev=4;r.LoggerFactory.info(c,"".concat(u.name," begin : parameters are ").concat(JSON.stringify(y)));o.next=8;return u.apply(s,m);case 8:l=o.sent;g=l!==null&&l!==undefined?_([l]):[];r.LoggerFactory.info(c,"".concat(u.name," end success : result is ").concat(JSON.stringify(g)));return o.abrupt("return",l);case 14:o.prev=14;o.t0=o["catch"](4);r.LoggerFactory.error(c,"".concat(u.name," end error : ").concat(o.t0));f=o.t0;throw o.t0;case 19:o.prev=19;S=t["default"].getCurrentLocalTimestamp();E=[l].concat(m);w=_(E);(b=s.stats_)===null||b===void 0||b.reportApiCallInfo.apply(b,[e,d,S,f].concat(a(w)));return o.finish(19);case 25:case"end":return o.stop()}}),n,null,[[4,14,19,25]])})))()}})}}function w(e){return function(i,o,s){var u=s.value;var c=e.substr(0,e.indexOf("$"));return v(v({},s),{},{value:function i(){var o;var s;var l=t["default"].getCurrentLocalTimestamp();for(var f=arguments.length,d=new Array(f),h=0;h<f;h++){d[h]=arguments[h]}var p=d||[];var v=_(p);try{r.LoggerFactory.info(c,"".concat(u.name," begin : parameters are ").concat(JSON.stringify(v)));s=u.apply(this,p);var m=s!==null&&s!==undefined?_([s]):[];r.LoggerFactory.info(c,"".concat(u.name," end success : result is ").concat(JSON.stringify(m)));return s}catch(e){r.LoggerFactory.error(c,"".concat(u.name," end error : ").concat(e));o=e;throw e}finally{var y;var g=t["default"].getCurrentLocalTimestamp();var b=[s].concat(p);var E=_(b);S(u.name,"setParameter",p,n.parameterValidKeys.LOADING_CONFIG)&&((y=this.stats_)===null||y===void 0?void 0:y.reportApiCallInfo.apply(y,[e,l,g,o].concat(a(E))))}}})}}}))},8159:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StringUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.StringUtil=i((function e(){o(this,e)}));a(c,"beforeJsonParse",(function(e){return e.replace("","")}));a(c,"replaceStringPlaceholder",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}var i=e.split(r.toString());var o="";i.forEach((function(e,t){o+=e;if(t<i.length-1&&n[t]){o+=n[t]}}));return o}));a(c,"formatString",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}if((0,t.formatType)(e)!==t.formatType.STRING){return e}return e.replace(/\{([^{}]+)}/g,(function(e,r){return(0,t.formatType)(n[r])===t.formatType.STRING||!(0,t.isNullOrEmpty)(n[r])?n[r]:e}))}));a(c,"splitStringByChar",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}if((0,t.formatType)(r)!==t.formatType.NUMBER||r<0){return e}if((0,t.formatType)(n)!==t.formatType.STRING){return e}var i="";e.split("").forEach((function(t,o){i+=t;if(o<e.length-1&&(o+1)%r===0){i+=n}}));return i}));a(c,"safeJSONParse",(function(e){try{return JSON.parse(e)}catch(e){return null}}))}))},8360:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LazyLoad=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u={};var c=e.LazyLoad=function(){function e(){n(this,e)}return o(e,null,[{key:"getRealLazyApi",value:function r(n,i,o){(0,t.getPLogger)().debug("getRealLazyApi",n,i,o);if((0,t.formatType)(n)!==t.formatType.STRING||(0,t.formatType)(i)!==t.formatType.STRING||(0,t.formatType)(o)!==t.formatType.OBJECT||n===""||i===""){return{}}var a=o;var s=Object.keys(o);var u=Object.getOwnPropertyNames(Object.getPrototypeOf(o));if(u.includes("constructor")){u.splice(u.indexOf("constructor"),1)}var c=s.concat(u);(0,t.getPLogger)().info("getRealLazyApi loadScript, "+n);c.forEach((function(r){if((0,t.formatType)(a[r])===t.formatType.FUNCTION){a[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++){s[u]=arguments[u]}return e.loadScript(n,i).then((function(){var e;(0,t.getPLogger)().info("getRealLazyApi loadScript, real do "+n+"."+r);if(((e=window[n])===null||e===void 0?void 0:e[r])===a[r]){(0,t.getPLogger)().error("getRealLazyApi loadScript, script is error,"+n+"."+r)}else{var i;return(i=window[n])===null||i===void 0||(i=i[r])===null||i===void 0?void 0:i.apply(window[n],s)}return undefined}))["catch"]((function(e){(0,t.getPLogger)().error("getRealLazyApi loadScript,lazy load "+n,e)}))}}}));return a}},{key:"loadScript",value:function e(r,n){(0,t.getPLogger)().debug("loadScript",r,n);if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return Promise.resolve(undefined)}if(!u[r]){var i=document.createElement("script");i.async=true;u[r]=new Promise((function(e,n){i.onload=function(){(0,t.getPLogger)().info("loadScript, load "+r+" success");e(window[r])};i.onerror=function(){(0,t.getPLogger)().error("loadScript, load "+r+" error");n(new Error("load resource error"))}}));i.src=n;document.head.appendChild(i)}else{(0,t.getPLogger)().info("loadScript, not load "+r+" again")}return u[r]}},{key:"loadCss",value:function e(r){(0,t.getPLogger)().info("loadCss",r);if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return Promise.resolve(undefined)}return new Promise((function(e){var n=document.createElement("link");n.rel="stylesheet";n.href=r;n.onload=function(){(0,t.getPLogger)().info("loadCss, load "+r+" success");e(true)};n.onerror=function(){(0,t.getPLogger)().info("loadCss, load "+r+" error");e(false)};document.head.appendChild(n)}))}}])}()}))},8418:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.browserConfigs=void 0;var t=e.browserConfigs={POLICY:0,WEBRTC_UNSUPPORT_BLACKLIST:[/.*chrome\/([1-6]\d|7[0-1])\..*MiuiBrowser.*/gi,/.*chrome\/([1-6]\d|70)\..*HeyTapBrowser.*/gi,/.*chrome\/([1-5]\d|6[0-2])\..*VivoBrowser.*/gi],WEBRTC_UNSUPPORT_WHITELIST:[]}}))},8441:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(5651),r(8024),r(9974),r(9611),r(3652),r(4772),r(4643)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RTCAudioPlayer=void 0;function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};l(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(L([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=g.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==R(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(R(t)+" is not iterable")}return b.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(C.prototype),l(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),l(T,c,"Generator"),l(T,a,(function(){return this})),l(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==R(t)?t:t+""}function v(e,t){if("object"!=R(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=w(t),y(e,b()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function t(){return!!e})()}function _(e,t,r,n){var i=S(w(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function S(){return S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=E(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},S.apply(null,arguments)}function E(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){"@babel/helpers - typeof";return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var C=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":R(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var k=new o.Log({module:"RTCAudioPlayer"});var A=e.RTCAudioPlayer=function(e){function t(e){var r;f(this,t);r=m(this,t,[{track:e.track,playerDiv:e.playerDiv,playerId:e.playerId}]);r.module_="RTCAudioPlayer";r.muted_=e.muted||false;r.volume_=typeof(e===null||e===void 0?void 0:e.volume)==="number"?e.volume:.5;r.autoPlay_=e.autoPlay||false;r.outputDeviceId_="";return r}T(t,e);return h(t,[{key:"play",value:function(){var e=l(u().mark((function e(){var t=this;return u().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:return i.abrupt("return",new Promise((function(e,i){var o;var a=true;if(t.playerDiv_){o=t.playerDiv_.querySelector("#audio_".concat(t.playerId_))}else{o=t.playerElement_}if(!o){var s;o=document.createElement("audio");o.muted=t.muted_;o.setAttribute("id","audio_".concat(t.playerId_));t.autoPlay_&&o.setAttribute("autoplay","");o.setAttribute("playsinline","");o.setAttribute("webkit-playsinline","");(s=t.playerDiv_)===null||s===void 0||s.appendChild(o);a=false}if("sinkId"in HTMLMediaElement.prototype&&t.outputDeviceId_){o.setSinkId(t.outputDeviceId_)}if(t.mediaStream_.getAudioTracks().length===0){t.mediaStream_.addTrack(t.track_)}k.debug("this.track_",t.track_);o.srcObject=t.mediaStream_;t.playerElement_=o;if(!t.muted_){t.setVolume(t.volume_)}else{t.playerElement_.muted=true}t.addFirstFrameCallBackListener();t.closeAllEvents();t.handleEvents();if(!t.autoPlay_){return}clearTimeout(t.playTimeOutTimer);t.playTimeOutTimer=setTimeout((function(){r.LoggerFactory.info(t.module_,"trigger audioCanPlay event by Timer");t.event_.emit("audioCanPlay");clearTimeout(t.playTimeOutTimer);t.playTimeOutTimer=setTimeout((function(){r.LoggerFactory.info(t.module_,"audio playing timeout");clearTimeout(t.playTimeOutTimer);delete t.playTimeOutTimer;i(new n.HwLLSError(n.ErrorCode.HWLLS_PLAY_TIMEOUT))}),a?1e4:8e3)}),a?0:2e3);t.listenHandlers.playHandler&&t.event_.removeListener("audioCanPlay",t.listenHandlers.playHandler);t.listenHandlers.playHandler=t.doPlay.bind(t,e,i,{deviceId:t.outputDeviceId_,volume:t.volume_,muted:t.muted_});t.event_.on("audioCanPlay",t.listenHandlers.playHandler)})));case 1:case"end":return i.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!(this.outputDeviceId_!==t)){r.next=4;break}r.next=3;return this.playerElement_.setSinkId(t);case 3:this.outputDeviceId_=t;case 4:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"isMuted",value:function e(){var t;return Boolean((t=this.playerElement_)===null||t===void 0?void 0:t.muted)}},{key:"muteAudio",value:function e(t){this.playerElement_.muted=t}},{key:"setVolume",value:function e(t){this.playerElement_.muted=false;if(Number.isNaN(t)){this.playerElement_.volume=this.volume_}else{this.playerElement_.volume=t}}},{key:"getAudioLevel",value:function e(){if(!this.soundMeter_){this.soundMeter_=new s.SoundMeter;this.soundMeter_.connectToSource(this.track_)}return this.soundMeter_.getVolume()}},{key:"stop",value:function e(){_(t,"stop",this,3)([]);if(this.soundMeter_){this.soundMeter_.stop();delete this.soundMeter_}}},{key:"resume",value:function(){var e=l(u().mark((function e(){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",_(t,"resume",this,3)([{deviceId:this.outputDeviceId_,streamId:this.playerId_,volume:this.volume_,muted:this.muted_}]));case 1:case"end":return r.stop()}}),e,this)})));function r(){return e.apply(this,arguments)}return r}()},{key:"replaceTrack",value:function e(r){_(t,"replaceTrack",this,3)([r]);if(this.soundMeter_){this.soundMeter_.stop();delete this.soundMeter_}}},{key:"addFirstFrameCallBackListener",value:function(){var e=l(u().mark((function e(){var t,n,o,a,s;return u().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:if(window.MediaStreamTrackProcessor){u.next=2;break}return u.abrupt("return");case 2:t=new MediaStreamTrackProcessor({track:this.track_});n=t.readable.getReader();u.next=6;return n.read();case 6:o=u.sent;a=o.done;s=o.value;if(a&&this.playerElement_){r.LoggerFactory.debug(this.module_,"first audio frame received.");this.event_.emit(i.HWLLSEvents.AUDIO_START);s===null||s===void 0||s.close()}case 10:case"end":return u.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}])}(t.RTCPlayer);C([(0,a.printfDecorator)(k)],A.prototype,"play",null)}))},8487:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7363),r(7423),r(8024),r(5268),r(4772),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SDPEditor=void 0;function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=p(e,"string");return"symbol"==v(t)?t:t+""}function p(e,t){if("object"!=v(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){"@babel/helpers - typeof";return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var m=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":v(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var y=1;var g="packetization-mode";var b="42e01f";var _="profile-level-id";var S="max-br";var E="5000000";var w=["groups","media"];var T=["candidates","connection","direction","mid","payloads","port","protocol","rtp","type","fmtp","ssrcs"];var I=new a.Log({module:"SDPEditor"});var R=e.SDPEditor=function(){function e(){l(this,e);this.module_="sdp";this.ssrcAttrCname_="cname"}return d(e,[{key:"printSdpInfo",value:function e(r){var i=this.parseSdp(r);if(!i){return""}for(var o in i){if(!Object.prototype.hasOwnProperty.call(i,o)){continue}if(!w.includes(o)){delete i[o]}if(o==="media"){i[o].forEach((function(e){for(var t in e){if(!T.includes(t)){delete e[t]}}}))}}return n.LoggerFactory.shieldIpAddress((0,t.write)(i))}},{key:"containsValidVideoPayload",value:function e(t){n.LoggerFactory.debug(this.module_,"containsValidVideoPayload, offerSdp: ".concat(this.printSdpInfo(t)));var o=this.parseSdp(t);if(!o){n.LoggerFactory.error(this.module_,"containsValidVideoPayload failed,the sdp is invalid");return false}var a=this.getMedias(o,i.MediaType.TRACK_TYPE_VIDEO);return a.some((function(e){var t;return(t=e.rtp)===null||t===void 0?void 0:t.some((function(e){return e.codec.toUpperCase()===r.RTCMediaCodec.H264}))}))}},{key:"transformOfferSdp",value:function e(r){var o=this;n.LoggerFactory.info(this.module_,"transformOfferSdp begin");var a=this.parseSdp(r);if(!a){n.LoggerFactory.error(this.module_,"transformOfferSdp failed,the sdp is invalid");return""}this.modifySessionDescriptionMsid(a,"main");var s=this.getMedias(a,i.MediaType.TRACK_TYPE_VIDEO);var u=this.getMedias(a,i.MediaType.TRACK_TYPE_AUDIO);I.debug("transformOfferSdp audioMedias",u);s.forEach((function(e){o.transformVideoPayload(e);o.deleteRetransmissionSsrc(e)}));u.forEach((function(e){o.transformAudioPayload(e);o.deleteRetransmissionSsrc(e)}));var c=(0,t.write)(a);n.LoggerFactory.debug(this.module_,"transformOfferSdp success, sdp: ".concat(this.printSdpInfo(c)));return c}},{key:"modifySdpCandidates",value:function e(r,n){var o=this.parseSdp(r);if(!o){I.error("modifySdpCandidates failed, the sdp is invalid : ".concat(r));return""}this.modifySessionDescriptionMsid(o,"main");var a=this.getMedias(o,i.MediaType.TRACK_TYPE_VIDEO);var s=this.getMedias(o,i.MediaType.TRACK_TYPE_AUDIO);if(a&&a.length>0){this.modifyCandidate(a[0],n);if(a.length>1){for(var u=0;u<o.media.length;u++){if(o.media[u].type!==i.MediaType.TRACK_TYPE_AUDIO&&o.media[u].mid!==a[0].mid){delete o.media[u]}}}}if(s&&s.length>0){this.modifyCandidate(s[0],n)}var c=(0,t.write)(o);I.debug("modifySdpCandidates success, sdp: ".concat(this.printSdpInfo(c)));return c}},{key:"getSfuInfo",value:function e(t){var r=this.parseSdp(t);if(!r){return undefined}var n={};var o;var a=this.getMedias(r,i.MediaType.TRACK_TYPE_AUDIO);if(a&&a.length>0){var s,u;n.audioPort=((s=a[0].candidates)===null||s===void 0||(s=s.find((function(e){return e.port!==9})))===null||s===void 0?void 0:s.port)||a[0].port;o=a[0].connection;n.aSsrc=parseInt(String((u=a[0].ssrcs)===null||u===void 0||(u=u.find((function(e){return!!e.id})))===null||u===void 0?void 0:u.id))}if(o){n.ipAddress=o.ip}var c=this.getMedias(r,i.MediaType.TRACK_TYPE_VIDEO);if(c&&c.length>0){var l,f;n.videoPort=((l=c[0].candidates)===null||l===void 0||(l=l.find((function(e){return e.port!==9})))===null||l===void 0?void 0:l.port)||n.audioPort||c[0].port;o=c[0].connection;n.vSsrc=parseInt(String((f=c[0].ssrcs)===null||f===void 0||(f=f.find((function(e){return!!e.id})))===null||f===void 0?void 0:f.id))}if(!n.ipAddress&&o){n.ipAddress=o.ip}return n}},{key:"parseSdp",value:function e(r){if(!r){n.LoggerFactory.error(this.module_,"parseSdp failed : sdp is null ");return undefined}var i=(0,t.parse)(r);if(i.media.length===0){n.LoggerFactory.error(this.module_,"parseSdp failed : the media of sdp is null ");return undefined}return i}},{key:"getMedias",value:function e(t,r){return t.media.filter((function(e){var t=e.type;return t===r}))}},{key:"deleteUnexpectedMedia",value:function e(t){if(!t.media){return}t.media=t.media.filter((function(e){var t=e.type;return t===i.MediaType.TRACK_TYPE_VIDEO||t===i.MediaType.TRACK_TYPE_AUDIO}))}},{key:"transformVideoPayload",value:function e(t){if(!t.rtp){n.LoggerFactory.warn(this.module_,"transformVideoPayload failed ,rtp is null");return}var i;var o;var a=0;var u=s(t.rtp),c;try{for(u.s();!(c=u.n()).done;){var l=c.value;if(l.codec.toUpperCase()!==r.RTCMediaCodec.H264){continue}if(!o){o=l.payload;n.LoggerFactory.info(this.module_,"record firstPayload, firstPayload: ".concat(o))}var f=this.getPacketizationMode(t.fmtp,l.payload);var d=this.getProfileLevelId(t.fmtp,l.payload);if(f===y){if(a===0){o=l.payload;a=1}if(d===b){i=l.payload;n.LoggerFactory.info(this.module_,"set retainPayload in transformVideoPayload, retainPayload: ".concat(i));break}}}}catch(e){u.e(e)}finally{u.f()}if(!i){i=o;n.LoggerFactory.info(this.module_,"no expected payload, use firstPayload as retainPayload, retainPayload: ".concat(i))}if(!i){n.LoggerFactory.error(this.module_,"transformVideoPayload failed,can not find expected payload.");return}this.deletePayload(t,i);this.modifyPayload(t,r.videopayloadTypes.h264PayLoad);this.addVideoFec(t);this.addFmtpAttr(t,r.videopayloadTypes.h264PayLoad,S,E);this.addFmtpAttr(t,r.videopayloadTypes.h264PayLoad,"sps-pps-idr-in-keyframe","1");this.addFmtpAttr(t,r.videopayloadTypes.rtxPayLoad,"apt","".concat(r.videopayloadTypes.h264PayLoad));this.addFmtpAttr(t,r.videopayloadTypes.rtxPayLoad,"sps-pps-idr-in-keyframe","1")}},{key:"transformAudioPayload",value:function e(t){if(!t.rtp){n.LoggerFactory.warn(this.module_,"transformAudioPayload failed, rtp is null");return}var i;var o=s(t.rtp),a;try{for(o.s();!(a=o.n()).done;){var u=a.value;if(u.codec.toLowerCase()===r.RTCMediaCodec.OPUS){i=u.payload;break}}}catch(e){o.e(e)}finally{o.f()}I.debug("transformAudioPayload audioMedia.rtp",JSON.stringify(t.rtp),i);if(!i){n.LoggerFactory.error(this.module_,"transformAudioPayload failed,can not find expected payload.");return}this.deletePayload(t,i);I.debug("transformAudioPayload aft deletePayload",JSON.stringify(t.rtp));this.modifyPayload(t,r.audioPayloadTypes.opusPayload);this.addNack(t)}},{key:"deleteRetransmissionSsrc",value:function e(t){var r=this;if(!t.ssrcGroups||!t.ssrcs){return}var n=[];t.ssrcGroups.forEach((function(e){var t=e.ssrcs;var i=r.getRetransmissionSsrc(t);if(i!==null){n.push(i)}}));if(n.length===0){return}t.ssrcGroups=undefined;t.ssrcs=t.ssrcs.filter((function(e){var t=e.id;return!n.includes(t.toString())}))}},{key:"modifySessionDescriptionMsid",value:function e(t,r){if(t.msidSemantic){t.msidSemantic.token=r}var n=this.getMedias(t,i.MediaType.TRACK_TYPE_VIDEO);var o=this.getMedias(t,i.MediaType.TRACK_TYPE_AUDIO);n.forEach((function(e){var t;if(e.msid){var n;e.msid="".concat(r," ").concat((n=e.msid)===null||n===void 0?void 0:n.split(" ")[1])}(t=e.ssrcs)===null||t===void 0||t.forEach((function(e){if(e.attribute==="msid"){var t;e.value="".concat(r," ").concat((t=e.value)===null||t===void 0?void 0:t.split(" ")[1])}}))}));o.forEach((function(e){var t;if(e.msid){var n;e.msid="".concat(r," ").concat((n=e.msid)===null||n===void 0?void 0:n.split(" ")[1])}(t=e.ssrcs)===null||t===void 0||t.forEach((function(e){if(e.attribute==="msid"){var t;e.value="".concat(r," ").concat((t=e.value)===null||t===void 0?void 0:t.split(" ")[1])}}))}))}},{key:"getPacketizationMode",value:function e(r,n){if(!r){return y}var i=s(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.payload!==n){continue}if(!a.config.includes(g)){return y}var u=(0,t.parseParams)(a.config);if(u[g]===null){return y}return parseInt(String(u[g]),10)}}catch(e){i.e(e)}finally{i.f()}return y}},{key:"getProfileLevelId",value:function e(r,n){if(!r){return""}var i=s(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.payload!==n){continue}if(!a.config.includes(_)){return""}var u=(0,t.parseParams)(a.config);if(!u[_]){return""}return String(u[_])}}catch(e){i.e(e)}finally{i.f()}return""}},{key:"deletePayload",value:function e(t,r){if(t.rtp){t.rtp=t.rtp.filter((function(e){var t=e.payload;return t===r}))}if(t.rtcpFb){t.rtcpFb=t.rtcpFb.filter((function(e){var t=e.payload;return t===r}))}if(t.fmtp){t.fmtp=t.fmtp.filter((function(e){var t=e.payload;return t===r}))}t.payloads=r.toString()}},{key:"modifyPayload",value:function e(t,r){if(t.rtp){t.rtp.forEach((function(e){e.payload=r}))}if(t.rtcpFb){t.rtcpFb.forEach((function(e){e.payload=r}))}if(t.fmtp){t.fmtp.forEach((function(e){e.payload=r}))}t.payloads=r.toString()}},{key:"addVideoFec",value:function e(t){if(!t.rtp){t.rtp=[]}t.rtp.push({payload:r.videopayloadTypes.rtxPayLoad,codec:"rtx",rate:9e4});t.rtp.push({payload:r.videopayloadTypes.redPayLoad,codec:"red",rate:9e4});t.rtp.push({payload:r.videopayloadTypes.ulpfecPayLoad,codec:"ulpfec",rate:9e4});t.payloads="".concat(r.videopayloadTypes.rtxPayLoad," ").concat(t.payloads," ").concat(r.videopayloadTypes.redPayLoad," ").concat(r.videopayloadTypes.ulpfecPayLoad)}},{key:"addFmtpAttr",value:function e(r,n,i,o){if(!r.fmtp||r.fmtp.length===0){r.fmtp=[];r.fmtp.push({payload:n,config:i+"="+o});return}var a=r.fmtp.find((function(e){return e.payload===n}));if(!a){r.fmtp.push({payload:n,config:i+"="+o})}else{var s=(0,t.parseParams)(a.config);if(s[i]){return}a.config=a.config+";"+i+"="+o}}},{key:"addNack",value:function e(t){var r=t.rtp[0].payload;if(!t.rtcpFb){t.rtcpFb=[]}t.rtcpFb.push({payload:r,type:"ccm",subtype:"fir"});t.rtcpFb.push({payload:r,type:"nack"});t.rtcpFb.push({payload:r,type:"nack",subtype:"pli"})}},{key:"modifyCandidate",value:function e(t,r){if(!t.candidates){var n=r===null||r===void 0?void 0:r.find((function(e){return"".concat(t.mid)==="".concat(e.sdpMid)}));if(n){var i=/.*generation\s(\d+).*/.exec(n.candidate)||[];var o=/.*network-id\s(\d+).*/.exec(n.candidate)||[];var a=/.*network-cost\s(\d+).*/.exec(n.candidate)||[];t.candidates=t.candidates||[];t.candidates.push({foundation:n.foundation,component:n.component==="rtp"?1:2,transport:n.protocol,priority:n.priority,ip:n.address,port:n.port,type:n.type,raddr:n.relatedAddress,rport:n.relatedPort,tcptype:n.tcpType,generation:i.length===2?parseInt(i[1]):undefined,"network-id":o.length===2?parseInt(o[1]):undefined,"network-cost":a.length===2?parseInt(a[1]):undefined})}}}},{key:"getRetransmissionSsrc",value:function e(t){if(!t){n.LoggerFactory.warn(this.module_,"getRetransmissionSsrc failed, ssrcs is null");return""}var r=t.split(" ");var i=2;if(r.length!==i){n.LoggerFactory.warn(this.module_,"getRetransmissionSsrc failed, ssrcs(".concat(t,") is invalid"));return""}return r[1]}}],[{key:"addSsrcAttr",value:function e(t,r,n){if(!t.ssrcs){t.ssrcs=[]}for(var i=0;i<n.length;i++){t.ssrcs.push({id:r,attribute:n[i][0],value:n[i][1]})}}}])}();m([(0,o.printfDecorator)(I)],R.prototype,"transformOfferSdp",null);m([(0,o.printfDecorator)(I)],R.prototype,"modifySdpCandidates",null);m([(0,o.printfDecorator)(I)],R.prototype,"parseSdp",null);m([(0,o.printfDecorator)(I)],R.prototype,"getMedias",null);m([(0,o.printfDecorator)(I)],R.prototype,"transformAudioPayload",null);m([(0,o.printfDecorator)(I)],R.prototype,"modifyCandidate",null)}))},8495:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7354),r(2216),r(7007),r(2363),r(8024)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=e.LoopArray=void 0;t=a(t);n=a(n);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){"@babel/helpers - typeof";return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){"use strict";p=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,a)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,u){var c=d(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function v(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){v(o,n,i,a,s,"next",e)}function s(e){v(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e){throw new TypeError('"'+e+'" is read-only')}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e){var t=E(e,"string");return"symbol"==s(t)?t:t+""}function E(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var w=e.LoopArray=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:50;g(this,e);this.elements=new Array;this._size=t}return _(e,[{key:"push",value:function e(t){var r;if(t===null){return false}if(this._size!==undefined&&!isNaN(this._size)){var n;if(((n=this.elements)===null||n===void 0?void 0:n.length)===this._size){this.elements.pop()}}(r=this.elements)===null||r===void 0||r.unshift(t);return true}},{key:"size",value:function e(){var t;var e=(t=this.elements)===null||t===void 0?void 0:t.length;return e||0}},{key:"clear",value:function e(){delete this.elements;this.elements=new Array}},{key:"getElement",value:function e(t){var r;if(t<0||t>=this.size()){return undefined}var n=(r=this.elements)===null||r===void 0?void 0:r[t];return n}}])}();var T="HWLLSInterval";var I=function(){function e(){var i=this;g(this,e);this.reportSymbol=Symbol("HWLLSInterval_".concat(t["default"].getCurrentLocalTimestamp()));this.sampleArray=new Map;this.connectionsManagers=[];this.event=new n["default"];this.preMediaStats=new Map;this.executeInterval((function(){i.execHandler()}),r.configs.STATISTIC_INTERVAL);this.isVideoBroken=false;this.videoBrokenTimestamp=0}return _(e,[{key:"on",value:function e(t,r){this.event.on(t,r)}},{key:"off",value:function e(t){if(!t){this.event.removeAllListeners()}else{this.event.removeAllListeners(t)}}},{key:"getSymbol",value:function e(){return this.reportSymbol}},{key:"reset",value:function e(t){if(t){this.sampleArray["delete"](t);this.preMediaStats["delete"](t);this.off("video_stuck_".concat(t));this.off("video_start_".concat(t));this.off("audio_start_".concat(t));for(var r=0;r<this.connectionsManagers.length;r++){if(this.connectionsManagers[r].getConnectionId()===t){this.connectionsManagers.splice(r,1);break}}}else{this.sampleArray.clear();this.preMediaStats.clear();this.off();this.connectionsManagers.length=0}}},{key:"connectionRegister",value:function e(t){this.connectionsManagers.push(t)}},{key:"getleastestStats",value:function e(t,r){if(!t){return null}if(!r){var n;return(n=this.sampleArray.get(t))===null||n===void 0?void 0:n.getElement(0)}var i=this.getElementStats(t,r,0);if(!i){i=this.getElementStats(t,r,1)}return i}},{key:"getHistoryDatas",value:function e(t){return this.sampleArray.get(t)}},{key:"getleastestStatsByPropertyName",value:function e(t,r,n){var i=this.getElementStats(t,r,0);if(!i){i=this.getElementStats(t,r,1)}return i?i[n]:null}},{key:"getElementStats",value:function e(t,r,n){var i;var o=(i=this.sampleArray.get(t))===null||i===void 0?void 0:i.getElement(n);if(!o){return null}return o.data.get(r)}},{key:"executeInterval",value:function e(t,r){var n=this;var i=function e(){n.gatherTimer=setTimeout(m(p().mark((function e(){return p().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:clearTimeout(n.gatherTimer);r.next=3;return t();case 3:i();case 4:case"end":return r.stop()}}),e)}))),r)};i()}},{key:"getStats",value:function(){var e=m(p().mark((function e(t,r){var n=this,i;var o,a,s;return p().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:o=t.getConnection();if(!(!o||typeof o.getStats!=="function")){u.next=3;break}return u.abrupt("return");case 3:u.next=5;return o.getStats();case 5:a=u.sent;s=t.getConnectionId();if(a){a.forEach((function(e,t){if(e.type!=="candidate-pair"||e.selected===true||e["nominated "]===true||e.state==="succeeded"){if(["candidate-pair","local-candidate","inbound-rtp","outbound-rtp","remote-inbound-rtp"].includes(e.type)){r.set(e.type!=="local-candidate"?"".concat(e.type).concat(e.mediaType?"_":"").concat(e.mediaType||"").concat(e.ssrc?"_":"").concat(e.ssrc||""):t,e);n.streamHandler(s,e,e.mediaType)}}}))}if(!this.sampleArray.has(s)){this.sampleArray.set(s,new w)}(i=this.sampleArray.get(s))===null||i===void 0||i.push({data:r,processed:0});case 10:case"end":return u.stop()}}),e,this)})));function t(t,r){return e.apply(this,arguments)}return t}()},{key:"streamHandler",value:function e(t,r,n){var i;if(this.preMediaStats.has(t)){i=this.preMediaStats.get(t)}if(n==="audio"&&i){if(!Object.prototype.hasOwnProperty.call(i,"preAudioPackets")&&r.packetsReceived>0){this.event.emit("audio_start_".concat(t));this.preMediaStats.set(t,{preAudioPackets:r.packetsReceived})}return}if(n==="video"&&i){this.judgeVideoStreamStuck(t,r,i)}}},{key:"judgeVideoStreamBroken",value:function e(r,n,i){var a=i>0&&i===n;if(a){if(!this.isVideoBroken){this.isVideoBroken=true;this.videoBrokenTimestamp=t["default"].getCurrentLocalTimestamp();o.LoggerFactory.info(T,"video stream broken, start timestamp : ".concat(this.videoBrokenTimestamp,", preReceiveFrames:").concat(i,", framesReceived:").concat(n))}else{var s=t["default"].getCurrentLocalTimestamp()-this.videoBrokenTimestamp;if(s>=5e3){this.videoBrokenTimestamp=t["default"].getCurrentLocalTimestamp();o.LoggerFactory.info(T,"video stream broken, start auto recovery , current timestamp : ".concat(this.videoBrokenTimestamp));this.event.emit("video_broken_".concat(r))}}}else if(!a&&this.isVideoBroken){this.isVideoBroken=false;this.videoBrokenTimestamp=0;o.LoggerFactory.info(T,"video stream recovery, timestamp : ".concat(t["default"].getCurrentLocalTimestamp()));this.event.emit("video_recover_".concat(r))}}},{key:"judgeVideoStreamStuck",value:function e(t,r,n){var o=r.framesDecoded||0;if(n&&Object.prototype.hasOwnProperty.call(n,"preReceiveFrames")){this.judgeVideoStreamBroken(t,o,n.preReceiveFrames);if(!n.frameStuckCheck&&n.frameFirstComing){n.preReceiveFrames=o;return}if(o===n.preReceiveFrames){n.noChangeCount++}else{if(n.preReceiveFrames===0||n.noChangeCount>1){n.noChangeCount=1;this.event.emit("video_stuck_".concat(t),false);n.preReceiveFrames===0&&this.event.emit("video_start_".concat(t));n.frameFirstComing=true}}n.preReceiveFrames=o;if(n.noChangeCount%n.stuckThreshold===0){this.event.emit("video_stuck_".concat(t),true)}}else{var a=d(d({},{frameStuckLoading:false,frameStuckThreshold:10}),i.parametersUtil.getParameter(i.parameterValidKeys.LOADING_CONFIG)||{});var s={noChangeCount:1,preReceiveFrames:o,stuckThreshold:a.frameStuckThreshold,frameStuckCheck:a.frameStuckLoading,frameFirstComing:false};if(o){s.frameFirstComing=true;this.event.emit("video_stuck_".concat(t),false);this.event.emit("video_start_".concat(t))}this.preMediaStats.set(t,Object.prototype.hasOwnProperty.call(n,"preAudioPackets")?d(d({},s),n):s)}}},{key:"execHandler",value:function(){var e=m(p().mark((function e(){var t,r,n,i;return p().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:t=u(this.connectionsManagers);o.prev=1;t.s();case 3:if((r=t.n()).done){o.next=10;break}n=r.value;i=new Map;o.next=8;return this.getStats(n,i);case 8:o.next=3;break;case 10:o.next=15;break;case 12:o.prev=12;o.t0=o["catch"](1);t.e(o.t0);case 15:o.prev=15;t.f();return o.finish(15);case 18:case"end":return o.stop()}}),e,this,[[1,12,15,18]])})));function t(){return e.apply(this,arguments)}return t}()}])}();var R=new I;var C=e["default"]=R}))},8707:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkIPV4=void 0;var r=e.checkIPV4=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING){return false}var n=r.split(".").filter((function(e){return!!e.trim()}));if(n.length!==4){return false}for(var i=0;i<n.length;i++){var o=parseInt(n[i]);if(isNaN(o)){return false}if(o<0||o>255){return false}}return true}}))},8736:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(1308),r(3388),r(3652)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.deviceChangeListener=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){return u(e)||s(e)||l(e)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return f(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=b(e,"string");return"symbol"==i(t)?t:t+""}function b(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=new n.Log({module:"DeviceChangeListener"});var S={videoinput:"CameraChanged",audioinput:"RecordingDeviceChanged",audiooutput:"PlaybackDeviceChanged"};var E={add:"ADD",remove:"REMOVE"};var w="DeviceChangeListener";var T=function(){function e(){v(this,e);this.deviceChangeCallBack=[];this.internalEventEmitters=[];this.initFlag=false}return y(e,[{key:"initDeviceChangedNotify",value:function(){var e=p(d().mark((function e(t,r){return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:this.addEventEmitter(t,r);if(!this.initFlag){n.next=3;break}return n.abrupt("return");case 3:this.initFlag=true;n.next=6;return this.registerDeviceChangedNotify();case 6:case"end":return n.stop()}}),e,this)})));function t(t,r){return e.apply(this,arguments)}return t}()},{key:"addEventEmitter",value:function e(t,r){if(r){this.internalEventEmitters.push(t)}else{this.clientEventEmitter=t}}},{key:"removeEventEmitter",value:function e(t){if(t===this.clientEventEmitter){delete this.clientEventEmitter;return}this.internalEventEmitters=this.internalEventEmitters.filter((function(e){return e!==t}))}},{key:"registerDeviceChangedNotify",value:function(){var e=p(d().mark((function e(){var r=this;var n,i,o,a,s;return d().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:u.prev=0;u.next=3;return(0,t.getRTCDevices)()["finally"]((function(){}));case 3:n=u.sent;if(!n||n.length<=0){_.info(w,"no device available now")}n=n||[];this.preDevices=new Map;i=c(n);try{for(i.s();!(o=i.n()).done;){a=o.value;if(a.deviceId&&a.deviceId!=="default"&&a.deviceId!=="communications"){this.preDevices.set(a.deviceId,a.kind)}}}catch(e){i.e(e)}finally{i.f()}u.next=14;break;case 11:u.prev=11;u.t0=u["catch"](0);_.error("registerDeviceChangedNotify",u.t0);case 14:s=false;navigator.mediaDevices.ondevicechange=function(){var e=p(d().mark((function e(t){var n;return d().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(t.isTrusted){i.next=3;break}_.error(w,"device change event trigger by script");return i.abrupt("return");case 3:r.deviceChangeCallBack.push(r.handleDeviceChangeEvent.bind(r));if(!s){i.next=6;break}return i.abrupt("return");case 6:if(!(r.deviceChangeCallBack.length>0)){i.next=13;break}s=true;i.next=10;return(n=r.deviceChangeCallBack.shift())===null||n===void 0?void 0:n();case 10:if(r.deviceChangeCallBack.length<1){s=false}i.next=6;break;case 13:case"end":return i.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();case 16:case"end":return u.stop()}}),e,this,[[0,11]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"handleDeviceChangeEvent",value:function(){var e=p(d().mark((function e(){var n=this;var i,a,s,u,l,f;return d().wrap((function e(d){while(1)switch(d.prev=d.next){case 0:d.next=2;return(0,t.getRTCDevices)();case 2:i=d.sent;i=i||[];a=new Map;s=c(i);try{for(s.s();!(u=s.n()).done;){l=u.value;if(l.deviceId&&l.deviceId!=="default"&&l.deviceId!=="communications"){a.set(l.deviceId,l.kind)}}}catch(e){s.e(e)}finally{s.f()}f=this.internalEventEmitters;if(this.clientEventEmitter){f=[].concat(o(this.internalEventEmitters),[this.clientEventEmitter])}this.preDevices.forEach((function(e,t){if(!a.has(t)){_.info(w,"deviceType: ".concat(e," deviceId: ").concat(t," remove"));f.forEach((function(n){n.emit(r.RTCClientEvent[S[e]],{deviceId:t,state:E.remove})}))}}));a.forEach((function(e,t){if(!n.preDevices.has(t)){_.info(w,"deviceType: ".concat(e," deviceId: ").concat(t," add"));f.forEach((function(n){n.emit(r.RTCClientEvent[S[e]],{deviceId:t,state:E.add})}))}}));this.preDevices=a;case 12:case"end":return d.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}()}])}();var I=e.deviceChangeListener=new T}))},8880:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(7363),r(8024),r(7423),r(8487),r(5268),r(3652),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UnifiedPlanSDPEditor=void 0;function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function e(){};return{s:i,n:function t(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function e(t){throw t},f: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 o,a=!0,s=!1;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();return a=t.done,t},e:function e(t){s=!0,o=t},f:function e(){try{a||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==w(t)?t:t+""}function v(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=_(t),y(e,b()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function t(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function w(e){"@babel/helpers - typeof";return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var T=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":w(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var I=new a.Log({module:"UnifiedPlanSDPEditor"});var R=e.UnifiedPlanSDPEditor=function(e){function a(){f(this,a);return m(this,a,arguments)}S(a,e);return h(a,[{key:"modifyPublishOfferSdp",value:function e(r,i,s,u){var c=this;I.debug(this.module_,"modifyPublishOfferSdp start, sdp: ".concat(this.printSdpInfo(r)));var l=this.parseSdp(r);var f=this.parseSdp(i);if(!l){I.error(this.module_,"modifyPublishOfferSdp failed, the sdp is invalid: ".concat(r));return undefined}var d=l.media.filter((function(e){var t=e.type,r=e.direction;return t===o.MediaType.TRACK_TYPE_VIDEO&&r!==n.MediaDirection.SEND_ONLY&&r!==n.MediaDirection.SEND_RECV}));d.forEach((function(e){c.transformVideoPayload(e);c.deleteRetransmissionSsrc(e);e.ssrcs=undefined}));var h=this.getAvailableSenderMedia(l,o.MediaType.TRACK_TYPE_AUDIO);if(h.length>0){var p=h[0];this.transformAudioPayload(p);this.deleteRetransmissionSsrc(p);if(u){var v;var m=f===null||f===void 0||(v=f.media)===null||v===void 0?void 0:v.find((function(e){return"".concat(e.mid)==="".concat(p.mid)}));this.modifyUnifiedMediaSsrc(p,u,s);a.modifyDirectionWhenPublish(p,m,true)}}var y=(0,t.write)(l);var g=(0,t.write)(f);I.debug(this.module_,"modifyPublishOfferSdp success, offerSdp: ".concat(this.printSdpInfo(y),", answerSdp: ").concat(this.printSdpInfo(g)));return{offerSdp:y,answerSdp:g}}},{key:"modifyUnifiedMediaSsrc",value:function e(t,r,n){var o=this;if(!t.ssrcs||t.ssrcs.length===0){var a=[[this.ssrcAttrCname_,n]];i.SDPEditor.addSsrcAttr(t,r,a)}else{t.ssrcs.forEach((function(e){if(e.attribute===o.ssrcAttrCname_){e.value=n}e.id=r}))}}},{key:"modifyAnswerDirection",value:function e(r,i){var o;var a=this.parseSdp(r);if(!a){I.error(this.module_,"modifyAnswerDirection failed,the sdp is invalid");return""}var s=(o=a.media)===null||o===void 0?void 0:o.find((function(e){return"".concat(e.mid)==="".concat(i)}));if(s){if(s.direction===n.MediaDirection.INACTIVE){s.direction=n.MediaDirection.RECV_ONLY}else if(s.direction===n.MediaDirection.SEND_ONLY){s.direction=n.MediaDirection.SEND_RECV}}return(0,t.write)(a)}},{key:"getAvailableSenderMedia",value:function e(t,r){return t.media.filter((function(e){var t=e.type,i=e.direction;return t===r&&(i===n.MediaDirection.SEND_ONLY||i===n.MediaDirection.SEND_RECV)}))}},{key:"getAllMidsByType",value:function e(t,r){var n;var i=this.parseSdp(t);var o=[];if(!i){I.error(this.module_,"getAllMidsByType failed,the sdp is invalid : ".concat(t));return o}(n=i.media)===null||n===void 0||n.forEach((function(e){if(e.type===r){o.push("".concat(e.mid))}}));return o}},{key:"getOfferVideoMidBySsrc",value:function e(t,r,n){var i;var o=this.parseSdp(t);var a="";if(!o){I.error(this.module_,"getOfferVideoMidBySsrc failed,the sdp is invalid : ".concat(t));return a}(i=o.media)===null||i===void 0||i.forEach((function(e){if(e.type===r&&e.ssrcs&&e.ssrcs.length>0&&"".concat(e.ssrcs[0].id)==="".concat(n)){a="".concat(e.mid)}}));return a}},{key:"getBrowserDefaultSsrc",value:function e(t){var r=this.parseSdp(t);if(!r){return undefined}var n=this.getMedias(r,o.MediaType.TRACK_TYPE_AUDIO);var i=0;if(n&&n.length>0){var a=u(n),s;try{for(a.s();!(s=a.n()).done;){var c=s.value;if(c.ssrcs&&c.ssrcs.length>0){i=parseInt(c.ssrcs[0].id.toString());break}}}catch(e){a.e(e)}finally{a.f()}}return{audioSsrc:i}}},{key:"transformAnswerSdp",value:function e(n,i){r.LoggerFactory.debug(this.module_,"transformAnswerSdp, answerSdp: ".concat(this.printSdpInfo(n)));var s=this.parseSdp(n);var u=this.parseSdp(i);if(!s||!u){r.LoggerFactory.error(this.module_,"transformAnswerSdp failed,the sdp is invalid");return""}var c=this.getMedias(s,o.MediaType.TRACK_TYPE_VIDEO);var l=this.getMedias(u,o.MediaType.TRACK_TYPE_VIDEO);if(l.length!==c.length){var f=c.map((function(e){return"".concat(e.mid)}));l.forEach((function(e){if(!f.includes("".concat(e.mid))){var t=JSON.parse(JSON.stringify(c[0]));t.mid=e.mid;s.media.push(t);a.modifyBundle(s,e.mid||"")}}))}var d=(0,t.write)(s);r.LoggerFactory.debug(this.module_,"transformAnswerSdp success,answerSdp: ".concat(this.printSdpInfo(d)));return d}},{key:"generateMatchedAnswerWithOffer",value:function e(i,o,s){r.LoggerFactory.debug(this.module_,"generateCorrespondingRemoteSdpMedia start, sdp: ".concat(this.printSdpInfo(i)));var u=this.parseSdp(i);if(!u){return i}a.modifyBundle(u,o);var c=this.getMedias(u,s);if(!c||c.length===0){return i}var l=JSON.parse(JSON.stringify(c[0]));l.mid=o;delete l.ssrcs;delete l.candidates;l.direction=n.MediaDirection.INACTIVE;u.media.push(l);var f=(0,t.write)(u);r.LoggerFactory.debug(this.module_,"generateCorrespondingRemoteSdpMedia success, sdp: ".concat(this.printSdpInfo(f)));return f}},{key:"getLeastMid",value:function e(t){var n=this.parseSdp(t);if(!n){r.LoggerFactory.error(this.module_,"getLeastMid failed, the sdp is invalid : ".concat(t));return undefined}var i;var o=u(n.groups||[]),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.type==="BUNDLE"){var c=(s.mids||"").split(" ");i=c[c.length-1];break}}}catch(e){o.e(e)}finally{o.f()}return i}}],[{key:"modifyBundle",value:function e(t,r){var n=u(t.groups||[]),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.type==="BUNDLE"){o.mids="".concat(o.mids," ").concat(r);break}}}catch(e){n.e(e)}finally{n.f()}}},{key:"modifyDirectionWhenPublish",value:function e(t,r,i){if(i){if(t.direction===n.MediaDirection.RECV_ONLY){t.direction=n.MediaDirection.SEND_RECV}else if(t.direction===n.MediaDirection.INACTIVE){t.direction=n.MediaDirection.SEND_ONLY}}else{if(t.direction===n.MediaDirection.SEND_ONLY){t.direction=n.MediaDirection.INACTIVE}else if(t.direction===n.MediaDirection.SEND_RECV){t.direction=n.MediaDirection.RECV_ONLY}}if(i){if(r.direction===n.MediaDirection.SEND_ONLY){r.direction=n.MediaDirection.SEND_RECV}else if(r.direction===n.MediaDirection.INACTIVE){r.direction=n.MediaDirection.RECV_ONLY}}else{if(r.direction===n.MediaDirection.SEND_RECV){r.direction=n.MediaDirection.SEND_ONLY}else if(r.direction===n.MediaDirection.RECV_ONLY){r.direction=n.MediaDirection.INACTIVE}}}}])}(i.SDPEditor);T([(0,s.printfDecorator)(I)],R.prototype,"transformAnswerSdp",null);T([(0,s.printfDecorator)(I)],R,"modifyBundle",null)}))},9034:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9974),r(5442),r(8094),r(9611),r(8024),r(2441),r(5268),r(4772),r(3652),r(4341)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RemoteStream=void 0;function f(){"use strict";f=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};c(S,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(L([])));w&&w!==r&&n.call(w,a)&&(S=w);var T=_.prototype=g.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==R(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(R(t)+" is not iterable")}return b.prototype=_,i(T,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},I(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(T),c(T,u,"Generator"),c(T,a,(function(){return this})),c(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==R(t)?t:t+""}function g(e,t){if("object"!=R(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=w(t),_(e,E()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function t(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){"@babel/helpers - typeof";return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var C=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":R(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var k=new c.Log({module:"RemoteStream"});var A="RemoteStream";var O=e.RemoteStream=function(e){function n(e,t){var r;p(this,n);r=b(this,n,[A,e,t]);r.traceHandler=r.playerStatusTrace.bind(r);return r}T(n,e);return m(n,[{key:"play",value:function(){var e=h(f().mark((function e(r){var n,a;return f().wrap((function e(s){while(1)switch(s.prev=s.next){case 0:if(!r.objectFit){s.next=6;break}if(!(r.objectFit&&!/^cover|contain|fill$/.test(r.objectFit))){s.next=4;break}o.LoggerFactory.error(A,"invalid play options.objectFit: ".concat(r.objectFit));throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"invalid play options.objectFit: ".concat(r.objectFit));case 4:s.next=7;break;case 6:r.objectFit=i.PlayerViewMode.CONTAIN;case 7:r.muted=!!r.muted;o.LoggerFactory.info(A,"stream start to play with elementId: ".concat(r.elementId,", options.objectFit: ").concat(r.objectFit,", options.muted: ").concat(r.muted));if(r.elementId){s.next=12;break}o.LoggerFactory.error(A,"elementId:".concat(r.elementId," not a invalid HTMLElement Id"));throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"elementId:".concat(r.elementId," not a invalid HTMLElement Id"));case 12:n=document.getElementById(r.elementId);if(n){s.next=16;break}o.LoggerFactory.error(A,"document.getElementById by elementId:".concat(r.elementId," failed"));throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"document.getElementById by elementId:".concat(r.elementId," failed"));case 16:a=n.querySelector("#player_container");if(!a){if(!this.playDivContainer){a=document.createElement("div");a.setAttribute("id","player_container");a.style.width="100%";a.style.height="100%";a.style.position="relative";a.style.overflow="hidden";a.style["background-color"]="#000";this.playDivContainer=a}n.appendChild(this.playDivContainer);o.LoggerFactory.info(A,"new player div")}else{o.LoggerFactory.info(A,"exist player div")}s.next=20;return this.playTracks(a,r);case 20:case"end":return s.stop()}}),e,this)})));function r(t){return e.apply(this,arguments)}return r}()},{key:"resume",value:function(){var e=h(f().mark((function e(){return f().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:o.LoggerFactory.info(A,"resume begin");t.next=3;return Promise.all([this.resumeAudio(),this.resumeVideo()]);case 3:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pause",value:function e(){o.LoggerFactory.info(A,"pause begin");this.pauseAudio();this.pauseVideo()}},{key:"stop",value:function e(){var t,r;o.LoggerFactory.info(A,"stop stream begin");(t=this.audioTrack)===null||t===void 0||t.stop();(r=this.videoTrack)===null||r===void 0||r.stop();o.LoggerFactory.info(A,"stop stream end")}},{key:"muteAudio",value:function e(){try{if(this.audioTrack){this.audioTrack.muteTrack();return true}return false}catch(e){o.LoggerFactory.error(A,"muteAudio failed: ".concat(e));return false}}},{key:"muteVideo",value:function e(){try{if(this.videoTrack){this.videoTrack.muteTrack();return true}return false}catch(e){o.LoggerFactory.error(A,"muteVideo failed: ".concat(e));return false}}},{key:"unmuteAudio",value:function e(){try{if(this.audioTrack){this.audioTrack.unmuteTrack();return true}return false}catch(e){o.LoggerFactory.error(A,"unmuteAudio failed: ".concat(e));return false}}},{key:"unmuteVideo",value:function e(){try{if(this.videoTrack){this.videoTrack.unmuteTrack();return true}return false}catch(e){o.LoggerFactory.error(A,"unmuteVideo failed: ".concat(e));return false}}},{key:"setAudioVolume",value:function e(t){if(this.audioTrack){this.audioTrack.setAudioVolume(t)}}},{key:"getAudioLevel",value:function e(){if(this.audioTrack){return this.audioTrack.getAudioLevel()}return 0}},{key:"getAudioHRTCTrack",value:function e(){return this.audioTrack}},{key:"getVideoHRTCTrack",value:function e(){return this.videoTrack}},{key:"hasAudio",value:function e(){return!!this.getAudioHRTCTrack()}},{key:"hasVideo",value:function e(){return!!this.getVideoHRTCTrack()}},{key:"addRemoteTrack",value:function e(t){if(t.kind===s.MediaType.TRACK_TYPE_AUDIO){if(this.audioTrack){this.audioTrack.replaceTrack(t)}else{this.audioTrack=new r.HLLSTrack({trackType:s.MediaType.TRACK_TYPE_AUDIO,track:t,event:this.eventEmitter})}}else{if(this.videoTrack){this.videoTrack.replaceTrack(t)}else{this.videoTrack=new r.HLLSTrack({trackType:s.MediaType.TRACK_TYPE_VIDEO,track:t,event:this.eventEmitter})}}o.LoggerFactory.info(A,"addRemoteTrack for ".concat(t.kind," success"))}},{key:"destory",value:function e(){var t;this.off(l.RTCStreamEvent.PLAYER_STATE_TRACE,this.traceHandler,true);this.stop();(t=this.playDivContainer)===null||t===void 0||t.remove();delete this.playDivContainer}},{key:"resumeAudio",value:function e(){var t;return(t=this.audioTrack)===null||t===void 0?void 0:t.resume()}},{key:"resumeVideo",value:function e(){var t;return(t=this.videoTrack)===null||t===void 0?void 0:t.resume()}},{key:"pauseAudio",value:function e(){var t;(t=this.audioTrack)===null||t===void 0||t.pause()}},{key:"pauseVideo",value:function e(){var t;(t=this.videoTrack)===null||t===void 0||t.pause()}},{key:"exitFullScreen",value:function e(){var t;(t=this.videoTrack)===null||t===void 0||t.exitFullScreen()}},{key:"enterFullScreen",value:function e(){var t;(t=this.videoTrack)===null||t===void 0||t.enterFullScreen()}},{key:"setAudioOutput",value:function(){var e=h(f().mark((function e(t){var r;return f().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return(r=this.audioTrack)===null||r===void 0?void 0:r.setAudioOutput(t);case 2:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"playerStatusTrace",value:function e(t){o.LoggerFactory.debug(A,"playerStatusTrace, ".concat(JSON.stringify(t)))}},{key:"playTracks",value:function(){var e=h(f().mark((function e(r,n){var i,a;var s;return f().wrap((function e(u){while(1)switch(u.prev=u.next){case 0:s=[];if(n.video&&(i=this.videoTrack)!==null&&i!==void 0&&i.getTrack()){s.push(this.videoTrack.play(r,n.elementId,{objectFit:n.objectFit,autoPlay:n.autoPlay!==false}))}if(n.audio&&(a=this.audioTrack)!==null&&a!==void 0&&a.getTrack()){s.push(this.audioTrack.play(r,n.elementId,{muted:n.muted,autoPlay:n.autoPlay!==false?true:false}))}if(!(s.length===0)){u.next=6;break}o.LoggerFactory.warn(A,"no available track for play");throw new t.HwLLSError(t.ErrorCode.HWLLS_ERROR_INVALID_PARAMETER,"no available track to play.");case 6:this.off(l.RTCStreamEvent.PLAYER_STATE_TRACE,this.traceHandler,true);this.on(l.RTCStreamEvent.PLAYER_STATE_TRACE,this.traceHandler,true);u.next=10;return Promise.all(s).then((function(e){var t=e.filter((function(e){return e.error!==null}));if(t.length>0){throw t[0].error}}));case 10:case"end":return u.stop()}}),e,this)})));function r(t,r){return e.apply(this,arguments)}return r}()}])}(a.EmitterAble);C([(0,n.asyncApi)("Stream$play#Promise<void>#PlayOptions")],O.prototype,"play",null);C([(0,n.asyncApi)("Stream$resume#Promise<void>#void")],O.prototype,"resume",null);C([(0,n.api)("Stream$pause#void#void")],O.prototype,"pause",null);C([(0,n.api)("Stream$stop#void#void")],O.prototype,"stop",null);C([(0,n.api)("Stream$muteAudio#boolean")],O.prototype,"muteAudio",null);C([(0,n.api)("Stream$muteVideo#boolean")],O.prototype,"muteVideo",null);C([(0,n.api)("Stream$unmuteAudio#boolean")],O.prototype,"unmuteAudio",null);C([(0,n.api)("Stream$unmuteVideo#boolean")],O.prototype,"unmuteVideo",null);C([(0,n.api)("Stream$setAudioVolume#void#number")],O.prototype,"setAudioVolume",null);C([(0,u.printfDecorator)(k)],O.prototype,"addRemoteTrack",null)}))},9220:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RequestTasksQueue=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e){return c(e)||u(e)||s(e)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return l(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var r=m(e,"string");return"symbol"==t(r)?r:r+""}function m(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var y=e.RequestTasksQueue=d((function e(t){var n=this;var a=t.taskFunc,s=t.logger,u=t.timeout,c=u===void 0?5e4:u;h(this,e);p(this,"_queueData",void 0);p(this,"_taskFunc",void 0);p(this,"logger",void 0);p(this,"_timeout",void 0);p(this,"_isRunning",void 0);p(this,"dealTask",(function(e){var t,r;var i=e.args,o=e.timeout;var a="dealTask";var s=Date.now();(t=n.logger)===null||t===void 0||(r=t.debug)===null||r===void 0||r.call(t,a,"start");return new Promise((function(e){o=o||n._timeout;var t=setTimeout((function(){var t,r;(t=(r=n.logger).info)===null||t===void 0||t.call(r,a,"timeout",Date.now()-s);e({reason:"timeout,"+o});n._isRunning=false}),o);n._queueData.push([i,function(r){var i,o;(i=n.logger)===null||i===void 0||(o=i.debug)===null||o===void 0||o.call(i,a,"over,use time",Date.now()-s);clearTimeout(t);e(r)}]);if(!n._isTaskRunning()){n._dealTask()}}))}));p(this,"_dealTask",(function(){if(n._getNoDealDataSize()>0){var e=n._getWillDealData();n._isRunning=true;n._dealTaskFunc.apply(n,o(e[0])).then((function(t){e[1](t);n._dealTask()}))["catch"]((function(t){var r,i;(r=n.logger)===null||r===void 0||(i=r.error)===null||i===void 0||i.call(r,"_dealTask error",t);e[1]({reason:"catch error",error:t});n._dealTask()}))}else{n._isRunning=false}}));p(this,"_dealTaskFunc",i(r().mark((function e(){var t=arguments;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",n._taskFunc.apply(n,t));case 1:case"end":return r.stop()}}),e)}))));p(this,"_getNoDealDataSize",(function(){return n._queueData.length}));p(this,"_isTaskRunning",(function(){return n._isRunning}));p(this,"_getWillDealData",(function(){return n._queueData.shift()}));this.logger=s||{info:function e(){}};this._queueData=[];this._taskFunc=a;this._isRunning=false;this._timeout=c}))}))},9222:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSipNumberReg=e.getNumberReg=e.getMobilePhoneReg=e.getEmailReg=e.getChineseWordReg=e.getChinesePunctuationReg=e.escapeRegExp=void 0;var t=e.escapeRegExp=function e(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")};var r=e.getNumberReg=function e(){return/^([+*#]\d+|\d{4,})$/};var n=e.getMobilePhoneReg=function e(){return/^(1|\+861|0\d{2,3}1)[3456789]\d{9}$/};var i=e.getEmailReg=function e(){return/^[a-z\dA-Z]+[-a-z\dA-Z._]+@([a-z\dA-Z]+(-[a-z\dA-Z]+)?\.)+[a-z]+$/};var o=e.getSipNumberReg=function e(){return/^\+99111\d+/};var a=e.getChineseWordReg=function e(){return/[\u4E00-\u9FFF]/};var s=e.getChinesePunctuationReg=function e(){return/[\u4E00-\u9FFF]/}}))},9403:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PromiseUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){"use strict";n=function e(){return t};var e,t={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(r,o){function a(){return new t((function(e,t){n(r,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,u,"next",e)}function u(e){i(a,n,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=e.PromiseUtil=function(){function e(){a(this,e)}return u(e,null,[{key:"makeSure",value:function e(r){var i=r.delay||1e3;var a=r.retryCount||50;var s=r.fn;var u=r.condition;var c=1;var l=false;if((0,t.formatType)(i)!==t.formatType.NUMBER||(0,t.formatType)(a)!==t.formatType.NUMBER||!((0,t.formatType)(s)===t.formatType.FUNCTION||(0,t.formatType)(s)===t.formatType.ASYNCFUNCTION)||!((0,t.formatType)(u)===t.formatType.FUNCTION||(0,t.formatType)(u)===t.formatType.ASYNCFUNCTION)){throw new Error("params error")}var f=function(){var e=o(n().mark((function e(){var r,o,d,h,p=arguments;return n().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:if(!l){n.next=2;break}return n.abrupt("return",{result:false,message:"isStop true"});case 2:for(r=p.length,o=new Array(r),d=0;d<r;d++){o[d]=p[d]}n.next=5;return s.apply(void 0,o.concat([c]));case 5:h=n.sent;n.next=8;return u.apply(void 0,o.concat([h]));case 8:if(!n.sent){n.next=10;break}return n.abrupt("return",{result:true});case 10:c++;if(!(c>a)){n.next=13;break}return n.abrupt("return",{result:false,message:"retryCount max"});case 13:n.next=15;return(0,t.sleep)(i);case 15:return n.abrupt("return",f.apply(void 0,o));case 16:case"end":return n.stop()}}),e)})));return function t(){return e.apply(this,arguments)}}();var d=function e(){l=true};return{dealMakeSureFunc:f,stopMakeSureFunc:d}}}])}()}))},9524:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(9969),r(258),r(7360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ScriptProcessorRecord=void 0;var i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=e.ScriptProcessorRecord=(i=(0,t.printfDecorator)((0,r.getPLogger)()),o=(0,t.printfDecorator)((0,r.getPLogger)()),s=(u=function(){function e(t){var r=this;d(this,e);v(this,"audioContext",void 0);v(this,"param",void 0);v(this,"stream",void 0);v(this,"input",void 0);v(this,"recorder",void 0);v(this,"total",0);v(this,"startProm",void 0);v(this,"autoCollectAudio",void 0);v(this,"getOnaudioprocess",(function(e){return function(t){var n=new Float32Array(t.inputBuffer.getChannelData(0));var i=new Int16Array(n.length);var o=0;for(var a=0;a<n.length;++a){var s=n[a];if(s>=1)s=1;else if(s<=-1)s=-1;n[a]=s;i[a]=s*32767;o+=Math.abs(i[a])}r.total+=i.byteLength;r.param.audioCallback({pcm:i,sum:o,total:r.total,recordId:e})}}));this.param=t}return p(e,[{key:"startRecord",value:function(){var e=f(c().mark((function e(t){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!this.startProm){this.startProm=this.dealStartRecord(t)}this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=f(c().mark((function e(){var t,i,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(t=this.input)===null||t===void 0||t.disconnect();delete this.input;(i=this.recorder)===null||i===void 0||i.disconnect();delete this.recorder;this.total=0;a.next=8;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 8:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=15;break;case 12:a.prev=12;a.t0=a["catch"](0);(0,r.getPLogger)().error("stopRecord",a.t0);case 15:case"end":return a.stop()}}),e,this,[[0,12]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}},{key:"dealStartRecord",value:function(){var t=f(c().mark((function t(n){var i,o,a;return c().wrap((function t(s){while(1)switch(s.prev=s.next){case 0:s.prev=0;s.next=3;return this.stopRecord();case 3:this.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(n!==null&&n!==void 0&&n.stream)){s.next=8;break}this.stream=n.stream;s.next=12;break;case 8:i=n!==null&&n!==void 0&&n.deviceId?{deviceId:{exact:n.deviceId}}:true;s.next=11;return navigator.mediaDevices.getUserMedia({audio:i});case 11:this.stream=s.sent;case 12:if(this.audioContext.createScriptProcessor){(o=this.recorder)===null||o===void 0||o.disconnect();if(this.recorder){this.recorder.onaudioprocess=null}this.recorder=this.audioContext.createScriptProcessor(this.param.bufferSize,1,1);this.recorder.onaudioprocess=this.getOnaudioprocess(Date.now());(a=this.input)===null||a===void 0||a.disconnect();this.input=this.audioContext.createMediaStreamSource(this.stream);this.input.connect(this.recorder).connect(this.audioContext.destination)}s.next=18;break;case 15:s.prev=15;s.t0=s["catch"](0);(0,r.getPLogger)().error("dealStartRecord",s.t0);case 18:delete this.startProm;case 19:case"end":return s.stop()}}),t,this,[[0,15]])})));function n(e){return t.apply(this,arguments)}return n}()}])}(),v(u,"sampleRate",16e3),u),g(s.prototype,"startRecord",[i],Object.getOwnPropertyDescriptor(s.prototype,"startRecord"),s.prototype),g(s.prototype,"stopRecord",[o],Object.getOwnPropertyDescriptor(s.prototype,"stopRecord"),s.prototype),s)}))},9611:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StatEvents=e.QosEvents=e.PosterMode=e.PlayerViewMode=e.HWLLSEvents=e.DowngradeEvent=e.ApiEvents=void 0;var t;(function(e){e["CROP"]="crop";e["FILL"]="fill"})(t||(e.PosterMode=t={}));var r;(function(e){e[e["EVENT_START_PULL_STREAM_REQ"]=201]="EVENT_START_PULL_STREAM_REQ";e[e["EVENT_STOP_PULL_STREAM_REQ"]=202]="EVENT_STOP_PULL_STREAM_REQ";e[e["EVENT_PULL_MEDIA_STREAM"]=203]="EVENT_PULL_MEDIA_STREAM";e[e["EVENT_CONNECTION_CHANNEL_STATUS"]=204]="EVENT_CONNECTION_CHANNEL_STATUS"})(r||(e.StatEvents=r={}));var n;(function(e){e[e["EVENT_VIDEO_QOS"]=1100]="EVENT_VIDEO_QOS";e[e["EVENT_AUDIO_QOS"]=1101]="EVENT_AUDIO_QOS"})(n||(e.QosEvents=n={}));var i;(function(e){e[e["API_CALL"]=501]="API_CALL";e[e["CALLBACK_API"]=502]="CALLBACK_API"})(i||(e.ApiEvents=i={}));var o=e.HWLLSEvents={MEDIA_STATISTIC:"rtc-stats",NET_QUALITY:"network-quality",VIDEO_INTERRUPTED:"video-broken",AUDIO_INTERRUPTED:"audio-broken",VIDEO_RECOVERY:"video-recovery",AUDIO_RECOVERY:"audio-recovery",AUDIO_START:"audio-start",VIDEO_START:"video-start",VIDEO_STUCK:"video_stuck",FULLSCREEN_STATUS_CHANGED:"fullscreen-status-changed",PLAYER_CHANGE:"player-changed",MEDIA_CONNECTION_STATE_CHANGED:"media-connection-state-changed",ERROR:"Error",STREAM_ADDED:"stream-added",STREAM_REMOVED:"stream-removed",PEER_JOIN:"peer-join",PEER_LEAVE:"peer-leave"};var a;(function(e){e["CONTAIN"]="contain";e["FILL"]="fill";e["COVER"]="cover"})(a||(e.PlayerViewMode=a={}));var s=e.DowngradeEvent="downgrade"}))},9969:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(2771)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.printfDecorator=e.frequentTasksDecoratorFactory=e.customDecorator=e.componentDecorator=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return u(e)||s(e)||a(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return c(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==n(t)?t:t+""}function p(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v=e.printfDecorator=function e(t){return function(e,r,n){var i;function o(){var e;for(var n=arguments.length,o=new Array(n),a=0;a<n;a++){o[a]=arguments[a]}var s=Date.now();var u=i.apply(this,o);if(u!==null&&u!==void 0&&u.then){return u.then((function(e){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call.apply(n,[t,"printfDecorator async over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[e]));return e}))}t===null||t===void 0||(e=t.debug)===null||e===void 0||e.call.apply(e,[t,"printfDecorator over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[u]));return u}if(n!==null&&n!==void 0&&n.initializer){return f(f({},n),{},{writable:true,initializer:function e(){var t;i=(t=n.initializer)===null||t===void 0?void 0:t.call(this);return o}})}i=n===null||n===void 0?void 0:n.value;return f(f({},n),{},{writable:true,value:o})}};var m=e.componentDecorator=function e(t){return function(e){var r=e.prototype.render;if(r){e.prototype.render=function(){try{return r.call(this)}catch(r){var n;t===null||t===void 0||(n=t.error)===null||n===void 0||n.call(t,"".concat(e.name," render error"),r);return null}}}if(false){var n,i,o}}};var y=function e(t){var r=t.currResult,n=t.aftMethodDeal,i=t.name;if(typeof n!=="function"){return r}var o=n(r);if(o!==null&&o!==void 0&&o.then){return o.then((function(e){if(e){return r}return Promise.reject(new Error("".concat(i,", aftMethodDeal check failed")))}))}if(o){return r}throw new Error("".concat(i,", aftMethodDeal check failed"))};var g=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal,o=t.fn,a=t.self,s=t.args,u=t.name;var c=function e(){var t=o.apply(a,s);if(t!==null&&t!==void 0&&t.then){return t.then((function(e){return y({currResult:e,aftMethodDeal:n,name:u})}))}return y({currResult:t,aftMethodDeal:n,name:u})};if(typeof r!=="function"){return c()}var l=r.apply(void 0,i(s));if(l!==null&&l!==void 0&&l.then){return l.then((function(e){if(e){return c()}return Promise.reject(new Error("".concat(u,", preMethodDeal check reject error,")+e))}))}if(l){return c()}throw new Error("".concat(u,", preMethodDeal check throw error,")+l)};var b=e.customDecorator=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal;return function(e,t,i){var o;function a(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++){i[a]=arguments[a]}return g({preMethodDeal:r,aftMethodDeal:n,fn:o,self:this,args:i,name:t})}if(i!==null&&i!==void 0&&i.initializer){return f(f({},i),{},{writable:true,initializer:function e(){var t;o=(t=i.initializer)===null||t===void 0?void 0:t.call(this);return a}})}o=i===null||i===void 0?void 0:i.value;return f(f({},i),{},{writable:true,value:a})}};var _=e.frequentTasksDecoratorFactory=function e(t){var r=new Map;return function(e){return function(n,i,o){var a,s;var u;function c(){if(r.get(e)){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call(t,"frequentTasksDecorator waitting last call:",e);return r.get(e)}for(var i=arguments.length,o=new Array(i),a=0;a<i;a++){o[a]=arguments[a]}var s=u.apply(this,o);if(s!==null&&s!==void 0&&s.then){r.set(e,s);return s.then((function(t){r["delete"](e);return t}))}r["delete"](e);return s}t===null||t===void 0||(a=t.debug)===null||a===void 0||a.call(t,"frequentTasksDecorator","".concat(n===null||n===void 0||(s=n.constructor)===null||s===void 0?void 0:s.name,".prototype.").concat(i),o);if(o!==null&&o!==void 0&&o.initializer){return f(f({},o),{},{writable:true,initializer:function e(){var t;u=(t=o.initializer)===null||t===void 0?void 0:t.call(this);return c}})}u=o===null||o===void 0?void 0:o.value;return f(f({},o),{},{writable:true,value:c})}}}}))},9974:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HwLLSError=e.ErrorMsg=e.ErrorCode=void 0;var t;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t=v(t),s(e,d()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}function s(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function e(r){if(null===r||!h(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return f(r,arguments,v(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,r)},l(e)}function f(e,t,r){if(d())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&p(i,r.prototype),i}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function t(){return!!e})()}function h(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==r(t)?t:t+""}function g(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var b;(function(e){e[e["HWLLS_OK"]=0]="HWLLS_OK";e[e["RTC_ERR_CODE_SUCCESS"]=0]="RTC_ERR_CODE_SUCCESS";e[e["HWLLS_ERROR_INVALID_URL"]=5e7]="HWLLS_ERROR_INVALID_URL";e[e["HWLLS_ERROR_INVALID_PARAMETER"]=50000001]="HWLLS_ERROR_INVALID_PARAMETER";e[e["HWLLS_ERROR_SERVER_CONNECT_FAIL"]=50000002]="HWLLS_ERROR_SERVER_CONNECT_FAIL";e[e["HWLLS_ERROR_SERVER_NO_RESPONSE"]=50000003]="HWLLS_ERROR_SERVER_NO_RESPONSE";e[e["HWLLS_ERROR_AUTH_FAIL"]=50000004]="HWLLS_ERROR_AUTH_FAIL";e[e["HWLLS_ERROR_STREAM_NOT_EXIST"]=50000005]="HWLLS_ERROR_STREAM_NOT_EXIST";e[e["HWLLS_ERROR_WEBRTC_UNSUPPORTED"]=50000006]="HWLLS_ERROR_WEBRTC_UNSUPPORTED";e[e["HWLLS_MEDIA_NETWORK_ERROR"]=50000007]="HWLLS_MEDIA_NETWORK_ERROR";e[e["HWLLS_ERROR_BAD_REQUEST"]=50000008]="HWLLS_ERROR_BAD_REQUEST";e[e["HWLLS_ERROR_STREAM_INVALID_PARAMETER"]=50000009]="HWLLS_ERROR_STREAM_INVALID_PARAMETER";e[e["HWLLS_ERROR_ENCODING_NOT_ACCEPTED"]=500000010]="HWLLS_ERROR_ENCODING_NOT_ACCEPTED";e[e["HWLLS_INTERNAL_ERROR"]=50000020]="HWLLS_INTERNAL_ERROR";e[e["HWLLS_BUSSINESS_DOWNGRADE"]=50000021]="HWLLS_BUSSINESS_DOWNGRADE";e[e["HWLLS_PLAY_WEBRTC_RETRY_FAILED"]=50000022]="HWLLS_PLAY_WEBRTC_RETRY_FAILED";e[e["HWLLS_PLAY_FLV_RETRY_FAILED"]=50000023]="HWLLS_PLAY_FLV_RETRY_FAILED";e[e["HWLLS_PLAY_HLS_RETRY_FAILED"]=50000024]="HWLLS_PLAY_HLS_RETRY_FAILED";e[e["HWLLS_ERROR_LIVE_UNSUPPORTED"]=50000030]="HWLLS_ERROR_LIVE_UNSUPPORTED";e[e["HWLLS_ERROR_UNEXPECTED_EOF"]=50000031]="HWLLS_ERROR_UNEXPECTED_EOF";e[e["HWLLS_ERROR_MEDIA_ERROR"]=50000032]="HWLLS_ERROR_MEDIA_ERROR";e[e["HWLLS_PLAY_NOT_ALLOW"]=51e6]="HWLLS_PLAY_NOT_ALLOW";e[e["HWLLS_PLAY_TIMEOUT"]=51000001]="HWLLS_PLAY_TIMEOUT";e[e["RTC_ERR_CODE_RTC_SDK_ERROR"]=90000001]="RTC_ERR_CODE_RTC_SDK_ERROR";e[e["RTC_ERR_CODE_WAIT_RSP_TIMEOUT"]=90000004]="RTC_ERR_CODE_WAIT_RSP_TIMEOUT";e[e["RTC_ERR_CODE_INVALID_PARAMETER"]=90000005]="RTC_ERR_CODE_INVALID_PARAMETER";e[e["RTC_ERR_CODE_INVALID_OPERATION"]=90100001]="RTC_ERR_CODE_INVALID_OPERATION";e[e["RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES"]=90100002]="RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES";e[e["RTC_ERR_CODE_NO_AVAILABLE_DEVICES"]=90100003]="RTC_ERR_CODE_NO_AVAILABLE_DEVICES";e[e["RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES"]=90100004]="RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES";e[e["RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES"]=90100005]="RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES";e[e["RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES"]=90100006]="RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES";e[e["RTC_ERR_CODE_STATUS_ERROR"]=90100007]="RTC_ERR_CODE_STATUS_ERROR";e[e["RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED"]=90100008]="RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED";e[e["RTC_ERR_CODE_WAIT_CONFIG_FAIL"]=90100009]="RTC_ERR_CODE_WAIT_CONFIG_FAIL";e[e["RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL"]=90100010]="RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL";e[e["RTC_ERR_CODE_REGION_NOT_COVERED"]=90100011]="RTC_ERR_CODE_REGION_NOT_COVERED";e[e["RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT"]=90100012]="RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT";e[e["RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT"]=90100013]="RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT";e[e["RTC_ERR_CODE_WEBSOCKET_NOT_OPEN"]=90100014]="RTC_ERR_CODE_WEBSOCKET_NOT_OPEN";e[e["RTC_ERR_CODE_WEBSOCKET_INTERRUPTED"]=90100015]="RTC_ERR_CODE_WEBSOCKET_INTERRUPTED";e[e["RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR"]=90100016]="RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR";e[e["RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED"]=90100017]="RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED";e[e["RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED"]=90100018]="RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED";e[e["RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND"]=90100019]="RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND";e[e["RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE"]=90100020]="RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE";e[e["RTC_ERR_CODE_PLAY_NOT_ALLOW"]=90100021]="RTC_ERR_CODE_PLAY_NOT_ALLOW";e[e["RTC_ERR_CODE_ROLE_NO_PERMISSION"]=90100022]="RTC_ERR_CODE_ROLE_NO_PERMISSION";e[e["RTC_ERR_CODE_ANSWER_SDP_INVALID"]=90100023]="RTC_ERR_CODE_ANSWER_SDP_INVALID";e[e["RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED"]=90100024]="RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED";e[e["RTC_ERR_CODE_WEBRTC_UNSUPPORTED"]=90100025]="RTC_ERR_CODE_WEBRTC_UNSUPPORTED";e[e["RTC_ERR_CODE_MEDIA_NETWORK_ERROR"]=90100026]="RTC_ERR_CODE_MEDIA_NETWORK_ERROR";e[e["RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM"]=90100027]="RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM";e[e["RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM"]=90100028]="RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM";e[e["RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED"]=90100029]="RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED";e[e["RTC_ERR_CODE_SIGNATURE_EXPIRED"]=90100030]="RTC_ERR_CODE_SIGNATURE_EXPIRED";e[e["RTC_ERR_CODE_SIGNATURE_INVALID"]=90100031]="RTC_ERR_CODE_SIGNATURE_INVALID";e[e["RTC_ERR_CODE_RTC_ACS"]=90100100]="RTC_ERR_CODE_RTC_ACS";e[e["RTC_ERR_CODE_RTC_CONTROL_ERROR"]=90100200]="RTC_ERR_CODE_RTC_CONTROL_ERROR";e[e["RTC_ERR_CODE_SFU_ERROR"]=90100600]="RTC_ERR_CODE_SFU_ERROR"})(b||(e.ErrorCode=b={}));var _=e.ErrorMsg=(t={},m(m(m(m(m(m(m(m(m(m(t,b.HWLLS_OK,"success"),b.HWLLS_ERROR_INVALID_URL,"url invalid."),b.HWLLS_ERROR_INVALID_PARAMETER,"parameter invalid."),b.HWLLS_ERROR_SERVER_CONNECT_FAIL,"server not available or server internal error."),b.HWLLS_ERROR_SERVER_NO_RESPONSE,"server respone timeout."),b.HWLLS_ERROR_AUTH_FAIL,"server authnicate failed."),b.HWLLS_ERROR_STREAM_NOT_EXIST,"stream not exist."),b.HWLLS_MEDIA_NETWORK_ERROR,"media connection establish failed, please switch network or try again later."),b.HWLLS_ERROR_BAD_REQUEST,"bad request."),b.HWLLS_ERROR_STREAM_INVALID_PARAMETER,"browser not support avc codec."),m(m(m(m(m(m(m(m(m(t,b.HWLLS_INTERNAL_ERROR,"internal error"),b.HWLLS_BUSSINESS_DOWNGRADE,"fatal error, bussiness downgrade: hls/http-flv etc."),b.HWLLS_PLAY_WEBRTC_RETRY_FAILED,"recover play with webrtc protocol timeOut, pls comfirm the server is avaliable."),b.HWLLS_PLAY_FLV_RETRY_FAILED,"recover play with flv format timeOut, pls comfirm the server is avaliable."),b.HWLLS_PLAY_HLS_RETRY_FAILED,"recover play with hls format timeOut, pls comfirm the server is avaliable."),b.HWLLS_PLAY_NOT_ALLOW,"the user didn't interact with the document first, please trigger by gesture."),b.HWLLS_PLAY_TIMEOUT,"play timeout, please confirm the stream server status."),b.HWLLS_ERROR_UNEXPECTED_EOF,"related to unexpected network EOF which cannot be recovered."),b.HWLLS_ERROR_ENCODING_NOT_ACCEPTED,"server does not accept content-encoding request"));var S=e.HwLLSError=function(e){function t(e,r){var i;n(this,t);var o="";if(e in b){o=_[e]}else{o="unknow error"}i=a(this,t,[r]);i.code=e;i.message=r||o;return i}c(t,e);return o(t,[{key:"getCode",value:function e(){return this.code}},{key:"getMsg",value:function e(){return this.message}},{key:"toString",value:function e(){return'["code": '.concat(this.code,', "message": "').concat(this.message,'"]')}}])}(l(Error))}))}};var t={};function r(n){var i=t[n];if(i!==undefined){return i.exports}var o=t[n]={exports:{}};e[n].call(o.exports,o,o.exports,r);return o.exports}var n=r(4317);return n})()))},21903:(e,t,r)=>{"use strict";var n=r(94644);var i=r(43839).findLast;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("findLast",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},22048:(e,t,r)=>{var n=r(56018).FilterCSS;var i=r(56018).getDefaultWhiteList;var o=r(29349);function a(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var s=new n;function u(e,t,r){}function c(e,t,r){}function l(e,t,r){}function f(e,t,r){}function d(e){return e.replace(p,"&lt;").replace(v,"&gt;")}function h(e,t,r,n){r=A(r);if(t==="href"||t==="src"){r=o.trim(r);if(r==="#")return"#";if(!(r.substr(0,7)==="http://"||r.substr(0,8)==="https://"||r.substr(0,7)==="mailto:"||r.substr(0,4)==="tel:"||r.substr(0,11)==="data:image/"||r.substr(0,6)==="ftp://"||r.substr(0,2)==="./"||r.substr(0,3)==="../"||r[0]==="#"||r[0]==="/")){return""}}else if(t==="background"){S.lastIndex=0;if(S.test(r)){return""}}else if(t==="style"){E.lastIndex=0;if(E.test(r)){return""}w.lastIndex=0;if(w.test(r)){S.lastIndex=0;if(S.test(r)){return""}}if(n!==false){n=n||s;r=n.process(r)}}r=O(r);return r}var p=/</g;var v=/>/g;var m=/"/g;var y=/&quot;/g;var g=/&#([a-zA-Z0-9]*);?/gim;var b=/&colon;?/gim;var _=/&newline;?/gim;var S=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;var E=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;var w=/u\s*r\s*l\s*\(.*/gi;function T(e){return e.replace(m,"&quot;")}function I(e){return e.replace(y,'"')}function R(e){return e.replace(g,(function e(t,r){return r[0]==="x"||r[0]==="X"?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))}))}function C(e){return e.replace(b,":").replace(_," ")}function k(e){var t="";for(var r=0,n=e.length;r<n;r++){t+=e.charCodeAt(r)<32?" ":e.charAt(r)}return o.trim(t)}function A(e){e=I(e);e=R(e);e=C(e);e=k(e);return e}function O(e){e=T(e);e=d(e);return e}function P(){return""}function x(e,t){if(typeof t!=="function"){t=function(){}}var r=!Array.isArray(e);function n(t){if(r)return true;return o.indexOf(e,t)!==-1}var i=[];var a=false;return{onIgnoreTag:function(e,r,o){if(n(e)){if(o.isClosing){var s="[/removed]";var u=o.position+s.length;i.push([a!==false?a:o.position,u]);a=false;return s}else{if(!a){a=o.position}return"[removed]"}}else{return t(e,r,o)}},remove:function(e){var t="";var r=0;o.forEach(i,(function(n){t+=e.slice(r,n[0]);r=n[1]}));t+=e.slice(r);return t}}}function L(e){var t="";var r=0;while(r<e.length){var n=e.indexOf("\x3c!--",r);if(n===-1){t+=e.slice(r);break}t+=e.slice(r,n);var i=e.indexOf("--\x3e",n);if(i===-1){break}r=i+3}return t}function M(e){var t=e.split("");t=t.filter((function(e){var t=e.charCodeAt(0);if(t===127)return false;if(t<=31){if(t===10||t===13)return true;return false}return true}));return t.join("")}t.whiteList=a();t.getDefaultWhiteList=a;t.onTag=u;t.onIgnoreTag=c;t.onTagAttr=l;t.onIgnoreTagAttr=f;t.safeAttrValue=h;t.escapeHtml=d;t.escapeQuote=T;t.unescapeQuote=I;t.escapeHtmlEntities=R;t.escapeDangerHtml5Entities=C;t.clearNonPrintableCharacter=k;t.friendlyAttrValue=A;t.escapeAttrValue=O;t.onIgnoreTagStripAll=P;t.StripTagBody=x;t.stripCommentTag=L;t.stripBlankChar=M;t.attributeWrapSign='"';t.cssFilter=s;t.getDefaultCSSWhiteList=i},22134:(e,t,r)=>{"use strict";var n=r(15823);n("Uint8",(function(e){return function t(r,n,i){return e(this,r,n,i)}}),true)},22162:(e,t,r)=>{"use strict";var n=r(96540),i=r(19888);function o(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t}var a="function"===typeof Object.is?Object.is:o,s=i.useSyncExternalStore,u=n.useRef,c=n.useEffect,l=n.useMemo,f=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=u(null);if(null===o.current){var d={hasValue:!1,value:null};o.current=d}else d=o.current;o=l((function(){function e(e){if(!o){o=!0;s=e;e=n(e);if(void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return u=t}return u=e}t=u;if(a(s,e))return t;var r=n(e);if(void 0!==i&&i(t,r))return s=e,t;s=e;return u=r}var o=!1,s,u,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,r,n,i]);var h=s(e,o[0],o[1]);c((function(){d.hasValue=!0;d.value=h}),[h]);f(h);return h}},22195:(e,t,r)=>{"use strict";var n=r(79504);var i=n({}.toString);var o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},22489:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(28551);var s=r(1767);var u=r(19462);var c=r(96319);var l=r(96395);var f=r(9539);var d=r(84549);var h=!l&&d("filter",TypeError);var p=u((function(){var e=this.iterator;var t=this.predicate;var r=this.next;var n,o,s;while(true){n=a(i(r,e));o=this.done=!!n.done;if(o)return;s=n.value;if(c(e,t,[s,this.counter++],true))return s}}));n({target:"Iterator",proto:true,real:true,forced:l||h},{filter:function e(t){a(this);try{o(t)}catch(e){f(this,"throw",e)}if(h)return i(h,this,t);return new p(s(this),{predicate:t})}})},22551:(e,t,r)=>{"use strict";var n=r(96540),i=r(69982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function u(e,t){c(e,t);c(e+"Capture",t)}function c(e,t){s[e]=t;for(e=0;e<t.length;e++)a.add(t[e])}var l=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function v(e){if(f.call(p,e))return!0;if(f.call(h,e))return!1;if(d.test(e))return p[e]=!0;h[e]=!0;return!1}function m(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(n)return!1;if(null!==r)return!r.acceptsBooleans;e=e.toLowerCase().slice(0,5);return"data-"!==e&&"aria-"!==e;default:return!1}}function y(e,t,r,n){if(null===t||"undefined"===typeof t||m(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function g(e,t,r,n,i,o,a){this.acceptsBooleans=2===t||3===t||4===t;this.attributeName=n;this.attributeNamespace=i;this.mustUseProperty=r;this.propertyName=e;this.type=t;this.sanitizeURL=o;this.removeEmptyString=a}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new g(e,0,!1,e,null,!1,!1)}));[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new g(t,1,!1,e[1],null,!1,!1)}));["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}));["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new g(e,2,!1,e,null,!1,!1)}));"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}));["checked","multiple","muted","selected"].forEach((function(e){b[e]=new g(e,3,!0,e,null,!1,!1)}));["capture","download"].forEach((function(e){b[e]=new g(e,4,!1,e,null,!1,!1)}));["cols","rows","size","span"].forEach((function(e){b[e]=new g(e,6,!1,e,null,!1,!1)}));["rowSpan","start"].forEach((function(e){b[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var _=/[\-:]([a-z])/g;function S(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(_,S);b[t]=new g(t,1,!1,e,null,!1,!1)}));"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(_,S);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}));["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(_,S);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}));["tabIndex","crossOrigin"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}));b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));function E(e,t,r,n){var i=b.hasOwnProperty(t)?b[t]:null;if(null!==i?0!==i.type:n||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])y(t,r,i,n)&&(r=null),n||null===i?v(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=null===r?3===i.type?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(i=i.type,r=3===i||4===i&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r)))}var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=Symbol.for("react.element"),I=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var j=Symbol.iterator;function U(e){if(null===e||"object"!==typeof e)return null;e=j&&e[j]||e["@@iterator"];return"function"===typeof e?e:null}var V=Object.assign,W;function B(e){if(void 0===W)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return"\n"+W+e}var G=!1;function Z(e,t){if(!e||G)return"";G=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"===typeof t.stack){for(var i=t.stack.split("\n"),o=n.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s){do{if(a--,s--,0>s||i[a]!==o[s]){var u="\n"+i[a].replace(" at new "," at ");e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName));return u}}while(1<=a&&0<=s)}break}}}finally{G=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?B(e):""}function F(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function H(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case R:return"Fragment";case I:return"Portal";case k:return"Profiler";case C:return"StrictMode";case x:return"Suspense";case L:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;e=e.displayName;e||(e=t.displayName||t.name||"",e=""!==e?"ForwardRef("+e+")":"ForwardRef");return e;case M:return t=e.displayName||null,null!==t?t:H(e.type)||"Memo";case N:t=e._payload;e=e._init;try{return H(e(t))}catch(e){}}return null}function X(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function z(e){var t=K(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e;o.call(this,e)}});Object.defineProperty(e,t,{enumerable:r.enumerable});return{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null;delete e[t]}}}}function J(e){e._valueTracker||(e._valueTracker=z(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue();var n="";e&&(n=K(e)?e.checked?"true":"false":e.value);e=n;return e!==r?(t.setValue(e),!0):!1}function q(e){e=e||("undefined"!==typeof document?document:void 0);if("undefined"===typeof e)return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var r=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function ee(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=Y(null!=t.value?t.value:r);e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){t=t.checked;null!=t&&E(e,"checked",t,!1)}function re(e,t){te(e,t);var r=Y(t.value),n=t.type;if(null!=r)if("number"===n){if(0===r&&""===e.value||e.value!=r)e.value=""+r}else e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n){e.removeAttribute("value");return}t.hasOwnProperty("value")?ie(e,t.type,r):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Y(t.defaultValue));null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ne(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue;r||t===e.value||(e.value=t);e.defaultValue=t}r=e.name;""!==r&&(e.name="");e.defaultChecked=!!e._wrapperState.initialChecked;""!==r&&(e.name=r)}function ie(e,t,r){if("number"!==t||q(e.ownerDocument)!==e)null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r)}var oe=Array.isArray;function ae(e,t,r,n){e=e.options;if(t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{r=""+Y(r);t=null;for(i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0;n&&(e[i].defaultSelected=!0);return}null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var r=t.value;if(null==r){r=t.children;t=t.defaultValue;if(null!=r){if(null!=t)throw Error(o(92));if(oe(r)){if(1<r.length)throw Error(o(93));r=r[0]}t=r}null==t&&(t="");r=t}e._wrapperState={initialValue:Y(r)}}function ce(e,t){var r=Y(t.value),n=Y(t.defaultValue);null!=r&&(r=""+r,r!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r));null!=n&&(e.defaultValue=""+n)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function de(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,pe=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction((function(){return e(t,r,n,i)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{he=he||document.createElement("div");he.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ve(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType){r.nodeValue=t;return}}e.textContent=t}var me={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];Object.keys(me).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1);me[t]=me[e]}))}));function ge(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||me.hasOwnProperty(e)&&me[e]?(""+t).trim():t+"px"}function be(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=ge(r,t[r],n);"float"===r&&(r="cssFloat");n?e.setProperty(r,i):e[r]=i}}var _e=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Te(e){e=e.target||e.srcElement||window;e.correspondingUseElement&&(e=e.correspondingUseElement);return 3===e.nodeType?e.parentNode:e}var Ie=null,Re=null,Ce=null;function ke(e){if(e=Bi(e)){if("function"!==typeof Ie)throw Error(o(280));var t=e.stateNode;t&&(t=Zi(t),Ie(e.stateNode,e.type,t))}}function Ae(e){Re?Ce?Ce.push(e):Ce=[e]:Re=e}function Oe(){if(Re){var e=Re,t=Ce;Ce=Re=null;ke(e);if(t)for(e=0;e<t.length;e++)ke(t[e])}}function Pe(e,t){return e(t)}function xe(){}var Le=!1;function Me(e,t,r){if(Le)return e(t,r);Le=!0;try{return Pe(e,t,r)}finally{if(Le=!1,null!==Re||null!==Ce)xe(),Oe()}}function Ne(e,t){var r=e.stateNode;if(null===r)return null;var n=Zi(r);if(null===n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!("button"===e||"input"===e||"select"===e||"textarea"===e));e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!==typeof r)throw Error(o(231,t,typeof r));return r}var De=!1;if(l)try{var je={};Object.defineProperty(je,"passive",{get:function(){De=!0}});window.addEventListener("test",je,je);window.removeEventListener("test",je,je)}catch(e){De=!1}function Ue(e,t,r,n,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(e){this.onError(e)}}var Ve=!1,We=null,Be=!1,Ge=null,Ze={onError:function(e){Ve=!0;We=e}};function Fe(e,t,r,n,i,o,a,s,u){Ve=!1;We=null;Ue.apply(Ze,arguments)}function He(e,t,r,n,i,a,s,u,c){Fe.apply(this,arguments);if(Ve){if(Ve){var l=We;Ve=!1;We=null}else throw Error(o(198));Be||(Be=!0,Ge=l)}}function Xe(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{t=e,0!==(t.flags&4098)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function Ye(e){if(13===e.tag){var t=e.memoizedState;null===t&&(e=e.alternate,null!==e&&(t=e.memoizedState));if(null!==t)return t.dehydrated}return null}function Ke(e){if(Xe(e)!==e)throw Error(o(188))}function ze(e){var t=e.alternate;if(!t){t=Xe(e);if(null===t)throw Error(o(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){n=i.return;if(null!==n){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return Ke(i),e;if(a===n)return Ke(i),t;a=a.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,u=i.child;u;){if(u===r){s=!0;r=i;n=a;break}if(u===n){s=!0;n=i;r=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===r){s=!0;r=a;n=i;break}if(u===n){s=!0;n=a;r=i;break}u=u.sibling}if(!s)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?e:t}function Je(e){e=ze(e);return null!==e?Qe(e):null}function Qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Qe(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,$e=i.unstable_cancelCallback,et=i.unstable_shouldYield,tt=i.unstable_requestPaint,rt=i.unstable_now,nt=i.unstable_getCurrentPriorityLevel,it=i.unstable_ImmediatePriority,ot=i.unstable_UserBlockingPriority,at=i.unstable_NormalPriority,st=i.unstable_LowPriority,ut=i.unstable_IdlePriority,ct=null,lt=null;function ft(e){if(lt&&"function"===typeof lt.onCommitFiberRoot)try{lt.onCommitFiberRoot(ct,e,void 0,128===(e.current.flags&128))}catch(e){}}var dt=Math.clz32?Math.clz32:vt,ht=Math.log,pt=Math.LN2;function vt(e){e>>>=0;return 0===e?32:31-(ht(e)/pt|0)|0}var mt=64,yt=4194304;function gt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bt(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(0!==a){var s=a&~i;0!==s?n=gt(s):(o&=a,0!==o&&(n=gt(o)))}else a=r&~i,0!==a?n=gt(a):0!==o&&(n=gt(o));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&i)&&(i=n&-n,o=t&-t,i>=o||16===i&&0!==(o&4194240)))return t;0!==(n&4)&&(n|=r&16);t=e.entangledLanes;if(0!==t)for(e=e.entanglements,t&=n;0<t;)r=31-dt(t),i=1<<r,n|=e[r],t&=~i;return n}function _t(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function St(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-dt(o),s=1<<a,u=i[a];if(-1===u){if(0===(s&r)||0!==(s&n))i[a]=_t(s,t)}else u<=t&&(e.expiredLanes|=s);o&=~s}}function Et(e){e=e.pendingLanes&-1073741825;return 0!==e?e:e&1073741824?1073741824:0}function wt(){var e=mt;mt<<=1;0===(mt&4194240)&&(mt=64);return e}function Tt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function It(e,t,r){e.pendingLanes|=t;536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0);e=e.eventTimes;t=31-dt(t);e[t]=r}function Rt(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t;e.suspendedLanes=0;e.pingedLanes=0;e.expiredLanes&=t;e.mutableReadLanes&=t;e.entangledLanes&=t;t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-dt(r),o=1<<i;t[i]=0;n[i]=-1;e[i]=-1;r&=~o}}function Ct(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-dt(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t);r&=~i}}var kt=0;function At(e){e&=-e;return 1<e?4<e?0!==(e&268435455)?16:536870912:4:1}var Ot,Pt,xt,Lt,Mt,Nt=!1,Dt=[],jt=null,Ut=null,Vt=null,Wt=new Map,Bt=new Map,Gt=[],Zt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ft(e,t){switch(e){case"focusin":case"focusout":jt=null;break;case"dragenter":case"dragleave":Ut=null;break;case"mouseover":case"mouseout":Vt=null;break;case"pointerover":case"pointerout":Wt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bt.delete(t.pointerId)}}function Ht(e,t,r,n,i,o){if(null===e||e.nativeEvent!==o)return e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},null!==t&&(t=Bi(t),null!==t&&Pt(t)),e;e.eventSystemFlags|=n;t=e.targetContainers;null!==i&&-1===t.indexOf(i)&&t.push(i);return e}function Xt(e,t,r,n,i){switch(t){case"focusin":return jt=Ht(jt,e,t,r,n,i),!0;case"dragenter":return Ut=Ht(Ut,e,t,r,n,i),!0;case"mouseover":return Vt=Ht(Vt,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;Wt.set(o,Ht(Wt.get(o)||null,e,t,r,n,i));return!0;case"gotpointercapture":return o=i.pointerId,Bt.set(o,Ht(Bt.get(o)||null,e,t,r,n,i)),!0}return!1}function Yt(e){var t=Wi(e.target);if(null!==t){var r=Xe(t);if(null!==r)if(t=r.tag,13===t){if(t=Ye(r),null!==t){e.blockedOn=t;Mt(e.priority,(function(){xt(r)}));return}}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===r.tag?r.stateNode.containerInfo:null;return}}e.blockedOn=null}function Kt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=or(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null===r){r=e.nativeEvent;var n=new r.constructor(r.type,r);we=n;r.target.dispatchEvent(n);we=null}else return t=Bi(r),null!==t&&Pt(t),e.blockedOn=r,!1;t.shift()}return!0}function zt(e,t,r){Kt(e)&&r.delete(t)}function Jt(){Nt=!1;null!==jt&&Kt(jt)&&(jt=null);null!==Ut&&Kt(Ut)&&(Ut=null);null!==Vt&&Kt(Vt)&&(Vt=null);Wt.forEach(zt);Bt.forEach(zt)}function Qt(e,t){e.blockedOn===t&&(e.blockedOn=null,Nt||(Nt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Jt)))}function qt(e){function t(t){return Qt(t,e)}if(0<Dt.length){Qt(Dt[0],e);for(var r=1;r<Dt.length;r++){var n=Dt[r];n.blockedOn===e&&(n.blockedOn=null)}}null!==jt&&Qt(jt,e);null!==Ut&&Qt(Ut,e);null!==Vt&&Qt(Vt,e);Wt.forEach(t);Bt.forEach(t);for(r=0;r<Gt.length;r++)n=Gt[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Gt.length&&(r=Gt[0],null===r.blockedOn);)Yt(r),null===r.blockedOn&&Gt.shift()}var $t=w.ReactCurrentBatchConfig,er=!0;function tr(e,t,r,n){var i=kt,o=$t.transition;$t.transition=null;try{kt=1,nr(e,t,r,n)}finally{kt=i,$t.transition=o}}function rr(e,t,r,n){var i=kt,o=$t.transition;$t.transition=null;try{kt=4,nr(e,t,r,n)}finally{kt=i,$t.transition=o}}function nr(e,t,r,n){if(er){var i=or(e,t,r,n);if(null===i)di(e,t,n,ir,r),Ft(e,n);else if(Xt(i,e,t,r,n))n.stopPropagation();else if(Ft(e,n),t&4&&-1<Zt.indexOf(e)){for(;null!==i;){var o=Bi(i);null!==o&&Ot(o);o=or(e,t,r,n);null===o&&di(e,t,n,ir,r);if(o===i)break;i=o}null!==i&&n.stopPropagation()}else di(e,t,n,null,r)}}var ir=null;function or(e,t,r,n){ir=null;e=Te(n);e=Wi(e);if(null!==e)if(t=Xe(e),null===t)e=null;else if(r=t.tag,13===r){e=Ye(t);if(null!==e)return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);ir=e;return null}function ar(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nt()){case it:return 1;case ot:return 4;case at:case st:return 16;case ut:return 536870912;default:return 16}default:return 16}}var sr=null,ur=null,cr=null;function lr(){if(cr)return cr;var e,t=ur,r=t.length,n,i="value"in sr?sr.value:sr.textContent,o=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[o-n];n++);return cr=i.slice(e,1<n?1-n:void 0)}function fr(e){var t=e.keyCode;"charCode"in e?(e=e.charCode,0===e&&13===t&&(e=13)):e=t;10===e&&(e=13);return 32<=e||13===e?e:0}function dr(){return!0}function hr(){return!1}function pr(e){function t(t,r,n,i,o){this._reactName=t;this._targetInst=n;this.type=r;this.nativeEvent=i;this.target=o;this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?dr:hr;this.isPropagationStopped=hr;return this}V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=dr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=dr)},persist:function(){},isPersistent:dr});return t}var vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mr=pr(vr),yr=V({},vr,{view:0,detail:0}),gr=pr(yr),br,_r,Sr,Er=V({},yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ur,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){if("movementX"in e)return e.movementX;e!==Sr&&(Sr&&"mousemove"===e.type?(br=e.screenX-Sr.screenX,_r=e.screenY-Sr.screenY):_r=br=0,Sr=e);return br},movementY:function(e){return"movementY"in e?e.movementY:_r}}),wr=pr(Er),Tr=V({},Er,{dataTransfer:0}),Ir=pr(Tr),Rr=V({},yr,{relatedTarget:0}),Cr=pr(Rr),kr=V({},vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ar=pr(kr),Or=V({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pr=pr(Or),xr=V({},vr,{data:0}),Lr=pr(xr),Mr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Dr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dr[e])?!!t[e]:!1}function Ur(){return jr}var Vr=V({},yr,{key:function(e){if(e.key){var t=Mr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=fr(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Nr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ur,charCode:function(e){return"keypress"===e.type?fr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?fr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Wr=pr(Vr),Br=V({},Er,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gr=pr(Br),Zr=V({},yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ur}),Fr=pr(Zr),Hr=V({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xr=pr(Hr),Yr=V({},Er,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kr=pr(Yr),zr=[9,13,27,32],Jr=l&&"CompositionEvent"in window,Qr=null;l&&"documentMode"in document&&(Qr=document.documentMode);var qr=l&&"TextEvent"in window&&!Qr,$r=l&&(!Jr||Qr&&8<Qr&&11>=Qr),en=String.fromCharCode(32),tn=!1;function rn(e,t){switch(e){case"keyup":return-1!==zr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nn(e){e=e.detail;return"object"===typeof e&&"data"in e?e.data:null}var on=!1;function an(e,t){switch(e){case"compositionend":return nn(t);case"keypress":if(32!==t.which)return null;tn=!0;return en;case"textInput":return e=t.data,e===en&&tn?null:e;default:return null}}function sn(e,t){if(on)return"compositionend"===e||!Jr&&rn(e,t)?(e=lr(),cr=ur=sr=null,on=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $r&&"ko"!==t.locale?null:t.data;default:return null}}var un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!un[e.type]:"textarea"===t?!0:!1}function ln(e,t,r,n){Ae(n);t=pi(t,"onChange");0<t.length&&(r=new mr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var fn=null,dn=null;function hn(e){ai(e,0)}function pn(e){var t=Gi(e);if(Q(t))return e}function vn(e,t){if("change"===e)return t}var mn=!1;if(l){var yn;if(l){var gn="oninput"in document;if(!gn){var bn=document.createElement("div");bn.setAttribute("oninput","return;");gn="function"===typeof bn.oninput}yn=gn}else yn=!1;mn=yn&&(!document.documentMode||9<document.documentMode)}function _n(){fn&&(fn.detachEvent("onpropertychange",Sn),dn=fn=null)}function Sn(e){if("value"===e.propertyName&&pn(dn)){var t=[];ln(t,dn,e,Te(e));Me(hn,t)}}function En(e,t,r){"focusin"===e?(_n(),fn=t,dn=r,fn.attachEvent("onpropertychange",Sn)):"focusout"===e&&_n()}function wn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return pn(dn)}function Tn(e,t){if("click"===e)return pn(t)}function In(e,t){if("input"===e||"change"===e)return pn(t)}function Rn(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t}var Cn="function"===typeof Object.is?Object.is:Rn;function kn(e,t){if(Cn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!f.call(t,i)||!Cn(e[i],t[i]))return!1}return!0}function An(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function On(e,t){var r=An(e);e=0;for(var n;r;){if(3===r.nodeType){n=e+r.textContent.length;if(e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=An(r)}}function Pn(e,t){return e&&t?e===t?!0:e&&3===e.nodeType?!1:t&&3===t.nodeType?Pn(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xn(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(e){r=!1}if(r)e=t.contentWindow;else break;t=q(e.document)}return t}function Ln(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Mn(e){var t=xn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Pn(r.ownerDocument.documentElement,r)){if(null!==n&&Ln(r))if(t=n.start,e=n.end,void 0===e&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=void 0===n.end?o:Math.min(n.end,i);!e.extend&&o>n&&(i=n,n=o,o=i);i=On(r,o);var a=On(r,n);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}t=[];for(e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});"function"===typeof r.focus&&r.focus();for(r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Nn=l&&"documentMode"in document&&11>=document.documentMode,Dn=null,jn=null,Un=null,Vn=!1;function Wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;Vn||null==Dn||Dn!==q(n)||(n=Dn,"selectionStart"in n&&Ln(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Un&&kn(Un,n)||(Un=n,n=pi(jn,"onSelect"),0<n.length&&(t=new mr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Dn)))}function Bn(e,t){var r={};r[e.toLowerCase()]=t.toLowerCase();r["Webkit"+e]="webkit"+t;r["Moz"+e]="moz"+t;return r}var Gn={animationend:Bn("Animation","AnimationEnd"),animationiteration:Bn("Animation","AnimationIteration"),animationstart:Bn("Animation","AnimationStart"),transitionend:Bn("Transition","TransitionEnd")},Zn={},Fn={};l&&(Fn=document.createElement("div").style,"AnimationEvent"in window||(delete Gn.animationend.animation,delete Gn.animationiteration.animation,delete Gn.animationstart.animation),"TransitionEvent"in window||delete Gn.transitionend.transition);function Hn(e){if(Zn[e])return Zn[e];if(!Gn[e])return e;var t=Gn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Fn)return Zn[e]=t[r];return e}var Xn=Hn("animationend"),Yn=Hn("animationiteration"),Kn=Hn("animationstart"),zn=Hn("transitionend"),Jn=new Map,Qn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function qn(e,t){Jn.set(e,t);u(t,[e])}for(var $n=0;$n<Qn.length;$n++){var ei=Qn[$n],ti=ei.toLowerCase(),ri=ei[0].toUpperCase()+ei.slice(1);qn(ti,"on"+ri)}qn(Xn,"onAnimationEnd");qn(Yn,"onAnimationIteration");qn(Kn,"onAnimationStart");qn("dblclick","onDoubleClick");qn("focusin","onFocus");qn("focusout","onBlur");qn(zn,"onTransitionEnd");c("onMouseEnter",["mouseout","mouseover"]);c("onMouseLeave",["mouseout","mouseover"]);c("onPointerEnter",["pointerout","pointerover"]);c("onPointerLeave",["pointerout","pointerover"]);u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));u("onBeforeInput",["compositionend","keypress","textInput","paste"]);u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ii=new Set("cancel close invalid load scroll toggle".split(" ").concat(ni));function oi(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r;He(n,t,void 0,e);e.currentTarget=null}function ai(e,t){t=0!==(t&4);for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],u=s.instance,c=s.currentTarget;s=s.listener;if(u!==o&&i.isPropagationStopped())break e;oi(i,s,c);o=u}else for(a=0;a<n.length;a++){s=n[a];u=s.instance;c=s.currentTarget;s=s.listener;if(u!==o&&i.isPropagationStopped())break e;oi(i,s,c);o=u}}}if(Be)throw e=Ge,Be=!1,Ge=null,e}function si(e,t){var r=t[ji];void 0===r&&(r=t[ji]=new Set);var n=e+"__bubble";r.has(n)||(fi(t,e,2,!1),r.add(n))}function ui(e,t,r){var n=0;t&&(n|=4);fi(r,e,n,t)}var ci="_reactListening"+Math.random().toString(36).slice(2);function li(e){if(!e[ci]){e[ci]=!0;a.forEach((function(t){"selectionchange"!==t&&(ii.has(t)||ui(t,!1,e),ui(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ci]||(t[ci]=!0,ui("selectionchange",!1,t))}}function fi(e,t,r,n){switch(ar(t)){case 1:var i=tr;break;case 4:i=rr;break;default:i=nr}r=i.bind(null,t,r,e);i=void 0;!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0);n?void 0!==i?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):void 0!==i?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function di(e,t,r,n,i){var o=n;if(0===(t&1)&&0===(t&2)&&null!==n)e:for(;;){if(null===n)return;var a=n.tag;if(3===a||4===a){var s=n.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=n.return;null!==a;){var u=a.tag;if(3===u||4===u)if(u=a.stateNode.containerInfo,u===i||8===u.nodeType&&u.parentNode===i)return;a=a.return}for(;null!==s;){a=Wi(s);if(null===a)return;u=a.tag;if(5===u||6===u){n=o=a;continue e}s=s.parentNode}}n=n.return}Me((function(){var n=o,i=Te(r),a=[];e:{var s=Jn.get(e);if(void 0!==s){var u=mr,c=e;switch(e){case"keypress":if(0===fr(r))break e;case"keydown":case"keyup":u=Wr;break;case"focusin":c="focus";u=Cr;break;case"focusout":c="blur";u=Cr;break;case"beforeblur":case"afterblur":u=Cr;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=wr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=Ir;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Fr;break;case Xn:case Yn:case Kn:u=Ar;break;case zn:u=Xr;break;case"scroll":u=gr;break;case"wheel":u=Kr;break;case"copy":case"cut":case"paste":u=Pr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Gr}var l=0!==(t&4),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var h=n,p;null!==h;){p=h;var v=p.stateNode;5===p.tag&&null!==v&&(p=v,null!==d&&(v=Ne(h,d),null!=v&&l.push(hi(h,v,p))));if(f)break;h=h.return}0<l.length&&(s=new u(s,c,null,r,i),a.push({event:s,listeners:l}))}}if(0===(t&7)){e:{s="mouseover"===e||"pointerover"===e;u="mouseout"===e||"pointerout"===e;if(s&&r!==we&&(c=r.relatedTarget||r.fromElement)&&(Wi(c)||c[Di]))break e;if(u||s){s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window;if(u){if(c=r.relatedTarget||r.toElement,u=n,c=c?Wi(c):null,null!==c&&(f=Xe(c),c!==f||5!==c.tag&&6!==c.tag))c=null}else u=null,c=n;if(u!==c){l=wr;v="onMouseLeave";d="onMouseEnter";h="mouse";if("pointerout"===e||"pointerover"===e)l=Gr,v="onPointerLeave",d="onPointerEnter",h="pointer";f=null==u?s:Gi(u);p=null==c?s:Gi(c);s=new l(v,h+"leave",u,r,i);s.target=f;s.relatedTarget=p;v=null;Wi(i)===n&&(l=new l(d,h+"enter",c,r,i),l.target=p,l.relatedTarget=f,v=l);f=v;if(u&&c)t:{l=u;d=c;h=0;for(p=l;p;p=vi(p))h++;p=0;for(v=d;v;v=vi(v))p++;for(;0<h-p;)l=vi(l),h--;for(;0<p-h;)d=vi(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break t;l=vi(l);d=vi(d)}l=null}else l=null;null!==u&&mi(a,s,u,l,!1);null!==c&&null!==f&&mi(a,f,c,l,!0)}}}e:{s=n?Gi(n):window;u=s.nodeName&&s.nodeName.toLowerCase();if("select"===u||"input"===u&&"file"===s.type)var m=vn;else if(cn(s))if(mn)m=In;else{m=wn;var y=En}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=Tn);if(m&&(m=m(e,n))){ln(a,m,r,i);break e}y&&y(e,s,n);"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ie(s,"number",s.value)}y=n?Gi(n):window;switch(e){case"focusin":if(cn(y)||"true"===y.contentEditable)Dn=y,jn=n,Un=null;break;case"focusout":Un=jn=Dn=null;break;case"mousedown":Vn=!0;break;case"contextmenu":case"mouseup":case"dragend":Vn=!1;Wn(a,r,i);break;case"selectionchange":if(Nn)break;case"keydown":case"keyup":Wn(a,r,i)}var g;if(Jr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else on?rn(e,r)&&(b="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(b="onCompositionStart");b&&($r&&"ko"!==r.locale&&(on||"onCompositionStart"!==b?"onCompositionEnd"===b&&on&&(g=lr()):(sr=i,ur="value"in sr?sr.value:sr.textContent,on=!0)),y=pi(n,b),0<y.length&&(b=new Lr(b,e,null,r,i),a.push({event:b,listeners:y}),g?b.data=g:(g=nn(r),null!==g&&(b.data=g))));if(g=qr?an(e,r):sn(e,r))n=pi(n,"onBeforeInput"),0<n.length&&(i=new Lr("onBeforeInput","beforeinput",null,r,i),a.push({event:i,listeners:n}),i.data=g)}ai(a,t)}))}function hi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function pi(e,t){for(var r=t+"Capture",n=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,o=Ne(e,r),null!=o&&n.unshift(hi(e,o,i)),o=Ne(e,t),null!=o&&n.push(hi(e,o,i)));e=e.return}return n}function vi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e?e:null}function mi(e,t,r,n,i){for(var o=t._reactName,a=[];null!==r&&r!==n;){var s=r,u=s.alternate,c=s.stateNode;if(null!==u&&u===n)break;5===s.tag&&null!==c&&(s=c,i?(u=Ne(r,o),null!=u&&a.unshift(hi(r,u,s))):i||(u=Ne(r,o),null!=u&&a.push(hi(r,u,s))));r=r.return}0!==a.length&&e.push({event:t,listeners:a})}var yi=/\r\n?/g,gi=/\u0000|\uFFFD/g;function bi(e){return("string"===typeof e?e:""+e).replace(yi,"\n").replace(gi,"")}function _i(e,t,r){t=bi(t);if(bi(e)!==t&&r)throw Error(o(425))}function Si(){}var Ei=null,wi=null;function Ti(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ii="function"===typeof setTimeout?setTimeout:void 0,Ri="function"===typeof clearTimeout?clearTimeout:void 0,Ci="function"===typeof Promise?Promise:void 0,ki="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Ci?function(e){return Ci.resolve(null).then(e).catch(Ai)}:Ii;function Ai(e){setTimeout((function(){throw e}))}function Oi(e,t){var r=t,n=0;do{var i=r.nextSibling;e.removeChild(r);if(i&&8===i.nodeType)if(r=i.data,"/$"===r){if(0===n){e.removeChild(i);qt(t);return}n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=i}while(r);qt(t)}function Pi(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){t=e.data;if("$"===t||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function xi(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var Li=Math.random().toString(36).slice(2),Mi="__reactFiber$"+Li,Ni="__reactProps$"+Li,Di="__reactContainer$"+Li,ji="__reactEvents$"+Li,Ui="__reactListeners$"+Li,Vi="__reactHandles$"+Li;function Wi(e){var t=e[Mi];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Di]||r[Mi]){r=t.alternate;if(null!==t.child||null!==r&&null!==r.child)for(e=xi(e);null!==e;){if(r=e[Mi])return r;e=xi(e)}return t}e=r;r=e.parentNode}return null}function Bi(e){e=e[Mi]||e[Di];return!e||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Gi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Zi(e){return e[Ni]||null}var Fi=[],Hi=-1;function Xi(e){return{current:e}}function Yi(e){0>Hi||(e.current=Fi[Hi],Fi[Hi]=null,Hi--)}function Ki(e,t){Hi++;Fi[Hi]=e.current;e.current=t}var zi={},Ji=Xi(zi),Qi=Xi(!1),qi=zi;function $i(e,t){var r=e.type.contextTypes;if(!r)return zi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i);return i}function eo(e){e=e.childContextTypes;return null!==e&&void 0!==e}function to(){Yi(Qi);Yi(Ji)}function ro(e,t,r){if(Ji.current!==zi)throw Error(o(168));Ki(Ji,t);Ki(Qi,r)}function no(e,t,r){var n=e.stateNode;t=t.childContextTypes;if("function"!==typeof n.getChildContext)return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(o(108,X(e)||"Unknown",i));return V({},r,n)}function io(e){e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zi;qi=Ji.current;Ki(Ji,e);Ki(Qi,Qi.current);return!0}function oo(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=no(e,t,qi),n.__reactInternalMemoizedMergedChildContext=e,Yi(Qi),Yi(Ji),Ki(Ji,e)):Yi(Qi);Ki(Qi,r)}var ao=null,so=!1,uo=!1;function co(e){null===ao?ao=[e]:ao.push(e)}function lo(e){so=!0;co(e)}function fo(){if(!uo&&null!==ao){uo=!0;var e=0,t=kt;try{var r=ao;for(kt=1;e<r.length;e++){var n=r[e];do{n=n(!0)}while(null!==n)}ao=null;so=!1}catch(t){throw null!==ao&&(ao=ao.slice(e+1)),qe(it,fo),t}finally{kt=t,uo=!1}}return null}var ho=[],po=0,vo=null,mo=0,yo=[],go=0,bo=null,_o=1,So="";function Eo(e,t){ho[po++]=mo;ho[po++]=vo;vo=e;mo=t}function wo(e,t,r){yo[go++]=_o;yo[go++]=So;yo[go++]=bo;bo=e;var n=_o;e=So;var i=32-dt(n)-1;n&=~(1<<i);r+=1;var o=32-dt(t)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32);n>>=a;i-=a;_o=1<<32-dt(t)+i|r<<i|n;So=o+e}else _o=1<<o|r<<i|n,So=e}function To(e){null!==e.return&&(Eo(e,1),wo(e,1,0))}function Io(e){for(;e===vo;)vo=ho[--po],ho[po]=null,mo=ho[--po],ho[po]=null;for(;e===bo;)bo=yo[--go],yo[go]=null,So=yo[--go],yo[go]=null,_o=yo[--go],yo[go]=null}var Ro=null,Co=null,ko=!1,Ao=null;function Oo(e,t){var r=ol(5,null,null,0);r.elementType="DELETED";r.stateNode=t;r.return=e;t=e.deletions;null===t?(e.deletions=[r],e.flags|=16):t.push(r)}function Po(e,t){switch(e.tag){case 5:var r=e.type;t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t;return null!==t?(e.stateNode=t,Ro=e,Co=Pi(t.firstChild),!0):!1;case 6:return t=""===e.pendingProps||3!==t.nodeType?null:t,null!==t?(e.stateNode=t,Ro=e,Co=null,!0):!1;case 13:return t=8!==t.nodeType?null:t,null!==t?(r=null!==bo?{id:_o,overflow:So}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ol(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ro=e,Co=null,!0):!1;default:return!1}}function xo(e){return 0!==(e.mode&1)&&0===(e.flags&128)}function Lo(e){if(ko){var t=Co;if(t){var r=t;if(!Po(e,t)){if(xo(e))throw Error(o(418));t=Pi(r.nextSibling);var n=Ro;t&&Po(e,t)?Oo(n,r):(e.flags=e.flags&-4097|2,ko=!1,Ro=e)}}else{if(xo(e))throw Error(o(418));e.flags=e.flags&-4097|2;ko=!1;Ro=e}}}function Mo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ro=e}function No(e){if(e!==Ro)return!1;if(!ko)return Mo(e),ko=!0,!1;var t;(t=3!==e.tag)&&!(t=5!==e.tag)&&(t=e.type,t="head"!==t&&"body"!==t&&!Ti(e.type,e.memoizedProps));if(t&&(t=Co)){if(xo(e))throw Do(),Error(o(418));for(;t;)Oo(e,t),t=Pi(t.nextSibling)}Mo(e);if(13===e.tag){e=e.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(o(317));e:{e=e.nextSibling;for(t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){Co=Pi(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}Co=null}}else Co=Ro?Pi(e.stateNode.nextSibling):null;return!0}function Do(){for(var e=Co;e;)e=Pi(e.nextSibling)}function jo(){Co=Ro=null;ko=!1}function Uo(e){null===Ao?Ao=[e]:Ao.push(e)}var Vo=w.ReactCurrentBatchConfig;function Wo(e,t,r){e=r.ref;if(null!==e&&"function"!==typeof e&&"object"!==typeof e){if(r._owner){r=r._owner;if(r){if(1!==r.tag)throw Error(o(309));var n=r.stateNode}if(!n)throw Error(o(147,e));var i=n,a=""+e;if(null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a)return t.ref;t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e};t._stringRef=a;return t}if("string"!==typeof e)throw Error(o(284));if(!r._owner)throw Error(o(290,e))}return e}function Bo(e,t){e=Object.prototype.toString.call(t);throw Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Go(e){var t=e._init;return t(e._payload)}function Zo(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){e=ul(e,t);e.index=0;e.sibling=null;return e}function a(t,r,n){t.index=n;if(!e)return t.flags|=1048576,r;n=t.alternate;if(null!==n)return n=n.index,n<r?(t.flags|=2,r):n;t.flags|=2;return r}function s(t){e&&null===t.alternate&&(t.flags|=2);return t}function u(e,t,r,n){if(null===t||6!==t.tag)return t=dl(r,e.mode,n),t.return=e,t;t=i(t,r);t.return=e;return t}function c(e,t,r,n){var o=r.type;if(o===R)return f(e,t,r.props.children,n,r.key);if(null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===N&&Go(o)===t.type))return n=i(t,r.props),n.ref=Wo(e,t,r),n.return=e,n;n=cl(r.type,r.key,r.props,null,e.mode,n);n.ref=Wo(e,t,r);n.return=e;return n}function l(e,t,r,n){if(null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation)return t=hl(r,e.mode,n),t.return=e,t;t=i(t,r.children||[]);t.return=e;return t}function f(e,t,r,n,o){if(null===t||7!==t.tag)return t=ll(r,e.mode,n,o),t.return=e,t;t=i(t,r);t.return=e;return t}function d(e,t,r){if("string"===typeof t&&""!==t||"number"===typeof t)return t=dl(""+t,e.mode,r),t.return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case T:return r=cl(t.type,t.key,t.props,null,e.mode,r),r.ref=Wo(e,null,t),r.return=e,r;case I:return t=hl(t,e.mode,r),t.return=e,t;case N:var n=t._init;return d(e,n(t._payload),r)}if(oe(t)||U(t))return t=ll(t,e.mode,r,null),t.return=e,t;Bo(e,t)}return null}function h(e,t,r,n){var i=null!==t?t.key:null;if("string"===typeof r&&""!==r||"number"===typeof r)return null!==i?null:u(e,t,""+r,n);if("object"===typeof r&&null!==r){switch(r.$$typeof){case T:return r.key===i?c(e,t,r,n):null;case I:return r.key===i?l(e,t,r,n):null;case N:return i=r._init,h(e,t,i(r._payload),n)}if(oe(r)||U(r))return null!==i?null:f(e,t,r,n,null);Bo(e,r)}return null}function p(e,t,r,n,i){if("string"===typeof n&&""!==n||"number"===typeof n)return e=e.get(r)||null,u(t,e,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case T:return e=e.get(null===n.key?r:n.key)||null,c(t,e,n,i);case I:return e=e.get(null===n.key?r:n.key)||null,l(t,e,n,i);case N:var o=n._init;return p(e,t,r,o(n._payload),i)}if(oe(n)||U(n))return e=e.get(r)||null,f(t,e,n,i,null);Bo(t,n)}return null}function v(i,o,s,u){for(var c=null,l=null,f=o,v=o=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=h(i,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f);o=a(y,o,v);null===l?c=y:l.sibling=y;l=y;f=m}if(v===s.length)return r(i,f),ko&&Eo(i,v),c;if(null===f){for(;v<s.length;v++)f=d(i,s[v],u),null!==f&&(o=a(f,o,v),null===l?c=f:l.sibling=f,l=f);ko&&Eo(i,v);return c}for(f=n(i,f);v<s.length;v++)m=p(f,i,v,s[v],u),null!==m&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),o=a(m,o,v),null===l?c=m:l.sibling=m,l=m);e&&f.forEach((function(e){return t(i,e)}));ko&&Eo(i,v);return c}function m(i,s,u,c){var l=U(u);if("function"!==typeof l)throw Error(o(150));u=l.call(u);if(null==u)throw Error(o(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=h(i,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v);s=a(b,s,m);null===f?l=b:f.sibling=b;f=b;v=y}if(g.done)return r(i,v),ko&&Eo(i,m),l;if(null===v){for(;!g.done;m++,g=u.next())g=d(i,g.value,c),null!==g&&(s=a(g,s,m),null===f?l=g:f.sibling=g,f=g);ko&&Eo(i,m);return l}for(v=n(i,v);!g.done;m++,g=u.next())g=p(v,i,m,g.value,c),null!==g&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=a(g,s,m),null===f?l=g:f.sibling=g,f=g);e&&v.forEach((function(e){return t(i,e)}));ko&&Eo(i,m);return l}function y(e,n,o,a){"object"===typeof o&&null!==o&&o.type===R&&null===o.key&&(o=o.props.children);if("object"===typeof o&&null!==o){switch(o.$$typeof){case T:e:{for(var u=o.key,c=n;null!==c;){if(c.key===u){u=o.type;if(u===R){if(7===c.tag){r(e,c.sibling);n=i(c,o.props.children);n.return=e;e=n;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===N&&Go(u)===c.type){r(e,c.sibling);n=i(c,o.props);n.ref=Wo(e,c,o);n.return=e;e=n;break e}r(e,c);break}else t(e,c);c=c.sibling}o.type===R?(n=ll(o.props.children,e.mode,a,o.key),n.return=e,e=n):(a=cl(o.type,o.key,o.props,null,e.mode,a),a.ref=Wo(e,n,o),a.return=e,e=a)}return s(e);case I:e:{for(c=o.key;null!==n;){if(n.key===c)if(4===n.tag&&n.stateNode.containerInfo===o.containerInfo&&n.stateNode.implementation===o.implementation){r(e,n.sibling);n=i(n,o.children||[]);n.return=e;e=n;break e}else{r(e,n);break}else t(e,n);n=n.sibling}n=hl(o,e.mode,a);n.return=e;e=n}return s(e);case N:return c=o._init,y(e,n,c(o._payload),a)}if(oe(o))return v(e,n,o,a);if(U(o))return m(e,n,o,a);Bo(e,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==n&&6===n.tag?(r(e,n.sibling),n=i(n,o),n.return=e,e=n):(r(e,n),n=dl(o,e.mode,a),n.return=e,e=n),s(e)):r(e,n)}return y}var Fo=Zo(!0),Ho=Zo(!1),Xo=Xi(null),Yo=null,Ko=null,zo=null;function Jo(){zo=Ko=Yo=null}function Qo(e){var t=Xo.current;Yi(Xo);e._currentValue=t}function qo(e,t,r){for(;null!==e;){var n=e.alternate;(e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t);if(e===r)break;e=e.return}}function $o(e,t){Yo=e;zo=Ko=null;e=e.dependencies;null!==e&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Gs=!0),e.firstContext=null)}function ea(e){var t=e._currentValue;if(zo!==e)if(e={context:e,memoizedValue:t,next:null},null===Ko){if(null===Yo)throw Error(o(308));Ko=e;Yo.dependencies={lanes:0,firstContext:e}}else Ko=Ko.next=e;return t}var ta=null;function ra(e){null===ta?ta=[e]:ta.push(e)}function na(e,t,r,n){var i=t.interleaved;null===i?(r.next=r,ra(t)):(r.next=i.next,i.next=r);t.interleaved=r;return ia(e,n)}function ia(e,t){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t);r=e;for(e=e.return;null!==e;)e.childLanes|=t,r=e.alternate,null!==r&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var oa=!1;function aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sa(e,t){e=e.updateQueue;t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ua(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ca(e,t,r){var n=e.updateQueue;if(null===n)return null;n=n.shared;if(0!==($u&2)){var i=n.pending;null===i?t.next=t:(t.next=i.next,i.next=t);n.pending=t;return ia(e,r)}i=n.interleaved;null===i?(t.next=t,ra(n)):(t.next=i.next,i.next=t);n.interleaved=t;return ia(e,r)}function la(e,t,r){t=t.updateQueue;if(null!==t&&(t=t.shared,0!==(r&4194240))){var n=t.lanes;n&=e.pendingLanes;r|=n;t.lanes=r;Ct(e,r)}}function fa(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&(n=n.updateQueue,r===n)){var i=null,o=null;r=r.firstBaseUpdate;if(null!==r){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=a:o=o.next=a;r=r.next}while(null!==r);null===o?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects};e.updateQueue=r;return}e=r.lastBaseUpdate;null===e?r.firstBaseUpdate=t:e.next=t;r.lastBaseUpdate=t}function da(e,t,r,n){var i=e.updateQueue;oa=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,c=u.next;u.next=null;null===a?o=c:a.next=c;a=u;var l=e.alternate;null!==l&&(l=l.updateQueue,s=l.lastBaseUpdate,s!==a&&(null===s?l.firstBaseUpdate=c:s.next=c,l.lastBaseUpdate=u))}if(null!==o){var f=i.baseState;a=0;l=c=u=null;s=o;do{var d=s.lane,h=s.eventTime;if((n&d)===d){null!==l&&(l=l.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;d=t;h=r;switch(v.tag){case 1:p=v.payload;if("function"===typeof p){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:p=v.payload;d="function"===typeof p?p.call(h,f,d):p;if(null===d||void 0===d)break e;f=V({},f,d);break e;case 2:oa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,d=i.effects,null===d?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(c=l=h,u=f):l=l.next=h,a|=d;s=s.next;if(null===s)if(s=i.shared.pending,null===s)break;else d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}while(1);null===l&&(u=f);i.baseState=u;i.firstBaseUpdate=c;i.lastBaseUpdate=l;t=i.shared.interleaved;if(null!==t){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);sc|=a;e.lanes=a;e.memoizedState=f}}function ha(e,t,r){e=t.effects;t.effects=null;if(null!==e)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(null!==i){n.callback=null;n=r;if("function"!==typeof i)throw Error(o(191,i));i.call(n)}}}var pa={},va=Xi(pa),ma=Xi(pa),ya=Xi(pa);function ga(e){if(e===pa)throw Error(o(174));return e}function ba(e,t){Ki(ya,t);Ki(ma,e);Ki(va,pa);e=t.nodeType;switch(e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:de(null,"");break;default:e=8===e?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=de(t,e)}Yi(va);Ki(va,t)}function _a(){Yi(va);Yi(ma);Yi(ya)}function Sa(e){ga(ya.current);var t=ga(va.current);var r=de(t,e.type);t!==r&&(Ki(ma,e),Ki(va,r))}function Ea(e){ma.current===e&&(Yi(va),Yi(ma))}var wa=Xi(0);function Ta(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(r=r.dehydrated,null===r||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(t.flags&128))return t}else if(null!==t.child){t.child.return=t;t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return;t=t.sibling}return null}var Ia=[];function Ra(){for(var e=0;e<Ia.length;e++)Ia[e]._workInProgressVersionPrimary=null;Ia.length=0}var Ca=w.ReactCurrentDispatcher,ka=w.ReactCurrentBatchConfig,Aa=0,Oa=null,Pa=null,xa=null,La=!1,Ma=!1,Na=0,Da=0;function ja(){throw Error(o(321))}function Ua(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Cn(e[r],t[r]))return!1;return!0}function Va(e,t,r,n,i,a){Aa=a;Oa=t;t.memoizedState=null;t.updateQueue=null;t.lanes=0;Ca.current=null===e||null===e.memoizedState?Es:ws;e=r(n,i);if(Ma){a=0;do{Ma=!1;Na=0;if(25<=a)throw Error(o(301));a+=1;xa=Pa=null;t.updateQueue=null;Ca.current=Ts;e=r(n,i)}while(Ma)}Ca.current=Ss;t=null!==Pa&&null!==Pa.next;Aa=0;xa=Pa=Oa=null;La=!1;if(t)throw Error(o(300));return e}function Wa(){var e=0!==Na;Na=0;return e}function Ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===xa?Oa.memoizedState=xa=e:xa=xa.next=e;return xa}function Ga(){if(null===Pa){var e=Oa.alternate;e=null!==e?e.memoizedState:null}else e=Pa.next;var t=null===xa?Oa.memoizedState:xa.next;if(null!==t)xa=t,Pa=e;else{if(null===e)throw Error(o(310));Pa=e;e={memoizedState:Pa.memoizedState,baseState:Pa.baseState,baseQueue:Pa.baseQueue,queue:Pa.queue,next:null};null===xa?Oa.memoizedState=xa=e:xa=xa.next=e}return xa}function Za(e,t){return"function"===typeof t?t(e):t}function Fa(e){var t=Ga(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=Pa,i=n.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next;a.next=s}n.baseQueue=i=a;r.pending=null}if(null!==i){a=i.next;n=n.baseState;var u=s=null,c=null,l=a;do{var f=l.lane;if((Aa&f)===f)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.hasEagerState?l.eagerState:e(n,l.action);else{var d={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(u=c=d,s=n):c=c.next=d;Oa.lanes|=f;sc|=f}l=l.next}while(null!==l&&l!==a);null===c?s=n:c.next=u;Cn(n,t.memoizedState)||(Gs=!0);t.memoizedState=n;t.baseState=s;t.baseQueue=c;r.lastRenderedState=n}e=r.interleaved;if(null!==e){i=e;do{a=i.lane,Oa.lanes|=a,sc|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ha(e){var t=Ga(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);Cn(a,t.memoizedState)||(Gs=!0);t.memoizedState=a;null===t.baseQueue&&(t.baseState=a);r.lastRenderedState=a}return[a,n]}function Xa(){}function Ya(e,t){var r=Oa,n=Ga(),i=t(),a=!Cn(n.memoizedState,i);a&&(n.memoizedState=i,Gs=!0);n=n.queue;os(Ja.bind(null,r,n,e),[e]);if(n.getSnapshot!==t||a||null!==xa&&xa.memoizedState.tag&1){r.flags|=2048;es(9,za.bind(null,r,n,i,t),void 0,null);if(null===ec)throw Error(o(349));0!==(Aa&30)||Ka(r,t,i)}return i}function Ka(e,t,r){e.flags|=16384;e={getSnapshot:t,value:r};t=Oa.updateQueue;null===t?(t={lastEffect:null,stores:null},Oa.updateQueue=t,t.stores=[e]):(r=t.stores,null===r?t.stores=[e]:r.push(e))}function za(e,t,r,n){t.value=r;t.getSnapshot=n;Qa(t)&&qa(e)}function Ja(e,t,r){return r((function(){Qa(t)&&qa(e)}))}function Qa(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Cn(e,r)}catch(e){return!0}}function qa(e){var t=ia(e,1);null!==t&&Cc(t,e,1,-1)}function $a(e){var t=Ba();"function"===typeof e&&(e=e());t.memoizedState=t.baseState=e;e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Za,lastRenderedState:e};t.queue=e;e=e.dispatch=ys.bind(null,Oa,e);return[t.memoizedState,e]}function es(e,t,r,n){e={tag:e,create:t,destroy:r,deps:n,next:null};t=Oa.updateQueue;null===t?(t={lastEffect:null,stores:null},Oa.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,null===r?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e));return e}function ts(){return Ga().memoizedState}function rs(e,t,r,n){var i=Ba();Oa.flags|=e;i.memoizedState=es(1|t,r,void 0,void 0===n?null:n)}function ns(e,t,r,n){var i=Ga();n=void 0===n?null:n;var o=void 0;if(null!==Pa){var a=Pa.memoizedState;o=a.destroy;if(null!==n&&Ua(n,a.deps)){i.memoizedState=es(t,r,o,n);return}}Oa.flags|=e;i.memoizedState=es(1|t,r,o,n)}function is(e,t){return rs(8390656,8,e,t)}function os(e,t){return ns(2048,8,e,t)}function as(e,t){return ns(4,2,e,t)}function ss(e,t){return ns(4,4,e,t)}function us(e,t){if("function"===typeof t)return e=e(),t(e),function(){t(null)};if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,r){r=null!==r&&void 0!==r?r.concat([e]):null;return ns(4,4,us.bind(null,t,e),r)}function ls(){}function fs(e,t){var r=Ga();t=void 0===t?null:t;var n=r.memoizedState;if(null!==n&&null!==t&&Ua(t,n[1]))return n[0];r.memoizedState=[e,t];return e}function ds(e,t){var r=Ga();t=void 0===t?null:t;var n=r.memoizedState;if(null!==n&&null!==t&&Ua(t,n[1]))return n[0];e=e();r.memoizedState=[e,t];return e}function hs(e,t,r){if(0===(Aa&21))return e.baseState&&(e.baseState=!1,Gs=!0),e.memoizedState=r;Cn(r,t)||(r=wt(),Oa.lanes|=r,sc|=r,e.baseState=!0);return t}function ps(e,t){var r=kt;kt=0!==r&&4>r?r:4;e(!0);var n=ka.transition;ka.transition={};try{e(!1),t()}finally{kt=r,ka.transition=n}}function vs(){return Ga().memoizedState}function ms(e,t,r){var n=Rc(e);r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(gs(e))bs(t,r);else if(r=na(e,t,r,n),null!==r){var i=Ic();Cc(r,e,n,i);_s(r,t,n)}}function ys(e,t,r){var n=Rc(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(gs(e))bs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&(o=t.lastRenderedReducer,null!==o))try{var a=t.lastRenderedState,s=o(a,r);i.hasEagerState=!0;i.eagerState=s;if(Cn(s,a)){var u=t.interleaved;null===u?(i.next=i,ra(t)):(i.next=u.next,u.next=i);t.interleaved=i;return}}catch(e){}finally{}r=na(e,t,i,n);null!==r&&(i=Ic(),Cc(r,e,n,i),_s(r,t,n))}}function gs(e){var t=e.alternate;return e===Oa||null!==t&&t===Oa}function bs(e,t){Ma=La=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t);e.pending=t}function _s(e,t,r){if(0!==(r&4194240)){var n=t.lanes;n&=e.pendingLanes;r|=n;t.lanes=r;Ct(e,r)}}var Ss={readContext:ea,useCallback:ja,useContext:ja,useEffect:ja,useImperativeHandle:ja,useInsertionEffect:ja,useLayoutEffect:ja,useMemo:ja,useReducer:ja,useRef:ja,useState:ja,useDebugValue:ja,useDeferredValue:ja,useTransition:ja,useMutableSource:ja,useSyncExternalStore:ja,useId:ja,unstable_isNewReconciler:!1},Es={readContext:ea,useCallback:function(e,t){Ba().memoizedState=[e,void 0===t?null:t];return e},useContext:ea,useEffect:is,useImperativeHandle:function(e,t,r){r=null!==r&&void 0!==r?r.concat([e]):null;return rs(4194308,4,us.bind(null,t,e),r)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){return rs(4,2,e,t)},useMemo:function(e,t){var r=Ba();t=void 0===t?null:t;e=e();r.memoizedState=[e,t];return e},useReducer:function(e,t,r){var n=Ba();t=void 0!==r?r(t):t;n.memoizedState=n.baseState=t;e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t};n.queue=e;e=e.dispatch=ms.bind(null,Oa,e);return[n.memoizedState,e]},useRef:function(e){var t=Ba();e={current:e};return t.memoizedState=e},useState:$a,useDebugValue:ls,useDeferredValue:function(e){return Ba().memoizedState=e},useTransition:function(){var e=$a(!1),t=e[0];e=ps.bind(null,e[1]);Ba().memoizedState=e;return[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Oa,i=Ba();if(ko){if(void 0===r)throw Error(o(407));r=r()}else{r=t();if(null===ec)throw Error(o(349));0!==(Aa&30)||Ka(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};i.queue=a;is(Ja.bind(null,n,a,e),[e]);n.flags|=2048;es(9,za.bind(null,n,a,r,t),void 0,null);return r},useId:function(){var e=Ba(),t=ec.identifierPrefix;if(ko){var r=So;var n=_o;r=(n&~(1<<32-dt(n)-1)).toString(32)+r;t=":"+t+"R"+r;r=Na++;0<r&&(t+="H"+r.toString(32));t+=":"}else r=Da++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ws={readContext:ea,useCallback:fs,useContext:ea,useEffect:os,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:ss,useMemo:ds,useReducer:Fa,useRef:ts,useState:function(){return Fa(Za)},useDebugValue:ls,useDeferredValue:function(e){var t=Ga();return hs(t,Pa.memoizedState,e)},useTransition:function(){var e=Fa(Za)[0],t=Ga().memoizedState;return[e,t]},useMutableSource:Xa,useSyncExternalStore:Ya,useId:vs,unstable_isNewReconciler:!1},Ts={readContext:ea,useCallback:fs,useContext:ea,useEffect:os,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:ss,useMemo:ds,useReducer:Ha,useRef:ts,useState:function(){return Ha(Za)},useDebugValue:ls,useDeferredValue:function(e){var t=Ga();return null===Pa?t.memoizedState=e:hs(t,Pa.memoizedState,e)},useTransition:function(){var e=Ha(Za)[0],t=Ga().memoizedState;return[e,t]},useMutableSource:Xa,useSyncExternalStore:Ya,useId:vs,unstable_isNewReconciler:!1};function Is(e,t){if(e&&e.defaultProps){t=V({},t);e=e.defaultProps;for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t}return t}function Rs(e,t,r,n){t=e.memoizedState;r=r(n,t);r=null===r||void 0===r?t:V({},t,r);e.memoizedState=r;0===e.lanes&&(e.updateQueue.baseState=r)}var Cs={isMounted:function(e){return(e=e._reactInternals)?Xe(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ic(),i=Rc(e),o=ua(n,i);o.payload=t;void 0!==r&&null!==r&&(o.callback=r);t=ca(e,o,i);null!==t&&(Cc(t,e,i,n),la(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ic(),i=Rc(e),o=ua(n,i);o.tag=1;o.payload=t;void 0!==r&&null!==r&&(o.callback=r);t=ca(e,o,i);null!==t&&(Cc(t,e,i,n),la(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ic(),n=Rc(e),i=ua(r,n);i.tag=2;void 0!==t&&null!==t&&(i.callback=t);t=ca(e,i,n);null!==t&&(Cc(t,e,n,r),la(t,e,n))}};function ks(e,t,r,n,i,o,a){e=e.stateNode;return"function"===typeof e.shouldComponentUpdate?e.shouldComponentUpdate(n,o,a):t.prototype&&t.prototype.isPureReactComponent?!kn(r,n)||!kn(i,o):!0}function As(e,t,r){var n=!1,i=zi;var o=t.contextType;"object"===typeof o&&null!==o?o=ea(o):(i=eo(t)?qi:Ji.current,n=t.contextTypes,o=(n=null!==n&&void 0!==n)?$i(e,i):zi);t=new t(r,o);e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null;t.updater=Cs;e.stateNode=t;t._reactInternals=e;n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o);return t}function Os(e,t,r,n){e=t.state;"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n);"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n);t.state!==e&&Cs.enqueueReplaceState(t,t.state,null)}function Ps(e,t,r,n){var i=e.stateNode;i.props=r;i.state=e.memoizedState;i.refs={};aa(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ea(o):(o=eo(t)?qi:Ji.current,i.context=$i(e,o));i.state=e.memoizedState;o=t.getDerivedStateFromProps;"function"===typeof o&&(Rs(e,t,o,r),i.state=e.memoizedState);"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Cs.enqueueReplaceState(i,i.state,null),da(e,r,i,n),i.state=e.memoizedState);"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function xs(e,t){try{var r="",n=t;do{r+=F(n),n=n.return}while(n);var i=r}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ls(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function Ms(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Ns="function"===typeof WeakMap?WeakMap:Map;function Ds(e,t,r){r=ua(-1,r);r.tag=3;r.payload={element:null};var n=t.value;r.callback=function(){vc||(vc=!0,mc=n);Ms(e,t)};return r}function js(e,t,r){r=ua(-1,r);r.tag=3;var n=e.type.getDerivedStateFromError;if("function"===typeof n){var i=t.value;r.payload=function(){return n(i)};r.callback=function(){Ms(e,t)}}var o=e.stateNode;null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){Ms(e,t);"function"!==typeof n&&(null===yc?yc=new Set([this]):yc.add(this));var r=t.stack;this.componentDidCatch(t.value,{componentStack:null!==r?r:""})});return r}function Us(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new Ns;var i=new Set;n.set(t,i)}else i=n.get(t),void 0===i&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=qc.bind(null,e,t,r),t.then(e,e))}function Vs(e){do{var t;if(t=13===e.tag)t=e.memoizedState,t=null!==t?null!==t.dehydrated?!0:!1:!0;if(t)return e;e=e.return}while(null!==e);return null}function Ws(e,t,r,n,i){if(0===(e.mode&1))return e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:(t=ua(-1,1),t.tag=2,ca(r,t,1))),r.lanes|=1),e;e.flags|=65536;e.lanes=i;return e}var Bs=w.ReactCurrentOwner,Gs=!1;function Zs(e,t,r,n){t.child=null===e?Ho(t,null,r,n):Fo(t,e.child,r,n)}function Fs(e,t,r,n,i){r=r.render;var o=t.ref;$o(t,i);n=Va(e,t,r,n,o,i);r=Wa();if(null!==e&&!Gs)return t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lu(e,t,i);ko&&r&&To(t);t.flags|=1;Zs(e,t,n,i);return t.child}function Hs(e,t,r,n,i){if(null===e){var o=r.type;if("function"===typeof o&&!al(o)&&void 0===o.defaultProps&&null===r.compare&&void 0===r.defaultProps)return t.tag=15,t.type=o,Xs(e,t,o,n,i);e=cl(r.type,null,n,t,t.mode,i);e.ref=t.ref;e.return=t;return t.child=e}o=e.child;if(0===(e.lanes&i)){var a=o.memoizedProps;r=r.compare;r=null!==r?r:kn;if(r(a,n)&&e.ref===t.ref)return lu(e,t,i)}t.flags|=1;e=ul(o,n);e.ref=t.ref;e.return=t;return t.child=e}function Xs(e,t,r,n,i){if(null!==e){var o=e.memoizedProps;if(kn(o,n)&&e.ref===t.ref)if(Gs=!1,t.pendingProps=n=o,0!==(e.lanes&i))0!==(e.flags&131072)&&(Gs=!0);else return t.lanes=e.lanes,lu(e,t,i)}return zs(e,t,r,n,i)}function Ys(e,t,r){var n=t.pendingProps,i=n.children,o=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(0===(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ki(ic,nc),nc|=r;else{if(0===(r&1073741824))return e=null!==o?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ki(ic,nc),nc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null};n=null!==o?o.baseLanes:r;Ki(ic,nc);nc|=n}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,Ki(ic,nc),nc|=n;Zs(e,t,i,r);return t.child}function Ks(e,t){var r=t.ref;if(null===e&&null!==r||null!==e&&e.ref!==r)t.flags|=512,t.flags|=2097152}function zs(e,t,r,n,i){var o=eo(r)?qi:Ji.current;o=$i(t,o);$o(t,i);r=Va(e,t,r,n,o,i);n=Wa();if(null!==e&&!Gs)return t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lu(e,t,i);ko&&n&&To(t);t.flags|=1;Zs(e,t,r,i);return t.child}function Js(e,t,r,n,i){if(eo(r)){var o=!0;io(t)}else o=!1;$o(t,i);if(null===t.stateNode)cu(e,t),As(t,r,n),Ps(t,r,n,i),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=r.contextType;"object"===typeof c&&null!==c?c=ea(c):(c=eo(r)?qi:Ji.current,c=$i(t,c));var l=r.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==n||u!==c)&&Os(t,a,n,c);oa=!1;var d=t.memoizedState;a.state=d;da(t,n,a,i);u=t.memoizedState;s!==n||d!==u||Qi.current||oa?("function"===typeof l&&(Rs(t,r,l,n),u=t.memoizedState),(s=oa||ks(t,r,s,n,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=c,n=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode;sa(e,t);s=t.memoizedProps;c=t.type===t.elementType?s:Is(t.type,s);a.props=c;f=t.pendingProps;d=a.context;u=r.contextType;"object"===typeof u&&null!==u?u=ea(u):(u=eo(r)?qi:Ji.current,u=$i(t,u));var h=r.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==u)&&Os(t,a,n,u);oa=!1;d=t.memoizedState;a.state=d;da(t,n,a,i);var p=t.memoizedState;s!==f||d!==p||Qi.current||oa?("function"===typeof h&&(Rs(t,r,h,n),p=t.memoizedState),(c=oa||ks(t,r,c,n,d,p,u)||!1)?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(n,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,p,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=u,n=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return Qs(e,t,r,n,o,i)}function Qs(e,t,r,n,i,o){Ks(e,t);var a=0!==(t.flags&128);if(!n&&!a)return i&&oo(t,r,!1),lu(e,t,o);n=t.stateNode;Bs.current=t;var s=a&&"function"!==typeof r.getDerivedStateFromError?null:n.render();t.flags|=1;null!==e&&a?(t.child=Fo(t,e.child,null,o),t.child=Fo(t,null,s,o)):Zs(e,t,s,o);t.memoizedState=n.state;i&&oo(t,r,!0);return t.child}function qs(e){var t=e.stateNode;t.pendingContext?ro(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ro(e,t.context,!1);ba(e,t.containerInfo)}function $s(e,t,r,n,i){jo();Uo(i);t.flags|=256;Zs(e,t,r,n);return t.child}var eu={dehydrated:null,treeContext:null,retryLane:0};function tu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ru(e,t,r){var n=t.pendingProps,i=wa.current,o=!1,a=0!==(t.flags&128),s;(s=a)||(s=null!==e&&null===e.memoizedState?!1:0!==(i&2));if(s)o=!0,t.flags&=-129;else if(null===e||null!==e.memoizedState)i|=1;Ki(wa,i&1);if(null===e){Lo(t);e=t.memoizedState;if(null!==e&&(e=e.dehydrated,null!==e))return 0===(t.mode&1)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null;a=n.children;e=n.fallback;return o?(n=t.mode,o=t.child,a={mode:"hidden",children:a},0===(n&1)&&null!==o?(o.childLanes=0,o.pendingProps=a):o=fl(a,n,0,null),e=ll(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=tu(r),t.memoizedState=eu,e):nu(t,a)}i=e.memoizedState;if(null!==i&&(s=i.dehydrated,null!==s))return ou(e,t,a,n,s,i,r);if(o){o=n.fallback;a=t.mode;i=e.child;s=i.sibling;var u={mode:"hidden",children:n.children};0===(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=ul(i,u),n.subtreeFlags=i.subtreeFlags&14680064);null!==s?o=ul(s,o):(o=ll(o,a,r,null),o.flags|=2);o.return=t;n.return=t;n.sibling=o;t.child=n;n=o;o=t.child;a=e.child.memoizedState;a=null===a?tu(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions};o.memoizedState=a;o.childLanes=e.childLanes&~r;t.memoizedState=eu;return n}o=e.child;e=o.sibling;n=ul(o,{mode:"visible",children:n.children});0===(t.mode&1)&&(n.lanes=r);n.return=t;n.sibling=null;null!==e&&(r=t.deletions,null===r?(t.deletions=[e],t.flags|=16):r.push(e));t.child=n;t.memoizedState=null;return n}function nu(e,t){t=fl({mode:"visible",children:t},e.mode,0,null);t.return=e;return e.child=t}function iu(e,t,r,n){null!==n&&Uo(n);Fo(t,e.child,null,r);e=nu(t,t.pendingProps.children);e.flags|=2;t.memoizedState=null;return e}function ou(e,t,r,n,i,a,s){if(r){if(t.flags&256)return t.flags&=-257,n=Ls(Error(o(422))),iu(e,t,s,n);if(null!==t.memoizedState)return t.child=e.child,t.flags|=128,null;a=n.fallback;i=t.mode;n=fl({mode:"visible",children:n.children},i,0,null);a=ll(a,i,s,null);a.flags|=2;n.return=t;a.return=t;n.sibling=a;t.child=n;0!==(t.mode&1)&&Fo(t,e.child,null,s);t.child.memoizedState=tu(s);t.memoizedState=eu;return a}if(0===(t.mode&1))return iu(e,t,s,null);if("$!"===i.data){n=i.nextSibling&&i.nextSibling.dataset;if(n)var u=n.dgst;n=u;a=Error(o(419));n=Ls(a,n,void 0);return iu(e,t,s,n)}u=0!==(s&e.childLanes);if(Gs||u){n=ec;if(null!==n){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=0!==(i&(n.suspendedLanes|s))?0:i;0!==i&&i!==a.retryLane&&(a.retryLane=i,ia(e,i),Cc(n,e,i,-1))}Bc();n=Ls(Error(o(421)));return iu(e,t,s,n)}if("$?"===i.data)return t.flags|=128,t.child=e.child,t=el.bind(null,e),i._reactRetry=t,null;e=a.treeContext;Co=Pi(i.nextSibling);Ro=t;ko=!0;Ao=null;null!==e&&(yo[go++]=_o,yo[go++]=So,yo[go++]=bo,_o=e.id,So=e.overflow,bo=t);t=nu(t,n.children);t.flags|=4096;return t}function au(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t);qo(e.return,t,r)}function su(e,t,r,n,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function uu(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;Zs(e,t,n.children,r);n=wa.current;if(0!==(n&2))n=n&1|2,t.flags|=128;else{if(null!==e&&0!==(e.flags&128))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&au(e,r,t);else if(19===e.tag)au(e,r,t);else if(null!==e.child){e.child.return=e;e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return;e=e.sibling}n&=1}Ki(wa,n);if(0===(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":r=t.child;for(i=null;null!==r;)e=r.alternate,null!==e&&null===Ta(e)&&(i=r),r=r.sibling;r=i;null===r?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null);su(t,!1,i,r,o);break;case"backwards":r=null;i=t.child;for(t.child=null;null!==i;){e=i.alternate;if(null!==e&&null===Ta(e)){t.child=i;break}e=i.sibling;i.sibling=r;r=i;i=e}su(t,!0,r,null,o);break;case"together":su(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cu(e,t){0===(t.mode&1)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function lu(e,t,r){null!==e&&(t.dependencies=e.dependencies);sc|=t.lanes;if(0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){e=t.child;r=ul(e,e.pendingProps);t.child=r;for(r.return=t;null!==e.sibling;)e=e.sibling,r=r.sibling=ul(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function fu(e,t,r){switch(t.tag){case 3:qs(t);jo();break;case 5:Sa(t);break;case 1:eo(t.type)&&io(t);break;case 4:ba(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Ki(Xo,n._currentValue);n._currentValue=i;break;case 13:n=t.memoizedState;if(null!==n){if(null!==n.dehydrated)return Ki(wa,wa.current&1),t.flags|=128,null;if(0!==(r&t.child.childLanes))return ru(e,t,r);Ki(wa,wa.current&1);e=lu(e,t,r);return null!==e?e.sibling:null}Ki(wa,wa.current&1);break;case 19:n=0!==(r&t.childLanes);if(0!==(e.flags&128)){if(n)return uu(e,t,r);t.flags|=128}i=t.memoizedState;null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null);Ki(wa,wa.current);if(n)break;else return null;case 22:case 23:return t.lanes=0,Ys(e,t,r)}return lu(e,t,r)}var du,hu,pu,vu;du=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r;r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return;r=r.sibling}};hu=function(){};pu=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode;ga(va.current);var o=null;switch(r){case"input":i=$(e,i);n=$(e,n);o=[];break;case"select":i=V({},i,{value:void 0});n=V({},n,{value:void 0});o=[];break;case"textarea":i=se(e,i);n=se(e,n);o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof n.onClick&&(e.onclick=Si)}Se(r,n);var a;r=null;for(l in i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var u=i[l];for(a in u)u.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in n){var c=n[l];u=null!=i?i[l]:void 0;if(n.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(o||(o=[]),o.push(l,r)),r=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&si("scroll",e),o||u===c||(o=[])):(o=o||[]).push(l,c))}r&&(o=o||[]).push("style",r);var l=o;if(t.updateQueue=l)t.flags|=4}};vu=function(e,t,r,n){r!==n&&(t.flags|=4)};function mu(e,t){if(!ko)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function yu(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;e.subtreeFlags|=n;e.childLanes=r;return t}function gu(e,t,r){var n=t.pendingProps;Io(t);switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yu(t),null;case 1:return eo(t.type)&&to(),yu(t),null;case 3:n=t.stateNode;_a();Yi(Qi);Yi(Ji);Ra();n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null);if(null===e||null===e.child)No(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(t.flags&256)||(t.flags|=1024,null!==Ao&&(Pc(Ao),Ao=null));hu(e,t);yu(t);return null;case 5:Ea(t);var i=ga(ya.current);r=t.type;if(null!==e&&null!=t.stateNode)pu(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(o(166));yu(t);return null}e=ga(va.current);if(No(t)){n=t.stateNode;r=t.type;var a=t.memoizedProps;n[Mi]=t;n[Ni]=a;e=0!==(t.mode&1);switch(r){case"dialog":si("cancel",n);si("close",n);break;case"iframe":case"object":case"embed":si("load",n);break;case"video":case"audio":for(i=0;i<ni.length;i++)si(ni[i],n);break;case"source":si("error",n);break;case"img":case"image":case"link":si("error",n);si("load",n);break;case"details":si("toggle",n);break;case"input":ee(n,a);si("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple};si("invalid",n);break;case"textarea":ue(n,a),si("invalid",n)}Se(r,a);i=null;for(var u in a)if(a.hasOwnProperty(u)){var c=a[u];"children"===u?"string"===typeof c?n.textContent!==c&&(!0!==a.suppressHydrationWarning&&_i(n.textContent,c,e),i=["children",c]):"number"===typeof c&&n.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&_i(n.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(u)&&null!=c&&"onScroll"===u&&si("scroll",n)}switch(r){case"input":J(n);ne(n,a,!0);break;case"textarea":J(n);le(n);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(n.onclick=Si)}n=i;t.updateQueue=n;null!==n&&(t.flags|=4)}else{u=9===i.nodeType?i:i.ownerDocument;"http://www.w3.org/1999/xhtml"===e&&(e=fe(r));"http://www.w3.org/1999/xhtml"===e?"script"===r?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof n.is?e=u.createElement(r,{is:n.is}):(e=u.createElement(r),"select"===r&&(u=e,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):e=u.createElementNS(e,r);e[Mi]=t;e[Ni]=n;du(e,t,!1,!1);t.stateNode=e;e:{u=Ee(r,n);switch(r){case"dialog":si("cancel",e);si("close",e);i=n;break;case"iframe":case"object":case"embed":si("load",e);i=n;break;case"video":case"audio":for(i=0;i<ni.length;i++)si(ni[i],e);i=n;break;case"source":si("error",e);i=n;break;case"img":case"image":case"link":si("error",e);si("load",e);i=n;break;case"details":si("toggle",e);i=n;break;case"input":ee(e,n);i=$(e,n);si("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple};i=V({},n,{value:void 0});si("invalid",e);break;case"textarea":ue(e,n);i=se(e,n);si("invalid",e);break;default:i=n}Se(r,i);c=i;for(a in c)if(c.hasOwnProperty(a)){var l=c[a];"style"===a?be(e,l):"dangerouslySetInnerHTML"===a?(l=l?l.__html:void 0,null!=l&&pe(e,l)):"children"===a?"string"===typeof l?("textarea"!==r||""!==l)&&ve(e,l):"number"===typeof l&&ve(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=l&&"onScroll"===a&&si("scroll",e):null!=l&&E(e,a,l,u))}switch(r){case"input":J(e);ne(e,n,!1);break;case"textarea":J(e);le(e);break;case"option":null!=n.value&&e.setAttribute("value",""+Y(n.value));break;case"select":e.multiple=!!n.multiple;a=n.value;null!=a?ae(e,!!n.multiple,a,!1):null!=n.defaultValue&&ae(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Si)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}yu(t);return null;case 6:if(e&&null!=t.stateNode)vu(e,t,e.memoizedProps,n);else{if("string"!==typeof n&&null===t.stateNode)throw Error(o(166));r=ga(ya.current);ga(va.current);if(No(t)){n=t.stateNode;r=t.memoizedProps;n[Mi]=t;if(a=n.nodeValue!==r)if(e=Ro,null!==e)switch(e.tag){case 3:_i(n.nodeValue,r,0!==(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&_i(n.nodeValue,r,0!==(e.mode&1))}a&&(t.flags|=4)}else n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n),n[Mi]=t,t.stateNode=n}yu(t);return null;case 13:Yi(wa);n=t.memoizedState;if(null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ko&&null!==Co&&0!==(t.mode&1)&&0===(t.flags&128))Do(),jo(),t.flags|=98560,a=!1;else if(a=No(t),null!==n&&null!==n.dehydrated){if(null===e){if(!a)throw Error(o(318));a=t.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(o(317));a[Mi]=t}else jo(),0===(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yu(t);a=!1}else null!==Ao&&(Pc(Ao),Ao=null),a=!0;if(!a)return t.flags&65536?t:null}if(0!==(t.flags&128))return t.lanes=r,t;n=null!==n;n!==(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!==(t.mode&1)&&(null===e||0!==(wa.current&1)?0===oc&&(oc=3):Bc()));null!==t.updateQueue&&(t.flags|=4);yu(t);return null;case 4:return _a(),hu(e,t),null===e&&li(t.stateNode.containerInfo),yu(t),null;case 10:return Qo(t.type._context),yu(t),null;case 17:return eo(t.type)&&to(),yu(t),null;case 19:Yi(wa);a=t.memoizedState;if(null===a)return yu(t),null;n=0!==(t.flags&128);u=a.rendering;if(null===u)if(n)mu(a,!1);else{if(0!==oc||null!==e&&0!==(e.flags&128))for(e=t.child;null!==e;){u=Ta(e);if(null!==u){t.flags|=128;mu(a,!1);n=u.updateQueue;null!==n&&(t.updateQueue=n,t.flags|=4);t.subtreeFlags=0;n=r;for(r=t.child;null!==r;)a=r,e=n,a.flags&=14680066,u=a.alternate,null===u?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,e=u.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;Ki(wa,wa.current&1|2);return t.child}e=e.sibling}null!==a.tail&&rt()>hc&&(t.flags|=128,n=!0,mu(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ta(u),null!==e){if(t.flags|=128,n=!0,r=e.updateQueue,null!==r&&(t.updateQueue=r,t.flags|=4),mu(a,!0),null===a.tail&&"hidden"===a.tailMode&&!u.alternate&&!ko)return yu(t),null}else 2*rt()-a.renderingStartTime>hc&&1073741824!==r&&(t.flags|=128,n=!0,mu(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(r=a.last,null!==r?r.sibling=u:t.child=u,a.last=u)}if(null!==a.tail)return t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=rt(),t.sibling=null,r=wa.current,Ki(wa,n?r&1|2:r&1),t;yu(t);return null;case 22:case 23:return jc(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!==(t.mode&1)?0!==(nc&1073741824)&&(yu(t),t.subtreeFlags&6&&(t.flags|=8192)):yu(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function bu(e,t){Io(t);switch(t.tag){case 1:return eo(t.type)&&to(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(),Yi(Qi),Yi(Ji),Ra(),e=t.flags,0!==(e&65536)&&0===(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ea(t),null;case 13:Yi(wa);e=t.memoizedState;if(null!==e&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));jo()}e=t.flags;return e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yi(wa),null;case 4:return _a(),null;case 10:return Qo(t.type._context),null;case 22:case 23:return jc(),null;case 24:return null;default:return null}}var _u=!1,Su=!1,Eu="function"===typeof WeakSet?WeakSet:Set,wu=null;function Tu(e,t){var r=e.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(r){Qc(e,t,r)}else r.current=null}function Iu(e,t,r){try{r()}catch(r){Qc(e,t,r)}}var Ru=!1;function Cu(e,t){Ei=er;e=xn();if(Ln(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,u=-1,c=-1,l=0,f=0,d=e,h=null;t:for(;;){for(var p;;){d!==r||0!==i&&3!==d.nodeType||(u=s+i);d!==a||0!==n&&3!==d.nodeType||(c=s+n);3===d.nodeType&&(s+=d.nodeValue.length);if(null===(p=d.firstChild))break;h=d;d=p}for(;;){if(d===e)break t;h===r&&++l===i&&(u=s);h===a&&++f===n&&(c=s);if(null!==(p=d.nextSibling))break;d=h;h=d.parentNode}d=p}r=-1===u||-1===c?null:{start:u,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;wi={focusedElem:e,selectionRange:r};er=!1;for(wu=t;null!==wu;)if(t=wu,e=t.child,0!==(t.subtreeFlags&1028)&&null!==e)e.return=t,wu=e;else for(;null!==wu;){t=wu;try{var v=t.alternate;if(0!==(t.flags&1024))switch(t.tag){case 0:case 11:case 15:break;case 1:if(null!==v){var m=v.memoizedProps,y=v.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Is(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(e){Qc(t,t.return,e)}e=t.sibling;if(null!==e){e.return=t.return;wu=e;break}wu=t.return}v=Ru;Ru=!1;return v}function ku(e,t,r){var n=t.updateQueue;n=null!==n?n.lastEffect:null;if(null!==n){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0;void 0!==o&&Iu(t,r,o)}i=i.next}while(i!==n)}}function Au(e,t){t=t.updateQueue;t=null!==t?t.lastEffect:null;if(null!==t){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ou(e){var t=e.ref;if(null!==t){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}"function"===typeof t?t(e):t.current=e}}function Pu(e){var t=e.alternate;null!==t&&(e.alternate=null,Pu(t));e.child=null;e.deletions=null;e.sibling=null;5===e.tag&&(t=e.stateNode,null!==t&&(delete t[Mi],delete t[Ni],delete t[ji],delete t[Ui],delete t[Vi]));e.stateNode=null;e.return=null;e.dependencies=null;e.memoizedProps=null;e.memoizedState=null;e.pendingProps=null;e.stateNode=null;e.updateQueue=null}function xu(e){return 5===e.tag||3===e.tag||4===e.tag}function Lu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||xu(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(e.flags&2)continue e;if(null===e.child||4===e.tag)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mu(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,null!==r&&void 0!==r||null!==t.onclick||(t.onclick=Si));else if(4!==n&&(e=e.child,null!==e))for(Mu(e,t,r),e=e.sibling;null!==e;)Mu(e,t,r),e=e.sibling}function Nu(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&(e=e.child,null!==e))for(Nu(e,t,r),e=e.sibling;null!==e;)Nu(e,t,r),e=e.sibling}var Du=null,ju=!1;function Uu(e,t,r){for(r=r.child;null!==r;)Vu(e,t,r),r=r.sibling}function Vu(e,t,r){if(lt&&"function"===typeof lt.onCommitFiberUnmount)try{lt.onCommitFiberUnmount(ct,r)}catch(e){}switch(r.tag){case 5:Su||Tu(r,t);case 6:var n=Du,i=ju;Du=null;Uu(e,t,r);Du=n;ju=i;null!==Du&&(ju?(e=Du,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):Du.removeChild(r.stateNode));break;case 18:null!==Du&&(ju?(e=Du,r=r.stateNode,8===e.nodeType?Oi(e.parentNode,r):1===e.nodeType&&Oi(e,r),qt(e)):Oi(Du,r.stateNode));break;case 4:n=Du;i=ju;Du=r.stateNode.containerInfo;ju=!0;Uu(e,t,r);Du=n;ju=i;break;case 0:case 11:case 14:case 15:if(!Su&&(n=r.updateQueue,null!==n&&(n=n.lastEffect,null!==n))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag;void 0!==a&&(0!==(o&2)?Iu(r,t,a):0!==(o&4)&&Iu(r,t,a));i=i.next}while(i!==n)}Uu(e,t,r);break;case 1:if(!Su&&(Tu(r,t),n=r.stateNode,"function"===typeof n.componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(e){Qc(r,t,e)}Uu(e,t,r);break;case 21:Uu(e,t,r);break;case 22:r.mode&1?(Su=(n=Su)||null!==r.memoizedState,Uu(e,t,r),Su=n):Uu(e,t,r);break;default:Uu(e,t,r)}}function Wu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Eu);t.forEach((function(t){var n=tl.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function Bu(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:Du=u.stateNode;ju=!1;break e;case 3:Du=u.stateNode.containerInfo;ju=!0;break e;case 4:Du=u.stateNode.containerInfo;ju=!0;break e}u=u.return}if(null===Du)throw Error(o(160));Vu(a,s,i);Du=null;ju=!1;var c=i.alternate;null!==c&&(c.return=null);i.return=null}catch(e){Qc(i,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;null!==t;)Gu(t,e),t=t.sibling}function Gu(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bu(t,e);Zu(e);if(n&4){try{ku(3,e,e.return),Au(3,e)}catch(t){Qc(e,e.return,t)}try{ku(5,e,e.return)}catch(t){Qc(e,e.return,t)}}break;case 1:Bu(t,e);Zu(e);n&512&&null!==r&&Tu(r,r.return);break;case 5:Bu(t,e);Zu(e);n&512&&null!==r&&Tu(r,r.return);if(e.flags&32){var i=e.stateNode;try{ve(i,"")}catch(t){Qc(e,e.return,t)}}if(n&4&&(i=e.stateNode,null!=i)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,u=e.type,c=e.updateQueue;e.updateQueue=null;if(null!==c)try{"input"===u&&"radio"===a.type&&null!=a.name&&te(i,a);Ee(u,s);var l=Ee(u,a);for(s=0;s<c.length;s+=2){var f=c[s],d=c[s+1];"style"===f?be(i,d):"dangerouslySetInnerHTML"===f?pe(i,d):"children"===f?ve(i,d):E(i,f,d,l)}switch(u){case"input":re(i,a);break;case"textarea":ce(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ae(i,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?ae(i,!!a.multiple,a.defaultValue,!0):ae(i,!!a.multiple,a.multiple?[]:"",!1))}i[Ni]=a}catch(t){Qc(e,e.return,t)}}break;case 6:Bu(t,e);Zu(e);if(n&4){if(null===e.stateNode)throw Error(o(162));i=e.stateNode;a=e.memoizedProps;try{i.nodeValue=a}catch(t){Qc(e,e.return,t)}}break;case 3:Bu(t,e);Zu(e);if(n&4&&null!==r&&r.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(t){Qc(e,e.return,t)}break;case 4:Bu(t,e);Zu(e);break;case 13:Bu(t,e);Zu(e);i=e.child;i.flags&8192&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(dc=rt()));n&4&&Wu(e);break;case 22:f=null!==r&&null!==r.memoizedState;e.mode&1?(Su=(l=Su)||f,Bu(t,e),Su=l):Bu(t,e);Zu(e);if(n&8192){l=null!==e.memoizedState;if((e.stateNode.isHidden=l)&&!f&&0!==(e.mode&1))for(wu=e,f=e.child;null!==f;){for(d=wu=f;null!==wu;){h=wu;p=h.child;switch(h.tag){case 0:case 11:case 14:case 15:ku(4,h,h.return);break;case 1:Tu(h,h.return);var v=h.stateNode;if("function"===typeof v.componentWillUnmount){n=h;r=h.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(e){Qc(n,r,e)}}break;case 5:Tu(h,h.return);break;case 22:if(null!==h.memoizedState){Yu(d);continue}}null!==p?(p.return=h,wu=p):Yu(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{i=d.stateNode,l?(a=i.style,"function"===typeof a.setProperty?a.setProperty("display","none","important"):a.display="none"):(u=d.stateNode,c=d.memoizedProps.style,s=void 0!==c&&null!==c&&c.hasOwnProperty("display")?c.display:null,u.style.display=ge("display",s))}catch(t){Qc(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(t){Qc(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d;d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null);d=d.return}f===d&&(f=null);d.sibling.return=d.return;d=d.sibling}}break;case 19:Bu(t,e);Zu(e);n&4&&Wu(e);break;case 21:break;default:Bu(t,e),Zu(e)}}function Zu(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;null!==r;){if(xu(r)){var n=r;break e}r=r.return}throw Error(o(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(ve(i,""),n.flags&=-33);var a=Lu(e);Nu(e,a,i);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Lu(e);Mu(e,u,s);break;default:throw Error(o(161))}}catch(t){Qc(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fu(e,t,r){wu=e;Hu(e,t,r)}function Hu(e,t,r){for(var n=0!==(e.mode&1);null!==wu;){var i=wu,o=i.child;if(22===i.tag&&n){var a=null!==i.memoizedState||_u;if(!a){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Su;s=_u;var c=Su;_u=a;if((Su=u)&&!c)for(wu=i;null!==wu;)a=wu,u=a.child,22===a.tag&&null!==a.memoizedState?Ku(i):null!==u?(u.return=a,wu=u):Ku(i);for(;null!==o;)wu=o,Hu(o,t,r),o=o.sibling;wu=i;_u=s;Su=c}Xu(e,t,r)}else 0!==(i.subtreeFlags&8772)&&null!==o?(o.return=i,wu=o):Xu(e,t,r)}}function Xu(e){for(;null!==wu;){var t=wu;if(0!==(t.flags&8772)){var r=t.alternate;try{if(0!==(t.flags&8772))switch(t.tag){case 0:case 11:case 15:Su||Au(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Su)if(null===r)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Is(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&ha(t,a,n);break;case 3:var s=t.updateQueue;if(null!==s){r=null;if(null!==t.child)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ha(t,s,r)}break;case 5:var u=t.stateNode;if(null===r&&t.flags&4){r=u;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&qt(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Su||t.flags&512&&Ou(t)}catch(e){Qc(t,t.return,e)}}if(t===e){wu=null;break}r=t.sibling;if(null!==r){r.return=t.return;wu=r;break}wu=t.return}}function Yu(e){for(;null!==wu;){var t=wu;if(t===e){wu=null;break}var r=t.sibling;if(null!==r){r.return=t.return;wu=r;break}wu=t.return}}function Ku(e){for(;null!==wu;){var t=wu;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Au(4,t)}catch(e){Qc(t,r,e)}break;case 1:var n=t.stateNode;if("function"===typeof n.componentDidMount){var i=t.return;try{n.componentDidMount()}catch(e){Qc(t,i,e)}}var o=t.return;try{Ou(t)}catch(e){Qc(t,o,e)}break;case 5:var a=t.return;try{Ou(t)}catch(e){Qc(t,a,e)}}}catch(e){Qc(t,t.return,e)}if(t===e){wu=null;break}var s=t.sibling;if(null!==s){s.return=t.return;wu=s;break}wu=t.return}}var zu=Math.ceil,Ju=w.ReactCurrentDispatcher,Qu=w.ReactCurrentOwner,qu=w.ReactCurrentBatchConfig,$u=0,ec=null,tc=null,rc=0,nc=0,ic=Xi(0),oc=0,ac=null,sc=0,uc=0,cc=0,lc=null,fc=null,dc=0,hc=Infinity,pc=null,vc=!1,mc=null,yc=null,gc=!1,bc=null,_c=0,Sc=0,Ec=null,wc=-1,Tc=0;function Ic(){return 0!==($u&6)?rt():-1!==wc?wc:wc=rt()}function Rc(e){if(0===(e.mode&1))return 1;if(0!==($u&2)&&0!==rc)return rc&-rc;if(null!==Vo.transition)return 0===Tc&&(Tc=wt()),Tc;e=kt;if(0!==e)return e;e=window.event;e=void 0===e?16:ar(e.type);return e}function Cc(e,t,r,n){if(50<Sc)throw Sc=0,Ec=null,Error(o(185));It(e,r,n);if(0===($u&2)||e!==ec)e===ec&&(0===($u&2)&&(uc|=r),4===oc&&Lc(e,rc)),kc(e,n),1===r&&0===$u&&0===(t.mode&1)&&(hc=rt()+500,so&&fo())}function kc(e,t){var r=e.callbackNode;St(e,t);var n=bt(e,e===ec?rc:0);if(0===n)null!==r&&$e(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){null!=r&&$e(r);if(1===t)0===e.tag?lo(Mc.bind(null,e)):co(Mc.bind(null,e)),ki((function(){0===($u&6)&&fo()})),r=null;else{switch(At(n)){case 1:r=it;break;case 4:r=ot;break;case 16:r=at;break;case 536870912:r=ut;break;default:r=at}r=nl(r,Ac.bind(null,e))}e.callbackPriority=t;e.callbackNode=r}}function Ac(e,t){wc=-1;Tc=0;if(0!==($u&6))throw Error(o(327));var r=e.callbackNode;if(zc()&&e.callbackNode!==r)return null;var n=bt(e,e===ec?rc:0);if(0===n)return null;if(0!==(n&30)||0!==(n&e.expiredLanes)||t)t=Gc(e,n);else{t=n;var i=$u;$u|=2;var a=Wc();if(ec!==e||rc!==t)pc=null,hc=rt()+500,Uc(e,t);do{try{Fc();break}catch(t){Vc(e,t)}}while(1);Jo();Ju.current=a;$u=i;null!==tc?t=0:(ec=null,rc=0,t=oc)}if(0!==t){2===t&&(i=Et(e),0!==i&&(n=i,t=Oc(e,i)));if(1===t)throw r=ac,Uc(e,0),Lc(e,n),kc(e,rt()),r;if(6===t)Lc(e,n);else{i=e.current.alternate;if(0===(n&30)&&!xc(i)&&(t=Gc(e,n),2===t&&(a=Et(e),0!==a&&(n=a,t=Oc(e,a))),1===t))throw r=ac,Uc(e,0),Lc(e,n),kc(e,rt()),r;e.finishedWork=i;e.finishedLanes=n;switch(t){case 0:case 1:throw Error(o(345));case 2:Yc(e,fc,pc);break;case 3:Lc(e,n);if((n&130023424)===n&&(t=dc+500-rt(),10<t)){if(0!==bt(e,0))break;i=e.suspendedLanes;if((i&n)!==n){Ic();e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ii(Yc.bind(null,e,fc,pc),t);break}Yc(e,fc,pc);break;case 4:Lc(e,n);if((n&4194240)===n)break;t=e.eventTimes;for(i=-1;0<n;){var s=31-dt(n);a=1<<s;s=t[s];s>i&&(i=s);n&=~a}n=i;n=rt()-n;n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*zu(n/1960))-n;if(10<n){e.timeoutHandle=Ii(Yc.bind(null,e,fc,pc),n);break}Yc(e,fc,pc);break;case 5:Yc(e,fc,pc);break;default:throw Error(o(329))}}}kc(e,rt());return e.callbackNode===r?Ac.bind(null,e):null}function Oc(e,t){var r=lc;e.current.memoizedState.isDehydrated&&(Uc(e,t).flags|=256);e=Gc(e,t);2!==e&&(t=fc,fc=r,null!==t&&Pc(t));return e}function Pc(e){null===fc?fc=e:fc.push.apply(fc,e)}function xc(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(null!==r&&(r=r.stores,null!==r))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!Cn(o(),i))return!1}catch(e){return!1}}}r=t.child;if(t.subtreeFlags&16384&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return;t=t.sibling}}return!0}function Lc(e,t){t&=~cc;t&=~uc;e.suspendedLanes|=t;e.pingedLanes&=~t;for(e=e.expirationTimes;0<t;){var r=31-dt(t),n=1<<r;e[r]=-1;t&=~n}}function Mc(e){if(0!==($u&6))throw Error(o(327));zc();var t=bt(e,0);if(0===(t&1))return kc(e,rt()),null;var r=Gc(e,t);if(0!==e.tag&&2===r){var n=Et(e);0!==n&&(t=n,r=Oc(e,n))}if(1===r)throw r=ac,Uc(e,0),Lc(e,t),kc(e,rt()),r;if(6===r)throw Error(o(345));e.finishedWork=e.current.alternate;e.finishedLanes=t;Yc(e,fc,pc);kc(e,rt());return null}function Nc(e,t){var r=$u;$u|=1;try{return e(t)}finally{$u=r,0===$u&&(hc=rt()+500,so&&fo())}}function Dc(e){null!==bc&&0===bc.tag&&0===($u&6)&&zc();var t=$u;$u|=1;var r=qu.transition,n=kt;try{if(qu.transition=null,kt=1,e)return e()}finally{kt=n,qu.transition=r,$u=t,0===($u&6)&&fo()}}function jc(){nc=ic.current;Yi(ic)}function Uc(e,t){e.finishedWork=null;e.finishedLanes=0;var r=e.timeoutHandle;-1!==r&&(e.timeoutHandle=-1,Ri(r));if(null!==tc)for(r=tc.return;null!==r;){var n=r;Io(n);switch(n.tag){case 1:n=n.type.childContextTypes;null!==n&&void 0!==n&&to();break;case 3:_a();Yi(Qi);Yi(Ji);Ra();break;case 5:Ea(n);break;case 4:_a();break;case 13:Yi(wa);break;case 19:Yi(wa);break;case 10:Qo(n.type._context);break;case 22:case 23:jc()}r=r.return}ec=e;tc=e=ul(e.current,null);rc=nc=t;oc=0;ac=null;cc=uc=sc=0;fc=lc=null;if(null!==ta){for(t=0;t<ta.length;t++)if(r=ta[t],n=r.interleaved,null!==n){r.interleaved=null;var i=n.next,o=r.pending;if(null!==o){var a=o.next;o.next=i;n.next=a}r.pending=n}ta=null}return e}function Vc(e,t){do{var r=tc;try{Jo();Ca.current=Ss;if(La){for(var n=Oa.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null);n=n.next}La=!1}Aa=0;xa=Pa=Oa=null;Ma=!1;Na=0;Qu.current=null;if(null===r||null===r.return){oc=1;ac=t;tc=null;break}e:{var a=e,s=r.return,u=r,c=t;t=rc;u.flags|=32768;if(null!==c&&"object"===typeof c&&"function"===typeof c.then){var l=c,f=u,d=f.tag;if(0===(f.mode&1)&&(0===d||11===d||15===d)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=Vs(s);if(null!==p){p.flags&=-257;Ws(p,s,u,a,t);p.mode&1&&Us(a,l,t);t=p;c=l;var v=t.updateQueue;if(null===v){var m=new Set;m.add(c);t.updateQueue=m}else v.add(c);break e}else{if(0===(t&1)){Us(a,l,t);Bc();break e}c=Error(o(426))}}else if(ko&&u.mode&1){var y=Vs(s);if(null!==y){0===(y.flags&65536)&&(y.flags|=256);Ws(y,s,u,a,t);Uo(xs(c,u));break e}}a=c=xs(c,u);4!==oc&&(oc=2);null===lc?lc=[a]:lc.push(a);a=s;do{switch(a.tag){case 3:a.flags|=65536;t&=-t;a.lanes|=t;var g=Ds(a,c,t);fa(a,g);break e;case 1:u=c;var b=a.type,_=a.stateNode;if(0===(a.flags&128)&&("function"===typeof b.getDerivedStateFromError||null!==_&&"function"===typeof _.componentDidCatch&&(null===yc||!yc.has(_)))){a.flags|=65536;t&=-t;a.lanes|=t;var S=js(a,u,t);fa(a,S);break e}}a=a.return}while(null!==a)}Xc(r)}catch(e){t=e;tc===r&&null!==r&&(tc=r=r.return);continue}break}while(1)}function Wc(){var e=Ju.current;Ju.current=Ss;return null===e?Ss:e}function Bc(){if(0===oc||3===oc||2===oc)oc=4;null===ec||0===(sc&268435455)&&0===(uc&268435455)||Lc(ec,rc)}function Gc(e,t){var r=$u;$u|=2;var n=Wc();if(ec!==e||rc!==t)pc=null,Uc(e,t);do{try{Zc();break}catch(t){Vc(e,t)}}while(1);Jo();$u=r;Ju.current=n;if(null!==tc)throw Error(o(261));ec=null;rc=0;return oc}function Zc(){for(;null!==tc;)Hc(tc)}function Fc(){for(;null!==tc&&!et();)Hc(tc)}function Hc(e){var t=rl(e.alternate,e,nc);e.memoizedProps=e.pendingProps;null===t?Xc(e):tc=t;Qu.current=null}function Xc(e){var t=e;do{var r=t.alternate;e=t.return;if(0===(t.flags&32768)){if(r=gu(r,t,nc),null!==r){tc=r;return}}else{r=bu(r,t);if(null!==r){r.flags&=32767;tc=r;return}if(null!==e)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{oc=6;tc=null;return}}t=t.sibling;if(null!==t){tc=t;return}tc=t=e}while(null!==t);0===oc&&(oc=5)}function Yc(e,t,r){var n=kt,i=qu.transition;try{qu.transition=null,kt=1,Kc(e,t,r,n)}finally{qu.transition=i,kt=n}return null}function Kc(e,t,r,n){do{zc()}while(null!==bc);if(0!==($u&6))throw Error(o(327));r=e.finishedWork;var i=e.finishedLanes;if(null===r)return null;e.finishedWork=null;e.finishedLanes=0;if(r===e.current)throw Error(o(177));e.callbackNode=null;e.callbackPriority=0;var a=r.lanes|r.childLanes;Rt(e,a);e===ec&&(tc=ec=null,rc=0);0===(r.subtreeFlags&2064)&&0===(r.flags&2064)||gc||(gc=!0,nl(at,(function(){zc();return null})));a=0!==(r.flags&15990);if(0!==(r.subtreeFlags&15990)||a){a=qu.transition;qu.transition=null;var s=kt;kt=1;var u=$u;$u|=4;Qu.current=null;Cu(e,r);Gu(r,e);Mn(wi);er=!!Ei;wi=Ei=null;e.current=r;Fu(r,e,i);tt();$u=u;kt=s;qu.transition=a}else e.current=r;gc&&(gc=!1,bc=e,_c=i);a=e.pendingLanes;0===a&&(yc=null);ft(r.stateNode,n);kc(e,rt());if(null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(vc)throw vc=!1,e=mc,mc=null,e;0!==(_c&1)&&0!==e.tag&&zc();a=e.pendingLanes;0!==(a&1)?e===Ec?Sc++:(Sc=0,Ec=e):Sc=0;fo();return null}function zc(){if(null!==bc){var e=At(_c),t=qu.transition,r=kt;try{qu.transition=null;kt=16>e?16:e;if(null===bc)var n=!1;else{e=bc;bc=null;_c=0;if(0!==($u&6))throw Error(o(331));var i=$u;$u|=4;for(wu=e.current;null!==wu;){var a=wu,s=a.child;if(0!==(wu.flags&16)){var u=a.deletions;if(null!==u){for(var c=0;c<u.length;c++){var l=u[c];for(wu=l;null!==wu;){var f=wu;switch(f.tag){case 0:case 11:case 15:ku(8,f,a)}var d=f.child;if(null!==d)d.return=f,wu=d;else for(;null!==wu;){f=wu;var h=f.sibling,p=f.return;Pu(f);if(f===l){wu=null;break}if(null!==h){h.return=p;wu=h;break}wu=p}}}var v=a.alternate;if(null!==v){var m=v.child;if(null!==m){v.child=null;do{var y=m.sibling;m.sibling=null;m=y}while(null!==m)}}wu=a}}if(0!==(a.subtreeFlags&2064)&&null!==s)s.return=a,wu=s;else e:for(;null!==wu;){a=wu;if(0!==(a.flags&2048))switch(a.tag){case 0:case 11:case 15:ku(9,a,a.return)}var g=a.sibling;if(null!==g){g.return=a.return;wu=g;break e}wu=a.return}}var b=e.current;for(wu=b;null!==wu;){s=wu;var _=s.child;if(0!==(s.subtreeFlags&2064)&&null!==_)_.return=s,wu=_;else e:for(s=b;null!==wu;){u=wu;if(0!==(u.flags&2048))try{switch(u.tag){case 0:case 11:case 15:Au(9,u)}}catch(e){Qc(u,u.return,e)}if(u===s){wu=null;break e}var S=u.sibling;if(null!==S){S.return=u.return;wu=S;break e}wu=u.return}}$u=i;fo();if(lt&&"function"===typeof lt.onPostCommitFiberRoot)try{lt.onPostCommitFiberRoot(ct,e)}catch(e){}n=!0}return n}finally{kt=r,qu.transition=t}}return!1}function Jc(e,t,r){t=xs(r,t);t=Ds(e,t,1);e=ca(e,t,1);t=Ic();null!==e&&(It(e,1,t),kc(e,t))}function Qc(e,t,r){if(3===e.tag)Jc(e,e,r);else for(;null!==t;){if(3===t.tag){Jc(t,e,r);break}else if(1===t.tag){var n=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof n.componentDidCatch&&(null===yc||!yc.has(n))){e=xs(r,e);e=js(t,e,1);t=ca(t,e,1);e=Ic();null!==t&&(It(t,1,e),kc(t,e));break}}t=t.return}}function qc(e,t,r){var n=e.pingCache;null!==n&&n.delete(t);t=Ic();e.pingedLanes|=e.suspendedLanes&r;ec===e&&(rc&r)===r&&(4===oc||3===oc&&(rc&130023424)===rc&&500>rt()-dc?Uc(e,0):cc|=r);kc(e,t)}function $c(e,t){0===t&&(0===(e.mode&1)?t=1:(t=yt,yt<<=1,0===(yt&130023424)&&(yt=4194304)));var r=Ic();e=ia(e,t);null!==e&&(It(e,t,r),kc(e,r))}function el(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane);$c(e,r)}function tl(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode;var i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(o(314))}null!==n&&n.delete(t);$c(e,r)}var rl;rl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Qi.current)Gs=!0;else{if(0===(e.lanes&r)&&0===(t.flags&128))return Gs=!1,fu(e,t,r);Gs=0!==(e.flags&131072)?!0:!1}else Gs=!1,ko&&0!==(t.flags&1048576)&&wo(t,mo,t.index);t.lanes=0;switch(t.tag){case 2:var n=t.type;cu(e,t);e=t.pendingProps;var i=$i(t,Ji.current);$o(t,r);i=Va(null,t,n,e,i,r);var a=Wa();t.flags|=1;"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,eo(n)?(a=!0,io(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,aa(t),i.updater=Cs,t.stateNode=i,i._reactInternals=t,Ps(t,n,e,r),t=Qs(null,t,n,!0,a,r)):(t.tag=0,ko&&a&&To(t),Zs(null,t,i,r),t=t.child);return t;case 16:n=t.elementType;e:{cu(e,t);e=t.pendingProps;i=n._init;n=i(n._payload);t.type=n;i=t.tag=sl(n);e=Is(n,e);switch(i){case 0:t=zs(null,t,n,e,r);break e;case 1:t=Js(null,t,n,e,r);break e;case 11:t=Fs(null,t,n,e,r);break e;case 14:t=Hs(null,t,n,Is(n.type,e),r);break e}throw Error(o(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Is(n,i),zs(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Is(n,i),Js(e,t,n,i,r);case 3:e:{qs(t);if(null===e)throw Error(o(387));n=t.pendingProps;a=t.memoizedState;i=a.element;sa(e,t);da(t,n,null,r);var s=t.memoizedState;n=s.element;if(a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=xs(Error(o(423)),t);t=$s(e,t,n,r,i);break e}else if(n!==i){i=xs(Error(o(424)),t);t=$s(e,t,n,r,i);break e}else for(Co=Pi(t.stateNode.containerInfo.firstChild),Ro=t,ko=!0,Ao=null,r=Ho(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{jo();if(n===i){t=lu(e,t,r);break e}Zs(e,t,n,r)}t=t.child}return t;case 5:return Sa(t),null===e&&Lo(t),n=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,Ti(n,i)?s=null:null!==a&&Ti(n,a)&&(t.flags|=32),Ks(e,t),Zs(e,t,s,r),t.child;case 6:return null===e&&Lo(t),null;case 13:return ru(e,t,r);case 4:return ba(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=Fo(t,null,n,r):Zs(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Is(n,i),Fs(e,t,n,i,r);case 7:return Zs(e,t,t.pendingProps,r),t.child;case 8:return Zs(e,t,t.pendingProps.children,r),t.child;case 12:return Zs(e,t,t.pendingProps.children,r),t.child;case 10:e:{n=t.type._context;i=t.pendingProps;a=t.memoizedProps;s=i.value;Ki(Xo,n._currentValue);n._currentValue=s;if(null!==a)if(Cn(a.value,s)){if(a.children===i.children&&!Qi.current){t=lu(e,t,r);break e}}else for(a=t.child,null!==a&&(a.return=t);null!==a;){var u=a.dependencies;if(null!==u){s=a.child;for(var c=u.firstContext;null!==c;){if(c.context===n){if(1===a.tag){c=ua(-1,r&-r);c.tag=2;var l=a.updateQueue;if(null!==l){l=l.shared;var f=l.pending;null===f?c.next=c:(c.next=f.next,f.next=c);l.pending=c}}a.lanes|=r;c=a.alternate;null!==c&&(c.lanes|=r);qo(a.return,r,t);u.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){s=a.return;if(null===s)throw Error(o(341));s.lanes|=r;u=s.alternate;null!==u&&(u.lanes|=r);qo(s,r,t);s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}a=s.sibling;if(null!==a){a.return=s.return;s=a;break}s=s.return}a=s}Zs(e,t,i.children,r);t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,$o(t,r),i=ea(i),n=n(i),t.flags|=1,Zs(e,t,n,r),t.child;case 14:return n=t.type,i=Is(n,t.pendingProps),i=Is(n.type,i),Hs(e,t,n,i,r);case 15:return Xs(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Is(n,i),cu(e,t),t.tag=1,eo(n)?(e=!0,io(t)):e=!1,$o(t,r),As(t,n,i),Ps(t,n,i,r),Qs(null,t,n,!0,e,r);case 19:return uu(e,t,r);case 22:return Ys(e,t,r)}throw Error(o(156,t.tag))};function nl(e,t){return qe(e,t)}function il(e,t,r,n){this.tag=e;this.key=r;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=t;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=n;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function ol(e,t,r,n){return new il(e,t,r,n)}function al(e){e=e.prototype;return!(!e||!e.isReactComponent)}function sl(e){if("function"===typeof e)return al(e)?1:0;if(void 0!==e&&null!==e){e=e.$$typeof;if(e===P)return 11;if(e===M)return 14}return 2}function ul(e,t){var r=e.alternate;null===r?(r=ol(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null);r.flags=e.flags&14680064;r.childLanes=e.childLanes;r.lanes=e.lanes;r.child=e.child;r.memoizedProps=e.memoizedProps;r.memoizedState=e.memoizedState;r.updateQueue=e.updateQueue;t=e.dependencies;r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext};r.sibling=e.sibling;r.index=e.index;r.ref=e.ref;return r}function cl(e,t,r,n,i,a){var s=2;n=e;if("function"===typeof e)al(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case R:return ll(r.children,i,a,t);case C:s=8;i|=8;break;case k:return e=ol(12,r,t,i|2),e.elementType=k,e.lanes=a,e;case x:return e=ol(13,r,t,i),e.elementType=x,e.lanes=a,e;case L:return e=ol(19,r,t,i),e.elementType=L,e.lanes=a,e;case D:return fl(r,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case O:s=9;break e;case P:s=11;break e;case M:s=14;break e;case N:s=16;n=null;break e}throw Error(o(130,null==e?e:typeof e,""))}t=ol(s,r,t,i);t.elementType=e;t.type=n;t.lanes=a;return t}function ll(e,t,r,n){e=ol(7,e,n,t);e.lanes=r;return e}function fl(e,t,r,n){e=ol(22,e,n,t);e.elementType=D;e.lanes=r;e.stateNode={isHidden:!1};return e}function dl(e,t,r){e=ol(6,e,null,t);e.lanes=r;return e}function hl(e,t,r){t=ol(4,null!==e.children?e.children:[],e.key,t);t.lanes=r;t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation};return t}function pl(e,t,r,n,i){this.tag=t;this.containerInfo=e;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Tt(0);this.expirationTimes=Tt(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Tt(0);this.identifierPrefix=n;this.onRecoverableError=i;this.mutableSourceEagerHydrationData=null}function vl(e,t,r,n,i,o,a,s,u){e=new pl(e,t,r,s,u);1===t?(t=1,!0===o&&(t|=8)):t=0;o=ol(3,null,null,t);e.current=o;o.stateNode=e;o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null};aa(o);return e}function ml(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:I,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}function yl(e){if(!e)return zi;e=e._reactInternals;e:{if(Xe(e)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(eo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var r=e.type;if(eo(r))return no(e,r,t)}return t}function gl(e,t,r,n,i,o,a,s,u){e=vl(r,n,!0,e,i,o,a,s,u);e.context=yl(null);r=e.current;n=Ic();i=Rc(r);o=ua(n,i);o.callback=void 0!==t&&null!==t?t:null;ca(r,o,i);e.current.lanes=i;It(e,i,n);kc(e,n);return e}function bl(e,t,r,n){var i=t.current,o=Ic(),a=Rc(i);r=yl(r);null===t.context?t.context=r:t.pendingContext=r;t=ua(o,a);t.payload={element:e};n=void 0===n?null:n;null!==n&&(t.callback=n);e=ca(i,t,a);null!==e&&(Cc(e,i,a,o),la(e,i,a));return a}function _l(e){e=e.current;if(!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Sl(e,t){e=e.memoizedState;if(null!==e&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function El(e,t){Sl(e,t);(e=e.alternate)&&Sl(e,t)}function wl(){return null}var Tl="function"===typeof reportError?reportError:function(e){console.error(e)};function Il(e){this._internalRoot=e}Rl.prototype.render=Il.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));bl(e,t,null,null)};Rl.prototype.unmount=Il.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Dc((function(){bl(null,e,null,null)}));t[Di]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lt();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Gt.length&&0!==t&&t<Gt[r].priority;r++);Gt.splice(r,0,e);0===r&&Yt(e)}};function Cl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function kl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Al(){}function Ol(e,t,r,n,i){if(i){if("function"===typeof n){var o=n;n=function(){var e=_l(a);o.call(e)}}var a=gl(t,n,e,0,null,!1,!1,"",Al);e._reactRootContainer=a;e[Di]=a.current;li(8===e.nodeType?e.parentNode:e);Dc();return a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof n){var s=n;n=function(){var e=_l(u);s.call(e)}}var u=vl(e,0,!1,null,null,!1,!1,"",Al);e._reactRootContainer=u;e[Di]=u.current;li(8===e.nodeType?e.parentNode:e);Dc((function(){bl(t,u,r,n)}));return u}function Pl(e,t,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=_l(a);s.call(e)}}bl(t,a,e,i)}else a=Ol(r,t,e,i,n);return _l(a)}Ot=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=gt(t.pendingLanes);0!==r&&(Ct(t,r|1),kc(t,rt()),0===($u&6)&&(hc=rt()+500,fo()))}break;case 13:Dc((function(){var t=ia(e,1);if(null!==t){var r=Ic();Cc(t,e,1,r)}})),El(e,1)}};Pt=function(e){if(13===e.tag){var t=ia(e,134217728);if(null!==t){var r=Ic();Cc(t,e,134217728,r)}El(e,134217728)}};xt=function(e){if(13===e.tag){var t=Rc(e),r=ia(e,t);if(null!==r){var n=Ic();Cc(r,e,t,n)}El(e,t)}};Lt=function(){return kt};Mt=function(e,t){var r=kt;try{return kt=e,t()}finally{kt=r}};Ie=function(e,t,r){switch(t){case"input":re(e,r);t=r.name;if("radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]');for(t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Zi(n);if(!i)throw Error(o(90));Q(n);re(n,i)}}}break;case"textarea":ce(e,r);break;case"select":t=r.value,null!=t&&ae(e,!!r.multiple,t,!1)}};Pe=Nc;xe=Dc;var xl={usingClientEntryPoint:!1,Events:[Bi,Gi,Zi,Ae,Oe,Nc]},Ll={findFiberByHostInstance:Wi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"};var Ml={bundleType:Ll.bundleType,version:Ll.version,rendererPackageName:Ll.rendererPackageName,rendererConfig:Ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){e=Je(e);return null===e?null:e.stateNode},findFiberByHostInstance:Ll.findFiberByHostInstance||wl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nl.isDisabled&&Nl.supportsFiber)try{ct=Nl.inject(Ml),lt=Nl}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xl;t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Cl(t))throw Error(o(200));return ml(e,t,null,r)};t.createRoot=function(e,t){if(!Cl(e))throw Error(o(299));var r=!1,n="",i=Tl;null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(n=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError));t=vl(e,1,!1,null,null,r,!1,n,i);e[Di]=t.current;li(8===e.nodeType?e.parentNode:e);return new Il(t)};t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));e=Object.keys(e).join(",");throw Error(o(268,e))}e=Je(t);e=null===e?null:e.stateNode;return e};t.flushSync=function(e){return Dc(e)};t.hydrate=function(e,t,r){if(!kl(t))throw Error(o(200));return Pl(null,e,t,!0,r)};t.hydrateRoot=function(e,t,r){if(!Cl(e))throw Error(o(405));var n=null!=r&&r.hydratedSources||null,i=!1,a="",s=Tl;null!==r&&void 0!==r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError));t=gl(t,null,e,1,null!=r?r:null,i,!1,a,s);e[Di]=t.current;li(e);if(n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Rl(t)};t.render=function(e,t,r){if(!kl(t))throw Error(o(200));return Pl(null,e,t,!1,r)};t.unmountComponentAtNode=function(e){if(!kl(e))throw Error(o(40));return e._reactRootContainer?(Dc((function(){Pl(null,null,e,!1,(function(){e._reactRootContainer=null;e[Di]=null}))})),!0):!1};t.unstable_batchedUpdates=Nc;t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!kl(r))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Pl(e,t,r,!1,n)};t.version="18.3.1-next-f1338f8080-20240426"},22696:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var o=[];var a=[];var s=[];var u=i.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words;var t=this.cfg.iv;var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];var n=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var i=0;i<4;i++){c.call(this)}for(var i=0;i<8;i++){n[i]^=r[i+4&7]}if(t){var o=t.words;var a=o[0];var s=o[1];var u=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var l=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;var f=u>>>16|l&4294901760;var d=l<<16|u&65535;n[0]^=u;n[1]^=f;n[2]^=l;n[3]^=d;n[4]^=u;n[5]^=f;n[6]^=l;n[7]^=d;for(var i=0;i<4;i++){c.call(this)}}},_doProcessBlock:function(e,t){var r=this._X;c.call(this);o[0]=r[0]^r[5]>>>16^r[3]<<16;o[1]=r[2]^r[7]>>>16^r[5]<<16;o[2]=r[4]^r[1]>>>16^r[7]<<16;o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++){o[n]=(o[n]<<8|o[n]>>>24)&16711935|(o[n]<<24|o[n]>>>8)&4278255360;e[t+n]^=o[n]}},blockSize:128/32,ivSize:64/32});function c(){var e=this._X;var t=this._C;for(var r=0;r<8;r++){a[r]=t[r]}t[0]=t[0]+1295307597+this._b|0;t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0;t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0;t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0;t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0;t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0;t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0;t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0;this._b=t[7]>>>0<a[7]>>>0?1:0;for(var r=0;r<8;r++){var n=e[r]+t[r];var i=n&65535;var o=n>>>16;var u=((i*i>>>17)+i*o>>>15)+o*o;var c=((n&4294901760)*n|0)+((n&65535)*n|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0;e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0;e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0;e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0;e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0;e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0;e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0;e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(u)})();return e.RabbitLegacy}))},22799:(e,t)=>{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function S(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case f:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case m:case v:case u:return e;default:return t}}case i:return t}}}function E(e){return S(e)===f}t.AsyncMode=l;t.ConcurrentMode=f;t.ContextConsumer=c;t.ContextProvider=u;t.Element=n;t.ForwardRef=d;t.Fragment=o;t.Lazy=m;t.Memo=v;t.Portal=i;t.Profiler=s;t.StrictMode=a;t.Suspense=h;t.isAsyncMode=function(e){return E(e)||S(e)===l};t.isConcurrentMode=E;t.isContextConsumer=function(e){return S(e)===c};t.isContextProvider=function(e){return S(e)===u};t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};t.isForwardRef=function(e){return S(e)===d};t.isFragment=function(e){return S(e)===o};t.isLazy=function(e){return S(e)===m};t.isMemo=function(e){return S(e)===v};t.isPortal=function(e){return S(e)===i};t.isProfiler=function(e){return S(e)===s};t.isStrictMode=function(e){return S(e)===a};t.isSuspense=function(e){return S(e)===h};t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===f||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===_||e.$$typeof===y)};t.typeOf=S},22812:e=>{"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}},23029:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},23061:(e,t,r)=>{"use strict";var n=r(79039);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},23167:(e,t,r)=>{"use strict";var n=r(94901);var i=r(20034);var o=r(52967);e.exports=function(e,t,r){var a,s;if(o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype)o(e,s);return e}},23263:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(28802),r(97239)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"colorMap",{enumerable:true,get:function(){return t.colorMap}});e.default=void 0;Object.defineProperty(e,"sizeMap",{enumerable:true,get:function(){return t.sizeMap}});Object.defineProperty(e,"typeMap",{enumerable:true,get:function(){return t.typeMap}});r=n(r);function n(e){return e&&e.__esModule?e:{default:e}}var i=e.default=r.default}))},23288:(e,t,r)=>{"use strict";var n=r(79504);var i=r(36840);var o=Date.prototype;var a="Invalid Date";var s="toString";var u=n(o[s]);var c=n(o.getTime);if(String(new Date(NaN))!==a){i(o,s,(function e(){var t=c(this);return t===t?u(this):a}))}},23364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(26440);var o=r(69733);r(41911);var a=r(44104);var s=r(50088);var u=d(r(43891));r(32337);var c=r(90108);var l=r(44772);var f=r(65425);function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r){return t=I(t),b(e,S()?Reflect.construct(t,r||[],I(e).constructor):t.apply(e,r))}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function E(e,t,r,n){var i=w(I(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=T(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},w.apply(null,arguments)}function T(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var k=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const A=new a.Log({module:"UI.MediaView"});let O=function(e){function t(e){var n;h(this,t);n=g(this,t,[e]);n.viewer=null;n.clickStartTime=0;n.isMove=false;n.handlePointerDown=()=>{n.isMove=false;n.clickStartTime=Date.now()};n.handlePointerMove=()=>{n.isMove=true};n.handlePointerup=()=>{if(Date.now()-n.clickStartTime<200&&!n.isMove){n.handleClose()}};n.handleClose=()=>{(0,i.$dispatch)((0,s.hideMediaView)())};n.handleChange=e=>{n.setState({activeIndex:e},(()=>{n.calcPoint()}))};n.slidePrev=()=>{var e;(e=n.viewer)===null||e===void 0?void 0:e.prev()};n.slideNext=()=>{var e;(e=n.viewer)===null||e===void 0?void 0:e.next()};n.getExtendRef=e=>{if(e){n.extendElement=e}};n.handleError=async e=>{var t;const i=e.target;if(i){i.src=r(59694);i.onerror=null}await n.initPromise;const{activeIndex:o}=n.state;(t=n.viewer)===null||t===void 0?void 0:t.view(o)};n.init=()=>{const{activeIndex:e}=n.state;let t;n.initPromise=new Promise((e=>{t=e}));const r={inline:true,backdrop:false,button:false,focus:false,fullscreen:false,loading:true,loop:true,keyboard:true,movable:true,navbar:false,rotatable:true,scalable:true,slideOnTouch:true,title:false,toggleOnDblclick:false,toolbar:false,tooltip:false,transition:true,zoomable:true,zoomOnTouch:true,zoomOnWheel:true,container:".viewer-contianer",ready:()=>{t()},viewed:e=>{n.handleChange(e.detail.index)},zoomed:()=>{n.calcPoint()},zoom:()=>{n.hidePoint()},move:()=>{n.calcPoint()},moved:()=>{n.calcPoint()}};if(!n.containerElement){return}n.viewer=new u.default(n.containerElement,r);n.viewer.view(e)};n.getViewRef=e=>{n.containerElement=e;n.init()};n.calcPoint=()=>{var e,t;if(!n.extendElement){return}const r=(e=n.viewer)===null||e===void 0?void 0:e.imageData;if(n.extendElement&&r){n.extendElement.style.left=r.left+"px";n.extendElement.style.top=r.top+"px";n.extendElement.style.width=r.width+"px";n.extendElement.style.height=r.height+"px"}const{mediaList:i}=n.props;const{activeIndex:o}=n.state;const a=(0,c.getPointByUrl)({url:(t=i[o])===null||t===void 0?void 0:t.src,imageWidth:n.extendElement.clientWidth,imageHeight:n.extendElement.clientHeight});n.setState({pointInfo:a})};n.hidePoint=()=>{n.setState({pointInfo:{pointX:0,pointY:0}})};const{mediaList:o,mediaViewCurId:a}=n.props;const l=Math.max(o.findIndex((e=>e.id===a)),0);n.state={activeIndex:l,total:o.length,pointInfo:{pointX:0,pointY:0}};return n}R(t,e);return v(t,[{key:"componentDidMount",value:function e(){window.addEventListener("resize",(0,l.debounce)((()=>{var e;(e=this.viewer)===null||e===void 0?void 0:e.destroy();this.init()}),100))}},{key:"componentWillUnmount",value:function e(){var r;E(t,"componentWillUnmount",this,3)([]);(r=this.viewer)===null||r===void 0?void 0:r.destroy()}},{key:"componentDidUpdate",value:function e(){const{mediaList:t}=this.props;if(t.length===0){this.handleClose()}}},{key:"render",value:function e(){const{mediaList:t,language:r}=this.props;const{activeIndex:i,total:o,pointInfo:a}=this.state;return(0,n.jsxs)("div",{className:"media-view",children:[(0,n.jsxs)("div",{className:"viewer-contianer",id:"mediaView",onPointerMove:this.handlePointerMove,onPointerUp:this.handlePointerup,onPointerDown:this.handlePointerDown,children:[(0,n.jsx)("div",{className:"media-view-close-tip",children:r.clickToExitPreview}),(0,n.jsxs)("div",{className:"media-view-pages",children:[(i||0)+1,"/",o]}),(0,n.jsx)("div",{style:{display:"none"},ref:this.getViewRef,children:t.map(((e,t)=>(0,n.jsx)("img",{className:"media-view-item-img",alt:"",onError:this.handleError,src:e.src},t)))}),(0,n.jsx)("div",{className:"extend-container",ref:this.getExtendRef,children:(0,n.jsx)(c.PointCircle,{left:a.pointX,top:a.pointY,size:40})})]}),i>0&&(0,n.jsx)("div",{className:"media-view-prev","data-testid":"media-view-prev",onClick:this.slidePrev}),i<o-1&&(0,n.jsx)("div",{className:"media-view-next","data-testid":"media-view-next",onClick:this.slideNext})]})}}])}(f.PointCircleContainer);O=k([(0,l.componentDecorator)(A)],O);const P=e=>({language:e.lang.language,mediaList:e.caption.mediaList,mediaViewCurId:e.mediaView.mediaViewCurId});var x=t["default"]=(0,o.connect)(P)(O)},23418:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97916);var o=r(84428);var a=!o((function(e){Array.from(e)}));n({target:"Array",stat:true,forced:a},{from:i})},23473:(e,t,r)=>{var n=r(47043);var i=r(25323);var o=r(91100);function a(e){return e===undefined||e===null}function s(e){var t={};for(var r in e){t[r]=e[r]}return t}function u(e){e=s(e||{});e.whiteList=e.whiteList||n.whiteList;e.onAttr=e.onAttr||n.onAttr;e.onIgnoreAttr=e.onIgnoreAttr||n.onIgnoreAttr;e.safeAttrValue=e.safeAttrValue||n.safeAttrValue;this.options=e}u.prototype.process=function(e){e=e||"";e=e.toString();if(!e)return"";var t=this;var r=t.options;var n=r.whiteList;var o=r.onAttr;var s=r.onIgnoreAttr;var u=r.safeAttrValue;var c=i(e,(function(e,t,r,i,c){var l=n[r];var f=false;if(l===true)f=l;else if(typeof l==="function")f=l(i);else if(l instanceof RegExp)f=l.test(i);if(f!==true)f=false;i=u(r,i);if(!i)return;var d={position:t,sourcePosition:e,source:c,isWhite:f};if(f){var h=o(r,i,d);if(a(h)){return r+":"+i}else{return h}}else{var h=s(r,i,d);if(!a(h)){return h}}}));return c};e.exports=u},23500:(e,t,r)=>{"use strict";var n=r(44576);var i=r(67400);var o=r(79296);var a=r(90235);var s=r(66699);var u=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in i){if(i[c]){u(n[c]&&n[c].prototype)}}u(o)},23792:(e,t,r)=>{"use strict";var n=r(25397);var i=r(6469);var o=r(26269);var a=r(91181);var s=r(24913).f;var u=r(51088);var c=r(62529);var l=r(96395);var f=r(43724);var d="Array Iterator";var h=a.set;var p=a.getterFor(d);e.exports=u(Array,"Array",(function(e,t){h(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=p(this);var t=e.target;var r=e.index++;if(!t||r>=t.length){e.target=null;return c(undefined,true)}switch(e.kind){case"keys":return c(r,false);case"values":return c(t[r],false)}return c([r,t[r]],false)}),"values");var v=o.Arguments=o.Array;i("keys");i("values");i("entries");if(!l&&f&&v.name!=="values")try{s(v,"name",{value:"values"})}catch(e){}},23830:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(30258),r(59969)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TimerTask=void 0;var n,i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=(0,t.getPLogger)();var _=e.TimerTask=(n=(0,r.printfDecorator)(b),i=(0,r.printfDecorator)(b),o=(0,r.printfDecorator)(b),s=(0,r.printfDecorator)(b),u=function(){function e(r){d(this,e);v(this,"id",(0,t.getClientId)());v(this,"_isCancel",false);v(this,"_task",void 0);v(this,"_runCount",0);v(this,"_lastRuntime",0);b.info("TimerTask,".concat(this.id),"constructor",(0,t.formatType)(r));if((0,t.formatType)(r)!==t.formatType.FUNCTION&&(0,t.formatType)(r)!==t.formatType.ASYNCFUNCTION){throw new Error("task is not a function,"+r)}this._task=r}return p(e,[{key:"cancel",value:function e(){b.info("TimerTask,".concat(this.id),"cancel");this._isCancel=true;this._lastRuntime=0;this._runCount=0;return this}},{key:"isCancel",value:function e(){return this._isCancel}},{key:"run",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:b.info("TimerTask,".concat(this.id),"run",this._isCancel,this._runCount);if(!(!this._isCancel&&this._task)){r.next=6;break}this._runCount++;this._lastRuntime=Date.now();r.next=6;return(t=this._task)===null||t===void 0?void 0:t.call(this,this._runCount);case 6:return r.abrupt("return",this);case 7:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"scheduledExecutionTime",value:function e(){return this._lastRuntime}}])}(),g(u.prototype,"cancel",[n],Object.getOwnPropertyDescriptor(u.prototype,"cancel"),u.prototype),g(u.prototype,"isCancel",[i],Object.getOwnPropertyDescriptor(u.prototype,"isCancel"),u.prototype),g(u.prototype,"run",[o],Object.getOwnPropertyDescriptor(u.prototype,"run"),u.prototype),g(u.prototype,"scheduledExecutionTime",[s],Object.getOwnPropertyDescriptor(u.prototype,"scheduledExecutionTime"),u.prototype),u)}))},23860:(e,t,r)=>{"use strict";var n=r(46518);var i=r(68183).codeAt;n({target:"String",proto:true},{codePointAt:function e(t){return i(this,t)}})},24081:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBase64Image=void 0;var t=e.checkBase64Image=function e(t){return t.startsWith("data:image/png;base64,")||t.startsWith("data:image/jpeg;base64,")}}))},24149:e=>{"use strict";var t=RangeError;e.exports=function(e){if(e===e)return e;throw new t("NaN is not allowed")}},24194:(e,t,r)=>{"use strict";var n=r(36955);var i=TypeError;e.exports=function(e){if(n(e)==="DataView")return e;throw new i("Argument is not a DataView")}},24257:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(56946),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t=d(t),c(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function c(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let g=function(e){function t(e){var r;var n;o(this,t);n=u(this,t,[e]);v(n,"_selectRadio",(e=>{var t,r;const{value:i}=e.target;n.setState({selectValue:i});(t=(r=n.props).onChange)===null||t===void 0?void 0:t.call(r,e)}));n.state={selectValue:e.value||((r=e.radioList[0])===null||r===void 0?void 0:r.value)};return n}h(t,e);return s(t,[{key:"componentDidUpdate",value:function e(t){if(t.value!==this.props.value){this.setState({selectValue:this.props.value})}}},{key:"render",value:function e(){const{radioList:t}=this.props;const{selectValue:i}=this.state;return(0,n.jsx)("div",{className:"meta-radio-group",children:t.map((({value:e,label:t})=>(0,n.jsx)(r.default,{value:e,label:t,selectValue:i,onChange:this._selectRadio},e)))})}}])}(t.Component);var b=e.default=g}))},24357:(e,t,r)=>{const n=r(30208);function i(e){this.mode=n.NUMERIC;this.data=e.toString()}i.getBitsLength=function e(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};i.prototype.getLength=function e(){return this.data.length};i.prototype.getBitsLength=function e(){return i.getBitsLength(this.data.length)};i.prototype.write=function e(t){let r,n,i;for(r=0;r+3<=this.data.length;r+=3){n=this.data.substr(r,3);i=parseInt(n,10);t.put(i,10)}const o=this.data.length-r;if(o>0){n=this.data.substr(r);i=parseInt(n,10);t.put(i,o*3+1)}};e.exports=i},24359:(e,t,r)=>{"use strict";var n=r(46518);var i=r(66346);var o=r(77811);n({global:true,constructor:true,forced:!o},{DataView:i.DataView})},24441:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(44772),r(46942),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;n=a(n);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t=p(t),f(e,h()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let _=e.default=function(e){function t(e){var n;s(this,t);n=l(this,t,[e]);y(n,"_switchState",(e=>{const{readonly:t,disabled:o,onStateChange:a,state:s}=n.props;const{currentState:u}=n.state;(0,i.getPLogger)().info("_switchState",{readonly:t,disabled:o,state:s,currentState:u});if(t){return}(0,r.reactStopPropagation)(e);if(o){return}n.setState({currentState:!u});a&&a(!u)}));n.state={currentState:e.state};return n}v(t,e);return c(t,[{key:"render",value:function e(){const{disabled:t,state:i,className:a}=this.props;const{currentState:s}=this.state;let u=true;if(!(0,r.isNullOrEmpty)(i)){u=i}else{u=!t&&s}return(0,o.jsxs)("svg",{className:(0,n.default)("meta-switch-btn",a),onClick:this._switchState,viewBox:"0 0 28 14",children:[(0,o.jsx)("path",{fill:u?"#007dff":"#cccccc",fillRule:"evenodd",d:"M7,0H21a7,7,0,0,1,0,14H7A7,7,0,0,1,7,0Z"}),(0,o.jsx)("circle",{fill:"#fff",cx:u?"21":"7",cy:"7",r:"6.5"})]})}}])}(t.Component);y(_,"defaultProps",{disabled:false,readonly:false})}))},24599:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(79472);var a=o(i.setTimeout,true);n({global:true,bind:true,forced:i.setTimeout!==a},{setTimeout:a})},24659:(e,t,r)=>{"use strict";var n=r(79039);var i=r(6980);e.exports=!n((function(){var e=new Error("a");if(!("stack"in e))return true;Object.defineProperty(e,"stack",i(1,7));return e.stack!==7}))},24844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(11686);var i=r(44104);var o=r(44772);var a=r(26440);var s=r(43260);var u=r(39595);var c=r(79681);var l=r(88311);var f=r(50306);var d=r(65268);var h=r(84743);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=w(t),_(e,E()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var R=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const C=new i.Log({module:"P2pStreamManager"});const k=[d.JOB_STATE.CANCELED,d.JOB_STATE.FAILED,d.JOB_STATE.PROCESSING,d.JOB_STATE.SUCCEED,d.JOB_STATE.WAITING,d.JOB_STATE.HEARTBEAT];let A=function(e){function t(){p(this,t);return b(this,t,arguments)}T(t,e);return m(t,null,[{key:"createStreamConnector",value:async function e(r){C.info("createStreamConnector",r);t.addListener();t.streamStatistic();await t.statePromise.wait(d.JOB_STATE.PROCESSING);const{answerSdp:n,iceCandidates:i}=await l.SDPManager.getAnswerOffer();if(!n){f.Modal.alert({content:"协商失败,检查是否畅通"});return}t.client.p2pPlay({elementId:"remoteContainer",p2pUserId:"6961a7fff97942aca02fb246f8c27lhj_player",answerSdp:n,iceCandidates:i});(0,a.$dispatch)((0,s.togglePageState)(u.PageState.MAIN))}},{key:"setHeartbeatState",value:function e(r){return t.statePromise.setState(r)}},{key:"unmuteLocalAudio",value:function e(){const r=t.client.localStream;const i=r===null||r===void 0?void 0:r.getAudioHRTCTrack();if(i){var o;r===null||r===void 0?void 0:(o=r.getAudioHRTCTrack())===null||o===void 0?void 0:o.unmuteTrack();return{result:true}}return{result:false,errorCode:n.SDKErrorCode.RTC_NOT_INIT,errorMsg:n.msgMap[n.SDKErrorCode.RTC_NOT_INIT]}}},{key:"muteLocalAudio",value:function e(){const r=t.client.localStream;const n=r===null||r===void 0?void 0:r.getAudioHRTCTrack();if(n){var i;r===null||r===void 0?void 0:(i=r.getAudioHRTCTrack())===null||i===void 0?void 0:i.muteTrack()}return{result:true}}},{key:"unmuteRemoteAudio",value:async function e(){const r=t.client.liveStream;return(r===null||r===void 0?void 0:r.unmuteAudio())||false}},{key:"muteRemoteAudio",value:async function e(){const r=t.client.liveStream;return(r===null||r===void 0?void 0:r.muteAudio())||false}},{key:"checkSignature",value:function e({entry:t}){C.info("checkSignature",t)}},{key:"setSpeaker",value:async function e(r){const n=t.client.liveStream;if(r){await(n===null||n===void 0?void 0:n.setAudioOutput(r))}}},{key:"setMicrophone",value:async function e(t){C.info("setMicrophone",t)}},{key:"destroy",value:async function e(r){C.info("destroy",r);t.client.destroyClient();t.client.stopPlay()}},{key:"startSendLocalStream",value:async function e(r){C.info("startSendLocalStream",r);const n=t.createStream({audio:true});await n.initialize();t.client.publishStream(n);return{result:true}}},{key:"destroyLocalStream",value:async function e(t){C.debug("destroyLocalStream",t)}},{key:"setShouldSendLocalStream",value:function e(t){C.info("setShouldSendLocalStream",t)}},{key:"startLocalRecord",value:async function e(t){C.debug("startLocalRecord",t)}},{key:"stopLocalRecord",value:async function e(){C.info("stopLocalRecord")}},{key:"getLocalMediaStream",value:function e(t){C.info("getLocalMediaStream",t)}},{key:"clearPeerLeaveTimer",value:function e(t){C.info("clearPeerLeaveTimer",t)}},{key:"startSendCustomStream",value:function e(){C.info("startSendCustomStream")}},{key:"stopSendCustomStream",value:function e(){C.info("stopSendCustomStream")}},{key:"playRemoteVideo",value:function e(){C.info("playRemoteVideo")}}])}(c.P2pSDK);A.statePromise=new h.StatePromise(k);var O=t["default"]=A;R([(0,o.printfDecorator)(C)],A,"setMicrophone",null);R([(0,o.printfDecorator)(C)],A,"destroy",null);R([(0,o.printfDecorator)(C)],A,"startSendLocalStream",null)},24861:(e,t,r)=>{const n=r(30208);const i=r(56886);function o(e){this.mode=n.KANJI;this.data=e}o.getBitsLength=function e(t){return t*13};o.prototype.getLength=function e(){return this.data.length};o.prototype.getBitsLength=function e(){return o.getBitsLength(this.data.length)};o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956){r-=33088}else if(r>=57408&&r<=60351){r-=49472}else{throw new Error("Invalid SJIS character: "+this.data[t]+"\n"+"Make sure your charset is UTF-8")}r=(r>>>8&255)*192+(r&255);e.put(r,13)}};e.exports=o},24913:(e,t,r)=>{"use strict";var n=r(43724);var i=r(35917);var o=r(48686);var a=r(28551);var s=r(56969);var u=TypeError;var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f="enumerable";var d="configurable";var h="writable";t.f=n?o?function e(t,r,n){a(t);r=s(r);a(n);if(typeof t==="function"&&r==="prototype"&&"value"in n&&h in n&&!n[h]){var i=l(t,r);if(i&&i[h]){t[r]=n.value;n={configurable:d in n?n[d]:i[d],enumerable:f in n?n[f]:i[f],writable:false}}}return c(t,r,n)}:c:function e(t,r,n){a(t);r=s(r);a(n);if(i)try{return c(t,r,n)}catch(e){}if("get"in n||"set"in n)throw new u("Accessors not supported");if("value"in n)t[r]=n.value;return t}},25127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XssManager=void 0;var n=r(18981);var i=r(34005);var o=r(54561);var a=r(44772);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let d=t.XssManager=function(){function e(){s(this,e)}return c(e,null,[{key:"xssFilter",value:function t(r){if(!r||(0,a.formatType)(r)!==a.formatType.STRING){return""}const n=e._preFilter(r);return e._xssFilterConfig.process(n)}},{key:"_preFilter",value:function t(r){if(!r||(0,a.formatType)(r)!==a.formatType.STRING){return""}const n=e._dealLastLt(r);return n}},{key:"_dealLastLt",value:function t(r){const n=r.lastIndexOf("<");const i=r.lastIndexOf(">");const o=r.split("");if(n>i){o.splice(n,1,"&lt;");return e._dealLastLt(o.join(""))}return r}}])}();d._xssFilterConfig=new i.FilterXSS({whiteList:n.whiteList,stripIgnoreTag:true,stripIgnoreTagBody:n.stripIgnoreTagBody,allowCommentTag:false,stripBlankChar:true,onTag:n.onTag,onTagAttr:n.onTagAttr,onIgnoreTagAttr:n.onIgnoreTagAttr,css:{whiteList:n.cssWhiteList}});d.getRenderNode=e=>{if(!e){e=""}const t=d.xssFilter(e);const r=(0,o.string2HTML)(t);const n=r.querySelectorAll("video");n.forEach((e=>{if(!e.getAttribute("controls")){e.setAttribute("controls","")}}));return r}},25170:(e,t,r)=>{"use strict";var n=r(46706);var i=r(94402);e.exports=n(i.proto,"size","get")||function(e){return e.size}},25276:(e,t,r)=>{"use strict";var n=r(46518);var i=r(27476);var o=r(19617).indexOf;var a=r(34598);var s=i([].indexOf);var u=!!s&&1/s([1],1,-0)<0;var c=u||!a("indexOf");n({target:"Array",proto:true,forced:c},{indexOf:function e(t){var r=arguments.length>1?arguments[1]:undefined;return u?s(this,t,r)||0:o(this,t,r)}})},25323:(e,t,r)=>{var n=r(91100);function i(e,t){e=n.trimRight(e);if(e[e.length-1]!==";")e+=";";var r=e.length;var i=false;var o=0;var a=0;var s="";function u(){if(!i){var r=n.trim(e.slice(o,a));var u=r.indexOf(":");if(u!==-1){var c=n.trim(r.slice(0,u));var l=n.trim(r.slice(u+1));if(c){var f=t(o,s.length,c,l,r);if(f)s+=f+"; "}}}o=a+1}for(;a<r;a++){var c=e[a];if(c==="/"&&e[a+1]==="*"){var l=e.indexOf("*/",a+2);if(l===-1)break;a=l+1;o=a+1;i=false}else if(c==="("){i=true}else if(c===")"){i=false}else if(c===";"){if(i){}else{u()}}else if(c==="\n"){u()}}return n.trim(s)}e.exports=i},25397:(e,t,r)=>{"use strict";var n=r(47055);var i=r(67750);e.exports=function(e){return n(i(e))}},25428:(e,t,r)=>{"use strict";var n=r(46518);var i=r(50360);n({target:"Number",stat:true},{isFinite:i})},25440:(e,t,r)=>{"use strict";var n=r(18745);var i=r(69565);var o=r(79504);var a=r(89228);var s=r(79039);var u=r(28551);var c=r(94901);var l=r(20034);var f=r(91291);var d=r(18014);var h=r(655);var p=r(67750);var v=r(57829);var m=r(55966);var y=r(2478);var g=r(56682);var b=r(78227);var _=b("replace");var S=Math.max;var E=Math.min;var w=o([].concat);var T=o([].push);var I=o("".indexOf);var R=o("".slice);var C=function(e){return e===undefined?e:String(e)};var k=function(){return"a".replace(/./,"$0")==="$0"}();var A=function(){if(/./[_]){return/./[_]("a","$0")===""}return false}();var O=!s((function(){var e=/./;e.exec=function(){var e=[];e.groups={a:"7"};return e};return"".replace(e,"$<a>")!=="7"}));a("replace",(function(e,t,r){var o=A?"$":"$0";return[function e(r,n){var o=p(this);var a=l(r)?m(r,_):undefined;return a?i(a,r,o,n):i(t,h(o),r,n)},function(e,i){var a=u(this);var s=h(e);if(typeof i=="string"&&I(i,o)===-1&&I(i,"$<")===-1){var l=r(t,a,s,i);if(l.done)return l.value}var p=c(i);if(!p)i=h(i);var m=a.global;var b;if(m){b=a.unicode;a.lastIndex=0}var _=[];var k;while(true){k=g(a,s);if(k===null)break;T(_,k);if(!m)break;var A=h(k[0]);if(A==="")a.lastIndex=v(s,d(a.lastIndex),b)}var O="";var P=0;for(var x=0;x<_.length;x++){k=_[x];var L=h(k[0]);var M=S(E(f(k.index),s.length),0);var N=[];var D;for(var j=1;j<k.length;j++)T(N,C(k[j]));var U=k.groups;if(p){var V=w([L],N,M,s);if(U!==undefined)T(V,U);D=h(n(i,undefined,V))}else{D=y(L,s,M,N,U,i)}if(M>=P){O+=R(s,P,M)+D;P=M+L.length}}return O+R(s,P)}]}),!O||!k||A)},25745:(e,t,r)=>{"use strict";var n=r(77629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},25822:(e,t,r)=>{const n=r(30208);function i(e){this.mode=n.BYTE;if(typeof e==="string"){this.data=(new TextEncoder).encode(e)}else{this.data=new Uint8Array(e)}}i.getBitsLength=function e(t){return t*8};i.prototype.getLength=function e(){return this.data.length};i.prototype.getBitsLength=function e(){return i.getBitsLength(this.data.length)};i.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++){e.put(this.data[t],8)}};e.exports=i},25823:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(83707),r(35781),r(46942),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;n=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var a=({data:e,className:o,loop:a})=>{o=(0,n.default)("meta-swiper",o);return(0,i.jsx)(t.Swiper,{className:o,navigation:{disabledClass:"meta-swiper-button-disabled"},modules:[r.Navigation,r.Pagination],autoplay:{pauseOnMouseEnter:true,delay:100},loop:a,cssMode:true,pagination:{clickable:true,bulletActiveClass:"swiper-pagination-bullet-active meta-swiper-bullet-active",horizontalClass:"swiper-pagination-horizontal meta-swiper-pagination-horizontal"},children:e===null||e===void 0?void 0:e.map((({imgSrc:e,title:r,content:n},o)=>(0,i.jsxs)(t.SwiperSlide,{className:"meta-swiper-slide",children:[r&&(0,i.jsx)("h1",{className:"meta-swiper-slide-title",children:r}),(0,i.jsxs)("div",{className:"meta-swiper-slide-content",children:[e&&(0,i.jsx)("img",{className:"meta-swiper-slide-img",src:e}),n&&(0,i.jsx)("div",{className:"meta-swiper-slide-text",children:n})]})]},o)))})};e.default=a}))},25843:(e,t,r)=>{"use strict";var n=r(46518);var i=r(52703);n({target:"Number",stat:true,forced:Number.parseInt!==i},{parseInt:i})},26099:(e,t,r)=>{"use strict";var n=r(92140);var i=r(36840);var o=r(53179);if(!n){i(Object.prototype,"toString",o,{unsafe:true})}},26198:(e,t,r)=>{"use strict";var n=r(18014);e.exports=function(e){return n(e.length)}},26269:e=>{"use strict";e.exports={}},26440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.store=t.$getState=t.$dispatch=void 0;var n=r(84303);var i=m(r(43260));var o=m(r(49));var a=m(r(32681));var s=m(r(50088));var u=m(r(68847));var c=r(39595);var l=r(21013);var f=r(63226);var d=r(44104);var h=r(21361);var p=r(31053);var v=r(43260);function m(e){return e&&e.__esModule?e:{default:e}}const y=new d.Log({module:"HwICS.store.redux"});const g=[`${c.ReduxModule.CAPTION}/updateShowAllContentChatId`];const b=t.store=(0,n.configureStore)({reducer:{[c.ReduxModule.MAIN]:i.default.reducer,[c.ReduxModule.ERROR]:o.default.reducer,[c.ReduxModule.CAPTION]:a.default.reducer,[c.ReduxModule.MEDIAVIEW]:s.default.reducer,[c.ReduxModule.CONFIG]:u.default.reducer,[c.ReduxModule.LANG]:h.langSlice.reducer},middleware:[()=>e=>t=>{y.debug("redux.action",t);l.UserTrack===null||l.UserTrack===void 0?void 0:l.UserTrack.addUserTrack({arg1:f.Arg1Map.REDUX_ACTION,arg2:t.type,args:{param:g.includes(t.type)?JSON.stringify(t.payload):""}});return e(t)}]});p.ScreenOrientationPolyfill.addChangeEvent((e=>{b.dispatch((0,v.toggleOrientationType)(e))}));const _=t.$dispatch=b.dispatch;const S=t.$getState=b.getState},26835:(e,t,r)=>{"use strict";var n=r(46518);var i=r(57029);var o=r(6469);n({target:"Array",proto:true},{copyWithin:i});o("copyWithin")},26885:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;const t={close:"Close",minimize:"Minimize",maximize:"Maximize",restore:"Restore"};var r=e.default=t}))},26904:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Decoder=void 0;var n=r(44104);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:t+""}function s(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}const c=new n.Log({module:"Decoder"});let l=t.Decoder=o((function e(){u(this,e);this.isConfigured=false;this.timestamp=0;this.isKeyFrame=e=>{const t=new Uint8Array(e);for(let e=0;e<t.length-4;e++){if(t[e]===0&&t[e+1]===0&&(t[e+2]===1||t[e+2]===0&&t[e+3]===1)){const r=t[e+2]===1?e+3:e+4;const n=t[r];const i=n&31;if(i===5){return true}}}return false};this.init=async e=>{c.info("init");const t=await window.VideoDecoder.isConfigSupported(e);if(!t.supported){c.error("不支持的解码器配置:",t);return}this.decoder=new window.VideoDecoder({output:async t=>{var r;await((r=e.onMessage)===null||r===void 0?void 0:r.call(e,t));t.close()},error:t=>{c.error("解码错误:",t);this.init(e)}});this.decoder.configure(e);this.isConfigured=true};this.decodeH264=e=>{if(!this.isConfigured||!this.decoder||this.decoder.state==="closed"){return}const t=this.isKeyFrame(e);const r=new window.EncodedVideoChunk({type:t?"key":"delta",timestamp:this.timestamp,duration:1e3/30,data:e});this.timestamp+=1e3/30;try{this.decoder.decode(r)}catch(e){c.error("decode 失败:",e)}}}))},26910:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(79306);var a=r(48981);var s=r(26198);var u=r(84606);var c=r(655);var l=r(79039);var f=r(74488);var d=r(34598);var h=r(13709);var p=r(13763);var v=r(39519);var m=r(3607);var y=[];var g=i(y.sort);var b=i(y.push);var _=l((function(){y.sort(undefined)}));var S=l((function(){y.sort(null)}));var E=d("sort");var w=!l((function(){if(v)return v<70;if(h&&h>3)return;if(p)return true;if(m)return m<603;var e="";var t,r,n,i;for(t=65;t<76;t++){r=String.fromCharCode(t);switch(t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++){y.push({k:r+i,v:n})}}y.sort((function(e,t){return t.v-e.v}));for(i=0;i<y.length;i++){r=y[i].k.charAt(0);if(e.charAt(e.length-1)!==r)e+=r}return e!=="DGBEFHACIJK"}));var T=_||!S||!E||!w;var I=function(e){return function(t,r){if(r===undefined)return-1;if(t===undefined)return 1;if(e!==undefined)return+e(t,r)||0;return c(t)>c(r)?1:-1}};n({target:"Array",proto:true,forced:T},{sort:function e(t){if(t!==undefined)o(t);var r=a(this);if(w)return t===undefined?g(r):g(r,t);var n=[];var i=s(r);var c,l;for(l=0;l<i;l++){if(l in r)b(n,r[l])}f(n,I(t));c=s(n);l=0;while(l<c)r[l]=n[l++];while(l<i)u(r,l++);return r}})},26956:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540);function i(e){var t=n.useRef();t.current=e;var r=n.useCallback((function(){var e;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return(e=t.current)===null||e===void 0?void 0:e.call.apply(e,[t].concat(n))}),[]);return r}},27208:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);n({target:"URL",proto:true,enumerable:true},{toJSON:function e(){return i(URL.prototype.toString,this)}})},27337:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(35610);var a=RangeError;var s=String.fromCharCode;var u=String.fromCodePoint;var c=i([].join);var l=!!u&&u.length!==1;n({target:"String",stat:true,arity:1,forced:l},{fromCodePoint:function e(t){var r=[];var n=arguments.length;var i=0;var u;while(n>i){u=+arguments[i++];if(o(u,1114111)!==u)throw new a(u+" is not a valid code point");r[i]=u<65536?s(u):s(((u-=65536)>>10)+55296,u%1024+56320)}return c(r,"")}})},27476:(e,t,r)=>{"use strict";var n=r(22195);var i=r(79504);e.exports=function(e){if(n(e)==="Function")return i(e)}},27495:(e,t,r)=>{"use strict";var n=r(46518);var i=r(57323);n({target:"RegExp",proto:true,forced:/./.exec!==i},{exec:i})},27800:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(43145);function i(e,t){if(e){if("string"==typeof e)return(0,n.A)(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.A)(e,t):void 0}}},27831:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(95450),r(83279)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"colorMap",{enumerable:true,get:function(){return t.colorMap}});e.default=void 0;Object.defineProperty(e,"sizeMap",{enumerable:true,get:function(){return t.sizeMap}});Object.defineProperty(e,"typeMap",{enumerable:true,get:function(){return t.typeMap}});r=n(r);function n(e){return e&&e.__esModule?e:{default:e}}var i=e.default=r.default}))},28513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RouteManager=void 0;var n=r(26440);var i=r(43260);var o=r(44104);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const f=new o.Log({module:"HwICS.RouteManager"});let d=t.RouteManager=function(){function e(){a(this,e)}return u(e,null,[{key:"showMainPage",value:function e(){f.info("showMainPage");(0,n.$dispatch)((0,i.toggleShowLoading)({show:false}))}}])}()},28527:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402).has;var o=r(25170);var a=r(83789);var s=r(40507);var u=r(9539);e.exports=function e(t){var r=n(this);var c=a(t);if(o(r)<c.size)return false;var l=c.getIterator();return s(l,(function(e){if(!i(r,e))return u(l,"normal",false)}))!==false}},28543:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(27476);var a=r(33994);var s=r(62529);var u=r(67750);var c=r(18014);var l=r(655);var f=r(28551);var d=r(20034);var h=r(22195);var p=r(60788);var v=r(61034);var m=r(55966);var y=r(36840);var g=r(79039);var b=r(78227);var _=r(2293);var S=r(57829);var E=r(56682);var w=r(91181);var T=r(96395);var I=b("matchAll");var R="RegExp String";var C=R+" Iterator";var k=w.set;var A=w.getterFor(C);var O=RegExp.prototype;var P=TypeError;var x=o("".indexOf);var L=o("".matchAll);var M=!!L&&!g((function(){L("a",/./)}));var N=a((function e(t,r,n,i){k(this,{type:C,regexp:t,string:r,global:n,unicode:i,done:false})}),R,(function e(){var t=A(this);if(t.done)return s(undefined,true);var r=t.regexp;var n=t.string;var i=E(r,n);if(i===null){t.done=true;return s(undefined,true)}if(t.global){if(l(i[0])==="")r.lastIndex=S(n,c(r.lastIndex),t.unicode);return s(i,false)}t.done=true;return s(i,false)}));var D=function(e){var t=f(this);var r=l(e);var n=_(t,RegExp);var i=l(v(t));var o,a,s;o=new n(n===RegExp?t.source:t,i);a=!!~x(i,"g");s=!!~x(i,"u");o.lastIndex=c(t.lastIndex);return new N(o,r,a,s)};n({target:"String",proto:true,forced:M},{matchAll:function e(t){var r=u(this);var n,o,a,s;if(d(t)){if(p(t)){n=l(u(v(t)));if(!~x(n,"g"))throw new P("`.matchAll` does not allow non-global regexes")}if(M)return L(r,t);a=m(t,I);if(a===undefined&&T&&h(t)==="RegExp")a=D;if(a)return i(a,t,r)}else if(M)return L(r,t);o=l(r);s=new RegExp(t,"g");return T?i(D,s,o):s[I](o)}});T||I in O||y(O,I,D)},28551:(e,t,r)=>{"use strict";var n=r(20034);var i=String;var o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},28671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(67914);var o=r(44772);var a=r(44104);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e,t,r){return t=m(t),h(e,v()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const _=new a.Log({module:"HwICS.UI.Toast"});let S=function(e){function t(){s(this,t);return d(this,t,arguments)}y(t,e);return c(t,[{key:"render",value:function e(){const{item:t}=this.props;let r=t.className;const i=t.content;r+=" toast-content";return(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("div",{className:"icon"}),(0,n.jsx)("div",{className:"toast-text",title:i,children:i}),(0,n.jsx)("div",{className:"close","data-testid":"toast-close",onClick:()=>t.hide()})]})}}])}(i.Component);S=b([(0,o.componentDecorator)(_)],S);var E=t["default"]=S},28706:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(34376);var a=r(20034);var s=r(48981);var u=r(26198);var c=r(96837);var l=r(97040);var f=r(1469);var d=r(70597);var h=r(78227);var p=r(39519);var v=h("isConcatSpreadable");var m=p>=51||!i((function(){var e=[];e[v]=false;return e.concat()[0]!==e}));var y=function(e){if(!a(e))return false;var t=e[v];return t!==undefined?!!t:o(e)};var g=!m||!d("concat");n({target:"Array",proto:true,arity:1,forced:g},{concat:function e(t){var r=s(this);var n=f(r,0);var i=0;var o,a,d,h,p;for(o=-1,d=arguments.length;o<d;o++){p=o===-1?r:arguments[o];if(y(p)){h=u(p);c(i+h);for(a=0;a<h;a++,i++)if(a in p)l(n,i,p[a])}else{c(i+1);l(n,i++,p)}}n.length=i;return n}})},28802:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.typeMap=e.sizeMap=e.colorMap=void 0;const t=e.typeMap={STROKE:"stroke",FILL:"fill"};const r=e.colorMap={BLUE:"blue",WHITE:"white",GRAY:"gray",RED:"red",GREEN:"green"};const n=e.sizeMap={NORMAL:"normal",SMALL:"small",LARGE:"large",X_LANGE:"x-large"}}))},28845:(e,t,r)=>{"use strict";var n=r(44576);var i=r(69565);var o=r(94644);var a=r(26198);var s=r(58229);var u=r(48981);var c=r(79039);var l=n.RangeError;var f=n.Int8Array;var d=f&&f.prototype;var h=d&&d.set;var p=o.aTypedArray;var v=o.exportTypedArrayMethod;var m=!c((function(){var e=new Uint8ClampedArray(2);i(h,e,{length:1,0:3},1);return e[1]!==3}));var y=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new f(2);e.set(1);e.set("2",1);return e[0]!==0||e[1]!==2}));v("set",(function e(t){p(this);var r=s(arguments.length>1?arguments[1]:undefined,1);var n=u(t);if(m)return i(h,this,n,r);var o=this.length;var c=a(n);var f=0;if(c+r>o)throw new l("Wrong length");while(f<c)this[r+f]=n[f++]}),!m||y)},28989:(e,t)=>{"use strict";var r;var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case o:case s:case a:case d:case h:return e;default:switch(e=e&&e.$$typeof,e){case l:case c:case f:case v:case p:case u:return e;default:return t}}case i:return t}}}r=c;r=u;r=n;r=f;r=o;r=v;r=p;r=i;r=s;r=a;r=d;r=h;r=function(){return!1};r=function(){return!1};t.isContextConsumer=function(e){return g(e)===c};r=function(e){return g(e)===u};r=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};r=function(e){return g(e)===f};r=function(e){return g(e)===o};r=function(e){return g(e)===v};r=function(e){return g(e)===p};r=function(e){return g(e)===i};r=function(e){return g(e)===s};r=function(e){return g(e)===a};r=function(e){return g(e)===d};r=function(e){return g(e)===h};r=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===s||e===a||e===d||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||void 0!==e.getModuleId)?!0:!1};r=g},29098:(e,t,r)=>{"use strict";r.r(t)},29309:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(59225).set;var a=r(79472);var s=i.setImmediate?a(o,false):o;n({global:true,bind:true,enumerable:true,forced:i.setImmediate!==s},{setImmediate:s})},29314:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(28551);var a=r(1767);var s=r(24149);var u=r(99590);var c=r(9539);var l=r(19462);var f=r(84549);var d=r(96395);var h=!d&&f("drop",RangeError);var p=l((function(){var e=this.iterator;var t=this.next;var r,n;while(this.remaining){this.remaining--;r=o(i(t,e));n=this.done=!!r.done;if(n)return}r=o(i(t,e));n=this.done=!!r.done;if(!n)return r.value}));n({target:"Iterator",proto:true,real:true,forced:d||h},{drop:function e(t){o(this);var r;try{r=u(s(+t))}catch(e){c(this,"throw",e)}if(h)return i(h,this,r);return new p(a(this),{remaining:r})}})},29349:e=>{e.exports={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf){return e.indexOf(t)}for(r=0,n=e.length;r<n;r++){if(e[r]===t){return r}}return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach){return e.forEach(t,r)}for(n=0,i=e.length;n<i;n++){t.call(r,e[n],n,e)}},trim:function(e){if(String.prototype.trim){return e.trim()}return e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/;var r=t.exec(e);return r?r.index:-1}}},29423:(e,t,r)=>{"use strict";var n=r(94644);var i=r(79039);var o=r(67680);var a=n.aTypedArray;var s=n.getTypedArrayConstructor;var u=n.exportTypedArrayMethod;var c=i((function(){new Int8Array(1).slice()}));u("slice",(function e(t,r){var n=o(a(this),t,r);var i=s(this);var u=0;var c=n.length;var l=new i(c);while(c>u)l[u]=n[u++];return l}),c)},29706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.P2pTrack=void 0;function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}let s=t.P2pTrack=n((function e(){a(this,e)}))},29801:(e,t,r)=>{const n=r(30208);const i=r(24357);const o=r(11433);const a=r(25822);const s=r(24861);const u=r(67044);const c=r(56886);const l=r(76320);function f(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){const n=[];let i;while((i=e.exec(r))!==null){n.push({data:i[0],index:i.index,mode:t,length:i[0].length})}return n}function h(e){const t=d(u.NUMERIC,n.NUMERIC,e);const r=d(u.ALPHANUMERIC,n.ALPHANUMERIC,e);let i;let o;if(c.isKanjiModeEnabled()){i=d(u.BYTE,n.BYTE,e);o=d(u.KANJI,n.KANJI,e)}else{i=d(u.BYTE_KANJI,n.BYTE,e);o=[]}const a=t.concat(r,i,o);return a.sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function v(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;if(r&&r.mode===t.mode){e[e.length-1].data+=t.data;return e}e.push(t);return e}),[])}function m(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:f(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:f(i.data)}])}}return t}function y(e,t){const r={};const i={start:{}};let o=["start"];for(let a=0;a<e.length;a++){const s=e[a];const u=[];for(let e=0;e<s.length;e++){const c=s[e];const l=""+a+e;u.push(l);r[l]={node:c,lastCount:0};i[l]={};for(let e=0;e<o.length;e++){const a=o[e];if(r[a]&&r[a].node.mode===c.mode){i[a][l]=p(r[a].lastCount+c.length,c.mode)-p(r[a].lastCount,c.mode);r[a].lastCount+=c.length}else{if(r[a])r[a].lastCount=c.length;i[a][l]=p(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,t)}}}o=u}for(let e=0;e<o.length;e++){i[o[e]].end=0}return{map:i,table:r}}function g(e,t){let r;const u=n.getBestModeForData(e);r=n.from(t,u);if(r!==n.BYTE&&r.bit<u.bit){throw new Error('"'+e+'"'+" cannot be encoded with mode "+n.toString(r)+".\n Suggested mode is: "+n.toString(u))}if(r===n.KANJI&&!c.isKanjiModeEnabled()){r=n.BYTE}switch(r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new o(e);case n.KANJI:return new s(e);case n.BYTE:return new a(e)}}t.fromArray=function e(t){return t.reduce((function(e,t){if(typeof t==="string"){e.push(g(t,null))}else if(t.data){e.push(g(t.data,t.mode))}return e}),[])};t.fromString=function e(r,n){const i=h(r,c.isKanjiModeEnabled());const o=m(i);const a=y(o,n);const s=l.find_path(a.map,"start","end");const u=[];for(let e=1;e<s.length-1;e++){u.push(a.table[s[e]].node)}return t.fromArray(v(u))};t.rawSplit=function e(r){return t.fromArray(h(r,c.isKanjiModeEnabled()))}},29833:(e,t,r)=>{"use strict";var n=r(15823);n("Float64",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},29908:(e,t,r)=>{"use strict";var n=r(46518);var i=r(3470);n({target:"Object",stat:true},{is:i})},29948:(e,t,r)=>{"use strict";var n=r(35370);var i=r(94644).getTypedArrayConstructor;e.exports=function(e,t){return n(i(e),t)}},30067:(e,t,r)=>{"use strict";r(17145)},30208:(e,t,r)=>{const n=r(21878);const i=r(67044);t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};t.MIXED={bit:-1};t.getCharCountIndicator=function e(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(r)){throw new Error("Invalid version: "+r)}if(r>=1&&r<10)return t.ccBits[0];else if(r<27)return t.ccBits[1];return t.ccBits[2]};t.getBestModeForData=function e(r){if(i.testNumeric(r))return t.NUMERIC;else if(i.testAlphanumeric(r))return t.ALPHANUMERIC;else if(i.testKanji(r))return t.KANJI;else return t.BYTE};t.toString=function e(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};t.isValid=function e(t){return t&&t.bit&&t.ccBits};function o(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const r=e.toLowerCase();switch(r){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}t.from=function e(r,n){if(t.isValid(r)){return r}try{return o(r)}catch(e){return n}}},30237:(e,t,r)=>{"use strict";var n=r(6469);n("flatMap")},30258:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.throttle=e.sleep=e.setPLogger=e.isNullOrEmpty=e.getPLogger=e.getClientId=e.formatType=e.formatDate=e.deepCopy=e.debounce=e.createEntry=e.Noop=void 0;var t=e.Noop=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return r};var r={debug:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},info:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},warn:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},error:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)}};var n=e.getPLogger=function e(){return r};var i=e.formatType=function e(t){return Object.prototype.toString.apply(t).match(/\[object\s(.*)]/)[1].toLowerCase()};i.STRING="string";i.OBJECT="object";i.PROXYOBJECT="proxyobject";i.FUNCTION="function";i.ARRAY="array";i.BOOLEAN="boolean";i.NUMBER="number";i.PROMISE="promise";i.NULL="null";i.UNDEFINED="undefined";i.NODELIST="nodelist";i.HTMLCOLLECTION="htmlcollection";i.EVENT="event";i.XMLDOCUMENT="xmldocument";i.DOCUMENT="document";i.ASYNCFUNCTION="asyncfunction";var o=e.setPLogger=function e(t){if(i(t===null||t===void 0?void 0:t.debug)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.info)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.warn)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.error)===i.FUNCTION){r=t}};var a=e.isNullOrEmpty=function e(t){var r=i(t);if(r===i.OBJECT){return Object.keys(t).length===0}return t===undefined||t===null||t.toString()==="NaN"||t===""||t.length===0};var s=e.deepCopy=function e(t){if(a(t)){return t}if(i(t)===i.STRING||i(t)===i.NUMBER||i(t)===i.BOOLEAN){return t}return JSON.parse(JSON.stringify(t))};var u=e.formatDate=function e(t,r){var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:parseInt((t.getMilliseconds()/1e3).toFixed(3).substr(2))};if(/(y+)/.test(r)){r=r.replace(RegExp.$1,String(t.getFullYear()).substr(4-RegExp.$1.length))}for(var i in n){if(new RegExp("("+i+")").test(r)){r=r.replace(RegExp.$1,RegExp.$1.length===1?n[i].toString():("00"+n[i]).substr(String(n[i]).length))}}return r};var c=e.getClientId=function(){var e=0;var t=(new Date).getTime();return function(){var r=(new Date).getTime();if(r===t){e++;if(e>999){e=1}}else{t=r;e=0}return t*1e3+e}}();var l=e.createEntry=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";return"".concat(t," ").concat(c())};var f=e.sleep=function e(t){return new Promise((function(e){return setTimeout(e,t)}))};var d=e.debounce=function e(t,r){var n=0;return function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++){i[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){t.apply(void 0,i)}),r)}};var h=e.throttle=function e(t,r){var n;return function(){if(!n){t.apply(void 0,arguments);n=setTimeout((function(){n=null}),r)}}}}))},30421:e=>{"use strict";e.exports={}},30455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removePrefix=t.getErrorMessage=void 0;var n=r(75625);var i=r(21537);var o=r(26440);var a=r(11686);const s={[n.RetCodes.DIALOG_CONCURRENT_EXCEED_MAX_VALUE]:"errorDialogConcurrentExceedMaxValue",[n.RetCodes.ACTIVE_CODE_AUTH_FAILED]:"errorActiveCodeAuthFailed",[n.RetCodes.ACTIVE_CODE_AUTH_LOCKED]:"errorActiveCodeAuthLocked",[n.RetCodes.ACTIVE_CODE_AUTH_EXPIRED]:"errorActiveCodeAuthExpired",[n.RetCodes.ONCE_CODE_AUTH_FAILED]:"errorActiveCodeAuthFailed",[n.RetCodes.ONCE_CODE_AUTH_LOCKED]:"errorOnceCodeAuthLocked",[n.RetCodes.SLIDE_VERIFICATON_VERIFY_FAILED]:"jigsawStatusFail",[n.RetCodes.SLIDE_VERIFICATON_VERIFY_FAILED_AND_EXCEED_MAX_TIMES]:"errorSlideVerificatonVerifyFailedAndExceedMaxTimes",[n.RetCodes.FAILED_TO_QUERY_TENANT_ID]:"errorConnectionInterrupted",[n.RetCodes.INTERACTIVE_NUMBER_IS_INSUFFICIENT]:"errorTokenNumberIsInsufficient",[n.RetCodes.TOKEN_NUMBER_IS_INSUFFICIENT]:"errorInteractiveNumberIsInsufficient",[n.RetCodes.GET_DHM_STYLE_FAIL]:"subscriptionResourceHasExpired",[n.RetCodes.RPC_CALL_FAILED]:"errorRPCCallFailed",[n.RetCodes.AIUI_UNAUTHORIZED]:"errorAIUIUnauthorized",[n.RetCodes.SPARK_UNAUTHORIZED]:"errorSpeakUnauthorized",[n.RetCodes.IFLY_APPLICATION_SCENE_CONFIG_ERROR]:"iflytekApplicationSceneConfigError",[n.RetCodes.MOBVOI_QUANTITY_NOT_ENOUGH]:"mobvoiQuantityNotEnough",[n.RetCodes.MOBVOI_UNAUTHORIZED]:"mobvoiUnauthorized",[n.RetCodes.MOBVOI_ROLE_ID_IS_INVALID]:"mobvoiRoleIdIsInvalid",[n.RetCodes.NO_PERMISSION_USE]:"domainIsNotAllowed",[n.RetCodes.SIS_AUTHORIZATION_FAILED]:"SISAuthorizationFailed",[n.RetCodes.CURRENT_LANGUAGE_NOT_SUPPORT_RECOGNITION]:"currentLanguageNotSupportRecognition",[n.RetCodes.SINGLE_TENANT_WEBSOCKET_LINKS_EXCEEDS]:"singleTenantWebsocketLinksExceeds",[n.RetCodes.WEBSOCKET_LINKS_EXCEEDS]:"websocketLinksExceeds",[n.RetCodes.DIALOG_NOT_EXIST]:"DIALOG_NOT_EXIST",[n.RetCodes.RPC_ACTION_NOT_EXIST]:"RPC_ACTION_NOT_EXIST",[n.RetCodes.ICS_EXCEPTION]:"ICS_EXCEPTION",[n.RetCodes.REQUEST_TOO_FREQUENTLY]:"REQUEST_TOO_FREQUENTLY",[n.RetCodes.TENANT_CLEANUP_JOB_STOPPED]:"TENANT_CLEANUP_JOB_STOPPED",[n.RetCodes.ROBOT_NOT_EXIST]:"ROBOT_NOT_EXIST",[n.RetCodes.ROBOT_NO_PERMISSION]:"ROBOT_NO_PERMISSION",[n.RetCodes.START_SMART_CHAT_FAILED]:"START_SMART_CHAT_FAILED",[n.RetCodes.STOP_SMART_CHAT_FAILED]:"STOP_SMART_CHAT_FAILED",[n.RetCodes.SHOW_SMART_CHAT_FAILED]:"SHOW_SMART_CHAT_FAILED",[n.RetCodes.GENERATE_SLIDE_VERIFICATON_FAILED]:"GENERATE_SLIDE_VERIFICATON_FAILED",[n.RetCodes.SLIDE_VERIFICATON_NOT_EXIST]:"SLIDE_VERIFICATON_NOT_EXIST",[n.RetCodes.DIALOG_NO_PERMISSION]:"DIALOG_NO_PERMISSION",[n.RetCodes.HOT_QUESTION_NOT_EXIST]:"HOT_QUESTION_NOT_EXIST",[n.RetCodes.MESSAGE_PARSE_ERROR]:"MESSAGE_PARSE_ERROR",[n.RetCodes.UNKNOWN_ACTION]:"UNKNOWN_ACTION",[n.RetCodes.CONNECT_APP_TIMEOUT]:"CONNECT_APP_TIMEOUT",[n.RetCodes.AUTHTOKEN_INVALID]:"AUTHTOKEN_INVALID",[n.RetCodes.QUERYPARAM_INVALID]:"QUERYPARAM_INVALID",[n.RetCodes.CLIENT_ERROR_MESSAGE]:"CLIENT_ERROR_MESSAGE",[n.RetCodes.WEBCLIENT_START_CHAT_WORKER_DISCONNECT]:"WEBCLIENT_START_CHAT_WORKER_DISCONNECT",[n.RetCodes.CHANNEL_RECORED_NOT_FOUND]:"CHANNEL_RECORED_NOT_FOUND",[n.RetCodes.ICS_NOT_IN_TEXT_MODE]:"ICS_NOT_IN_TEXT_MODE",[n.RetCodes.ICS_TEXT_QUESTION_LENGTH_LIMITED]:"ICS_TEXT_QUESTION_LENGTH_LIMITED",[n.RetCodes.ICS_TEXT_QUESTION_IS_EMPTY]:"ICS_TEXT_QUESTION_IS_EMPTY",[n.RetCodes.ICS_TEXT_QUESTION_NOT_IN_WAIT_QUESTION_STATUS]:"ICS_TEXT_QUESTION_NOT_IN_WAIT_QUESTION_STATUS",[n.RetCodes.ICS_INVALID_INTERACTION_MODE]:"ICS_INVALID_INTERACTION_MODE",[n.RetCodes.MOBVOI_REQUEST_FLOW_LIMITED]:"MOBVOI_REQUEST_FLOW_LIMITED",[n.RetCodes.UPLOAD_LOG_COUNT_EXCEED_MAX_COUNT]:"UPLOAD_LOG_COUNT_EXCEED_MAX_COUNT",[n.RetCodes.ICS_EXTEND_PARAM_INVALID]:"ICS_EXTEND_PARAM_INVALID",[n.RetCodes.PACIFY_WORDS_EXIST]:"PACIFY_WORDS_EXIST",[n.RetCodes.PACIFY_WORDS_COUNT_EXCEED_MAX_VALUE]:"PACIFY_WORDS_COUNT_EXCEED_MAX_VALUE",[n.RetCodes.PACIFY_WORDS_NOT_EXIST]:"PACIFY_WORDS_NOT_EXIST",[n.RetCodes.PACIFY_WORDS_NO_PERMISSION]:"PACIFY_WORDS_NO_PERMISSION",[n.RetCodes.PACIFY_WORDS_INTENT_NOT_SUPPORT]:"PACIFY_WORDS_INTENT_NOT_SUPPORT",[n.RetCodes.ICS_ROBOT_ROOM_ID_EMPTY]:"ICS_ROBOT_ROOM_ID_EMPTY",[n.RetCodes.ICS_UNMATCHED_APP_TYPE_AIUI]:"ICS_UNMATCHED_APP_TYPE_AIUI",[n.RetCodes.ICS_UNMATCHED_APP_TYPE_SPARK]:"ICS_UNMATCHED_APP_TYPE_SPARK",[n.RetCodes.ICS_THIRD_PARTY_DRIVER_NOT_ALLOWED_WEB_START_CHAT]:"ICS_THIRD_PARTY_DRIVER_NOT_ALLOWED_WEB_START_CHAT",[n.RetCodes.ICS_MEDIA_SERVICE_ADDR_IS_EMPTY]:"ICS_MEDIA_SERVICE_ADDR_IS_EMPTY",[n.RetCodes.ICS_MEDIA_NEGOTIATE_FAILED]:"ICS_MEDIA_NEGOTIATE_FAILED",[n.RetCodes.ICS_SIS_FROZEN_ERROR]:"ICS_SIS_FROZEN_ERROR",[n.RetCodes.ICS_THIRD_PARTY_DRIVE_NOT_ALLOWED_THIS_WEB_MESSAGE]:"ICS_THIRD_PARTY_DRIVE_NOT_ALLOWED_THIS_WEB_MESSAGE",[n.RetCodes.ICS_MOBVOI_ASR_UNAUTHORIZED]:"ICS_MOBVOI_ASR_UNAUTHORIZED",[n.RetCodes.ICS_ASR_WAIT_VOICE_TIME_OUT]:"ICS_ASR_WAIT_VOICE_TIME_OUT",[n.RetCodes.ICS_SIS_SERVICE_NOT_SUBSCRIBE]:"ICS_SIS_SERVICE_NOT_SUBSCRIBE",[n.RetCodes.ICS_AUDIO_REPORT_TASK_EXIST]:"ICS_AUDIO_REPORT_TASK_EXIST",[n.RetCodes.ICS_CREATE_AUDIO_RECORD_TASK_FAILED]:"ICS_CREATE_AUDIO_RECORD_TASK_FAILED",[n.RetCodes.ICS_AUDIO_RECORD_NOT_ENABLE]:"ICS_AUDIO_RECORD_NOT_ENABLE",[n.MPSRetCodes.INVALID_PARAMETER]:"invalidParamter",[n.MPSRetCodes.ILLEGAL_ACCESS]:"authorizationExpired",[n.MPSRetCodes.TONE_RESOURCE_ERROR]:"toneResourceError",[n.MPSRetCodes.NO_ENOUGH_RESOURCE]:"errorNoEnoughResource2",[n.MPSRetCodes.REFRESH_ASSET_FAILED]:"refreshAssetFailed",[n.MPSRetCodes.MPS_CHANGE_FINISHED_JOB_STATE_FAILED]:"MPS_CHANGE_FINISHED_JOB_STATE_FAILED",[n.MPSRetCodes.MPS_ROOM_INFO_NOT_FOUND]:"MPS_ROOM_INFO_NOT_FOUND",[n.MPSRetCodes.MPS_TASK_EXPIRED]:"MPS_TASK_EXPIRED",[n.MPSRetCodes.MPS_ASSET_ID_UNAVAILABLE]:"MPS_ASSET_ID_UNAVAILABLE",[n.MPSRetCodes.MPS_JOB_NOT_EXISTED]:"MPS_JOB_NOT_EXISTED",[n.MPSRetCodes.CHAT_QUOTA_INSUFFICIENT]:"errorChatQuotaInsufficient",[n.MPSRetCodes.CONVERSATION_RESOURCE_FULL]:"conversationResourceFull",[n.MPSRetCodes.CHAT_JOBS_NUM_IS_OVER_CONCURRENCY]:"conversationNoResource",[n.MPSRetCodes.CHAT_SUM_CONCURRENCY_OR_JOBS_NUM_IS_OVER_RESOURCES_NUM]:"errorOrderResourcesFull2",[n.MPSRetCodes.MPS_ROOM_NAME_DUPLICATE]:"MPS_ROOM_NAME_DUPLICATE",[n.MPSRetCodes.MPS_JOB_HEARTBEAT_FAILED]:"MPS_JOB_HEARTBEAT_FAILED",[n.MPSRetCodes.MPS_ASSET_ID_INVALID]:"MPS_ASSET_ID_INVALID",[n.MPSRetCodes.MPS_NAME_INCLUDE_INVALID_SYMBOL]:"MPS_NAME_INCLUDE_INVALID_SYMBOL",[n.TTSCRetCodes.TTS_ACCESS_CONFIG_ERROR]:"TTS_ACCESS_CONFIG_ERROR",[n.TTSCRetCodes.TTS_INSUFFICIENT_ACCOUNT_BALANCE]:"ttsInsufficientAccountBalance",[n.TTSCRetCodes.TTS_INVALID_TEXT]:"TTS_INVALID_TEXT",[n.TTSCRetCodes.TTS_NO_ACCESS_CONFIG]:"TTS_NO_ACCESS_CONFIG",[n.TTSCRetCodes.TTS_TO_LONG_WORD_TEXT]:"TTS_INVALID_TEXT",[n.TTSCRetCodes.TTS_VOICE_ASSET_UNACTIVATED]:"TTS_VOICE_ASSET_UNACTIVATED",[n.TTSCRetCodes.TTS_UNSUPPORTED_LANGUAGE_TEXT]:"TTS_UNSUPPORTED_LANGUAGE_TEXT",[a.SDKErrorCode.MPS_JOB_STATE_NULL]:"errorConnectionInterrupted",[a.SDKErrorCode.MPS_JOB_STATE_ERROR]:"errorConversationEnded",[a.SDKErrorCode.RTC_PEER_LEAVE]:"errorConversationEnded",[a.SDKErrorCode.RTC_KICK_ROOM]:"errorConversationEnded",[a.SDKErrorCode.RTC_KICK_OUT]:"errorKickOut",[a.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR]:"errorNoAudioDevicePermission",[a.SDKErrorCode.WEBSOCKET_RESPONSE_TIMEOUT]:"requestTimedOutTrayAgain",[a.SDKErrorCode.WEBSOCKET_NETWORK_ERROR]:"errorNetworkError",[a.SDKErrorCode.WEBSOCKET_KICK_OUT]:"errorKickOut",[a.SDKErrorCode.WEBSOCKET_CONNECT_ERROR]:"errorNetworkError",[a.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL]:"WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL",[a.SDKErrorCode.WORKER_JOB_STOP_BY_MUTE_OVERTIME]:"WORKER_JOB_STOP_BY_MUTE_OVERTIME",[a.SDKErrorCode.WEBSOCKET_CONNECT_TIMEOUT]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_ANSWER_SDP_INVALID]:"RTC_ERR_CODE_ANSWER_SDP_INVALID",[i.SparkRTCErrorCode.RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBRTC_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_MEDIA_NETWORK_ERROR]:"mediaLinkEstablishmentFailed",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR]:"errorNetworkError",[i.SparkRTCErrorCode.RTC_ERR_CODE_PLAY_NOT_ALLOW]:"errorPlayNotAllow",[i.SparkRTCErrorCode.RTC_ERR_CODE_RTC_SDK_ERROR]:"RTC_ERR_CODE_RTC_SDK_ERROR",[i.SparkRTCErrorCode.RTC_ERR_CODE_WAIT_RSP_TIMEOUT]:"RTC_ERR_CODE_WAIT_RSP_TIMEOUT",[i.SparkRTCErrorCode.RTC_ERR_CODE_INVALID_PARAMETER]:"RTC_ERR_CODE_INVALID_PARAMETER",[i.SparkRTCErrorCode.RTC_ERR_CODE_INVALID_OPERATION]:"RTC_ERR_CODE_INVALID_OPERATION",[i.SparkRTCErrorCode.RTC_ERR_CODE_NO_AVAILABLE_DEVICES]:"RTC_ERR_CODE_NO_AVAILABLE_DEVICES",[i.SparkRTCErrorCode.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES]:"RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES",[i.SparkRTCErrorCode.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES]:"RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES",[i.SparkRTCErrorCode.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES]:"RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES",[i.SparkRTCErrorCode.RTC_ERR_CODE_STATUS_ERROR]:"RTC_ERR_CODE_STATUS_ERROR",[i.SparkRTCErrorCode.RTC_ERR_CODE_WAIT_CONFIG_FAIL]:"RTC_ERR_CODE_WAIT_CONFIG_FAIL",[i.SparkRTCErrorCode.RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL]:"RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL",[i.SparkRTCErrorCode.RTC_ERR_CODE_REGION_NOT_COVERED]:"RTC_ERR_CODE_REGION_NOT_COVERED",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED]:"RTC_ERR_CODE_WEBSOCKET_INTERRUPTED",[i.SparkRTCErrorCode.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED]:"RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED",[i.SparkRTCErrorCode.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED]:"RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED",[i.SparkRTCErrorCode.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND]:"RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND",[i.SparkRTCErrorCode.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE]:"RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE",[i.SparkRTCErrorCode.RTC_ERR_CODE_ROLE_NO_PERMISSION]:"RTC_ERR_CODE_ROLE_NO_PERMISSION",[i.SparkRTCErrorCode.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED]:"RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED",[i.SparkRTCErrorCode.RTC_ERR_CODE_SIGNATURE_EXPIRED]:"RTC_ERR_CODE_SIGNATURE_EXPIRED",[i.SparkRTCErrorCode.RTC_ERR_CODE_SIGNATURE_INVALID]:"RTC_ERR_CODE_SIGNATURE_INVALID",[i.SparkRTCErrorCode.RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED]:"errorBrowserNotSupport",[i.SparkRTCErrorCode.RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED]:"errorBrowserNotSupport",[n.WorkerRetCodes.DHICIS_ERROR]:"DHICIS_ERROR",[n.WorkerRetCodes.DHICIS_INFER_SERVICE_ERROR]:"DHICIS_INFER_SERVICE_ERROR",[n.WorkerRetCodes.DHICIS_TASK_READY_ERROR]:"DHICIS_TASK_READY_ERROR",[n.WorkerRetCodes.DHICIS_CREATE_INFER_MODEL_ERROR]:"DHICIS_CREATE_INFER_MODEL_ERROR",[n.WorkerRetCodes.DHICIS_WORKER_JOIN_ROOM_FAIL]:"DHICIS_WORKER_JOIN_ROOM_FAIL",[n.WorkerRetCodes.DHICIS_MANAGER_SERVICE_ERROR]:"DHICIS_MANAGER_SERVICE_ERROR",[n.WorkerRetCodes.DHICIS_JOB_STOP_BY_COMMAND]:"DHICIS_JOB_STOP_BY_COMMAND",[n.WorkerRetCodes.DHICIS_FSM_STATE_TIME_OUT]:"DHICIS_FSM_STATE_TIME_OUT",[n.WorkerRetCodes.DHICIS_ICS_ERROR]:"DHICIS_ICS_ERROR",[n.WorkerRetCodes.DHICIS_RTSA_ROOM_EMPTY]:"DHICIS_RTSA_ROOM_EMPTY",[n.WorkerRetCodes.DHICIS_RTSA_REPORT_LEAVE_ROOM]:"DHICIS_RTSA_REPORT_LEAVE_ROOM",[n.WorkerRetCodes.DHICIS_MODEL_FILE_DOWN_FAIL]:"DHICIS_MODEL_FILE_DOWN_FAIL",[n.WorkerRetCodes.DHICIS_BACKGROUND_FILE_DOWN_FAIL]:"DHICIS_BACKGROUND_FILE_DOWN_FAIL",[n.WorkerRetCodes.DHICIS_WORKER_JOIN_ROOM_TIMEOUT]:"DHICIS_WORKER_JOIN_ROOM_TIMEOUT",[n.WorkerRetCodes.DHICIS_JOIN_ROOM_TASK_FAIL]:"DHICIS_JOIN_ROOM_TASK_FAIL",[n.WorkerRetCodes.DHICIS_TTS_PREHEAT_TASK_FAIL]:"DHICIS_TTS_PREHEAT_TASK_FAIL",[n.WorkerRetCodes.DHICIS_DATA_PACKAGE_IS_NOT_ZIP]:"DHICIS_DATA_PACKAGE_IS_NOT_ZIP",[n.WorkerRetCodes.DHICIS_TOO_MANY_ENTRIES_IN_PACKAGE]:"DHICIS_TOO_MANY_ENTRIES_IN_PACKAGE",[n.WorkerRetCodes.DHICIS_PACKAGE_TOO_LARGE]:"DHICIS_PACKAGE_TOO_LARGE",[n.WorkerRetCodes.DHICIS_FILE_IN_PACKAGE_TOO_LARGE]:"DHICIS_FILE_IN_PACKAGE_TOO_LARGE",[n.WorkerRetCodes.DHICIS_UNEXPECTED_DIRECTORY_IN_PACKAGE]:"DHICIS_UNEXPECTED_DIRECTORY_IN_PACKAGE",[n.WorkerRetCodes.DHICIS_PACKAGE_ENTRY_ILLEGAL_NAME]:"DHICIS_PACKAGE_ENTRY_ILLEGAL_NAME",[n.WorkerRetCodes.DHICIS_FILE_NAME_INVALID]:"DHICIS_FILE_NAME_INVALID",[n.WorkerRetCodes.DHICIS_JOB_INFO_PARA_INVALID]:"DHICIS_JOB_INFO_PARA_INVALID",[n.WorkerRetCodes.DHICIS_FSM_STATE_ERROR]:"DHICIS_FSM_STATE_ERROR",[n.WorkerRetCodes.DHICIS_TTS_CONVERT_FAIL]:"DHICIS_TTS_CONVERT_FAIL",[n.WorkerRetCodes.DHICIS_NO_IDLE_WORK]:"DHICIS_NO_IDLE_WORK",[n.WorkerRetCodes.DHICIS_NO_RESOURCE]:"DHICIS_NO_RESOURCE",[n.WorkerRetCodes.DHICIS_RESOURCE_LIMITED]:"DHICIS_RESOURCE_LIMITED",[n.WBWRetCodes.WBW_AGENT_ROLE_NOT_EXISTED]:"wbwAgentRoleNotExisted",[n.WBWRetCodes.WBW_LLM_NOT_EXISTED]:"wbwLLMNotExisted",[n.WBWRetCodes.WBW_LLM_INVALID_MODEL]:"wbwLLMInvalidModel",[n.WBWRetCodes.WBW_LLM_ACCESS_FAILED]:"wbwLLMAccessFailed",[n.WBMRetCodes.WBM_LLM_CONFIG_NOT_EXIST]:"WBM_LLM_CONFIG_NOT_EXIST",[n.WBMRetCodes.WBM_LLM_CONFIG_NO_PERMISSION]:"CONFIG_NO_PERMISSION",[n.WBMRetCodes.WBM_PLUGIN_CONFIG_NO_PERMISSION]:"CONFIG_NO_PERMISSION",[n.WBMRetCodes.WBM_PLUGIN_CONFIG_NOT_EXIST]:"WBM_PLUGIN_CONFIG_NOT_EXIST",[n.WBCRetCodes.WBC_ROLE_NOT_EXIST]:"WBC_ROLE_NOT_EXIST",[n.WBCRetCodes.WBC_CONFIG_NO_PERMISSION]:"CONFIG_NO_PERMISSION"};const u=e=>{var t;return e===null||e===void 0?void 0:(t=e.replace)===null||t===void 0?void 0:t.call(e,"MSS.","")};t.removePrefix=u;const c=({errorCode:e,useDefaultMsg:t=true})=>{const{language:r}=(0,o.$getState)().lang;if(!e){if(t){return r.ERR_GENERAL}return""}const n=u(e);const i=s[e]||s[n]||s[`MSS.${n}`];const a=r[i];if(a){return a}if(t){return r.ERR_GENERAL}return""};t.getErrorMessage=c},30491:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.startsWith=e.getIsInWhiteListFn=void 0;function r(){return/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi}function n(e){var t=e.url,n=e.whiterList,i=e.ignoreIp;var o=new URL(t);var a=r();if(i&&a.test(o.hostname)){return true}n=n.filter((function(e){return!!e}));for(var s=0;s<n.length;s++){if(o.hostname.endsWith(n[s])){return true}}return false}var i=e.startsWith=function e(t){return function(e){return e.toLowerCase().startsWith(t)}};var o=e.getIsInWhiteListFn=function e(r){return function(e){var i=e.url,o=e.whiterList,a=e.ignoreIp,s=a===void 0?true:a;try{if((0,t.isNullOrEmpty)(i)){return false}if(r(i)){return n({url:i,whiterList:o,ignoreIp:s})}return false}catch(e){return false}}}}))},30531:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(28551);var s=r(1767);var u=r(48646);var c=r(19462);var l=r(9539);var f=r(96395);var d=r(84549);var h=!f&&d("flatMap",TypeError);var p=c((function(){var e=this.iterator;var t=this.mapper;var r,n;while(true){if(n=this.inner)try{r=a(i(n.next,n.iterator));if(!r.done)return r.value;this.inner=null}catch(t){l(e,"throw",t)}r=a(i(this.next,e));if(this.done=!!r.done)return;try{this.inner=u(t(r.value,this.counter++),false)}catch(t){l(e,"throw",t)}}}));n({target:"Iterator",proto:true,real:true,forced:f||h},{flatMap:function e(t){a(this);try{o(t)}catch(e){l(this,"throw",e)}if(h)return i(h,this,t);return new p(s(this),{mapper:t,inner:null})}})},30560:(e,t,r)=>{"use strict";r.r(t)},30566:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79306);var o=r(20034);var a=r(39297);var s=r(67680);var u=r(40616);var c=Function;var l=n([].concat);var f=n([].join);var d={};var h=function(e,t,r){if(!a(d,t)){var n=[];var i=0;for(;i<t;i++)n[i]="a["+i+"]";d[t]=c("C,a","return new C("+f(n,",")+")")}return d[t](e,r)};e.exports=u?c.bind:function e(t){var r=i(this);var n=r.prototype;var a=s(arguments,1);var u=function e(){var n=l(a,s(arguments));return this instanceof u?h(r,n.length,n):r.apply(t,n)};if(o(n))u.prototype=n;return u}},30916:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(79524),r(2867)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioContextLocalRecorder=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=d(e,"string");return"symbol"==n(t)?t:t+""}function d(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=e.AudioContextLocalRecorder=function(){function e(n){s(this,e);l(this,"instance",void 0);var i=new AudioContext({sampleRate:16e3});if(n.useScriptProcessor&&!!i.createScriptProcessor){this.instance=new t.ScriptProcessorRecord(n)}else{this.instance=new r.AudioWorkletNodeRecord(n)}}return c(e,[{key:"startRecord",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.startRecord(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=a(i().mark((function e(){return i().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.instance.stopRecord());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.setSinkId(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},30958:(e,t,r)=>{"use strict";r(5240)},30981:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(96540);var i=r(20998);var o=true&&(0,i.A)()?n.useLayoutEffect:n.useEffect;var a=function e(t,r){var i=n.useRef(true);o((function(){return t(i.current)}),r);o((function(){i.current=false;return function(){i.current=true}}),[])};var s=function e(t,r){a((function(e){if(!e){return t()}}),r)};const u=a},30985:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(28551);var a=r(92744);n({target:"Reflect",stat:true,sham:!a},{preventExtensions:function e(t){o(t);try{var r=i("Object","preventExtensions");if(r)r(t);return true}catch(e){return false}}})},31016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UHanWebsocketManager=t.DEFAULT_HOST=void 0;var n=r(44104);var i=r(44772);var o=r(98020);var a=r(84743);var s=r(94855);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const h=new n.Log({module:"HwICS.UHanWebsocketManager"});const p={level1:{retryCount:10,delay:5e3},level2:{retryCount:30,delay:1e4},level3:{delay:3e4}};const v=t.DEFAULT_HOST="127.0.0.1:10001";let m=t.UHanWebsocketManager=function(){function e({onMessage:t,onOpen:r}){u(this,e);this.wsRetryCount=0;this.getUrl=()=>{var e,t;if((e=s.ConfigManager.getUHanConfig())!==null&&e!==void 0&&e.origin){var r;return`${((r=s.ConfigManager.getUHanConfig())===null||r===void 0?void 0:r.origin)||v}/ws`}else if((t=s.ConfigManager.getUHanConfig())!==null&&t!==void 0&&t.host){var n;return`wss://${((n=s.ConfigManager.getUHanConfig())===null||n===void 0?void 0:n.host)||v}/ws`}h.error("getUrl empty");return""};this.realConnect=(0,i.debounce)((async e=>{var t,r;const n=this.wsRetryCount;const i=(t=this.websocketItem)===null||t===void 0?void 0:t.isConnectEnd();h.info("realConnect",e,n,i);if(!i){return}if(this.wsRetryCount<p.level1.retryCount){this.waitRetryTask=a.Utils.waitTask(p.level1.delay)}else if(this.wsRetryCount<p.level2.retryCount){this.waitRetryTask=a.Utils.waitTask(p.level2.delay)}else{this.waitRetryTask=a.Utils.waitTask(p.level3.delay)}if(!await this.waitRetryTask.promise){return}delete this.waitRetryTask;this.wsRetryCount++;if((r=this.websocketItem)!==null&&r!==void 0&&r.isOpen()){h.info("reconnect cancel, has connected");return}const o=await this.init(e);h.info("reconnect end",e,n,o)}),100);this.onMessage=t;this.onOpen=r;this.wsRetryCount=0}return l(e,[{key:"init",value:async function e(t){var r,n,i;h.info("create",t,!!this.initProm,s.ConfigManager.getUHanConfig());if(this.initProm){return this.initProm}this.websocketItem=new o.WebSocketBase;this.initProm=(r=this.websocketItem)===null||r===void 0?void 0:(n=r.connect({url:this.getUrl(),onerror:this.handleError.bind(this),onclose:this.handleClose.bind(this),onopen:this.handleOpen.bind(this),onmessage:this.onMessage}))===null||n===void 0?void 0:(i=n.then((()=>{this.clearReconnectCount("after connect");return true})))===null||i===void 0?void 0:i.catch((e=>{h.error("connect failed",e);return false}));return this.initProm}},{key:"destroy",value:function e(t){var r;t+=",destroy";(r=this.waitRetryTask)===null||r===void 0?void 0:r.stop();this.clearOldWebsocket(t);if(this.websocketItem){this.websocketItem.close(t)}}},{key:"handleError",value:function e(){h.info("_handleError");this.clearOldWebsocket("_handleError");this.realConnect("_handleError")}},{key:"handleClose",value:function e(t){h.info("_handleClose",t===null||t===void 0?void 0:t.code);this.clearOldWebsocket("_handleClose");this.realConnect("_handleClose")}},{key:"handleOpen",value:function e(){var t;h.info("_handleOpen");(t=this.onOpen)===null||t===void 0?void 0:t.call(this)}},{key:"clearOldWebsocket",value:function e(t){h.info("_clearOldWebsocket",t);delete this.initProm}},{key:"clearReconnectCount",value:function e(t){h.info("_clearReconnectCount",t);this.wsRetryCount=0}}])}()},31051:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(33517);var a=r(97040);var s=Array;var u=i((function(){function e(){}return!(s.of.call(e)instanceof e)}));n({target:"Array",stat:true,forced:u},{of:function e(){var t=0;var r=arguments.length;var n=new(o(this)?this:s)(r);while(r>t)a(n,t,arguments[t++]);n.length=r;return n}})},31053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VidoOrientationTypesMap=t.ScreenOrientationPolyfill=t.OrientationTypesMap=void 0;var n=r(44104);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const c=new n.Log({module:"HwICS.service.polyfill"});const l=()=>{var e,t,r,n,i,o,a,s;return typeof((e=window)===null||e===void 0?void 0:e.ScreenOrientation)==="function"&&((t=screen)===null||t===void 0?void 0:t.orientation)instanceof ScreenOrientation&&typeof((r=screen)===null||r===void 0?void 0:(n=r.orientation)===null||n===void 0?void 0:n.addEventListener)==="function"&&((i=screen)===null||i===void 0?void 0:(o=i.orientation)===null||o===void 0?void 0:o.onchange)===null&&typeof((a=screen)===null||a===void 0?void 0:(s=a.orientation)===null||s===void 0?void 0:s.type)==="string"};var f;(function(e){e["LANDSCAPE_PRIMARY"]="landscape-primary";e["PORTRAIT_PRIMARY"]="portrait-primary"})(f||(t.VidoOrientationTypesMap=f={}));var d;(function(e){e["LANDSCAPE_PRIMARY"]="landscape-primary";e["PORTRAIT_PRIMARY"]="portrait-primary";e["LANDSCAPE_SECONDARY"]="landscape-secondary";e["PORTRAIT_SECONDARY"]="portrait-secondary"})(d||(t.OrientationTypesMap=d={}));const h={90:d.LANDSCAPE_PRIMARY,"-90":d.LANDSCAPE_SECONDARY,0:d.PORTRAIT_PRIMARY,180:d.PORTRAIT_SECONDARY};let p=function(){function e(){i(this,e);this.changeCallback=[];if(l()){c.info("onchange orientation.onchange");screen.orientation.addEventListener("change",(()=>this.doCallback()))}else if(Object.prototype.hasOwnProperty.call(window,"onorientationchange")){c.info("onchange orientationchange");window.addEventListener("orientationchange",(()=>this.doCallback()),false)}else{c.info("onchange resize");window.addEventListener("resize",(()=>this.doCallback()),false)}}return a(e,[{key:"type",get:function(){if(l()){return window.screen.orientation.type}return h[window.orientation]||(window.matchMedia("(orientation: landscape)").matches?d.LANDSCAPE_PRIMARY:d.PORTRAIT_PRIMARY)}},{key:"addChangeEvent",value:function e(t){this.changeCallback.push(t)}},{key:"removeChangeEvent",value:function e(t){this.changeCallback=this.changeCallback.filter((e=>e!==t))}},{key:"doCallback",value:function e(){this.changeCallback.forEach((e=>{e(this.type)}))}}])}();const v=t.ScreenOrientationPolyfill=new p},31073:(e,t,r)=>{"use strict";var n=r(70511);n("split")},31240:(e,t,r)=>{"use strict";var n=r(79504);e.exports=n(1..valueOf)},31415:(e,t,r)=>{"use strict";r(92405)},31427:(e,t,r)=>{const n=r(56886);const i=r(97518);const o=r(49953);const a=r(30208);const s=r(21878);const u=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const c=n.getBCHDigit(u);function l(e,r,n){for(let i=1;i<=40;i++){if(r<=t.getCapacity(i,n,e)){return i}}return undefined}function f(e,t){return a.getCharCountIndicator(e,t)+4}function d(e,t){let r=0;e.forEach((function(e){const n=f(e.mode,t);r+=n+e.getBitsLength()}));return r}function h(e,r){for(let n=1;n<=40;n++){const i=d(e,n);if(i<=t.getCapacity(n,r,a.MIXED)){return n}}return undefined}t.from=function e(t,r){if(s.isValid(t)){return parseInt(t,10)}return r};t.getCapacity=function e(t,r,o){if(!s.isValid(t)){throw new Error("Invalid QR Code version")}if(typeof o==="undefined")o=a.BYTE;const u=n.getSymbolTotalCodewords(t);const c=i.getTotalCodewordsCount(t,r);const l=(u-c)*8;if(o===a.MIXED)return l;const d=l-f(o,t);switch(o){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}};t.getBestVersionForData=function e(t,r){let n;const i=o.from(r,o.M);if(Array.isArray(t)){if(t.length>1){return h(t,i)}if(t.length===0){return 1}n=t[0]}else{n=t}return l(n.mode,n.getLength(),i)};t.getEncodedBits=function e(t){if(!s.isValid(t)||t<7){throw new Error("Invalid QR Code version")}let r=t<<12;while(n.getBCHDigit(r)-c>=0){r^=u<<n.getBCHDigit(r)-c}return t<<12|r}},31550:(e,t,r)=>{"use strict";r.r(t);r.d(t,{Panel:()=>A,default:()=>N});var n=r(58168);var i=r(80296);var o=r(96540);var a=r(46929);var s=r(89379);var u=r(46942);var c=r.n(u);var l={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function e(t){var r=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||r>=l.F1&&r<=l.F12){return false}switch(r){case l.ALT:case l.CAPS_LOCK:case l.CONTEXT_MENU:case l.CTRL:case l.DOWN:case l.END:case l.ESC:case l.HOME:case l.INSERT:case l.LEFT:case l.MAC_FF_META:case l.META:case l.NUMLOCK:case l.NUM_CENTER:case l.PAGE_DOWN:case l.PAGE_UP:case l.PAUSE:case l.PRINT_SCREEN:case l.RIGHT:case l.SHIFT:case l.UP:case l.WIN_KEY:case l.WIN_KEY_RIGHT:return false;default:return true}},isCharacterKey:function e(t){if(t>=l.ZERO&&t<=l.NINE){return true}if(t>=l.NUM_ZERO&&t<=l.NUM_MULTIPLY){return true}if(t>=l.A&&t<=l.Z){return true}if(window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0){return true}switch(t){case l.SPACE:case l.QUESTION_MARK:case l.NUM_PLUS:case l.NUM_MINUS:case l.NUM_PERIOD:case l.NUM_DIVISION:case l.SEMICOLON:case l.DASH:case l.EQUALS:case l.COMMA:case l.PERIOD:case l.SLASH:case l.APOSTROPHE:case l.SINGLE_QUOTE:case l.OPEN_SQUARE_BRACKET:case l.BACKSLASH:case l.CLOSE_SQUARE_BRACKET:return true;default:return false}}};const f=l;var d=r(56855);var h=r(54808);var p="accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";var v="onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";var m="".concat(p," ").concat(v).split(/[\s\n]+/);var y="aria-";var g="data-";function b(e,t){return e.indexOf(t)===0}function _(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var r;if(t===false){r={aria:true,data:true,attr:true}}else if(t===true){r={aria:true}}else{r=(0,s.A)({},t)}var n={};Object.keys(e).forEach((function(t){if(r.aria&&(t==="role"||b(t,y))||r.data&&b(t,g)||r.attr&&m.includes(t)){n[t]=e[t]}}));return n}var S=r(98137);function E(e){var t=e.prefixCls,r=e.style,i=e.visible,a=e.maskProps,u=e.motionName;return o.createElement(S.Ay,{key:"mask",visible:i,motionName:u,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,i){var u=e.className,l=e.style;return o.createElement("div",(0,n.A)({ref:i,style:(0,s.A)((0,s.A)({},l),r),className:c()("".concat(t,"-mask"),u)},a))}))}function w(e,t,r){var n=t;if(!n&&r){n="".concat(e,"-").concat(r)}return n}function T(e,t){var r=e["page".concat(t?"Y":"X","Offset")];var n="scroll".concat(t?"Top":"Left");if(typeof r!=="number"){var i=e.document;r=i.documentElement[n];if(typeof r!=="number"){r=i.body[n]}}return r}function I(e){var t=e.getBoundingClientRect();var r={left:t.left,top:t.top};var n=e.ownerDocument;var i=n.defaultView||n.parentWindow;r.left+=T(i);r.top+=T(i,true);return r}const R=o.memo((function(e){var t=e.children;return t}),(function(e,t){var r=t.shouldUpdate;return!r}));var C={width:0,height:0,overflow:"hidden",outline:"none"};var k=o.forwardRef((function(e,t){var r=e.prefixCls,i=e.className,a=e.style,u=e.title,l=e.ariaId,f=e.footer,d=e.closable,h=e.closeIcon,p=e.onClose,v=e.children,m=e.bodyStyle,y=e.bodyProps,g=e.modalRender,b=e.onMouseDown,_=e.onMouseUp,S=e.holderRef,E=e.visible,w=e.forceRender,T=e.width,I=e.height;var k=(0,o.useRef)();var A=(0,o.useRef)();o.useImperativeHandle(t,(function(){return{focus:function e(){var t;(t=k.current)===null||t===void 0?void 0:t.focus({preventScroll:true})},changeActive:function e(t){var r=document,n=r.activeElement;if(t&&n===A.current){k.current.focus({preventScroll:true})}else if(!t&&n===k.current){A.current.focus({preventScroll:true})}}}}));var O={};if(T!==undefined){O.width=T}if(I!==undefined){O.height=I}var P;if(f){P=o.createElement("div",{className:"".concat(r,"-footer")},f)}var x;if(u){x=o.createElement("div",{className:"".concat(r,"-header")},o.createElement("div",{className:"".concat(r,"-title"),id:l},u))}var L;if(d){L=o.createElement("button",{type:"button",onClick:p,"aria-label":"Close",className:"".concat(r,"-close")},h||o.createElement("span",{className:"".concat(r,"-close-x")}))}var M=o.createElement("div",{className:"".concat(r,"-content")},L,x,o.createElement("div",(0,n.A)({className:"".concat(r,"-body"),style:m},y),v),P);return o.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":u?l:null,"aria-modal":"true",ref:S,style:(0,s.A)((0,s.A)({},a),O),className:c()(r,i),onMouseDown:b,onMouseUp:_},o.createElement("div",{tabIndex:0,ref:k,style:C}),o.createElement(R,{shouldUpdate:E||w},g?g(M):M),o.createElement("div",{tabIndex:0,ref:A,style:C}))}));if(false){}const A=k;var O=o.forwardRef((function(e,t){var r=e.prefixCls,a=e.title,u=e.style,l=e.className,f=e.visible,d=e.forceRender,h=e.destroyOnClose,p=e.motionName,v=e.ariaId,m=e.onVisibleChanged,y=e.mousePosition;var g=(0,o.useRef)();var b=o.useState(),_=(0,i.A)(b,2),E=_[0],w=_[1];var T={};if(E){T.transformOrigin=E}function R(){var e=I(g.current);w(y?"".concat(y.x-e.left,"px ").concat(y.y-e.top,"px"):"")}return o.createElement(S.Ay,{visible:f,onVisibleChanged:m,onAppearPrepare:R,onEnterPrepare:R,forceRender:d,motionName:p,removeOnLeave:h,ref:g},(function(i,f){var d=i.className,h=i.style;return o.createElement(A,(0,n.A)({},e,{ref:t,title:a,ariaId:v,prefixCls:r,holderRef:f,style:(0,s.A)((0,s.A)((0,s.A)({},h),u),T),className:c()(l,d)}))}))}));O.displayName="Content";const P=O;function x(e){var t=e.prefixCls,r=t===void 0?"rc-dialog":t,a=e.zIndex,u=e.visible,l=u===void 0?false:u,p=e.keyboard,v=p===void 0?true:p,m=e.focusTriggerAfterClose,y=m===void 0?true:m,g=e.wrapStyle,b=e.wrapClassName,S=e.wrapProps,T=e.onClose,I=e.afterClose,R=e.transitionName,C=e.animation,k=e.closable,A=k===void 0?true:k,O=e.mask,x=O===void 0?true:O,L=e.maskTransitionName,M=e.maskAnimation,N=e.maskClosable,D=N===void 0?true:N,j=e.maskStyle,U=e.maskProps,V=e.rootClassName;var W=(0,o.useRef)();var B=(0,o.useRef)();var G=(0,o.useRef)();var Z=o.useState(l),F=(0,i.A)(Z,2),H=F[0],X=F[1];var Y=(0,d.A)();function K(){if(!(0,h.A)(B.current,document.activeElement)){W.current=document.activeElement}}function z(){if(!(0,h.A)(B.current,document.activeElement)){var e;(e=G.current)===null||e===void 0?void 0:e.focus()}}function J(e){if(e){z()}else{X(false);if(x&&W.current&&y){try{W.current.focus({preventScroll:true})}catch(e){}W.current=null}if(H){I===null||I===void 0?void 0:I()}}}function Q(e){T===null||T===void 0?void 0:T(e)}var q=(0,o.useRef)(false);var $=(0,o.useRef)();var ee=function e(){clearTimeout($.current);q.current=true};var te=function e(){$.current=setTimeout((function(){q.current=false}))};var re=null;if(D){re=function e(t){if(q.current){q.current=false}else if(B.current===t.target){Q(t)}}}function ne(e){if(v&&e.keyCode===f.ESC){e.stopPropagation();Q(e);return}if(l&&e.keyCode===f.TAB){G.current.changeActive(!e.shiftKey)}}(0,o.useEffect)((function(){if(l){X(true);K()}}),[l]);(0,o.useEffect)((function(){return function(){clearTimeout($.current)}}),[]);return o.createElement("div",(0,n.A)({className:c()("".concat(r,"-root"),V)},_(e,{data:true})),o.createElement(E,{prefixCls:r,visible:x&&l,motionName:w(r,L,M),style:(0,s.A)({zIndex:a},j),maskProps:U}),o.createElement("div",(0,n.A)({tabIndex:-1,onKeyDown:ne,className:c()("".concat(r,"-wrap"),b),ref:B,onClick:re,style:(0,s.A)((0,s.A)({zIndex:a},g),{},{display:!H?"none":null})},S),o.createElement(P,(0,n.A)({},e,{onMouseDown:ee,onMouseUp:te,ref:G,closable:A,ariaId:Y,prefixCls:r,visible:l&&H,onClose:Q,onVisibleChanged:J,motionName:w(r,R,C)}))))}var L=function e(t){var r=t.visible,s=t.getContainer,u=t.forceRender,c=t.destroyOnClose,l=c===void 0?false:c,f=t.afterClose;var d=o.useState(r),h=(0,i.A)(d,2),p=h[0],v=h[1];o.useEffect((function(){if(r){v(true)}}),[r]);if(!u&&l&&!p){return null}return o.createElement(a.A,{open:r||u||p,autoDestroy:false,getContainer:s,autoLock:r||p},o.createElement(x,(0,n.A)({},t,{destroyOnClose:l,afterClose:function e(){f===null||f===void 0?void 0:f();v(false)}})))};L.displayName="Dialog";const M=L;const N=M},31575:(e,t,r)=>{"use strict";var n=r(94644);var i=r(80926).left;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("reduce",(function e(t){var r=arguments.length;return i(o(this),t,r,r>1?arguments[1]:undefined)}))},31689:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(18745);var a=r(67680);var s=r(36043);var u=r(79306);var c=r(1103);var l=i.Promise;var f=false;var d=!l||!l["try"]||c((function(){l["try"]((function(e){f=e===8}),8)})).error||!f;n({target:"Promise",stat:true,forced:d},{try:function(e){var t=arguments.length>1?a(arguments,1):[];var r=s.f(this);var n=c((function(){return o(u(e),undefined,t)}));(n.error?r.reject:r.resolve)(n.value);return r.promise}})},31694:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).find;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("find",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},31698:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44204);var o=r(84916);n({target:"Set",proto:true,real:true,forced:!o("union")},{union:i})},32337:(e,t,r)=>{"use strict";r.r(t)},32357:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79039);var o=r(79504);var a=r(42787);var s=r(71072);var u=r(25397);var c=r(48773).f;var l=o(c);var f=o([].push);var d=n&&i((function(){var e=Object.create(null);e[2]=2;return!l(e,2)}));var h=function(e){return function(t){var r=u(t);var i=s(r);var o=d&&a(r)===null;var c=i.length;var h=0;var p=[];var v;while(c>h){v=i[h++];if(!n||(o?v in r:l(r,v))){f(p,e?[v,r[v]]:r[v])}}return p}};e.exports={entries:h(true),values:h(false)}},32365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(69733);var o=r(50306);var a=r(96540);var s=r(39595);var u=r(6630);const c=e=>{const{language:t,showLoading:r,pageState:i,loadingContentKey:c}=e;const[l,f]=(0,a.useState)(0);(0,a.useEffect)((()=>{if(r){f(0)}}),[r]);(0,a.useEffect)((()=>{if(!r||i===s.PageState.ACTIVATION){return()=>{}}const e=setInterval((()=>{f((t=>{if(t<99){return t+Math.floor(window.crypto.getRandomValues(new Uint8Array(1))[0]%100/100+.5)}clearInterval(e);return t}))}),u.PROGRESS_INTERVAL);return()=>{clearInterval(e)}}),[r,i]);return(0,n.jsxs)("div",{className:"main-page-loading",children:[(0,n.jsxs)("div",{className:"progress-value",children:[l,"%"]}),(0,n.jsx)("div",{className:"progress",children:(0,n.jsx)(o.LineProgress,{progress:l,color:"linear-gradient(90deg,#1476ff, #14b1ff)",backColor:"rgba(27,29,34,0.13)"})}),(0,n.jsx)("div",{className:"loading-tip",children:c&&t[c]||t.loading})]})};const l=e=>({language:e.lang.language,showLoading:e.main.showLoading,loadingContentKey:e.main.loadingContentKey,pageState:e.main.pageState});var f=t["default"]=(0,i.connect)(l)(c)},32475:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28527);var o=r(84916);var a=!o("isSupersetOf",(function(e){return!e}));n({target:"Set",proto:true,real:true,forced:a},{isSupersetOf:i})},32603:(e,t,r)=>{"use strict";var n=r(655);e.exports=function(e,t){return e===undefined?arguments.length<2?"":t:n(e)}},32615:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2583),r(30258),r(54706)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WebWorkerUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==i(t)?t:t+""}function h(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=function(e){e["CLEAR"]="clear";e["SET"]="set";return e}(p||{});var v=e.WebWorkerUtil=function(){function e(){u(this,e)}return l(e,null,[{key:"getManagerInstance",value:function r(){if(!e.timeoutWorker){e.timeoutWorker=new t.WorkerManager({url:(0,n.getTimeWorkerUrl)(),enablePromiseMethod:true,onMessage:e.dealTimeoutMessage})}return e.timeoutWorker}},{key:"setWorkerTimeout",value:function t(n,i){var o=(0,r.getClientId)();(0,r.getPLogger)().debug("setWorkerTimeout",o);e.timeoutCallbackMap.set(o,n);e.getManagerInstance().postMessage({timerId:o,method:p.SET,delay:i});return o}},{key:"workerSleep",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:i=(0,r.getClientId)();return o.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:i,method:p.SET,delay:n}));case 2:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"clearWorkerTimeout",value:function(){var t=s(o().mark((function t(r){return o().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:e.timeoutCallbackMap["delete"](r);return n.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:r,method:p.CLEAR}));case 2:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"dealTimeoutMessage",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:(0,r.getPLogger)().debug("dealTimeoutMessage",n);if(n.timerId){o.next=3;break}return o.abrupt("return");case 3:i=e.timeoutCallbackMap.get(n.timerId);i===null||i===void 0||i();e.timeoutCallbackMap["delete"](n.timerId);case 6:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()}])}();f(v,"timeoutWorker",void 0);f(v,"timeoutCallbackMap",new Map)}))},32637:(e,t,r)=>{"use strict";var n=r(46518);var i=r(2087);n({target:"Number",stat:true},{isInteger:i})},32681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.updateShowAllContentChatId=t.updateCaptionMessageList=t.stopChatUpdateCaptionMessageList=t.resetCaptionState=t.removeWaitingMessage=t.mainSlice=t["default"]=t.clearCaptionMessageList=t.addShowAnswerChatIdList=void 0;var n=r(84303);var i=r(39595);var o=r(86221);var a=r(61347);const s={captionList:[],showAnswerChatIdList:[],showAllContentChatId:[],mediaList:[]};const u=t.mainSlice=(0,n.createSlice)({name:i.ReduxModule.CAPTION,initialState:s,reducers:{resetCaptionState:e=>{Object.assign(e,s)},updateCaptionMessageList:(e,t)=>{e.captionList=(0,o.dealChatList)(e.captionList,t.payload);e.mediaList=(0,o.dealMediaList)(e.captionList)},removeWaitingMessage:e=>{const t=[...e.captionList];const r=t.pop();if(r!==null&&r!==void 0&&r.messageType&&r.messageType!==a.CaptionMessageType.WAITING_ANSWER){t.push(r)}e.captionList=t},stopChatUpdateCaptionMessageList:e=>{e.captionList=(0,o.stopChatUpdateList)(e.captionList)},addShowAnswerChatIdList:(e,t)=>{if(!e.showAnswerChatIdList.includes(t.payload)){e.showAnswerChatIdList=[...e.showAnswerChatIdList,t.payload]}},updateShowAllContentChatId:(e,t)=>{e.showAllContentChatId.push(t.payload)},clearCaptionMessageList:e=>{e.captionList=[];e.showAnswerChatIdList=[];e.showAllContentChatId=[];e.mediaList=[]}}});const{resetCaptionState:c,updateCaptionMessageList:l,clearCaptionMessageList:f,stopChatUpdateCaptionMessageList:d,addShowAnswerChatIdList:h,updateShowAllContentChatId:p,removeWaitingMessage:v}=u.actions;t.removeWaitingMessage=v;t.updateShowAllContentChatId=p;t.addShowAnswerChatIdList=h;t.stopChatUpdateCaptionMessageList=d;t.clearCaptionMessageList=f;t.updateCaptionMessageList=l;t.resetCaptionState=c;var m=t["default"]=u},32812:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Reflect",stat:true},{has:function e(t,r){return r in t}})},33077:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(31550),r(44772),r(40961),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t=p(t),f(e,h()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let _=e.default=function(e){function t(){s(this,t);return l(this,t,arguments)}v(t,e);return c(t,[{key:"render",value:function e(){const{title:t,content:a,footer:s,getContainer:u,visible:c,transitionName:l,width:f,maskTransitionName:d,mask:h,zIndex:p,maskClosable:v,keyboard:m,onClose:y}=this.props;if(!c){return null}let g="meta-modal";if((0,n.formatType)(a)===n.formatType.STRING){g+="-text"}return(0,i.createPortal)((0,o.jsx)("div",{children:(0,o.jsx)(r.default,{transitionName:l||"zoom",closable:false,title:t,getContainer:u||false,footer:s,visible:c,closeIcon:null,width:f,maskTransitionName:d||"fade",mask:h,zIndex:p,maskClosable:v,prefixCls:g,keyboard:m,onClose:y,children:(0,n.formatType)(a)===n.formatType.STRING?(0,o.jsx)("span",{className:"meta-modal-body-content",title:a===null||a===void 0?void 0:a.toString(),children:a}):a})}),document.body)}}])}(t.Component);y(_,"defaultProps",{getContainer:()=>document.body,mask:true,maskClosable:false,maskStyle:null,title:"",keyboard:false,visible:false});y(_,"alert",void 0);y(_,"confirm",void 0);y(_,"destroyAll",void 0);y(_,"showModalView",void 0);y(_,"destroyById",void 0)}))},33110:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(18745);var a=r(69565);var s=r(79504);var u=r(79039);var c=r(94901);var l=r(10757);var f=r(67680);var d=r(66933);var h=r(4495);var p=String;var v=i("JSON","stringify");var m=s(/./.exec);var y=s("".charAt);var g=s("".charCodeAt);var b=s("".replace);var _=s(1..toString);var S=/[\uD800-\uDFFF]/g;var E=/^[\uD800-\uDBFF]$/;var w=/^[\uDC00-\uDFFF]$/;var T=!h||u((function(){var e=i("Symbol")("stringify detection");return v([e])!=="[null]"||v({a:e})!=="{}"||v(Object(e))!=="{}"}));var I=u((function(){return v("\udf06\ud834")!=='"\\udf06\\ud834"'||v("\udead")!=='"\\udead"'}));var R=function(e,t){var r=f(arguments);var n=d(t);if(!c(n)&&(e===undefined||l(e)))return;r[1]=function(e,t){if(c(n))t=a(n,this,p(e),t);if(!l(t))return t};return o(v,null,r)};var C=function(e,t,r){var n=y(r,t-1);var i=y(r,t+1);if(m(E,e)&&!m(w,i)||m(w,e)&&!m(E,n)){return"\\u"+_(g(e,0),16)}return e};if(v){n({target:"JSON",stat:true,arity:3,forced:T||I},{stringify:function e(t,r,n){var i=f(arguments);var a=o(T?R:v,null,i);return I&&typeof a=="string"?b(a,S,C):a}})}},33164:(e,t,r)=>{"use strict";var n=r(77782);var i=r(53602);var o=Math.abs;var a=2220446049250313e-31;e.exports=function(e,t,r,s){var u=+e;var c=o(u);var l=n(u);if(c<s)return l*i(c/s/t)*s*t;var f=(1+t/a)*c;var d=f-(f-c);if(d>r||d!==d)return l*Infinity;return l*d}},33206:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).forEach;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("forEach",(function e(t){i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},33313:(e,t,r)=>{"use strict";var n=r(46518);var i=r(18866);n({target:"String",proto:true,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},33392:(e,t,r)=>{"use strict";var n=r(79504);var i=0;var o=Math.random();var a=n(1..toString);e.exports=function(e){return"Symbol("+(e===undefined?"":e)+")_"+a(++i+o,36)}},33517:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79039);var o=r(94901);var a=r(36955);var s=r(97751);var u=r(33706);var c=function(){};var l=s("Reflect","construct");var f=/^\s*(?:class|function)\b/;var d=n(f.exec);var h=!f.test(c);var p=function e(t){if(!o(t))return false;try{l(c,[],t);return true}catch(e){return false}};var v=function e(t){if(!o(t))return false;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return false}try{return h||!!d(f,u(t))}catch(e){return true}};v.sham=true;e.exports=!l||i((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=true}))||e}))?v:p},33528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=h(r(75540));var o=r(44772);var a=r(50306);var s=r(44104);var u=h(r(65239));var c=h(r(98921));var l=r(39595);var f=r(69733);var d=r(94855);r(58281);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=w(t),_(e,E()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var R=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const C=new s.Log({module:"HwICS.UI.DeviceDetection"});let k=function(e){function t(e){var r;p(this,t);r=b(this,t,[e]);r._pageName="DeviceDetection";r._handleOpenModal=async()=>{const e=await d.ConfigManager.isAudioDeviceDenied();if(e){C.info("DeviceDetection _handleOpenModal, user media not allow");(0,a.Toast)({content:r.props.language.audioDeviceNotAllow});return}const t=await u.default.getInstance().microphone.getUsed();const n=await u.default.getInstance().speaker.getUsed();r.setState({micId:t===null||t===void 0?void 0:t.deviceId,speakerId:n===null||n===void 0?void 0:n.deviceId,isShow:true})};r._handleCloseModal=()=>{C.info("DeviceDetection _handleCloseModal");r.setState({isShow:false})};r._handleApply=()=>{const{pickSpeakerId:e,pickMicId:t}=r.state;C.info("DeviceDetection _handleApply",{pickSpeakerId:e,pickMicId:t});if(e){u.default.getInstance().speaker.saveUsed(e)}if(t){u.default.getInstance().microphone.saveUsed(t)}r._handleCloseModal()};r.state={isShow:false,speakerId:"",micId:""};return r}T(t,e);return m(t,[{key:"render",value:function e(){const{className:t,language:r,langCode:i,children:o,enableDeviceSetting:s}=this.props;const{isShow:u,speakerId:l,micId:f}=this.state;if(!s){return null}return(0,n.jsxs)("div",{className:t+" device-detection",children:[(0,n.jsx)("div",{className:"device-detection-action","data-testid":"device-detection-open",onClick:this._handleOpenModal,children:o}),u&&(0,n.jsx)("div",{className:"device-detection-mask",children:(0,n.jsxs)("div",{className:"device-detection-modal",children:[(0,n.jsxs)("div",{className:"device-detection-header",children:[(0,n.jsx)("div",{className:"device-detection-header-text",children:r.audioDevice}),(0,n.jsx)("div",{className:"device-detection-header-close","data-testid":"device-detection-close",onClick:this._handleCloseModal})]}),(0,n.jsxs)("div",{className:"device-detection-content",children:[(0,n.jsx)(c.default,{deviceType:"audiooutput",onDeviceChange:e=>this.setState({pickSpeakerId:e}),defaultDeviceId:l,language:r,langCode:i,title:r.speaker,startBtnTitle:r.detectingSpeaker,noDeviceTip:r.noSpeakerTip,noDevice:r.noSpeaker,notSupportChangeTip:r.notSupportChangeSpeaker}),(0,n.jsx)(c.default,{deviceType:"audioinput",onDeviceChange:e=>this.setState({pickMicId:e}),defaultDeviceId:f,language:r,langCode:i,title:r.microphone,startBtnTitle:r.detectingMicrophone,noDeviceTip:r.noMicrophoneTip,noDevice:r.noMicrophone,notSupportChangeTip:""})]}),(0,n.jsxs)("div",{className:"device-detection-footer",children:[(0,n.jsx)("div",{className:"footer-space"}),(0,n.jsx)(a.Button,{type:a.Button.typeMap.STROKE,dataTestid:"device-detection-cancel",className:"device-detection-btn",onClick:this._handleCloseModal,children:r.cancel}),(0,n.jsx)(a.Button,{dataTestid:"device-detection-apply",className:"device-detection-btn",onClick:this._handleApply,children:r.apply})]})]})})]})}}])}(i.default);k.defaultProps={className:""};k=R([(0,o.componentDecorator)(C)],k);const A=e=>({language:e.lang.language,langCode:e.lang.langCode,enableDeviceSetting:e.config[l.ConfigKey.ENABLE_DEVICE_SETTING]});var O=t["default"]=(0,f.connect)(A)(k)},33601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NetworkQualityCheck=void 0;var n=r(26440);var i=r(21537);var o=r(89906);var a=r(39595);var s=r(94855);var u=r(44772);var c=r(44104);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const m=new c.Log({module:"NetworkQualityCheck"});let y=t.NetworkQualityCheck=function(){function e(){l(this,e)}return d(e,null,[{key:"networkLevelCheck",value:function t(r){if(!s.ConfigManager.getConfig(a.ConfigKey.ENABLE_NETWORK_CHECK)){return}const{language:c}=(0,n.$getState)().lang;const{downlinkNetworkQuality:l}=r;let f=i.NETWORK_QUALITY_LEVEL.GOOD;const d=u.UrlUtil.getSearchValue(location.href,"networkQuality");if(d!==null){f=Number(d);f=f in i.NETWORK_QUALITY_LEVEL?f:i.NETWORK_QUALITY_LEVEL.GOOD}if(l>=f){var h;(h=e._disconnectToast)===null||h===void 0?void 0:h.hide();e._disconnectToast=(0,o.toast)({content:c.warnNetwrokQualityLeaveTips,className:"warn-toast",type:1})}else{var p;(p=e._disconnectToast)===null||p===void 0?void 0:p.hide()}}},{key:"streamCheck",value:function t(r){if(!s.ConfigManager.getConfig(a.ConfigKey.ENABLE_NETWORK_CHECK)){return}const{language:i}=(0,n.$getState)().lang;const u={content:i.warnNetwrokQualityLeaveTips,className:"warn-toast",type:1};if(e.checkStreamStat(r)){var c;(c=e._disconnectToast)===null||c===void 0?void 0:c.hide();e._disconnectToast=(0,o.toast)(u)}}},{key:"checkStreamStat",value:function e(t){const{pktLossRate:r,jitter:n}=i.NetworkQualityToast.REMOTE_AUDIO_STREAM;const{pktLossRate:o,jitter:a}=i.NetworkQualityToast.REMOTE_VIDEO_STREAM;return t.some((e=>{if(!e.isRemote&&e.rtt>=i.NetworkQualityToast.LOCALE_STREAM.rtt){return true}if(e.isRemote&&e.mediaType==="audio"&&e.pktLossRate>=r&&e.jitter>=n){return true}if(e.isRemote&&e.mediaType==="video"&&(e===null||e===void 0?void 0:e.pktLossRate)>=o&&(e===null||e===void 0?void 0:e.jitter)>=a){return true}return false}))}}])}();v([(0,u.printfDecorator)(m)],y,"networkLevelCheck",null);v([(0,u.printfDecorator)(m)],y,"streamCheck",null)},33684:(e,t,r)=>{"use strict";var n=r(94644).exportTypedArrayMethod;var i=r(79039);var o=r(44576);var a=r(79504);var s=o.Uint8Array;var u=s&&s.prototype||{};var c=[].toString;var l=a([].join);if(i((function(){c.call({})}))){c=function e(){return l(this)}}var f=u.toString!==c;n("toString",c,f)},33706:(e,t,r)=>{"use strict";var n=r(79504);var i=r(94901);var o=r(77629);var a=n(Function.toString);if(!i(o.inspectSource)){o.inspectSource=function(e){return a(e)}}e.exports=o.inspectSource},33717:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},33771:(e,t,r)=>{"use strict";var n=r(46518);var i=r(84373);var o=r(6469);n({target:"Array",proto:true},{fill:i});o("fill")},33853:(e,t,r)=>{"use strict";var n=r(46518);var i=r(64449);var o=r(84916);var a=!o("isDisjointFrom",(function(e){return!e}));n({target:"Set",proto:true,real:true,forced:a},{isDisjointFrom:i})},33904:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79039);var o=r(79504);var a=r(655);var s=r(43802).trim;var u=r(47452);var c=o("".charAt);var l=n.parseFloat;var f=n.Symbol;var d=f&&f.iterator;var h=1/l(u+"-0")!==-Infinity||d&&!i((function(){l(Object(d))}));e.exports=h?function e(t){var r=s(a(t));var n=l(r);return n===0&&c(r,0)==="-"?-0:n}:l},33994:(e,t,r)=>{"use strict";var n=r(57657).IteratorPrototype;var i=r(2360);var o=r(6980);var a=r(10687);var s=r(26269);var u=function(){return this};e.exports=function(e,t,r,c){var l=t+" Iterator";e.prototype=i(n,{next:o(+!c,r)});a(e,l,false,true);s[l]=u;return e}},34005:(e,t,r)=>{var n=r(22048);var i=r(5930);var o=r(18327);function a(e,t){var r=new o(t);return r.process(e)}t=e.exports=a;t.filterXSS=a;t.FilterXSS=o;(function(){for(var e in n){t[e]=n[e]}for(var r in i){t[r]=i[r]}})();if(typeof window!=="undefined"){window.filterXSS=e.exports}function s(){return typeof self!=="undefined"&&typeof DedicatedWorkerGlobalScope!=="undefined"&&self instanceof DedicatedWorkerGlobalScope}if(s()){self.filterXSS=e.exports}},34124:(e,t,r)=>{"use strict";var n=r(79039);var i=r(20034);var o=r(22195);var a=r(15652);var s=Object.isExtensible;var u=n((function(){s(1)}));e.exports=u||a?function e(t){if(!i(t))return false;if(a&&o(t)==="ArrayBuffer")return false;return s?s(t):true}:s},34268:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(28551);var a=r(20034);var s=r(16575);var u=r(79039);var c=r(24913);var l=r(77347);var f=r(42787);var d=r(6980);function h(e,t,r){var n=arguments.length<4?e:arguments[3];var u=l.f(o(e),t);var p,v,m;if(!u){if(a(v=f(e))){return h(v,t,r,n)}u=d(0)}if(s(u)){if(u.writable===false||!a(n))return false;if(p=l.f(n,t)){if(p.get||p.set||p.writable===false)return false;p.value=r;c.f(n,t,p)}else c.f(n,t,d(0,r))}else{m=u.set;if(m===undefined)return false;i(m,n,r)}return true}var p=u((function(){var e=function(){};var t=c.f(new e,"a",{configurable:true});return Reflect.set(e.prototype,"a",1,t)!==false}));n({target:"Reflect",stat:true,forced:p},{set:h})},34376:(e,t,r)=>{"use strict";var n=r(22195);e.exports=Array.isArray||function e(t){return n(t)==="Array"}},34527:(e,t,r)=>{"use strict";var n=r(43724);var i=r(34376);var o=TypeError;var a=Object.getOwnPropertyDescriptor;var s=n&&!function(){if(this!==undefined)return true;try{Object.defineProperty([],"length",{writable:false}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!a(e,"length").writable){throw new o("Cannot set read only .length")}return e.length=t}:function(e,t){return e.length=t}},34594:(e,t,r)=>{"use strict";var n=r(15823);n("Float32",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},34598:(e,t,r)=>{"use strict";var n=r(79039);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},34632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UHanV2WebsocketManager=t.DEFAULT_HOST=void 0;var n=r(44104);var i=r(98020);var o=r(94855);var a=r(31016);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e,t,r){return t=m(t),h(e,v()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}const b=new n.Log({module:"HwICS.UHanV2WebsocketManager"});const _=t.DEFAULT_HOST="wss://127.0.0.1:10001";let S=t.UHanV2WebsocketManager=function(e){function t(){var e;s(this,t);e=d(this,t,arguments);e.getUrl=()=>{var e,t;if((e=o.ConfigManager.getUHanV2Config())!==null&&e!==void 0&&e.origin){var r;return`${((r=o.ConfigManager.getUHanV2Config())===null||r===void 0?void 0:r.origin)||_}`}else if((t=o.ConfigManager.getUHanV2Config())!==null&&t!==void 0&&t.host){var n;return`wss://${((n=o.ConfigManager.getUHanV2Config())===null||n===void 0?void 0:n.host)||_}`}b.error("getUrl empty");return""};return e}y(t,e);return c(t,[{key:"init",value:async function e(t){var r,n,a;b.info("create",t,!!this.initProm,o.ConfigManager.getUHanV2Config());if(this.initProm){return this.initProm}this.websocketItem=new i.WebSocketBase;this.initProm=(r=this.websocketItem)===null||r===void 0?void 0:(n=r.connect({url:this.getUrl(),onerror:this.handleError.bind(this),onclose:this.handleClose.bind(this),onopen:this.handleOpen.bind(this),onmessage:this.onMessage}))===null||n===void 0?void 0:(a=n.then((()=>{this.clearReconnectCount("after connect");return true})))===null||a===void 0?void 0:a.catch((e=>{b.error("connect failed",e);return false}));const s=this.websocketItem.getWS();if(s){s.binaryType="arraybuffer"}return this.initProm}}])}(a.UHanWebsocketManager)},34782:(e,t,r)=>{"use strict";var n=r(46518);var i=r(34376);var o=r(33517);var a=r(20034);var s=r(35610);var u=r(26198);var c=r(25397);var l=r(97040);var f=r(78227);var d=r(70597);var h=r(67680);var p=d("slice");var v=f("species");var m=Array;var y=Math.max;n({target:"Array",proto:true,forced:!p},{slice:function e(t,r){var n=c(this);var f=u(n);var d=s(t,f);var p=s(r===undefined?f:r,f);var g,b,_;if(i(n)){g=n.constructor;if(o(g)&&(g===m||i(g.prototype))){g=undefined}else if(a(g)){g=g[v];if(g===null)g=undefined}if(g===m||g===undefined){return h(n,d,p)}}b=new(g===undefined?m:g)(y(p-d,0));for(_=0;d<p;d++,_++)if(d in n)l(b,_,n[d]);b.length=_;return b}})},34873:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28551);var o=r(73506);var a=r(52967);if(a)n({target:"Reflect",stat:true},{setPrototypeOf:function e(t,r){i(t);o(r);try{a(t,r);return true}catch(e){return false}}})},34941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.dealGlobalClick=t.addGlobalUtEvent=void 0;var n=r(21013);var i=r(63226);const o=e=>{var t;if(e!==null&&e!==void 0&&(t=e.dataset)!==null&&t!==void 0&&t.testid){return{tagName:e===null||e===void 0?void 0:e.tagName,key:"testid",value:e.dataset.testid}}if(e!==null&&e!==void 0&&e.id){return{tagName:e===null||e===void 0?void 0:e.tagName,key:"id",value:e.id}}if(e!==null&&e!==void 0&&e.className){return{tagName:e===null||e===void 0?void 0:e.tagName,key:"className",value:e.className}}return{tagName:e===null||e===void 0?void 0:e.tagName,key:"",value:""}};let a="";let s;const u=1e4;const c=()=>{if(s){clearTimeout(s)}s=setTimeout((()=>{a=""}),u)};window.addEventListener("visibilitychange",(()=>{n.UserTrack.addUserTrack({arg1:i.Arg1Map.PAGE_STATUS,arg2:document.visibilityState})}));window.addEventListener("hashchange",(()=>{n.UserTrack.addUserTrack({arg1:i.Arg1Map.ROUTE_CHANGE,arg2:location.hash})}));const l=e=>{var t;if(a!==e.message+(e===null||e===void 0?void 0:e.filename)+(e===null||e===void 0?void 0:(t=e.error)===null||t===void 0?void 0:t.stack)){var r,o;n.UserTrack.addUserTrack({arg1:i.Arg1Map.CODE_ERROR,arg2:"onerror",args:{message:e.message,source:e===null||e===void 0?void 0:e.filename,colno:e===null||e===void 0?void 0:e.colno,error:e===null||e===void 0?void 0:(r=e.error)===null||r===void 0?void 0:r.stack}});a=e.message+(e===null||e===void 0?void 0:e.filename)+(e===null||e===void 0?void 0:(o=e.error)===null||o===void 0?void 0:o.stack)}c()};const f=e=>{var t;if(a!==((t=e.reason)===null||t===void 0?void 0:t.stack)||e.reason){var r,o;n.UserTrack.addUserTrack({arg1:i.Arg1Map.CODE_ERROR,arg2:"unhandledrejection",args:{message:e.reason,error:((r=e.reason)===null||r===void 0?void 0:r.stack)||e.reason}});a=((o=e.reason)===null||o===void 0?void 0:o.stack)||e.reason}c()};function d(){if(!window.performance){return}const e=window.performance.memory||{};n.UserTrack.addUserTrack({arg1:i.Arg1Map.MEMORY,arg2:"performance.memory",args:{param:JSON.stringify({jsHeapSizeLimit:e.jsHeapSizeLimit,totalJSHeapSize:e.totalJSHeapSize,usedJSHeapSize:e.usedJSHeapSize})}})}const h=e=>{const t=e.target;if(!t){return}let r=o(t);if(!r.key){let e=t.parentNode;while(e){r=o(t);if(r.key){break}e=e.parentNode}}if(r.key){n.UserTrack.addUserTrack({arg1:i.Arg1Map.USER_CLICK,arg2:r.key,args:r})}};t.dealGlobalClick=h;const p=()=>{window.addEventListener("error",l);window.addEventListener("unhandledrejection",f);setInterval((()=>{d()}),6e4)};t.addGlobalUtEvent=p},35031:(e,t,r)=>{"use strict";var n=r(97751);var i=r(79504);var o=r(38480);var a=r(33717);var s=r(28551);var u=i([].concat);e.exports=n("Reflect","ownKeys")||function e(t){var r=o.f(s(t));var n=a.f;return n?u(r,n(t)):r}},35123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.methodDecorator=void 0;var n=r(21013);var i=r(44772);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e){var t;const r=i.StringUtil.safeJSONParse(JSON.stringify(e));const n=r[1];if(n!==null&&n!==void 0&&n.text){r[1].text=n.text.length}if(n!==null&&n!==void 0&&n.questionText){r[1].questionText=n.questionText.length}if((t=r[0])!==null&&t!==void 0&&t.questionParam){r[0].questionParam=r[0].questionParam.length}if(n!==null&&n!==void 0&&n.onceCode){r[1].onceCode=(0,i.handleTokenPrint)(n.onceCode)}return r}const f=e=>function(t,r,i){let o;function s(...t){const i=Date.now();const a=o.apply(this,t);if(a!==null&&a!==void 0&&a.then){n.UserTrack.addUserTrack({arg1:e,arg2:r,args:{type:"async start",param:JSON.stringify(l(t))}});return a.then((o=>{n.UserTrack.addUserTrack({arg1:e,arg2:r,arg3:Date.now()-i,args:{type:"async end",result:JSON.stringify(o),param:JSON.stringify(l(t))}});return o}))}n.UserTrack.addUserTrack({arg1:e,arg2:r,args:{type:"sync end",param:JSON.stringify(l(t))}});return a}if(i!==null&&i!==void 0&&i.initializer){return a(a({},i),{},{writable:true,initializer:function(){o=i.initializer.call(this);return s}})}o=i===null||i===void 0?void 0:i.value;return a(a({},i),{},{writable:true,value:s})};t.methodDecorator=f},35370:(e,t,r)=>{"use strict";var n=r(26198);e.exports=function(e,t,r){var i=0;var o=arguments.length>2?r:n(t);var a=new e(o);while(o>i)a[i]=t[i++];return a}},35490:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("blink")},{blink:function e(){return i(this,"blink","","")}})},35548:(e,t,r)=>{"use strict";var n=r(33517);var i=r(16823);var o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},35610:(e,t,r)=>{"use strict";var n=r(91291);var i=Math.max;var o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},35701:(e,t,r)=>{"use strict";var n=r(46518);var i=r(60533).end;var o=r(83063);n({target:"String",proto:true,forced:o},{padEnd:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},35781:(e,t,r)=>{"use strict";r.r(t);r.d(t,{A11y:()=>Xr,Autoplay:()=>zr,Controller:()=>Hr,EffectCards:()=>vn,EffectCoverflow:()=>hn,EffectCreative:()=>pn,EffectCube:()=>ln,EffectFade:()=>cn,EffectFlip:()=>dn,FreeMode:()=>Qr,Grid:()=>qr,HashNavigation:()=>Kr,History:()=>Yr,Keyboard:()=>Nr,Lazy:()=>Fr,Manipulation:()=>on,Mousewheel:()=>Dr,Navigation:()=>Ur,Pagination:()=>Wr,Parallax:()=>Gr,Scrollbar:()=>Br,Swiper:()=>Lr,Thumbs:()=>Jr,Virtual:()=>Mr,Zoom:()=>Zr,default:()=>Lr});function n(e){return e!==null&&typeof e==="object"&&"constructor"in e&&e.constructor===Object}function i(e={},t={}){Object.keys(t).forEach((r=>{if(typeof e[r]==="undefined")e[r]=t[r];else if(n(t[r])&&n(e[r])&&Object.keys(t[r]).length>0){i(e[r],t[r])}}))}const o={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e=typeof document!=="undefined"?document:{};i(e,o);return e}const s={document:o,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){if(typeof setTimeout==="undefined"){e();return null}return setTimeout(e,0)},cancelAnimationFrame(e){if(typeof setTimeout==="undefined"){return}clearTimeout(e)}};function u(){const e=typeof window!=="undefined"?window:{};i(e,s);return e}function c(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get(){return t},set(e){t.__proto__=e}})}class l extends Array{constructor(e){if(typeof e==="number"){super(e)}else{super(...e||[]);c(this)}}}function f(e=[]){const t=[];e.forEach((e=>{if(Array.isArray(e)){t.push(...f(e))}else{t.push(e)}}));return t}function d(e,t){return Array.prototype.filter.call(e,t)}function h(e){const t=[];for(let r=0;r<e.length;r+=1){if(t.indexOf(e[r])===-1)t.push(e[r])}return t}function p(e){return e.toLowerCase().replace(/-(.)/g,((e,t)=>t.toUpperCase()))}function v(e,t){if(typeof e!=="string"){return[e]}const r=[];const n=t.querySelectorAll(e);for(let e=0;e<n.length;e+=1){r.push(n[e])}return r}function m(e,t){const r=u();const n=a();let i=[];if(!t&&e instanceof l){return e}if(!e){return new l(i)}if(typeof e==="string"){const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";if(r.indexOf("<li")===0)e="ul";if(r.indexOf("<tr")===0)e="tbody";if(r.indexOf("<td")===0||r.indexOf("<th")===0)e="tr";if(r.indexOf("<tbody")===0)e="table";if(r.indexOf("<option")===0)e="select";const t=n.createElement(e);t.innerHTML=r;for(let e=0;e<t.childNodes.length;e+=1){i.push(t.childNodes[e])}}else{i=v(e.trim(),t||n)}}else if(e.nodeType||e===r||e===n){i.push(e)}else if(Array.isArray(e)){if(e instanceof l)return e;i=e}return new l(h(i))}m.fn=l.prototype;function y(...e){const t=f(e.map((e=>e.split(" "))));this.forEach((e=>{e.classList.add(...t)}));return this}function g(...e){const t=f(e.map((e=>e.split(" "))));this.forEach((e=>{e.classList.remove(...t)}));return this}function b(...e){const t=f(e.map((e=>e.split(" "))));this.forEach((e=>{t.forEach((t=>{e.classList.toggle(t)}))}))}function _(...e){const t=f(e.map((e=>e.split(" "))));return d(this,(e=>t.filter((t=>e.classList.contains(t))).length>0)).length>0}function S(e,t){if(arguments.length===1&&typeof e==="string"){if(this[0])return this[0].getAttribute(e);return undefined}for(let r=0;r<this.length;r+=1){if(arguments.length===2){this[r].setAttribute(e,t)}else{for(const t in e){this[r][t]=e[t];this[r].setAttribute(t,e[t])}}}return this}function E(e){for(let t=0;t<this.length;t+=1){this[t].removeAttribute(e)}return this}function w(e,t){if(arguments.length===1&&typeof e==="string"){if(this[0])return this[0][e]}else{for(let r=0;r<this.length;r+=1){if(arguments.length===2){this[r][e]=t}else{for(const t in e){this[r][t]=e[t]}}}return this}return this}function T(e,t){let r;if(typeof t==="undefined"){r=this[0];if(!r)return undefined;if(r.dom7ElementDataStorage&&e in r.dom7ElementDataStorage){return r.dom7ElementDataStorage[e]}const t=r.getAttribute(`data-${e}`);if(t){return t}return undefined}for(let n=0;n<this.length;n+=1){r=this[n];if(!r.dom7ElementDataStorage)r.dom7ElementDataStorage={};r.dom7ElementDataStorage[e]=t}return this}function I(e){for(let t=0;t<this.length;t+=1){const r=this[t];if(r.dom7ElementDataStorage&&r.dom7ElementDataStorage[e]){r.dom7ElementDataStorage[e]=null;delete r.dom7ElementDataStorage[e]}}}function R(){const e=this[0];if(!e)return undefined;const t={};if(e.dataset){for(const r in e.dataset){t[r]=e.dataset[r]}}else{for(let r=0;r<e.attributes.length;r+=1){const n=e.attributes[r];if(n.name.indexOf("data-")>=0){t[p(n.name.split("data-")[1])]=n.value}}}for(const e in t){if(t[e]==="false")t[e]=false;else if(t[e]==="true")t[e]=true;else if(parseFloat(t[e])===t[e]*1)t[e]*=1}return t}function C(e){if(typeof e==="undefined"){const e=this[0];if(!e)return undefined;if(e.multiple&&e.nodeName.toLowerCase()==="select"){const t=[];for(let r=0;r<e.selectedOptions.length;r+=1){t.push(e.selectedOptions[r].value)}return t}return e.value}for(let t=0;t<this.length;t+=1){const r=this[t];if(Array.isArray(e)&&r.multiple&&r.nodeName.toLowerCase()==="select"){for(let t=0;t<r.options.length;t+=1){r.options[t].selected=e.indexOf(r.options[t].value)>=0}}else{r.value=e}}return this}function k(e){return this.val(e)}function A(e){for(let t=0;t<this.length;t+=1){this[t].style.transform=e}return this}function O(e){for(let t=0;t<this.length;t+=1){this[t].style.transitionDuration=typeof e!=="string"?`${e}ms`:e}return this}function P(...e){let[t,r,n,i]=e;if(typeof e[1]==="function"){[t,n,i]=e;r=undefined}if(!i)i=false;function o(e){const t=e.target;if(!t)return;const i=e.target.dom7EventData||[];if(i.indexOf(e)<0){i.unshift(e)}if(m(t).is(r))n.apply(t,i);else{const e=m(t).parents();for(let t=0;t<e.length;t+=1){if(m(e[t]).is(r))n.apply(e[t],i)}}}function a(e){const t=e&&e.target?e.target.dom7EventData||[]:[];if(t.indexOf(e)<0){t.unshift(e)}n.apply(this,t)}const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(!r){for(u=0;u<s.length;u+=1){const e=s[u];if(!t.dom7Listeners)t.dom7Listeners={};if(!t.dom7Listeners[e])t.dom7Listeners[e]=[];t.dom7Listeners[e].push({listener:n,proxyListener:a});t.addEventListener(e,a,i)}}else{for(u=0;u<s.length;u+=1){const e=s[u];if(!t.dom7LiveListeners)t.dom7LiveListeners={};if(!t.dom7LiveListeners[e])t.dom7LiveListeners[e]=[];t.dom7LiveListeners[e].push({listener:n,proxyListener:o});t.addEventListener(e,o,i)}}}return this}function x(...e){let[t,r,n,i]=e;if(typeof e[1]==="function"){[t,n,i]=e;r=undefined}if(!i)i=false;const o=t.split(" ");for(let e=0;e<o.length;e+=1){const t=o[e];for(let e=0;e<this.length;e+=1){const o=this[e];let a;if(!r&&o.dom7Listeners){a=o.dom7Listeners[t]}else if(r&&o.dom7LiveListeners){a=o.dom7LiveListeners[t]}if(a&&a.length){for(let e=a.length-1;e>=0;e-=1){const r=a[e];if(n&&r.listener===n){o.removeEventListener(t,r.proxyListener,i);a.splice(e,1)}else if(n&&r.listener&&r.listener.dom7proxy&&r.listener.dom7proxy===n){o.removeEventListener(t,r.proxyListener,i);a.splice(e,1)}else if(!n){o.removeEventListener(t,r.proxyListener,i);a.splice(e,1)}}}}}return this}function L(...e){const t=this;let[r,n,i,o]=e;if(typeof e[1]==="function"){[r,i,o]=e;n=undefined}function a(...e){i.apply(this,e);t.off(r,n,a,o);if(a.dom7proxy){delete a.dom7proxy}}a.dom7proxy=i;return t.on(r,n,a,o)}function M(...e){const t=u();const r=e[0].split(" ");const n=e[1];for(let i=0;i<r.length;i+=1){const o=r[i];for(let r=0;r<this.length;r+=1){const i=this[r];if(t.CustomEvent){const r=new t.CustomEvent(o,{detail:n,bubbles:true,cancelable:true});i.dom7EventData=e.filter(((e,t)=>t>0));i.dispatchEvent(r);i.dom7EventData=[];delete i.dom7EventData}}}return this}function N(e){const t=this;function r(n){if(n.target!==this)return;e.call(this,n);t.off("transitionstart",r)}if(e){t.on("transitionstart",r)}return this}function D(e){const t=this;function r(n){if(n.target!==this)return;e.call(this,n);t.off("transitionend",r)}if(e){t.on("transitionend",r)}return this}function j(e){const t=this;function r(n){if(n.target!==this)return;e.call(this,n);t.off("animationend",r)}if(e){t.on("animationend",r)}return this}function U(){const e=getWindow();if(this[0]===e){return e.innerWidth}if(this.length>0){return parseFloat(this.css("width"))}return null}function V(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function W(){const e=getWindow();if(this[0]===e){return e.innerHeight}if(this.length>0){return parseFloat(this.css("height"))}return null}function B(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function G(){if(this.length>0){const e=u();const t=a();const r=this[0];const n=r.getBoundingClientRect();const i=t.body;const o=r.clientTop||i.clientTop||0;const s=r.clientLeft||i.clientLeft||0;const c=r===e?e.scrollY:r.scrollTop;const l=r===e?e.scrollX:r.scrollLeft;return{top:n.top+c-o,left:n.left+l-s}}return null}function Z(){for(let e=0;e<this.length;e+=1){this[e].style.display="none"}return this}function F(){const e=getWindow();for(let t=0;t<this.length;t+=1){const r=this[t];if(r.style.display==="none"){r.style.display=""}if(e.getComputedStyle(r,null).getPropertyValue("display")==="none"){r.style.display="block"}}return this}function H(){const e=u();if(this[0])return e.getComputedStyle(this[0],null);return{}}function X(e,t){const r=u();let n;if(arguments.length===1){if(typeof e==="string"){if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(n=0;n<this.length;n+=1){for(const t in e){this[n].style[t]=e[t]}}return this}}if(arguments.length===2&&typeof e==="string"){for(n=0;n<this.length;n+=1){this[n].style[e]=t}return this}return this}function Y(e){if(!e)return this;this.forEach(((t,r)=>{e.apply(t,[t,r])}));return this}function K(e){const t=d(this,e);return m(t)}function z(e){if(typeof e==="undefined"){return this[0]?this[0].innerHTML:null}for(let t=0;t<this.length;t+=1){this[t].innerHTML=e}return this}function J(e){if(typeof e==="undefined"){return this[0]?this[0].textContent.trim():null}for(let t=0;t<this.length;t+=1){this[t].textContent=e}return this}function Q(e){const t=u();const r=a();const n=this[0];let i;let o;if(!n||typeof e==="undefined")return false;if(typeof e==="string"){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);i=m(e);for(o=0;o<i.length;o+=1){if(i[o]===n)return true}return false}if(e===r){return n===r}if(e===t){return n===t}if(e.nodeType||e instanceof l){i=e.nodeType?[e]:e;for(o=0;o<i.length;o+=1){if(i[o]===n)return true}return false}return false}function q(){let e=this[0];let t;if(e){t=0;while((e=e.previousSibling)!==null){if(e.nodeType===1)t+=1}return t}return undefined}function $(e){if(typeof e==="undefined")return this;const t=this.length;if(e>t-1){return m([])}if(e<0){const r=t+e;if(r<0)return m([]);return m([this[r]])}return m([this[e]])}function ee(...e){let t;const r=a();for(let n=0;n<e.length;n+=1){t=e[n];for(let e=0;e<this.length;e+=1){if(typeof t==="string"){const n=r.createElement("div");n.innerHTML=t;while(n.firstChild){this[e].appendChild(n.firstChild)}}else if(t instanceof l){for(let r=0;r<t.length;r+=1){this[e].appendChild(t[r])}}else{this[e].appendChild(t)}}}return this}function te(e){m(e).append(this);return this}function re(e){const t=a();let r;let n;for(r=0;r<this.length;r+=1){if(typeof e==="string"){const i=t.createElement("div");i.innerHTML=e;for(n=i.childNodes.length-1;n>=0;n-=1){this[r].insertBefore(i.childNodes[n],this[r].childNodes[0])}}else if(e instanceof l){for(n=0;n<e.length;n+=1){this[r].insertBefore(e[n],this[r].childNodes[0])}}else{this[r].insertBefore(e,this[r].childNodes[0])}}return this}function ne(e){m(e).prepend(this);return this}function ie(e){const t=m(e);for(let e=0;e<this.length;e+=1){if(t.length===1){t[0].parentNode.insertBefore(this[e],t[0])}else if(t.length>1){for(let r=0;r<t.length;r+=1){t[r].parentNode.insertBefore(this[e].cloneNode(true),t[r])}}}}function oe(e){const t=m(e);for(let e=0;e<this.length;e+=1){if(t.length===1){t[0].parentNode.insertBefore(this[e],t[0].nextSibling)}else if(t.length>1){for(let r=0;r<t.length;r+=1){t[r].parentNode.insertBefore(this[e].cloneNode(true),t[r].nextSibling)}}}}function ae(e){if(this.length>0){if(e){if(this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)){return m([this[0].nextElementSibling])}return m([])}if(this[0].nextElementSibling)return m([this[0].nextElementSibling]);return m([])}return m([])}function se(e){const t=[];let r=this[0];if(!r)return m([]);while(r.nextElementSibling){const n=r.nextElementSibling;if(e){if(m(n).is(e))t.push(n)}else t.push(n);r=n}return m(t)}function ue(e){if(this.length>0){const t=this[0];if(e){if(t.previousElementSibling&&m(t.previousElementSibling).is(e)){return m([t.previousElementSibling])}return m([])}if(t.previousElementSibling)return m([t.previousElementSibling]);return m([])}return m([])}function ce(e){const t=[];let r=this[0];if(!r)return m([]);while(r.previousElementSibling){const n=r.previousElementSibling;if(e){if(m(n).is(e))t.push(n)}else t.push(n);r=n}return m(t)}function le(e){return this.nextAll(e).add(this.prevAll(e))}function fe(e){const t=[];for(let r=0;r<this.length;r+=1){if(this[r].parentNode!==null){if(e){if(m(this[r].parentNode).is(e))t.push(this[r].parentNode)}else{t.push(this[r].parentNode)}}}return m(t)}function de(e){const t=[];for(let r=0;r<this.length;r+=1){let n=this[r].parentNode;while(n){if(e){if(m(n).is(e))t.push(n)}else{t.push(n)}n=n.parentNode}}return m(t)}function he(e){let t=this;if(typeof e==="undefined"){return m([])}if(!t.is(e)){t=t.parents(e).eq(0)}return t}function pe(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].querySelectorAll(e);for(let e=0;e<n.length;e+=1){t.push(n[e])}}return m(t)}function ve(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].children;for(let r=0;r<n.length;r+=1){if(!e||m(n[r]).is(e)){t.push(n[r])}}}return m(t)}function me(){for(let e=0;e<this.length;e+=1){if(this[e].parentNode)this[e].parentNode.removeChild(this[e])}return this}function ye(){return this.remove()}function ge(...e){const t=this;let r;let n;for(r=0;r<e.length;r+=1){const i=m(e[r]);for(n=0;n<i.length;n+=1){t.push(i[n])}}return t}function be(){for(let e=0;e<this.length;e+=1){const t=this[e];if(t.nodeType===1){for(let e=0;e<t.childNodes.length;e+=1){if(t.childNodes[e].parentNode){t.childNodes[e].parentNode.removeChild(t.childNodes[e])}}t.textContent=""}}return this}function _e(...e){const t=getWindow();let[r,n,i,o,a]=e;if(e.length===4&&typeof o==="function"){a=o;[r,n,i,a,o]=e}if(typeof o==="undefined")o="swing";return this.each((function e(){const s=this;let u;let c;let l;let f;let d;let h;let p;let v;let m=n>0||n===0;let y=r>0||r===0;if(typeof o==="undefined"){o="swing"}if(m){u=s.scrollTop;if(!i){s.scrollTop=n}}if(y){c=s.scrollLeft;if(!i){s.scrollLeft=r}}if(!i)return;if(m){l=s.scrollHeight-s.offsetHeight;d=Math.max(Math.min(n,l),0)}if(y){f=s.scrollWidth-s.offsetWidth;h=Math.max(Math.min(r,f),0)}let g=null;if(m&&d===u)m=false;if(y&&h===c)y=false;function b(e=(new Date).getTime()){if(g===null){g=e}const r=Math.max(Math.min((e-g)/i,1),0);const n=o==="linear"?r:.5-Math.cos(r*Math.PI)/2;let l;if(m)p=u+n*(d-u);if(y)v=c+n*(h-c);if(m&&d>u&&p>=d){s.scrollTop=d;l=true}if(m&&d<u&&p<=d){s.scrollTop=d;l=true}if(y&&h>c&&v>=h){s.scrollLeft=h;l=true}if(y&&h<c&&v<=h){s.scrollLeft=h;l=true}if(l){if(a)a();return}if(m)s.scrollTop=p;if(y)s.scrollLeft=v;t.requestAnimationFrame(b)}t.requestAnimationFrame(b)}))}function Se(...e){let[t,r,n,i]=e;if(e.length===3&&typeof n==="function"){[t,r,i,n]=e}const o=this;if(typeof t==="undefined"){if(o.length>0)return o[0].scrollTop;return null}return o.scrollTo(undefined,t,r,n,i)}function Ee(...e){let[t,r,n,i]=e;if(e.length===3&&typeof n==="function"){[t,r,i,n]=e}const o=this;if(typeof t==="undefined"){if(o.length>0)return o[0].scrollLeft;return null}return o.scrollTo(t,undefined,r,n,i)}function we(e,t){const r=getWindow();const n=this;const i={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:n,animating:false,que:[],easingProgress(e,t){if(e==="swing"){return.5-Math.cos(t*Math.PI)/2}if(typeof e==="function"){return e(t)}return t},stop(){if(i.frameId){r.cancelAnimationFrame(i.frameId)}i.animating=false;i.elements.each((e=>{const t=e;delete t.dom7AnimateInstance}));i.que=[]},done(e){i.animating=false;i.elements.each((e=>{const t=e;delete t.dom7AnimateInstance}));if(e)e(n);if(i.que.length>0){const e=i.que.shift();i.animate(e[0],e[1])}},animate(e,t){if(i.animating){i.que.push([e,t]);return i}const o=[];i.elements.each(((t,n)=>{let a;let s;let u;let c;let l;if(!t.dom7AnimateInstance)i.elements[n].dom7AnimateInstance=i;o[n]={container:t};Object.keys(e).forEach((i=>{a=r.getComputedStyle(t,null).getPropertyValue(i).replace(",",".");s=parseFloat(a);u=a.replace(s,"");c=parseFloat(e[i]);l=e[i]+u;o[n][i]={initialFullValue:a,initialValue:s,unit:u,finalValue:c,finalFullValue:l,currentValue:s}}))}));let a=null;let s;let u=0;let c=0;let l;let f=false;i.animating=true;function d(){s=(new Date).getTime();let h;let p;if(!f){f=true;if(t.begin)t.begin(n)}if(a===null){a=s}if(t.progress){t.progress(n,Math.max(Math.min((s-a)/t.duration,1),0),a+t.duration-s<0?0:a+t.duration-s,a)}o.forEach((r=>{const n=r;if(l||n.done)return;Object.keys(e).forEach((r=>{if(l||n.done)return;h=Math.max(Math.min((s-a)/t.duration,1),0);p=i.easingProgress(t.easing,h);const{initialValue:f,finalValue:d,unit:v}=n[r];n[r].currentValue=f+p*(d-f);const m=n[r].currentValue;if(d>f&&m>=d||d<f&&m<=d){n.container.style[r]=d+v;c+=1;if(c===Object.keys(e).length){n.done=true;u+=1}if(u===o.length){l=true}}if(l){i.done(t.complete);return}n.container.style[r]=m+v}))}));if(l)return;i.frameId=r.requestAnimationFrame(d)}i.frameId=r.requestAnimationFrame(d);return i}};if(i.elements.length===0){return n}let o;for(let e=0;e<i.elements.length;e+=1){if(i.elements[e].dom7AnimateInstance){o=i.elements[e].dom7AnimateInstance}else i.elements[e].dom7AnimateInstance=i}if(!o){o=i}if(e==="stop"){o.stop()}else{o.animate(i.props,i.params)}return n}function Te(){const e=this;for(let t=0;t<e.length;t+=1){if(e[t].dom7AnimateInstance){e[t].dom7AnimateInstance.stop()}}}const Ie="resize scroll".split(" ");function Re(e){function t(...t){if(typeof t[0]==="undefined"){for(let t=0;t<this.length;t+=1){if(Ie.indexOf(e)<0){if(e in this[t])this[t][e]();else{m(this[t]).trigger(e)}}}return this}return this.on(e,...t)}return t}const Ce=Re("click");const ke=Re("blur");const Ae=Re("focus");const Oe=Re("focusin");const Pe=Re("focusout");const xe=Re("keyup");const Le=Re("keydown");const Me=Re("keypress");const Ne=Re("submit");const De=Re("change");const je=Re("mousedown");const Ue=Re("mousemove");const Ve=Re("mouseup");const We=Re("mouseenter");const Be=Re("mouseleave");const Ge=Re("mouseout");const Ze=Re("mouseover");const Fe=Re("touchstart");const He=Re("touchend");const Xe=Re("touchmove");const Ye=Re("resize");const Ke=Re("scroll");const ze=null&&m;const Je={addClass:y,removeClass:g,hasClass:_,toggleClass:b,attr:S,removeAttr:E,transform:A,transition:O,on:P,off:x,trigger:M,transitionEnd:D,outerWidth:V,outerHeight:B,styles:H,offset:G,css:X,each:Y,html:z,text:J,is:Q,index:q,eq:$,append:ee,prepend:re,next:ae,nextAll:se,prev:ue,prevAll:ce,parent:fe,parents:de,closest:he,find:pe,children:ve,filter:K,remove:me};Object.keys(Je).forEach((e=>{Object.defineProperty(m.fn,e,{value:Je[e],writable:true})}));const Qe=m;function qe(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}function $e(e,t=0){return setTimeout(e,t)}function et(){return Date.now()}function tt(e){const t=u();let r;if(t.getComputedStyle){r=t.getComputedStyle(e,null)}if(!r&&e.currentStyle){r=e.currentStyle}if(!r){r=e.style}return r}function rt(e,t="x"){const r=u();let n;let i;let o;const a=tt(e,null);if(r.WebKitCSSMatrix){i=a.transform||a.webkitTransform;if(i.split(",").length>6){i=i.split(", ").map((e=>e.replace(",","."))).join(", ")}o=new r.WebKitCSSMatrix(i==="none"?"":i)}else{o=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,");n=o.toString().split(",")}if(t==="x"){if(r.WebKitCSSMatrix)i=o.m41;else if(n.length===16)i=parseFloat(n[12]);else i=parseFloat(n[4])}if(t==="y"){if(r.WebKitCSSMatrix)i=o.m42;else if(n.length===16)i=parseFloat(n[13]);else i=parseFloat(n[5])}return i||0}function nt(e){return typeof e==="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function it(e){if(typeof window!=="undefined"&&typeof window.HTMLElement!=="undefined"){return e instanceof HTMLElement}return e&&(e.nodeType===1||e.nodeType===11)}function ot(...e){const t=Object(e[0]);const r=["__proto__","constructor","prototype"];for(let n=1;n<e.length;n+=1){const i=e[n];if(i!==undefined&&i!==null&&!it(i)){const e=Object.keys(Object(i)).filter((e=>r.indexOf(e)<0));for(let r=0,n=e.length;r<n;r+=1){const n=e[r];const o=Object.getOwnPropertyDescriptor(i,n);if(o!==undefined&&o.enumerable){if(nt(t[n])&&nt(i[n])){if(i[n].__swiper__){t[n]=i[n]}else{ot(t[n],i[n])}}else if(!nt(t[n])&&nt(i[n])){t[n]={};if(i[n].__swiper__){t[n]=i[n]}else{ot(t[n],i[n])}}else{t[n]=i[n]}}}}}return t}function at(e,t,r){e.style.setProperty(t,r)}function st({swiper:e,targetPosition:t,side:r}){const n=u();const i=-e.translate;let o=null;let a;const s=e.params.speed;e.wrapperEl.style.scrollSnapType="none";n.cancelAnimationFrame(e.cssModeFrameID);const c=t>i?"next":"prev";const l=(e,t)=>c==="next"&&e>=t||c==="prev"&&e<=t;const f=()=>{a=(new Date).getTime();if(o===null){o=a}const u=Math.max(Math.min((a-o)/s,1),0);const c=.5-Math.cos(u*Math.PI)/2;let d=i+c*(t-i);if(l(d,t)){d=t}e.wrapperEl.scrollTo({[r]:d});if(l(d,t)){e.wrapperEl.style.overflow="hidden";e.wrapperEl.style.scrollSnapType="";setTimeout((()=>{e.wrapperEl.style.overflow="";e.wrapperEl.scrollTo({[r]:d})}));n.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=n.requestAnimationFrame(f)};f()}let ut;function ct(){const e=u();const t=a();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function t(){let r=false;try{const t=Object.defineProperty({},"passive",{get(){r=true}});e.addEventListener("testPassiveListener",null,t)}catch(e){}return r}(),gestures:function t(){return"ongesturestart"in e}()}}function lt(){if(!ut){ut=ct()}return ut}let ft;function dt({userAgent:e}={}){const t=lt();const r=u();const n=r.navigator.platform;const i=e||r.navigator.userAgent;const o={ios:false,android:false};const a=r.screen.width;const s=r.screen.height;const c=i.match(/(Android);?[\s\/]+([\d.]+)?/);let l=i.match(/(iPad).*OS\s([\d_]+)/);const f=i.match(/(iPod)(.*OS\s([\d_]+))?/);const d=!l&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/);const h=n==="Win32";let p=n==="MacIntel";const v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];if(!l&&p&&t.touch&&v.indexOf(`${a}x${s}`)>=0){l=i.match(/(Version)\/([\d.]+)/);if(!l)l=[0,1,"13_0_0"];p=false}if(c&&!h){o.os="android";o.android=true}if(l||d||f){o.os="ios";o.ios=true}return o}function ht(e={}){if(!ft){ft=dt(e)}return ft}let pt;function vt(){const e=u();function t(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}return{isSafari:t(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}function mt(){if(!pt){pt=vt()}return pt}function yt({swiper:e,on:t,emit:r}){const n=u();let i=null;let o=null;const a=()=>{if(!e||e.destroyed||!e.initialized)return;r("beforeResize");r("resize")};const s=()=>{if(!e||e.destroyed||!e.initialized)return;i=new ResizeObserver((t=>{o=n.requestAnimationFrame((()=>{const{width:r,height:n}=e;let i=r;let o=n;t.forEach((({contentBoxSize:t,contentRect:r,target:n})=>{if(n&&n!==e.el)return;i=r?r.width:(t[0]||t).inlineSize;o=r?r.height:(t[0]||t).blockSize}));if(i!==r||o!==n){a()}}))}));i.observe(e.el)};const c=()=>{if(o){n.cancelAnimationFrame(o)}if(i&&i.unobserve&&e.el){i.unobserve(e.el);i=null}};const l=()=>{if(!e||e.destroyed||!e.initialized)return;r("orientationchange")};t("init",(()=>{if(e.params.resizeObserver&&typeof n.ResizeObserver!=="undefined"){s();return}n.addEventListener("resize",a);n.addEventListener("orientationchange",l)}));t("destroy",(()=>{c();n.removeEventListener("resize",a);n.removeEventListener("orientationchange",l)}))}function gt({swiper:e,extendParams:t,on:r,emit:n}){const i=[];const o=u();const a=(e,t={})=>{const r=o.MutationObserver||o.WebkitMutationObserver;const a=new r((e=>{if(e.length===1){n("observerUpdate",e[0]);return}const t=function t(){n("observerUpdate",e[0])};if(o.requestAnimationFrame){o.requestAnimationFrame(t)}else{o.setTimeout(t,0)}}));a.observe(e,{attributes:typeof t.attributes==="undefined"?true:t.attributes,childList:typeof t.childList==="undefined"?true:t.childList,characterData:typeof t.characterData==="undefined"?true:t.characterData});i.push(a)};const s=()=>{if(!e.params.observer)return;if(e.params.observeParents){const t=e.$el.parents();for(let e=0;e<t.length;e+=1){a(t[e])}}a(e.$el[0],{childList:e.params.observeSlideChildren});a(e.$wrapperEl[0],{attributes:false})};const c=()=>{i.forEach((e=>{e.disconnect()}));i.splice(0,i.length)};t({observer:false,observeParents:false,observeSlideChildren:false});r("init",s);r("destroy",c)}const bt={on(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed)return n;if(typeof t!=="function")return n;const i=r?"unshift":"push";e.split(" ").forEach((e=>{if(!n.eventsListeners[e])n.eventsListeners[e]=[];n.eventsListeners[e][i](t)}));return n},once(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed)return n;if(typeof t!=="function")return n;function i(...r){n.off(e,i);if(i.__emitterProxy){delete i.__emitterProxy}t.apply(n,r)}i.__emitterProxy=t;return n.on(e,i,r)},onAny(e,t){const r=this;if(!r.eventsListeners||r.destroyed)return r;if(typeof e!=="function")return r;const n=t?"unshift":"push";if(r.eventsAnyListeners.indexOf(e)<0){r.eventsAnyListeners[n](e)}return r},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const r=t.eventsAnyListeners.indexOf(e);if(r>=0){t.eventsAnyListeners.splice(r,1)}return t},off(e,t){const r=this;if(!r.eventsListeners||r.destroyed)return r;if(!r.eventsListeners)return r;e.split(" ").forEach((e=>{if(typeof t==="undefined"){r.eventsListeners[e]=[]}else if(r.eventsListeners[e]){r.eventsListeners[e].forEach(((n,i)=>{if(n===t||n.__emitterProxy&&n.__emitterProxy===t){r.eventsListeners[e].splice(i,1)}}))}}));return r},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let r;let n;let i;if(typeof e[0]==="string"||Array.isArray(e[0])){r=e[0];n=e.slice(1,e.length);i=t}else{r=e[0].events;n=e[0].data;i=e[0].context||t}n.unshift(i);const o=Array.isArray(r)?r:r.split(" ");o.forEach((e=>{if(t.eventsAnyListeners&&t.eventsAnyListeners.length){t.eventsAnyListeners.forEach((t=>{t.apply(i,[e,...n])}))}if(t.eventsListeners&&t.eventsListeners[e]){t.eventsListeners[e].forEach((e=>{e.apply(i,n)}))}}));return t}};function _t(){const e=this;let t;let r;const n=e.$el;if(typeof e.params.width!=="undefined"&&e.params.width!==null){t=e.params.width}else{t=n[0].clientWidth}if(typeof e.params.height!=="undefined"&&e.params.height!==null){r=e.params.height}else{r=n[0].clientHeight}if(t===0&&e.isHorizontal()||r===0&&e.isVertical()){return}t=t-parseInt(n.css("padding-left")||0,10)-parseInt(n.css("padding-right")||0,10);r=r-parseInt(n.css("padding-top")||0,10)-parseInt(n.css("padding-bottom")||0,10);if(Number.isNaN(t))t=0;if(Number.isNaN(r))r=0;Object.assign(e,{width:t,height:r,size:e.isHorizontal()?t:r})}function St(){const e=this;function t(t){if(e.isHorizontal()){return t}return{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function r(e,r){return parseFloat(e.getPropertyValue(t(r))||0)}const n=e.params;const{$wrapperEl:i,size:o,rtlTranslate:a,wrongRTL:s}=e;const u=e.virtual&&n.virtual.enabled;const c=u?e.virtual.slides.length:e.slides.length;const l=i.children(`.${e.params.slideClass}`);const f=u?e.virtual.slides.length:l.length;let d=[];const h=[];const p=[];let v=n.slidesOffsetBefore;if(typeof v==="function"){v=n.slidesOffsetBefore.call(e)}let m=n.slidesOffsetAfter;if(typeof m==="function"){m=n.slidesOffsetAfter.call(e)}const y=e.snapGrid.length;const g=e.slidesGrid.length;let b=n.spaceBetween;let _=-v;let S=0;let E=0;if(typeof o==="undefined"){return}if(typeof b==="string"&&b.indexOf("%")>=0){b=parseFloat(b.replace("%",""))/100*o}e.virtualSize=-b;if(a)l.css({marginLeft:"",marginBottom:"",marginTop:""});else l.css({marginRight:"",marginBottom:"",marginTop:""});if(n.centeredSlides&&n.cssMode){at(e.wrapperEl,"--swiper-centered-offset-before","");at(e.wrapperEl,"--swiper-centered-offset-after","")}const w=n.grid&&n.grid.rows>1&&e.grid;if(w){e.grid.initSlides(f)}let T;const I=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>typeof n.breakpoints[e].slidesPerView!=="undefined")).length>0;for(let i=0;i<f;i+=1){T=0;const a=l.eq(i);if(w){e.grid.updateSlide(i,a,f,t)}if(a.css("display")==="none")continue;if(n.slidesPerView==="auto"){if(I){l[i].style[t("width")]=``}const o=getComputedStyle(a[0]);const s=a[0].style.transform;const u=a[0].style.webkitTransform;if(s){a[0].style.transform="none"}if(u){a[0].style.webkitTransform="none"}if(n.roundLengths){T=e.isHorizontal()?a.outerWidth(true):a.outerHeight(true)}else{const e=r(o,"width");const t=r(o,"padding-left");const n=r(o,"padding-right");const i=r(o,"margin-left");const s=r(o,"margin-right");const u=o.getPropertyValue("box-sizing");if(u&&u==="border-box"){T=e+i+s}else{const{clientWidth:r,offsetWidth:o}=a[0];T=e+t+n+i+s+(o-r)}}if(s){a[0].style.transform=s}if(u){a[0].style.webkitTransform=u}if(n.roundLengths)T=Math.floor(T)}else{T=(o-(n.slidesPerView-1)*b)/n.slidesPerView;if(n.roundLengths)T=Math.floor(T);if(l[i]){l[i].style[t("width")]=`${T}px`}}if(l[i]){l[i].swiperSlideSize=T}p.push(T);if(n.centeredSlides){_=_+T/2+S/2+b;if(S===0&&i!==0)_=_-o/2-b;if(i===0)_=_-o/2-b;if(Math.abs(_)<1/1e3)_=0;if(n.roundLengths)_=Math.floor(_);if(E%n.slidesPerGroup===0)d.push(_);h.push(_)}else{if(n.roundLengths)_=Math.floor(_);if((E-Math.min(e.params.slidesPerGroupSkip,E))%e.params.slidesPerGroup===0)d.push(_);h.push(_);_=_+T+b}e.virtualSize+=T+b;S=T;E+=1}e.virtualSize=Math.max(e.virtualSize,o)+m;if(a&&s&&(n.effect==="slide"||n.effect==="coverflow")){i.css({width:`${e.virtualSize+n.spaceBetween}px`})}if(n.setWrapperSize){i.css({[t("width")]:`${e.virtualSize+n.spaceBetween}px`})}if(w){e.grid.updateWrapperSize(T,d,t)}if(!n.centeredSlides){const t=[];for(let r=0;r<d.length;r+=1){let i=d[r];if(n.roundLengths)i=Math.floor(i);if(d[r]<=e.virtualSize-o){t.push(i)}}d=t;if(Math.floor(e.virtualSize-o)-Math.floor(d[d.length-1])>1){d.push(e.virtualSize-o)}}if(d.length===0)d=[0];if(n.spaceBetween!==0){const r=e.isHorizontal()&&a?"marginLeft":t("marginRight");l.filter(((e,t)=>{if(!n.cssMode)return true;if(t===l.length-1){return false}return true})).css({[r]:`${b}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;p.forEach((t=>{e+=t+(n.spaceBetween?n.spaceBetween:0)}));e-=n.spaceBetween;const t=e-o;d=d.map((e=>{if(e<0)return-v;if(e>t)return t+m;return e}))}if(n.centerInsufficientSlides){let e=0;p.forEach((t=>{e+=t+(n.spaceBetween?n.spaceBetween:0)}));e-=n.spaceBetween;if(e<o){const t=(o-e)/2;d.forEach(((e,r)=>{d[r]=e-t}));h.forEach(((e,r)=>{h[r]=e+t}))}}Object.assign(e,{slides:l,snapGrid:d,slidesGrid:h,slidesSizesGrid:p});if(n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){at(e.wrapperEl,"--swiper-centered-offset-before",`${-d[0]}px`);at(e.wrapperEl,"--swiper-centered-offset-after",`${e.size/2-p[p.length-1]/2}px`);const t=-e.snapGrid[0];const r=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t));e.slidesGrid=e.slidesGrid.map((e=>e+r))}if(f!==c){e.emit("slidesLengthChange")}if(d.length!==y){if(e.params.watchOverflow)e.checkOverflow();e.emit("snapGridLengthChange")}if(h.length!==g){e.emit("slidesGridLengthChange")}if(n.watchSlidesProgress){e.updateSlidesOffset()}if(!u&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const t=`${n.containerModifierClass}backface-hidden`;const r=e.$el.hasClass(t);if(f<=n.maxBackfaceHiddenSlides){if(!r)e.$el.addClass(t)}else if(r){e.$el.removeClass(t)}}}function Et(e){const t=this;const r=[];const n=t.virtual&&t.params.virtual.enabled;let i=0;let o;if(typeof e==="number"){t.setTransition(e)}else if(e===true){t.setTransition(t.params.speed)}const a=e=>{if(n){return t.slides.filter((t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e))[0]}return t.slides.eq(e)[0]};if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1){if(t.params.centeredSlides){(t.visibleSlides||Qe([])).each((e=>{r.push(e)}))}else{for(o=0;o<Math.ceil(t.params.slidesPerView);o+=1){const e=t.activeIndex+o;if(e>t.slides.length&&!n)break;r.push(a(e))}}}else{r.push(a(t.activeIndex))}for(o=0;o<r.length;o+=1){if(typeof r[o]!=="undefined"){const e=r[o].offsetHeight;i=e>i?e:i}}if(i||i===0)t.$wrapperEl.css("height",`${i}px`)}function wt(){const e=this;const t=e.slides;for(let r=0;r<t.length;r+=1){t[r].swiperSlideOffset=e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop}}function Tt(e=this&&this.translate||0){const t=this;const r=t.params;const{slides:n,rtlTranslate:i,snapGrid:o}=t;if(n.length===0)return;if(typeof n[0].swiperSlideOffset==="undefined")t.updateSlidesOffset();let a=-e;if(i)a=e;n.removeClass(r.slideVisibleClass);t.visibleSlidesIndexes=[];t.visibleSlides=[];for(let e=0;e<n.length;e+=1){const s=n[e];let u=s.swiperSlideOffset;if(r.cssMode&&r.centeredSlides){u-=n[0].swiperSlideOffset}const c=(a+(r.centeredSlides?t.minTranslate():0)-u)/(s.swiperSlideSize+r.spaceBetween);const l=(a-o[0]+(r.centeredSlides?t.minTranslate():0)-u)/(s.swiperSlideSize+r.spaceBetween);const f=-(a-u);const d=f+t.slidesSizesGrid[e];const h=f>=0&&f<t.size-1||d>1&&d<=t.size||f<=0&&d>=t.size;if(h){t.visibleSlides.push(s);t.visibleSlidesIndexes.push(e);n.eq(e).addClass(r.slideVisibleClass)}s.progress=i?-c:c;s.originalProgress=i?-l:l}t.visibleSlides=Qe(t.visibleSlides)}function It(e){const t=this;if(typeof e==="undefined"){const r=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*r||0}const r=t.params;const n=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:a}=t;const s=o;const u=a;if(n===0){i=0;o=true;a=true}else{i=(e-t.minTranslate())/n;o=i<=0;a=i>=1}Object.assign(t,{progress:i,isBeginning:o,isEnd:a});if(r.watchSlidesProgress||r.centeredSlides&&r.autoHeight)t.updateSlidesProgress(e);if(o&&!s){t.emit("reachBeginning toEdge")}if(a&&!u){t.emit("reachEnd toEdge")}if(s&&!o||u&&!a){t.emit("fromEdge")}t.emit("progress",i)}function Rt(){const e=this;const{slides:t,params:r,$wrapperEl:n,activeIndex:i,realIndex:o}=e;const a=e.virtual&&r.virtual.enabled;t.removeClass(`${r.slideActiveClass} ${r.slideNextClass} ${r.slidePrevClass} ${r.slideDuplicateActiveClass} ${r.slideDuplicateNextClass} ${r.slideDuplicatePrevClass}`);let s;if(a){s=e.$wrapperEl.find(`.${r.slideClass}[data-swiper-slide-index="${i}"]`)}else{s=t.eq(i)}s.addClass(r.slideActiveClass);if(r.loop){if(s.hasClass(r.slideDuplicateClass)){n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass)}else{n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass)}}let u=s.nextAll(`.${r.slideClass}`).eq(0).addClass(r.slideNextClass);if(r.loop&&u.length===0){u=t.eq(0);u.addClass(r.slideNextClass)}let c=s.prevAll(`.${r.slideClass}`).eq(0).addClass(r.slidePrevClass);if(r.loop&&c.length===0){c=t.eq(-1);c.addClass(r.slidePrevClass)}if(r.loop){if(u.hasClass(r.slideDuplicateClass)){n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass)}else{n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass)}if(c.hasClass(r.slideDuplicateClass)){n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass)}else{n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass)}}e.emitSlidesClasses()}function Ct(e){const t=this;const r=t.rtlTranslate?t.translate:-t.translate;const{slidesGrid:n,snapGrid:i,params:o,activeIndex:a,realIndex:s,snapIndex:u}=t;let c=e;let l;if(typeof c==="undefined"){for(let e=0;e<n.length;e+=1){if(typeof n[e+1]!=="undefined"){if(r>=n[e]&&r<n[e+1]-(n[e+1]-n[e])/2){c=e}else if(r>=n[e]&&r<n[e+1]){c=e+1}}else if(r>=n[e]){c=e}}if(o.normalizeSlideIndex){if(c<0||typeof c==="undefined")c=0}}if(i.indexOf(r)>=0){l=i.indexOf(r)}else{const e=Math.min(o.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/o.slidesPerGroup)}if(l>=i.length)l=i.length-1;if(c===a){if(l!==u){t.snapIndex=l;t.emit("snapIndexChange")}return}const f=parseInt(t.slides.eq(c).attr("data-swiper-slide-index")||c,10);Object.assign(t,{snapIndex:l,realIndex:f,previousIndex:a,activeIndex:c});t.emit("activeIndexChange");t.emit("snapIndexChange");if(s!==f){t.emit("realIndexChange")}if(t.initialized||t.params.runCallbacksOnInit){t.emit("slideChange")}}function kt(e){const t=this;const r=t.params;const n=Qe(e).closest(`.${r.slideClass}`)[0];let i=false;let o;if(n){for(let e=0;e<t.slides.length;e+=1){if(t.slides[e]===n){i=true;o=e;break}}}if(n&&i){t.clickedSlide=n;if(t.virtual&&t.params.virtual.enabled){t.clickedIndex=parseInt(Qe(n).attr("data-swiper-slide-index"),10)}else{t.clickedIndex=o}}else{t.clickedSlide=undefined;t.clickedIndex=undefined;return}if(r.slideToClickedSlide&&t.clickedIndex!==undefined&&t.clickedIndex!==t.activeIndex){t.slideToClickedSlide()}}const At={updateSize:_t,updateSlides:St,updateAutoHeight:Et,updateSlidesOffset:wt,updateSlidesProgress:Tt,updateProgress:It,updateSlidesClasses:Rt,updateActiveIndex:Ct,updateClickedSlide:kt};function Ot(e=(this.isHorizontal()?"x":"y")){const t=this;const{params:r,rtlTranslate:n,translate:i,$wrapperEl:o}=t;if(r.virtualTranslate){return n?-i:i}if(r.cssMode){return i}let a=rt(o[0],e);if(n)a=-a;return a||0}function Pt(e,t){const r=this;const{rtlTranslate:n,params:i,$wrapperEl:o,wrapperEl:a,progress:s}=r;let u=0;let c=0;const l=0;if(r.isHorizontal()){u=n?-e:e}else{c=e}if(i.roundLengths){u=Math.floor(u);c=Math.floor(c)}if(i.cssMode){a[r.isHorizontal()?"scrollLeft":"scrollTop"]=r.isHorizontal()?-u:-c}else if(!i.virtualTranslate){o.transform(`translate3d(${u}px, ${c}px, ${l}px)`)}r.previousTranslate=r.translate;r.translate=r.isHorizontal()?u:c;let f;const d=r.maxTranslate()-r.minTranslate();if(d===0){f=0}else{f=(e-r.minTranslate())/d}if(f!==s){r.updateProgress(e)}r.emit("setTranslate",r.translate,t)}function xt(){return-this.snapGrid[0]}function Lt(){return-this.snapGrid[this.snapGrid.length-1]}function Mt(e=0,t=this.params.speed,r=true,n=true,i){const o=this;const{params:a,wrapperEl:s}=o;if(o.animating&&a.preventInteractionOnTransition){return false}const u=o.minTranslate();const c=o.maxTranslate();let l;if(n&&e>u)l=u;else if(n&&e<c)l=c;else l=e;o.updateProgress(l);if(a.cssMode){const e=o.isHorizontal();if(t===0){s[e?"scrollLeft":"scrollTop"]=-l}else{if(!o.support.smoothScroll){st({swiper:o,targetPosition:-l,side:e?"left":"top"});return true}s.scrollTo({[e?"left":"top"]:-l,behavior:"smooth"})}return true}if(t===0){o.setTransition(0);o.setTranslate(l);if(r){o.emit("beforeTransitionStart",t,i);o.emit("transitionEnd")}}else{o.setTransition(t);o.setTranslate(l);if(r){o.emit("beforeTransitionStart",t,i);o.emit("transitionStart")}if(!o.animating){o.animating=true;if(!o.onTranslateToWrapperTransitionEnd){o.onTranslateToWrapperTransitionEnd=function e(t){if(!o||o.destroyed)return;if(t.target!==this)return;o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd);o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd);o.onTranslateToWrapperTransitionEnd=null;delete o.onTranslateToWrapperTransitionEnd;if(r){o.emit("transitionEnd")}}}o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd);o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd)}}return true}const Nt={getTranslate:Ot,setTranslate:Pt,minTranslate:xt,maxTranslate:Lt,translateTo:Mt};function Dt(e,t){const r=this;if(!r.params.cssMode){r.$wrapperEl.transition(e)}r.emit("setTransition",e,t)}function jt({swiper:e,runCallbacks:t,direction:r,step:n}){const{activeIndex:i,previousIndex:o}=e;let a=r;if(!a){if(i>o)a="next";else if(i<o)a="prev";else a="reset"}e.emit(`transition${n}`);if(t&&i!==o){if(a==="reset"){e.emit(`slideResetTransition${n}`);return}e.emit(`slideChangeTransition${n}`);if(a==="next"){e.emit(`slideNextTransition${n}`)}else{e.emit(`slidePrevTransition${n}`)}}}function Ut(e=true,t){const r=this;const{params:n}=r;if(n.cssMode)return;if(n.autoHeight){r.updateAutoHeight()}jt({swiper:r,runCallbacks:e,direction:t,step:"Start"})}function Vt(e=true,t){const r=this;const{params:n}=r;r.animating=false;if(n.cssMode)return;r.setTransition(0);jt({swiper:r,runCallbacks:e,direction:t,step:"End"})}const Wt={setTransition:Dt,transitionStart:Ut,transitionEnd:Vt};function Bt(e=0,t=this.params.speed,r=true,n,i){if(typeof e!=="number"&&typeof e!=="string"){throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`)}if(typeof e==="string"){const t=parseInt(e,10);const r=isFinite(t);if(!r){throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`)}e=t}const o=this;let a=e;if(a<0)a=0;const{params:s,snapGrid:u,slidesGrid:c,previousIndex:l,activeIndex:f,rtlTranslate:d,wrapperEl:h,enabled:p}=o;if(o.animating&&s.preventInteractionOnTransition||!p&&!n&&!i){return false}const v=Math.min(o.params.slidesPerGroupSkip,a);let m=v+Math.floor((a-v)/o.params.slidesPerGroup);if(m>=u.length)m=u.length-1;const y=-u[m];if(s.normalizeSlideIndex){for(let e=0;e<c.length;e+=1){const t=-Math.floor(y*100);const r=Math.floor(c[e]*100);const n=Math.floor(c[e+1]*100);if(typeof c[e+1]!=="undefined"){if(t>=r&&t<n-(n-r)/2){a=e}else if(t>=r&&t<n){a=e+1}}else if(t>=r){a=e}}}if(o.initialized&&a!==f){if(!o.allowSlideNext&&y<o.translate&&y<o.minTranslate()){return false}if(!o.allowSlidePrev&&y>o.translate&&y>o.maxTranslate()){if((f||0)!==a)return false}}if(a!==(l||0)&&r){o.emit("beforeSlideChangeStart")}o.updateProgress(y);let g;if(a>f)g="next";else if(a<f)g="prev";else g="reset";if(d&&-y===o.translate||!d&&y===o.translate){o.updateActiveIndex(a);if(s.autoHeight){o.updateAutoHeight()}o.updateSlidesClasses();if(s.effect!=="slide"){o.setTranslate(y)}if(g!=="reset"){o.transitionStart(r,g);o.transitionEnd(r,g)}return false}if(s.cssMode){const e=o.isHorizontal();const r=d?y:-y;if(t===0){const t=o.virtual&&o.params.virtual.enabled;if(t){o.wrapperEl.style.scrollSnapType="none";o._immediateVirtual=true}h[e?"scrollLeft":"scrollTop"]=r;if(t){requestAnimationFrame((()=>{o.wrapperEl.style.scrollSnapType="";o._swiperImmediateVirtual=false}))}}else{if(!o.support.smoothScroll){st({swiper:o,targetPosition:r,side:e?"left":"top"});return true}h.scrollTo({[e?"left":"top"]:r,behavior:"smooth"})}return true}o.setTransition(t);o.setTranslate(y);o.updateActiveIndex(a);o.updateSlidesClasses();o.emit("beforeTransitionStart",t,n);o.transitionStart(r,g);if(t===0){o.transitionEnd(r,g)}else if(!o.animating){o.animating=true;if(!o.onSlideToWrapperTransitionEnd){o.onSlideToWrapperTransitionEnd=function e(t){if(!o||o.destroyed)return;if(t.target!==this)return;o.$wrapperEl[0].removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd);o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd);o.onSlideToWrapperTransitionEnd=null;delete o.onSlideToWrapperTransitionEnd;o.transitionEnd(r,g)}}o.$wrapperEl[0].addEventListener("transitionend",o.onSlideToWrapperTransitionEnd);o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd)}return true}function Gt(e=0,t=this.params.speed,r=true,n){if(typeof e==="string"){const t=parseInt(e,10);const r=isFinite(t);if(!r){throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`)}e=t}const i=this;let o=e;if(i.params.loop){o+=i.loopedSlides}return i.slideTo(o,t,r,n)}function Zt(e=this.params.speed,t=true,r){const n=this;const{animating:i,enabled:o,params:a}=n;if(!o)return n;let s=a.slidesPerGroup;if(a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto){s=Math.max(n.slidesPerViewDynamic("current",true),1)}const u=n.activeIndex<a.slidesPerGroupSkip?1:s;if(a.loop){if(i&&a.loopPreventsSlide)return false;n.loopFix();n._clientLeft=n.$wrapperEl[0].clientLeft}if(a.rewind&&n.isEnd){return n.slideTo(0,e,t,r)}return n.slideTo(n.activeIndex+u,e,t,r)}function Ft(e=this.params.speed,t=true,r){const n=this;const{params:i,animating:o,snapGrid:a,slidesGrid:s,rtlTranslate:u,enabled:c}=n;if(!c)return n;if(i.loop){if(o&&i.loopPreventsSlide)return false;n.loopFix();n._clientLeft=n.$wrapperEl[0].clientLeft}const l=u?n.translate:-n.translate;function f(e){if(e<0)return-Math.floor(Math.abs(e));return Math.floor(e)}const d=f(l);const h=a.map((e=>f(e)));let p=a[h.indexOf(d)-1];if(typeof p==="undefined"&&i.cssMode){let e;a.forEach(((t,r)=>{if(d>=t){e=r}}));if(typeof e!=="undefined"){p=a[e>0?e-1:e]}}let v=0;if(typeof p!=="undefined"){v=s.indexOf(p);if(v<0)v=n.activeIndex-1;if(i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto){v=v-n.slidesPerViewDynamic("previous",true)+1;v=Math.max(v,0)}}if(i.rewind&&n.isBeginning){const i=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(i,e,t,r)}return n.slideTo(v,e,t,r)}function Ht(e=this.params.speed,t=true,r){const n=this;return n.slideTo(n.activeIndex,e,t,r)}function Xt(e=this.params.speed,t=true,r,n=.5){const i=this;let o=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,o);const s=a+Math.floor((o-a)/i.params.slidesPerGroup);const u=i.rtlTranslate?i.translate:-i.translate;if(u>=i.snapGrid[s]){const e=i.snapGrid[s];const t=i.snapGrid[s+1];if(u-e>(t-e)*n){o+=i.params.slidesPerGroup}}else{const e=i.snapGrid[s-1];const t=i.snapGrid[s];if(u-e<=(t-e)*n){o-=i.params.slidesPerGroup}}o=Math.max(o,0);o=Math.min(o,i.slidesGrid.length-1);return i.slideTo(o,e,t,r)}function Yt(){const e=this;const{params:t,$wrapperEl:r}=e;const n=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex;let o;if(t.loop){if(e.animating)return;o=parseInt(Qe(e.clickedSlide).attr("data-swiper-slide-index"),10);if(t.centeredSlides){if(i<e.loopedSlides-n/2||i>e.slides.length-e.loopedSlides+n/2){e.loopFix();i=r.children(`.${t.slideClass}[data-swiper-slide-index="${o}"]:not(.${t.slideDuplicateClass})`).eq(0).index();$e((()=>{e.slideTo(i)}))}else{e.slideTo(i)}}else if(i>e.slides.length-n){e.loopFix();i=r.children(`.${t.slideClass}[data-swiper-slide-index="${o}"]:not(.${t.slideDuplicateClass})`).eq(0).index();$e((()=>{e.slideTo(i)}))}else{e.slideTo(i)}}else{e.slideTo(i)}}const Kt={slideTo:Bt,slideToLoop:Gt,slideNext:Zt,slidePrev:Ft,slideReset:Ht,slideToClosest:Xt,slideToClickedSlide:Yt};function zt(){const e=this;const t=a();const{params:r,$wrapperEl:n}=e;const i=n.children().length>0?Qe(n.children()[0].parentNode):n;i.children(`.${r.slideClass}.${r.slideDuplicateClass}`).remove();let o=i.children(`.${r.slideClass}`);if(r.loopFillGroupWithBlank){const e=r.slidesPerGroup-o.length%r.slidesPerGroup;if(e!==r.slidesPerGroup){for(let n=0;n<e;n+=1){const e=Qe(t.createElement("div")).addClass(`${r.slideClass} ${r.slideBlankClass}`);i.append(e)}o=i.children(`.${r.slideClass}`)}}if(r.slidesPerView==="auto"&&!r.loopedSlides)r.loopedSlides=o.length;e.loopedSlides=Math.ceil(parseFloat(r.loopedSlides||r.slidesPerView,10));e.loopedSlides+=r.loopAdditionalSlides;if(e.loopedSlides>o.length&&e.params.loopedSlidesLimit){e.loopedSlides=o.length}const s=[];const u=[];o.each(((e,t)=>{const r=Qe(e);r.attr("data-swiper-slide-index",t)}));for(let t=0;t<e.loopedSlides;t+=1){const e=t-Math.floor(t/o.length)*o.length;u.push(o.eq(e)[0]);s.unshift(o.eq(o.length-e-1)[0])}for(let e=0;e<u.length;e+=1){i.append(Qe(u[e].cloneNode(true)).addClass(r.slideDuplicateClass))}for(let e=s.length-1;e>=0;e-=1){i.prepend(Qe(s[e].cloneNode(true)).addClass(r.slideDuplicateClass))}}function Jt(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:r,loopedSlides:n,allowSlidePrev:i,allowSlideNext:o,snapGrid:a,rtlTranslate:s}=e;let u;e.allowSlidePrev=true;e.allowSlideNext=true;const c=-a[t];const l=c-e.getTranslate();if(t<n){u=r.length-n*3+t;u+=n;const i=e.slideTo(u,0,false,true);if(i&&l!==0){e.setTranslate((s?-e.translate:e.translate)-l)}}else if(t>=r.length-n){u=-r.length+t+n;u+=n;const i=e.slideTo(u,0,false,true);if(i&&l!==0){e.setTranslate((s?-e.translate:e.translate)-l)}}e.allowSlidePrev=i;e.allowSlideNext=o;e.emit("loopFix")}function Qt(){const e=this;const{$wrapperEl:t,params:r,slides:n}=e;t.children(`.${r.slideClass}.${r.slideDuplicateClass},.${r.slideClass}.${r.slideBlankClass}`).remove();n.removeAttr("data-swiper-slide-index")}const qt={loopCreate:zt,loopFix:Jt,loopDestroy:Qt};function $t(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const r=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;r.style.cursor="move";r.style.cursor=e?"grabbing":"grab"}function er(){const e=this;if(e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode){return}e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor=""}const tr={setGrabCursor:$t,unsetGrabCursor:er};function rr(e,t=this){function r(t){if(!t||t===a()||t===u())return null;if(t.assignedSlot)t=t.assignedSlot;const n=t.closest(e);if(!n&&!t.getRootNode){return null}return n||r(t.getRootNode().host)}return r(t)}function nr(e){const t=this;const r=a();const n=u();const i=t.touchEventsData;const{params:o,touches:s,enabled:c}=t;if(!c)return;if(t.animating&&o.preventInteractionOnTransition){return}if(!t.animating&&o.cssMode&&o.loop){t.loopFix()}let l=e;if(l.originalEvent)l=l.originalEvent;let f=Qe(l.target);if(o.touchEventsTarget==="wrapper"){if(!f.closest(t.wrapperEl).length)return}i.isTouchEvent=l.type==="touchstart";if(!i.isTouchEvent&&"which"in l&&l.which===3)return;if(!i.isTouchEvent&&"button"in l&&l.button>0)return;if(i.isTouched&&i.isMoved)return;const d=!!o.noSwipingClass&&o.noSwipingClass!=="";const h=e.composedPath?e.composedPath():e.path;if(d&&l.target&&l.target.shadowRoot&&h){f=Qe(h[0])}const p=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`;const v=!!(l.target&&l.target.shadowRoot);if(o.noSwiping&&(v?rr(p,f[0]):f.closest(p)[0])){t.allowClick=true;return}if(o.swipeHandler){if(!f.closest(o.swipeHandler)[0])return}s.currentX=l.type==="touchstart"?l.targetTouches[0].pageX:l.pageX;s.currentY=l.type==="touchstart"?l.targetTouches[0].pageY:l.pageY;const m=s.currentX;const y=s.currentY;const g=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection;const b=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(g&&(m<=b||m>=n.innerWidth-b)){if(g==="prevent"){e.preventDefault()}else{return}}Object.assign(i,{isTouched:true,isMoved:false,allowTouchCallbacks:true,isScrolling:undefined,startMoving:undefined});s.startX=m;s.startY=y;i.touchStartTime=et();t.allowClick=true;t.updateSize();t.swipeDirection=undefined;if(o.threshold>0)i.allowThresholdMove=false;if(l.type!=="touchstart"){let e=true;if(f.is(i.focusableElements)){e=false;if(f[0].nodeName==="SELECT"){i.isTouched=false}}if(r.activeElement&&Qe(r.activeElement).is(i.focusableElements)&&r.activeElement!==f[0]){r.activeElement.blur()}const n=e&&t.allowTouchMove&&o.touchStartPreventDefault;if((o.touchStartForcePreventDefault||n)&&!f[0].isContentEditable){l.preventDefault()}}if(t.params.freeMode&&t.params.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode){t.freeMode.onTouchStart()}t.emit("touchStart",l)}function ir(e){const t=a();const r=this;const n=r.touchEventsData;const{params:i,touches:o,rtlTranslate:s,enabled:u}=r;if(!u)return;let c=e;if(c.originalEvent)c=c.originalEvent;if(!n.isTouched){if(n.startMoving&&n.isScrolling){r.emit("touchMoveOpposite",c)}return}if(n.isTouchEvent&&c.type!=="touchmove")return;const l=c.type==="touchmove"&&c.targetTouches&&(c.targetTouches[0]||c.changedTouches[0]);const f=c.type==="touchmove"?l.pageX:c.pageX;const d=c.type==="touchmove"?l.pageY:c.pageY;if(c.preventedByNestedSwiper){o.startX=f;o.startY=d;return}if(!r.allowTouchMove){if(!Qe(c.target).is(n.focusableElements)){r.allowClick=false}if(n.isTouched){Object.assign(o,{startX:f,startY:d,currentX:f,currentY:d});n.touchStartTime=et()}return}if(n.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop){if(r.isVertical()){if(d<o.startY&&r.translate<=r.maxTranslate()||d>o.startY&&r.translate>=r.minTranslate()){n.isTouched=false;n.isMoved=false;return}}else if(f<o.startX&&r.translate<=r.maxTranslate()||f>o.startX&&r.translate>=r.minTranslate()){return}}if(n.isTouchEvent&&t.activeElement){if(c.target===t.activeElement&&Qe(c.target).is(n.focusableElements)){n.isMoved=true;r.allowClick=false;return}}if(n.allowTouchCallbacks){r.emit("touchMove",c)}if(c.targetTouches&&c.targetTouches.length>1)return;o.currentX=f;o.currentY=d;const h=o.currentX-o.startX;const p=o.currentY-o.startY;if(r.params.threshold&&Math.sqrt(h**2+p**2)<r.params.threshold)return;if(typeof n.isScrolling==="undefined"){let e;if(r.isHorizontal()&&o.currentY===o.startY||r.isVertical()&&o.currentX===o.startX){n.isScrolling=false}else{if(h*h+p*p>=25){e=Math.atan2(Math.abs(p),Math.abs(h))*180/Math.PI;n.isScrolling=r.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle}}}if(n.isScrolling){r.emit("touchMoveOpposite",c)}if(typeof n.startMoving==="undefined"){if(o.currentX!==o.startX||o.currentY!==o.startY){n.startMoving=true}}if(n.isScrolling){n.isTouched=false;return}if(!n.startMoving){return}r.allowClick=false;if(!i.cssMode&&c.cancelable){c.preventDefault()}if(i.touchMoveStopPropagation&&!i.nested){c.stopPropagation()}if(!n.isMoved){if(i.loop&&!i.cssMode){r.loopFix()}n.startTranslate=r.getTranslate();r.setTransition(0);if(r.animating){r.$wrapperEl.trigger("webkitTransitionEnd transitionend")}n.allowMomentumBounce=false;if(i.grabCursor&&(r.allowSlideNext===true||r.allowSlidePrev===true)){r.setGrabCursor(true)}r.emit("sliderFirstMove",c)}r.emit("sliderMove",c);n.isMoved=true;let v=r.isHorizontal()?h:p;o.diff=v;v*=i.touchRatio;if(s)v=-v;r.swipeDirection=v>0?"prev":"next";n.currentTranslate=v+n.startTranslate;let m=true;let y=i.resistanceRatio;if(i.touchReleaseOnEdges){y=0}if(v>0&&n.currentTranslate>r.minTranslate()){m=false;if(i.resistance)n.currentTranslate=r.minTranslate()-1+(-r.minTranslate()+n.startTranslate+v)**y}else if(v<0&&n.currentTranslate<r.maxTranslate()){m=false;if(i.resistance)n.currentTranslate=r.maxTranslate()+1-(r.maxTranslate()-n.startTranslate-v)**y}if(m){c.preventedByNestedSwiper=true}if(!r.allowSlideNext&&r.swipeDirection==="next"&&n.currentTranslate<n.startTranslate){n.currentTranslate=n.startTranslate}if(!r.allowSlidePrev&&r.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate){n.currentTranslate=n.startTranslate}if(!r.allowSlidePrev&&!r.allowSlideNext){n.currentTranslate=n.startTranslate}if(i.threshold>0){if(Math.abs(v)>i.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=true;o.startX=o.currentX;o.startY=o.currentY;n.currentTranslate=n.startTranslate;o.diff=r.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{n.currentTranslate=n.startTranslate;return}}if(!i.followFinger||i.cssMode)return;if(i.freeMode&&i.freeMode.enabled&&r.freeMode||i.watchSlidesProgress){r.updateActiveIndex();r.updateSlidesClasses()}if(r.params.freeMode&&i.freeMode.enabled&&r.freeMode){r.freeMode.onTouchMove()}r.updateProgress(n.currentTranslate);r.setTranslate(n.currentTranslate)}function or(e){const t=this;const r=t.touchEventsData;const{params:n,touches:i,rtlTranslate:o,slidesGrid:a,enabled:s}=t;if(!s)return;let u=e;if(u.originalEvent)u=u.originalEvent;if(r.allowTouchCallbacks){t.emit("touchEnd",u)}r.allowTouchCallbacks=false;if(!r.isTouched){if(r.isMoved&&n.grabCursor){t.setGrabCursor(false)}r.isMoved=false;r.startMoving=false;return}if(n.grabCursor&&r.isMoved&&r.isTouched&&(t.allowSlideNext===true||t.allowSlidePrev===true)){t.setGrabCursor(false)}const c=et();const l=c-r.touchStartTime;if(t.allowClick){const e=u.path||u.composedPath&&u.composedPath();t.updateClickedSlide(e&&e[0]||u.target);t.emit("tap click",u);if(l<300&&c-r.lastClickTime<300){t.emit("doubleTap doubleClick",u)}}r.lastClickTime=et();$e((()=>{if(!t.destroyed)t.allowClick=true}));if(!r.isTouched||!r.isMoved||!t.swipeDirection||i.diff===0||r.currentTranslate===r.startTranslate){r.isTouched=false;r.isMoved=false;r.startMoving=false;return}r.isTouched=false;r.isMoved=false;r.startMoving=false;let f;if(n.followFinger){f=o?t.translate:-t.translate}else{f=-r.currentTranslate}if(n.cssMode){return}if(t.params.freeMode&&n.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:f});return}let d=0;let h=t.slidesSizesGrid[0];for(let e=0;e<a.length;e+=e<n.slidesPerGroupSkip?1:n.slidesPerGroup){const t=e<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;if(typeof a[e+t]!=="undefined"){if(f>=a[e]&&f<a[e+t]){d=e;h=a[e+t]-a[e]}}else if(f>=a[e]){d=e;h=a[a.length-1]-a[a.length-2]}}let p=null;let v=null;if(n.rewind){if(t.isBeginning){v=t.params.virtual&&t.params.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1}else if(t.isEnd){p=0}}const m=(f-a[d])/h;const y=d<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;if(l>n.longSwipesMs){if(!n.longSwipes){t.slideTo(t.activeIndex);return}if(t.swipeDirection==="next"){if(m>=n.longSwipesRatio)t.slideTo(n.rewind&&t.isEnd?p:d+y);else t.slideTo(d)}if(t.swipeDirection==="prev"){if(m>1-n.longSwipesRatio){t.slideTo(d+y)}else if(v!==null&&m<0&&Math.abs(m)>n.longSwipesRatio){t.slideTo(v)}else{t.slideTo(d)}}}else{if(!n.shortSwipes){t.slideTo(t.activeIndex);return}const e=t.navigation&&(u.target===t.navigation.nextEl||u.target===t.navigation.prevEl);if(!e){if(t.swipeDirection==="next"){t.slideTo(p!==null?p:d+y)}if(t.swipeDirection==="prev"){t.slideTo(v!==null?v:d)}}else if(u.target===t.navigation.nextEl){t.slideTo(d+y)}else{t.slideTo(d)}}}function ar(){const e=this;const{params:t,el:r}=e;if(r&&r.offsetWidth===0)return;if(t.breakpoints){e.setBreakpoint()}const{allowSlideNext:n,allowSlidePrev:i,snapGrid:o}=e;e.allowSlideNext=true;e.allowSlidePrev=true;e.updateSize();e.updateSlides();e.updateSlidesClasses();if((t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides){e.slideTo(e.slides.length-1,0,false,true)}else{e.slideTo(e.activeIndex,0,false,true)}if(e.autoplay&&e.autoplay.running&&e.autoplay.paused){e.autoplay.run()}e.allowSlidePrev=i;e.allowSlideNext=n;if(e.params.watchOverflow&&o!==e.snapGrid){e.checkOverflow()}}function sr(e){const t=this;if(!t.enabled)return;if(!t.allowClick){if(t.params.preventClicks)e.preventDefault();if(t.params.preventClicksPropagation&&t.animating){e.stopPropagation();e.stopImmediatePropagation()}}}function ur(){const e=this;const{wrapperEl:t,rtlTranslate:r,enabled:n}=e;if(!n)return;e.previousTranslate=e.translate;if(e.isHorizontal()){e.translate=-t.scrollLeft}else{e.translate=-t.scrollTop}if(e.translate===0)e.translate=0;e.updateActiveIndex();e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();if(o===0){i=0}else{i=(e.translate-e.minTranslate())/o}if(i!==e.progress){e.updateProgress(r?-e.translate:e.translate)}e.emit("setTranslate",e.translate,false)}let cr=false;function lr(){}const fr=(e,t)=>{const r=a();const{params:n,touchEvents:i,el:o,wrapperEl:s,device:u,support:c}=e;const l=!!n.nested;const f=t==="on"?"addEventListener":"removeEventListener";const d=t;if(!c.touch){o[f](i.start,e.onTouchStart,false);r[f](i.move,e.onTouchMove,l);r[f](i.end,e.onTouchEnd,false)}else{const t=i.start==="touchstart"&&c.passiveListener&&n.passiveListeners?{passive:true,capture:false}:false;o[f](i.start,e.onTouchStart,t);o[f](i.move,e.onTouchMove,c.passiveListener?{passive:false,capture:l}:l);o[f](i.end,e.onTouchEnd,t);if(i.cancel){o[f](i.cancel,e.onTouchEnd,t)}}if(n.preventClicks||n.preventClicksPropagation){o[f]("click",e.onClick,true)}if(n.cssMode){s[f]("scroll",e.onScroll)}if(n.updateOnWindowResize){e[d](u.ios||u.android?"resize orientationchange observerUpdate":"resize observerUpdate",ar,true)}else{e[d]("observerUpdate",ar,true)}};function dr(){const e=this;const t=a();const{params:r,support:n}=e;e.onTouchStart=nr.bind(e);e.onTouchMove=ir.bind(e);e.onTouchEnd=or.bind(e);if(r.cssMode){e.onScroll=ur.bind(e)}e.onClick=sr.bind(e);if(n.touch&&!cr){t.addEventListener("touchstart",lr);cr=true}fr(e,"on")}function hr(){const e=this;fr(e,"off")}const pr={attachEvents:dr,detachEvents:hr};const vr=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function mr(){const e=this;const{activeIndex:t,initialized:r,loopedSlides:n=0,params:i,$el:o}=e;const a=i.breakpoints;if(!a||a&&Object.keys(a).length===0)return;const s=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const u=s in a?a[s]:undefined;const c=u||e.originalParams;const l=vr(e,i);const f=vr(e,c);const d=i.enabled;if(l&&!f){o.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`);e.emitContainerClasses()}else if(!l&&f){o.addClass(`${i.containerModifierClass}grid`);if(c.grid.fill&&c.grid.fill==="column"||!c.grid.fill&&i.grid.fill==="column"){o.addClass(`${i.containerModifierClass}grid-column`)}e.emitContainerClasses()}["navigation","pagination","scrollbar"].forEach((t=>{const r=i[t]&&i[t].enabled;const n=c[t]&&c[t].enabled;if(r&&!n){e[t].disable()}if(!r&&n){e[t].enable()}}));const h=c.direction&&c.direction!==i.direction;const p=i.loop&&(c.slidesPerView!==i.slidesPerView||h);if(h&&r){e.changeDirection()}ot(e.params,c);const v=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev});if(d&&!v){e.disable()}else if(!d&&v){e.enable()}e.currentBreakpoint=s;e.emit("_beforeBreakpoint",c);if(p&&r){e.loopDestroy();e.loopCreate();e.updateSlides();e.slideTo(t-n+e.loopedSlides,0,false)}e.emit("breakpoint",c)}function yr(e,t="window",r){if(!e||t==="container"&&!r)return undefined;let n=false;const i=u();const o=t==="window"?i.innerHeight:r.clientHeight;const a=Object.keys(e).map((e=>{if(typeof e==="string"&&e.indexOf("@")===0){const t=parseFloat(e.substr(1));const r=o*t;return{value:r,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<a.length;e+=1){const{point:o,value:s}=a[e];if(t==="window"){if(i.matchMedia(`(min-width: ${s}px)`).matches){n=o}}else if(s<=r.clientWidth){n=o}}return n||"max"}const gr={setBreakpoint:mr,getBreakpoint:yr};function br(e,t){const r=[];e.forEach((e=>{if(typeof e==="object"){Object.keys(e).forEach((n=>{if(e[n]){r.push(t+n)}}))}else if(typeof e==="string"){r.push(t+e)}}));return r}function _r(){const e=this;const{classNames:t,params:r,rtl:n,$el:i,device:o,support:a}=e;const s=br(["initialized",r.direction,{"pointer-events":!a.touch},{"free-mode":e.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:n},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&r.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],r.containerModifierClass);t.push(...s);i.addClass([...t].join(" "));e.emitContainerClasses()}function Sr(){const e=this;const{$el:t,classNames:r}=e;t.removeClass(r.join(" "));e.emitContainerClasses()}const Er={addClasses:_r,removeClasses:Sr};function wr(e,t,r,n,i,o){const a=u();let s;function c(){if(o)o()}const l=Qe(e).parent("picture")[0];if(!l&&(!e.complete||!i)){if(t){s=new a.Image;s.onload=c;s.onerror=c;if(n){s.sizes=n}if(r){s.srcset=r}if(t){s.src=t}}else{c()}}else{c()}}function Tr(){const e=this;e.imagesToLoad=e.$el.find("img");function t(){if(typeof e==="undefined"||e===null||!e||e.destroyed)return;if(e.imagesLoaded!==undefined)e.imagesLoaded+=1;if(e.imagesLoaded===e.imagesToLoad.length){if(e.params.updateOnImagesReady)e.update();e.emit("imagesReady")}}for(let r=0;r<e.imagesToLoad.length;r+=1){const n=e.imagesToLoad[r];e.loadImage(n,n.currentSrc||n.getAttribute("src"),n.srcset||n.getAttribute("srcset"),n.sizes||n.getAttribute("sizes"),true,t)}}const Ir={loadImage:wr,preloadImages:Tr};function Rr(){const e=this;const{isLocked:t,params:r}=e;const{slidesOffsetBefore:n}=r;if(n){const t=e.slides.length-1;const r=e.slidesGrid[t]+e.slidesSizesGrid[t]+n*2;e.isLocked=e.size>r}else{e.isLocked=e.snapGrid.length===1}if(r.allowSlideNext===true){e.allowSlideNext=!e.isLocked}if(r.allowSlidePrev===true){e.allowSlidePrev=!e.isLocked}if(t&&t!==e.isLocked){e.isEnd=false}if(t!==e.isLocked){e.emit(e.isLocked?"lock":"unlock")}}const Cr={checkOverflow:Rr};const kr={init:true,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:false,updateOnWindowResize:true,resizeObserver:true,nested:false,createElements:false,enabled:true,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:false,userAgent:null,url:null,edgeSwipeDetection:false,edgeSwipeThreshold:20,autoHeight:false,setWrapperSize:false,virtualTranslate:false,effect:"slide",breakpoints:undefined,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:false,centeredSlides:false,centeredSlidesBounds:false,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:true,centerInsufficientSlides:false,watchOverflow:true,roundLengths:false,touchRatio:1,touchAngle:45,simulateTouch:true,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,allowTouchMove:true,threshold:0,touchMoveStopPropagation:false,touchStartPreventDefault:true,touchStartForcePreventDefault:false,touchReleaseOnEdges:false,uniqueNavElements:true,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,grabCursor:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,preloadImages:true,updateOnImagesReady:true,loop:false,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:true,loopFillGroupWithBlank:false,loopPreventsSlide:true,rewind:false,allowSlidePrev:true,allowSlideNext:true,swipeHandler:null,noSwiping:true,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:true,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:true,_emitClasses:false};function Ar(e,t){return function r(n={}){const i=Object.keys(n)[0];const o=n[i];if(typeof o!=="object"||o===null){ot(t,n);return}if(["navigation","pagination","scrollbar"].indexOf(i)>=0&&e[i]===true){e[i]={auto:true}}if(!(i in e&&"enabled"in o)){ot(t,n);return}if(e[i]===true){e[i]={enabled:true}}if(typeof e[i]==="object"&&!("enabled"in e[i])){e[i].enabled=true}if(!e[i])e[i]={enabled:false};ot(t,n)}}const Or={eventsEmitter:bt,update:At,translate:Nt,transition:Wt,slide:Kt,loop:qt,grabCursor:tr,events:pr,breakpoints:gr,checkOverflow:Cr,classes:Er,images:Ir};const Pr={};class xr{constructor(...e){let t;let r;if(e.length===1&&e[0].constructor&&Object.prototype.toString.call(e[0]).slice(8,-1)==="Object"){r=e[0]}else{[t,r]=e}if(!r)r={};r=ot({},r);if(t&&!r.el)r.el=t;if(r.el&&Qe(r.el).length>1){const e=[];Qe(r.el).each((t=>{const n=ot({},r,{el:t});e.push(new xr(n))}));return e}const n=this;n.__swiper__=true;n.support=lt();n.device=ht({userAgent:r.userAgent});n.browser=mt();n.eventsListeners={};n.eventsAnyListeners=[];n.modules=[...n.__modules__];if(r.modules&&Array.isArray(r.modules)){n.modules.push(...r.modules)}const i={};n.modules.forEach((e=>{e({swiper:n,extendParams:Ar(r,i),on:n.on.bind(n),once:n.once.bind(n),off:n.off.bind(n),emit:n.emit.bind(n)})}));const o=ot({},kr,i);n.params=ot({},o,Pr,r);n.originalParams=ot({},n.params);n.passedParams=ot({},r);if(n.params&&n.params.on){Object.keys(n.params.on).forEach((e=>{n.on(e,n.params.on[e])}))}if(n.params&&n.params.onAny){n.onAny(n.params.onAny)}n.$=Qe;Object.assign(n,{enabled:n.params.enabled,el:t,classNames:[],slides:Qe(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return n.params.direction==="horizontal"},isVertical(){return n.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:true,isEnd:false,translate:0,previousTranslate:0,progress:0,velocity:0,animating:false,allowSlideNext:n.params.allowSlideNext,allowSlidePrev:n.params.allowSlidePrev,touchEvents:function e(){const t=["touchstart","touchmove","touchend","touchcancel"];const r=["pointerdown","pointermove","pointerup"];n.touchEventsTouch={start:t[0],move:t[1],end:t[2],cancel:t[3]};n.touchEventsDesktop={start:r[0],move:r[1],end:r[2]};return n.support.touch||!n.params.simulateTouch?n.touchEventsTouch:n.touchEventsDesktop}(),touchEventsData:{isTouched:undefined,isMoved:undefined,allowTouchCallbacks:undefined,touchStartTime:undefined,isScrolling:undefined,currentTranslate:undefined,startTranslate:undefined,allowThresholdMove:undefined,focusableElements:n.params.focusableElements,lastClickTime:et(),clickTimeout:undefined,velocities:[],allowMomentumBounce:undefined,isTouchEvent:undefined,startMoving:undefined},allowClick:true,allowTouchMove:n.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0});n.emit("_swiper");if(n.params.init){n.init()}return n}enable(){const e=this;if(e.enabled)return;e.enabled=true;if(e.params.grabCursor){e.setGrabCursor()}e.emit("enable")}disable(){const e=this;if(!e.enabled)return;e.enabled=false;if(e.params.grabCursor){e.unsetGrabCursor()}e.emit("disable")}setProgress(e,t){const r=this;e=Math.min(Math.max(e,0),1);const n=r.minTranslate();const i=r.maxTranslate();const o=(i-n)*e+n;r.translateTo(o,typeof t==="undefined"?0:t);r.updateActiveIndex();r.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>t.indexOf("swiper")===0||t.indexOf(e.params.containerModifierClass)===0));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;if(t.destroyed)return"";return e.className.split(" ").filter((e=>e.indexOf("swiper-slide")===0||e.indexOf(t.params.slideClass)===0)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each((r=>{const n=e.getSlideClasses(r);t.push({slideEl:r,classNames:n});e.emit("_slideClass",r,n)}));e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=false){const r=this;const{params:n,slides:i,slidesGrid:o,slidesSizesGrid:a,size:s,activeIndex:u}=r;let c=1;if(n.centeredSlides){let e=i[u].swiperSlideSize;let t;for(let r=u+1;r<i.length;r+=1){if(i[r]&&!t){e+=i[r].swiperSlideSize;c+=1;if(e>s)t=true}}for(let r=u-1;r>=0;r-=1){if(i[r]&&!t){e+=i[r].swiperSlideSize;c+=1;if(e>s)t=true}}}else{if(e==="current"){for(let e=u+1;e<i.length;e+=1){const r=t?o[e]+a[e]-o[u]<s:o[e]-o[u]<s;if(r){c+=1}}}else{for(let e=u-1;e>=0;e-=1){const t=o[u]-o[e]<s;if(t){c+=1}}}}return c}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:r}=e;if(r.breakpoints){e.setBreakpoint()}e.updateSize();e.updateSlides();e.updateProgress();e.updateSlidesClasses();function n(){const t=e.rtlTranslate?e.translate*-1:e.translate;const r=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(r);e.updateActiveIndex();e.updateSlidesClasses()}let i;if(e.params.freeMode&&e.params.freeMode.enabled){n();if(e.params.autoHeight){e.updateAutoHeight()}}else{if((e.params.slidesPerView==="auto"||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides){i=e.slideTo(e.slides.length-1,0,false,true)}else{i=e.slideTo(e.activeIndex,0,false,true)}if(!i){n()}}if(r.watchOverflow&&t!==e.snapGrid){e.checkOverflow()}e.emit("update")}changeDirection(e,t=true){const r=this;const n=r.params.direction;if(!e){e=n==="horizontal"?"vertical":"horizontal"}if(e===n||e!=="horizontal"&&e!=="vertical"){return r}r.$el.removeClass(`${r.params.containerModifierClass}${n}`).addClass(`${r.params.containerModifierClass}${e}`);r.emitContainerClasses();r.params.direction=e;r.slides.each((t=>{if(e==="vertical"){t.style.width=""}else{t.style.height=""}}));r.emit("changeDirection");if(t)r.update();return r}changeLanguageDirection(e){const t=this;if(t.rtl&&e==="rtl"||!t.rtl&&e==="ltr")return;t.rtl=e==="rtl";t.rtlTranslate=t.params.direction==="horizontal"&&t.rtl;if(t.rtl){t.$el.addClass(`${t.params.containerModifierClass}rtl`);t.el.dir="rtl"}else{t.$el.removeClass(`${t.params.containerModifierClass}rtl`);t.el.dir="ltr"}t.update()}mount(e){const t=this;if(t.mounted)return true;const r=Qe(e||t.params.el);e=r[0];if(!e){return false}e.swiper=t;const n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;const i=()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=Qe(e.shadowRoot.querySelector(n()));t.children=e=>r.children(e);return t}if(!r.children){return Qe(r).children(n())}return r.children(n())};let o=i();if(o.length===0&&t.params.createElements){const e=a();const n=e.createElement("div");o=Qe(n);n.className=t.params.wrapperClass;r.append(n);r.children(`.${t.params.slideClass}`).each((e=>{o.append(e)}))}Object.assign(t,{$el:r,el:e,$wrapperEl:o,wrapperEl:o[0],mounted:true,rtl:e.dir.toLowerCase()==="rtl"||r.css("direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(e.dir.toLowerCase()==="rtl"||r.css("direction")==="rtl"),wrongRTL:o.css("display")==="-webkit-box"});return true}init(e){const t=this;if(t.initialized)return t;const r=t.mount(e);if(r===false)return t;t.emit("beforeInit");if(t.params.breakpoints){t.setBreakpoint()}t.addClasses();if(t.params.loop){t.loopCreate()}t.updateSize();t.updateSlides();if(t.params.watchOverflow){t.checkOverflow()}if(t.params.grabCursor&&t.enabled){t.setGrabCursor()}if(t.params.preloadImages){t.preloadImages()}if(t.params.loop){t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,false,true)}else{t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,false,true)}t.attachEvents();t.initialized=true;t.emit("init");t.emit("afterInit");return t}destroy(e=true,t=true){const r=this;const{params:n,$el:i,$wrapperEl:o,slides:a}=r;if(typeof r.params==="undefined"||r.destroyed){return null}r.emit("beforeDestroy");r.initialized=false;r.detachEvents();if(n.loop){r.loopDestroy()}if(t){r.removeClasses();i.removeAttr("style");o.removeAttr("style");if(a&&a.length){a.removeClass([n.slideVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")}}r.emit("destroy");Object.keys(r.eventsListeners).forEach((e=>{r.off(e)}));if(e!==false){r.$el[0].swiper=null;qe(r)}r.destroyed=true;return null}static extendDefaults(e){ot(Pr,e)}static get extendedDefaults(){return Pr}static get defaults(){return kr}static installModule(e){if(!xr.prototype.__modules__)xr.prototype.__modules__=[];const t=xr.prototype.__modules__;if(typeof e==="function"&&t.indexOf(e)<0){t.push(e)}}static use(e){if(Array.isArray(e)){e.forEach((e=>xr.installModule(e)));return xr}xr.installModule(e);return xr}}Object.keys(Or).forEach((e=>{Object.keys(Or[e]).forEach((t=>{xr.prototype[t]=Or[e][t]}))}));xr.use([yt,gt]);const Lr=xr;function Mr({swiper:e,extendParams:t,on:r,emit:n}){t({virtual:{enabled:false,slides:[],cache:true,renderSlide:null,renderExternal:null,renderExternalUpdate:true,addSlidesBefore:0,addSlidesAfter:0}});let i;e.virtual={cache:{},from:undefined,to:undefined,slides:[],offset:0,slidesGrid:[]};function o(t,r){const n=e.params.virtual;if(n.cache&&e.virtual.cache[r]){return e.virtual.cache[r]}const i=n.renderSlide?Qe(n.renderSlide.call(e,t,r)):Qe(`<div class="${e.params.slideClass}" data-swiper-slide-index="${r}">${t}</div>`);if(!i.attr("data-swiper-slide-index"))i.attr("data-swiper-slide-index",r);if(n.cache)e.virtual.cache[r]=i;return i}function a(t){const{slidesPerView:r,slidesPerGroup:i,centeredSlides:a}=e.params;const{addSlidesBefore:s,addSlidesAfter:u}=e.params.virtual;const{from:c,to:l,slides:f,slidesGrid:d,offset:h}=e.virtual;if(!e.params.cssMode){e.updateActiveIndex()}const p=e.activeIndex||0;let v;if(e.rtlTranslate)v="right";else v=e.isHorizontal()?"left":"top";let m;let y;if(a){m=Math.floor(r/2)+i+u;y=Math.floor(r/2)+i+s}else{m=r+(i-1)+u;y=i+s}const g=Math.max((p||0)-y,0);const b=Math.min((p||0)+m,f.length-1);const _=(e.slidesGrid[g]||0)-(e.slidesGrid[0]||0);Object.assign(e.virtual,{from:g,to:b,offset:_,slidesGrid:e.slidesGrid});function S(){e.updateSlides();e.updateProgress();e.updateSlidesClasses();if(e.lazy&&e.params.lazy.enabled){e.lazy.load()}n("virtualUpdate")}if(c===g&&l===b&&!t){if(e.slidesGrid!==d&&_!==h){e.slides.css(v,`${_}px`)}e.updateProgress();n("virtualUpdate");return}if(e.params.virtual.renderExternal){e.params.virtual.renderExternal.call(e,{offset:_,from:g,to:b,slides:function e(){const t=[];for(let e=g;e<=b;e+=1){t.push(f[e])}return t}()});if(e.params.virtual.renderExternalUpdate){S()}else{n("virtualUpdate")}return}const E=[];const w=[];if(t){e.$wrapperEl.find(`.${e.params.slideClass}`).remove()}else{for(let t=c;t<=l;t+=1){if(t<g||t>b){e.$wrapperEl.find(`.${e.params.slideClass}[data-swiper-slide-index="${t}"]`).remove()}}}for(let e=0;e<f.length;e+=1){if(e>=g&&e<=b){if(typeof l==="undefined"||t){w.push(e)}else{if(e>l)w.push(e);if(e<c)E.push(e)}}}w.forEach((t=>{e.$wrapperEl.append(o(f[t],t))}));E.sort(((e,t)=>t-e)).forEach((t=>{e.$wrapperEl.prepend(o(f[t],t))}));e.$wrapperEl.children(".swiper-slide").css(v,`${_}px`);S()}function s(t){if(typeof t==="object"&&"length"in t){for(let r=0;r<t.length;r+=1){if(t[r])e.virtual.slides.push(t[r])}}else{e.virtual.slides.push(t)}a(true)}function u(t){const r=e.activeIndex;let n=r+1;let i=1;if(Array.isArray(t)){for(let r=0;r<t.length;r+=1){if(t[r])e.virtual.slides.unshift(t[r])}n=r+t.length;i=t.length}else{e.virtual.slides.unshift(t)}if(e.params.virtual.cache){const t=e.virtual.cache;const r={};Object.keys(t).forEach((e=>{const n=t[e];const o=n.attr("data-swiper-slide-index");if(o){n.attr("data-swiper-slide-index",parseInt(o,10)+i)}r[parseInt(e,10)+i]=n}));e.virtual.cache=r}a(true);e.slideTo(n,0)}function c(t){if(typeof t==="undefined"||t===null)return;let r=e.activeIndex;if(Array.isArray(t)){for(let n=t.length-1;n>=0;n-=1){e.virtual.slides.splice(t[n],1);if(e.params.virtual.cache){delete e.virtual.cache[t[n]]}if(t[n]<r)r-=1;r=Math.max(r,0)}}else{e.virtual.slides.splice(t,1);if(e.params.virtual.cache){delete e.virtual.cache[t]}if(t<r)r-=1;r=Math.max(r,0)}a(true);e.slideTo(r,0)}function l(){e.virtual.slides=[];if(e.params.virtual.cache){e.virtual.cache={}}a(true);e.slideTo(0,0)}r("beforeInit",(()=>{if(!e.params.virtual.enabled)return;e.virtual.slides=e.params.virtual.slides;e.classNames.push(`${e.params.containerModifierClass}virtual`);e.params.watchSlidesProgress=true;e.originalParams.watchSlidesProgress=true;if(!e.params.initialSlide){a()}}));r("setTranslate",(()=>{if(!e.params.virtual.enabled)return;if(e.params.cssMode&&!e._immediateVirtual){clearTimeout(i);i=setTimeout((()=>{a()}),100)}else{a()}}));r("init update resize",(()=>{if(!e.params.virtual.enabled)return;if(e.params.cssMode){at(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)}}));Object.assign(e.virtual,{appendSlide:s,prependSlide:u,removeSlide:c,removeAllSlides:l,update:a})}function Nr({swiper:e,extendParams:t,on:r,emit:n}){const i=a();const o=u();e.keyboard={enabled:false};t({keyboard:{enabled:false,onlyInViewport:true,pageUpDown:true}});function s(t){if(!e.enabled)return;const{rtlTranslate:r}=e;let a=t;if(a.originalEvent)a=a.originalEvent;const s=a.keyCode||a.charCode;const u=e.params.keyboard.pageUpDown;const c=u&&s===33;const l=u&&s===34;const f=s===37;const d=s===39;const h=s===38;const p=s===40;if(!e.allowSlideNext&&(e.isHorizontal()&&d||e.isVertical()&&p||l)){return false}if(!e.allowSlidePrev&&(e.isHorizontal()&&f||e.isVertical()&&h||c)){return false}if(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey){return undefined}if(i.activeElement&&i.activeElement.nodeName&&(i.activeElement.nodeName.toLowerCase()==="input"||i.activeElement.nodeName.toLowerCase()==="textarea")){return undefined}if(e.params.keyboard.onlyInViewport&&(c||l||f||d||h||p)){let t=false;if(e.$el.parents(`.${e.params.slideClass}`).length>0&&e.$el.parents(`.${e.params.slideActiveClass}`).length===0){return undefined}const n=e.$el;const i=n[0].clientWidth;const a=n[0].clientHeight;const s=o.innerWidth;const u=o.innerHeight;const c=e.$el.offset();if(r)c.left-=e.$el[0].scrollLeft;const l=[[c.left,c.top],[c.left+i,c.top],[c.left,c.top+a],[c.left+i,c.top+a]];for(let e=0;e<l.length;e+=1){const r=l[e];if(r[0]>=0&&r[0]<=s&&r[1]>=0&&r[1]<=u){if(r[0]===0&&r[1]===0)continue;t=true}}if(!t)return undefined}if(e.isHorizontal()){if(c||l||f||d){if(a.preventDefault)a.preventDefault();else a.returnValue=false}if((l||d)&&!r||(c||f)&&r)e.slideNext();if((c||f)&&!r||(l||d)&&r)e.slidePrev()}else{if(c||l||h||p){if(a.preventDefault)a.preventDefault();else a.returnValue=false}if(l||p)e.slideNext();if(c||h)e.slidePrev()}n("keyPress",s);return undefined}function c(){if(e.keyboard.enabled)return;Qe(i).on("keydown",s);e.keyboard.enabled=true}function l(){if(!e.keyboard.enabled)return;Qe(i).off("keydown",s);e.keyboard.enabled=false}r("init",(()=>{if(e.params.keyboard.enabled){c()}}));r("destroy",(()=>{if(e.keyboard.enabled){l()}}));Object.assign(e.keyboard,{enable:c,disable:l})}function Dr({swiper:e,extendParams:t,on:r,emit:n}){const i=u();t({mousewheel:{enabled:false,releaseOnEdges:false,invert:false,forceToAxis:false,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}});e.mousewheel={enabled:false};let o;let a=et();let s;const c=[];function l(e){const t=10;const r=40;const n=800;let i=0;let o=0;let a=0;let s=0;if("detail"in e){o=e.detail}if("wheelDelta"in e){o=-e.wheelDelta/120}if("wheelDeltaY"in e){o=-e.wheelDeltaY/120}if("wheelDeltaX"in e){i=-e.wheelDeltaX/120}if("axis"in e&&e.axis===e.HORIZONTAL_AXIS){i=o;o=0}a=i*t;s=o*t;if("deltaY"in e){s=e.deltaY}if("deltaX"in e){a=e.deltaX}if(e.shiftKey&&!a){a=s;s=0}if((a||s)&&e.deltaMode){if(e.deltaMode===1){a*=r;s*=r}else{a*=n;s*=n}}if(a&&!i){i=a<1?-1:1}if(s&&!o){o=s<1?-1:1}return{spinX:i,spinY:o,pixelX:a,pixelY:s}}function f(){if(!e.enabled)return;e.mouseEntered=true}function d(){if(!e.enabled)return;e.mouseEntered=false}function h(t){if(e.params.mousewheel.thresholdDelta&&t.delta<e.params.mousewheel.thresholdDelta){return false}if(e.params.mousewheel.thresholdTime&&et()-a<e.params.mousewheel.thresholdTime){return false}if(t.delta>=6&&et()-a<60){return true}if(t.direction<0){if((!e.isEnd||e.params.loop)&&!e.animating){e.slideNext();n("scroll",t.raw)}}else if((!e.isBeginning||e.params.loop)&&!e.animating){e.slidePrev();n("scroll",t.raw)}a=(new i.Date).getTime();return false}function p(t){const r=e.params.mousewheel;if(t.direction<0){if(e.isEnd&&!e.params.loop&&r.releaseOnEdges){return true}}else if(e.isBeginning&&!e.params.loop&&r.releaseOnEdges){return true}return false}function v(t){let r=t;let i=true;if(!e.enabled)return;const a=e.params.mousewheel;if(e.params.cssMode){r.preventDefault()}let u=e.$el;if(e.params.mousewheel.eventsTarget!=="container"){u=Qe(e.params.mousewheel.eventsTarget)}if(!e.mouseEntered&&!u[0].contains(r.target)&&!a.releaseOnEdges)return true;if(r.originalEvent)r=r.originalEvent;let f=0;const d=e.rtlTranslate?-1:1;const v=l(r);if(a.forceToAxis){if(e.isHorizontal()){if(Math.abs(v.pixelX)>Math.abs(v.pixelY))f=-v.pixelX*d;else return true}else if(Math.abs(v.pixelY)>Math.abs(v.pixelX))f=-v.pixelY;else return true}else{f=Math.abs(v.pixelX)>Math.abs(v.pixelY)?-v.pixelX*d:-v.pixelY}if(f===0)return true;if(a.invert)f=-f;let m=e.getTranslate()+f*a.sensitivity;if(m>=e.minTranslate())m=e.minTranslate();if(m<=e.maxTranslate())m=e.maxTranslate();i=e.params.loop?true:!(m===e.minTranslate()||m===e.maxTranslate());if(i&&e.params.nested)r.stopPropagation();if(!e.params.freeMode||!e.params.freeMode.enabled){const e={time:et(),delta:Math.abs(f),direction:Math.sign(f),raw:t};if(c.length>=2){c.shift()}const r=c.length?c[c.length-1]:undefined;c.push(e);if(r){if(e.direction!==r.direction||e.delta>r.delta||e.time>r.time+150){h(e)}}else{h(e)}if(p(e)){return true}}else{const t={time:et(),delta:Math.abs(f),direction:Math.sign(f)};const i=s&&t.time<s.time+500&&t.delta<=s.delta&&t.direction===s.direction;if(!i){s=undefined;if(e.params.loop){e.loopFix()}let u=e.getTranslate()+f*a.sensitivity;const l=e.isBeginning;const d=e.isEnd;if(u>=e.minTranslate())u=e.minTranslate();if(u<=e.maxTranslate())u=e.maxTranslate();e.setTransition(0);e.setTranslate(u);e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses();if(!l&&e.isBeginning||!d&&e.isEnd){e.updateSlidesClasses()}if(e.params.freeMode.sticky){clearTimeout(o);o=undefined;if(c.length>=15){c.shift()}const r=c.length?c[c.length-1]:undefined;const n=c[0];c.push(t);if(r&&(t.delta>r.delta||t.direction!==r.direction)){c.splice(0)}else if(c.length>=15&&t.time-n.time<500&&n.delta-t.delta>=1&&t.delta<=6){const r=f>0?.8:.2;s=t;c.splice(0);o=$e((()=>{e.slideToClosest(e.params.speed,true,undefined,r)}),0)}if(!o){o=$e((()=>{const r=.5;s=t;c.splice(0);e.slideToClosest(e.params.speed,true,undefined,r)}),500)}}if(!i)n("scroll",r);if(e.params.autoplay&&e.params.autoplayDisableOnInteraction)e.autoplay.stop();if(u===e.minTranslate()||u===e.maxTranslate())return true}}if(r.preventDefault)r.preventDefault();else r.returnValue=false;return false}function m(t){let r=e.$el;if(e.params.mousewheel.eventsTarget!=="container"){r=Qe(e.params.mousewheel.eventsTarget)}r[t]("mouseenter",f);r[t]("mouseleave",d);r[t]("wheel",v)}function y(){if(e.params.cssMode){e.wrapperEl.removeEventListener("wheel",v);return true}if(e.mousewheel.enabled)return false;m("on");e.mousewheel.enabled=true;return true}function g(){if(e.params.cssMode){e.wrapperEl.addEventListener(event,v);return true}if(!e.mousewheel.enabled)return false;m("off");e.mousewheel.enabled=false;return true}r("init",(()=>{if(!e.params.mousewheel.enabled&&e.params.cssMode){g()}if(e.params.mousewheel.enabled)y()}));r("destroy",(()=>{if(e.params.cssMode){y()}if(e.mousewheel.enabled)g()}));Object.assign(e.mousewheel,{enable:y,disable:g})}function jr(e,t,r,n){const i=a();if(e.params.createElements){Object.keys(n).forEach((o=>{if(!r[o]&&r.auto===true){let a=e.$el.children(`.${n[o]}`)[0];if(!a){a=i.createElement("div");a.className=n[o];e.$el.append(a)}r[o]=a;t[o]=a}}))}return r}function Ur({swiper:e,extendParams:t,on:r,emit:n}){t({navigation:{nextEl:null,prevEl:null,hideOnClick:false,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}});e.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null};function i(t){let r;if(t){r=Qe(t);if(e.params.uniqueNavElements&&typeof t==="string"&&r.length>1&&e.$el.find(t).length===1){r=e.$el.find(t)}}return r}function o(t,r){const n=e.params.navigation;if(t&&t.length>0){t[r?"addClass":"removeClass"](n.disabledClass);if(t[0]&&t[0].tagName==="BUTTON")t[0].disabled=r;if(e.params.watchOverflow&&e.enabled){t[e.isLocked?"addClass":"removeClass"](n.lockClass)}}}function a(){if(e.params.loop)return;const{$nextEl:t,$prevEl:r}=e.navigation;o(r,e.isBeginning&&!e.params.rewind);o(t,e.isEnd&&!e.params.rewind)}function s(t){t.preventDefault();if(e.isBeginning&&!e.params.loop&&!e.params.rewind)return;e.slidePrev();n("navigationPrev")}function u(t){t.preventDefault();if(e.isEnd&&!e.params.loop&&!e.params.rewind)return;e.slideNext();n("navigationNext")}function c(){const t=e.params.navigation;e.params.navigation=jr(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"});if(!(t.nextEl||t.prevEl))return;const r=i(t.nextEl);const n=i(t.prevEl);if(r&&r.length>0){r.on("click",u)}if(n&&n.length>0){n.on("click",s)}Object.assign(e.navigation,{$nextEl:r,nextEl:r&&r[0],$prevEl:n,prevEl:n&&n[0]});if(!e.enabled){if(r)r.addClass(t.lockClass);if(n)n.addClass(t.lockClass)}}function l(){const{$nextEl:t,$prevEl:r}=e.navigation;if(t&&t.length){t.off("click",u);t.removeClass(e.params.navigation.disabledClass)}if(r&&r.length){r.off("click",s);r.removeClass(e.params.navigation.disabledClass)}}r("init",(()=>{if(e.params.navigation.enabled===false){d()}else{c();a()}}));r("toEdge fromEdge lock unlock",(()=>{a()}));r("destroy",(()=>{l()}));r("enable disable",(()=>{const{$nextEl:t,$prevEl:r}=e.navigation;if(t){t[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)}if(r){r[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)}}));r("click",((t,r)=>{const{$nextEl:i,$prevEl:o}=e.navigation;const a=r.target;if(e.params.navigation.hideOnClick&&!Qe(a).is(o)&&!Qe(a).is(i)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===a||e.pagination.el.contains(a)))return;let t;if(i){t=i.hasClass(e.params.navigation.hiddenClass)}else if(o){t=o.hasClass(e.params.navigation.hiddenClass)}if(t===true){n("navigationShow")}else{n("navigationHide")}if(i){i.toggleClass(e.params.navigation.hiddenClass)}if(o){o.toggleClass(e.params.navigation.hiddenClass)}}}));const f=()=>{e.$el.removeClass(e.params.navigation.navigationDisabledClass);c();a()};const d=()=>{e.$el.addClass(e.params.navigation.navigationDisabledClass);l()};Object.assign(e.navigation,{enable:f,disable:d,update:a,init:c,destroy:l})}function Vr(e=""){return`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function Wr({swiper:e,extendParams:t,on:r,emit:n}){const i="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:false,hideOnClick:false,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:false,type:"bullets",dynamicBullets:false,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${i}-bullet`,bulletActiveClass:`${i}-bullet-active`,modifierClass:`${i}-`,currentClass:`${i}-current`,totalClass:`${i}-total`,hiddenClass:`${i}-hidden`,progressbarFillClass:`${i}-progressbar-fill`,progressbarOppositeClass:`${i}-progressbar-opposite`,clickableClass:`${i}-clickable`,lockClass:`${i}-lock`,horizontalClass:`${i}-horizontal`,verticalClass:`${i}-vertical`,paginationDisabledClass:`${i}-disabled`}});e.pagination={el:null,$el:null,bullets:[]};let o;let a=0;function s(){return!e.params.pagination.el||!e.pagination.el||!e.pagination.$el||e.pagination.$el.length===0}function u(t,r){const{bulletActiveClass:n}=e.params.pagination;t[r]().addClass(`${n}-${r}`)[r]().addClass(`${n}-${r}-${r}`)}function c(){const t=e.rtl;const r=e.params.pagination;if(s())return;const i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length;const c=e.pagination.$el;let l;const f=e.params.loop?Math.ceil((i-e.loopedSlides*2)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop){l=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup);if(l>i-1-e.loopedSlides*2){l-=i-e.loopedSlides*2}if(l>f-1)l-=f;if(l<0&&e.params.paginationType!=="bullets")l=f+l}else if(typeof e.snapIndex!=="undefined"){l=e.snapIndex}else{l=e.activeIndex||0}if(r.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const n=e.pagination.bullets;let i;let s;let f;if(r.dynamicBullets){o=n.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](true);c.css(e.isHorizontal()?"width":"height",`${o*(r.dynamicMainBullets+4)}px`);if(r.dynamicMainBullets>1&&e.previousIndex!==undefined){a+=l-(e.previousIndex-e.loopedSlides||0);if(a>r.dynamicMainBullets-1){a=r.dynamicMainBullets-1}else if(a<0){a=0}}i=Math.max(l-a,0);s=i+(Math.min(n.length,r.dynamicMainBullets)-1);f=(s+i)/2}n.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${r.bulletActiveClass}${e}`)).join(" "));if(c.length>1){n.each((e=>{const t=Qe(e);const n=t.index();if(n===l){t.addClass(r.bulletActiveClass)}if(r.dynamicBullets){if(n>=i&&n<=s){t.addClass(`${r.bulletActiveClass}-main`)}if(n===i){u(t,"prev")}if(n===s){u(t,"next")}}}))}else{const t=n.eq(l);const o=t.index();t.addClass(r.bulletActiveClass);if(r.dynamicBullets){const t=n.eq(i);const a=n.eq(s);for(let e=i;e<=s;e+=1){n.eq(e).addClass(`${r.bulletActiveClass}-main`)}if(e.params.loop){if(o>=n.length){for(let e=r.dynamicMainBullets;e>=0;e-=1){n.eq(n.length-e).addClass(`${r.bulletActiveClass}-main`)}n.eq(n.length-r.dynamicMainBullets-1).addClass(`${r.bulletActiveClass}-prev`)}else{u(t,"prev");u(a,"next")}}else{u(t,"prev");u(a,"next")}}}if(r.dynamicBullets){const i=Math.min(n.length,r.dynamicMainBullets+4);const a=(o*i-o)/2-f*o;const s=t?"right":"left";n.css(e.isHorizontal()?s:"top",`${a}px`)}}if(r.type==="fraction"){c.find(Vr(r.currentClass)).text(r.formatFractionCurrent(l+1));c.find(Vr(r.totalClass)).text(r.formatFractionTotal(f))}if(r.type==="progressbar"){let t;if(r.progressbarOpposite){t=e.isHorizontal()?"vertical":"horizontal"}else{t=e.isHorizontal()?"horizontal":"vertical"}const n=(l+1)/f;let i=1;let o=1;if(t==="horizontal"){i=n}else{o=n}c.find(Vr(r.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${i}) scaleY(${o})`).transition(e.params.speed)}if(r.type==="custom"&&r.renderCustom){c.html(r.renderCustom(e,l+1,f));n("paginationRender",c[0])}else{n("paginationUpdate",c[0])}if(e.params.watchOverflow&&e.enabled){c[e.isLocked?"addClass":"removeClass"](r.lockClass)}}function l(){const t=e.params.pagination;if(s())return;const r=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length;const i=e.pagination.$el;let o="";if(t.type==="bullets"){let n=e.params.loop?Math.ceil((r-e.loopedSlides*2)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.freeMode&&e.params.freeMode.enabled&&!e.params.loop&&n>r){n=r}for(let r=0;r<n;r+=1){if(t.renderBullet){o+=t.renderBullet.call(e,r,t.bulletClass)}else{o+=`<${t.bulletElement} class="${t.bulletClass}"></${t.bulletElement}>`}}i.html(o);e.pagination.bullets=i.find(Vr(t.bulletClass))}if(t.type==="fraction"){if(t.renderFraction){o=t.renderFraction.call(e,t.currentClass,t.totalClass)}else{o=`<span class="${t.currentClass}"></span>`+" / "+`<span class="${t.totalClass}"></span>`}i.html(o)}if(t.type==="progressbar"){if(t.renderProgressbar){o=t.renderProgressbar.call(e,t.progressbarFillClass)}else{o=`<span class="${t.progressbarFillClass}"></span>`}i.html(o)}if(t.type!=="custom"){n("paginationRender",e.pagination.$el[0])}}function f(){e.params.pagination=jr(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=e.params.pagination;if(!t.el)return;let r=Qe(t.el);if(r.length===0)return;if(e.params.uniqueNavElements&&typeof t.el==="string"&&r.length>1){r=e.$el.find(t.el);if(r.length>1){r=r.filter((t=>{if(Qe(t).parents(".swiper")[0]!==e.el)return false;return true}))}}if(t.type==="bullets"&&t.clickable){r.addClass(t.clickableClass)}r.addClass(t.modifierClass+t.type);r.addClass(e.isHorizontal()?t.horizontalClass:t.verticalClass);if(t.type==="bullets"&&t.dynamicBullets){r.addClass(`${t.modifierClass}${t.type}-dynamic`);a=0;if(t.dynamicMainBullets<1){t.dynamicMainBullets=1}}if(t.type==="progressbar"&&t.progressbarOpposite){r.addClass(t.progressbarOppositeClass)}if(t.clickable){r.on("click",Vr(t.bulletClass),(function t(r){r.preventDefault();let n=Qe(this).index()*e.params.slidesPerGroup;if(e.params.loop)n+=e.loopedSlides;e.slideTo(n)}))}Object.assign(e.pagination,{$el:r,el:r[0]});if(!e.enabled){r.addClass(t.lockClass)}}function d(){const t=e.params.pagination;if(s())return;const r=e.pagination.$el;r.removeClass(t.hiddenClass);r.removeClass(t.modifierClass+t.type);r.removeClass(e.isHorizontal()?t.horizontalClass:t.verticalClass);if(e.pagination.bullets&&e.pagination.bullets.removeClass)e.pagination.bullets.removeClass(t.bulletActiveClass);if(t.clickable){r.off("click",Vr(t.bulletClass))}}r("init",(()=>{if(e.params.pagination.enabled===false){p()}else{f();l();c()}}));r("activeIndexChange",(()=>{if(e.params.loop){c()}else if(typeof e.snapIndex==="undefined"){c()}}));r("snapIndexChange",(()=>{if(!e.params.loop){c()}}));r("slidesLengthChange",(()=>{if(e.params.loop){l();c()}}));r("snapGridLengthChange",(()=>{if(!e.params.loop){l();c()}}));r("destroy",(()=>{d()}));r("enable disable",(()=>{const{$el:t}=e.pagination;if(t){t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)}}));r("lock unlock",(()=>{c()}));r("click",((t,r)=>{const i=r.target;const{$el:o}=e.pagination;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&o&&o.length>0&&!Qe(i).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;const t=o.hasClass(e.params.pagination.hiddenClass);if(t===true){n("paginationShow")}else{n("paginationHide")}o.toggleClass(e.params.pagination.hiddenClass)}}));const h=()=>{e.$el.removeClass(e.params.pagination.paginationDisabledClass);if(e.pagination.$el){e.pagination.$el.removeClass(e.params.pagination.paginationDisabledClass)}f();l();c()};const p=()=>{e.$el.addClass(e.params.pagination.paginationDisabledClass);if(e.pagination.$el){e.pagination.$el.addClass(e.params.pagination.paginationDisabledClass)}d()};Object.assign(e.pagination,{enable:h,disable:p,render:l,update:c,init:f,destroy:d})}function Br({swiper:e,extendParams:t,on:r,emit:n}){const i=a();let o=false;let s=null;let u=null;let c;let l;let f;let d;t({scrollbar:{el:null,dragSize:"auto",hide:false,draggable:false,snapOnRelease:true,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:`swiper-scrollbar-horizontal`,verticalClass:`swiper-scrollbar-vertical`}});e.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null};function h(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t,rtlTranslate:r,progress:n}=e;const{$dragEl:i,$el:o}=t;const a=e.params.scrollbar;let u=l;let c=(f-l)*n;if(r){c=-c;if(c>0){u=l-c;c=0}else if(-c+l>f){u=f+c}}else if(c<0){u=l+c;c=0}else if(c+l>f){u=f-c}if(e.isHorizontal()){i.transform(`translate3d(${c}px, 0, 0)`);i[0].style.width=`${u}px`}else{i.transform(`translate3d(0px, ${c}px, 0)`);i[0].style.height=`${u}px`}if(a.hide){clearTimeout(s);o[0].style.opacity=1;s=setTimeout((()=>{o[0].style.opacity=0;o.transition(400)}),1e3)}}function p(t){if(!e.params.scrollbar.el||!e.scrollbar.el)return;e.scrollbar.$dragEl.transition(t)}function v(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t}=e;const{$dragEl:r,$el:n}=t;r[0].style.width="";r[0].style.height="";f=e.isHorizontal()?n[0].offsetWidth:n[0].offsetHeight;d=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0));if(e.params.scrollbar.dragSize==="auto"){l=f*d}else{l=parseInt(e.params.scrollbar.dragSize,10)}if(e.isHorizontal()){r[0].style.width=`${l}px`}else{r[0].style.height=`${l}px`}if(d>=1){n[0].style.display="none"}else{n[0].style.display=""}if(e.params.scrollbar.hide){n[0].style.opacity=0}if(e.params.watchOverflow&&e.enabled){t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}}function m(t){if(e.isHorizontal()){return t.type==="touchstart"||t.type==="touchmove"?t.targetTouches[0].clientX:t.clientX}return t.type==="touchstart"||t.type==="touchmove"?t.targetTouches[0].clientY:t.clientY}function y(t){const{scrollbar:r,rtlTranslate:n}=e;const{$el:i}=r;let o;o=(m(t)-i.offset()[e.isHorizontal()?"left":"top"]-(c!==null?c:l/2))/(f-l);o=Math.max(Math.min(o,1),0);if(n){o=1-o}const a=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*o;e.updateProgress(a);e.setTranslate(a);e.updateActiveIndex();e.updateSlidesClasses()}function g(t){const r=e.params.scrollbar;const{scrollbar:i,$wrapperEl:a}=e;const{$el:s,$dragEl:l}=i;o=true;c=t.target===l[0]||t.target===l?m(t)-t.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null;t.preventDefault();t.stopPropagation();a.transition(100);l.transition(100);y(t);clearTimeout(u);s.transition(0);if(r.hide){s.css("opacity",1)}if(e.params.cssMode){e.$wrapperEl.css("scroll-snap-type","none")}n("scrollbarDragStart",t)}function b(t){const{scrollbar:r,$wrapperEl:i}=e;const{$el:a,$dragEl:s}=r;if(!o)return;if(t.preventDefault)t.preventDefault();else t.returnValue=false;y(t);i.transition(0);a.transition(0);s.transition(0);n("scrollbarDragMove",t)}function _(t){const r=e.params.scrollbar;const{scrollbar:i,$wrapperEl:a}=e;const{$el:s}=i;if(!o)return;o=false;if(e.params.cssMode){e.$wrapperEl.css("scroll-snap-type","");a.transition("")}if(r.hide){clearTimeout(u);u=$e((()=>{s.css("opacity",0);s.transition(400)}),1e3)}n("scrollbarDragEnd",t);if(r.snapOnRelease){e.slideToClosest()}}function S(t){const{scrollbar:r,touchEventsTouch:n,touchEventsDesktop:o,params:a,support:s}=e;const u=r.$el;if(!u)return;const c=u[0];const l=s.passiveListener&&a.passiveListeners?{passive:false,capture:false}:false;const f=s.passiveListener&&a.passiveListeners?{passive:true,capture:false}:false;if(!c)return;const d=t==="on"?"addEventListener":"removeEventListener";if(!s.touch){c[d](o.start,g,l);i[d](o.move,b,l);i[d](o.end,_,f)}else{c[d](n.start,g,l);c[d](n.move,b,l);c[d](n.end,_,f)}}function E(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;S("on")}function w(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;S("off")}function T(){const{scrollbar:t,$el:r}=e;e.params.scrollbar=jr(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});const n=e.params.scrollbar;if(!n.el)return;let i=Qe(n.el);if(e.params.uniqueNavElements&&typeof n.el==="string"&&i.length>1&&r.find(n.el).length===1){i=r.find(n.el)}i.addClass(e.isHorizontal()?n.horizontalClass:n.verticalClass);let o=i.find(`.${e.params.scrollbar.dragClass}`);if(o.length===0){o=Qe(`<div class="${e.params.scrollbar.dragClass}"></div>`);i.append(o)}Object.assign(t,{$el:i,el:i[0],$dragEl:o,dragEl:o[0]});if(n.draggable){E()}if(i){i[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}}function I(){const t=e.params.scrollbar;const r=e.scrollbar.$el;if(r){r.removeClass(e.isHorizontal()?t.horizontalClass:t.verticalClass)}w()}r("init",(()=>{if(e.params.scrollbar.enabled===false){C()}else{T();v();h()}}));r("update resize observerUpdate lock unlock",(()=>{v()}));r("setTranslate",(()=>{h()}));r("setTransition",((e,t)=>{p(t)}));r("enable disable",(()=>{const{$el:t}=e.scrollbar;if(t){t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}}));r("destroy",(()=>{I()}));const R=()=>{e.$el.removeClass(e.params.scrollbar.scrollbarDisabledClass);if(e.scrollbar.$el){e.scrollbar.$el.removeClass(e.params.scrollbar.scrollbarDisabledClass)}T();v();h()};const C=()=>{e.$el.addClass(e.params.scrollbar.scrollbarDisabledClass);if(e.scrollbar.$el){e.scrollbar.$el.addClass(e.params.scrollbar.scrollbarDisabledClass)}I()};Object.assign(e.scrollbar,{enable:R,disable:C,updateSize:v,setTranslate:h,init:T,destroy:I})}function Gr({swiper:e,extendParams:t,on:r}){t({parallax:{enabled:false}});const n=(t,r)=>{const{rtl:n}=e;const i=Qe(t);const o=n?-1:1;const a=i.attr("data-swiper-parallax")||"0";let s=i.attr("data-swiper-parallax-x");let u=i.attr("data-swiper-parallax-y");const c=i.attr("data-swiper-parallax-scale");const l=i.attr("data-swiper-parallax-opacity");if(s||u){s=s||"0";u=u||"0"}else if(e.isHorizontal()){s=a;u="0"}else{u=a;s="0"}if(s.indexOf("%")>=0){s=`${parseInt(s,10)*r*o}%`}else{s=`${s*r*o}px`}if(u.indexOf("%")>=0){u=`${parseInt(u,10)*r}%`}else{u=`${u*r}px`}if(typeof l!=="undefined"&&l!==null){const e=l-(l-1)*(1-Math.abs(r));i[0].style.opacity=e}if(typeof c==="undefined"||c===null){i.transform(`translate3d(${s}, ${u}, 0px)`)}else{const e=c-(c-1)*(1-Math.abs(r));i.transform(`translate3d(${s}, ${u}, 0px) scale(${e})`)}};const i=()=>{const{$el:t,slides:r,progress:i,snapGrid:o}=e;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e=>{n(e,i)}));r.each(((t,r)=>{let a=t.progress;if(e.params.slidesPerGroup>1&&e.params.slidesPerView!=="auto"){a+=Math.ceil(r/2)-i*(o.length-1)}a=Math.min(Math.max(a,-1),1);Qe(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e=>{n(e,a)}))}))};const o=(t=e.params.speed)=>{const{$el:r}=e;r.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e=>{const r=Qe(e);let n=parseInt(r.attr("data-swiper-parallax-duration"),10)||t;if(t===0)n=0;r.transition(n)}))};r("beforeInit",(()=>{if(!e.params.parallax.enabled)return;e.params.watchSlidesProgress=true;e.originalParams.watchSlidesProgress=true}));r("init",(()=>{if(!e.params.parallax.enabled)return;i()}));r("setTranslate",(()=>{if(!e.params.parallax.enabled)return;i()}));r("setTransition",((t,r)=>{if(!e.params.parallax.enabled)return;o(r)}))}function Zr({swiper:e,extendParams:t,on:r,emit:n}){const i=u();t({zoom:{enabled:false,maxRatio:3,minRatio:1,toggle:true,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}});e.zoom={enabled:false};let o=1;let a=false;let s;let c;let l;const f={$slideEl:undefined,slideWidth:undefined,slideHeight:undefined,$imageEl:undefined,$imageWrapEl:undefined,maxRatio:3};const d={isTouched:undefined,isMoved:undefined,currentX:undefined,currentY:undefined,minX:undefined,minY:undefined,maxX:undefined,maxY:undefined,width:undefined,height:undefined,startX:undefined,startY:undefined,touchesStart:{},touchesCurrent:{}};const h={x:undefined,y:undefined,prevPositionX:undefined,prevPositionY:undefined,prevTime:undefined};let p=1;Object.defineProperty(e.zoom,"scale",{get(){return p},set(e){if(p!==e){const t=f.$imageEl?f.$imageEl[0]:undefined;const r=f.$slideEl?f.$slideEl[0]:undefined;n("zoomChange",e,t,r)}p=e}});function v(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX;const r=e.targetTouches[0].pageY;const n=e.targetTouches[1].pageX;const i=e.targetTouches[1].pageY;const o=Math.sqrt((n-t)**2+(i-r)**2);return o}function m(t){const r=e.support;const n=e.params.zoom;c=false;l=false;if(!r.gestures){if(t.type!=="touchstart"||t.type==="touchstart"&&t.targetTouches.length<2){return}c=true;f.scaleStart=v(t)}if(!f.$slideEl||!f.$slideEl.length){f.$slideEl=Qe(t.target).closest(`.${e.params.slideClass}`);if(f.$slideEl.length===0)f.$slideEl=e.slides.eq(e.activeIndex);f.$imageEl=f.$slideEl.find(`.${n.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0);f.$imageWrapEl=f.$imageEl.parent(`.${n.containerClass}`);f.maxRatio=f.$imageWrapEl.attr("data-swiper-zoom")||n.maxRatio;if(f.$imageWrapEl.length===0){f.$imageEl=undefined;return}}if(f.$imageEl){f.$imageEl.transition(0)}a=true}function y(t){const r=e.support;const n=e.params.zoom;const i=e.zoom;if(!r.gestures){if(t.type!=="touchmove"||t.type==="touchmove"&&t.targetTouches.length<2){return}l=true;f.scaleMove=v(t)}if(!f.$imageEl||f.$imageEl.length===0){if(t.type==="gesturechange")m(t);return}if(r.gestures){i.scale=t.scale*o}else{i.scale=f.scaleMove/f.scaleStart*o}if(i.scale>f.maxRatio){i.scale=f.maxRatio-1+(i.scale-f.maxRatio+1)**.5}if(i.scale<n.minRatio){i.scale=n.minRatio+1-(n.minRatio-i.scale+1)**.5}f.$imageEl.transform(`translate3d(0,0,0) scale(${i.scale})`)}function g(t){const r=e.device;const n=e.support;const i=e.params.zoom;const s=e.zoom;if(!n.gestures){if(!c||!l){return}if(t.type!=="touchend"||t.type==="touchend"&&t.changedTouches.length<2&&!r.android){return}c=false;l=false}if(!f.$imageEl||f.$imageEl.length===0)return;s.scale=Math.max(Math.min(s.scale,f.maxRatio),i.minRatio);f.$imageEl.transition(e.params.speed).transform(`translate3d(0,0,0) scale(${s.scale})`);o=s.scale;a=false;if(s.scale===1)f.$slideEl=undefined}function b(t){const r=e.device;if(!f.$imageEl||f.$imageEl.length===0)return;if(d.isTouched)return;if(r.android&&t.cancelable)t.preventDefault();d.isTouched=true;d.touchesStart.x=t.type==="touchstart"?t.targetTouches[0].pageX:t.pageX;d.touchesStart.y=t.type==="touchstart"?t.targetTouches[0].pageY:t.pageY}function _(t){const r=e.zoom;if(!f.$imageEl||f.$imageEl.length===0)return;e.allowClick=false;if(!d.isTouched||!f.$slideEl)return;if(!d.isMoved){d.width=f.$imageEl[0].offsetWidth;d.height=f.$imageEl[0].offsetHeight;d.startX=rt(f.$imageWrapEl[0],"x")||0;d.startY=rt(f.$imageWrapEl[0],"y")||0;f.slideWidth=f.$slideEl[0].offsetWidth;f.slideHeight=f.$slideEl[0].offsetHeight;f.$imageWrapEl.transition(0)}const n=d.width*r.scale;const i=d.height*r.scale;if(n<f.slideWidth&&i<f.slideHeight)return;d.minX=Math.min(f.slideWidth/2-n/2,0);d.maxX=-d.minX;d.minY=Math.min(f.slideHeight/2-i/2,0);d.maxY=-d.minY;d.touchesCurrent.x=t.type==="touchmove"?t.targetTouches[0].pageX:t.pageX;d.touchesCurrent.y=t.type==="touchmove"?t.targetTouches[0].pageY:t.pageY;if(!d.isMoved&&!a){if(e.isHorizontal()&&(Math.floor(d.minX)===Math.floor(d.startX)&&d.touchesCurrent.x<d.touchesStart.x||Math.floor(d.maxX)===Math.floor(d.startX)&&d.touchesCurrent.x>d.touchesStart.x)){d.isTouched=false;return}if(!e.isHorizontal()&&(Math.floor(d.minY)===Math.floor(d.startY)&&d.touchesCurrent.y<d.touchesStart.y||Math.floor(d.maxY)===Math.floor(d.startY)&&d.touchesCurrent.y>d.touchesStart.y)){d.isTouched=false;return}}if(t.cancelable){t.preventDefault()}t.stopPropagation();d.isMoved=true;d.currentX=d.touchesCurrent.x-d.touchesStart.x+d.startX;d.currentY=d.touchesCurrent.y-d.touchesStart.y+d.startY;if(d.currentX<d.minX){d.currentX=d.minX+1-(d.minX-d.currentX+1)**.8}if(d.currentX>d.maxX){d.currentX=d.maxX-1+(d.currentX-d.maxX+1)**.8}if(d.currentY<d.minY){d.currentY=d.minY+1-(d.minY-d.currentY+1)**.8}if(d.currentY>d.maxY){d.currentY=d.maxY-1+(d.currentY-d.maxY+1)**.8}if(!h.prevPositionX)h.prevPositionX=d.touchesCurrent.x;if(!h.prevPositionY)h.prevPositionY=d.touchesCurrent.y;if(!h.prevTime)h.prevTime=Date.now();h.x=(d.touchesCurrent.x-h.prevPositionX)/(Date.now()-h.prevTime)/2;h.y=(d.touchesCurrent.y-h.prevPositionY)/(Date.now()-h.prevTime)/2;if(Math.abs(d.touchesCurrent.x-h.prevPositionX)<2)h.x=0;if(Math.abs(d.touchesCurrent.y-h.prevPositionY)<2)h.y=0;h.prevPositionX=d.touchesCurrent.x;h.prevPositionY=d.touchesCurrent.y;h.prevTime=Date.now();f.$imageWrapEl.transform(`translate3d(${d.currentX}px, ${d.currentY}px,0)`)}function S(){const t=e.zoom;if(!f.$imageEl||f.$imageEl.length===0)return;if(!d.isTouched||!d.isMoved){d.isTouched=false;d.isMoved=false;return}d.isTouched=false;d.isMoved=false;let r=300;let n=300;const i=h.x*r;const o=d.currentX+i;const a=h.y*n;const s=d.currentY+a;if(h.x!==0)r=Math.abs((o-d.currentX)/h.x);if(h.y!==0)n=Math.abs((s-d.currentY)/h.y);const u=Math.max(r,n);d.currentX=o;d.currentY=s;const c=d.width*t.scale;const l=d.height*t.scale;d.minX=Math.min(f.slideWidth/2-c/2,0);d.maxX=-d.minX;d.minY=Math.min(f.slideHeight/2-l/2,0);d.maxY=-d.minY;d.currentX=Math.max(Math.min(d.currentX,d.maxX),d.minX);d.currentY=Math.max(Math.min(d.currentY,d.maxY),d.minY);f.$imageWrapEl.transition(u).transform(`translate3d(${d.currentX}px, ${d.currentY}px,0)`)}function E(){const t=e.zoom;if(f.$slideEl&&e.previousIndex!==e.activeIndex){if(f.$imageEl){f.$imageEl.transform("translate3d(0,0,0) scale(1)")}if(f.$imageWrapEl){f.$imageWrapEl.transform("translate3d(0,0,0)")}t.scale=1;o=1;f.$slideEl=undefined;f.$imageEl=undefined;f.$imageWrapEl=undefined}}function w(t){const r=e.zoom;const n=e.params.zoom;if(!f.$slideEl){if(t&&t.target){f.$slideEl=Qe(t.target).closest(`.${e.params.slideClass}`)}if(!f.$slideEl){if(e.params.virtual&&e.params.virtual.enabled&&e.virtual){f.$slideEl=e.$wrapperEl.children(`.${e.params.slideActiveClass}`)}else{f.$slideEl=e.slides.eq(e.activeIndex)}}f.$imageEl=f.$slideEl.find(`.${n.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0);f.$imageWrapEl=f.$imageEl.parent(`.${n.containerClass}`)}if(!f.$imageEl||f.$imageEl.length===0||!f.$imageWrapEl||f.$imageWrapEl.length===0)return;if(e.params.cssMode){e.wrapperEl.style.overflow="hidden";e.wrapperEl.style.touchAction="none"}f.$slideEl.addClass(`${n.zoomedSlideClass}`);let a;let s;let u;let c;let l;let h;let p;let v;let m;let y;let g;let b;let _;let S;let E;let w;let T;let I;if(typeof d.touchesStart.x==="undefined"&&t){a=t.type==="touchend"?t.changedTouches[0].pageX:t.pageX;s=t.type==="touchend"?t.changedTouches[0].pageY:t.pageY}else{a=d.touchesStart.x;s=d.touchesStart.y}r.scale=f.$imageWrapEl.attr("data-swiper-zoom")||n.maxRatio;o=f.$imageWrapEl.attr("data-swiper-zoom")||n.maxRatio;if(t){T=f.$slideEl[0].offsetWidth;I=f.$slideEl[0].offsetHeight;u=f.$slideEl.offset().left+i.scrollX;c=f.$slideEl.offset().top+i.scrollY;l=u+T/2-a;h=c+I/2-s;m=f.$imageEl[0].offsetWidth;y=f.$imageEl[0].offsetHeight;g=m*r.scale;b=y*r.scale;_=Math.min(T/2-g/2,0);S=Math.min(I/2-b/2,0);E=-_;w=-S;p=l*r.scale;v=h*r.scale;if(p<_){p=_}if(p>E){p=E}if(v<S){v=S}if(v>w){v=w}}else{p=0;v=0}f.$imageWrapEl.transition(300).transform(`translate3d(${p}px, ${v}px,0)`);f.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${r.scale})`)}function T(){const t=e.zoom;const r=e.params.zoom;if(!f.$slideEl){if(e.params.virtual&&e.params.virtual.enabled&&e.virtual){f.$slideEl=e.$wrapperEl.children(`.${e.params.slideActiveClass}`)}else{f.$slideEl=e.slides.eq(e.activeIndex)}f.$imageEl=f.$slideEl.find(`.${r.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0);f.$imageWrapEl=f.$imageEl.parent(`.${r.containerClass}`)}if(!f.$imageEl||f.$imageEl.length===0||!f.$imageWrapEl||f.$imageWrapEl.length===0)return;if(e.params.cssMode){e.wrapperEl.style.overflow="";e.wrapperEl.style.touchAction=""}t.scale=1;o=1;f.$imageWrapEl.transition(300).transform("translate3d(0,0,0)");f.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)");f.$slideEl.removeClass(`${r.zoomedSlideClass}`);f.$slideEl=undefined}function I(t){const r=e.zoom;if(r.scale&&r.scale!==1){T()}else{w(t)}}function R(){const t=e.support;const r=e.touchEvents.start==="touchstart"&&t.passiveListener&&e.params.passiveListeners?{passive:true,capture:false}:false;const n=t.passiveListener?{passive:false,capture:true}:true;return{passiveListener:r,activeListenerWithCapture:n}}function C(){return`.${e.params.slideClass}`}function k(t){const{passiveListener:r}=R();const n=C();e.$wrapperEl[t]("gesturestart",n,m,r);e.$wrapperEl[t]("gesturechange",n,y,r);e.$wrapperEl[t]("gestureend",n,g,r)}function A(){if(s)return;s=true;k("on")}function O(){if(!s)return;s=false;k("off")}function P(){const t=e.zoom;if(t.enabled)return;t.enabled=true;const r=e.support;const{passiveListener:n,activeListenerWithCapture:i}=R();const o=C();if(r.gestures){e.$wrapperEl.on(e.touchEvents.start,A,n);e.$wrapperEl.on(e.touchEvents.end,O,n)}else if(e.touchEvents.start==="touchstart"){e.$wrapperEl.on(e.touchEvents.start,o,m,n);e.$wrapperEl.on(e.touchEvents.move,o,y,i);e.$wrapperEl.on(e.touchEvents.end,o,g,n);if(e.touchEvents.cancel){e.$wrapperEl.on(e.touchEvents.cancel,o,g,n)}}e.$wrapperEl.on(e.touchEvents.move,`.${e.params.zoom.containerClass}`,_,i)}function x(){const t=e.zoom;if(!t.enabled)return;const r=e.support;t.enabled=false;const{passiveListener:n,activeListenerWithCapture:i}=R();const o=C();if(r.gestures){e.$wrapperEl.off(e.touchEvents.start,A,n);e.$wrapperEl.off(e.touchEvents.end,O,n)}else if(e.touchEvents.start==="touchstart"){e.$wrapperEl.off(e.touchEvents.start,o,m,n);e.$wrapperEl.off(e.touchEvents.move,o,y,i);e.$wrapperEl.off(e.touchEvents.end,o,g,n);if(e.touchEvents.cancel){e.$wrapperEl.off(e.touchEvents.cancel,o,g,n)}}e.$wrapperEl.off(e.touchEvents.move,`.${e.params.zoom.containerClass}`,_,i)}r("init",(()=>{if(e.params.zoom.enabled){P()}}));r("destroy",(()=>{x()}));r("touchStart",((t,r)=>{if(!e.zoom.enabled)return;b(r)}));r("touchEnd",((t,r)=>{if(!e.zoom.enabled)return;S(r)}));r("doubleTap",((t,r)=>{if(!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle){I(r)}}));r("transitionEnd",(()=>{if(e.zoom.enabled&&e.params.zoom.enabled){E()}}));r("slideChange",(()=>{if(e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode){E()}}));Object.assign(e.zoom,{enable:P,disable:x,in:w,out:T,toggle:I})}function Fr({swiper:e,extendParams:t,on:r,emit:n}){t({lazy:{checkInView:false,enabled:false,loadPrevNext:false,loadPrevNextAmount:1,loadOnTransitionStart:false,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}});e.lazy={};let i=false;let o=false;function a(t,r=true){const i=e.params.lazy;if(typeof t==="undefined")return;if(e.slides.length===0)return;const o=e.virtual&&e.params.virtual.enabled;const s=o?e.$wrapperEl.children(`.${e.params.slideClass}[data-swiper-slide-index="${t}"]`):e.slides.eq(t);const u=s.find(`.${i.elementClass}:not(.${i.loadedClass}):not(.${i.loadingClass})`);if(s.hasClass(i.elementClass)&&!s.hasClass(i.loadedClass)&&!s.hasClass(i.loadingClass)){u.push(s[0])}if(u.length===0)return;u.each((t=>{const o=Qe(t);o.addClass(i.loadingClass);const u=o.attr("data-background");const c=o.attr("data-src");const l=o.attr("data-srcset");const f=o.attr("data-sizes");const d=o.parent("picture");e.loadImage(o[0],c||u,l,f,false,(()=>{if(typeof e==="undefined"||e===null||!e||e&&!e.params||e.destroyed)return;if(u){o.css("background-image",`url("${u}")`);o.removeAttr("data-background")}else{if(l){o.attr("srcset",l);o.removeAttr("data-srcset")}if(f){o.attr("sizes",f);o.removeAttr("data-sizes")}if(d.length){d.children("source").each((e=>{const t=Qe(e);if(t.attr("data-srcset")){t.attr("srcset",t.attr("data-srcset"));t.removeAttr("data-srcset")}}))}if(c){o.attr("src",c);o.removeAttr("data-src")}}o.addClass(i.loadedClass).removeClass(i.loadingClass);s.find(`.${i.preloaderClass}`).remove();if(e.params.loop&&r){const t=s.attr("data-swiper-slide-index");if(s.hasClass(e.params.slideDuplicateClass)){const r=e.$wrapperEl.children(`[data-swiper-slide-index="${t}"]:not(.${e.params.slideDuplicateClass})`);a(r.index(),false)}else{const r=e.$wrapperEl.children(`.${e.params.slideDuplicateClass}[data-swiper-slide-index="${t}"]`);a(r.index(),false)}}n("lazyImageReady",s[0],o[0]);if(e.params.autoHeight){e.updateAutoHeight()}}));n("lazyImageLoad",s[0],o[0])}))}function s(){const{$wrapperEl:t,params:r,slides:n,activeIndex:i}=e;const s=e.virtual&&r.virtual.enabled;const u=r.lazy;let c=r.slidesPerView;if(c==="auto"){c=0}function l(e){if(s){if(t.children(`.${r.slideClass}[data-swiper-slide-index="${e}"]`).length){return true}}else if(n[e])return true;return false}function f(e){if(s){return Qe(e).attr("data-swiper-slide-index")}return Qe(e).index()}if(!o)o=true;if(e.params.watchSlidesProgress){t.children(`.${r.slideVisibleClass}`).each((e=>{const t=s?Qe(e).attr("data-swiper-slide-index"):Qe(e).index();a(t)}))}else if(c>1){for(let e=i;e<i+c;e+=1){if(l(e))a(e)}}else{a(i)}if(u.loadPrevNext){if(c>1||u.loadPrevNextAmount&&u.loadPrevNextAmount>1){const e=u.loadPrevNextAmount;const t=Math.ceil(c);const r=Math.min(i+t+Math.max(e,t),n.length);const o=Math.max(i-Math.max(t,e),0);for(let e=i+t;e<r;e+=1){if(l(e))a(e)}for(let e=o;e<i;e+=1){if(l(e))a(e)}}else{const e=t.children(`.${r.slideNextClass}`);if(e.length>0)a(f(e));const n=t.children(`.${r.slidePrevClass}`);if(n.length>0)a(f(n))}}}function c(){const t=u();if(!e||e.destroyed)return;const r=e.params.lazy.scrollingElement?Qe(e.params.lazy.scrollingElement):Qe(t);const n=r[0]===t;const o=n?t.innerWidth:r[0].offsetWidth;const a=n?t.innerHeight:r[0].offsetHeight;const l=e.$el.offset();const{rtlTranslate:f}=e;let d=false;if(f)l.left-=e.$el[0].scrollLeft;const h=[[l.left,l.top],[l.left+e.width,l.top],[l.left,l.top+e.height],[l.left+e.width,l.top+e.height]];for(let e=0;e<h.length;e+=1){const t=h[e];if(t[0]>=0&&t[0]<=o&&t[1]>=0&&t[1]<=a){if(t[0]===0&&t[1]===0)continue;d=true}}const p=e.touchEvents.start==="touchstart"&&e.support.passiveListener&&e.params.passiveListeners?{passive:true,capture:false}:false;if(d){s();r.off("scroll",c,p)}else if(!i){i=true;r.on("scroll",c,p)}}r("beforeInit",(()=>{if(e.params.lazy.enabled&&e.params.preloadImages){e.params.preloadImages=false}}));r("init",(()=>{if(e.params.lazy.enabled){if(e.params.lazy.checkInView){c()}else{s()}}}));r("scroll",(()=>{if(e.params.freeMode&&e.params.freeMode.enabled&&!e.params.freeMode.sticky){s()}}));r("scrollbarDragMove resize _freeModeNoMomentumRelease",(()=>{if(e.params.lazy.enabled){if(e.params.lazy.checkInView){c()}else{s()}}}));r("transitionStart",(()=>{if(e.params.lazy.enabled){if(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!o){if(e.params.lazy.checkInView){c()}else{s()}}}}));r("transitionEnd",(()=>{if(e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart){if(e.params.lazy.checkInView){c()}else{s()}}}));r("slideChange",(()=>{const{lazy:t,cssMode:r,watchSlidesProgress:n,touchReleaseOnEdges:i,resistanceRatio:o}=e.params;if(t.enabled&&(r||n&&(i||o===0))){s()}}));r("destroy",(()=>{if(!e.$el)return;e.$el.find(`.${e.params.lazy.loadingClass}`).removeClass(e.params.lazy.loadingClass)}));Object.assign(e.lazy,{load:s,loadInSlide:a})}function Hr({swiper:e,extendParams:t,on:r}){t({controller:{control:undefined,inverse:false,by:"slide"}});e.controller={control:undefined};function n(e,t){const r=function e(){let t;let r;let n;return(e,i)=>{r=-1;t=e.length;while(t-r>1){n=t+r>>1;if(e[n]<=i){r=n}else{t=n}}return t}}();this.x=e;this.y=t;this.lastIndex=e.length-1;let n;let i;this.interpolate=function e(t){if(!t)return 0;i=r(this.x,t);n=i-1;return(t-this.x[n])*(this.y[i]-this.y[n])/(this.x[i]-this.x[n])+this.y[n]};return this}function i(t){if(!e.controller.spline){e.controller.spline=e.params.loop?new n(e.slidesGrid,t.slidesGrid):new n(e.snapGrid,t.snapGrid)}}function o(t,r){const n=e.controller.control;let o;let a;const s=e.constructor;function u(t){const r=e.rtlTranslate?-e.translate:e.translate;if(e.params.controller.by==="slide"){i(t);a=-e.controller.spline.interpolate(-r)}if(!a||e.params.controller.by==="container"){o=(t.maxTranslate()-t.minTranslate())/(e.maxTranslate()-e.minTranslate());a=(r-e.minTranslate())*o+t.minTranslate()}if(e.params.controller.inverse){a=t.maxTranslate()-a}t.updateProgress(a);t.setTranslate(a,e);t.updateActiveIndex();t.updateSlidesClasses()}if(Array.isArray(n)){for(let e=0;e<n.length;e+=1){if(n[e]!==r&&n[e]instanceof s){u(n[e])}}}else if(n instanceof s&&r!==n){u(n)}}function a(t,r){const n=e.constructor;const i=e.controller.control;let o;function a(r){r.setTransition(t,e);if(t!==0){r.transitionStart();if(r.params.autoHeight){$e((()=>{r.updateAutoHeight()}))}r.$wrapperEl.transitionEnd((()=>{if(!i)return;if(r.params.loop&&e.params.controller.by==="slide"){r.loopFix()}r.transitionEnd()}))}}if(Array.isArray(i)){for(o=0;o<i.length;o+=1){if(i[o]!==r&&i[o]instanceof n){a(i[o])}}}else if(i instanceof n&&r!==i){a(i)}}function s(){if(!e.controller.control)return;if(e.controller.spline){e.controller.spline=undefined;delete e.controller.spline}}r("beforeInit",(()=>{e.controller.control=e.params.controller.control}));r("update",(()=>{s()}));r("resize",(()=>{s()}));r("observerUpdate",(()=>{s()}));r("setTranslate",((t,r,n)=>{if(!e.controller.control)return;e.controller.setTranslate(r,n)}));r("setTransition",((t,r,n)=>{if(!e.controller.control)return;e.controller.setTransition(r,n)}));Object.assign(e.controller,{setTranslate:o,setTransition:a})}function Xr({swiper:e,extendParams:t,on:r}){t({a11y:{enabled:true,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}});e.a11y={clicked:false};let n=null;function i(e){const t=n;if(t.length===0)return;t.html("");t.html(e)}function o(e=16){const t=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(e).replace(/x/g,t)}function a(e){e.attr("tabIndex","0")}function s(e){e.attr("tabIndex","-1")}function u(e,t){e.attr("role",t)}function c(e,t){e.attr("aria-roledescription",t)}function l(e,t){e.attr("aria-controls",t)}function f(e,t){e.attr("aria-label",t)}function d(e,t){e.attr("id",t)}function h(e,t){e.attr("aria-live",t)}function p(e){e.attr("aria-disabled",true)}function v(e){e.attr("aria-disabled",false)}function m(t){if(t.keyCode!==13&&t.keyCode!==32)return;const r=e.params.a11y;const n=Qe(t.target);if(e.navigation&&e.navigation.$nextEl&&n.is(e.navigation.$nextEl)){if(!(e.isEnd&&!e.params.loop)){e.slideNext()}if(e.isEnd){i(r.lastSlideMessage)}else{i(r.nextSlideMessage)}}if(e.navigation&&e.navigation.$prevEl&&n.is(e.navigation.$prevEl)){if(!(e.isBeginning&&!e.params.loop)){e.slidePrev()}if(e.isBeginning){i(r.firstSlideMessage)}else{i(r.prevSlideMessage)}}if(e.pagination&&n.is(Vr(e.params.pagination.bulletClass))){n[0].click()}}function y(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{$nextEl:t,$prevEl:r}=e.navigation;if(r&&r.length>0){if(e.isBeginning){p(r);s(r)}else{v(r);a(r)}}if(t&&t.length>0){if(e.isEnd){p(t);s(t)}else{v(t);a(t)}}}function g(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function b(){return g()&&e.params.pagination.clickable}function _(){const t=e.params.a11y;if(!g())return;e.pagination.bullets.each((r=>{const n=Qe(r);if(e.params.pagination.clickable){a(n);if(!e.params.pagination.renderBullet){u(n,"button");f(n,t.paginationBulletMessage.replace(/\{\{index\}\}/,n.index()+1))}}if(n.is(`.${e.params.pagination.bulletActiveClass}`)){n.attr("aria-current","true")}else{n.removeAttr("aria-current")}}))}const S=(e,t,r)=>{a(e);if(e[0].tagName!=="BUTTON"){u(e,"button");e.on("keydown",m)}f(e,r);l(e,t)};const E=()=>{e.a11y.clicked=true};const w=()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(!e.destroyed){e.a11y.clicked=false}}))}))};const T=t=>{if(e.a11y.clicked)return;const r=t.target.closest(`.${e.params.slideClass}`);if(!r||!e.slides.includes(r))return;const n=e.slides.indexOf(r)===e.activeIndex;const i=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(r);if(n||i)return;if(t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents)return;if(e.isHorizontal()){e.el.scrollLeft=0}else{e.el.scrollTop=0}e.slideTo(e.slides.indexOf(r),0)};const I=()=>{const t=e.params.a11y;if(t.itemRoleDescriptionMessage){c(Qe(e.slides),t.itemRoleDescriptionMessage)}if(t.slideRole){u(Qe(e.slides),t.slideRole)}const r=e.params.loop?e.slides.filter((t=>!t.classList.contains(e.params.slideDuplicateClass))).length:e.slides.length;if(t.slideLabelMessage){e.slides.each(((n,i)=>{const o=Qe(n);const a=e.params.loop?parseInt(o.attr("data-swiper-slide-index"),10):i;const s=t.slideLabelMessage.replace(/\{\{index\}\}/,a+1).replace(/\{\{slidesLength\}\}/,r);f(o,s)}))}};const R=()=>{const t=e.params.a11y;e.$el.append(n);const r=e.$el;if(t.containerRoleDescriptionMessage){c(r,t.containerRoleDescriptionMessage)}if(t.containerMessage){f(r,t.containerMessage)}const i=e.$wrapperEl;const a=t.id||i.attr("id")||`swiper-wrapper-${o(16)}`;const s=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";d(i,a);h(i,s);I();let u;let l;if(e.navigation&&e.navigation.$nextEl){u=e.navigation.$nextEl}if(e.navigation&&e.navigation.$prevEl){l=e.navigation.$prevEl}if(u&&u.length){S(u,a,t.nextSlideMessage)}if(l&&l.length){S(l,a,t.prevSlideMessage)}if(b()){e.pagination.$el.on("keydown",Vr(e.params.pagination.bulletClass),m)}e.$el.on("focus",T,true);e.$el.on("pointerdown",E,true);e.$el.on("pointerup",w,true)};function C(){if(n&&n.length>0)n.remove();let t;let r;if(e.navigation&&e.navigation.$nextEl){t=e.navigation.$nextEl}if(e.navigation&&e.navigation.$prevEl){r=e.navigation.$prevEl}if(t){t.off("keydown",m)}if(r){r.off("keydown",m)}if(b()){e.pagination.$el.off("keydown",Vr(e.params.pagination.bulletClass),m)}e.$el.off("focus",T,true);e.$el.off("pointerdown",E,true);e.$el.off("pointerup",w,true)}r("beforeInit",(()=>{n=Qe(`<span class="${e.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}));r("afterInit",(()=>{if(!e.params.a11y.enabled)return;R()}));r("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{if(!e.params.a11y.enabled)return;I()}));r("fromEdge toEdge afterInit lock unlock",(()=>{if(!e.params.a11y.enabled)return;y()}));r("paginationUpdate",(()=>{if(!e.params.a11y.enabled)return;_()}));r("destroy",(()=>{if(!e.params.a11y.enabled)return;C()}))}function Yr({swiper:e,extendParams:t,on:r}){t({history:{enabled:false,root:"",replaceState:false,key:"slides",keepQuery:false}});let n=false;let i={};const o=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"");const a=e=>{const t=u();let r;if(e){r=new URL(e)}else{r=t.location}const n=r.pathname.slice(1).split("/").filter((e=>e!==""));const i=n.length;const o=n[i-2];const a=n[i-1];return{key:o,value:a}};const s=(t,r)=>{const i=u();if(!n||!e.params.history.enabled)return;let a;if(e.params.url){a=new URL(e.params.url)}else{a=i.location}const s=e.slides.eq(r);let c=o(s.attr("data-history"));if(e.params.history.root.length>0){let r=e.params.history.root;if(r[r.length-1]==="/")r=r.slice(0,r.length-1);c=`${r}/${t}/${c}`}else if(!a.pathname.includes(t)){c=`${t}/${c}`}if(e.params.history.keepQuery){c+=a.search}const l=i.history.state;if(l&&l.value===c){return}if(e.params.history.replaceState){i.history.replaceState({value:c},null,c)}else{i.history.pushState({value:c},null,c)}};const c=(t,r,n)=>{if(r){for(let i=0,a=e.slides.length;i<a;i+=1){const a=e.slides.eq(i);const s=o(a.attr("data-history"));if(s===r&&!a.hasClass(e.params.slideDuplicateClass)){const r=a.index();e.slideTo(r,t,n)}}}else{e.slideTo(0,t,n)}};const l=()=>{i=a(e.params.url);c(e.params.speed,i.value,false)};const f=()=>{const t=u();if(!e.params.history)return;if(!t.history||!t.history.pushState){e.params.history.enabled=false;e.params.hashNavigation.enabled=true;return}n=true;i=a(e.params.url);if(!i.key&&!i.value)return;c(0,i.value,e.params.runCallbacksOnInit);if(!e.params.history.replaceState){t.addEventListener("popstate",l)}};const d=()=>{const t=u();if(!e.params.history.replaceState){t.removeEventListener("popstate",l)}};r("init",(()=>{if(e.params.history.enabled){f()}}));r("destroy",(()=>{if(e.params.history.enabled){d()}}));r("transitionEnd _freeModeNoMomentumRelease",(()=>{if(n){s(e.params.history.key,e.activeIndex)}}));r("slideChange",(()=>{if(n&&e.params.cssMode){s(e.params.history.key,e.activeIndex)}}))}function Kr({swiper:e,extendParams:t,emit:r,on:n}){let i=false;const o=a();const s=u();t({hashNavigation:{enabled:false,replaceState:false,watchState:false}});const c=()=>{r("hashChange");const t=o.location.hash.replace("#","");const n=e.slides.eq(e.activeIndex).attr("data-hash");if(t!==n){const r=e.$wrapperEl.children(`.${e.params.slideClass}[data-hash="${t}"]`).index();if(typeof r==="undefined")return;e.slideTo(r)}};const l=()=>{if(!i||!e.params.hashNavigation.enabled)return;if(e.params.hashNavigation.replaceState&&s.history&&s.history.replaceState){s.history.replaceState(null,null,`#${e.slides.eq(e.activeIndex).attr("data-hash")}`||"");r("hashSet")}else{const t=e.slides.eq(e.activeIndex);const n=t.attr("data-hash")||t.attr("data-history");o.location.hash=n||"";r("hashSet")}};const f=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;i=true;const t=o.location.hash.replace("#","");if(t){const r=0;for(let n=0,i=e.slides.length;n<i;n+=1){const i=e.slides.eq(n);const o=i.attr("data-hash")||i.attr("data-history");if(o===t&&!i.hasClass(e.params.slideDuplicateClass)){const t=i.index();e.slideTo(t,r,e.params.runCallbacksOnInit,true)}}}if(e.params.hashNavigation.watchState){Qe(s).on("hashchange",c)}};const d=()=>{if(e.params.hashNavigation.watchState){Qe(s).off("hashchange",c)}};n("init",(()=>{if(e.params.hashNavigation.enabled){f()}}));n("destroy",(()=>{if(e.params.hashNavigation.enabled){d()}}));n("transitionEnd _freeModeNoMomentumRelease",(()=>{if(i){l()}}));n("slideChange",(()=>{if(i&&e.params.cssMode){l()}}))}function zr({swiper:e,extendParams:t,on:r,emit:n}){let i;e.autoplay={running:false,paused:false};t({autoplay:{enabled:false,delay:3e3,waitForTransition:true,disableOnInteraction:true,stopOnLastSlide:false,reverseDirection:false,pauseOnMouseEnter:false}});function o(){if(!e.size){e.autoplay.running=false;e.autoplay.paused=false;return}const t=e.slides.eq(e.activeIndex);let r=e.params.autoplay.delay;if(t.attr("data-swiper-autoplay")){r=t.attr("data-swiper-autoplay")||e.params.autoplay.delay}clearTimeout(i);i=$e((()=>{let t;if(e.params.autoplay.reverseDirection){if(e.params.loop){e.loopFix();t=e.slidePrev(e.params.speed,true,true);n("autoplay")}else if(!e.isBeginning){t=e.slidePrev(e.params.speed,true,true);n("autoplay")}else if(!e.params.autoplay.stopOnLastSlide){t=e.slideTo(e.slides.length-1,e.params.speed,true,true);n("autoplay")}else{u()}}else if(e.params.loop){e.loopFix();t=e.slideNext(e.params.speed,true,true);n("autoplay")}else if(!e.isEnd){t=e.slideNext(e.params.speed,true,true);n("autoplay")}else if(!e.params.autoplay.stopOnLastSlide){t=e.slideTo(0,e.params.speed,true,true);n("autoplay")}else{u()}if(e.params.cssMode&&e.autoplay.running)o();else if(t===false){o()}}),r)}function s(){if(typeof i!=="undefined")return false;if(e.autoplay.running)return false;e.autoplay.running=true;n("autoplayStart");o();return true}function u(){if(!e.autoplay.running)return false;if(typeof i==="undefined")return false;if(i){clearTimeout(i);i=undefined}e.autoplay.running=false;n("autoplayStop");return true}function c(t){if(!e.autoplay.running)return;if(e.autoplay.paused)return;if(i)clearTimeout(i);e.autoplay.paused=true;if(t===0||!e.params.autoplay.waitForTransition){e.autoplay.paused=false;o()}else{["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].addEventListener(t,f)}))}}function l(){const t=a();if(t.visibilityState==="hidden"&&e.autoplay.running){c()}if(t.visibilityState==="visible"&&e.autoplay.paused){o();e.autoplay.paused=false}}function f(t){if(!e||e.destroyed||!e.$wrapperEl)return;if(t.target!==e.$wrapperEl[0])return;["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,f)}));e.autoplay.paused=false;if(!e.autoplay.running){u()}else{o()}}function d(){if(e.params.autoplay.disableOnInteraction){u()}else{n("autoplayPause");c()}["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,f)}))}function h(){if(e.params.autoplay.disableOnInteraction){return}e.autoplay.paused=false;n("autoplayResume");o()}function p(){if(e.params.autoplay.pauseOnMouseEnter){e.$el.on("mouseenter",d);e.$el.on("mouseleave",h)}}function v(){e.$el.off("mouseenter",d);e.$el.off("mouseleave",h)}r("init",(()=>{if(e.params.autoplay.enabled){s();const e=a();e.addEventListener("visibilitychange",l);p()}}));r("beforeTransitionStart",((t,r,n)=>{if(e.autoplay.running){if(n||!e.params.autoplay.disableOnInteraction){e.autoplay.pause(r)}else{u()}}}));r("sliderFirstMove",(()=>{if(e.autoplay.running){if(e.params.autoplay.disableOnInteraction){u()}else{c()}}}));r("touchEnd",(()=>{if(e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction){o()}}));r("destroy",(()=>{v();if(e.autoplay.running){u()}const t=a();t.removeEventListener("visibilitychange",l)}));Object.assign(e.autoplay,{pause:c,run:o,start:s,stop:u})}function Jr({swiper:e,extendParams:t,on:r}){t({thumbs:{swiper:null,multipleActiveThumbs:true,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=false;let i=false;e.thumbs={swiper:null};function o(){const t=e.thumbs.swiper;if(!t||t.destroyed)return;const r=t.clickedIndex;const n=t.clickedSlide;if(n&&Qe(n).hasClass(e.params.thumbs.slideThumbActiveClass))return;if(typeof r==="undefined"||r===null)return;let i;if(t.params.loop){i=parseInt(Qe(t.clickedSlide).attr("data-swiper-slide-index"),10)}else{i=r}if(e.params.loop){let t=e.activeIndex;if(e.slides.eq(t).hasClass(e.params.slideDuplicateClass)){e.loopFix();e._clientLeft=e.$wrapperEl[0].clientLeft;t=e.activeIndex}const r=e.slides.eq(t).prevAll(`[data-swiper-slide-index="${i}"]`).eq(0).index();const n=e.slides.eq(t).nextAll(`[data-swiper-slide-index="${i}"]`).eq(0).index();if(typeof r==="undefined")i=n;else if(typeof n==="undefined")i=r;else if(n-t<t-r)i=n;else i=r}e.slideTo(i)}function a(){const{thumbs:t}=e.params;if(n)return false;n=true;const r=e.constructor;if(t.swiper instanceof r){e.thumbs.swiper=t.swiper;Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:true,slideToClickedSlide:false});Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:true,slideToClickedSlide:false})}else if(nt(t.swiper)){const n=Object.assign({},t.swiper);Object.assign(n,{watchSlidesProgress:true,slideToClickedSlide:false});e.thumbs.swiper=new r(n);i=true}e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass);e.thumbs.swiper.on("tap",o);return true}function s(t){const r=e.thumbs.swiper;if(!r||r.destroyed)return;const n=r.params.slidesPerView==="auto"?r.slidesPerViewDynamic():r.params.slidesPerView;let i=1;const o=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides){i=e.params.slidesPerView}if(!e.params.thumbs.multipleActiveThumbs){i=1}i=Math.floor(i);r.slides.removeClass(o);if(r.params.loop||r.params.virtual&&r.params.virtual.enabled){for(let t=0;t<i;t+=1){r.$wrapperEl.children(`[data-swiper-slide-index="${e.realIndex+t}"]`).addClass(o)}}else{for(let t=0;t<i;t+=1){r.slides.eq(e.realIndex+t).addClass(o)}}const a=e.params.thumbs.autoScrollOffset;const s=a&&!r.params.loop;if(e.realIndex!==r.realIndex||s){let i=r.activeIndex;let o;let u;if(r.params.loop){if(r.slides.eq(i).hasClass(r.params.slideDuplicateClass)){r.loopFix();r._clientLeft=r.$wrapperEl[0].clientLeft;i=r.activeIndex}const t=r.slides.eq(i).prevAll(`[data-swiper-slide-index="${e.realIndex}"]`).eq(0).index();const n=r.slides.eq(i).nextAll(`[data-swiper-slide-index="${e.realIndex}"]`).eq(0).index();if(typeof t==="undefined"){o=n}else if(typeof n==="undefined"){o=t}else if(n-i===i-t){o=r.params.slidesPerGroup>1?n:i}else if(n-i<i-t){o=n}else{o=t}u=e.activeIndex>e.previousIndex?"next":"prev"}else{o=e.realIndex;u=o>e.previousIndex?"next":"prev"}if(s){o+=u==="next"?a:-1*a}if(r.visibleSlidesIndexes&&r.visibleSlidesIndexes.indexOf(o)<0){if(r.params.centeredSlides){if(o>i){o=o-Math.floor(n/2)+1}else{o=o+Math.floor(n/2)-1}}else if(o>i&&r.params.slidesPerGroup===1){}r.slideTo(o,t?0:undefined)}}}r("beforeInit",(()=>{const{thumbs:t}=e.params;if(!t||!t.swiper)return;a();s(true)}));r("slideChange update resize observerUpdate",(()=>{s()}));r("setTransition",((t,r)=>{const n=e.thumbs.swiper;if(!n||n.destroyed)return;n.setTransition(r)}));r("beforeDestroy",(()=>{const t=e.thumbs.swiper;if(!t||t.destroyed)return;if(i){t.destroy()}}));Object.assign(e.thumbs,{init:a,update:s})}function Qr({swiper:e,extendParams:t,emit:r,once:n}){t({freeMode:{enabled:false,momentum:true,momentumRatio:1,momentumBounce:true,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:false,minimumVelocity:.02}});function i(){const t=e.getTranslate();e.setTranslate(t);e.setTransition(0);e.touchEventsData.velocities.length=0;e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function o(){const{touchEventsData:t,touches:r}=e;if(t.velocities.length===0){t.velocities.push({position:r[e.isHorizontal()?"startX":"startY"],time:t.touchStartTime})}t.velocities.push({position:r[e.isHorizontal()?"currentX":"currentY"],time:et()})}function a({currentPos:t}){const{params:i,$wrapperEl:o,rtlTranslate:a,snapGrid:s,touchEventsData:u}=e;const c=et();const l=c-u.touchStartTime;if(t<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(t>-e.maxTranslate()){if(e.slides.length<s.length){e.slideTo(s.length-1)}else{e.slideTo(e.slides.length-1)}return}if(i.freeMode.momentum){if(u.velocities.length>1){const t=u.velocities.pop();const r=u.velocities.pop();const n=t.position-r.position;const o=t.time-r.time;e.velocity=n/o;e.velocity/=2;if(Math.abs(e.velocity)<i.freeMode.minimumVelocity){e.velocity=0}if(o>150||et()-t.time>300){e.velocity=0}}else{e.velocity=0}e.velocity*=i.freeMode.momentumVelocityRatio;u.velocities.length=0;let t=1e3*i.freeMode.momentumRatio;const c=e.velocity*t;let l=e.translate+c;if(a)l=-l;let f=false;let d;const h=Math.abs(e.velocity)*20*i.freeMode.momentumBounceRatio;let p;if(l<e.maxTranslate()){if(i.freeMode.momentumBounce){if(l+e.maxTranslate()<-h){l=e.maxTranslate()-h}d=e.maxTranslate();f=true;u.allowMomentumBounce=true}else{l=e.maxTranslate()}if(i.loop&&i.centeredSlides)p=true}else if(l>e.minTranslate()){if(i.freeMode.momentumBounce){if(l-e.minTranslate()>h){l=e.minTranslate()+h}d=e.minTranslate();f=true;u.allowMomentumBounce=true}else{l=e.minTranslate()}if(i.loop&&i.centeredSlides)p=true}else if(i.freeMode.sticky){let t;for(let e=0;e<s.length;e+=1){if(s[e]>-l){t=e;break}}if(Math.abs(s[t]-l)<Math.abs(s[t-1]-l)||e.swipeDirection==="next"){l=s[t]}else{l=s[t-1]}l=-l}if(p){n("transitionEnd",(()=>{e.loopFix()}))}if(e.velocity!==0){if(a){t=Math.abs((-l-e.translate)/e.velocity)}else{t=Math.abs((l-e.translate)/e.velocity)}if(i.freeMode.sticky){const r=Math.abs((a?-l:l)-e.translate);const n=e.slidesSizesGrid[e.activeIndex];if(r<n){t=i.speed}else if(r<2*n){t=i.speed*1.5}else{t=i.speed*2.5}}}else if(i.freeMode.sticky){e.slideToClosest();return}if(i.freeMode.momentumBounce&&f){e.updateProgress(d);e.setTransition(t);e.setTranslate(l);e.transitionStart(true,e.swipeDirection);e.animating=true;o.transitionEnd((()=>{if(!e||e.destroyed||!u.allowMomentumBounce)return;r("momentumBounce");e.setTransition(i.speed);setTimeout((()=>{e.setTranslate(d);o.transitionEnd((()=>{if(!e||e.destroyed)return;e.transitionEnd()}))}),0)}))}else if(e.velocity){r("_freeModeNoMomentumRelease");e.updateProgress(l);e.setTransition(t);e.setTranslate(l);e.transitionStart(true,e.swipeDirection);if(!e.animating){e.animating=true;o.transitionEnd((()=>{if(!e||e.destroyed)return;e.transitionEnd()}))}}else{e.updateProgress(l)}e.updateActiveIndex();e.updateSlidesClasses()}else if(i.freeMode.sticky){e.slideToClosest();return}else if(i.freeMode){r("_freeModeNoMomentumRelease")}if(!i.freeMode.momentum||l>=i.longSwipesMs){e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses()}}Object.assign(e,{freeMode:{onTouchStart:i,onTouchMove:o,onTouchEnd:a}})}function qr({swiper:e,extendParams:t}){t({grid:{rows:1,fill:"column"}});let r;let n;let i;const o=t=>{const{slidesPerView:o}=e.params;const{rows:a,fill:s}=e.params.grid;n=r/a;i=Math.floor(t/a);if(Math.floor(t/a)===t/a){r=t}else{r=Math.ceil(t/a)*a}if(o!=="auto"&&s==="row"){r=Math.max(r,o*a)}};const a=(t,o,a,s)=>{const{slidesPerGroup:u,spaceBetween:c}=e.params;const{rows:l,fill:f}=e.params.grid;let d;let h;let p;if(f==="row"&&u>1){const e=Math.floor(t/(u*l));const n=t-l*u*e;const i=e===0?u:Math.min(Math.ceil((a-e*l*u)/l),u);p=Math.floor(n/i);h=n-p*i+e*u;d=h+p*r/l;o.css({"-webkit-order":d,order:d})}else if(f==="column"){h=Math.floor(t/l);p=t-h*l;if(h>i||h===i&&p===l-1){p+=1;if(p>=l){p=0;h+=1}}}else{p=Math.floor(t/n);h=t-p*n}o.css(s("margin-top"),p!==0?c&&`${c}px`:"")};const s=(t,n,i)=>{const{spaceBetween:o,centeredSlides:a,roundLengths:s}=e.params;const{rows:u}=e.params.grid;e.virtualSize=(t+o)*r;e.virtualSize=Math.ceil(e.virtualSize/u)-o;e.$wrapperEl.css({[i("width")]:`${e.virtualSize+o}px`});if(a){n.splice(0,n.length);const t=[];for(let r=0;r<n.length;r+=1){let i=n[r];if(s)i=Math.floor(i);if(n[r]<e.virtualSize+n[0])t.push(i)}n.push(...t)}};e.grid={initSlides:o,updateSlide:a,updateWrapperSize:s}}function $r(e){const t=this;const{$wrapperEl:r,params:n}=t;if(n.loop){t.loopDestroy()}if(typeof e==="object"&&"length"in e){for(let t=0;t<e.length;t+=1){if(e[t])r.append(e[t])}}else{r.append(e)}if(n.loop){t.loopCreate()}if(!n.observer){t.update()}}function en(e){const t=this;const{params:r,$wrapperEl:n,activeIndex:i}=t;if(r.loop){t.loopDestroy()}let o=i+1;if(typeof e==="object"&&"length"in e){for(let t=0;t<e.length;t+=1){if(e[t])n.prepend(e[t])}o=i+e.length}else{n.prepend(e)}if(r.loop){t.loopCreate()}if(!r.observer){t.update()}t.slideTo(o,0,false)}function tn(e,t){const r=this;const{$wrapperEl:n,params:i,activeIndex:o}=r;let a=o;if(i.loop){a-=r.loopedSlides;r.loopDestroy();r.slides=n.children(`.${i.slideClass}`)}const s=r.slides.length;if(e<=0){r.prependSlide(t);return}if(e>=s){r.appendSlide(t);return}let u=a>e?a+1:a;const c=[];for(let t=s-1;t>=e;t-=1){const e=r.slides.eq(t);e.remove();c.unshift(e)}if(typeof t==="object"&&"length"in t){for(let e=0;e<t.length;e+=1){if(t[e])n.append(t[e])}u=a>e?a+t.length:a}else{n.append(t)}for(let e=0;e<c.length;e+=1){n.append(c[e])}if(i.loop){r.loopCreate()}if(!i.observer){r.update()}if(i.loop){r.slideTo(u+r.loopedSlides,0,false)}else{r.slideTo(u,0,false)}}function rn(e){const t=this;const{params:r,$wrapperEl:n,activeIndex:i}=t;let o=i;if(r.loop){o-=t.loopedSlides;t.loopDestroy();t.slides=n.children(`.${r.slideClass}`)}let a=o;let s;if(typeof e==="object"&&"length"in e){for(let r=0;r<e.length;r+=1){s=e[r];if(t.slides[s])t.slides.eq(s).remove();if(s<a)a-=1}a=Math.max(a,0)}else{s=e;if(t.slides[s])t.slides.eq(s).remove();if(s<a)a-=1;a=Math.max(a,0)}if(r.loop){t.loopCreate()}if(!r.observer){t.update()}if(r.loop){t.slideTo(a+t.loopedSlides,0,false)}else{t.slideTo(a,0,false)}}function nn(){const e=this;const t=[];for(let r=0;r<e.slides.length;r+=1){t.push(r)}e.removeSlide(t)}function on({swiper:e}){Object.assign(e,{appendSlide:$r.bind(e),prependSlide:en.bind(e),addSlide:tn.bind(e),removeSlide:rn.bind(e),removeAllSlides:nn.bind(e)})}function an(e){const{effect:t,swiper:r,on:n,setTranslate:i,setTransition:o,overwriteParams:a,perspective:s,recreateShadows:u,getEffectParams:c}=e;n("beforeInit",(()=>{if(r.params.effect!==t)return;r.classNames.push(`${r.params.containerModifierClass}${t}`);if(s&&s()){r.classNames.push(`${r.params.containerModifierClass}3d`)}const e=a?a():{};Object.assign(r.params,e);Object.assign(r.originalParams,e)}));n("setTranslate",(()=>{if(r.params.effect!==t)return;i()}));n("setTransition",((e,n)=>{if(r.params.effect!==t)return;o(n)}));n("transitionEnd",(()=>{if(r.params.effect!==t)return;if(u){if(!c||!c().slideShadows)return;r.slides.each((e=>{const t=r.$(e);t.find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").remove()}));u()}}));let l;n("virtualUpdate",(()=>{if(r.params.effect!==t)return;if(!r.slides.length){l=true}requestAnimationFrame((()=>{if(l&&r.slides&&r.slides.length){i();l=false}}))}))}function sn(e,t){if(e.transformEl){return t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"})}return t}function un({swiper:e,duration:t,transformEl:r,allSlides:n}){const{slides:i,activeIndex:o,$wrapperEl:a}=e;if(e.params.virtualTranslate&&t!==0){let t=false;let s;if(n){s=r?i.find(r):i}else{s=r?i.eq(o).find(r):i.eq(o)}s.transitionEnd((()=>{if(t)return;if(!e||e.destroyed)return;t=true;e.animating=false;const r=["webkitTransitionEnd","transitionend"];for(let e=0;e<r.length;e+=1){a.trigger(r[e])}}))}}function cn({swiper:e,extendParams:t,on:r}){t({fadeEffect:{crossFade:false,transformEl:null}});const n=()=>{const{slides:t}=e;const r=e.params.fadeEffect;for(let n=0;n<t.length;n+=1){const t=e.slides.eq(n);const i=t[0].swiperSlideOffset;let o=-i;if(!e.params.virtualTranslate)o-=e.translate;let a=0;if(!e.isHorizontal()){a=o;o=0}const s=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);const u=sn(r,t);u.css({opacity:s}).transform(`translate3d(${o}px, ${a}px, 0px)`)}};const i=t=>{const{transformEl:r}=e.params.fadeEffect;const n=r?e.slides.find(r):e.slides;n.transition(t);un({swiper:e,duration:t,transformEl:r,allSlides:true})};an({effect:"fade",swiper:e,on:r,setTranslate:n,setTransition:i,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:true,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function ln({swiper:e,extendParams:t,on:r}){t({cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94}});const n=(e,t,r)=>{let n=r?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top");let i=r?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");if(n.length===0){n=Qe(`<div class="swiper-slide-shadow-${r?"left":"top"}"></div>`);e.append(n)}if(i.length===0){i=Qe(`<div class="swiper-slide-shadow-${r?"right":"bottom"}"></div>`);e.append(i)}if(n.length)n[0].style.opacity=Math.max(-t,0);if(i.length)i[0].style.opacity=Math.max(t,0)};const i=()=>{const t=e.isHorizontal();e.slides.each((e=>{const r=Math.max(Math.min(e.progress,1),-1);n(Qe(e),r,t)}))};const o=()=>{const{$el:t,$wrapperEl:r,slides:i,width:o,height:a,rtlTranslate:s,size:u,browser:c}=e;const l=e.params.cubeEffect;const f=e.isHorizontal();const d=e.virtual&&e.params.virtual.enabled;let h=0;let p;if(l.shadow){if(f){p=r.find(".swiper-cube-shadow");if(p.length===0){p=Qe('<div class="swiper-cube-shadow"></div>');r.append(p)}p.css({height:`${o}px`})}else{p=t.find(".swiper-cube-shadow");if(p.length===0){p=Qe('<div class="swiper-cube-shadow"></div>');t.append(p)}}}for(let e=0;e<i.length;e+=1){const t=i.eq(e);let r=e;if(d){r=parseInt(t.attr("data-swiper-slide-index"),10)}let o=r*90;let a=Math.floor(o/360);if(s){o=-o;a=Math.floor(-o/360)}const c=Math.max(Math.min(t[0].progress,1),-1);let p=0;let v=0;let m=0;if(r%4===0){p=-a*4*u;m=0}else if((r-1)%4===0){p=0;m=-a*4*u}else if((r-2)%4===0){p=u+a*4*u;m=u}else if((r-3)%4===0){p=-u;m=3*u+u*4*a}if(s){p=-p}if(!f){v=p;p=0}const y=`rotateX(${f?0:-o}deg) rotateY(${f?o:0}deg) translate3d(${p}px, ${v}px, ${m}px)`;if(c<=1&&c>-1){h=r*90+c*90;if(s)h=-r*90-c*90}t.transform(y);if(l.slideShadows){n(t,c,f)}}r.css({"-webkit-transform-origin":`50% 50% -${u/2}px`,"transform-origin":`50% 50% -${u/2}px`});if(l.shadow){if(f){p.transform(`translate3d(0px, ${o/2+l.shadowOffset}px, ${-o/2}px) rotateX(90deg) rotateZ(0deg) scale(${l.shadowScale})`)}else{const e=Math.abs(h)-Math.floor(Math.abs(h)/90)*90;const t=1.5-(Math.sin(e*2*Math.PI/360)/2+Math.cos(e*2*Math.PI/360)/2);const r=l.shadowScale;const n=l.shadowScale/t;const i=l.shadowOffset;p.transform(`scale3d(${r}, 1, ${n}) translate3d(0px, ${a/2+i}px, ${-a/2/n}px) rotateX(-90deg)`)}}const v=c.isSafari||c.isWebView?-u/2:0;r.transform(`translate3d(0px,0,${v}px) rotateX(${e.isHorizontal()?0:h}deg) rotateY(${e.isHorizontal()?-h:0}deg)`);r[0].style.setProperty("--swiper-cube-translate-z",`${v}px`)};const a=t=>{const{$el:r,slides:n}=e;n.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t);if(e.params.cubeEffect.shadow&&!e.isHorizontal()){r.find(".swiper-cube-shadow").transition(t)}};an({effect:"cube",swiper:e,on:r,setTranslate:o,setTransition:a,recreateShadows:i,getEffectParams:()=>e.params.cubeEffect,perspective:()=>true,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:true,resistanceRatio:0,spaceBetween:0,centeredSlides:false,virtualTranslate:true})})}function fn(e,t,r){const n=`swiper-slide-shadow${r?`-${r}`:""}`;const i=e.transformEl?t.find(e.transformEl):t;let o=i.children(`.${n}`);if(!o.length){o=Qe(`<div class="swiper-slide-shadow${r?`-${r}`:""}"></div>`);i.append(o)}return o}function dn({swiper:e,extendParams:t,on:r}){t({flipEffect:{slideShadows:true,limitRotation:true,transformEl:null}});const n=(t,r,n)=>{let i=e.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top");let o=e.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");if(i.length===0){i=fn(n,t,e.isHorizontal()?"left":"top")}if(o.length===0){o=fn(n,t,e.isHorizontal()?"right":"bottom")}if(i.length)i[0].style.opacity=Math.max(-r,0);if(o.length)o[0].style.opacity=Math.max(r,0)};const i=()=>{const t=e.params.flipEffect;e.slides.each((r=>{const i=Qe(r);let o=i[0].progress;if(e.params.flipEffect.limitRotation){o=Math.max(Math.min(r.progress,1),-1)}n(i,o,t)}))};const o=()=>{const{slides:t,rtlTranslate:r}=e;const i=e.params.flipEffect;for(let o=0;o<t.length;o+=1){const a=t.eq(o);let s=a[0].progress;if(e.params.flipEffect.limitRotation){s=Math.max(Math.min(a[0].progress,1),-1)}const u=a[0].swiperSlideOffset;const c=-180*s;let l=c;let f=0;let d=e.params.cssMode?-u-e.translate:-u;let h=0;if(!e.isHorizontal()){h=d;d=0;f=-l;l=0}else if(r){l=-l}a[0].style.zIndex=-Math.abs(Math.round(s))+t.length;if(i.slideShadows){n(a,s,i)}const p=`translate3d(${d}px, ${h}px, 0px) rotateX(${f}deg) rotateY(${l}deg)`;const v=sn(i,a);v.transform(p)}};const a=t=>{const{transformEl:r}=e.params.flipEffect;const n=r?e.slides.find(r):e.slides;n.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t);un({swiper:e,duration:t,transformEl:r})};an({effect:"flip",swiper:e,on:r,setTranslate:o,setTransition:a,recreateShadows:i,getEffectParams:()=>e.params.flipEffect,perspective:()=>true,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:true,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function hn({swiper:e,extendParams:t,on:r}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:true,transformEl:null}});const n=()=>{const{width:t,height:r,slides:n,slidesSizesGrid:i}=e;const o=e.params.coverflowEffect;const a=e.isHorizontal();const s=e.translate;const u=a?-s+t/2:-s+r/2;const c=a?o.rotate:-o.rotate;const l=o.depth;for(let e=0,t=n.length;e<t;e+=1){const t=n.eq(e);const r=i[e];const s=t[0].swiperSlideOffset;const f=(u-s-r/2)/r;const d=typeof o.modifier==="function"?o.modifier(f):f*o.modifier;let h=a?c*d:0;let p=a?0:c*d;let v=-l*Math.abs(d);let m=o.stretch;if(typeof m==="string"&&m.indexOf("%")!==-1){m=parseFloat(o.stretch)/100*r}let y=a?0:m*d;let g=a?m*d:0;let b=1-(1-o.scale)*Math.abs(d);if(Math.abs(g)<.001)g=0;if(Math.abs(y)<.001)y=0;if(Math.abs(v)<.001)v=0;if(Math.abs(h)<.001)h=0;if(Math.abs(p)<.001)p=0;if(Math.abs(b)<.001)b=0;const _=`translate3d(${g}px,${y}px,${v}px) rotateX(${p}deg) rotateY(${h}deg) scale(${b})`;const S=sn(o,t);S.transform(_);t[0].style.zIndex=-Math.abs(Math.round(d))+1;if(o.slideShadows){let e=a?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top");let r=a?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");if(e.length===0){e=fn(o,t,a?"left":"top")}if(r.length===0){r=fn(o,t,a?"right":"bottom")}if(e.length)e[0].style.opacity=d>0?d:0;if(r.length)r[0].style.opacity=-d>0?-d:0}}};const i=t=>{const{transformEl:r}=e.params.coverflowEffect;const n=r?e.slides.find(r):e.slides;n.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t)};an({effect:"coverflow",swiper:e,on:r,setTranslate:n,setTransition:i,perspective:()=>true,overwriteParams:()=>({watchSlidesProgress:true})})}function pn({swiper:e,extendParams:t,on:r}){t({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:false,progressMultiplier:1,perspective:true,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const n=e=>{if(typeof e==="string")return e;return`${e}px`};const i=()=>{const{slides:t,$wrapperEl:r,slidesSizesGrid:i}=e;const o=e.params.creativeEffect;const{progressMultiplier:a}=o;const s=e.params.centeredSlides;if(s){const t=i[0]/2-e.params.slidesOffsetBefore||0;r.transform(`translateX(calc(50% - ${t}px))`)}for(let r=0;r<t.length;r+=1){const i=t.eq(r);const u=i[0].progress;const c=Math.min(Math.max(i[0].progress,-o.limitProgress),o.limitProgress);let l=c;if(!s){l=Math.min(Math.max(i[0].originalProgress,-o.limitProgress),o.limitProgress)}const f=i[0].swiperSlideOffset;const d=[e.params.cssMode?-f-e.translate:-f,0,0];const h=[0,0,0];let p=false;if(!e.isHorizontal()){d[1]=d[0];d[0]=0}let v={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};if(c<0){v=o.next;p=true}else if(c>0){v=o.prev;p=true}d.forEach(((e,t)=>{d[t]=`calc(${e}px + (${n(v.translate[t])} * ${Math.abs(c*a)}))`}));h.forEach(((e,t)=>{h[t]=v.rotate[t]*Math.abs(c*a)}));i[0].style.zIndex=-Math.abs(Math.round(u))+t.length;const m=d.join(", ");const y=`rotateX(${h[0]}deg) rotateY(${h[1]}deg) rotateZ(${h[2]}deg)`;const g=l<0?`scale(${1+(1-v.scale)*l*a})`:`scale(${1-(1-v.scale)*l*a})`;const b=l<0?1+(1-v.opacity)*l*a:1-(1-v.opacity)*l*a;const _=`translate3d(${m}) ${y} ${g}`;if(p&&v.shadow||!p){let e=i.children(".swiper-slide-shadow");if(e.length===0&&v.shadow){e=fn(o,i)}if(e.length){const t=o.shadowPerProgress?c*(1/o.limitProgress):c;e[0].style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const S=sn(o,i);S.transform(_).css({opacity:b});if(v.origin){S.css("transform-origin",v.origin)}}};const o=t=>{const{transformEl:r}=e.params.creativeEffect;const n=r?e.slides.find(r):e.slides;n.transition(t).find(".swiper-slide-shadow").transition(t);un({swiper:e,duration:t,transformEl:r,allSlides:true})};an({effect:"creative",swiper:e,on:r,setTranslate:i,setTransition:o,perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:true,virtualTranslate:!e.params.cssMode})})}function vn({swiper:e,extendParams:t,on:r}){t({cardsEffect:{slideShadows:true,transformEl:null,rotate:true,perSlideRotate:2,perSlideOffset:8}});const n=()=>{const{slides:t,activeIndex:r}=e;const n=e.params.cardsEffect;const{startTranslate:i,isTouched:o}=e.touchEventsData;const a=e.translate;for(let s=0;s<t.length;s+=1){const u=t.eq(s);const c=u[0].progress;const l=Math.min(Math.max(c,-4),4);let f=u[0].swiperSlideOffset;if(e.params.centeredSlides&&!e.params.cssMode){e.$wrapperEl.transform(`translateX(${e.minTranslate()}px)`)}if(e.params.centeredSlides&&e.params.cssMode){f-=t[0].swiperSlideOffset}let d=e.params.cssMode?-f-e.translate:-f;let h=0;const p=-100*Math.abs(l);let v=1;let m=-n.perSlideRotate*l;let y=n.perSlideOffset-Math.abs(l)*.75;const g=e.virtual&&e.params.virtual.enabled?e.virtual.from+s:s;const b=(g===r||g===r-1)&&l>0&&l<1&&(o||e.params.cssMode)&&a<i;const _=(g===r||g===r+1)&&l<0&&l>-1&&(o||e.params.cssMode)&&a>i;if(b||_){const e=(1-Math.abs((Math.abs(l)-.5)/.5))**.5;m+=-28*l*e;v+=-.5*e;y+=96*e;h=`${-25*e*Math.abs(l)}%`}if(l<0){d=`calc(${d}px + (${y*Math.abs(l)}%))`}else if(l>0){d=`calc(${d}px + (-${y*Math.abs(l)}%))`}else{d=`${d}px`}if(!e.isHorizontal()){const e=h;h=d;d=e}const S=l<0?`${1+(1-v)*l}`:`${1-(1-v)*l}`;const E=`\n translate3d(${d}, ${h}, ${p}px)\n rotateZ(${n.rotate?m:0}deg)\n scale(${S})\n `;if(n.slideShadows){let e=u.find(".swiper-slide-shadow");if(e.length===0){e=fn(n,u)}if(e.length)e[0].style.opacity=Math.min(Math.max((Math.abs(l)-.5)/.5,0),1)}u[0].style.zIndex=-Math.abs(Math.round(c))+t.length;const w=sn(n,u);w.transform(E)}};const i=t=>{const{transformEl:r}=e.params.cardsEffect;const n=r?e.slides.find(r):e.slides;n.transition(t).find(".swiper-slide-shadow").transition(t);un({swiper:e,duration:t,transformEl:r})};an({effect:"cards",swiper:e,on:r,setTranslate:n,setTransition:i,perspective:()=>true,overwriteParams:()=>({watchSlidesProgress:true,virtualTranslate:!e.params.cssMode})})}},35917:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79039);var o=r(4055);e.exports=!n&&!i((function(){return Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a!==7}))},36033:(e,t,r)=>{"use strict";r(48523)},36043:(e,t,r)=>{"use strict";var n=r(79306);var i=TypeError;var o=function(e){var t,r;this.promise=new e((function(e,n){if(t!==undefined||r!==undefined)throw new i("Bad Promise constructor");t=e;r=n}));this.resolve=n(t);this.reject=n(r)};e.exports.f=function(e){return new o(e)}},36072:(e,t,r)=>{"use strict";var n=r(94644);var i=r(80926).right;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("reduceRight",(function e(t){var r=arguments.length;return i(o(this),t,r,r>1?arguments[1]:undefined)}))},36156:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UIManager=void 0;var n=r(74848);var i=r(5338);var o=r(96540);var a=r(69733);var s=r(26440);var u=r(44104);var c=d(r(54694));var l=r(31053);var f=r(34941);function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const g=new u.Log({module:"HwICS.UIManager"});let b=t.UIManager=function(){function e(){h(this,e)}return v(e,null,[{key:"renderPage",value:function t(r){e.rootDom=document.getElementById(r);if(!e.rootDom){g.error("renderPage","no root dom",r);return}g.info("renderPage",r);e._addSizeChange();e._root=(0,i.createRoot)(e.rootDom);e._root.render((0,n.jsx)(o.Suspense,{fallback:"",children:(0,n.jsx)(a.Provider,{store:s.store,children:(0,n.jsx)(c.default,{})})}))}},{key:"destroyPage",value:function t(){var r,n;g.info("destroyPage");(r=e._root)===null||r===void 0?void 0:r.unmount();(n=e.rootDom)===null||n===void 0?void 0:n.removeEventListener("click",f.dealGlobalClick);e._removeSizeChange()}},{key:"_addSizeChange",value:function t(){l.ScreenOrientationPolyfill.addChangeEvent(e.reCalcScreenOrientation);window.addEventListener("visibilitychange",e.reCalcScreenOrientation,false);window.addEventListener("pageshow",e.reCalcScreenOrientation,false);document.addEventListener("fullscreenchange",e.reCalcScreenOrientation);e.reCalcScreenOrientation()}},{key:"_removeSizeChange",value:function t(){l.ScreenOrientationPolyfill.removeChangeEvent(e.reCalcScreenOrientation);window.removeEventListener("visibilitychange",e.reCalcScreenOrientation,false);window.removeEventListener("pageshow",e.reCalcScreenOrientation,false);document.removeEventListener("fullscreenchange",e.reCalcScreenOrientation)}},{key:"reCalcScreenOrientation",value:function t(){if(document.visibilityState==="visible"){var r,n,i,o;(r=e.rootDom)===null||r===void 0?void 0:(n=r.classList)===null||n===void 0?void 0:n.remove("portrait-primary");(i=e.rootDom)===null||i===void 0?void 0:(o=i.classList)===null||o===void 0?void 0:o.remove("landscape-primary");if(l.ScreenOrientationPolyfill.type==="portrait-primary"){var a,s;(a=e.rootDom)===null||a===void 0?void 0:(s=a.classList)===null||s===void 0?void 0:s.add("portrait-primary")}else{var u,c;(u=e.rootDom)===null||u===void 0?void 0:(c=u.classList)===null||c===void 0?void 0:c.add("landscape-primary")}}}}])}()},36308:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(63009))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.algo;var o=i.SHA256;var a=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);e.sigBytes-=4;return e}});t.SHA224=o._createHelper(a);t.HmacSHA224=o._createHmacHelper(a)})();return e.SHA224}))},36389:(e,t,r)=>{"use strict";var n=r(46518);var i=Math.atanh;var o=Math.log;var a=!(i&&1/i(-0)<0);n({target:"Math",stat:true,forced:a},{atanh:function e(t){var r=+t;return r===0?r:o((1+r)/(1-r))/2}})},36456:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(655);var a=i("".charAt);var s=i("".charCodeAt);var u=i(/./.exec);var c=i(1..toString);var l=i("".toUpperCase);var f=/[\w*+\-./@]/;var d=function(e,t){var r=c(e,16);while(r.length<t)r="0"+r;return r};n({global:true},{escape:function e(t){var r=o(t);var n="";var i=r.length;var c=0;var h,p;while(c<i){h=a(r,c++);if(u(f,h)){n+=h}else{p=s(h,0);if(p<256){n+="%"+d(p,2)}else{n+="%u"+l(d(p,4))}}}return n}})},36840:(e,t,r)=>{"use strict";var n=r(94901);var i=r(24913);var o=r(50283);var a=r(39433);e.exports=function(e,t,r,s){if(!s)s={};var u=s.enumerable;var c=s.name!==undefined?s.name:t;if(n(r))o(r,c,s);if(s.global){if(u)e[t]=r;else a(t,r)}else{try{if(!s.unsafe)delete e[t];else if(e[t])u=true}catch(e){}if(u)e[t]=r;else i.f(e,t,{value:r,enumerable:false,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},36955:(e,t,r)=>{"use strict";var n=r(92140);var i=r(94901);var o=r(22195);var a=r(78227);var s=a("toStringTag");var u=Object;var c=o(function(){return arguments}())==="Arguments";var l=function(e,t){try{return e[t]}catch(e){}};e.exports=n?o:function(e){var t,r,n;return e===undefined?"Undefined":e===null?"Null":typeof(r=l(t=u(e),s))=="string"?r:c?o(t):(n=o(t))==="Object"&&i(t.callee)?"Arguments":n}},36991:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(56262);var i=r(11686);var o=r(47300);var a=r(65268);var s=r(94855);var u=r(44104);var c=r(44772);var l=h(r(92224));var f=r(37204);var d=r(637);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const _=new u.Log({module:"CloudStreamManager"});let S=t["default"]=function(){function e(){p(this,e)}return m(e,null,[{key:"createStreamConnector",value:async function e(t){_.info("createStreamConnector",t);await n.SparkRTC.getInstance().init();await n.SparkRTC.getInstance().joinRoom()}},{key:"setHeartbeatState",value:function e(){}},{key:"unmuteLocalAudio",value:function e(t){t+=", unmuteLocalAudio";const r=o.StreamManager.getInstance().getLocalStream(t);const n=r===null||r===void 0?void 0:r.getAudioHRTCTrack();if(n){var a;r===null||r===void 0?void 0:(a=r.getAudioHRTCTrack())===null||a===void 0?void 0:a.unmuteTrack();return{result:true}}return{result:false,errorCode:i.SDKErrorCode.RTC_NOT_INIT,errorMsg:i.msgMap[i.SDKErrorCode.RTC_NOT_INIT]}}},{key:"muteLocalAudio",value:function e(t){t+=", muteLocalAudio";try{const e=o.StreamManager.getInstance().getLocalStream(t);const n=e===null||e===void 0?void 0:e.getAudioHRTCTrack();if(n){var r;e===null||e===void 0?void 0:(r=e.getAudioHRTCTrack())===null||r===void 0?void 0:r.muteTrack()}return{result:true}}catch(e){return{result:false,errorCode:i.SDKErrorCode.RTC_CATCH_ERROR,errorMsg:JSON.stringify(e)}}}},{key:"unmuteRemoteAudio",value:async function e(t){return d.RemoteManager.unmuteRemoteAudio(t)}},{key:"muteRemoteAudio",value:async function e(t){return d.RemoteManager.muteRemoteAudio(t)}},{key:"checkSignature",value:function e({result:t,entry:r}){var i,o,u;const c=(i=t.rtc_room_info)===null||i===void 0?void 0:(o=i.users)===null||o===void 0?void 0:o.find((({user_type:e})=>e===a.USER_TYPE.PLAYER));if(c&&c.ctime!==((u=s.ConfigManager.getPlayerUserInfo(r))===null||u===void 0?void 0:u.ctime)){s.ConfigManager.setChatInfo({chatInfo:t,entry:r});n.SparkRTC.getInstance().renewSignature({entry:r})}}},{key:"setSpeaker",value:async function e(t){return d.RemoteManager.setSpeaker(t)}},{key:"setMicrophone",value:async function e(t){return o.StreamManager.getInstance().setMicrophone(t)}},{key:"destroy",value:async function e(t){return n.SparkRTC.getInstance().destroy(t)}},{key:"startSendLocalStream",value:async function e(t){return n.SparkRTC.getInstance().startSendLocalStream({entry:t})}},{key:"destroyLocalStream",value:async function e(t){return n.SparkRTC.getInstance().destroyLocalStream(t)}},{key:"setLogLevel",value:function e(t){l.default.setLogLevel(t)}},{key:"setShouldSendLocalStream",value:function e(t){return o.StreamManager.setShouldSendLocalStream(t)}},{key:"startLocalRecord",value:function e(t){return f.RecordManager.startLocalRecord(t)}},{key:"stopLocalRecord",value:function e(){return f.RecordManager.stopLocalRecord()}},{key:"getLocalMediaStream",value:function e(t){var r;return(r=o.StreamManager.getInstance().getLocalStream(t))===null||r===void 0?void 0:r.getMediaStream()}},{key:"clearPeerLeaveTimer",value:function e(t){return d.RemoteManager.clearPeerLeaveTimer(t)}},{key:"startSendCustomStream",value:async function e(t){_.info("startSendCustomStream");return n.SparkRTC.getInstance().startSendLocalStream({config:{audioSource:t},entry:"startSendCustomStream"})}},{key:"stopSendCustomStream",value:function e(){_.info("stopSendCustomStream");return n.SparkRTC.getInstance().startSendLocalStream({config:{audio:true},entry:"stopSendCustomStream"})}},{key:"playRemoteVideo",value:function e(){_.info("playRemoteVideo");return d.RemoteManager.playRemoteVideo()}}])}();b([(0,c.printfDecorator)(_)],S,"setMicrophone",null);b([(0,c.printfDecorator)(_)],S,"setLogLevel",null);b([(0,c.printfDecorator)(_)],S,"setShouldSendLocalStream",null);b([(0,c.printfDecorator)(_)],S,"startLocalRecord",null);b([(0,c.printfDecorator)(_)],S,"stopLocalRecord",null);b([(0,c.printfDecorator)(_)],S,"getLocalMediaStream",null);b([(0,c.printfDecorator)(_)],S,"clearPeerLeaveTimer",null);b([(0,c.printfDecorator)(_)],S,"startSendCustomStream",null);b([(0,c.printfDecorator)(_)],S,"stopSendCustomStream",null);b([(0,c.printfDecorator)(_)],S,"playRemoteVideo",null)},37204:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RecordManager=void 0;var n=r(44772);var i=r(44104);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const f=new i.Log({module:"SparkRTC.RecordManager"});let d=t.RecordManager=function(){function e(){o(this,e)}return s(e,null,[{key:"startLocalRecord",value:async function t(r){var n;let i=r.stream;if(r.track){i=new MediaStream([r.track])}(n=e.localRecorder)===null||n===void 0?void 0:n.startRecord({stream:i});e.start=true;e.blobData=new Uint8Array;e.startTime=Date.now();f.info("开始录制",e.startTime)}},{key:"arrayBufferToPCMFile",value:function t(r){const n=new Blob([r],{type:"audio/pcm"});const i=URL.createObjectURL(n);f.info("arrayBufferToPCMFile");const o=document.createElement("a");o.style.display="none";o.href=i;o.download=`output_${e.startTime}.pcm.txt`;document.body.appendChild(o);o.click();setTimeout((()=>{URL.revokeObjectURL(i);document.body.removeChild(o)}),100)}},{key:"stopLocalRecord",value:async function t(){var r,n;f.info("结束录制",e.blobData.length);e.downloadAudio.downloadFile(`record_${e.startTime}.pcm`);(r=e.downloadAudio)===null||r===void 0?void 0:r.clearData();await((n=e.localRecorder)===null||n===void 0?void 0:n.stopRecord());e.start=false;if(e.blobData.length>0){e.arrayBufferToPCMFile(e.blobData)}e.blobData=new Uint8Array}},{key:"audioCallback",value:function t(r){try{if(e.start){e.downloadAudio.addDownloadData(r.pcm.buffer)}}catch(e){f.error("audioCallback",e)}}},{key:"audioCallback2",value:function t(r){try{if(!e.start){return}const t=new Uint8Array(e.blobData.length+r.length);t.set(e.blobData,0);t.set(r,e.blobData.length);e.blobData=t}catch(e){f.error("audioCallback2",e)}}}])}();d.localRecorder=new n.AudioContextLocalRecorder({bufferSize:1024,useScriptProcessor:true,audioCallback:d.audioCallback});d.downloadAudio=new n.DownloadAudio;d.start=false;d.blobData=new Uint8Array;d.startTime=0;l([(0,n.printfDecorator)(f)],d,"startLocalRecord",null);l([(0,n.printfDecorator)(f)],d,"stopLocalRecord",null)},37360:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaStreamUtil=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=e.MediaStreamUtil=function(){function e(){r(this,e)}return i(e,null,[{key:"stopAudioTrack",value:function e(t){var r;t===null||t===void 0||(r=t.getAudioTracks)===null||r===void 0||(r=r.call(t))===null||r===void 0||r.forEach((function(e){var t;(t=e.stop)===null||t===void 0||t.call(e)}))}}])}()}))},37466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Machine2MachineVerification=void 0;var n=r(44104);var i=r(51751);var o=r(43260);var a=r(39595);var s=r(26440);var u=r(75625);var c=r(94855);var l=r(90228);var f=r(44772);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const g=new n.Log({module:"HwICS.Machine2MachineVerification"});let b=t.Machine2MachineVerification=function(){function e(){d(this,e)}return p(e,null,[{key:"onceCodeAuth",value:async function e({onceCode:t,entry:r}){const n=await l.HttpRequestManager.doPost({url:u.BaseUrl.AUTH_ONCE_CODE,data:{robot_id:c.ConfigManager.getRobotId(r),once_code:t},entry:r});if(!n){return false}(0,s.$dispatch)((0,o.togglePageState)(a.PageState.MAIN));i.TokenManager.setCacheCodeAuthInfo({authInfo:n,entry:r});i.TokenManager.startRefreshToken({authInfo:n});g.debug("onceCodeAuth",r,n);return true}}])}();y([(0,f.printfDecorator)(g)],b,"onceCodeAuth",null)},37467:(e,t,r)=>{"use strict";var n=r(37628);var i=r(94644);var o=i.aTypedArray;var a=i.exportTypedArrayMethod;var s=i.getTypedArrayConstructor;a("toReversed",(function e(){return n(o(this),s(this))}))},37628:(e,t,r)=>{"use strict";var n=r(26198);e.exports=function(e,t){var r=n(e);var i=new t(r);var o=0;for(;o<r;o++)i[o]=e[r-o-1];return i}},37857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TextDriveManager=void 0;var n=r(44772);var i=r(44104);var o=r(84743);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const v=new i.Log({module:"TextDriveManager"});let m=t.TextDriveManager=function(){function e(){c(this,e)}return f(e,null,[{key:"formatTextDrivenParam",value:function t(r,n){const i=s(s({},r),{},{chatId:e.chatId,seq:e.seq,entry:n});e.seq++;if(r.isLast){e.resetCache({entry:n})}return i}},{key:"resetCache",value:function t(r){v.info("resetCache",r.entry);e.chatId=o.Utils.getRequestId().replace(/-/g,"");e.seq=1}}])}();m.chatId=o.Utils.getRequestId().replace(/-/g,"");m.seq=1;p([(0,n.printfDecorator)(v)],m,"resetCache",null)},38309:(e,t,r)=>{"use strict";r(24359)},38360:(e,t,r)=>{"use strict";r.r(t)},38454:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}});t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}});return t}();return e.mode.ECB}))},38469:(e,t,r)=>{"use strict";var n=r(79504);var i=r(40507);var o=r(94402);var a=o.Set;var s=o.proto;var u=n(s.forEach);var c=n(s.keys);var l=c(new a).next;e.exports=function(e,t,r){return r?i({iterator:c(e),next:l},t):u(e,t)}},38475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DebugTools=void 0;var n=r(74848);var i=r(50306);var o=r(40494);var a=r(75290);var s=r(72640);const u=()=>{const e=o.StreamAdapter.getLocalMediaStream("DebugTools");o.StreamAdapter.startLocalRecord({stream:e,track:a.ThirdPartyManager.getAudioMediaTrack()||undefined});s.PortalWssManager.getInstance().startWsRecord("click btn")};const c=()=>{o.StreamAdapter.stopLocalRecord();s.PortalWssManager.getInstance().stopWsRecord("click btn")};const l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Button,{onClick:u,children:"开始录制"}),(0,n.jsx)(i.Button,{onClick:c,children:"结束录制"})]});t.DebugTools=l},38480:(e,t,r)=>{"use strict";var n=r(61828);var i=r(88727);var o=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function e(t){return n(t,o)}},38574:(e,t,r)=>{"use strict";var n=r(84215);e.exports=n==="NODE"},38781:(e,t,r)=>{"use strict";var n=r(10350).PROPER;var i=r(36840);var o=r(28551);var a=r(655);var s=r(79039);var u=r(61034);var c="toString";var l=RegExp.prototype;var f=l[c];var d=s((function(){return f.call({source:"a",flags:"b"})!=="/a/b"}));var h=n&&f.name!==c;if(d||h){i(l,c,(function e(){var t=o(this);var r=a(t.source);var n=a(u(t));return"/"+r+"/"+n}),{unsafe:true})}},39202:(e,t,r)=>{"use strict";r(33313);var n=r(46518);var i=r(18866);n({target:"String",proto:true,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},39297:(e,t,r)=>{"use strict";var n=r(79504);var i=r(48981);var o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function e(t,r){return o(i(t),r)}},39403:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(74994)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PromiseUtil=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=e.PromiseUtil=function(){function e(){s(this,e)}return c(e,null,[{key:"makeSure",value:function e(r){var n=r.delay||1e3;var o=r.retryCount||50;var s=r.fn;var u=r.condition;var c=1;var l=false;if((0,t.formatType)(n)!==t.formatType.NUMBER||(0,t.formatType)(o)!==t.formatType.NUMBER||!((0,t.formatType)(s)===t.formatType.FUNCTION||(0,t.formatType)(s)===t.formatType.ASYNCFUNCTION)||!((0,t.formatType)(u)===t.formatType.FUNCTION||(0,t.formatType)(u)===t.formatType.ASYNCFUNCTION)){throw new Error("params error")}var f=function(){var e=a(i().mark((function e(){var r,a,d,h,p=arguments;return i().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(!l){i.next=2;break}return i.abrupt("return",{result:false,message:"isStop true"});case 2:for(r=p.length,a=new Array(r),d=0;d<r;d++){a[d]=p[d]}i.next=5;return s.apply(void 0,a.concat([c]));case 5:h=i.sent;i.next=8;return u.apply(void 0,a.concat([h]));case 8:if(!i.sent){i.next=10;break}return i.abrupt("return",{result:true});case 10:c++;if(!(c>o)){i.next=13;break}return i.abrupt("return",{result:false,message:"retryCount max"});case 13:i.next=15;return(0,t.sleep)(n);case 15:return i.abrupt("return",f.apply(void 0,a));case 16:case"end":return i.stop()}}),e)})));return function t(){return e.apply(this,arguments)}}();var d=function e(){l=true};return{dealMakeSureFunc:f,stopMakeSureFunc:d}}},{key:"interruptibleSleep",value:function e(t){var n=new r.CustomPromise;n.setResolveTimeout(t,true);return{promise:n.waitPromise(),stop:function e(){n.dealResolve(false)}}}}])}()}))},39433:(e,t,r)=>{"use strict";var n=r(44576);var i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:true,writable:true})}catch(r){n[e]=t}return t}},39469:(e,t,r)=>{"use strict";var n=r(46518);var i=Math.hypot;var o=Math.abs;var a=Math.sqrt;var s=!!i&&i(Infinity,NaN)!==Infinity;n({target:"Math",stat:true,arity:2,forced:s},{hypot:function e(t,r){var n=0;var i=0;var s=arguments.length;var u=0;var c,l;while(i<s){c=o(arguments[i++]);if(u<c){l=u/c;n=n*l*l+1;u=c}else if(c>0){l=c/u;n+=l*l}else n+=c}return u===Infinity?Infinity:u*a(n)}})},39506:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(45471),r(51025))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=r.WordArray;var o=t.algo;var a=o.MD5;var s=o.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var r;var n=this.cfg;var o=n.hasher.create();var a=i.create();var s=a.words;var u=n.keySize;var c=n.iterations;while(s.length<u){if(r){o.update(r)}r=o.update(e).finalize(t);o.reset();for(var l=1;l<c;l++){r=o.finalize(r);o.reset()}a.concat(r)}a.sigBytes=u*4;return a}});t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}})();return e.EvpKDF}))},39519:(e,t,r)=>{"use strict";var n=r(44576);var i=r(82839);var o=n.process;var a=n.Deno;var s=o&&o.versions||a&&a.version;var u=s&&s.v8;var c,l;if(u){c=u.split(".");l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])}if(!l&&i){c=i.match(/Edge\/(\d+)/);if(!c||c[1]>=74){c=i.match(/Chrome\/(\d+)/);if(c)l=+c[1]}}e.exports=l},39592:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HwICS=void 0;r(84315);r(7452);var n=r(20942);var i=r(44772);var o=r(72640);var a=r(21013);var s=r(26440);var u=r(11686);var c=r(49);var l=r(34941);var f=r(94855);var d=r(36156);var h=r(44104);var p=r(40159);var v=r(50961);var m=N(r(92224));var y=r(18839);var g=r(21361);var b=r(32681);var _=r(43260);var S=r(84743);var E=r(40494);var w=r(69988);var T=r(78435);var I=r(63226);var R=r(44246);var C=r(37857);var k=r(56043);var A=r(46677);var O=r(45112);var P=r(91606);var x=r(637);var L=r(53046);var M=r(50810);function N(e){return e&&e.__esModule?e:{default:e}}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V(n.key),n)}}function U(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V(e){var t=W(e,"string");return"symbol"==typeof t?t:t+""}function W(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const B=new h.Log({module:"HwICS"});(0,l.addGlobalUtEvent)();m.default.setParameter("LOG_CACHES_ENABLE","off");let G=t.HwICS=function(){function e(){D(this,e)}return U(e,null,[{key:"dealInitParam",value:function t({param:r,forceCheck:n=true,entry:i}){var o;i+=",dealInitParam";r.logLevel&&e.setLogLevel(r.logLevel);r.eventListeners&&e.addEventListeners(r.eventListeners);B.debug(i,r);r.serverAddress=S.Utils.formatOrigin(r.serverAddress);if(n){if(!e._containerCheck(r.containerId)){return false}if(!e._authCheck(r)){return false}}if((o=r.config)!==null&&o!==void 0&&o.defaultMuteRemoteAudio){x.RemoteManager.muteRemoteAudio("dealInitParam")}f.ConfigManager.setInitParam(r);T.LanguageManager.setRemoteAndLocalLangCode({entry:"dealInitParam"});d.UIManager.renderPage(r===null||r===void 0?void 0:r.containerId);return true}},{key:"setLogLevel",value:function e(t){B.info("setLogLevel",t);h.Log.setLogLevel(t);k.LocalWakeup.setLogLevel(t);E.StreamAdapter.setLogLevel(t)}},{key:"addEventListeners",value:function e(t){B.info("addEventListeners");return p.EventManager.addEventListeners(t)}},{key:"destroy",value:async function t(){const r=(0,i.createEntry)("destroy");B.info("destroy",r);await e.clearBase(r);await e.clearAuthData(r);await k.LocalWakeup.clearWakeup(r);e.clearUI(r);e.clearConfig(r);p.EventManager.clearEventListeners()}},{key:"clearBase",value:async function e(t){var r;t+=",clearBase";B.info("clearBase",t);y.HttpHeartBeatManager.stopHeartBeat(t);await P.JobManager.stopChatJob({jobId:((r=f.ConfigManager.getChatInfo(t))===null||r===void 0?void 0:r.job_id)||"",entry:t});await E.StreamAdapter.destroy(t);(0,s.$dispatch)((0,c.resetErrorState)());(0,s.$dispatch)((0,b.resetCaptionState)());(0,s.$dispatch)((0,_.resetMainState)());f.ConfigManager.clearChatInfo(t);C.TextDriveManager.resetCache({entry:t});T.LanguageManager.clearConfig()}},{key:"clearConfig",value:function t(r){B.info("clearConfig",r);e.setLogLevel("info");f.ConfigManager.clearConfig();(0,s.$dispatch)((0,g.resetLangState)())}},{key:"clearUI",value:function e(t){B.info("clearUI",t);d.UIManager.destroyPage()}},{key:"clearAuthData",value:async function e(t){B.info("clearAuthData",t);await n.RtcInfoManager.getInstance().deleteToken({entry:t});f.ConfigManager.clearAuthInfo(t)}},{key:"joinChatRoom",value:async function e(t=""){var r,n,u;t+=",joinChatRoom";B.info("joinChatRoom");const c=await P.JobManager.startChatJob({entry:t});if(!c){return}B.info("joinChatRoom result",{chat_subtitle_config:c.chat_subtitle_config,video_config:c.video_config,chat_video_type:c.chat_video_type,chat_access_address:c.chat_access_address,is_transparent:c.is_transparent,default_language:c.default_language,voice_config_list:(r=c.voice_config_list)===null||r===void 0?void 0:r.map((e=>e.language)),deployment_mode:c.deployment_mode});a.UserTrack.updateUtParam({chatInfo:c});T.LanguageManager.initLanguageInJoinRoom({chatInfo:c,entry:t});f.ConfigManager.setChatInfo({chatInfo:c,entry:t});(0,s.$dispatch)((0,_.setLayoutMode)(c.chat_video_type));y.HttpHeartBeatManager.startHeartBeat(t);o.PortalWssManager.getInstance().initWebsocket(t);if(c.isReuse){await Promise.race([o.PortalWssManager.getInstance().stopChat({entry:t,needErrorDeal:false}),(0,i.sleep)(3e3)])}await E.StreamAdapter.createStreamConnector(c.deployment_mode);k.LocalWakeup.initWakeup({entry:t,language:T.LanguageManager.getLocalLangCode(t)===A.LanguageCode.EN_US?"en":"zh",wakeupCallback:O.ChatManager.wakeupCallback});if((n=f.ConfigManager.getUHanConfig())!==null&&n!==void 0&&n.enable){L.UHanManager.initUHanDevice()}else if((u=f.ConfigManager.getUHanV2Config())!==null&&u!==void 0&&u.enable){M.UHanV2Manager.initUHanDevice()}}},{key:"getJobInfo",value:async function e(){const t=f.ConfigManager.getChatInfo("getJobInfo");return{jobId:(t===null||t===void 0?void 0:t.job_id)||"",websocketAddr:(t===null||t===void 0?void 0:t.chat_access_address)||"",jobInfo:t}}},{key:"_authCheck",value:function e({taskUrl:t,onceCode:r,robotId:n,serverAddress:o}){try{if(!o){B.makeError({code:u.SDKErrorCode.UI_PARAM_ERROR,message:`${v.ICSErrorMessage.errorParam}: serverAddress must have a value`});return false}if(!n){if(!t){B.makeError({code:u.SDKErrorCode.UI_PARAM_ERROR,message:`${v.ICSErrorMessage.errorParam}: at least one of taskUrl and robotId has a value`});return false}if(!i.UrlUtil.getSearchValue(t,"robot_id")){B.makeError({code:u.SDKErrorCode.UI_PARAM_ERROR,message:`${v.ICSErrorMessage.errorParam}: taskUrl is incorrect`});return false}}if(!r){B.makeError({code:u.SDKErrorCode.UI_PARAM_ERROR,message:`${v.ICSErrorMessage.errorParam}: onceCode must have a value`});return false}return true}catch(e){B.error("_authCheck",e===null||e===void 0?void 0:e.toString());B.makeError({code:u.SDKErrorCode.UI_PARAM_ERROR,message:`${v.ICSErrorMessage.errorParam}: unknown`});return false}}},{key:"_containerCheck",value:function e(t){const r=!!(t&&document.getElementById(t));!r&&B.makeError({code:u.SDKErrorCode.UI_NO_PARENT,message:w.SDKErrorCodeMsgMap[u.SDKErrorCode.UI_NO_PARENT]});return r}}])}();R.HWIcsElectron.registerUserTrack((e=>{B.debug("registerUserTrack",e);e===null||e===void 0?void 0:e.forEach((e=>{if([I.Arg1Map.ELECTRON_MESSAGE,I.Arg1Map.C_NATIVE].includes(e.arg1)){a.UserTrack.addUserTrack({arg1:e.arg1,arg2:e.arg2,arg3:e.arg3,args:e.args})}}))}));window.addEventListener(u.InnerICSEventKey.REJOIN_ROOM,(e=>{const{entry:t}=e.detail;B.info("REJOIN_ROOM",t);G.joinChatRoom(t)}))},39595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReduxModule=t.PageState=t.ConfigKey=t.ChatBtnState=void 0;var r;(function(e){e["MAIN"]="main";e["ERROR"]="error";e["CONFIG"]="config";e["CAPTION"]="caption";e["LANG"]="lang";e["MEDIAVIEW"]="mediaView"})(r||(t.ReduxModule=r={}));var n;(function(e){e["ACTIVATION"]="activation";e["LOADING"]="loading";e["MAIN"]="main"})(n||(t.PageState=n={}));var i;(function(e){e["INIT"]="init";e["LOADING"]="loading";e["PLAY"]="play";e["THINKING"]="thinking";e["ANSWERING"]="answering";e["STOPPING"]="stopping"})(i||(t.ChatBtnState=i={}));var o;(function(e){e["ENABLE_CAPTION"]="enableCaption";e["ENABLE_CHAT_BTN"]="enableChatBtn";e["ENABLE_HOT_ISSUES"]="enableHotIssues";e["ENABLE_BUSINESS_TRACK"]="enableBusinessTrack";e["ENABLE_WEAK_ERROR_INFO"]="enableWeakErrorInfo";e["ENABLE_JOB_CACHE"]="enableJobCache";e["USE_DEFAULT_BACKGROUND"]="useDefaultBackground";e["ENABLE_NETWORK_CHECK"]="enableNetworkCheck";e["ENABLE_DEVICE_SETTING"]="enableDeviceSetting";e["SHOW_LANGUAGE_UI"]="showLanguageUI";e["DESTROY_BEFORE_CLOSE"]="destroyBeforeClose";e["ENABLE_LOCAL_WAKEUP"]="enableLocalWakeup";e["ENABLE_VAD_INTERRUPT"]="enableVadInterrupt";e["FIRST_CREATE_LOCAL_STREAM"]="firstCreateLocalStream";e["ENABLE_STORAGE_CACHE"]="enableStorageCache";e["ENABLE_MEDIA_VIEWER"]="enableMediaViewer";e["DEFAULT_MUTE_REMOTE_AUDIO"]="defaultMuteRemoteAudio";e["AUTO_PLAY_REMOTE_VIDEO"]="autoPlayRemoteVideo";e["ENABLE_COLLECT_AUDIO_DEMAND"]="enableCollectAudioDemand";e["ENABLE_ORIGIN_CUT_ALGORITHM"]="enableOriginCutAlgorithm";e["ENABLE_VERBATIM"]="enableVerbatim";e["USE_WORKER_WAKEUP"]="useWorkerWakeup";e["PRE_CHECK_PERMISSIONS"]="preCheckPermissions"})(o||(t.ConfigKey=o={}))},39796:(e,t,r)=>{"use strict";var n=r(46518);var i=r(18745);var o=r(79306);var a=r(28551);var s=r(79039);var u=!s((function(){Reflect.apply((function(){}))}));n({target:"Reflect",stat:true,forced:u},{apply:function e(t,r,n){return i(o(t),r,a(n))}})},39928:(e,t,r)=>{"use strict";var n=r(26198);var i=r(91291);var o=RangeError;e.exports=function(e,t,r,a){var s=n(e);var u=i(r);var c=u<0?s+u:u;if(c>=s||c<0)throw new o("Incorrect index");var l=new t(s);var f=0;for(;f<s;f++)l[f]=f===c?a:e[f];return l}},39994:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(27831),r(20885),r(83917),r(62672),r(67665),r(46397),r(93102),r(75332),r(40969),r(13620),r(2813),r(7878),r(40992),r(25823),r(1874),r(24441),r(24257),r(56946),r(96e3),r(8327)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"Button",{enumerable:true,get:function(){return t.default}});Object.defineProperty(e,"Checkbox",{enumerable:true,get:function(){return d.default}});Object.defineProperty(e,"DefaultAvatar",{enumerable:true,get:function(){return f.default}});Object.defineProperty(e,"ErrorBoundary",{enumerable:true,get:function(){return a.default}});Object.defineProperty(e,"Head",{enumerable:true,get:function(){return c.default}});Object.defineProperty(e,"Modal",{enumerable:true,get:function(){return u.default}});Object.defineProperty(e,"Option",{enumerable:true,get:function(){return _.Option}});Object.defineProperty(e,"QrCode",{enumerable:true,get:function(){return o.default}});Object.defineProperty(e,"Radio",{enumerable:true,get:function(){return g.default}});Object.defineProperty(e,"RadioGroup",{enumerable:true,get:function(){return y.default}});Object.defineProperty(e,"Scroller",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"Select",{enumerable:true,get:function(){return _.Select}});Object.defineProperty(e,"SequenceFrames",{enumerable:true,get:function(){return h.default}});Object.defineProperty(e,"SoundColumn",{enumerable:true,get:function(){return b.SoundColumn}});Object.defineProperty(e,"SvgIcon",{enumerable:true,get:function(){return v.default}});Object.defineProperty(e,"Swiper",{enumerable:true,get:function(){return p.default}});Object.defineProperty(e,"SwitchBtn",{enumerable:true,get:function(){return m.default}});Object.defineProperty(e,"TextArea",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"TextInput",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"Toast",{enumerable:true,get:function(){return s.toast}});Object.defineProperty(e,"WindowHeader",{enumerable:true,get:function(){return l.default}});Object.defineProperty(e,"toast",{enumerable:true,get:function(){return s.toast}});t=S(t);r=S(r);n=S(n);i=S(i);o=S(o);a=S(a);u=S(u);c=S(c);l=S(l);f=S(f);d=S(d);h=S(h);p=S(p);v=S(v);m=S(m);y=S(y);g=S(g);function S(e){return e&&e.__esModule?e:{default:e}}}))},40150:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Number",stat:true},{isNaN:function e(t){return t!==t}})},40159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EventManager=void 0;var n=r(44772);var i=r(63226);var o=r(35123);var a=r(50300);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const h=(0,a.getLogger)("EventManager");let p=t.EventManager=function(){function e(){s(this,e)}return c(e,null,[{key:"addEventListeners",value:function t(r){if((0,n.formatType)(r)===n.formatType.OBJECT){Object.keys(r).forEach((t=>{e._eventMap[t]=r[t]}))}}},{key:"dispatchICSEvent",value:function t(r,n){try{var i,o;(i=(o=e._eventMap)[r])===null||i===void 0?void 0:i.call(o,n)}catch(e){h.error("dispatchICSEvent callback error",e)}}},{key:"clearEventListeners",value:function t(){e._eventMap={}}}])}();p._eventMap={};d([(0,o.methodDecorator)(i.Arg1Map.HWICSUISDK_NOTIFY)],p,"dispatchICSEvent",null)},40280:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(96395);var a=r(80550);var s=r(10916).CONSTRUCTOR;var u=r(93438);var c=i("Promise");var l=o&&!s;n({target:"Promise",stat:true,forced:o||s},{resolve:function e(t){return u(l&&this===c?a:this,t)}})},40494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StreamAdapter=void 0;var n=f(r(36991));var i=r(11686);var o=r(44086);var a=r(44772);var s=r(44104);var u=f(r(24844));var c=r(75625);var l=r(94855);function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const S=new s.Log({module:"StreamAdapter"});const E=()=>function(e,t,r){const n=r===null||r===void 0?void 0:r.value;async function a(e){if(!l.ConfigManager.isThirdPartyEnable()&&e!==null&&e!==void 0&&e.preCheckPermissions&&!await l.ConfigManager.checkAudioDevice()){(0,o.dealSparkRTCError)({error:{error_code:i.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR,error_msg:i.msgMap[i.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR],request_id:Date.now().toString()},entry:t});return{result:false,errorCode:i.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR,errorMsg:i.msgMap[i.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR]}}return n===null||n===void 0?void 0:n(e)}return m(m({},r),{},{writable:true,value:a})};let w=t.StreamAdapter=function(){function e(){d(this,e)}return p(e,null,[{key:"createStreamConnector",value:async function t(r){if(r===c.DeploymentMode.HCSO){e.CurrUseStream=u.default}await e.CurrUseStream.createStreamConnector(r||"")}},{key:"startSendLocalStream",value:async function t({entry:r}){return e.CurrUseStream.startSendLocalStream(r)}},{key:"destroyLocalStream",value:async function t(r){e.CurrUseStream.destroyLocalStream(r)}},{key:"setHeartbeatState",value:async function t(r){return e.CurrUseStream.setHeartbeatState(r)}},{key:"destroy",value:async function t(r){return e.CurrUseStream.destroy(r)}},{key:"muteRemoteAudio",value:async function t(r){return e.CurrUseStream.muteRemoteAudio(r)}},{key:"unmuteRemoteAudio",value:async function t(r){return e.CurrUseStream.unmuteRemoteAudio(r)}},{key:"muteLocalAudio",value:function t(r){S.info("muteLocalAudio",r);return e.CurrUseStream.muteLocalAudio(r)}},{key:"unmuteLocalAudio",value:function t(r){S.info("unmuteLocalAudio",r);return e.CurrUseStream.unmuteLocalAudio(r)}},{key:"checkSignature",value:function t(r){return e.CurrUseStream.checkSignature(r)}},{key:"setSpeaker",value:async function t(r){if(!r){return undefined}return e.CurrUseStream.setSpeaker(r)}},{key:"setMicrophone",value:async function t(r){if(!r){return undefined}return e.CurrUseStream.setMicrophone(r)}},{key:"setLogLevel",value:function t(r){if(!r){return undefined}return e.CurrUseStream.setLogLevel(r)}},{key:"setShouldSendLocalStream",value:function t(r){return e.CurrUseStream.setShouldSendLocalStream(r)}},{key:"startLocalRecord",value:function t(r){return e.CurrUseStream.startLocalRecord(r)}},{key:"stopLocalRecord",value:async function t(){return e.CurrUseStream.stopLocalRecord()}},{key:"getLocalMediaStream",value:function t(r){return e.CurrUseStream.getLocalMediaStream(r)}},{key:"clearPeerLeaveTimer",value:function t(r){return e.CurrUseStream.clearPeerLeaveTimer(r)}},{key:"startSendCustomStream",value:async function t(r){return e.CurrUseStream.startSendCustomStream(r)}},{key:"stopSendCustomStream",value:async function t(){return e.CurrUseStream.stopSendCustomStream()}},{key:"playRemoteVideo",value:async function t(){return e.CurrUseStream.playRemoteVideo()}}])}();w.CurrUseStream=n.default;_([(0,a.printfDecorator)(S),E()],w,"startSendLocalStream",null);_([(0,a.printfDecorator)(S)],w,"destroyLocalStream",null);_([(0,a.printfDecorator)(S)],w,"setHeartbeatState",null);_([(0,a.printfDecorator)(S)],w,"destroy",null);_([(0,a.printfDecorator)(S)],w,"muteRemoteAudio",null);_([(0,a.printfDecorator)(S)],w,"unmuteRemoteAudio",null);_([(0,a.printfDecorator)(S)],w,"muteLocalAudio",null);_([(0,a.printfDecorator)(S)],w,"unmuteLocalAudio",null);_([(0,a.printfDecorator)(S)],w,"checkSignature",null);_([(0,a.printfDecorator)(S)],w,"setSpeaker",null);_([(0,a.printfDecorator)(S)],w,"setMicrophone",null);_([(0,a.printfDecorator)(S)],w,"setLogLevel",null);_([(0,a.printfDecorator)(S)],w,"setShouldSendLocalStream",null);_([(0,a.printfDecorator)(S)],w,"startLocalRecord",null);_([(0,a.printfDecorator)(S)],w,"stopLocalRecord",null);_([(0,a.printfDecorator)(S)],w,"getLocalMediaStream",null);_([(0,a.printfDecorator)(S)],w,"clearPeerLeaveTimer",null);_([(0,a.printfDecorator)(S)],w,"startSendCustomStream",null);_([(0,a.printfDecorator)(S)],w,"stopSendCustomStream",null);_([(0,a.printfDecorator)(S)],w,"playRemoteVideo",null)},40507:(e,t,r)=>{"use strict";var n=r(69565);e.exports=function(e,t,r){var i=r?e:e.iterator;var o=e.next;var a,s;while(!(a=n(o,i)).done){s=t(a.value);if(s!==undefined)return s}}},40616:(e,t,r)=>{"use strict";var n=r(79039);e.exports=!n((function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}))},40875:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(48981);var a=r(42787);var s=r(12211);var u=i((function(){a(1)}));n({target:"Object",stat:true,forced:u,sham:!s},{getPrototypeOf:function e(t){return a(o(t))}})},40888:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(20034);var a=r(28551);var s=r(16575);var u=r(77347);var c=r(42787);function l(e,t){var r=arguments.length<3?e:arguments[2];var n,f;if(a(e)===r)return e[t];n=u.f(e,t);if(n)return s(n)?n.value:n.get===undefined?undefined:i(n.get,r);if(o(f=c(e)))return l(f,t,r)}n({target:"Reflect",stat:true},{get:l})},40955:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.BlockCipher;var i=t.algo;var o=[];var a=[];var s=[];var u=[];var c=[];var l=[];var f=[];var d=[];var h=[];var p=[];(function(){var e=[];for(var t=0;t<256;t++){if(t<128){e[t]=t<<1}else{e[t]=t<<1^283}}var r=0;var n=0;for(var t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^i&255^99;o[r]=i;a[i]=r;var v=e[r];var m=e[v];var y=e[m];var g=e[i]*257^i*16843008;s[r]=g<<24|g>>>8;u[r]=g<<16|g>>>16;c[r]=g<<8|g>>>24;l[r]=g;var g=y*16843009^m*65537^v*257^r*16843008;f[i]=g<<24|g>>>8;d[i]=g<<16|g>>>16;h[i]=g<<8|g>>>24;p[i]=g;if(!r){r=n=1}else{r=v^e[e[e[y^v]]];n^=e[e[n]]}}})();var v=[0,1,2,4,8,16,32,64,128,27,54];var m=i.AES=n.extend({_doReset:function(){var e;if(this._nRounds&&this._keyPriorReset===this._key){return}var t=this._keyPriorReset=this._key;var r=t.words;var n=t.sigBytes/4;var i=this._nRounds=n+6;var a=(i+1)*4;var s=this._keySchedule=[];for(var u=0;u<a;u++){if(u<n){s[u]=r[u]}else{e=s[u-1];if(!(u%n)){e=e<<8|e>>>24;e=o[e>>>24]<<24|o[e>>>16&255]<<16|o[e>>>8&255]<<8|o[e&255];e^=v[u/n|0]<<24}else if(n>6&&u%n==4){e=o[e>>>24]<<24|o[e>>>16&255]<<16|o[e>>>8&255]<<8|o[e&255]}s[u]=s[u-n]^e}}var c=this._invKeySchedule=[];for(var l=0;l<a;l++){var u=a-l;if(l%4){var e=s[u]}else{var e=s[u-4]}if(l<4||u<=4){c[l]=e}else{c[l]=f[o[e>>>24]]^d[o[e>>>16&255]]^h[o[e>>>8&255]]^p[o[e&255]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,u,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3];e[t+3]=r;this._doCryptBlock(e,t,this._invKeySchedule,f,d,h,p,a);var r=e[t+1];e[t+1]=e[t+3];e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){var u=this._nRounds;var c=e[t]^r[0];var l=e[t+1]^r[1];var f=e[t+2]^r[2];var d=e[t+3]^r[3];var h=4;for(var p=1;p<u;p++){var v=n[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[d&255]^r[h++];var m=n[l>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[c&255]^r[h++];var y=n[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[l&255]^r[h++];var g=n[d>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[f&255]^r[h++];c=v;l=m;f=y;d=g}var v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[d&255])^r[h++];var m=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[c&255])^r[h++];var y=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[l&255])^r[h++];var g=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[f&255])^r[h++];e[t]=v;e[t+1]=m;e[t+2]=y;e[t+3]=g},keySize:256/32});t.AES=n._createHelper(m)})();return e.AES}))},40961:(e,t,r)=>{"use strict";function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function"){return}if(false){}try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}if(true){n();e.exports=r(22551)}else{}},40969:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(46942),r(72648),r(75637),r(65219),r(26885),r(44772),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=l(r);o=l(o);a=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function S(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function w(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let T=e.default=function(e){function t(e){var r;f(this,t);r=p(this,t,[e]);S(r,"_close",(e=>{(0,u.getPLogger)().info("userclick _close",r.props.entry);(0,s.reactStopPropagation)(e);const{clickClose:t}=r.props;if(t){t()}else{(0,n.handleHide)(e)}}));S(r,"maxFun",(e=>{(0,u.getPLogger)().info("userclick maxFun",r.props.entry);(0,s.reactStopPropagation)(e);const{isMaximize:t}=r.state;r.setState({isMaximize:!t},(()=>{if(r.state.isMaximize){(0,n.handleMaximize)()}else{(0,n.unMaximize)()}}))}));S(r,"doubleClick",(e=>{(0,s.reactStopPropagation)(e);const{isMaximize:t}=r.state;const{isDoubleClick:i}=r.props;(0,u.getPLogger)().info("doubleClick",{entry:r.props.entry,isDoubleClick:r.props.isDoubleClick,isMaximize:r.state.isMaximize});if(i){r.setState({isMaximize:!t},(()=>{if(r.state.isMaximize){(0,n.handleMaximize)(`${r.props.entry} doubleClick`)}else{(0,n.unMaximize)(`${r.props.entry} doubleClick`)}}))}}));S(r,"_setMaximize",(()=>{(0,u.getPLogger)().info("_setMaximize",r.props.entry);r.setState({isMaximize:true})}));S(r,"_setUnMaximize",(()=>{(0,u.getPLogger)().info("_setUnMaximize",r.props.entry);r.setState({isMaximize:false})}));S(r,"_correctMaxState",(0,s.debounce)((async()=>{var e,t;(0,u.getPLogger)().info("_correctMaxState",r.props.entry);if(await((e=window)===null||e===void 0?void 0:(t=e.Pedestal)===null||t===void 0?void 0:t.remote.getCurrentWindow().isMaximized())){r._setMaximize()}else{r._setUnMaximize()}}),100));r.state={isMaximize:false};(0,u.getPLogger)().info("WinHeader constructor",r.props.entry);return r}b(t,e);return h(t,[{key:"componentDidMount",value:function e(){if(this.props.isUseMaxBtn){var t,r,n,i;(t=window)===null||t===void 0?void 0:(r=t.Pedestal)===null||r===void 0?void 0:r.remote.getCurrentWindow().on("maximize",this._setMaximize);(n=window)===null||n===void 0?void 0:(i=n.Pedestal)===null||i===void 0?void 0:i.remote.getCurrentWindow().on("unmaximize",this._setUnMaximize);window.addEventListener("resize",this._correctMaxState)}(0,u.getPLogger)().info("WinHeader componentDidMount",this.props.entry)}},{key:"componentWillUnmount",value:function e(){var t,r,n,i;(t=window)===null||t===void 0?void 0:(r=t.Pedestal)===null||r===void 0?void 0:r.remote.getCurrentWindow().removeListener("maximize",this._setMaximize);(n=window)===null||n===void 0?void 0:(i=n.Pedestal)===null||i===void 0?void 0:i.remote.getCurrentWindow().removeListener("unmaximize",this._setUnMaximize);(0,u.getPLogger)().info("WinHeader componentWillUnmount",this.props.entry);window.removeEventListener("resize",this._correctMaxState)}},{key:"render",value:function e(){const{isUseMinBtn:t,isUseMaxBtn:s,isUseDrag:u,className:l,component:f,closeTestId:d,minTestId:h,maxTestId:p,langCode:v,title:m}=this.props;const{isMaximize:y}=this.state;const g=(0,r.default)({use_drag:u,no_drag:!u},`meta-head-win ${l}`);const b=v==="2052"?o.default:a.default;return(0,c.jsxs)("div",{className:g,onDoubleClick:this.doubleClick,children:[(0,c.jsx)("div",{className:"win_left",children:m||f}),(0,c.jsxs)("div",{className:"win_right",children:[t&&(0,c.jsx)(i.Minimize,{onClick:n.handleMinimize,testId:h,title:b.minimize}),s&&(0,c.jsx)(i.Maximize,{isMaximize:y,testId:p,onClick:this.maxFun,title:y?b.restore:b.maximize}),(0,c.jsx)(i.Close,{onClick:this._close,testId:d,title:b.close})]})]})}}])}(t.PureComponent);S(T,"defaultProps",{closeTestId:"",minTestId:"",maxTestId:"",isUseMinBtn:true,isUseMaxBtn:true,isUseDrag:true,isDoubleClick:false,langCode:"2052",entry:"default"})}))},40992:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(44772),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t=f(t),u(e,l()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function u(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let y=e.default=function(e){function t(...e){var n;i(this,t);n=s(this,t,[...e]);p(n,"_canvas",void 0);p(n,"_images",[]);p(n,"_animationIndex",0);p(n,"_animation",(()=>{var e;const{startShowSequenceFrames:t}=n.props;if(!t){return}const{width:i,height:o,srcList:a}=n.props;const s=1e3/a.length;const u=(e=n._canvas)===null||e===void 0?void 0:e.getContext("2d");if(!u){return}u.clearRect(0,0,i,o);u.drawImage(n._images[n._animationIndex],0,0,i,o);if(n._animationIndex===a.length-1){n._animationIndex=0;(0,r.sleep)(s).then((()=>{n._animation()}))}else{(0,r.sleep)(s).then((()=>{n._animationIndex++;n._animation()}))}}));p(n,"_renderImg",(async()=>{const{srcList:e}=n.props;const t=[];for(let r=0;r<e.length;r++){const i=new Promise((t=>{n._images[r]=new Image;n._images[r].src=e[r];n._images[r].onload=()=>{t()};n._images[r].onerror=()=>{t()}}));t.push(i)}await Promise.all(t);n._animationIndex=0;n._animation()}));p(n,"_getRef",(e=>{n._canvas=e}));return n}d(t,e);return a(t,[{key:"componentDidMount",value:function e(){this._renderImg()}},{key:"componentDidUpdate",value:function e(){this._renderImg()}},{key:"render",value:function e(){const{width:t,className:r,height:i,onClick:o,staticDom:a,startShowSequenceFrames:s}=this.props;if(!s){return a}return(0,n.jsx)("canvas",{width:t,height:i,className:r,ref:this._getRef,onClick:o})}}])}(t.Component)}))},41405:(e,t,r)=>{"use strict";var n=r(44576);var i=r(18745);var o=r(94644);var a=r(79039);var s=r(67680);var u=n.Int8Array;var c=o.aTypedArray;var l=o.exportTypedArrayMethod;var f=[].toLocaleString;var d=!!u&&a((function(){f.call(new u(1))}));var h=a((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!a((function(){u.prototype.toLocaleString.call([1,2])}));l("toLocaleString",(function e(){return i(f,d?s(c(this)):c(this),s(arguments))}),h)},41436:(e,t,r)=>{"use strict";var n=r(78227);var i=n("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{t[i]=false;return"/./"[e](t)}catch(e){}}return false}},41644:(e,t,r)=>{"use strict";r.r(t)},41822:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(16809),r(5338),r(33077),r(56974),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=s;n=a(n);function a(e){return e&&e.__esModule?e:{default:e}}function s({keyboard:e,okText:a="确定",okButtonProps:s,content:u="",zIndex:c,dialogId:l}){const f=document.createElement("div");document.body.appendChild(f);const d=(0,r.createRoot)(f);return new Promise((r=>{const h=({isClickClose:e=false}={})=>{const n=(0,t.getDialogCloseFuncList)();requestAnimationFrame((()=>{var e;d.unmount();f===null||f===void 0?void 0:(e=f.parentNode)===null||e===void 0?void 0:e.removeChild(f)}));const i=n.findIndex((e=>e.onClose===h));if(i>-1){n.splice(i,1)}r({isClickClose:e})};const p=()=>{h({isClickClose:true})};d.render((0,o.jsx)(n.default,{visible:true,width:280,maskClosable:false,onOk:p,content:u,keyboard:e,zIndex:c,footer:(0,o.jsx)(i.DefaultFooter,{cancelText:"",okButtonProps:s,okClick:p,okText:a})}));(0,t.setDialogCloseFunc)({onClose:h,keyboard:e,dialogId:l})}))}}))},41911:(e,t,r)=>{"use strict";r.r(t)},42043:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(67750);var a=r(655);var s=i("".charCodeAt);n({target:"String",proto:true},{isWellFormed:function e(){var t=a(o(this));var r=t.length;for(var n=0;n<r;n++){var i=s(t,n);if((i&63488)!==55296)continue;if(i>=56320||++n>=r||(s(t,n)&64512)!==56320)return false}return true}})},42073:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes;var n=t*4;var i=n-r%n;var o=r+i-1;e.clamp();e.words[o>>>2]|=i<<24-o%4*8;e.sigBytes+=i},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};return e.pad.Ansix923}))},42207:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(97751);var a=r(79504);var s=r(69565);var u=r(79039);var c=r(655);var l=r(22812);var f=r(92804).i2c;var d=o("btoa");var h=a("".charAt);var p=a("".charCodeAt);var v=!!d&&!u((function(){return d("hi")!=="aGk="}));var m=v&&!u((function(){d()}));var y=v&&u((function(){return d(null)!=="bnVsbA=="}));var g=v&&d.length!==1;n({global:true,bind:true,enumerable:true,forced:!v||m||y||g},{btoa:function e(t){l(arguments.length,1);if(v)return s(d,i,c(t));var r=c(t);var n="";var a=0;var u=f;var m,y;while(h(r,a)||(u="=",a%1)){y=p(r,a+=3/4);if(y>255){throw new(o("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError")}m=m<<8|y;n+=h(u,63&m>>8-a%1*8)}return n}})},42551:(e,t,r)=>{"use strict";var n=r(96395);var i=r(44576);var o=r(79039);var a=r(3607);e.exports=n||!o((function(){if(a&&a<535)return;var e=Math.random();__defineSetter__.call(null,e,(function(){}));delete i[e]}))},42762:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43802).trim;var o=r(60706);n({target:"String",proto:true,forced:o("trim")},{trim:function e(){return i(this)}})},42781:(e,t,r)=>{"use strict";var n=r(46518);var i=r(72333);n({target:"String",proto:true},{repeat:i})},42787:(e,t,r)=>{"use strict";var n=r(39297);var i=r(94901);var o=r(48981);var a=r(66119);var s=r(12211);var u=a("IE_PROTO");var c=Object;var l=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;if(i(r)&&t instanceof r){return r.prototype}return t instanceof c?l:null}},43128:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.BlockCipher;var i=t.algo;const o=16;const a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731];const s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function c(e,t){let r=t>>24&255;let n=t>>16&255;let i=t>>8&255;let o=t&255;let a=e.sbox[0][r]+e.sbox[1][n];a=a^e.sbox[2][i];a=a+e.sbox[3][o];return a}function l(e,t,r){let n=t;let i=r;let a;for(let t=0;t<o;++t){n=n^e.pbox[t];i=c(e,n)^i;a=n;n=i;i=a}a=n;n=i;i=a;i=i^e.pbox[o];n=n^e.pbox[o+1];return{left:n,right:i}}function f(e,t,r){let n=t;let i=r;let a;for(let t=o+1;t>1;--t){n=n^e.pbox[t];i=c(e,n)^i;a=n;n=i;i=a}a=n;n=i;i=a;i=i^e.pbox[1];n=n^e.pbox[0];return{left:n,right:i}}function d(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++){e.sbox[t][r]=s[t][r]}}let n=0;for(let i=0;i<o+2;i++){e.pbox[i]=a[i]^t[n];n++;if(n>=r){n=0}}let i=0;let u=0;let c=0;for(let t=0;t<o+2;t+=2){c=l(e,i,u);i=c.left;u=c.right;e.pbox[t]=i;e.pbox[t+1]=u}for(let t=0;t<4;t++){for(let r=0;r<256;r+=2){c=l(e,i,u);i=c.left;u=c.right;e.sbox[t][r]=i;e.sbox[t][r+1]=u}}return true}var h=i.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset===this._key){return}var e=this._keyPriorReset=this._key;var t=e.words;var r=e.sigBytes/4;d(u,t,r)},encryptBlock:function(e,t){var r=l(u,e[t],e[t+1]);e[t]=r.left;e[t+1]=r.right},decryptBlock:function(e,t){var r=f(u,e[t],e[t+1]);e[t]=r.left;e[t+1]=r.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(h)})();return e.Blowfish}))},43145:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}},43240:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.Base;var o=n.WordArray;var a=r.x64={};var s=a.Word=i.extend({init:function(e,t){this.high=e;this.low=t}});var u=a.WordArray=i.extend({init:function(e,r){e=this.words=e||[];if(r!=t){this.sigBytes=r}else{this.sigBytes=e.length*8}},toX32:function(){var e=this.words;var t=e.length;var r=[];for(var n=0;n<t;n++){var i=e[n];r.push(i.high);r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){var e=i.clone.call(this);var t=e.words=this.words.slice(0);var r=t.length;for(var n=0;n<r;n++){t[n]=t[n].clone()}return e}})})();return e}))},43251:(e,t,r)=>{"use strict";var n=r(76080);var i=r(69565);var o=r(35548);var a=r(48981);var s=r(26198);var u=r(70081);var c=r(50851);var l=r(44209);var f=r(18727);var d=r(94644).aTypedArrayConstructor;var h=r(75854);e.exports=function e(t){var r=o(this);var p=a(t);var v=arguments.length;var m=v>1?arguments[1]:undefined;var y=m!==undefined;var g=c(p);var b,_,S,E,w,T,I,R;if(g&&!l(g)){I=u(p,g);R=I.next;p=[];while(!(T=i(R,I)).done){p.push(T.value)}}if(y&&v>2){m=n(m,arguments[2])}_=s(p);S=new(d(r))(_);E=f(S);for(b=0;_>b;b++){w=y?m(p[b],b):p[b];S[b]=E?h(w):+w}return S}},43260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toggleShowLoading=t.togglePageState=t.toggleOrientationType=t.toggleIsShowTransparentBg=t.toggleChatBtnState=t.setRemoteContainerSize=t.setLayoutMode=t.setJobIsReady=t.resetMainState=t.mainSlice=t["default"]=void 0;var n=r(84303);var i=r(39595);var o=r(31053);var a=r(44104);var s=r(65268);const u=new a.Log({module:"HwICS.ducks.main"});const c={showLoading:true,loadingContentKey:"",chatBtnState:i.ChatBtnState.INIT,remoteContainerSize:{},pageState:i.PageState.ACTIVATION,orientationType:o.ScreenOrientationPolyfill.type,videoOrientation:o.VidoOrientationTypesMap.LANDSCAPE_PRIMARY,layoutMode:s.LayoutMode.COMPUTER,isShowTransparentBg:false,jobIsReady:false};const l=t.mainSlice=(0,n.createSlice)({name:i.ReduxModule.MAIN,initialState:c,reducers:{resetMainState:e=>{Object.assign(e,c)},toggleShowLoading:(e,t)=>{var r,n;e.showLoading=(r=t.payload)===null||r===void 0?void 0:r.show;e.loadingContentKey=(n=t.payload)===null||n===void 0?void 0:n.contentKey},toggleChatBtnState:(e,t)=>{u.info("toggleChatBtnState",t.payload);e.chatBtnState=t.payload},setRemoteContainerSize:(e,t)=>{const{width:r,height:n}=t.payload;e.remoteContainerSize={width:r,height:n};e.videoOrientation=r>n?o.VidoOrientationTypesMap.LANDSCAPE_PRIMARY:o.VidoOrientationTypesMap.PORTRAIT_PRIMARY},togglePageState:(e,t)=>{e.pageState=t.payload},toggleOrientationType:(e,t)=>{e.orientationType=t.payload},setLayoutMode:(e,t)=>{e.layoutMode=t.payload},toggleIsShowTransparentBg:(e,t)=>{e.isShowTransparentBg=t.payload},setJobIsReady:(e,t)=>{e.jobIsReady=t.payload}}});const{resetMainState:f,toggleShowLoading:d,toggleChatBtnState:h,setRemoteContainerSize:p,togglePageState:v,toggleOrientationType:m,setLayoutMode:y,toggleIsShowTransparentBg:g,setJobIsReady:b}=l.actions;t.setJobIsReady=b;t.toggleIsShowTransparentBg=g;t.setLayoutMode=y;t.toggleOrientationType=m;t.togglePageState=v;t.setRemoteContainerSize=p;t.toggleChatBtnState=h;t.toggleShowLoading=d;t.resetMainState=f;var _=t["default"]=l},43359:(e,t,r)=>{"use strict";r(58934);var n=r(46518);var i=r(53487);n({target:"String",proto:true,name:"trimStart",forced:"".trimStart!==i},{trimStart:i})},43399:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(23830),r(30258),r(94521),r(59969),r(32615)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Timer=void 0;var s,u,c,l,f,d,h,p,v;function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){var t=S(e,"string");return"symbol"==a(t)?t:t+""}function S(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var w=(0,r.getPLogger)();var T=function e(r,n){var i;return(r===null||r===void 0||(i=r.constructor)===null||i===void 0?void 0:i.name)===t.TimerTask.name&&n>0};var I=e.Timer=(s=(0,i.printfDecorator)(w),u=(0,i.printfDecorator)(w),c=(0,i.printfDecorator)(w),l=(0,i.customDecorator)({preMethodDeal:T}),f=(0,i.printfDecorator)(w),d=(0,i.customDecorator)({preMethodDeal:T}),h=(0,i.printfDecorator)(w),p=(v=function(){function e(t){var r=this;m(this,e);b(this,"_timerHandlers",[]);b(this,"_cancelTaskIdList",[]);b(this,"userWebWorker",false);b(this,"setTimeout",(function(e,t){if(r.userWebWorker){return o.WebWorkerUtil.setWorkerTimeout(e,t)}return setTimeout(e,t)}));b(this,"clearTimeout",(function(e){if(r.userWebWorker){return o.WebWorkerUtil.clearWorkerTimeout(e)}return clearTimeout(e)}));if(t!==null&&t!==void 0&&t.userWebWorker){this.userWebWorker=true}this.schedule=this.schedule.bind(this);this.scheduleFixedInterval=this.scheduleFixedInterval.bind(this);this.cancel=this.cancel.bind(this);w.debug("Timer.constructor",t)}return g(e,[{key:"cancel",value:function e(){var t=this;w.debug("Timer.cancel");this._timerHandlers.forEach((function(e){return t._cancelTask(e)}));this._timerHandlers=[];return this}},{key:"purge",value:function e(){w.debug("Timer.purge");var t;var r;for(var n=this._timerHandlers.length-1;n>-1;n--){t=this._timerHandlers[n].task;if(t.isCancel()){r=this._timerHandlers.splice(n,1);w.debug("Timer.purge",t,r[0]);this._cancelTask(r[0])}}return this}},{key:"schedule",value:function e(t,r){var i=this;w.debug("Timer.schedule",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){return t.run()["catch"]((function(e){return w.error("schedule")}))["finally"]((function(){var e=Date.now();w.debug("Timer.schedule run",e-o);if(i._cancelTaskIdList.includes(t.id)){w.warn("schedule, this task has already canceled",t.id)}else{i.schedule(t,r)}}))}),r)});return this}},{key:"scheduleFixedInterval",value:function e(t,r){var i=this;w.debug("Timer.scheduleFixedInterval",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){var e=Date.now();w.debug("Timer.scheduleFixedInterval run",e-o);t.run()["catch"]((function(e){return w.error("scheduleFixedInterval")}));i.scheduleFixedInterval(t,r)}),r)});return this}},{key:"_cancelTask",value:function e(t){w.debug("Timer._cancelTask");this.clearTimeout(t.handle);if(this._cancelTaskIdList.includes(t.id)){w.warn("_cancelTask, this task has already canceled",t.id)}else{this._cancelTaskIdList.push(t.id)}return this}}])}(),b(v,"TimerTask",t.TimerTask),v),E(p.prototype,"cancel",[s],Object.getOwnPropertyDescriptor(p.prototype,"cancel"),p.prototype),E(p.prototype,"purge",[u],Object.getOwnPropertyDescriptor(p.prototype,"purge"),p.prototype),E(p.prototype,"schedule",[c,l],Object.getOwnPropertyDescriptor(p.prototype,"schedule"),p.prototype),E(p.prototype,"scheduleFixedInterval",[f,d],Object.getOwnPropertyDescriptor(p.prototype,"scheduleFixedInterval"),p.prototype),E(p.prototype,"_cancelTask",[h],Object.getOwnPropertyDescriptor(p.prototype,"_cancelTask"),p.prototype),p)}))},43724:(e,t,r)=>{"use strict";var n=r(79039);e.exports=!n((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},43802:(e,t,r)=>{"use strict";var n=r(79504);var i=r(67750);var o=r(655);var a=r(47452);var s=n("".replace);var u=RegExp("^["+a+"]+");var c=RegExp("(^|[^"+a+"])["+a+"]+$");var l=function(e){return function(t){var r=o(i(t));if(e&1)r=s(r,u,"");if(e&2)r=s(r,c,"$1");return r}};e.exports={start:l(1),end:l(2),trim:l(3)}},43839:(e,t,r)=>{"use strict";var n=r(76080);var i=r(47055);var o=r(48981);var a=r(26198);var s=function(e){var t=e===1;return function(r,s,u){var c=o(r);var l=i(c);var f=a(l);var d=n(s,u);var h,p;while(f-- >0){h=l[f];p=d(h,f,c);if(p)switch(e){case 0:return h;case 1:return f}}return t?-1:undefined}};e.exports={findLast:s(0),findLastIndex:s(1)}},43891:function(e){(function(t,r){true?e.exports=r():0})(this,(function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,u(n.key),n)}}function o(e,t,r){if(t)i(e.prototype,t);if(r)i(e,r);Object.defineProperty(e,"prototype",{writable:false});return e}function a(e,t,r){t=u(t);if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function s(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u(e){var t=s(e,"string");return typeof t==="symbol"?t:String(t)}var c={backdrop:true,button:true,navbar:true,title:true,toolbar:true,className:"",container:"body",filter:null,fullscreen:true,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:false,interval:5e3,keyboard:true,focus:true,loading:true,loop:true,minWidth:200,minHeight:100,movable:true,rotatable:true,scalable:true,zoomable:true,zoomOnTouch:true,zoomOnWheel:true,slideOnTouch:true,toggleOnDblclick:true,tooltip:true,transition:true,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null};var l='<div class="viewer-container" tabindex="-1" touch-action="none">'+'<div class="viewer-canvas"></div>'+'<div class="viewer-footer">'+'<div class="viewer-title"></div>'+'<div class="viewer-toolbar"></div>'+'<div class="viewer-navbar">'+'<ul class="viewer-list" role="navigation"></ul>'+"</div>"+"</div>"+'<div class="viewer-tooltip" role="alert" aria-hidden="true"></div>'+'<div class="viewer-button" data-viewer-action="mix" role="button"></div>'+'<div class="viewer-player"></div>'+"</div>";var f=typeof window!=="undefined"&&typeof window.document!=="undefined";var d=f?window:{};var h=f&&d.document.documentElement?"ontouchstart"in d.document.documentElement:false;var p=f?"PointerEvent"in d:false;var v="viewer";var m="move";var y="switch";var g="zoom";var b="".concat(v,"-active");var _="".concat(v,"-close");var S="".concat(v,"-fade");var E="".concat(v,"-fixed");var w="".concat(v,"-fullscreen");var T="".concat(v,"-fullscreen-exit");var I="".concat(v,"-hide");var R="".concat(v,"-hide-md-down");var C="".concat(v,"-hide-sm-down");var k="".concat(v,"-hide-xs-down");var A="".concat(v,"-in");var O="".concat(v,"-invisible");var P="".concat(v,"-loading");var x="".concat(v,"-move");var L="".concat(v,"-open");var M="".concat(v,"-show");var N="".concat(v,"-transition");var D="click";var j="dblclick";var U="dragstart";var V="focusin";var W="keydown";var B="load";var G="error";var Z=h?"touchend touchcancel":"mouseup";var F=h?"touchmove":"mousemove";var H=h?"touchstart":"mousedown";var X=p?"pointerdown":H;var Y=p?"pointermove":F;var K=p?"pointerup pointercancel":Z;var z="resize";var J="transitionend";var Q="wheel";var q="ready";var $="show";var ee="shown";var te="hide";var re="hidden";var ne="view";var ie="viewed";var oe="move";var ae="moved";var se="rotate";var ue="rotated";var ce="scale";var le="scaled";var fe="zoom";var de="zoomed";var he="play";var pe="stop";var ve="".concat(v,"Action");var me=/\s\s*/;var ye=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ge(e){return typeof e==="string"}var be=Number.isNaN||d.isNaN;function _e(e){return typeof e==="number"&&!be(e)}function Se(e){return typeof e==="undefined"}function Ee(e){return r(e)==="object"&&e!==null}var we=Object.prototype.hasOwnProperty;function Te(e){if(!Ee(e)){return false}try{var t=e.constructor;var r=t.prototype;return t&&r&&we.call(r,"isPrototypeOf")}catch(e){return false}}function Ie(e){return typeof e==="function"}function Re(e,t){if(e&&Ie(t)){if(Array.isArray(e)||_e(e.length)){var r=e.length;var n;for(n=0;n<r;n+=1){if(t.call(e,e[n],n,e)===false){break}}}else if(Ee(e)){Object.keys(e).forEach((function(r){t.call(e,e[r],r,e)}))}}return e}var Ce=Object.assign||function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}if(Ee(t)&&n.length>0){n.forEach((function(e){if(Ee(e)){Object.keys(e).forEach((function(r){t[r]=e[r]}))}}))}return t};var ke=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Ae(e,t){var r=e.style;Re(t,(function(e,t){if(ke.test(t)&&_e(e)){e+="px"}r[t]=e}))}function Oe(e){return ge(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}function Pe(e,t){if(!e||!t){return false}return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function xe(e,t){if(!e||!t){return}if(_e(e.length)){Re(e,(function(e){xe(e,t)}));return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();if(!r){e.className=t}else if(r.indexOf(t)<0){e.className="".concat(r," ").concat(t)}}function Le(e,t){if(!e||!t){return}if(_e(e.length)){Re(e,(function(e){Le(e,t)}));return}if(e.classList){e.classList.remove(t);return}if(e.className.indexOf(t)>=0){e.className=e.className.replace(t,"")}}function Me(e,t,r){if(!t){return}if(_e(e.length)){Re(e,(function(e){Me(e,t,r)}));return}if(r){xe(e,t)}else{Le(e,t)}}var Ne=/([a-z\d])([A-Z])/g;function De(e){return e.replace(Ne,"$1-$2").toLowerCase()}function je(e,t){if(Ee(e[t])){return e[t]}if(e.dataset){return e.dataset[t]}return e.getAttribute("data-".concat(De(t)))}function Ue(e,t,r){if(Ee(r)){e[t]=r}else if(e.dataset){e.dataset[t]=r}else{e.setAttribute("data-".concat(De(t)),r)}}var Ve=function(){var e=false;if(f){var t=false;var r=function e(){};var n=Object.defineProperty({},"once",{get:function r(){e=true;return t},set:function e(r){t=r}});d.addEventListener("test",r,n);d.removeEventListener("test",r,n)}return e}();function We(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var i=r;t.trim().split(me).forEach((function(t){if(!Ve){var o=e.listeners;if(o&&o[t]&&o[t][r]){i=o[t][r];delete o[t][r];if(Object.keys(o[t]).length===0){delete o[t]}if(Object.keys(o).length===0){delete e.listeners}}}e.removeEventListener(t,i,n)}))}function Be(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var i=r;t.trim().split(me).forEach((function(t){if(n.once&&!Ve){var o=e.listeners,a=o===void 0?{}:o;i=function o(){delete a[t][r];e.removeEventListener(t,i,n);for(var s=arguments.length,u=new Array(s),c=0;c<s;c++){u[c]=arguments[c]}r.apply(e,u)};if(!a[t]){a[t]={}}if(a[t][r]){e.removeEventListener(t,a[t][r],n)}a[t][r]=i;e.listeners=a}e.addEventListener(t,i,n)}))}function Ge(e,r,n,i){var o;if(Ie(Event)&&Ie(CustomEvent)){o=new CustomEvent(r,t({bubbles:true,cancelable:true,detail:n},i))}else{o=document.createEvent("CustomEvent");o.initCustomEvent(r,true,true,n)}return e.dispatchEvent(o)}function Ze(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function Fe(e){var t=e.rotate,r=e.scaleX,n=e.scaleY,i=e.translateX,o=e.translateY;var a=[];if(_e(i)&&i!==0){a.push("translateX(".concat(i,"px)"))}if(_e(o)&&o!==0){a.push("translateY(".concat(o,"px)"))}if(_e(t)&&t!==0){a.push("rotate(".concat(t,"deg)"))}if(_e(r)&&r!==1){a.push("scaleX(".concat(r,")"))}if(_e(n)&&n!==1){a.push("scaleY(".concat(n,")"))}var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function He(e){return ge(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var Xe=d.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(d.navigator.userAgent);function Ye(e,t,r){var n=document.createElement("img");if(e.naturalWidth&&!Xe){r(e.naturalWidth,e.naturalHeight);return n}var i=document.body||document.documentElement;n.onload=function(){r(n.width,n.height);if(!Xe){i.removeChild(n)}};Re(t.inheritedAttributes,(function(t){var r=e.getAttribute(t);if(r!==null){n.setAttribute(t,r)}}));n.src=e.src;if(!Xe){n.style.cssText="left:0;"+"max-height:none!important;"+"max-width:none!important;"+"min-height:0!important;"+"min-width:0!important;"+"opacity:0;"+"position:absolute;"+"top:0;"+"z-index:-1;";i.appendChild(n)}return n}function Ke(e){switch(e){case 2:return k;case 3:return C;case 4:return R;default:return""}}function ze(e){var r=t({},e);var n=[];Re(e,(function(e,t){delete r[t];Re(r,(function(t){var r=Math.abs(e.startX-t.startX);var i=Math.abs(e.startY-t.startY);var o=Math.abs(e.endX-t.endX);var a=Math.abs(e.endY-t.endY);var s=Math.sqrt(r*r+i*i);var u=Math.sqrt(o*o+a*a);var c=(u-s)/s;n.push(c)}))}));n.sort((function(e,t){return Math.abs(e)<Math.abs(t)}));return n[0]}function Je(e,r){var n=e.pageX,i=e.pageY;var o={endX:n,endY:i};return r?o:t({timeStamp:Date.now(),startX:n,startY:i},o)}function Qe(e){var t=0;var r=0;var n=0;Re(e,(function(e){var i=e.startX,o=e.startY;t+=i;r+=o;n+=1}));t/=n;r/=n;return{pageX:t,pageY:r}}var qe={render:function e(){this.initContainer();this.initViewer();this.initList();this.renderViewer()},initBody:function e(){var t=this.element.ownerDocument;var r=t.body||t.documentElement;this.body=r;this.scrollbarWidth=window.innerWidth-t.documentElement.clientWidth;this.initialBodyPaddingRight=r.style.paddingRight;this.initialBodyComputedPaddingRight=window.getComputedStyle(r).paddingRight},initContainer:function e(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function e(){var t=this.options,r=this.parent;var n;if(t.inline){n={width:Math.max(r.offsetWidth,t.minWidth),height:Math.max(r.offsetHeight,t.minHeight)};this.parentData=n}if(this.fulled||!n){n=this.containerData}this.viewerData=Ce({},n)},renderViewer:function e(){if(this.options.inline&&!this.fulled){Ae(this.viewer,this.viewerData)}},initList:function e(){var t=this;var r=this.element,n=this.options,i=this.list;var o=[];i.innerHTML="";Re(this.images,(function(e,r){var a=e.src;var s=e.alt||He(a);var u=t.getImageURL(e);if(a||u){var c=document.createElement("li");var l=document.createElement("img");Re(n.inheritedAttributes,(function(t){var r=e.getAttribute(t);if(r!==null){l.setAttribute(t,r)}}));if(n.navbar){l.src=a||u}l.alt=s;l.setAttribute("data-original-url",u||a);c.setAttribute("data-index",r);c.setAttribute("data-viewer-action","view");c.setAttribute("role","button");if(n.keyboard){c.setAttribute("tabindex",0)}c.appendChild(l);i.appendChild(c);o.push(c)}}));this.items=o;Re(o,(function(e){var r=e.firstElementChild;var i;var o;Ue(r,"filled",true);if(n.loading){xe(e,P)}Be(r,B,i=function i(a){We(r,G,o);if(n.loading){Le(e,P)}t.loadImage(a)},{once:true});Be(r,G,o=function t(){We(r,B,i);if(n.loading){Le(e,P)}},{once:true})}));if(n.transition){Be(r,ie,(function(){xe(i,N)}),{once:true})}},renderList:function e(){var t=this.index;var r=this.items[t];if(!r){return}var n=r.nextElementSibling;var i=parseInt(window.getComputedStyle(n||r).marginLeft,10);var o=r.offsetWidth;var a=o+i;Ae(this.list,Ce({width:a*this.length-i},Fe({translateX:(this.viewerData.width-o)/2-a*t})))},resetList:function e(){var t=this.list;t.innerHTML="";Le(t,N);Ae(t,Fe({translateX:0}))},initImage:function e(t){var r=this;var n=this.options,i=this.image,o=this.viewerData;var a=this.footer.offsetHeight;var s=o.width;var u=Math.max(o.height-a,a);var c=this.imageData||{};var l;this.imageInitializing={abort:function e(){l.onload=null}};l=Ye(i,n,(function(e,i){var o=e/i;var a=Math.max(0,Math.min(1,n.initialCoverage));var l=s;var f=u;r.imageInitializing=false;if(u*o>s){f=s/o}else{l=u*o}a=_e(a)?a:.9;l=Math.min(l*a,e);f=Math.min(f*a,i);var d=(s-l)/2;var h=(u-f)/2;var p={left:d,top:h,x:d,y:h,width:l,height:f,oldRatio:1,ratio:l/e,aspectRatio:o,naturalWidth:e,naturalHeight:i};var v=Ce({},p);if(n.rotatable){p.rotate=c.rotate||0;v.rotate=0}if(n.scalable){p.scaleX=c.scaleX||1;p.scaleY=c.scaleY||1;v.scaleX=1;v.scaleY=1}r.imageData=p;r.initialImageData=v;if(t){t()}}))},renderImage:function e(t){var r=this;var n=this.image,i=this.imageData;Ae(n,Ce({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},Fe(i)));if(t){if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Pe(n,N)){var o=function e(){r.imageRendering=false;t()};this.imageRendering={abort:function e(){We(n,J,o)}};Be(n,J,o,{once:true})}else{t()}}},resetImage:function e(){var t=this.image;if(t){if(this.viewing){this.viewing.abort()}t.parentNode.removeChild(t);this.image=null;this.title.innerHTML=""}}};var $e={bind:function e(){var t=this.options,r=this.viewer,n=this.canvas;var i=this.element.ownerDocument;Be(r,D,this.onClick=this.click.bind(this));Be(r,U,this.onDragStart=this.dragstart.bind(this));Be(n,X,this.onPointerDown=this.pointerdown.bind(this));Be(i,Y,this.onPointerMove=this.pointermove.bind(this));Be(i,K,this.onPointerUp=this.pointerup.bind(this));Be(i,W,this.onKeyDown=this.keydown.bind(this));Be(window,z,this.onResize=this.resize.bind(this));if(t.zoomable&&t.zoomOnWheel){Be(r,Q,this.onWheel=this.wheel.bind(this),{passive:false,capture:true})}if(t.toggleOnDblclick){Be(n,j,this.onDblclick=this.dblclick.bind(this))}},unbind:function e(){var t=this.options,r=this.viewer,n=this.canvas;var i=this.element.ownerDocument;We(r,D,this.onClick);We(r,U,this.onDragStart);We(n,X,this.onPointerDown);We(i,Y,this.onPointerMove);We(i,K,this.onPointerUp);We(i,W,this.onKeyDown);We(window,z,this.onResize);if(t.zoomable&&t.zoomOnWheel){We(r,Q,this.onWheel,{passive:false,capture:true})}if(t.toggleOnDblclick){We(n,j,this.onDblclick)}}};var et={click:function e(t){var r=this.options,n=this.imageData;var i=t.target;var o=je(i,ve);if(!o&&i.localName==="img"&&i.parentElement.localName==="li"){i=i.parentElement;o=je(i,ve)}if(h&&t.isTrusted&&i===this.canvas){clearTimeout(this.clickCanvasTimeout)}switch(o){case"mix":if(this.played){this.stop()}else if(r.inline){if(this.fulled){this.exit()}else{this.full()}}else{this.hide()}break;case"hide":if(!this.pointerMoved){this.hide()}break;case"view":this.view(je(i,"index"));break;case"zoom-in":this.zoom(.1,true);break;case"zoom-out":this.zoom(-.1,true);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(r.loop);break;case"play":this.play(r.fullscreen);break;case"next":this.next(r.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:if(this.played){this.stop()}}},dblclick:function e(t){t.preventDefault();if(this.viewed&&t.target===this.image){if(h&&t.isTrusted){clearTimeout(this.doubleClickImageTimeout)}this.toggle(t.isTrusted?t:t.detail&&t.detail.originalEvent)}},load:function e(){var t=this;if(this.timeout){clearTimeout(this.timeout);this.timeout=false}var r=this.element,n=this.options,i=this.image,o=this.index,a=this.viewerData;Le(i,O);if(n.loading){Le(this.canvas,P)}i.style.cssText="height:0;"+"margin-left:".concat(a.width/2,"px;")+"margin-top:".concat(a.height/2,"px;")+"max-width:none!important;"+"position:relative;"+"width:0;";this.initImage((function(){Me(i,x,n.movable);Me(i,N,n.transition);t.renderImage((function(){t.viewed=true;t.viewing=false;if(Ie(n.viewed)){Be(r,ie,n.viewed,{once:true})}Ge(r,ie,{originalImage:t.images[o],index:o,image:i},{cancelable:false})}))}))},loadImage:function e(t){var r=t.target;var n=r.parentNode;var i=n.offsetWidth||30;var o=n.offsetHeight||50;var a=!!je(r,"filled");Ye(r,this.options,(function(e,t){var n=e/t;var s=i;var u=o;if(o*n>i){if(a){s=o*n}else{u=i/n}}else if(a){u=i/n}else{s=o*n}Ae(r,Ce({width:s,height:u},Fe({translateX:(i-s)/2,translateY:(o-u)/2})))}))},keydown:function e(t){var r=this.options;if(!r.keyboard){return}var n=t.keyCode||t.which||t.charCode;switch(n){case 13:if(this.viewer.contains(t.target)){this.click(t)}break}if(!this.fulled){return}switch(n){case 27:if(this.played){this.stop()}else if(r.inline){if(this.fulled){this.exit()}}else{this.hide()}break;case 32:if(this.played){this.stop()}break;case 37:if(this.played&&this.playing){this.playing.prev()}else{this.prev(r.loop)}break;case 38:t.preventDefault();this.zoom(r.zoomRatio,true);break;case 39:if(this.played&&this.playing){this.playing.next()}else{this.next(r.loop)}break;case 40:t.preventDefault();this.zoom(-r.zoomRatio,true);break;case 48:case 49:if(t.ctrlKey){t.preventDefault();this.toggle()}break}},dragstart:function e(t){if(t.target.localName==="img"){t.preventDefault()}},pointerdown:function e(t){var r=this.options,n=this.pointers;var i=t.buttons,o=t.button;this.pointerMoved=false;if(!this.viewed||this.showing||this.viewing||this.hiding||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(_e(i)&&i!==1||_e(o)&&o!==0||t.ctrlKey)){return}t.preventDefault();if(t.changedTouches){Re(t.changedTouches,(function(e){n[e.identifier]=Je(e)}))}else{n[t.pointerId||0]=Je(t)}var a=r.movable?m:false;if(r.zoomOnTouch&&r.zoomable&&Object.keys(n).length>1){a=g}else if(r.slideOnTouch&&(t.pointerType==="touch"||t.type==="touchstart")&&this.isSwitchable()){a=y}if(r.transition&&(a===m||a===g)){Le(this.image,N)}this.action=a},pointermove:function e(t){var r=this.pointers,n=this.action;if(!this.viewed||!n){return}t.preventDefault();if(t.changedTouches){Re(t.changedTouches,(function(e){Ce(r[e.identifier]||{},Je(e,true))}))}else{Ce(r[t.pointerId||0]||{},Je(t,true))}this.change(t)},pointerup:function e(t){var r=this;var n=this.options,i=this.action,o=this.pointers;var a;if(t.changedTouches){Re(t.changedTouches,(function(e){a=o[e.identifier];delete o[e.identifier]}))}else{a=o[t.pointerId||0];delete o[t.pointerId||0]}if(!i){return}t.preventDefault();if(n.transition&&(i===m||i===g)){xe(this.image,N)}this.action=false;if(h&&i!==g&&a&&Date.now()-a.timeStamp<500){clearTimeout(this.clickCanvasTimeout);clearTimeout(this.doubleClickImageTimeout);if(n.toggleOnDblclick&&this.viewed&&t.target===this.image){if(this.imageClicked){this.imageClicked=false;this.doubleClickImageTimeout=setTimeout((function(){Ge(r.image,j,{originalEvent:t})}),50)}else{this.imageClicked=true;this.doubleClickImageTimeout=setTimeout((function(){r.imageClicked=false}),500)}}else{this.imageClicked=false;if(n.backdrop&&n.backdrop!=="static"&&t.target===this.canvas){this.clickCanvasTimeout=setTimeout((function(){Ge(r.canvas,D,{originalEvent:t})}),50)}}}},resize:function e(){var t=this;if(!this.isShown||this.hiding){return}if(this.fulled){this.close();this.initBody();this.open()}this.initContainer();this.initViewer();this.renderViewer();this.renderList();if(this.viewed){this.initImage((function(){t.renderImage()}))}if(this.played){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}Re(this.player.getElementsByTagName("img"),(function(e){Be(e,B,t.loadImage.bind(t),{once:true});Ge(e,B)}))}},wheel:function e(t){var r=this;if(!this.viewed){return}t.preventDefault();if(this.wheeling){return}this.wheeling=true;setTimeout((function(){r.wheeling=false}),50);var n=Number(this.options.zoomRatio)||.1;var i=1;if(t.deltaY){i=t.deltaY>0?1:-1}else if(t.wheelDelta){i=-t.wheelDelta/120}else if(t.detail){i=t.detail>0?1:-1}this.zoom(-i*n,true,null,t)}};var tt={show:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var r=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing){return this}if(!this.ready){this.build();if(this.ready){this.show(t)}return this}if(Ie(n.show)){Be(r,$,n.show,{once:true})}if(Ge(r,$)===false||!this.ready){return this}if(this.hiding){this.transitioning.abort()}this.showing=true;this.open();var i=this.viewer;Le(i,I);i.setAttribute("role","dialog");i.setAttribute("aria-labelledby",this.title.id);i.setAttribute("aria-modal",true);i.removeAttribute("aria-hidden");if(n.transition&&!t){var o=this.shown.bind(this);this.transitioning={abort:function e(){We(i,J,o);Le(i,A)}};xe(i,N);i.initialOffsetWidth=i.offsetWidth;Be(i,J,o,{once:true});xe(i,A)}else{xe(i,A);this.shown()}return this},hide:function e(){var t=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var n=this.element,i=this.options;if(i.inline||this.hiding||!(this.isShown||this.showing)){return this}if(Ie(i.hide)){Be(n,te,i.hide,{once:true})}if(Ge(n,te)===false){return this}if(this.showing){this.transitioning.abort()}this.hiding=true;if(this.played){this.stop()}else if(this.viewing){this.viewing.abort()}var o=this.viewer,a=this.image;var s=function e(){Le(o,A);t.hidden()};if(i.transition&&!r){var u=function e(r){if(r&&r.target===o){We(o,J,e);t.hidden()}};var c=function e(){if(Pe(o,N)){Be(o,J,u);Le(o,A)}else{s()}};this.transitioning={abort:function e(){if(t.viewed&&Pe(a,N)){We(a,J,c)}else if(Pe(o,N)){We(o,J,u)}}};if(this.viewed&&Pe(a,N)){Be(a,J,c,{once:true});this.zoomTo(0,false,null,null,true)}else{c()}}else{s()}return this},view:function e(){var t=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.options.initialViewIndex;r=Number(r)||0;if(this.hiding||this.played||r<0||r>=this.length||this.viewed&&r===this.index){return this}if(!this.isShown){this.index=r;return this.show()}if(this.viewing){this.viewing.abort()}var n=this.element,i=this.options,o=this.title,a=this.canvas;var s=this.items[r];var u=s.querySelector("img");var c=je(u,"originalUrl");var l=u.getAttribute("alt");var f=document.createElement("img");Re(i.inheritedAttributes,(function(e){var t=u.getAttribute(e);if(t!==null){f.setAttribute(e,t)}}));f.src=c;f.alt=l;if(Ie(i.view)){Be(n,ne,i.view,{once:true})}if(Ge(n,ne,{originalImage:this.images[r],index:r,image:f})===false||!this.isShown||this.hiding||this.played){return this}var d=this.items[this.index];if(d){Le(d,b);d.removeAttribute("aria-selected")}xe(s,b);s.setAttribute("aria-selected",true);if(i.focus){s.focus()}this.image=f;this.viewed=false;this.index=r;this.imageData={};xe(f,O);if(i.loading){xe(a,P)}a.innerHTML="";a.appendChild(f);this.renderList();o.innerHTML="";var h=function e(){var r=t.imageData;var n=Array.isArray(i.title)?i.title[1]:i.title;o.innerHTML=Oe(Ie(n)?n.call(t,f,r):"".concat(l," (").concat(r.naturalWidth," × ").concat(r.naturalHeight,")"))};var p;var v;Be(n,ie,h,{once:true});this.viewing={abort:function e(){We(n,ie,h);if(f.complete){if(t.imageRendering){t.imageRendering.abort()}else if(t.imageInitializing){t.imageInitializing.abort()}}else{f.src="";We(f,B,p);if(t.timeout){clearTimeout(t.timeout)}}}};if(f.complete){this.load()}else{Be(f,B,p=function e(){We(f,G,v);t.load()},{once:true});Be(f,G,v=function e(){We(f,B,p);if(t.timeout){clearTimeout(t.timeout);t.timeout=false}Le(f,O);if(i.loading){Le(t.canvas,P)}},{once:true});if(this.timeout){clearTimeout(this.timeout)}this.timeout=setTimeout((function(){Le(f,O);t.timeout=false}),1e3)}return this},prev:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var r=this.index-1;if(r<0){r=t?this.length-1:0}this.view(r);return this},next:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var r=this.length-1;var n=this.index+1;if(n>r){n=t?0:r}this.view(n);return this},move:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;var n=this.imageData;this.moveTo(Se(t)?t:n.x+Number(t),Se(r)?r:n.y+Number(r));return this},moveTo:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var o=this.element,a=this.options,s=this.imageData;t=Number(t);n=Number(n);if(this.viewed&&!this.played&&a.movable){var u=s.x;var c=s.y;var l=false;if(_e(t)){l=true}else{t=u}if(_e(n)){l=true}else{n=c}if(l){if(Ie(a.move)){Be(o,oe,a.move,{once:true})}if(Ge(o,oe,{x:t,y:n,oldX:u,oldY:c,originalEvent:i})===false){return this}s.x=t;s.y=n;s.left=t;s.top=n;this.moving=true;this.renderImage((function(){r.moving=false;if(Ie(a.moved)){Be(o,ae,a.moved,{once:true})}Ge(o,ae,{x:t,y:n,oldX:u,oldY:c,originalEvent:i},{cancelable:false})}))}}return this},rotate:function e(t){this.rotateTo((this.imageData.rotate||0)+Number(t));return this},rotateTo:function e(t){var r=this;var n=this.element,i=this.options,o=this.imageData;t=Number(t);if(_e(t)&&this.viewed&&!this.played&&i.rotatable){var a=o.rotate;if(Ie(i.rotate)){Be(n,se,i.rotate,{once:true})}if(Ge(n,se,{degree:t,oldDegree:a})===false){return this}o.rotate=t;this.rotating=true;this.renderImage((function(){r.rotating=false;if(Ie(i.rotated)){Be(n,ue,i.rotated,{once:true})}Ge(n,ue,{degree:t,oldDegree:a},{cancelable:false})}))}return this},scaleX:function e(t){this.scale(t,this.imageData.scaleY);return this},scaleY:function e(t){this.scale(this.imageData.scaleX,t);return this},scale:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;var i=this.element,o=this.options,a=this.imageData;t=Number(t);n=Number(n);if(this.viewed&&!this.played&&o.scalable){var s=a.scaleX;var u=a.scaleY;var c=false;if(_e(t)){c=true}else{t=s}if(_e(n)){c=true}else{n=u}if(c){if(Ie(o.scale)){Be(i,ce,o.scale,{once:true})}if(Ge(i,ce,{scaleX:t,scaleY:n,oldScaleX:s,oldScaleY:u})===false){return this}a.scaleX=t;a.scaleY=n;this.scaling=true;this.renderImage((function(){r.scaling=false;if(Ie(o.scaled)){Be(i,le,o.scaled,{once:true})}Ge(i,le,{scaleX:t,scaleY:n,oldScaleX:s,oldScaleY:u},{cancelable:false})}))}}return this},zoom:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var o=this.imageData;t=Number(t);if(t<0){t=1/(1-t)}else{t=1+t}this.zoomTo(o.width*t/o.naturalWidth,r,n,i);return this},zoomTo:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var o=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var s=this.element,u=this.options,c=this.pointers,l=this.imageData;var f=l.x,d=l.y,h=l.width,p=l.height,v=l.naturalWidth,m=l.naturalHeight;t=Math.max(0,t);if(_e(t)&&this.viewed&&!this.played&&(a||u.zoomable)){if(!a){var y=Math.max(.01,u.minZoomRatio);var g=Math.min(100,u.maxZoomRatio);t=Math.min(Math.max(t,y),g)}if(o){switch(o.type){case"wheel":if(u.zoomRatio>=.055&&t>.95&&t<1.05){t=1}break;case"pointermove":case"touchmove":case"mousemove":if(t>.99&&t<1.01){t=1}break}}var b=v*t;var _=m*t;var S=b-h;var E=_-p;var w=l.ratio;if(Ie(u.zoom)){Be(s,fe,u.zoom,{once:true})}if(Ge(s,fe,{ratio:t,oldRatio:w,originalEvent:o})===false){return this}this.zooming=true;if(o){var T=Ze(this.viewer);var I=c&&Object.keys(c).length>0?Qe(c):{pageX:o.pageX,pageY:o.pageY};l.x-=S*((I.pageX-T.left-f)/h);l.y-=E*((I.pageY-T.top-d)/p)}else if(Te(i)&&_e(i.x)&&_e(i.y)){l.x-=S*((i.x-f)/h);l.y-=E*((i.y-d)/p)}else{l.x-=S/2;l.y-=E/2}l.left=l.x;l.top=l.y;l.width=b;l.height=_;l.oldRatio=w;l.ratio=t;this.renderImage((function(){r.zooming=false;if(Ie(u.zoomed)){Be(s,de,u.zoomed,{once:true})}Ge(s,de,{ratio:t,oldRatio:w,originalEvent:o},{cancelable:false})}));if(n){this.tooltip()}}return this},play:function e(){var t=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(!this.isShown||this.played){return this}var n=this.element,i=this.options;if(Ie(i.play)){Be(n,he,i.play,{once:true})}if(Ge(n,he)===false){return this}var o=this.player;var a=this.loadImage.bind(this);var s=[];var u=0;var c=0;this.played=true;this.onLoadWhenPlay=a;if(r){this.requestFullscreen(r)}xe(o,M);Re(this.items,(function(e,t){var r=e.querySelector("img");var n=document.createElement("img");n.src=je(r,"originalUrl");n.alt=r.getAttribute("alt");n.referrerPolicy=r.referrerPolicy;u+=1;xe(n,S);Me(n,N,i.transition);if(Pe(e,b)){xe(n,A);c=t}s.push(n);Be(n,B,a,{once:true});o.appendChild(n)}));if(_e(i.interval)&&i.interval>0){var l=function e(){clearTimeout(t.playing.timeout);Le(s[c],A);c-=1;c=c>=0?c:u-1;xe(s[c],A);t.playing.timeout=setTimeout(e,i.interval)};var f=function e(){clearTimeout(t.playing.timeout);Le(s[c],A);c+=1;c=c<u?c:0;xe(s[c],A);t.playing.timeout=setTimeout(e,i.interval)};if(u>1){this.playing={prev:l,next:f,timeout:setTimeout(f,i.interval)}}}return this},stop:function e(){var t=this;if(!this.played){return this}var r=this.element,n=this.options;if(Ie(n.stop)){Be(r,pe,n.stop,{once:true})}if(Ge(r,pe)===false){return this}var i=this.player;clearTimeout(this.playing.timeout);this.playing=false;this.played=false;Re(i.getElementsByTagName("img"),(function(e){We(e,B,t.onLoadWhenPlay)}));Le(i,M);i.innerHTML="";this.exitFullscreen();return this},full:function e(){var t=this;var r=this.options,n=this.viewer,i=this.image,o=this.list;if(!this.isShown||this.played||this.fulled||!r.inline){return this}this.fulled=true;this.open();xe(this.button,T);if(r.transition){Le(o,N);if(this.viewed){Le(i,N)}}xe(n,E);n.setAttribute("role","dialog");n.setAttribute("aria-labelledby",this.title.id);n.setAttribute("aria-modal",true);n.removeAttribute("style");Ae(n,{zIndex:r.zIndex});if(r.focus){this.enforceFocus()}this.initContainer();this.viewerData=Ce({},this.containerData);this.renderList();if(this.viewed){this.initImage((function(){t.renderImage((function(){if(r.transition){setTimeout((function(){xe(i,N);xe(o,N)}),0)}}))}))}return this},exit:function e(){var t=this;var r=this.options,n=this.viewer,i=this.image,o=this.list;if(!this.isShown||this.played||!this.fulled||!r.inline){return this}this.fulled=false;this.close();Le(this.button,T);if(r.transition){Le(o,N);if(this.viewed){Le(i,N)}}if(r.focus){this.clearEnforceFocus()}n.removeAttribute("role");n.removeAttribute("aria-labelledby");n.removeAttribute("aria-modal");Le(n,E);Ae(n,{zIndex:r.zIndexInline});this.viewerData=Ce({},this.parentData);this.renderViewer();this.renderList();if(this.viewed){this.initImage((function(){t.renderImage((function(){if(r.transition){setTimeout((function(){xe(i,N);xe(o,N)}),0)}}))}))}return this},tooltip:function e(){var t=this;var r=this.options,n=this.tooltipBox,i=this.imageData;if(!this.viewed||this.played||!r.tooltip){return this}n.textContent="".concat(Math.round(i.ratio*100),"%");if(!this.tooltipping){if(r.transition){if(this.fading){Ge(n,J)}xe(n,M);xe(n,S);xe(n,N);n.removeAttribute("aria-hidden");n.initialOffsetWidth=n.offsetWidth;xe(n,A)}else{xe(n,M);n.removeAttribute("aria-hidden")}}else{clearTimeout(this.tooltipping)}this.tooltipping=setTimeout((function(){if(r.transition){Be(n,J,(function(){Le(n,M);Le(n,S);Le(n,N);n.setAttribute("aria-hidden",true);t.fading=false}),{once:true});Le(n,A);t.fading=true}else{Le(n,M);n.setAttribute("aria-hidden",true)}t.tooltipping=false}),1e3);return this},toggle:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(this.imageData.ratio===1){this.zoomTo(this.imageData.oldRatio,true,null,t)}else{this.zoomTo(1,true,null,t)}return this},reset:function e(){if(this.viewed&&!this.played){this.imageData=Ce({},this.initialImageData);this.renderImage()}return this},update:function e(){var t=this;var r=this.element,n=this.options,i=this.isImg;if(i&&!r.parentNode){return this.destroy()}var o=[];Re(i?[r]:r.querySelectorAll("img"),(function(e){if(Ie(n.filter)){if(n.filter.call(t,e)){o.push(e)}}else if(t.getImageURL(e)){o.push(e)}}));if(!o.length){return this}this.images=o;this.length=o.length;if(this.ready){var a=[];Re(this.items,(function(e,t){var r=e.querySelector("img");var n=o[t];if(n&&r){if(n.src!==r.src||n.alt!==r.alt){a.push(t)}}else{a.push(t)}}));Ae(this.list,{width:"auto"});this.initList();if(this.isShown){if(this.length){if(this.viewed){var s=a.indexOf(this.index);if(s>=0){this.viewed=false;this.view(Math.max(Math.min(this.index-s,this.length-1),0))}else{var u=this.items[this.index];xe(u,b);u.setAttribute("aria-selected",true)}}}else{this.image=null;this.viewed=false;this.index=0;this.imageData={};this.canvas.innerHTML="";this.title.innerHTML=""}}}else{this.build()}return this},destroy:function e(){var t=this.element,r=this.options;if(!t[v]){return this}this.destroyed=true;if(this.ready){if(this.played){this.stop()}if(r.inline){if(this.fulled){this.exit()}this.unbind()}else if(this.isShown){if(this.viewing){if(this.imageRendering){this.imageRendering.abort()}else if(this.imageInitializing){this.imageInitializing.abort()}}if(this.hiding){this.transitioning.abort()}this.hidden()}else if(this.showing){this.transitioning.abort();this.hidden()}this.ready=false;this.viewer.parentNode.removeChild(this.viewer)}else if(r.inline){if(this.delaying){this.delaying.abort()}else if(this.initializing){this.initializing.abort()}}if(!r.inline){We(t,D,this.onStart)}t[v]=undefined;return this}};var rt={getImageURL:function e(t){var r=this.options.url;if(ge(r)){r=t.getAttribute(r)}else if(Ie(r)){r=r.call(this,t)}else{r=""}return r},enforceFocus:function e(){var t=this;this.clearEnforceFocus();Be(document,V,this.onFocusin=function(e){var r=t.viewer;var n=e.target;if(n===document||n===r||r.contains(n)){return}while(n){if(n.getAttribute("tabindex")!==null||n.getAttribute("aria-modal")==="true"){return}n=n.parentElement}r.focus()})},clearEnforceFocus:function e(){if(this.onFocusin){We(document,V,this.onFocusin);this.onFocusin=null}},open:function e(){var t=this.body;xe(t,L);if(this.scrollbarWidth>0){t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px")}},close:function e(){var t=this.body;Le(t,L);if(this.scrollbarWidth>0){t.style.paddingRight=this.initialBodyPaddingRight}},shown:function e(){var t=this.element,r=this.options,n=this.viewer;this.fulled=true;this.isShown=true;this.render();this.bind();this.showing=false;if(r.focus){n.focus();this.enforceFocus()}if(Ie(r.shown)){Be(t,ee,r.shown,{once:true})}if(Ge(t,ee)===false){return}if(this.ready&&this.isShown&&!this.hiding){this.view(this.index)}},hidden:function e(){var t=this.element,r=this.options,n=this.viewer;if(r.fucus){this.clearEnforceFocus()}this.close();this.unbind();xe(n,I);n.removeAttribute("role");n.removeAttribute("aria-labelledby");n.removeAttribute("aria-modal");n.setAttribute("aria-hidden",true);this.resetList();this.resetImage();this.fulled=false;this.viewed=false;this.isShown=false;this.hiding=false;if(!this.destroyed){if(Ie(r.hidden)){Be(t,re,r.hidden,{once:true})}Ge(t,re,null,{cancelable:false})}},requestFullscreen:function e(t){var r=this.element.ownerDocument;if(this.fulled&&!(r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement)){var n=r.documentElement;if(n.requestFullscreen){if(Te(t)){n.requestFullscreen(t)}else{n.requestFullscreen()}}else if(n.webkitRequestFullscreen){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else if(n.mozRequestFullScreen){n.mozRequestFullScreen()}else if(n.msRequestFullscreen){n.msRequestFullscreen()}}},exitFullscreen:function e(){var t=this.element.ownerDocument;if(this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){if(t.exitFullscreen){t.exitFullscreen()}else if(t.webkitExitFullscreen){t.webkitExitFullscreen()}else if(t.mozCancelFullScreen){t.mozCancelFullScreen()}else if(t.msExitFullscreen){t.msExitFullscreen()}}},change:function e(t){var r=this.options,n=this.pointers;var i=n[Object.keys(n)[0]];if(!i){return}var o=i.endX-i.startX;var a=i.endY-i.startY;switch(this.action){case m:if(o!==0||a!==0){this.pointerMoved=true;this.move(o,a,t)}break;case g:this.zoom(ze(n),false,null,t);break;case y:{this.action="switched";var s=Math.abs(o);if(s>1&&s>Math.abs(a)){this.pointers={};if(o>1){this.prev(r.loop)}else if(o<-1){this.next(r.loop)}}break}}Re(n,(function(e){e.startX=e.endX;e.startY=e.endY}))},isSwitchable:function e(){var t=this.imageData,r=this.viewerData;return this.length>1&&t.x>=0&&t.y>=0&&t.width<=r.width&&t.height<=r.height}};var nt=d.Viewer;var it=function(e){return function(){e+=1;return e}}(-1);var ot=function(){function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};n(this,e);if(!t||t.nodeType!==1){throw new Error("The first argument is required and must be an element.")}this.element=t;this.options=Ce({},c,Te(r)&&r);this.action=false;this.fading=false;this.fulled=false;this.hiding=false;this.imageClicked=false;this.imageData={};this.index=this.options.initialViewIndex;this.isImg=false;this.isShown=false;this.length=0;this.moving=false;this.played=false;this.playing=false;this.pointers={};this.ready=false;this.rotating=false;this.scaling=false;this.showing=false;this.timeout=false;this.tooltipping=false;this.viewed=false;this.viewing=false;this.wheeling=false;this.zooming=false;this.pointerMoved=false;this.id=it();this.init()}o(e,[{key:"init",value:function e(){var t=this;var r=this.element,n=this.options;if(r[v]){return}r[v]=this;if(n.focus&&!n.keyboard){n.focus=false}var i=r.localName==="img";var o=[];Re(i?[r]:r.querySelectorAll("img"),(function(e){if(Ie(n.filter)){if(n.filter.call(t,e)){o.push(e)}}else if(t.getImageURL(e)){o.push(e)}}));this.isImg=i;this.length=o.length;this.images=o;this.initBody();if(Se(document.createElement(v).style.transition)){n.transition=false}if(n.inline){var a=0;var s=function e(){a+=1;if(a===t.length){var r;t.initializing=false;t.delaying={abort:function e(){clearTimeout(r)}};r=setTimeout((function(){t.delaying=false;t.build()}),0)}};this.initializing={abort:function e(){Re(o,(function(e){if(!e.complete){We(e,B,s);We(e,G,s)}}))}};Re(o,(function(e){if(e.complete){s()}else{var t;var r;Be(e,B,t=function t(){We(e,G,r);s()},{once:true});Be(e,G,r=function r(){We(e,B,t);s()},{once:true})}}))}else{Be(r,D,this.onStart=function(e){var r=e.target;if(r.localName==="img"&&(!Ie(n.filter)||n.filter.call(t,r))){t.view(t.images.indexOf(r))}})}}},{key:"build",value:function e(){if(this.ready){return}var t=this.element,r=this.options;var n=t.parentNode;var i=document.createElement("div");i.innerHTML=l;var o=i.querySelector(".".concat(v,"-container"));var a=o.querySelector(".".concat(v,"-title"));var s=o.querySelector(".".concat(v,"-toolbar"));var u=o.querySelector(".".concat(v,"-navbar"));var c=o.querySelector(".".concat(v,"-button"));var f=o.querySelector(".".concat(v,"-canvas"));this.parent=n;this.viewer=o;this.title=a;this.toolbar=s;this.navbar=u;this.button=c;this.canvas=f;this.footer=o.querySelector(".".concat(v,"-footer"));this.tooltipBox=o.querySelector(".".concat(v,"-tooltip"));this.player=o.querySelector(".".concat(v,"-player"));this.list=o.querySelector(".".concat(v,"-list"));o.id="".concat(v).concat(this.id);a.id="".concat(v,"Title").concat(this.id);xe(a,!r.title?I:Ke(Array.isArray(r.title)?r.title[0]:r.title));xe(u,!r.navbar?I:Ke(r.navbar));Me(c,I,!r.button);if(r.keyboard){c.setAttribute("tabindex",0)}if(r.backdrop){xe(o,"".concat(v,"-backdrop"));if(!r.inline&&r.backdrop!=="static"){Ue(f,ve,"hide")}}if(ge(r.className)&&r.className){r.className.split(me).forEach((function(e){xe(o,e)}))}if(r.toolbar){var d=document.createElement("ul");var h=Te(r.toolbar);var p=ye.slice(0,3);var m=ye.slice(7,9);var y=ye.slice(9);if(!h){xe(s,Ke(r.toolbar))}Re(h?r.toolbar:ye,(function(e,t){var n=h&&Te(e);var i=h?De(t):e;var o=n&&!Se(e.show)?e.show:e;if(!o||!r.zoomable&&p.indexOf(i)!==-1||!r.rotatable&&m.indexOf(i)!==-1||!r.scalable&&y.indexOf(i)!==-1){return}var a=n&&!Se(e.size)?e.size:e;var s=n&&!Se(e.click)?e.click:e;var u=document.createElement("li");if(r.keyboard){u.setAttribute("tabindex",0)}u.setAttribute("role","button");xe(u,"".concat(v,"-").concat(i));if(!Ie(s)){Ue(u,ve,i)}if(_e(o)){xe(u,Ke(o))}if(["small","large"].indexOf(a)!==-1){xe(u,"".concat(v,"-").concat(a))}else if(i==="play"){xe(u,"".concat(v,"-large"))}if(Ie(s)){Be(u,D,s)}d.appendChild(u)}));s.appendChild(d)}else{xe(s,I)}if(!r.rotatable){var g=s.querySelectorAll('li[class*="rotate"]');xe(g,O);Re(g,(function(e){s.appendChild(e)}))}if(r.inline){xe(c,w);Ae(o,{zIndex:r.zIndexInline});if(window.getComputedStyle(n).position==="static"){Ae(n,{position:"relative"})}n.insertBefore(o,t.nextSibling)}else{xe(c,_);xe(o,E);xe(o,S);xe(o,I);Ae(o,{zIndex:r.zIndex});var b=r.container;if(ge(b)){b=t.ownerDocument.querySelector(b)}if(!b){b=this.body}b.appendChild(o)}if(r.inline){this.render();this.bind();this.isShown=true}this.ready=true;if(Ie(r.ready)){Be(t,q,r.ready,{once:true})}if(Ge(t,q)===false){this.ready=false;return}if(this.ready&&r.inline){this.view(this.index)}}}],[{key:"noConflict",value:function t(){window.Viewer=nt;return e}},{key:"setDefaults",value:function e(t){Ce(c,Te(t)&&t)}}]);return e}();Ce(ot.prototype,qe,$e,et,tt,rt);return ot}))},44086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.showGammaEnvCaError=t.formatParamError=t.dealWebsocketError=t.dealSparkRTCError=t.dealNormalEnd=t.dealHttpError=t.dealHcsoError=t.checkGammaEnvCaError=void 0;var n=r(26440);var i=r(49);var o=r(21013);var a=r(63226);var s=r(44104);var u=r(94855);var c=p(r(86425));var l=r(11686);var f=r(84743);var d=r(69988);var h=r(82118);function p(e){return e&&e.__esModule?e:{default:e}}const v=new s.Log({module:"HwICS.dealError"});const m=({error:e,entry:t,type:r})=>{t+=",dealError";o.UserTrack.addUserTrack({arg1:a.Arg1Map.APP_ERROR,arg2:r,args:{message:e===null||e===void 0?void 0:e.error_msg,error:e===null||e===void 0?void 0:e.error_code,key:e===null||e===void 0?void 0:e.request_id,entry:t}});return v.makeError({code:e===null||e===void 0?void 0:e.error_code,message:e===null||e===void 0?void 0:e.error_msg})};const y=({error:e,entry:t,url:r,showErrorTips:s=true})=>{t+=",dealHttpError";if(!s){o.UserTrack.addUserTrack({arg1:a.Arg1Map.APP_ERROR,arg2:r,args:{message:e===null||e===void 0?void 0:e.error_msg,error:e===null||e===void 0?void 0:e.error_code,key:e===null||e===void 0?void 0:e.request_id,entry:t}});return}(0,n.$dispatch)((0,i.setHttpError)(e));m({error:e,entry:t,type:r})};t.dealHttpError=y;const g=({error:e,entry:t,showErrorTips:r=true})=>{t+=",dealNormalEnd";if(!r){o.UserTrack.addUserTrack({arg1:a.Arg1Map.APP_ERROR,arg2:"dealNormalEnd",args:{message:e===null||e===void 0?void 0:e.error_msg,error:e===null||e===void 0?void 0:e.error_code,key:e===null||e===void 0?void 0:e.request_id,entry:t}});return}if(e.error_code===l.SDKErrorCode.WORKER_JOB_STOP_BY_MUTE_OVERTIME){var s;v.error("handleJobEnd");h.NotifyManager.sendJobEnd({entry:"dealError",data:{jobId:((s=u.ConfigManager.getChatInfo(t))===null||s===void 0?void 0:s.job_id)||"",reason:e===null||e===void 0?void 0:e.error_msg}})}(0,n.$dispatch)((0,i.setHttpError)(e))};t.dealNormalEnd=g;const b=async({error:e,entry:t})=>{t+=",dealSparkRTCError";(0,n.$dispatch)((0,i.setSparkRTCError)(e));return m({error:e,entry:t,type:"SparkRTC"})};t.dealSparkRTCError=b;const _=async({error:e,entry:t})=>{t+=",dealWebsocketError";(0,n.$dispatch)((0,i.setWebsocketError)(e));return m({error:e,entry:t,type:"Websocket"})};t.dealWebsocketError=_;const S=async({error:e,entry:t})=>{t+=",dealHcsoError";(0,n.$dispatch)((0,i.setWebsocketError)(e));return m({error:e,entry:t,type:"Hcso"})};t.dealHcsoError=S;const E=async e=>{if(!u.ConfigManager.isGammaEnv()){return false}_({error:{error_code:l.SDKErrorCode.WEBSOCKET_NETWORK_ERROR,error_msg:"check host network",request_id:""},entry:"gammaEnvCheckCaError"});(0,n.$dispatch)((0,i.toggleShowCaError)({showCaError:true,caErrorUrl:e}));return true};t.showGammaEnvCaError=E;const w=async e=>{if(!u.ConfigManager.isGammaEnv()){return false}const t=await c.default.get(e).catch((e=>e));v.debug("gammaEnvCheckCaError",t);if(t.code!==c.default.AxiosError.ERR_NETWORK){return false}return E(e)};t.checkGammaEnvCaError=w;const T=e=>({result:false,errorCode:l.SDKErrorCode.UI_PARAM_ERROR,errorMsg:f.Utils.formatLanguage(d.SDKErrorCodeMsgMap[l.SDKErrorCode.UI_PARAM_ERROR],e)});t.formatParamError=T},44104:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Log=void 0;var n=r(50300);var i=r(55349);var o=r(44772);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let p=t.Log=function(){function e({module:t}){c(this,e);this._logger=(0,n.getLogger)(t);this._module=t;this.debug=this._printf("debug");this.info=this._printf("info");this.warn=this._printf("warn");this.error=this._printf("error")}return f(e,[{key:"throwError",value:function e(t){throw this.makeError(t)}},{key:"makeError",value:function e(t){return new i.ICSError(s(s({},t),{},{module:this._module}))}},{key:"rejectError",value:function e(t){return Promise.reject(this.makeError(t))}},{key:"_printf",value:function t(r){const n=e._logLevelList.indexOf(r);return(...t)=>{if(e._logLevelIndex>-1&&n>=e._logLevelIndex){var i,o;(i=(o=this._logger)[r])===null||i===void 0?void 0:i.call(o,...t)}}}}],[{key:"setLogLevel",value:function t(r){e._logLevelIndex=e._logLevelList.indexOf(r)}},{key:"getLogLevel",value:function t(){return e._logLevelList[e._logLevelIndex]||"info"}}])}();p._logLevelList=["debug","info","warn","error","none"];p._logLevelIndex=1;(0,o.setPLogger)(new p({module:"meta-util"}))},44114:(e,t,r)=>{"use strict";var n=r(46518);var i=r(48981);var o=r(26198);var a=r(34527);var s=r(96837);var u=r(79039);var c=u((function(){return[].push.call({length:4294967296},1)!==4294967297}));var l=function(){try{Object.defineProperty([],"length",{writable:false}).push()}catch(e){return e instanceof TypeError}};var f=c||!l();n({target:"Array",proto:true,arity:1,forced:f},{push:function e(t){var r=i(this);var n=o(r);var u=arguments.length;s(n+u);for(var c=0;c<u;c++){r[n]=arguments[c];n++}a(r,n);return n}})},44124:(e,t,r)=>{"use strict";var n=r(44576);e.exports=function(e,t){var r=n[e];var i=r&&r.prototype;return i&&i[t]}},44204:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402).add;var o=r(89286);var a=r(83789);var s=r(40507);e.exports=function e(t){var r=n(this);var u=a(t).getIterator();var c=o(r);s(u,(function(e){i(c,e)}));return c}},44209:(e,t,r)=>{"use strict";var n=r(78227);var i=r(26269);var o=n("iterator");var a=Array.prototype;e.exports=function(e){return e!==undefined&&(i.Array===e||a[o]===e)}},44213:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79504);var o=r(69565);var a=r(79039);var s=r(71072);var u=r(33717);var c=r(48773);var l=r(48981);var f=r(47055);var d=Object.assign;var h=Object.defineProperty;var p=i([].concat);e.exports=!d||a((function(){if(n&&d({b:1},d(h({},"a",{enumerable:true,get:function(){h(this,"b",{value:3,enumerable:false})}}),{b:2})).b!==1)return true;var e={};var t={};var r=Symbol("assign detection");var i="abcdefghijklmnopqrst";e[r]=7;i.split("").forEach((function(e){t[e]=e}));return d({},e)[r]!==7||s(d({},t)).join("")!==i}))?function e(t,r){var i=l(t);var a=arguments.length;var d=1;var h=u.f;var v=c.f;while(a>d){var m=f(arguments[d++]);var y=h?p(s(m),h(m)):s(m);var g=y.length;var b=0;var _;while(g>b){_=y[b++];if(!n||o(v,m,_))i[_]=m[_]}}return i}:d},44246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HWIcsElectron=void 0;var n=r(44104);var i=r(46677);var o=r(44772);var a=r(84743);var s=r(94855);var u=r(55443);var c=r(39595);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const b=new n.Log({module:"HwICS.HWIcsElectron"});let _=t.HWIcsElectron=function(){function e(){h(this,e)}return v(e,null,[{key:"isHWIcsElectron",value:function e(){return!!window.hwIcsElectron&&(navigator.userAgent.includes("Electron")||navigator.userAgent.includes("IntelligentInteraction"))}},{key:"registerWakeup",value:function e(t){var r,n;b.info("registerWakeup");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerWakeup)===null||n===void 0?void 0:n.call(r,t)}},{key:"registerUserTrack",value:function e(t){var r,n;b.info("registerUserTrack");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerUserTrack)===null||n===void 0?void 0:n.call(r,t)}},{key:"registerMaximize",value:function e(t){var r,n;b.info("registerMaximize");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerMaximize)===null||n===void 0?void 0:n.call(r,t)}},{key:"registerMinimize",value:function e(t){var r,n;b.info("registerMinimize");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerMinimize)===null||n===void 0?void 0:n.call(r,t)}},{key:"registerUnMaximize",value:function e(t){var r,n;b.info("registerUnMaximize");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerUnMaximize)===null||n===void 0?void 0:n.call(r,t)}},{key:"maximizeWindow",value:function e(){var t,r;b.info("maximizeWindow");(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.maximizeWindow)===null||r===void 0?void 0:r.call(t)}},{key:"minimizeWindow",value:function e(){var t,r;b.info("minimizeWindow");(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.minimizeWindow)===null||r===void 0?void 0:r.call(t)}},{key:"unMaximizeWindow",value:function e(){var t,r;b.info("unMaximizeWindow");(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.unMaximizeWindow)===null||r===void 0?void 0:r.call(t)}},{key:"closeWindow",value:function e(){var t,r;b.info("closeWindow");(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.closeWindow)===null||r===void 0?void 0:r.call(t)}},{key:"isMaximizedWindow",value:async function e(){var t,r;b.info("isMaximizedWindow start");const n=await((t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.isMaximizedWindow)===null||r===void 0?void 0:r.call(t));b.info("isMaximizedWindow result: ",n);return n}},{key:"getAppLangCode",value:async function e(){var t,r;b.info("getAppLangCode start");const n=await((t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.getAppLang)===null||r===void 0?void 0:r.call(t));b.info("getAppLangCode result: ",n);return a.Utils.formatLangCode(n)}},{key:"setJobInfo",value:function e(t){var r,n;b.info("setJobInfo",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.setJobInfo)===null||n===void 0?void 0:n.call(r,t)}},{key:"getWakeupWords",value:function e(){var t,r;b.info("getWakeupWords");return((t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.getWakeupWords)===null||r===void 0?void 0:r.call(t))||{[i.LanguageCode.ZH_CN]:{startChatWord:"你好 云笙",stopChatWord:"再见 云笙",stopSpeakingWord:"停止回答"},[i.LanguageCode.EN_US]:{startChatWord:"Hello sara",stopChatWord:"Goodbye sara",stopSpeakingWord:"Stop answer"}}}},{key:"showAdvertise",value:function e(t){var r,n;b.info("showAdvertise",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.showAdvertise)===null||n===void 0?void 0:n.call(r)}},{key:"hideAdvertise",value:function e(t){var r,n;b.info("hideAdvertise",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.hideAdvertise)===null||n===void 0?void 0:n.call(r)}},{key:"hideAdvertiseStartSpeak",value:function e(t){var r,n;b.info("hideAdvertiseStartSpeak",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.hideAdvertiseStartSpeak)===null||n===void 0?void 0:n.call(r)}},{key:"showAdvertiseMoreInfo",value:function e(t){var r,n;b.info("showAdvertiseMoreInfo",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.showAdvertiseMoreInfo)===null||n===void 0?void 0:n.call(r)}},{key:"hideAdvertiseMoreInfo",value:function e(t){var r,n;b.info("hideAdvertiseMoreInfo",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.hideAdvertiseMoreInfo)===null||n===void 0?void 0:n.call(r)}},{key:"addConfig",value:async function e(t){var r,n;b.info("addConfig",t.entry,t.key);return(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.addConfig)===null||n===void 0?void 0:n.call(r,t.key,JSON.stringify(t.value))}},{key:"queryConfig",value:async function e(t){try{var r,n;b.info("queryConfig",t);const e=await((r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.queryConfig)===null||n===void 0?void 0:n.call(r,t.key));if(e){return JSON.parse(e)}return null}catch(e){b.error("queryConfig",t,e);return null}}},{key:"deleteConfig",value:function e(t){var r,n;b.info("deleteConfig",t);return(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.deleteConfig)===null||n===void 0?void 0:n.call(r,t.key)}},{key:"saveAuthInfo",value:async function t(r){var n;b.info("saveAuthInfo",r.entry);const i=await u.StorageManager.formatKey(e._cacheAuthInfoKey);if(i===e._cacheAuthInfoKey&&a.Utils.functionCheck((n=window.hwIcsElectron)===null||n===void 0?void 0:n.saveAuthInfo)){var o;return(o=window.hwIcsElectron)===null||o===void 0?void 0:o.saveAuthInfo(r.value)}return e.addConfig({key:i,value:r.value,entry:`${r.entry},saveAuthInfo`})}},{key:"queryAuthInfo",value:async function t(r){var n;b.info("queryAuthInfo",r);const i=await u.StorageManager.formatKey(e._cacheAuthInfoKey);if(i===e._cacheAuthInfoKey&&a.Utils.functionCheck((n=window.hwIcsElectron)===null||n===void 0?void 0:n.queryAuthInfo)){return window.hwIcsElectron.queryAuthInfo()}return e.queryConfig({key:i,entry:`${r},queryAuthInfo`})}},{key:"deleteAuthInfo",value:async function t(r){var n;b.info("deleteAuthInfo",r);const i=await u.StorageManager.formatKey(e._cacheAuthInfoKey);if(i===e._cacheAuthInfoKey&&a.Utils.functionCheck((n=window.hwIcsElectron)===null||n===void 0?void 0:n.deleteAuthInfo)){return window.hwIcsElectron.deleteAuthInfo()}return e.deleteConfig({key:i,entry:`${r},deleteAuthInfo`})}},{key:"callCloudWatch",value:function e(t){var r,n;b.info("callCloudWatch",t);return(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.callCloudWatch)===null||n===void 0?void 0:n.call(r)}},{key:"registerMethod",value:function e(t){var r,n;b.info("registerMethod");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerMethod)===null||n===void 0?void 0:n.call(r,t)}},{key:"saveChatInfo",value:async function t(r,n){try{var i,o;const t=s.ConfigManager.getRobotId(n);const l={job_id:r.job_id,chat_subtitle_config:r.chat_subtitle_config,video_config:r.video_config,chat_access_address:r.chat_access_address,chat_access_rest_address:r.chat_access_rest_address,media_access_url:r.media_access_url,region:r.region,voice_config_list:r.voice_config_list,default_language:r.default_language,deployment_mode:r.deployment_mode,cacheRobotId:t,enableVadInterrupt:s.ConfigManager.getConfig(c.ConfigKey.ENABLE_VAD_INTERRUPT)};b.info("saveChatInfo",n,l);const d=await u.StorageManager.formatKey(e.cacheJobInfoKey);if(d===e.cacheJobInfoKey&&a.Utils.functionCheck((i=window.hwIcsElectron)===null||i===void 0?void 0:i.saveChatInfo)){return window.hwIcsElectron.saveChatInfo(f(f({},r),{},{cacheRobotId:t,enableVadInterrupt:s.ConfigManager.getConfig(c.ConfigKey.ENABLE_VAD_INTERRUPT)}))}if(a.Utils.functionCheck((o=window.hwIcsElectron)===null||o===void 0?void 0:o.addConfig)){return e.addConfig({key:d,value:f(f({},r),{},{cacheRobotId:t,enableVadInterrupt:s.ConfigManager.getConfig(c.ConfigKey.ENABLE_VAD_INTERRUPT)}),entry:`${n},saveChatInfo`})}return u.StorageManager.setLocalStorageItem({key:e.cacheJobInfoKey,value:JSON.stringify(l),isForce:true})}catch(e){b.error("saveChatInfo",r,e);return null}}},{key:"setLangCode",value:async function e(t,r){var n,i;b.info("setLangCode",r,t,!!((n=window.hwIcsElectron)!==null&&n!==void 0&&n.setLangCode));if(a.Utils.functionCheck((i=window.hwIcsElectron)===null||i===void 0?void 0:i.setLangCode)){window.hwIcsElectron.setLangCode(t)}}},{key:"queryChatInfo",value:async function t(r){var n,i;b.info("queryChatInfo",r);const o=await u.StorageManager.formatKey(e.cacheJobInfoKey);if(o===e.cacheJobInfoKey&&a.Utils.functionCheck((n=window.hwIcsElectron)===null||n===void 0?void 0:n.queryChatInfo)){const e=await window.hwIcsElectron.queryChatInfo();b.info("queryChatInfo",r,e.job_id,e.cacheRobotId);return e}if(a.Utils.functionCheck((i=window.hwIcsElectron)===null||i===void 0?void 0:i.queryConfig)){const t=await e.queryConfig({key:o,entry:`${r},queryChatInfo`});b.info("queryChatInfo",r,t.job_id,t.cacheRobotId);return t}const s=await u.StorageManager.getLocalStorageItem(e.cacheJobInfoKey);b.info("queryChatInfo",r,s);if(!s){return undefined}try{return JSON.parse(s)}catch(e){return undefined}}},{key:"deleteChatInfo",value:async function t(r){var n,i;b.info("deleteChatInfo",r);const o=await u.StorageManager.formatKey(e.cacheJobInfoKey);if(o===e.cacheJobInfoKey&&a.Utils.functionCheck((n=window.hwIcsElectron)===null||n===void 0?void 0:n.deleteChatInfo)){return window.hwIcsElectron.deleteChatInfo()}if(a.Utils.functionCheck((i=window.hwIcsElectron)===null||i===void 0?void 0:i.deleteConfig)){return e.deleteConfig({key:o,entry:`${r},deleteAuthInfo`})}return u.StorageManager.removeLocalStorageItem(e.cacheJobInfoKey)}},{key:"getActiveHumanIndex",value:function e(){var t,r;b.info("getActiveHumanIndex");return(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.getActiveHumanIndex)===null||r===void 0?void 0:r.call(t)}},{key:"selectActiveHuman",value:function e(t){var r,n;b.info("selectActiveHuman",t);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.selectActiveHuman)===null||n===void 0?void 0:n.call(r,t)}},{key:"getMultipleDigitalHumanConfig",value:function e(){var t,r;b.info("getMultipleDigitalHumanConfig");return(t=window.hwIcsElectron)===null||t===void 0?void 0:(r=t.getMultipleDigitalHumanConfig)===null||r===void 0?void 0:r.call(t)}},{key:"registerActivePageChange",value:function e(t){var r,n;b.info("registerActivePageChange");(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.registerActivePageChange)===null||n===void 0?void 0:n.call(r,t)}},{key:"setWebSDKEvent",value:function e(t){var r,n;b.info("setWebSDKEvent",t.eventName);(r=window.hwIcsElectron)===null||r===void 0?void 0:(n=r.setWebSDKEvent)===null||n===void 0?void 0:n.call(r,t)}}])}();_._cacheAuthInfoKey="cacheAuthInfo";_.cacheJobInfoKey="cacheJobInfo";g([(0,o.printfDecorator)(b)],_,"isHWIcsElectron",null);g([(0,o.printfDecorator)(b)],_,"registerWakeup",null);g([(0,o.printfDecorator)(b)],_,"registerUserTrack",null);g([(0,o.printfDecorator)(b)],_,"registerMaximize",null);g([(0,o.printfDecorator)(b)],_,"registerUnMaximize",null);g([(0,o.printfDecorator)(b)],_,"maximizeWindow",null);g([(0,o.printfDecorator)(b)],_,"unMaximizeWindow",null);g([(0,o.printfDecorator)(b)],_,"closeWindow",null);g([(0,o.printfDecorator)(b)],_,"isMaximizedWindow",null);g([(0,o.printfDecorator)(b)],_,"getAppLangCode",null);g([(0,o.printfDecorator)(b)],_,"setJobInfo",null);g([(0,o.printfDecorator)(b)],_,"getWakeupWords",null);g([(0,o.printfDecorator)(b)],_,"showAdvertise",null);g([(0,o.printfDecorator)(b)],_,"hideAdvertise",null);g([(0,o.printfDecorator)(b)],_,"hideAdvertiseStartSpeak",null);g([(0,o.printfDecorator)(b)],_,"showAdvertiseMoreInfo",null);g([(0,o.printfDecorator)(b)],_,"hideAdvertiseMoreInfo",null);g([(0,o.printfDecorator)(b)],_,"addConfig",null);g([(0,o.printfDecorator)(b)],_,"queryConfig",null);g([(0,o.printfDecorator)(b)],_,"deleteConfig",null);g([(0,o.printfDecorator)(b)],_,"saveAuthInfo",null);g([(0,o.printfDecorator)(b)],_,"queryAuthInfo",null);g([(0,o.printfDecorator)(b)],_,"deleteAuthInfo",null);g([(0,o.printfDecorator)(b)],_,"callCloudWatch",null);g([(0,o.printfDecorator)(b)],_,"registerMethod",null);g([(0,o.printfDecorator)(b)],_,"saveChatInfo",null);g([(0,o.printfDecorator)(b)],_,"setLangCode",null);g([(0,o.printfDecorator)(b)],_,"queryChatInfo",null);g([(0,o.printfDecorator)(b)],_,"deleteChatInfo",null);g([(0,o.printfDecorator)(b)],_,"getActiveHumanIndex",null);g([(0,o.printfDecorator)(b)],_,"selectActiveHuman",null);g([(0,o.printfDecorator)(b)],_,"getMultipleDigitalHumanConfig",null);g([(0,o.printfDecorator)(b)],_,"registerActivePageChange",null);g([(0,o.printfDecorator)(b)],_,"setWebSDKEvent",null)},44265:(e,t,r)=>{"use strict";var n=r(82839);e.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble!="undefined"},44363:(e,t,r)=>{"use strict";if(true){e.exports=r(22799)}else{}},44435:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Number",stat:true,nonConfigurable:true,nonWritable:true},{MIN_SAFE_INTEGER:-9007199254740991})},44496:(e,t,r)=>{"use strict";var n=r(94644);var i=r(19617).includes;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("includes",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},44576:function(e,t,r){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof r.g=="object"&&r.g)||n(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},44617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);var o=r(69733);r(38360);var a=r(26440);var s=r(44772);var u=r(32681);var c=r(44104);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e,t,r){return t=b(t),m(e,g()?Reflect.construct(t,r||[],b(e).constructor):t.apply(e,r))}function m(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var E=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const w=new c.Log({module:"HwICS.UI.ClearBtn"});let T=function(e){function t(){var e;l(this,t);e=v(this,t,arguments);e._onClick=async()=>{w.info("_onClick");(0,a.$dispatch)((0,u.clearCaptionMessageList)())};return e}_(t,e);return d(t,[{key:"render",value:function e(){const{language:t}=this.props;return(0,n.jsxs)("div",{className:"clear-btn box-shadow",onClick:this._onClick,children:[(0,n.jsx)("div",{className:"clear-btn-bg","data-testid":"clearBtn"}),(0,n.jsx)("div",{className:"clear-btn-content",children:t.brandNewConversation})]})}}])}(i.Component);T=E([(0,s.componentDecorator)(w)],T);const I=e=>({language:e.lang.language});var R=t["default"]=(0,o.connect)(I)(T)},44732:(e,t,r)=>{"use strict";var n=r(94644);var i=r(79504);var o=r(79306);var a=r(35370);var s=n.aTypedArray;var u=n.getTypedArrayConstructor;var c=n.exportTypedArrayMethod;var l=i(n.TypedArrayPrototype.sort);c("toSorted",(function e(t){if(t!==undefined)o(t);var r=s(this);var n=a(u(r),r);return l(n,t)}))},44772:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(92771),r(53898),r(30258),r(24081),r(93736),r(53803),r(1068),r(49220),r(49222),r(90394),r(94521),r(59969),r(8707),r(58360),r(88159),r(43399),r(92897),r(2265),r(32615),r(50375),r(82144),r(20362),r(30916),r(77867),r(39403),r(74994),r(5555),r(37360),r(21421)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_,S,E,w,T,I,R,C,k,A){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"AtomicAction",{enumerable:true,get:function e(){return C.AtomicAction}});Object.defineProperty(e,"AudioContextLocalRecorder",{enumerable:true,get:function e(){return w.AudioContextLocalRecorder}});Object.defineProperty(e,"AutoQueryData",{enumerable:true,get:function e(){return y.AutoQueryData}});Object.defineProperty(e,"BasicLocalTransparentVideoBg",{enumerable:true,get:function e(){return E.BasicLocalTransparentVideoBg}});Object.defineProperty(e,"Clipboard",{enumerable:true,get:function e(){return A.Clipboard}});Object.defineProperty(e,"CustomPromise",{enumerable:true,get:function e(){return R.CustomPromise}});Object.defineProperty(e,"DownloadAudio",{enumerable:true,get:function e(){return _.DownloadAudio}});Object.defineProperty(e,"InputCodecsEnum",{enumerable:true,get:function e(){return S.InputCodecsEnum}});Object.defineProperty(e,"LazyLoad",{enumerable:true,get:function e(){return p.LazyLoad}});Object.defineProperty(e,"LocalTransparentVideoBg",{enumerable:true,get:function e(){return E.LocalTransparentVideoBg}});Object.defineProperty(e,"MediaDeviceManager",{enumerable:true,get:function e(){return T.MediaDeviceManager}});Object.defineProperty(e,"MediaStreamUtil",{enumerable:true,get:function e(){return k.MediaStreamUtil}});Object.defineProperty(e,"PCMPlayer",{enumerable:true,get:function e(){return S.PCMPlayer}});Object.defineProperty(e,"PromiseUtil",{enumerable:true,get:function e(){return I.PromiseUtil}});Object.defineProperty(e,"RequestTasksQueue",{enumerable:true,get:function e(){return u.RequestTasksQueue}});Object.defineProperty(e,"StringUtil",{enumerable:true,get:function e(){return v.StringUtil}});Object.defineProperty(e,"Timer",{enumerable:true,get:function e(){return m.Timer}});Object.defineProperty(e,"UrlUtil",{enumerable:true,get:function e(){return r.UrlUtil}});Object.defineProperty(e,"WebWorkerUtil",{enumerable:true,get:function e(){return b.WebWorkerUtil}});e.beforeJsonParse=void 0;Object.defineProperty(e,"checkBase64Image",{enumerable:true,get:function e(){return i.checkBase64Image}});e.checkHttpsUrl=e.checkHttpUrl=void 0;Object.defineProperty(e,"checkIPV4",{enumerable:true,get:function e(){return h.checkIPV4}});Object.defineProperty(e,"componentDecorator",{enumerable:true,get:function e(){return d.componentDecorator}});Object.defineProperty(e,"createEntry",{enumerable:true,get:function e(){return n.createEntry}});Object.defineProperty(e,"customDecorator",{enumerable:true,get:function e(){return d.customDecorator}});Object.defineProperty(e,"debounce",{enumerable:true,get:function e(){return n.debounce}});Object.defineProperty(e,"deepCopy",{enumerable:true,get:function e(){return n.deepCopy}});Object.defineProperty(e,"deleteItemByKeys",{enumerable:true,get:function e(){return f.deleteItemByKeys}});Object.defineProperty(e,"escapeRegExp",{enumerable:true,get:function e(){return c.escapeRegExp}});Object.defineProperty(e,"formatConfName",{enumerable:true,get:function e(){return a.formatConfName}});Object.defineProperty(e,"formatDate",{enumerable:true,get:function e(){return n.formatDate}});Object.defineProperty(e,"formatFileSize",{enumerable:true,get:function e(){return o.formatFileSize}});e.formatString=void 0;Object.defineProperty(e,"formatType",{enumerable:true,get:function e(){return n.formatType}});Object.defineProperty(e,"frequentTasksDecoratorFactory",{enumerable:true,get:function e(){return d.frequentTasksDecoratorFactory}});Object.defineProperty(e,"getClientId",{enumerable:true,get:function e(){return n.getClientId}});Object.defineProperty(e,"getElementScreenPosition",{enumerable:true,get:function e(){return s.getElementScreenPosition}});Object.defineProperty(e,"getEmailReg",{enumerable:true,get:function e(){return c.getEmailReg}});Object.defineProperty(e,"getFileName",{enumerable:true,get:function e(){return o.getFileName}});Object.defineProperty(e,"getMobilePhoneReg",{enumerable:true,get:function e(){return c.getMobilePhoneReg}});Object.defineProperty(e,"getNumberReg",{enumerable:true,get:function e(){return c.getNumberReg}});Object.defineProperty(e,"getSipNumberReg",{enumerable:true,get:function e(){return c.getSipNumberReg}});Object.defineProperty(e,"getSuffix",{enumerable:true,get:function e(){return o.getSuffix}});Object.defineProperty(e,"handleAccountPrint",{enumerable:true,get:function e(){return a.handleAccountPrint}});Object.defineProperty(e,"handleIpPrint",{enumerable:true,get:function e(){return a.handleIpPrint}});Object.defineProperty(e,"handleNickNamePrint",{enumerable:true,get:function e(){return a.handleNickNamePrint}});Object.defineProperty(e,"handlePhoneNumberPrint",{enumerable:true,get:function e(){return a.handlePhoneNumberPrint}});Object.defineProperty(e,"handleTokenPrint",{enumerable:true,get:function e(){return a.handleTokenPrint}});Object.defineProperty(e,"handleUrlPrint",{enumerable:true,get:function e(){return a.handleUrlPrint}});Object.defineProperty(e,"hasOneInArray",{enumerable:true,get:function e(){return f.hasOneInArray}});e.isInHttpsWhiteList=e.isInHttpWhiteList=void 0;Object.defineProperty(e,"isNullOrEmpty",{enumerable:true,get:function e(){return n.isNullOrEmpty}});Object.defineProperty(e,"mergeByDay",{enumerable:true,get:function e(){return l.mergeByDay}});Object.defineProperty(e,"printfDecorator",{enumerable:true,get:function e(){return d.printfDecorator}});Object.defineProperty(e,"queryItemByKeys",{enumerable:true,get:function e(){return f.queryItemByKeys}});e.replaceStringPlaceholder=e.reactStopPropagation=void 0;Object.defineProperty(e,"setLocalStorageItem",{enumerable:true,get:function e(){return g.setLocalStorageItem}});Object.defineProperty(e,"setPLogger",{enumerable:true,get:function e(){return n.setPLogger}});Object.defineProperty(e,"setSessionStorageItem",{enumerable:true,get:function e(){return g.setSessionStorageItem}});e.showDifferentProperty=void 0;Object.defineProperty(e,"singleControlDecorator",{enumerable:true,get:function e(){return d.singleControlDecorator}});Object.defineProperty(e,"sleep",{enumerable:true,get:function e(){return n.sleep}});Object.defineProperty(e,"splitArrayByNum",{enumerable:true,get:function e(){return f.splitArrayByNum}});e.splitStringByChar=void 0;Object.defineProperty(e,"throttle",{enumerable:true,get:function e(){return n.throttle}});Object.defineProperty(e,"updateArrayItemByKeys",{enumerable:true,get:function e(){return f.updateArrayItemByKeys}});var O=e.reactStopPropagation=t.ReactUtil.reactStopPropagation;var P=e.showDifferentProperty=t.ReactUtil.showDifferentProperty;var x=e.beforeJsonParse=v.StringUtil.beforeJsonParse;var L=e.splitStringByChar=v.StringUtil.splitStringByChar;var M=e.formatString=v.StringUtil.formatString;var N=e.replaceStringPlaceholder=v.StringUtil.replaceStringPlaceholder;var D=e.checkHttpsUrl=r.UrlUtil.checkHttpsUrl;var j=e.checkHttpUrl=r.UrlUtil.checkHttpUrl;var U=e.isInHttpWhiteList=r.UrlUtil.isInHttpWhiteList;var V=e.isInHttpsWhiteList=r.UrlUtil.isInHttpsWhiteList}))},45112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ChatManager=void 0;var n=r(26440);var i=r(50306);var o=r(43260);var a=r(39595);var s=r(72640);var u=r(44104);var c=r(32681);var l=r(11686);var f=r(30455);var d=r(75625);var h=r(44246);var p=r(44772);var v=r(40494);var m=r(55798);var y=r(82118);var g=r(46677);var b=r(78435);var _=r(57160);var S=r(44086);var E=r(76264);var w=r(37857);var T=r(20927);var I=r(94855);var R=r(12574);var C=r(19993);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return(t=M(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M(n.key),n)}}function L(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(e){var t=N(e,"string");return"symbol"==typeof t?t:t+""}function N(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var D=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const j=new u.Log({module:"HwICS.ChatManager"});const U=(0,p.frequentTasksDecoratorFactory)(j);let V=t.ChatManager=function(){function e(){P(this,e)}return L(e,null,[{key:"startChat",value:async function e({entry:t,interactionMode:r=m.InteractionMode.AUDIO,wakeupType:u,preCheckPermissions:c=true}){var d,h;j.info("startChat",t,r,u);if(!R.ReduxManager.checkUserAuth()){return{result:false,chatId:"",errorCode:l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH]}}if((0,p.formatType)(r)!==p.formatType.STRING||![m.InteractionMode.AUDIO,m.InteractionMode.TEXT].includes(r)){return Promise.resolve(A(A({},(0,S.formatParamError)("interactionMode")),{},{chatId:""}))}if(!I.ConfigManager.isThirdPartyEnable()&&c&&!await I.ConfigManager.checkAudioDevice()){i.Modal.alert({content:(0,f.getErrorMessage)({errorCode:l.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR}),zIndex:1e5});(0,n.$dispatch)((0,o.toggleChatBtnState)(a.ChatBtnState.INIT));return{result:false,chatId:"",errorCode:l.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR,errorMsg:l.msgMap[l.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR]}}j.info("startChat start",t);const y=await s.PortalWssManager.getInstance().startChat({entry:t,interactionMode:r,wakeupType:u});if(!(y!==null&&y!==void 0&&y.result)){return y}w.TextDriveManager.resetCache({entry:t});j.info("startChat startSendLocalStream",t);let g;const b=(d=I.ConfigManager.getThirdPartyStream())===null||d===void 0?void 0:(h=d.getAudioTracks())===null||h===void 0?void 0:h[0];if(I.ConfigManager.isThirdPartyEnable()&&b){g=await v.StreamAdapter.startSendCustomStream(b)||undefined}else{g=await v.StreamAdapter.startSendLocalStream({entry:t,preCheckPermissions:false})}j.info("startChat end",t,!!b);return A(A({},y),g||{})}},{key:"stopChat",value:async function e({entry:t,needErrorDeal:r=true}){var i;j.info("stopChat start",t);if(!R.ReduxManager.checkUserAuth()){return{result:false,chatId:"",errorCode:l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH]}}const u=await s.PortalWssManager.getInstance().stopChat({entry:t,needErrorDeal:r});if((u===null||u===void 0?void 0:u.errorCode)===d.RetCodes.SUCCESS){E.ChatDataManager.resetChatData(t);y.NotifyManager.sendEnterSleep(t)}else if(((i=(0,n.$getState)().main)===null||i===void 0?void 0:i.chatBtnState)===a.ChatBtnState.STOPPING){(0,n.$dispatch)((0,o.toggleChatBtnState)(a.ChatBtnState.PLAY));(0,n.$dispatch)((0,c.stopChatUpdateCaptionMessageList)())}j.info("stopChat end",t);return u}},{key:"stopJob",value:function e(t){return s.PortalWssManager.getInstance().stopJob(t)}},{key:"interactionModeSwitch",value:async function t(r){if((0,p.formatType)(r===null||r===void 0?void 0:r.interactionMode)!==p.formatType.STRING||![m.InteractionMode.AUDIO,m.InteractionMode.TEXT].includes(r.interactionMode)){return Promise.resolve((0,S.formatParamError)("interactionMode"))}const n=await s.PortalWssManager.getInstance().activeInteractionMode("interactionModeSwitch");if((n===null||n===void 0?void 0:n.interactionMode)===r.interactionMode){return{result:true,interactionMode:r.interactionMode}}const i=await s.PortalWssManager.getInstance().interactionModeSwitch({entry:"SDK",interactionMode:r.interactionMode});if(i.result){await e.interruptSpeaking(r.entry);return i}return i}},{key:"interruptSpeaking",value:async function e(t){if(!R.ReduxManager.checkUserAuth()){return{result:false,errorCode:l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH]}}const r=await s.PortalWssManager.getInstance().interruptSpeaking(t);if(r.result){w.TextDriveManager.resetCache({entry:t})}return r}},{key:"textQuestion",value:function e(t){if((0,p.formatType)(t===null||t===void 0?void 0:t.text)!==p.formatType.STRING||(t===null||t===void 0?void 0:t.questionParam)!==undefined&&(0,p.formatType)(t===null||t===void 0?void 0:t.questionParam)!==p.formatType.STRING){return Promise.resolve(A(A({},(0,S.formatParamError)("text")),{},{chatId:""}))}return s.PortalWssManager.getInstance().textQuestion({entry:"SDK",text:t.text,questionParam:t.questionParam})}},{key:"startUserSpeak",value:async function t(r){var i,o;if(!R.ReduxManager.checkUserAuth()){return{result:false,errorCode:l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH]}}if(((i=(0,n.$getState)().main)===null||i===void 0?void 0:i.chatBtnState)===a.ChatBtnState.ANSWERING){return{result:false,errorCode:l.SDKErrorCode.METHOD_PROHIBITED_EXECUTION,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_PROHIBITED_EXECUTION]}}if(((o=(0,n.$getState)().main)===null||o===void 0?void 0:o.chatBtnState)===a.ChatBtnState.INIT){const t=await e.startChat({entry:"SDK.startUserSpeak",interactionMode:m.InteractionMode.AUDIO,preCheckPermissions:(r===null||r===void 0?void 0:r.preCheckPermissions)!==false});if(!t.result){return t}}return v.StreamAdapter.unmuteLocalAudio("SDK.startUserSpeak")}},{key:"sendDrivenText",value:async function e(t){if(!R.ReduxManager.checkUserAuth()){return{result:false,chatId:"",errorCode:l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH,errorMsg:l.msgMap[l.SDKErrorCode.METHOD_NOT_ALLOW_NOT_AUTH]}}const r=(0,p.createEntry)("sendDrivenText");if((0,p.formatType)(t===null||t===void 0?void 0:t.text)!==p.formatType.STRING){return A(A({},(0,S.formatParamError)("text")),{},{chatId:""})}const n=w.TextDriveManager.formatTextDrivenParam(t,r);j.info("sendDrivenText",n.isLast,n.chatId,n.seq);return s.PortalWssManager.getInstance().textDriven(n)}},{key:"wakeupCallback",value:function t(r){j.info("wakeupCallback",r);const n=(0,p.createEntry)(`wakeupCallback,${r.keyword}`);switch(r.intentions){case T.WakeupIntentions.START:e.startChat({entry:n,interactionMode:m.InteractionMode.AUDIO,wakeupType:l.WakeupType.VOICE,preCheckPermissions:I.ConfigManager.getConfig(a.ConfigKey.PRE_CHECK_PERMISSIONS)});break;case T.WakeupIntentions.STOP:e.stopChat({entry:n});break;case T.WakeupIntentions.INTERRUPT:e.interruptSpeaking(n);break;default:break}}}])}();V.canStop=()=>{const{chatBtnState:e}=(0,n.$getState)().main;return[a.ChatBtnState.PLAY,a.ChatBtnState.THINKING,a.ChatBtnState.ANSWERING].includes(e)};D([(0,p.printfDecorator)(j)],V,"stopJob",null);D([(0,p.printfDecorator)(j),U("ChatManager.interactionModeSwitch")],V,"interactionModeSwitch",null);D([(0,p.printfDecorator)(j)],V,"interruptSpeaking",null);D([(0,p.printfDecorator)(j)],V,"textQuestion",null);D([(0,p.printfDecorator)(j)],V,"startUserSpeak",null);D([(0,p.printfDecorator)(j)],V,"wakeupCallback",null);window.addEventListener(l.InnerICSEventKey.STOP_CHAT_EVENT,(e=>{const{entry:t}=e.detail;V.stopChat({entry:t,needErrorDeal:false})}));const W={[g.LanguageCode.ZH_CN]:["ni2-hao3-yun2-sheng1","yun2-sheng1-yun2-sheng1"],[g.LanguageCode.EN_US]:["hi-sara","hello-sara"]};const B={[g.LanguageCode.ZH_CN]:["ting2-zhi3-bo1-fang4","ting2-zhi3-hui2-da2"],[g.LanguageCode.EN_US]:["stop-answer"]};const G={[g.LanguageCode.ZH_CN]:["ting2-zhi3-dui4-hua4","zai4-jian4-yun2-sheng1"],[g.LanguageCode.EN_US]:["goodbye-sara"]};const Z=e=>{let t=l.WakeupType.VOICE;if(e.radarKeyword){t=l.WakeupType.RADAR}else if(e.faceKeyword){t=l.WakeupType.CAMERA}return t};h.HWIcsElectron.registerWakeup((async e=>{var t;const r=(0,p.createEntry)("registerWakeup,"+(e===null||e===void 0?void 0:e.keyword));const i=(0,n.$getState)();const o=b.LanguageManager.getLocalLangCode(r);j.info("registerWakeup",i.main.pageState,i.main.chatBtnState,i.main.showLoading,o,e);if(R.ReduxManager.checkHasError()){C.PrivateNotifyManager.sendRejoinRobotEvent({method:l.InnerICSEventMethod.REJOIN,entry:r,reason:_.RejoinReason.NETWORK_ERROR,errorCode:l.SDKErrorCode.MPS_JOB_STATE_NULL});return}if(i.main.chatBtnState===a.ChatBtnState.INIT&&(t=W[o])!==null&&t!==void 0&&t.includes(e.keyword)){await V.startChat({entry:r,interactionMode:m.InteractionMode.AUDIO,wakeupType:Z(e)})}if(V.canStop()){var s,u;if((s=G[o])!==null&&s!==void 0&&s.includes(e.keyword)){await V.stopChat({entry:r})}if((u=B[o])!==null&&u!==void 0&&u.includes(e.keyword)){await V.interruptSpeaking(r)}}}));h.HWIcsElectron.registerMethod((async e=>{const t=(0,p.createEntry)("registerMethod, "+(e===null||e===void 0?void 0:e.method));const r=(0,n.$getState)();j.info("registerMethod",e===null||e===void 0?void 0:e.method,r.main.pageState,r.main.chatBtnState,r.main.showLoading,e);if((e===null||e===void 0?void 0:e.method)==="startUserSpeak"){v.StreamAdapter.unmuteLocalAudio(t);return}if((e===null||e===void 0?void 0:e.method)==="stopUserSpeak"){v.StreamAdapter.muteLocalAudio(t);return}if((e===null||e===void 0?void 0:e.method)==="nativeRTCJoinRoom"){v.StreamAdapter.setShouldSendLocalStream(false)}}))},45374:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Number",stat:true,nonConfigurable:true,nonWritable:true},{EPSILON:Math.pow(2,-52)})},45458:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(43145);function i(e){if(Array.isArray(e))return(0,n.A)(e)}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var a=r(27800);function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){return i(e)||o(e)||(0,a.A)(e)||s()}},45471:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=r.Hasher;var o=t.algo;var a=[];var s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var o=r[2];var s=r[3];var u=r[4];for(var c=0;c<80;c++){if(c<16){a[c]=e[t+c]|0}else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(n<<5|n>>>27)+u+a[c];if(c<20){f+=(i&o|~i&s)+1518500249}else if(c<40){f+=(i^o^s)+1859775393}else if(c<60){f+=(i&o|i&s|o&s)-1894007588}else{f+=(i^o^s)-899497514}u=s;s=o;o=i<<30|i>>>2;i=n;n=f}r[0]=r[0]+n|0;r[1]=r[1]+i|0;r[2]=r[2]+o|0;r[3]=r[3]+s|0;r[4]=r[4]+u|0},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296);t[(n+64>>>9<<4)+15]=r;e.sigBytes=t.length*4;this._process();return this._hash},clone:function(){var e=i.clone.call(this);e._hash=this._hash.clone();return e}});t.SHA1=i._createHelper(s);t.HmacSHA1=i._createHmacHelper(s)})();return e.SHA1}))},45503:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var o=i.Utf16=i.Utf16BE={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var i=0;i<t;i++){r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16}return n.create(r,t*2)}};i.Utf16LE={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i+=2){var o=a(t[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var i=0;i<t;i++){r[i>>>1]|=a(e.charCodeAt(i)<<16-i%2*16)}return n.create(r,t*2)}};function a(e){return e<<8&4278255360|e>>>8&16711935}})();return e.enc.Utf16}))},45700:(e,t,r)=>{"use strict";var n=r(70511);var i=r(58242);n("toPrimitive");i()},45781:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(22812);var a=r(655);var s=r(67416);var u=i("URL");n({target:"URL",stat:true,forced:!s},{parse:function e(t){var r=o(arguments.length,1);var n=a(t);var i=r<2||arguments[1]===undefined?undefined:a(arguments[1]);try{return new u(n,i)}catch(e){return null}}})},45806:(e,t,r)=>{"use strict";r(47764);var n=r(46518);var i=r(43724);var o=r(67416);var a=r(44576);var s=r(76080);var u=r(79504);var c=r(36840);var l=r(62106);var f=r(90679);var d=r(39297);var h=r(44213);var p=r(97916);var v=r(67680);var m=r(68183).codeAt;var y=r(3717);var g=r(655);var b=r(10687);var _=r(22812);var S=r(98406);var E=r(91181);var w=E.set;var T=E.getterFor("URL");var I=S.URLSearchParams;var R=S.getState;var C=a.URL;var k=a.TypeError;var A=a.parseInt;var O=Math.floor;var P=Math.pow;var x=u("".charAt);var L=u(/./.exec);var M=u([].join);var N=u(1..toString);var D=u([].pop);var j=u([].push);var U=u("".replace);var V=u([].shift);var W=u("".split);var B=u("".slice);var G=u("".toLowerCase);var Z=u([].unshift);var F="Invalid authority";var H="Invalid scheme";var X="Invalid host";var Y="Invalid port";var K=/[a-z]/i;var z=/[\d+-.a-z]/i;var J=/\d/;var Q=/^0x/i;var q=/^[0-7]+$/;var $=/^\d+$/;var ee=/^[\da-f]+$/i;var te=/[\0\t\n\r #%/:<>?@[\\\]^|]/;var re=/[\0\t\n\r #/:<>?@[\\\]^|]/;var ne=/^[\u0000-\u0020]+/;var ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/;var oe=/[\t\n\r]/g;var ae;var se=function(e){var t=W(e,".");var r,n,i,o,a,s,u;if(t.length&&t[t.length-1]===""){t.length--}r=t.length;if(r>4)return e;n=[];for(i=0;i<r;i++){o=t[i];if(o==="")return e;a=10;if(o.length>1&&x(o,0)==="0"){a=L(Q,o)?16:8;o=B(o,a===8?1:2)}if(o===""){s=0}else{if(!L(a===10?$:a===8?q:ee,o))return e;s=A(o,a)}j(n,s)}for(i=0;i<r;i++){s=n[i];if(i===r-1){if(s>=P(256,5-r))return null}else if(s>255)return null}u=D(n);for(i=0;i<n.length;i++){u+=n[i]*P(256,3-i)}return u};var ue=function(e){var t=[0,0,0,0,0,0,0,0];var r=0;var n=null;var i=0;var o,a,s,u,c,l,f;var d=function(){return x(e,i)};if(d()===":"){if(x(e,1)!==":")return;i+=2;r++;n=r}while(d()){if(r===8)return;if(d()===":"){if(n!==null)return;i++;r++;n=r;continue}o=a=0;while(a<4&&L(ee,d())){o=o*16+A(d(),16);i++;a++}if(d()==="."){if(a===0)return;i-=a;if(r>6)return;s=0;while(d()){u=null;if(s>0){if(d()==="."&&s<4)i++;else return}if(!L(J,d()))return;while(L(J,d())){c=A(d(),10);if(u===null)u=c;else if(u===0)return;else u=u*10+c;if(u>255)return;i++}t[r]=t[r]*256+u;s++;if(s===2||s===4)r++}if(s!==4)return;break}else if(d()===":"){i++;if(!d())return}else if(d())return;t[r++]=o}if(n!==null){l=r-n;r=7;while(r!==0&&l>0){f=t[r];t[r--]=t[n+l-1];t[n+--l]=f}}else if(r!==8)return;return t};var ce=function(e){var t=null;var r=1;var n=null;var i=0;var o=0;for(;o<8;o++){if(e[o]!==0){if(i>r){t=n;r=i}n=null;i=0}else{if(n===null)n=o;++i}}return i>r?n:t};var le=function(e){var t,r,n,i;if(typeof e=="number"){t=[];for(r=0;r<4;r++){Z(t,e%256);e=O(e/256)}return M(t,".")}if(typeof e=="object"){t="";n=ce(e);for(r=0;r<8;r++){if(i&&e[r]===0)continue;if(i)i=false;if(n===r){t+=r?":":"::";i=true}else{t+=N(e[r],16);if(r<7)t+=":"}}return"["+t+"]"}return e};var fe={};var de=h({},fe,{" ":1,'"':1,"<":1,">":1,"`":1});var he=h({},de,{"#":1,"?":1,"{":1,"}":1});var pe=h({},he,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1});var ve=function(e,t){var r=m(e,0);return r>32&&r<127&&!d(t,e)?e:encodeURIComponent(e)};var me={ftp:21,file:null,http:80,https:443,ws:80,wss:443};var ye=function(e,t){var r;return e.length===2&&L(K,x(e,0))&&((r=x(e,1))===":"||!t&&r==="|")};var ge=function(e){var t;return e.length>1&&ye(B(e,0,2))&&(e.length===2||((t=x(e,2))==="/"||t==="\\"||t==="?"||t==="#"))};var be=function(e){return e==="."||G(e)==="%2e"};var _e=function(e){e=G(e);return e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"};var Se={};var Ee={};var we={};var Te={};var Ie={};var Re={};var Ce={};var ke={};var Ae={};var Oe={};var Pe={};var xe={};var Le={};var Me={};var Ne={};var De={};var je={};var Ue={};var Ve={};var We={};var Be={};var Ge=function(e,t,r){var n=g(e);var i,o,a;if(t){o=this.parse(n);if(o)throw new k(o);this.searchParams=null}else{if(r!==undefined)i=new Ge(r,true);o=this.parse(n,null,i);if(o)throw new k(o);a=R(new I);a.bindURL(this);this.searchParams=a}};Ge.prototype={type:"URL",parse:function(e,t,r){var n=this;var i=t||Se;var o=0;var a="";var s=false;var u=false;var c=false;var l,f,h,m;e=g(e);if(!t){n.scheme="";n.username="";n.password="";n.host=null;n.port=null;n.path=[];n.query=null;n.fragment=null;n.cannotBeABaseURL=false;e=U(e,ne,"");e=U(e,ie,"$1")}e=U(e,oe,"");l=p(e);while(o<=l.length){f=l[o];switch(i){case Se:if(f&&L(K,f)){a+=G(f);i=Ee}else if(!t){i=we;continue}else return H;break;case Ee:if(f&&(L(z,f)||f==="+"||f==="-"||f===".")){a+=G(f)}else if(f===":"){if(t&&(n.isSpecial()!==d(me,a)||a==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;n.scheme=a;if(t){if(n.isSpecial()&&me[n.scheme]===n.port)n.port=null;return}a="";if(n.scheme==="file"){i=Me}else if(n.isSpecial()&&r&&r.scheme===n.scheme){i=Te}else if(n.isSpecial()){i=ke}else if(l[o+1]==="/"){i=Ie;o++}else{n.cannotBeABaseURL=true;j(n.path,"");i=Ve}}else if(!t){a="";i=we;o=0;continue}else return H;break;case we:if(!r||r.cannotBeABaseURL&&f!=="#")return H;if(r.cannotBeABaseURL&&f==="#"){n.scheme=r.scheme;n.path=v(r.path);n.query=r.query;n.fragment="";n.cannotBeABaseURL=true;i=Be;break}i=r.scheme==="file"?Me:Re;continue;case Te:if(f==="/"&&l[o+1]==="/"){i=Ae;o++}else{i=Re;continue}break;case Ie:if(f==="/"){i=Oe;break}else{i=Ue;continue}case Re:n.scheme=r.scheme;if(f===ae){n.username=r.username;n.password=r.password;n.host=r.host;n.port=r.port;n.path=v(r.path);n.query=r.query}else if(f==="/"||f==="\\"&&n.isSpecial()){i=Ce}else if(f==="?"){n.username=r.username;n.password=r.password;n.host=r.host;n.port=r.port;n.path=v(r.path);n.query="";i=We}else if(f==="#"){n.username=r.username;n.password=r.password;n.host=r.host;n.port=r.port;n.path=v(r.path);n.query=r.query;n.fragment="";i=Be}else{n.username=r.username;n.password=r.password;n.host=r.host;n.port=r.port;n.path=v(r.path);n.path.length--;i=Ue;continue}break;case Ce:if(n.isSpecial()&&(f==="/"||f==="\\")){i=Ae}else if(f==="/"){i=Oe}else{n.username=r.username;n.password=r.password;n.host=r.host;n.port=r.port;i=Ue;continue}break;case ke:i=Ae;if(f!=="/"||x(a,o+1)!=="/")continue;o++;break;case Ae:if(f!=="/"&&f!=="\\"){i=Oe;continue}break;case Oe:if(f==="@"){if(s)a="%40"+a;s=true;h=p(a);for(var y=0;y<h.length;y++){var b=h[y];if(b===":"&&!c){c=true;continue}var _=ve(b,pe);if(c)n.password+=_;else n.username+=_}a=""}else if(f===ae||f==="/"||f==="?"||f==="#"||f==="\\"&&n.isSpecial()){if(s&&a==="")return F;o-=p(a).length+1;a="";i=Pe}else a+=f;break;case Pe:case xe:if(t&&n.scheme==="file"){i=De;continue}else if(f===":"&&!u){if(a==="")return X;m=n.parseHost(a);if(m)return m;a="";i=Le;if(t===xe)return}else if(f===ae||f==="/"||f==="?"||f==="#"||f==="\\"&&n.isSpecial()){if(n.isSpecial()&&a==="")return X;if(t&&a===""&&(n.includesCredentials()||n.port!==null))return;m=n.parseHost(a);if(m)return m;a="";i=je;if(t)return;continue}else{if(f==="[")u=true;else if(f==="]")u=false;a+=f}break;case Le:if(L(J,f)){a+=f}else if(f===ae||f==="/"||f==="?"||f==="#"||f==="\\"&&n.isSpecial()||t){if(a!==""){var S=A(a,10);if(S>65535)return Y;n.port=n.isSpecial()&&S===me[n.scheme]?null:S;a=""}if(t)return;i=je;continue}else return Y;break;case Me:n.scheme="file";if(f==="/"||f==="\\")i=Ne;else if(r&&r.scheme==="file"){switch(f){case ae:n.host=r.host;n.path=v(r.path);n.query=r.query;break;case"?":n.host=r.host;n.path=v(r.path);n.query="";i=We;break;case"#":n.host=r.host;n.path=v(r.path);n.query=r.query;n.fragment="";i=Be;break;default:if(!ge(M(v(l,o),""))){n.host=r.host;n.path=v(r.path);n.shortenPath()}i=Ue;continue}}else{i=Ue;continue}break;case Ne:if(f==="/"||f==="\\"){i=De;break}if(r&&r.scheme==="file"&&!ge(M(v(l,o),""))){if(ye(r.path[0],true))j(n.path,r.path[0]);else n.host=r.host}i=Ue;continue;case De:if(f===ae||f==="/"||f==="\\"||f==="?"||f==="#"){if(!t&&ye(a)){i=Ue}else if(a===""){n.host="";if(t)return;i=je}else{m=n.parseHost(a);if(m)return m;if(n.host==="localhost")n.host="";if(t)return;a="";i=je}continue}else a+=f;break;case je:if(n.isSpecial()){i=Ue;if(f!=="/"&&f!=="\\")continue}else if(!t&&f==="?"){n.query="";i=We}else if(!t&&f==="#"){n.fragment="";i=Be}else if(f!==ae){i=Ue;if(f!=="/")continue}break;case Ue:if(f===ae||f==="/"||f==="\\"&&n.isSpecial()||!t&&(f==="?"||f==="#")){if(_e(a)){n.shortenPath();if(f!=="/"&&!(f==="\\"&&n.isSpecial())){j(n.path,"")}}else if(be(a)){if(f!=="/"&&!(f==="\\"&&n.isSpecial())){j(n.path,"")}}else{if(n.scheme==="file"&&!n.path.length&&ye(a)){if(n.host)n.host="";a=x(a,0)+":"}j(n.path,a)}a="";if(n.scheme==="file"&&(f===ae||f==="?"||f==="#")){while(n.path.length>1&&n.path[0]===""){V(n.path)}}if(f==="?"){n.query="";i=We}else if(f==="#"){n.fragment="";i=Be}}else{a+=ve(f,he)}break;case Ve:if(f==="?"){n.query="";i=We}else if(f==="#"){n.fragment="";i=Be}else if(f!==ae){n.path[0]+=ve(f,fe)}break;case We:if(!t&&f==="#"){n.fragment="";i=Be}else if(f!==ae){if(f==="'"&&n.isSpecial())n.query+="%27";else if(f==="#")n.query+="%23";else n.query+=ve(f,fe)}break;case Be:if(f!==ae)n.fragment+=ve(f,de);break}o++}},parseHost:function(e){var t,r,n;if(x(e,0)==="["){if(x(e,e.length-1)!=="]")return X;t=ue(B(e,1,-1));if(!t)return X;this.host=t}else if(!this.isSpecial()){if(L(re,e))return X;t="";r=p(e);for(n=0;n<r.length;n++){t+=ve(r[n],fe)}this.host=t}else{e=y(e);if(L(te,e))return X;t=se(e);if(t===null)return X;this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return d(me,this.scheme)},shortenPath:function(){var e=this.path;var t=e.length;if(t&&(this.scheme!=="file"||t!==1||!ye(e[0],true))){e.length--}},serialize:function(){var e=this;var t=e.scheme;var r=e.username;var n=e.password;var i=e.host;var o=e.port;var a=e.path;var s=e.query;var u=e.fragment;var c=t+":";if(i!==null){c+="//";if(e.includesCredentials()){c+=r+(n?":"+n:"")+"@"}c+=le(i);if(o!==null)c+=":"+o}else if(t==="file")c+="//";c+=e.cannotBeABaseURL?a[0]:a.length?"/"+M(a,"/"):"";if(s!==null)c+="?"+s;if(u!==null)c+="#"+u;return c},setHref:function(e){var t=this.parse(e);if(t)throw new k(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme;var t=this.port;if(e==="blob")try{return new Ze(e.path[0]).origin}catch(e){return"null"}if(e==="file"||!this.isSpecial())return"null";return e+"://"+le(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(g(e)+":",Se)},getUsername:function(){return this.username},setUsername:function(e){var t=p(g(e));if(this.cannotHaveUsernamePasswordPort())return;this.username="";for(var r=0;r<t.length;r++){this.username+=ve(t[r],pe)}},getPassword:function(){return this.password},setPassword:function(e){var t=p(g(e));if(this.cannotHaveUsernamePasswordPort())return;this.password="";for(var r=0;r<t.length;r++){this.password+=ve(t[r],pe)}},getHost:function(){var e=this.host;var t=this.port;return e===null?"":t===null?le(e):le(e)+":"+t},setHost:function(e){if(this.cannotBeABaseURL)return;this.parse(e,Pe)},getHostname:function(){var e=this.host;return e===null?"":le(e)},setHostname:function(e){if(this.cannotBeABaseURL)return;this.parse(e,xe)},getPort:function(){var e=this.port;return e===null?"":g(e)},setPort:function(e){if(this.cannotHaveUsernamePasswordPort())return;e=g(e);if(e==="")this.port=null;else this.parse(e,Le)},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+M(e,"/"):""},setPathname:function(e){if(this.cannotBeABaseURL)return;this.path=[];this.parse(e,je)},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=g(e);if(e===""){this.query=null}else{if(x(e,0)==="?")e=B(e,1);this.query="";this.parse(e,We)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){e=g(e);if(e===""){this.fragment=null;return}if(x(e,0)==="#")e=B(e,1);this.fragment="";this.parse(e,Be)},update:function(){this.query=this.searchParams.serialize()||null}};var Ze=function e(t){var r=f(this,Fe);var n=_(arguments.length,1)>1?arguments[1]:undefined;var o=w(r,new Ge(t,false,n));if(!i){r.href=o.serialize();r.origin=o.getOrigin();r.protocol=o.getProtocol();r.username=o.getUsername();r.password=o.getPassword();r.host=o.getHost();r.hostname=o.getHostname();r.port=o.getPort();r.pathname=o.getPathname();r.search=o.getSearch();r.searchParams=o.getSearchParams();r.hash=o.getHash()}};var Fe=Ze.prototype;var He=function(e,t){return{get:function(){return T(this)[e]()},set:t&&function(e){return T(this)[t](e)},configurable:true,enumerable:true}};if(i){l(Fe,"href",He("serialize","setHref"));l(Fe,"origin",He("getOrigin"));l(Fe,"protocol",He("getProtocol","setProtocol"));l(Fe,"username",He("getUsername","setUsername"));l(Fe,"password",He("getPassword","setPassword"));l(Fe,"host",He("getHost","setHost"));l(Fe,"hostname",He("getHostname","setHostname"));l(Fe,"port",He("getPort","setPort"));l(Fe,"pathname",He("getPathname","setPathname"));l(Fe,"search",He("getSearch","setSearch"));l(Fe,"searchParams",He("getSearchParams"));l(Fe,"hash",He("getHash","setHash"))}c(Fe,"toJSON",(function e(){return T(this).serialize()}),{enumerable:true});c(Fe,"toString",(function e(){return T(this).serialize()}),{enumerable:true});if(C){var Xe=C.createObjectURL;var Ye=C.revokeObjectURL;if(Xe)c(Ze,"createObjectURL",s(Xe,C));if(Ye)c(Ze,"revokeObjectURL",s(Ye,C))}b(Ze,"URL");n({global:true,constructor:true,forced:!o,sham:!i},{URL:Ze})},45876:(e,t,r)=>{"use strict";var n=r(46518);var i=r(53838);var o=r(84916);var a=!o("isSubsetOf",(function(e){return e}));n({target:"Set",proto:true,real:true,forced:a},{isSubsetOf:i})},45953:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(43240))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var o=n.Hasher;var a=r.x64;var s=a.Word;var u=r.algo;var c=[];var l=[];var f=[];(function(){var e=1,t=0;for(var r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=t%5;var i=(2*e+3*t)%5;e=n;t=i}for(var e=0;e<5;e++){for(var t=0;t<5;t++){l[e+5*t]=t+(2*e+3*t)%5*5}}var o=1;for(var a=0;a<24;a++){var u=0;var d=0;for(var h=0;h<7;h++){if(o&1){var p=(1<<h)-1;if(p<32){d^=1<<p}else{u^=1<<p-32}}if(o&128){o=o<<1^113}else{o<<=1}}f[a]=s.create(u,d)}})();var d=[];(function(){for(var e=0;e<25;e++){d[e]=s.create()}})();var h=u.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){var e=this._state=[];for(var t=0;t<25;t++){e[t]=new s.init}this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){var r=this._state;var n=this.blockSize/2;for(var i=0;i<n;i++){var o=e[t+2*i];var a=e[t+2*i+1];o=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var s=r[i];s.high^=a;s.low^=o}for(var u=0;u<24;u++){for(var h=0;h<5;h++){var p=0,v=0;for(var m=0;m<5;m++){var s=r[h+5*m];p^=s.high;v^=s.low}var y=d[h];y.high=p;y.low=v}for(var h=0;h<5;h++){var g=d[(h+4)%5];var b=d[(h+1)%5];var _=b.high;var S=b.low;var p=g.high^(_<<1|S>>>31);var v=g.low^(S<<1|_>>>31);for(var m=0;m<5;m++){var s=r[h+5*m];s.high^=p;s.low^=v}}for(var E=1;E<25;E++){var p;var v;var s=r[E];var w=s.high;var T=s.low;var I=c[E];if(I<32){p=w<<I|T>>>32-I;v=T<<I|w>>>32-I}else{p=T<<I-32|w>>>64-I;v=w<<I-32|T>>>64-I}var R=d[l[E]];R.high=p;R.low=v}var C=d[0];var k=r[0];C.high=k.high;C.low=k.low;for(var h=0;h<5;h++){for(var m=0;m<5;m++){var E=h+5*m;var s=r[E];var A=d[E];var O=d[(h+1)%5+5*m];var P=d[(h+2)%5+5*m];s.high=A.high^~O.high&P.high;s.low=A.low^~O.low&P.low}}var s=r[0];var x=f[u];s.high^=x.high;s.low^=x.low}},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var o=e.sigBytes*8;var a=this.blockSize*32;r[o>>>5]|=1<<24-o%32;r[(t.ceil((o+1)/a)*a>>>5)-1]|=128;e.sigBytes=r.length*4;this._process();var s=this._state;var u=this.cfg.outputLength/8;var c=u/8;var l=[];for(var f=0;f<c;f++){var d=s[f];var h=d.high;var p=d.low;h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;p=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360;l.push(p);l.push(h)}return new i.init(l,u)},clone:function(){var e=o.clone.call(this);var t=e._state=this._state.slice(0);for(var r=0;r<25;r++){t[r]=t[r].clone()}return e}});r.SHA3=o._createHelper(h);r.HmacSHA3=o._createHmacHelper(h)})(Math);return e.SHA3}))},46241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(46677);var o=r(96540);var a=r(69733);var s=f(r(57325));r(81208);var u=r(78435);var c=r(44772);var l=r(44104);function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t,r){return t=S(t),g(e,_()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}function g(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var T=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const I=new l.Log({module:"HwICS.UI.LanguageUI"});let R=function(e){function t(e){var r;d(this,t);r=y(this,t,[e]);r._onPopupVisibleChange=e=>{r.setState({popupVisible:e})};r._handleSelected=async e=>{r.setState({popupVisible:false});u.LanguageManager.setRemoteAndLocalLangCode({entry:"_handleSelected",langCode:e,remember:true})};r.state={popupVisible:false};return r}E(t,e);return p(t,[{key:"render",value:function e(){const{languageList:t,langCode:r}=this.props;const{popupVisible:i}=this.state;const o=(t===null||t===void 0?void 0:t.find((e=>e.language===r)))||t[0];if(!o||t.length<=1){return null}const a=(0,n.jsx)("div",{className:"language-ui-list",children:t.map((e=>(0,n.jsx)("div",{"data-testid":"languageItem",className:`language-ui-item ${r===e.language?"active":""}`,onClick:()=>this._handleSelected(e.language),children:e.language_desc},e.language_desc)))});return(0,n.jsx)(s.default,{action:["click"],popup:a,popupPlacement:"right",zIndex:99999,autoDestroy:true,stretch:"width",popupClassName:"language-ui-list-container",popupAlign:{points:["tl","bl"],offset:[0,6]},onPopupVisibleChange:this._onPopupVisibleChange,popupVisible:i,children:(0,n.jsxs)("div",{className:"language-ui","data-testid":"languageList",children:[(0,n.jsx)("div",{className:"language-ui-icon"}),(0,n.jsx)("div",{className:"language-ui-title",children:o===null||o===void 0?void 0:o.language_desc}),(0,n.jsx)("div",{className:"arrow-icon"})]})})}}])}(o.Component);R=T([(0,c.componentDecorator)(I)],R);const C=e=>({language:e.lang.language,langCode:e.lang.langCode,languageList:e.lang.languageList||[],defaultLanguage:e.lang.defaultLanguage||i.LanguageCode.ZH_CN,chatBtnState:e.main.chatBtnState});var k=t["default"]=(0,a.connect)(C)(R)},46276:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("strike")},{strike:function e(){return i(this,"strike","","")}})},46347:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(30258),r(59969),r(37360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i,o,s,u,c,l,f;function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=_(e,"string");return"symbol"==a(t)?t:t+""}function _(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var E=e["default"]=(i=(0,r.printfDecorator)((0,t.getPLogger)()),o=(0,r.printfDecorator)((0,t.getPLogger)()),s=(0,r.printfDecorator)((0,t.getPLogger)()),u=(0,r.printfDecorator)((0,t.getPLogger)()),c=(0,r.printfDecorator)((0,t.getPLogger)()),l=(f=function(){function e(r){var n=this;v(this,e);g(this,"audioContext",void 0);g(this,"url",void 0);g(this,"processorName",void 0);g(this,"audioCallback",void 0);g(this,"input",void 0);g(this,"processorOptions",void 0);g(this,"stream",void 0);g(this,"startProm",void 0);g(this,"audioWorkletNode",void 0);g(this,"autoCollectAudio",void 0);g(this,"deviceId",void 0);g(this,"onMessage",(function(e){var t;(t=n.audioCallback)===null||t===void 0||t.call(n,e.data)}));g(this,"dealStart",function(){var r=p(d().mark((function r(i){var o,a,s;return d().wrap((function r(u){while(1)switch(u.prev=u.next){case 0:u.prev=0;u.next=3;return n.stop();case 3:n.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(i!==null&&i!==void 0&&i.stream)){u.next=8;break}n.stream=i.stream;u.next=12;break;case 8:s=i!==null&&i!==void 0&&i.deviceId||n.deviceId?{deviceId:{exact:(i===null||i===void 0?void 0:i.deviceId)||n.deviceId}}:true;u.next=11;return navigator.mediaDevices.getUserMedia({audio:s});case 11:n.stream=u.sent;case 12:(o=n.input)===null||o===void 0||o.disconnect();n.input=n.audioContext.createMediaStreamSource(n.stream);u.next=16;return n.audioContext.audioWorklet.addModule(n.url);case 16:if(n.audioWorkletNode){n.audioWorkletNode.port.onmessage=null}(a=n.audioWorkletNode)===null||a===void 0||a.disconnect();n.audioWorkletNode=new AudioWorkletNode(n.audioContext,n.processorName,{processorOptions:n.processorOptions});n.input.connect(n.audioWorkletNode).connect(n.audioContext.destination);n.audioWorkletNode.port.onmessage=n.onMessage;u.next=26;break;case 23:u.prev=23;u.t0=u["catch"](0);(0,t.getPLogger)().error("dealStart",u.t0);case 26:delete n.startProm;case 27:case"end":return u.stop()}}),r,null,[[0,23]])})));return function(e){return r.apply(this,arguments)}}());(0,t.getPLogger)().debug("constructor",r.processorName);this.url=r.url;this.processorName=r.processorName;this.audioCallback=r.audioCallback;this.processorOptions=r.processorOptions}return y(e,[{key:"start",value:function(){var e=p(d().mark((function e(t){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!this.startProm){this.startProm=this.dealStart(t)}this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stop",value:function(){var e=p(d().mark((function e(){var r,i,o;return d().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(r=this.input)===null||r===void 0||r.disconnect();delete this.input;(i=this.audioWorkletNode)===null||i===void 0||i.disconnect();delete this.audioWorkletNode;a.next=7;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 7:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=14;break;case 11:a.prev=11;a.t0=a["catch"](0);(0,t.getPLogger)().error("stop",a.t0);case 14:case"end":return a.stop()}}),e,this,[[0,11]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"mute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=false;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"unmute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=true;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=p(d().mark((function e(t){var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:this.deviceId=t;(r=this.audioContext)===null||r===void 0||r.setSinkId(t);case 2:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}(),g(f,"sampleRate",16e3),f),S(l.prototype,"start",[i],Object.getOwnPropertyDescriptor(l.prototype,"start"),l.prototype),S(l.prototype,"stop",[o],Object.getOwnPropertyDescriptor(l.prototype,"stop"),l.prototype),S(l.prototype,"mute",[s],Object.getOwnPropertyDescriptor(l.prototype,"mute"),l.prototype),S(l.prototype,"unmute",[u],Object.getOwnPropertyDescriptor(l.prototype,"unmute"),l.prototype),S(l.prototype,"setSinkId",[c],Object.getOwnPropertyDescriptor(l.prototype,"setSinkId"),l.prototype),l)}))},46397:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e,t,r){return t=f(t),u(e,l()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function u(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}let p=e.default=function(e){function t(e){var n;r(this,t);n=s(this,t,[e]);n.state={hasError:false};return n}d(t,e);return i(t,[{key:"componentDidCatch",value:function e(t,r){const{dealComponentError:n}=this.props;if(n){n(t,r)}}},{key:"render",value:function e(){if(this.state.hasError){return null}return this.props.children||null}}],[{key:"getDerivedStateFromError",value:function e(){return{hasError:true}}}])}(t.Component)}))},46449:(e,t,r)=>{"use strict";var n=r(46518);var i=r(70259);var o=r(48981);var a=r(26198);var s=r(91291);var u=r(1469);n({target:"Array",proto:true},{flat:function e(){var t=arguments.length?arguments[0]:undefined;var r=o(this);var n=a(r);var c=u(r,0);c.length=i(c,r,r,n,0,t===undefined?1:s(t));return c}})},46518:(e,t,r)=>{"use strict";var n=r(44576);var i=r(77347).f;var o=r(66699);var a=r(36840);var s=r(39433);var u=r(77740);var c=r(92796);e.exports=function(e,t){var r=e.target;var l=e.global;var f=e.stat;var d,h,p,v,m,y;if(l){h=n}else if(f){h=n[r]||s(r,{})}else{h=n[r]&&n[r].prototype}if(h)for(p in t){m=t[p];if(e.dontCallGetSet){y=i(h,p);v=y&&y.value}else v=h[p];d=c(l?p:r+(f?".":"#")+p,e.forced);if(!d&&v!==undefined){if(typeof m==typeof v)continue;u(m,v)}if(e.sham||v&&v.sham){o(m,"sham",true)}a(h,p,m,e)}}},46594:(e,t,r)=>{"use strict";var n=r(15823);n("Int8",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},46677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Webclient2VoiceLanguage=t.VoiceLanguageCode=t.LanguageCode=t.Ics2WebclientLanguage=void 0;var r;(function(e){e["ZH_CN"]="zh_CN";e["EN_US"]="en_US"})(r||(t.LanguageCode=r={}));var n;(function(e){e["CN"]="CN";e["EN"]="EN"})(n||(t.VoiceLanguageCode=n={}));const i=t.Ics2WebclientLanguage={CN:r.ZH_CN,EN:r.EN_US};const o=t.Webclient2VoiceLanguage={zh_CN:n.CN,en_US:n.EN}},46706:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79306);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},46761:(e,t,r)=>{"use strict";var n=r(46518);var i=r(94644);var o=i.NATIVE_ARRAY_BUFFER_VIEWS;n({target:"ArrayBuffer",stat:true,forced:!o},{isView:i.isView})},46817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.IcsWebSocketBase=void 0;var n=r(44772);var i=r(6630);var o=r(75625);var a=r(11686);var s=r(63226);var u=r(44104);var c=r(21013);var l=r(98020);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r){return t=w(t),_(e,E()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}function _(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var R=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const C=new u.Log({module:"HwICS.IcsWebSocketBase"});let k=t.IcsWebSocketBase=function(e){function t(){var e;p(this,t);e=b(this,t);e._sendMessageMap=new Map;e.receiveMessage=e.receiveMessage.bind(e);return e}T(t,e);return m(t,[{key:"send",value:async function e({param:t,rsp_action:r,timeout:o=i.WEBSOCKET_TIMEOUT,entry:u}){if(!this._webSocket||!this._connectProm){this.errorWidthId("websocket instance is not exist");return{action:t.action,error_code:a.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL,error_msg:"websocket instance is not exist"}}try{await this._connectProm;const e=(0,n.getClientId)().toString();t.request_id=e;c.UserTrack.addUserTrack({arg1:s.Arg1Map.WEBSOCKET,arg2:t.action,args:{entry:u,param:JSON.stringify(t),message:JSON.stringify([this._wsId])}});return new Promise((n=>{var i;const s=JSON.stringify(t);if(!this.isOpen()){n({action:t.action,error_msg:"websocket readyState is not open",error_code:a.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL});return}(i=this._webSocket)===null||i===void 0?void 0:i.send(s);const c=setTimeout((()=>{this.errorWidthId("send time out",t.action,u);n({action:t.action,error_msg:"websocket send message time out",error_code:a.SDKErrorCode.WEBSOCKET_RESPONSE_TIMEOUT})}),o);this._sendMessageMap.set(this.getMapId(r,e),(e=>{clearTimeout(c);n(e)}))}))}catch(e){this.errorWidthId("send error",u,e);return{action:t.action,error_code:a.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL,error_msg:"websocket connect error"}}}},{key:"receiveMessage",value:function e(t){var r,n,i;const a="receiveMessage";const u=JSON.parse(t.data);const l=d(d({},u),{},{question_text:(r=u.question_text)===null||r===void 0?void 0:r.length,text:(n=u.text)===null||n===void 0?void 0:n.length});const f=this.getMapId(u.action,u.request_id);const h=this._sendMessageMap.get(f);c.UserTrack.addUserTrack({arg1:s.Arg1Map.WEBSOCKET,arg2:u.action,args:{entry:a,result:l,param:JSON.stringify({request_id:u.request_id,chat_id:u.chat_id,hasCallback:!!h}),message:JSON.stringify([this._wsId])}});if(u.action===null&&u.error_code===o.RetCodes.SUCCESS){var p;(p=this._initResolve)===null||p===void 0?void 0:p.call(this)}if(h){h(u)}(i=this._onmessage)===null||i===void 0?void 0:i.call(this,u);this._sendMessageMap.delete(f)}}])}(l.WebSocketBase);R([(0,n.printfDecorator)(C)],k.prototype,"send",null);R([(0,n.printfDecorator)(C)],k.prototype,"receiveMessage",null)},46929:(e,t,r)=>{"use strict";r.d(t,{A:()=>F});var n=r(80296);var i=r(96540);var o=r(40961);var a=r(20998);var s=r(68210);var u=r(80775);var c=i.createContext(null);const l=c;var f=r(45458);var d=r(30981);var h=[];function p(e,t){var r=i.useState((function(){if(!(0,a.A)()){return null}var e=document.createElement("div");if(false){}return e})),o=(0,n.A)(r,1),s=o[0];var u=i.useRef(false);var c=i.useContext(l);var p=i.useState(h),v=(0,n.A)(p,2),m=v[0],y=v[1];var g=c||(u.current?undefined:function(e){y((function(t){var r=[e].concat((0,f.A)(t));return r}))});function b(){if(!s.parentElement){document.body.appendChild(s)}u.current=true}function _(){var e;(e=s.parentElement)===null||e===void 0?void 0:e.removeChild(s);u.current=false}(0,d.A)((function(){if(e){if(c){c(b)}else{b()}}else{_()}return _}),[e]);(0,d.A)((function(){if(m.length){m.forEach((function(e){return e()}));y(h)}}),[m]);return[s,g]}var v=r(89379);var m=r(54808);var y="data-rc-order";var g="data-rc-priority";var b="rc-util-key";var _=new Map;function S(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=e.mark;if(t){return t.startsWith("data-")?t:"data-".concat(t)}return b}function E(e){if(e.attachTo){return e.attachTo}var t=document.querySelector("head");return t||document.body}function w(e){if(e==="queue"){return"prependQueue"}return e?"prepend":"append"}function T(e){return Array.from((_.get(e)||e).children).filter((function(e){return e.tagName==="STYLE"}))}function I(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!(0,a.A)()){return null}var r=t.csp,n=t.prepend,i=t.priority,o=i===void 0?0:i;var s=w(n);var u=s==="prependQueue";var c=document.createElement("style");c.setAttribute(y,s);if(u&&o){c.setAttribute(g,"".concat(o))}if(r!==null&&r!==void 0&&r.nonce){c.nonce=r===null||r===void 0?void 0:r.nonce}c.innerHTML=e;var l=E(t);var f=l.firstChild;if(n){if(u){var d=(t.styles||T(l)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(y))){return false}var t=Number(e.getAttribute(g)||0);return o>=t}));if(d.length){l.insertBefore(c,d[d.length-1].nextSibling);return c}}l.insertBefore(c,f)}else{l.appendChild(c)}return c}function R(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=E(t);return(t.styles||T(r)).find((function(r){return r.getAttribute(S(t))===e}))}function C(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=R(e,t);if(r){var n=E(t);n.removeChild(r)}}function k(e,t){var r=_.get(e);if(!r||!(0,m.A)(document,r)){var n=I("",t);var i=n.parentNode;_.set(e,i);e.removeChild(n)}}function A(){_.clear()}function O(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=E(r);var i=T(n);var o=(0,v.A)((0,v.A)({},r),{},{styles:i});k(n,o);var a=R(t,o);if(a){var s,u;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((u=o.csp)===null||u===void 0?void 0:u.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}if(a.innerHTML!==e){a.innerHTML=e}return a}var l=I(e,o);l.setAttribute(S(o),t);return l}var P;function x(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7));var r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute";n.left="0";n.top="0";n.width="100px";n.height="100px";n.overflow="scroll";var i;var o;if(e){var a=getComputedStyle(e);n.scrollbarColor=a.scrollbarColor;n.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar");var u=parseInt(s.width,10);var c=parseInt(s.height,10);try{var l=u?"width: ".concat(s.width,";"):"";var f=c?"height: ".concat(s.height,";"):"";O("\n#".concat(t,"::-webkit-scrollbar {\n").concat(l,"\n").concat(f,"\n}"),t)}catch(e){console.error(e);i=u;o=c}}document.body.appendChild(r);var d=e&&i&&!isNaN(i)?i:r.offsetWidth-r.clientWidth;var h=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;document.body.removeChild(r);C(t);return{width:d,height:h}}function L(e){if(typeof document==="undefined"){return 0}if(e||P===undefined){P=x()}return P.width}function M(e){if(typeof document==="undefined"||!e||!(e instanceof Element)){return{width:0,height:0}}return x(e)}function N(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var D="rc-util-locker-".concat(Date.now());var j=0;function U(e){var t=!!e;var r=i.useState((function(){j+=1;return"".concat(D,"_").concat(j)})),o=(0,n.A)(r,1),a=o[0];(0,d.A)((function(){if(t){var e=M(document.body).width;var r=N();O("\nhtml body {\n overflow-y: hidden;\n ".concat(r?"width: calc(100% - ".concat(e,"px);"):"","\n}"),a)}else{C(a)}return function(){C(a)}}),[t,a])}var V=false;function W(e){if(typeof e==="boolean"){V=e}return V}var B=function e(t){if(t===false){return false}if(!(0,a.A)()||!t){return null}if(typeof t==="string"){return document.querySelector(t)}if(typeof t==="function"){return t()}return t};var G=i.forwardRef((function(e,t){var r=e.open,s=e.autoLock,c=e.getContainer,f=e.debug,d=e.autoDestroy,h=d===void 0?true:d,v=e.children;var m=i.useState(r),y=(0,n.A)(m,2),g=y[0],b=y[1];var _=g||r;if(false){}i.useEffect((function(){if(h||r){b(r)}}),[r,h]);var S=i.useState((function(){return B(c)})),E=(0,n.A)(S,2),w=E[0],T=E[1];i.useEffect((function(){var e=B(c);T(e!==null&&e!==void 0?e:null)}));var I=p(_&&!w,f),R=(0,n.A)(I,2),C=R[0],k=R[1];var A=w!==null&&w!==void 0?w:C;U(s&&r&&(0,a.A)()&&(A===C||A===document.body));var O=null;if(v&&(0,u.f3)(v)&&t){var P=v;O=P.ref}var x=(0,u.xK)(O,t);if(!_||!(0,a.A)()||w===undefined){return null}var L=A===false||W();var M=v;if(t){M=i.cloneElement(v,{ref:x})}return i.createElement(l.Provider,{value:k},L?M:(0,o.createPortal)(M,A))}));if(false){}const Z=G;const F=Z},46942:(e,t)=>{var r,n;(function(){"use strict";var i={}.hasOwnProperty;function o(){var e="";for(var t=0;t<arguments.length;t++){var r=arguments[t];if(r){e=s(e,a(r))}}return e}function a(e){if(typeof e==="string"||typeof e==="number"){return e}if(typeof e!=="object"){return""}if(Array.isArray(e)){return o.apply(null,e)}if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){return e.toString()}var t="";for(var r in e){if(i.call(e,r)&&e[r]){t=s(t,r)}}return t}function s(e,t){if(!t){return e}if(e){return e+" "+t}return e+t}if(true&&e.exports){o.default=o;e.exports=o}else if(true){!(r=[],n=function(){return o}.apply(t,r),n!==undefined&&(e.exports=n))}else{}})()},47020:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(33077),r(56216),r(41822),r(16809),r(5338),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;e.showModalView=f;t=u(t);r=u(r);n=u(n);function u(e){return e&&e.__esModule?e:{default:e}}const c=()=>{const e=(0,i.getDialogCloseFuncList)();[...e].forEach((e=>{e.onClose({ret:false,isClickClose:true})}))};const l=e=>{const t=(0,i.getDialogCloseFuncList)();if(e){var r;(r=t.find((t=>t.dialogId===e)))===null||r===void 0?void 0:r.onClose({ret:false,isClickClose:false})}};function f({content:e,zIndex:r,maskClosable:n}){const i=document.createElement("div");document.body.appendChild(i);const u=(0,o.createRoot)(i);const c=()=>{(0,a.getPLogger)().info("closeModal");requestAnimationFrame((()=>{var e;u.unmount();i===null||i===void 0?void 0:(e=i.parentNode)===null||e===void 0?void 0:e.removeChild(i)}))};u.render((0,s.jsx)(t.default,{visible:true,maskClosable:n,content:e,zIndex:r,onClose:c}));return c}t.default.alert=n.default;t.default.confirm=r.default;t.default.showModalView=f;t.default.destroyAll=c;t.default.destroyById=l;document.addEventListener("keydown",(e=>{const t=(0,i.getDialogCloseFuncList)();if(t.length>0){const r=t[t.length-1];if(r.keyboard){if(e.code==="Enter"||e.code==="NumpadEnter"){r.onClose({ret:true})}}}}));var d=e.default=t.default}))},47043:(e,t)=>{function r(){var e={};e["align-content"]=false;e["align-items"]=false;e["align-self"]=false;e["alignment-adjust"]=false;e["alignment-baseline"]=false;e["all"]=false;e["anchor-point"]=false;e["animation"]=false;e["animation-delay"]=false;e["animation-direction"]=false;e["animation-duration"]=false;e["animation-fill-mode"]=false;e["animation-iteration-count"]=false;e["animation-name"]=false;e["animation-play-state"]=false;e["animation-timing-function"]=false;e["azimuth"]=false;e["backface-visibility"]=false;e["background"]=true;e["background-attachment"]=true;e["background-clip"]=true;e["background-color"]=true;e["background-image"]=true;e["background-origin"]=true;e["background-position"]=true;e["background-repeat"]=true;e["background-size"]=true;e["baseline-shift"]=false;e["binding"]=false;e["bleed"]=false;e["bookmark-label"]=false;e["bookmark-level"]=false;e["bookmark-state"]=false;e["border"]=true;e["border-bottom"]=true;e["border-bottom-color"]=true;e["border-bottom-left-radius"]=true;e["border-bottom-right-radius"]=true;e["border-bottom-style"]=true;e["border-bottom-width"]=true;e["border-collapse"]=true;e["border-color"]=true;e["border-image"]=true;e["border-image-outset"]=true;e["border-image-repeat"]=true;e["border-image-slice"]=true;e["border-image-source"]=true;e["border-image-width"]=true;e["border-left"]=true;e["border-left-color"]=true;e["border-left-style"]=true;e["border-left-width"]=true;e["border-radius"]=true;e["border-right"]=true;e["border-right-color"]=true;e["border-right-style"]=true;e["border-right-width"]=true;e["border-spacing"]=true;e["border-style"]=true;e["border-top"]=true;e["border-top-color"]=true;e["border-top-left-radius"]=true;e["border-top-right-radius"]=true;e["border-top-style"]=true;e["border-top-width"]=true;e["border-width"]=true;e["bottom"]=false;e["box-decoration-break"]=true;e["box-shadow"]=true;e["box-sizing"]=true;e["box-snap"]=true;e["box-suppress"]=true;e["break-after"]=true;e["break-before"]=true;e["break-inside"]=true;e["caption-side"]=false;e["chains"]=false;e["clear"]=true;e["clip"]=false;e["clip-path"]=false;e["clip-rule"]=false;e["color"]=true;e["color-interpolation-filters"]=true;e["column-count"]=false;e["column-fill"]=false;e["column-gap"]=false;e["column-rule"]=false;e["column-rule-color"]=false;e["column-rule-style"]=false;e["column-rule-width"]=false;e["column-span"]=false;e["column-width"]=false;e["columns"]=false;e["contain"]=false;e["content"]=false;e["counter-increment"]=false;e["counter-reset"]=false;e["counter-set"]=false;e["crop"]=false;e["cue"]=false;e["cue-after"]=false;e["cue-before"]=false;e["cursor"]=false;e["direction"]=false;e["display"]=true;e["display-inside"]=true;e["display-list"]=true;e["display-outside"]=true;e["dominant-baseline"]=false;e["elevation"]=false;e["empty-cells"]=false;e["filter"]=false;e["flex"]=false;e["flex-basis"]=false;e["flex-direction"]=false;e["flex-flow"]=false;e["flex-grow"]=false;e["flex-shrink"]=false;e["flex-wrap"]=false;e["float"]=false;e["float-offset"]=false;e["flood-color"]=false;e["flood-opacity"]=false;e["flow-from"]=false;e["flow-into"]=false;e["font"]=true;e["font-family"]=true;e["font-feature-settings"]=true;e["font-kerning"]=true;e["font-language-override"]=true;e["font-size"]=true;e["font-size-adjust"]=true;e["font-stretch"]=true;e["font-style"]=true;e["font-synthesis"]=true;e["font-variant"]=true;e["font-variant-alternates"]=true;e["font-variant-caps"]=true;e["font-variant-east-asian"]=true;e["font-variant-ligatures"]=true;e["font-variant-numeric"]=true;e["font-variant-position"]=true;e["font-weight"]=true;e["grid"]=false;e["grid-area"]=false;e["grid-auto-columns"]=false;e["grid-auto-flow"]=false;e["grid-auto-rows"]=false;e["grid-column"]=false;e["grid-column-end"]=false;e["grid-column-start"]=false;e["grid-row"]=false;e["grid-row-end"]=false;e["grid-row-start"]=false;e["grid-template"]=false;e["grid-template-areas"]=false;e["grid-template-columns"]=false;e["grid-template-rows"]=false;e["hanging-punctuation"]=false;e["height"]=true;e["hyphens"]=false;e["icon"]=false;e["image-orientation"]=false;e["image-resolution"]=false;e["ime-mode"]=false;e["initial-letters"]=false;e["inline-box-align"]=false;e["justify-content"]=false;e["justify-items"]=false;e["justify-self"]=false;e["left"]=false;e["letter-spacing"]=true;e["lighting-color"]=true;e["line-box-contain"]=false;e["line-break"]=false;e["line-grid"]=false;e["line-height"]=false;e["line-snap"]=false;e["line-stacking"]=false;e["line-stacking-ruby"]=false;e["line-stacking-shift"]=false;e["line-stacking-strategy"]=false;e["list-style"]=true;e["list-style-image"]=true;e["list-style-position"]=true;e["list-style-type"]=true;e["margin"]=true;e["margin-bottom"]=true;e["margin-left"]=true;e["margin-right"]=true;e["margin-top"]=true;e["marker-offset"]=false;e["marker-side"]=false;e["marks"]=false;e["mask"]=false;e["mask-box"]=false;e["mask-box-outset"]=false;e["mask-box-repeat"]=false;e["mask-box-slice"]=false;e["mask-box-source"]=false;e["mask-box-width"]=false;e["mask-clip"]=false;e["mask-image"]=false;e["mask-origin"]=false;e["mask-position"]=false;e["mask-repeat"]=false;e["mask-size"]=false;e["mask-source-type"]=false;e["mask-type"]=false;e["max-height"]=true;e["max-lines"]=false;e["max-width"]=true;e["min-height"]=true;e["min-width"]=true;e["move-to"]=false;e["nav-down"]=false;e["nav-index"]=false;e["nav-left"]=false;e["nav-right"]=false;e["nav-up"]=false;e["object-fit"]=false;e["object-position"]=false;e["opacity"]=false;e["order"]=false;e["orphans"]=false;e["outline"]=false;e["outline-color"]=false;e["outline-offset"]=false;e["outline-style"]=false;e["outline-width"]=false;e["overflow"]=false;e["overflow-wrap"]=false;e["overflow-x"]=false;e["overflow-y"]=false;e["padding"]=true;e["padding-bottom"]=true;e["padding-left"]=true;e["padding-right"]=true;e["padding-top"]=true;e["page"]=false;e["page-break-after"]=false;e["page-break-before"]=false;e["page-break-inside"]=false;e["page-policy"]=false;e["pause"]=false;e["pause-after"]=false;e["pause-before"]=false;e["perspective"]=false;e["perspective-origin"]=false;e["pitch"]=false;e["pitch-range"]=false;e["play-during"]=false;e["position"]=false;e["presentation-level"]=false;e["quotes"]=false;e["region-fragment"]=false;e["resize"]=false;e["rest"]=false;e["rest-after"]=false;e["rest-before"]=false;e["richness"]=false;e["right"]=false;e["rotation"]=false;e["rotation-point"]=false;e["ruby-align"]=false;e["ruby-merge"]=false;e["ruby-position"]=false;e["shape-image-threshold"]=false;e["shape-outside"]=false;e["shape-margin"]=false;e["size"]=false;e["speak"]=false;e["speak-as"]=false;e["speak-header"]=false;e["speak-numeral"]=false;e["speak-punctuation"]=false;e["speech-rate"]=false;e["stress"]=false;e["string-set"]=false;e["tab-size"]=false;e["table-layout"]=false;e["text-align"]=true;e["text-align-last"]=true;e["text-combine-upright"]=true;e["text-decoration"]=true;e["text-decoration-color"]=true;e["text-decoration-line"]=true;e["text-decoration-skip"]=true;e["text-decoration-style"]=true;e["text-emphasis"]=true;e["text-emphasis-color"]=true;e["text-emphasis-position"]=true;e["text-emphasis-style"]=true;e["text-height"]=true;e["text-indent"]=true;e["text-justify"]=true;e["text-orientation"]=true;e["text-overflow"]=true;e["text-shadow"]=true;e["text-space-collapse"]=true;e["text-transform"]=true;e["text-underline-position"]=true;e["text-wrap"]=true;e["top"]=false;e["transform"]=false;e["transform-origin"]=false;e["transform-style"]=false;e["transition"]=false;e["transition-delay"]=false;e["transition-duration"]=false;e["transition-property"]=false;e["transition-timing-function"]=false;e["unicode-bidi"]=false;e["vertical-align"]=false;e["visibility"]=false;e["voice-balance"]=false;e["voice-duration"]=false;e["voice-family"]=false;e["voice-pitch"]=false;e["voice-range"]=false;e["voice-rate"]=false;e["voice-stress"]=false;e["voice-volume"]=false;e["volume"]=false;e["white-space"]=false;e["widows"]=false;e["width"]=true;e["will-change"]=false;e["word-break"]=true;e["word-spacing"]=true;e["word-wrap"]=true;e["wrap-flow"]=false;e["wrap-through"]=false;e["writing-mode"]=false;e["z-index"]=false;return e}function n(e,t,r){}function i(e,t,r){}var o=/javascript\s*\:/gim;function a(e,t){if(o.test(t))return"";return t}t.whiteList=r();t.getDefaultWhiteList=r;t.onAttr=n;t.onIgnoreAttr=i;t.safeAttrValue=a},47055:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79039);var o=r(22195);var a=Object;var s=n("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return o(e)==="String"?s(e,""):a(e)}:a},47057:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(46347)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;t=r(t);function r(e){return e&&e.__esModule?e:{default:e}}var n=e["default"]=t["default"]}))},47072:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(79306);var a=r(67750);var s=r(72652);var u=r(72248);var c=r(96395);var l=r(79039);var f=u.Map;var d=u.has;var h=u.get;var p=u.set;var v=i([].push);var m=c||l((function(){return f.groupBy("ab",(function(e){return e})).get("a").length!==1}));n({target:"Map",stat:true,forced:c||m},{groupBy:function e(t,r){a(t);o(r);var n=new f;var i=0;s(t,(function(e){var t=r(e,i++);if(!d(n,t))p(n,t,[e]);else v(h(n,t),e)}));return n}})},47300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StreamManager=void 0;var n=r(44104);var i=r(44772);var o=r(47564);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const d=new n.Log({module:"HwICS.SparkRTC.StreamManager"});let h=t.StreamManager=function(){function e(){a(this,e);this.localStreamManager=new o.LocalManager}return u(e,[{key:"getLocalStream",value:function e(t){return this.localStreamManager.getLocalStream(t)}},{key:"setMicrophone",value:async function e(t){return this.localStreamManager.setMicrophone(t)}}],[{key:"getInstance",value:function t(){if(!e._streamManager){e._streamManager=new e}return e._streamManager}},{key:"destroyStreamManager",value:async function t(r,n){await e.getInstance().localStreamManager.closeLocalStream(r,n);e._streamManager=undefined}},{key:"publishStream",value:async function t({client:r,config:n,entry:i}){return e.getInstance().localStreamManager.publishStream({client:r,config:n,entry:i})}},{key:"createLocalStream",value:async function t({client:r,config:n,entry:i}){return e.getInstance().localStreamManager.createLocalStream({client:r,config:n,entry:i})}},{key:"setShouldSendLocalStream",value:function t(r){d.info("setShouldSendLocalStream",r);e.shouldSendLocalStream=r}},{key:"getShouldSendLocalStream",value:function t(r){d.info("getShouldSendLocalStream",r,e.shouldSendLocalStream);return e.shouldSendLocalStream}},{key:"checkIgnoreStream",value:function e(t,r){d.info("checkIgnoreStream",r,t.getUserId());return!t.getUserId().endsWith("render")}},{key:"checkIgnorePeerJoinOrLeave",value:function e(t,r){d.info("checkIgnorePeerJoinOrLeave",r,t);return!t.endsWith("render")}}])}();h.shouldSendLocalStream=true;f([(0,i.printfDecorator)(d)],h.prototype,"setMicrophone",null)},47452:e=>{"use strict";e.exports="\t\n\v\f\r      "+"           \u2028\u2029\ufeff"},47513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(99700);const i=()=>(0,n.jsx)("div",{className:"waiting-card box-shadow",children:(0,n.jsx)("div",{className:"content-1"})});var o=t["default"]=i},47564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LocalManager=void 0;var n=r(44772);var i=r(44104);var o=u(r(92224));var a=r(94855);var s=r(56043);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const g=new i.Log({module:"LocalManager"});const b=(e,t)=>{var r,n;const i=e.audio===t.audio&&((r=e.audioSource)===null||r===void 0?void 0:r.id)===((n=t.audioSource)===null||n===void 0?void 0:n.id);g.info("isSameConfig",i);return i};let _=t.LocalManager=function(){function e(){d(this,e);this.published=false;this.config={audio:true}}return p(e,[{key:"closeLocalStream",value:async function e(t,r){g.info("closeLocalStream",r);if(this._stream){try{var n,i;await t.unpublish(this._stream);(n=this._stream)===null||n===void 0?void 0:n.stop();(i=this._stream)===null||i===void 0?void 0:i.close()}catch(e){g.error("client unpublish error",r,e)}delete this._stream}}},{key:"getLocalStream",value:function e(t){g.info("getLocalStream",t,!!this._stream);return this._stream}},{key:"publishStream",value:async function e({client:t,config:r,entry:n}){var i;const o=this.getLocalStream("publishStream");const a=await this.createLocalStream({client:t,config:r,entry:n});const s=a===null||a===void 0?void 0:(i=a.getMediaStream())===null||i===void 0?void 0:i.id;g.info("publishStream",n,o===a,this.published,s);if(o!==a||!this.published){await t.publish(a);this.published=true}return a}},{key:"unmuteAndCheckLocalStream",value:function e(t){if(this._stream){var r;(r=this._stream.getAudioHRTCTrack())===null||r===void 0?void 0:r.unmuteTrack();const e=this._stream.getAudioTrack();if((e===null||e===void 0?void 0:e.readyState)==="ended"||e!==null&&e!==void 0&&e.muted){g.info("unmuteAndCheckLocalStream",t,"ended");return false}return true}return false}},{key:"createLocalStream",value:async function e({client:t,config:r,entry:n}){n+=",createLocalStream";g.info("createLocalStream",n,r,this.config,!!this._stream,this._micId);if(!r){r=this.config}if(!this._stream||!b(r,this.config)){const e=a.ConfigManager.getPlayerUserInfo(n);await this.closeLocalStream(t,n);this._stream=o.default.createStream(l({userId:(e===null||e===void 0?void 0:e.user_id)||"",microphoneId:this._micId||"default"},r));this._stream.setAudioProfile({sampleRate:8e3});await this._stream.initialize();await this.setMicrophone();this.config=r;s.LocalWakeup.updateStreamInput({entry:"createLocalStream",stream:this._stream.getMediaStream()})}else if(!this.unmuteAndCheckLocalStream("createLocalStream")){g.error(n,"audioTrack readyState ended");await this.rePublishStream(t,n)}this.addLocalStreamEvent(n);return this._stream}},{key:"rePublishStream",value:async function e(t,r){g.info("rePublishStream",r,this.config);if(!this._stream){return}await this.closeLocalStream(t,r);const n=a.ConfigManager.getPlayerUserInfo(r);this._stream=o.default.createStream(l({userId:(n===null||n===void 0?void 0:n.user_id)||"",microphoneId:this._micId||"default"},this.config));this._stream.setAudioProfile({sampleRate:8e3});await this._stream.initialize();this.setMicrophone();g.info("rePublishStream end",r)}},{key:"addLocalStreamEvent",value:function e(t){g.info("addLocalStreamEvent",t);if(!this._stream){g.info("addLocalStreamEvent","_stream not created",t);return}const r=this._stream.getAudioTrack();if(!r){g.error("addLocalStreamEvent"," no audioTrack",t)}r.onended=async()=>{g.error("addLocalStreamEvent","audioTrack onended",t)}}},{key:"setMicrophone",value:async function e(t){this._micId=t||this._micId;g.info("setMicrophone",this._micId);if(this._micId){var r;await((r=this._stream)===null||r===void 0?void 0:r.switchDevice("audio",this._micId));if(this._stream){s.LocalWakeup.updateStreamInput({entry:"setMicrophone",stream:this._stream.getMediaStream()})}}}}])}();y([(0,n.printfDecorator)(g)],_.prototype,"setMicrophone",null)},47566:(e,t,r)=>{"use strict";var n=r(36840);var i=r(79504);var o=r(655);var a=r(22812);var s=URLSearchParams;var u=s.prototype;var c=i(u.getAll);var l=i(u.has);var f=new s("a=1");if(f.has("a",2)||!f.has("a",undefined)){n(u,"has",(function e(t){var r=arguments.length;var n=r<2?undefined:arguments[1];if(r&&n===undefined)return l(this,t);var i=c(this,t);a(r,1);var s=o(n);var u=0;while(u<i.length){if(i[u++]===s)return true}return false}),{enumerable:true,unsafe:true})}},47764:(e,t,r)=>{"use strict";var n=r(68183).charAt;var i=r(655);var o=r(91181);var a=r(51088);var s=r(62529);var u="String Iterator";var c=o.set;var l=o.getterFor(u);a(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function e(){var t=l(this);var r=t.string;var i=t.index;var o;if(i>=r.length)return s(undefined,true);o=n(r,i);t.index+=o.length;return s(o,false)}))},47899:(e,t,r)=>{const n=r(92726);function i(e,t,r){e.clearRect(0,0,t.width,t.height);if(!t.style)t.style={};t.height=r;t.width=r;t.style.height=r+"px";t.style.width=r+"px"}function o(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}t.render=function e(t,r,a){let s=a;let u=r;if(typeof s==="undefined"&&(!r||!r.getContext)){s=r;r=undefined}if(!r){u=o()}s=n.getOptions(s);const c=n.getImageWidth(t.modules.size,s);const l=u.getContext("2d");const f=l.createImageData(c,c);n.qrToImageData(f.data,t,s);i(l,u,c);l.putImageData(f,0,0);return u};t.renderToDataURL=function e(r,n,i){let o=i;if(typeof o==="undefined"&&(!n||!n.getContext)){o=n;n=undefined}if(!o)o={};const a=t.render(r,n,o);const s=o.type||"image/png";const u=o.rendererOpts||{};return a.toDataURL(s,u.quality)}},48140:(e,t,r)=>{"use strict";var n=r(94644);var i=r(26198);var o=r(91291);var a=n.aTypedArray;var s=n.exportTypedArrayMethod;s("at",(function e(t){var r=a(this);var n=i(r);var s=o(t);var u=s>=0?s:n+s;return u<0||u>=n?undefined:r[u]}))},48345:(e,t,r)=>{"use strict";var n=r(72805);var i=r(94644).exportTypedArrayStaticMethod;var o=r(43251);i("from",o,n)},48408:(e,t,r)=>{"use strict";r(98406)},48523:(e,t,r)=>{"use strict";var n=r(16468);var i=r(86938);n("Map",(function(e){return function t(){return e(this,arguments.length?arguments[0]:undefined)}}),i)},48598:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(47055);var a=r(25397);var s=r(34598);var u=i([].join);var c=o!==Object;var l=c||!s("join",",");n({target:"Array",proto:true,forced:l},{join:function e(t){return u(a(this),t===undefined?",":t)}})},48646:(e,t,r)=>{"use strict";var n=r(69565);var i=r(28551);var o=r(1767);var a=r(50851);e.exports=function(e,t){if(!t||typeof e!=="string")i(e);var r=a(e);return o(i(r!==undefined?n(r,e):e))}},48686:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79039);e.exports=n&&i((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:false}).prototype!==42}))},48718:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("sub")},{sub:function e(){return i(this,"sub","","")}})},48773:(e,t)=>{"use strict";var r={}.propertyIsEnumerable;var n=Object.getOwnPropertyDescriptor;var i=n&&!r.call({1:2},1);t.f=i?function e(t){var r=n(this,t);return!!r&&r.enumerable}:r},48957:(e,t,r)=>{"use strict";var n=r(94901);var i=r(20034);var o=r(24913);var a=r(1625);var s=r(78227);var u=r(50283);var c=s("hasInstance");var l=Function.prototype;if(!(c in l)){o.f(l,c,{value:u((function(e){if(!n(this)||!i(e))return false;var t=this.prototype;return i(t)?a(t,e):e instanceof this}),c)})}},48980:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).findIndex;var o=r(6469);var a="findIndex";var s=true;if(a in[])Array(1)[a]((function(){s=false}));n({target:"Array",proto:true,forced:s},{findIndex:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}});o(a)},48981:(e,t,r)=>{"use strict";var n=r(67750);var i=Object;e.exports=function(e){return i(n(e))}},49220:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RequestTasksQueue=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e){return c(e)||u(e)||s(e)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return l(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var r=m(e,"string");return"symbol"==t(r)?r:r+""}function m(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var y=e.RequestTasksQueue=d((function e(t){var n=this;var a=t.taskFunc,s=t.logger,u=t.timeout,c=u===void 0?5e4:u;h(this,e);p(this,"_queueData",void 0);p(this,"_taskFunc",void 0);p(this,"logger",void 0);p(this,"_timeout",void 0);p(this,"_isRunning",void 0);p(this,"dealTask",(function(e){var t,r;var i=e.args,o=e.timeout;var a="dealTask";var s=Date.now();(t=n.logger)===null||t===void 0||(r=t.debug)===null||r===void 0||r.call(t,a,"start");return new Promise((function(e){o=o||n._timeout;var t=setTimeout((function(){var t,r;(t=(r=n.logger).info)===null||t===void 0||t.call(r,a,"timeout",Date.now()-s);e({reason:"timeout,"+o});n._isRunning=false}),o);n._queueData.push([i,function(r){var i,o;(i=n.logger)===null||i===void 0||(o=i.debug)===null||o===void 0||o.call(i,a,"over,use time",Date.now()-s);clearTimeout(t);e(r)}]);if(!n._isTaskRunning()){n._dealTask()}}))}));p(this,"_dealTask",(function(){if(n._getNoDealDataSize()>0){var e=n._getWillDealData();n._isRunning=true;n._dealTaskFunc.apply(n,o(e[0])).then((function(t){e[1](t);n._dealTask()}))["catch"]((function(t){var r,i;(r=n.logger)===null||r===void 0||(i=r.error)===null||i===void 0||i.call(r,"_dealTask error",t);e[1]({reason:"catch error",error:t});n._dealTask()}))}else{n._isRunning=false}}));p(this,"_dealTaskFunc",i(r().mark((function e(){var t=arguments;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",n._taskFunc.apply(n,t));case 1:case"end":return r.stop()}}),e)}))));p(this,"_getNoDealDataSize",(function(){return n._queueData.length}));p(this,"_isTaskRunning",(function(){return n._isRunning}));p(this,"_getWillDealData",(function(){return n._queueData.shift()}));this.logger=s||{info:function e(){}};this._queueData=[];this._taskFunc=a;this._isRunning=false;this._timeout=c}))}))},49222:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSipNumberReg=e.getNumberReg=e.getMobilePhoneReg=e.getEmailReg=e.getChineseWordReg=e.getChinesePunctuationReg=e.escapeRegExp=void 0;var t=e.escapeRegExp=function e(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")};var r=e.getNumberReg=function e(){return/^([+*#]\d+|\d{4,})$/};var n=e.getMobilePhoneReg=function e(){return/^(1|\+861|0\d{2,3}1)[3456789]\d{9}$/};var i=e.getEmailReg=function e(){return/^[a-z\dA-Z]+[-a-z\dA-Z._]+@([a-z\dA-Z]+(-[a-z\dA-Z]+)?\.)+[a-z]+$/};var o=e.getSipNumberReg=function e(){return/^\+99111\d+/};var a=e.getChineseWordReg=function e(){return/[\u4E00-\u9FFF]/};var s=e.getChinesePunctuationReg=function e(){return/[\u4E00-\u9FFF]/}}))},49340:e=>{"use strict";var t=Math.log;var r=Math.LOG10E;e.exports=Math.log10||function e(n){return t(n)*r}},49603:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(48981);var a=r(1625);var s=r(57657).IteratorPrototype;var u=r(19462);var c=r(48646);var l=r(96395);var f=u((function(){return i(this.next,this.iterator)}),true);n({target:"Iterator",stat:true,forced:l},{from:function e(t){var r=c(typeof t=="string"?o(t):t,true);return a(s,r.iterator)?r.iterator:new f(r)}})},49773:(e,t,r)=>{"use strict";var n=r(46518);var i=r(4495);var o=r(79039);var a=r(33717);var s=r(48981);var u=!i||o((function(){a.f(1)}));n({target:"Object",stat:true,forced:u},{getOwnPropertySymbols:function e(t){var r=a.f;return r?r(s(t)):[]}})},49953:(e,t)=>{t.L={bit:1};t.M={bit:0};t.Q={bit:3};t.H={bit:2};function r(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const r=e.toLowerCase();switch(r){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}t.isValid=function e(t){return t&&typeof t.bit!=="undefined"&&t.bit>=0&&t.bit<4};t.from=function e(n,i){if(t.isValid(n)){return n}try{return r(n)}catch(e){return i}}},50088:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.showMediaView=t.setMediaViewCurId=t.mediaViewSlice=t.hideMediaView=t["default"]=void 0;var n=r(84303);var i=r(39595);const o={mediaViewShow:false,mediaViewCurId:""};const a=t.mediaViewSlice=(0,n.createSlice)({name:i.ReduxModule.MEDIAVIEW,initialState:o,reducers:{showMediaView:e=>{e.mediaViewShow=true},hideMediaView:e=>{e.mediaViewShow=false;e.mediaViewCurId=""},setMediaViewCurId:(e,t)=>{e.mediaViewCurId=t.payload}}});const{showMediaView:s,hideMediaView:u,setMediaViewCurId:c}=a.actions;t.setMediaViewCurId=c;t.hideMediaView=u;t.showMediaView=s;var l=t["default"]=a},50113:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).find;var o=r(6469);var a="find";var s=true;if(a in[])Array(1)[a]((function(){s=false}));n({target:"Array",proto:true,forced:s},{find:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}});o(a)},50283:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79039);var o=r(94901);var a=r(39297);var s=r(43724);var u=r(10350).CONFIGURABLE;var c=r(33706);var l=r(91181);var f=l.enforce;var d=l.get;var h=String;var p=Object.defineProperty;var v=n("".slice);var m=n("".replace);var y=n([].join);var g=s&&!i((function(){return p((function(){}),"length",{value:8}).length!==8}));var b=String(String).split("String");var _=e.exports=function(e,t,r){if(v(h(t),0,7)==="Symbol("){t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"}if(r&&r.getter)t="get "+t;if(r&&r.setter)t="set "+t;if(!a(e,"name")||u&&e.name!==t){if(s)p(e,"name",{value:t,configurable:true});else e.name=t}if(g&&r&&a(r,"arity")&&e.length!==r.arity){p(e,"length",{value:r.arity})}try{if(r&&a(r,"constructor")&&r.constructor){if(s)p(e,"prototype",{writable:false})}else if(e.prototype)e.prototype=undefined}catch(e){}var n=f(e);if(!a(n,"source")){n.source=y(b,typeof t=="string"?t:"")}return e};Function.prototype.toString=_((function e(){return o(this)&&d(this).source||c(this)}),"toString")},50300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getLogger=void 0;var n=r(21013);var i=r(63226);var o=r(44772);const a=()=>{};const s=(e,t="")=>(r,...a)=>{try{var s,u;if(e==="none"){return""}const c=(0,o.formatDate)(new Date,"yyyy-MM-dd hh:mm:ss.S");(s=window.console)===null||s===void 0?void 0:(u=s[e])===null||u===void 0?void 0:u.call(s,`[${c}][${e}][${t}]`,r,...a);const l=`[${c}][${e}][${t}] ${r} ${JSON.stringify(a)}`;if(e!=="debug"){n.UserTrack===null||n.UserTrack===void 0?void 0:n.UserTrack.addUserTrack({arg1:i.Arg1Map.LOGGER_MESSAGE,arg2:t,args:{type:e,entry:r,message:JSON.stringify(a)}})}return l}catch(e){return""}};const u=e=>({debug:s("debug",e),info:s("info",e),log:a,warn:s("warn",e),error:s("error",e),none:a});t.getLogger=u},50306:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(39994),r(23263),r(47020),r(8283)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"Button",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"Checkbox",{enumerable:true,get:function(){return t.Checkbox}});Object.defineProperty(e,"ErrorBoundary",{enumerable:true,get:function(){return t.ErrorBoundary}});Object.defineProperty(e,"LineProgress",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"Modal",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"Option",{enumerable:true,get:function(){return t.Option}});Object.defineProperty(e,"QrCode",{enumerable:true,get:function(){return t.QrCode}});Object.defineProperty(e,"Scroller",{enumerable:true,get:function(){return t.Scroller}});Object.defineProperty(e,"Select",{enumerable:true,get:function(){return t.Select}});Object.defineProperty(e,"SequenceFrames",{enumerable:true,get:function(){return t.SequenceFrames}});Object.defineProperty(e,"SoundColumn",{enumerable:true,get:function(){return t.SoundColumn}});Object.defineProperty(e,"SvgIcon",{enumerable:true,get:function(){return t.SvgIcon}});Object.defineProperty(e,"SwitchBtn",{enumerable:true,get:function(){return t.SwitchBtn}});Object.defineProperty(e,"TextArea",{enumerable:true,get:function(){return t.TextArea}});Object.defineProperty(e,"TextInput",{enumerable:true,get:function(){return t.TextInput}});Object.defineProperty(e,"Toast",{enumerable:true,get:function(){return t.Toast}});Object.defineProperty(e,"toast",{enumerable:true,get:function(){return t.toast}});r=o(r);n=o(n);i=o(i);function o(e){return e&&e.__esModule?e:{default:e}}}))},50360:(e,t,r)=>{"use strict";var n=r(44576);var i=n.isFinite;e.exports=Number.isFinite||function e(t){return typeof t=="number"&&i(t)}},50375:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DownloadAudio=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.DownloadAudio=function(){function e(){n(this,e);a(this,"list",[]);a(this,"id",(0,t.getClientId)())}return o(e,[{key:"addDownloadData",value:function e(t){this.list.push(t)}},{key:"downloadFile",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"test";(0,t.getPLogger)().info("downloadFile",this.id,r);var n=new Blob(this.list);var i=document.createElement("a");var o=URL.createObjectURL(n);i.href=o;i.download=r;document.body.appendChild(i);i.click();document.body.removeChild(i);URL.revokeObjectURL(o)}},{key:"clearData",value:function e(){(0,t.getPLogger)().info("clearData",this.id);this.list=[]}}])}()}))},50477:()=>{},50778:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("link")},{link:function e(t){return i(this,"a","href",t)}})},50810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UHanV2Manager=void 0;var n=r(44104);var i=r(44772);var o=r(40494);var a=r(45112);var s=r(11686);var u=r(55798);var c=r(37204);var l=r(34632);var f=r(12574);var d=r(56043);var h=r(94855);var p=r(70487);var v=r(26904);var m=r(82144);function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=S(e,"string");return"symbol"==typeof t?t:t+""}function S(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const w=new n.Log({module:"thirdParty.UHanV2Manager"});var T;(function(e){e[e["SERVICE_ID_AUDIO"]=10002]="SERVICE_ID_AUDIO";e[e["SERVICE_ID_VIDEO"]=10003]="SERVICE_ID_VIDEO"})(T||(T={}));var I;(function(e){e[e["NONE"]=0]="NONE";e[e["BEGIN"]=1]="BEGIN";e[e["CONTINUE"]=2]="CONTINUE";e[e["END"]=3]="END"})(I||(I={}));function R(e){for(let t=0;t<e.length;t++){if(Math.abs(e[t])>1){return false}}return true}let C=t.UHanV2Manager=function(){function e(){y(this,e)}return b(e,null,[{key:"initUHanDevice",value:async function t(){var r;w.info("initUHanDevice");if(!((r=h.ConfigManager.getUHanV2Config())!==null&&r!==void 0&&r.enable)){w.info("initUHanDevice enable false");return}if(!f.ReduxManager.checkMainPage()){w.info("initUHanDevice checkMainPage false");return}e.closeUHanDevice();e.pcmPlayer=new i.PCMPlayer({channelNums:1,inputCodec:m.InputCodecsEnum.Int16,sampleRate:16e3,flushTime:100,onstatechange:(e,t,r)=>{w.debug("onstatechange",e,t,r)}});await e.decoder.init({codec:"avc1.64001f",optimizeForLatency:true,hardwareAcceleration:"prefer-hardware",codedWidth:1920,codedHeight:1080,onMessage:t=>{e.drawImage(t)}});const n=e.pcmPlayer.getMediaStream();h.ConfigManager.setThirdPartyStream(n);d.LocalWakeup.updateStreamInput({entry:"initUHanDevice",stream:n});const a=e.pcmPlayer.getAudioMediaTrack();a&&o.StreamAdapter.startSendCustomStream(a);e.serverManager=new l.UHanV2WebsocketManager({onMessage:async t=>{try{if(t instanceof Blob){if(t.arrayBuffer){e.handleMessage(await t.arrayBuffer())}else{const r=new FileReader;r.onload=()=>{e.handleMessage(r.result)};r.readAsArrayBuffer(t)}}else if(t instanceof ArrayBuffer){e.handleMessage(t)}}catch(e){w.error("handleMessage error",e)}},onOpen:()=>{e.stat.start()}});e.serverManager.init("initUHanDevice");e.initFaceCanvas()}},{key:"closeUHanDevice",value:function t(){var r,n;(r=e.pcmPlayer)===null||r===void 0?void 0:r.destroy();(n=e.serverManager)===null||n===void 0?void 0:n.destroy("closeUHanDevice");delete e.serverManager;delete e.pcmPlayer;e.deleteCanvas();e.resetStat()}},{key:"resetStat",value:function t(){w.info("resetStat");e.stat.reset()}},{key:"getAudioMediaTrack",value:function t(){var r;return(r=e.pcmPlayer)===null||r===void 0?void 0:r.getAudioMediaTrack()}},{key:"deleteCanvas",value:function t(){if(e.canvas){document.body.removeChild(e.canvas);delete e.canvas}delete e.ctx}},{key:"initFaceCanvas",value:function t(){var r,n;if((r=h.ConfigManager.getUHanV2Config())!==null&&r!==void 0&&r.showVideoUi&&(n=h.ConfigManager.getUHanV2Config())!==null&&n!==void 0&&n.enable){if(e.canvas){w.info("initFaceCanvas has init");return}e.canvas=document.createElement("canvas");e.canvas.id="u-han-face-canvas";e.ctx=e.canvas.getContext("2d");document.body.appendChild(e.canvas)}else{e.deleteCanvas()}}},{key:"handleMessage",value:function t(r){const n=new DataView(r);const i=n.getInt32(0,false);if(i===T.SERVICE_ID_VIDEO){e.handleVideoMessage(n)}else if(i===T.SERVICE_ID_AUDIO){e.handleAudioMessage(n)}}},{key:"handleAudioMessage",value:function t(r){var n;const i=r.getInt32(4,false);const o=new Uint8Array(r.buffer,12,i);const a=new Uint8Array(i);a.set(o,0);if(R(a)){return}e.stat.audioIncrease();(n=e.pcmPlayer)===null||n===void 0?void 0:n.feed(a);c.RecordManager.audioCallback2(a)}},{key:"handleVideoMessage",value:function t(r){e.stat.videoIncrease();const n={index:String(r.getBigInt64(4,false)),dataLength:r.getInt32(12,false),width:r.getInt32(16,false),height:r.getInt32(20,false),hasFace:r.getInt32(24,false),faceNum:r.getInt32(28,false),faceIndex:r.getInt32(32,false),faceW:r.getInt32(40,false),faceH:r.getInt32(44,false),faceX:r.getInt32(48,false),faceY:r.getInt32(52,false)};if(n.hasFace===1!==e.hasFace){e.hasFace=!e.hasFace;w.info("handleVideoMessage,has face",e.hasFace);clearTimeout(e.sleepTimer);if(e.hasFace){var i;a.ChatManager.startChat({entry:"hasFace",wakeupType:s.WakeupType.CAMERA,interactionMode:u.InteractionMode.AUDIO});(i=e.pcmPlayer)===null||i===void 0?void 0:i.playNow()}else{var o;e.sleepTimer=setTimeout((()=>{a.ChatManager.stopChat({entry:"noFace"})}),((o=h.ConfigManager.getUHanV2Config())===null||o===void 0?void 0:o.sleepDelay)||1e4)}}const c=new Uint8Array(r.buffer,72,n.dataLength);e.displayVideo(c,n)}},{key:"displayVideo",value:function t(r,n){e.frameWidth=n.width;e.frameHeight=n.height;e.faceRect=[n.faceX,n.faceY,n.faceW,n.faceH];e.decoder.decodeH264(r)}}])}();C.hasFace=false;C.faceRect=[];C.frameWidth=1920;C.frameHeight=1080;C.stat=new p.ThirdPartyStat("UHanV2Manager");C.decoder=new v.Decoder;C.drawImage=e=>{if(!C.canvas||!C.ctx){return}C.stat.videoDrawIncrease();C.canvas.width=C.frameWidth;C.canvas.height=C.frameHeight;C.ctx.clearRect(0,0,C.frameWidth,C.frameHeight);C.ctx.drawImage(e,0,0);if(C.hasFace){C.ctx.beginPath();C.ctx.strokeStyle="green";C.ctx.lineWidth=20;C.ctx.strokeRect(C.faceRect[0],C.faceRect[1],C.faceRect[2],C.faceRect[3]);C.ctx.closePath()}};E([(0,i.printfDecorator)(w)],C,"initUHanDevice",null);E([(0,i.printfDecorator)(w)],C,"closeUHanDevice",null);E([(0,i.printfDecorator)(w)],C,"getAudioMediaTrack",null);E([(0,i.printfDecorator)(w)],C,"deleteCanvas",null);E([(0,i.printfDecorator)(w)],C,"initFaceCanvas",null)},50851:(e,t,r)=>{"use strict";var n=r(36955);var i=r(55966);var o=r(64117);var a=r(26269);var s=r(78227);var u=s("iterator");e.exports=function(e){if(!o(e))return i(e,u)||i(e,"@@iterator")||a[n(e)]}},50961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ICSErrorMessage=void 0;var r;(function(e){e["errorParam"]="param error";e["noParentNode"]="container node no exist";e["icsWSTimeout"]="ics websocket time out"})(r||(t.ICSErrorMessage=r={}))},51025:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=t.enc;var o=i.Utf8;var a=t.algo;var s=a.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init;if(typeof t=="string"){t=o.parse(t)}var r=e.blockSize;var n=r*4;if(t.sigBytes>n){t=e.finalize(t)}t.clamp();var i=this._oKey=t.clone();var a=this._iKey=t.clone();var s=i.words;var u=a.words;for(var c=0;c<r;c++){s[c]^=1549556828;u[c]^=909522486}i.sigBytes=a.sigBytes=n;this.reset()},reset:function(){var e=this._hasher;e.reset();e.update(this._iKey)},update:function(e){this._hasher.update(e);return this},finalize:function(e){var t=this._hasher;var r=t.finalize(e);t.reset();var n=t.finalize(this._oKey.clone().concat(r));return n}})})()}))},51088:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(96395);var a=r(10350);var s=r(94901);var u=r(33994);var c=r(42787);var l=r(52967);var f=r(10687);var d=r(66699);var h=r(36840);var p=r(78227);var v=r(26269);var m=r(57657);var y=a.PROPER;var g=a.CONFIGURABLE;var b=m.IteratorPrototype;var _=m.BUGGY_SAFARI_ITERATORS;var S=p("iterator");var E="keys";var w="values";var T="entries";var I=function(){return this};e.exports=function(e,t,r,a,p,m,R){u(r,t,a);var C=function(e){if(e===p&&x)return x;if(!_&&e&&e in O)return O[e];switch(e){case E:return function t(){return new r(this,e)};case w:return function t(){return new r(this,e)};case T:return function t(){return new r(this,e)}}return function(){return new r(this)}};var k=t+" Iterator";var A=false;var O=e.prototype;var P=O[S]||O["@@iterator"]||p&&O[p];var x=!_&&P||C(p);var L=t==="Array"?O.entries||P:P;var M,N,D;if(L){M=c(L.call(new e));if(M!==Object.prototype&&M.next){if(!o&&c(M)!==b){if(l){l(M,b)}else if(!s(M[S])){h(M,S,I)}}f(M,k,true,true);if(o)v[k]=I}}if(y&&p===w&&P&&P.name!==w){if(!o&&g){d(O,"name",w)}else{A=true;x=function e(){return i(P,this)}}}if(p){N={values:C(w),keys:m?x:C(E),entries:C(T)};if(R)for(D in N){if(_||A||!(D in O)){h(O,D,N[D])}}else n({target:t,proto:true,forced:_||A},N)}if((!o||R)&&O[S]!==x){h(O,S,x,{name:p})}v[t]=x;return N}},51250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Verbatim=void 0;var n=r(6630);var i=r(44104);var o=r(44772);var a=r(95739);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const h=new i.Log({module:"HwICS.Verbatim"});let p=t.Verbatim=function(){function e({onChange:t,chatId:r}){s(this,e);this._currentIndex=0;this._originalText="";this._finished=true;this._destroyed=false;this._id=(0,o.createEntry)();this._onChange=(e,r)=>{this.debug("_onChange",r,e.length);t(e)};this.chatId=r}return c(e,[{key:"updateText",value:function e(t,r){var n;this.info("updateText",r,(n=t)===null||n===void 0?void 0:n.length,this._destroyed,this._originalText.length);if(!t){t=""}if(this._destroyed){return}if(!this.startTime){this.startTime=Date.now()}if(t.length<=this._originalText.length){return}this._originalText=a.RichTextUtils.textToTextContent(t);if(this._finished){this._finished=false;this._updateNewContent("updateText 2")}}},{key:"goToEnd",value:function e(t){const r=this.startTime?Date.now()-this.startTime:0;const n=this.getTotalTime();this.info("goToEnd",JSON.stringify({entry:t,realConsume:r,expectConsume:n,isFinished:this._finished,isDestroyed:this._destroyed}));if(this._destroyed){return}this._currentIndex=this._originalText.length;this._updateNewContent("goToEnd")}},{key:"destroy",value:function e(){this.info("destroy");this._clearTimer();this._destroyed=true}},{key:"_isEnglishContent",value:function e(t){return/[a-zA-Z]/.test(t)}},{key:"_getWordsUseTime",value:function e(t){if(t.length>1){return t.length*n.English_WORD_USE_TIME}return n.PUNCTUATION_USE_TIME_MAP[t]||n.CHINESE_WORD_USE_TIME}},{key:"_getEnglishWord",value:function e(t){let r="";for(let e=0;e<t.length;e++){if(this._isEnglishContent(t[e])){r+=t[e]}else{return r}}return r}},{key:"_getNextContent",value:function e(t){const r=t[0];if(this._isEnglishContent(r)){return this._getEnglishWord(t)}return r}},{key:"_clearTimer",value:function e(){if(this._timer){clearInterval(this._timer);this._timer=null}}},{key:"_finish",value:function e(t){t+=",_finish";const r=this.startTime?Date.now()-this.startTime:0;const n=this.getTotalTime();this.info("finish",JSON.stringify({entry:t,realConsume:r,expectConsume:n,isFinished:this._finished}));if(this._finished){return}this._clearTimer();this._onChange(this._originalText,t);this._finished=true}},{key:"_updateNewContent",value:function e(t){this.debug(t,this._destroyed,this._currentIndex);if(this._destroyed){return}const r=this._originalText.substring(this._currentIndex);this.debug(t,"noSayWords",r.length);if(!r){this._finish(t);return}const n=this._getNextContent(r);this.debug(t,"newWords",n);this._currentIndex+=n.length;this._onChange(this._originalText.substring(0,this._currentIndex),t);const i=this._getWordsUseTime(n);this._clearTimer();this._timer=setTimeout((()=>{this._updateNewContent(t)}),i)}},{key:"getTotalTime",value:function e(){const t=this._originalText.slice(0,this._currentIndex);let r=0;for(let e=0;e<t.length;){const n=this._getNextContent(t.slice(e));e+=n.length;r+=this._getWordsUseTime(n)}return r}},{key:"debug",value:function e(t,...r){h.debug(t,this._id,this.chatId,...r)}},{key:"info",value:function e(t,...r){h.info(t,this._id,this.chatId,...r)}}])}();d([(0,o.printfDecorator)(h)],p.prototype,"updateText",null);d([(0,o.printfDecorator)(h)],p.prototype,"goToEnd",null);d([(0,o.printfDecorator)(h)],p.prototype,"destroy",null);d([(0,o.printfDecorator)(h)],p.prototype,"_clearTimer",null);d([(0,o.printfDecorator)(h)],p.prototype,"_finish",null);d([(0,o.printfDecorator)(h)],p.prototype,"_updateNewContent",null)},51477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(7438);var o=r(69733);var a=r(44772);var s=r(39595);var u=r(44104);var c=r(44246);var l=r(84743);var f=r(45112);var d=r(61347);var h=r(20942);var p=b(r(86911));var v=r(55798);var m=r(94855);var y=g(r(65233));function g(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(b=function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(i=t?n:r){if(i.has(e))return i.get(e);i.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(a,t,o):a[t]=e[t]);return a})(e,t)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function E(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function w(e){var t=T(e,"string");return"symbol"==typeof t?t:t+""}function T(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function I(e,t,r){return t=A(t),R(e,k()?Reflect.construct(t,r||[],A(e).constructor):t.apply(e,r))}function R(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(k=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function O(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var x=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const L=new u.Log({module:"HwICS.UI.LayoutHUB"});function M(e,t,r){const n={[s.ChatBtnState.INIT]:r.clickToStart,[s.ChatBtnState.LOADING]:r.activating,[s.ChatBtnState.PLAY]:`${r.I_AM_LISTENING_PLEASE_SPEAK}...`,[s.ChatBtnState.THINKING]:`${r.PLEASE_WAIT}...`,[s.ChatBtnState.STOPPING]:r.stopping,[s.ChatBtnState.ANSWERING]:r.clickToStopAnswer};if(c.HWIcsElectron.isHWIcsElectron()){const e=c.HWIcsElectron.getWakeupWords();const i=e[t];n[s.ChatBtnState.INIT]=l.Utils.formatLanguage(r.sayHelloToStart2,i.startChatWord);n[s.ChatBtnState.ANSWERING]=l.Utils.formatLanguage(r.sayToStopSpeakingHub,i.stopSpeakingWord)}if(m.ConfigManager.getConfig(s.ConfigKey.ENABLE_VAD_INTERRUPT)){n[s.ChatBtnState.ANSWERING]=r.CLICK_OR_SPEAK_TO_INTERRUPT}return n[e]}let N=function(e){function t(e){var r;_(this,t);r=I(this,t,[e]);r._clicking=false;r._useMessageItemIndex=0;r._getBottomShowComp=()=>{const{chatBtnState:e,language:t}=r.props;const{hotQuestions:i}=r.state;if(![s.ChatBtnState.ANSWERING,s.ChatBtnState.INIT,s.ChatBtnState.LOADING,s.ChatBtnState.THINKING].includes(e)&&i.length>0){return(0,n.jsxs)("div",{className:"layout-hub-hot",children:[(0,n.jsxs)("div",{className:"layout-hub-hot-title",children:[t.youCanAlsoAskMe,":"]}),(0,n.jsx)("div",{className:"layout-hub-hot-issues",children:(0,n.jsx)(p.default,{data:i,direction:p.Direction.COLUMN})})]})}return null};r._getLastMessage=()=>{const{captionList:e,showAnswerChatIdList:t,chatBtnState:n}=r.props;if([s.ChatBtnState.INIT,s.ChatBtnState.LOADING].includes(n)){return undefined}const i=e.filter((e=>{if(e.messageType===d.CaptionMessageType.ANSWER){return t.includes(e.chatId)&&e.text}if(e.messageType===d.CaptionMessageType.WAITING_ANSWER){return n!==s.ChatBtnState.THINKING}return!!e.text}));return i[i.length-1]};r._changeColor=e=>{const t=e.match(/[\u201c"][\w\W]+[\u201d"]/);if(!t){return e}const r=t[0];const i=t.index||0;return(0,n.jsxs)("span",{children:[e.substring(0,i),(0,n.jsx)("span",{className:"text-blue",children:r}),e.substring(i+r.length)]})};r._getHotQuestion=async()=>{r.setState({hotQuestions:[]});const{langCode:e}=r.props;const t=await h.RtcInfoManager.getInstance().getHotQuestion({language:e,entry:"_getHotQuestion"});if(t&&t.data){r.setState({hotQuestions:t.data.map((e=>e.hot_question))})}};r._onClick=async()=>{try{if(!r._clicking){const e=(0,a.createEntry)("AIChatBtn click");r._clicking=true;const{chatBtnState:t}=r.props;L.info("_onClick",t);if(t===s.ChatBtnState.INIT){await f.ChatManager.startChat({entry:e,interactionMode:v.InteractionMode.AUDIO,preCheckPermissions:m.ConfigManager.getConfig(s.ConfigKey.PRE_CHECK_PERMISSIONS)})}else if(t===s.ChatBtnState.ANSWERING||t===s.ChatBtnState.THINKING){await f.ChatManager.interruptSpeaking(e)}else if(t===s.ChatBtnState.PLAY){await f.ChatManager.stopChat({entry:e})}r._clicking=false}}catch(e){L.error("_onClick",e);r._clicking=false}};r.state={hotQuestions:[]};return r}O(t,e);return E(t,[{key:"componentDidMount",value:function e(){this._getHotQuestion()}},{key:"componentDidUpdate",value:function e(t){if(t.langCode!==this.props.langCode){this._getHotQuestion()}}},{key:"render",value:function e(){var t,r;const{chatBtnState:i,language:o,langCode:a}=this.props;const u=this._getLastMessage();if(((t=this._preLastMsg)===null||t===void 0?void 0:t.chatId)!==(u===null||u===void 0?void 0:u.chatId)||((r=this._preLastMsg)===null||r===void 0?void 0:r.messageType)!==(u===null||u===void 0?void 0:u.messageType)){this._useMessageItemIndex=1-this._useMessageItemIndex;this._preLastMsg=u}return(0,n.jsxs)("div",{className:"layout-hub",children:[(0,n.jsxs)("div",{className:"layout-hub-top",children:[i===s.ChatBtnState.INIT&&(0,n.jsxs)("div",{className:"layout-hub-sleep btn-bg-container",onClick:this._onClick,children:[(0,n.jsx)("div",{id:"ai_chat_btn_ball",className:"btn-bg","data-testid":"layoutHUBBtnInit"}),(0,n.jsx)("div",{className:"layout-hub-tip",children:this._changeColor(M(i,a,o))})]}),i!==s.ChatBtnState.INIT&&(0,n.jsxs)("div",{className:"layout-hub-action btn-bg-container animation",onClick:this._onClick,children:[i===s.ChatBtnState.PLAY&&(0,n.jsx)("div",{id:"ai_chat_btn_ball",className:"btn-bg","data-testid":"layoutHUBBtn"}),(i===s.ChatBtnState.ANSWERING||i===s.ChatBtnState.THINKING)&&(0,n.jsx)("div",{className:"icon icon-close-mic"}),(0,n.jsx)("div",{className:"layout-hub-tip",children:this._changeColor(M(i,a,o))})]}),i!==s.ChatBtnState.INIT&&(0,n.jsx)("div",{className:"layout-hub-message transparent-scrollbar",children:(0,n.jsx)(y.default,{})})]}),this._getBottomShowComp()]})}}])}(i.Component);N=x([(0,a.componentDecorator)(L)],N);const D=e=>({enableHotIssues:e.config[s.ConfigKey.ENABLE_HOT_ISSUES],chatBtnState:e.main.chatBtnState,captionList:e.caption.captionList,language:e.lang.language,langCode:e.lang.langCode,showAnswerChatIdList:e.caption.showAnswerChatIdList});var j=t["default"]=(0,o.connect)(D)(N)},51481:(e,t,r)=>{"use strict";var n=r(46518);var i=r(36043);var o=r(10916).CONSTRUCTOR;n({target:"Promise",stat:true,forced:o},{reject:function e(t){var r=i.f(this);var n=r.reject;n(t);return r.promise}})},51629:(e,t,r)=>{"use strict";var n=r(46518);var i=r(90235);n({target:"Array",proto:true,forced:[].forEach!==i},{forEach:i})},51751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenManager=void 0;var n=r(44104);var i=r(44772);var o=r(94855);var a=r(44246);var s=r(90228);var u=r(75625);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const p=new n.Log({module:"HwICS.TokenManager"});let v=t.TokenManager=function(){function e(){c(this,e)}return f(e,null,[{key:"startRefreshToken",value:async function t({authInfo:r,entry:n=0}){n++;const{valid_period:o,refresh_token:a}=r;p.info("startRefreshToken",n,o);await(0,i.sleep)(o*500);const c=await s.HttpRequestManager.doPut({url:u.BaseUrl.TOKEN,config:{headers:{[u.HttpHeaders.AUTH_TOKEN]:a}},entry:`startRefreshToken,${n}`});if(c){r=c;e.setCacheCodeAuthInfo({authInfo:r,entry:`startRefreshToken,${n}`})}e.startRefreshToken({authInfo:r,entry:n})}},{key:"setCacheCodeAuthInfo",value:function e({authInfo:t,entry:r}){try{p.info("setCacheCodeAuthInfo",r);o.ConfigManager.updateAuthInfo({authInfo:t,entry:r});if(t){a.HWIcsElectron.saveAuthInfo({value:{authInfo:t,robotId:o.ConfigManager.getRobotId(r)},entry:`${r},setCacheCodeAuthInfo`})}else{a.HWIcsElectron.deleteAuthInfo(`${r},setCacheCodeAuthInfo`)}return true}catch(e){p.error("setCodeAuthInfo",e);return false}}},{key:"getCacheAuthInfo",value:async function e(t){p.info("getCacheAuthInfo",t);if(!a.HWIcsElectron.isHWIcsElectron()){return null}const r=await a.HWIcsElectron.queryAuthInfo(`${t},getCacheAuthInfo`);if(r!==null&&r!==void 0&&r.robotId&&(r===null||r===void 0?void 0:r.robotId)===o.ConfigManager.getRobotId(t)){return r.authInfo}return null}}])}()},52155:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.pad.ZeroPadding={pad:function(e,t){var r=t*4;e.clamp();e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words;var r=e.sigBytes-1;for(var r=e.sigBytes-1;r>=0;r--){if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}}};return e.pad.ZeroPadding}))},52568:(e,t,r)=>{"use strict";var n=r(94644);var i=r(72805);var o=n.aTypedArrayConstructor;var a=n.exportTypedArrayStaticMethod;a("of",(function e(){var t=0;var r=arguments.length;var n=new(o(this))(r);while(r>t)n[t]=arguments[t++];return n}),i)},52675:(e,t,r)=>{"use strict";r(6761);r(81510);r(97812);r(33110);r(49773)},52703:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79039);var o=r(79504);var a=r(655);var s=r(43802).trim;var u=r(47452);var c=n.parseInt;var l=n.Symbol;var f=l&&l.iterator;var d=/^[+-]?0x/i;var h=o(d.exec);var p=c(u+"08")!==8||c(u+"0x16")!==22||f&&!i((function(){c(Object(f))}));e.exports=p?function e(t,r){var n=s(a(t));return c(n,r>>>0||(h(d,n)?16:10))}:c},52811:(e,t,r)=>{"use strict";var n=r(46518);var i=r(92744);var o=r(79039);var a=r(20034);var s=r(3451).onFreeze;var u=Object.freeze;var c=o((function(){u(1)}));n({target:"Object",stat:true,forced:c,sham:!i},{freeze:function e(t){return u&&a(t)?u(s(t)):t}})},52962:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function t(){return!!e})()}var o=r(82284);var a=r(9417);function s(e,t){if(t&&("object"==(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.A)(e)}function u(e){var t=i();return function(){var r,i=n(e);if(t){var o=n(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return s(this,r)}}},52967:(e,t,r)=>{"use strict";var n=r(46706);var i=r(20034);var o=r(67750);var a=r(73506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=false;var t={};var r;try{r=n(Object.prototype,"__proto__","set");r(t,[]);e=t instanceof Array}catch(e){}return function t(n,s){o(n);a(s);if(!i(n))return n;if(e)r(n,s);else n.__proto__=s;return n}}():undefined)},53046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UHanManager=void 0;var n=r(44104);var i=r(44772);var o=r(40494);var a=r(45112);var s=r(11686);var u=r(55798);var c=r(37204);var l=r(31016);var f=r(12574);var d=r(56043);var h=r(94855);var p=r(70487);var v=r(82144);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e){var t=_(e,"string");return"symbol"==typeof t?t:t+""}function _(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new n.Log({module:"thirdParty.UHanManager"});var w;(function(e){e[e["SERVICE_ID_AUDIO"]=10001]="SERVICE_ID_AUDIO";e[e["SERVICE_ID_VIDEO"]=10002]="SERVICE_ID_VIDEO"})(w||(w={}));function T(e){for(let t=0;t<e.length;t++){if(Math.abs(e[t])>1){return false}}return true}let I=t.UHanManager=function(){function e(){m(this,e)}return g(e,null,[{key:"initUHanDevice",value:function t(){var r;E.info("initUHanDevice");if(!((r=h.ConfigManager.getUHanConfig())!==null&&r!==void 0&&r.enable)){E.info("initUHanDevice enable false");return}if(!f.ReduxManager.checkMainPage()){E.info("initUHanDevice checkMainPage false");return}e.closeUHanDevice();e.pcmPlayer=new i.PCMPlayer({channelNums:1,inputCodec:v.InputCodecsEnum.Int16,sampleRate:16e3,flushTime:100,onstatechange:(e,t,r)=>{E.debug("onstatechange",e,t,r)}});const n=e.pcmPlayer.getMediaStream();h.ConfigManager.setThirdPartyStream(n);d.LocalWakeup.updateStreamInput({entry:"initUHanDevice",stream:n});const a=e.pcmPlayer.getAudioMediaTrack();e.pcmPlayer.muteAudio();a&&o.StreamAdapter.startSendCustomStream(a);e.serverManager=new l.UHanWebsocketManager({onMessage:async t=>{try{if(t instanceof Blob){if(t.arrayBuffer){e.handleMessage(await t.arrayBuffer())}else{const r=new FileReader;r.onload=()=>{e.handleMessage(r.result)};r.readAsArrayBuffer(t)}}else if(t instanceof ArrayBuffer){e.handleMessage(t)}}catch(e){E.error("handleMessage error",e)}},onOpen:()=>{e.stat.start()}});e.serverManager.init("initUHanDevice");e.initFaceCanvas()}},{key:"closeUHanDevice",value:function t(){var r,n;(r=e.pcmPlayer)===null||r===void 0?void 0:r.destroy();(n=e.serverManager)===null||n===void 0?void 0:n.destroy("closeUHanDevice");delete e.serverManager;delete e.pcmPlayer;e.deleteCanvas();e.resetStat()}},{key:"resetStat",value:function t(){E.info("resetStat");e.stat.reset()}},{key:"getAudioMediaTrack",value:function t(){var r;return(r=e.pcmPlayer)===null||r===void 0?void 0:r.getAudioMediaTrack()}},{key:"deleteCanvas",value:function t(){if(e.canvas){document.body.removeChild(e.canvas);delete e.canvas}delete e.ctx}},{key:"initFaceCanvas",value:function t(){var r,n;if((r=h.ConfigManager.getUHanConfig())!==null&&r!==void 0&&r.showVideoUi&&(n=h.ConfigManager.getUHanConfig())!==null&&n!==void 0&&n.enable){if(e.canvas){E.info("initFaceCanvas has init");return}e.canvas=document.createElement("canvas");e.canvas.id="u-han-face-canvas";e.ctx=e.canvas.getContext("2d");document.body.appendChild(e.canvas)}else{e.deleteCanvas()}}},{key:"handleMessage",value:function t(r){const n=new DataView(r);const i=n.getInt32(0,false);if(i===w.SERVICE_ID_VIDEO){e.handleVideoMessage(n)}else if(i===w.SERVICE_ID_AUDIO){e.handleAudioMessage(n)}}},{key:"handleAudioMessage",value:function t(r){var n;const i=r.getInt32(4,false);const o=new Uint8Array(r.buffer,8,i);const a=new Uint8Array(i);a.set(o,0);if(T(a)){return}e.stat.audioIncrease();(n=e.pcmPlayer)===null||n===void 0?void 0:n.feed(a);c.RecordManager.audioCallback2(a)}},{key:"handleVideoMessage",value:function t(r){e.stat.videoIncrease();const n={width:r.getInt32(8,false),height:r.getInt32(12,false),faceX:r.getInt32(16,false),faceY:r.getInt32(20,false),faceW:r.getInt32(24,false),faceH:r.getInt32(28,false),isMouthOcc:r.getInt32(32,false)};if(r.getInt32(36,false)===1!==e.hasFace){e.hasFace=!e.hasFace;E.info("handleVideoMessage,has face",e.hasFace);clearTimeout(e.sleepTimer);if(e.hasFace){var i,o;a.ChatManager.startChat({entry:"hasFace",wakeupType:s.WakeupType.CAMERA,interactionMode:u.InteractionMode.AUDIO});(i=e.pcmPlayer)===null||i===void 0?void 0:i.playNow();(o=e.pcmPlayer)===null||o===void 0?void 0:o.unmuteAudio()}else{var c,l;e.sleepTimer=setTimeout((()=>{a.ChatManager.stopChat({entry:"noFace"})}),((c=h.ConfigManager.getUHanConfig())===null||c===void 0?void 0:c.sleepDelay)||1e4);(l=e.pcmPlayer)===null||l===void 0?void 0:l.muteAudio()}}const f=new Uint8Array(r.buffer,40);e.displayVideo(f,n)}},{key:"displayVideo",value:function t(r,n){const i=n.width;const o=n.height;if(r.length!==i*o*3){E.error("Invalid video data length",r.length,i,o);return}if(!e.canvas||!e.ctx){return}e.stat.videoDrawIncrease();e.canvas.width=i;e.canvas.height=o;const a=new Uint8ClampedArray(i*o*4);for(let e=0,t=0;e<r.length;e+=3,t+=4){a[t]=r[e+2];a[t+1]=r[e+1];a[t+2]=r[e];a[t+3]=255}const s=new ImageData(a,i,o);e.ctx.putImageData(s,0,0);e.ctx.strokeStyle="green";e.ctx.lineWidth=2;e.ctx.strokeRect(n.faceX,n.faceY,n.faceW,n.faceH)}}])}();I.hasFace=false;I.stat=new p.ThirdPartyStat("UHanManager");S([(0,i.printfDecorator)(E)],I,"initUHanDevice",null);S([(0,i.printfDecorator)(E)],I,"closeUHanDevice",null);S([(0,i.printfDecorator)(E)],I,"getAudioMediaTrack",null);S([(0,i.printfDecorator)(E)],I,"deleteCanvas",null);S([(0,i.printfDecorator)(E)],I,"initFaceCanvas",null)},53179:(e,t,r)=>{"use strict";var n=r(92140);var i=r(36955);e.exports=n?{}.toString:function e(){return"[object "+i(this)+"]"}},53250:e=>{"use strict";var t=Math.expm1;var r=Math.exp;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||t(-2e-17)!==-2e-17?function e(t){var n=+t;return n===0?n:n>-1e-6&&n<1e-6?n+n*n/2:r(n)-1}:t},53320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);var o=r(61347);r(89854);var a=r(44772);var s=r(44104);var u=r(44246);var c=p(r(3667));var l=r(64895);var f=p(r(46942));var d=r(39595);var h=r(69733);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _(e,t,r){return t=T(t),S(e,w()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}function S(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var C=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const k=new s.Log({module:"HwICS.UI.MessageItem"});let A=function(e){function t(){var e;v(this,t);e=_(this,t,arguments);e._setRef=t=>{if(t){e.itemElem=t}};e._scrollIntoView=()=>{if(e.props.isLastMessage){var t;(t=e.itemElem)===null||t===void 0?void 0:t.scrollIntoView(false)}};return e}I(t,e);return y(t,[{key:"componentDidMount",value:function e(){this._scrollIntoView()}},{key:"render",value:function e(){const{item:t,isLastMessage:r,itemKey:i,hideAvatar:a,enableVerbatim:s}=this.props;let d;let h=(0,f.default)("message-item answer",{"width-avatar":!a});const p=(0,n.jsx)("div",{className:"item-content box-shadow",children:(0,n.jsx)(c.default,{itemKey:i,text:t.text,message:t,scrollIntoView:this._scrollIntoView,enableVerbatim:(u.HWIcsElectron.isHWIcsElectron()||s)&&r,showMode:l.ShowMode.RICH_TEXT})});switch(t.messageType){case o.CaptionMessageType.WAITING_ANSWER:d=(0,n.jsxs)(n.Fragment,{children:[!a&&(0,n.jsx)("div",{className:"user-ico"}),(0,n.jsx)(c.default,{showMode:l.ShowMode.WAITING,message:t})]});break;case o.CaptionMessageType.QUESTION:h="message-item question";d=(0,n.jsxs)(n.Fragment,{children:[p,!a&&(0,n.jsx)("div",{className:"user-ico"})]});break;case o.CaptionMessageType.ANSWER:d=(0,n.jsxs)(n.Fragment,{children:[!a&&(0,n.jsx)("div",{className:"user-ico"}),p]});break;default:break}return(0,n.jsx)("div",{className:h,ref:this._setRef,children:d})}}])}(i.Component);A=C([(0,a.componentDecorator)(k)],A);const O=e=>({enableVerbatim:e.config[d.ConfigKey.ENABLE_VERBATIM]});var P=t["default"]=(0,h.connect)(O)(A)},53410:(e,t,r)=>{"use strict";r.r(t)},53487:(e,t,r)=>{"use strict";var n=r(43802).start;var i=r(60706);e.exports=i("trimStart")?function e(){return n(this)}:"".trimStart},53602:e=>{"use strict";var t=2220446049250313e-31;var r=1/t;e.exports=function(e){return e+r-r}},53639:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ImageItem=void 0;var n=r(74848);var i=r(44772);var o=r(44104);r(64697);var a=r(90108);var s=r(26440);var u=r(86221);var c=r(81762);var l=r(50088);var f=r(65425);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t,r){return t=T(t),g(e,_()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}function g(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function S(e,t,r,n){var i=E(T(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function E(){return E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=w(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},E.apply(null,arguments)}function w(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}const C=new o.Log({module:"UI.ImageItem"});let k=t.ImageItem=function(e){function t(e){var r;d(this,t);r=y(this,t,[e]);r.setImgRef=e=>{r.imgElem=e};r.onLoad=async()=>{const{dealLoad:e}=r.props;e===null||e===void 0?void 0:e();r.calcPoint()};r.calcPoint=async()=>{await(0,i.sleep)(10);if(!r.imgElem){C.error("calcPoint not get ref element");return}const{src:e}=r.props;const t=decodeURI(e).replace(/ /g,"");const n=(0,a.getPointByUrl)({url:t,imageWidth:r.imgElem.width,imageHeight:r.imgElem.height});r.setState({pointInfo:n})};r.handleClick=()=>{const{chatId:e}=r.props;const t=(0,u.getMediaId)(e,c.MediaType.IMAGE,0);(0,s.$dispatch)((0,l.showMediaView)());(0,s.$dispatch)((0,l.setMediaViewCurId)(t))};r.state={pointInfo:{pointX:0,pointY:0},zoomRatio:1};return r}I(t,e);return p(t,[{key:"componentDidMount",value:function e(){S(t,"componentDidMount",this,3)([]);if(!this.imgElem){return}const r=this.imgElem.width;const n=this.imgElem.naturalWidth;C.info("componentDidMount",r,n)}},{key:"render",value:function e(){const{src:t,alt:r,title:o,dealError:s,className:u}=this.props;const{pointInfo:c}=this.state;if((0,i.isNullOrEmpty)(t===null||t===void 0?void 0:t.trim())){return null}const l=decodeURI(t).replace(/ /g,"");return(0,n.jsxs)("div",{className:"image-item",children:[(0,n.jsx)("img",{"data-testid":"media-view-show",src:l,alt:r,title:o,onLoad:this.onLoad,onError:s,className:u,ref:this.setImgRef,onClick:this.handleClick}),(0,n.jsx)(a.PointCircle,{left:c.pointX,top:c.pointY})]})}}])}(f.PointCircleContainer)},53640:(e,t,r)=>{"use strict";var n=r(28551);var i=r(84270);var o=TypeError;e.exports=function(e){n(this);if(e==="string"||e==="default")e="string";else if(e!=="number")throw new o("Incorrect hint");return i(this,e)}},53803:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.handleUrlPrint=e.handleTokenPrint=e.handlePhoneNumberPrint=e.handleNickNamePrint=e.handleIpPrint=e.handleAccountPrint=e.formatConfName=void 0;var r=e.handlePhoneNumberPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}var n=r.toString();var i=/^1[3456789]\d{9}$/g;var o=n.length;var a=Math.floor((o-3)/2);if(o<3){return n}else if(o<5){return n.substr(0,1)+"***"}else if(o>11){return n.substr(0,2)+"*****"+n.substr(-3)}return i.test(n)?n.substr(0,3)+"****"+n.substr(7):n.substr(0,a)+"***"+n.substr(a+3)};var n=e.handleAccountPrint=function e(n){if((0,t.isNullOrEmpty)(n)||!n){return""}n=n.toString();var i=/^1[3456789]\d{9}$/g;if(i.test(n)){return r(n)}var o=/^\+99|\+8657\d+/g;if(o.test(n)){return n.substr(0,2)+"*****"+n.substr(-3)}if(n.length<=5){return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}if(n.length<=13){return n.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return n.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))};var i=e.handleIpPrint=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||!r){return""}return r.replace(/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi,(function(e){return e.replace(/(\d{1,3})$/gi,(function(e,t){return t.replace(/\d/gi,"*")}))}))};var o=e.handleUrlPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.split("?")[0]};var a=e.handleTokenPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.substr(0,2)+"***"+r.substr(-3)};var s=e.handleNickNamePrint=function e(n){if((0,t.isNullOrEmpty)(n)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(n))){return""}n=n.toString();var i=/^1[3|4|5|6|7|8|9][0-9]{9}$/g;if(i.test(n)){return r(n)}return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))};var u=e.formatConfName=function e(r){if((0,t.isNullOrEmpty)(r)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(r))){return""}r=r.toString();var n=r.length;if(n<5){return r.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}else if(n<=13){return r.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return r.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}}))},53838:(e,t,r)=>{"use strict";var n=r(97080);var i=r(25170);var o=r(38469);var a=r(83789);e.exports=function e(t){var r=n(this);var s=a(t);if(i(r)>s.size)return false;return o(r,(function(e){if(!s.includes(e))return false}),true)!==false}},53898:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(30491),r(8707)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UrlUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){return l(e)||c(e,t)||s(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function l(e){if(Array.isArray(e))return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=m(e,"string");return"symbol"==i(t)?t:t+""}function m(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=e.UrlUtil=function(){function e(){f(this,e)}return h(e,null,[{key:"addQuery",value:function r(n,i,o){if((0,t.isNullOrEmpty)(n)||(0,t.isNullOrEmpty)(i)){return n}var a=/\?/.test(n)?"&":"?";var s=(0,t.formatType)(i)===t.formatType.OBJECT?i:e.parseQuery(i);return"".concat(n).concat(a).concat(e.stringfyQuery(s,o))}},{key:"parseQuery",value:function e(r,n){if(!r||(0,t.formatType)(r)!==t.formatType.STRING){return{}}var i=n!==null&&n!==void 0?n:{},a=i.decode,s=a===void 0?true:a;var u=r[0]==="?"?r.slice(1):r;return u.split("&").reduce((function(e,t){var r=t.split("=")||[],n=o(r,2),i=n[0],a=n[1];if(s){i=decodeURIComponent(i);a=decodeURIComponent(a)}e[i]=a;return e}),{})}},{key:"stringfyQuery",value:function e(r,n){if((0,t.isNullOrEmpty)(r)||(0,t.formatType)(r)!==t.formatType.OBJECT||(0,t.formatType)(r)===t.formatType.ARRAY){return""}var i=n!==null&&n!==void 0?n:{},a=i.encode,s=a===void 0?true:a,u=i.addQueryPrefix,c=u===void 0?false:u;var l=Object.entries(r).reduce((function(e,t){var r=o(t,2),n=r[0],i=r[1];var a=s?"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i)):"".concat(n,"=").concat(i);e.push(a);return e}),[]).join("&");return c?"?".concat(l):l}},{key:"getAllUrlSearch",value:function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return{}}try{var n=new URL(r);var i=n.searchParams.entries();var o=i.next();var a={};while(!o.done){a[o.value[0]]=decodeURIComponent(o.value[1]);o=i.next()}return a}catch(e){return{}}}},{key:"getSearchValue",value:function e(r,n){if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return null}try{var i=new URL(r);return i.searchParams.get(n)}catch(e){return null}}}])}();p(y,"checkHttpsUrl",(0,r.startsWith)("https://"));p(y,"checkHttpUrl",(0,r.startsWith)("http://"));p(y,"isInHttpsWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("https:")));p(y,"isInHttpWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("http:")));p(y,"checkIPV4Url",(function(e){try{if(e.hostname){return(0,n.checkIPV4)(e.hostname)}var t=new URL(e);return(0,n.checkIPV4)(t.hostname)}catch(e){return false}}))}))},53921:(e,t,r)=>{"use strict";var n=r(46518);var i=r(72652);var o=r(97040);n({target:"Object",stat:true},{fromEntries:function e(t){var r={};i(t,(function(e,t){o(r,e,t)}),{AS_ENTRIES:true});return r}})},54554:(e,t,r)=>{"use strict";var n=r(46518);var i=r(48981);var o=r(35610);var a=r(91291);var s=r(26198);var u=r(34527);var c=r(96837);var l=r(1469);var f=r(97040);var d=r(84606);var h=r(70597);var p=h("splice");var v=Math.max;var m=Math.min;n({target:"Array",proto:true,forced:!p},{splice:function e(t,r){var n=i(this);var h=s(n);var p=o(t,h);var y=arguments.length;var g,b,_,S,E,w;if(y===0){g=b=0}else if(y===1){g=0;b=h-p}else{g=y-2;b=m(v(a(r),0),h-p)}c(h+g-b);_=l(n,b);for(S=0;S<b;S++){E=p+S;if(E in n)f(_,S,n[E])}_.length=b;if(g<b){for(S=p;S<h-b;S++){E=S+b;w=S+g;if(E in n)n[w]=n[E];else d(n,w)}for(S=h;S>h-b+g;S--)d(n,S-1)}else if(g>b){for(S=h-b;S>p;S--){E=S+b-1;w=S+g-1;if(E in n)n[w]=n[E];else d(n,w)}}for(S=0;S<g;S++){n[S+p]=arguments[S+2]}u(n,h-b+g);return _}})},54561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.xml2String=t.string2HTML=void 0;const r=e=>e.replace(/[\u0000-\u001f]/g,(e=>["\n","\t","\r"].includes(e)?e:""));const n=function(e){const t=document.createElement("div");if(e.indexOf("<!DOCTYPE")!==-1||e===""){return t}e=r(e);const n=(new DOMParser).parseFromString(e,"text/html");const i=n.querySelector("body");if(i!==null&&i!==void 0&&i.childNodes){t.append(...Array.from(i.childNodes))}return t};t.string2HTML=n;const i=function(e){return(new XMLSerializer).serializeToString(e).replace(' xmlns="http://www.w3.org/1999/xhtml"',"")};t.xml2String=i},54694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);var o=r(69733);var a=u(r(90019));var s=u(r(72044));r(7298);r(78523);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}let S=function(e){function t(){c(this,t);return p(this,t,arguments)}b(t,e);return f(t,[{key:"render",value:function e(){const{useDefaultBackground:t}=this.props;return(0,n.jsxs)("div",{className:`digital-intelligent-interaction ${t?"digital-intelligent-interaction-bg":""}`,children:[(0,n.jsx)(a.default,{}),(0,n.jsx)(s.default,{})]})}}])}(i.Component);const E=e=>({useDefaultBackground:e.config.useDefaultBackground});var w=t["default"]=(0,o.connect)(E)(S)},54706:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.timeWorkerScript=e.getTimeWorkerUrl=void 0;var t=e.timeWorkerScript="\nclass TimerWorker {\n static timeoutMap = new Map();\n\n static eventListener(e) {\n const { data } = e;\n switch (data.method) {\n case 'clear':\n TimerWorker.clearTimer(data);\n break;\n case 'set':\n TimerWorker.setTimer(data);\n break;\n default:\n break;\n }\n }\n\n static deleteTimerByKey(key) {\n const timer = TimerWorker.timeoutMap.get(key);\n if (timer) {\n clearInterval(timer);\n TimerWorker.timeoutMap.delete(key);\n return true;\n }\n return false;\n }\n\n static clearTimer(data) {\n const { sno, timerId } = data;\n TimerWorker.sendToMain({ sno, timerId, result: TimerWorker.deleteTimerByKey(timerId) });\n }\n\n static setTimer(data) {\n const { now = 0, sno, timerId, delay = 0 } = data;\n const remainingDelay = TimerWorker.getRealTimeInterval(delay, now);\n TimerWorker.timeoutMap.set(timerId, setTimeout(TimerWorker.dealTimer, remainingDelay, { sno, timerId }));\n }\n\n static getRealTimeInterval(delay, now) {\n const workerNow = performance.now();\n return delay + now - workerNow - performance.timeOrigin;\n }\n\n static dealTimer({ timerId, sno }) {\n TimerWorker.timeoutMap.delete(timerId);\n TimerWorker.sendToMain({ result: true, timerId, sno });\n }\n\n static sendToMain(data) {\n postMessage(data);\n }\n}\n\naddEventListener('message', TimerWorker.eventListener);\n";var r=e.getTimeWorkerUrl=function e(){return URL.createObjectURL(new Blob([t]))}}))},54737:(e,t,r)=>{"use strict";if(true){e.exports=r(28989)}else{}},54743:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(66346);var a=r(87633);var s="ArrayBuffer";var u=o[s];var c=i[s];n({global:true,constructor:true,forced:c!==u},{ArrayBuffer:u});a(s)},54808:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e,t){if(!e){return false}if(e.contains){return e.contains(t)}var r=t;while(r){if(r===e){return true}r=r.parentNode}return false}},54905:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.pad.Iso10126={pad:function(t,r){var n=r*4;var i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};return e.pad.Iso10126}))},54972:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(28551);var a=r(1767);var s=r(24149);var u=r(99590);var c=r(19462);var l=r(9539);var f=r(84549);var d=r(96395);var h=!d&&f("take",RangeError);var p=c((function(){var e=this.iterator;if(!this.remaining--){this.done=true;return l(e,"normal",undefined)}var t=o(i(this.next,e));var r=this.done=!!t.done;if(!r)return t.value}));n({target:"Iterator",proto:true,real:true,forced:d||h},{take:function e(t){o(this);var r;try{r=u(s(+t))}catch(e){l(this,"throw",e)}if(h)return i(h,this,r);return new p(a(this),{remaining:r})}})},55002:e=>{"use strict";e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},55081:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);n({global:true,forced:i.globalThis!==i},{globalThis:i})},55113:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyB=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.ChromaKeyB=function(){function e(t){n(this,e);a(this,"gl",void 0);a(this,"keyColor",void 0);a(this,"opts",void 0);a(this,"texLoc",void 0);a(this,"texWidthLoc",void 0);a(this,"texHeightLoc",void 0);a(this,"keyColorLoc",void 0);a(this,"similarityLoc",void 0);a(this,"smoothnessLoc",void 0);a(this,"spillLoc",void 0);a(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return o(e,[{key:"dealVideoFrame",value:function e(r,n){if(!this.keyColor){this.keyColor=t.ChromaKeyA.handleGetKeyColor(r)}if(!this.gl){this.gl=this.handleInitGl(n)}this.drawImg(r)}},{key:"dealVideoFrameToImage",value:function e(r){if(!this.keyColor){this.keyColor=t.ChromaKeyA.handleGetKeyColor(r)}if(!this.gl){var n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n}this.drawImg(r);return createImageBitmap(this.optCvs,{imageOrientation:"none"})}},{key:"drawImg",value:function e(t){var r=this.gl;r.viewport(0,0,t.videoWidth,t.videoHeight);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t);r.uniform1i(this.texLoc,0);r.uniform1f(this.texWidthLoc,t.videoWidth);r.uniform1f(this.texHeightLoc,t.videoHeight);r.uniform3fv(this.keyColorLoc,this.keyColor.map((function(e){return e/255})));r.uniform1f(this.similarityLoc,this.opts.similarity);r.uniform1f(this.smoothnessLoc,this.opts.smoothness);r.uniform1f(this.spillLoc,this.opts.spill);r.drawArrays(r.TRIANGLE_FAN,0,4)}},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{alpha:true})||r.getContext("webgl",{alpha:true});if(!n){throw Error("Cant create gl context")}var i=n.createShader(n.VERTEX_SHADER);n.shaderSource(i,e.vertexShader);n.compileShader(i);var o=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(o,e.fragmentShader);n.compileShader(o);var a=n.createProgram();n.attachShader(a,i);n.attachShader(a,o);n.linkProgram(a);n.useProgram(a);var s=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,s);n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,1,-1,-1,1,-1,1,1]),n.STATIC_DRAW);var u=n.getAttribLocation(a,"c");n.vertexAttribPointer(u,2,n.FLOAT,false,0,0);n.enableVertexAttribArray(u);n.activeTexture(n.TEXTURE0);var c=n.createTexture();n.bindTexture(n.TEXTURE_2D,c);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR);this.texLoc=n.getUniformLocation(a,"tex");this.texWidthLoc=n.getUniformLocation(a,"texWidth");this.texHeightLoc=n.getUniformLocation(a,"texHeight");this.keyColorLoc=n.getUniformLocation(a,"keyColor");this.similarityLoc=n.getUniformLocation(a,"similarity");this.smoothnessLoc=n.getUniformLocation(a,"smoothness");this.spillLoc=n.getUniformLocation(a,"spill");return n}}])}();a(c,"vertexShader","attribute vec2 c; void main(void) { gl_Position=vec4(c, 0.0, 1.0); }");a(c,"fragmentShader","\nprecision mediump float;\nuniform sampler2D tex;\nuniform float texWidth;\nuniform float texHeight;\nuniform vec3 keyColor;\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\nvec4 GetRgba(float detaX, float detaY) {\n vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);\n vec4 rgba = texture2D(tex, texCoord);\n float green = rgba.g - max(rgba.r, rgba.b);\n float greenKey = keyColor.g - max(keyColor.r, keyColor.b);\n float mask = smoothstep(greenKey-0.1, 0.0, green);\n rgba.a = mask;\n return rgba;\n}\nvec4 ProcessChromaKey() {\n vec4 rgba = GetRgba(0.0, 0.0);\n if (rgba.a > 0.0 && rgba.a < 1.0) {\n vec4 rgbas[9];\n float maxMask = 0.0;\n vec4 minRgba = rgba;\n for (int i = -1; i <= 1; i++) {\n for (int j = -1; j <= 1; j++) {\n vec4 tmp;\n if (i == 0 && j == 0) {\n tmp = rgba;\n } else {\n tmp = GetRgba(float(i), float(j));\n }\n rgbas[(i+1)*3 + (j+1)] = tmp;\n if (tmp.a > maxMask) {\n maxMask = tmp.a;\n minRgba = tmp;\n }\n }\n }\n rgbas[4] = minRgba;\n rgbas[4].a = rgba.a;\n vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);\n\n float gs[9];\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.05;\n gs[4] = 0.6;\n for(int i = 0; i < 9; i++) {\n dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];\n }\n\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.15;\n gs[4] = 0.2;\n for(int i = 0; i < 9; i++) {\n dest.a = dest.a + rgbas[i].a* gs[i];\n }\n rgba.rgb = dest.rgb;\n rgba.a = dest.a;\n if (rgba.g > rgba.r && rgba.g > rgba.b) {\n rgba.g = max(rgba.r, rgba.b);\n }\n rgba.rgb = rgba.rgb * rgba.a;\n } else {\n rgba.rgb = rgba.rgb * rgba.a;\n }\n return rgba;\n}\n\nvoid main(void) {\n gl_FragColor = ProcessChromaKey();\n}")}))},55169:(e,t,r)=>{"use strict";var n=r(3238);var i=TypeError;e.exports=function(e){if(n(e))throw new i("ArrayBuffer is detached");return e}},55349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ICSError=void 0;var n=r(21013);var i=r(63226);var o=r(11686);var a=r(40159);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}let d=t.ICSError=u((function e({message:t,code:r,module:s}){f(this,e);this.code=r;this.message=t;this.module=s;n.UserTrack.addUserTrack({arg1:i.Arg1Map.ICS_SDK_ERROR,arg2:s,args:{message:t,error:r}});a.EventManager.dispatchICSEvent(o.ICSEventKey.ERROR,this)}))},55443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StorageManager=void 0;var n=r(44772);var i=r(44104);var o=r(94855);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const d=new i.Log({module:"StorageManager"});let h=t.StorageManager=function(){function e(){a(this,e)}return u(e,null,[{key:"setLocalStorageItem",value:async function t(r){r.key=await e.formatKey(r.key);return(0,n.setLocalStorageItem)(r)}},{key:"getLocalStorageItem",value:async function t(r){return localStorage.getItem(await e.formatKey(r))}},{key:"removeLocalStorageItem",value:async function t(r){return localStorage.removeItem(await e.formatKey(r))}},{key:"formatKey",value:async function t(r){if(!e.digitalHumanConfig){var n,i;e.digitalHumanConfig=await((n=window.hwIcsElectron)===null||n===void 0?void 0:(i=n.getMultipleDigitalHumanConfig)===null||i===void 0?void 0:i.call(n))}if(!e.digitalHumanConfig||e.digitalHumanConfig.count<=1||e.digitalHumanConfig.urlListLength<=1||e.digitalHumanConfig.avatarList.length<=1){return r}return`${r}-${o.ConfigManager.getRobotId("getAuthCacheKey")}`}},{key:"checkLocalStorage",value:async function t(){const r=await e.setLocalStorageItem({key:"checkLocalStorageData",value:new Array(1024*40/2).fill("a").join(""),isForce:true});if(r){await e.removeLocalStorageItem("checkLocalStorageData")}}}])}();f([(0,n.printfDecorator)(d)],h,"setLocalStorageItem",null);f([(0,n.printfDecorator)(d)],h,"getLocalStorageItem",null);f([(0,n.printfDecorator)(d)],h,"removeLocalStorageItem",null);f([(0,n.printfDecorator)(d)],h,"formatKey",null);f([(0,n.printfDecorator)(d)],h,"checkLocalStorage",null)},55798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TransmissionAction=t.ReadyState=t.InteractionMode=t.HcsoWssAction=t.ERROR_LEVEL=t.CloudWssAction=void 0;var r;(function(e){e["MINOR"]="MINOR";e["MAJOR"]="MAJOR";e["NO_PROMPT"]="NO_PROMPT"})(r||(t.ERROR_LEVEL=r={}));var n;(function(e){e["START_CHAT"]="start_chat";e["START_CHAT_RSP"]="start_chat_rsp";e["STOP_CHAT"]="stop_chat";e["STOP_CHAT_RSP"]="stop_chat_rsp";e["STOP_JOB"]="stop_job";e["STOP_JOB_RSP"]="stop_job_rsp";e["ENTER_SLEEP"]="enter_sleep";e["SPEECH_RECOGNIZED"]="speech_recognized";e["SEMANTIC_RECOGNIZED"]="semantic_recognized";e["INTERRUPT"]="interrupt_chat";e["INTERRUPT_RESULT"]="interrupt_result";e["START_SPEAKING"]="start_speaking";e["STOP_SPEAKING"]="stop_speaking";e["PING"]="ping";e["PONG"]="pong";e["ERROR"]="error";e["ACCEPT_NEW_QUESTION"]="accept_new_question";e["LANGUAGE_CHANGE"]="change_language";e["ACTIVE_INTERACTION_MODE"]="active_interaction_mode";e["ACTIVE_INTERACTION_MODE_RSP"]="active_interaction_mode_rsp";e["INTERACTION_MODE_SWITCH"]="interaction_mode_switch";e["INTERACTION_MODE_SWITCH_RSP"]="interaction_mode_switch_rsp";e["TEXT_QUESTION"]="text_question";e["TEXT_QUESTION_RSP"]="text_question_rsp";e["LANGUAGE_CHANGE_RSP"]="change_language_rsp";e["TEXT_DRIVE"]="text_drive";e["TEXT_DRIVE_RSP"]="text_drive_rsp";e["TRANSPARENT_TRANSMISSION"]="transparent_transmission";e["START_RECORD"]="start_record";e["START_RECORD_RSP"]="start_record_rsp";e["STOP_RECORD"]="stop_record";e["STOP_RECORD_RSP"]="stop_record_rsp";e["RECORD_COMPLETE"]="record_complete"})(n||(t.CloudWssAction=n={}));var i;(function(e){e["EXIT_MUTE_ALERT"]="exit_mute_alert"})(i||(t.TransmissionAction=i={}));var o;(function(e){e["GET_VIDEO_CODES"]="get_video_codecs";e["GET_VIDEO_CODES_RSP"]="get_video_codecs_rsp";e["START_SEND"]="start_send";e["START_SEND_RSP"]="start_send_rsp";e["KICK_OUT"]="kick_out";e["PING"]="ping";e["PONG"]="pong"})(o||(t.HcsoWssAction=o={}));var a;(function(e){e[e["CONNECTING"]=0]="CONNECTING";e[e["OPEN"]=1]="OPEN";e[e["CLOSING"]=2]="CLOSING";e[e["CLOSED"]=3]="CLOSED"})(a||(t.ReadyState=a={}));var s;(function(e){e["AUDIO"]="AUDIO";e["TEXT"]="TEXT"})(s||(t.InteractionMode=s={}))},55815:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(89429);var a=r(79039);var s=r(2360);var u=r(6980);var c=r(24913).f;var l=r(36840);var f=r(62106);var d=r(39297);var h=r(90679);var p=r(28551);var v=r(77536);var m=r(32603);var y=r(55002);var g=r(16193);var b=r(91181);var _=r(43724);var S=r(96395);var E="DOMException";var w="DATA_CLONE_ERR";var T=i("Error");var I=i(E)||function(){try{var e=i("MessageChannel")||o("worker_threads").MessageChannel;(new e).port1.postMessage(new WeakMap)}catch(e){if(e.name===w&&e.code===25)return e.constructor}}();var R=I&&I.prototype;var C=T.prototype;var k=b.set;var A=b.getterFor(E);var O="stack"in new T(E);var P=function(e){return d(y,e)&&y[e].m?y[e].c:0};var x=function e(){h(this,L);var t=arguments.length;var r=m(t<1?undefined:arguments[0]);var n=m(t<2?undefined:arguments[1],"Error");var i=P(n);k(this,{type:E,name:n,message:r,code:i});if(!_){this.name=n;this.message=r;this.code=i}if(O){var o=new T(r);o.name=E;c(this,"stack",u(1,g(o.stack,1)))}};var L=x.prototype=s(C);var M=function(e){return{enumerable:true,configurable:true,get:e}};var N=function(e){return M((function(){return A(this)[e]}))};if(_){f(L,"code",N("code"));f(L,"message",N("message"));f(L,"name",N("name"))}c(L,"constructor",u(1,x));var D=a((function(){return!(new I instanceof T)}));var j=D||a((function(){return C.toString!==v||String(new I(1,2))!=="2: 1"}));var U=D||a((function(){return new I(1,"DataCloneError").code!==25}));var V=D||I[w]!==25||R[w]!==25;var W=S?j||U||V:D;n({global:true,constructor:true,forced:W},{DOMException:W?x:I});var B=i(E);var G=B.prototype;if(j&&(S||I===B)){l(G,"toString",v)}if(U&&_&&I===B){f(G,"code",M((function(){return P(p(this).name)})))}for(var Z in y)if(d(y,Z)){var F=y[Z];var H=F.s;var X=u(6,F.c);if(!d(B,H)){c(B,H,X)}if(!d(G,H)){c(G,H,X)}}},55961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(17308);var o=g(r(46942));var a=r(69733);var s=r(44772);var u=g(r(44617));var c=g(r(15457));var l=g(r(87635));var f=r(39595);var d=r(44104);var h=r(45112);var p=r(44246);var v=r(84743);var m=r(55798);var y=r(94855);function g(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function S(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function w(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function T(e,t,r){return t=k(t),I(e,C()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}function I(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var P=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const x=new d.Log({module:"HwICS.UI.AIChatBtn"});function L(e,t,r){const n={[f.ChatBtnState.INIT]:r.clickToStart,[f.ChatBtnState.LOADING]:r.connecting,[f.ChatBtnState.PLAY]:r.recognizingAndClickToStopV2,[f.ChatBtnState.THINKING]:r.recognizingAndClickToStopV2,[f.ChatBtnState.STOPPING]:r.stopping,[f.ChatBtnState.ANSWERING]:r.answeringV3};if(p.HWIcsElectron.isHWIcsElectron()){const e=p.HWIcsElectron.getWakeupWords();const i=e[t];n[f.ChatBtnState.INIT]=v.Utils.formatLanguage(r.sayHelloToStart,i.startChatWord);n[f.ChatBtnState.PLAY]=v.Utils.formatLanguage(r.sayGoodbyeToStopChatV2,i.stopChatWord);n[f.ChatBtnState.THINKING]=v.Utils.formatLanguage(r.sayGoodbyeToStopChatV2,i.stopChatWord);n[f.ChatBtnState.ANSWERING]=v.Utils.formatLanguage(r.sayStopAnswerToStopSpeaking,i.stopSpeakingWord)}return n[e]}let M=function(e){function t(e){var r;b(this,t);r=T(this,t,[e]);r._clicking=false;r._onClick=async()=>{try{if(!r._clicking){const e=(0,s.createEntry)("AIChatBtn click");r._clicking=true;const{chatBtnState:t}=r.props;if(t===f.ChatBtnState.INIT){await h.ChatManager.startChat({entry:e,interactionMode:m.InteractionMode.AUDIO,preCheckPermissions:y.ConfigManager.getConfig(f.ConfigKey.PRE_CHECK_PERMISSIONS)})}else if(h.ChatManager.canStop()){await h.ChatManager.stopChat({entry:e})}r._clicking=false}}catch(e){x.error("_onClick",e);r._clicking=false}};r._expandStatusChange=e=>{r.setState({isExpand:e})};r.state={isExpand:false};return r}A(t,e);return S(t,[{key:"render",value:function e(){const{chatBtnState:t,enableCaption:r,language:i,captionList:a,enableHotIssues:s,langCode:d}=this.props;const{isExpand:h}=this.state;const p=(0,o.default)("ai-chat-btn box-shadow",{animation:t===f.ChatBtnState.PLAY||t===f.ChatBtnState.THINKING});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"ai-chat-top-btn",children:[(0,n.jsxs)("div",{className:"ai-chat-top-btn-container",style:{display:t!==f.ChatBtnState.ANSWERING?"flex":"none"},children:[(0,n.jsx)("div",{className:"clear-btn-container",style:{visibility:r&&a.length>0&&!h?"visible":"hidden"},children:(0,n.jsx)(u.default,{})}),(0,n.jsx)("div",{className:"hot-container",children:s&&(0,n.jsx)(c.default,{expandStatusChange:this._expandStatusChange})})]}),(0,n.jsx)(l.default,{})]}),(0,n.jsxs)("div",{className:p,children:[(0,n.jsx)("div",{className:"btn-bg-container",children:(0,n.jsx)("div",{id:"ai_chat_btn_ball",className:"btn-bg","data-testid":"aiChatBtn",onClick:this._onClick})}),(0,n.jsx)("div",{className:"ai-chat-btn-content",children:L(t,d,i)})]})]})}}])}(i.Component);M=P([(0,s.componentDecorator)(x)],M);const N=e=>({enableHotIssues:e.config[f.ConfigKey.ENABLE_HOT_ISSUES],chatBtnState:e.main.chatBtnState,captionList:e.caption.captionList,language:e.lang.language,langCode:e.lang.langCode});var D=t["default"]=(0,a.connect)(N)(M)},55966:(e,t,r)=>{"use strict";var n=r(79306);var i=r(64117);e.exports=function(e,t){var r=e[t];return i(r)?undefined:n(r)}},56018:(e,t,r)=>{var n=r(47043);var i=r(23473);function o(e,t){var r=new i(t);return r.process(e)}t=e.exports=o;t.FilterCSS=i;for(var a in n)t[a]=n[a];if(typeof window!=="undefined"){window.filterCSS=e.exports}},56043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LocalWakeup=void 0;var n=r(95789);var i=r(44104);var o=r(44772);var a=r(94855);var s=r(39595);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const p=new i.Log({module:"LocalWakeup"});let v=t.LocalWakeup=function(){function e(){u(this,e)}return l(e,null,[{key:"initResourcePath",value:async function e(t){try{p.info("initResourcePath",t);n.HwKwsWakeup.initResourcePath(t);t.initModel!==false&&await n.HwKwsWakeup.init()}catch(e){p.error("initResourcePath",t,e)}}},{key:"initWakeup",value:async function t({entry:r,language:o,wakeupCallback:u}){r+=",initWakeup";if(!a.ConfigManager.getConfig(s.ConfigKey.ENABLE_LOCAL_WAKEUP)){p.info("initWakeup",r,"no wakeup");return}const c=a.ConfigManager.getChatInfo(r);if(!c){p.info("initWakeup",r,"no job_id");return}try{var l,f,d,h;p.info("initWakeup",r,"use wakeup");let t=(c===null||c===void 0?void 0:c.chat_access_rest_address)||(c===null||c===void 0?void 0:c.chat_access_address)||"";if(!((l=t)!==null&&l!==void 0&&l.startsWith("https"))){t=`https://${t}`}await n.HwKwsWakeup.create({jobId:(c===null||c===void 0?void 0:c.job_id)||"",token:((f=a.ConfigManager.getAuthInfo(r))===null||f===void 0?void 0:f.access_token)||"",icsHost:t,icsManagerHost:((d=a.ConfigManager.getBaseUrl())===null||d===void 0?void 0:d.origin)||"",logLevel:i.Log.getLogLevel(),robotId:a.ConfigManager.getRobotId(r),language:o});n.HwKwsWakeup.registerWakeupNotify(u);p.info("beginSession",(h=e.stream)===null||h===void 0?void 0:h.id);await n.HwKwsWakeup.beginSession({stream:e.stream});e.hasBegin=true}catch(e){p.error("initWakeup",e)}}},{key:"feed",value:async function e(t){const r=Int8Array.from(t);n.HwKwsWakeup.writeWakeupAudio({int8Data:r})}},{key:"updateStreamInput",value:function t({entry:r,stream:i}){var o;p.info("updateStreamInput",r,(o=e.stream)===null||o===void 0?void 0:o.id,i===null||i===void 0?void 0:i.id,e.stream!==i);if(!a.ConfigManager.getConfig(s.ConfigKey.ENABLE_LOCAL_WAKEUP)){p.info("updateStreamInput",r,"no wakeup");return}e.stream=i;n.HwKwsWakeup.updateStreamInput({stream:i})}},{key:"clearWakeup",value:async function t(r){try{p.info("clearWakeup",r,e.hasBegin);if(e.hasBegin){await n.HwKwsWakeup.endSession();e.hasBegin=false}}catch(e){p.error("clearWakeup",r,e)}}},{key:"setLogLevel",value:function e(t){try{if(!a.ConfigManager.getConfig(s.ConfigKey.ENABLE_LOCAL_WAKEUP)){p.info("setLogLevel","no wakeup",t);return}p.info("setLogLevel",t);n.HwKwsWakeup.setLogLevel(t)}catch(e){p.error("setLogLevel",t,e)}}},{key:"setLanguageCode",value:function e(t){try{if(!a.ConfigManager.getConfig(s.ConfigKey.ENABLE_LOCAL_WAKEUP)){p.info("setLanguageCode","no wakeup",t);return}p.info("setLanguageCode",t);n.HwKwsWakeup.setLanguage(t)}catch(e){p.error("setLanguageCode",t,e)}}},{key:"startRecord",value:function e(){p.info("startRecord");n.HwKwsWakeup.startRecord()}},{key:"stopRecord",value:function e(){p.info("stopRecord");n.HwKwsWakeup.stopRecord()}},{key:"updateMicrophoneDevice",value:async function e(t){if(!a.ConfigManager.getConfig(s.ConfigKey.ENABLE_LOCAL_WAKEUP)){p.info("updateMicrophoneDevice","no wakeup",t)}await n.HwKwsWakeup.updateMicrophoneDevice(t)}}])}();v.hasBegin=false;h([(0,o.printfDecorator)(p)],v,"initResourcePath",null);h([(0,o.printfDecorator)(p)],v,"initWakeup",null);h([(0,o.printfDecorator)(p)],v,"clearWakeup",null);h([(0,o.printfDecorator)(p)],v,"setLogLevel",null);h([(0,o.printfDecorator)(p)],v,"setLanguageCode",null);h([(0,o.printfDecorator)(p)],v,"startRecord",null);h([(0,o.printfDecorator)(p)],v,"stopRecord",null);h([(0,o.printfDecorator)(p)],v,"updateMicrophoneDevice",null)},56216:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(16809),r(5338),r(33077),r(56974),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=s;n=a(n);function a(e){return e&&e.__esModule?e:{default:e}}function s({keyboard:e,okText:a="确定",okButtonProps:s,cancelText:u="取消",cancelButtonProps:c,content:l="",zIndex:f,dialogId:d}){const h=document.createElement("div");document.body.appendChild(h);const p=(0,r.createRoot)(h);return new Promise((r=>{const v=({ret:e=false,isClickClose:n=false}={})=>{const i=(0,t.getDialogCloseFuncList)();requestAnimationFrame((()=>{var e;p.unmount();h===null||h===void 0?void 0:(e=h.parentNode)===null||e===void 0?void 0:e.removeChild(h)}));const o=i.findIndex((e=>e.onClose===v));if(o>-1){i.splice(o,1)}r({ret:e,isClickClose:n})};const m=()=>{v({ret:true})};p.render((0,o.jsx)(n.default,{visible:true,width:280,maskClosable:false,onOk:m,content:l,keyboard:e,zIndex:f,footer:(0,o.jsx)(i.DefaultFooter,{cancelButtonProps:c,cancelClick:()=>v({}),cancelText:u,okButtonProps:s,okClick:m,okText:a})}));(0,t.setDialogCloseFunc)({onClose:v,keyboard:e,dialogId:d})}))}}))},56262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SparkRTC=void 0;var n=P(r(92224));var i=P(r(21396));var o=r(44772);var a=r(26440);var s=r(43260);var u=r(21537);var c=r(21013);var l=r(63226);var f=r(49);var d=r(71288);var h=r(44104);var p=r(94855);var v=r(84743);var m=r(44086);var y=r(11686);var g=P(r(86425));var b=r(44246);var _=r(89906);var S=r(47300);var E=r(30455);var w=r(637);var T=r(33601);var I=r(6630);var R=r(82118);var C=r(57160);var k=r(28513);var A=r(39595);var O=r(19993);function P(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,K(n.key),n)}}function M(e,t,r){return t&&L(e.prototype,t),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,r){return t=G(t),D(e,U()?Reflect.construct(t,r||[],G(e).constructor):t.apply(e,r))}function D(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function V(e,t,r,n){var i=W(G(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function W(){return W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=B(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},W.apply(null,arguments)}function B(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=G(e)););return e}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Z(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){Y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Y(e,t,r){return(t=K(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(e){var t=z(e,"string");return"symbol"==typeof t?t:t+""}function z(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var J=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const Q=new h.Log({module:"HwICS.SparkRTC"});let q;const $=async()=>{var e,t;const r=Date.now();const i=await n.default.checkSystemRequirements(false,"recvonly");Q.info("checkBrowserSupport",Date.now()-r);if(i===true){return true}(0,m.dealSparkRTCError)({error:{error_code:i===null||i===void 0?void 0:(e=i.getCode)===null||e===void 0?void 0:e.call(i).toString(),error_msg:(i===null||i===void 0?void 0:(t=i.getMsg)===null||t===void 0?void 0:t.call(i))||(i===null||i===void 0?void 0:i.toString()),request_id:Date.now().toString()},entry:"checkBrowserSupport"});return false};const ee=async()=>{if((0,o.formatType)(q)!==o.formatType.BOOLEAN){q=await $()}return q};const te=(e,t,r)=>n=>{Q.error(`dealApplyUnhandleError ${t}`,r,"reject",n);if(n.code){(0,m.dealSparkRTCError)({error:{error_code:n.code.toString(),error_msg:n.message,request_id:Date.now().toString()},entry:r});if(n.code.toString()===u.SparkRTCErrorCode.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR&&p.ConfigManager.isGammaEnv()){const{debug_ca_error_url:t}=e.getGammaConfig();(0,a.$dispatch)((0,f.toggleShowCaError)({showCaError:true,caErrorUrl:t}))}if(n.code.toString()===u.SparkRTCErrorCode.RTC_ERR_CODE_SFU_ERROR){O.PrivateNotifyManager.sendRejoinRobotEvent({method:y.InnerICSEventMethod.REJOIN,entry:"sparkrtc error",reason:C.RejoinReason.SYSTEM_OPEN,errorCode:u.SparkRTCErrorCode.RTC_ERR_CODE_SFU_ERROR})}}else{Q.error("dealApplyUnhandleError",n===null||n===void 0?void 0:n.toString())}};const re=(e,t,r)=>X(X({},r),{},{writable:true,value:async function(...n){const i=r===null||r===void 0?void 0:r.value;const a=(0,o.createEntry)(`supportCheckDecorator ${t}`);if(!await ee()){Q.error(`supportCheckDecorator ${t}`,a,"is not support, do nothing");return null}try{var s;Q.info(`supportCheckDecorator ${t}`,a);return(s=i.apply(this,n))===null||s===void 0?void 0:s.catch(te(e,t,a))}catch(e){Q.error(`supportCheckDecorator ${t}`,a,"catch",e);await(0,m.dealSparkRTCError)({error:{error_code:y.SDKErrorCode.RTC_CATCH_ERROR,error_msg:e.toString(),request_id:Date.now().toString()},entry:a});return null}}});let ne=t.SparkRTC=function(e){function t(){var e;x(this,t);e=N(this,t);e._videoSize="";e._containerSize="";e._windowSize="";e._videoCheckCount=100;e._rtcStatsTime=3e3;e._maxBandwidth=3e4;e.isSubscribed=false;e.startDetectionVideoSize=()=>{Q.info("startDetectionVideoSize");e._videoCheckCount=100;e.detectionVideoSize()};e.debounceStartDetectionVideoSize=(0,o.debounce)(e.startDetectionVideoSize,50);e.addStreamEvent=e.addStreamEvent.bind(e);e.updatedStreamEvent=e.updatedStreamEvent.bind(e);e.removedStreamEvent=e.removedStreamEvent.bind(e);e.subscribedStreamEvent=e.subscribedStreamEvent.bind(e);e.peerLeaveEvent=e.peerLeaveEvent.bind(e);e.clientBanned=e.clientBanned.bind(e);e.kickRoomEvent=e.kickRoomEvent.bind(e);e.signatureExpiredEvent=e.signatureExpiredEvent.bind(e);e.errorEvent=e.errorEvent.bind(e);e.mediaConnectionStateChangedEvent=e.mediaConnectionStateChangedEvent.bind(e);e.peerJoinEvent=e.peerJoinEvent.bind(e);e.rtcStatsEvent=e.rtcStatsEvent.bind(e);return e}Z(t,e);return M(t,[{key:"getGammaConfig",value:function e(){return t._gammaConfig||{}}},{key:"init",value:async function e(){var r;const i=(0,o.createEntry)("init");t.checkSupported();c.UserTrack.addUserTrack({arg1:l.Arg1Map.SPARK_RTC,arg2:"init"});const a=p.ConfigManager.getChatInfo(i);Q.debug("init",a);if(p.ConfigManager.isGammaEnv()){c.UserTrack.addUserTrack({arg1:l.Arg1Map.SPARK_RTC,arg2:"init gamma param"});const e=await g.default.get("icswebclient/rtc_gamma_config.json");Q.debug("rtc_gamma_config",e);if(e!==null&&e!==void 0&&e.data){t._gammaConfig=e===null||e===void 0?void 0:e.data;n.default.setParameter("GRS_LOCAL_EXT_INFO",t._gammaConfig)}n.default.setParameter("ENVIRONMENT_SUFFIX",{grsKey:"GREEN",pathSuffix:"gammagreen"})}n.default.setParameter("FRAME_ENCRYPTION_MODE",3);if(a!==null&&a!==void 0&&(r=a.rtc_room_info)!==null&&r!==void 0&&r.app_id){var s;this._client=n.default.createClient({appId:a===null||a===void 0?void 0:(s=a.rtc_room_info)===null||s===void 0?void 0:s.app_id,countryCode:"CN"});this._client.setNetworkBandwidth({maxBandwidth:this._maxBandwidth});this._client.enableCommandMsg(true)}}},{key:"joinRoom",value:async function e(){var t,r;const n=(0,o.createEntry)("joinRoom");c.UserTrack.addUserTrack({arg1:l.Arg1Map.SPARK_RTC,arg2:"joinRoom"});this.addListener();const i=p.ConfigManager.getPlayerUserInfo(n);const a=p.ConfigManager.getChatInfo(n);if(!i||!a){return}Q.info("joinRoom",X(X({},i),{},{roomId:a===null||a===void 0?void 0:(t=a.rtc_room_info)===null||t===void 0?void 0:t.room_id,signature:(0,o.handleAccountPrint)(i.signature)}));if(!((r=a.rtc_room_info)!==null&&r!==void 0&&r.room_id)){return}await this.handleIosAudioPermission(n);this._clearRejoinTimer();this._rejoinTimer=setTimeout((()=>{O.PrivateNotifyManager.sendRejoinRobotEvent({method:y.InnerICSEventMethod.REJOIN,entry:"rtc join room timeout",reason:C.RejoinReason.LOADING,errorCode:y.SDKErrorCode.RTC_JOIN_TIMEOUT})}),I.HRTC_JOIN_ROOM_TIMEOUT);await this.createLocalStreamIfEnabled(n);await this.joinRoomWithClient(i,a)}},{key:"handleIosAudioPermission",value:async function e(t){if(v.Utils.getIosVersion()>0&&v.Utils.getIosVersion()<13){if(!p.ConfigManager.isThirdPartyEnable()&&!await p.ConfigManager.checkAudioDevice()){await(0,m.dealSparkRTCError)({error:{error_code:y.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR,error_msg:"",request_id:Date.now().toString()},entry:t})}}}},{key:"createLocalStreamIfEnabled",value:async function e(t){if(p.ConfigManager.getConfig(A.ConfigKey.FIRST_CREATE_LOCAL_STREAM)||p.ConfigManager.getConfig(A.ConfigKey.ENABLE_LOCAL_WAKEUP)){await S.StreamManager.createLocalStream({client:this._client,entry:t})}}},{key:"joinRoomWithClient",value:async function e(t,r){var n,i,o;await((n=this._client)===null||n===void 0?void 0:n.join((i=r.rtc_room_info)===null||i===void 0?void 0:i.room_id,{userId:t.user_id||"",signature:t.signature||"",ctime:t.ctime.toString()||"0",role:0}));(o=this._client)===null||o===void 0?void 0:o.enableRtcStats(true,this._rtcStatsTime)}},{key:"mockJoinRoom",value:async function e(){var r,a;const s=(0,o.createEntry)("mockJoinRoom");await this.init();const u=0;const c=72e5;const l=Math.floor((c+Date.now())/1e3).toString();const f=`cbu_hmac+${t._mockRoomId}+${t._mockUserId}+${l}`;const d=i.default.HmacSHA256(f,t._mockAppKey).toString();this.addListener();Q.info(s,{signature:d});await((r=this._client)===null||r===void 0?void 0:r.join(t._mockRoomId,{userId:t._mockUserId,signature:d,ctime:l,role:u}));(a=this._client)===null||a===void 0?void 0:a.enableRtcStats(true,1e3);const h=await n.default.getCameras().catch((e=>{Q.error(s,"cameras error",e);return[]}));const p=await n.default.getMicrophones().catch((e=>{Q.error(s,"microphones error",e);return[]}));Q.info(s,"microphones",p);await this.startSendLocalStream({config:{audio:true,video:(h===null||h===void 0?void 0:h.length)>0},entry:s})}},{key:"mockSendCmdMessage",value:async function e(t){var r;return(r=this._client)===null||r===void 0?void 0:r.sendCommandMsg(JSON.stringify(t))}},{key:"startSendLocalStream",value:async function e({config:t,entry:r}){c.UserTrack.addUserTrack({arg1:l.Arg1Map.SPARK_RTC,arg2:"startSendLocalStream",args:{entry:r,param:JSON.stringify({audio:t===null||t===void 0?void 0:t.audio,video:t===null||t===void 0?void 0:t.video,audioSource:!!(t!==null&&t!==void 0&&t.audioSource)})}});r+=",startSendLocalStream";if(!this._client){Q.error("startSendLocalStream","_client not exist",r);return{result:false,errorCode:y.SDKErrorCode.RTC_NOT_INIT,errorMsg:y.msgMap[y.SDKErrorCode.RTC_NOT_INIT]}}if(!S.StreamManager.getShouldSendLocalStream(r)){Q.warn("startSendLocalStream","no need send local stream",r);return{result:false}}const n=await S.StreamManager.publishStream({client:this._client,config:t,entry:r});Q.debug(r,n);w.RemoteManager.playRemoteStream(r);return{result:true}}},{key:"destroyLocalStream",value:async function e(t){if(this._client){await S.StreamManager.destroyStreamManager(this._client,t)}}},{key:"destroy",value:async function e(r){r+=",destroy";try{this._clearRejoinTimer();if(this._client){Q.info("destroy",r);this.removeListener();this.closeRemoteStream(r);await this.destroyLocalStream(r);await Promise.race([this._client.leave().catch((e=>{Q.error("destroy",r,"_client.leave",e)})),(0,o.sleep)(5e3)]);this._client.destroyClient();delete this._client;delete t.sparkRtc}}catch(e){Q.error("destroy",r,e)}}},{key:"renewSignature",value:function e({entry:t}){const r=p.ConfigManager.getPlayerUserInfo(t);if(r){var n;Q.info("renewSignature",t,r.ctime);(n=this._client)===null||n===void 0?void 0:n.renewSignature(r.ctime.toString(),r.signature)}}},{key:"_clearRejoinTimer",value:function e(){if(this._rejoinTimer){clearTimeout(this._rejoinTimer);delete this._rejoinTimer}}},{key:"closeRemoteStream",value:function e(t){Q.info("closeRemoteStream",t);window.removeEventListener("resize",this.debounceStartDetectionVideoSize);R.NotifyManager.sendJobInfoChange({isReady:false,entry:"closeRemoteStream"});w.RemoteManager.closeRemoteStream(t)}},{key:"reCalcRemoteContainerWidth",value:async function e({width:t,height:r,entry:n}){await(0,o.sleep)(0);n+=",reCalcRemoteContainerWidth";Q.debug(n,t,r);const i=p.ConfigManager.getContainerDom();if(!i){return}let u=Math.round(i.clientHeight*t/r);let f=i.clientHeight;if(u>i.clientWidth){u=i.clientWidth;f=Math.round(u*r/t)}c.UserTrack.addUserTrack({arg1:l.Arg1Map.SPARK_RTC,arg2:"reCalcRemoteContainerWidth",args:{entry:n,param:`${i===null||i===void 0?void 0:i.clientHeight},${t},${r}->${u},${f}`}});(0,a.$dispatch)((0,s.setRemoteContainerSize)({width:u,height:f}))}},{key:"detectionVideoSize",value:async function e(){var t,r,n,i,a,s;this._videoCheckCount--;const u=`,detectionVideoSize,${this._videoCheckCount}`;const c=(t=w.RemoteManager.getRemoteStream())===null||t===void 0?void 0:(r=t.getVideoTrack())===null||r===void 0?void 0:r.getSettings();const l=(c===null||c===void 0?void 0:c.width)||0;const f=(c===null||c===void 0?void 0:c.height)||0;const d=JSON.stringify([l,f]);const h=JSON.stringify([(n=window)===null||n===void 0?void 0:n.innerWidth,(i=window)===null||i===void 0?void 0:i.innerHeight]);const v=JSON.stringify([(a=p.ConfigManager.getContainerDom())===null||a===void 0?void 0:a.clientWidth,(s=p.ConfigManager.getContainerDom())===null||s===void 0?void 0:s.clientHeight]);Q.debug(u,c,d,h,v);if(l&&(this._videoSize!==d||this._windowSize!==h||this._containerSize!==v)){this.reCalcRemoteContainerWidth({width:l,height:f,entry:u});this._videoSize=d;this._windowSize=h;this._containerSize=v}if(this._videoCheckCount>0){await(0,o.sleep)(100);this.detectionVideoSize()}}},{key:"removedStreamEvent",value:async function e(r){V(t,"removedStreamEvent",this,3)([r]);if(S.StreamManager.checkIgnoreStream(r.stream,"removedStreamEvent")){return}await w.RemoteManager.dealStreamRemove();this.closeRemoteStream("removedStreamEvent")}},{key:"addStreamEvent",value:function e(r){var n;V(t,"addStreamEvent",this,3)([r]);if(S.StreamManager.checkIgnoreStream(r.stream,"addStreamEvent")){return}this._clearRejoinTimer();k.RouteManager.showMainPage();(n=this._client)===null||n===void 0?void 0:n.subscribe(r.stream,{video:true,audio:true});this.remoteStream=r.stream;window.dispatchEvent(new CustomEvent(y.InnerICSEventKey.STREAM_ADDED,{}))}},{key:"subscribe",value:async function e(){if(this.remoteStream&&!this.isSubscribed){var t,r;await((t=this._client)===null||t===void 0?void 0:t.unsubscribe(this.remoteStream,{video:true}));(r=this._client)===null||r===void 0?void 0:r.subscribe(this.remoteStream,{video:true,audio:true})}else{Q.info("subscribe error no remoteStream or has subscribe")}}},{key:"unSubscribe",value:async function e(){if(this.remoteStream){var t;this.remoteStream.stop({video:true});this.isSubscribed=false;await((t=this._client)===null||t===void 0?void 0:t.unsubscribe(this.remoteStream,{video:true}))}else{Q.error("unSubscribe error no remoteStream")}}},{key:"updatedStreamEvent",value:function e(r){var n;V(t,"updatedStreamEvent",this,3)([r]);if(S.StreamManager.checkIgnoreStream(r.stream,"updatedStreamEvent")){return}this._clearRejoinTimer();k.RouteManager.showMainPage();(n=this._client)===null||n===void 0?void 0:n.subscribe(r.stream,{video:true,audio:true})}},{key:"subscribedStreamEvent",value:async function e(r){V(t,"subscribedStreamEvent",this,3)([r]);if(S.StreamManager.checkIgnoreStream(r.stream,"subscribedStreamEvent")){return}w.RemoteManager.setRemoteStream(r.stream,"subscribedStreamEvent");await w.RemoteManager.playRemoteStream("subscribedStreamEvent");this.startDetectionVideoSize();window.addEventListener("resize",this.debounceStartDetectionVideoSize);b.HWIcsElectron.showAdvertiseMoreInfo("subscribedStreamEvent");R.NotifyManager.sendJobInfoChange({isReady:true,entry:"addStreamEvent"});this.isSubscribed=true}},{key:"peerJoinEvent",value:function e(r){V(t,"peerJoinEvent",this,3)([r]);if(S.StreamManager.checkIgnorePeerJoinOrLeave(r.userId,"peerJoinEvent")){return}w.RemoteManager.clearPeerLeaveTimer("peerJoinEvent");b.HWIcsElectron.showAdvertise("peerJoinEvent");b.HWIcsElectron.hideAdvertiseMoreInfo("peerJoinEvent")}},{key:"peerLeaveEvent",value:async function e(r){V(t,"peerLeaveEvent",this,3)([r]);if(S.StreamManager.checkIgnorePeerJoinOrLeave(r.userId,"peerLeaveEvent")){return}this.closeRemoteStream("peerLeaveEvent");if(!p.ConfigManager.getConfig(A.ConfigKey.ENABLE_LOCAL_WAKEUP)){await this.destroyLocalStream("peerLeaveEvent")}w.RemoteManager.dealPeerLeave()}},{key:"clientBanned",value:function e(r){V(t,"clientBanned",this,3)([r]);this.destroy("clientBanned");window.dispatchEvent(new CustomEvent(y.InnerICSEventKey.HEARTBEAT_EVENT,{detail:{method:"stopHeartBeat",entry:"clientBanned"}}));(0,m.dealSparkRTCError)({error:{error_code:y.SDKErrorCode.RTC_KICK_OUT,error_msg:"",request_id:Date.now().toString()},entry:"clientBanned"})}},{key:"errorEvent",value:async function e(r){var n;V(t,"errorEvent",this,3)([r]);Q.error("errorEvent",r);if((r===null||r===void 0?void 0:(n=r.errCode)===null||n===void 0?void 0:n.toString())===u.SparkRTCErrorCode.RTC_ERR_CODE_MEDIA_NETWORK_ERROR){var i;(i=t._disconnectToast)===null||i===void 0?void 0:i.hide();t._disconnectToast=(0,_.toast)({content:(0,E.getErrorMessage)({errorCode:u.SparkRTCErrorCode.RTC_ERR_CODE_MEDIA_NETWORK_ERROR}),type:0})}}},{key:"rtcStatsEvent",value:function e(r){V(t,"rtcStatsEvent",this,3)([r]);T.NetworkQualityCheck.streamCheck(r)}},{key:"kickRoomEvent",value:async function e(r){V(t,"kickRoomEvent",this,3)([r]);this.closeRemoteStream("kickRoomEvent");if(!p.ConfigManager.getConfig(A.ConfigKey.ENABLE_LOCAL_WAKEUP)){await this.destroyLocalStream("kickRoomEvent")}w.RemoteManager.dealKickRoom()}},{key:"signatureExpiredEvent",value:async function e(r){const n=(0,o.createEntry)("signatureExpiredEvent");V(t,"signatureExpiredEvent",this,3)([r]);this.renewSignature({entry:n})}},{key:"mediaConnectionStateChangedEvent",value:async function e(r){V(t,"mediaConnectionStateChangedEvent",this,3)([r]);Q.info("media-connection-state-changed",r);if((r===null||r===void 0?void 0:r.state)==="CONNECTED"){var n;(n=t._disconnectToast)===null||n===void 0?void 0:n.hide()}}},{key:"connectionStateChangedEvent",value:async function e(r){V(t,"connectionStateChanged",this,3)([r]);Q.info("connection-state-changed",r);if(r.code===u.SparkRTCErrorCode.RTC_WEBSOCKET_ERR_NEED_REJOIN){O.PrivateNotifyManager.sendRejoinRobotEvent({method:y.InnerICSEventMethod.REJOIN,entry:"rtc websocket error",reason:C.RejoinReason.NETWORK_ERROR,errorCode:u.SparkRTCErrorCode.RTC_WEBSOCKET_ERR_NEED_REJOIN})}}},{key:"addListener",value:function e(){var r,n,i,o,a,s,u,c,l,f,d,h,p;V(t,"addListener",this,3)([this._client]);(r=this._client)===null||r===void 0?void 0:r.on("stream-added",this.addStreamEvent);(n=this._client)===null||n===void 0?void 0:n.on("stream-updated",this.updatedStreamEvent);(i=this._client)===null||i===void 0?void 0:i.on("stream-removed",this.removedStreamEvent);(o=this._client)===null||o===void 0?void 0:o.on("stream-subscribed",this.subscribedStreamEvent);(a=this._client)===null||a===void 0?void 0:a.on("Error",this.errorEvent);(s=this._client)===null||s===void 0?void 0:s.on("rtc-stats",this.rtcStatsEvent);(u=this._client)===null||u===void 0?void 0:u.on("peer-join",this.peerJoinEvent);(c=this._client)===null||c===void 0?void 0:c.on("peer-leave",this.peerLeaveEvent);(l=this._client)===null||l===void 0?void 0:l.on("client-banned",this.clientBanned);(f=this._client)===null||f===void 0?void 0:f.on("kick-room",this.kickRoomEvent);(d=this._client)===null||d===void 0?void 0:d.on("signature-expired",this.signatureExpiredEvent);(h=this._client)===null||h===void 0?void 0:h.on("media-connection-state-changed",this.mediaConnectionStateChangedEvent);(p=this._client)===null||p===void 0?void 0:p.on("connection-state-changed",this.connectionStateChangedEvent)}},{key:"removeListener",value:function e(){var r,n,i,o,a,s,u,c,l,f,d,h,p;V(t,"removeListener",this,3)([this._client]);(r=this._client)===null||r===void 0?void 0:r.off("stream-added",this.addStreamEvent);(n=this._client)===null||n===void 0?void 0:n.off("stream-updated",this.updatedStreamEvent);(i=this._client)===null||i===void 0?void 0:i.off("stream-removed",this.removedStreamEvent);(o=this._client)===null||o===void 0?void 0:o.off("stream-subscribed",this.subscribedStreamEvent);(a=this._client)===null||a===void 0?void 0:a.off("Error",this.errorEvent);(s=this._client)===null||s===void 0?void 0:s.off("rtc-stats",this.rtcStatsEvent);(u=this._client)===null||u===void 0?void 0:u.off("peer-join",this.peerJoinEvent);(c=this._client)===null||c===void 0?void 0:c.off("peer-leave",this.peerLeaveEvent);(l=this._client)===null||l===void 0?void 0:l.off("client-banned",this.clientBanned);(f=this._client)===null||f===void 0?void 0:f.off("kick-room",this.kickRoomEvent);(d=this._client)===null||d===void 0?void 0:d.off("signature-expired",this.signatureExpiredEvent);(h=this._client)===null||h===void 0?void 0:h.off("media-connection-state-changed",this.mediaConnectionStateChangedEvent);(p=this._client)===null||p===void 0?void 0:p.off("connection-state-changed",this.connectionStateChangedEvent)}}],[{key:"getInstance",value:function e(){if(!t.sparkRtc){t.sparkRtc=new t}return t.sparkRtc}},{key:"checkSupported",value:function e(){const t=navigator.mediaDevices.getSupportedConstraints();Q.info("checkSupported",t)}}])}(d.WebrtcTrack);ne._mockRoomId="room0";ne._mockUserId=(0,o.getClientId)().toString();ne._mockAppKey="";J([(0,o.printfDecorator)(Q),re],ne.prototype,"init",null);J([(0,o.printfDecorator)(Q),re],ne.prototype,"joinRoom",null);J([(0,o.printfDecorator)(Q),re],ne.prototype,"mockJoinRoom",null);J([(0,o.printfDecorator)(Q),re],ne.prototype,"mockSendCmdMessage",null);J([(0,o.printfDecorator)(Q),re],ne.prototype,"startSendLocalStream",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"renewSignature",null);J([(0,o.printfDecorator)(Q),re],ne.prototype,"reCalcRemoteContainerWidth",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"removedStreamEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"addStreamEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"updatedStreamEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"subscribedStreamEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"peerJoinEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"peerLeaveEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"clientBanned",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"errorEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"rtcStatsEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"kickRoomEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"signatureExpiredEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"mediaConnectionStateChangedEvent",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"addListener",null);J([(0,o.printfDecorator)(Q)],ne.prototype,"removeListener",null);ee()},56279:(e,t,r)=>{"use strict";var n=r(36840);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},56624:(e,t,r)=>{"use strict";var n=r(46518);var i=r(7740);n({target:"Math",stat:true},{log1p:i})},56682:(e,t,r)=>{"use strict";var n=r(69565);var i=r(28551);var o=r(94901);var a=r(22195);var s=r(57323);var u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var c=n(r,e,t);if(c!==null)i(c);return c}if(a(e)==="RegExp")return n(s,e,t);throw new u("RegExp#exec called on incompatible receiver")}},56756:(e,t,r)=>{const n=r(92726);function i(e,t){const r=e.a/255;const n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;if(typeof r!=="undefined")n+=" "+r;return n}function a(e,t,r){let n="";let i=0;let a=false;let s=0;for(let u=0;u<e.length;u++){const c=Math.floor(u%t);const l=Math.floor(u/t);if(!c&&!a)a=true;if(e[u]){s++;if(!(u>0&&c>0&&e[u-1])){n+=a?o("M",c+r,.5+l+r):o("m",i,0);i=0;a=false}if(!(c+1<t&&e[u+1])){n+=o("h",s);s=0}}else{i++}}return n}t.render=function e(t,r,o){const s=n.getOptions(r);const u=t.modules.size;const c=t.modules.data;const l=u+s.margin*2;const f=!s.color.light.a?"":"<path "+i(s.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>';const d="<path "+i(s.color.dark,"stroke")+' d="'+a(c,u,s.margin)+'"/>';const h='viewBox="'+"0 0 "+l+" "+l+'"';const p=!s.width?"":'width="'+s.width+'" height="'+s.width+'" ';const v='<svg xmlns="http://www.w3.org/2000/svg" '+p+h+' shape-rendering="crispEdges">'+f+d+"</svg>\n";if(typeof o==="function"){o(null,v)}return v}},56759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(67914);var o=l(r(28671));var a=r(44772);var s=r(44104);var u=l(r(46942));var c=r(44246);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=_(t),y(e,b()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const T=new s.Log({module:"HwICS.UI.Toast"});let I=function(e){function t(){f(this,t);return m(this,t,arguments)}S(t,e);return h(t,[{key:"render",value:function e(){const{list:t}=this.props;return(0,n.jsx)("div",{className:(0,u.default)("toast-container",{"in-app":c.HWIcsElectron.isHWIcsElectron()}),children:t.map(((e,t)=>(0,n.jsx)(o.default,{item:e},t)))})}}])}(i.Component);I=w([(0,a.componentDecorator)(T)],I);var R=t["default"]=I},56855:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>f});var i=r(80296);var o=r(89379);var a=r(96540);function s(){var e=(0,o.A)({},n||(n=r.t(a,2)));return e.useId}var u=0;function c(){if(false){}}var l=s();const f=l?function e(t){var r=l();if(t){return t}if(false){}return r}:function e(t){var r=a.useState("ssr-id"),n=(0,i.A)(r,2),o=n[0],s=n[1];a.useEffect((function(){var e=u;u+=1;s("rc_unique_".concat(e))}),[]);if(t){return t}if(false){}return o}},56886:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function e(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};t.getSymbolTotalCodewords=function e(t){return n[t]};t.getBCHDigit=function(e){let t=0;while(e!==0){t++;e>>>=1}return t};t.setToSJISFunction=function e(t){if(typeof t!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}r=t};t.isKanjiModeEnabled=function(){return typeof r!=="undefined"};t.toSJIS=function e(t){return r(t)}},56946:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t=l(t),s(e,c()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function s(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let m=function(e){function t(...e){var r;n(this,t);r=a(this,t,[...e]);h(r,"_onChange",(e=>{const{disabled:t,onChange:n}=r.props;if(t){return}n===null||n===void 0?void 0:n(e)}));return r}f(t,e);return o(t,[{key:"render",value:function e(){const{label:t,value:n,className:i,disabled:o,dataTestid:a,selectValue:s}=this.props;const u=n===s;let c="meta-radio";u&&(c+=" active");o&&(c+=" disabled");if(i){c+=" "+i}return(0,r.jsxs)("label",{className:c,"data-testid":a,children:[(0,r.jsx)("input",{type:"radio",className:"radio-input",checked:u,value:n,onChange:this._onChange}),(0,r.jsx)("span",{className:"radio-inner"}),(0,r.jsx)("span",{className:"radio-label",children:t})]})}}])}(t.Component);var y=e.default=m}))},56969:(e,t,r)=>{"use strict";var n=r(72777);var i=r(10757);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},56974:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(23263),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DefaultFooter=void 0;t=i(t);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function i(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,r&&r.set(e,i),i}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const l=({cancelText:e,cancelButtonProps:n={},cancelClick:i=()=>{},okText:o,okButtonProps:s={},okClick:u})=>(0,r.jsxs)(r.Fragment,{children:[e&&(0,r.jsx)(t.default,a(a({className:"meta-modal-footer-button",type:t.typeMap.STROKE,size:t.sizeMap.SMALL,title:e,onClick:i,color:t.colorMap.BLUE},n),{},{dataTestid:"confirmButtonCancel0123",children:e})),o&&(0,r.jsx)(t.default,a(a({className:"meta-modal-footer-button",type:t.typeMap.FILL,size:t.sizeMap.SMALL,title:o,onClick:u,color:t.colorMap.BLUE},s),{},{style:{marginLeft:"10px"},dataTestid:"confirmButtonOk0123",children:o}))]});e.DefaultFooter=l}))},57029:(e,t,r)=>{"use strict";var n=r(48981);var i=r(35610);var o=r(26198);var a=r(84606);var s=Math.min;e.exports=[].copyWithin||function e(t,r){var u=n(this);var c=o(u);var l=i(t,c);var f=i(r,c);var d=arguments.length>2?arguments[2]:undefined;var h=s((d===undefined?c:i(d,c))-f,c-l);var p=1;if(f<l&&l<f+h){p=-1;f+=h-1;l+=h-1}while(h-- >0){if(f in u)u[l]=u[f];else a(u,l);l+=p;f+=p}return u}},57145:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(79306);var a=r(25397);var s=r(35370);var u=r(44124);var c=r(6469);var l=Array;var f=i(u("Array","sort"));n({target:"Array",proto:true},{toSorted:function e(t){if(t!==undefined)o(t);var r=a(this);var n=s(l,r);return f(n,t)}});c("toSorted")},57160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RejoinReason=void 0;var r;(function(e){e["NETWORK_ERROR"]="networkAbnormalAndRecovering";e["UPGRADING"]="upgradingAndRejoing";e["LOADING"]="loading";e["SYSTEM_OPEN"]="systemOpenAndRejoin"})(r||(t.RejoinReason=r={}))},57165:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(39506))}else{}})(this,(function(e){e.lib.Cipher||function(t){var r=e;var n=r.lib;var i=n.Base;var o=n.WordArray;var a=n.BufferedBlockAlgorithm;var s=r.enc;var u=s.Utf8;var c=s.Base64;var l=r.algo;var f=l.EvpKDF;var d=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r);this._xformMode=e;this._key=t;this.reset()},reset:function(){a.reset.call(this);this._doReset()},process:function(e){this._append(e);return this._process()},finalize:function(e){if(e){this._append(e)}var t=this._doFinalize();return t},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){if(typeof e=="string"){return R}else{return w}}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});var h=n.StreamCipher=d.extend({_doFinalize:function(){var e=this._process(!!"flush");return e},blockSize:1});var p=r.mode={};var v=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e;this._iv=t}});var m=p.CBC=function(){var e=v.extend();e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher;var i=n.blockSize;r.call(this,e,t,i);n.encryptBlock(e,t);this._prevBlock=e.slice(t,t+i)}});e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher;var i=n.blockSize;var o=e.slice(t,t+i);n.decryptBlock(e,t);r.call(this,e,t,i);this._prevBlock=o}});function r(e,r,n){var i;var o=this._iv;if(o){i=o;this._iv=t}else{i=this._prevBlock}for(var a=0;a<n;a++){e[r+a]^=i[a]}}return e}();var y=r.pad={};var g=y.Pkcs7={pad:function(e,t){var r=t*4;var n=r-e.sigBytes%r;var i=n<<24|n<<16|n<<8|n;var a=[];for(var s=0;s<n;s+=4){a.push(i)}var u=o.create(a,n);e.concat(u)},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};var b=n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:m,padding:g}),reset:function(){var e;d.reset.call(this);var t=this.cfg;var r=t.iv;var n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE){e=n.createEncryptor}else{e=n.createDecryptor;this._minBufferSize=1}if(this._mode&&this._mode.__creator==e){this._mode.init(this,r&&r.words)}else{this._mode=e.call(n,this,r&&r.words);this._mode.__creator=e}},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e;var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);e=this._process(!!"flush")}else{e=this._process(!!"flush");t.unpad(e)}return e},blockSize:128/32});var _=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}});var S=r.format={};var E=S.OpenSSL={stringify:function(e){var t;var r=e.ciphertext;var n=e.salt;if(n){t=o.create([1398893684,1701076831]).concat(n).concat(r)}else{t=r}return t.toString(c)},parse:function(e){var t;var r=c.parse(e);var n=r.words;if(n[0]==1398893684&&n[1]==1701076831){t=o.create(n.slice(2,4));n.splice(0,4);r.sigBytes-=16}return _.create({ciphertext:r,salt:t})}};var w=n.SerializableCipher=i.extend({cfg:i.extend({format:E}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n);var o=i.finalize(t);var a=i.cfg;return _.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n);t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){if(typeof e=="string"){return t.parse(e,this)}else{return e}}});var T=r.kdf={};var I=T.OpenSSL={execute:function(e,t,r,n,i){if(!n){n=o.random(64/8)}if(!i){var a=f.create({keySize:t+r}).compute(e,n)}else{var a=f.create({keySize:t+r,hasher:i}).compute(e,n)}var s=o.create(a.words.slice(t),r*4);a.sigBytes=t*4;return _.create({key:a,iv:s,salt:n})}};var R=n.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:I}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=n.kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=w.encrypt.call(this,e,t,i.key,n);o.mixIn(i);return o},decrypt:function(e,t,r,n){n=this.cfg.extend(n);t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);n.iv=i.iv;var o=w.decrypt.call(this,e,t,i.key,n);return o}})}()}))},57301:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).some;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("some",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},57323:(e,t,r)=>{"use strict";var n=r(69565);var i=r(79504);var o=r(655);var a=r(67979);var s=r(58429);var u=r(25745);var c=r(2360);var l=r(91181).get;var f=r(83635);var d=r(18814);var h=u("native-string-replace",String.prototype.replace);var p=RegExp.prototype.exec;var v=p;var m=i("".charAt);var y=i("".indexOf);var g=i("".replace);var b=i("".slice);var _=function(){var e=/a/;var t=/b*/g;n(p,e,"a");n(p,t,"a");return e.lastIndex!==0||t.lastIndex!==0}();var S=s.BROKEN_CARET;var E=/()??/.exec("")[1]!==undefined;var w=_||E||S||f||d;if(w){v=function e(t){var r=this;var i=l(r);var s=o(t);var u=i.raw;var f,d,w,T,I,R,C;if(u){u.lastIndex=r.lastIndex;f=n(v,u,s);r.lastIndex=u.lastIndex;return f}var k=i.groups;var A=S&&r.sticky;var O=n(a,r);var P=r.source;var x=0;var L=s;if(A){O=g(O,"y","");if(y(O,"g")===-1){O+="g"}L=b(s,r.lastIndex);if(r.lastIndex>0&&(!r.multiline||r.multiline&&m(s,r.lastIndex-1)!=="\n")){P="(?: "+P+")";L=" "+L;x++}d=new RegExp("^(?:"+P+")",O)}if(E){d=new RegExp("^"+P+"$(?!\\s)",O)}if(_)w=r.lastIndex;T=n(p,A?d:r,L);if(A){if(T){T.input=b(T.input,x);T[0]=b(T[0],x);T.index=r.lastIndex;r.lastIndex+=T[0].length}else r.lastIndex=0}else if(_&&T){r.lastIndex=r.global?T.index+T[0].length:w}if(E&&T&&T.length>1){n(h,T[0],d,(function(){for(I=1;I<arguments.length-2;I++){if(arguments[I]===undefined)T[I]=undefined}}))}if(T&&k){T.groups=R=c(null);for(I=0;I<k.length;I++){C=k[I];R[C[0]]=T[C[1]]}}return T}}e.exports=v},57325:(e,t,r)=>{"use strict";r.r(t);r.d(t,{default:()=>et,generateTrigger:()=>$e});var n=r(89379);var i=r(80296);var o=r(80045);var a=r(46929);var s=r(46942);var u=r.n(s);var c=r(58168);var l=r(96540);var f=r(76288);function d(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=[];l.Children.forEach(e,(function(e){if((e===undefined||e===null)&&!t.keepEmpty){return}if(Array.isArray(e)){r=r.concat(d(e))}else if((0,f.A)(e)&&e.props){r=r.concat(d(e.props.children,t))}else{r.push(e)}}));return r}var h=r(68210);var p=r(82284);var v=r(66588);var m=r(80775);var y=l.createContext(null);function g(e){var t=e.children,r=e.onBatchResize;var n=l.useRef(0);var i=l.useRef([]);var o=l.useContext(y);var a=l.useCallback((function(e,t,a){n.current+=1;var s=n.current;i.current.push({size:e,element:t,data:a});Promise.resolve().then((function(){if(s===n.current){r===null||r===void 0||r(i.current);i.current=[]}}));o===null||o===void 0||o(e,t,a)}),[r,o]);return l.createElement(y.Provider,{value:a},t)}var b=function(){if(typeof Map!=="undefined"){return Map}function e(e,t){var r=-1;e.some((function(e,n){if(e[0]===t){r=n;return true}return false}));return r}return function(){function t(){this.__entries__=[]}Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:true,configurable:true});t.prototype.get=function(t){var r=e(this.__entries__,t);var n=this.__entries__[r];return n&&n[1]};t.prototype.set=function(t,r){var n=e(this.__entries__,t);if(~n){this.__entries__[n][1]=r}else{this.__entries__.push([t,r])}};t.prototype.delete=function(t){var r=this.__entries__;var n=e(r,t);if(~n){r.splice(n,1)}};t.prototype.has=function(t){return!!~e(this.__entries__,t)};t.prototype.clear=function(){this.__entries__.splice(0)};t.prototype.forEach=function(e,t){if(t===void 0){t=null}for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];e.call(t,i[1],i[0])}};return t}()}();var _=typeof window!=="undefined"&&typeof document!=="undefined"&&window.document===document;var S=function(){if(typeof r.g!=="undefined"&&r.g.Math===Math){return r.g}if(typeof self!=="undefined"&&self.Math===Math){return self}if(typeof window!=="undefined"&&window.Math===Math){return window}return Function("return this")()}();var E=function(){if(typeof requestAnimationFrame==="function"){return requestAnimationFrame.bind(S)}return function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)}}();var w=2;function T(e,t){var r=false,n=false,i=0;function o(){if(r){r=false;e()}if(n){s()}}function a(){E(o)}function s(){var e=Date.now();if(r){if(e-i<w){return}n=true}else{r=true;n=false;setTimeout(a,t)}i=e}return s}var I=20;var R=["top","right","bottom","left","width","height","size","weight"];var C=typeof MutationObserver!=="undefined";var k=function(){function e(){this.connected_=false;this.mutationEventsAdded_=false;this.mutationsObserver_=null;this.observers_=[];this.onTransitionEnd_=this.onTransitionEnd_.bind(this);this.refresh=T(this.refresh.bind(this),I)}e.prototype.addObserver=function(e){if(!~this.observers_.indexOf(e)){this.observers_.push(e)}if(!this.connected_){this.connect_()}};e.prototype.removeObserver=function(e){var t=this.observers_;var r=t.indexOf(e);if(~r){t.splice(r,1)}if(!t.length&&this.connected_){this.disconnect_()}};e.prototype.refresh=function(){var e=this.updateObservers_();if(e){this.refresh()}};e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));e.forEach((function(e){return e.broadcastActive()}));return e.length>0};e.prototype.connect_=function(){if(!_||this.connected_){return}document.addEventListener("transitionend",this.onTransitionEnd_);window.addEventListener("resize",this.refresh);if(C){this.mutationsObserver_=new MutationObserver(this.refresh);this.mutationsObserver_.observe(document,{attributes:true,childList:true,characterData:true,subtree:true})}else{document.addEventListener("DOMSubtreeModified",this.refresh);this.mutationEventsAdded_=true}this.connected_=true};e.prototype.disconnect_=function(){if(!_||!this.connected_){return}document.removeEventListener("transitionend",this.onTransitionEnd_);window.removeEventListener("resize",this.refresh);if(this.mutationsObserver_){this.mutationsObserver_.disconnect()}if(this.mutationEventsAdded_){document.removeEventListener("DOMSubtreeModified",this.refresh)}this.mutationsObserver_=null;this.mutationEventsAdded_=false;this.connected_=false};e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=t===void 0?"":t;var n=R.some((function(e){return!!~r.indexOf(e)}));if(n){this.refresh()}};e.getInstance=function(){if(!this.instance_){this.instance_=new e}return this.instance_};e.instance_=null;return e}();var A=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:false,writable:false,configurable:true})}return e};var O=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||S};var P=B(0,0,0,0);function x(e){return parseFloat(e)||0}function L(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}return t.reduce((function(t,r){var n=e["border-"+r+"-width"];return t+x(n)}),0)}function M(e){var t=["top","right","bottom","left"];var r={};for(var n=0,i=t;n<i.length;n++){var o=i[n];var a=e["padding-"+o];r[o]=x(a)}return r}function N(e){var t=e.getBBox();return B(0,0,t.width,t.height)}function D(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r){return P}var n=O(e).getComputedStyle(e);var i=M(n);var o=i.left+i.right;var a=i.top+i.bottom;var s=x(n.width),u=x(n.height);if(n.boxSizing==="border-box"){if(Math.round(s+o)!==t){s-=L(n,"left","right")+o}if(Math.round(u+a)!==r){u-=L(n,"top","bottom")+a}}if(!U(e)){var c=Math.round(s+o)-t;var l=Math.round(u+a)-r;if(Math.abs(c)!==1){s-=c}if(Math.abs(l)!==1){u-=l}}return B(i.left,i.top,s,u)}var j=function(){if(typeof SVGGraphicsElement!=="undefined"){return function(e){return e instanceof O(e).SVGGraphicsElement}}return function(e){return e instanceof O(e).SVGElement&&typeof e.getBBox==="function"}}();function U(e){return e===O(e).document.documentElement}function V(e){if(!_){return P}if(j(e)){return N(e)}return D(e)}function W(e){var t=e.x,r=e.y,n=e.width,i=e.height;var o=typeof DOMRectReadOnly!=="undefined"?DOMRectReadOnly:Object;var a=Object.create(o.prototype);A(a,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t});return a}function B(e,t,r,n){return{x:e,y:t,width:r,height:n}}var G=function(){function e(e){this.broadcastWidth=0;this.broadcastHeight=0;this.contentRect_=B(0,0,0,0);this.target=e}e.prototype.isActive=function(){var e=V(this.target);this.contentRect_=e;return e.width!==this.broadcastWidth||e.height!==this.broadcastHeight};e.prototype.broadcastRect=function(){var e=this.contentRect_;this.broadcastWidth=e.width;this.broadcastHeight=e.height;return e};return e}();var Z=function(){function e(e,t){var r=W(t);A(this,{target:e,contentRect:r})}return e}();var F=function(){function e(e,t,r){this.activeObservations_=[];this.observations_=new b;if(typeof e!=="function"){throw new TypeError("The callback provided as parameter 1 is not a function.")}this.callback_=e;this.controller_=t;this.callbackCtx_=r}e.prototype.observe=function(e){if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}if(typeof Element==="undefined"||!(Element instanceof Object)){return}if(!(e instanceof O(e).Element)){throw new TypeError('parameter 1 is not of type "Element".')}var t=this.observations_;if(t.has(e)){return}t.set(e,new G(e));this.controller_.addObserver(this);this.controller_.refresh()};e.prototype.unobserve=function(e){if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}if(typeof Element==="undefined"||!(Element instanceof Object)){return}if(!(e instanceof O(e).Element)){throw new TypeError('parameter 1 is not of type "Element".')}var t=this.observations_;if(!t.has(e)){return}t.delete(e);if(!t.size){this.controller_.removeObserver(this)}};e.prototype.disconnect=function(){this.clearActive();this.observations_.clear();this.controller_.removeObserver(this)};e.prototype.gatherActive=function(){var e=this;this.clearActive();this.observations_.forEach((function(t){if(t.isActive()){e.activeObservations_.push(t)}}))};e.prototype.broadcastActive=function(){if(!this.hasActive()){return}var e=this.callbackCtx_;var t=this.activeObservations_.map((function(e){return new Z(e.target,e.broadcastRect())}));this.callback_.call(e,t,e);this.clearActive()};e.prototype.clearActive=function(){this.activeObservations_.splice(0)};e.prototype.hasActive=function(){return this.activeObservations_.length>0};return e}();var H=typeof WeakMap!=="undefined"?new WeakMap:new b;var X=function(){function e(t){if(!(this instanceof e)){throw new TypeError("Cannot call a class as a function.")}if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}var r=k.getInstance();var n=new F(t,r,this);H.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach((function(e){X.prototype[e]=function(){var t;return(t=H.get(this))[e].apply(t,arguments)}}));var Y=function(){if(typeof S.ResizeObserver!=="undefined"){return S.ResizeObserver}return X}();const K=Y;var z=new Map;function J(e){e.forEach((function(e){var t;var r=e.target;(t=z.get(r))===null||t===void 0||t.forEach((function(e){return e(r)}))}))}var Q=new K(J);var q=null&&(false?0:null);var $=null&&(false?0:null);function ee(e,t){if(!z.has(e)){z.set(e,new Set);Q.observe(e)}z.get(e).add(t)}function te(e,t){if(z.has(e)){z.get(e).delete(t);if(!z.get(e).size){Q.unobserve(e);z.delete(e)}}}var re=r(23029);var ne=r(92901);var ie=r(15361);var oe=r(52962);var ae=function(e){(0,ie.A)(r,e);var t=(0,oe.A)(r);function r(){(0,re.A)(this,r);return t.apply(this,arguments)}(0,ne.A)(r,[{key:"render",value:function e(){return this.props.children}}]);return r}(l.Component);function se(e,t){var r=e.children,i=e.disabled;var o=l.useRef(null);var a=l.useRef(null);var s=l.useContext(y);var u=typeof r==="function";var c=u?r(o):r;var f=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1});var d=!u&&l.isValidElement(c)&&(0,m.f3)(c);var h=d?(0,m.A9)(c):null;var g=(0,m.xK)(h,o);var b=function e(){var t;return(0,v.Ay)(o.current)||(o.current&&(0,p.A)(o.current)==="object"?(0,v.Ay)((t=o.current)===null||t===void 0?void 0:t.nativeElement):null)||(0,v.Ay)(a.current)};l.useImperativeHandle(t,(function(){return b()}));var _=l.useRef(e);_.current=e;var S=l.useCallback((function(e){var t=_.current,r=t.onResize,i=t.data;var o=e.getBoundingClientRect(),a=o.width,u=o.height;var c=e.offsetWidth,l=e.offsetHeight;var d=Math.floor(a);var h=Math.floor(u);if(f.current.width!==d||f.current.height!==h||f.current.offsetWidth!==c||f.current.offsetHeight!==l){var p={width:d,height:h,offsetWidth:c,offsetHeight:l};f.current=p;var v=c===Math.round(a)?a:c;var m=l===Math.round(u)?u:l;var y=(0,n.A)((0,n.A)({},p),{},{offsetWidth:v,offsetHeight:m});s===null||s===void 0||s(y,e,i);if(r){Promise.resolve().then((function(){r(y,e)}))}}}),[]);l.useEffect((function(){var e=b();if(e&&!i){ee(e,S)}return function(){return te(e,S)}}),[o.current,i]);return l.createElement(ae,{ref:a},d?l.cloneElement(c,{ref:g}):c)}var ue=l.forwardRef(se);if(false){}const ce=ue;var le="rc-observer-key";function fe(e,t){var r=e.children;var n=typeof r==="function"?[r]:d(r);if(false){}return n.map((function(r,n){var i=(r===null||r===void 0?void 0:r.key)||"".concat(le,"-").concat(n);return l.createElement(ce,(0,c.A)({},e,{key:i,ref:n===0?t:undefined}),r)}))}var de=l.forwardRef(fe);if(false){}de.Collection=g;const he=de;function pe(e){var t;return e===null||e===void 0||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function ve(e){return pe(e)instanceof ShadowRoot}function me(e){return ve(e)?pe(e):null}var ye=r(26956);var ge=r(56855);var be=r(30981);const _e=function(){if(typeof navigator==="undefined"||typeof window==="undefined"){return false}var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e===null||e===void 0?void 0:e.substr(0,4))};var Se=r(98137);function Ee(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos;var o=n||{},a=o.className,s=o.content;var c=i.x,f=c===void 0?0:c,d=i.y,h=d===void 0?0:d;var p=l.useRef();if(!r||!r.points){return null}var v={position:"absolute"};if(r.autoArrow!==false){var m=r.points[0];var y=r.points[1];var g=m[0];var b=m[1];var _=y[0];var S=y[1];if(g===_||!["t","b"].includes(g)){v.top=h}else if(g==="t"){v.top=0}else{v.bottom=0}if(b===S||!["l","r"].includes(b)){v.left=f}else if(b==="l"){v.left=0}else{v.right=0}}return l.createElement("div",{ref:p,className:u()("".concat(t,"-arrow"),a),style:v},s)}function we(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;if(!i){return null}return l.createElement(Se.Ay,(0,c.A)({},o,{motionAppear:true,visible:r,removeOnLeave:true}),(function(e){var r=e.className;return l.createElement("div",{style:{zIndex:n},className:u()("".concat(t,"-mask"),r)})}))}var Te=l.memo((function(e){var t=e.children;return t}),(function(e,t){return t.cache}));if(false){}const Ie=Te;var Re=l.forwardRef((function(e,t){var r=e.popup,o=e.className,a=e.prefixCls,s=e.style,f=e.target,d=e.onVisibleChanged,h=e.open,p=e.keepDom,v=e.fresh,y=e.onClick,g=e.mask,b=e.arrow,_=e.arrowPos,S=e.align,E=e.motion,w=e.maskMotion,T=e.forceRender,I=e.getPopupContainer,R=e.autoDestroy,C=e.portal,k=e.zIndex,A=e.onMouseEnter,O=e.onMouseLeave,P=e.onPointerEnter,x=e.onPointerDownCapture,L=e.ready,M=e.offsetX,N=e.offsetY,D=e.offsetR,j=e.offsetB,U=e.onAlign,V=e.onPrepare,W=e.stretch,B=e.targetWidth,G=e.targetHeight;var Z=typeof r==="function"?r():r;var F=h||p;var H=(I===null||I===void 0?void 0:I.length)>0;var X=l.useState(!I||!H),Y=(0,i.A)(X,2),K=Y[0],z=Y[1];(0,be.A)((function(){if(!K&&H&&f){z(true)}}),[K,H,f]);if(!K){return null}var J="auto";var Q={left:"-1000vw",top:"-1000vh",right:J,bottom:J};if(L||!h){var q;var $=S.points;var ee=S.dynamicInset||((q=S._experimental)===null||q===void 0?void 0:q.dynamicInset);var te=ee&&$[0][1]==="r";var re=ee&&$[0][0]==="b";if(te){Q.right=D;Q.left=J}else{Q.left=M;Q.right=J}if(re){Q.bottom=j;Q.top=J}else{Q.top=N;Q.bottom=J}}var ne={};if(W){if(W.includes("height")&&G){ne.height=G}else if(W.includes("minHeight")&&G){ne.minHeight=G}if(W.includes("width")&&B){ne.width=B}else if(W.includes("minWidth")&&B){ne.minWidth=B}}if(!h){ne.pointerEvents="none"}return l.createElement(C,{open:T||F,getContainer:I&&function(){return I(f)},autoDestroy:R},l.createElement(we,{prefixCls:a,open:h,zIndex:k,mask:g,motion:w}),l.createElement(he,{onResize:U,disabled:!h},(function(e){return l.createElement(Se.Ay,(0,c.A)({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,forceRender:T,leavedClassName:"".concat(a,"-hidden")},E,{onAppearPrepare:V,onEnterPrepare:V,visible:h,onVisibleChanged:function e(t){var r;E===null||E===void 0||(r=E.onVisibleChanged)===null||r===void 0||r.call(E,t);d(t)}}),(function(r,i){var c=r.className,f=r.style;var d=u()(a,c,o);return l.createElement("div",{ref:(0,m.K4)(e,t,i),className:d,style:(0,n.A)((0,n.A)((0,n.A)((0,n.A)({"--arrow-x":"".concat(_.x||0,"px"),"--arrow-y":"".concat(_.y||0,"px")},Q),ne),f),{},{boxSizing:"border-box",zIndex:k},s),onMouseEnter:A,onMouseLeave:O,onPointerEnter:P,onClick:y,onPointerDownCapture:x},b&&l.createElement(Ee,{prefixCls:a,arrow:b,arrowPos:_,align:S}),l.createElement(Ie,{cache:!h&&!v},Z))}))})))}));if(false){}const Ce=Re;var ke=l.forwardRef((function(e,t){var r=e.children,n=e.getTriggerDOMNode;var i=(0,m.f3)(r);var o=l.useCallback((function(e){(0,m.Xf)(t,n?n(e):e)}),[n]);var a=(0,m.xK)(o,(0,m.A9)(r));return i?l.cloneElement(r,{ref:a}):r}));if(false){}const Ae=ke;var Oe=l.createContext(null);const Pe=Oe;function xe(e){return e?Array.isArray(e)?e:[e]:[]}function Le(e,t,r,n){return l.useMemo((function(){var i=xe(r!==null&&r!==void 0?r:t);var o=xe(n!==null&&n!==void 0?n:t);var a=new Set(i);var s=new Set(o);if(e){if(a.has("hover")){a.delete("hover");a.add("click")}if(s.has("hover")){s.delete("hover");s.add("click")}}return[a,s]}),[e,t,r,n])}const Me=function(e){if(!e){return false}if(e instanceof Element){if(e.offsetParent){return true}if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n){return true}}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a){return true}}}return false};function Ne(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var r=arguments.length>2?arguments[2]:undefined;if(r){return e[0]===t[0]}return e[0]===t[0]&&e[1]===t[1]}function De(e,t,r,n){var i=r.points;var o=Object.keys(e);for(var a=0;a<o.length;a+=1){var s;var u=o[a];if(Ne((s=e[u])===null||s===void 0?void 0:s.points,i,n)){return"".concat(t,"-placement-").concat(u)}}return""}function je(e,t,r,n){if(t){return t}if(r){return{motionName:"".concat(e,"-").concat(r)}}if(n){return{motionName:n}}return null}function Ue(e){return e.ownerDocument.defaultView}function Ve(e){var t=[];var r=e===null||e===void 0?void 0:e.parentElement;var n=["hidden","scroll","clip","auto"];while(r){var i=Ue(r).getComputedStyle(r),o=i.overflowX,a=i.overflowY,s=i.overflow;if([o,a,s].some((function(e){return n.includes(e)}))){t.push(r)}r=r.parentElement}return t}function We(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return Number.isNaN(e)?t:e}function Be(e){return We(parseFloat(e),0)}function Ge(e,t){var r=(0,n.A)({},e);(t||[]).forEach((function(e){if(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement){return}var t=Ue(e).getComputedStyle(e),n=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,u=t.borderRightWidth;var c=e.getBoundingClientRect();var l=e.offsetHeight,f=e.clientHeight,d=e.offsetWidth,h=e.clientWidth;var p=Be(o);var v=Be(a);var m=Be(s);var y=Be(u);var g=We(Math.round(c.width/d*1e3)/1e3);var b=We(Math.round(c.height/l*1e3)/1e3);var _=(d-h-m-y)*g;var S=(l-f-p-v)*b;var E=p*b;var w=v*b;var T=m*g;var I=y*g;var R=0;var C=0;if(n==="clip"){var k=Be(i);R=k*g;C=k*b}var A=c.x+T-R;var O=c.y+E-C;var P=A+c.width+2*R-T-I-_;var x=O+c.height+2*C-E-w-S;r.left=Math.max(r.left,A);r.top=Math.max(r.top,O);r.right=Math.min(r.right,P);r.bottom=Math.min(r.bottom,x)}));return r}function Ze(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var r="".concat(t);var n=r.match(/^(.*)\%$/);if(n){return e*(parseFloat(n[1])/100)}return parseFloat(r)}function Fe(e,t){var r=t||[],n=(0,i.A)(r,2),o=n[0],a=n[1];return[Ze(e.width,o),Ze(e.height,a)]}function He(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";return[e[0],e[1]]}function Xe(e,t){var r=t[0];var n=t[1];var i;var o;if(r==="t"){o=e.y}else if(r==="b"){o=e.y+e.height}else{o=e.y+e.height/2}if(n==="l"){i=e.x}else if(n==="r"){i=e.x+e.width}else{i=e.x+e.width/2}return{x:i,y:o}}function Ye(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,n){if(n===t){return r[e]||"c"}return e})).join("")}function Ke(e,t,r,o,a,s,u){var c=l.useState({ready:false,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),f=(0,i.A)(c,2),d=f[0],h=f[1];var p=l.useRef(0);var m=l.useMemo((function(){if(!t){return[]}return Ve(t)}),[t]);var y=l.useRef({});var g=function e(){y.current={}};if(!e){g()}var b=(0,ye.A)((function(){if(t&&r&&e){var c,l,f,d;var p=t;var g=p.ownerDocument;var b=Ue(p);var _=b.getComputedStyle(p),S=_.position;var E=p.style.left;var w=p.style.top;var T=p.style.right;var I=p.style.bottom;var R=p.style.overflow;var C=(0,n.A)((0,n.A)({},a[o]),s);var k=g.createElement("div");(c=p.parentElement)===null||c===void 0||c.appendChild(k);k.style.left="".concat(p.offsetLeft,"px");k.style.top="".concat(p.offsetTop,"px");k.style.position=S;k.style.height="".concat(p.offsetHeight,"px");k.style.width="".concat(p.offsetWidth,"px");p.style.left="0";p.style.top="0";p.style.right="auto";p.style.bottom="auto";p.style.overflow="hidden";var A;if(Array.isArray(r)){A={x:r[0],y:r[1],width:0,height:0}}else{var O,P;var x=r.getBoundingClientRect();x.x=(O=x.x)!==null&&O!==void 0?O:x.left;x.y=(P=x.y)!==null&&P!==void 0?P:x.top;A={x:x.x,y:x.y,width:x.width,height:x.height}}var L=p.getBoundingClientRect();var M=b.getComputedStyle(p),N=M.height,D=M.width;L.x=(l=L.x)!==null&&l!==void 0?l:L.left;L.y=(f=L.y)!==null&&f!==void 0?f:L.top;var j=g.documentElement,U=j.clientWidth,V=j.clientHeight,W=j.scrollWidth,B=j.scrollHeight,G=j.scrollTop,Z=j.scrollLeft;var F=L.height;var H=L.width;var X=A.height;var Y=A.width;var K={left:0,top:0,right:U,bottom:V};var z={left:-Z,top:-G,right:W-Z,bottom:B-G};var J=C.htmlRegion;var Q="visible";var q="visibleFirst";if(J!=="scroll"&&J!==q){J=Q}var $=J===q;var ee=Ge(z,m);var te=Ge(K,m);var re=J===Q?te:ee;var ne=$?te:re;p.style.left="auto";p.style.top="auto";p.style.right="0";p.style.bottom="0";var ie=p.getBoundingClientRect();p.style.left=E;p.style.top=w;p.style.right=T;p.style.bottom=I;p.style.overflow=R;(d=p.parentElement)===null||d===void 0||d.removeChild(k);var oe=We(Math.round(H/parseFloat(D)*1e3)/1e3);var ae=We(Math.round(F/parseFloat(N)*1e3)/1e3);if(oe===0||ae===0||(0,v.fk)(r)&&!Me(r)){return}var se=C.offset,ue=C.targetOffset;var ce=Fe(L,se),le=(0,i.A)(ce,2),fe=le[0],de=le[1];var he=Fe(A,ue),pe=(0,i.A)(he,2),ve=pe[0],me=pe[1];A.x-=ve;A.y-=me;var ye=C.points||[],ge=(0,i.A)(ye,2),be=ge[0],_e=ge[1];var Se=He(_e);var Ee=He(be);var we=Xe(A,Se);var Te=Xe(L,Ee);var Ie=(0,n.A)({},C);var Re=we.x-Te.x+fe;var Ce=we.y-Te.y+de;function Nt(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:re;var n=L.x+e;var i=L.y+t;var o=n+H;var a=i+F;var s=Math.max(n,r.left);var u=Math.max(i,r.top);var c=Math.min(o,r.right);var l=Math.min(a,r.bottom);return Math.max(0,(c-s)*(l-u))}var ke=Nt(Re,Ce);var Ae=Nt(Re,Ce,te);var Oe=Xe(A,["t","l"]);var Pe=Xe(L,["t","l"]);var xe=Xe(A,["b","r"]);var Le=Xe(L,["b","r"]);var Ne=C.overflow||{};var De=Ne.adjustX,je=Ne.adjustY,Ve=Ne.shiftX,Be=Ne.shiftY;var Ze=function e(t){if(typeof t==="boolean"){return t}return t>=0};var Ke;var ze;var Je;var Qe;function Dt(){Ke=L.y+Ce;ze=Ke+F;Je=L.x+Re;Qe=Je+H}Dt();var qe=Ze(je);var $e=Ee[0]===Se[0];if(qe&&Ee[0]==="t"&&(ze>ne.bottom||y.current.bt)){var et=Ce;if($e){et-=F-X}else{et=Oe.y-Le.y-de}var tt=Nt(Re,et);var rt=Nt(Re,et,te);if(tt>ke||tt===ke&&(!$||rt>=Ae)){y.current.bt=true;Ce=et;de=-de;Ie.points=[Ye(Ee,0),Ye(Se,0)]}else{y.current.bt=false}}if(qe&&Ee[0]==="b"&&(Ke<ne.top||y.current.tb)){var nt=Ce;if($e){nt+=F-X}else{nt=xe.y-Pe.y-de}var it=Nt(Re,nt);var ot=Nt(Re,nt,te);if(it>ke||it===ke&&(!$||ot>=Ae)){y.current.tb=true;Ce=nt;de=-de;Ie.points=[Ye(Ee,0),Ye(Se,0)]}else{y.current.tb=false}}var at=Ze(De);var st=Ee[1]===Se[1];if(at&&Ee[1]==="l"&&(Qe>ne.right||y.current.rl)){var ut=Re;if(st){ut-=H-Y}else{ut=Oe.x-Le.x-fe}var ct=Nt(ut,Ce);var lt=Nt(ut,Ce,te);if(ct>ke||ct===ke&&(!$||lt>=Ae)){y.current.rl=true;Re=ut;fe=-fe;Ie.points=[Ye(Ee,1),Ye(Se,1)]}else{y.current.rl=false}}if(at&&Ee[1]==="r"&&(Je<ne.left||y.current.lr)){var ft=Re;if(st){ft+=H-Y}else{ft=xe.x-Pe.x-fe}var dt=Nt(ft,Ce);var ht=Nt(ft,Ce,te);if(dt>ke||dt===ke&&(!$||ht>=Ae)){y.current.lr=true;Re=ft;fe=-fe;Ie.points=[Ye(Ee,1),Ye(Se,1)]}else{y.current.lr=false}}Dt();var pt=Ve===true?0:Ve;if(typeof pt==="number"){if(Je<te.left){Re-=Je-te.left-fe;if(A.x+Y<te.left+pt){Re+=A.x-te.left+Y-pt}}if(Qe>te.right){Re-=Qe-te.right-fe;if(A.x>te.right-pt){Re+=A.x-te.right+pt}}}var vt=Be===true?0:Be;if(typeof vt==="number"){if(Ke<te.top){Ce-=Ke-te.top-de;if(A.y+X<te.top+vt){Ce+=A.y-te.top+X-vt}}if(ze>te.bottom){Ce-=ze-te.bottom-de;if(A.y>te.bottom-vt){Ce+=A.y-te.bottom+vt}}}var mt=L.x+Re;var yt=mt+H;var gt=L.y+Ce;var bt=gt+F;var _t=A.x;var St=_t+Y;var Et=A.y;var wt=Et+X;var Tt=Math.max(mt,_t);var It=Math.min(yt,St);var Rt=(Tt+It)/2;var Ct=Rt-mt;var kt=Math.max(gt,Et);var At=Math.min(bt,wt);var Ot=(kt+At)/2;var Pt=Ot-gt;u===null||u===void 0||u(t,Ie);var xt=ie.right-L.x-(Re+L.width);var Lt=ie.bottom-L.y-(Ce+L.height);if(oe===1){Re=Math.round(Re);xt=Math.round(xt)}if(ae===1){Ce=Math.round(Ce);Lt=Math.round(Lt)}var Mt={ready:true,offsetX:Re/oe,offsetY:Ce/ae,offsetR:xt/oe,offsetB:Lt/ae,arrowX:Ct/oe,arrowY:Pt/ae,scaleX:oe,scaleY:ae,align:Ie};h(Mt)}}));var _=function e(){p.current+=1;var t=p.current;Promise.resolve().then((function(){if(p.current===t){b()}}))};var S=function e(){h((function(e){return(0,n.A)((0,n.A)({},e),{},{ready:false})}))};(0,be.A)(S,[o]);(0,be.A)((function(){if(!e){S()}}),[e]);return[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,_]}var ze=r(45458);function Je(e,t,r,n,i){(0,be.A)((function(){if(e&&t&&r){var o=t;var a=r;var s=Ve(o);var u=Ve(a);var c=Ue(a);var l=new Set([c].concat((0,ze.A)(s),(0,ze.A)(u)));function f(){n();i()}l.forEach((function(e){e.addEventListener("scroll",f,{passive:true})}));c.addEventListener("resize",f,{passive:true});n();return function(){l.forEach((function(e){e.removeEventListener("scroll",f);c.removeEventListener("resize",f)}))}}}),[e,t,r])}function Qe(e,t,r,n,i,o,a,s){var u=l.useRef(e);u.current=e;var c=l.useRef(false);l.useEffect((function(){if(t&&n&&(!i||o)){var e=function e(){c.current=false};var l=function e(t){var r;if(u.current&&!a(((r=t.composedPath)===null||r===void 0||(r=r.call(t))===null||r===void 0?void 0:r[0])||t.target)&&!c.current){s(false)}};var f=Ue(n);f.addEventListener("pointerdown",e,true);f.addEventListener("mousedown",l,true);f.addEventListener("contextmenu",l,true);var d=me(r);if(d){d.addEventListener("mousedown",l,true);d.addEventListener("contextmenu",l,true)}if(false){var h,p,v,m}return function(){f.removeEventListener("pointerdown",e,true);f.removeEventListener("mousedown",l,true);f.removeEventListener("contextmenu",l,true);if(d){d.removeEventListener("mousedown",l,true);d.removeEventListener("contextmenu",l,true)}}}}),[t,r,n,i,o]);function f(){c.current=true}return f}var qe=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function $e(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:a.A;var t=l.forwardRef((function(t,r){var a=t.prefixCls,s=a===void 0?"rc-trigger-popup":a,c=t.children,f=t.action,d=f===void 0?"hover":f,h=t.showAction,p=t.hideAction,m=t.popupVisible,y=t.defaultPopupVisible,g=t.onPopupVisibleChange,b=t.afterPopupVisibleChange,_=t.mouseEnterDelay,S=t.mouseLeaveDelay,E=S===void 0?.1:S,w=t.focusDelay,T=t.blurDelay,I=t.mask,R=t.maskClosable,C=R===void 0?true:R,k=t.getPopupContainer,A=t.forceRender,O=t.autoDestroy,P=t.destroyPopupOnHide,x=t.popup,L=t.popupClassName,M=t.popupStyle,N=t.popupPlacement,D=t.builtinPlacements,j=D===void 0?{}:D,U=t.popupAlign,V=t.zIndex,W=t.stretch,B=t.getPopupClassNameFromAlign,G=t.fresh,Z=t.alignPoint,F=t.onPopupClick,H=t.onPopupAlign,X=t.arrow,Y=t.popupMotion,K=t.maskMotion,z=t.popupTransitionName,J=t.popupAnimation,Q=t.maskTransitionName,q=t.maskAnimation,$=t.className,ee=t.getTriggerDOMNode,te=(0,o.A)(t,qe);var re=O||P||false;var ne=l.useState(false),ie=(0,i.A)(ne,2),oe=ie[0],ae=ie[1];(0,be.A)((function(){ae(_e())}),[]);var se=l.useRef({});var ue=l.useContext(Pe);var ce=l.useMemo((function(){return{registerSubPopup:function e(t,r){se.current[t]=r;ue===null||ue===void 0||ue.registerSubPopup(t,r)}}}),[ue]);var le=(0,ge.A)();var fe=l.useState(null),de=(0,i.A)(fe,2),pe=de[0],ve=de[1];var Se=l.useRef(null);var Ee=(0,ye.A)((function(e){Se.current=e;if((0,v.fk)(e)&&pe!==e){ve(e)}ue===null||ue===void 0||ue.registerSubPopup(le,e)}));var we=l.useState(null),Te=(0,i.A)(we,2),Ie=Te[0],Re=Te[1];var ke=l.useRef(null);var Oe=(0,ye.A)((function(e){if((0,v.fk)(e)&&Ie!==e){Re(e);ke.current=e}}));var xe=l.Children.only(c);var Me=(xe===null||xe===void 0?void 0:xe.props)||{};var Ne={};var Ue=(0,ye.A)((function(e){var t,r;var n=Ie;return(n===null||n===void 0?void 0:n.contains(e))||((t=me(n))===null||t===void 0?void 0:t.host)===e||e===n||(pe===null||pe===void 0?void 0:pe.contains(e))||((r=me(pe))===null||r===void 0?void 0:r.host)===e||e===pe||Object.values(se.current).some((function(t){return(t===null||t===void 0?void 0:t.contains(e))||e===t}))}));var Ve=je(s,Y,J,z);var We=je(s,K,q,Q);var Be=l.useState(y||false),Ge=(0,i.A)(Be,2),Ze=Ge[0],Fe=Ge[1];var He=m!==null&&m!==void 0?m:Ze;var Xe=(0,ye.A)((function(e){if(m===undefined){Fe(e)}}));(0,be.A)((function(){Fe(m||false)}),[m]);var Ye=l.useRef(He);Ye.current=He;var ze=l.useRef([]);ze.current=[];var $e=(0,ye.A)((function(e){var t;Xe(e);if(((t=ze.current[ze.current.length-1])!==null&&t!==void 0?t:He)!==e){ze.current.push(e);g===null||g===void 0||g(e)}}));var et=l.useRef();var tt=function e(){clearTimeout(et.current)};var rt=function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;tt();if(r===0){$e(t)}else{et.current=setTimeout((function(){$e(t)}),r*1e3)}};l.useEffect((function(){return tt}),[]);var nt=l.useState(false),it=(0,i.A)(nt,2),ot=it[0],at=it[1];(0,be.A)((function(e){if(!e||He){at(true)}}),[He]);var st=l.useState(null),ut=(0,i.A)(st,2),ct=ut[0],lt=ut[1];var ft=l.useState(null),dt=(0,i.A)(ft,2),ht=dt[0],pt=dt[1];var vt=function e(t){pt([t.clientX,t.clientY])};var mt=Ke(He,pe,Z&&ht!==null?ht:Ie,N,j,U,H),yt=(0,i.A)(mt,11),gt=yt[0],bt=yt[1],_t=yt[2],St=yt[3],Et=yt[4],wt=yt[5],Tt=yt[6],It=yt[7],Rt=yt[8],Ct=yt[9],kt=yt[10];var At=Le(oe,d,h,p),Ot=(0,i.A)(At,2),Pt=Ot[0],xt=Ot[1];var Lt=Pt.has("click");var Mt=xt.has("click")||xt.has("contextMenu");var Nt=(0,ye.A)((function(){if(!ot){kt()}}));var Dt=function e(){if(Ye.current&&Z&&Mt){rt(false)}};Je(He,Ie,pe,Nt,Dt);(0,be.A)((function(){Nt()}),[ht,N]);(0,be.A)((function(){if(He&&!(j!==null&&j!==void 0&&j[N])){Nt()}}),[JSON.stringify(U)]);var jt=l.useMemo((function(){var e=De(j,s,Ct,Z);return u()(e,B===null||B===void 0?void 0:B(Ct))}),[Ct,B,j,s,Z]);l.useImperativeHandle(r,(function(){return{nativeElement:ke.current,popupElement:Se.current,forceAlign:Nt}}));var Ut=l.useState(0),Vt=(0,i.A)(Ut,2),Wt=Vt[0],Bt=Vt[1];var Gt=l.useState(0),Zt=(0,i.A)(Gt,2),Ft=Zt[0],Ht=Zt[1];var Xt=function e(){if(W&&Ie){var t=Ie.getBoundingClientRect();Bt(t.width);Ht(t.height)}};var Yt=function e(){Xt();Nt()};var Kt=function e(t){at(false);kt();b===null||b===void 0||b(t)};var zt=function e(){return new Promise((function(e){Xt();lt((function(){return e}))}))};(0,be.A)((function(){if(ct){kt();ct();lt(null)}}),[ct]);function Jt(e,t,r,n){Ne[e]=function(i){var o;n===null||n===void 0||n(i);rt(t,r);for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++){s[u-1]=arguments[u]}(o=Me[e])===null||o===void 0||o.call.apply(o,[Me,i].concat(s))}}if(Lt||Mt){Ne.onClick=function(e){var t;if(Ye.current&&Mt){rt(false)}else if(!Ye.current&&Lt){vt(e);rt(true)}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}(t=Me.onClick)===null||t===void 0||t.call.apply(t,[Me,e].concat(n))}}var Qt=Qe(He,Mt,Ie,pe,I,C,Ue,rt);var qt=Pt.has("hover");var $t=xt.has("hover");var er;var tr;if(qt){Jt("onMouseEnter",true,_,(function(e){vt(e)}));Jt("onPointerEnter",true,_,(function(e){vt(e)}));er=function e(t){if((He||ot)&&pe!==null&&pe!==void 0&&pe.contains(t.target)){rt(true,_)}};if(Z){Ne.onMouseMove=function(e){var t;(t=Me.onMouseMove)===null||t===void 0||t.call(Me,e)}}}if($t){Jt("onMouseLeave",false,E);Jt("onPointerLeave",false,E);tr=function e(){rt(false,E)}}if(Pt.has("focus")){Jt("onFocus",true,w)}if(xt.has("focus")){Jt("onBlur",false,T)}if(Pt.has("contextMenu")){Ne.onContextMenu=function(e){var t;if(Ye.current&&xt.has("contextMenu")){rt(false)}else{vt(e);rt(true)}e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}(t=Me.onContextMenu)===null||t===void 0||t.call.apply(t,[Me,e].concat(n))}}if($){Ne.className=u()(Me.className,$)}var rr=(0,n.A)((0,n.A)({},Me),Ne);var nr={};var ir=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ir.forEach((function(e){if(te[e]){nr[e]=function(){var t;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}(t=rr[e])===null||t===void 0||t.call.apply(t,[rr].concat(n));te[e].apply(te,n)}}}));var or=l.cloneElement(xe,(0,n.A)((0,n.A)({},rr),nr));var ar={x:wt,y:Tt};var sr=X?(0,n.A)({},X!==true?X:{}):null;return l.createElement(l.Fragment,null,l.createElement(he,{disabled:!He,ref:Oe,onResize:Yt},l.createElement(Ae,{getTriggerDOMNode:ee},or)),l.createElement(Pe.Provider,{value:ce},l.createElement(Ce,{portal:e,ref:Ee,prefixCls:s,popup:x,className:u()(L,jt),style:M,target:Ie,onMouseEnter:er,onMouseLeave:tr,onPointerEnter:er,zIndex:V,open:He,keepDom:ot,fresh:G,onClick:F,onPointerDownCapture:Qt,mask:I,motion:Ve,maskMotion:We,onVisibleChanged:Kt,onPrepare:zt,forceRender:A,autoDestroy:re,getPopupContainer:k,align:Ct,arrow:sr,arrowPos:ar,ready:gt,offsetX:bt,offsetY:_t,offsetR:St,offsetB:Et,onAlign:Nt,stretch:W,targetWidth:Wt/It,targetHeight:Ft/Rt})))}));if(false){}return t}const et=$e(a.A)},57465:(e,t,r)=>{"use strict";var n=r(43724);var i=r(83635);var o=r(22195);var a=r(62106);var s=r(91181).get;var u=RegExp.prototype;var c=TypeError;if(n&&i){a(u,"dotAll",{configurable:true,get:function e(){if(this===u)return;if(o(this)==="RegExp"){return!!s(this).dotAll}throw new c("Incompatible receiver, RegExp required")}})}},57657:(e,t,r)=>{"use strict";var n=r(79039);var i=r(94901);var o=r(20034);var a=r(2360);var s=r(42787);var u=r(36840);var c=r(78227);var l=r(96395);var f=c("iterator");var d=false;var h,p,v;if([].keys){v=[].keys();if(!("next"in v))d=true;else{p=s(s(v));if(p!==Object.prototype)h=p}}var m=!o(h)||n((function(){var e={};return h[f].call(e)!==e}));if(m)h={};else if(l)h=a(h);if(!i(h[f])){u(h,f,(function(){return this}))}e.exports={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:d}},57696:(e,t,r)=>{"use strict";var n=r(91291);var i=r(18014);var o=RangeError;e.exports=function(e){if(e===undefined)return 0;var t=n(e);var r=i(t);if(t!==r)throw new o("Wrong length or index");return r}},57787:(e,t)=>{"use strict";var r;var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case o:case s:case a:case d:case h:return e;default:switch(e=e&&e.$$typeof,e){case l:case c:case f:case v:case p:case u:return e;default:return t}}case i:return t}}}r=c;r=u;r=n;t.ForwardRef=f;r=o;r=v;r=p;r=i;r=s;r=a;r=d;r=h;r=function(){return!1};r=function(){return!1};r=function(e){return g(e)===c};r=function(e){return g(e)===u};r=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};r=function(e){return g(e)===f};r=function(e){return g(e)===o};r=function(e){return g(e)===v};t.isMemo=function(e){return g(e)===p};r=function(e){return g(e)===i};r=function(e){return g(e)===s};r=function(e){return g(e)===a};r=function(e){return g(e)===d};r=function(e){return g(e)===h};r=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===s||e===a||e===d||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||void 0!==e.getModuleId)?!0:!1};r=g},57829:(e,t,r)=>{"use strict";var n=r(68183).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},58004:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(68750);var a=r(84916);var s=!a("intersection",(function(e){return e.size===2&&e.has(1)&&e.has(2)}))||i((function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"}));n({target:"Set",proto:true,real:true,forced:s},{intersection:o})},58124:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.pad.NoPadding={pad:function(){},unpad:function(){}};return e.pad.NoPadding}))},58168:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(null,arguments)}},58229:(e,t,r)=>{"use strict";var n=r(99590);var i=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw new i("Wrong offset");return r}},58242:(e,t,r)=>{"use strict";var n=r(69565);var i=r(97751);var o=r(78227);var a=r(36840);e.exports=function(){var e=i("Symbol");var t=e&&e.prototype;var r=t&&t.valueOf;var s=o("toPrimitive");if(t&&!t[s]){a(t,s,(function(e){return n(r,this)}),{arity:1})}}},58281:(e,t,r)=>{"use strict";r.r(t)},58319:e=>{"use strict";var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:r&255}},58360:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LazyLoad=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u={};var c=e.LazyLoad=function(){function e(){n(this,e)}return o(e,null,[{key:"getRealLazyApi",value:function r(n,i,o){(0,t.getPLogger)().debug("getRealLazyApi",n,i,o);if((0,t.formatType)(n)!==t.formatType.STRING||(0,t.formatType)(i)!==t.formatType.STRING||(0,t.formatType)(o)!==t.formatType.OBJECT||n===""||i===""){return{}}var a=o;var s=Object.keys(o);var u=Object.getOwnPropertyNames(Object.getPrototypeOf(o));if(u.includes("constructor")){u.splice(u.indexOf("constructor"),1)}var c=s.concat(u);(0,t.getPLogger)().info("getRealLazyApi loadScript, "+n);c.forEach((function(r){if((0,t.formatType)(a[r])===t.formatType.FUNCTION){a[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++){s[u]=arguments[u]}return e.loadScript(n,i).then((function(){var e;(0,t.getPLogger)().info("getRealLazyApi loadScript, real do "+n+"."+r);if(((e=window[n])===null||e===void 0?void 0:e[r])===a[r]){(0,t.getPLogger)().error("getRealLazyApi loadScript, script is error,"+n+"."+r)}else{var i;return(i=window[n])===null||i===void 0||(i=i[r])===null||i===void 0?void 0:i.apply(window[n],s)}return undefined}))["catch"]((function(e){(0,t.getPLogger)().error("getRealLazyApi loadScript,lazy load "+n,e)}))}}}));return a}},{key:"loadScript",value:function e(r,n){(0,t.getPLogger)().debug("loadScript",r,n);if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return Promise.resolve(undefined)}if(!u[r]){var i=document.createElement("script");i.async=true;u[r]=new Promise((function(e,n){i.onload=function(){(0,t.getPLogger)().info("loadScript, load "+r+" success");e(window[r])};i.onerror=function(){(0,t.getPLogger)().error("loadScript, load "+r+" error");n(new Error("load resource error"))}}));i.src=n;document.head.appendChild(i)}else{(0,t.getPLogger)().info("loadScript, not load "+r+" again")}return u[r]}},{key:"loadCss",value:function e(r){(0,t.getPLogger)().info("loadCss",r);if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return Promise.resolve(undefined)}return new Promise((function(e){var n=document.createElement("link");n.rel="stylesheet";n.href=r;n.onload=function(){(0,t.getPLogger)().info("loadCss, load "+r+" success");e(true)};n.onerror=function(){(0,t.getPLogger)().info("loadCss, load "+r+" error");e(false)};document.head.appendChild(n)}))}}])}()}))},58429:(e,t,r)=>{"use strict";var n=r(79039);var i=r(44576);var o=i.RegExp;var a=n((function(){var e=o("a","y");e.lastIndex=2;return e.exec("abcd")!==null}));var s=a||n((function(){return!o("a","y").sticky}));var u=a||n((function(){var e=o("^r","gy");e.lastIndex=2;return e.exec("str")!==null}));e.exports={BROKEN_CARET:u,MISSED_STICKY:s,UNSUPPORTED_Y:a}},58493:(e,t,r)=>{"use strict";var n=r(96540);function i(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t}var o="function"===typeof Object.is?Object.is:i,a=n.useState,s=n.useEffect,u=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];u((function(){i.value=r;i.getSnapshot=t;f(i)&&o({inst:i})}),[e,r,t]);s((function(){f(i)&&o({inst:i});return e((function(){f(i)&&o({inst:i})}))}),[e]);c(r);return r}function f(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}function d(e,t){return t()}var h="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?d:l;t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:h},58622:(e,t,r)=>{"use strict";var n=r(44576);var i=r(94901);var o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},58683:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(8556),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;t=i(t);function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=function e(t){return(0,n.jsx)("svg",a(a({},t),{},{children:(0,n.jsx)("path",{d:"m17.4 7.2-4.5 4.5 4.5 4.5-.9.9-4.5-4.5-4.5 4.5-.9-.9 4.5-4.5-4.5-4.5.9-.9 4.5 4.5 4.5-4.5.9.9z"})}))};l.defaultProps={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};var f=function e(t){return(0,n.jsx)("svg",a(a({},t),{},{children:(0,n.jsx)("g",{stroke:"#666",strokeWidth:"1.681",fill:"none",fillRule:"evenodd",strokeLinecap:"round",children:(0,n.jsx)("path",{d:"m11.493 11.533 19.015 19.015M30.507 11.533 11.492 30.548"})})}))};f.defaultProps={viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg"};const d={[r.typeMap.close]:l,[r.typeMap.bigClose]:f};var h=e.default=d}))},58934:(e,t,r)=>{"use strict";var n=r(46518);var i=r(53487);n({target:"String",proto:true,name:"trimStart",forced:"".trimLeft!==i},{trimLeft:i})},58940:(e,t,r)=>{"use strict";var n=r(46518);var i=r(52703);n({global:true,forced:parseInt!==i},{parseInt:i})},59089:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=Date;var a=i(o.prototype.getTime);n({target:"Date",stat:true},{now:function e(){return a(new o)}})},59149:(e,t,r)=>{"use strict";var n=r(46518);var i=r(2087);var o=Math.abs;n({target:"Number",stat:true},{isSafeInteger:function e(t){return i(t)&&o(t)<=9007199254740991}})},59213:(e,t,r)=>{"use strict";var n=r(76080);var i=r(79504);var o=r(47055);var a=r(48981);var s=r(26198);var u=r(1469);var c=i([].push);var l=function(e){var t=e===1;var r=e===2;var i=e===3;var l=e===4;var f=e===6;var d=e===7;var h=e===5||f;return function(p,v,m,y){var g=a(p);var b=o(g);var _=s(b);var S=n(v,m);var E=0;var w=y||u;var T=t?w(p,_):r||d?w(p,0):undefined;var I,R;for(;_>E;E++)if(h||E in b){I=b[E];R=S(I,E,g);if(e){if(t)T[E]=R;else if(R)switch(e){case 3:return true;case 5:return I;case 6:return E;case 2:c(T,I)}else switch(e){case 4:return false;case 7:c(T,I)}}}return f?-1:i||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},59225:(e,t,r)=>{"use strict";var n=r(44576);var i=r(18745);var o=r(76080);var a=r(94901);var s=r(39297);var u=r(79039);var c=r(20397);var l=r(67680);var f=r(4055);var d=r(22812);var h=r(89544);var p=r(38574);var v=n.setImmediate;var m=n.clearImmediate;var y=n.process;var g=n.Dispatch;var b=n.Function;var _=n.MessageChannel;var S=n.String;var E=0;var w={};var T="onreadystatechange";var I,R,C,k;u((function(){I=n.location}));var A=function(e){if(s(w,e)){var t=w[e];delete w[e];t()}};var O=function(e){return function(){A(e)}};var P=function(e){A(e.data)};var x=function(e){n.postMessage(S(e),I.protocol+"//"+I.host)};if(!v||!m){v=function e(t){d(arguments.length,1);var r=a(t)?t:b(t);var n=l(arguments,1);w[++E]=function(){i(r,undefined,n)};R(E);return E};m=function e(t){delete w[t]};if(p){R=function(e){y.nextTick(O(e))}}else if(g&&g.now){R=function(e){g.now(O(e))}}else if(_&&!h){C=new _;k=C.port2;C.port1.onmessage=P;R=o(k.postMessage,k)}else if(n.addEventListener&&a(n.postMessage)&&!n.importScripts&&I&&I.protocol!=="file:"&&!u(x)){R=x;n.addEventListener("message",P,false)}else if(T in f("script")){R=function(e){c.appendChild(f("script"))[T]=function(){c.removeChild(this);A(e)}}}else{R=function(e){setTimeout(O(e),0)}}}e.exports={set:v,clear:m}},59694:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAJhCAYAAACkQQCKAAAABHNCSVQICAgIfAhkiAAAHEdJREFUeJzt3TF2Ikm6huGoVk3Z44w9NrmIWQR42spgXIO1lJcsoheRaY89c869lozq1qlr9ASdSiWQIBD6xPM4XagkSEE5+XbEH1+enp7+twAAAAAE+1pK+eutLwIAAADgLX659QUAAAAAvNXX4YO//OUvt7oOAAAAgJP89ttvuz+/CBxfvnwpDw8P735BAAAAAKd4fn5+8dgWFQAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxvt76AgCAj6HrutL3fSmllL7vS9d1N76iUpqmKaWUslgsymKx2D0GABj78vT09LM++PbtW3l4eLjl9QAAN9C2bWnb9taXcVTTNGW5XAodAEB5fn4uP3782D0WOADgjqWEjbHValVWq9WtLwMAuKFx4DCDAwDuVGrcKCX72gGA6zCDAwDuUNd1k4FgtVp9uFkXdTbI+HrrYys5AIBSBA4AuEvb7fbV1z7qto+maUrTNGWxWJTtdvti+Gnbth8uyAAAt2GLCgDcma7rXp2Qsl6vP2TcGGqapqzX61cxYyrWAAD3R+AAgDszDgKr1SpqBcR6vX7x+CMcZwsA3J4tKgBwZ8ZB4BYrN+r8jL7vy2KxOHmbyWq1ejGTo+u6qEgDAFyewAEAd2QcN947CkydflKvqW5BOUff9wIHANw5W1QAgHex2WwOHu3adV3ZbDaznmuxWFzqsgCAT0LgAIA79l6hYGqw6b7vOxRBAAD2sUUFALi6qcGmNa70ff8iarRt++FPdAEAPh6BAwC4ukODTZumKX3fOw0FAHgTW1QAgKuaM9h0vFVG7AAATiVwAABXNQ4aU/Gi7/v3uhwA4JOyRQUAuLqmaV6Ejc1mU5bLZSmlTG5PceQrAHAqgQMAuLrFYvEiYhw6VcWAUQDgHLaoAABXt1qtZoWLpmkEDgDgLAIHAHDUJYZ+Hoscq9WqrNfrN78OAHCfbFEBACZ1XVe22+2LuDF3JcY+q9Vqd2LKdrvd/XmxWJi7AQC8icABALzSdV3ZbDavvt62bWnbtqzX67ODRP05QQMAuCRbVACAF/bFjaHNZnORbSsAAJcicAAAO/vixtRqC5EDAPhIBA4AoJSyP27U4Z9TszdEDgDgoxA4AICDcaOGjX0DRm8ROcYrSuqwUgDgfgkcAHDn5sSNQ18r5TaRYxheDCwFAL48PT39rA++fftWHh4ebnk9AMAVjWPGP/7xj/Lrr7+++r5jx8HW01TG3nK6CgDAKZ6fn8uPHz92j63gAIA7dk7cOPQ9x1ZydF23N44AALzF11tfAADwccyJG8PvLaW8ihWbzWZyJcd49Ujf92W9Xr/xigEA/mAFBwBQSjktbhz7mfFKjn1zPgAALkXgAADOihvHfrZGjn1xw8knAMAl2aICAHfkX//616uvvSVuDJ+jlOntKvu+/62vCQAwZAUHANyRv//97y8eLxaLi4WGudFC3AAArkHgAIA7dukjXY/FC3EDALgWW1QAgIuqEWN4HGzTNGW5XO4NKl3Xle12O3tFyanfDwB8fgIHAHAVp6zWqLM6uq4rbdtOHjNbDcNJ13VlsVhcfCUKAJDHFhUA4ObGgWJ8zGw1jBtV3/dXvTYAIIPAAQDc3NSRsePIMRU3Sim2qAAApRSBAwD4APZtZ6mRY1/cWK/X73F5AEAAMzgA4I6Mt4J8pO0dNXCMQ0adzzF2aE4HAHB/rOAAgDs2NefiluYOJhU3AIAxgQMA7sw4IExt/bilY5FD3AAApggcAHDn9s23AABI8vDPf/7zf3YPHh7KL79oHgDwmdXVD8P5G/XPH2FlxLHg8uuvv5bFYlH+9re/veNVAQAfzc+fP8vz8/Pu8Zenp6ef9cG3b9/Kw8PDTS4MAHhfj4+Pr77WNE1ZLBaTx7ae49RgcspqEltVAOC+PT8/lx8/fuweCxwAcKfeY2tK0zSzj3I9dBRs3/d7/07kAID7NA4ctqgAwJ2qqzX+85//lH//+99XeY36vMcixKG40TTN5LaaUv7YrjLn1BUA4PMZb1FRMwDgjtUVFnNXWZxjznaXOasz9p2u8tGOugUAbuPrrS8AALi9pmnK9+/fd7Gg7/tXqyXOsVgsZm0haZrmRajYt/WkBo5hEOn73jYVAMAMDgDg9rqu20WV5XI5a0tLZYsKANwnQ0YBAACAeOPAYQYHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAg3tdbXwAAcJqu60rf92WxWJSmad78fG3bllLKxZ7vXF3Xle12W0opZb1e7/2+tm13v/9qtbr6dX2U96eq11NKeZffHwBSCBwA3J2u697ldebeDNcb9lIO39hX2+22dF1XVqvVRQPHnNe+trmfzfD75oaRfQ4Fg67rLvr+nPpvb+rz7ft+9/kDAH8SOAC4O5vN5l1e5/v377O/972iy2dV37+2bc+68a8R49rRoO/7F0HlmNVqNRldAIDXBA4A7ta1thu4AT2sbdujN/mPj4+vvtY0TVmv12WxWEx+fbPZnBwqhis03ntFxKF/f3P+DY3fBwC4dwIHAHdruVwevMls2/bkuQtd1wkc72T4PjdNU1ar1S6ezP3c6tagUt43cNQos89ms5n8dzT+nQGAPwkcADCh3ihfas7FZzGcd3HMvoA0te2iPnfdPnTK9p7h89b5FH3fz/rcbrV641zDIDNnq9WxiAcAn4nAAQAj4y0Uh7ZTfJSTNd7T3BUqy+Xyylfy2nq9Ll3XnRQ36p+PbZs5ZXbLKYGmDpmdEyOGgWPO53CLzwAAbkXgAICRuXGjlBK1wmO4QmLKvr/bt51i36qHU4ZoXsPcuHHr6xzqum5WLKtRo2mayRkc4xUpKf82AeASBA4A+K/x9otjMxLu3TmBY2p46DW/b2olxXCwaCmHP+fhqSer1eqmgz3nXHPalhsAuCSBAwDK9P/R7/t+8kZxeBN56RvJuTf29Tr2xYSpVRf7VmLUWDO+gd9ut59yYOowTp2yAufW25GOrTj5jJ8VAJxC4ADg7g1DwfjI0bZty3q93t3Y1tMt6qkdacY36MOb4vHvUwd2XtKh1RKn2Bdl5v5c/dmUz3AcN6bmjAzncwDAPRI4AOC/hje86/V6Fzg2m82LEzqOHfH5Ftd63o9i3wqIunJlGJPmOGVVxfAI33MC1S1Xb5wSL8zdAOBeCRwA3L26CmB8YziMGuMVHtdyjzenw9UJb/39Hx8f936eNWr0fT/7M/wIqyLatt2Fmbq6aLvd7n2vbjknBABuSeAAgPLyxrreTA5nUDRNs1sBUG+iU7Y3HHKLG/jxgNbhNphjw1trmKifx9TztG2795jWxM+sfkbHrv0jxBgAuCWBA4C7Nwwaw8el/HEjvVwuS9M0u5UGdetK27a74zovMYDylqs33vO1D831OHXmR9/3u2ufEwLOnSkyFVTm/txbLZfLslgsXvxeU9dSv2YFBwD3SuAA4K51Xfdq1UC9KR3fVNY/r1arXeAYznW49TGiKYbbQ+oqmVPfu8ViUbque7FqYc4KhnOP9x1+zqfYt5LkFE3TvAglw9VE9euX3OYDAKkEDgDu2vDmcblc7r5Wyh83w5vN5lXoKOXPgaT1Jrtt293jUw1vzI8dBXrIOdsv6mu/Z5gZ3pQP41Apr1fP7DN1vePn+qyWy2Xpum5yDoe4AcA9EzgAuHtTAye7riuLxWJ3E14DxvjmuQaSS9xUn7tKoF7Hua+5z7VnOtSYM3zvaiwar1rYZzh3o5Tj78MpKyrGxwd3XXfyKS/XNFzFUa/TCiIA7pnAAQATxjfYw7kblx4wOhxkeu7PvuV1S3n/G+PhSpVz3sv6+dSb/Gvc4A9netQtMYdOL3nr68y99uHvvt1uX4Soz756BQAOETgA4ICpuRs1clxaHWZ6is1mc3bkGN4Yn7od5K2GgWNqLsbUbJSprUKl/DkctpTL3eAPt8+U8jqo3HoVR92mMrxGcQOAeydwAMBAnakxdSrKcO7GpXyE4ZC3eN3hqST73s9j7/P4Jv9aN/j1eevrbTabi25VOfd0lmFwAQAEDgDYGc5cqKaOgb1GELhFZLjl3Iblcrkb6jpUT1Wpx/Oe4pKrN6bmg4y3hpzzmdV/R/U93zdUdc5nUoNL/VkrOAC4dwIHAPxXnbXQ933p+373f8entgFc8ma6lLwZGG+1Lw7U9/3Q90wZ/w5TgWKO4TyPqVkr6/V6ty2oruQ4xXi2y3DOR339ubFiuMXoo2ydAYBbEjgAYGB8A1q3rNQb73rzW+dwTG1lmeuWkWF8Y/0R1dBR3//xDI7hjI6pE19OjRzjuR/7fm69XpfHx8fd958zO2V8jcPXnzPEdmq10aW3zgBAGoEDAA6YOk1lGDtWq9Wbb27f+4Z07tyGa812qL/3OEoMX+/YNY4HkI5XMJx6Msk4GBxbmTFcydF13Vkn64wD1zCe1a8d+9m6lae+H9c45QUAUggcAHCC4U3nW7YEDG9u33t7ypxjRedc3+Pj49mvPyee1Pe2vn797/CEk3r9bdu+uLmfu81lvGqjBoNjP9c0Tfn+/fuLk3WqOaFjas7H8Hdp23ZydVCd/1HVEDMMLo+Pj1ZyAHCXBA4A7lbd+vDW5zj0eMqxOQ/XtG+A5vj6hi59ozwOFsOAMhwyOl5FUWPEMG7U32G8haj+/T41FIznq5z6WYyjxNTfje37HcbPN95ycmiVSZ3bUf9+7lYXAPhMBA4A7tb4hvS9zJnzcA37wsp4VcDUUNUp+7ZxjLePjB16zn2rO6ZWSQyfp54ocugznYoapcxftbHP8DqG19n3/YvnnVotMvVerFar3ftQV6VMxY2pY4zrNdT/vmVGDACkETgAuFvD4zov6dhNdnWrwaJTN9ZTUeHYaR63uHHeFyPqio8aEPatXhgfy/qWsDE0dYpL13WvVlkMv//Qezs8Anbo2DXXwbf1fej7XuAA4G58eXp6+lkffPv2rTw8PNzyegDg6urN36VuboeGqyH2rXCoJ7NcInDUoafjE0YOff/U/9Wfmrmx7705Nt/inGNehz+73W4nf5+5M08Ofd97rWo49D7Pff06xLY6deaLY2MB+Oyen5/Ljx8/do8FDgAAACDOOHD8csNrAQAAALgIgQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQT+AAAAAA4gkcAAAAQDyBAwAAAIgncAAAAADxBA4AAAAgnsABAAAAxBM4AAAAgHgCBwAAABBP4AAAAADiCRwAAABAPIEDAAAAiCdwAAAAAPEEDgAAACCewAEAAADEEzgAAACAeAIHAAAAEE/gAAAAAOIJHAAAAEA8gQMAAACIJ3AAAAAA8QQOAAAAIJ7AAQAAAMQTOAAAAIB4AgcAAAAQ7+vwwc+fP8vvv/9+q2sBAAAAOMuLwPHbb7/d6joAAAAAzmaLCgAAABDvaynl/259EQAAAABv8f8JGFYBNHBN+QAAAABJRU5ErkJggg=="},59848:(e,t,r)=>{"use strict";r(86368);r(29309)},59904:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(2360);n({target:"Object",stat:true,sham:!i},{create:o})},59969:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(92771)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.singleControlDecorator=e.printfDecorator=e.frequentTasksDecoratorFactory=e.customDecorator=e.componentDecorator=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return u(e)||s(e)||a(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return c(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==n(t)?t:t+""}function p(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v=e.printfDecorator=function e(t){return function(e,r,n){var i;function o(){var e;for(var n=arguments.length,o=new Array(n),a=0;a<n;a++){o[a]=arguments[a]}var s=Date.now();var u=i.apply(this,o);if(u!==null&&u!==void 0&&u.then){return u.then((function(e){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call.apply(n,[t,"printfDecorator async over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[e]));return e}))}t===null||t===void 0||(e=t.debug)===null||e===void 0||e.call.apply(e,[t,"printfDecorator over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[u]));return u}if(n!==null&&n!==void 0&&n.initializer){return f(f({},n),{},{writable:true,initializer:function e(){var t;i=(t=n.initializer)===null||t===void 0?void 0:t.call(this);return o}})}i=n===null||n===void 0?void 0:n.value;return f(f({},n),{},{writable:true,value:o})}};var m=e.componentDecorator=function e(t){return function(e){var r=e.prototype.render;if(r){e.prototype.render=function(){try{return r.call(this)}catch(r){var n;t===null||t===void 0||(n=t.error)===null||n===void 0||n.call(t,"".concat(e.name," render error"),r);return null}}}if(false){var n,i,o}}};var y=function e(t){var r=t.currResult,n=t.aftMethodDeal,i=t.name;if(typeof n!=="function"){return r}var o=n(r);if(o!==null&&o!==void 0&&o.then){return o.then((function(e){if(e){return r}return Promise.reject(new Error("".concat(i,", aftMethodDeal check failed")))}))}if(o){return r}throw new Error("".concat(i,", aftMethodDeal check failed"))};var g=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal,o=t.fn,a=t.self,s=t.args,u=t.name;var c=function e(){var t=o.apply(a,s);if(t!==null&&t!==void 0&&t.then){return t.then((function(e){return y({currResult:e,aftMethodDeal:n,name:u})}))}return y({currResult:t,aftMethodDeal:n,name:u})};if(typeof r!=="function"){return c()}var l=r.apply(void 0,i(s));if(l!==null&&l!==void 0&&l.then){return l.then((function(e){if(e){return c()}return Promise.reject(new Error("".concat(u,", preMethodDeal check reject error,")+e))}))}if(l){return c()}throw new Error("".concat(u,", preMethodDeal check throw error,")+l)};var b=e.customDecorator=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal;return function(e,t,i){var o;function a(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++){i[a]=arguments[a]}return g({preMethodDeal:r,aftMethodDeal:n,fn:o,self:this,args:i,name:t})}if(i!==null&&i!==void 0&&i.initializer){return f(f({},i),{},{writable:true,initializer:function e(){var t;o=(t=i.initializer)===null||t===void 0?void 0:t.call(this);return a}})}o=i===null||i===void 0?void 0:i.value;return f(f({},i),{},{writable:true,value:a})}};var _=e.frequentTasksDecoratorFactory=function e(t){var r=new Map;return function(e){return function(n,i,o){var a,s;var u;function c(){if(r.get(e)){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call(t,"frequentTasksDecorator waitting last call:",e);return r.get(e)}for(var i=arguments.length,o=new Array(i),a=0;a<i;a++){o[a]=arguments[a]}var s=u.apply(this,o);if(s!==null&&s!==void 0&&s.then){r.set(e,s);return s.then((function(t){r["delete"](e);return t}))}r["delete"](e);return s}t===null||t===void 0||(a=t.debug)===null||a===void 0||a.call(t,"frequentTasksDecorator","".concat(n===null||n===void 0||(s=n.constructor)===null||s===void 0?void 0:s.name,".prototype.").concat(i),o);if(o!==null&&o!==void 0&&o.initializer){return f(f({},o),{},{writable:true,initializer:function e(){var t;u=(t=o.initializer)===null||t===void 0?void 0:t.call(this);return c}})}u=o===null||o===void 0?void 0:o.value;return f(f({},o),{},{writable:true,value:c})}}};var S=e.singleControlDecorator=function e(t){return function(e,r,n){var i;var o=false;function a(e){if(o){return t(r,e)}var n=i.call(this,e);if(n!==null&&n!==void 0&&n.then){o=true;return n.then((function(e){o=false;return e}))}o=false;return n}if(n!==null&&n!==void 0&&n.initializer){return f(f({},n),{},{writable:true,initializer:function e(){var t;i=(t=n.initializer)===null||t===void 0?void 0:t.call(this);return a}})}i=n===null||n===void 0?void 0:n.value;return f(f({},n),{},{writable:true,value:a})}}}))},60193:(e,t,r)=>{"use strict";var n=r(70511);n("hasInstance")},60268:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("fontcolor")},{fontcolor:function e(t){return i(this,"font","color",t)}})},60334:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.reactRenderPolyfill=void 0;t=i(t);function i(e){return e&&e.__esModule?e:{default:e}}const o=e=>{var i;(i=(0,n.getPLogger)())===null||i===void 0?void 0:i.debug("reactRenderPolyfill",t.default.version,e);if(!e){return{render:()=>{},unmount:()=>{}}}const{render:o,unmountComponentAtNode:a}=r(40961);return{render:t=>o(t,e),unmount:()=>{a(e)}}};e.reactRenderPolyfill=o}))},60479:(e,t,r)=>{"use strict";var n=r(10687);n(Math,"Math",true)},60511:(e,t,r)=>{"use strict";var n=r(60788);var i=TypeError;e.exports=function(e){if(n(e)){throw new i("The method doesn't accept regular expressions")}return e}},60533:(e,t,r)=>{"use strict";var n=r(79504);var i=r(18014);var o=r(655);var a=r(72333);var s=r(67750);var u=n(a);var c=n("".slice);var l=Math.ceil;var f=function(e){return function(t,r,n){var a=o(s(t));var f=i(r);var d=a.length;var h=n===undefined?" ":o(n);var p,v;if(f<=d||h==="")return a;p=f-d;v=u(h,l(p/h.length));if(v.length>p)v=c(v,0,p);return e?a+v:v+a}};e.exports={start:f(false),end:f(true)}},60605:(e,t,r)=>{"use strict";var n=r(46518);var i=r(15617);n({target:"Math",stat:true},{fround:i})},60706:(e,t,r)=>{"use strict";var n=r(10350).PROPER;var i=r(79039);var o=r(47452);var a="​…᠎";e.exports=function(e){return i((function(){return!!o[e]()||a[e]()!==a||n&&o[e].name!==e}))}},60739:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(48981);var a=r(72777);var s=i((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}));n({target:"Date",proto:true,arity:1,forced:s},{toJSON:function e(t){var r=o(this);var n=a(r,"number");return typeof n=="number"&&!isFinite(n)?null:r.toISOString()}})},60788:(e,t,r)=>{"use strict";var n=r(20034);var i=r(22195);var o=r(78227);var a=o("match");e.exports=function(e){var t;return n(e)&&((t=e[a])!==undefined?!!t:i(e)==="RegExp")}},60825:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(18745);var a=r(30566);var s=r(35548);var u=r(28551);var c=r(20034);var l=r(2360);var f=r(79039);var d=i("Reflect","construct");var h=Object.prototype;var p=[].push;var v=f((function(){function e(){}return!(d((function(){}),[],e)instanceof e)}));var m=!f((function(){d((function(){}))}));var y=v||m;n({target:"Reflect",stat:true,forced:y,sham:y},{construct:function e(t,r){s(t);u(r);var n=arguments.length<3?t:s(arguments[2]);if(m&&!v)return d(t,r,n);if(t===n){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var i=[null];o(p,i,r);return new(o(a,t,i))}var f=n.prototype;var y=l(c(f)?f:h);var g=o(t,y,r);return c(g)?g:y}})},61034:(e,t,r)=>{"use strict";var n=r(69565);var i=r(39297);var o=r(1625);var a=r(67979);var s=RegExp.prototype;e.exports=function(e){var t=e.flags;return t===undefined&&!("flags"in s)&&!i(e,"flags")&&o(s,e)?n(a,e):t}},61345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WebsocketWithHeartBeat=void 0;var n=r(44772);var i=r(6630);var o=r(11686);var a=r(44104);var s=r(55798);var u=r(46817);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=S(t),v(e,y()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e,t,r,n){var i=b(S(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},b.apply(null,arguments)}function _(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var T=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const I=new a.Log({module:"HwICS.HBWebsocket"});let R=t.WebsocketWithHeartBeat=function(e){function t(){var e;c(this,t);e=p(this,t);e._timerManager=new n.Timer({userWebWorker:false});e._heartbeatFailCount=0;return e}E(t,e);return f(t,[{key:"connect",value:function e({url:r,onclose:n=()=>{},onerror:i=()=>{},onopen:o=()=>{},onmessage:a=()=>{},onHeartbeatTimeOut:s=()=>{}}){this._onHeartbeatTimeOut=s;return g(t,"connect",this,3)([{url:r,onclose:n,onerror:i,onopen:()=>{this.startHeartbeatLoop();o()},onmessage:a}])}},{key:"startHeartbeatLoop",value:function e(){this._heartBeatTask=new n.Timer.TimerTask((()=>this.heartbeat()));this.resetHeartbeat("startHeartbeatLoop");this._timerManager.cancel().scheduleFixedInterval(this._heartBeatTask,i.ICS_WS_HEART_BEAT_TIME)}},{key:"resetHeartbeat",value:function e(t){I.info("resetHeartbeat",t);this._heartbeatFailCount=0}},{key:"heartbeat",value:async function e(){const t=",heartbeat";try{const e=await this.send({param:{action:s.CloudWssAction.PING},rsp_action:s.CloudWssAction.PONG,entry:t,timeout:i.ICS_WS_HEART_BEAT_TIMEOUT});if((e===null||e===void 0?void 0:e.error_code)===o.SDKErrorCode.WEBSOCKET_RESPONSE_TIMEOUT){this._heartbeatFailCount++;if(this._heartbeatFailCount>3){var r;(r=this._onHeartbeatTimeOut)===null||r===void 0?void 0:r.call(this);this.close("heartbeat time out");this.clear("heartbeat time out")}}else if(this._heartbeatFailCount!==0){this.resetHeartbeat("heartbeat success")}}catch(e){this.errorWidthId("heartbeat",t,e)}}},{key:"removeEventListener",value:function e(r){g(t,"removeEventListener",this,3)([r]);this._onHeartbeatTimeOut=()=>{}}},{key:"clear",value:function e(r){this._timerManager.cancel();this.resetHeartbeat("clear");g(t,"clear",this,3)([r])}}])}(u.IcsWebSocketBase);T([(0,n.printfDecorator)(I)],R.prototype,"connect",null);T([(0,n.printfDecorator)(I)],R.prototype,"startHeartbeatLoop",null);T([(0,n.printfDecorator)(I)],R.prototype,"heartbeat",null);T([(0,n.printfDecorator)(I)],R.prototype,"removeEventListener",null);T([(0,n.printfDecorator)(I)],R.prototype,"clear",null)},61347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CaptionMessageType=void 0;var r;(function(e){e["QUESTION"]="question";e["ANSWER"]="answer";e["WAITING_ANSWER"]="waiting_answer"})(r||(t.CaptionMessageType=r={}))},61699:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(79039);var a=o((function(){return new Date(16e11).getYear()!==120}));var s=i(Date.prototype.getFullYear);n({target:"Date",proto:true,forced:a},{getYear:function e(){return s(this)-1900}})},61701:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(28551);var s=r(1767);var u=r(19462);var c=r(96319);var l=r(9539);var f=r(84549);var d=r(96395);var h=!d&&f("map",TypeError);var p=u((function(){var e=this.iterator;var t=a(i(this.next,e));var r=this.done=!!t.done;if(!r)return c(e,this.mapper,[t.value,this.counter++],true)}));n({target:"Iterator",proto:true,real:true,forced:d||h},{map:function e(t){a(this);try{o(t)}catch(e){l(this,"throw",e)}if(h)return i(h,this,t);return new p(s(this),{mapper:t})}})},61740:(e,t,r)=>{"use strict";var n=r(15823);n("Uint32",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},61806:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28551);var o=r(72652);var a=r(1767);var s=[].push;n({target:"Iterator",proto:true,real:true},{toArray:function e(){var t=[];o(a(i(this)),s,{that:t,IS_RECORD:true});return t}})},61828:(e,t,r)=>{"use strict";var n=r(79504);var i=r(39297);var o=r(25397);var a=r(19617).indexOf;var s=r(30421);var u=n([].push);e.exports=function(e,t){var r=o(e);var n=0;var c=[];var l;for(l in r)!i(s,l)&&i(r,l)&&u(c,l);while(t.length>n)if(i(r,l=t[n++])){~a(c,l)||u(c,l)}return c}},61833:(e,t,r)=>{"use strict";var n=r(70511);n("search")},62010:(e,t,r)=>{"use strict";var n=r(43724);var i=r(10350).EXISTS;var o=r(79504);var a=r(62106);var s=Function.prototype;var u=o(s.toString);var c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;var l=o(c.exec);var f="name";if(n&&!i){a(s,f,{configurable:true,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})}},62062:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).map;var o=r(70597);var a=o("map");n({target:"Array",proto:true,forced:!a},{map:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},62106:(e,t,r)=>{"use strict";var n=r(50283);var i=r(24913);e.exports=function(e,t,r){if(r.get)n(r.get,t,{getter:true});if(r.set)n(r.set,t,{setter:true});return i.f(e,t,r)}},62293:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=r;function r(){return(0,t.jsxs)("defs",{children:[(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-1",children:(0,t.jsx)("path",{d:"M223,398.83a18.44,18.44,0,0,1-25.4.57,16.91,16.91,0,0,1-.6-24.51c12-12.1,115.85-104,315-278.61C523.51,86.16,542,94.06,542,109.11v1000c0,9.57-8,17.33-18,17.33s-18-7.76-18-17.33V148.3C328.72,303.93,233.43,388.29,223,398.83Zm-61.24-66.11a18.05,18.05,0,0,1-25.1.58,17.08,17.08,0,0,1-.59-24.53c16-16.44,176.27-157.71,320.23-282,68.74-59.37,177-11.67,177,78V1109.1a17.75,17.75,0,0,1-35.49,0V104.72c0-59.77-72.18-91.57-118-52C337.22,175.87,176.74,317.38,161.77,332.72ZM290.19,452.45a18,18,0,0,1-25.09.58,17.06,17.06,0,0,1-.6-24.52c6-6.15,113.31-101.66,161.77-143.89,11.44-10,29.56-2,29.56,12.95V1109.1a17.75,17.75,0,0,1-35.5,0V336.44C368.08,382.48,294.31,448.23,290.19,452.45Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-2",children:(0,t.jsx)("path",{d:"M704.79,1012a16.4,16.4,0,1,1,0,32.8H145.68a16.4,16.4,0,0,1-12.61-26.9Q519.68,553.79,578.25,484.06c121.81-145,51.3-311-96-356.47-78.39-24.21-173.49-10.47-232,29.95C173,210.93,130,285.29,120.69,381.85A16.4,16.4,0,0,1,88,378.69C98.3,272.6,146.35,189.49,231.61,130.56,298.48,84.35,404,69.11,491.93,96.26c168,51.89,249.74,244.24,111.44,408.89Q546.55,572.79,180.68,1012Zm0-82a16.4,16.4,0,1,1,0,32.79H320.69A16.4,16.4,0,0,1,308.09,936Q591.56,595.7,641,536.79c154.74-184.22,77.5-422-134.6-487.54C405.13,18,283.73,34.74,203.64,90.09,106.47,157.25,50.73,253.43,39.07,374A16.4,16.4,0,1,1,6.43,370.8C19,240.72,79.81,135.8,185,63.11c88.53-61.18,220.38-79.4,331.13-45.19,234.07,72.29,320.18,337.41,150,540Q618.83,614.23,355.7,930.05Zm0,164a16.4,16.4,0,1,1,0,32.8H145.68c-83.41,0-129-97.27-75.61-161.36Q457,500.95,515.47,431.32c76.46-91,44.53-193.9-57.42-225.38-53.32-16.47-122.6-7.6-161.18,19.06-57.3,39.6-87.55,92.15-94.57,164.74a16.4,16.4,0,1,1-32.64-3.16c7.93-82.1,43.23-143.41,108.57-188.56,47.11-32.56,126.84-42.77,189.5-23.42,124.13,38.34,164.57,168.63,72.85,277.81Q481.9,522.28,95.27,986.46C59.69,1029.19,90.07,1094,145.68,1094Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-3",children:(0,t.jsx)("path",{d:"M150.16,114.94a16.46,16.46,0,0,1,0-32.92H627.28C640.21,82,648,96.43,641,107.39L431.54,435.58C576.93,477.71,660.06,568,678.31,705c13.24,111-32.32,198-120.2,275.42-48.35,38.93-110.73,63-184.55,63-122.67,0-228.1-59.56-298.39-202.69a16.52,16.52,0,0,1,7.39-22.06,16.27,16.27,0,0,1,21.88,7.45C169,957.48,262.78,1010.48,373.56,1010.48c66.07,0,121.38-21.29,163.61-55.27,80-70.47,120.45-147.79,108.74-246C628.66,579.7,548.3,497.8,401.79,461.67a16.5,16.5,0,0,1-9.85-24.9L597.36,114.94ZM759.38,695.22c16.14,135.38-34.92,248-150.31,349.55-65,52.34-145.84,80.94-235.51,80.94C213,1125.71,83,1042.15,2,877.23a16.52,16.52,0,0,1,7.39-22.05,16.26,16.26,0,0,1,21.88,7.45c75.55,153.82,194.35,230.16,342.3,230.16,82.25,0,155.91-26.06,214.58-73.28C695.33,925.16,741.71,822.88,727,699.37c-17.37-130.47-86.65-225.74-203.8-281.78a16.51,16.51,0,0,1-6.73-23.77L682.22,134.11c28-43.82-3.24-101.47-54.94-101.47H150.16a16.47,16.47,0,0,1,0-32.93H627.28c77.54,0,124.36,86.49,82.4,152.22L553.77,396.19C670.93,458,741.34,559.73,759.38,695.22Zm-609.22-498a16.46,16.46,0,0,1,0-32.92H477.65c12.93,0,20.73,14.41,13.74,25.37L350.74,410.05c-24.28,38-4.17,88.84,39.4,99.59C516.86,540.89,582.8,606.46,597.39,716c9.05,76-21.15,139.19-93.05,202.52C470.47,945.67,425,961.1,373.56,961.1c-98.8,0-172.22-49-225.22-156.9a16.53,16.53,0,0,1,7.39-22.06,16.28,16.28,0,0,1,21.88,7.45c47.64,97,110,138.59,196,138.59,44.15,0,82.46-13,109.87-34.94C547.24,837,572.59,784,565,720.15c-12.66-95-68.27-150.33-182.61-178.53C317,525.5,286.86,449.28,323.27,392.24l124.46-195Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-4",children:(0,t.jsx)("path",{d:"M653.07,974.28h93c9.07,0,16.42,8.2,16.42,18.32s-7.35,18.32-16.42,18.32H685.92v97.2c0,10.12-7.35,18.32-16.42,18.32s-16.43-8.2-16.43-18.32ZM536.81,911.64H99.24c-11.67,0-20-12.44-16.5-24.68L331.44,13.77C334.29,3.76,344-1.82,353.1,1.31s14.19,13.8,11.33,23.81L122.77,873.64h414Zm208.42-38c9.55,0,17.29,8.51,17.29,19s-7.74,19-17.29,19H653.07v-38ZM612.8,19.45v1088c0,10.5-7.74,19-17.29,19s-17.28-8.5-17.28-19V911.64H578v-38h.22V19.45c0-10.5,7.74-19,17.28-19S612.8,9,612.8,19.45Zm-76,802.67H211.62c-11.35,0-19.44-12.53-16.05-24.85L410.68,16.69C413.46,6.61,422.9,1,431.76,4.16s13.79,13.89,11,24L234.51,783.87H503.18V19.57C503.18,9,510.71.44,520,.44S536.81,9,536.81,19.57Zm209.23,0h-93V19.57C653.07,9,660.45.44,669.56.44S686,9,686,19.57v764.3h60c9.1,0,16.48,8.56,16.48,19.12S755.14,822.12,746,822.12ZM501.87,1006.33H105.42c-70.74,0-121.17-74.82-100-148.41L247.74,13.8c2.89-10,12.69-15.62,21.9-12.48S284,15.14,281.09,25.18L38.73,869.3c-14.09,49.06,19.53,98.94,66.69,98.94H536.81V1107.4c0,10.52-7.82,19-17.47,19s-17.47-8.52-17.47-19Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-5",children:(0,t.jsx)("path",{d:"M328.4,451.14C408,451.14,478.92,463.09,527,486c131.05,62.37,193.15,237.43,130.61,375.77C598.09,993.47,474,1059.11,339.29,1040.94c-106.4-14.36-198-84.3-235.83-154.89-14.74-24-21.95-42.35-29.53-68.56A16.59,16.59,0,0,1,84.72,797a16,16,0,0,1,19.93,11.1c6.81,23.55,13,39.43,26.37,61.16,33.65,62.66,116.64,126.06,212.44,139,121.13,16.34,231.64-42.09,285.12-160.4,55-121.79-.07-277.18-115-331.88-43.23-20.58-109.87-31.8-185.17-31.8h-144c-9.61,0-17.06-8.64-15.92-18.47l43-368.18A16.2,16.2,0,0,1,227.32,83H643.83a16.51,16.51,0,0,1,0,33H241.53l-39.1,335.18Zm0-82.51c92.35,0,173.35,14.42,232.24,42.45C732.49,492.87,811.28,717.4,730.28,896.57c-73.51,162.62-230.08,249.3-401.4,226.18-125.75-17-242.49-97.89-296-197.63-13.67-25.47-25-51.49-32-78.08a16.55,16.55,0,0,1,11.24-20.26,16,16,0,0,1,19.68,11.58C38,862,48.35,885.79,60.89,909.15,109.49,999.66,217.33,1074.41,333,1090c157.57,21.26,300.63-57.94,368.18-207.39,73.54-162.67,1.66-367.5-154-441.6C493,415.27,416.47,401.63,328.4,401.63H274.7c-9.61,0-17.06-8.64-15.91-18.46L282.49,180a16.2,16.2,0,0,1,15.91-14.54H643.1a16.51,16.51,0,0,1,0,33H312.62L292.77,368.63ZM142.52,782.48a16.62,16.62,0,0,1,9.95-21,15.93,15.93,0,0,1,20.36,10.26,230.49,230.49,0,0,0,12.55,31c1.67,3.33,3.39,6.49,5.28,9.71s3.68,6.1,6.46,10.44l3.39,5.29c29.73,46.48,92,89.9,153.36,98.19,88.65,12,164.28-29.83,202.06-113.4,36.12-79.92-.82-186.41-76-222.18-31.45-15-87.62-24.18-151.55-24.18h-144c-57.66,0-102.35-51.87-95.48-110.81l43-368.19C137.65,37.89,178.64.44,227.32.44H643.1a16.27,16.27,0,0,1,16,16.5,16.27,16.27,0,0,1-16,16.51H227.32c-32.45,0-59.78,25-63.65,58.13L120.72,459.77c-4.59,39.29,25.21,73.88,63.65,73.88h144c68.16,0,128.63,9.91,165,27.22,91.36,43.49,135.15,169.7,91.59,266.06C541.25,923.69,452.1,973,349.7,959.13c-71.06-9.59-141.32-58.61-176-112.76l-3.38-5.27c-3-4.68-5.05-8-7.15-11.57-2.24-3.82-4.3-7.6-6.3-11.58A261.77,261.77,0,0,1,142.52,782.48Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-6",children:(0,t.jsx)("path",{d:"M381.31,573.27a15.66,15.66,0,0,1,0,31.31q-9,0-17.9.71a15.66,15.66,0,1,1-2.48-31.22Q371.06,573.27,381.31,573.27ZM171.44,701.5a15.57,15.57,0,0,1,1.51-4C288.32,485.42,553.31-2.65,547.19,8.61A15.66,15.66,0,0,1,574.6,23.75c8.71-16-257.86,475-373.9,688.27a15.53,15.53,0,0,1-.84,2.58,145.75,145.75,0,0,0-11.66,57c0,91.11,85.71,167,193.11,167s193.11-75.88,193.11-167-85.72-167-193.11-167a15.66,15.66,0,1,1,0-31.31c123.9,0,224.42,89,224.42,198.31s-100.52,198.3-224.42,198.3-224.43-89-224.43-198.3A177,177,0,0,1,171,702.41C171.15,702.1,171.29,701.79,171.44,701.5Zm-134.79-81L369.38,8.64a15.65,15.65,0,1,1,27.51,15Q337.54,132.76,63.45,636.73a14.75,14.75,0,0,1-1.05,1.67A302.33,302.33,0,0,0,31.62,771.58c0,179,156.67,323.55,349.69,323.55S731,950.62,731,771.58C731,616,612,483.8,449.19,454.13l-1.64-.28A15.66,15.66,0,0,1,452.68,423l2.13.37c177.2,32.29,307.5,177,307.5,348.25,0,196.92-171.23,354.86-381,354.86S.31,968.5.31,771.58A333.56,333.56,0,0,1,35.07,623,14.94,14.94,0,0,1,36.65,620.48Zm95.19,54.36c0,.09-.08.18-.13.27a224.34,224.34,0,0,0-21.8,96.47c0,135.11,121.19,245.27,271.4,245.27S652.7,906.69,652.7,771.58C652.7,645,545.8,539,406.63,527.36l-2-.15A15.65,15.65,0,1,1,406.88,496l2.36.17C564.05,509.1,684,628,684,771.58c0,153.1-135.84,276.58-302.71,276.58S78.59,924.68,78.59,771.58a255.43,255.43,0,0,1,23.65-107.36l.16-.63c1.08-2.22,1.08-2.22,2.32-4.49,4.26-7.86,4.26-7.86,12.72-23.43q19-35,63.21-116.32Q269,356.72,458.25,8.8l27.51,15Q138.07,663.44,132.12,674.32Zm-28-13.87c-.46.73-.46.73-.5.81l.22-.41,1.14-2.07q6-11.07,353.6-650.5c10-18.34,37.48-3.38,27.51,15Q296.57,371.67,208.16,534.3,164,615.62,145,650.61L132.26,674l-.31.57A15.65,15.65,0,0,0,103.79,661Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-7",children:(0,t.jsx)("path",{d:"M17,117.79a16.76,16.76,0,1,1,0-33.52H660.78a16.77,16.77,0,0,1,15.38,23.64L235,1116.55A16.91,16.91,0,0,1,212.7,1125a16.73,16.73,0,0,1-8.46-22.17l430.45-985Zm0,83.83a16.77,16.77,0,1,1,0-33.53H554.31L142.39,1115.74a16.91,16.91,0,0,1-22.29,8.44,16.73,16.73,0,0,1-8.49-22.16l390.61-900.4ZM17,34A16.77,16.77,0,1,1,17,.44H660.78c74.07,0,123,76.49,91.83,142.86C560.82,574.76,430,898.37,329.12,1114.17a16.92,16.92,0,0,1-22.41,8.14,16.73,16.73,0,0,1-8.19-22.27C399.32,884.47,530,561,721.9,129.43,742.81,85,710.16,34,660.78,34Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-8",children:(0,t.jsx)("path",{d:"M151.37,489.51a14.29,14.29,0,0,1,1.68-1.28,403,403,0,0,1,88-43.84c27.64-9.72,76.57-18.62,148.57-27.1,78.57-3.46,138.9-55.68,138.9-114.5,0-61.19-65-114.68-147.32-114.68S233.86,241.6,233.86,302.79c0,16.52,4.81,32.91,14,48.11A15.88,15.88,0,0,1,243,372.45a15,15,0,0,1-21-5c-12.15-20-18.63-42.12-18.63-64.64,0-80.17,79.91-146,177.8-146S559,222.62,559,302.79c0,77.21-74.43,141.63-167,145.67C323.15,456.6,275.89,465.2,250.9,474a374,374,0,0,0-81.42,40.59,14.77,14.77,0,0,1-2.44,1.31q-.56.48-1.17.93C81,577.62,30.66,670.52,30.66,772c0,179,157,323.2,350.52,323.2S731.7,951,731.7,772c0-71.43-24.84-138.86-70.18-194.32-1.6-1.94-1.6-1.94-3.21-3.87a15.92,15.92,0,0,1,1.55-22.06,15,15,0,0,1,21.49,1.59c1.77,2.11,1.77,2.11,3.52,4.24,49.86,61,77.31,135.49,77.31,214.42,0,197.13-171.36,354.48-381,354.48S.18,969.09.18,772c0-112,55.47-214.31,148.23-280.8A15.75,15.75,0,0,1,151.37,489.51ZM381.18,527c-151.91,0-274.32,110.19-274.32,245s122.41,245,274.32,245S655.5,906.79,655.5,772c0-55.21-20.51-107.67-57.81-150.42a15.91,15.91,0,0,1,1.19-22.08,15,15,0,0,1,21.52,1.22C662.58,649,686,708.86,686,772c0,153.08-136.87,276.29-304.8,276.29S76.38,925,76.38,772s136.88-276.29,304.8-276.29A253.1,253.1,0,0,0,469.55,480c81.6-30.38,135.15-99.82,135.15-177.2,0-105.91-99.58-192.88-223.52-192.88s-223.52,87-223.52,192.88a169.93,169.93,0,0,0,19.42,78.7,15.83,15.83,0,0,1-6.28,21.15,15,15,0,0,1-20.61-6.44,201.74,201.74,0,0,1-23-93.41c0-124.4,114.22-224.15,254-224.15s254,99.75,254,224.15c0,91.32-62.19,172-155.24,206.6A282.88,282.88,0,0,1,381.18,527Zm4,77.65a14.64,14.64,0,0,1-4,.55c-110.3,0-198.12,76.29-198.12,166.81s87.82,166.82,198.12,166.82S579.3,862.48,579.3,772c0-39.54-16.95-77.69-47.44-107.92a15.92,15.92,0,0,1-.37-22.11,15,15,0,0,1,21.55-.38c36.24,35.93,56.74,82.07,56.74,130.41,0,109-102.48,198.09-228.6,198.09S152.58,881,152.58,772C152.58,664,253,575.72,377.26,573.9c.41-.07.82-.12,1.24-.15,97.35-7.35,136.89-21.22,217.77-81.69a15.43,15.43,0,0,1,1.46-1.57c53.15-50,83.17-116.28,83.17-187.7,0-150.44-134.22-271.07-299.72-271.07S81.46,152.35,81.46,302.79a249.3,249.3,0,0,0,29,116.89,15.84,15.84,0,0,1-6.15,21.19,15,15,0,0,1-20.66-6.32A281.22,281.22,0,0,1,51,302.79C51,134.09,199.69.44,381.18.44s330.2,133.65,330.2,302.35c0,80-33.39,154.15-92,209.81A15.76,15.76,0,0,1,616,516C530.42,580.23,485.59,596.66,385.18,604.6Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-9",children:(0,t.jsx)("path",{d:"M381.11,553.61a15.66,15.66,0,0,1,0-31.31q9,0,17.9-.7a15.65,15.65,0,1,1,2.48,31.21Q391.38,553.62,381.11,553.61ZM591,425.39a15.71,15.71,0,0,1-1.51,4c-115.36,212.07-380.36,700.14-374.24,688.89a15.66,15.66,0,0,1-27.41-15.15c-8.71,16,257.86-475,373.9-688.26a15.63,15.63,0,0,1,.84-2.59,145.74,145.74,0,0,0,11.66-57c0-91.11-85.71-167-193.11-167S188,264.2,188,355.31s85.72,167,193.11,167a15.66,15.66,0,1,1,0,31.31c-123.9,0-224.42-89-224.42-198.3S257.21,157,381.11,157s224.43,89,224.43,198.31a177,177,0,0,1-14.14,69.17C591.27,424.79,591.13,425.09,591,425.39Zm134.79,81L393,1118.25a15.66,15.66,0,0,1-27.51-15Q424.9,994.12,699,490.15a16.77,16.77,0,0,1,1-1.67A302.26,302.26,0,0,0,730.8,355.31c0-179-156.67-323.56-349.69-323.56S31.43,176.26,31.43,355.31c0,155.62,119,287.77,281.8,317.45l1.64.27a15.66,15.66,0,1,1-5.13,30.89l-2.13-.36C130.41,671.26.11,526.58.11,355.31.11,158.38,171.34.44,381.11.44s381,157.94,381,354.87a333.59,333.59,0,0,1-34.76,148.55A15.34,15.34,0,0,1,725.77,506.41ZM630.58,452l.13-.27a224.18,224.18,0,0,0,21.8-96.46C652.51,220.2,531.32,110,381.11,110S109.72,220.2,109.72,355.31c0,126.62,106.9,232.58,246.07,244.22l2,.14a15.66,15.66,0,0,1-2.21,31.24l-2.36-.18C198.37,617.79,78.4,498.87,78.4,355.31,78.4,202.2,214.25,78.72,381.11,78.72S683.83,202.2,683.83,355.31a255.39,255.39,0,0,1-23.65,107.35l-.16.64c-1.08,2.21-1.08,2.21-2.32,4.48-4.26,7.87-4.26,7.87-12.71,23.44L581.78,607.54q-88.41,162.63-277.61,510.55l-27.51-15Q624.35,463.44,630.3,452.56Zm28,13.88.5-.81-.22.4-1.14,2.08q-6,11.06-353.59,650.49c-10,18.34-37.49,3.39-27.52-14.95q189.2-347.91,277.6-510.55,44.21-81.32,63.21-116.3c8.45-15.57,8.45-15.57,12.69-23.4l.31-.58a15.66,15.66,0,0,0,28.16,13.62Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-0",children:(0,t.jsx)("path",{d:"M381.48,81.87c167.19,0,302.72,141,302.72,314.84V730.17C684.2,904.06,548.67,1045,381.48,1045S78.77,904.06,78.77,730.17V396.71C78.77,222.83,214.3,81.87,381.48,81.87Zm0,32.57c-149.89,0-271.39,126.38-271.39,282.27V730.17c0,155.9,121.5,282.28,271.39,282.28s271.4-126.38,271.4-282.28V396.71C652.88,240.82,531.37,114.44,381.48,114.44Zm0-114c210.42,0,381,177.42,381,396.27V730.17c0,218.86-170.58,396.27-381,396.27S.48,949,.48,730.17V396.71C.48,177.86,171.06.44,381.48.44Zm0,32.57C188.36,33,31.8,195.85,31.8,396.71V730.17c0,200.87,156.56,363.7,349.68,363.7S731.17,931,731.17,730.17V396.71C731.17,195.85,574.61,33,381.48,33Zm0,162.85c-106.65,0-193.11,89.93-193.11,200.85V730.17C188.37,841.1,274.83,931,381.48,931S574.59,841.1,574.59,730.17V396.71C574.59,285.79,488.13,195.86,381.48,195.86Zm0-32.57c124,0,224.43,104.51,224.43,233.42V730.17c0,128.92-100.48,233.42-224.43,233.42S157.06,859.09,157.06,730.17V396.71C157.06,267.8,257.54,163.29,381.48,163.29Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-*",children:(0,t.jsx)("path",{d:"M523.43,265.62a12.24,12.24,0,0,1-12.24-21.21L675.5,149.5a12.24,12.24,0,0,1,12.24,21.21ZM689.89,653a12.24,12.24,0,0,1-12.24,21.21L511.16,578a12.24,12.24,0,0,1,12.24-21.21ZM85.67,672.27a12.24,12.24,0,0,1-12.24-21.21l173.08-100a12.24,12.24,0,0,1,12.24,21.21ZM260.1,250.93a12.24,12.24,0,0,1-12.24,21.21L75.4,172.53a12.24,12.24,0,0,1,12.24-21.21ZM246,475.7a12.24,12.24,0,0,1,12.24,21.21L42.7,621.38a12.24,12.24,0,0,1-12.24-21.21ZM721.53,201a12.24,12.24,0,0,1,12.24,21.21L522.08,344.49a12.24,12.24,0,0,1-12.24-21.21ZM512.8,500.88A12.24,12.24,0,0,1,525,479.67L733.77,600.24a12.24,12.24,0,0,1-12.24,21.21ZM30.46,222.28A12.24,12.24,0,0,1,42.7,201.07L258.64,325.8A12.24,12.24,0,0,1,246.4,347ZM437.89,23.82a12.24,12.24,0,1,1,24.48,0V791.93a12.24,12.24,0,1,1-24.48,0Zm-133.53-.59a12.24,12.24,0,1,1,24.48,0V795.17a12.24,12.24,0,1,1-24.48,0Zm91.25,791a12.24,12.24,0,0,1-24.48,0V12.69a12.24,12.24,0,1,1,24.48,0ZM504.83,404.93a12.15,12.15,0,0,1,5.25-6.08l232.07-134A12.24,12.24,0,0,1,754.39,286L537.62,411.23,756.36,537.57a12.24,12.24,0,0,1-12.24,21.21l-235.52-136A12.26,12.26,0,0,1,504.12,406,12,12,0,0,1,504.83,404.93ZM251.34,422.59a12.74,12.74,0,0,1-1.63,1.13L18.84,557.07A12.24,12.24,0,0,1,6.6,535.86L222.38,411.23,8.76,287.84A12.24,12.24,0,0,1,21,266.63l232,134a12.24,12.24,0,0,1-1.61,22Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-#",children:(0,t.jsx)("path",{d:"M361.88,237.37a14,14,0,0,1,0-27.9h93.78c7.39,0,13.39,6.24,13.39,13.95s-6,14-13.39,14Zm7.21-66.31a14,14,0,0,1,0-27.9h93.82c7.39,0,13.39,6.24,13.39,14s-6,13.95-13.39,13.95Zm79.48,102.86A13.67,13.67,0,0,1,462,287.87c0,7.7-6,13.95-13.39,13.95H355.22c-7.4,0-13.39-6.25-13.39-13.95a13.67,13.67,0,0,1,13.39-13.95Zm-129.17,346a14,14,0,0,1,0-27.9h94.16C421,592,427,598.28,427,606s-6,14-13.39,14Zm7.7-67c-7.39,0-13.39-6.25-13.39-14s6-14,13.39-14h93.95c7.39,0,13.39,6.25,13.39,14s-6,14-13.39,14Zm79.39,104.18c7.4,0,13.39,6.25,13.39,14s-6,14-13.39,14H312.67c-7.39,0-13.39-6.25-13.39-14s6-14,13.39-14ZM510,814.23a13.59,13.59,0,0,1-15,12.12,13.74,13.74,0,0,1-11.89-15.28L573.25,12.66a13.6,13.6,0,0,1,15-12.13,13.75,13.75,0,0,1,11.89,15.28Zm-58.43,0a13.59,13.59,0,0,1-15,12.12,13.74,13.74,0,0,1-11.89-15.28L514.82,12.66A13.59,13.59,0,0,1,529.8.53a13.73,13.73,0,0,1,11.89,15.28Zm-259.92,0a13.53,13.53,0,1,1-26.88-3.16L254.9,12.66a13.59,13.59,0,0,1,15-12.13,13.75,13.75,0,0,1,11.89,15.28ZM320.76,12.66a13.6,13.6,0,0,1,15-12.13,13.75,13.75,0,0,1,11.89,15.28L257.46,814.23a13.59,13.59,0,0,1-15,12.12,13.73,13.73,0,0,1-11.89-15.28Zm-154,196.81,4.34-38.41H13.35C6,171.06,0,164.82,0,157.11s6-14,13.39-14H174.29L189,12.66A13.59,13.59,0,0,1,204,.53,13.74,13.74,0,0,1,215.9,15.81L125.73,814.23a13.53,13.53,0,1,1-26.88-3.16l14.31-126.68H13.35C6,684.39,0,678.14,0,670.44s6-14,13.39-14h103l4.13-36.55H13.35C6,619.94,0,613.7,0,606s6-14,13.39-14H123.59L128,553H13.35C6,553,0,546.72,0,539s6-14,13.39-14H131.16l25.21-223.24h-143C6,301.82,0,295.57,0,287.87s6-13.95,13.39-13.95H159.52l4.13-36.55H13.35C6,237.37,0,231.13,0,223.42s6-13.95,13.39-13.95Zm466.72,27.9-4.12,36.55H744.05c7.39,0,13.39,6.24,13.39,13.95s-6,13.95-13.39,13.95H626.24L601,525.06h143c7.39,0,13.39,6.25,13.39,14s-6,14-13.39,14H598.75l-.87,0-4.55,40.29a12.82,12.82,0,0,1,5.42-1.19h145.3c7.39,0,13.39,6.24,13.39,14s-6,14-13.39,14H598.75a13,13,0,0,1-8.11-2.85l-4.45,39.4H748.57a13.67,13.67,0,0,1,13.39,14c0,7.7-6,13.95-13.39,13.95H584.2c-.39,0-.78,0-1.16,0L568.37,814.23a13.59,13.59,0,0,1-15,12.12,13.73,13.73,0,0,1-11.89-15.28L631.67,12.66a13.59,13.59,0,0,1,15-12.13,13.75,13.75,0,0,1,11.89,15.28L644.16,143.16h99.89c7.39,0,13.39,6.24,13.39,14s-6,13.95-13.39,13.95H641l-4.34,38.41H744.05c7.39,0,13.39,6.24,13.39,13.95s-6,14-13.39,14Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-A",children:(0,t.jsx)("path",{d:"M381.91,201.78,95.39,822c-2.63,5.7-9,8-14.18,5.1s-7.28-9.83-4.65-15.53L372.49,171c3.91-8.45,14.93-8.45,18.83,0L687.26,811.6c2.63,5.7.55,12.65-4.65,15.53s-11.55.6-14.18-5.1ZM20.43,822c-2.63,5.7-9,8-14.17,5.1S-1,817.3,1.61,811.6L372.5,8.71c3.9-8.45,14.92-8.45,18.83,0l370,801c2.63,5.69.55,12.64-4.65,15.52s-11.55.6-14.18-5.09L381.91,39.52ZM253,643.13H452.82c5.83,0,10.55,5.17,10.55,11.55s-4.72,11.55-10.55,11.55H242.31l-72,155.8c-2.63,5.7-9,8-14.18,5.1s-7.28-9.83-4.65-15.53l221-478.37c3.9-8.45,14.92-8.45,18.83,0l221,478.37c2.63,5.7.54,12.65-4.65,15.53s-11.55.6-14.18-5.1L381.9,364Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-B",children:(0,t.jsx)("path",{d:"M258,754.35v8.79h218.1C583.34,763.14,670,681.56,670,581.32S583.34,399.48,476.1,399.48L258,399.64Zm-22.5-354.69-58.49,0V763.14h58.49V399.66Zm146.43-22.78c104.21,0,188.41-79.24,188.41-176.63S486.12,23.61,381.92,23.61H258V376.88ZM73,12.32A11.27,11.27,0,0,1,84.25,1H381.92c116.32,0,210.9,89,210.9,199.22,0,76.87-46,143.43-113.32,176.66,117.79,1.72,213,92.41,213,204.41,0,113-97,204.4-216.41,204.4H84.28A11.27,11.27,0,0,1,73,774.43C73,770,73,14.35,73,12.32Zm81.5,11.29H96V763.14h58.5V23.61Zm76.91,353.27h4.08V23.61H177v353.5l52.33,0A11,11,0,0,1,231.41,376.88Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-C",children:(0,t.jsx)("path",{d:"M609.87,531.46c3.24-5.86,10.25-7.76,15.65-4.24s7.15,11.12,3.91,17c-45.11,81.54-129.14,132.89-221.78,132.89-140.79,0-255.17-117.62-255.17-263.06S266.86,151,407.65,151c68.46,0,132.68,27.93,180.21,76.82a263.58,263.58,0,0,1,41.57,56.09c3.24,5.86,1.49,13.46-3.91,17s-12.41,1.62-15.65-4.25a239.26,239.26,0,0,0-37.71-50.86c-43.3-44.53-101.91-70-164.51-70C279.19,175.7,175.29,282.56,175.29,414s103.9,238.31,232.36,238.31C492.29,652.34,568.89,605.52,609.87,531.46ZM675.39,570c3.3-5.82,10.32-7.64,15.69-4.06s7,11.2,3.74,17C636,686.85,527.33,752.15,407.65,752.15,224.76,752.15,76.2,600.94,76.2,414S224.76,75.89,407.65,75.89c119.8,0,228.5,65.41,287.32,169.46,3.29,5.83,1.61,13.45-3.76,17s-12.4,1.74-15.69-4.08c-54.65-96.68-156-157.65-267.87-157.65C237,100.65,99,241.14,99,414S237,727.39,407.65,727.39C519.44,727.39,620.71,666.53,675.39,570ZM741,607.85c3.33-5.81,10.36-7.59,15.71-4s7,11.23,3.68,17C688,747.51,554.59,827,407.65,827,182.76,827,.13,642.31.13,414S182.76,1,407.65,1C554.59,1,688,80.54,760.42,207.14c3.32,5.81,1.67,13.44-3.68,17s-12.38,1.83-15.71-4C672.78,100.92,546.74,25.78,407.65,25.78,195,25.78,23,199.81,23,414S195,802.27,407.65,802.27C546.74,802.27,672.78,727.13,741,607.85Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-D",children:(0,t.jsx)("path",{d:"M341.69,664.46H182.91A11.44,11.44,0,0,1,171.47,653V175a11.44,11.44,0,0,1,11.44-11.44H341.69C480,163.59,592.05,275.71,592.05,414S480,664.46,341.69,664.46Zm0-22.88c125.64,0,227.48-101.87,227.48-227.54S467.33,186.47,341.69,186.47H194.35V641.58Zm0,103H102.77a11.44,11.44,0,0,1-11.44-11.44V94.89a11.44,11.44,0,0,1,11.44-11.44H341.71c182.54,0,330.5,148,330.5,330.58S524.25,744.6,341.71,744.6Zm-227.5-22.88h227.5C511.61,721.72,649.33,584,649.33,414s-137.72-307.7-307.62-307.7H114.21ZM340.56,827H21.5a11.44,11.44,0,0,1-11.43-11.44V12.47A11.44,11.44,0,0,1,21.5,1H340.56C568.61,1,753.47,185.92,753.47,414S568.61,827,340.56,827ZM32.94,804.14H340.56c215.42,0,390-174.65,390-390.13S556,23.91,340.56,23.91H32.94Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-E",children:(0,t.jsx)("path",{d:"M338.2,502.73a11.79,11.79,0,0,1,0-23.55H618a11.79,11.79,0,0,1,0,23.55Zm0-84.79a11.79,11.79,0,0,1,0-23.56H618a11.79,11.79,0,0,1,0,23.56Zm0-84.8a11.79,11.79,0,0,1,0-23.55H618a11.79,11.79,0,0,1,0,23.55Zm-69.73,309H659.62a11.79,11.79,0,0,1,0,23.55H257.19a11.54,11.54,0,0,1-11.28-11.78V174.15a11.53,11.53,0,0,1,11.28-11.77H659.62a11.79,11.79,0,0,1,0,23.55H268.47Zm-75.82,80.66h467a11.79,11.79,0,0,1,0,23.56H181.37a11.54,11.54,0,0,1-11.28-11.78V93.48a11.53,11.53,0,0,1,11.28-11.77H659.62a11.79,11.79,0,0,1,0,23.55h-467Zm-77.39,80.68H659.62a11.79,11.79,0,0,1,0,23.55H104A11.53,11.53,0,0,1,92.7,815.25V12.8A11.53,11.53,0,0,1,104,1H659.62A11.53,11.53,0,0,1,670.9,12.8a11.54,11.54,0,0,1-11.28,11.78H115.26Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-F",children:(0,t.jsx)("path",{d:"M336.54,502.73a11.79,11.79,0,0,1,0-23.55H616.38a11.79,11.79,0,0,1,0,23.55Zm0-84.79a11.79,11.79,0,0,1,0-23.56H616.38a11.79,11.79,0,0,1,0,23.56Zm0-84.8a11.79,11.79,0,0,1,0-23.55H616.38a11.79,11.79,0,0,1,0,23.55Zm-69.8-154.07V815.59a11.26,11.26,0,1,1-22.52,0V167.64a11.34,11.34,0,0,1,11.26-11.43H658a11.43,11.43,0,0,1,0,22.86Zm-75.81-77.59V815.59a11.26,11.26,0,1,1-22.52,0V90.05a11.34,11.34,0,0,1,11.26-11.43H658a11.43,11.43,0,0,1,0,22.86ZM113.56,23.89v791.7a11.27,11.27,0,1,1-22.53,0V12.46A11.35,11.35,0,0,1,102.29,1H658a11.34,11.34,0,0,1,11.26,11.43A11.35,11.35,0,0,1,658,23.89Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-G",children:(0,t.jsx)("path",{d:"M602.45,449.37H460.36a11.47,11.47,0,0,1,0-22.94H741.69a11.46,11.46,0,0,1,11.47,11.47V614.84l-1.44,5.57C681.19,747.2,551,827,407.3,827,187.64,827,9.77,642,9.77,414S187.64,1,407.3,1C551,1,681.19,80.85,751.72,207.64a11.48,11.48,0,0,1-20.06,11.15C665.11,99.15,542.46,24,407.3,24,200.53,24,32.72,198.5,32.72,414S200.53,804.08,407.3,804.08c134.19,0,256-74.1,322.91-192.24V449.37h-41V576.85l-1.42,5.53C630.48,686.42,524.39,752,407.3,752,228.56,752,83.87,600.57,83.87,414s144.69-338,323.43-338c117.19,0,223.37,65.68,280.64,169.86A11.47,11.47,0,0,1,667.83,257C614.5,160,515.94,99,407.3,99,241.48,99,106.82,239.93,106.82,414S241.47,729,407.3,729c107.59,0,205.29-59.8,259-155.17V449.37H625.4v88.74L624,543.54c-43.9,81.62-126,133.22-216.74,133.22-137.69,0-249-117.77-249-262.73S269.6,151.28,407.29,151.28c67.09,0,129.93,28.12,176.32,77.18a261.36,261.36,0,0,1,40.42,56,11.47,11.47,0,0,1-20.21,10.86,238.56,238.56,0,0,0-36.88-51.14c-42.14-44.57-99-70-159.65-70-124.72,0-226.1,107.22-226.1,239.8s101.38,239.79,226.1,239.79c81.15,0,154.85-45.75,195.16-118.64Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-H",children:(0,t.jsx)("path",{d:"M297.63,470.91a11.75,11.75,0,1,1,0-23.5H467.27a11.75,11.75,0,1,1,0,23.5Zm0-75.19a11.75,11.75,0,1,1,0-23.49H467.27a11.75,11.75,0,1,1,0,23.49Zm0-75.18a11.75,11.75,0,1,1,0-23.49H467.27a11.75,11.75,0,1,1,0,23.49ZM733.5,774a11.78,11.78,0,0,1-23.56,0V12.77a11.78,11.78,0,0,1,23.56,0Zm-84.82,0a11.78,11.78,0,0,1-23.56,0V12.77a11.78,11.78,0,0,1,23.56,0Zm-84.82,0a11.78,11.78,0,0,1-23.56,0V12.77a11.78,11.78,0,0,1,23.56,0ZM224.6,774A11.79,11.79,0,0,1,201,774V12.77a11.79,11.79,0,0,1,23.57,0Zm-84.82,0a11.78,11.78,0,0,1-23.56,0V12.77a11.78,11.78,0,0,1,23.56,0ZM55,774a11.78,11.78,0,0,1-23.56,0V12.77a11.78,11.78,0,0,1,23.56,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-I",children:(0,t.jsx)("path",{d:"M483,772.84c0,7.12-6.12,12.88-13.68,12.88s-13.68-5.76-13.68-12.88V13.91C455.67,6.79,461.79,1,469.35,1S483,6.79,483,13.91Zm-89.56,0c0,7.12-6.13,12.88-13.69,12.88S366.1,780,366.1,772.84V13.91C366.1,6.79,372.23,1,379.78,1s13.69,5.76,13.69,12.88Zm-89.57,0c0,7.12-6.13,12.88-13.68,12.88s-13.69-5.76-13.69-12.88V13.91C276.53,6.79,282.66,1,290.22,1S303.9,6.79,303.9,13.91Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-J",children:(0,t.jsx)("path",{d:"M454.76,13.68a12.78,12.78,0,0,1,25.56,0V527.33c0,49.79-44.11,89.64-98,89.64s-98-39.85-98-89.64a12.79,12.79,0,0,1,25.57,0c0,35.27,32.17,64.33,72.44,64.33s72.44-29.06,72.44-64.33Zm85.22,0a12.78,12.78,0,0,1,25.56,0V525.57c0,97.18-82.12,175.78-183.22,175.78s-183.23-78.6-183.23-175.78a12.79,12.79,0,0,1,25.57,0c0,83,70.49,150.47,157.66,150.47S540,608.57,540,525.57Zm85.22,0a12.79,12.79,0,0,1,25.57,0v510.2c0,144.66-120.24,261.84-268.45,261.84S113.87,668.54,113.87,523.88a12.78,12.78,0,0,1,25.56,0c0,130.59,108.7,236.53,242.89,236.53S625.2,654.47,625.2,523.88Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-K",children:(0,t.jsx)("path",{d:"M230.92,773.07a12.66,12.66,0,0,1-25.32,0V13.68a12.66,12.66,0,0,1,25.32,0Zm-75.95,0a12.66,12.66,0,0,1-25.32,0V13.68a12.66,12.66,0,0,1,25.32,0Zm-75.95,0a12.66,12.66,0,0,1-25.32,0V13.68a12.66,12.66,0,0,1,25.32,0Zm625.4-33.79A12.66,12.66,0,0,1,683.12,753L453.7,396.15a12.67,12.67,0,0,1,0-13.67L691.18,11.66A12.66,12.66,0,0,1,712.5,25.31l-233.11,364Zm-309-350.35L622.19,752.67a12.66,12.66,0,1,1-21.49,13.39L369.78,395.63a12.67,12.67,0,0,1,0-13.39L600.7,11.81A12.66,12.66,0,1,1,622.19,25.2ZM530.37,754.09a12.66,12.66,0,0,1-21.51,13.34L278.17,395.59a12.67,12.67,0,0,1,0-13.34L508,11.81a12.66,12.66,0,0,1,21.52,13.35L303.83,388.92Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-L",children:(0,t.jsx)("path",{d:"M659.28,642.56a12.62,12.62,0,0,1,0,25.22H279.73a12.39,12.39,0,0,1-12.15-12.61V13a12.16,12.16,0,1,1,24.3,0V642.56Zm0,81.86a12.62,12.62,0,0,1,0,25.22H193.49A12.39,12.39,0,0,1,181.34,737V13a12.16,12.16,0,1,1,24.3,0V724.42ZM117.64,801.15H659.38a12.62,12.62,0,0,1,0,25.22H105.48a12.38,12.38,0,0,1-12.15-12.61V13a12.16,12.16,0,1,1,24.31,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-M",children:(0,t.jsx)("path",{d:"M590.46,198,388.54,410.49a10.79,10.79,0,0,1-15.91,0L172.54,199.93V734.21c0,6.83-5.11,12.37-11.41,12.37s-11.42-5.54-11.42-12.37V175.9L97.2,120.64V734.13c0,6.84-5.11,12.37-11.42,12.37S74.37,741,74.37,734.13V96.62L22.59,42.13l2.25,692.93c0,6.83-5.07,12.39-11.38,12.41S2,742,2,735.15L-.34,12.81C-.37,1.86,11.78-3.74,19,3.9L380.58,384.38,742.13,3.9c7.24-7.62,19.37-2.06,19.37,8.87V735.1c0,6.83-5.11,12.37-11.42,12.37s-11.41-5.54-11.41-12.37V42l-50,52.65V734.13c0,6.84-5.11,12.37-11.42,12.37S665.8,741,665.8,734.13V118.71L613.26,174q0,.45,0,.9V734.21c0,6.83-5.11,12.37-11.41,12.37s-11.42-5.54-11.42-12.37Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-N",children:(0,t.jsx)("path",{d:"M557.53,559.11l46.87,54.47-.68-598.3a12,12,0,1,1,23.9,0l.71,626.14,48.53,56.4V15.18a11.95,11.95,0,1,1,23.89,0v715c0,11.29-13.62,16.57-20.9,8.1l-448-520.67V734A11.95,11.95,0,1,1,208,734V189.86l-46.91-54.51V733.68a11.95,11.95,0,1,1-23.89,0V108.37c0-.26,0-.51,0-.77l-51.64-60V733.3a12,12,0,1,1-23.9,0V15.18c0-11.29,13.63-16.58,20.91-8.11L533.64,531.34V15.45a11.95,11.95,0,1,1,23.89,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-O",children:(0,t.jsx)("path",{d:"M762.24,396.83c0,217.56-170.58,393.94-381,393.94S.24,614.39.24,396.83,170.82,2.9,381.24,2.9,762.24,179.27,762.24,396.83Zm-21.08,0C741.16,191.3,580,24.69,381.24,24.69S21.32,191.3,21.32,396.83,182.47,769,381.24,769,741.16,602.36,741.16,396.83Zm-51.31,0c0,176.14-138.18,318.94-308.61,318.94S72.64,573,72.64,396.83,210.8,77.9,381.24,77.9,689.85,220.7,689.85,396.83Zm-21.08,0c0-164.1-128.74-297.14-287.53-297.14S93.72,232.73,93.72,396.83,222.44,694,381.24,694,668.77,560.94,668.77,396.83Zm-51.2,1.7c0,134.09-105.2,242.79-235,242.79s-235-108.69-235-242.79,105.21-242.79,235-242.79S617.57,264.45,617.57,398.53Zm-21.08,0c0-122-95.77-221-213.88-221s-213.9,99-213.9,221,95.75,221,213.9,221S596.49,520.58,596.49,398.53Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-P",children:(0,t.jsx)("path",{d:"M209.16,817.61a11.07,11.07,0,1,1-22.14,0V160.88H442c70.44,0,127.9,54,127.9,121.11S512.45,403.08,442,403.08H282.65a11.29,11.29,0,0,1,0-22.58H442c58.59,0,105.75-44.32,105.75-98.51S500.6,183.46,442,183.46H209.16ZM125.33,104.84V817.61a11.08,11.08,0,1,1-22.15,0V82.26H441.34C558,82.26,652.89,171.46,652.89,282S558,481.71,441.34,481.71H282.63a11.29,11.29,0,0,1,0-22.58H441.34c104.79,0,189.4-79.52,189.4-177.14s-84.61-177.15-189.4-177.15ZM44.87,25.48V817.61a11.07,11.07,0,1,1-22.14,0V2.9h423c163.26,0,296,124.74,296,279.09S609,561.05,445.76,561.05H282.64a11.29,11.29,0,0,1,0-22.58H445.76c151.42,0,273.81-115,273.81-256.48S597.18,25.48,445.76,25.48Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-Q",children:(0,t.jsx)("path",{d:"M504.74,728.89c5.92-2.2,12.4,1.11,14.48,7.39s-1.05,13.14-7,15.33A375.69,375.69,0,0,1,381.32,775C171,775,.32,602.29.32,389S171,2.9,381.32,2.9s381,172.71,381,386.05A389.11,389.11,0,0,1,732,540.12a11.13,11.13,0,0,1-15,6.1,12.33,12.33,0,0,1-5.75-15.9A363.81,363.81,0,0,0,739.6,389c0-199.79-160.28-362-358.28-362S23,189.16,23,389s160.29,362,358.28,362A354.34,354.34,0,0,0,504.74,728.89Zm-44.83-62.23c6-1.74,12.29,2.05,13.94,8.46s-1.93,13-8,14.77a305,305,0,0,1-84.53,11.89C210.91,701.78,72.55,561.85,72.55,389S210.9,76.13,381.33,76.13,690.1,216.05,690.1,389a318.25,318.25,0,0,1-10,79.41c-1.65,6.41-7.9,10.19-14,8.44s-9.62-8.37-8-14.78A292.34,292.34,0,0,0,667.38,389c0-159.35-128-288.75-286-288.75S95.27,229.59,95.27,389s128,288.76,286.06,288.76A283.7,283.7,0,0,0,459.91,666.66Zm-45.52-64c6.22-.94,12,3.64,12.85,10.22s-3.43,12.67-9.64,13.61a233.73,233.73,0,0,1-34.93,2.62c-129.83,0-235.3-106.65-235.3-238.49s105.47-238.47,235.3-238.47c125.71,0,229.23,100.21,235.07,227.32.15,3.69.22,7.42.22,11.15,0,6.65-5.08,12-11.36,12s-11.36-5.39-11.36-12c0-3.39-.06-6.77-.2-10.05-5.23-114-98.57-204.35-212.37-204.35-117.51,0-212.58,96.13-212.58,214.4S265.16,605,382.67,605A212,212,0,0,0,414.39,602.64Zm339.69,79.67a12.52,12.52,0,0,1-1.91,16.9,10.93,10.93,0,0,1-15.95-2L526.46,414.36a12.52,12.52,0,0,1,1.92-16.9,10.93,10.93,0,0,1,16,2Zm-56.64,45.41a12.52,12.52,0,0,1-1.92,16.9,10.93,10.93,0,0,1-15.95-2L468.66,458.2a12.53,12.53,0,0,1,1.92-16.9,10.94,10.94,0,0,1,15.95,2ZM637.59,771.3a12.52,12.52,0,0,1-1.92,16.9,10.93,10.93,0,0,1-15.95-2L409.68,503a12.52,12.52,0,0,1,1.91-16.9,10.94,10.94,0,0,1,16,2Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-R",children:(0,t.jsx)("path",{d:"M740.25,811.39a11.78,11.78,0,0,1-3.8,15.85,10.94,10.94,0,0,1-15.31-3.93L600.94,616.94a11.78,11.78,0,0,1,3.79-15.85A10.94,10.94,0,0,1,620,605Zm-95.34,0a11.78,11.78,0,0,1-3.8,15.85,10.94,10.94,0,0,1-15.31-3.93L505.59,616.94a11.78,11.78,0,0,1,3.8-15.85A10.94,10.94,0,0,1,524.7,605Zm-97.3,0a11.78,11.78,0,0,1-3.8,15.85,10.94,10.94,0,0,1-15.31-3.93L408.3,616.94a11.79,11.79,0,0,1,3.79-15.85A11,11,0,0,1,427.41,605Zm-340.43,4.79a11.17,11.17,0,1,1-22.32,0V177.35A11.36,11.36,0,0,1,196,165.8h258.5c57.46,0,104.26,46,104.26,103S512,371.69,454.52,371.69H274.36a11.55,11.55,0,0,1,0-23.09H454.52c45.39,0,82-35.88,82-79.85s-36.56-79.86-82-79.86H207.18Zm-84.31,0a11.16,11.16,0,1,1-22.31,0V94.7a11.35,11.35,0,0,1,11.15-11.55H453.78c104,0,188.48,82.95,188.48,185.6s-84.5,185.61-188.48,185.61H274.36a11.55,11.55,0,0,1,0-23.09H453.78C545.7,431.27,620,358.38,620,268.75S545.7,106.24,453.78,106.24H122.87ZM45.18,26v790.2A11.36,11.36,0,0,1,34,827.73a11.36,11.36,0,0,1-11.16-11.55V14.44A11.36,11.36,0,0,1,34,2.9H457.17c149.54,0,271,119,271,266.12s-121.45,266.12-271,266.12H274.37a11.55,11.55,0,0,1,0-23.09h182.8c137.49,0,248.69-108.94,248.69-243S594.65,26,457.17,26Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-S",children:(0,t.jsx)("path",{d:"M119.29,744.31a11.45,11.45,0,0,1,0-22.88h333.3c95,0,171.35-66.34,171.35-147.12S547.59,427.18,452.59,427.18H383.2l-71,.32c-106.51,0-193.53-75.64-193.53-170s87-170,193.53-170H645.53a11.45,11.45,0,0,1,0,22.88H312.22c-95,0-171.34,66.36-171.34,147.15s76.33,147.13,171.29,147.13l71-.32h69.44c106.49,0,193.53,75.64,193.53,170s-87,170-193.53,170Zm0,84.59a11.45,11.45,0,0,1,0-22.88H453.46C600.87,806,719.7,701.83,719.7,574.3S600.86,342.6,453.46,342.6H383.2l-67.68.32c-55.23,0-100.88-37.62-100.88-85.43S260.28,172,315.52,172h330a11.45,11.45,0,0,1,0,22.88h-330c-43.94,0-78.69,28.65-78.69,62.57S271.59,320,315.47,320l67.68-.33h70.31c158.93,0,288.43,113.55,288.43,254.59S612.4,828.9,453.46,828.9Zm0-169.15a11.45,11.45,0,0,1,0-22.88h330c43.94,0,78.71-28.65,78.71-62.57s-34.77-62.55-78.71-62.55H383.2l-71.85.33c-159,0-288.45-113.54-288.45-254.6S152.4,2.9,311.35,2.9H645.53a11.26,11.26,0,0,1,11.09,11.44,11.26,11.26,0,0,1-11.09,11.44H311.35C163.93,25.78,45.09,130,45.09,257.48S163.93,489.2,311.31,489.2l71.84-.33h66.12c55.24,0,100.9,37.62,100.9,85.43s-45.66,85.45-100.9,85.45Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-T",children:(0,t.jsx)("path",{d:"M34.54,27.32c-6.41,0-11.6-5.47-11.6-12.21S28.13,2.9,34.54,2.9H730.33c6.41,0,11.6,5.46,11.6,12.21s-5.19,12.21-11.6,12.21Zm438.88,749a11.1,11.1,0,1,1-22.19,0V94.48a11.1,11.1,0,1,1,22.19,0Zm-79.89,0a11.1,11.1,0,1,1-22.19,0V94.48a11.1,11.1,0,1,1,22.19,0Zm-79.89,0a11.1,11.1,0,1,1-22.19,0V94.48a11.1,11.1,0,1,1,22.19,0Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-U",children:(0,t.jsx)("path",{d:"M541,8.84a10.94,10.94,0,0,1,14.52-6,11.61,11.61,0,0,1,5.81,15l-168.88,408a10.92,10.92,0,0,1-20.34,0L203.7,17.84a11.59,11.59,0,0,1,5.83-15,10.93,10.93,0,0,1,14.51,6L382.26,392.21ZM629.65,10a10.92,10.92,0,0,1,14.57-5.88,11.6,11.6,0,0,1,5.68,15.08L392.62,625.47a10.91,10.91,0,0,1-20.24,0L115.1,19.16a11.6,11.6,0,0,1,5.68-15.08A10.92,10.92,0,0,1,135.35,10L382.5,592.41ZM372.26,821.14,24.14,19.25C18.09,5.34,38.26-4,44.31,9.87L382.5,788.2,720.86,9.53a10.92,10.92,0,0,1,14.62-5.74A11.61,11.61,0,0,1,741,18.92L393.5,818.69a11.37,11.37,0,0,1-6.31,8.2,10.68,10.68,0,0,1-4.78,1A10.88,10.88,0,0,1,372.26,821.14Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-V",children:(0,t.jsx)("path",{d:"M550,14.11a11.06,11.06,0,1,1,22.12,0V436.74c0,108.68-84.71,196.9-189.36,196.9s-189.37-88.22-189.37-196.9V14.11a11.06,11.06,0,1,1,22.12,0V436.74c0,96.43,74.94,174.48,167.25,174.48S550,533.17,550,436.74Zm75.08,0a11.06,11.06,0,1,1,22.12,0V436.59c0,151.85-118.33,275.07-264.45,275.07S118.31,588.44,118.31,436.59V14.11a11.06,11.06,0,1,1,22.11,0V436.59c0,139.6,108.56,252.65,242.32,252.65s242.33-113,242.33-252.65Zm74.78,0a11.06,11.06,0,1,1,22.12,0V434.34C722,629.37,570,787.6,382.45,787.6S42.92,629.37,42.92,434.34V14.11a11.06,11.06,0,1,1,22.12,0V434.34c0,182.78,142.17,330.84,317.41,330.84s317.4-148.06,317.4-330.84Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-W",children:(0,t.jsx)("path",{d:"M744.26,10.29c1.3-6.09,6.15-9.66,10.84-8s7.43,8,6.13,14.08L590,819.12c-1.3,6.09-6.16,9.66-10.84,8s-7.43-8-6.13-14.09ZM530.93,697.71,381.1,264.8,187.58,821.17c-3.39,9.75-14.3,8.65-16.5-1.66L-.13,16.8C-1.43,10.7,1.32,4.4,6,2.71s9.53,1.88,10.83,8L181.55,783l32.08-92.22L70,17.22c-1.3-6.09,1.45-12.4,6.13-14.09S85.65,5,87,11.1L225,658.17l31.2-89.7L138.41,16.41c-1.3-6.09,1.44-12.4,6.13-14.09s9.53,1.88,10.83,8L267.48,535.91,373.1,232.25c3.13-9,12.94-9,16,0L493.91,534.94,605.56,10.68c1.3-6.09,6.15-9.66,10.83-8s7.43,8,6.14,14.09L505.22,567.63l31.9,92.17L675.48,11.09c1.3-6.09,6.15-9.66,10.84-8s7.43,8,6.13,14.09l-144,675.26,41.16,118.9c2,5.77,0,12.54-4.42,15.14s-9.65,0-11.64-5.74l-42.33-122.3C531.1,698.22,531,698,530.93,697.71Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-X",children:(0,t.jsx)("path",{d:"M739.83,8.21a11,11,0,0,1,15.66-2.42,11.77,11.77,0,0,1,2.34,16.14L533.42,334.87a11,11,0,0,1-15.65,2.41,11.77,11.77,0,0,1-2.35-16.13ZM324.08,588a11,11,0,0,1,15.65-2.42,11.77,11.77,0,0,1,2.35,16.13L212.81,781.92a11,11,0,0,1-15.65,2.42,11.77,11.77,0,0,1-2.34-16.14ZM646.22,6.58a11,11,0,0,1,15.65-2.42,11.77,11.77,0,0,1,2.35,16.13l-179,249.57a11,11,0,0,1-15.65,2.42,11.78,11.78,0,0,1-2.35-16.14ZM276.83,521.69a11,11,0,0,1,15.65-2.42,11.78,11.78,0,0,1,2.35,16.14L119.72,779.59A11,11,0,0,1,104.06,782a11.76,11.76,0,0,1-2.34-16.13ZM548.31,8.21A11,11,0,0,1,564,5.79a11.76,11.76,0,0,1,2.35,16.14L436,203.61A11,11,0,0,1,420.38,206,11.77,11.77,0,0,1,418,189.89Zm-320,446.21A11,11,0,0,1,244,452a11.77,11.77,0,0,1,2.34,16.14L23,779.57A11,11,0,0,1,7.32,782,11.78,11.78,0,0,1,5,765.85ZM756.15,765.86A11.77,11.77,0,0,1,753.81,782a11,11,0,0,1-15.65-2.42L194.82,21.93A11.76,11.76,0,0,1,197.16,5.8a11,11,0,0,1,15.66,2.42Zm-94.78,0A11.78,11.78,0,0,1,659,782a11,11,0,0,1-15.65-2.42L100,21.93A11.77,11.77,0,0,1,102.38,5.8,11,11,0,0,1,118,8.22Zm-95.06,2.34A11.77,11.77,0,0,1,564,784.34a11,11,0,0,1-15.66-2.42l-545-760A11.77,11.77,0,0,1,5.64,5.79,11,11,0,0,1,21.29,8.21Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-Y",children:(0,t.jsx)("path",{d:"M720.21,8A10.73,10.73,0,0,1,735.8,5.86a12.15,12.15,0,0,1,2,16.44L525.51,312.8a10.72,10.72,0,0,1-15.58,2.12,12.15,12.15,0,0,1-2-16.44ZM631.65,6.46a10.73,10.73,0,0,1,15.59-2.12,12.17,12.17,0,0,1,2,16.45L479.94,252.46a10.73,10.73,0,0,1-15.58,2.12,12.17,12.17,0,0,1-2-16.45ZM539,8a10.73,10.73,0,0,1,15.59-2.12,12.15,12.15,0,0,1,2,16.44L433.38,191a10.73,10.73,0,0,1-15.58,2.13,12.17,12.17,0,0,1-2-16.45ZM204.63,22.3a12.15,12.15,0,0,1,2-16.44A10.72,10.72,0,0,1,222.22,8l257,351.65,2.31,7.16V774.87c0,6.48-5,11.73-11.11,11.73s-11.11-5.25-11.11-11.73V370.79ZM115,22.3a12.17,12.17,0,0,1,2-16.44A10.73,10.73,0,0,1,132.56,8L407.85,384.67l2.31,7.16v383c0,6.48-5,11.73-11.11,11.73s-11.11-5.25-11.11-11.73v-379Zm-91.51,0a12.15,12.15,0,0,1,2-16.44A10.72,10.72,0,0,1,41,8L332.55,406.85l2.31,7.17V774.87c0,6.48-5,11.73-11.11,11.73s-11.11-5.25-11.11-11.73V418Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-Z",children:(0,t.jsx)("path",{d:"M116.47,171.37c-6,0-10.78-5.12-10.78-11.44s4.82-11.45,10.78-11.45h301L136.6,720.71H644.51c6,0,10.78,5.13,10.78,11.45s-4.83,11.44-10.78,11.44H101.06L382,171.37Zm0-148.29c-6,0-10.78-5.12-10.78-11.44S110.51.2,116.47.2h543.8L379.05,572.43H644.51c6,0,10.78,5.12,10.78,11.44s-4.83,11.44-10.78,11.44h-301L624.71,23.08Zm0,74.14c-6,0-10.78-5.12-10.78-11.44s4.82-11.44,10.78-11.44h422.2l-280,572.23H644.51c6,0,10.78,5.12,10.78,11.44s-4.83,11.44-10.78,11.44H223.19l280-572.23Z"})}),(0,t.jsx)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-OT",children:(0,t.jsx)("path",{d:"M665.74,897.11v-162c0-68-55-123.09-122.74-123.09H220c-67.79,0-122.74,55.11-122.74,123.09v162H58.5v-162c0-89.45,72.3-161.95,161.5-161.95H543c89.2,0,161.5,72.5,161.5,161.95v162Zm0,0v-162c0-68-55-123.09-122.74-123.09H220c-67.79,0-122.74,55.11-122.74,123.09v162H58.5v-162c0-89.45,72.3-161.95,161.5-161.95H543c89.2,0,161.5,72.5,161.5,161.95v162ZM380.33,521.94c-106.9,0-193.56-86.59-193.56-193.41s86.66-193.42,193.56-193.42S573.9,221.71,573.9,328.53,487.24,521.94,380.33,521.94Zm1.17-37.29c85.65,0,155.09-69.37,155.09-155s-69.44-155-155.09-155-155.09,69.38-155.09,155S295.85,484.65,381.5,484.65Z"})}),(0,t.jsxs)("symbol",{viewBox:"0 0 762 1126",id:"col-picking-default-HARDWARE-TERMINAL",children:[(0,t.jsx)("path",{d:"M639,281h-180c0,3.3,0,6.7,0,10c0,13.3-3.3,26.7-10,40h190c10,0,16.7,6.7,16.7,13.3v280.1 c0,6.7-6.7,13.3-16.7,13.3H125.5c-10,0-16.7-6.7-16.7-13.3V344.3c0-6.7,6.7-13.3,16.7-13.3h183.4c-6.7-10-10-23.3-10-40 c0-3.3,0-6.7,0-10H125.5c-36.7,0-66.7,26.7-66.7,63.3v280.1c0,36.7,30,63.3,66.7,63.3h53.3l-40,196.7c-3.3,13.3,6.7,26.7,20,30 c13.3,3.3,26.7-6.7,30-20l40-206.7h313.4l40,206.7c6.7,33.3,56.7,23.3,50-10l-40-196.7h43.3c36.7,0,66.7-26.7,66.7-63.3V344.3 C709,307.6,675.6,281,639,281z"}),(0,t.jsx)("circle",{cx:"378.9",cy:"291",r:"46.7"})]})]})}}))},62337:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(91291);var a=r(31240);var s=r(72333);var u=r(49340);var c=r(79039);var l=RangeError;var f=String;var d=isFinite;var h=Math.abs;var p=Math.floor;var v=Math.pow;var m=Math.round;var y=i(1..toExponential);var g=i(s);var b=i("".slice);var _=y(-69e-12,4)==="-6.9000e-11"&&y(1.255,2)==="1.25e+0"&&y(12345,3)==="1.235e+4"&&y(25,0)==="3e+1";var S=function(){return c((function(){y(1,Infinity)}))&&c((function(){y(1,-Infinity)}))};var E=function(){return!c((function(){y(Infinity,Infinity);y(NaN,Infinity)}))};var w=!_||!S()||!E();n({target:"Number",proto:true,forced:w},{toExponential:function e(t){var r=a(this);if(t===undefined)return y(r);var n=o(t);if(!d(r))return String(r);if(n<0||n>20)throw new l("Incorrect fraction digits");if(_)return y(r,n);var i="";var s,c,S,E;if(r<0){i="-";r=-r}if(r===0){c=0;s=g("0",n+1)}else{var w=u(r);c=p(w);var T=v(10,c-n);var I=m(r/T);if(2*r>=(2*I+1)*T){I+=1}if(I>=v(10,n+1)){I/=10;c+=1}s=f(I)}if(n!==0){s=b(s,0,1)+"."+b(s,1)}if(c===0){S="+";E="0"}else{S=c>0?"+":"-";E=f(h(c))}s+="e"+S+E;return i+s}})},62523:e=>{"use strict";e.exports={startRecordAudioToast:"开始录制声音",completeRecordAudioToast:"声音录制完成",ICS_CREATE_AUDIO_RECORD_TASK_FAILED:"启动录音任务失败",ICS_AUDIO_REPORT_TASK_EXIST:"录音任务已存在",ICS_AUDIO_RECORD_NOT_ENABLE:"录音功能未启用",ICS_SIS_CONCURRENCY_LIMIT:"语音识别服务SIS超过最大资源并发限制",conversationNoResource:"当前对话并发已达上限,暂无法使用。可等待其他对话结束释放资源,或购买更多并发资源后再试。抱歉给您带来不便。",ICS_SIS_SERVICE_NOT_SUBSCRIBE:"语音识别服务SIS未开通,请前往控制台开通。",WBC_ROLE_BUSINESS_NOT_EXIST:"当前语言暂不支持,您可以联系管理员在交互助手中配置该语言",startChatTip:"嗨,说“%s”唤醒我和我对话吧",closingAdvertiseTip:"请稍等,%s正在赶来",ICS_ASR_WAIT_VOICE_TIME_OUT:"等待音频流超时,请检查拾音是否正常。",ICS_MOBVOI_ASR_UNAUTHORIZED:"奇妙问ASR鉴权失败,请检查账号和AppSecret是否正确配置",minute:"分钟",minutes:"分钟",WORKER_JOB_STOP_BY_MUTE_OVERTIME:"对话已自动结束,若想再次畅聊请重新激活对话",WORKER_EXIT_MUTE_MENTION:"温馨提示:%s后将自动结束对话,如需继续,快来提问吧~",WBC_ROLE_NOT_EXIST:"交互助手不存在,请重新配置或联系技术人员进行问题定位及处理",WBM_PLUGIN_CONFIG_NOT_EXIST:"此技能暂不可用,请检查插件配置是否正确或联系技术人员进行问题定位及处理",WBM_LLM_CONFIG_NOT_EXIST:"大模型暂不可用,请检查大模型地址是否正确配置或联系技术人员进行问题定位及处理",CONFIG_NO_PERMISSION:"您当前暂无权限访问",systemOpenAndRejoin:"系统开了小差,服务恢复中",ICS_ROBOT_ROOM_ID_EMPTY:"应用未关联智能交互对话房间ID",ICS_JOB_ID_EXIST:"任务ID重复,请稍后重试或联系技术人员进行问题定位及处理",TTS_VOICE_ASSET_UNACTIVATED:"当前音色已下架,语音播报失败,请联系管理员替换音色",wbwAgentRoleNotExisted:"交互助手不存在",wbwLLMNotExisted:"大模型地址未配置",wbwLLMAccessFailed:"大模型调用失败",wbwLLMInvalidModel:"无法从配置的大模型获取正确的模型信息,每个配置的大模型仅允许返回一条模型数据",youCanAlsoAskMe:"你还可以这样问我",clickToExitPreview:"点击任意位置退出预览",freeDiskSpaceNotEnough:"磁盘空间不足",model:"型号",fundamentalFrequency:"基频",turboFrequency:"睿频",ICS_EXTEND_PARAM_INVALID:"扩展参数格式非法,请携带格式正确的扩展参数",sayToStopSpeakingHub:"说“%s”可中断回答",answeringV3:"回答中,点击结束对话",sayStopAnswerToStopSpeaking2:"思考中,说“%s”可中断回答",clickToStopAnswer:"回答中,点击中断回答",clickToStopThink:"思考中,点击中断思考",sayStopAnswerToStopSpeaking:"回答中,说“%s”可中断回答",CLICK_OR_SPEAK_TO_INTERRUPT:"点击或说话打断",I_AM_LISTENING_PLEASE_SPEAK:"我正在听,您请讲",PLEASE_WAIT:"请稍等",IMAGE_LOAD_FAILED:"图片加载失败",IMAGE_LOADING:"图片加载中",PATH_DISALLOWED_CHINESE:"app路径不能包含中文",SHOW_FACE:"显示人脸",ICS_THIRD_PARTY_DRIVE_NOT_ALLOWED_THIS_WEB_MESSAGE:"第三方驱动不支持此操作请通过驱动接口控制",APP_PATH_DISALLOWED_CHINESE:"安装包路径不能包含中文,部分功能不可用",TTS_ACCESS_CONFIG_ERROR:"请检查购买的第三方音色的访问配置(ak、sk)是否正确",ICS_SIS_FROZEN_ERROR:"语音识别服务欠费不可用,请联系管理员检查",TTS_INVALID_TEXT:"抱歉,当前答案文本不支持语音播报",TTS_NO_ACCESS_CONFIG:"请检查购买的第三方音色的访问配置(ak、sk)是否配置",TTS_UNSUPPORTED_LANGUAGE_TEXT:"抱歉,当前音色暂不支持该语言,请检查音色配置",ICS_TEXT_QUESTION_LENGTH_LIMITED:"文本输入已超过上限,请检查后重新输入。",DHICIS_TTS_CONVERT_FAIL:"数字人开了个小差,请继续提问",ICS_PACIFY_WORDS_EXIST:"安抚话术已存在,请修改后重试",ICS_PACIFY_WORDS_COUNT_EXCEED_MAX_VALUE:"安抚话术数量超出上限,请联系管理员检查",ICS_PACIFY_WORDS_NOT_EXIST:"安抚话术不存在,请联系管理员检查",ICS_PACIFY_WORDS_NO_PERMISSION:"无安抚话术配置权限,请联系管理员检查",ICS_PACIFY_WORDS_INTENT_NOT_SUPPORT:"不支持该意图,请联系管理员检查",ICS_PACIFY_WORDS_LENGTH_EXCEED_MAX_VALUE:"安抚话术长度超出上限,请联系管理员检查",ICS_PACIFY_WORDS_TYPE_INVALID:"安抚话术类型非法,请联系管理员检查",ICS_INTENT_CALLBACK_AUTHORIZED_FAILED:"鉴权失败,请检查鉴权信息是否正确",ICS_MEDIA_SERVICE_ADDR_IS_EMPTY:"媒体服务地址为空,请联系技术人员进行问题定位及处理",ICS_MEDIA_NEGOTIATE_FAILED:"媒体协商失败,请联系技术人员进行问题定位及处理",MPS_ROOM_NAME_DUPLICATE:"交互房间名称重复",MPS_JOB_HEARTBEAT_FAILED:"智能交互任务心跳失败",MPS_ASSET_ID_INVALID:"资产id无效",MPS_OVER_RESOURCE_NUM:"超过租户的总资源数",MPS_JOB_NUM_OVER_CONCURRENCY:"超过对话配置并发",MPS_VOICE_ID_UNAVAILABLE:"音色id不可用,请检查音色id",MPS_TASK_EXPIRED:"智能交互任务过期",MPS_INSUFFICIENT_RESOURCE_QUOTA:"智能交互配额不足",MPS_JOB_NOT_EXISTED:"智能交互任务不存在或者已经过期",MPS_ASSET_ID_UNAVAILABLE:"资产不可用",MPS_CHANGE_FINISHED_JOB_STATE_FAILED:"任务状态已经完成,不支持修改",MPS_ROOM_INFO_NOT_FOUND:"房间信息未找到",MPS_QURREY_ASSET_FAILED:"查询dac 失败",MPS_NAME_INCLUDE_INVALID_SYMBOL:"名称包含特殊字符",DHICIS_ERROR:"请联系技术支持",DHICIS_INFER_SERVICE_ERROR:"请联系技术支持",DHICIS_TASK_READY_ERROR:"请联系技术支持",DHICIS_CREATE_INFER_MODEL_ERROR:"请联系技术支持",DHICIS_WORKER_JOIN_ROOM_FAIL:"请联系技术支持",DHICIS_MANAGER_SERVICE_ERROR:"请重试,如果失败请联系技术支持",DHICIS_JOB_STOP_BY_COMMAND:"任务已被关闭结束,请重新开启新的任务",DHICIS_FSM_STATE_TIME_OUT:"请重试,如果失败请联系技术支持",DHICIS_ICS_ERROR:"请重试,如果失败请联系技术支持",DHICIS_RTSA_ROOM_EMPTY:"请重试,如果失败请联系技术支持",DHICIS_RTSA_REPORT_LEAVE_ROOM:"请重试,如果失败请联系技术支持",DHICIS_MODEL_FILE_DOWN_FAIL:"请检查人物模型资产文件是否存在,不存在请更换人物模型,如果存在请联系技术支持",DHICIS_BACKGROUND_FILE_DOWN_FAIL:"请检背景图片资产文件是否存在,不存在请更换背景,如果存在请联系技术支持",DHICIS_WORKER_JOIN_ROOM_TIMEOUT:"请重试,如果失败请联系技术支持",DHICIS_JOIN_ROOM_TASK_FAIL:"请重试,如果失败请联系技术支持",DHICIS_TTS_PREHEAT_TASK_FAIL:"请重试,如果失败请联系技术支持",DHICIS_DATA_PACKAGE_IS_NOT_ZIP:"人物模型资产格式不对,请更换模型或者联系技术支持",DHICIS_TOO_MANY_ENTRIES_IN_PACKAGE:"请重试,如果失败请联系技术支持",DHICIS_PACKAGE_TOO_LARGE:"请重试,如果失败请联系技术支持",DHICIS_FILE_IN_PACKAGE_TOO_LARGE:"请重试,如果失败请联系技术支持",DHICIS_UNEXPECTED_DIRECTORY_IN_PACKAGE:"请重试,如果失败请联系技术支持",DHICIS_PACKAGE_ENTRY_ILLEGAL_NAME:"请重试,如果失败请联系技术支持",DHICIS_FILE_NAME_INVALID:"请重试,如果失败请联系技术支持",DHICIS_JOB_INFO_PARA_INVALID:"请联系技术支持",DHICIS_FSM_STATE_ERROR:"请重试,如果失败请联系技术支持",ICS_NOT_IN_TEXT_MODE:"当前非文本模式,请切换至文本对话模式后再尝试",ICS_TEXT_QUESTION_IS_EMPTY:"您还没有输入内容哦",ICS_TEXT_QUESTION_NOT_IN_WAIT_QUESTION_STATUS:"数字人正在回答中或休眠中,请先打断回答或唤醒数字人再提问",ICS_INVALID_INTERACTION_MODE:"该模式无效无法切换至此模式",ICS_UNMATCHED_APP_TYPE_AIUI:"检测到您当前配置的是星火大模型,与所选应用类型不匹配,请检查应用类型与应用信息是否匹配",ICS_UNMATCHED_APP_TYPE_SPARK:"检测到您当前配置的是AIUI的应用,与所选应用类型不匹配,请检查应用类型与应用信息是否匹配",ICS_THIRD_PARTY_DRIVER_NOT_ALLOWED_WEB_START_CHAT:"当前选择的应用类型暂不支持,请检查所选的应用类型或驱动方式是否正确",DIALOG_NOT_EXIST:"对话不存在,请检查操作是否正确或联系技术人员进行问题定位及处理",RPC_ACTION_NOT_EXIST:"发生未知错误,请检查操作是否正确或联系技术人员进行问题定位及处理",ICS_EXCEPTION:"发生未知错误,请检查操作是否正确或联系技术人员进行问题定位及处理",REQUEST_TOO_FREQUENTLY:"请求过于频繁,请稍后重试",TENANT_CLEANUP_JOB_STOPPED:"租户注销后数据已清理,相关任务只能停止啦",NO_PERMISSION_TO_ACCESS:"没有权限访问,请检查操作是否正确或联系技术人员进行问题定位及处理",ROBOT_NOT_EXIST:"应用不存在,请检查操作是否正确或联系技术人员进行问题定位及处理",ROBOT_NO_PERMISSION:"没有权限访问应用配置,请检查操作是否正确或联系技术人员进行问题定位及处理",START_SMART_CHAT_FAILED:"启动智能交互任务失败,请联系技术人员进行问题定位及处理",STOP_SMART_CHAT_FAILED:"结束智能交互任务失败,请联系技术人员进行问题定位及处理",SHOW_SMART_CHAT_FAILED:"查询智能交互任务失败,请联系技术人员进行问题定位及处理",GENERATE_SLIDE_VERIFICATON_FAILED:"发生未知错误,请检查操作是否正确或联系技术人员进行问题定位及处理",SLIDE_VERIFICATON_NOT_EXIST:"滑块验证码信息已过期,请重试",DIALOG_NO_PERMISSION:"没有权限访问对话信息,请检查操作是否正确或联系技术人员进行问题定位及处理",HOT_QUESTION_NOT_EXIST:"热点问题不存在,无需处理",MESSAGE_PARSE_ERROR:"消息解析失败,请检查操作是否正确或联系技术人员进行问题定位及处理",UNKNOWN_ACTION:"收到无效指令,请检查操作是否正确或联系技术人员进行问题定位及处理",CONNECT_APP_TIMEOUT:"请求第三方应用超时,请检查应用配置或联系技术人员进行问题定位及处理",AUTHTOKEN_INVALID:"鉴权凭证无效,请重试",QUERYPARAM_INVALID:"对话建链失败,携带的参数无效,请检查操作是否正确或联系技术人员进行问题定位及处理",CLIENT_ERROR_MESSAGE:"第三方应用返回错误信息,请检查应用配置或联系技术人员进行问题定位及处理",WEBCLIENT_START_CHAT_WORKER_DISCONNECT:"发生未知错误,请重试或联系技术人员进行问题定位及处理",CHANNEL_RECORED_NOT_FOUND:"发生未知错误,请重试或联系技术人员进行问题定位及处理",MOBVOI_REQUEST_FLOW_LIMITED:"奇妙问提问超过并发数限制,请稍后重试或联系技术人员增加并发数",UPLOAD_LOG_COUNT_EXCEED_MAX_COUNT:"上传日志文件数量超过最大值,请稍后重试",WEBSOCKET_CONNECTION_JOB_COUNT_EXCEED_MAX_VALUE:"websocket连接数超过最大值,请联系技术人员进行问题定位及处理",WEBSOCKET_CONNECTION_POD_COUNT_EXCEED_MAX_VALUE:"websocket连接数超过最大值,请联系技术人员进行问题定位及处理",RTC_ERR_CODE_RTC_SDK_ERROR:"SDK出错啦,请联系技术人员进行问题定位及处理",RTC_ERR_CODE_WAIT_RSP_TIMEOUT:"消息响应超时,请联系技术人员进行问题定位及处理",RTC_ERR_CODE_INVALID_PARAMETER:"参数传递错误,请联系技术人员进行问题定位及处理",RTC_ERR_CODE_INVALID_OPERATION:"用户状态不正确,请检查操作是否正确或联系技术人员进行问题定位及处理",RTC_ERR_CODE_NO_AVAILABLE_DEVICES:"未找到可用设备,请排查设备是否就绪",RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES:"未找到可用摄像头设备,请排查视频采集设备是否就绪",RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES:"未找到音频输入设备,请排查音频采集设备是否就绪",RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES:"未找到音频输出设备",RTC_ERR_CODE_STATUS_ERROR:"房间状态不正确,检查是否入会成功",RTC_ERR_CODE_WAIT_CONFIG_FAIL:"获取下发配置失败,请联系技术支持",RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL:"发布流响应失败,请联系技术支持",RTC_ERR_CODE_REGION_NOT_COVERED:"没有找到服务端地址,请联系技术支持",RTC_ERR_CODE_WEBSOCKET_INTERRUPTED:"websocket链接被强制关闭,一般为离会或者重连",RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED:"您未授权使用麦克风导致无法采集,请在浏览器设置中允许授权使用麦克风",RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED:"采集失败,音视频采集设备不支持设置的采集约束",RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND:"未找到可用设备,请排查设备是否就绪",RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE:"暂时无法访问麦克风,请确保当前没有其他应用请求访问麦克风,并重试",RTC_ERR_CODE_ROLE_NO_PERMISSION:"用户角色没有权限,请检查用户角色",RTC_ERR_CODE_ANSWER_SDP_INVALID:"SDP协商错误,请联系技术支持",RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM:"跨房数量超过最大值",RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM:"跨房内主播人数超过最大值",RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED:"房间音视频暂停",RTC_ERR_CODE_SIGNATURE_EXPIRED:"签名过期",RTC_ERR_CODE_SIGNATURE_INVALID:"签名错误,请检查操作是否正确或联系技术人员进行问题定位及处理",ERR_GENERAL:"发生未知错误,请检查操作是否正确或联系技术人员进行问题定位及处理",guessYouWantToAsk:"猜你想问",audioDeviceNotAllow:"您已禁止使用麦克风,无法进行设备检测,请在浏览器设置中允许授权使用麦克风",notSupportChangeSpeaker:"当前浏览器不支持切换设备,请在系统设置中选择扬声器",noSpeaker:"未检测到扬声器",noMicrophone:"未检测到麦克风",noSpeakerTip:"未检测到扬声器,请接入扬声器设备",noMicrophoneTip:"未检测到麦克风,请接入麦克风设备",audioDevice:"声音设备",deviceDetection:"设备检测",speaker:"扬声器",detectingSpeaker:"检测扬声器",microphone:"麦克风",detectingMicrophone:"检测麦克风",cancel:"取消",apply:"应用",stopDetection:"停止检测",networkAbnormalAndRecovering:"网络异常,正在恢复",warnNetwrokQualityLeaveTips:"当前网络信号较差,请检查网络",pleaseEnterStoreCode:"请输入storeCode",websocketLinksExceeds:"websocket建链总数超过阈值",singleTenantWebsocketLinksExceeds:"单租户websocket建链总数超过阈值",invalidParamter:"参数错误",toneResourceError:"数字人音色资源错误,请联系管理员检查",pleaseEnterDeviceId:"请输入DeviceId",conversationResourceFull:"对话资源已满,请联系管理员扩容",authorizationExpired:"当前授权已失效,请刷新页面重新激活",currentLanguageNotSupportRecognition:"当前选择的语言不支持语音识别,请切换语言后重新尝试。",SISAuthorizationFailed:"SIS授权存在问题,请联系管理员检查",equipmentTest:"设备检测",equipmentTesting:"设备检测中",computerMemory:"电脑内存",totalMemory:"总内存",noLessThan:"不少于%s",freeMemory:"剩余内存",diskSpace:"磁盘空间",allCheck:"共检测%s项",testCompleted:"检测完成",runNeedOk:"满足运行需求",volumeTest:"音量测试",deviceName:"设备名称",noEnoughFreeMemory:"剩余内存不足",dissatisfied:"不满足",mobvoiUnauthorized:"奇妙问鉴权失败,请检查账号和AppSecret是否正确配置",domainIsNotAllowed:"此域名不允许访问,请联系管理员",failedToLoad:"%s加载失败",upgradingAndRejoing:"升级中,正在重新加入",startYourDigitalHumanInteractionJourney:"开启你的数字人互动之旅",mobvoiQuantityNotEnough:"奇妙问提问次数或配额不足,需添加调用配额以继续使用",mobvoiRoleIdIsInvalid:"奇妙问角色 ID 配置错误,请检查是否正确配置",iflytekApplicationSceneConfigError:"请联系管理员检查是否在讯飞平台应用配置内创建对应语言的情景模式",refreshAssetFailed:"当前资产查询失败,请联系管理员检查",sure:"确定",mediaLinkEstablishmentFailed:"媒体建链失败,请切换网络重试",sayHelloToStart2:"您好,试试说“%s”开始与我对话",activating:"激活中",errorNoEnoughResource2:"系统资源不足,请稍后重试",errorApplicationConfigurationResourcesFull2:"对话资源不足,请排队等待或者联系管理员扩容",errorOrderResourcesFull2:"租户资源不足,请排队等待或者联系管理员扩容",equipmentNormal:"设备正常",microphoneDeviceNotDetected:"未检测到麦克风设备",collectLogs:"收集日志",checkEquipment:"检查设备",errorRPCCallFailed:"内部错误,请重试当前操作",errorAIUIUnauthorized:"AIUI配置鉴权失败,请联系管理员检查",errorSpeakUnauthorized:"星火配置鉴权失败,请联系管理员检查",errorOrderResourcesFull:"订购资源已满,对话任务创建失败,请联系管理员购买",errorApplicationConfigurationResourcesFull:"应用配置资源已满,对话任务创建失败,请稍后重试",errorCurrentSessionExpired:"当前会话已失效",AIUIUnauthorized2:"AIUI配置鉴权失败请检查",subscriptionResourceHasExpired:"订购资源已到期,对话任务被停用,请及时续费",requestTimedOutTrayAgain:"请求超时,请稍后重试",requestFailed:"请求失败",requestFailedAndError:"请求失败,%s",websocketIsNotOpen:"websocket未连接,请稍后重试",ttsInsufficientAccountBalance:"音色欠费不可用,请联系管理员更换其他音色后重试",errorInteractiveNumberIsInsufficient:"问答字数今日已达上限,请联系管理员",errorTokenNumberIsInsufficient:"问答次数今日已达上限,请联系管理员",sayGoodbyeToStopChat:"识别中,说“%s”结束当前对话",sayGoodbyeToStopChatV2:"识别中,说“%s”结束当前对话",recognizingAndClickToStopV2:"识别中,点击结束对话",loading:"正在加载中",operateTimeout:"操作超时",clickToCeconnect:"点击重新连接",webSocketOpenFailed:"WebSocket建链失败",operateFailed:"操作失败",errorActiveCodeAuthLocked:"验证码激活已锁定,请稍后重试, 剩余%s秒",sayHelloToStart:"试试说“%s”开始对话",quit:"退出",maximize:"最大化",enter:"立即进入",showInMainScreen:"显示到主屏",intelligentInteractiveController:"智能交互控制器",showInSecondaryScreen:"显示到副屏",incorrectFormat:"格式不正确",pleaseEnterAddress:"请输入活动地址",pageLoadFailed:"页面加载失败",reload:"重新加载",activate:"立即激活",activePageTitle:"智能交互激活",activePlaceholder:"请输入激活码",brandNewConversation:"全新对话",clickToStart:"点击开始对话",connecting:"连接中",copyErrorInfo:"复制错误信息",copyFail:"复制失败",copySuccess:"复制成功",defaultErrorMessage:"请检查参数或者网络是否正常",hint:"提示",jigsawStatusDefault:"向右拖动滑块填充拼图",jigsawStatusFail:"验证失败,请重试",jigsawStatusSuccess:"校验成功",micPermission:"麦克风权限未开启,请开启之后重试",noEnoughAudioPermission:"当前没有播放权限,请点击确认继续",pageTitle:"智能交互",pleaseVerifyViaSlider:"请通过滑块验证",recognizing:"识别中",recognizingAndClickToStop:"识别中,点击停止",refresh:"刷新",stopAnswering:"停止回答",stopping:"停止中",taskError:"活动异常,请刷新后重试",errorActiveCodeAuthExpired:"激活码已过期,请重新获取",errorActiveCodeAuthFailed:"激活失败,请重新输入激活码",errorBrowserNotSupport:"浏览器不支持,请升级或者更换其他浏览器",errorChatQuotaInsufficient:"使用人数达到上限,请等其他人释放后使用",errorConnectionInterrupted:"连接中断,请刷新重试",errorConversationEnded:"当前对话已经结束或被取消,请刷新重新加入",errorDialogConcurrentExceedMaxValue:"并发数超过最大值,请联系对话管理员",errorInternalGeneral:"内部错误,请联系开发人员",errorKickOut:"您已经在其他地方加入房间,如需恢复请刷新重试",errorNetworkError:"网络错误,请检查网络后重试",errorNoAudioDevicePermission:"麦克风权限未开启,请开启后重试",errorNoEnoughResource:"资源不足,请稍后重试",errorOnceCodeAuthLocked:"鉴权码鉴权已锁定,请稍后重试",errorPlayNotAllow:"当前没有播放权限,请点击确认继续",errorServerGeneral:"服务端错误,请联系开发人员",errorSlideVerificatonVerifyFailed:"验证失败,请重试",errorSlideVerificatonVerifyFailedAndExceedMaxTimes:"滑块验证已锁定,请稍后重试"}},62529:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},62672:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(44772),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t=d(t),c(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function c(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let g=e.default=function(e){function t(...e){var i;o(this,t);i=u(this,t,[...e]);v(i,"inputElem",void 0);v(i,"caretStart",void 0);v(i,"cacheValue",void 0);v(i,"isOnComposition",void 0);v(i,"isFocus",false);v(i,"setSelectionRange",((e,t)=>{if(i.inputElem){i.inputElem.setSelectionRange(e,t)}}));v(i,"focus",(()=>{const{type:e,className:t,name:r,dataTestId:o,placeholder:a,title:s,disabled:u,readOnly:c}=i.props;(0,n.getPLogger)().debug("focus",{type:e,className:t,name:r,dataTestId:o,placeholder:a,title:s,readOnly:c,disabled:u});if(i.inputElem){i.inputElem.focus()}}));v(i,"select",(()=>{if(i.inputElem){i.inputElem.select()}}));v(i,"blur",(()=>{const{type:e,className:t,name:r,dataTestId:o,placeholder:a,title:s,disabled:u,readOnly:c}=i.props;(0,n.getPLogger)().debug("blur",{type:e,className:t,name:r,dataTestId:o,placeholder:a,title:s,readOnly:c,disabled:u});if(i.inputElem){i.inputElem.blur()}}));v(i,"clear",(()=>{if(i.inputElem){i.inputElem.value=""}}));v(i,"_getRef",(e=>{if(e){i.inputElem=e}}));v(i,"_onClick",(e=>{const{type:t,className:o,name:a,dataTestId:s,placeholder:u,title:c,disabled:l,readOnly:f,onClick:d}=i.props;(0,n.getPLogger)().debug("_onClick",{type:t,className:o,name:a,dataTestId:s,placeholder:u,title:c,readOnly:f,disabled:l});(0,r.reactStopPropagation)(e);if(d){d(e)}}));v(i,"_handleComposition",(e=>{var t;switch(e.type){case"compositionupdate":i.isOnComposition=true;break;case"compositionstart":i.caretStart=i._getCaretPosition();i.cacheValue=(t=i.inputElem)===null||t===void 0?void 0:t.value;i.isOnComposition=true;break;case"compositionend":i.isOnComposition=false;i._onInput(e);delete i.caretStart;delete i.cacheValue;break;default:break}}));v(i,"_onInput",(e=>{if(!i.isOnComposition){var t;i._changeInputText((t=i.inputElem)===null||t===void 0?void 0:t.value,e)}}));v(i,"_onFocus",(e=>{const{type:t,className:r,name:o,dataTestId:a,placeholder:s,title:u,disabled:c,readOnly:l,onFocus:f}=i.props;(0,n.getPLogger)().debug("_onFocus",{type:t,className:r,name:o,dataTestId:a,placeholder:s,title:u,readOnly:l,disabled:c});if(i.inputElem){f&&f(e);i.isFocus=true}}));v(i,"_onBlur",(e=>{const{type:t,className:r,name:o,dataTestId:a,placeholder:s,title:u,disabled:c,readOnly:l,onBlur:f}=i.props;(0,n.getPLogger)().debug("_onBlur",{type:t,className:r,name:o,dataTestId:a,placeholder:s,title:u,readOnly:l,disabled:c});if(i.inputElem){f&&f(e);i.isFocus=false}}));v(i,"_onKeyDown",(e=>{const{filterFunc:t,onKeyDown:r}=i.props;r&&r(e);if(e.key.length>1){return}if(e.ctrlKey||e.shiftKey||e.metaKey){return}let n=e.key;if(t){n=t(e.key)}if(!n){e.preventDefault()}}));v(i,"_getCaretPosition",(()=>{let e;if(i.inputElem){e=i.inputElem.selectionStart}return e||0}));v(i,"_setCaretPosition",(e=>{if(i.inputElem){if(i.inputElem&&e>=0){i.inputElem.style.caretColor="rgba(0,0,0,0)";(0,r.sleep)(0).then((()=>{if(i.inputElem){i.inputElem.style.caretColor="";i.setSelectionRange(e,e)}}))}}}));v(i,"_changeInputText",((e,t)=>{e=e||"";let r=e;const{filterFunc:n}=i.props;if(n){r=n(r)}i._dealValueChange({value:e,filterValue:r});if(t){const{onChange:e,onInput:r}=i.props;e===null||e===void 0?void 0:e(t);r===null||r===void 0?void 0:r(t)}}));v(i,"_dealValueChange",(({value:e,filterValue:t})=>{var r;const{maxLength:n,setCaretPosition:o}=i.props;if(t!==((r=i.inputElem)===null||r===void 0?void 0:r.value)){let r=0;if(o){r=o({value:e,curPos:i._getCaretPosition(),compositionstartPos:i.caretStart,compositionValue:i.cacheValue})}else{if(i.caretStart!==undefined&&i.cacheValue){r=i.caretStart-(i.cacheValue.length-t.length)}else{var a,s;r=i._getCaretPosition()-(((a=i.inputElem)===null||a===void 0?void 0:(s=a.value)===null||s===void 0?void 0:s.length)||0-t.length)}}if(n!==undefined){t=t.slice(0,n);r=r>n?n:r}if(i.inputElem){i.inputElem.value=t}i._setCaretPosition(r)}}));return i}h(t,e);return s(t,[{key:"componentDidMount",value:function e(){if(this.inputElem){this._changeInputText(this.props.value||this.props.defaultValue||"");if(this.props.autoFocus){this.isFocus=true}}}},{key:"componentDidUpdate",value:function e(){if(this.inputElem&&(0,r.formatType)(this.props.value)===r.formatType.STRING){if(this.inputElem.value!==this.props.value){this._changeInputText(this.props.value)}}}},{key:"componentWillUnmount",value:function e(){if(this.inputElem){this.inputElem.value=""}}},{key:"value",get:function(){if(this.inputElem){return this.inputElem.value}return""},set:function(e){if(this.inputElem){this._changeInputText(e)}}},{key:"selectionStart",get:function(){if(this.inputElem){return this.inputElem.selectionStart}return 0}},{key:"selectionEnd",get:function(){if(this.inputElem){return this.inputElem.selectionEnd}return 0}},{key:"scrollWidth",get:function(){if(this.inputElem){return this.inputElem.scrollWidth}return 0}},{key:"scrollLeft",get:function(){if(this.inputElem){return this.inputElem.scrollLeft}return 0},set:function(e){if(this.inputElem){this.inputElem.scrollLeft=e}}},{key:"render",value:function e(){const{type:t,className:r,name:n,maxLength:o,disabled:a,dataTestId:s,placeholder:u,readOnly:c,onContextMenu:l,title:f,autoFocus:d,required:h,id:p,onKeyUp:v,tabIndex:m,onCopy:y,onCut:g,onPaste:b}=this.props;return(0,i.jsx)("input",{type:t,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:r,required:h,ref:this._getRef,autoFocus:d,name:n,title:f,onBlur:this._onBlur,onFocus:this._onFocus,placeholder:u,disabled:a,maxLength:o,"data-testid":s,onClick:this._onClick,onKeyDown:this._onKeyDown,onKeyUp:v,readOnly:c,tabIndex:m,onContextMenu:l,onCompositionStart:this._handleComposition,onCompositionUpdate:this._handleComposition,onCompositionEnd:this._handleComposition,onCopy:y,onCut:g,onPaste:b,onInput:this._onInput,id:p})}}])}(t.Component)}))},62953:(e,t,r)=>{"use strict";var n=r(44576);var i=r(67400);var o=r(79296);var a=r(23792);var s=r(66699);var u=r(10687);var c=r(78227);var l=c("iterator");var f=a.values;var d=function(e,t){if(e){if(e[l]!==f)try{s(e,l,f)}catch(t){e[l]=f}u(e,t,true);if(i[t])for(var r in a){if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}}};for(var h in i){d(n[h]&&n[h].prototype,h)}d(o,"DOMTokenList")},63009:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var o=n.Hasher;var a=r.algo;var s=[];var u=[];(function(){function e(e){var r=t.sqrt(e);for(var n=2;n<=r;n++){if(!(e%n)){return false}}return true}function r(e){return(e-(e|0))*4294967296|0}var n=2;var i=0;while(i<64){if(e(n)){if(i<8){s[i]=r(t.pow(n,1/2))}u[i]=r(t.pow(n,1/3));i++}n++}})();var c=[];var l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var o=r[2];var a=r[3];var s=r[4];var l=r[5];var f=r[6];var d=r[7];for(var h=0;h<64;h++){if(h<16){c[h]=e[t+h]|0}else{var p=c[h-15];var v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3;var m=c[h-2];var y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=v+c[h-7]+y+c[h-16]}var g=s&l^~s&f;var b=n&i^n&o^i&o;var _=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22);var S=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25);var E=d+S+g+u[h]+c[h];var w=_+b;d=f;f=l;l=s;s=a+E|0;a=o;o=i;i=n;n=E+w|0}r[0]=r[0]+n|0;r[1]=r[1]+i|0;r[2]=r[2]+o|0;r[3]=r[3]+a|0;r[4]=r[4]+s|0;r[5]=r[5]+l|0;r[6]=r[6]+f|0;r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var i=e.sigBytes*8;r[i>>>5]|=128<<24-i%32;r[(i+64>>>9<<4)+14]=t.floor(n/4294967296);r[(i+64>>>9<<4)+15]=n;e.sigBytes=r.length*4;this._process();return this._hash},clone:function(){var e=o.clone.call(this);e._hash=this._hash.clone();return e}});r.SHA256=o._createHelper(l);r.HmacSHA256=o._createHmacHelper(l)})(Math);return e.SHA256}))},63226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Arg1Map=void 0;var r;(function(e){e["CODE_ERROR"]="ut_event_web_code_error";e["USER_CLICK"]="ut_event_web_user_click";e["PAGE_STATUS"]="ut_event_web_page_status";e["ROUTE_CHANGE"]="ut_event_web_route_change";e["REDUX_ACTION"]="ut_event_web_redux_action";e["SERVER_API"]="ut_event_web_server_api";e["COMMON_ERROR"]="ut_event_web_common_error";e["LOGGER_MESSAGE"]="ut_event_web_logger_message";e["NETWORK_CHANGE"]="ut_event_web_network_change";e["PAGE_CREATE"]="ut_event_web_page_create";e["PAGE_DESTROY"]="ut_event_web_page_destroy";e["PAGE_USE_TIME"]="ut_event_web_page_use_time";e["WEBSOCKET"]="ut_event_web_websocket";e["HCSO_WEBSOCKET"]="ut_event_web_hcso_websocket";e["SPARK_RTC"]="ut_event_web_sparkRTC";e["HCSO"]="ut_event_web_hcso";e["ICS_SDK_ERROR"]="ut_event_web_ics_sdk_error";e["APP_ERROR"]="ut_event_web_app_error";e["MESSAGE_ITEM_RENDER"]="ut_event_web_message_item_render";e["C_NATIVE"]="ut_event_web_c_native";e["ELECTRON_MESSAGE"]="ut_event_web_electron_message";e["HWICSUISDK_METHOD"]="ut_event_hwics_uisdk_method";e["HWICSUISDK_NOTIFY"]="ut_event_hwics_uisdk_notify";e["MEMORY"]="ut_event_web_memory";e["THIRD_PARTY_STAT"]="ut_event_web_third_party_stat"})(r||(t.Arg1Map=r={}))},63463:e=>{"use strict";var t=TypeError;e.exports=function(e){if(typeof e=="string")return e;throw new t("Argument is not a string")}},63548:(e,t,r)=>{"use strict";var n=r(43724);var i=r(62106);var o=r(20034);var a=r(13925);var s=r(48981);var u=r(67750);var c=Object.getPrototypeOf;var l=Object.setPrototypeOf;var f=Object.prototype;var d="__proto__";if(n&&c&&l&&!(d in f))try{i(f,d,{configurable:true,get:function e(){return c(s(this))},set:function e(t){var r=u(this);if(a(t)&&o(r)){l(r,t)}}})}catch(e){}},64117:e=>{"use strict";e.exports=function(e){return e===null||e===undefined}},64346:(e,t,r)=>{"use strict";var n=r(46518);var i=r(34376);n({target:"Array",stat:true},{isArray:i})},64444:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77782);var o=Math.abs;var a=Math.pow;n({target:"Math",stat:true},{cbrt:function e(t){var r=+t;return i(r)*a(o(r),1/3)}})},64449:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402).has;var o=r(25170);var a=r(83789);var s=r(38469);var u=r(40507);var c=r(9539);e.exports=function e(t){var r=n(this);var l=a(t);if(o(r)<=l.size)return s(r,(function(e){if(l.includes(e))return false}),true)!==false;var f=l.getIterator();return u(f,(function(e){if(i(r,e))return c(f,"normal",false)}))!==false}},64467:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(20816);function i(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},64601:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Number",stat:true,nonConfigurable:true,nonWritable:true},{MAX_SAFE_INTEGER:9007199254740991})},64697:(e,t,r)=>{"use strict";r.r(t)},64713:(e,t,r)=>{const n=r(2731);t.mul=function e(t,r){const i=new Uint8Array(t.length+r.length-1);for(let e=0;e<t.length;e++){for(let o=0;o<r.length;o++){i[e+o]^=n.mul(t[e],r[o])}}return i};t.mod=function e(t,r){let i=new Uint8Array(t);while(i.length-r.length>=0){const e=i[0];for(let t=0;t<r.length;t++){i[t]^=n.mul(r[t],e)}let t=0;while(t<i.length&&i[t]===0)t++;i=i.slice(t)}return i};t.generateECPolynomial=function e(r){let i=new Uint8Array([1]);for(let e=0;e<r;e++){i=t.mul(i,new Uint8Array([1,n.exp(e)]))}return i}},64725:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var o=i.Base64url={stringify:function(e,t){if(t===undefined){t=true}var r=e.words;var n=e.sigBytes;var i=t?this._safe_map:this._map;e.clamp();var o=[];for(var a=0;a<n;a+=3){var s=r[a>>>2]>>>24-a%4*8&255;var u=r[a+1>>>2]>>>24-(a+1)%4*8&255;var c=r[a+2>>>2]>>>24-(a+2)%4*8&255;var l=s<<16|u<<8|c;for(var f=0;f<4&&a+f*.75<n;f++){o.push(i.charAt(l>>>6*(3-f)&63))}}var d=i.charAt(64);if(d){while(o.length%4){o.push(d)}}return o.join("")},parse:function(e,t){if(t===undefined){t=true}var r=e.length;var n=t?this._safe_map:this._map;var i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++){i[n.charCodeAt(o)]=o}}var s=n.charAt(64);if(s){var u=e.indexOf(s);if(u!==-1){r=u}}return a(e,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(e,t,r){var i=[];var o=0;for(var a=0;a<t;a++){if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2;var u=r[e.charCodeAt(a)]>>>6-a%4*2;var c=s|u;i[o>>>2]|=c<<24-o%4*8;o++}}return n.create(i,o)}})();return e.enc.Base64url}))},64895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ShowMode=void 0;var r;(function(e){e["WAITING"]="waiting";e["TEXT_CONTENT"]="textContent";e["RICH_TEXT"]="richText";e["MEDIA"]="media"})(r||(t.ShowMode=r={}))},64979:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(97751);var a=r(6980);var s=r(24913).f;var u=r(39297);var c=r(90679);var l=r(23167);var f=r(32603);var d=r(55002);var h=r(16193);var p=r(43724);var v=r(96395);var m="DOMException";var y=o("Error");var g=o(m);var b=function e(){c(this,_);var t=arguments.length;var r=f(t<1?undefined:arguments[0]);var n=f(t<2?undefined:arguments[1],"Error");var i=new g(r,n);var o=new y(r);o.name=m;s(i,"stack",a(1,h(o.stack,1)));l(i,this,b);return i};var _=b.prototype=g.prototype;var S="stack"in new y(m);var E="stack"in new g(1,2);var w=g&&p&&Object.getOwnPropertyDescriptor(i,m);var T=!!w&&!(w.writable&&w.configurable);var I=S&&!T&&!E;n({global:true,constructor:true,forced:v||I},{DOMException:I?b:g});var R=o(m);var C=R.prototype;if(C.constructor!==R){if(!v){s(C,"constructor",a(1,R))}for(var k in d)if(u(d,k)){var A=d[k];var O=A.s;if(!u(R,O)){s(R,O,a(6,A.c))}}}},65070:(e,t,r)=>{"use strict";var n=r(46518);var i=r(53250);n({target:"Math",stat:true,forced:i!==Math.expm1},{expm1:i})},65219:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;const t={close:"关闭",minimize:"最小化",maximize:"最大化",restore:"还原"};var r=e.default=t}))},65233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(4742);var i=u(r(75540));var o=r(44772);var a=r(44104);var s=u(r(88763));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new a.Log({module:"HwICS.UI.CaptionPageHub"});let w=function(e){function t(){var e;c(this,t);e=p(this,t,arguments);e._pageName="CaptionPageHub";return e}b(t,e);return f(t,[{key:"render",value:function e(){return(0,n.jsx)("div",{className:"caption-hub transparent-scrollbar",children:(0,n.jsx)(s.default,{hideAvatar:true})},"caption-hub")}}])}(i.default);w=S([(0,o.componentDecorator)(E)],w);var T=t["default"]=w},65239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=t.SpeakerDevice=t.MicrophoneDevice=t.AudioDevice=void 0;var n=r(44104);var i=r(40494);var o=r(44772);var a=r(56043);var s=r(1381);function u(e,t,r){return t=v(t),c(e,f()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}function c(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e,t,r,n){var i=h(v(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=p(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},h.apply(null,arguments)}function p(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e){var t=E(e,"string");return"symbol"==typeof t?t:t+""}function E(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const T=new n.Log({module:"HwICS.AudioDeviceManager"});const I=new Set(["communications","default"]);let R=t.AudioDevice=function(){function e(t){g(this,e);this.type="audioinput";this.callbacks=new Set;this.detecting=false;this.deviceLen=0;this.type=t;this.getDevices()}return _(e,[{key:"publishDetect",value:function e(t){this.callbacks.forEach((e=>{var r;return(r=e.onDetect)===null||r===void 0?void 0:r.call(e,t)}))}},{key:"publishDetectStateChange",value:function e(){this.callbacks.forEach((e=>{var t;return(t=e.onDetectStateChange)===null||t===void 0?void 0:t.call(e,this.detecting)}))}},{key:"publishDeviceChange",value:function e(){this.callbacks.forEach((e=>{var t;return(t=e.onDeviceChange)===null||t===void 0?void 0:t.call(e)}))}},{key:"getCacheDevice",value:function e(){return sessionStorage.getItem(this.type)}},{key:"setCacheDevice",value:function e(t){sessionStorage.setItem(this.type,t)}},{key:"getAllDevices",value:async function e(){const t=await navigator.mediaDevices.enumerateDevices();return t.filter((e=>e.deviceId&&!I.has(e.deviceId)))}},{key:"getDevices",value:async function e(){let t=await this.getAllDevices();t=t.filter((e=>e.kind===this.type));this.deviceLen=t.length;const r=await o.MediaDeviceManager.getDefaultDeviceId(this.type);this.defaultDevice=t.find((e=>e.deviceId===r));return t}},{key:"getPreferred",value:async function e(t,r){if(!r){r=await o.MediaDeviceManager.getDefaultDeviceId(this.type)}const n=t.find((e=>r&&e.deviceId===r));if(n){return n}return t[0]}},{key:"isExist",value:async function e(t){if(!t){return false}const r=await this.getDevices();const n=r.find((e=>e.deviceId===t));return!!n}},{key:"getUsed",value:async function e(){const t=await this.getDevices();const r=this.getCacheDevice();return this.getPreferred(t,r||undefined)}},{key:"saveUsed",value:async function e(t){const r=this.getCacheDevice();if(r===t){return true}const n=await this.getDevices();const i=n.find((e=>t&&e.deviceId===t));if(i){this.setCacheDevice(t);this.publishDeviceChange();return true}return false}},{key:"isSupportDeviceSwitch",value:function e(){return true}},{key:"isDetecting",value:function e(){return this.detecting}},{key:"setDetecting",value:function e(t){if(t===this.detecting){return}this.detecting=t;this.publishDetectStateChange()}},{key:"handleDeviceChange",value:async function t(){const r=this.deviceLen;const n=this.defaultDevice;await this.getDevices();if(this.deviceLen===r&&e.isDeviceSame(n,this.defaultDevice)){return}this.publishDeviceChange()}},{key:"subscribe",value:function e(t){this.callbacks.add(t);return()=>this.callbacks.delete(t)}},{key:"startAudioProcess",value:async function e(t){T.debug("startAudioProcess, deviceId",t);const r=new AudioContext;const n=this.getAudioSource(r);if(!n){r.close();return false}await r.audioWorklet.addModule((0,s.getAudioProcessorUrl)());const i=new AudioWorkletNode(r,"AudioVolumeProcessor");n.connect(i).connect(r.destination);i.port.onmessage=e=>{this.publishDetect(e.data)};this.source=n;this.audioContext=r;return true}},{key:"close",value:function e(){this.stopDetect();this.callbacks.clear()}},{key:"stopDetect",value:function e(){if(!this.isDetecting()){return}if(this.source){this.source.disconnect();this.source=undefined}if(this.audioContext){this.audioContext.close();this.audioContext=undefined}this.setDetecting(false)}},{key:"startDetect",value:async function e(t){this.stopDetect();this.setDetecting(true);let r=await this.prepareAudioProcess(t);if(!r){this.stopDetect()}r=await this.startAudioProcess(t);if(!r){this.stopDetect()}}},{key:"prepareAudioProcess",value:async function e(t){T.debug("prepareAudioProcess, deviceId",t);return false}},{key:"getAudioSource",value:function e(t){T.debug("getAudioSource, audioContext",!!t);return undefined}}],[{key:"isDeviceSame",value:function e(t,r){if(t===r){return true}if(!t||!r){return false}return t.deviceId===r.deviceId&&t.groupId===r.groupId}}])}();let C=t.MicrophoneDevice=function(e){function t(){g(this,t);return u(this,t,["audioinput"])}m(t,e);return _(t,[{key:"prepareAudioProcess",value:async function e(t){const r=await this.isExist(t);if(!r){T.warn("cannot start mic test, have no device");return false}const n={audio:{deviceId:{exact:t}},video:false};try{const e=await navigator.mediaDevices.getUserMedia(n);this.stream=e;return true}catch(e){var i;T.error("prepareAudioProcess",e===null||e===void 0?void 0:(i=e.toString)===null||i===void 0?void 0:i.call(e));return false}}},{key:"getAudioSource",value:function e(t){if(!this.stream){return undefined}return t.createMediaStreamSource(this.stream)}},{key:"stopDetect",value:function e(){if(this.stream){this.stream.getTracks().forEach((e=>{e.stop()}))}d(t,"stopDetect",this,3)([])}}])}(R);let k=t.SpeakerDevice=function(e){function t(){var e;g(this,t);e=u(this,t,["audiooutput"]);e.audio=new Audio;return e}m(t,e);return _(t,[{key:"isSupportDeviceSwitch",value:function e(){return"setSinkId"in AudioContext.prototype}},{key:"getAudioSource",value:function e(t){return t.createMediaElementSource(this.audio)}},{key:"prepareAudioProcess",value:async function e(t){T.debug("prepareAudioProcess, deviceId",t);this.audio.src="";this.audio=new Audio("icswebclient/SoundTest.mp3");this.audio.loop=true;this.audio.volume=1;this.audio.onerror=()=>{T.error("prepareAudioProcess load wav failed")};this.audio.play().catch((e=>{var t;T.error("prepareAudioProcess play wav",e===null||e===void 0?void 0:(t=e.toString)===null||t===void 0?void 0:t.call(e))}));return true}},{key:"startAudioProcess",value:async function e(r){var n,i;const o=await this.isExist(r);if(!o){T.warn("cannot start speaker test, have no device");return false}const a=await d(t,"startAudioProcess",this,3)([r]);if(!a){return false}if(this.source&&this.audioContext){this.source.connect(this.audioContext.destination)}await((n=(i=this.audioContext).setSinkId)===null||n===void 0?void 0:n.call(i,r));return true}},{key:"stopDetect",value:function e(){d(t,"stopDetect",this,3)([]);this.audio.pause()}}])}(R);let A=t["default"]=function(){function e(){g(this,e);this.microphone=new C;this.speaker=new k;this.handleDeviceChange=async()=>{await this.speaker.handleDeviceChange();await this.microphone.handleDeviceChange()}}return _(e,[{key:"initDeviceAndListeners",value:async function e(){const[t,r]=await Promise.all([this.speaker.getUsed(),this.microphone.getUsed()]);T.info("initDeviceAndListeners",t===null||t===void 0?void 0:t.deviceId,r===null||r===void 0?void 0:r.deviceId);i.StreamAdapter.setSpeaker(t===null||t===void 0?void 0:t.deviceId);this.speaker.subscribe({onDeviceChange:async()=>{const e=await this.speaker.getUsed();T.info("initDeviceAndListeners, change speaker",e===null||e===void 0?void 0:e.deviceId);if(e){i.StreamAdapter.setSpeaker(e.deviceId)}}});i.StreamAdapter.setMicrophone(r===null||r===void 0?void 0:r.deviceId);this.microphone.subscribe({onDeviceChange:async()=>{const e=await this.microphone.getUsed();T.info("initDeviceAndListeners, change microphone",e===null||e===void 0?void 0:e.deviceId);if(e){await i.StreamAdapter.setMicrophone(e===null||e===void 0?void 0:e.deviceId);a.LocalWakeup.updateMicrophoneDevice(e.deviceId)}}});navigator.mediaDevices.addEventListener("devicechange",this.handleDeviceChange)}}],[{key:"getInstance",value:function t(){if(!e.ins){e.ins=new e}return e.ins}}])}();w([(0,o.printfDecorator)(T)],A.prototype,"initDeviceAndListeners",null);A.getInstance().initDeviceAndListeners()},65268:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.USER_TYPE=t.TokenType=t.LayoutMode=t.JOB_SUCCEED_REASON=t.JOB_STATE=t.CHAT_STATE=void 0;var r;(function(e){e["CAPTURE"]="CAPTURE";e["ANIMATION"]="ANIMATION";e["RENDER"]="RENDER";e["PLAYER"]="PLAYER"})(r||(t.USER_TYPE=r={}));var n;(function(e){e["WAITING"]="WAITING";e["PROCESSING"]="PROCESSING";e["SUCCEED"]="SUCCEED";e["FAILED"]="FAILED";e["CANCELED"]="CANCELED";e["IDLE"]="IDLE";e["DELETING"]="DELETING";e["HEARTBEAT"]="HEARTBEAT"})(n||(t.JOB_STATE=n={}));var i;(function(e){e["NORMAL"]="NORMAL";e["MUTE_TIMEOUT"]="MUTE_TIMEOUT"})(i||(t.JOB_SUCCEED_REASON=i={}));var o;(function(e){e[e["WAITING"]=0]="WAITING";e[e["WAITING_CLOSE"]=1]="WAITING_CLOSE";e[e["SUCCEED"]=2]="SUCCEED";e[e["SUSPEND"]=3]="SUSPEND";e[e["WAITING_SUSPEND"]=4]="WAITING_SUSPEND"})(o||(t.CHAT_STATE=o={}));var a;(function(e){e[e["ACCESS_TOKEN"]=0]="ACCESS_TOKEN";e[e["REFRESH_TOKEN"]=1]="REFRESH_TOKEN";e[e["ONCE_TOKEN"]=1]="ONCE_TOKEN"})(a||(t.TokenType=a={}));var s;(function(e){e["COMPUTER"]="COMPUTER";e["MOBILE"]="MOBILE";e["HUB"]="HUB"})(s||(t.LayoutMode=s={}))},65299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(44104);var o=r(44772);var a=r(69733);r(82391);var s=r(13288);var u=r(83585);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new i.Log({module:"UI.RichTextCard"});let w=function(e){function t(){var e;c(this,t);e=p(this,t,arguments);e._getMediaComp=()=>{const{scrollIntoView:t,message:r}=e.props;return(0,n.jsx)(s.MediaCard,{message:r,scrollIntoView:t})};return e}b(t,e);return f(t,[{key:"render",value:function e(){const{currentSayText:t}=this.state;const{message:r}=this.props;if(!r){return null}return(0,n.jsx)("div",{className:"rich-text-card text-card",ref:this._setScrollRef,children:(0,n.jsxs)("div",{className:"content",children:[(0,n.jsx)("pre",{children:t===null||t===void 0?void 0:t.trim()}),this._getMediaComp()]})})}}])}(u.TextCard);w=S([(0,o.componentDecorator)(E)],w);const T=e=>({showAllContentChatId:e.caption.showAllContentChatId});var I=t["default"]=(0,a.connect)(T)(w)},65425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PointCircleContainer=void 0;var n=r(96540);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t,r){return t=h(t),l(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}let m=t.PointCircleContainer=function(e){function t(){i(this,t);return c(this,t,arguments)}p(t,e);return a(t,[{key:"componentDidMount",value:function e(){window.addEventListener("documentFontsizeChange",this.calcPoint)}},{key:"componentWillUnmount",value:function e(){window.removeEventListener("documentFontsizeChange",this.calcPoint)}},{key:"calcPoint",value:function e(){}}])}(n.Component)},65746:(e,t,r)=>{"use strict";var n=r(92744);var i=r(44576);var o=r(79504);var a=r(56279);var s=r(3451);var u=r(16468);var c=r(91625);var l=r(20034);var f=r(91181).enforce;var d=r(79039);var h=r(58622);var p=Object;var v=Array.isArray;var m=p.isExtensible;var y=p.isFrozen;var g=p.isSealed;var b=p.freeze;var _=p.seal;var S=!i.ActiveXObject&&"ActiveXObject"in i;var E;var w=function(e){return function t(){return e(this,arguments.length?arguments[0]:undefined)}};var T=u("WeakMap",w,c);var I=T.prototype;var R=o(I.set);var C=function(){return n&&d((function(){var e=b([]);R(new T,e,1);return!y(e)}))};if(h)if(S){E=c.getConstructor(w,"WeakMap",true);s.enable();var k=o(I["delete"]);var A=o(I.has);var O=o(I.get);a(I,{delete:function(e){if(l(e)&&!m(e)){var t=f(this);if(!t.frozen)t.frozen=new E;return k(this,e)||t.frozen["delete"](e)}return k(this,e)},has:function e(t){if(l(t)&&!m(t)){var r=f(this);if(!r.frozen)r.frozen=new E;return A(this,t)||r.frozen.has(t)}return A(this,t)},get:function e(t){if(l(t)&&!m(t)){var r=f(this);if(!r.frozen)r.frozen=new E;return A(this,t)?O(this,t):r.frozen.get(t)}return O(this,t)},set:function e(t,r){if(l(t)&&!m(t)){var n=f(this);if(!n.frozen)n.frozen=new E;A(this,t)?R(this,t,r):n.frozen.set(t,r)}else R(this,t,r);return this}})}else if(C()){a(I,{set:function e(t,r){var n;if(v(t)){if(y(t))n=b;else if(g(t))n=_}R(this,t,r);if(n)n(t);return this}})}},66119:(e,t,r)=>{"use strict";var n=r(25745);var i=r(33392);var o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},66346:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79504);var o=r(43724);var a=r(77811);var s=r(10350);var u=r(66699);var c=r(62106);var l=r(56279);var f=r(79039);var d=r(90679);var h=r(91291);var p=r(18014);var v=r(57696);var m=r(15617);var y=r(88490);var g=r(42787);var b=r(52967);var _=r(84373);var S=r(67680);var E=r(23167);var w=r(77740);var T=r(10687);var I=r(91181);var R=s.PROPER;var C=s.CONFIGURABLE;var k="ArrayBuffer";var A="DataView";var O="prototype";var P="Wrong length";var x="Wrong index";var L=I.getterFor(k);var M=I.getterFor(A);var N=I.set;var D=n[k];var j=D;var U=j&&j[O];var V=n[A];var W=V&&V[O];var B=Object.prototype;var G=n.Array;var Z=n.RangeError;var F=i(_);var H=i([].reverse);var X=y.pack;var Y=y.unpack;var K=function(e){return[e&255]};var z=function(e){return[e&255,e>>8&255]};var J=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]};var Q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]};var q=function(e){return X(m(e),23,4)};var $=function(e){return X(e,52,8)};var ee=function(e,t,r){c(e[O],t,{configurable:true,get:function(){return r(this)[t]}})};var te=function(e,t,r,n){var i=M(e);var o=v(r);var a=!!n;if(o+t>i.byteLength)throw new Z(x);var s=i.bytes;var u=o+i.byteOffset;var c=S(s,u,u+t);return a?c:H(c)};var re=function(e,t,r,n,i,o){var a=M(e);var s=v(r);var u=n(+i);var c=!!o;if(s+t>a.byteLength)throw new Z(x);var l=a.bytes;var f=s+a.byteOffset;for(var d=0;d<t;d++)l[f+d]=u[c?d:t-d-1]};if(!a){j=function e(t){d(this,U);var r=v(t);N(this,{type:k,bytes:F(G(r),0),byteLength:r});if(!o){this.byteLength=r;this.detached=false}};U=j[O];V=function e(t,r,n){d(this,W);d(t,U);var i=L(t);var a=i.byteLength;var s=h(r);if(s<0||s>a)throw new Z("Wrong offset");n=n===undefined?a-s:p(n);if(s+n>a)throw new Z(P);N(this,{type:A,buffer:t,byteLength:n,byteOffset:s,bytes:i.bytes});if(!o){this.buffer=t;this.byteLength=n;this.byteOffset=s}};W=V[O];if(o){ee(j,"byteLength",L);ee(V,"buffer",M);ee(V,"byteLength",M);ee(V,"byteOffset",M)}l(W,{getInt8:function e(t){return te(this,1,t)[0]<<24>>24},getUint8:function e(t){return te(this,1,t)[0]},getInt16:function e(t){var r=te(this,2,t,arguments.length>1?arguments[1]:false);return(r[1]<<8|r[0])<<16>>16},getUint16:function e(t){var r=te(this,2,t,arguments.length>1?arguments[1]:false);return r[1]<<8|r[0]},getInt32:function e(t){return Q(te(this,4,t,arguments.length>1?arguments[1]:false))},getUint32:function e(t){return Q(te(this,4,t,arguments.length>1?arguments[1]:false))>>>0},getFloat32:function e(t){return Y(te(this,4,t,arguments.length>1?arguments[1]:false),23)},getFloat64:function e(t){return Y(te(this,8,t,arguments.length>1?arguments[1]:false),52)},setInt8:function e(t,r){re(this,1,t,K,r)},setUint8:function e(t,r){re(this,1,t,K,r)},setInt16:function e(t,r){re(this,2,t,z,r,arguments.length>2?arguments[2]:false)},setUint16:function e(t,r){re(this,2,t,z,r,arguments.length>2?arguments[2]:false)},setInt32:function e(t,r){re(this,4,t,J,r,arguments.length>2?arguments[2]:false)},setUint32:function e(t,r){re(this,4,t,J,r,arguments.length>2?arguments[2]:false)},setFloat32:function e(t,r){re(this,4,t,q,r,arguments.length>2?arguments[2]:false)},setFloat64:function e(t,r){re(this,8,t,$,r,arguments.length>2?arguments[2]:false)}})}else{var ne=R&&D.name!==k;if(!f((function(){D(1)}))||!f((function(){new D(-1)}))||f((function(){new D;new D(1.5);new D(NaN);return D.length!==1||ne&&!C}))){j=function e(t){d(this,U);return E(new D(v(t)),this,j)};j[O]=U;U.constructor=j;w(j,D)}else if(ne&&C){u(D,"name",k)}if(b&&g(W)!==B){b(W,B)}var ie=new V(new j(2));var oe=i(W.setInt8);ie.setInt8(0,2147483648);ie.setInt8(1,2147483649);if(ie.getInt8(0)||!ie.getInt8(1))l(W,{setInt8:function e(t,r){oe(this,t,r<<24>>24)},setUint8:function e(t,r){oe(this,t,r<<24>>24)}},{unsafe:true})}T(j,k);T(V,A);e.exports={ArrayBuffer:j,DataView:V}},66351:(e,t,r)=>{"use strict";if(true){e.exports=r(57787)}else{}},66412:(e,t,r)=>{"use strict";var n=r(70511);n("asyncIterator")},66588:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u,fk:()=>a});var n=r(82284);var i=r(96540);var o=r(40961);function a(e){return e instanceof HTMLElement||e instanceof SVGElement}function s(e){if(e&&(0,n.A)(e)==="object"&&a(e.nativeElement)){return e.nativeElement}if(a(e)){return e}return null}function u(e){var t=s(e);if(t){return t}if(e instanceof i.Component){var r;return(r=o.findDOMNode)===null||r===void 0?void 0:r.call(o,e)}return null}},66651:(e,t,r)=>{"use strict";var n=r(94644);var i=r(19617).indexOf;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("indexOf",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},66699:(e,t,r)=>{"use strict";var n=r(43724);var i=r(24913);var o=r(6980);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){e[t]=r;return e}},66812:(e,t,r)=>{"use strict";var n=r(94644);var i=r(18745);var o=r(8379);var a=n.aTypedArray;var s=n.exportTypedArrayMethod;s("lastIndexOf",(function e(t){var r=arguments.length;return i(o,a(this),r>1?[t,arguments[1]]:[t])}))},66933:(e,t,r)=>{"use strict";var n=r(79504);var i=r(34376);var o=r(94901);var a=r(22195);var s=r(655);var u=n([].push);e.exports=function(e){if(o(e))return e;if(!i(e))return;var t=e.length;var r=[];for(var n=0;n<t;n++){var c=e[n];if(typeof c=="string")u(r,c);else if(typeof c=="number"||a(c)==="Number"||a(c)==="String")u(r,s(c))}var l=r.length;var f=true;return function(e,t){if(f){f=false;return t}if(i(this))return t;for(var n=0;n<l;n++)if(r[n]===e)return t}}},67044:(e,t)=>{const r="[0-9]+";const n="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";t.KANJI=new RegExp(i,"g");t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");t.BYTE=new RegExp(o,"g");t.NUMERIC=new RegExp(r,"g");t.ALPHANUMERIC=new RegExp(n,"g");const a=new RegExp("^"+i+"$");const s=new RegExp("^"+r+"$");const u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function e(t){return a.test(t)};t.testNumeric=function e(t){return s.test(t)};t.testAlphanumeric=function e(t){return u.test(t)}},67357:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(67750);var a=r(91291);var s=r(655);var u=r(79039);var c=i("".charAt);var l=u((function(){return"𠮷".at(-2)!=="\ud842"}));n({target:"String",proto:true,forced:l},{at:function e(t){var r=s(o(this));var n=r.length;var i=a(t);var u=i>=0?i:n+i;return u<0||u>=n?undefined:c(r,u)}})},67394:(e,t,r)=>{"use strict";var n=r(44576);var i=r(46706);var o=r(22195);var a=n.ArrayBuffer;var s=n.TypeError;e.exports=a&&i(a.prototype,"byteLength","get")||function(e){if(o(e)!=="ArrayBuffer")throw new s("ArrayBuffer expected");return e.byteLength}},67400:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},67416:(e,t,r)=>{"use strict";var n=r(79039);var i=r(78227);var o=r(43724);var a=r(96395);var s=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","https://a");var t=e.searchParams;var r=new URLSearchParams("a=1&a=2&b=3");var n="";e.pathname="c%20d";t.forEach((function(e,r){t["delete"]("b");n+=r+e}));r["delete"]("a",2);r["delete"]("b",undefined);return a&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",undefined)||r.has("b"))||!t.size&&(a||!o)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[s]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",undefined).host!=="x"}))},67438:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79504);var a=r(67750);var s=r(655);var u=r(79039);var c=Array;var l=o("".charAt);var f=o("".charCodeAt);var d=o([].join);var h="".toWellFormed;var p="<22>";var v=h&&u((function(){return i(h,1)!=="1"}));n({target:"String",proto:true,forced:v},{toWellFormed:function e(){var t=s(a(this));if(v)return i(h,t);var r=t.length;var n=c(r);for(var o=0;o<r;o++){var u=f(t,o);if((u&63488)!==55296)n[o]=l(t,o);else if(u>=56320||o+1>=r||(f(t,o+1)&64512)!==56320)n[o]=p;else{n[o]=l(t,o);n[++o]=l(t,o)}}return d(n,"")}})},67665:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(73141),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;const i=e=>{const{size:i,content:o,borderColor:a,logoPath:s,hasBorder:u=false,pointColor:c,needCodePadding:l=true,backgroundColor:f}=e;(0,t.getPLogger)().debug("QrCode",{size:i,content:o,borderColor:a,logoPath:s,hasBorder:u,needCodePadding:l});let d=i;let h={width:`${i}px`,height:`${i}px`,border:"none"};if(u){const e=Math.round(i/45);const t=Math.round(i/10);d=Math.round(i*38/45);h={width:`${i}px`,height:`${i}px`,borderColor:a,borderWidth:`${e}px`,borderRadius:`${t}px`}}const p=r.QrCodeUtil.createQrCode({qrCodeContent:o,qrCodeSize:d,pointColor:c||"#000000",needCodePadding:l,logoPath:s,hasBorder:u,backgroundColor:f});return(0,n.jsx)("div",{style:h,className:"meta-qr-code-container",dangerouslySetInnerHTML:{__html:p.outerHTML}})};const o=({ctx:e,offset:r,qrCodeSvg:n})=>new Promise(((i,o)=>{const a=new Image;const s=(new XMLSerializer).serializeToString(n);a.onload=function(){(0,t.getPLogger)().debug("drawQrContentOnCanvas onload");e===null||e===void 0?void 0:e.drawImage(a,r,r);i()};a.onerror=function(e){(0,t.getPLogger)().debug("drawQrContentOnCanvas onerror",e);o(e)};a.src="data:image/svg+xml;base64,"+btoa(s)}));const a=({ctx:e,size:r,radius:n,borderSize:i,borderColor:o,isStroke:a=false,offset:s=0})=>{(0,t.getPLogger)().debug("drawRoundRectPath",{size:r,radius:n,borderSize:i,borderColor:o});if(!e){return}e.beginPath();e.arc(r-n+s,r-n+s,n,0,Math.PI/2);e.lineTo(n+s,r+s);e.arc(n+s,r-n+s,n,Math.PI/2,Math.PI);e.lineTo(s,n+s);e.arc(n+s,n+s,n,Math.PI,Math.PI*3/2);e.lineTo(r-n+s,s);e.arc(r-n+s,n+s,n,Math.PI*3/2,Math.PI*2);e.lineTo(r+s,r-n+s);e.closePath();a&&(e.lineWidth=i);if(o){e.fillStyle=o;a?e.strokeStyle=o:e.fillStyle=o}a?e.stroke():e.fill()};const s=({ctx:e,offset:r,logoPath:n,logoSize:i})=>new Promise(((o,a)=>{const s=new Image;(0,t.getPLogger)().debug("drawLogoOnCanvas",n);s.onload=function(){(0,t.getPLogger)().debug("drawLogoOnCanvas onload");e===null||e===void 0?void 0:e.drawImage(s,r,r,i,i);o(true)};s.onerror=function(e){(0,t.getPLogger)().debug("drawLogoOnCanvas onerror",e);a(e)};s.src=n}));const u=async({size:e,content:t,borderColor:n,logoPath:i,hasBorder:u,pointColor:c,needCodePadding:l,backgroundColor:f})=>{let d=0;let h=e;if(u){h=Math.round(e*38/45);d=Math.round(e/45)}const p=r.QrCodeUtil.createQrCode({qrCodeContent:t,qrCodeSize:h,pointColor:c||"#000000",needCodePadding:l,isHighLevel:!!i,hasBorder:u,backgroundColor:f});h=parseInt(p.getAttribute("width")||"0");const v=document.createElement("canvas");v.width=e;v.height=e;const m=v.getContext("2d");await o({ctx:m,offset:(e-h)/2,qrCodeSvg:p});if(u){a({ctx:m,borderColor:n,size:e-d,borderSize:d,radius:Math.round(e/10),offset:d/2,isStroke:true})}if(i){const t=Math.round(h*5/19);if(u){const r=Math.round(t/10);const n=Math.round(t/4);const i=t+r*2;const o=(e-i)/2;a({ctx:m,size:i,borderSize:0,borderColor:"#ffffff",radius:n,offset:o})}const r=(e-t)/2;await s({ctx:m,offset:r,logoPath:i,logoSize:t})}return v.toDataURL("image/png")};const c=({size:e,content:t,pointColor:n,needCodePadding:i=true,backgroundColor:o})=>{const a=r.QrCodeUtil.createQrCode({qrCodeContent:t,qrCodeSize:e,pointColor:n||"#000000",needCodePadding:i,isHighLevel:false,hasBorder:false,backgroundColor:o});const s=(new XMLSerializer).serializeToString(a);return"data:image/svg+xml;base64,"+btoa(s)};var l=e.default=i;i.createQrCodeBase64=u;i.createQrCodeSvgBase64=c}))},67680:(e,t,r)=>{"use strict";var n=r(79504);e.exports=n([].slice)},67750:(e,t,r)=>{"use strict";var n=r(64117);var i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},67787:e=>{"use strict";var t=Math.log;var r=Math.LN2;e.exports=Math.log2||function e(n){return t(n)/r}},67914:(e,t,r)=>{"use strict";r.r(t)},67945:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(96801).f;n({target:"Object",stat:true,forced:Object.defineProperties!==o,sham:!i},{defineProperties:o})},67947:(e,t,r)=>{"use strict";var n=r(70511);n("species")},67979:(e,t,r)=>{"use strict";var n=r(28551);e.exports=function(){var e=n(this);var t="";if(e.hasIndices)t+="d";if(e.global)t+="g";if(e.ignoreCase)t+="i";if(e.multiline)t+="m";if(e.dotAll)t+="s";if(e.unicode)t+="u";if(e.unicodeSets)t+="v";if(e.sticky)t+="y";return t}},68156:(e,t,r)=>{"use strict";var n=r(46518);var i=r(60533).start;var o=r(83063);n({target:"String",proto:true,forced:o},{padStart:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},68183:(e,t,r)=>{"use strict";var n=r(79504);var i=r(91291);var o=r(655);var a=r(67750);var s=n("".charAt);var u=n("".charCodeAt);var c=n("".slice);var l=function(e){return function(t,r){var n=o(a(t));var l=i(r);var f=n.length;var d,h;if(l<0||l>=f)return e?"":undefined;d=u(n,l);return d<55296||d>56319||l+1===f||(h=u(n,l+1))<56320||h>57343?e?s(n,l):d:e?c(n,l,l+2):(d-55296<<10)+(h-56320)+65536}};e.exports={codeAt:l(false),charAt:l(true)}},68210:(e,t,r)=>{"use strict";var n={};var i=[];var o=function e(t){i.push(t)};function a(e,t){if(false){var r}}function s(e,t){if(false){var r}}function u(){n={}}function c(e,t,r){if(!t&&!n[r]){e(false,r);n[r]=true}}function l(e,t){c(a,e,t)}function f(e,t){c(s,e,t)}l.preMessage=o;l.resetWarned=u;l.noteOnce=f;var d=null&&l},68750:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402);var o=r(25170);var a=r(83789);var s=r(38469);var u=r(40507);var c=i.Set;var l=i.add;var f=i.has;e.exports=function e(t){var r=n(this);var i=a(t);var d=new c;if(o(r)>i.size){u(i.getIterator(),(function(e){if(f(r,e))l(d,e)}))}else{s(r,(function(e){if(i.includes(e))l(d,e)}))}return d}},68847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setUiConfig=t.resetConfigState=t.mainSlice=t.initialConfigState=t["default"]=void 0;var n=r(84303);var i=r(39595);const o=t.initialConfigState={[i.ConfigKey.ENABLE_CAPTION]:false,[i.ConfigKey.ENABLE_CHAT_BTN]:false,[i.ConfigKey.ENABLE_HOT_ISSUES]:false,[i.ConfigKey.ENABLE_BUSINESS_TRACK]:true,[i.ConfigKey.ENABLE_WEAK_ERROR_INFO]:true,[i.ConfigKey.ENABLE_JOB_CACHE]:true,[i.ConfigKey.USE_DEFAULT_BACKGROUND]:true,[i.ConfigKey.ENABLE_NETWORK_CHECK]:true,[i.ConfigKey.ENABLE_DEVICE_SETTING]:false,[i.ConfigKey.SHOW_LANGUAGE_UI]:false,[i.ConfigKey.DESTROY_BEFORE_CLOSE]:false,[i.ConfigKey.ENABLE_LOCAL_WAKEUP]:false,[i.ConfigKey.ENABLE_VAD_INTERRUPT]:false,[i.ConfigKey.FIRST_CREATE_LOCAL_STREAM]:false,[i.ConfigKey.ENABLE_STORAGE_CACHE]:false,[i.ConfigKey.ENABLE_MEDIA_VIEWER]:true,[i.ConfigKey.DEFAULT_MUTE_REMOTE_AUDIO]:false,[i.ConfigKey.AUTO_PLAY_REMOTE_VIDEO]:true,[i.ConfigKey.ENABLE_COLLECT_AUDIO_DEMAND]:false,[i.ConfigKey.ENABLE_ORIGIN_CUT_ALGORITHM]:false,[i.ConfigKey.ENABLE_VERBATIM]:false,[i.ConfigKey.USE_WORKER_WAKEUP]:false,[i.ConfigKey.PRE_CHECK_PERMISSIONS]:true};const a=t.mainSlice=(0,n.createSlice)({name:i.ReduxModule.CONFIG,initialState:o,reducers:{resetConfigState:e=>{Object.assign(e,o)},setUiConfig:(e,t)=>{Object.assign(e,t.payload)}}});const{resetConfigState:s,setUiConfig:u}=a.actions;t.setUiConfig=u;t.resetConfigState=s;var c=t["default"]=a},69085:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44213);n({target:"Object",stat:true,arity:2,forced:Object.assign!==i},{assign:i})},69242:(e,t,r)=>{"use strict";if(true){e.exports=r(22162)}else{}},69479:(e,t,r)=>{"use strict";var n=r(44576);var i=r(43724);var o=r(62106);var a=r(67979);var s=r(79039);var u=n.RegExp;var c=u.prototype;var l=i&&s((function(){var e=true;try{u(".","d")}catch(t){e=false}var t={};var r="";var n=e?"dgimsy":"gimsy";var i=function(e,n){Object.defineProperty(t,e,{get:function(){r+=n;return true}})};var o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};if(e)o.hasIndices="d";for(var a in o)i(a,o[a]);var s=Object.getOwnPropertyDescriptor(c,"flags").get.call(t);return s!==n||r!==n}));if(l)o(c,"flags",{configurable:true,get:a})},69539:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).filter;var o=r(29948);var a=n.aTypedArray;var s=n.exportTypedArrayMethod;s("filter",(function e(t){var r=i(a(this),t,arguments.length>1?arguments[1]:undefined);return o(this,r)}))},69546:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("fontsize")},{fontsize:function e(t){return i(this,"font","size",t)}})},69565:(e,t,r)=>{"use strict";var n=r(40616);var i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},69733:(e,t,r)=>{"use strict";r.r(t);r.d(t,{Provider:()=>le,ReactReduxContext:()=>p,batch:()=>o.unstable_batchedUpdates,connect:()=>ue,createDispatchHook:()=>he,createSelectorHook:()=>E,createStoreHook:()=>fe,shallowEqual:()=>K,useDispatch:()=>pe,useSelector:()=>w,useStore:()=>de});var n=r(19888);var i=r(69242);var o=r(40961);function a(e){e()}let s=a;const u=e=>s=e;const c=()=>s;var l=r(96540);const f=Symbol.for(`react-redux-context`);const d=typeof globalThis!=="undefined"?globalThis:{};function h(){var e;if(!l.createContext)return{};const t=(e=d[f])!=null?e:d[f]=new Map;let r=t.get(l.createContext);if(!r){r=l.createContext(null);if(false){}t.set(l.createContext,r)}return r}const p=h();const v=null&&p;function m(e=p){return function t(){const r=(0,l.useContext)(e);if(false){}return r}}const y=m();const g=()=>{throw new Error("uSES not initialized!")};let b=g;const _=e=>{b=e};const S=(e,t)=>e===t;function E(e=p){const t=e===p?y:m(e);return function e(r,n={}){const{equalityFn:i=S,stabilityCheck:o=undefined,noopCheck:a=undefined}=typeof n==="function"?{equalityFn:n}:n;if(false){}const{store:s,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t();const h=(0,l.useRef)(true);const p=(0,l.useCallback)({[r.name](e){const t=r(e);if(false){}return t}}[r.name],[r,f,o]);const v=b(u.addNestedSub,s.getState,c||s.getState,p,i);(0,l.useDebugValue)(v);return v}}const w=E();var T=r(58168);var I=r(98587);var R=r(4146);var C=r.n(R);var k=r(54737);const A=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function O(e,t,r,n,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s=false;let u;let c;let l;let f;let d;function h(i,o){u=i;c=o;l=e(u,c);f=t(n,c);d=r(l,f,c);s=true;return d}function p(){l=e(u,c);if(t.dependsOnOwnProps)f=t(n,c);d=r(l,f,c);return d}function v(){if(e.dependsOnOwnProps)l=e(u,c);if(t.dependsOnOwnProps)f=t(n,c);d=r(l,f,c);return d}function m(){const t=e(u,c);const n=!a(t,l);l=t;if(n)d=r(l,f,c);return d}function y(e,t){const r=!o(t,c);const n=!i(e,u,t,c);u=e;c=t;if(r&&n)return p();if(r)return v();if(n)return m();return d}return function e(t,r){return s?y(t,r):h(t,r)}}function P(e,t){let{initMapStateToProps:r,initMapDispatchToProps:n,initMergeProps:i}=t,o=(0,I.A)(t,A);const a=r(e,o);const s=n(e,o);const u=i(e,o);if(false){}return O(a,s,u,e,o)}function x(e,t){const r={};for(const n in e){const i=e[n];if(typeof i==="function"){r[n]=(...e)=>t(i(...e))}}return r}function L(e){return function t(r){const n=e(r);function i(){return n}i.dependsOnOwnProps=false;return i}}function M(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):e.length!==1}function N(e,t){return function t(r,{displayName:n}){const i=function e(t,r){return i.dependsOnOwnProps?i.mapToProps(t,r):i.mapToProps(t,undefined)};i.dependsOnOwnProps=true;i.mapToProps=function t(r,n){i.mapToProps=e;i.dependsOnOwnProps=M(e);let o=i(r,n);if(typeof o==="function"){i.mapToProps=o;i.dependsOnOwnProps=M(o);o=i(r,n)}if(false){}return o};return i}}function D(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function j(e){return e&&typeof e==="object"?L((t=>x(e,t))):!e?L((e=>({dispatch:e}))):typeof e==="function"?N(e,"mapDispatchToProps"):D(e,"mapDispatchToProps")}function U(e){return!e?L((()=>({}))):typeof e==="function"?N(e,"mapStateToProps"):D(e,"mapStateToProps")}function V(e,t,r){return(0,T.A)({},r,e,t)}function W(e){return function t(r,{displayName:n,areMergedPropsEqual:i}){let o=false;let a;return function t(r,n,s){const u=e(r,n,s);if(o){if(!i(u,a))a=u}else{o=true;a=u;if(false){}}return a}}}function B(e){return!e?()=>V:typeof e==="function"?W(e):D(e,"mergeProps")}function G(){const e=c();let t=null;let r=null;return{clear(){t=null;r=null},notify(){e((()=>{let e=t;while(e){e.callback();e=e.next}}))},get(){let e=[];let r=t;while(r){e.push(r);r=r.next}return e},subscribe(e){let n=true;let i=r={callback:e,next:null,prev:r};if(i.prev){i.prev.next=i}else{t=i}return function e(){if(!n||t===null)return;n=false;if(i.next){i.next.prev=i.prev}else{r=i.prev}if(i.prev){i.prev.next=i.next}else{t=i.next}}}}}const Z={notify(){},get:()=>[]};function F(e,t){let r;let n=Z;let i=0;let o=false;function a(e){l();const t=n.subscribe(e);let r=false;return()=>{if(!r){r=true;t();f()}}}function s(){n.notify()}function u(){if(p.onStateChange){p.onStateChange()}}function c(){return o}function l(){i++;if(!r){r=t?t.addNestedSub(u):e.subscribe(u);n=G()}}function f(){i--;if(r&&i===0){r();r=undefined;n.clear();n=Z}}function d(){if(!o){o=true;l()}}function h(){if(o){o=false;f()}}const p={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return p}const H=!!(typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined");const X=H?l.useLayoutEffect:l.useEffect;function Y(e,t){if(e===t){return e!==0||t!==0||1/e===1/t}else{return e!==e&&t!==t}}function K(e,t){if(Y(e,t))return true;if(typeof e!=="object"||e===null||typeof t!=="object"||t===null){return false}const r=Object.keys(e);const n=Object.keys(t);if(r.length!==n.length)return false;for(let n=0;n<r.length;n++){if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Y(e[r[n]],t[r[n]])){return false}}return true}const z=["reactReduxForwardedRef"];let J=g;const Q=e=>{J=e};const q=null&&[null,0];const $=[null,null];const ee=e=>{try{return JSON.stringify(e)}catch(t){return String(e)}};function te(e,t,r){X((()=>e(...t)),r)}function re(e,t,r,n,i,o){e.current=n;r.current=false;if(i.current){i.current=null;o()}}function ne(e,t,r,n,i,o,a,s,u,c,l){if(!e)return()=>{};let f=false;let d=null;const h=()=>{if(f||!s.current){return}const e=t.getState();let r,h;try{r=n(e,i.current)}catch(e){h=e;d=e}if(!h){d=null}if(r===o.current){if(!a.current){c()}}else{o.current=r;u.current=r;a.current=true;l()}};r.onStateChange=h;r.trySubscribe();h();const p=()=>{f=true;r.tryUnsubscribe();r.onStateChange=null;if(d){throw d}};return p}const ie=()=>q;function oe(e,t){return e===t}let ae=false;function se(e,t,r,{pure:n,areStatesEqual:i=oe,areOwnPropsEqual:o=K,areStatePropsEqual:a=K,areMergedPropsEqual:s=K,forwardRef:u=false,context:c=p}={}){if(false){}const f=c;const d=U(e);const h=j(t);const v=B(r);const m=Boolean(e);const y=e=>{if(false){}const t=e.displayName||e.name||"Component";const r=`Connect(${t})`;const n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:h,initMergeProps:v,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function c(t){const[r,i,o]=l.useMemo((()=>{const{reactReduxForwardedRef:e}=t,r=(0,I.A)(t,z);return[t.context,e,r]}),[t]);const a=l.useMemo((()=>r&&r.Consumer&&(0,k.isContextConsumer)(l.createElement(r.Consumer,null))?r:f),[r,f]);const s=l.useContext(a);const u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch);const c=Boolean(s)&&Boolean(s.store);if(false){}const d=u?t.store:s.store;const h=c?s.getServerState:d.getState;const p=l.useMemo((()=>P(d.dispatch,n)),[d]);const[v,y]=l.useMemo((()=>{if(!m)return $;const e=F(d,u?undefined:s.subscription);const t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,u,s]);const g=l.useMemo((()=>{if(u){return s}return(0,T.A)({},s,{subscription:v})}),[u,s,v]);const b=l.useRef();const _=l.useRef(o);const S=l.useRef();const E=l.useRef(false);const w=l.useRef(false);const R=l.useRef(false);const C=l.useRef();X((()=>{R.current=true;return()=>{R.current=false}}),[]);const A=l.useMemo((()=>{const e=()=>{if(S.current&&o===_.current){return S.current}return p(d.getState(),o)};return e}),[d,o]);const O=l.useMemo((()=>{const e=e=>{if(!v){return()=>{}}return ne(m,d,v,p,_,b,E,R,S,y,e)};return e}),[v]);te(re,[_,b,E,o,S,y]);let x;try{x=J(O,A,h?()=>p(h(),o):A)}catch(e){if(C.current){e.message+=`\nThe error may be correlated with this previous error:\n${C.current.stack}\n\n`}throw e}X((()=>{C.current=undefined;S.current=undefined;b.current=x}));const L=l.useMemo((()=>l.createElement(e,(0,T.A)({},x,{ref:i}))),[i,e,x]);const M=l.useMemo((()=>{if(m){return l.createElement(a.Provider,{value:g},L)}return L}),[a,L,g]);return M}const p=l.memo(c);const y=p;y.WrappedComponent=e;y.displayName=c.displayName=r;if(u){const t=l.forwardRef((function e(t,r){return l.createElement(y,(0,T.A)({},t,{reactReduxForwardedRef:r}))}));const n=t;n.displayName=r;n.WrappedComponent=e;return C()(n,e)}return C()(y,e)};return y}const ue=se;function ce({store:e,context:t,children:r,serverState:n,stabilityCheck:i="once",noopCheck:o="once"}){const a=l.useMemo((()=>{const t=F(e);return{store:e,subscription:t,getServerState:n?()=>n:undefined,stabilityCheck:i,noopCheck:o}}),[e,n,i,o]);const s=l.useMemo((()=>e.getState()),[e]);X((()=>{const{subscription:t}=a;t.onStateChange=t.notifyNestedSubs;t.trySubscribe();if(s!==e.getState()){t.notifyNestedSubs()}return()=>{t.tryUnsubscribe();t.onStateChange=undefined}}),[a,s]);const u=t||p;return l.createElement(u.Provider,{value:a},r)}const le=ce;function fe(e=p){const t=e===p?y:m(e);return function e(){const{store:r}=t();return r}}const de=fe();function he(e=p){const t=e===p?de:fe(e);return function e(){const r=t();return r.dispatch}}const pe=he();_(i.useSyncExternalStoreWithSelector);Q(n.useSyncExternalStore);u(o.unstable_batchedUpdates)},69982:(e,t,r)=>{"use strict";if(true){e.exports=r(7463)}else{}},69988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SDKErrorCodeMsgMap=void 0;var n=r(11686);const i=t.SDKErrorCodeMsgMap={[n.SDKErrorCode.RTC_NOT_INIT]:"rtc not init",[n.SDKErrorCode.METHOD_PROHIBITED_EXECUTION]:"method prohibited execution",[n.SDKErrorCode.RTC_AUDIO_DEVICE_ERROR]:"audio device check error",[n.SDKErrorCode.UI_PARAM_ERROR]:"param error:%s is empty or incorrect",[n.SDKErrorCode.UI_NO_PARENT]:"container node no exist"}},70019:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(63009),r(51025))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=r.WordArray;var o=t.algo;var a=o.SHA256;var s=o.HMAC;var u=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var r=this.cfg;var n=s.create(r.hasher,e);var o=i.create();var a=i.create([1]);var u=o.words;var c=a.words;var l=r.keySize;var f=r.iterations;while(u.length<l){var d=n.update(t).finalize(a);n.reset();var h=d.words;var p=h.length;var v=d;for(var m=1;m<f;m++){v=n.finalize(v);n.reset();var y=v.words;for(var g=0;g<p;g++){h[g]^=y[g]}}o.concat(d);c[0]++}o.sigBytes=l*4;return o}});t.PBKDF2=function(e,t,r){return u.create(r).compute(e,t)}})();return e.PBKDF2}))},70025:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.CipherParams;var o=r.enc;var a=o.Hex;var s=r.format;var u=s.Hex={stringify:function(e){return e.ciphertext.toString(a)},parse:function(e){var t=a.parse(e);return i.create({ciphertext:t})}}})();return e.format.Hex}))},70081:(e,t,r)=>{"use strict";var n=r(69565);var i=r(79306);var o=r(28551);var a=r(16823);var s=r(50851);var u=TypeError;e.exports=function(e,t){var r=arguments.length<2?s(e):t;if(i(r))return o(n(r,e));throw new u(a(e)+" is not iterable")}},70259:(e,t,r)=>{"use strict";var n=r(34376);var i=r(26198);var o=r(96837);var a=r(76080);var s=function(e,t,r,u,c,l,f,d){var h=c;var p=0;var v=f?a(f,d):false;var m,y;while(p<u){if(p in r){m=v?v(r[p],p,t):r[p];if(l>0&&n(m)){y=i(m);h=s(e,t,m,y,h,l-1)-1}else{o(h+1);e[h]=m}h++}p++}return h};e.exports=s},70380:(e,t,r)=>{"use strict";var n=r(79504);var i=r(79039);var o=r(60533).start;var a=RangeError;var s=isFinite;var u=Math.abs;var c=Date.prototype;var l=c.toISOString;var f=n(c.getTime);var d=n(c.getUTCDate);var h=n(c.getUTCFullYear);var p=n(c.getUTCHours);var v=n(c.getUTCMilliseconds);var m=n(c.getUTCMinutes);var y=n(c.getUTCMonth);var g=n(c.getUTCSeconds);e.exports=i((function(){return l.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"}))||!i((function(){l.call(new Date(NaN))}))?function e(){if(!s(f(this)))throw new a("Invalid time value");var t=this;var r=h(t);var n=v(t);var i=r<0?"-":r>9999?"+":"";return i+o(u(r),i?6:4,0)+"-"+o(y(t)+1,2,0)+"-"+o(d(t),2,0)+"T"+o(p(t),2,0)+":"+o(m(t),2,0)+":"+o(g(t),2,0)+"."+o(n,3,0)+"Z"}:l},70487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ThirdPartyStat=void 0;var n=r(44104);var i=r(21013);var o=r(63226);var a=r(44772);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let d=t.ThirdPartyStat=function(){function e(t){s(this,e);this.videoFrameNum=0;this.audioFrameNum=0;this.audioDrawFrameNum=0;this.preVideoFrameNum=0;this.preAudioFrameNum=0;this.preAudioDrawFrameNum=0;this.statTimer=new a.Timer;this.interval=5e3;this.module="ThirdPartyStat";this.module=t;this.statTask=new a.Timer.TimerTask(this.calcStat.bind(this));this.logger=new n.Log({module:`ThirdPartyStat-${this.module}`})}return c(e,[{key:"calcStat",value:function e(){const t=Date.now();if(this.preCalcTime){i.UserTrack.addUserTrack({arg1:o.Arg1Map.THIRD_PARTY_STAT,arg2:this.module,args:{message:JSON.stringify({videoFrameRate:1e3/(t-this.preCalcTime)*(this.videoFrameNum-this.preVideoFrameNum),audioFrameRate:1e3/(t-this.preCalcTime)*(this.audioFrameNum-this.preAudioFrameNum),videoDrawFrameRate:1e3/(t-this.preCalcTime)*(this.audioDrawFrameNum-this.preAudioDrawFrameNum),customRecordInfo:this.customRecordInfo})}})}this.preCalcTime=t;this.preVideoFrameNum=this.videoFrameNum;this.preAudioFrameNum=this.audioFrameNum;this.preAudioDrawFrameNum=this.audioDrawFrameNum}},{key:"reset",value:function e(){this.logger.info("reset");this.videoFrameNum=0;this.audioFrameNum=0;this.audioDrawFrameNum=0;this.preCalcTime=undefined;this.preVideoFrameNum=0;this.preAudioFrameNum=0;this.preAudioDrawFrameNum=0;this.statTimer.cancel()}},{key:"audioIncrease",value:function e(){this.audioFrameNum++}},{key:"videoIncrease",value:function e(){this.videoFrameNum++}},{key:"videoDrawIncrease",value:function e(){this.audioDrawFrameNum++}},{key:"updateCustomRecordInfo",value:function e(t){this.customRecordInfo=t}},{key:"start",value:function e(){this.logger.info("start");this.statTimer.cancel().schedule(this.statTask,this.interval)}}])}()},70511:(e,t,r)=>{"use strict";var n=r(19167);var i=r(39297);var o=r(1951);var a=r(24913).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});if(!i(t,e))a(t,e,{value:o.f(e)})}},70597:(e,t,r)=>{"use strict";var n=r(79039);var i=r(78227);var o=r(39519);var a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];var r=t.constructor={};r[a]=function(){return{foo:1}};return t[e](Boolean).foo!==1}))}},70761:(e,t,r)=>{"use strict";var n=r(46518);var i=r(80741);n({target:"Math",stat:true},{trunc:i})},71072:(e,t,r)=>{"use strict";var n=r(61828);var i=r(88727);e.exports=Object.keys||function e(t){return n(t,i)}},71137:(e,t,r)=>{"use strict";var n=r(46518);var i=r(35031);n({target:"Reflect",stat:true},{ownKeys:i})},71288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WebrtcTrack=void 0;var n=r(44772);var i=r(21013);var o=r(63226);var a=r(44104);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const h=new a.Log({module:"HwICS.WebrtcTrack"});const p=(e,t)=>i.UserTrack.addUserTrack({arg1:o.Arg1Map.SPARK_RTC,arg2:e,args:{message:JSON.stringify(t)}});let v=t.WebrtcTrack=function(){function e(){s(this,e)}return c(e,[{key:"removedStreamEvent",value:function e(t){return this._streamEvent("stream-removed",t)}},{key:"addStreamEvent",value:function e(t){return this._streamEvent("stream-added",t)}},{key:"updatedStreamEvent",value:function e(t){return this._streamEvent("stream-updated",t)}},{key:"subscribedStreamEvent",value:function e(t){return this._streamEvent("stream-subscribed",t)}},{key:"errorEvent",value:function e(t){p("Error",t)}},{key:"clientBanned",value:function e({reason:t,userId:r}){p("client-banned",{reason:t,userId:r})}},{key:"peerLeaveEvent",value:function e({reason:t,userId:r,userName:n}){p("peer-leave",{reason:t,userId:r,userName:n})}},{key:"kickRoomEvent",value:function e(t){p("kick-room",t)}},{key:"signatureExpiredEvent",value:function e(t){p("signature-expired",t)}},{key:"mediaConnectionStateChangedEvent",value:function e(t){p("media-connection-state-changed",t)}},{key:"networkQualityEvent",value:function e(t){p("network-quality",t)}},{key:"addListener",value:function e(t){if(t){t.on("stream-interrupted",this.interruptedStreamEvent);t.on("cmd-msg-received",this.cmdMsgReceived);t.on("connection-state-changed",this.connectionStateChanged);t.on("mute-audio",this.muteAudioEvent);t.on("unmute-audio",this.unmuteAudioEvent);t.on("mute-video",this.muteVideoEvent);t.on("unmute-video",this.unmuteVideoEvent);t.on("recording-device-changed",this.recordingDeviceChangedEvent);t.on("playback-device-changed",this.playbackDeviceChangedEvent);t.on("stream-recovered",this.streamRecoveredEvent);t.on("media-connection-state-changed",this.mediaConnectionStateChangedEvent);t.on("room-stream-status",this.roomStreamStatusEvent);t.on("network-quality",this.networkQualityEvent)}}},{key:"removeListener",value:function e(t){if(t){t.off("stream-interrupted",this.interruptedStreamEvent);t.off("cmd-msg-received",this.cmdMsgReceived);t.off("connection-state-changed",this.connectionStateChanged);t.off("mute-audio",this.muteAudioEvent);t.off("unmute-audio",this.unmuteAudioEvent);t.off("mute-video",this.muteVideoEvent);t.off("unmute-video",this.unmuteVideoEvent);t.off("recording-device-changed",this.recordingDeviceChangedEvent);t.off("playback-device-changed",this.playbackDeviceChangedEvent);t.off("stream-recovered",this.streamRecoveredEvent);t.off("media-connection-state-changed",this.mediaConnectionStateChangedEvent);t.off("room-stream-status",this.roomStreamStatusEvent);t.off("network-quality",this.networkQualityEvent)}}},{key:"_streamEvent",value:function e(t,r){p(t,{userId:r.stream.getUserId(),type:r.stream.getType()})}},{key:"rtcStatsEvent",value:function e(t){p("rtc-stats",t)}},{key:"cmdMsgReceived",value:function e({msg:t}){p("cmd-msg-received",{msg:t})}},{key:"connectionStateChanged",value:function e({prevState:t,curState:r,code:n,reason:i}){p("connection-state-changed",{prevState:t,curState:r,code:n,reason:i})}},{key:"peerJoinEvent",value:function e({userId:t,userName:r}){p("peer-join",{userId:t,userName:r})}},{key:"muteAudioEvent",value:function e(t){p("mute-audio",t)}},{key:"unmuteAudioEvent",value:function e(t){p("unmute-audio",t)}},{key:"muteVideoEvent",value:function e(t){p("mute-video",t)}},{key:"unmuteVideoEvent",value:function e(t){p("unmute-video",t)}},{key:"recordingDeviceChangedEvent",value:function e(t){p("recording-device-changed",t)}},{key:"playbackDeviceChangedEvent",value:function e(t){p("playback-device-changed",t)}},{key:"streamRecoveredEvent",value:function e(t){p("stream-recovered",t)}},{key:"interruptedStreamEvent",value:function e(t){p("stream-interrupted",t)}},{key:"roomStreamStatusEvent",value:function e(t){p("room-stream-status",t)}}])}();d([(0,n.printfDecorator)(h)],v.prototype,"errorEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"clientBanned",null);d([(0,n.printfDecorator)(h)],v.prototype,"peerLeaveEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"kickRoomEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"signatureExpiredEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"mediaConnectionStateChangedEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"networkQualityEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"addListener",null);d([(0,n.printfDecorator)(h)],v.prototype,"removeListener",null);d([(0,n.printfDecorator)(h)],v.prototype,"cmdMsgReceived",null);d([(0,n.printfDecorator)(h)],v.prototype,"connectionStateChanged",null);d([(0,n.printfDecorator)(h)],v.prototype,"peerJoinEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"muteAudioEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"unmuteAudioEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"muteVideoEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"unmuteVideoEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"recordingDeviceChangedEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"playbackDeviceChangedEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"streamRecoveredEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"interruptedStreamEvent",null);d([(0,n.printfDecorator)(h)],v.prototype,"roomStreamStatusEvent",null)},71658:(e,t,r)=>{"use strict";var n=r(46518);var i=r(6469);var o=r(96837);var a=r(26198);var s=r(35610);var u=r(25397);var c=r(91291);var l=Array;var f=Math.max;var d=Math.min;n({target:"Array",proto:true},{toSpliced:function e(t,r){var n=u(this);var i=a(n);var h=s(t,i);var p=arguments.length;var v=0;var m,y,g,b;if(p===0){m=y=0}else if(p===1){m=0;y=i-h}else{m=p-2;y=d(f(c(r),0),i-h)}g=o(i+m-y);b=l(g);for(;v<h;v++)b[v]=n[v];for(;v<h+m;v++)b[v]=arguments[v-h+2];for(;v<g;v++)b[v]=n[v+y-m];return b}});i("toSpliced")},71678:(e,t,r)=>{"use strict";var n=r(96395);var i=r(46518);var o=r(44576);var a=r(97751);var s=r(79504);var u=r(79039);var c=r(33392);var l=r(94901);var f=r(33517);var d=r(64117);var h=r(20034);var p=r(10757);var v=r(72652);var m=r(28551);var y=r(36955);var g=r(39297);var b=r(97040);var _=r(66699);var S=r(26198);var E=r(22812);var w=r(61034);var T=r(72248);var I=r(94402);var R=r(38469);var C=r(94483);var k=r(24659);var A=r(1548);var O=o.Object;var P=o.Array;var x=o.Date;var L=o.Error;var M=o.TypeError;var N=o.PerformanceMark;var D=a("DOMException");var j=T.Map;var U=T.has;var V=T.get;var W=T.set;var B=I.Set;var G=I.add;var Z=I.has;var F=a("Object","keys");var H=s([].push);var X=s(true.valueOf);var Y=s(1..valueOf);var K=s("".valueOf);var z=s(x.prototype.getTime);var J=c("structuredClone");var Q="DataCloneError";var q="Transferring";var $=function(e){return!u((function(){var t=new o.Set([7]);var r=e(t);var n=e(O(7));return r===t||!r.has(7)||!h(n)||+n!==7}))&&e};var ee=function(e,t){return!u((function(){var r=new t;var n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)}))};var te=function(e){return!u((function(){var t=e(new o.AggregateError([1],J,{cause:3}));return t.name!=="AggregateError"||t.errors[0]!==1||t.message!==J||t.cause!==3}))};var re=o.structuredClone;var ne=n||!ee(re,L)||!ee(re,D)||!te(re);var ie=!re&&$((function(e){return new N(J,{detail:e}).detail}));var oe=$(re)||ie;var ae=function(e){throw new D("Uncloneable type: "+e,Q)};var se=function(e,t){throw new D((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",Q)};var ue=function(e,t){if(!oe)se(t);return oe(e)};var ce=function(){var e;try{e=new o.DataTransfer}catch(t){try{e=new o.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null};var le=function(e,t,r){if(U(t,e))return V(t,e);var n=r||y(e);var i,a,s,u,c,f;if(n==="SharedArrayBuffer"){if(oe)i=oe(e);else i=e}else{var d=o.DataView;if(!d&&!l(e.slice))se("ArrayBuffer");try{if(l(e.slice)&&!e.resizable){i=e.slice(0)}else{a=e.byteLength;s="maxByteLength"in e?{maxByteLength:e.maxByteLength}:undefined;i=new ArrayBuffer(a,s);u=new d(e);c=new d(i);for(f=0;f<a;f++){c.setUint8(f,u.getUint8(f))}}}catch(e){throw new D("ArrayBuffer is detached",Q)}}W(t,e,i);return i};var fe=function(e,t,r,n,i){var a=o[t];if(!h(a))se(t);return new a(le(e.buffer,i),r,n)};var de=function(e,t){if(p(e))ae("Symbol");if(!h(e))return e;if(t){if(U(t,e))return V(t,e)}else t=new j;var r=y(e);var n,i,s,u,c,f,d,v;switch(r){case"Array":s=P(S(e));break;case"Object":s={};break;case"Map":s=new j;break;case"Set":s=new B;break;case"RegExp":s=new RegExp(e.source,w(e));break;case"Error":i=e.name;switch(i){case"AggregateError":s=new(a(i))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":s=new(a(i));break;case"CompileError":case"LinkError":case"RuntimeError":s=new(a("WebAssembly",i));break;default:s=new L}break;case"DOMException":s=new D(e.message,e.name);break;case"ArrayBuffer":case"SharedArrayBuffer":s=le(e,t,r);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":f=r==="DataView"?e.byteLength:e.length;s=fe(e,r,e.byteOffset,f,t);break;case"DOMQuad":try{s=new DOMQuad(de(e.p1,t),de(e.p2,t),de(e.p3,t),de(e.p4,t))}catch(t){s=ue(e,r)}break;case"File":if(oe)try{s=oe(e);if(y(s)!==r)s=undefined}catch(e){}if(!s)try{s=new File([e],e.name,e)}catch(e){}if(!s)se(r);break;case"FileList":u=ce();if(u){for(c=0,f=S(e);c<f;c++){u.items.add(de(e[c],t))}s=u.files}else s=ue(e,r);break;case"ImageData":try{s=new ImageData(de(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){s=ue(e,r)}break;default:if(oe){s=oe(e)}else switch(r){case"BigInt":s=O(e.valueOf());break;case"Boolean":s=O(X(e));break;case"Number":s=O(Y(e));break;case"String":s=O(K(e));break;case"Date":s=new x(z(e));break;case"Blob":try{s=e.slice(0,e.size,e.type)}catch(e){se(r)}break;case"DOMPoint":case"DOMPointReadOnly":n=o[r];try{s=n.fromPoint?n.fromPoint(e):new n(e.x,e.y,e.z,e.w)}catch(e){se(r)}break;case"DOMRect":case"DOMRectReadOnly":n=o[r];try{s=n.fromRect?n.fromRect(e):new n(e.x,e.y,e.width,e.height)}catch(e){se(r)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=o[r];try{s=n.fromMatrix?n.fromMatrix(e):new n(e)}catch(e){se(r)}break;case"AudioData":case"VideoFrame":if(!l(e.clone))se(r);try{s=e.clone()}catch(e){ae(r)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":se(r);default:ae(r)}}W(t,e,s);switch(r){case"Array":case"Object":d=F(e);for(c=0,f=S(d);c<f;c++){v=d[c];b(s,v,de(e[v],t))}break;case"Map":e.forEach((function(e,r){W(s,de(r,t),de(e,t))}));break;case"Set":e.forEach((function(e){G(s,de(e,t))}));break;case"Error":_(s,"message",de(e.message,t));if(g(e,"cause")){_(s,"cause",de(e.cause,t))}if(i==="AggregateError"){s.errors=de(e.errors,t)}else if(i==="SuppressedError"){s.error=de(e.error,t);s.suppressed=de(e.suppressed,t)}case"DOMException":if(k){_(s,"stack",de(e.stack,t))}}return s};var he=function(e,t){if(!h(e))throw new M("Transfer option cannot be converted to a sequence");var r=[];v(e,(function(e){H(r,m(e))}));var n=0;var i=S(r);var a=new B;var s,u,c,d,p,g;while(n<i){s=r[n++];u=y(s);if(u==="ArrayBuffer"?Z(a,s):U(t,s)){throw new D("Duplicate transferable",Q)}if(u==="ArrayBuffer"){G(a,s);continue}if(A){d=re(s,{transfer:[s]})}else switch(u){case"ImageBitmap":c=o.OffscreenCanvas;if(!f(c))se(u,q);try{p=new c(s.width,s.height);g=p.getContext("bitmaprenderer");g.transferFromImageBitmap(s);d=p.transferToImageBitmap()}catch(e){}break;case"AudioData":case"VideoFrame":if(!l(s.clone)||!l(s.close))se(u,q);try{d=s.clone();s.close()}catch(e){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":se(u,q)}if(d===undefined)throw new D("This object cannot be transferred: "+u,Q);W(t,s,d)}return a};var pe=function(e){R(e,(function(e){if(A){oe(e,{transfer:[e]})}else if(l(e.transfer)){e.transfer()}else if(C){C(e)}else{se("ArrayBuffer",q)}}))};i({global:true,enumerable:true,sham:!A,forced:ne},{structuredClone:function e(t){var r=E(arguments.length,1)>1&&!d(arguments[1])?m(arguments[1]):undefined;var n=r?r.transfer:undefined;var i,o;if(n!==undefined){i=new j;o=he(n,i)}var a=de(t,i);if(o)pe(o);return a}})},71761:(e,t,r)=>{"use strict";var n=r(69565);var i=r(89228);var o=r(28551);var a=r(20034);var s=r(18014);var u=r(655);var c=r(67750);var l=r(55966);var f=r(57829);var d=r(56682);i("match",(function(e,t,r){return[function t(r){var i=c(this);var o=a(r)?l(r,e):undefined;return o?n(o,r,i):new RegExp(r)[e](u(i))},function(e){var n=o(this);var i=u(e);var a=r(t,n,i);if(a.done)return a.value;if(!n.global)return d(n,i);var c=n.unicode;n.lastIndex=0;var l=[];var h=0;var p;while((p=d(n,i))!==null){var v=u(p[0]);l[h]=v;if(v==="")n.lastIndex=f(i,s(n.lastIndex),c);h++}return h===0?null:l}]}))},72044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(4015);var i=d(r(75540));var o=r(69733);var a=r(44772);var s=r(30455);var u=r(50306);var c=r(44104);var l=r(94855);var f=r(44246);function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r){return t=E(t),b(e,S()?Reflect.construct(t,r||[],E(e).constructor):t.apply(e,r))}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var I=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const R=new c.Log({module:"HwICS.UI.ErrorPage"});let C=function(e){function t(e){var r;h(this,t);r=g(this,t,[e]);r._pageName="ErrorPage";r._getError=()=>{const{httpError:e,websocketError:t,sparkRTCError:n}=r.props;const i=t||e||n;return i};r._getText=e=>{var t,n,i,o,a,s;R.info(e,"copy start");const u=r.state.error;const c={jobId:(t=l.ConfigManager.getChatInfo(e))===null||t===void 0?void 0:t.job_id,robotId:l.ConfigManager.getRobotId(e),timeStamp:Date.now(),host:(n=l.ConfigManager.getBaseUrl())===null||n===void 0?void 0:n.host,error_code:u===null||u===void 0?void 0:u.error_code,error_msg:u===null||u===void 0?void 0:u.error_msg,request_id:u===null||u===void 0?void 0:u.request_id,error_data:{errorMessage:u===null||u===void 0?void 0:(i=u.data)===null||i===void 0?void 0:(o=i[0])===null||o===void 0?void 0:o.errorMessage,parameter:u===null||u===void 0?void 0:(a=u.data)===null||a===void 0?void 0:(s=a[0])===null||s===void 0?void 0:s.parameter}};return JSON.stringify(c)};r._copyErrorInfo=()=>{const{language:e}=r.props;const t="_copyErrorInfo";R.info(t,"init");const n=r._getText(t);a.Clipboard.copyTextToClipboard(n).then((()=>{R.info(t,"copy success");(0,u.Toast)({content:e.copySuccess})})).catch((r=>{R.info(t,"copy error:",JSON.stringify(r));(0,u.Toast)({content:e.copyFail})}))};r._fresh=()=>{R.info("_fresh");location.reload()};r.state={};return r}w(t,e);return v(t,[{key:"componentDidUpdate",value:function e(){const t=this._getError();if(t!==this.state.error&&(!this.state.error||!t)){this.setState({error:t});t?f.HWIcsElectron.hideAdvertiseMoreInfo("has new error"):f.HWIcsElectron.showAdvertiseMoreInfo("no error")}}},{key:"render",value:function e(){const{showCaError:t,language:r,caErrorUrl:i,showErrorPage:o}=this.props;const a=this.state.error;if(!(a!==null&&a!==void 0&&a.error_code)){return null}if(!o){return null}return(0,n.jsxs)("div",{className:"error-page",children:[(0,n.jsxs)("div",{className:"error-ico",children:[(0,n.jsx)("div",{className:"tip",children:(0,s.getErrorMessage)({errorCode:a===null||a===void 0?void 0:a.error_code})}),(0,n.jsxs)("div",{"data-testid":"error-page-copy",className:"tip with-copy",onClick:this._copyErrorInfo,children:[a===null||a===void 0?void 0:a.error_code,(0,n.jsx)("div",{className:"error-copy-info",children:r.copyErrorInfo})]}),t&&i&&(0,n.jsx)("a",{className:"error-link",target:"_blank",href:i,children:i})]}),(0,n.jsx)(u.Button,{className:"error-btn",onClick:this._fresh,dataTestid:"error-page-refresh",children:r.refresh})]})}}])}(i.default);C=I([(0,a.componentDecorator)(R)],C);const k=e=>({httpError:e.error.httpError,sparkRTCError:e.error.sparkRTCError,websocketError:e.error.websocketError,showCaError:e.error.showCaError,caErrorUrl:e.error.caErrorUrl,language:e.lang.language,showErrorPage:e.error.showErrorPage});var A=t["default"]=(0,o.connect)(k)(C)},72107:(e,t,r)=>{"use strict";var n=r(15823);n("Int16",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},72152:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=Math.imul;var a=i((function(){return o(4294967295,5)!==-5||o.length!==2}));n({target:"Math",stat:true,forced:a},{imul:function e(t,r){var n=65535;var i=+t;var o=+r;var a=n&i;var s=n&o;return 0|a*s+((n&i>>>16)*s+a*(n&o>>>16)<<16>>>0)}})},72170:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).every;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("every",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},72248:(e,t,r)=>{"use strict";var n=r(79504);var i=Map.prototype;e.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i["delete"]),proto:i}},72333:(e,t,r)=>{"use strict";var n=r(91291);var i=r(655);var o=r(67750);var a=RangeError;e.exports=function e(t){var r=i(o(this));var s="";var u=n(t);if(u<0||u===Infinity)throw new a("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(r+=r))if(u&1)s+=r;return s}},72640:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PortalWssManager=void 0;var n=r(44772);var i=r(26440);var o=r(43260);var a=r(75625);var s=r(44086);var u=r(32681);var c=r(61347);var l=r(44104);var f=r(94855);var d=r(39595);var h=r(55798);var p=r(6630);var v=r(89906);var m=r(30455);var y=r(95633);var g=r(11686);var b=r(44246);var _=r(40159);var S=r(25127);var E=r(95739);var w=r(46677);var T=r(82118);var I=r(37857);var R=r(84743);var C=r(40494);var k=r(76264);var A=r(15029);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return(t=D(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,D(n.key),n)}}function N(e,t,r){return t&&M(e.prototype,t),r&&M(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D(e){var t=j(e,"string");return"symbol"==typeof t?t:t+""}function j(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const V=new l.Log({module:"HwICS.PortalWssManager"});const W=[h.CloudWssAction.INTERRUPT,h.CloudWssAction.INTERRUPT_RESULT,h.CloudWssAction.START_CHAT,h.CloudWssAction.START_CHAT_RSP,h.CloudWssAction.STOP_CHAT,h.CloudWssAction.STOP_CHAT_RSP];var B;(function(e){e["SPEAKING"]="SPEAKING";e["NOT_SPEAKING"]="NOT_SPEAKING"})(B||(B={}));var G;(function(e){e["SUCCESS"]="success";e["WAIT"]="wait";e["FAIL"]="fail"})(G||(G={}));const Z=[" "," "," ","\t","\n","‹","\f","\r","","","",""];const F=e=>{if(!e.is_last){return}const t=e.chat_id;const r=(0,i.$getState)().caption.captionList;const n=r[r.length-1];if(!n||!n.text||!n.chatId||n.chatId!==t){return}const o=n.text.split("").filter((e=>!Z.includes(e))).join("");const a=S.XssManager.getRenderNode(o);const s=E.RichTextUtils.textToTextContent(o);const c=E.RichTextUtils.hasMedia(a);if(!s&&c){(0,i.$dispatch)((0,u.addShowAnswerChatIdList)(t));(0,i.$dispatch)((0,u.updateShowAllContentChatId)(t))}};let H=t.PortalWssManager=function(){function e(){L(this,e);this.chatId="";this.sessionId="";this._synManager=new n.Timer;this._canSynChatState=true;this.websocketManager=new y.WebsocketManager({onmessage:this._handleNoCallbackMsg.bind(this)})}return N(e,[{key:"closeOldWebsocket",value:function e(t){var r;t+=",closeOldWebsocket";(r=this.websocketManager)===null||r===void 0?void 0:r.destroy(t)}},{key:"initWebsocket",value:function e(t){var r;t+=",openWebsocket";(r=this.websocketManager)===null||r===void 0?void 0:r.init(t)}},{key:"startChat",value:async function e({entry:t="",interactionMode:r,wakeupType:n}){t+=",startChat";const{chatBtnState:s}=(0,i.$getState)().main;if(s!==d.ChatBtnState.INIT&&s!==d.ChatBtnState.STOPPING&&s!==d.ChatBtnState.LOADING){V.info("startChat","now is not sleep, do nothing");return{result:true,errorCode:a.RetCodes.SUCCESS,errorMsg:"",chatId:this.chatId,sessionId:this.sessionId}}(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.LOADING));const u=await this.websocketManager.send({param:{action:h.CloudWssAction.START_CHAT,interaction_mode:r,wakeup_type:n},rsp_action:h.CloudWssAction.START_CHAT_RSP,entry:t});this.handleResult(u);if((u===null||u===void 0?void 0:u.error_code)!==a.RetCodes.SUCCESS){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.INIT));return{result:false,chatId:"",errorCode:u===null||u===void 0?void 0:u.error_code,errorMsg:u===null||u===void 0?void 0:u.error_msg}}b.HWIcsElectron.hideAdvertise(t);(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.PLAY));T.NotifyManager.sendEnterActive(t);this.chatId=u.chat_id||"";this.sessionId=u.session_id||"";return{result:true,errorCode:u===null||u===void 0?void 0:u.error_code,errorMsg:u===null||u===void 0?void 0:u.error_msg,chatId:this.chatId,sessionId:this.sessionId}}},{key:"stopChat",value:async function e({entry:t,needErrorDeal:r=true}){var n;t+=",stopChat";V.info("stopChat send bef");const{chatBtnState:s}=(0,i.$getState)().main;if(s===d.ChatBtnState.INIT){V.info("stopChat","now is sleep, do nothing");return{result:true,errorCode:a.RetCodes.SUCCESS,errorMsg:"",chatId:this.chatId,sessionId:this.sessionId}}(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.STOPPING));const u=await this.websocketManager.send({param:{job_id:(n=f.ConfigManager.getChatInfo(t))===null||n===void 0?void 0:n.job_id,action:h.CloudWssAction.STOP_CHAT,chat_id:this.chatId},rsp_action:h.CloudWssAction.STOP_CHAT_RSP,entry:t});V.info("stopChat send aft",u);r&&this.handleResult(u);return{result:(u===null||u===void 0?void 0:u.error_code)===a.RetCodes.SUCCESS,errorCode:u===null||u===void 0?void 0:u.error_code,errorMsg:u===null||u===void 0?void 0:u.error_msg,chatId:this.chatId}}},{key:"stopJob",value:async function e(t){var r;t+=",stopJob";V.info("stopJob send bef");const n=await this.websocketManager.send({param:{job_id:(r=f.ConfigManager.getChatInfo(t))===null||r===void 0?void 0:r.job_id,action:h.CloudWssAction.STOP_JOB,chat_id:this.chatId},rsp_action:h.CloudWssAction.STOP_JOB_RSP,entry:t});V.info("stopJob send aft",n);this.handleResult(n);return{result:(n===null||n===void 0?void 0:n.error_code)===a.RetCodes.SUCCESS,errorCode:n===null||n===void 0?void 0:n.error_code,errorMsg:n===null||n===void 0?void 0:n.error_msg,chatId:this.chatId}}},{key:"interruptSpeaking",value:async function e(t){t+=",interruptSpeaking";try{var r;const e=this.chatId;const n=await this.websocketManager.send({param:{job_id:(r=f.ConfigManager.getChatInfo(t))===null||r===void 0?void 0:r.job_id,action:h.CloudWssAction.INTERRUPT,chat_id:e},rsp_action:h.CloudWssAction.INTERRUPT_RESULT,entry:t});this.handleResult(n);if((n===null||n===void 0?void 0:n.error_code)===a.RetCodes.SUCCESS){(0,i.$dispatch)((0,u.addShowAnswerChatIdList)(e));(0,i.$dispatch)((0,u.updateShowAllContentChatId)(e));(0,i.$dispatch)((0,u.removeWaitingMessage)());const{chatBtnState:t}=(0,i.$getState)().main;if(t===d.ChatBtnState.THINKING){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.PLAY))}return{result:true}}return{result:false,errorCode:n===null||n===void 0?void 0:n.error_code,errorMsg:n===null||n===void 0?void 0:n.error_msg}}catch(e){V.error("interruptSpeaking",t,e);return{result:false,errorCode:g.SDKErrorCode.RTC_PROMISE_ERROR,errorMsg:e===null||e===void 0?void 0:e.toString()}}}},{key:"activeInteractionMode",value:async function e(t){t+=",activeInteractionMode";const r=await this.websocketManager.send({param:{action:h.CloudWssAction.ACTIVE_INTERACTION_MODE},rsp_action:h.CloudWssAction.ACTIVE_INTERACTION_MODE_RSP,entry:t});this.handleResult(r);return{result:(r===null||r===void 0?void 0:r.error_code)===a.RetCodes.SUCCESS,errorCode:r===null||r===void 0?void 0:r.error_code,errorMsg:r===null||r===void 0?void 0:r.error_msg,interactionMode:r===null||r===void 0?void 0:r.interaction_mode}}},{key:"interactionModeSwitch",value:async function e({entry:t,interactionMode:r}){t+=",interactionModeSwitch";const n=await this.websocketManager.send({param:{action:h.CloudWssAction.INTERACTION_MODE_SWITCH,interaction_mode:r},rsp_action:h.CloudWssAction.INTERACTION_MODE_SWITCH_RSP,entry:t});this.handleResult(n);return{result:(n===null||n===void 0?void 0:n.error_code)===a.RetCodes.SUCCESS,errorCode:n===null||n===void 0?void 0:n.error_code,errorMsg:n===null||n===void 0?void 0:n.error_msg,interactionMode:n===null||n===void 0?void 0:n.interaction_mode}}},{key:"textQuestion",value:async function e({entry:t,text:r,questionParam:n}){t+=",textQuestion";const s=await this.websocketManager.send({param:{action:h.CloudWssAction.TEXT_QUESTION,text:r,question_param:n},rsp_action:h.CloudWssAction.TEXT_QUESTION_RSP,entry:t});this.handleResult(s);if((s===null||s===void 0?void 0:s.error_code)===a.RetCodes.SUCCESS){this.chatId=s.chat_id||"";const e={text:r,isLast:true,resultId:0,chatId:this.chatId,requestId:s.request_id||"",messageType:c.CaptionMessageType.QUESTION,timestamp:Date.now()};(0,i.$dispatch)((0,u.updateCaptionMessageList)([e]));const{chatBtnState:t}=(0,i.$getState)().main;if(t===d.ChatBtnState.PLAY){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.THINKING))}}return{result:(s===null||s===void 0?void 0:s.error_code)===a.RetCodes.SUCCESS,errorCode:s===null||s===void 0?void 0:s.error_code,errorMsg:s===null||s===void 0?void 0:s.error_msg,chatId:this.chatId}}},{key:"changeLanguage",value:async function e({entry:t,langCode:r,needErrorDeal:n=true}){t+=",changeLanguage";try{var i;if(!r){V.error(t,"langCode is empty");return(0,s.formatParamError)("langCode")}const e=await this.websocketManager.send({param:{job_id:(i=f.ConfigManager.getChatInfo(t))===null||i===void 0?void 0:i.job_id,action:h.CloudWssAction.LANGUAGE_CHANGE,chat_id:this.chatId,language:w.Webclient2VoiceLanguage[r]||r},rsp_action:h.CloudWssAction.LANGUAGE_CHANGE_RSP,entry:t});n&&this.handleResult(e);if((e===null||e===void 0?void 0:e.error_code)===a.RetCodes.SUCCESS){return{result:true}}return{result:false,errorCode:e===null||e===void 0?void 0:e.error_code,errorMsg:e===null||e===void 0?void 0:e.error_msg}}catch(e){V.error("changeLanguage",t,e);return{result:false,errorCode:g.SDKErrorCode.RTC_PROMISE_ERROR,errorMsg:e===null||e===void 0?void 0:e.toString()}}}},{key:"textDriven",value:async function e({entry:t,text:r,isLast:n=true,chatId:i}){t+=",textDriven";const o=await this.websocketManager.send({param:{action:h.CloudWssAction.TEXT_DRIVE,text:r,is_last:n,chat_id:i},rsp_action:h.CloudWssAction.TEXT_DRIVE_RSP,entry:t});this.handleResult(o);if((o===null||o===void 0?void 0:o.error_code)===a.RetCodes.SUCCESS){this.chatId=o.chat_id||""}return{result:(o===null||o===void 0?void 0:o.error_code)===a.RetCodes.SUCCESS,errorCode:o===null||o===void 0?void 0:o.error_code,errorMsg:o===null||o===void 0?void 0:o.error_msg,chatId:this.chatId}}},{key:"checkCanSynChatState",value:function e(){return this._canSynChatState}},{key:"synChatState",value:function e(t,r){const{chatBtnState:n}=(0,i.$getState)().main;V.debug("synChatState",r,t,this._canSynChatState,n);if(!this.checkCanSynChatState()){return}switch(t){case B.SPEAKING:if(n===d.ChatBtnState.PLAY){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.ANSWERING))}break;case B.NOT_SPEAKING:if(n===d.ChatBtnState.ANSWERING){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.PLAY))}break;default:break}}},{key:"recordStop",value:function e(t){t+=",recordStop";const{chatBtnState:r}=(0,i.$getState)().main;if(r!==d.ChatBtnState.INIT){V.info(t,r);if(r!==d.ChatBtnState.LOADING){b.HWIcsElectron.showAdvertise(t);(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.INIT));T.NotifyManager.sendEnterSleep(t)}(0,i.$dispatch)((0,u.clearCaptionMessageList)());k.ChatDataManager.clearCloudWatchChatIdStatusList(t);I.TextDriveManager.resetCache({entry:t})}if(f.ConfigManager.getConfig(d.ConfigKey.ENABLE_COLLECT_AUDIO_DEMAND)&&!f.ConfigManager.isThirdPartyEnable()&&!f.ConfigManager.getConfig(d.ConfigKey.ENABLE_LOCAL_WAKEUP)){C.StreamAdapter.destroyLocalStream(t)}}},{key:"handleTransmission",value:function e(t){try{const e=JSON.parse(t.message);const r=e.action;const n=e.param;switch(r){case h.TransmissionAction.EXIT_MUTE_ALERT:this.handleJobEndMention(n);break;default:break}}catch(e){V.error("handleTransmission parse error",e)}}},{key:"handleResult",value:function e(t){const r="handleResult";V.info(r,t);if(!t||!t.error_code||t.error_code===a.RetCodes.SUCCESS){return false}if(t.error_level===h.ERROR_LEVEL.NO_PROMPT){return true}if(t.error_level===h.ERROR_LEVEL.MINOR||W.includes(t.action)||[g.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL,g.SDKErrorCode.WEBSOCKET_RESPONSE_TIMEOUT].includes(t.error_code)){V.error(r,t);(0,v.toast)({content:`${this._getWeakErrorMessage(t)}`});return true}(0,s.dealWebsocketError)({error:{error_code:t.error_code,error_msg:this._getErrorMessage(t),request_id:t.request_id},entry:r});return true}},{key:"msToMinute",value:function e(t){const r=Math.max(Math.floor(t/1e3/60),1);return`${r}${r>1?(0,i.$getState)().lang.language.minute:(0,i.$getState)().lang.language.minutes}`}},{key:"handleJobEndMention",value:function e(t){const r="handleJobEndMention";V.error(r,t);try{var n;T.NotifyManager.sendJobEndMention({entry:"handleJobEndMention",data:{jobId:((n=f.ConfigManager.getChatInfo(r))===null||n===void 0?void 0:n.job_id)||"",restTime:t.rest_time}});(0,v.toast)({content:R.Utils.formatLanguage((0,i.$getState)().lang.language.WORKER_EXIT_MUTE_MENTION,this.msToMinute(Number(t.rest_time))),timeOut:5e3})}catch(e){V.error(r,"extendParam parse error")}}},{key:"_getWeakErrorMessage",value:function e(t){return`${(0,m.getErrorMessage)({errorCode:t===null||t===void 0?void 0:t.error_code})}`}},{key:"_getErrorMessage",value:function e(t){var r;return`WebSocket:${t===null||t===void 0?void 0:t.error_msg},jobId:${(r=f.ConfigManager.getChatInfo("getWsUrl"))===null||r===void 0?void 0:r.job_id}`}},{key:"_handleNoCallbackMsg",value:function e(t){const r={[h.CloudWssAction.PONG]:e=>this.synChatState(e.speak_status,"_handleNoCallbackMsg"),[h.CloudWssAction.ENTER_SLEEP]:()=>this.recordStop(h.CloudWssAction.ENTER_SLEEP),[h.CloudWssAction.SPEECH_RECOGNIZED]:e=>this.dealSpeechRecognized(e),[h.CloudWssAction.SEMANTIC_RECOGNIZED]:e=>this.dealSemanticRecognized(e),[h.CloudWssAction.ACCEPT_NEW_QUESTION]:e=>{this._limitSyn();(0,i.$dispatch)((0,u.addShowAnswerChatIdList)(this.chatId));(0,i.$dispatch)((0,u.updateShowAllContentChatId)(this.chatId));this.hasChatIdToStopChat();this.dealSpeakStateToggle(e);_.EventManager.dispatchICSEvent(g.ICSEventKey.SPEAKING_STOP,{chatId:this.chatId});this.chatId=(e===null||e===void 0?void 0:e.chat_id)||""},[h.CloudWssAction.LANGUAGE_CHANGE]:e=>{window.dispatchEvent(new CustomEvent(g.InnerICSEventKey.WS_CHANGE_LANGUAGE,{detail:e}))},[h.CloudWssAction.TRANSPARENT_TRANSMISSION]:e=>{this.handleTransmission(e)},[h.CloudWssAction.RECORD_COMPLETE]:e=>{const t=this.handleResult(e);if(!t){A.RecordToast.recordCompleteToast()}}};if(t!==null&&t!==void 0&&t.action&&r[t.action]){r[t.action](t);return}switch(t===null||t===void 0?void 0:t.action){case null:case h.CloudWssAction.ERROR:this.handleResult(t);break;case h.CloudWssAction.START_SPEAKING:this._limitSyn();(0,n.sleep)(p.SPEAKING_TIMEOUT).then((()=>(0,i.$dispatch)((0,u.addShowAnswerChatIdList)((t===null||t===void 0?void 0:t.chat_id)||""))));this.dealSpeakStateToggle(t);_.EventManager.dispatchICSEvent(g.ICSEventKey.SPEAKING_START,{chatId:this.chatId});b.HWIcsElectron.hideAdvertiseStartSpeak("start_speaking");break;default:break}}},{key:"_limitSyn",value:function e(){V.info("_limitSyn start",this._canSynChatState);this._canSynChatState=false;const t=new n.Timer.TimerTask((()=>{V.info("_limitSyn do task",this._canSynChatState);this._canSynChatState=true;this._synManager.cancel()}));this._synManager.cancel().schedule(t,p.LIMIT_SYN_TIME)}},{key:"dealSpeechRecognized",value:function e(t){this.chatId=t.chat_id||"";if(t.text){const e={text:t.text,isLast:t.is_last,resultId:t.result_id||0,chatId:this.chatId};const r=P(P({},e),{},{requestId:t.request_id,messageType:c.CaptionMessageType.QUESTION,timestamp:Date.now()});(0,i.$dispatch)((0,u.updateCaptionMessageList)([r]));_.EventManager.dispatchICSEvent(g.ICSEventKey.SPEECH_RECOGNIZED,e);const{chatBtnState:n}=(0,i.$getState)().main;if(t.is_last&&n===d.ChatBtnState.PLAY){(0,i.$dispatch)((0,o.toggleChatBtnState)(d.ChatBtnState.THINKING))}}}},{key:"dealSemanticRecognized",value:function e(t){this.chatId=t.chat_id||"";const r={text:t.text,questionText:t.question_text,isLast:t.is_last,isReplace:t.is_replace,resultId:t.result_id||0,chatId:this.chatId,extendParam:t.extend_param||""};const n=P(P({},r),{},{requestId:t.request_id,messageType:c.CaptionMessageType.ANSWER,timestamp:Date.now()});(0,i.$dispatch)((0,u.updateCaptionMessageList)([n]));F(t);_.EventManager.dispatchICSEvent(g.ICSEventKey.SEMANTIC_RECOGNIZED,r);this.checkHumanService(n)}},{key:"dealSpeakStateToggle",value:function e(t){const{chatBtnState:r}=(0,i.$getState)().main;if(r===d.ChatBtnState.INIT||r===d.ChatBtnState.STOPPING){return}(0,i.$dispatch)((0,o.toggleChatBtnState)(t.action===h.CloudWssAction.START_SPEAKING?d.ChatBtnState.ANSWERING:d.ChatBtnState.PLAY))}},{key:"checkHumanService",value:async function e(t){var r;if(!t.isLast){return}const n=(0,i.$getState)().caption.captionList;const o=((r=n.find((e=>e.chatId===t.chatId&&e.messageType===c.CaptionMessageType.ANSWER)))===null||r===void 0?void 0:r.text)||"";const a=(0,i.$getState)().caption.showAllContentChatId;if(E.RichTextUtils.hasHumanservice(o)){var s;const e={chatId:t.chatId,status:G.WAIT};const r=await b.HWIcsElectron.callCloudWatch("checkHumanService");V.info("checkHumanService => callCloudWatchRes",r);if((r===null||r===void 0?void 0:(s=r.data)===null||s===void 0?void 0:s.code)===0){e.status=G.SUCCESS;if(a.includes(t.chatId)){window.dispatchEvent(new CustomEvent(g.InnerICSEventKey.STOP_CHAT_EVENT,{detail:{entry:"checkHumanService"}}))}}else{e.status=G.FAIL}k.ChatDataManager.addCloudWatchChatIdStatus(e)}}},{key:"hasChatIdToStopChat",value:function e(){const t=k.ChatDataManager.getCloudWatchChatIdStatus();V.info("hasChatIdToStopChat",t);if(t.find((e=>e.chatId===this.chatId&&e.status===G.SUCCESS))){window.dispatchEvent(new CustomEvent(g.InnerICSEventKey.STOP_CHAT_EVENT,{detail:{entry:"hasChatIdToStopChat"}}))}}},{key:"startWsRecord",value:async function e(t){t+=",startWsRecord";V.info("startWsRecord");const r=await this.websocketManager.send({param:{action:h.CloudWssAction.START_RECORD},rsp_action:h.CloudWssAction.START_RECORD_RSP,entry:t});const n=this.handleResult(r);if(!n){A.RecordToast.startRecordToast()}V.info("startWsRecord result",r);return{result:(r===null||r===void 0?void 0:r.error_code)===a.RetCodes.SUCCESS,errorCode:r===null||r===void 0?void 0:r.error_code,errorMsg:r===null||r===void 0?void 0:r.error_msg}}},{key:"stopWsRecord",value:async function e(t){t+=",stopWsRecord";V.info("stopWsRecord send bef");const r=await this.websocketManager.send({param:{action:h.CloudWssAction.STOP_RECORD},rsp_action:h.CloudWssAction.STOP_RECORD_RSP,entry:t});V.info("stopWsRecord send aft",r);this.handleResult(r);return{result:(r===null||r===void 0?void 0:r.error_code)===a.RetCodes.SUCCESS,errorCode:r===null||r===void 0?void 0:r.error_code,errorMsg:r===null||r===void 0?void 0:r.error_msg}}}],[{key:"getInstance",value:function t(){if(!e.portalManager){e.portalManager=new e}return e.portalManager}}])}();U([(0,n.printfDecorator)(V)],H.prototype,"closeOldWebsocket",null);U([(0,n.printfDecorator)(V)],H.prototype,"initWebsocket",null);U([(0,n.printfDecorator)(V)],H.prototype,"startChat",null);U([(0,n.printfDecorator)(V)],H.prototype,"stopChat",null);U([(0,n.printfDecorator)(V)],H.prototype,"stopJob",null);U([(0,n.printfDecorator)(V)],H.prototype,"interruptSpeaking",null);U([(0,n.printfDecorator)(V)],H.prototype,"activeInteractionMode",null);U([(0,n.printfDecorator)(V)],H.prototype,"interactionModeSwitch",null);U([(0,n.printfDecorator)(V)],H.prototype,"textQuestion",null);U([(0,n.printfDecorator)(V)],H.prototype,"textDriven",null);U([(0,n.printfDecorator)(V)],H.prototype,"recordStop",null);U([(0,n.printfDecorator)(V)],H.prototype,"_limitSyn",null);U([(0,n.printfDecorator)(V)],H.prototype,"dealSpeechRecognized",null);U([(0,n.printfDecorator)(V)],H.prototype,"dealSemanticRecognized",null);U([(0,n.printfDecorator)(V)],H.prototype,"dealSpeakStateToggle",null);U([(0,n.printfDecorator)(V)],H.prototype,"checkHumanService",null);U([(0,n.printfDecorator)(V)],H.prototype,"hasChatIdToStopChat",null);U([(0,n.printfDecorator)(V)],H.prototype,"startWsRecord",null);U([(0,n.printfDecorator)(V)],H.prototype,"stopWsRecord",null)},72648:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(44772),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.handleClose=s;e.handleHide=a;e.handleMaximize=n;e.handleMinimize=o;e.unMaximize=i;function n(e=""){var t,n;(0,r.getPLogger)().info("handleMaximize");(t=window)===null||t===void 0?void 0:(n=t.Pedestal)===null||n===void 0?void 0:n.remote.getCurrentWindow().maximize(e)}function i(e=""){var t,n;(0,r.getPLogger)().info("unMaximize");(t=window)===null||t===void 0?void 0:(n=t.Pedestal)===null||n===void 0?void 0:n.remote.getCurrentWindow().unmaximize(e)}function o(e){var n,i;(0,r.getPLogger)().info("userclick handleMinimize");(0,t.reactStopPropagation)(e);(n=window)===null||n===void 0?void 0:(i=n.Pedestal)===null||i===void 0?void 0:i.remote.getCurrentWindow().minimize("meta-ui-head")}function a(e){var n,i;(0,r.getPLogger)().info("handleHide");(0,t.reactStopPropagation)(e);(n=window)===null||n===void 0?void 0:(i=n.Pedestal)===null||i===void 0?void 0:i.remote.getCurrentWindow().hide("meta-ui-head")}function s(e){var n,i;(0,r.getPLogger)().info("handleClose");(0,t.reactStopPropagation)(e);(n=window)===null||n===void 0?void 0:(i=n.Pedestal)===null||i===void 0?void 0:i.remote.getCurrentWindow().close("meta-ui-head")}}))},72652:(e,t,r)=>{"use strict";var n=r(76080);var i=r(69565);var o=r(28551);var a=r(16823);var s=r(44209);var u=r(26198);var c=r(1625);var l=r(70081);var f=r(50851);var d=r(9539);var h=TypeError;var p=function(e,t){this.stopped=e;this.result=t};var v=p.prototype;e.exports=function(e,t,r){var m=r&&r.that;var y=!!(r&&r.AS_ENTRIES);var g=!!(r&&r.IS_RECORD);var b=!!(r&&r.IS_ITERATOR);var _=!!(r&&r.INTERRUPTED);var S=n(t,m);var E,w,T,I,R,C,k;var A=function(e){if(E)d(E,"normal",e);return new p(true,e)};var O=function(e){if(y){o(e);return _?S(e[0],e[1],A):S(e[0],e[1])}return _?S(e,A):S(e)};if(g){E=e.iterator}else if(b){E=e}else{w=f(e);if(!w)throw new h(a(e)+" is not iterable");if(s(w)){for(T=0,I=u(e);I>T;T++){R=O(e[T]);if(R&&c(v,R))return R}return new p(false)}E=l(e,w)}C=g?e.next:E.next;while(!(k=i(C,E)).done){try{R=O(k.value)}catch(e){d(E,"throw",e)}if(typeof R=="object"&&R&&c(v,R))return R}return new p(false)}},72712:(e,t,r)=>{"use strict";var n=r(46518);var i=r(80926).left;var o=r(34598);var a=r(39519);var s=r(38574);var u=!s&&a>79&&a<83;var c=u||!o("reduce");n({target:"Array",proto:true,forced:c},{reduce:function e(t){var r=arguments.length;return i(this,t,r,r>1?arguments[1]:undefined)}})},72756:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(67750);var a=r(91291);var s=r(655);var u=i("".slice);var c=Math.max;var l=Math.min;var f=!"".substr||"ab".substr(-1)!=="b";n({target:"String",proto:true,forced:f},{substr:function e(t,r){var n=s(o(this));var i=n.length;var f=a(t);var d,h;if(f===Infinity)f=0;if(f<0)f=c(i+f,0);d=r===undefined?i:a(r);if(d<=0||d===Infinity)return"";h=l(f+d,i);return f>=h?"":u(n,f,h)}})},72777:(e,t,r)=>{"use strict";var n=r(69565);var i=r(20034);var o=r(10757);var a=r(55966);var s=r(84270);var u=r(78227);var c=TypeError;var l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r=a(e,l);var u;if(r){if(t===undefined)t="default";u=n(r,e,t);if(!i(u)||o(u))return u;throw new c("Can't convert object to primitive value")}if(t===undefined)t="number";return s(e,t)}},72805:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79039);var o=r(84428);var a=r(94644).NATIVE_ARRAY_BUFFER_VIEWS;var s=n.ArrayBuffer;var u=n.Int8Array;e.exports=!a||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(e){new u;new u(null);new u(1.5);new u(e)}),true)||i((function(){return new u(new s(2),1,undefined).length!==1}))},73042:(e,t,r)=>{"use strict";r.r(t)},73141:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(1141),r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.QrCodeUtil=void 0;function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:t+""}function s(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let u=e.QrCodeUtil=function(){function e(){n(this,e)}return o(e,null,[{key:"createQrCode",value:function n(i){const{qrCodeContent:o,qrCodeSize:a,pointColor:s,needCodePadding:u,logoPath:c,isHighLevel:l=false,backgroundColor:f}=i;(0,r.getPLogger)().debug("createQrCode",{qrCodeContent:o,qrCodeSize:a,pointColor:s,needCodePadding:u,logoPath:c,backgroundColor:f});const d=new Map;if(c||l){d.set("errorCorrectionLevel","H")}const h=t.QRCodeKit.createQRCode({data:o,hint:d,width:a,height:a,needCodePadding:u,pointColor:s,backgroundColor:f});if(c){e.addLogo({svg:h,logoPath:c})}h.setAttribute("height",a.toString());h.setAttribute("width",a.toString());return h}},{key:"addLogo",value:function e({svg:t,logoPath:n}){const i=parseInt(t.getAttribute("width")||"0");const o=document.createElementNS("http://www.w3.org/2000/svg","rect");const a=Math.round(i*5/19);const s=Math.round(a/10);const u=Math.round(a/4);const c=a+s*2;const l=(i-c)/2;o.setAttribute("x",l.toString());o.setAttribute("y",l.toString());o.setAttribute("rx",u.toString());o.setAttribute("ry",u.toString());o.setAttribute("width",c.toString());o.setAttribute("height",c.toString());o.setAttribute("fill","#ffffff");const f=document.createElementNS("http://www.w3.org/2000/svg","image");const d=(i-a)/2;f.setAttribute("xlink:href",n);f.setAttribute("x",d.toString());f.setAttribute("y",d.toString());f.setAttribute("width",a.toString());f.setAttribute("height",a.toString());(0,r.getPLogger)().debug("addLogo",{rectSize:c,qrCodeSize:i,rectX:l,imageX:d,logoSize:a});t.appendChild(o);t.appendChild(f)}}])}()}))},73506:(e,t,r)=>{"use strict";var n=r(13925);var i=String;var o=TypeError;e.exports=function(e){if(n(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},73772:(e,t,r)=>{"use strict";r(65746)},73797:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend();var r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=this._iv;var o=this._keystream;if(i){o=this._keystream=i.slice(0);this._iv=undefined}r.encryptBlock(o,0);for(var a=0;a<n;a++){e[t+a]^=o[a]}}});t.Decryptor=r;return t}();return e.mode.OFB}))},74423:(e,t,r)=>{"use strict";var n=r(46518);var i=r(19617).includes;var o=r(79039);var a=r(6469);var s=o((function(){return!Array(1).includes()}));n({target:"Array",proto:true,forced:s},{includes:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}});a("includes")},74488:(e,t,r)=>{"use strict";var n=r(67680);var i=Math.floor;var o=function(e,t){var r=e.length;if(r<8){var a=1;var s,u;while(a<r){u=a;s=e[a];while(u&&t(e[u-1],s)>0){e[u]=e[--u]}if(u!==a++)e[u]=s}}else{var c=i(r/2);var l=o(n(e,0,c),t);var f=o(n(e,c),t);var d=l.length;var h=f.length;var p=0;var v=0;while(p<d||v<h){e[p+v]=p<d&&v<h?t(l[p],f[v])<=0?l[p++]:f[v++]:p<d?l[p++]:f[v++]}}return e};e.exports=o},74764:(e,t,r)=>{const n=r(64713);function i(e){this.genPoly=undefined;this.degree=e;if(this.degree)this.initialize(this.degree)}i.prototype.initialize=function e(t){this.degree=t;this.genPoly=n.generateECPolynomial(this.degree)};i.prototype.encode=function e(t){if(!this.genPoly){throw new Error("Encoder not initialized")}const r=new Uint8Array(t.length+this.degree);r.set(t);const i=n.mod(r,this.genPoly);const o=this.degree-i.length;if(o>0){const e=new Uint8Array(this.degree);e.set(i,o);return e}return i};e.exports=i},74848:(e,t,r)=>{"use strict";if(true){e.exports=r(21020)}else{}},74994:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CustomPromise=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var r=s(e,"string");return"symbol"==t(r)?r:r+""}function s(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var u=e.CustomPromise=n((function e(){var t=this;i(this,e);o(this,"promise",void 0);o(this,"resolve",void 0);o(this,"status","pending");o(this,"reject",void 0);o(this,"timer",void 0);o(this,"hasDealPromise",false);o(this,"waitPromise",(function(){return t.promise}));o(this,"dealResolve",(function(e){if(t.hasDealPromise){return}t.hasDealPromise=true;t.timer&&clearTimeout(t.timer);t.status="resolved";t.resolve(e)}));o(this,"dealReject",(function(e){if(t.hasDealPromise){return}t.hasDealPromise=true;t.timer&&clearTimeout(t.timer);t.status="rejected";t.reject(e)}));o(this,"setResolveTimeout",(function(e,r){t.timer&&clearTimeout(t.timer);t.timer=setTimeout((function(){t.dealResolve(r)}),e)}));o(this,"setRejectTimeout",(function(e,r){t.timer&&clearTimeout(t.timer);t.timer=setTimeout((function(){t.dealReject(r)}),e)}));this.promise=new Promise((function(e,r){t.resolve=e;t.reject=r}))}))}))},75044:(e,t,r)=>{"use strict";var n=r(94644);var i=r(84373);var o=r(75854);var a=r(36955);var s=r(69565);var u=r(79504);var c=r(79039);var l=n.aTypedArray;var f=n.exportTypedArrayMethod;var d=u("".slice);var h=c((function(){var e=0;new Int8Array(2).fill({valueOf:function(){return e++}});return e!==1}));f("fill",(function e(t){var r=arguments.length;l(this);var n=d(a(this),0,3)==="Big"?o(t):+t;return s(i,this,n,r>1?arguments[1]:undefined,r>2?arguments[2]:undefined)}),h)},75290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ThirdPartyManager=void 0;var n=r(53046);var i=r(50810);var o=r(94855);var a=r(44104);var s=r(11686);var u=r(84743);var c=r(40494);var l=r(56043);var f=r(88111);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const y=new a.Log({module:"ThirdPartyManager"});function g(e){if(!e){return true}if(e.origin&&!u.Utils.isLAN(e.origin)||e.host&&!u.Utils.isLAN(e.host)){y.error("ip error");return false}return true}let b=t.ThirdPartyManager=function(){function e(){d(this,e)}return p(e,null,[{key:"setThirdPartyConfig",value:async function t(r){const n="setThirdPartyConfig";y.info(n,r);return e.init(r)}},{key:"init",value:async function e(t){var r,a,u;y.info("init");const d=o.ConfigManager.isThirdPartyEnable();o.ConfigManager.setThirdPartyConfig(t);if((r=t.uHan)!==null&&r!==void 0&&r.enable){if(!g(t.uHan)){return{result:false,errorCode:s.SDKErrorCode.UI_PARAM_ERROR,errorMsg:"uHan config param error"}}n.UHanManager.initUHanDevice()}else{n.UHanManager.closeUHanDevice()}if((a=t.uHanV2)!==null&&a!==void 0&&a.enable){if(!g(t.uHanV2)){return{result:false,errorCode:s.SDKErrorCode.UI_PARAM_ERROR,errorMsg:"uHanV2 config param error"}}i.UHanV2Manager.initUHanDevice()}else{i.UHanV2Manager.closeUHanDevice()}if((u=t.customRecord)!==null&&u!==void 0&&u.enable){f.CustomRecord.initDevice()}else{f.CustomRecord.closeDevice()}n.UHanManager.initFaceCanvas();i.UHanV2Manager.initFaceCanvas();if(!o.ConfigManager.isThirdPartyEnable()&&d){await c.StreamAdapter.stopSendCustomStream();const e={entry:"setThirdPartyConfig"};const t=c.StreamAdapter.getLocalMediaStream(e.entry);e.stream=t;l.LocalWakeup.updateStreamInput(e)}return{result:true}}},{key:"clearThirdPartyConfig",value:function e(){y.info("clearThirdPartyConfig");o.ConfigManager.clearThirdPartyConfig()}},{key:"getAudioMediaTrack",value:function e(){var t,r,a;if((t=o.ConfigManager.getUHanConfig())!==null&&t!==void 0&&t.enable){return n.UHanManager.getAudioMediaTrack()}else if((r=o.ConfigManager.getUHanV2Config())!==null&&r!==void 0&&r.enable){return i.UHanV2Manager.getAudioMediaTrack()}else if((a=o.ConfigManager.getCustomRecordConfig())!==null&&a!==void 0&&a.enable){return f.CustomRecord.getAudioMediaTrack()}return undefined}},{key:"clearCache",value:function e(){f.CustomRecord.clearCache()}}])}();window.addEventListener(s.InnerICSEventKey.ENTER_SLEEP,(e=>{const{entry:t}=e.detail;y.info("ENTER_SLEEP",t);b.clearCache()}))},75332:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(91725),r(88256),r(17825),r(30258),r(60334),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;e.showModalView=c;t=s(t);r=s(r);function s(e){return e&&e.__esModule?e:{default:e}}const u=()=>{const e=(0,n.getDialogCloseFuncList)();[...e].forEach((e=>{e.onClose({ret:false,isClickClose:true})}))};function c({content:e,zIndex:r,maskClosable:n}){const s=document.createElement("div");document.body.appendChild(s);const u=(0,o.reactRenderPolyfill)(s);const c=()=>{(0,i.getPLogger)().info("closeModal");requestAnimationFrame((()=>{var e;u===null||u===void 0?void 0:u.unmount();s===null||s===void 0?void 0:(e=s.parentNode)===null||e===void 0?void 0:e.removeChild(s)}))};u===null||u===void 0?void 0:u.render((0,a.jsx)(t.default,{visible:true,maskClosable:n,content:e,zIndex:r,onClose:c}));return c}t.default.confirm=r.default;t.default.showModalView=c;t.default.destroyAll=u;document.addEventListener("keydown",(e=>{const t=(0,n.getDialogCloseFuncList)();if(t.length>0){const r=t[t.length-1];if(r.keyboard){if(e.code==="Enter"||e.code==="NumpadEnter"){r.onClose({ret:true})}}}}));var l=e.default=t.default}))},75376:(e,t,r)=>{"use strict";var n=r(46518);var i=r(49340);n({target:"Math",stat:true},{log10:i})},75540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(96540);var i=r(44772);var o=r(63226);var a=r(21013);var s=r(44104);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function h(e,t,r){return t=y(t),p(e,m()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function p(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var _=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const S=new s.Log({module:"UserTrackComp"});let E=function(e){function t(){var e;u(this,t);e=h(this,t,arguments);e._compId=(0,i.createEntry)();e._pageName="";return e}g(t,e);return l(t,[{key:"componentDidMount",value:function e(){S.info("componentDidMount",this._pageName,this._compId);a.UserTrack.startUserTrack({arg1:o.Arg1Map.PAGE_USE_TIME,eventKey:this._compId})}},{key:"componentWillUnmount",value:function e(){S.info("componentWillUnmount",this._pageName,this._compId);a.UserTrack.endUserTrack({arg1:o.Arg1Map.PAGE_USE_TIME,arg2:this._pageName,eventKey:this._compId})}}])}(n.Component);E=_([(0,i.componentDecorator)(S)],E);var w=t["default"]=E},75625:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WorkerRetCodes=t.WBWRetCodes=t.WBMRetCodes=t.WBCRetCodes=t.TTSCRetCodes=t.RetCodes=t.RecognitionType=t.MPSRetCodes=t.HttpHeaders=t.HttpCodes=t.DeploymentMode=t.BaseUrl=void 0;var r;(function(e){e["REPORT"]="v1/digital-human-chat/endpoint/stats";e["POST_START_SMART_CHAT_JOBS"]="/v1/digital-human-chat/smart-chat-jobs";e["POST_STOP_SMART_CHAT_JOBS"]="/v1/digital-human-chat/smart-chat-jobs/{job_id}/stop";e["GET_SMART_CHAT_JOBS_STATE"]="/v1/digital-human-chat/smart-chat-jobs/{job_id}/state";e["CREATE_ONCE_TOKEN"]="/v1/digital-human-chat/create-once-token";e["AUTH_ACTIVE_CODE"]="/v1/digital-human-chat/auth-active-code";e["AUTH_ONCE_CODE"]="/v1/digital-human-chat/auth-once-code";e["TOKEN"]="/v1/digital-human-chat/token";e["VERIFICATION_SLIDE"]="/v1/digital-human-chat/verification/slide";e["VERIFICATION_SLIDE_VERIFY"]="/v1/digital-human-chat/verification/slide/verify";e["RECOGNITION_RESULT"]="/v1/digital-human-chat/recognition-result";e["GET_HOT_QUESTION"]="/v1/digital-human-chat/hot-question";e["POST_MEDIA_NEGOTIATE"]="/v1/digital-human-chat/smart-chat-jobs/{job_id}/media-negotiate"})(r||(t.BaseUrl=r={}));var n;(function(e){e["AUTH_TOKEN"]="x-auth-token"})(n||(t.HttpHeaders=n={}));var i;(function(e){e[e["QUESTION"]=0]="QUESTION";e[e["ANSWER"]=1]="ANSWER"})(i||(t.RecognitionType=i={}));var o;(function(e){e["HCSO"]="HCSO";e["CLOUD"]="CLOUD"})(o||(t.DeploymentMode=o={}));var a;(function(e){e[e["NO_RESP"]=-100]="NO_RESP";e[e["OK"]=200]="OK";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED"})(a||(t.HttpCodes=a={}));var s;(function(e){e["SUCCESS"]="MSS.00000000";e["NORMAL_FAILED"]="MSS.00000001";e["SERVER_ERROR"]="MSS.00000002";e["ERROR_PARAM"]="MSS.00000003";e["AUTH_FAILED"]="MSS.00000004";e["DIALOG_NOT_EXIST"]="MSS.47010001";e["RPC_ACTION_NOT_EXIST"]="MSS.47010002";e["ICS_EXCEPTION"]="MSS.47010003";e["REQUEST_TOO_FREQUENTLY"]="MSS.47010004";e["GET_DAC_ASSERT_FAIL"]="MSS.47010005";e["GET_DHM_STYLE_FAIL"]="MSS.47010006";e["GET_SFS_CACHE_FAIL"]="MSS.47010007";e["TENANT_CLEANUP_JOB_STOPPED"]="MSS.47010008";e["NO_PERMISSION_USE"]="MSS.47010009";e["CHAT_SERVICE_IS_ACTIVED"]="MSS.47010010";e["CHAT_SERVICE_IS_INACTIVED"]="MSS.47010011";e["DIALOG_HAS_FINISH"]="MSS.47010012";e["CHAT_SERVICE_CONCURRENCY_NOT_ENOUGH"]="MSS.47010013";e["DIALOG_STATE_UNAVAILABLE"]="MSS.47010014";e["SEND_EVENT_CALLBACK_FAIL"]="MSS.47010015";e["DIALOG_WAIT_IS_NULL"]="MSS.47010016";e["SKILL_NAME_EXIST"]="MSS.47010020";e["SKILL_IDENTIFY_EXIST"]="MSS.47010021";e["SKILL_NOT_EXIST"]="MSS.47010022";e["SKILL_NO_PERMISSION"]="MSS.47010023";e["INTENT_NAME_EXIST"]="MSS.47010024";e["INTENT_IDENTIFY_CREATE_FAILED"]="MSS.47010025";e["INTENT_COUNT_EXCEED_MAX_VALUE"]="MSS.47010026";e["INTENT_NOT_EXIST"]="MSS.47010027";e["INTENT_NO_PERMISSION"]="MSS.47010028";e["QUESTION_EXIST"]="MSS.47010029";e["QUESTION_NOT_EXIST"]="MSS.47010030";e["QUESTION_NO_PERMISSION"]="MSS.47010031";e["QUESTION_BATCH_LIST_EMPTY"]="MSS.47010032";e["ROBOT_NAME_EXIST"]="MSS.47010033";e["ROBOT_NOT_EXIST"]="MSS.47010034";e["ROBOT_NO_PERMISSION"]="MSS.47010035";e["EXPORT_SKILL_FAILED"]="MSS.47010036";e["START_SMART_CHAT_FAILED"]="MSS.47010037";e["STOP_SMART_CHAT_FAILED"]="MSS.47010038";e["SHOW_SMART_CHAT_FAILED"]="MSS.47010039";e["DIALOG_CONCURRENT_EXCEED_MAX_VALUE"]="MSS.47010040";e["ACTIVE_CODE_AUTH_FAILED"]="MSS.47010043";e["ACTIVE_CODE_AUTH_LOCKED"]="MSS.47010044";e["ACTIVE_CODE_AUTH_EXPIRED"]="MSS.47010045";e["ONCE_CODE_AUTH_FAILED"]="MSS.47010046";e["ONCE_CODE_AUTH_LOCKED"]="MSS.47010047";e["GENERATE_SLIDE_VERIFICATON_FAILED"]="MSS.47010048";e["SLIDE_VERIFICATON_NOT_EXIST"]="MSS.47010049";e["SLIDE_VERIFICATON_VERIFY_FAILED"]="MSS.47010050";e["SLIDE_VERIFICATON_VERIFY_FAILED_AND_EXCEED_MAX_TIMES"]="MSS.47010051";e["DIALOG_NO_PERMISSION"]="MSS.47010063";e["FAILED_TO_QUERY_TENANT_ID"]="MSS.47010065";e["HOT_QUESTION_NOT_EXIST"]="MSS.47010066";e["WS_INTERNAL_ERROR"]="MSS.47010100";e["MESSAGE_PARSE_ERROR"]="MSS.47010101";e["WS_ROBOT_ID_IS_EMPTY"]="MSS.47010102";e["UNKNOWN_ACTION"]="MSS.47010103";e["CONNECT_AIUI_TIMEOUT"]="MSS.47010104";e["CONNECT_APP_TIMEOUT"]="MSS.47010104";e["AUTHTOKEN_INVALID"]="MSS.47010105";e["QUERYPARAM_INVALID"]="MSS.47010106";e["CLIENT_ERROR_MESSAGE"]="MSS.47010107";e["WEBCLIENT_START_CHAT_WORKER_DISCONNECT"]="MSS.47010111";e["CHANNEL_RECORED_NOT_FOUND"]="MSS.47010119";e["INTERACTIVE_NUMBER_IS_INSUFFICIENT"]="MSS.47010120";e["TOKEN_NUMBER_IS_INSUFFICIENT"]="MSS.47010121";e["RPC_CALL_FAILED"]="MSS.47010122";e["AIUI_UNAUTHORIZED"]="MSS.47010124";e["SPARK_UNAUTHORIZED"]="MSS.47010125";e["MOBVOI_QUANTITY_NOT_ENOUGH"]="MSS.47010126";e["MOBVOI_UNAUTHORIZED"]="MSS.47010127";e["MOBVOI_ROLE_ID_IS_INVALID"]="MSS.47010128";e["THIRD_PARTY_LANGUAGE_MODEL_EMPTY"]="MSS.47010130";e["THIRD_PARTY_LANGUAGE_MODEL_URL_EMPTY"]="MSS.47010131";e["THIRD_PARTY_LANGUAGE_MODEL_URL_INVALID"]="MSS.47010134";e["IFLY_APPLICATION_SCENE_CONFIG_ERROR"]="MSS.47010136";e["SIS_AUTHORIZATION_FAILED"]="MSS.47010141";e["CURRENT_LANGUAGE_NOT_SUPPORT_RECOGNITION"]="MSS.47010143";e["ICS_NOT_IN_TEXT_MODE"]="MSS.47010144";e["ICS_TEXT_QUESTION_LENGTH_LIMITED"]="MSS.47010145";e["ICS_TEXT_QUESTION_IS_EMPTY"]="MSS.47010146";e["ICS_TEXT_QUESTION_NOT_IN_WAIT_QUESTION_STATUS"]="MSS.47010147";e["ICS_INVALID_INTERACTION_MODE"]="MSS.47010148";e["MOBVOI_REQUEST_FLOW_LIMITED"]="MSS.47010150";e["UPLOAD_LOG_COUNT_EXCEED_MAX_COUNT"]="MSS.47010151";e["ICS_EXTEND_PARAM_INVALID"]="MSS.47010152";e["PACIFY_WORDS_EXIST"]="MSS.47010154";e["PACIFY_WORDS_COUNT_EXCEED_MAX_VALUE"]="MSS.47010155";e["PACIFY_WORDS_NOT_EXIST"]="MSS.47010156";e["PACIFY_WORDS_NO_PERMISSION"]="MSS.47010157";e["PACIFY_WORDS_INTENT_NOT_SUPPORT"]="MSS.47010158";e["ICS_ROBOT_ROOM_ID_EMPTY"]="MSS.47010163";e["SINGLE_TENANT_WEBSOCKET_LINKS_EXCEEDS"]="MSS.47015005";e["WEBSOCKET_LINKS_EXCEEDS"]="MSS.47015006";e["ICS_UNMATCHED_APP_TYPE_AIUI"]="MSS.47015008";e["ICS_UNMATCHED_APP_TYPE_SPARK"]="MSS.47015009";e["ICS_THIRD_PARTY_DRIVER_NOT_ALLOWED_WEB_START_CHAT"]="MSS.47015010";e["ICS_MEDIA_SERVICE_ADDR_IS_EMPTY"]="MSS.47015011";e["ICS_MEDIA_NEGOTIATE_FAILED"]="MSS.47015012";e["ICS_SIS_FROZEN_ERROR"]="MSS.47015015";e["ICS_THIRD_PARTY_DRIVE_NOT_ALLOWED_THIS_WEB_MESSAGE"]="MSS.47015017";e["ICS_MOBVOI_ASR_UNAUTHORIZED"]="MSS.47015018";e["ICS_ASR_WAIT_VOICE_TIME_OUT"]="MSS.47015019";e["ICS_SIS_SERVICE_NOT_SUBSCRIBE"]="MSS.47015028";e["ICS_AUDIO_REPORT_TASK_EXIST"]="MSS.47015029";e["ICS_CREATE_AUDIO_RECORD_TASK_FAILED"]="MSS.47015030";e["ICS_AUDIO_RECORD_NOT_ENABLE"]="MSS.47015031"})(s||(t.RetCodes=s={}));var u;(function(e){e["SUCCESS"]="00000000";e["FAILED"]="00000001";e["INTERNAL_ERROR"]="00000002";e["INVALID_PARAMETER"]="00000003";e["ILLEGAL_ACCESS"]="00000004";e["MPS_NAME_INCLUDE_INVALID_SYMBOL"]="20010001";e["NO_MATCH_TEMPLATE"]="20010003";e["REFRESH_ASSET_FAILED"]="20010010";e["NO_ENOUGH_RESOURCE"]="20010035";e["NATS_PUBLISH_FAILURE"]="20010040";e["NATS_SUBSCRIBE_FAILURE"]="20010041";e["NATS_DELETE_SUBJECT_FAILURE"]="20010042";e["NATS_INTERNAL_ERROR"]="20010043";e["DIGITAL_HUMAN_NOT_AVAILABLE"]="20010044";e["MPS_ROOM_INFO_NOT_FOUND"]="20010045";e["ROOM_ID_JOB_EXIST"]="20010046";e["ASSET_NOT_EXIST"]="20010047";e["ASSET_INFO_INVALID"]="20010050";e["INVALID_COMMAND"]="20010053";e["QUOTA_INSUFFICIENT"]="20010056";e["REQUEST_TMS_UNAVAILABLE"]="20010060";e["LIVE_QUOTA_INSUFFICIENT"]="20010065";e["MPS_CHANGE_FINISHED_JOB_STATE_FAILED"]="20010066";e["AUDIO_NOT_FOUND_URL"]="20010067";e["MPS_FIELD_VERIFY_FAIL"]="20010070";e["MPS_ASSET_ID_UNAVAILABLE"]="20010071";e["MPS_JOB_NOT_EXISTED"]="20010074";e["CHAT_QUOTA_INSUFFICIENT"]="20010075";e["MPS_TASK_EXPIRED"]="20010076";e["CONVERSATION_RESOURCE_FULL"]="20010089";e["TONE_RESOURCE_ERROR"]="20010131";e["CHAT_JOBS_NUM_IS_OVER_CONCURRENCY"]="20010135";e["CHAT_SUM_CONCURRENCY_OR_JOBS_NUM_IS_OVER_RESOURCES_NUM"]="20010139";e["MPS_ASSET_ID_INVALID"]="20010140";e["MPS_JOB_HEARTBEAT_FAILED"]="20010146";e["MPS_ROOM_NAME_DUPLICATE"]="20010148"})(u||(t.MPSRetCodes=u={}));var c;(function(e){e["DHICIS_ERROR"]="47000001";e["DHICIS_INFER_SERVICE_ERROR"]="47000002";e["DHICIS_TASK_READY_ERROR"]="47000003";e["DHICIS_CREATE_INFER_MODEL_ERROR"]="47000004";e["DHICIS_WORKER_JOIN_ROOM_FAIL"]="47000005";e["DHICIS_MANAGER_SERVICE_ERROR"]="47000006";e["DHICIS_JOB_STOP_BY_COMMAND"]="47000007";e["DHICIS_FSM_STATE_TIME_OUT"]="47000009";e["DHICIS_ICS_ERROR"]="47000010";e["DHICIS_RTSA_ROOM_EMPTY"]="47000011";e["DHICIS_RTSA_REPORT_LEAVE_ROOM"]="47000012";e["DHICIS_MODEL_FILE_DOWN_FAIL"]="47000013";e["DHICIS_BACKGROUND_FILE_DOWN_FAIL"]="47000014";e["DHICIS_WORKER_JOIN_ROOM_TIMEOUT"]="47000015";e["DHICIS_JOIN_ROOM_TASK_FAIL"]="47000016";e["DHICIS_TTS_PREHEAT_TASK_FAIL"]="47000017";e["DHICIS_DATA_PACKAGE_IS_NOT_ZIP"]="47000018";e["DHICIS_TOO_MANY_ENTRIES_IN_PACKAGE"]="47000019";e["DHICIS_PACKAGE_TOO_LARGE"]="47000020";e["DHICIS_FILE_IN_PACKAGE_TOO_LARGE"]="47000021";e["DHICIS_UNEXPECTED_DIRECTORY_IN_PACKAGE"]="47000022";e["DHICIS_PACKAGE_ENTRY_ILLEGAL_NAME"]="47000023";e["DHICIS_FILE_NAME_INVALID"]="47000024";e["DHICIS_JOB_INFO_PARA_INVALID"]="47000025";e["DHICIS_FSM_STATE_ERROR"]="47000027";e["DHICIS_TTS_CONVERT_FAIL"]="47000029";e["DHICIS_NO_IDLE_WORK"]="47002000";e["DHICIS_NO_RESOURCE"]="47002001";e["DHICIS_RESOURCE_LIMITED"]="47002002"})(c||(t.WorkerRetCodes=c={}));var l;(function(e){e["WBW_AGENT_ROLE_NOT_EXISTED"]="47050001";e["WBW_LLM_NOT_EXISTED"]="47050002";e["WBW_LLM_INVALID_MODEL"]="47050003";e["WBW_LLM_ACCESS_FAILED"]="47050004"})(l||(t.WBWRetCodes=l={}));var f;(function(e){e["WBM_LLM_CONFIG_NOT_EXIST"]="47030103";e["WBM_LLM_CONFIG_NO_PERMISSION"]="47030104";e["WBM_PLUGIN_CONFIG_NOT_EXIST"]="47030114";e["WBM_PLUGIN_CONFIG_NO_PERMISSION"]="47030115"})(f||(t.WBMRetCodes=f={}));var d;(function(e){e["WBC_ROLE_NOT_EXIST"]="47040041";e["WBC_CONFIG_NO_PERMISSION"]="47040042"})(d||(t.WBCRetCodes=d={}));var h;(function(e){e["TTS_ACCESS_CONFIG_ERROR"]="20050038";e["TTS_INSUFFICIENT_ACCOUNT_BALANCE"]="20050039";e["TTS_INVALID_TEXT"]="20050040";e["TTS_NO_ACCESS_CONFIG"]="20050029";e["TTS_TO_LONG_WORD_TEXT"]="20051001";e["TTS_VOICE_ASSET_UNACTIVATED"]="20050042";e["TTS_UNSUPPORTED_LANGUAGE_TEXT"]="20050064"})(h||(t.TTSCRetCodes=h={}))},75637:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Close=r;e.Maximize=i;e.Minimize=n;function r(e){const{onClick:r,testId:n,title:i}=e;return(0,t.jsx)("div",{className:"win_btn",onClick:r,"data-testid":n,title:i,children:(0,t.jsx)("svg",{version:"1.1",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M17.4,7.2l-4.5,4.5l4.5,4.5l-0.9,0.9L12,12.6l-4.5,4.5l-0.9-0.9l4.5-4.5L6.6,7.2l0.9-0.9l4.5,4.5l4.5-4.5L17.4,7.2z"})})})}function n(e){const{onClick:r,testId:n,title:i}=e;return(0,t.jsx)("div",{className:"win_btn",onClick:r,"data-testid":n,title:i,children:(0,t.jsx)("svg",{version:"1.1",viewBox:"0 0 24 24",children:(0,t.jsx)("polygon",{points:"7,12.6 7,11.4 17,11.4 17,12.6 "})})})}function i(e){const{onClick:r,isMaximize:n,testId:i,title:o}=e;const a=!n?"M8.3,8.3v8.4h8.4V8.3H8.3z M7,7h11v11H7V7z":"M15.5,9v9h-9V9H15.5z M14.2,10.3H7.8v6.4h6.4L14.2,10.3z M18,6.5v9h-3v-1.3h1.7V7.8h-6.4V10H9V6.5H18z";return(0,t.jsx)("div",{className:"win_btn",onClick:r,"data-testid":i,title:o,children:(0,t.jsx)("svg",{version:"1.1",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:a})})})}}))},75854:(e,t,r)=>{"use strict";var n=r(72777);var i=TypeError;e.exports=function(e){var t=n(e,"number");if(typeof t=="number")throw new i("Can't convert number to bigint");return BigInt(t)}},76031:(e,t,r)=>{"use strict";r(15575);r(24599)},76080:(e,t,r)=>{"use strict";var n=r(27476);var i=r(79306);var o=r(40616);var a=n(n.bind);e.exports=function(e,t){i(e);return t===undefined?e:o?a(e,t):function(){return e.apply(t,arguments)}}},76264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ChatDataManager=void 0;var n=r(44772);var i=r(44246);var o=r(26440);var a=r(32681);var s=r(43260);var u=r(39595);var c=r(44104);var l=r(37857);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var m=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const y=new c.Log({module:"ChatDataManager"});let g=t.ChatDataManager=function(){function e(){f(this,e)}return h(e,null,[{key:"resetChatData",value:function t(r){i.HWIcsElectron.showAdvertise(r);(0,o.$dispatch)((0,a.clearCaptionMessageList)());(0,o.$dispatch)((0,s.toggleChatBtnState)(u.ChatBtnState.INIT));e.clearCloudWatchChatIdStatusList(r);l.TextDriveManager.resetCache({entry:r})}},{key:"getCloudWatchChatIdStatus",value:function t(){return e.cloudWatchChatIdStatus}},{key:"addCloudWatchChatIdStatus",value:function t(r){y.info("addCloudWatchChatIdStatus",r);e.cloudWatchChatIdStatus.push(r)}},{key:"clearCloudWatchChatIdStatusList",value:function e(t){y.info("clearCloudWatchChatIdStatusList",t);this.cloudWatchChatIdStatus=[]}}])}();g.cloudWatchChatIdStatus=[];m([(0,n.printfDecorator)(y)],g,"resetChatData",null)},76288:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(82284);var i=Symbol.for("react.element");var o=Symbol.for("react.transitional.element");var a=Symbol.for("react.fragment");function s(e){return e&&(0,n.A)(e)==="object"&&(e.$$typeof===i||e.$$typeof===o)&&e.type===a}},76320:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={};var o={};o[r]=0;var a=t.PriorityQueue.make();a.push(r,0);var s,u,c,l,f,d,h,p,v;while(!a.empty()){s=a.pop();u=s.value;l=s.cost;f=e[u]||{};for(c in f){if(f.hasOwnProperty(c)){d=f[c];h=l+d;p=o[c];v=typeof o[c]==="undefined";if(v||p>h){o[c]=h;a.push(c,h);i[c]=u}}}}if(typeof n!=="undefined"&&typeof o[n]==="undefined"){var m=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(m)}return i},extract_shortest_path_from_predecessor_list:function(e,t){var r=[];var n=t;var i;while(n){r.push(n);i=e[n];n=e[n]}r.reverse();return r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r=t.PriorityQueue,n={},i;e=e||{};for(i in r){if(r.hasOwnProperty(i)){n[i]=r[i]}}n.queue=[];n.sorter=e.sorter||r.default_sorter;return n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};if(true){e.exports=t}},76918:(e,t,r)=>{"use strict";var n=r(36840);var i=r(77536);var o=Error.prototype;if(o.toString!==i){n(o,"toString",i)}},77193:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var o=i.RC4=n.extend({_doReset:function(){var e=this._key;var t=e.words;var r=e.sigBytes;var n=this._S=[];for(var i=0;i<256;i++){n[i]=i}for(var i=0,o=0;i<256;i++){var a=i%r;var s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o];n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:256/32,ivSize:0});function a(){var e=this._S;var t=this._i;var r=this._j;var n=0;for(var i=0;i<4;i++){t=(t+1)%256;r=(r+e[t])%256;var o=e[t];e[t]=e[r];e[r]=o;n|=e[(e[t]+e[r])%256]<<24-i*8}this._i=t;this._j=r;return n}t.RC4=n._createHelper(o);var s=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--){a.call(this)}}});t.RC4Drop=n._createHelper(s)})();return e.RC4}))},77200:(e,t,r)=>{"use strict";r.r(t)},77240:(e,t,r)=>{"use strict";var n=r(79504);var i=r(67750);var o=r(655);var a=/"/g;var s=n("".replace);e.exports=function(e,t,r,n){var u=o(i(e));var c="<"+t;if(r!=="")c+=" "+r+'="'+s(o(n),a,"&quot;")+'"';return c+">"+u+"</"+t+">"}},77347:(e,t,r)=>{"use strict";var n=r(43724);var i=r(69565);var o=r(48773);var a=r(6980);var s=r(25397);var u=r(56969);var c=r(39297);var l=r(35917);var f=Object.getOwnPropertyDescriptor;t.f=n?f:function e(t,r){t=s(t);r=u(r);if(l)try{return f(t,r)}catch(e){}if(c(t,r))return a(!i(o.f,t,r),t[r])}},77536:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79039);var o=r(28551);var a=r(32603);var s=Error.prototype.toString;var u=i((function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if(s.call(e)!=="true")return true}return s.call({message:1,name:2})!=="2: 1"||s.call({})!=="Error"}));e.exports=u?function e(){var t=o(this);var r=a(t.name,"Error");var n=a(t.message);return!r?n:!n?r:r+": "+n}:s},77584:(e,t,r)=>{"use strict";var n=r(20034);var i=r(66699);e.exports=function(e,t){if(n(t)&&"cause"in t){i(e,"cause",t.cause)}}},77629:(e,t,r)=>{"use strict";var n=r(96395);var i=r(44576);var o=r(39433);var a="__core-js_shared__";var s=e.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.42.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},77691:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(79504);var a=r(79306);var s=r(67750);var u=r(56969);var c=r(72652);var l=r(79039);var f=Object.groupBy;var d=i("Object","create");var h=o([].push);var p=!f||l((function(){return f("ab",(function(e){return e})).a.length!==1}));n({target:"Object",stat:true,forced:p},{groupBy:function e(t,r){s(t);a(r);var n=d(null);var i=0;c(t,(function(e){var t=u(r(e,i++));if(t in n)h(n[t],e);else n[t]=[e]}));return n}})},77740:(e,t,r)=>{"use strict";var n=r(39297);var i=r(35031);var o=r(77347);var a=r(24913);e.exports=function(e,t,r){var s=i(t);var u=a.f;var c=o.f;for(var l=0;l<s.length;l++){var f=s[l];if(!n(e,f)&&!(r&&n(r,f))){u(e,f,c(t,f))}}}},77762:(e,t,r)=>{"use strict";var n=r(46518);var i=r(53250);var o=Math.cosh;var a=Math.abs;var s=Math.E;var u=!o||o(710)===Infinity;n({target:"Math",stat:true,forced:u},{cosh:function e(t){var r=i(a(t)-1)+1;return(r+1/(r*s*s))*(s/2)}})},77782:e=>{"use strict";e.exports=Math.sign||function e(t){var r=+t;return r===0||r!==r?r:r<0?-1:1}},77811:e=>{"use strict";e.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},77867:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaDeviceManager=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var r=l(e,"string");return"symbol"==t(r)?r:r+""}function l(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var f=e.MediaDeviceManager=function(){function e(){o(this,e)}return s(e,null,[{key:"getDefaultDeviceId",value:function(){var t=i(r().mark((function t(n){var i;var o,a,s;return r().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:o=r.sent;a=o.filter((function(e){return e.kind===n}));s=a.find((function(e){return e.deviceId==="default"}));return r.abrupt("return",s?((i=a.find((function(t){return t.groupId===s.groupId&&!e.defaultDeviceIdList.includes(t.deviceId)})))===null||i===void 0?void 0:i.deviceId)||"":"");case 6:case"end":return r.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"checkDeviceIdExist",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:n=r.sent;return r.abrupt("return",!!n.find((function(e){return e.deviceId===t})));case 4:case"end":return r.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}();u(f,"defaultDeviceIdList",["default","communications"])}))},77936:(e,t,r)=>{"use strict";var n=r(46518);var i=r(95636);if(i)n({target:"ArrayBuffer",proto:true},{transferToFixedLength:function e(){return i(this,arguments.length?arguments[0]:undefined,false)}})},78056:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var o=n.Hasher;var a=r.algo;var s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]);var u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]);var c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]);var l=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]);var f=i.create([0,1518500249,1859775393,2400959708,2840853838]);var d=i.create([1352829926,1548603684,1836072691,2053994217,0]);var h=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r;var i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var o=this._hash.words;var a=f.words;var h=d.words;var _=s.words;var S=u.words;var E=c.words;var w=l.words;var T,I,R,C,k;var A,O,P,x,L;A=T=o[0];O=I=o[1];P=R=o[2];x=C=o[3];L=k=o[4];var M;for(var r=0;r<80;r+=1){M=T+e[t+_[r]]|0;if(r<16){M+=p(I,R,C)+a[0]}else if(r<32){M+=v(I,R,C)+a[1]}else if(r<48){M+=m(I,R,C)+a[2]}else if(r<64){M+=y(I,R,C)+a[3]}else{M+=g(I,R,C)+a[4]}M=M|0;M=b(M,E[r]);M=M+k|0;T=k;k=C;C=b(R,10);R=I;I=M;M=A+e[t+S[r]]|0;if(r<16){M+=g(O,P,x)+h[0]}else if(r<32){M+=y(O,P,x)+h[1]}else if(r<48){M+=m(O,P,x)+h[2]}else if(r<64){M+=v(O,P,x)+h[3]}else{M+=p(O,P,x)+h[4]}M=M|0;M=b(M,w[r]);M=M+L|0;A=L;L=x;x=b(P,10);P=O;O=M}M=o[1]+R+x|0;o[1]=o[2]+C+L|0;o[2]=o[3]+k+A|0;o[3]=o[4]+T+O|0;o[4]=o[0]+I+P|0;o[0]=M},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+64>>>9<<4)+14]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360;e.sigBytes=(t.length+1)*4;this._process();var i=this._hash;var o=i.words;for(var a=0;a<5;a++){var s=o[a];o[a]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return i},clone:function(){var e=o.clone.call(this);e._hash=this._hash.clone();return e}});function p(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<<t|e>>>32-t}r.RIPEMD160=o._createHelper(h);r.HmacRIPEMD160=o._createHmacHelper(h)})(Math);return e.RIPEMD160}))},78100:(e,t,r)=>{"use strict";var n=r(46518);var i=r(95636);if(i)n({target:"ArrayBuffer",proto:true},{transfer:function e(){return i(this,arguments.length?arguments[0]:undefined,true)}})},78125:(e,t,r)=>{"use strict";var n=r(97751);var i=r(70511);var o=r(10687);i("toStringTag");o(n("Symbol"),"Symbol")},78227:(e,t,r)=>{"use strict";var n=r(44576);var i=r(25745);var o=r(39297);var a=r(33392);var s=r(4495);var u=r(7040);var c=n.Symbol;var l=i("wks");var f=u?c["for"]||c:c&&c.withoutSetter||a;e.exports=function(e){if(!o(l,e)){l[e]=s&&o(c,e)?c[e]:f("Symbol."+e)}return l[e]}},78347:(e,t,r)=>{"use strict";var n=r(46518);var i=r(39297);n({target:"Object",stat:true},{hasOwn:i})},78350:(e,t,r)=>{"use strict";var n=r(46518);var i=r(70259);var o=r(79306);var a=r(48981);var s=r(26198);var u=r(1469);n({target:"Array",proto:true},{flatMap:function e(t){var r=a(this);var n=s(r);var c;o(t);c=u(r,0);c.length=i(c,r,r,n,0,1,t,arguments.length>1?arguments[1]:undefined);return c}})},78435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LanguageManager=void 0;var n=r(11686);var i=r(46677);var o=r(39595);var a=r(26440);var s=r(21361);var u=r(94855);var c=r(44104);var l=r(82118);var f=r(72640);var d=r(84743);var h=r(56043);var p=r(44246);var v=r(55443);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e){var t=_(e,"string");return"symbol"==typeof t?t:t+""}function _(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const S=new c.Log({module:"HwICS.LanguageManager"});let E=t.LanguageManager=function(){function e(){m(this,e)}return g(e,null,[{key:"canUploadLanguage",value:function t(r){const n=(0,a.$getState)().main.pageState;S.info("canUploadLanguage",e.remoteLangCode,r,n);return e.remoteLangCode!==r&&n===o.PageState.MAIN}},{key:"clearConfig",value:function t(){S.info("clearConfig");e.remoteLangCode=undefined}},{key:"getLocalLangCode",value:function e(t){const r=(0,a.$getState)().lang.langCode;S.info("getLocalLangCode",t,r);return r}},{key:"getRemoteLangCode",value:function t(r){S.info("getRemoteLangCode",r,e.remoteLangCode);return e.remoteLangCode}},{key:"getLanguageInfo",value:function t(r){r+="getLanguageInfo";const n=(0,a.$getState)().lang.languageList;S.info("getLangList",r,n===null||n===void 0?void 0:n.length);const i=e.validParam();if(!i.result){return i}return{result:true,languageList:n||[],currentLanguage:e.getLocalLangCode(r)}}},{key:"initLanguageInJoinRoom",value:async function t({chatInfo:r,entry:n}){let i=r.default_language;await e.setLanguageInfo({chatInfo:r,entry:n});const o=u.ConfigManager.getRobotId(n);i=await v.StorageManager.getLocalStorageItem(`oldLangCode-${o}`)||i;e.setRemoteAndLocalLangCode({entry:n,langCode:i,remember:true,needErrorDeal:false})}},{key:"setLanguageInfo",value:async function t({chatInfo:r,entry:n}){var i,o;const c=(0,a.$getState)().lang.languageList;const l=(0,a.$getState)().lang.defaultLanguage;if(JSON.stringify(c)===JSON.stringify(r.voice_config_list)&&l===r.default_language){return}S.info("setLanguageInfo",n,r===null||r===void 0?void 0:(i=r.voice_config_list)===null||i===void 0?void 0:i.length,r===null||r===void 0?void 0:r.default_language);(0,a.$dispatch)((0,s.setLanguageList)(r.voice_config_list));(0,a.$dispatch)((0,s.setDefaultLanguage)(r.default_language));e.languageInfoChange("setLanguageInfo");const f=u.ConfigManager.getRobotId(n);const d=await v.StorageManager.getLocalStorageItem(`oldLangCode-${f}`);if(!((o=r.voice_config_list)!==null&&o!==void 0&&o.find((e=>e.language===d)))){S.info("forget",n,f);v.StorageManager.removeLocalStorageItem(`oldLangCode-${f}`)}}},{key:"validParam",value:function e(t){const r=(0,a.$getState)().lang.languageList;if(!r||r.length<=0){return{result:false,errorCode:n.SDKErrorCode.UI_LANGUAGE_LIST_EMPTY,errorMsg:n.msgMap[n.SDKErrorCode.UI_LANGUAGE_LIST_EMPTY]}}if(t&&!r.find((e=>e.language===t))){return{result:false,errorCode:n.SDKErrorCode.UI_LANGUAGE_CODE_NOT_SUPPORT,errorMsg:n.msgMap[n.SDKErrorCode.UI_LANGUAGE_CODE_NOT_SUPPORT]}}return{result:true}}},{key:"checkLangCode",value:function t(r){if(!r){r=e.getLocalLangCode("checkLangCode")||d.Utils.formatLangCode(navigator.language)}const n=(0,a.$getState)().lang.languageList;const i=(0,a.$getState)().lang.defaultLanguage;S.info("checkLangCode",r,n,i);if(n&&i&&n.length>0&&!n.find((e=>e.language===r))){r=i}return r}},{key:"setRemoteAndLocalLangCode",value:async function t({langCode:r,needErrorDeal:n,remember:s,entry:u}){var c,l;u+=",setRemoteAndLocalLangCode";let d={result:true};d=e.validParam(r);if(!((c=d)!==null&&c!==void 0&&c.result)){return d}r=e.checkLangCode(r);if(e.canUploadLanguage(r)){var p;d=await f.PortalWssManager.getInstance().changeLanguage({entry:u,langCode:r,needErrorDeal:n});if((p=d)!==null&&p!==void 0&&p.result){const{chatBtnState:t}=(0,a.$getState)().main;e.remoteLangCode=r;if(t!==o.ChatBtnState.INIT){f.PortalWssManager.getInstance().interruptSpeaking(u)}}}if(!((l=d)!==null&&l!==void 0&&l.result)){S.error("changeLanguage failed",u,r);return d}await e.setLocalLangCode({langCode:r,remember:s,entry:u});h.LocalWakeup.setLanguageCode(e.getLocalLangCode(u)===i.LanguageCode.ZH_CN?"zh":"en");return d}},{key:"setLocalLangCode",value:async function t({langCode:r,remember:n=false,entry:i}){S.info("setLocalLangCode",i,r);r=e.checkLangCode(r);if((0,a.$getState)().lang.langCode===r){return}(0,a.$dispatch)((0,s.setLangCode)(r));if(n){const e=u.ConfigManager.getRobotId(i);S.info("remember new",i,e,r);await v.StorageManager.setLocalStorageItem({key:`oldLangCode-${e}`,value:r})}e.languageInfoChange("setLocalLangCode");p.HWIcsElectron.setLangCode(r,"setLocalLangCode")}},{key:"languageInfoChange",value:function t(r){r+="languageInfoChange";const n=e.getLanguageInfo("languageInfoChange");if(JSON.stringify(e.lastLanguageInfo)!==JSON.stringify(n)){e.lastLanguageInfo=n;l.NotifyManager.sendLanguageInfoChange({entry:r,data:n})}}}])}();window.addEventListener(n.InnerICSEventKey.WS_CHANGE_LANGUAGE,(e=>{E.setLocalLangCode({entry:"websocket language change",langCode:e.detail.language})}));window.addEventListener(n.InnerICSEventKey.STREAM_ADDED,(()=>{E.setRemoteAndLocalLangCode({entry:"stream added"})}))},78459:(e,t,r)=>{"use strict";var n=r(46518);var i=r(33904);n({global:true,forced:parseFloat!==i},{parseFloat:i})},78523:(e,t,r)=>{"use strict";r.r(t)},78553:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(53250);var a=Math.abs;var s=Math.exp;var u=Math.E;var c=i((function(){return Math.sinh(-2e-17)!==-2e-17}));n({target:"Math",stat:true,forced:c},{sinh:function e(t){var r=+t;return a(r)<1?(o(r)-o(-r))/2:(s(r-1)-s(-r-1))*(u/2)}})},79039:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return true}}},79296:(e,t,r)=>{"use strict";var n=r(4055);var i=n("span").classList;var o=i&&i.constructor&&i.constructor.prototype;e.exports=o===Object.prototype?undefined:o},79306:(e,t,r)=>{"use strict";var n=r(94901);var i=r(16823);var o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},79432:(e,t,r)=>{"use strict";var n=r(46518);var i=r(48981);var o=r(71072);var a=r(79039);var s=a((function(){o(1)}));n({target:"Object",stat:true,forced:s},{keys:function e(t){return o(i(t))}})},79472:(e,t,r)=>{"use strict";var n=r(44576);var i=r(18745);var o=r(94901);var a=r(84215);var s=r(82839);var u=r(67680);var c=r(22812);var l=n.Function;var f=/MSIE .\./.test(s)||a==="BUN"&&function(){var e=n.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();e.exports=function(e,t){var r=t?2:1;return f?function(n,a){var s=c(arguments.length,1)>r;var f=o(n)?n:l(n);var d=s?u(arguments,r):[];var h=s?function(){i(f,this,d)}:f;return t?e(h,a):e(h)}:e}},79504:(e,t,r)=>{"use strict";var n=r(40616);var i=Function.prototype;var o=i.call;var a=n&&i.bind.bind(o,o);e.exports=n?a:function(e){return function(){return o.apply(e,arguments)}}},79524:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(59969),r(30258),r(37360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ScriptProcessorRecord=void 0;var i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=e.ScriptProcessorRecord=(i=(0,t.printfDecorator)((0,r.getPLogger)()),o=(0,t.printfDecorator)((0,r.getPLogger)()),s=(u=function(){function e(t){var r=this;d(this,e);v(this,"audioContext",void 0);v(this,"param",void 0);v(this,"stream",void 0);v(this,"input",void 0);v(this,"recorder",void 0);v(this,"total",0);v(this,"startProm",void 0);v(this,"autoCollectAudio",void 0);v(this,"getOnaudioprocess",(function(e){return function(t){var n=new Float32Array(t.inputBuffer.getChannelData(0));var i=new Int16Array(n.length);var o=0;for(var a=0;a<n.length;++a){var s=n[a];if(s>=1){s=1}else if(s<=-1){s=-1}n[a]=s;i[a]=s*32767;o+=Math.abs(i[a])}r.total+=i.byteLength;r.param.audioCallback({pcm:i,sum:o,total:r.total,recordId:e})}}));this.param=t}return p(e,[{key:"startRecord",value:function(){var e=f(c().mark((function e(t){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:if(!this.startProm){this.startProm=this.dealStartRecord(t)}this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=f(c().mark((function e(){var t,i,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(t=this.input)===null||t===void 0||t.disconnect();delete this.input;(i=this.recorder)===null||i===void 0||i.disconnect();delete this.recorder;this.total=0;a.next=8;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 8:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=15;break;case 12:a.prev=12;a.t0=a["catch"](0);(0,r.getPLogger)().error("stopRecord",a.t0);case 15:case"end":return a.stop()}}),e,this,[[0,12]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}},{key:"dealStartRecord",value:function(){var t=f(c().mark((function t(n){var i,o,a;return c().wrap((function t(s){while(1)switch(s.prev=s.next){case 0:s.prev=0;s.next=3;return this.stopRecord();case 3:this.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(n!==null&&n!==void 0&&n.stream)){s.next=8;break}this.stream=n.stream;s.next=12;break;case 8:i=n!==null&&n!==void 0&&n.deviceId?{deviceId:{exact:n.deviceId}}:true;s.next=11;return navigator.mediaDevices.getUserMedia({audio:i});case 11:this.stream=s.sent;case 12:if(this.audioContext.createScriptProcessor){(o=this.recorder)===null||o===void 0||o.disconnect();if(this.recorder){this.recorder.onaudioprocess=null}this.recorder=this.audioContext.createScriptProcessor(this.param.bufferSize,1,1);this.recorder.onaudioprocess=this.getOnaudioprocess(Date.now());(a=this.input)===null||a===void 0||a.disconnect();this.input=this.audioContext.createMediaStreamSource(this.stream);this.input.connect(this.recorder).connect(this.audioContext.destination)}s.next=18;break;case 15:s.prev=15;s.t0=s["catch"](0);(0,r.getPLogger)().error("dealStartRecord",s.t0);case 18:delete this.startProm;case 19:case"end":return s.stop()}}),t,this,[[0,15]])})));function n(e){return t.apply(this,arguments)}return n}()}])}(),v(u,"sampleRate",16e3),u),g(s.prototype,"startRecord",[i],Object.getOwnPropertyDescriptor(s.prototype,"startRecord"),s.prototype),g(s.prototype,"stopRecord",[o],Object.getOwnPropertyDescriptor(s.prototype,"stopRecord"),s.prototype),s)}))},79577:(e,t,r)=>{"use strict";var n=r(39928);var i=r(94644);var o=r(18727);var a=r(91291);var s=r(75854);var u=i.aTypedArray;var c=i.getTypedArrayConstructor;var l=i.exportTypedArrayMethod;var f=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(e){return e===8}}();l("with",{with:function(e,t){var r=u(this);var i=a(e);var l=o(r)?s(t):+t;return n(r,c(r),i,l)}}["with"],!f)},79681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.P2pSDK=void 0;var n=r(29706);var i=l(r(21896));var o=r(44772);var a=r(44104);var s=r(21013);var u=r(44246);var c=r(28513);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=_(t),y(e,b()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const T=new a.Log({module:"P2pSDK"});i.default.setUserTrackCallback((e=>{s.UserTrack.addUserTrack(e)}));let I=t.P2pSDK=function(e){function t(){f(this,t);return m(this,t,arguments)}S(t,e);return h(t,null,[{key:"setLogLevel",value:function e(t){i.default.setLogLevel(t)}},{key:"streamStatistic",value:function e(){t.client.streamStatistic(true)}},{key:"createStream",value:function e(t){return i.default.createStream(t)}},{key:"addStreamEvent",value:function e(t){T.info("addStreamEvent",t);c.RouteManager.showMainPage()}},{key:"removedStreamEvent",value:function e(){T.info("removedStreamEvent")}},{key:"errorEvent",value:function e(t){T.error("errorEvent",t)}},{key:"networkQualityEvent",value:function e(t){T.info("networkQualityEvent",t)}},{key:"peerJoinEvent",value:function e(){T.info("peerJoinEvent");u.HWIcsElectron.showAdvertise("peerJoinEvent");u.HWIcsElectron.hideAdvertiseMoreInfo("peerJoinEvent")}},{key:"peerLeaveEvent",value:function e(){T.info("peerLeaveEvent")}},{key:"rtcStatsEvent",value:function e(t){T.info("rtcStatsEvent",t)}},{key:"mediaConnectionStateChangedEvent",value:function e(t){T.info("mediaConnectionStateChangedEvent",t)}},{key:"addListener",value:function e(){var r,n,i,o,a,s,u,c;(r=t.client)===null||r===void 0?void 0:r.on("stream-added",t.addStreamEvent);(n=t.client)===null||n===void 0?void 0:n.on("stream-removed",t.removedStreamEvent);(i=t.client)===null||i===void 0?void 0:i.on("Error",t.errorEvent);(o=t.client)===null||o===void 0?void 0:o.on("network-quality",t.networkQualityEvent);(a=t.client)===null||a===void 0?void 0:a.on("rtc-stats",t.rtcStatsEvent);(s=t.client)===null||s===void 0?void 0:s.on("peer-join",t.peerJoinEvent);(u=t.client)===null||u===void 0?void 0:u.on("peer-leave",t.peerLeaveEvent);(c=t.client)===null||c===void 0?void 0:c.on("media-connection-state-changed",t.mediaConnectionStateChangedEvent)}},{key:"removeListener",value:function e(){var r,n,i,o,a,s,u,c;(r=t.client)===null||r===void 0?void 0:r.off("stream-added",t.addStreamEvent);(n=t.client)===null||n===void 0?void 0:n.off("stream-removed",t.removedStreamEvent);(i=t.client)===null||i===void 0?void 0:i.off("Error",t.errorEvent);(o=t.client)===null||o===void 0?void 0:o.off("network-quality",t.networkQualityEvent);(a=t.client)===null||a===void 0?void 0:a.off("rtc-stats",t.rtcStatsEvent);(s=t.client)===null||s===void 0?void 0:s.off("peer-join",t.peerJoinEvent);(u=t.client)===null||u===void 0?void 0:u.off("peer-leave",t.peerLeaveEvent);(c=t.client)===null||c===void 0?void 0:c.off("media-connection-state-changed",t.mediaConnectionStateChangedEvent)}}])}(n.P2pTrack);I.client=i.default.createClient();w([(0,o.printfDecorator)(T)],I,"setLogLevel",null);w([(0,o.printfDecorator)(T)],I,"streamStatistic",null);w([(0,o.printfDecorator)(T)],I,"createStream",null);w([(0,o.printfDecorator)(T)],I,"addStreamEvent",null);w([(0,o.printfDecorator)(T)],I,"removedStreamEvent",null);w([(0,o.printfDecorator)(T)],I,"errorEvent",null);w([(0,o.printfDecorator)(T)],I,"networkQualityEvent",null);w([(0,o.printfDecorator)(T)],I,"peerJoinEvent",null);w([(0,o.printfDecorator)(T)],I,"peerLeaveEvent",null);w([(0,o.printfDecorator)(T)],I,"rtcStatsEvent",null);w([(0,o.printfDecorator)(T)],I,"mediaConnectionStateChangedEvent",null);w([(0,o.printfDecorator)(T)],I,"addListener",null);w([(0,o.printfDecorator)(T)],I,"removeListener",null)},79739:(e,t,r)=>{"use strict";var n=r(97751);var i=r(10687);var o="DOMException";i(n(o),o)},79947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(4742);var i=u(r(75540));var o=r(44772);var a=r(44104);var s=u(r(88763));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new a.Log({module:"HwICS.UI.CaptionPageLandscape"});let w=function(e){function t(){var e;c(this,t);e=p(this,t,arguments);e._pageName="CaptionPageLandscape";return e}b(t,e);return f(t,[{key:"render",value:function e(){return(0,n.jsx)("div",{className:"caption-landscape transparent-scrollbar",children:(0,n.jsx)(s.default,{})},"caption")}}])}(i.default);w=S([(0,o.componentDecorator)(E)],w);var T=t["default"]=w},79978:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79504);var a=r(67750);var s=r(94901);var u=r(20034);var c=r(60788);var l=r(655);var f=r(55966);var d=r(61034);var h=r(2478);var p=r(78227);var v=r(96395);var m=p("replace");var y=TypeError;var g=o("".indexOf);var b=o("".replace);var _=o("".slice);var S=Math.max;n({target:"String",proto:true},{replaceAll:function e(t,r){var n=a(this);var o,p,E,w,T,I,R,C,k,A;var O=0;var P="";if(u(t)){o=c(t);if(o){p=l(a(d(t)));if(!~g(p,"g"))throw new y("`.replaceAll` does not allow non-global regexes")}E=f(t,m);if(E)return i(E,t,n,r);if(v&&o)return b(l(n),t,r)}w=l(n);T=l(t);I=s(r);if(!I)r=l(r);R=T.length;C=S(1,R);k=g(w,T);while(k!==-1){A=I?l(r(T,k,w)):h(T,w,k,[],undefined,r);P+=_(w,O,k)+A;O=k+R;k=k+C>w.length?-1:g(w,T,k+C)}if(O<w.length){P+=_(w,O)}return P}})},80045:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(98587);function i(e,t){if(null==e)return{};var r,i,o=(0,n.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},80296:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});function n(e){if(Array.isArray(e))return e}function i(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}var o=r(27800);function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){return n(e)||i(e,t)||(0,o.A)(e,t)||a()}},80550:(e,t,r)=>{"use strict";var n=r(44576);e.exports=n.Promise},80630:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(79039);var a=r(31240);var s=i(1..toPrecision);var u=o((function(){return s(1,undefined)!=="1"}))||!o((function(){s({})}));n({target:"Number",proto:true,forced:u},{toPrecision:function e(t){return t===undefined?s(a(this)):s(a(this),t)}})},80741:e=>{"use strict";var t=Math.ceil;var r=Math.floor;e.exports=Math.trunc||function e(n){var i=+n;return(i>0?r:t)(i)}},80747:(e,t,r)=>{"use strict";var n=r(66699);var i=r(16193);var o=r(24659);var a=Error.captureStackTrace;e.exports=function(e,t,r,s){if(o){if(a)a(e,t);else n(e,"stack",i(r,s))}}},80754:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var o=i.Base64={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=this._map;e.clamp();var i=[];for(var o=0;o<r;o+=3){var a=t[o>>>2]>>>24-o%4*8&255;var s=t[o+1>>>2]>>>24-(o+1)%4*8&255;var u=t[o+2>>>2]>>>24-(o+2)%4*8&255;var c=a<<16|s<<8|u;for(var l=0;l<4&&o+l*.75<r;l++){i.push(n.charAt(c>>>6*(3-l)&63))}}var f=n.charAt(64);if(f){while(i.length%4){i.push(f)}}return i.join("")},parse:function(e){var t=e.length;var r=this._map;var n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<r.length;i++){n[r.charCodeAt(i)]=i}}var o=r.charAt(64);if(o){var s=e.indexOf(o);if(s!==-1){t=s}}return a(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(e,t,r){var i=[];var o=0;for(var a=0;a<t;a++){if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2;var u=r[e.charCodeAt(a)]>>>6-a%4*2;var c=s|u;i[o>>>2]|=c<<24-o%4*8;o++}}return n.create(i,o)}})();return e.enc.Base64}))},80775:(e,t,r)=>{"use strict";r.d(t,{K4:()=>l,Xf:()=>c,A9:()=>v,f3:()=>d,xK:()=>f});var n=r(82284);var i=r(96540);var o=r(66351);function a(e,t,r){var n=i.useRef({});if(!("value"in n.current)||r(n.current.condition,t)){n.current.value=e();n.current.condition=t}return n.current.value}var s=r(76288);var u=Number(i.version.split(".")[0]);var c=function e(t,r){if(typeof t==="function"){t(r)}else if((0,n.A)(t)==="object"&&t&&"current"in t){t.current=r}};var l=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}var i=r.filter(Boolean);if(i.length<=1){return i[0]}return function(e){r.forEach((function(t){c(t,e)}))}};var f=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return a((function(){return l.apply(void 0,r)}),r,(function(e,t){return e.length!==t.length||e.every((function(e,r){return e!==t[r]}))}))};var d=function e(t){var r,n;if(!t){return false}if(h(t)&&u>=19){return true}var i=(0,o.isMemo)(t)?t.type.type:t.type;if(typeof i==="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==o.ForwardRef){return false}if(typeof t==="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==o.ForwardRef){return false}return true};function h(e){return(0,i.isValidElement)(e)&&!(0,s.A)(e)}var p=function e(t){return h(t)&&d(t)};var v=function e(t){if(t&&h(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null}},80926:(e,t,r)=>{"use strict";var n=r(79306);var i=r(48981);var o=r(47055);var a=r(26198);var s=TypeError;var u="Reduce of empty array with no initial value";var c=function(e){return function(t,r,c,l){var f=i(t);var d=o(f);var h=a(f);n(r);if(h===0&&c<2)throw new s(u);var p=e?h-1:0;var v=e?-1:1;if(c<2)while(true){if(p in d){l=d[p];p+=v;break}p+=v;if(e?p<0:h<=p){throw new s(u)}}for(;e?p>=0:h>p;p+=v)if(p in d){l=r(l,d[p],p,f)}return l}};e.exports={left:c(false),right:c(true)}},81148:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(72652);var a=r(79306);var s=r(28551);var u=r(1767);var c=r(9539);var l=r(84549);var f=l("every",TypeError);n({target:"Iterator",proto:true,real:true,forced:f},{every:function e(t){s(this);try{a(t)}catch(e){c(this,"throw",e)}if(f)return i(f,this,t);var r=u(this);var n=0;return!o(r,(function(e,r){if(!t(e,n++))return r()}),{IS_RECORD:true,INTERRUPTED:true}).stopped}})},81208:(e,t,r)=>{"use strict";r.r(t)},81278:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(35031);var a=r(25397);var s=r(77347);var u=r(97040);n({target:"Object",stat:true,sham:!i},{getOwnPropertyDescriptors:function e(t){var r=a(t);var n=s.f;var i=o(r);var c={};var l=0;var f,d;while(i.length>l){d=n(r,f=i[l++]);if(d!==undefined)u(c,f,d)}return c}})},81332:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r={N1:3,N2:3,N3:40,N4:10};t.isValid=function e(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};t.from=function e(r){return t.isValid(r)?parseInt(r,10):undefined};t.getPenaltyN1=function e(t){const n=t.size;let i=0;let o=0;let a=0;let s=null;let u=null;for(let e=0;e<n;e++){o=a=0;s=u=null;for(let c=0;c<n;c++){let n=t.get(e,c);if(n===s){o++}else{if(o>=5)i+=r.N1+(o-5);s=n;o=1}n=t.get(c,e);if(n===u){a++}else{if(a>=5)i+=r.N1+(a-5);u=n;a=1}}if(o>=5)i+=r.N1+(o-5);if(a>=5)i+=r.N1+(a-5)}return i};t.getPenaltyN2=function e(t){const n=t.size;let i=0;for(let e=0;e<n-1;e++){for(let r=0;r<n-1;r++){const n=t.get(e,r)+t.get(e,r+1)+t.get(e+1,r)+t.get(e+1,r+1);if(n===4||n===0)i++}}return i*r.N2};t.getPenaltyN3=function e(t){const n=t.size;let i=0;let o=0;let a=0;for(let e=0;e<n;e++){o=a=0;for(let r=0;r<n;r++){o=o<<1&2047|t.get(e,r);if(r>=10&&(o===1488||o===93))i++;a=a<<1&2047|t.get(r,e);if(r>=10&&(a===1488||a===93))i++}}return i*r.N3};t.getPenaltyN4=function e(t){let n=0;const i=t.data.length;for(let e=0;e<i;e++)n+=t.data[e];const o=Math.abs(Math.ceil(n*100/i/5)-10);return o*r.N4};function n(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(r+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return r*n%2+r*n%3===0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.applyMask=function e(t,r){const i=r.size;for(let e=0;e<i;e++){for(let o=0;o<i;o++){if(r.isReserved(o,e))continue;r.xor(o,e,n(t,o,e))}}};t.getBestMask=function e(r,n){const i=Object.keys(t.Patterns).length;let o=0;let a=Infinity;for(let e=0;e<i;e++){n(e);t.applyMask(e,r);const i=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(e,r);if(i<a){a=i;o=e}}return o}},81380:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(43240))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Hasher;var i=t.x64;var o=i.Word;var a=i.WordArray;var s=t.algo;function u(){return o.create.apply(o,arguments)}var c=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)];var l=[];(function(){for(var e=0;e<80;e++){l[e]=u()}})();var f=s.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var o=r[2];var a=r[3];var s=r[4];var u=r[5];var f=r[6];var d=r[7];var h=n.high;var p=n.low;var v=i.high;var m=i.low;var y=o.high;var g=o.low;var b=a.high;var _=a.low;var S=s.high;var E=s.low;var w=u.high;var T=u.low;var I=f.high;var R=f.low;var C=d.high;var k=d.low;var A=h;var O=p;var P=v;var x=m;var L=y;var M=g;var N=b;var D=_;var j=S;var U=E;var V=w;var W=T;var B=I;var G=R;var Z=C;var F=k;for(var H=0;H<80;H++){var X;var Y;var K=l[H];if(H<16){Y=K.high=e[t+H*2]|0;X=K.low=e[t+H*2+1]|0}else{var z=l[H-15];var J=z.high;var Q=z.low;var q=(J>>>1|Q<<31)^(J>>>8|Q<<24)^J>>>7;var $=(Q>>>1|J<<31)^(Q>>>8|J<<24)^(Q>>>7|J<<25);var ee=l[H-2];var te=ee.high;var re=ee.low;var ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6;var ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26);var oe=l[H-7];var ae=oe.high;var se=oe.low;var ue=l[H-16];var ce=ue.high;var le=ue.low;X=$+se;Y=q+ae+(X>>>0<$>>>0?1:0);X=X+ie;Y=Y+ne+(X>>>0<ie>>>0?1:0);X=X+le;Y=Y+ce+(X>>>0<le>>>0?1:0);K.high=Y;K.low=X}var fe=j&V^~j&B;var de=U&W^~U&G;var he=A&P^A&L^P&L;var pe=O&x^O&M^x&M;var ve=(A>>>28|O<<4)^(A<<30|O>>>2)^(A<<25|O>>>7);var me=(O>>>28|A<<4)^(O<<30|A>>>2)^(O<<25|A>>>7);var ye=(j>>>14|U<<18)^(j>>>18|U<<14)^(j<<23|U>>>9);var ge=(U>>>14|j<<18)^(U>>>18|j<<14)^(U<<23|j>>>9);var be=c[H];var _e=be.high;var Se=be.low;var Ee=F+ge;var we=Z+ye+(Ee>>>0<F>>>0?1:0);var Ee=Ee+de;var we=we+fe+(Ee>>>0<de>>>0?1:0);var Ee=Ee+Se;var we=we+_e+(Ee>>>0<Se>>>0?1:0);var Ee=Ee+X;var we=we+Y+(Ee>>>0<X>>>0?1:0);var Te=me+pe;var Ie=ve+he+(Te>>>0<me>>>0?1:0);Z=B;F=G;B=V;G=W;V=j;W=U;U=D+Ee|0;j=N+we+(U>>>0<D>>>0?1:0)|0;N=L;D=M;L=P;M=x;P=A;x=O;O=Ee+Te|0;A=we+Ie+(O>>>0<Ee>>>0?1:0)|0}p=n.low=p+O;n.high=h+A+(p>>>0<O>>>0?1:0);m=i.low=m+x;i.high=v+P+(m>>>0<x>>>0?1:0);g=o.low=g+M;o.high=y+L+(g>>>0<M>>>0?1:0);_=a.low=_+D;a.high=b+N+(_>>>0<D>>>0?1:0);E=s.low=E+U;s.high=S+j+(E>>>0<U>>>0?1:0);T=u.low=T+W;u.high=w+V+(T>>>0<W>>>0?1:0);R=f.low=R+G;f.high=I+B+(R>>>0<G>>>0?1:0);k=d.low=k+F;d.high=C+Z+(k>>>0<F>>>0?1:0)},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+128>>>10<<5)+30]=Math.floor(r/4294967296);t[(n+128>>>10<<5)+31]=r;e.sigBytes=t.length*4;this._process();var i=this._hash.toX32();return i},clone:function(){var e=n.clone.call(this);e._hash=this._hash.clone();return e},blockSize:1024/32});t.SHA512=n._createHelper(f);t.HmacSHA512=n._createHmacHelper(f)})();return e.SHA512}))},81510:(e,t,r)=>{"use strict";var n=r(46518);var i=r(97751);var o=r(39297);var a=r(655);var s=r(25745);var u=r(91296);var c=s("string-to-symbol-registry");var l=s("symbol-to-string-registry");n({target:"Symbol",stat:true,forced:!u},{for:function(e){var t=a(e);if(o(c,t))return c[t];var r=i("Symbol")(t);c[t]=r;l[r]=t;return r}})},81630:(e,t,r)=>{"use strict";var n=r(79504);var i=r(94644);var o=r(57029);var a=n(o);var s=i.aTypedArray;var u=i.exportTypedArrayMethod;u("copyWithin",(function e(t,r){return a(s(this),t,r,arguments.length>2?arguments[2]:undefined)}))},81762:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MediaType=void 0;var r;(function(e){e["VIDEO"]="VIDEO";e["IMAGE"]="IMAGE"})(r||(t.MediaType=r={}))},82003:(e,t,r)=>{"use strict";var n=r(46518);var i=r(96395);var o=r(10916).CONSTRUCTOR;var a=r(80550);var s=r(97751);var u=r(94901);var c=r(36840);var l=a&&a.prototype;n({target:"Promise",proto:true,forced:o,real:true},{catch:function(e){return this.then(undefined,e)}});if(!i&&u(a)){var f=s("Promise").prototype["catch"];if(l["catch"]!==f){c(l,"catch",f,{unsafe:true})}}},82118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NotifyManager=void 0;var n=r(94855);var i=r(40159);var o=r(11686);var a=r(44104);var s=r(26440);var u=r(43260);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const p=new a.Log({module:"NotifyManager"});let v=t.NotifyManager=function(){function e(){c(this,e)}return f(e,null,[{key:"sendJobInfoChange",value:function e({isReady:t,entry:r}){r+=",sendJobInfoChange";p.info("sendJobInfoChange",r,t);const a=n.ConfigManager.getChatInfo(r);i.EventManager.dispatchICSEvent(o.ICSEventKey.JOB_INFO_CHANGE,{jobId:a===null||a===void 0?void 0:a.job_id,websocketAddr:(a===null||a===void 0?void 0:a.chat_access_address)||"",isReady:t,chatInfo:a});(0,s.$dispatch)((0,u.setJobIsReady)(t))}},{key:"sendEnterSleep",value:function e(t){const{chatBtnState:r}=(0,s.$getState)().main;p.info("sendEnterSleep",t,r);window.dispatchEvent(new CustomEvent(o.InnerICSEventKey.ENTER_SLEEP,{detail:{entry:t}}));i.EventManager.dispatchICSEvent(o.ICSEventKey.ENTER_SLEEP)}},{key:"sendEnterActive",value:function e(t){const{chatBtnState:r}=(0,s.$getState)().main;p.info("sendEnterActive",t,r);i.EventManager.dispatchICSEvent(o.ICSEventKey.ENTER_ACTIVE)}},{key:"sendLanguageInfoChange",value:function e({entry:t,data:r}){p.info("sendLanguageInfoChange",t,r);i.EventManager.dispatchICSEvent(o.ICSEventKey.LANGUAGE_INFO_CHANGE,r)}},{key:"sendJobEndMention",value:function e({entry:t,data:r}){p.info("sendJobEndMention",t,r);i.EventManager.dispatchICSEvent(o.ICSEventKey.JOB_END_MENTION,r)}},{key:"sendJobEnd",value:function e({entry:t,data:r}){p.info("sendJobEnd",t,r);i.EventManager.dispatchICSEvent(o.ICSEventKey.JOB_END,r)}}])}()},82144:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(2583),r(91752)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PCMPlayer=e.InputCodecsEnum=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(){"use strict";s=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=v(e,"string");return"symbol"==i(t)?t:t+""}function v(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var m=e.InputCodecsEnum=function(e){e["Int8"]="Int8";e["Int16"]="Int16";e["Int32"]="Int32";e["Float32"]="Float32";return e}({});var y=function(e){e["SUCCESS"]="SUCCESS";e["MUTE"]="MUTE";e["NONE"]="NONE";e["FAIL"]="FAIL";return e}(y||{});var g=function(){function e(t){var i=t.base64,o=t.arrayBuffer,a=t.inputCodec,s=a===void 0?m.Int16:a,u=t.audioCtx,c=t.timeOut,f=c===void 0?1e3:c;l(this,e);h(this,"base64",null);h(this,"arrayBuffer",void 0);h(this,"inputCodec",m.Int16);h(this,"audioBuffer",null);h(this,"initPromise",void 0);h(this,"audioCtx",null);h(this,"timeOut",void 0);h(this,"inputTime",void 0);h(this,"preDealTime",void 0);h(this,"consumeTime",void 0);h(this,"doneTime",void 0);this.base64=i||null;this.arrayBuffer=o;this.audioCtx=u;this.timeOut=f;this.initPromise=this.preDeal();this.inputCodec=s;this.inputTime=Date.now();if(!e.worker){e.worker=new r.WorkerManager({url:(0,n.getArrayBufferWorkerUrl)(),enablePromiseMethod:true,onMessage:function e(){}})}}return d(e,[{key:"preDeal",value:function(){var r=c(s().mark((function r(){var n;var i,o,a,u,c;return s().wrap((function r(s){while(1)switch(s.prev=s.next){case 0:if(!this.arrayBuffer){s.next=4;break}i=this.arrayBuffer;s.next=12;break;case 4:if(!this.base64){s.next=11;break}s.next=7;return Promise.race([(o=e.worker)===null||o===void 0?void 0:o.promisePostMessage({data:this.base64,method:"base64ToUint8Array"}),(0,t.sleep)(this.timeOut)]);case 7:a=s.sent;i=a===null||a===void 0?void 0:a.res;s.next=12;break;case 11:return s.abrupt("return",null);case 12:if(i){s.next=14;break}return s.abrupt("return",null);case 14:s.next=16;return Promise.race([(n=e.worker)===null||n===void 0?void 0:n.promisePostMessage({data:{arrayBuffer:i,codecs:this.inputCodec},method:"typedArrayToFloat32"}),(0,t.sleep)(this.timeOut)]);case 16:u=s.sent;c=u===null||u===void 0?void 0:u.res;if(c){s.next=20;break}return s.abrupt("return",null);case 20:return s.abrupt("return",this.toAudioBuffer(c));case 21:case"end":return s.stop()}}),r,this)})));function n(){return r.apply(this,arguments)}return n}()},{key:"toAudioBuffer",value:function e(t){var r;var n=t.length/1;if(!this.audioCtx){return null}this.audioBuffer=(r=this.audioCtx)===null||r===void 0?void 0:r.createBuffer(1,n,16e3);for(var i=0;i<1;i++){var o=this.audioBuffer.getChannelData(i);var a=i;var s=50;for(var u=0;u<n;u++){o[u]=t[a];if(u>=n-51){o[u]=o[u]*s--/50}if(u<50){o[u]=o[u]*u/50}a+=1}}this.preDealTime=Date.now();return this.audioBuffer}},{key:"consume",value:function(){var e=c(s().mark((function e(){return s().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:this.consumeTime=Date.now();return t.abrupt("return",this.initPromise);case 2:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"done",value:function e(){this.doneTime=Date.now();this.destroy()}},{key:"getStat",value:function e(){return{inputTime:this.inputTime,preDealTime:this.preDealTime,consumeTime:this.consumeTime,doneTime:this.doneTime}}},{key:"getAudioBuffer",value:function e(){return this.audioBuffer}},{key:"destroy",value:function e(){this.audioBuffer=null;this.base64=null;this.audioCtx=null}}])}();h(g,"worker",void 0);var b=function(){function e(t){var r=t.consumeFn,n=t.audioCtx,i=t.inputCodec,o=t.onDone,a=t.timeOut;l(this,e);h(this,"list",[]);h(this,"consumeFn",void 0);h(this,"onDone",void 0);h(this,"inputCodec",m.Int16);h(this,"audioCtx",void 0);h(this,"timeOut",void 0);h(this,"totalInput",0);h(this,"doingNumber",0);h(this,"consumeSuccessNum",0);h(this,"consumeMuteNum",0);h(this,"consumeFailNum",0);h(this,"consumeNoneNum",0);this.consumeFn=r;this.inputCodec=i;this.audioCtx=n;this.timeOut=a;this.onDone=o}return d(e,[{key:"clear",value:function e(){this.list.forEach((function(e){e.destroy()}));this.list=[];this.doingNumber=0;this.totalInput=0;this.consumeSuccessNum=0;this.consumeMuteNum=0;this.consumeFailNum=0;this.consumeNoneNum=0}},{key:"pushBase64",value:function e(t){var r=new g({base64:t,inputCodec:this.inputCodec,audioCtx:this.audioCtx,timeOut:this.timeOut});this.list.push(r);this.totalInput++;this.consume()}},{key:"pushArrayBuffer",value:function e(t){var r=new g({arrayBuffer:t,inputCodec:this.inputCodec,audioCtx:this.audioCtx,timeOut:this.timeOut});this.list.push(r);this.totalInput++;this.consume()}},{key:"stop",value:function e(){}},{key:"consume",value:function(){var e=c(s().mark((function e(){var t;var r;return s().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:if(this.isConsumeImmediately()){n.next=2;break}return n.abrupt("return");case 2:if(!(this.list.length<=0)){n.next=4;break}return n.abrupt("return");case 4:r=this.list.shift();if(r){n.next=7;break}return n.abrupt("return");case 7:this.increase();(t=this.consumeFn)===null||t===void 0||t.call(this,r);case 9:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"done",value:function e(t,r){var n;this.reduce();r.done();if(t===y.SUCCESS){this.consumeSuccessNum++}else if(t===y.FAIL){this.consumeFailNum++}else if(t===y.MUTE){this.consumeMuteNum++}else if(t===y.NONE){this.consumeNoneNum++}(n=this.onDone)===null||n===void 0||n.call(this,{doingNumber:this.doingNumber,totalInput:this.totalInput,consumeSuccessNum:this.consumeSuccessNum,consumeFailNum:this.consumeFailNum,consumeMuteNum:this.consumeMuteNum,consumeNoneNum:this.consumeNoneNum,last:r.getStat()})}},{key:"isConsumeImmediately",value:function e(){return this.doingNumber<=3}},{key:"getWaitingNum",value:function e(){return this.list.length}},{key:"increase",value:function e(){var r=this.doingNumber;this.doingNumber++;if(r<=100&&this.doingNumber>100){(0,t.getPLogger)().error("doingNumber more than 100")}}},{key:"reduce",value:function e(){var r=this.doingNumber;this.doingNumber--;this.consume();if(r>=0&&this.doingNumber<0){(0,t.getPLogger)().error("doingNumber less than 0")}}}])}();var _=e.PCMPlayer=function(){function e(t){l(this,e);h(this,"option",{inputCodec:m.Int16,channelNums:1,sampleRate:8e3,flushTime:1e3});h(this,"audioCtx",void 0);h(this,"audioMediaStreamDestination",void 0);h(this,"gainNode",void 0);h(this,"startTime",void 0);h(this,"muted",false);h(this,"audioConsumeQueue",void 0);h(this,"nodePool",[]);this.option=a({},t);this.checkCodec();this.initAudioContext();this.addAudioContextEvent()}return d(e,[{key:"checkCodec",value:function e(){if(!["Int8","Int16","Int32","Float32"].includes(this.option.inputCodec)){throw new Error("wrong codec.please input one of these codecs:Int8,Int16,Int32,Float32")}return true}},{key:"initAudioContext",value:function e(){var t,r;this.audioCtx=new window.AudioContext;this.audioConsumeQueue=new b({consumeFn:this.flush.bind(this),audioCtx:this.audioCtx,inputCodec:this.option.inputCodec,onDone:this.option.onended,timeOut:(t=this.option)===null||t===void 0?void 0:t.timeOut});this.audioMediaStreamDestination=(r=this.audioCtx)===null||r===void 0?void 0:r.createMediaStreamDestination();this.gainNode=this.audioCtx.createGain();this.gainNode.gain.value=0;this.gainNode.connect(this.audioCtx.destination);this.startTime=this.audioCtx.currentTime;var n=this.audioCtx.createBufferSource();n.buffer=null;n.connect(this.audioMediaStreamDestination);n.connect(this.gainNode);n.start(0)}},{key:"clear",value:function e(r){var n;(0,t.getPLogger)().info("clear",r);(n=this.audioConsumeQueue)===null||n===void 0||n.clear();this.nodePool.forEach((function(e){e.stop();e.disconnect();e.onended=null}));this.nodePool=[]}},{key:"addAudioContextEvent",value:function e(){var t=this;if(this.audioCtx&&typeof t.option.onstatechange==="function"){this.audioCtx.onstatechange=function(e){var r,n;t.audioCtx&&((r=(n=t.option).onstatechange)===null||r===void 0?void 0:r.call(n,this,e,t.audioCtx.state))};return true}return false}},{key:"feedBase64",value:function e(r){var n;if(this.muted){return false}if(!r||(0,t.formatType)(r)!==t.formatType.STRING){(0,t.getPLogger)().error("feedBase64","请传入base64数据");return false}(n=this.audioConsumeQueue)===null||n===void 0||n.pushBase64(r);return true}},{key:"feed",value:function r(n){var i;if(this.muted){return false}var o="feed";if(!e.isTypedArray(n)){(0,t.getPLogger)().error(o,"请传入ArrayBuffer或者任意TypedArray");return false}(i=this.audioConsumeQueue)===null||i===void 0||i.pushArrayBuffer(n);return true}},{key:"getMediaStream",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream}},{key:"getAudioMediaTrack",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream.getAudioTracks()[0]}},{key:"setVolume",value:function e(t){if(!this.gainNode){return}this.gainNode.gain.value=t}},{key:"destroy",value:function e(){var r,n,i,o;(0,t.getPLogger)().info("destroy");(r=this.audioCtx)===null||r===void 0||r.close();(n=this.audioMediaStreamDestination)===null||n===void 0||n.disconnect();(i=this.gainNode)===null||i===void 0||i.disconnect();delete this.audioCtx;delete this.audioMediaStreamDestination;delete this.gainNode;(o=this.audioConsumeQueue)===null||o===void 0||o.clear();delete this.audioConsumeQueue;this.clear("destroy")}},{key:"pause",value:function(){var e=c(s().mark((function e(){var t;return s().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.suspend();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"continue",value:function(){var e=c(s().mark((function e(){var t;return s().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.resume();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"flush",value:function(){var e=c(s().mark((function e(t){var r,n,i;return s().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return t.consume();case 2:r=o.sent;if(r){o.next=6;break}(n=this.audioConsumeQueue)===null||n===void 0||n.done(y.NONE,t);return o.abrupt("return",false);case 6:if(!this.muted){o.next=9;break}(i=this.audioConsumeQueue)===null||i===void 0||i.done(y.MUTE,t);return o.abrupt("return",false);case 9:if(this.playAudioBuffer(r,t)){o.next=11;break}return o.abrupt("return",false);case 11:return o.abrupt("return",true);case 12:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"playAudioBuffer",value:function e(r,n){var i,o=this;if(!this.audioCtx||!this.gainNode||!this.audioMediaStreamDestination){var a;(a=this.audioConsumeQueue)===null||a===void 0||a.done(y.FAIL,n);(0,t.getPLogger)().debug("play","未初始化或已销毁",!this.audioCtx,!this.gainNode,!this.audioMediaStreamDestination);return false}if(!this.startTime||this.startTime<this.audioCtx.currentTime){this.startTime=this.audioCtx.currentTime}var s=((i=this.audioConsumeQueue)===null||i===void 0?void 0:i.getWaitingNum())||0;var u=this.audioCtx.createBufferSource();u.buffer=r;if(s>5){u.playbackRate.value=1.2}u.connect(this.audioMediaStreamDestination);u.connect(this.gainNode);u.onended=function(){var e;(e=o.audioConsumeQueue)===null||e===void 0||e.done(y.SUCCESS,n);if(u){u.stop();u.disconnect();u.onended=null;u=null}};this.nodePool.push(u);u.start(this.startTime);this.startTime+=r.duration;return true}},{key:"playNow",value:function e(){var t;this.startTime=(t=this.audioCtx)===null||t===void 0?void 0:t.currentTime}},{key:"muteAudio",value:function e(){(0,t.getPLogger)().info("muteAudio");this.muted=true}},{key:"unmuteAudio",value:function e(){(0,t.getPLogger)().info("unmuteAudio");this.muted=false}}],[{key:"isTypedArray",value:function e(t){return t.constructor===ArrayBuffer||!!(t.length&&t.buffer&&t.buffer.constructor===ArrayBuffer)}}])}()}))},82169:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher;var i=n.blockSize;r.call(this,e,t,i,n);this._prevBlock=e.slice(t,t+i)}});t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher;var i=n.blockSize;var o=e.slice(t,t+i);r.call(this,e,t,i,n);this._prevBlock=o}});function r(e,t,r,n){var i;var o=this._iv;if(o){i=o.slice(0);this._iv=undefined}else{i=this._prevBlock}n.encryptBlock(i,0);for(var a=0;a<r;a++){e[t+a]^=i[a]}}return t}();return e.mode.CFB}))},82284:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}},82326:(e,t,r)=>{"use strict";var n=r(46518);var i=Math.asinh;var o=Math.log;var a=Math.sqrt;function s(e){var t=+e;return!isFinite(t)||t===0?t:t<0?-s(-t):o(t+a(t*t+1))}var u=!(i&&1/i(0)>0);n({target:"Math",stat:true,forced:u},{asinh:s})},82391:(e,t,r)=>{"use strict";r.r(t)},82836:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VideoItem=void 0;var n=r(74848);var i=r(44772);const o=e=>{var t,r,o;if((0,i.isNullOrEmpty)((t=e.src)===null||t===void 0?void 0:t.trim())&&(0,i.isNullOrEmpty)((r=e.sources)===null||r===void 0?void 0:r.filter((({src:e})=>e===null||e===void 0?void 0:e.trim())))){return null}return(0,n.jsx)("video",{src:decodeURI(e.src).replace(/ /g,""),controls:e.controls,preload:"metadata",onLoadedMetadata:e.dealLoad,onError:e.dealError,className:e.className,children:e===null||e===void 0?void 0:(o=e.sources)===null||o===void 0?void 0:o.map(((e,t)=>(0,n.jsx)("source",{src:decodeURI(e.src).replace(/ /g,""),type:e.type},t)))})};t.VideoItem=o},82839:(e,t,r)=>{"use strict";var n=r(44576);var i=n.navigator;var o=i&&i.userAgent;e.exports=o?String(o):""},83063:(e,t,r)=>{"use strict";var n=r(82839);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},83142:(e,t,r)=>{"use strict";var n=r(70511);n("matchAll")},83237:(e,t,r)=>{"use strict";var n=r(70511);n("replace")},83279:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(95450),r(96540),r(44772),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t=d(t),c(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function c(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let g=function(e){function t(e){var r;o(this,t);r=u(this,t,[e]);v(r,"destroy",false);v(r,"_btnOnClick",(e=>{(0,n.reactStopPropagation)(e);const{onClick:t,disabled:i,loading:o}=r.props;const{ing:a}=r.state;if(t&&!(i||o||a)){r.setState({ing:true},(()=>{const e=t();if(e&&e.then){e.then((()=>{r._setIng(false)}))}else{r._setIng(false)}}))}}));v(r,"_setIng",(e=>{if(r.destroy){return}r.setState({ing:e})}));r.state={ing:false};r.destroy=false;return r}h(t,e);return s(t,[{key:"componentWillUnmount",value:function e(){this.destroy=true}},{key:"render",value:function e(){const{type:t,color:r,size:n,title:o,disabled:a,children:s,loading:u,className:c,dataTestid:l,style:f,dataFunc:d}=this.props;let h="meta-button"+t+r+n+c;const{ing:p}=this.state;if(u){h+=" loading"}if(p||a){h+=" disabled"}return(0,i.jsx)("div",{className:h,onClick:this._btnOnClick,"data-function":d,title:o,"data-testid":l,style:f,children:(0,i.jsx)("div",{className:"btn-text ",children:s})})}}])}(r.Component);v(g,"defaultProps",{type:t.typeMap.FILL,color:t.colorMap.BLUE,size:t.sizeMap.NORMAL,title:"",className:"",loading:false,disabled:false});v(g,"typeMap",t.typeMap);v(g,"sizeMap",t.sizeMap);v(g,"colorMap",t.colorMap);var b=e.default=g}))},83440:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402);var o=r(89286);var a=r(25170);var s=r(83789);var u=r(38469);var c=r(40507);var l=i.has;var f=i.remove;e.exports=function e(t){var r=n(this);var i=s(t);var d=o(r);if(a(r)<=i.size)u(r,(function(e){if(i.includes(e))f(d,e)}));else c(i.getIterator(),(function(e){if(l(r,e))f(d,e)}));return d}},83585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=t.TextCard=void 0;var n=r(74848);var i=r(96540);var o=r(44104);var a=r(44772);var s=r(61347);var u=r(69733);var c=r(51250);r(18496);var l=r(21013);var f=r(63226);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t,r){return t=S(t),g(e,_()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}function g(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var T=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const I=new o.Log({module:"UI.TextCard"});let R=t.TextCard=function(e){function t(e){var r;var n;d(this,t);n=y(this,t,[e]);n.itemId=(0,a.getClientId)();n._updateText=e=>{const{text:t}=n.props;if(n._verbatimObj){n._verbatimObj.updateText(t,e)}else{n.setState({currentSayText:t||""})}};n._checkToShowAll=()=>{const{message:e,showAllContentChatId:t,enableVerbatim:r,text:i}=n.props;return!!(i&&((e===null||e===void 0?void 0:e.messageType)===s.CaptionMessageType.QUESTION||e!==null&&e!==void 0&&e.chatId&&t.includes(e.chatId)||!r))};n._setScrollRef=e=>{if(e){n._scrollElem=e}};n._scrollToBottom=()=>{var e,t;const{enableVerbatim:r}=n.props;(e=(t=n.props).scrollIntoView)===null||e===void 0?void 0:e.call(t);if(n._scrollElem&&r){n._scrollElem.scrollTop=n._scrollElem.scrollHeight}};n.state={currentSayText:""};if(((r=n.props.message)===null||r===void 0?void 0:r.messageType)===s.CaptionMessageType.ANSWER){var i;n._verbatimObj=new c.Verbatim({chatId:(i=n.props.message)===null||i===void 0?void 0:i.chatId,onChange:e=>{if(n.state.currentSayText===e){return}n.setState({currentSayText:e})}})}return n}E(t,e);return p(t,[{key:"componentDidMount",value:function e(){var t,r,n,i;this._updateText("componentDidMount");l.UserTrack.addUserTrack({arg1:f.Arg1Map.MESSAGE_ITEM_RENDER,arg2:"componentDidMount",args:{entry:this.props.itemKey,key:this.itemId.toString(),message:`${(t=this.props.message)===null||t===void 0?void 0:t.timestamp}-${(r=this.props.message)===null||r===void 0?void 0:r.resultId}-${(n=this.props)===null||n===void 0?void 0:(i=n.text)===null||i===void 0?void 0:i.length}`}})}},{key:"componentDidUpdate",value:function e(t,r){var n;if((t===null||t===void 0?void 0:t.text)!==((n=this.props)===null||n===void 0?void 0:n.text)){var i,o,a,s;this._updateText("componentDidUpdate");l.UserTrack.addUserTrack({arg1:f.Arg1Map.MESSAGE_ITEM_RENDER,arg2:"componentDidUpdate",args:{entry:this.props.itemKey,key:this.itemId.toString(),message:`${(i=this.props.message)===null||i===void 0?void 0:i.timestamp}-${(o=this.props.message)===null||o===void 0?void 0:o.resultId}-${(a=this.props)===null||a===void 0?void 0:(s=a.text)===null||s===void 0?void 0:s.length}`}})}if(r.currentSayText!==this.state.currentSayText){this._scrollToBottom();if(this._checkToShowAll()){var u;(u=this._verbatimObj)===null||u===void 0?void 0:u.goToEnd("componentDidUpdate")}}}},{key:"componentWillUnmount",value:function e(){var t;(t=this._verbatimObj)===null||t===void 0?void 0:t.destroy()}},{key:"render",value:function e(){const{currentSayText:t}=this.state;const{message:r}=this.props;if(!r){return null}return(0,n.jsx)("div",{className:"text-card",ref:this._setScrollRef,children:(0,n.jsx)("div",{className:"content",children:(0,n.jsx)("pre",{children:t===null||t===void 0?void 0:t.trim()})})})}}])}(i.Component);t.TextCard=R=T([(0,a.componentDecorator)(I)],R);const C=e=>({showAllContentChatId:e.caption.showAllContentChatId});var k=t["default"]=(0,u.connect)(C)(R)},83635:(e,t,r)=>{"use strict";var n=r(79039);var i=r(44576);var o=i.RegExp;e.exports=n((function(){var e=o(".","s");return!(e.dotAll&&e.test("\n")&&e.flags==="s")}))},83650:(e,t,r)=>{"use strict";var n=r(97080);var i=r(94402);var o=r(89286);var a=r(83789);var s=r(40507);var u=i.add;var c=i.has;var l=i.remove;e.exports=function e(t){var r=n(this);var i=a(t).getIterator();var f=o(r);s(i,(function(e){if(c(r,e))l(f,e);else u(f,e)}));return f}},83707:(e,t,r)=>{"use strict";r.r(t);r.d(t,{Swiper:()=>A,SwiperSlide:()=>P,useSwiper:()=>C,useSwiperSlide:()=>I});var n=r(96540);var i=r(35781);function o(e){return typeof e==="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function a(e,t){const r=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>r.indexOf(e)<0)).forEach((r=>{if(typeof e[r]==="undefined")e[r]=t[r];else if(o(t[r])&&o(e[r])&&Object.keys(t[r]).length>0){if(t[r].__swiper__)e[r]=t[r];else a(e[r],t[r])}else{e[r]=t[r]}}))}function s(e={}){return e.navigation&&typeof e.navigation.nextEl==="undefined"&&typeof e.navigation.prevEl==="undefined"}function u(e={}){return e.pagination&&typeof e.pagination.el==="undefined"}function c(e={}){return e.scrollbar&&typeof e.scrollbar.el==="undefined"}function l(e=""){const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e));const r=[];t.forEach((e=>{if(r.indexOf(e)<0)r.push(e)}));return r.join(" ")}const f=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function d(e={},t=true){const r={on:{}};const n={};const s={};a(r,i["default"].defaults);a(r,i["default"].extendedDefaults);r._emitClasses=true;r.init=false;const u={};const c=f.map((e=>e.replace(/_/,"")));const l=Object.assign({},e);Object.keys(l).forEach((i=>{if(typeof e[i]==="undefined")return;if(c.indexOf(i)>=0){if(o(e[i])){r[i]={};s[i]={};a(r[i],e[i]);a(s[i],e[i])}else{r[i]=e[i];s[i]=e[i]}}else if(i.search(/on[A-Z]/)===0&&typeof e[i]==="function"){if(t){n[`${i[2].toLowerCase()}${i.substr(3)}`]=e[i]}else{r.on[`${i[2].toLowerCase()}${i.substr(3)}`]=e[i]}}else{u[i]=e[i]}}));["navigation","pagination","scrollbar"].forEach((e=>{if(r[e]===true)r[e]={};if(r[e]===false)delete r[e]}));return{params:r,passedParams:s,rest:u,events:n}}function h({el:e,nextEl:t,prevEl:r,paginationEl:n,scrollbarEl:i,swiper:o},a){if(s(a)&&t&&r){o.params.navigation.nextEl=t;o.originalParams.navigation.nextEl=t;o.params.navigation.prevEl=r;o.originalParams.navigation.prevEl=r}if(u(a)&&n){o.params.pagination.el=n;o.originalParams.pagination.el=n}if(c(a)&&i){o.params.scrollbar.el=i;o.originalParams.scrollbar.el=i}o.init(e)}const p=(e,t)=>{let r=t.slidesPerView;if(t.breakpoints){const e=i["default"].prototype.getBreakpoint(t.breakpoints);const n=e in t.breakpoints?t.breakpoints[e]:undefined;if(n&&n.slidesPerView){r=n.slidesPerView}}let n=Math.ceil(parseFloat(t.loopedSlides||r,10));n+=t.loopAdditionalSlides;if(n>e.length&&t.loopedSlidesLimit){n=e.length}return n};function v(e,t,r){const i=t.map(((t,r)=>n.cloneElement(t,{swiper:e,"data-swiper-slide-index":r})));function o(e,t,i){return n.cloneElement(e,{key:`${e.key}-duplicate-${t}-${i}`,className:`${e.props.className||""} ${r.slideDuplicateClass}`})}if(r.loopFillGroupWithBlank){const e=r.slidesPerGroup-i.length%r.slidesPerGroup;if(e!==r.slidesPerGroup){for(let t=0;t<e;t+=1){const e=n.createElement("div",{className:`${r.slideClass} ${r.slideBlankClass}`});i.push(e)}}}if(r.slidesPerView==="auto"&&!r.loopedSlides){r.loopedSlides=i.length}const a=p(i,r);const s=[];const u=[];for(let e=0;e<a;e+=1){const t=e-Math.floor(e/i.length)*i.length;u.push(o(i[t],e,"append"));s.unshift(o(i[i.length-t-1],e,"prepend"))}if(e){e.loopedSlides=a}return[...s,...i,...u]}function m(e,t,r,n,i){const a=[];if(!t)return a;const s=e=>{if(a.indexOf(e)<0)a.push(e)};if(r&&n){const e=n.map(i);const t=r.map(i);if(e.join("")!==t.join(""))s("children");if(n.length!==r.length)s("children")}const u=f.filter((e=>e[0]==="_")).map((e=>e.replace(/_/,"")));u.forEach((r=>{if(r in e&&r in t){if(o(e[r])&&o(t[r])){const n=Object.keys(e[r]);const i=Object.keys(t[r]);if(n.length!==i.length){s(r)}else{n.forEach((n=>{if(e[r][n]!==t[r][n]){s(r)}}));i.forEach((n=>{if(e[r][n]!==t[r][n])s(r)}))}}else if(e[r]!==t[r]){s(r)}}}));return a}function y(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function g(e){const t=[];n.Children.toArray(e).forEach((e=>{if(y(e)){t.push(e)}else if(e.props&&e.props.children){g(e.props.children).forEach((e=>t.push(e)))}}));return t}function b(e){const t=[];const r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};n.Children.toArray(e).forEach((e=>{if(y(e)){t.push(e)}else if(e.props&&e.props.slot&&r[e.props.slot]){r[e.props.slot].push(e)}else if(e.props&&e.props.children){const n=g(e.props.children);if(n.length>0){n.forEach((e=>t.push(e)))}else{r["container-end"].push(e)}}else{r["container-end"].push(e)}}));return{slides:t,slots:r}}function _({swiper:e,slides:t,passedParams:r,changedParams:n,nextEl:i,prevEl:s,scrollbarEl:u,paginationEl:c}){const l=n.filter((e=>e!=="children"&&e!=="direction"));const{params:f,pagination:d,navigation:h,scrollbar:p,virtual:v,thumbs:m}=e;let y;let g;let b;let _;let S;if(n.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&f.thumbs&&!f.thumbs.swiper){y=true}if(n.includes("controller")&&r.controller&&r.controller.control&&f.controller&&!f.controller.control){g=true}if(n.includes("pagination")&&r.pagination&&(r.pagination.el||c)&&(f.pagination||f.pagination===false)&&d&&!d.el){b=true}if(n.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||u)&&(f.scrollbar||f.scrollbar===false)&&p&&!p.el){_=true}if(n.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||i)&&(f.navigation||f.navigation===false)&&h&&!h.prevEl&&!h.nextEl){S=true}const E=t=>{if(!e[t])return;e[t].destroy();if(t==="navigation"){f[t].prevEl=undefined;f[t].nextEl=undefined;e[t].prevEl=undefined;e[t].nextEl=undefined}else{f[t].el=undefined;e[t].el=undefined}};l.forEach((e=>{if(o(f[e])&&o(r[e])){a(f[e],r[e])}else{const t=r[e];if((t===true||t===false)&&(e==="navigation"||e==="pagination"||e==="scrollbar")){if(t===false){E(e)}}else{f[e]=r[e]}}}));if(l.includes("controller")&&!g&&e.controller&&e.controller.control&&f.controller&&f.controller.control){e.controller.control=f.controller.control}if(n.includes("children")&&t&&v&&f.virtual.enabled){v.slides=t;v.update(true)}else if(n.includes("children")&&e.lazy&&e.params.lazy.enabled){e.lazy.load()}if(y){const e=m.init();if(e)m.update(true)}if(g){e.controller.control=f.controller.control}if(b){if(c)f.pagination.el=c;d.init();d.render();d.update()}if(_){if(u)f.scrollbar.el=u;p.init();p.updateSize();p.setTranslate()}if(S){if(i)f.navigation.nextEl=i;if(s)f.navigation.prevEl=s;h.init();h.update()}if(n.includes("allowSlideNext")){e.allowSlideNext=r.allowSlideNext}if(n.includes("allowSlidePrev")){e.allowSlidePrev=r.allowSlidePrev}if(n.includes("direction")){e.changeDirection(r.direction,false)}e.update()}function S(e,t,r){if(!r)return null;const i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`};return t.filter(((e,t)=>t>=r.from&&t<=r.to)).map((t=>n.cloneElement(t,{swiper:e,style:i})))}const E=e=>{if(!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled)return;e.updateSlides();e.updateProgress();e.updateSlidesClasses();if(e.lazy&&e.params.lazy.enabled){e.lazy.load()}if(e.parallax&&e.params.parallax&&e.params.parallax.enabled){e.parallax.setTranslate()}};function w(e,t){if(typeof window==="undefined")return(0,n.useEffect)(e,t);return(0,n.useLayoutEffect)(e,t)}const T=(0,n.createContext)(null);const I=()=>(0,n.useContext)(T);const R=(0,n.createContext)(null);const C=()=>(0,n.useContext)(R);function k(){k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return k.apply(this,arguments)}const A=(0,n.forwardRef)((function(e,t){let{className:r,tag:o="div",wrapperTag:f="div",children:y,onSwiper:g,...T}=e===void 0?{}:e;let I=false;const[C,A]=(0,n.useState)("swiper");const[O,P]=(0,n.useState)(null);const[x,L]=(0,n.useState)(false);const M=(0,n.useRef)(false);const N=(0,n.useRef)(null);const D=(0,n.useRef)(null);const j=(0,n.useRef)(null);const U=(0,n.useRef)(null);const V=(0,n.useRef)(null);const W=(0,n.useRef)(null);const B=(0,n.useRef)(null);const G=(0,n.useRef)(null);const{params:Z,passedParams:F,rest:H,events:X}=d(T);const{slides:Y,slots:K}=b(y);const z=()=>{L(!x)};Object.assign(Z.on,{_containerClasses(e,t){A(t)}});const J=()=>{Object.assign(Z.on,X);I=true;D.current=new i["default"](Z);D.current.loopCreate=()=>{};D.current.loopDestroy=()=>{};if(Z.loop){D.current.loopedSlides=p(Y,Z)}if(D.current.virtual&&D.current.params.virtual.enabled){D.current.virtual.slides=Y;const e={cache:false,slides:Y,renderExternal:P,renderExternalUpdate:false};a(D.current.params.virtual,e);a(D.current.originalParams.virtual,e)}};if(!N.current){J()}if(D.current){D.current.on("_beforeBreakpoint",z)}const Q=()=>{if(I||!X||!D.current)return;Object.keys(X).forEach((e=>{D.current.on(e,X[e])}))};const q=()=>{if(!X||!D.current)return;Object.keys(X).forEach((e=>{D.current.off(e,X[e])}))};(0,n.useEffect)((()=>()=>{if(D.current)D.current.off("_beforeBreakpoint",z)}));(0,n.useEffect)((()=>{if(!M.current&&D.current){D.current.emitSlidesClasses();M.current=true}}));w((()=>{if(t){t.current=N.current}if(!N.current)return;if(D.current.destroyed){J()}h({el:N.current,nextEl:V.current,prevEl:W.current,paginationEl:B.current,scrollbarEl:G.current,swiper:D.current},Z);if(g)g(D.current);return()=>{if(D.current&&!D.current.destroyed){D.current.destroy(true,false)}}}),[]);w((()=>{Q();const e=m(F,j.current,Y,U.current,(e=>e.key));j.current=F;U.current=Y;if(e.length&&D.current&&!D.current.destroyed){_({swiper:D.current,slides:Y,passedParams:F,changedParams:e,nextEl:V.current,prevEl:W.current,scrollbarEl:G.current,paginationEl:B.current})}return()=>{q()}}));w((()=>{E(D.current)}),[O]);function $(){if(Z.virtual){return S(D.current,Y,O)}if(!Z.loop||D.current&&D.current.destroyed){return Y.map((e=>n.cloneElement(e,{swiper:D.current})))}return v(D.current,Y,Z)}return n.createElement(o,k({ref:N,className:l(`${C}${r?` ${r}`:""}`)},H),n.createElement(R.Provider,{value:D.current},K["container-start"],n.createElement(f,{className:"swiper-wrapper"},K["wrapper-start"],$(),K["wrapper-end"]),s(Z)&&n.createElement(n.Fragment,null,n.createElement("div",{ref:W,className:"swiper-button-prev"}),n.createElement("div",{ref:V,className:"swiper-button-next"})),c(Z)&&n.createElement("div",{ref:G,className:"swiper-scrollbar"}),u(Z)&&n.createElement("div",{ref:B,className:"swiper-pagination"}),K["container-end"]))}));A.displayName="Swiper";function O(){O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return O.apply(this,arguments)}const P=(0,n.forwardRef)((function(e,t){let{tag:r="div",children:i,className:o="",swiper:a,zoom:s,virtualIndex:u,...c}=e===void 0?{}:e;const f=(0,n.useRef)(null);const[d,h]=(0,n.useState)("swiper-slide");function p(e,t,r){if(t===f.current){h(r)}}w((()=>{if(t){t.current=f.current}if(!f.current||!a){return}if(a.destroyed){if(d!=="swiper-slide"){h("swiper-slide")}return}a.on("_slideClass",p);return()=>{if(!a)return;a.off("_slideClass",p)}}));w((()=>{if(a&&f.current&&!a.destroyed){h(a.getSlideClasses(f.current))}}),[a]);const v={isActive:d.indexOf("swiper-slide-active")>=0||d.indexOf("swiper-slide-duplicate-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isDuplicate:d.indexOf("swiper-slide-duplicate")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0||d.indexOf("swiper-slide-duplicate-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0||d.indexOf("swiper-slide-duplicate-next")>=0};const m=()=>typeof i==="function"?i(v):i;return n.createElement(r,O({ref:f,className:l(`${d}${o?` ${o}`:""}`),"data-swiper-slide-index":u},c),n.createElement(T.Provider,{value:v},s?n.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s==="number"?s:undefined},m()):m()))}));P.displayName="SwiperSlide"},83789:(e,t,r)=>{"use strict";var n=r(79306);var i=r(28551);var o=r(69565);var a=r(91291);var s=r(1767);var u="Invalid size";var c=RangeError;var l=TypeError;var f=Math.max;var d=function(e,t){this.set=e;this.size=f(t,0);this.has=n(e.has);this.keys=n(e.keys)};d.prototype={getIterator:function(){return s(i(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}};e.exports=function(e){i(e);var t=+e.size;if(t!==t)throw new l(u);var r=a(t);if(r<0)throw new c(u);return new d(e,r)}},83851:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(25397);var a=r(77347).f;var s=r(43724);var u=!s||i((function(){a(1)}));n({target:"Object",stat:true,forced:u,sham:!s},{getOwnPropertyDescriptor:function e(t,r){return a(o(t),r)}})},83917:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(62672),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;t=n(t);function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t,r){return t=h(t),l(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}let m=e.default=function(e){function t(){i(this,t);return c(this,t,arguments)}p(t,e);return a(t,[{key:"render",value:function e(){const{className:t,name:n,maxLength:i,disabled:o,dataTestId:a,placeholder:s,readOnly:u,onContextMenu:c,title:l,autoFocus:f,required:d,onKeyUp:h,tabIndex:p,rows:v,onCopy:m,onCut:y,onPaste:g}=this.props;return(0,r.jsx)("textarea",{autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:t,required:d,ref:this._getRef,autoFocus:f,name:n,title:l,onBlur:this._onBlur,onFocus:this._onFocus,placeholder:s,disabled:o,maxLength:i,"data-testid":a,onClick:this._onClick,onKeyDown:this._onKeyDown,onKeyUp:h,readOnly:u,tabIndex:p,onContextMenu:c,onCompositionStart:this._handleComposition,onCompositionUpdate:this._handleComposition,onCompositionEnd:this._handleComposition,onCopy:m,onCut:y,onPaste:g,onInput:this._onInput,rows:v})}}])}(t.default)}))},84185:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(24913).f;n({target:"Object",stat:true,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},84215:(e,t,r)=>{"use strict";var n=r(44576);var i=r(82839);var o=r(22195);var a=function(e){return i.slice(0,e.length)===e};e.exports=function(){if(a("Bun/"))return"BUN";if(a("Cloudflare-Workers"))return"CLOUDFLARE";if(a("Deno/"))return"DENO";if(a("Node.js/"))return"NODE";if(n.Bun&&typeof Bun.version=="string")return"BUN";if(n.Deno&&typeof Deno.version=="object")return"DENO";if(o(n.process)==="process")return"NODE";if(n.window&&n.document)return"BROWSER";return"REST"}()},84270:(e,t,r)=>{"use strict";var n=r(69565);var i=r(94901);var o=r(20034);var a=TypeError;e.exports=function(e,t){var r,s;if(t==="string"&&i(r=e.toString)&&!o(s=n(r,e)))return s;if(i(r=e.valueOf)&&!o(s=n(r,e)))return s;if(t!=="string"&&i(r=e.toString)&&!o(s=n(r,e)))return s;throw new a("Can't convert object to primitive value")}},84303:(e,t,r)=>{"use strict";r.r(t);r.d(t,{EnhancerArray:()=>Rt,MiddlewareArray:()=>It,SHOULD_AUTOBATCH:()=>fn,TaskAbortError:()=>Zr,__DO_NOT_USE__ActionTypes:()=>Ee,addListener:()=>an,applyMiddleware:()=>Ue,autoBatchEnhancer:()=>yn,bindActionCreators:()=>De,clearAllListeners:()=>sn,combineReducers:()=>Me,compose:()=>je,configureStore:()=>Xt,createAction:()=>mt,createActionCreatorInvariantMiddleware:()=>wt,createAsyncThunk:()=>yr,createDraftSafeSelector:()=>ft,createEntityAdapter:()=>lr,createImmutableStateInvariantMiddleware:()=>jt,createListenerMiddleware:()=>ln,createNextState:()=>ye,createReducer:()=>Jt,createSelector:()=>Ye,createSerializableStateInvariantMiddleware:()=>Bt,createSlice:()=>$t,createStore:()=>Ae,current:()=>j,findNonSerializableValue:()=>Vt,freeze:()=>y,getDefaultMiddleware:()=>Ft,getType:()=>St,isAction:()=>yt,isActionCreator:()=>gt,isAllOf:()=>Er,isAnyOf:()=>Sr,isAsyncThunkAction:()=>Ar,isDraft:()=>i,isFluxStandardAction:()=>bt,isFulfilled:()=>kr,isImmutableDefault:()=>Lt,isPending:()=>Ir,isPlain:()=>Ut,isPlainObject:()=>pt,isRejected:()=>Rr,isRejectedWithValue:()=>Cr,legacy_createStore:()=>Oe,miniSerializeError:()=>mr,nanoid:()=>dr,original:()=>a,prepareAutoBatched:()=>dn,removeListener:()=>un,unwrapResult:()=>gr});function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(false){var i,o}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[$]}function o(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===re}(e)||Array.isArray(e)||!!e[q]||!!(null===(t=e.constructor)||void 0===t?void 0:t[q])||h(e)||p(e))}function a(e){return i(e)||n(23,e),e[$].t}function s(e,t,r){void 0===r&&(r=!1),0===u(e)?(r?Object.keys:ne)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function u(e){var t=e[$];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function c(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===u(e)?e.get(t):e[t]}function f(e,t,r){var n=u(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return K&&e instanceof Map}function p(e){return z&&e instanceof Set}function v(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ie(e);delete t[$];for(var r=ne(t),n=0;n<r.length;n++){var i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),b(e)||i(e)||!o(e)||(u(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&s(e,(function(e,t){return y(t,!0)}),!0)),e}function g(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function _(e){var t=oe[e];return t||n(18,e),t}function S(e,t){oe[e]||(oe[e]=t)}function E(){return true||0,X}function w(e,t){t&&(_("Patches"),e.u=[],e.s=[],e.v=t)}function T(e){I(e),e.p.forEach(C),e.p=null}function I(e){e===X&&(X=e.l)}function R(e){return X={p:[],l:X,h:e,m:!0,_:0}}function C(e){var t=e[$];0===t.i||1===t.i?t.j():t.g=!0}function k(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.O||_("ES5").S(t,e,i),i?(r[$].P&&(T(t),n(4)),o(e)&&(e=A(t,e),t.l||P(t,e)),t.u&&_("Patches").M(r[$].t,e,t.u,t.s)):e=A(t,r,[]),T(t),t.u&&t.v(t.u,t.s),e!==Q?e:void 0}function A(e,t,r){if(b(t))return t;var n=t[$];if(!n)return s(t,(function(i,o){return O(e,n,t,i,o,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return P(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=m(n.k):n.o,o=i,a=!1;3===n.i&&(o=new Set(i),i.clear(),a=!0),s(o,(function(t,o){return O(e,n,i,t,o,r,a)})),P(e,i,!1),r&&e.u&&_("Patches").N(n,r,e.u,e.s)}return n.o}function O(e,t,r,n,a,s,u){if(false&&0,i(a)){var l=A(e,a,s&&t&&3!==t.i&&!c(t.R,n)?s.concat(n):void 0);if(f(r,n,l),!i(l))return;e.m=!1}else u&&r.add(a);if(o(a)&&!b(a)){if(!e.h.D&&e._<1)return;A(e,a),t&&t.A.l||P(e,a)}}function P(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&y(t,r)}function x(e,t){var r=e[$];return(r?v(r):e)[t]}function L(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function N(e){e.o||(e.o=m(e.t))}function D(e,t,r){var n=h(t)?_("MapSet").F(t,r):p(t)?_("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:E(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=n,o=ae;r&&(i=[n],o=se);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return n.k=u,n.j=s,u}(t,r):_("ES5").J(t,r);return(r?r.A:E()).p.push(n),n}function j(e){return i(e)||n(22,e),function e(t){if(!o(t))return t;var r,n=t[$],i=u(t);if(n){if(!n.P&&(n.i<4||!_("ES5").K(n)))return n.t;n.I=!0,r=U(t,i),n.I=!1}else r=U(t,i);return s(r,(function(t,i){n&&l(n.t,t)===i||f(r,t,e(i))})),3===i?new Set(r):r}(e)}function U(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function V(){function e(e,t){var r=u[e];return r?r.enumerable=t:u[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[$];return false&&0,ae.get(t,e)},set:function(t){var r=this[$];false&&0,ae.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][$];if(!n.P)switch(n.i){case 5:o(n)&&M(n);break;case 4:r(n)&&M(n)}}}function r(e){for(var t=e.t,r=e.k,n=ne(r),i=n.length-1;i>=0;i--){var o=n[i];if(o!==$){var a=t[o];if(void 0===a&&!c(t,o))return!0;var s=r[o],u=s&&s[$];if(u?u.t!==a:!d(s,a))return!0}}var l=!!t[$];return n.length!==ne(t).length+(l?0:1)}function o(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n<t.length;n++)if(!t.hasOwnProperty(n))return!0;return!1}function a(e){e.g&&n(3,JSON.stringify(v(e)))}var u={};S("ES5",{J:function(t,r){var n=Array.isArray(t),i=function(t,r){if(t){for(var n=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(n,""+i,e(i,!0));return n}var o=ie(r);delete o[$];for(var a=ne(o),s=0;s<a.length;s++){var u=a[s];o[u]=e(u,t||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(n,t),o={i:n?5:4,A:r?r.A:E(),P:!1,I:!1,R:{},l:r,t,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,$,{value:o,writable:!0}),i},S:function(e,r,n){n?i(r)&&r[$].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[$];if(r){var n=r.t,i=r.k,a=r.R,u=r.i;if(4===u)s(i,(function(t){t!==$&&(void 0!==n[t]||c(n,t)?a[t]||e(i[t]):(a[t]=!0,M(r)))})),s(n,(function(e){void 0!==i[e]||c(i,e)||(a[e]=!1,M(r))}));else if(5===u){if(o(r)&&(M(r),a.length=!0),i.length<n.length)for(var l=i.length;l<n.length;l++)a[l]=!1;else for(var f=n.length;f<i.length;f++)a[f]=!0;for(var d=Math.min(i.length,n.length),h=0;h<d;h++)i.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&e(i[h])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?r(e):o(e)}})}function W(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(h(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(p(t))return new Set(Array.from(t).map(e));var r=Object.create(Object.getPrototypeOf(t));for(var n in t)r[n]=e(t[n]);return c(t,q)&&(r[q]=t[q]),r}function t(t){return i(t)?e(t):t}var r="add";S("Patches",{$:function(t,i){return i.forEach((function(i){for(var o=i.path,a=i.op,s=t,c=0;c<o.length-1;c++){var f=u(s),d=o[c];"string"!=typeof d&&"number"!=typeof d&&(d=""+d),0!==f&&1!==f||"__proto__"!==d&&"constructor"!==d||n(24),"function"==typeof s&&"prototype"===d&&n(24),"object"!=typeof(s=l(s,d))&&n(15,o.join("/"))}var h=u(s),p=e(i.value),v=o[o.length-1];switch(a){case"replace":switch(h){case 2:return s.set(v,p);case 3:n(16);default:return s[v]=p}case r:switch(h){case 1:return"-"===v?s.push(p):s.splice(v,0,p);case 2:return s.set(v,p);case 3:return s.add(p);default:return s[v]=p}case"remove":switch(h){case 1:return s.splice(v,1);case 2:return s.delete(v);case 3:return s.delete(i.value);default:return delete s[v]}default:n(17,a)}})),t},N:function(e,n,i,o){switch(e.i){case 0:case 4:case 2:return function(e,n,i,o){var a=e.t,u=e.o;s(e.R,(function(e,s){var f=l(a,e),d=l(u,e),h=s?c(a,e)?"replace":r:"remove";if(f!==d||"replace"!==h){var p=n.concat(e);i.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:d}),o.push(h===r?{op:"remove",path:p}:"remove"===h?{op:r,path:p,value:t(f)}:{op:"replace",path:p,value:t(f)})}}))}(e,n,i,o);case 5:case 1:return function(e,n,i,o){var a=e.t,s=e.R,u=e.o;if(u.length<a.length){var c=[u,a];a=c[0],u=c[1];var l=[o,i];i=l[0],o=l[1]}for(var f=0;f<a.length;f++)if(s[f]&&u[f]!==a[f]){var d=n.concat([f]);i.push({op:"replace",path:d,value:t(u[f])}),o.push({op:"replace",path:d,value:t(a[f])})}for(var h=a.length;h<u.length;h++){var p=n.concat([h]);i.push({op:r,path:p,value:t(u[h])})}a.length<u.length&&o.push({op:"replace",path:n.concat(["length"]),value:a.length})}(e,n,i,o);case 3:return function(e,t,n,i){var o=e.t,a=e.o,s=0;o.forEach((function(e){if(!a.has(e)){var o=t.concat([s]);n.push({op:"remove",path:o,value:e}),i.unshift({op:r,path:o,value:e})}s++})),s=0,a.forEach((function(e){if(!o.has(e)){var a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:"remove",path:a,value:e})}s++}))}(e,n,i,o)}},M:function(e,t,r,n){r.push({op:"replace",path:[],value:t===Q?void 0:t}),n.push({op:"replace",path:[],value:e})}})}function B(){function e(e,t){function r(){this.constructor=e}a(e,t),e.prototype=(r.prototype=t.prototype,new r)}function t(e){e.o||(e.R=new Map,e.o=new Map(e.t))}function r(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(o(t)){var r=D(e.A.h,t,e);e.p.set(t,r),e.o.add(r)}else e.o.add(t)})))}function i(e){e.g&&n(3,JSON.stringify(v(e)))}var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},u=function(){function r(e,t){return this[$]={i:2,l:t,A:t?t.A:E(),P:!1,I:!1,o:void 0,R:void 0,t:e,k:this,C:!1,g:!1},this}e(r,Map);var n=r.prototype;return Object.defineProperty(n,"size",{get:function(){return v(this[$]).size}}),n.has=function(e){return v(this[$]).has(e)},n.set=function(e,r){var n=this[$];return i(n),v(n).has(e)&&v(n).get(e)===r||(t(n),M(n),n.R.set(e,!0),n.o.set(e,r),n.R.set(e,!0)),this},n.delete=function(e){if(!this.has(e))return!1;var r=this[$];return i(r),t(r),M(r),r.t.has(e)?r.R.set(e,!1):r.R.delete(e),r.o.delete(e),!0},n.clear=function(){var e=this[$];i(e),v(e).size&&(t(e),M(e),e.R=new Map,s(e.t,(function(t){e.R.set(t,!1)})),e.o.clear())},n.forEach=function(e,t){var r=this;v(this[$]).forEach((function(n,i){e.call(t,r.get(i),i,r)}))},n.get=function(e){var r=this[$];i(r);var n=v(r).get(e);if(r.I||!o(n))return n;if(n!==r.t.get(e))return n;var a=D(r.A.h,n,r);return t(r),r.o.set(e,a),a},n.keys=function(){return v(this[$]).keys()},n.values=function(){var e,t=this,r=this.keys();return(e={})[ee]=function(){return t.values()},e.next=function(){var e=r.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},n.entries=function(){var e,t=this,r=this.keys();return(e={})[ee]=function(){return t.entries()},e.next=function(){var e=r.next();if(e.done)return e;var n=t.get(e.value);return{done:!1,value:[e.value,n]}},e},n[ee]=function(){return this.entries()},r}(),c=function(){function t(e,t){return this[$]={i:3,l:t,A:t?t.A:E(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,g:!1,C:!1},this}e(t,Set);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return v(this[$]).size}}),n.has=function(e){var t=this[$];return i(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},n.add=function(e){var t=this[$];return i(t),this.has(e)||(r(t),M(t),t.o.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[$];return i(t),r(t),M(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},n.clear=function(){var e=this[$];i(e),v(e).size&&(r(e),M(e),e.o.clear())},n.values=function(){var e=this[$];return i(e),r(e),e.o.values()},n.entries=function(){var e=this[$];return i(e),r(e),e.o.entries()},n.keys=function(){return this.values()},n[ee]=function(){return this.values()},n.forEach=function(e,t){for(var r=this.values(),n=r.next();!n.done;)e.call(t,n.value,n.value,this),n=r.next()},t}();S("MapSet",{F:function(e,t){return new u(e,t)},T:function(e,t){return new c(e,t)}})}function G(){V(),B(),W()}function Z(e){return e}function F(e){return e}var H,X,Y="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),K="undefined"!=typeof Map,z="undefined"!=typeof Set,J="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Q=Y?Symbol.for("immer-nothing"):((H={})["immer-nothing"]=!0,H),q=Y?Symbol.for("immer-draftable"):"__$immer_draftable",$=Y?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},re=""+Object.prototype.constructor,ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ie=Object.getOwnPropertyDescriptors||function(e){var t={};return ne(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},oe={},ae={get:function(e,t){if(t===$)return e;var r=v(e);if(!c(r,t))return function(e,t,r){var n,i=L(t,r);return i?"value"in i?i.value:null===(n=i.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!o(n)?n:n===x(e.t,t)?(N(e),e.o[t]=D(e.A.h,n,e)):n},has:function(e,t){return t in v(e)},ownKeys:function(e){return Reflect.ownKeys(v(e))},set:function(e,t,r){var n=L(v(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=x(v(e),t),o=null==i?void 0:i[$];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(d(r,i)&&(void 0!==r||c(e.t,t)))return!0;N(e),M(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==x(e.t,t)||t in e.t?(e.R[t]=!1,N(e),M(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=v(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},se={};s(ae,(function(e,t){se[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),se.deleteProperty=function(e,t){return false&&0,se.set.call(this,e,t,void 0)},se.set=function(e,t,r){return false&&0,ae.set.call(this,e[0],t,r,e[0])};var ue=function(){function e(e){var t=this;this.O=J,this.D=!0,this.produce=function(e,r,i){if("function"==typeof e&&"function"!=typeof r){var a=r;r=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return s.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(i))}))}}var u;if("function"!=typeof r&&n(6),void 0!==i&&"function"!=typeof i&&n(7),o(e)){var c=R(t),l=D(t,e,void 0),f=!0;try{u=r(l),f=!1}finally{f?T(c):I(c)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return w(c,i),k(e,c)}),(function(e){throw T(c),e})):(w(c,i),k(u,c))}if(!e||"object"!=typeof e){if(void 0===(u=r(e))&&(u=e),u===Q&&(u=void 0),t.D&&y(u,!0),i){var d=[],h=[];_("Patches").M(e,u,d,h),i(d,h)}return u}n(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(i))}))};var n,i,o=t.produce(e,r,(function(e,t){n=e,i=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,n,i]})):[o,n,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||n(8),i(e)&&(e=j(e));var t=R(this),r=D(this,e,void 0);return r[$].C=!0,I(t),r},t.finishDraft=function(e,t){var r=e&&e[$];false&&0;var n=r.A;return w(n,t),k(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!J&&n(20),this.O=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=_("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),ce=new ue,le=ce.produce,fe=ce.produceWithPatches.bind(ce),de=ce.setAutoFreeze.bind(ce),he=ce.setUseProxies.bind(ce),pe=ce.applyPatches.bind(ce),ve=ce.createDraft.bind(ce),me=ce.finishDraft.bind(ce);const ye=le;var ge=r(89379);function be(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or "+"use the non-minified dev environment for full errors. "}var _e=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}();var Se=function e(){return Math.random().toString(36).substring(7).split("").join(".")};var Ee={INIT:"@@redux/INIT"+Se(),REPLACE:"@@redux/REPLACE"+Se(),PROBE_UNKNOWN_ACTION:function e(){return"@@redux/PROBE_UNKNOWN_ACTION"+Se()}};function we(e){if(typeof e!=="object"||e===null)return false;var t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}function Te(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":{return t}}if(Array.isArray(e))return"array";if(Ce(e))return"date";if(Re(e))return"error";var r=Ie(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Ie(e){return typeof e.constructor==="function"?e.constructor.name:null}function Re(e){return e instanceof Error||typeof e.message==="string"&&e.constructor&&typeof e.constructor.stackTraceLimit==="number"}function Ce(e){if(e instanceof Date)return true;return typeof e.toDateString==="function"&&typeof e.getDate==="function"&&typeof e.setDate==="function"}function ke(e){var t=typeof e;if(false){}return t}function Ae(e,t,r){var n;if(typeof t==="function"&&typeof r==="function"||typeof r==="function"&&typeof arguments[3]==="function"){throw new Error(true?be(0):0)}if(typeof t==="function"&&typeof r==="undefined"){r=t;t=undefined}if(typeof r!=="undefined"){if(typeof r!=="function"){throw new Error(true?be(1):0)}return r(Ae)(e,t)}if(typeof e!=="function"){throw new Error(true?be(2):0)}var i=e;var o=t;var a=[];var s=a;var u=false;function c(){if(s===a){s=a.slice()}}function l(){if(u){throw new Error(true?be(3):0)}return o}function f(e){if(typeof e!=="function"){throw new Error(true?be(4):0)}if(u){throw new Error(true?be(5):0)}var t=true;c();s.push(e);return function r(){if(!t){return}if(u){throw new Error(true?be(6):0)}t=false;c();var n=s.indexOf(e);s.splice(n,1);a=null}}function d(e){if(!we(e)){throw new Error(true?be(7):0)}if(typeof e.type==="undefined"){throw new Error(true?be(8):0)}if(u){throw new Error(true?be(9):0)}try{u=true;o=i(o,e)}finally{u=false}var t=a=s;for(var r=0;r<t.length;r++){var n=t[r];n()}return e}function h(e){if(typeof e!=="function"){throw new Error(true?be(10):0)}i=e;d({type:Ee.REPLACE})}function p(){var e;var t=f;return e={subscribe:function e(r){if(typeof r!=="object"||r===null){throw new Error(true?be(11):0)}function n(){if(r.next){r.next(l())}}n();var i=t(n);return{unsubscribe:i}}},e[_e]=function(){return this},e}d({type:Ee.INIT});return n={dispatch:d,subscribe:f,getState:l,replaceReducer:h},n[_e]=p,n}var Oe=Ae;function Pe(e){if(typeof console!=="undefined"&&typeof console.error==="function"){console.error(e)}try{throw new Error(e)}catch(e){}}function xe(e,t,r,n){var i=Object.keys(t);var o=r&&r.type===Ee.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0){return"Store does not have a valid reducer. Make sure the argument passed "+"to combineReducers is an object whose values are reducers."}if(!we(e)){return"The "+o+' has unexpected type of "'+ke(e)+'". Expected argument to be an object with the following '+('keys: "'+i.join('", "')+'"')}var a=Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)&&!n[e]}));a.forEach((function(e){n[e]=true}));if(r&&r.type===Ee.REPLACE)return;if(a.length>0){return"Unexpected "+(a.length>1?"keys":"key")+" "+('"'+a.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.')}}function Le(e){Object.keys(e).forEach((function(t){var r=e[t];var n=r(undefined,{type:Ee.INIT});if(typeof n==="undefined"){throw new Error(true?be(12):0)}if(typeof r(undefined,{type:Ee.PROBE_UNKNOWN_ACTION()})==="undefined"){throw new Error(true?be(13):0)}}))}function Me(e){var t=Object.keys(e);var r={};for(var n=0;n<t.length;n++){var i=t[n];if(false){}if(typeof e[i]==="function"){r[i]=e[i]}}var o=Object.keys(r);var a;if(false){}var s;try{Le(r)}catch(e){s=e}return function e(t,n){if(t===void 0){t={}}if(s){throw s}if(false){var i}var a=false;var u={};for(var c=0;c<o.length;c++){var l=o[c];var f=r[l];var d=t[l];var h=f(d,n);if(typeof h==="undefined"){var p=n&&n.type;throw new Error(true?be(14):0)}u[l]=h;a=a||h!==d}a=a||o.length!==Object.keys(t).length;return a?u:t}}function Ne(e,t){return function(){return t(e.apply(this,arguments))}}function De(e,t){if(typeof e==="function"){return Ne(e,t)}if(typeof e!=="object"||e===null){throw new Error(true?be(16):0)}var r={};for(var n in e){var i=e[n];if(typeof i==="function"){r[n]=Ne(i,t)}}return r}function je(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length===0){return function(e){return e}}if(t.length===1){return t[0]}return t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function Ue(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return function(e){return function(){var r=e.apply(void 0,arguments);var n=function e(){throw new Error(true?be(15):0)};var i={getState:r.getState,dispatch:function e(){return n.apply(void 0,arguments)}};var o=t.map((function(e){return e(i)}));n=je.apply(void 0,o)(r.dispatch);return(0,ge.A)((0,ge.A)({},r),{},{dispatch:n})}}}var Ve="NOT_FOUND";function We(e){var t;return{get:function r(n){if(t&&e(t.key,n)){return t.value}return Ve},put:function e(r,n){t={key:r,value:n}},getEntries:function e(){return t?[t]:[]},clear:function e(){t=undefined}}}function Be(e,t){var r=[];function n(e){var n=r.findIndex((function(r){return t(e,r.key)}));if(n>-1){var i=r[n];if(n>0){r.splice(n,1);r.unshift(i)}return i.value}return Ve}function i(t,i){if(n(t)===Ve){r.unshift({key:t,value:i});if(r.length>e){r.pop()}}}function o(){return r}function a(){r=[]}return{get:n,put:i,getEntries:o,clear:a}}var Ge=function e(t,r){return t===r};function Ze(e){return function t(r,n){if(r===null||n===null||r.length!==n.length){return false}var i=r.length;for(var o=0;o<i;o++){if(!e(r[o],n[o])){return false}}return true}}function Fe(e,t){var r=typeof t==="object"?t:{equalityCheck:t};var n=r.equalityCheck,i=n===void 0?Ge:n,o=r.maxSize,a=o===void 0?1:o,s=r.resultEqualityCheck;var u=Ze(i);var c=a===1?We(u):Be(a,u);function l(){var t=c.get(arguments);if(t===Ve){t=e.apply(null,arguments);if(s){var r=c.getEntries();var n=r.find((function(e){return s(e.value,t)}));if(n){t=n.value}}c.put(arguments,t)}return t}l.clearCache=function(){return c.clear()};return l}function He(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return typeof e==="function"}))){var r=t.map((function(e){return typeof e==="function"?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function Xe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}var i=function t(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++){i[o]=arguments[o]}var a=0;var s;var u={memoizeOptions:undefined};var c=i.pop();if(typeof c==="object"){u=c;c=i.pop()}if(typeof c!=="function"){throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]")}var l=u,f=l.memoizeOptions,d=f===void 0?r:f;var h=Array.isArray(d)?d:[d];var p=He(i);var v=e.apply(void 0,[function e(){a++;return c.apply(null,arguments)}].concat(h));var m=e((function e(){var t=[];var r=p.length;for(var n=0;n<r;n++){t.push(p[n].apply(null,arguments))}s=v.apply(null,t);return s}));Object.assign(m,{resultFunc:c,memoizedResultFunc:v,dependencies:p,lastResult:function e(){return s},recomputations:function e(){return a},resetRecomputations:function e(){return a=0}});return m};return i}var Ye=Xe(Fe);var Ke=function e(t,r){if(r===void 0){r=Ye}if(typeof t!=="object"){throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof t))}var n=Object.keys(t);var i=r(n.map((function(e){return t[e]})),(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return t.reduce((function(e,t,r){e[n[r]]=t;return e}),{})}));return i};function ze(e){var t=function t(r){var n=r.dispatch,i=r.getState;return function(t){return function(r){if(typeof r==="function"){return r(n,i,e)}return t(r)}}};return t}var Je=ze();Je.withExtraArgument=ze;const Qe=Je;var qe=undefined&&undefined.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var $e=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var et=undefined&&undefined.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};var tt=Object.defineProperty;var rt=Object.defineProperties;var nt=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty;var at=Object.prototype.propertyIsEnumerable;var st=function(e,t,r){return t in e?tt(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r};var ut=function(e,t){for(var r in t||(t={}))if(ot.call(t,r))st(e,r,t[r]);if(it)for(var n=0,i=it(t);n<i.length;n++){var r=i[n];if(at.call(t,r))st(e,r,t[r])}return e};var ct=function(e,t){return rt(e,nt(t))};var lt=function(e,t,r){return new Promise((function(n,i){var o=function(e){try{s(r.next(e))}catch(e){i(e)}};var a=function(e){try{s(r.throw(e))}catch(e){i(e)}};var s=function(e){return e.done?n(e.value):Promise.resolve(e.value).then(o,a)};s((r=r.apply(e,t)).next())}))};var ft=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=Ye.apply(void 0,e);var n=function(e){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}return r.apply(void 0,et([i(e)?j(e):e],t))};return n};var dt=typeof window!=="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length===0)return void 0;if(typeof arguments[0]==="object")return je;return je.apply(null,arguments)};var ht=typeof window!=="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function pt(e){if(typeof e!=="object"||e===null)return false;var t=Object.getPrototypeOf(e);if(t===null)return true;var r=t;while(Object.getPrototypeOf(r)!==null){r=Object.getPrototypeOf(r)}return t===r}var vt=function(e){return e&&typeof e.match==="function"};function mt(e,t){function r(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}if(t){var i=t.apply(void 0,r);if(!i){throw new Error("prepareAction did not return an object")}return ut(ut({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}r.toString=function(){return""+e};r.type=e;r.match=function(t){return t.type===e};return r}function yt(e){return pt(e)&&"type"in e}function gt(e){return typeof e==="function"&&"type"in e&&vt(e)}function bt(e){return yt(e)&&typeof e.type==="string"&&Object.keys(e).every(_t)}function _t(e){return["type","payload","error","meta"].indexOf(e)>-1}function St(e){return""+e}function Et(e){var t=e?(""+e).split("/"):[];var r=t[t.length-1]||"actionCreator";return'Detected an action creator with type "'+(e||"unknown")+"\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch("+r+"())` instead of `dispatch("+r+")`. This is necessary even if the action has no payload."}function wt(e){if(e===void 0){e={}}if(true){return function(){return function(e){return function(t){return e(t)}}}}var t=e.isActionCreator,r=t===void 0?gt:t;return function(){return function(e){return function(t){if(r(t)){console.warn(Et(t.type))}return e(t)}}}}function Tt(e,t){var r=0;return{measureTime:function(e){var t=Date.now();try{return e()}finally{var n=Date.now();r+=n-t}},warnIfExceeded:function(){if(r>e){console.warn(t+" took "+r+"ms, which is more than the warning threshold of "+e+"ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.")}}}}var It=function(e){qe(t,e);function t(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var i=e.apply(this,r)||this;Object.setPrototypeOf(i,t.prototype);return i}Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:false,configurable:true});t.prototype.concat=function(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return e.prototype.concat.apply(this,t)};t.prototype.prepend=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}if(e.length===1&&Array.isArray(e[0])){return new(t.bind.apply(t,et([void 0],e[0].concat(this))))}return new(t.bind.apply(t,et([void 0],e.concat(this))))};return t}(Array);var Rt=function(e){qe(t,e);function t(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var i=e.apply(this,r)||this;Object.setPrototypeOf(i,t.prototype);return i}Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:false,configurable:true});t.prototype.concat=function(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return e.prototype.concat.apply(this,t)};t.prototype.prepend=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}if(e.length===1&&Array.isArray(e[0])){return new(t.bind.apply(t,et([void 0],e[0].concat(this))))}return new(t.bind.apply(t,et([void 0],e.concat(this))))};return t}(Array);function Ct(e){return o(e)?ye(e,(function(){})):e}var kt=null&&"production"==="production";var At="Invariant failed";function Ot(e,t){if(e){return}if(kt){throw new Error(At)}throw new Error(At+": "+(t||""))}function Pt(e,t,r,n){return JSON.stringify(e,xt(t,n),r)}function xt(e,t){var r=[],n=[];if(!t)t=function(e,t){if(r[0]===t)return"[Circular ~]";return"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"};return function(i,o){if(r.length>0){var a=r.indexOf(this);~a?r.splice(a+1):r.push(this);~a?n.splice(a,Infinity,i):n.push(i);if(~r.indexOf(o))o=t.call(this,i,o)}else r.push(o);return e==null?o:e.call(this,i,o)}}function Lt(e){return typeof e!=="object"||e==null||Object.isFrozen(e)}function Mt(e,t,r){var n=Nt(e,t,r);return{detectMutations:function(){return Dt(e,t,n,r)}}}function Nt(e,t,r,n,i){if(t===void 0){t=[]}if(n===void 0){n=""}if(i===void 0){i=new Set}var o={value:r};if(!e(r)&&!i.has(r)){i.add(r);o.children={};for(var a in r){var s=n?n+"."+a:a;if(t.length&&t.indexOf(s)!==-1){continue}o.children[a]=Nt(e,t,r[a],s)}}return o}function Dt(e,t,r,n,i,o){if(t===void 0){t=[]}if(i===void 0){i=false}if(o===void 0){o=""}var a=r?r.value:void 0;var s=a===n;if(i&&!s&&!Number.isNaN(n)){return{wasMutated:true,path:o}}if(e(a)||e(n)){return{wasMutated:false}}var u={};for(var c in r.children){u[c]=true}for(var c in n){u[c]=true}var l=t.length>0;var f=function(i){var a=o?o+"."+i:i;if(l){var u=t.some((function(e){if(e instanceof RegExp){return e.test(a)}return a===e}));if(u){return"continue"}}var c=Dt(e,t,r.children[i],n[i],s,a);if(c.wasMutated){return{value:c}}};for(var c in u){var d=f(c);if(typeof d==="object")return d.value}return{wasMutated:false}}function jt(e){if(e===void 0){e={}}if(true){return function(){return function(e){return function(t){return e(t)}}}}var t=e.isImmutable,r=t===void 0?Lt:t,n=e.ignoredPaths,i=e.warnAfter,o=i===void 0?32:i,a=e.ignore;n=n||a;var s=Mt.bind(null,r,n);return function(e){var t=e.getState;var r=t();var n=s(r);var i;return function(e){return function(a){var u=Tt(o,"ImmutableStateInvariantMiddleware");u.measureTime((function(){r=t();i=n.detectMutations();n=s(r);Ot(!i.wasMutated,"A state mutation was detected between dispatches, in the path '"+(i.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}));var c=e(a);u.measureTime((function(){r=t();i=n.detectMutations();n=s(r);i.wasMutated&&Ot(!i.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(i.path||"")+". Take a look at the reducer(s) handling the action "+Pt(a)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}));u.warnIfExceeded();return c}}}}function Ut(e){var t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||pt(e)}function Vt(e,t,r,n,i,o){if(t===void 0){t=""}if(r===void 0){r=Ut}if(i===void 0){i=[]}var a;if(!r(e)){return{keyPath:t||"<root>",value:e}}if(typeof e!=="object"||e===null){return false}if(o==null?void 0:o.has(e))return false;var s=n!=null?n(e):Object.entries(e);var u=i.length>0;var c=function(e,s){var c=t?t+"."+e:e;if(u){var l=i.some((function(e){if(e instanceof RegExp){return e.test(c)}return c===e}));if(l){return"continue"}}if(!r(s)){return{value:{keyPath:c,value:s}}}if(typeof s==="object"){a=Vt(s,c,r,n,i,o);if(a){return{value:a}}}};for(var l=0,f=s;l<f.length;l++){var d=f[l],h=d[0],p=d[1];var v=c(h,p);if(typeof v==="object")return v.value}if(o&&Wt(e))o.add(e);return false}function Wt(e){if(!Object.isFrozen(e))return false;for(var t=0,r=Object.values(e);t<r.length;t++){var n=r[t];if(typeof n!=="object"||n===null)continue;if(!Wt(n))return false}return true}function Bt(e){if(e===void 0){e={}}if(true){return function(){return function(e){return function(t){return e(t)}}}}var t=e.isSerializable,r=t===void 0?Ut:t,n=e.getEntries,i=e.ignoredActions,o=i===void 0?[]:i,a=e.ignoredActionPaths,s=a===void 0?["meta.arg","meta.baseQueryMeta"]:a,u=e.ignoredPaths,c=u===void 0?[]:u,l=e.warnAfter,f=l===void 0?32:l,d=e.ignoreState,h=d===void 0?false:d,p=e.ignoreActions,v=p===void 0?false:p,m=e.disableCache,y=m===void 0?false:m;var g=!y&&WeakSet?new WeakSet:void 0;return function(e){return function(t){return function(i){var a=t(i);var u=Tt(f,"SerializableStateInvariantMiddleware");if(!v&&!(o.length&&o.indexOf(i.type)!==-1)){u.measureTime((function(){var e=Vt(i,"",r,n,s,g);if(e){var t=e.keyPath,o=e.value;console.error("A non-serializable value was detected in an action, in the path: `"+t+"`. Value:",o,"\nTake a look at the logic that dispatched this action: ",i,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}))}if(!h){u.measureTime((function(){var t=e.getState();var o=Vt(t,"",r,n,c,g);if(o){var a=o.keyPath,s=o.value;console.error("A non-serializable value was detected in the state, in the path: `"+a+"`. Value:",s,"\nTake a look at the reducer(s) handling this action type: "+i.type+".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)")}}));u.warnIfExceeded()}return a}}}}function Gt(e){return typeof e==="boolean"}function Zt(){return function e(t){return Ft(t)}}function Ft(e){if(e===void 0){e={}}var t=e.thunk,r=t===void 0?true:t,n=e.immutableCheck,i=n===void 0?true:n,o=e.serializableCheck,a=o===void 0?true:o,s=e.actionCreatorCheck,u=s===void 0?true:s;var c=new It;if(r){if(Gt(r)){c.push(Qe)}else{c.push(Qe.withExtraArgument(r.extraArgument))}}if(false){var l,f,d}return c}var Ht="production"==="production";function Xt(e){var t=Zt();var r=e||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,a=o===void 0?t():o,s=r.devTools,u=s===void 0?true:s,c=r.preloadedState,l=c===void 0?void 0:c,f=r.enhancers,d=f===void 0?void 0:f;var h;if(typeof i==="function"){h=i}else if(pt(i)){h=Me(i)}else{throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers')}var p=a;if(typeof p==="function"){p=p(t);if(!Ht&&!Array.isArray(p)){throw new Error("when using a middleware builder function, an array of middleware must be returned")}}if(!Ht&&p.some((function(e){return typeof e!=="function"}))){throw new Error("each middleware provided to configureStore must be a function")}var v=Ue.apply(void 0,p);var m=je;if(u){m=dt(ut({trace:!Ht},typeof u==="object"&&u))}var y=new Rt(v);var g=y;if(Array.isArray(d)){g=et([v],d)}else if(typeof d==="function"){g=d(y)}var b=m.apply(void 0,g);return Ae(h,l,b)}function Yt(e){var t={};var r=[];var n;var i={addCase:function(e,r){if(false){}var n=typeof e==="string"?e:e.type;if(!n){throw new Error("`builder.addCase` cannot be called with an empty action type")}if(n in t){throw new Error("`builder.addCase` cannot be called with two reducers for the same action type")}t[n]=r;return i},addMatcher:function(e,t){if(false){}r.push({matcher:e,reducer:t});return i},addDefaultCase:function(e){if(false){}n=e;return i}};e(i);return[t,r,n]}function Kt(e){return typeof e==="function"}var zt=false;function Jt(e,t,r,n){if(r===void 0){r=[]}if(false){}var a=typeof t==="function"?Yt(t):[t,r,n],s=a[0],u=a[1],c=a[2];var l;if(Kt(e)){l=function(){return Ct(e())}}else{var f=Ct(e);l=function(){return f}}function d(e,t){if(e===void 0){e=l()}var r=et([s[t.type]],u.filter((function(e){var r=e.matcher;return r(t)})).map((function(e){var t=e.reducer;return t})));if(r.filter((function(e){return!!e})).length===0){r=[c]}return r.reduce((function(e,r){if(r){if(i(e)){var n=e;var a=r(n,t);if(a===void 0){return e}return a}else if(!o(e)){var a=r(e,t);if(a===void 0){if(e===null){return e}throw Error("A case reducer on a non-draftable value must not return undefined")}return a}else{return ye(e,(function(e){return r(e,t)}))}}return e}),e)}d.getInitialState=l;return d}var Qt=false;function qt(e,t){return e+"/"+t}function $t(e){var t=e.name;if(!t){throw new Error("`name` is a required option for createSlice")}if(typeof process!=="undefined"&&"production"==="development"){}var r=typeof e.initialState=="function"?e.initialState:Ct(e.initialState);var n=e.reducers||{};var i=Object.keys(n);var o={};var a={};var s={};i.forEach((function(e){var r=n[e];var i=qt(t,e);var u;var c;if("reducer"in r){u=r.reducer;c=r.prepare}else{u=r}o[e]=u;a[i]=u;s[e]=c?mt(i,c):mt(i)}));function u(){if(false){}var t=typeof e.extraReducers==="function"?Yt(e.extraReducers):[e.extraReducers],n=t[0],i=n===void 0?{}:n,o=t[1],s=o===void 0?[]:o,u=t[2],c=u===void 0?void 0:u;var l=ut(ut({},i),a);return Jt(r,(function(e){for(var t in l){e.addCase(t,l[t])}for(var r=0,n=s;r<n.length;r++){var i=n[r];e.addMatcher(i.matcher,i.reducer)}if(c){e.addDefaultCase(c)}}))}var c;return{name:t,reducer:function(e,t){if(!c)c=u();return c(e,t)},actions:s,caseReducers:o,getInitialState:function(){if(!c)c=u();return c.getInitialState()}}}function er(){return{ids:[],entities:{}}}function tr(){function e(e){if(e===void 0){e={}}return Object.assign(er(),e)}return{getInitialState:e}}function rr(){function e(e){var t=function(e){return e.ids};var r=function(e){return e.entities};var n=ft(t,r,(function(e,t){return e.map((function(e){return t[e]}))}));var i=function(e,t){return t};var o=function(e,t){return e[t]};var a=ft(t,(function(e){return e.length}));if(!e){return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:a,selectById:ft(r,i,o)}}var s=ft(e,r);return{selectIds:ft(e,t),selectEntities:s,selectAll:ft(e,n),selectTotal:ft(e,a),selectById:ft(s,i,o)}}return{getSelectors:e}}function nr(e){var t=ir((function(t,r){return e(r)}));return function e(r){return t(r,void 0)}}function ir(e){return function t(r,n){function o(e){return bt(e)}var a=function(t){if(o(n)){e(n.payload,t)}else{e(n,t)}};if(i(r)){a(r);return r}else{return ye(r,a)}}}function or(e,t){var r=t(e);if(false){}return r}function ar(e){if(!Array.isArray(e)){e=Object.values(e)}return e}function sr(e,t,r){e=ar(e);var n=[];var i=[];for(var o=0,a=e;o<a.length;o++){var s=a[o];var u=or(s,t);if(u in r.entities){i.push({id:u,changes:s})}else{n.push(s)}}return[n,i]}function ur(e){function t(t,r){var n=or(t,e);if(n in r.entities){return}r.ids.push(n);r.entities[n]=t}function r(e,r){e=ar(e);for(var n=0,i=e;n<i.length;n++){var o=i[n];t(o,r)}}function n(t,r){var n=or(t,e);if(!(n in r.entities)){r.ids.push(n)}r.entities[n]=t}function i(e,t){e=ar(e);for(var r=0,i=e;r<i.length;r++){var o=i[r];n(o,t)}}function o(e,t){e=ar(e);t.ids=[];t.entities={};r(e,t)}function a(e,t){return s([e],t)}function s(e,t){var r=false;e.forEach((function(e){if(e in t.entities){delete t.entities[e];r=true}}));if(r){t.ids=t.ids.filter((function(e){return e in t.entities}))}}function u(e){Object.assign(e,{ids:[],entities:{}})}function c(t,r,n){var i=n.entities[r.id];var o=Object.assign({},i,r.changes);var a=or(o,e);var s=a!==r.id;if(s){t[r.id]=a;delete n.entities[r.id]}n.entities[a]=o;return s}function l(e,t){return f([e],t)}function f(e,t){var r={};var n={};e.forEach((function(e){if(e.id in t.entities){n[e.id]={id:e.id,changes:ut(ut({},n[e.id]?n[e.id].changes:null),e.changes)}}}));e=Object.values(n);var i=e.length>0;if(i){var o=e.filter((function(e){return c(r,e,t)})).length>0;if(o){t.ids=Object.keys(t.entities)}}}function d(e,t){return h([e],t)}function h(t,n){var i=sr(t,e,n),o=i[0],a=i[1];f(a,n);r(o,n)}return{removeAll:nr(u),addOne:ir(t),addMany:ir(r),setOne:ir(n),setMany:ir(i),setAll:ir(o),updateOne:ir(l),updateMany:ir(f),upsertOne:ir(d),upsertMany:ir(h),removeOne:ir(a),removeMany:ir(s)}}function cr(e,t){var r=ur(e),n=r.removeOne,i=r.removeMany,o=r.removeAll;function a(e,t){return s([e],t)}function s(t,r){t=ar(t);var n=t.filter((function(t){return!(or(t,e)in r.entities)}));if(n.length!==0){m(n,r)}}function u(e,t){return c([e],t)}function c(e,t){e=ar(e);if(e.length!==0){m(e,t)}}function l(e,t){e=ar(e);t.entities={};t.ids=[];s(e,t)}function f(e,t){return d([e],t)}function d(t,r){var n=false;for(var i=0,o=t;i<o.length;i++){var a=o[i];var s=r.entities[a.id];if(!s){continue}n=true;Object.assign(s,a.changes);var u=e(s);if(a.id!==u){delete r.entities[a.id];r.entities[u]=s}}if(n){y(r)}}function h(e,t){return p([e],t)}function p(t,r){var n=sr(t,e,r),i=n[0],o=n[1];d(o,r);s(i,r)}function v(e,t){if(e.length!==t.length){return false}for(var r=0;r<e.length&&r<t.length;r++){if(e[r]===t[r]){continue}return false}return true}function m(t,r){t.forEach((function(t){r.entities[e(t)]=t}));y(r)}function y(r){var n=Object.values(r.entities);n.sort(t);var i=n.map(e);var o=r.ids;if(!v(o,i)){r.ids=i}}return{removeOne:n,removeMany:i,removeAll:o,addOne:ir(a),updateOne:ir(f),upsertOne:ir(h),setOne:ir(u),setMany:ir(c),setAll:ir(l),addMany:ir(s),updateMany:ir(d),upsertMany:ir(p)}}function lr(e){if(e===void 0){e={}}var t=ut({sortComparer:false,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer;var i=tr();var o=rr();var a=n?cr(r,n):ur(r);return ut(ut(ut({selectId:r,sortComparer:n},i),o),a)}var fr="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";var dr=function(e){if(e===void 0){e=21}var t="";var r=e;while(r--){t+=fr[Math.random()*64|0]}return t};var hr=["name","message","stack","code"];var pr=function(){function e(e,t){this.payload=e;this.meta=t}return e}();var vr=function(){function e(e,t){this.payload=e;this.meta=t}return e}();var mr=function(e){if(typeof e==="object"&&e!==null){var t={};for(var r=0,n=hr;r<n.length;r++){var i=n[r];if(typeof e[i]==="string"){t[i]=e[i]}}return t}return{message:String(e)}};var yr=function(){function e(e,t,r){var n=mt(e+"/fulfilled",(function(e,t,r,n){return{payload:e,meta:ct(ut({},n||{}),{arg:r,requestId:t,requestStatus:"fulfilled"})}}));var i=mt(e+"/pending",(function(e,t,r){return{payload:void 0,meta:ct(ut({},r||{}),{arg:t,requestId:e,requestStatus:"pending"})}}));var o=mt(e+"/rejected",(function(e,t,n,i,o){return{payload:i,error:(r&&r.serializeError||mr)(e||"Rejected"),meta:ct(ut({},o||{}),{arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:(e==null?void 0:e.name)==="AbortError",condition:(e==null?void 0:e.name)==="ConditionError"})}}));var a=false;var s=typeof AbortController!=="undefined"?AbortController:function(){function e(){this.signal={aborted:false,addEventListener:function(){},dispatchEvent:function(){return false},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}e.prototype.abort=function(){if(false){}};return e}();function u(e){return function(a,u,c){var l=(r==null?void 0:r.idGenerator)?r.idGenerator(e):dr();var f=new s;var d;var h=false;function p(e){d=e;f.abort()}var v=function(){return lt(this,null,(function(){var s,v,m,y,g,b,_;return $e(this,(function(S){switch(S.label){case 0:S.trys.push([0,4,,5]);y=(s=r==null?void 0:r.condition)==null?void 0:s.call(r,e,{getState:u,extra:c});if(!br(y))return[3,2];return[4,y];case 1:y=S.sent();S.label=2;case 2:if(y===false||f.signal.aborted){throw{name:"ConditionError",message:"Aborted due to condition callback returning false."}}h=true;g=new Promise((function(e,t){return f.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))}));a(i(l,e,(v=r==null?void 0:r.getPendingMeta)==null?void 0:v.call(r,{requestId:l,arg:e},{getState:u,extra:c})));return[4,Promise.race([g,Promise.resolve(t(e,{dispatch:a,getState:u,extra:c,requestId:l,signal:f.signal,abort:p,rejectWithValue:function(e,t){return new pr(e,t)},fulfillWithValue:function(e,t){return new vr(e,t)}})).then((function(t){if(t instanceof pr){throw t}if(t instanceof vr){return n(t.payload,l,e,t.meta)}return n(t,l,e)}))])];case 3:m=S.sent();return[3,5];case 4:b=S.sent();m=b instanceof pr?o(null,l,e,b.payload,b.meta):o(b,l,e);return[3,5];case 5:_=r&&!r.dispatchConditionRejection&&o.match(m)&&m.meta.condition;if(!_){a(m)}return[2,m]}}))}))}();return Object.assign(v,{abort:p,requestId:l,arg:e,unwrap:function(){return v.then(gr)}})}}return Object.assign(u,{pending:i,rejected:o,fulfilled:n,typePrefix:e})}e.withTypes=function(){return e};return e}();function gr(e){if(e.meta&&e.meta.rejectedWithValue){throw e.payload}if(e.error){throw e.error}return e.payload}function br(e){return e!==null&&typeof e==="object"&&typeof e.then==="function"}var _r=function(e,t){if(vt(e)){return e.match(t)}else{return e(t)}};function Sr(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return function(t){return e.some((function(e){return _r(e,t)}))}}function Er(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return function(t){return e.every((function(e){return _r(e,t)}))}}function wr(e,t){if(!e||!e.meta)return false;var r=typeof e.meta.requestId==="string";var n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Tr(e){return typeof e[0]==="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ir(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e.length===0){return function(e){return wr(e,["pending"])}}if(!Tr(e)){return Ir()(e[0])}return function(t){var r=e.map((function(e){return e.pending}));var n=Sr.apply(void 0,r);return n(t)}}function Rr(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e.length===0){return function(e){return wr(e,["rejected"])}}if(!Tr(e)){return Rr()(e[0])}return function(t){var r=e.map((function(e){return e.rejected}));var n=Sr.apply(void 0,r);return n(t)}}function Cr(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=function(e){return e&&e.meta&&e.meta.rejectedWithValue};if(e.length===0){return function(t){var n=Er(Rr.apply(void 0,e),r);return n(t)}}if(!Tr(e)){return Cr()(e[0])}return function(t){var n=Er(Rr.apply(void 0,e),r);return n(t)}}function kr(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e.length===0){return function(e){return wr(e,["fulfilled"])}}if(!Tr(e)){return kr()(e[0])}return function(t){var r=e.map((function(e){return e.fulfilled}));var n=Sr.apply(void 0,r);return n(t)}}function Ar(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}if(e.length===0){return function(e){return wr(e,["pending","fulfilled","rejected"])}}if(!Tr(e)){return Ar()(e[0])}return function(t){var r=[];for(var n=0,i=e;n<i.length;n++){var o=i[n];r.push(o.pending,o.rejected,o.fulfilled)}var a=Sr.apply(void 0,r);return a(t)}}var Or=function(e,t){if(typeof e!=="function"){throw new TypeError(t+" is not a function")}};var Pr=function(){};var xr=function(e,t){if(t===void 0){t=Pr}e.catch(t);return e};var Lr=function(e,t){e.addEventListener("abort",t,{once:true});return function(){return e.removeEventListener("abort",t)}};var Mr=function(e,t){var r=e.signal;if(r.aborted){return}if(!("reason"in r)){Object.defineProperty(r,"reason",{enumerable:true,value:t,configurable:true,writable:true})}e.abort(t)};var Nr="task";var Dr="listener";var jr="completed";var Ur="cancelled";var Vr="task-"+Ur;var Wr="task-"+jr;var Br=Dr+"-"+Ur;var Gr=Dr+"-"+jr;var Zr=function(){function e(e){this.code=e;this.name="TaskAbortError";this.message=Nr+" "+Ur+" (reason: "+e+")"}return e}();var Fr=function(e){if(e.aborted){throw new Zr(e.reason)}};function Hr(e,t){var r=Pr;return new Promise((function(n,i){var o=function(){return i(new Zr(e.reason))};if(e.aborted){o();return}r=Lr(e,o);t.finally((function(){return r()})).then(n,i)})).finally((function(){r=Pr}))}var Xr=function(e,t){return lt(void 0,null,(function(){var r,n;return $e(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,4,5]);return[4,Promise.resolve()];case 1:i.sent();return[4,e()];case 2:r=i.sent();return[2,{status:"ok",value:r}];case 3:n=i.sent();return[2,{status:n instanceof Zr?"cancelled":"rejected",error:n}];case 4:t==null?void 0:t();return[7];case 5:return[2]}}))}))};var Yr=function(e){return function(t){return xr(Hr(e,t).then((function(t){Fr(e);return t})))}};var Kr=function(e){var t=Yr(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}};var zr=Object.assign;var Jr={};var Qr="listenerMiddleware";var qr=function(e,t){var r=function(t){return Lr(e,(function(){return Mr(t,e.reason)}))};return function(n,i){Or(n,"taskExecutor");var o=new AbortController;r(o);var a=Xr((function(){return lt(void 0,null,(function(){var t;return $e(this,(function(r){switch(r.label){case 0:Fr(e);Fr(o.signal);return[4,n({pause:Yr(o.signal),delay:Kr(o.signal),signal:o.signal})];case 1:t=r.sent();Fr(o.signal);return[2,t]}}))}))}),(function(){return Mr(o,Wr)}));if(i==null?void 0:i.autoJoin){t.push(a)}return{result:Yr(e)(a),cancel:function(){Mr(o,Vr)}}}};var $r=function(e,t){var r=function(r,n){return lt(void 0,null,(function(){var i,o,a,s;return $e(this,(function(u){switch(u.label){case 0:Fr(t);i=function(){};o=new Promise((function(t,n){var o=e({predicate:r,effect:function(e,r){r.unsubscribe();t([e,r.getState(),r.getOriginalState()])}});i=function(){o();n()}}));a=[o];if(n!=null){a.push(new Promise((function(e){return setTimeout(e,n,null)})))}u.label=1;case 1:u.trys.push([1,,3,4]);return[4,Hr(t,Promise.race(a))];case 2:s=u.sent();Fr(t);return[2,s];case 3:i();return[7];case 4:return[2]}}))}))};return function(e,t){return xr(r(e,t))}};var en=function(e){var t=e.type,r=e.actionCreator,n=e.matcher,i=e.predicate,o=e.effect;if(t){i=mt(t).match}else if(r){t=r.type;i=r.match}else if(n){i=n}else if(i){}else{throw new Error("Creating or removing a listener requires one of the known fields for matching an action")}Or(o,"options.listener");return{predicate:i,type:t,effect:o}};var tn=function(e){var t=en(e),r=t.type,n=t.predicate,i=t.effect;var o=dr();var a={id:o,effect:i,type:r,predicate:n,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}};return a};var rn=function(e){e.pending.forEach((function(e){Mr(e,Br)}))};var nn=function(e){return function(){e.forEach(rn);e.clear()}};var on=function(e,t,r){try{e(t,r)}catch(e){setTimeout((function(){throw e}),0)}};var an=mt(Qr+"/add");var sn=mt(Qr+"/removeAll");var un=mt(Qr+"/remove");var cn=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}console.error.apply(console,et([Qr+"/error"],e))};function ln(e){var t=this;if(e===void 0){e={}}var r=new Map;var n=e.extra,i=e.onError,o=i===void 0?cn:i;Or(o,"onError");var a=function(e){e.unsubscribe=function(){return r.delete(e.id)};r.set(e.id,e);return function(t){e.unsubscribe();if(t==null?void 0:t.cancelActive){rn(e)}}};var s=function(e){for(var t=0,n=Array.from(r.values());t<n.length;t++){var i=n[t];if(e(i)){return i}}return void 0};var u=function(e){var t=s((function(t){return t.effect===e.effect}));if(!t){t=tn(e)}return a(t)};var c=function(e){var t=en(e),r=t.type,n=t.effect,i=t.predicate;var o=s((function(e){var t=typeof r==="string"?e.type===r:e.predicate===i;return t&&e.effect===n}));if(o){o.unsubscribe();if(e.cancelActive){rn(o)}}return!!o};var l=function(e,i,a,s){return lt(t,null,(function(){var t,c,l,f;return $e(this,(function(d){switch(d.label){case 0:t=new AbortController;c=$r(u,t.signal);l=[];d.label=1;case 1:d.trys.push([1,3,4,6]);e.pending.add(t);return[4,Promise.resolve(e.effect(i,zr({},a,{getOriginalState:s,condition:function(e,t){return c(e,t).then(Boolean)},take:c,delay:Kr(t.signal),pause:Yr(t.signal),extra:n,signal:t.signal,fork:qr(t.signal,l),unsubscribe:e.unsubscribe,subscribe:function(){r.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,r,n){if(e!==t){Mr(e,Br);n.delete(e)}}))}})))];case 2:d.sent();return[3,6];case 3:f=d.sent();if(!(f instanceof Zr)){on(o,f,{raisedBy:"effect"})}return[3,6];case 4:return[4,Promise.allSettled(l)];case 5:d.sent();Mr(t,Gr);e.pending.delete(t);return[7];case 6:return[2]}}))}))};var f=nn(r);var d=function(e){return function(t){return function(n){if(!yt(n)){return t(n)}if(an.match(n)){return u(n.payload)}if(sn.match(n)){f();return}if(un.match(n)){return c(n.payload)}var i=e.getState();var a=function(){if(i===Jr){throw new Error(Qr+": getOriginalState can only be called synchronously")}return i};var s;try{s=t(n);if(r.size>0){var d=e.getState();var h=Array.from(r.values());for(var p=0,v=h;p<v.length;p++){var m=v[p];var y=false;try{y=m.predicate(n,d,i)}catch(e){y=false;on(o,e,{raisedBy:"predicate"})}if(!y){continue}l(m,n,e,a)}}}finally{i=Jr}return s}}};return{middleware:d,startListening:u,stopListening:c,clearListeners:f}}var fn="RTK_autoBatch";var dn=function(){return function(e){var t;return{payload:e,meta:(t={},t[fn]=true,t)}}};var hn;var pn=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:typeof r.g!=="undefined"?r.g:globalThis):function(e){return(hn||(hn=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))};var vn=function(e){return function(t){setTimeout(t,e)}};var mn=typeof window!=="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:vn(10);var yn=function(e){if(e===void 0){e={type:"raf"}}return function(t){return function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var i=t.apply(void 0,r);var o=true;var a=false;var s=false;var u=new Set;var c=e.type==="tick"?pn:e.type==="raf"?mn:e.type==="callback"?e.queueNotification:vn(e.timeout);var l=function(){s=false;if(a){a=false;u.forEach((function(e){return e()}))}};return Object.assign({},i,{subscribe:function(e){var t=function(){return o&&e()};var r=i.subscribe(t);u.add(e);return function(){r();u.delete(e)}},dispatch:function(e){var t;try{o=!((t=e==null?void 0:e.meta)==null?void 0:t[fn]);a=!o;if(a){if(!s){s=true;c(l)}}return i.dispatch(e)}finally{o=true}}})}}};V()},84315:(e,t,r)=>{"use strict";r(52675);r(89463);r(66412);r(60193);r(92168);r(2259);r(86964);r(83142);r(83237);r(61833);r(67947);r(31073);r(45700);r(78125);r(20326);r(16280);r(76918);r(30067);r(4294);r(18107);r(28706);r(26835);r(88431);r(33771);r(2008);r(50113);r(48980);r(10838);r(13451);r(46449);r(78350);r(51629);r(23418);r(74423);r(25276);r(64346);r(23792);r(48598);r(8921);r(62062);r(31051);r(44114);r(72712);r(18863);r(94490);r(34782);r(15086);r(26910);r(87478);r(54554);r(9678);r(57145);r(71658);r(93514);r(30237);r(13609);r(11558);r(54743);r(46761);r(11745);r(38309);r(10255);r(3995);r(16573);r(78100);r(77936);r(61699);r(59089);r(91191);r(93515);r(1688);r(60739);r(89572);r(23288);r(36456);r(94170);r(48957);r(62010);r(55081);r(18111);r(29314);r(81148);r(22489);r(20116);r(30531);r(7588);r(49603);r(61701);r(18237);r(13579);r(54972);r(61806);r(33110);r(4731);r(36033);r(47072);r(93153);r(82326);r(36389);r(64444);r(8085);r(77762);r(65070);r(60605);r(4360);r(39469);r(72152);r(75376);r(56624);r(11367);r(5914);r(78553);r(98690);r(60479);r(70761);r(2892);r(45374);r(25428);r(32637);r(40150);r(59149);r(64601);r(44435);r(87220);r(25843);r(62337);r(9868);r(80630);r(69085);r(59904);r(17427);r(67945);r(84185);r(87607);r(5506);r(52811);r(53921);r(83851);r(81278);r(1480);r(40875);r(77691);r(78347);r(29908);r(94052);r(94003);r(221);r(79432);r(9220);r(7904);r(93967);r(63548);r(93941);r(10287);r(26099);r(16034);r(78459);r(58940);r(3362);r(96167);r(93518);r(9391);r(31689);r(14628);r(39796);r(60825);r(87411);r(21211);r(40888);r(9065);r(86565);r(32812);r(84634);r(71137);r(30985);r(34268);r(34873);r(15472);r(84864);r(96069);r(57465);r(27495);r(69479);r(87745);r(90906);r(38781);r(31415);r(17642);r(58004);r(33853);r(45876);r(32475);r(15024);r(31698);r(67357);r(23860);r(99449);r(27337);r(21699);r(42043);r(47764);r(71761);r(28543);r(35701);r(68156);r(85906);r(42781);r(25440);r(79978);r(5746);r(90744);r(11392);r(72756);r(67438);r(42762);r(39202);r(43359);r(89907);r(11898);r(35490);r(5745);r(94298);r(60268);r(69546);r(20781);r(50778);r(89195);r(46276);r(48718);r(16308);r(34594);r(29833);r(46594);r(72107);r(95477);r(21489);r(22134);r(3690);r(61740);r(48140);r(81630);r(72170);r(75044);r(69539);r(31694);r(89955);r(21903);r(91134);r(33206);r(48345);r(44496);r(66651);r(12887);r(19369);r(66812);r(8995);r(52568);r(31575);r(36072);r(88747);r(28845);r(29423);r(57301);r(373);r(86614);r(41405);r(37467);r(44732);r(33684);r(79577);r(88267);r(73772);r(30958);r(2945);r(42207);r(23500);r(62953);r(55815);r(64979);r(79739);r(59848);r(122);r(13611);r(71678);r(76031);r(3296);r(2222);r(45781);r(27208);r(48408);r(14603);r(47566);r(98721);e.exports=r(19167)},84373:(e,t,r)=>{"use strict";var n=r(48981);var i=r(35610);var o=r(26198);e.exports=function e(t){var r=n(this);var a=o(r);var s=arguments.length;var u=i(s>1?arguments[1]:undefined,a);var c=s>2?arguments[2]:undefined;var l=c===undefined?a:i(c,a);while(l>u)r[u++]=t;return r}},84428:(e,t,r)=>{"use strict";var n=r(78227);var i=n("iterator");var o=false;try{var a=0;var s={next:function(){return{done:!!a++}},return:function(){o=true}};s[i]=function(){return this};Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return false}catch(e){return false}var r=false;try{var n={};n[i]=function(){return{next:function(){return{done:r=true}}}};e(n)}catch(e){}return r}},84549:(e,t,r)=>{"use strict";var n=r(44576);e.exports=function(e,t){var r=n.Iterator;var i=r&&r.prototype;var o=i&&i[e];var a=false;if(o)try{o.call({next:function(){return{done:true}},return:function(){a=true}},-1)}catch(e){if(!(e instanceof t))a=false}if(!a)return o}},84565:(e,t,r)=>{const n=r(56886);const i=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const o=1<<14|1<<12|1<<10|1<<4|1<<1;const a=n.getBCHDigit(i);t.getEncodedBits=function e(t,r){const s=t.bit<<3|r;let u=s<<10;while(n.getBCHDigit(u)-a>=0){u^=i<<n.getBCHDigit(u)-a}return(s<<10|u)^o}},84606:(e,t,r)=>{"use strict";var n=r(16823);var i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+n(t)+" of "+n(e))}},84634:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28551);var o=r(34124);n({target:"Reflect",stat:true},{isExtensible:function e(t){i(t);return o(t)}})},84636:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(19021))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var o=n.Hasher;var a=r.algo;var s=[];(function(){for(var e=0;e<64;e++){s[e]=t.abs(t.sin(e+1))*4294967296|0}})();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r;var i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var o=this._hash.words;var a=e[t+0];var u=e[t+1];var h=e[t+2];var p=e[t+3];var v=e[t+4];var m=e[t+5];var y=e[t+6];var g=e[t+7];var b=e[t+8];var _=e[t+9];var S=e[t+10];var E=e[t+11];var w=e[t+12];var T=e[t+13];var I=e[t+14];var R=e[t+15];var C=o[0];var k=o[1];var A=o[2];var O=o[3];C=c(C,k,A,O,a,7,s[0]);O=c(O,C,k,A,u,12,s[1]);A=c(A,O,C,k,h,17,s[2]);k=c(k,A,O,C,p,22,s[3]);C=c(C,k,A,O,v,7,s[4]);O=c(O,C,k,A,m,12,s[5]);A=c(A,O,C,k,y,17,s[6]);k=c(k,A,O,C,g,22,s[7]);C=c(C,k,A,O,b,7,s[8]);O=c(O,C,k,A,_,12,s[9]);A=c(A,O,C,k,S,17,s[10]);k=c(k,A,O,C,E,22,s[11]);C=c(C,k,A,O,w,7,s[12]);O=c(O,C,k,A,T,12,s[13]);A=c(A,O,C,k,I,17,s[14]);k=c(k,A,O,C,R,22,s[15]);C=l(C,k,A,O,u,5,s[16]);O=l(O,C,k,A,y,9,s[17]);A=l(A,O,C,k,E,14,s[18]);k=l(k,A,O,C,a,20,s[19]);C=l(C,k,A,O,m,5,s[20]);O=l(O,C,k,A,S,9,s[21]);A=l(A,O,C,k,R,14,s[22]);k=l(k,A,O,C,v,20,s[23]);C=l(C,k,A,O,_,5,s[24]);O=l(O,C,k,A,I,9,s[25]);A=l(A,O,C,k,p,14,s[26]);k=l(k,A,O,C,b,20,s[27]);C=l(C,k,A,O,T,5,s[28]);O=l(O,C,k,A,h,9,s[29]);A=l(A,O,C,k,g,14,s[30]);k=l(k,A,O,C,w,20,s[31]);C=f(C,k,A,O,m,4,s[32]);O=f(O,C,k,A,b,11,s[33]);A=f(A,O,C,k,E,16,s[34]);k=f(k,A,O,C,I,23,s[35]);C=f(C,k,A,O,u,4,s[36]);O=f(O,C,k,A,v,11,s[37]);A=f(A,O,C,k,g,16,s[38]);k=f(k,A,O,C,S,23,s[39]);C=f(C,k,A,O,T,4,s[40]);O=f(O,C,k,A,a,11,s[41]);A=f(A,O,C,k,p,16,s[42]);k=f(k,A,O,C,y,23,s[43]);C=f(C,k,A,O,_,4,s[44]);O=f(O,C,k,A,w,11,s[45]);A=f(A,O,C,k,R,16,s[46]);k=f(k,A,O,C,h,23,s[47]);C=d(C,k,A,O,a,6,s[48]);O=d(O,C,k,A,g,10,s[49]);A=d(A,O,C,k,I,15,s[50]);k=d(k,A,O,C,m,21,s[51]);C=d(C,k,A,O,w,6,s[52]);O=d(O,C,k,A,p,10,s[53]);A=d(A,O,C,k,S,15,s[54]);k=d(k,A,O,C,u,21,s[55]);C=d(C,k,A,O,b,6,s[56]);O=d(O,C,k,A,R,10,s[57]);A=d(A,O,C,k,y,15,s[58]);k=d(k,A,O,C,T,21,s[59]);C=d(C,k,A,O,v,6,s[60]);O=d(O,C,k,A,E,10,s[61]);A=d(A,O,C,k,h,15,s[62]);k=d(k,A,O,C,_,21,s[63]);o[0]=o[0]+C|0;o[1]=o[1]+k|0;o[2]=o[2]+A|0;o[3]=o[3]+O|0},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var i=e.sigBytes*8;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296);var a=n;r[(i+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;r[(i+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;e.sigBytes=(r.length+1)*4;this._process();var s=this._hash;var u=s.words;for(var c=0;c<4;c++){var l=u[c];u[c]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}return s},clone:function(){var e=o.clone.call(this);e._hash=this._hash.clone();return e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}r.MD5=o._createHelper(u);r.HmacMD5=o._createHmacHelper(u)})(Math);return e.MD5}))},84743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Utils=t.StatePromise=void 0;var n=r(44104);var i=r(11686);var o=r(44772);var a=r(46677);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const v=new n.Log({module:"HwICS.Utils"});function m(e){if(e!==null&&e!==void 0&&e.shadow_image){var t;e.shadow_image=(t=e.shadow_image)===null||t===void 0?void 0:t.length}if(e!==null&&e!==void 0&&e.cut_image){var r;e.cut_image=(r=e.cut_image)===null||r===void 0?void 0:r.length}}function y(e){if(e!==null&&e!==void 0&&e.slide_token){e.slide_token=(0,o.handleTokenPrint)(e.slide_token)}if(e!==null&&e!==void 0&&e.access_token){e.access_token=(0,o.handleTokenPrint)(e.access_token)}if(e!==null&&e!==void 0&&e.refresh_token){e.refresh_token=(0,o.handleTokenPrint)(e.refresh_token)}if(e!==null&&e!==void 0&&e.active_code){e.active_code=(0,o.handleTokenPrint)(e.active_code)}if(e!==null&&e!==void 0&&e.user_key){e.user_key=(0,o.handleTokenPrint)(e.user_key)}if(e!==null&&e!==void 0&&e.verification_id){e.verification_id=(0,o.handleTokenPrint)(e.verification_id)}if(e!==null&&e!==void 0&&e.once_code){e.once_code=(0,o.handleTokenPrint)(e.verification_id)}}function g(e){if(e!==null&&e!==void 0&&e.robot_id){e.robot_id=(0,o.handleTokenPrint)(e.robot_id)}}function b(e){var t;if(e!==null&&e!==void 0&&e.rtc_room_info&&e!==null&&e!==void 0&&(t=e.rtc_room_info)!==null&&t!==void 0&&t.users){var r,n;e.rtc_room_info=f({},e.rtc_room_info);e.rtc_room_info.users=e===null||e===void 0?void 0:(r=e.rtc_room_info)===null||r===void 0?void 0:(n=r.users)===null||n===void 0?void 0:n.length}}let _=t.Utils=function(){function e(){s(this,e)}return c(e,null,[{key:"handleHttpResult",value:function e(t){if((0,o.formatType)(t)!==o.formatType.OBJECT){return t}t=(0,o.deepCopy)(t);m(t);y(t);g(t);b(t);return t}},{key:"handleHttpParam",value:function e(t){if((0,o.formatType)(t)!==o.formatType.OBJECT){return t}t=(0,o.deepCopy)(t);y(t);g(t);return t}},{key:"getIosVersion",value:function e(){var t,r,n;const i=navigator.userAgent.toLowerCase();return parseInt(((t=i.match(/cpu iphone os (.*?) like mac os/))===null||t===void 0?void 0:(r=t[1])===null||r===void 0?void 0:(n=r.split("_"))===null||n===void 0?void 0:n[0])||"-1")}},{key:"getBrowserInfo",value:function e(){const t={[i.BrowserType.CHROME]:/chrome\/([\d.]+)/,[i.BrowserType.EDGE]:/edg\/([\d.]+)/,[i.BrowserType.SAFARI]:/safari\/([\d.]+)/,[i.BrowserType.WE_CHAT]:/micromessenger\/([\d.]+)/};const r=Object.keys(t);const n=navigator.userAgent.toLowerCase();for(let e=0;e<r.length;e++){if(t[r[e]].test(n)){return r[e]}}return i.BrowserType.UNSUPPORTED}},{key:"formatLangCode",value:function e(t){if((0,o.formatType)(t)!==o.formatType.STRING){return a.LanguageCode.ZH_CN}return t.toLocaleLowerCase().startsWith("zh")?a.LanguageCode.ZH_CN:a.LanguageCode.EN_US}},{key:"formatLanguage",value:function e(t,...r){return(0,o.replaceStringPlaceholder)(t,"%s",[...r])}},{key:"formatOrigin",value:function e(t){if(t&&!(t!==null&&t!==void 0&&t.startsWith("https://"))){return`https://${t}`}return t}},{key:"checkDomain",value:function e(t){if((0,o.checkIPV4)(t.replace("https://",""))){return true}return(t===null||t===void 0?void 0:t.startsWith("https://metastudio-api"))&&(t===null||t===void 0?void 0:t.endsWith(".myhuaweicloud.com"))}},{key:"functionCheck",value:function e(t){return(0,o.formatType)(t)===o.formatType.FUNCTION||(0,o.formatType)(t)===o.formatType.ASYNCFUNCTION}}])}();_.waitTask=e=>{let t;let r;return{promise:new Promise((n=>{t=n;r=setTimeout((()=>{n(true)}),e)})),stop:()=>{clearTimeout(r);t(false)}}};_.getRequestId=()=>{let e=(new Date).getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=window.crypto.getRandomValues(new Uint8Array(1))[0];const n=(e+r*16/100)%16|0;e=Math.floor(e/16);return(t==="x"?n:n&7|8).toString(16)}))};_.isLAN=e=>{var t;const r=e.replace(/.*:\/\//,"");const n=((t=r.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/gi))===null||t===void 0?void 0:t[0])||"";const i=/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/;return i.test(n)||r.startsWith("localhost:")||r.startsWith("127.0.0.1:")};let S=t.StatePromise=function(){function e(t){s(this,e);this.resolveMap=new Map;this.promiseMap=new Map;t.forEach((e=>{this.promiseMap.set(e,new Promise((t=>{this.resolveMap.set(e,t)})))}))}return c(e,[{key:"getState",value:function e(){return this.state}},{key:"setState",value:function e(t){this.state=t;if(t){var r,n,i;(r=this.resolveMap.get(t))===null||r===void 0?void 0:r();(n=this.getNextResolve)===null||n===void 0?void 0:(i=n.call(this,t))===null||i===void 0?void 0:i()}}},{key:"wait",value:function e(t){if(!t){return Promise.resolve()}return this.promiseMap.get(t)}},{key:"waitNext",value:function e(t){return new Promise((e=>{this.getNextResolve=r=>{if(r===t){return e}return null}}))}}])}()},84864:(e,t,r)=>{"use strict";var n=r(43724);var i=r(44576);var o=r(79504);var a=r(92796);var s=r(23167);var u=r(66699);var c=r(2360);var l=r(38480).f;var f=r(1625);var d=r(60788);var h=r(655);var p=r(61034);var v=r(58429);var m=r(11056);var y=r(36840);var g=r(79039);var b=r(39297);var _=r(91181).enforce;var S=r(87633);var E=r(78227);var w=r(83635);var T=r(18814);var I=E("match");var R=i.RegExp;var C=R.prototype;var k=i.SyntaxError;var A=o(C.exec);var O=o("".charAt);var P=o("".replace);var x=o("".indexOf);var L=o("".slice);var M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;var N=/a/g;var D=/a/g;var j=new R(N)!==N;var U=v.MISSED_STICKY;var V=v.UNSUPPORTED_Y;var W=n&&(!j||U||w||T||g((function(){D[I]=false;return R(N)!==N||R(D)===D||String(R(N,"i"))!=="/a/i"})));var B=function(e){var t=e.length;var r=0;var n="";var i=false;var o;for(;r<=t;r++){o=O(e,r);if(o==="\\"){n+=o+O(e,++r);continue}if(!i&&o==="."){n+="[\\s\\S]"}else{if(o==="["){i=true}else if(o==="]"){i=false}n+=o}}return n};var G=function(e){var t=e.length;var r=0;var n="";var i=[];var o=c(null);var a=false;var s=false;var u=0;var l="";var f;for(;r<=t;r++){f=O(e,r);if(f==="\\"){f+=O(e,++r)}else if(f==="]"){a=false}else if(!a)switch(true){case f==="[":a=true;break;case f==="(":n+=f;if(L(e,r+1,r+3)==="?:"){continue}if(A(M,L(e,r+1))){r+=2;s=true}u++;continue;case f===">"&&s:if(l===""||b(o,l)){throw new k("Invalid capture group name")}o[l]=true;i[i.length]=[l,u];s=false;l="";continue}if(s)l+=f;else n+=f}return[n,i]};if(a("RegExp",W)){var Z=function e(t,r){var n=f(C,this);var i=d(t);var o=r===undefined;var a=[];var c=t;var l,v,m,y,g,b;if(!n&&i&&o&&t.constructor===Z){return t}if(i||f(C,t)){t=t.source;if(o)r=p(c)}t=t===undefined?"":h(t);r=r===undefined?"":h(r);c=t;if(w&&"dotAll"in N){v=!!r&&x(r,"s")>-1;if(v)r=P(r,/s/g,"")}l=r;if(U&&"sticky"in N){m=!!r&&x(r,"y")>-1;if(m&&V)r=P(r,/y/g,"")}if(T){y=G(t);t=y[0];a=y[1]}g=s(R(t,r),n?this:C,Z);if(v||m||a.length){b=_(g);if(v){b.dotAll=true;b.raw=Z(B(t),l)}if(m)b.sticky=true;if(a.length)b.groups=a}if(t!==c)try{u(g,"source",c===""?"(?:)":c)}catch(e){}return g};for(var F=l(R),H=0;F.length>H;){m(Z,R,F[H++])}C.constructor=Z;Z.prototype=C;y(i,"RegExp",Z,{constructor:true})}S("RegExp")},84916:(e,t,r)=>{"use strict";var n=r(97751);var i=function(e){return{size:e,has:function(){return false},keys:function(){return{next:function(){return{done:true}}}}}};var o=function(e){return{size:e,has:function(){return true},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var r=n("Set");try{(new r)[e](i(0));try{(new r)[e](i(-1));return false}catch(n){if(!t)return true;try{(new r)[e](o(-Infinity));return false}catch(n){var a=new r;a.add(1);a.add(2);return t(a[e](o(Infinity)))}}}catch(e){return false}}},85484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TransparentBg=void 0;var n=r(94855);var i=r(39595);var o=r(20362);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let f=t.TransparentBg=function(){function e(){var t,r;a(this,e);e.remoteContainer=document.querySelector("#remoteContainer");const s=(t=e.remoteContainer)===null||t===void 0?void 0:t.querySelector("video");if(!s){return}e.remoteContainer.style.display="none";let u;if(n.ConfigManager.getConfig(i.ConfigKey.ENABLE_ORIGIN_CUT_ALGORITHM)){u=new o.BasicLocalTransparentVideoBg({videoElem:s,rootElem:document.querySelector(".digital-intelligent-interaction"),similarity:.03,spill:.1,smoothness:.22,canvasId:"transparentCanvasElem"})}else{u=new o.BasicLocalTransparentVideoBg({videoElem:s,rootElem:document.querySelector(".digital-intelligent-interaction"),similarity:.4,spill:.2,smoothness:.1,canvasId:"transparentCanvasElem",algorithmPattern:"B"})}(r=e.cvsVideo)===null||r===void 0?void 0:r.destroy();e.cvsVideo=u;e.cvsVideo.render()}return u(e,[{key:"destroy",value:function t(){var r;if(e.remoteContainer){e.remoteContainer.style.display="block"}(r=e.cvsVideo)===null||r===void 0?void 0:r.destroy()}}])}()},85906:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(25397);var a=r(48981);var s=r(655);var u=r(26198);var c=i([].push);var l=i([].join);n({target:"String",stat:true},{raw:function e(t){var r=o(a(t).raw);var n=u(r);if(!n)return"";var i=arguments.length;var f=[];var d=0;while(true){c(f,s(r[d++]));if(d===n)return l(f,"");if(d<i)c(f,s(arguments[d]))}}})},86221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.stopChatUpdateList=t.getMediaId=t.dealMediaList=t.dealChatList=void 0;var n=r(61347);var i=r(44104);var o=r(44772);var a=r(95739);var s=r(25127);var u=r(81762);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const p=new i.Log({module:"HwICS.store.dealChatList"});const v=e=>{if((e===null||e===void 0?void 0:e.messageType)===n.CaptionMessageType.WAITING_ANSWER){return l({},e)}if((e===null||e===void 0?void 0:e.messageType)===n.CaptionMessageType.QUESTION){return l(l({},e),{},{text:(0,o.handleAccountPrint)(e===null||e===void 0?void 0:e.text)})}return l(l({},e),{},{text:(0,o.handleAccountPrint)(e===null||e===void 0?void 0:e.text),questionText:(0,o.handleAccountPrint)(e===null||e===void 0?void 0:e.questionText)})};const m=(e,t)=>{if(t.messageType===n.CaptionMessageType.QUESTION){if(t.chatId&&e.chatId&&t.chatId!==e.chatId){if(t.isLast){return[e,t,{messageType:n.CaptionMessageType.WAITING_ANSWER,timestamp:Date.now(),chatId:t.chatId}]}return[e,t]}if(t.isLast){return[t,{messageType:n.CaptionMessageType.WAITING_ANSWER,timestamp:Date.now(),chatId:t.chatId}]}return[t]}return[e,t]};const y=(e,t)=>{if(t.messageType===n.CaptionMessageType.QUESTION&&t.isLast){return[e,t,{messageType:n.CaptionMessageType.WAITING_ANSWER,timestamp:Date.now(),chatId:t.chatId}]}if(t.messageType===n.CaptionMessageType.ANSWER){if((0,o.isNullOrEmpty)(t.isLast)){return[e,t]}if(!t.chatId||!e.chatId||t.chatId!==e.chatId){return[e,t]}if(!t.isReplace){t.text=e.text+t.text}return[l({},t)]}return[e,t]};const g=(e,t)=>{let r=[...e];t.forEach((e=>{const t=r.pop();if(!t){p.info("dealChatList, no lastMessage",v(e));r=[e];if(e.messageType===n.CaptionMessageType.QUESTION&&e.isLast){r.push({messageType:n.CaptionMessageType.WAITING_ANSWER,timestamp:Date.now(),chatId:e.chatId})}return}switch(t.messageType){case n.CaptionMessageType.QUESTION:r.push(...m(t,e));break;case n.CaptionMessageType.WAITING_ANSWER:r.push(t,e);break;case n.CaptionMessageType.ANSWER:r.push(...y(t,e));break;default:break}p.info("dealChatList",v(t),v(e))}));return r};t.dealChatList=g;const b=e=>{const t=[...e];const r=t.pop();p.info("stopChatUpdateList ",r===null||r===void 0?void 0:r.messageType);if(r&&r.messageType!==n.CaptionMessageType.WAITING_ANSWER){r.isLast=true;t.push(r)}return t};t.stopChatUpdateList=b;const _=(e,t,r)=>[e,t,r].join("_");t.getMediaId=_;const S=e=>{p.debug("dealMediaList",e);const t=[];e.forEach((e=>{const r=s.XssManager.getRenderNode(e.text);p.debug("dealMediaList",r,a.RichTextUtils.hasMedia(r));if(!a.RichTextUtils.hasMedia(r)){return}const{imgList:n,videoList:i}=a.RichTextUtils.getMediaInfo(r);p.debug("dealMediaList",n,i);n.forEach(((r,n)=>{const i=_(e.chatId,u.MediaType.IMAGE,n);t.push({type:u.MediaType.IMAGE,src:decodeURI(r.src).replace(/ /g,""),chatId:e.chatId||"",id:i})}));i.forEach(((r,n)=>{const i=_(e.chatId,u.MediaType.VIDEO,n);t.push({type:u.MediaType.VIDEO,src:decodeURI(r.src).replace(/ /g,""),chatId:e.chatId||"",id:i})}))}));p.debug("dealMediaList end",t);return t};t.dealMediaList=S},86368:(e,t,r)=>{"use strict";var n=r(46518);var i=r(44576);var o=r(59225).clear;n({global:true,bind:true,enumerable:true,forced:i.clearImmediate!==o},{clearImmediate:o})},86425:(e,t,r)=>{"use strict";function n(e,t){return function r(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype;const{getPrototypeOf:o}=Object;const{iterator:a,toStringTag:s}=Symbol;const u=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));const c=e=>{e=e.toLowerCase();return t=>u(t)===e};const l=e=>t=>typeof t===e;const{isArray:f}=Array;const d=l("undefined");function h(e){return e!==null&&!d(e)&&e.constructor!==null&&!d(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const p=c("ArrayBuffer");function v(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&p(e.buffer)}return t}const m=l("string");const y=l("function");const g=l("number");const b=e=>e!==null&&typeof e==="object";const _=e=>e===true||e===false;const S=e=>{if(u(e)!=="object"){return false}const t=o(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(s in e)&&!(a in e)};const E=e=>{if(!b(e)||h(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return false}};const w=c("Date");const T=c("File");const I=c("Blob");const R=c("FileList");const C=e=>b(e)&&y(e.pipe);const k=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||y(e.append)&&((t=u(e))==="formdata"||t==="object"&&y(e.toString)&&e.toString()==="[object FormData]"))};const A=c("URLSearchParams");const[O,P,x,L]=["ReadableStream","Request","Response","Headers"].map(c);const M=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function N(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(f(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{if(h(e)){return}const i=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=i.length;let a;for(n=0;n<o;n++){a=i[n];t.call(null,e[a],a,e)}}}function D(e,t){if(h(e)){return null}t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}const j=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:r.g})();const U=e=>!d(e)&&e!==j;function V(){const{caseless:e,skipUndefined:t}=U(this)&&this||{};const r={};const n=(n,i)=>{const o=e&&D(r,i)||i;if(S(r[o])&&S(n)){r[o]=V(r[o],n)}else if(S(n)){r[o]=V({},n)}else if(f(n)){r[o]=n.slice()}else if(!t||!d(n)){r[o]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&N(arguments[e],n)}return r}const W=(e,t,r,{allOwnKeys:i}={})=>{N(t,((t,i)=>{if(r&&y(t)){e[i]=n(t,r)}else{e[i]=t}}),{allOwnKeys:i});return e};const B=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const G=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};const Z=(e,t,r,n)=>{let i;let a;let s;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);a=i.length;while(a-- >0){s=i[a];if((!n||n(s,e,t))&&!u[s]){t[s]=e[s];u[s]=true}}e=r!==false&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};const F=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r};const H=e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};const X=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&o(Uint8Array));const Y=(e,t)=>{const r=e&&e[a];const n=r.call(e);let i;while((i=n.next())&&!i.done){const r=i.value;t.call(e,r[0],r[1])}};const K=(e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n};const z=c("HTMLFormElement");const J=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}));const Q=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);const q=c("RegExp");const $=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};N(r,((r,i)=>{let o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};const ee=e=>{$(e,((t,r)=>{if(y(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!y(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}}))};const te=(e,t)=>{const r={};const n=e=>{e.forEach((e=>{r[e]=true}))};f(e)?n(e):n(String(e).split(t));return r};const re=()=>{};const ne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ie(e){return!!(e&&y(e.append)&&e[s]==="FormData"&&e[a])}const oe=e=>{const t=new Array(10);const r=(e,n)=>{if(b(e)){if(t.indexOf(e)>=0){return}if(h(e)){return e}if(!("toJSON"in e)){t[n]=e;const i=f(e)?[]:{};N(e,((e,t)=>{const o=r(e,n+1);!d(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};const ae=c("AsyncFunction");const se=e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch);const ue=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{j.addEventListener("message",(({source:r,data:n})=>{if(r===j&&n===e){t.length&&t.shift()()}}),false);return r=>{t.push(r);j.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",y(j.postMessage));const ce=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(j):typeof process!=="undefined"&&process.nextTick||ue;const le=e=>e!=null&&y(e[a]);var fe={isArray:f,isArrayBuffer:p,isBuffer:h,isFormData:k,isArrayBufferView:v,isString:m,isNumber:g,isBoolean:_,isObject:b,isPlainObject:S,isEmptyObject:E,isReadableStream:O,isRequest:P,isResponse:x,isHeaders:L,isUndefined:d,isDate:w,isFile:T,isBlob:I,isRegExp:q,isFunction:y,isStream:C,isURLSearchParams:A,isTypedArray:X,isFileList:R,forEach:N,merge:V,extend:W,trim:M,stripBOM:B,inherits:G,toFlatObject:Z,kindOf:u,kindOfTest:c,endsWith:F,toArray:H,forEachEntry:Y,matchAll:K,isHTMLForm:z,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:$,freezeMethods:ee,toObjectSet:te,toCamelCase:J,noop:re,toFiniteNumber:ne,findKey:D,global:j,isContextDefined:U,isSpecCompliantForm:ie,toJSONObject:oe,isAsyncFn:ae,isThenable:se,setImmediate:ue,asap:ce,isIterable:le};function de(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);if(i){this.response=i;this.status=i.status?i.status:null}}fe.inherits(de,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.status}}});const he=de.prototype;const pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{pe[e]={value:e}}));Object.defineProperties(de,pe);Object.defineProperty(he,"isAxiosError",{value:true});de.from=(e,t,r,n,i,o)=>{const a=Object.create(he);fe.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));const s=e&&e.message?e.message:"Error";const u=t==null&&e?e.code:t;de.call(a,s,u,r,n,i);if(e&&a.cause==null){Object.defineProperty(a,"cause",{value:e,configurable:true})}a.name=e&&e.name||"Error";o&&Object.assign(a,o);return a};var ve=null;function me(e){return fe.isPlainObject(e)||fe.isArray(e)}function ye(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=ye(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function be(e){return fe.isArray(e)&&!e.some(me)}const _e=fe.toFlatObject(fe,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Se(e,t,r){if(!fe.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=fe.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!fe.isUndefined(r[t])}));const n=r.metaTokens;const i=r.visitor||l;const o=r.dots;const a=r.indexes;const s=r.Blob||typeof Blob!=="undefined"&&Blob;const u=s&&fe.isSpecCompliantForm(t);if(!fe.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(fe.isDate(e)){return e.toISOString()}if(fe.isBoolean(e)){return e.toString()}if(!u&&fe.isBlob(e)){throw new de("Blob is not supported. Use a Buffer instead.")}if(fe.isArrayBuffer(e)||fe.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function l(e,r,i){let s=e;if(e&&!i&&typeof e==="object"){if(fe.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(fe.isArray(e)&&be(e)||(fe.isFileList(e)||fe.endsWith(r,"[]"))&&(s=fe.toArray(e))){r=ye(r);s.forEach((function e(n,i){!(fe.isUndefined(n)||n===null)&&t.append(a===true?ge([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(me(e)){return true}t.append(ge(i,r,o),c(e));return false}const f=[];const d=Object.assign(_e,{defaultVisitor:l,convertValue:c,isVisitable:me});function h(e,r){if(fe.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);fe.forEach(e,(function e(n,o){const a=!(fe.isUndefined(n)||n===null)&&i.call(t,n,fe.isString(o)?o.trim():o,r,d);if(a===true){h(n,r?r.concat(o):[o])}}));f.pop()}if(!fe.isObject(e)){throw new TypeError("data must be an object")}h(e);return t}function Ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function we(e,t){this._pairs=[];e&&Se(e,this,t)}const Te=we.prototype;Te.append=function e(t,r){this._pairs.push([t,r])};Te.toString=function e(t){const r=t?function(e){return t.call(this,e,Ee)}:Ee;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Re(e,t,r){if(!t){return e}const n=r&&r.encode||Ie;if(fe.isFunction(r)){r={serialize:r}}const i=r&&r.serialize;let o;if(i){o=i(t,r)}else{o=fe.isURLSearchParams(t)?t.toString():new we(t,r).toString(n)}if(o){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ce{constructor(){this.handlers=[]}use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){fe.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))}}var ke=Ce;var Ae={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Oe=typeof URLSearchParams!=="undefined"?URLSearchParams:we;var Pe=typeof FormData!=="undefined"?FormData:null;var xe=typeof Blob!=="undefined"?Blob:null;var Le={isBrowser:true,classes:{URLSearchParams:Oe,FormData:Pe,Blob:xe},protocols:["http","https","file","blob","url","data"]};const Me=typeof window!=="undefined"&&typeof document!=="undefined";const Ne=typeof navigator==="object"&&navigator||undefined;const De=Me&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0);const je=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Ue=Me&&window.location.href||"http://localhost";var Ve=Object.freeze({__proto__:null,hasBrowserEnv:Me,hasStandardBrowserWebWorkerEnv:je,hasStandardBrowserEnv:De,navigator:Ne,origin:Ue});var We={...Ve,...Le};function Be(e,t){return Se(e,new We.classes.URLSearchParams,{visitor:function(e,t,r,n){if(We.isNode&&fe.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)},...t})}function Ge(e){return fe.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function Ze(e){const t={};const r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function Fe(e){function t(e,r,n,i){let o=e[i++];if(o==="__proto__")return true;const a=Number.isFinite(+o);const s=i>=e.length;o=!o&&fe.isArray(n)?n.length:o;if(s){if(fe.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!fe.isObject(n[o])){n[o]=[]}const u=t(e,r,n[o],i);if(u&&fe.isArray(n[o])){n[o]=Ze(n[o])}return!a}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const r={};fe.forEachEntry(e,((e,n)=>{t(Ge(e),n,r,0)}));return r}return null}function He(e,t,r){if(fe.isString(e)){try{(t||JSON.parse)(e);return fe.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const Xe={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const o=fe.isObject(t);if(o&&fe.isHTMLForm(t)){t=new FormData(t)}const a=fe.isFormData(t);if(a){return i?JSON.stringify(Fe(t)):t}if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t)){return t}if(fe.isArrayBufferView(t)){return t.buffer}if(fe.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return Be(t,this.formSerializer).toString()}if((s=fe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Se(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return He(t)}return t}],transformResponse:[function e(t){const r=this.transitional||Xe.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(fe.isResponse(t)||fe.isReadableStream(t)){return t}if(t&&fe.isString(t)&&(n&&!this.responseType||i)){const e=r&&r.silentJSONParsing;const n=!e&&i;try{return JSON.parse(t,this.parseReviver)}catch(e){if(n){if(e.name==="SyntaxError"){throw de.from(e,de.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};fe.forEach(["delete","get","head","post","put","patch"],(e=>{Xe.headers[e]={}}));var Ye=Xe;const Ke=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ze=e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Ke[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};const Je=Symbol("internals");function Qe(e){return e&&String(e).trim().toLowerCase()}function qe(e){if(e===false||e==null){return e}return fe.isArray(e)?e.map(qe):String(e)}function $e(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}const et=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tt(e,t,r,n,i){if(fe.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!fe.isString(t))return;if(fe.isString(n)){return t.indexOf(n)!==-1}if(fe.isRegExp(n)){return n.test(t)}}function rt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function nt(e,t){const r=fe.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}class it{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Qe(t);if(!i){throw new Error("header name must be a non-empty string")}const o=fe.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=qe(e)}}const o=(e,t)=>fe.forEach(e,((e,r)=>i(e,r,t)));if(fe.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(fe.isString(e)&&(e=e.trim())&&!et(e)){o(ze(e),t)}else if(fe.isObject(e)&&fe.isIterable(e)){let r={},n,i;for(const t of e){if(!fe.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[i=t[0]]=(n=r[i])?fe.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else{e!=null&&i(t,e,r)}return this}get(e,t){e=Qe(e);if(e){const r=fe.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return $e(e)}if(fe.isFunction(t)){return t.call(this,e,r)}if(fe.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=Qe(e);if(e){const r=fe.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||tt(this,this[r],r,t)))}return false}delete(e,t){const r=this;let n=false;function i(e){e=Qe(e);if(e){const i=fe.findKey(r,e);if(i&&(!t||tt(r,r[i],i,t))){delete r[i];n=true}}}if(fe.isArray(e)){e.forEach(i)}else{i(e)}return n}clear(e){const t=Object.keys(this);let r=t.length;let n=false;while(r--){const i=t[r];if(!e||tt(this,this[i],i,e,true)){delete this[i];n=true}}return n}normalize(e){const t=this;const r={};fe.forEach(this,((n,i)=>{const o=fe.findKey(r,i);if(o){t[o]=qe(n);delete t[i];return}const a=e?rt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=qe(n);r[a]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);fe.forEach(this,((r,n)=>{r!=null&&r!==false&&(t[n]=e&&fe.isArray(r)?r.join(", "):r)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach((e=>r.set(e)));return r}static accessor(e){const t=this[Je]=this[Je]={accessors:{}};const r=t.accessors;const n=this.prototype;function i(e){const t=Qe(e);if(!r[t]){nt(n,e);r[t]=true}}fe.isArray(e)?e.forEach(i):i(e);return this}}it.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);fe.reduceDescriptors(it.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}));fe.freezeMethods(it);var ot=it;function at(e,t){const r=this||Ye;const n=t||r;const i=ot.from(n.headers);let o=n.data;fe.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function st(e){return!!(e&&e.__CANCEL__)}function ut(e,t,r){de.call(this,e==null?"canceled":e,de.ERR_CANCELED,t,r);this.name="CanceledError"}fe.inherits(ut,de,{__CANCEL__:true});function ct(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}function lt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ft(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let o=0;let a;t=t!==undefined?t:1e3;return function s(u){const c=Date.now();const l=n[o];if(!a){a=c}r[i]=u;n[i]=c;let f=o;let d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}const h=l&&c-l;return h?Math.round(d*1e3/h):undefined}}function dt(e,t){let r=0;let n=1e3/t;let i;let o;const a=(t,n=Date.now())=>{r=n;i=null;if(o){clearTimeout(o);o=null}e(...t)};const s=(...e)=>{const t=Date.now();const s=t-r;if(s>=n){a(e,t)}else{i=e;if(!o){o=setTimeout((()=>{o=null;a(i)}),n-s)}}};const u=()=>i&&a(i);return[s,u]}const ht=(e,t,r=3)=>{let n=0;const i=ft(50,250);return dt((r=>{const o=r.loaded;const a=r.lengthComputable?r.total:undefined;const s=o-n;const u=i(s);const c=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:r,lengthComputable:a!=null,[t?"download":"upload"]:true};e(l)}),r)};const pt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]};const vt=e=>(...t)=>fe.asap((()=>e(...t)));var mt=We.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,We.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>true;var yt=We.hasStandardBrowserEnv?{write(e,t,r,n,i,o,a){if(typeof document==="undefined")return;const s=[`${e}=${encodeURIComponent(t)}`];if(fe.isNumber(r)){s.push(`expires=${new Date(r).toUTCString()}`)}if(fe.isString(n)){s.push(`path=${n}`)}if(fe.isString(i)){s.push(`domain=${i}`)}if(o===true){s.push("secure")}if(fe.isString(a)){s.push(`SameSite=${a}`)}document.cookie=s.join("; ")},read(e){if(typeof document==="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _t(e,t,r){let n=!gt(t);if(e&&(n||r==false)){return bt(e,t)}return t}const St=e=>e instanceof ot?{...e}:e;function Et(e,t){t=t||{};const r={};function n(e,t,r,n){if(fe.isPlainObject(e)&&fe.isPlainObject(t)){return fe.merge.call({caseless:n},e,t)}else if(fe.isPlainObject(t)){return fe.merge({},t)}else if(fe.isArray(t)){return t.slice()}return t}function i(e,t,r,i){if(!fe.isUndefined(t)){return n(e,t,r,i)}else if(!fe.isUndefined(e)){return n(undefined,e,r,i)}}function o(e,t){if(!fe.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!fe.isUndefined(t)){return n(undefined,t)}else if(!fe.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>i(St(e),St(t),r,true)};fe.forEach(Object.keys({...e,...t}),(function n(o){const a=u[o]||i;const c=a(e[o],t[o],o);fe.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var wt=e=>{const t=Et({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ot.from(a);t.url=Re(_t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);if(s){a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")))}if(fe.isFormData(r)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv){a.setContentType(undefined)}else if(fe.isFunction(r.getHeaders)){const e=r.getHeaders();const t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{if(t.includes(e.toLowerCase())){a.set(e,r)}}))}}if(We.hasStandardBrowserEnv){n&&fe.isFunction(n)&&(n=n(t));if(n||n!==false&&mt(t.url)){const e=i&&o&&yt.read(o);if(e){a.set(i,e)}}}return t};const Tt=typeof XMLHttpRequest!=="undefined";var It=Tt&&function(e){return new Promise((function t(r,n){const i=wt(e);let o=i.data;const a=ot.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=i;let l;let f,d;let h,p;function v(){h&&h();p&&p();i.cancelToken&&i.cancelToken.unsubscribe(l);i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,true);m.timeout=i.timeout;function y(){if(!m){return}const t=ot.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());const i=!s||s==="text"||s==="json"?m.responseText:m.response;const o={data:i,status:m.status,statusText:m.statusText,headers:t,config:e,request:m};ct((function e(t){r(t);v()}),(function e(t){n(t);v()}),o);m=null}if("onloadend"in m){m.onloadend=y}else{m.onreadystatechange=function e(){if(!m||m.readyState!==4){return}if(m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}m.onabort=function t(){if(!m){return}n(new de("Request aborted",de.ECONNABORTED,e,m));m=null};m.onerror=function t(r){const i=r&&r.message?r.message:"Network Error";const o=new de(i,de.ERR_NETWORK,e,m);o.event=r||null;n(o);m=null};m.ontimeout=function t(){let r=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const o=i.transitional||Ae;if(i.timeoutErrorMessage){r=i.timeoutErrorMessage}n(new de(r,o.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,m));m=null};o===undefined&&a.setContentType(null);if("setRequestHeader"in m){fe.forEach(a.toJSON(),(function e(t,r){m.setRequestHeader(r,t)}))}if(!fe.isUndefined(i.withCredentials)){m.withCredentials=!!i.withCredentials}if(s&&s!=="json"){m.responseType=i.responseType}if(c){[d,p]=ht(c,true);m.addEventListener("progress",d)}if(u&&m.upload){[f,h]=ht(u);m.upload.addEventListener("progress",f);m.upload.addEventListener("loadend",h)}if(i.cancelToken||i.signal){l=t=>{if(!m){return}n(!t||t.type?new ut(null,e,m):t);m.abort();m=null};i.cancelToken&&i.cancelToken.subscribe(l);if(i.signal){i.signal.aborted?l():i.signal.addEventListener("abort",l)}}const g=lt(i.url);if(g&&We.protocols.indexOf(g)===-1){n(new de("Unsupported protocol "+g+":",de.ERR_BAD_REQUEST,e));return}m.send(o||null)}))};const Rt=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let n;const i=function(e){if(!n){n=true;a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof de?t:new ut(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null;i(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))}),t);const a=()=>{if(e){o&&clearTimeout(o);o=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}));e=null}};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;s.unsubscribe=()=>fe.asap(a);return s}};var Ct=Rt;const kt=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0;let i;while(n<r){i=n+t;yield e.slice(n,i);n=i}};const At=async function*(e,t){for await(const r of Ot(e)){yield*kt(r,t)}};const Ot=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const Pt=(e,t,r,n)=>{const i=At(e,t);let o=0;let a;let s=e=>{if(!a){a=true;n&&n(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t){s();e.close();return}let a=n.byteLength;if(r){let e=o+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){s(e);throw e}},cancel(e){s(e);return i.return()}},{highWaterMark:2})};const xt=64*1024;const{isFunction:Lt}=fe;const Mt=(({Request:e,Response:t})=>({Request:e,Response:t}))(fe.global);const{ReadableStream:Nt,TextEncoder:Dt}=fe.global;const jt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const Ut=e=>{e=fe.merge.call({skipUndefined:true},Mt,e);const{fetch:t,Request:r,Response:n}=e;const i=t?Lt(t):typeof fetch==="function";const o=Lt(r);const a=Lt(n);if(!i){return false}const s=i&&Lt(Nt);const u=i&&(typeof Dt==="function"?(e=>t=>e.encode(t))(new Dt):async e=>new Uint8Array(await new r(e).arrayBuffer()));const c=o&&s&&jt((()=>{let e=false;const t=new r(We.origin,{body:new Nt,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const l=a&&s&&jt((()=>fe.isReadableStream(new n("").body)));const f={stream:l&&(e=>e.body)};i&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n){return n.call(t)}throw new de(`Response type '${e}' is not supported`,de.ERR_NOT_SUPPORT,r)})}))})();const d=async e=>{if(e==null){return 0}if(fe.isBlob(e)){return e.size}if(fe.isSpecCompliantForm(e)){const t=new r(We.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(fe.isArrayBufferView(e)||fe.isArrayBuffer(e)){return e.byteLength}if(fe.isURLSearchParams(e)){e=e+""}if(fe.isString(e)){return(await u(e)).byteLength}};const h=async(e,t)=>{const r=fe.toFiniteNumber(e.getContentLength());return r==null?d(t):r};return async e=>{let{url:i,method:a,data:s,signal:u,cancelToken:d,timeout:p,onDownloadProgress:v,onUploadProgress:m,responseType:y,headers:g,withCredentials:b="same-origin",fetchOptions:_}=wt(e);let S=t||fetch;y=y?(y+"").toLowerCase():"text";let E=Ct([u,d&&d.toAbortSignal()],p);let w=null;const T=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let I;try{if(m&&c&&a!=="get"&&a!=="head"&&(I=await h(g,s))!==0){let e=new r(i,{method:"POST",body:s,duplex:"half"});let t;if(fe.isFormData(s)&&(t=e.headers.get("content-type"))){g.setContentType(t)}if(e.body){const[t,r]=pt(I,ht(vt(m)));s=Pt(e.body,xt,t,r)}}if(!fe.isString(b)){b=b?"include":"omit"}const t=o&&"credentials"in r.prototype;const u={..._,signal:E,method:a.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:undefined};w=o&&new r(i,u);let d=await(o?S(w,_):S(i,u));const p=l&&(y==="stream"||y==="response");if(l&&(v||p&&T)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=d[t]}));const t=fe.toFiniteNumber(d.headers.get("content-length"));const[r,i]=v&&pt(t,ht(vt(v),true))||[];d=new n(Pt(d.body,xt,r,(()=>{i&&i();T&&T()})),e)}y=y||"text";let R=await f[fe.findKey(f,y)||"text"](d,e);!p&&T&&T();return await new Promise(((t,r)=>{ct(t,r,{data:R,headers:ot.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:w})}))}catch(t){T&&T();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new de("Network Error",de.ERR_NETWORK,e,w),{cause:t.cause||t})}throw de.from(t,t&&t.code,e,w)}}};const Vt=new Map;const Wt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t;const o=[n,i,r];let a=o.length,s=a,u,c,l=Vt;while(s--){u=o[s];c=l.get(u);c===undefined&&l.set(u,c=s?new Map:Ut(t));l=c}return c};Wt();const Bt={http:ve,xhr:It,fetch:{get:Wt}};fe.forEach(Bt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Gt=e=>`- ${e}`;const Zt=e=>fe.isFunction(e)||e===null||e===false;function Ft(e,t){e=fe.isArray(e)?e:[e];const{length:r}=e;let n;let i;const o={};for(let a=0;a<r;a++){n=e[a];let r;i=n;if(!Zt(n)){i=Bt[(r=String(n)).toLowerCase()];if(i===undefined){throw new de(`Unknown adapter '${r}'`)}}if(i&&(fe.isFunction(i)||(i=i.get(t)))){break}o[r||"#"+a]=i}if(!i){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let t=r?e.length>1?"since :\n"+e.map(Gt).join("\n"):" "+Gt(e[0]):"as no adapter specified";throw new de(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return i}var Ht={getAdapter:Ft,adapters:Bt};function Xt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new ut(null,e)}}function Yt(e){Xt(e);e.headers=ot.from(e.headers);e.data=at.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Ht.getAdapter(e.adapter||Ye.adapter,e);return t(e).then((function t(r){Xt(e);r.data=at.call(e,e.transformResponse,r);r.headers=ot.from(r.headers);return r}),(function t(r){if(!st(r)){Xt(e);if(r&&r.response){r.response.data=at.call(e,e.transformResponse,r.response);r.response.headers=ot.from(r.response.headers)}}return Promise.reject(r)}))}const Kt="1.13.1";const zt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{zt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Jt={};zt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Kt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(e,n,o)=>{if(t===false){throw new de(i(n," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED)}if(r&&!Jt[n]){Jt[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};zt.spelling=function e(t){return(e,r)=>{console.warn(`${r} is likely a misspelling of ${t}`);return true}};function Qt(e,t,r){if(typeof e!=="object"){throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const o=n[i];const a=t[o];if(a){const t=e[o];const r=t===undefined||a(t,o,e);if(r!==true){throw new de("option "+o+" must be "+r,de.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new de("Unknown option "+o,de.ERR_BAD_OPTION)}}}var qt={assertOptions:Qt,validators:zt};const $t=qt.validators;class er{constructor(e){this.defaults=e||{};this.interceptors={request:new ke,response:new ke}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Et(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;if(r!==undefined){qt.assertOptions(r,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},false)}if(n!=null){if(fe.isFunction(n)){t.paramsSerializer={serialize:n}}else{qt.assertOptions(n,{encode:$t.function,serialize:$t.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}qt.assertOptions(t,{baseUrl:$t.spelling("baseURL"),withXsrfToken:$t.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&fe.merge(i.common,i[t.method]);i&&fe.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]}));t.headers=ot.concat(o,i);const a=[];let s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));const u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));let c;let l=0;let f;if(!s){const e=[Yt.bind(this),undefined];e.unshift(...a);e.push(...u);f=e.length;c=Promise.resolve(t);while(l<f){c=c.then(e[l++],e[l++])}return c}f=a.length;let d=t;while(l<f){const e=a[l++];const t=a[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=Yt.call(this,d)}catch(e){return Promise.reject(e)}l=0;f=u.length;while(l<f){c=c.then(u[l++],u[l++])}return c}getUri(e){e=Et(this.defaults,e);const t=_t(e.baseURL,e.url,e.allowAbsoluteUrls);return Re(t,e.params,e.paramsSerializer)}}fe.forEach(["delete","get","head","options"],(function e(t){er.prototype[t]=function(e,r){return this.request(Et(r||{},{method:t,url:e,data:(r||{}).data}))}}));fe.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Et(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}er.prototype[t]=r();er.prototype[t+"Form"]=r(true)}));var tr=er;class rr{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(r){t=r}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new ut(n,i,o);t(r.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new rr((function t(r){e=r}));return{token:t,cancel:e}}}var nr=rr;function ir(e){return function t(r){return e.apply(null,r)}}function or(e){return fe.isObject(e)&&e.isAxiosError===true}const ar={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ar).forEach((([e,t])=>{ar[t]=e}));var sr=ar;function ur(e){const t=new tr(e);const r=n(tr.prototype.request,t);fe.extend(r,tr.prototype,t,{allOwnKeys:true});fe.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return ur(Et(e,r))};return r}const cr=ur(Ye);cr.Axios=tr;cr.CanceledError=ut;cr.CancelToken=nr;cr.isCancel=st;cr.VERSION=Kt;cr.toFormData=Se;cr.AxiosError=de;cr.Cancel=cr.CanceledError;cr.all=function e(t){return Promise.all(t)};cr.spread=ir;cr.isAxiosError=or;cr.mergeConfig=Et;cr.AxiosHeaders=ot;cr.formToJSON=e=>Fe(fe.isHTMLForm(e)?new FormData(e):e);cr.getAdapter=Ht.getAdapter;cr.HttpStatusCode=sr;cr.default=cr;e.exports=cr},86565:(e,t,r)=>{"use strict";var n=r(46518);var i=r(28551);var o=r(42787);var a=r(12211);n({target:"Reflect",stat:true,sham:!a},{getPrototypeOf:function e(t){return o(i(t))}})},86614:(e,t,r)=>{"use strict";var n=r(94644);var i=r(18014);var o=r(35610);var a=n.aTypedArray;var s=n.getTypedArrayConstructor;var u=n.exportTypedArrayMethod;u("subarray",(function e(t,r){var n=a(this);var u=n.length;var c=o(t,u);var l=s(n);return new l(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,i((r===undefined?u:o(r,u))-c))}))},86911:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=t.Direction=void 0;var n=r(74848);var i=r(96540);r(73042);var o=r(44772);var a=r(44104);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e,t,r){return t=m(t),h(e,v()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const _=.8;const S=.3;var E;(function(e){e["ROW"]="row";e["COLUMN"]="column"})(E||(t.Direction=E={}));const w=new a.Log({module:"HwICS.UI.ScrollContainer"});let T=function(e){function t(e){var r;s(this,t);r=d(this,t,[e]);r._getContentComp=e=>{const{direction:t}=r.props;if(t===E.ROW){const t=e.join(" ");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:t}),(0,n.jsx)("span",{className:"scroll-container-text-copy",children:t})]})}const i=e.map(((e,t)=>(0,n.jsx)("div",{children:e},t)));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:i}),(0,n.jsx)("div",{className:"scroll-container-text-copy",children:i})]})};r._computeTime=e=>{var t;const{direction:n}=r.props;if(n===E.ROW){return e.join("").length*_}return((t=r.textElem)===null||t===void 0?void 0:t.clientHeight)*S};r._computeSize=e=>{var t,n,i,o;w.debug("_computeSize",e.type||e,{"textElem.clientWidth":(t=r.textElem)===null||t===void 0?void 0:t.clientWidth,"textElem.clientHeight":(n=r.textElem)===null||n===void 0?void 0:n.clientHeight,"contentElem.clientWidth":(i=r.contentElem)===null||i===void 0?void 0:i.clientWidth,"contentElem.clientHeight":(o=r.contentElem)===null||o===void 0?void 0:o.clientHeight});const{direction:a}=r.props;const s=a===E.ROW?"clientWidth":"clientHeight";const u=a===E.ROW?"digital-intelligent-keyframes-move-x":"digital-intelligent-keyframes-move-y";const c=a===E.ROW?"digital-intelligent-keyframes-restart-move-x":"digital-intelligent-keyframes-restart-move-y";if(r.contentElem&&r.textElem){if(r.contentElem[s]===0){return}const e=r.textElem[s]>r.contentElem[s];if(e!==r.state.isScroll){r.setState({isScroll:e,animationName:e?u:c})}}};r._setTextRef=e=>{if(e){r.textElem=e}};r._setContentRef=e=>{if(e){r.contentElem=e}};r.state={isScroll:false,animationName:"move"};return r}y(t,e);return c(t,[{key:"componentDidMount",value:function e(){this._computeSize({type:"componentDidMount"});window.addEventListener("resize",this._computeSize);window.addEventListener("documentFontsizeChange",this._computeSize)}},{key:"componentWillUnmount",value:function e(){window.removeEventListener("resize",this._computeSize);window.removeEventListener("documentFontsizeChange",this._computeSize)}},{key:"componentDidUpdate",value:function e(t){if(t.data!==this.props.data){this._computeSize({type:"componentDidUpdate"})}}},{key:"render",value:function e(){const{data:t,direction:r}=this.props;const{isScroll:i,animationName:o}=this.state;const a=this._getContentComp(t);const s={"--animation-time":`${this._computeTime(t)}s`,animationName:o};return(0,n.jsx)("div",{className:`scroll-container ${r===E.ROW?"scroll-row":"scroll-column"}`,style:{visibility:t.length>0?"visible":"hidden"},children:(0,n.jsx)("div",{className:"scroll-container-content transparent-scrollbar",ref:this._setContentRef,children:(0,n.jsx)("div",{className:`scroll-container-text ${i?"animation-run":"animation-paused"}`,style:s,ref:this._setTextRef,children:a})})})}}])}(i.Component);T=b([(0,o.componentDecorator)(w)],T);var I=t["default"]=T},86938:(e,t,r)=>{"use strict";var n=r(2360);var i=r(62106);var o=r(56279);var a=r(76080);var s=r(90679);var u=r(64117);var c=r(72652);var l=r(51088);var f=r(62529);var d=r(87633);var h=r(43724);var p=r(3451).fastKey;var v=r(91181);var m=v.set;var y=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var f=e((function(e,i){s(e,d);m(e,{type:t,index:n(null),first:null,last:null,size:0});if(!h)e.size=0;if(!u(i))c(i,e[l],{that:e,AS_ENTRIES:r})}));var d=f.prototype;var v=y(t);var g=function(e,t,r){var n=v(e);var i=b(e,t);var o,a;if(i){i.value=r}else{n.last=i={index:a=p(t,true),key:t,value:r,previous:o=n.last,next:null,removed:false};if(!n.first)n.first=i;if(o)o.next=i;if(h)n.size++;else e.size++;if(a!=="F")n.index[a]=i}return e};var b=function(e,t){var r=v(e);var n=p(t);var i;if(n!=="F")return r.index[n];for(i=r.first;i;i=i.next){if(i.key===t)return i}};o(d,{clear:function e(){var t=this;var r=v(t);var i=r.first;while(i){i.removed=true;if(i.previous)i.previous=i.previous.next=null;i=i.next}r.first=r.last=null;r.index=n(null);if(h)r.size=0;else t.size=0},delete:function(e){var t=this;var r=v(t);var n=b(t,e);if(n){var i=n.next;var o=n.previous;delete r.index[n.index];n.removed=true;if(o)o.next=i;if(i)i.previous=o;if(r.first===n)r.first=i;if(r.last===n)r.last=o;if(h)r.size--;else t.size--}return!!n},forEach:function e(t){var r=v(this);var n=a(t,arguments.length>1?arguments[1]:undefined);var i;while(i=i?i.next:r.first){n(i.value,i.key,this);while(i&&i.removed)i=i.previous}},has:function e(t){return!!b(this,t)}});o(d,r?{get:function e(t){var r=b(this,t);return r&&r.value},set:function e(t,r){return g(this,t===0?0:t,r)}}:{add:function e(t){return g(this,t=t===0?0:t,t)}});if(h)i(d,"size",{configurable:true,get:function(){return v(this).size}});return f},setStrong:function(e,t,r){var n=t+" Iterator";var i=y(t);var o=y(n);l(e,t,(function(e,t){m(this,{type:n,target:e,state:i(e),kind:t,last:null})}),(function(){var e=o(this);var t=e.kind;var r=e.last;while(r&&r.removed)r=r.previous;if(!e.target||!(e.last=r=r?r.next:e.state.first)){e.target=null;return f(undefined,true)}if(t==="keys")return f(r.key,false);if(t==="values")return f(r.value,false);return f([r.key,r.value],false)}),r?"entries":"values",!r,true);d(t)}}},86964:(e,t,r)=>{"use strict";var n=r(70511);n("match")},87029:(e,t,r)=>{"use strict";r.r(t)},87220:(e,t,r)=>{"use strict";var n=r(46518);var i=r(33904);n({target:"Number",stat:true,forced:Number.parseFloat!==i},{parseFloat:i})},87411:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(28551);var a=r(56969);var s=r(24913);var u=r(79039);var c=u((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})}));n({target:"Reflect",stat:true,forced:c,sham:!i},{defineProperty:function e(t,r,n){o(t);var i=a(r);o(n);try{s.f(t,i,n);return true}catch(e){return false}}})},87433:(e,t,r)=>{"use strict";var n=r(34376);var i=r(33517);var o=r(20034);var a=r(78227);var s=a("species");var u=Array;e.exports=function(e){var t;if(n(e)){t=e.constructor;if(i(t)&&(t===u||n(t.prototype)))t=undefined;else if(o(t)){t=t[s];if(t===null)t=undefined}}return t===undefined?u:t}},87478:(e,t,r)=>{"use strict";var n=r(87633);n("Array")},87583:(e,t,r)=>{const n=r(91333);const i=r(90157);const o=r(47899);const a=r(56756);function s(e,t,r,o,a){const s=[].slice.call(arguments,1);const u=s.length;const c=typeof s[u-1]==="function";if(!c&&!n()){throw new Error("Callback required as last argument")}if(c){if(u<2){throw new Error("Too few arguments provided")}if(u===2){a=r;r=t;t=o=undefined}else if(u===3){if(t.getContext&&typeof a==="undefined"){a=o;o=undefined}else{a=o;o=r;r=t;t=undefined}}}else{if(u<1){throw new Error("Too few arguments provided")}if(u===1){r=t;t=o=undefined}else if(u===2&&!t.getContext){o=r;r=t;t=undefined}return new Promise((function(n,a){try{const a=i.create(r,o);n(e(a,t,o))}catch(e){a(e)}}))}try{const n=i.create(r,o);a(null,e(n,t,o))}catch(e){a(e)}}t.create=i.create;t.toCanvas=s.bind(null,o.render);t.toDataURL=s.bind(null,o.renderToDataURL);t.toString=s.bind(null,(function(e,t,r){return a.render(e,r)}))},87607:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(42551);var a=r(79306);var s=r(48981);var u=r(24913);if(i){n({target:"Object",proto:true,forced:o},{__defineSetter__:function e(t,r){u.f(s(this),t,{set:a(r),enumerable:true,configurable:true})}})}},87633:(e,t,r)=>{"use strict";var n=r(97751);var i=r(62106);var o=r(78227);var a=r(43724);var s=o("species");e.exports=function(e){var t=n(e);if(a&&t&&!t[s]){i(t,s,{configurable:true,get:function(){return this}})}}},87635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);var o=r(69733);r(91590);var a=r(44772);var s=r(50306);var u=r(44104);var c=r(45112);var l=r(39595);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=_(t),y(e,b()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const T=new u.Log({module:"HwICS.UI.StopChatBtn"});let I=function(e){function t(e){var r;f(this,t);r=m(this,t,[e]);r._onClick=async()=>{T.info("_onClick");r.setState({loadingShow:true});await Promise.race([c.ChatManager.interruptSpeaking("stop-chat-btn"),(0,a.sleep)(2e3)]);r.setState({loadingShow:false})};r.state={loadingShow:false};return r}S(t,e);return h(t,[{key:"render",value:function e(){const{loadingShow:t}=this.state;const{language:r,chatBtnState:i,enableVadInterrupt:o}=this.props;let a=r.stopAnswering;if(o){a=r.CLICK_OR_SPEAK_TO_INTERRUPT}return(0,n.jsx)("div",{className:"ai-chat-top-btn-container stop-chat",style:{display:i===l.ChatBtnState.ANSWERING?"flex":"none"},children:(0,n.jsx)(s.Button,{className:"stop-chat-btn box-shadow",dataTestid:"stopChatBtn",onClick:this._onClick,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"stop-chat-btn-bg"}),(0,n.jsx)("div",{className:"stop-chat-btn-content",children:a}),t&&(0,n.jsx)("div",{className:"loading-ico"})]})})})}}])}(i.Component);I=w([(0,a.componentDecorator)(T)],I);const R=e=>({language:e.lang.language,chatBtnState:e.main.chatBtnState,enableVadInterrupt:e.config.enableVadInterrupt});var C=t["default"]=(0,o.connect)(R)(I)},87745:(e,t,r)=>{"use strict";var n=r(43724);var i=r(58429).MISSED_STICKY;var o=r(22195);var a=r(62106);var s=r(91181).get;var u=RegExp.prototype;var c=TypeError;if(n&&i){a(u,"sticky",{configurable:true,get:function e(){if(this===u)return;if(o(this)==="RegExp"){return!!s(this).sticky}throw new c("Incompatible receiver, RegExp required")}})}},88111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CustomRecord=void 0;var n=r(44104);var i=r(44772);var o=r(40494);var a=r(12574);var s=r(56043);var u=r(94855);var c=r(70487);var l=r(82144);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var b=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const _=new n.Log({module:"thirdParty.CustomRecord"});let S=t.CustomRecord=function(){function e(){p(this,e)}return m(e,null,[{key:"initDevice",value:async function t(){var r;_.info("initDevice");if(!((r=u.ConfigManager.getCustomRecordConfig())!==null&&r!==void 0&&r.enable)){_.info("initDevice enable false");return}if(!a.ReduxManager.checkMainPage()){_.info("initDevice checkMainPage false");return}e.closeDevice();e.pcmPlayer=new i.PCMPlayer({channelNums:1,inputCodec:l.InputCodecsEnum.Int16,sampleRate:16e3,flushTime:100,onstatechange:(e,t,r)=>{_.debug("onstatechange",e,t,r)},onended:t=>{e.updateStatInfo(t)}});const n=e.pcmPlayer.getMediaStream();u.ConfigManager.setThirdPartyStream(n);s.LocalWakeup.updateStreamInput({entry:"initDevice",stream:n});const c=e.pcmPlayer.getAudioMediaTrack();c&&await o.StreamAdapter.startSendCustomStream(c);e.stat.start()}},{key:"clearCache",value:function t(){var r;(r=e.pcmPlayer)===null||r===void 0?void 0:r.clear("clearCache")}},{key:"closeDevice",value:function t(){var r;(r=e.pcmPlayer)===null||r===void 0?void 0:r.destroy();delete e.pcmPlayer;e.resetStat()}},{key:"resetStat",value:function t(){_.info("resetStat");e.stat.reset()}},{key:"getAudioMediaTrack",value:function t(){var r;return(r=e.pcmPlayer)===null||r===void 0?void 0:r.getAudioMediaTrack()}},{key:"updateStatInfo",value:function t(r){e.statInfo=d(d({},e.statInfo),r)}},{key:"getStatInfo",value:function t(){return e.statInfo}},{key:"sendCustomLocalAudio",value:async function t(r){const n=e.getStatInfo();const i=(r===null||r===void 0?void 0:r.time)||0;e.updateStatInfo({receiveNum:this.receiveNum,inputTime:i,receiveTime:Date.now(),inputInterval:i-Number(n===null||n===void 0?void 0:n.inputTime),receiveInterval:Date.now()-Number(n===null||n===void 0?void 0:n.receiveTime)});e.receiveNum++;if(r!==null&&r!==void 0&&r.uint8Arr){var o,a;(o=e.pcmPlayer)===null||o===void 0?void 0:(a=o.feed)===null||a===void 0?void 0:a.call(o,r===null||r===void 0?void 0:r.uint8Arr)}else if(r!==null&&r!==void 0&&r.base64Data){var s,u;(s=e.pcmPlayer)===null||s===void 0?void 0:(u=s.feedBase64)===null||u===void 0?void 0:u.call(s,r===null||r===void 0?void 0:r.base64Data)}e.stat.audioIncrease();e.stat.updateCustomRecordInfo(e.statInfo)}}])}();S.stat=new c.ThirdPartyStat("CustomRecord");S.receiveNum=0;b([(0,i.printfDecorator)(_)],S,"initDevice",null);b([(0,i.printfDecorator)(_)],S,"closeDevice",null);b([(0,i.printfDecorator)(_)],S,"getAudioMediaTrack",null)},88159:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StringUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.StringUtil=i((function e(){o(this,e)}));a(c,"beforeJsonParse",(function(e){return e.replace("","")}));a(c,"replaceStringPlaceholder",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}var i=e.split(r.toString());var o="";i.forEach((function(e,t){o+=e;if(t<i.length-1&&n[t]){o+=n[t]}}));return o}));a(c,"formatString",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}if((0,t.formatType)(e)!==t.formatType.STRING){return e}return e.replace(/\{([^{}]+)}/g,(function(e,r){return(0,t.formatType)(n[r])===t.formatType.STRING||!(0,t.isNullOrEmpty)(n[r])?n[r]:e}))}));a(c,"splitStringByChar",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}if((0,t.formatType)(r)!==t.formatType.NUMBER||r<0){return e}if((0,t.formatType)(n)!==t.formatType.STRING){return e}var i="";e.split("").forEach((function(t,o){i+=t;if(o<e.length-1&&(o+1)%r===0){i+=n}}));return i}));a(c,"safeJSONParse",(function(e){try{return JSON.parse(e)}catch(e){return null}}))}))},88256:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(17825),r(91725),r(13190),r(40969),r(60334),r(30258),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=c;r=u(r);i=u(i);function u(e){return e&&e.__esModule?e:{default:e}}function c({keyboard:e,okText:u="确定",okButtonProps:c,cancelText:l="取消",cancelButtonProps:f,languageCode:d,title:h="",content:p=""}){const v=document.createElement("div");document.body.appendChild(v);const m=(0,o.reactRenderPolyfill)(v);return new Promise((o=>{const y=({ret:e=false,isClickClose:r=false}={})=>{var n;(n=(0,a.getPLogger)())===null||n===void 0?void 0:n.info("confirm.onClose",h,p,e,r);const i=(0,t.getDialogCloseFuncList)();requestAnimationFrame((()=>{var e;m===null||m===void 0?void 0:m.unmount();v===null||v===void 0?void 0:(e=v.parentNode)===null||e===void 0?void 0:e.removeChild(v)}));const s=i.findIndex((e=>e.onClose===y));if(s>-1){i.splice(s,1)}o({ret:e,isClickClose:r})};const g=()=>{y({ret:true})};m===null||m===void 0?void 0:m.render((0,s.jsx)(r.default,{visible:true,title:(0,s.jsx)(i.default,{isUseDrag:false,isUseMinBtn:false,isUseMaxBtn:false,title:h,clickClose:()=>y({isClickClose:true}),langCode:d}),width:280,maskClosable:false,onOk:g,content:p,keyboard:e,footer:(0,s.jsx)(n.DefaultFooter,{cancelButtonProps:f,cancelClick:()=>y({}),cancelText:l,okButtonProps:c,okClick:g,okText:u})}));(0,t.setDialogCloseFunc)({onClose:y,keyboard:e})}))}}))},88267:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(655);var a=String.fromCharCode;var s=i("".charAt);var u=i(/./.exec);var c=i("".slice);var l=/^[\da-f]{2}$/i;var f=/^[\da-f]{4}$/i;n({global:true},{unescape:function e(t){var r=o(t);var n="";var i=r.length;var d=0;var h,p;while(d<i){h=s(r,d++);if(h==="%"){if(s(r,d)==="u"){p=c(r,d+1,d+5);if(u(f,p)){n+=a(parseInt(p,16));d+=5;continue}}else{p=c(r,d,d+2);if(u(l,p)){n+=a(parseInt(p,16));d+=2;continue}}}n+=h}return n}})},88311:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SDPManager=void 0;var n=r(79681);var i=c(r(19760));var o=r(75625);var a=r(94855);var s=r(44772);var u=r(44104);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e,t,r){return t=b(t),m(e,g()?Reflect.construct(t,r||[],b(e).constructor):t.apply(e,r))}function m(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var E=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const w=new u.Log({module:"SDPManager"});let T=t.SDPManager=function(e){function t(){l(this,t);return v(this,t,arguments)}_(t,e);return d(t,null,[{key:"getAnswerOffer",value:async function e(){var r;const n=await t.getLocalSDP();const u=a.ConfigManager.getChatInfo("getAnswerOffer");const c=a.ConfigManager.getPlayerUserInfo("getAnswerOffer");const l=1;const f=2;const d={signature:(c===null||c===void 0?void 0:c.signature)||"",id:(c===null||c===void 0?void 0:c.user_id)||(0,s.getClientId)().toString(),proto:"webrtc",desc:n,pull:[{name:"main",type:l},{name:"main",type:f}]};const h=await i.default.post(o.BaseUrl.POST_MEDIA_NEGOTIATE.replace("{job_id}",(u===null||u===void 0?void 0:u.job_id)||""),d,{headers:{[o.HttpHeaders.AUTH_TOKEN]:((r=a.ConfigManager.getAuthInfo("getAnswerOffer"))===null||r===void 0?void 0:r.access_token)||""}});w.debug("getAnswerOffer",h);return{answerSdp:h.data.desc,iceCandidates:h.data.access}}},{key:"getLocalSDP",value:async function e(){await t.client.createPeerConnection();return t.client.getLocalSDP()}}])}(n.P2pSDK);E([(0,s.printfDecorator)(w)],T,"getAnswerOffer",null);E([(0,s.printfDecorator)(w)],T,"getLocalSDP",null)},88431:(e,t,r)=>{"use strict";var n=r(46518);var i=r(59213).every;var o=r(34598);var a=o("every");n({target:"Array",proto:true,forced:!a},{every:function e(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},88490:e=>{"use strict";var t=Array;var r=Math.abs;var n=Math.pow;var i=Math.floor;var o=Math.log;var a=Math.LN2;var s=function(e,s,u){var c=t(u);var l=u*8-s-1;var f=(1<<l)-1;var d=f>>1;var h=s===23?n(2,-24)-n(2,-77):0;var p=e<0||e===0&&1/e<0?1:0;var v=0;var m,y,g;e=r(e);if(e!==e||e===Infinity){y=e!==e?1:0;m=f}else{m=i(o(e)/a);g=n(2,-m);if(e*g<1){m--;g*=2}if(m+d>=1){e+=h/g}else{e+=h*n(2,1-d)}if(e*g>=2){m++;g/=2}if(m+d>=f){y=0;m=f}else if(m+d>=1){y=(e*g-1)*n(2,s);m+=d}else{y=e*n(2,d-1)*n(2,s);m=0}}while(s>=8){c[v++]=y&255;y/=256;s-=8}m=m<<s|y;l+=s;while(l>0){c[v++]=m&255;m/=256;l-=8}c[v-1]|=p*128;return c};var u=function(e,t){var r=e.length;var i=r*8-t-1;var o=(1<<i)-1;var a=o>>1;var s=i-7;var u=r-1;var c=e[u--];var l=c&127;var f;c>>=7;while(s>0){l=l*256+e[u--];s-=8}f=l&(1<<-s)-1;l>>=-s;s+=t;while(s>0){f=f*256+e[u--];s-=8}if(l===0){l=1-a}else if(l===o){return f?NaN:c?-Infinity:Infinity}else{f+=n(2,t);l-=a}return(c?-1:1)*f*n(2,l-t)};e.exports={pack:s,unpack:u}},88521:e=>{"use strict";e.exports={startRecordAudioToast:"Voice recording started.",completeRecordAudioToast:"Voice recorded.",ICS_CREATE_AUDIO_RECORD_TASK_FAILED:"Start recording task failed.",ICS_AUDIO_REPORT_TASK_EXIST:"There is already a recording task.",ICS_AUDIO_RECORD_NOT_ENABLE:"Recording has been disabled.",ICS_SIS_CONCURRENCY_LIMIT:"Too many SIS resources are used at the same time.",conversationNoResource:"Too many concurrent dialogs. Wait until other dialogs end, or buy more concurrent resources and try again.",ICS_SIS_SERVICE_NOT_SUBSCRIBE:"Speech Interaction Service (SIS) not enabled. Enable it on the console.",WBC_ROLE_BUSINESS_NOT_EXIST:"Language not supported. Contact the administrator to add it in the AI assistant.",startChatTip:'Say "%s" to wake me up and chat.',closingAdvertiseTip:"Hold on. %s is on the way.",ICS_ASR_WAIT_VOICE_TIME_OUT:"Waiting for audio streams timed out. Check whether the mic can pick up sound.",ICS_MOBVOI_ASR_UNAUTHORIZED:"Mobvoi ASR authentication failed. Check whether the account and AppSecret are correct.",minute:" minute",minutes:" minutes",WORKER_JOB_STOP_BY_MUTE_OVERTIME:"Dialog auto ended. Re-activate it to continue.",WORKER_EXIT_MUTE_MENTION:"Dialog will end in %s. Ask now to keep going.",WBC_ROLE_NOT_EXIST:"Interactive assistant not found. Configure one or contact technical support.",WBM_PLUGIN_CONFIG_NOT_EXIST:"Unavailable skill. Check the plug-in configuration or contact technical support.",WBM_LLM_CONFIG_NOT_EXIST:"Unavailable foundation model. Check the foundation model address or contact technical support.",CONFIG_NO_PERMISSION:"No permission to access.",systemOpenAndRejoin:"System error. Services are being recovered.",ICS_ROBOT_ROOM_ID_EMPTY:"Application not associated with an interactive dialog room ID.",ICS_JOB_ID_EXIST:"Task ID is in use. Try again later or contact technical support to locate and rectify the fault.",TTS_VOICE_ASSET_UNACTIVATED:"Voice broadcast failed because the timbre has been removed. Contact the administrator to change it.",wbwAgentRoleNotExisted:"Interactive assistant not found.",wbwLLMNotExisted:"Foundation model address not configured.",wbwLLMAccessFailed:"Call foundation model failed.",wbwLLMInvalidModel:"Failed to obtain the correct model information from the configured foundation model. Only one model data record can be returned for each foundation model.",youCanAlsoAskMe:"You can ask",clickToExitPreview:"Click anywhere to exit preview.",freeDiskSpaceNotEnough:"Insufficient storage",model:"Model",fundamentalFrequency:"Base frequency",turboFrequency:"Turbo frequency",ICS_EXTEND_PARAM_INVALID:"Invalid extended parameter. Carry the extended parameter in a valid format.",sayToStopSpeakingHub:'Say "%s" to stop response',answeringV3:"Answering... Touch or click to end.",sayStopAnswerToStopSpeaking2:'Responding... Say "%s" to stop.',clickToStopAnswer:"Answering... Click to stop.",clickToStopThink:"Responding... Click to stop.",sayStopAnswerToStopSpeaking:'Answering... Say "%s" to stop response.',CLICK_OR_SPEAK_TO_INTERRUPT:"Touch or speak to pause",I_AM_LISTENING_PLEASE_SPEAK:"I'm listening.",PLEASE_WAIT:"Please wait…",IMAGE_LOAD_FAILED:"Load image failed.",IMAGE_LOADING:"Loading image...",PATH_DISALLOWED_CHINESE:"The app path cannot contain Chinese characters.",SHOW_FACE:"Show my face",ICS_THIRD_PARTY_DRIVE_NOT_ALLOWED_THIS_WEB_MESSAGE:"Not supported by the third-party driver. Try with the driver API.",TTS_ACCESS_CONFIG_ERROR:"Check whether the AK/SK of the purchased third-party timbre is correct.",ICS_SIS_FROZEN_ERROR:"Speech recognition is unavailable due to outstanding amounts. Contact the administrator.",TTS_INVALID_TEXT:"This answer cannot be converted to speech.",TTS_NO_ACCESS_CONFIG:"Check whether the AK/SK of the purchased third-party timbre is configured.",TTS_UNSUPPORTED_LANGUAGE_TEXT:"This timbre does not support this language. Check the timbre configuration.",ICS_TEXT_QUESTION_LENGTH_LIMITED:"Input exceeds the limit. Please shorten it.",DHICIS_TTS_CONVERT_FAIL:"It looks like there's a hiccup. Please go ahead with your question.",ICS_MEDIA_SERVICE_ADDR_IS_EMPTY:"Media service address is empty. Contact technical support to locate and rectify the fault.",ICS_MEDIA_NEGOTIATE_FAILED:"Media negotiation failed. Contact technical support to locate and rectify the fault.",MPS_ROOM_NAME_DUPLICATE:"Duplicate interactive room name.",MPS_JOB_HEARTBEAT_FAILED:"Heartbeat failed for intelligent interaction task.",MPS_ASSET_ID_INVALID:"Invalid asset ID.",MPS_OVER_RESOURCE_NUM:"Tenant resources have been used up.",MPS_JOB_NUM_OVER_CONCURRENCY:"Too many concurrent tasks in the dialog.",MPS_VOICE_ID_UNAVAILABLE:"Timbre ID is unavailable.",MPS_TASK_EXPIRED:"Intelligent interaction task has expired.",MPS_INSUFFICIENT_RESOURCE_QUOTA:"Intelligent interaction resource quota is insufficient.",MPS_JOB_NOT_EXISTED:"Intelligent interaction task does not exist or has expired.",MPS_ASSET_ID_UNAVAILABLE:"Asset is unavailable.",MPS_CHANGE_FINISHED_JOB_STATE_FAILED:"Completed tasks cannot be modified.",MPS_ROOM_INFO_NOT_FOUND:"Room information not found.",MPS_QURREY_ASSET_FAILED:"Query dac failed.",MPS_NAME_INCLUDE_INVALID_SYMBOL:"Name contains special characters.",DHICIS_ERROR:"Contact technical support.",DHICIS_INFER_SERVICE_ERROR:"Contact technical support.",DHICIS_TASK_READY_ERROR:"Contact technical support.",DHICIS_CREATE_INFER_MODEL_ERROR:"Contact technical support.",DHICIS_WORKER_JOIN_ROOM_FAIL:"Contact technical support.",DHICIS_MANAGER_SERVICE_ERROR:"Please try again. If the fault persists, contact technical support.",DHICIS_JOB_STOP_BY_COMMAND:"Task has been closed. Start a new one.",DHICIS_FSM_STATE_TIME_OUT:"Please try again. If the fault persists, contact technical support.",DHICIS_ICS_ERROR:"Please try again. If the fault persists, contact technical support.",DHICIS_RTSA_ROOM_EMPTY:"Please try again. If the fault persists, contact technical support.",DHICIS_RTSA_REPORT_LEAVE_ROOM:"Please try again. If the fault persists, contact technical support.",DHICIS_MODEL_FILE_DOWN_FAIL:"Check whether the asset file of the person model exists. If no, replace the file. If yes, contact technical support.",DHICIS_BACKGROUND_FILE_DOWN_FAIL:"Check whether the asset file of the background image exists. If no, replace the background. If yes, contact technical support.",DHICIS_WORKER_JOIN_ROOM_TIMEOUT:"Please try again. If the fault persists, contact technical support.",DHICIS_JOIN_ROOM_TASK_FAIL:"Please try again. If the fault persists, contact technical support.",DHICIS_TTS_PREHEAT_TASK_FAIL:"Please try again. If the fault persists, contact technical support.",DHICIS_DATA_PACKAGE_IS_NOT_ZIP:"Format of the person model asset is incorrect. Replace the asset or contact technical support.",DHICIS_TOO_MANY_ENTRIES_IN_PACKAGE:"Please try again. If the fault persists, contact technical support.",DHICIS_PACKAGE_TOO_LARGE:"Please try again. If the fault persists, contact technical support.",DHICIS_FILE_IN_PACKAGE_TOO_LARGE:"Please try again. If the fault persists, contact technical support.",DHICIS_UNEXPECTED_DIRECTORY_IN_PACKAGE:"Please try again. If the fault persists, contact technical support.",DHICIS_PACKAGE_ENTRY_ILLEGAL_NAME:"Please try again. If the fault persists, contact technical support.",DHICIS_FILE_NAME_INVALID:"Please try again. If the fault persists, contact technical support.",DHICIS_JOB_INFO_PARA_INVALID:"Contact technical support.",DHICIS_FSM_STATE_ERROR:"Please try again. If the fault persists, contact technical support.",ICS_NOT_IN_TEXT_MODE:"Switch to text mode and try again.",ICS_TEXT_QUESTION_IS_EMPTY:"No content entered.",ICS_TEXT_QUESTION_NOT_IN_WAIT_QUESTION_STATUS:"Stop the virtual human from replying or wake it up before asking a new question.",ICS_INVALID_INTERACTION_MODE:"This mode is invalid.",ICS_UNMATCHED_APP_TYPE_AIUI:"iFLYTEK Spark model you configured does not match the selected application type.",ICS_UNMATCHED_APP_TYPE_SPARK:"AIUI application you configured does not match the selected application type.",ICS_THIRD_PARTY_DRIVER_NOT_ALLOWED_WEB_START_CHAT:"Selected application type is not supported. Check the selected application type or driver mode.",DIALOG_NOT_EXIST:"Dialog does not exist. Check whether the operation is correct or contact technical support.",RPC_ACTION_NOT_EXIST:"Unknown error. Check whether the operation is correct or contact technical support.",ICS_EXCEPTION:"Unknown error. Check whether the operation is correct or contact technical support.",REQUEST_TOO_FREQUENTLY:"Too many requests.",TENANT_CLEANUP_JOB_STOPPED:"Task stopped because data has been cleared after tenant deregistration.",NO_PERMISSION_TO_ACCESS:"No permission. Check whether the operation is correct or contact technical support.",ROBOT_NOT_EXIST:"Application does not exist. Check whether the operation is correct or contact technical support.",ROBOT_NO_PERMISSION:"No permission to view application configuration. Check whether the operation is correct or contact technical support.",START_SMART_CHAT_FAILED:"Start intelligent interaction task failed. Contact technical support.",STOP_SMART_CHAT_FAILED:"End intelligent interaction task failed. Contact technical support.",SHOW_SMART_CHAT_FAILED:"Query intelligent interaction task failed. Contact technical support.",GENERATE_SLIDE_VERIFICATON_FAILED:"Unknown error. Check whether the operation is correct or contact technical support.",SLIDE_VERIFICATON_NOT_EXIST:"CAPTCHA verification expired. Please try again.",DIALOG_NO_PERMISSION:"No permission to view dialog information. Check whether the operation is correct or contact technical support.",HOT_QUESTION_NOT_EXIST:"Frequently asked question does not exist. No action is required.",MESSAGE_PARSE_ERROR:"Parse message failed. Check whether the operation is correct or contact technical support.",UNKNOWN_ACTION:"Invalid command received. Check whether the operation is correct or contact technical support.",CONNECT_APP_TIMEOUT:"Request to third-party application timed out. Check application configuration or contact technical support.",AUTHTOKEN_INVALID:"Invalid authentication token. Please try again.",QUERYPARAM_INVALID:"Establish session failed because parameters are invalid. Check whether the operation is correct or contact technical support.",CLIENT_ERROR_MESSAGE:"Third-party application returned an error. Check application configuration or contact technical support.",WEBCLIENT_START_CHAT_WORKER_DISCONNECT:"Unknown error. Try again or contact technical support.",CHANNEL_RECORED_NOT_FOUND:"Unknown error. Try again or contact technical support.",MOBVOI_REQUEST_FLOW_LIMITED:"Too many concurrent Mobvoi questions. Try again later or contact technical support to increase the quota.",UPLOAD_LOG_COUNT_EXCEED_MAX_COUNT:"Too many log files to upload. Try again later.",WEBSOCKET_CONNECTION_JOB_COUNT_EXCEED_MAX_VALUE:"Too many WebSocket connections. Contact technical support.",WEBSOCKET_CONNECTION_POD_COUNT_EXCEED_MAX_VALUE:"Too many WebSocket connections. Contact technical support.",RTC_ERR_CODE_RTC_SDK_ERROR:"SDK error. Contact technical support.",RTC_ERR_CODE_WAIT_RSP_TIMEOUT:"Message response timed out. Contact technical support.",RTC_ERR_CODE_INVALID_PARAMETER:"Incorrect parameter. Contact technical support.",RTC_ERR_CODE_INVALID_OPERATION:"Incorrect user status. Check whether the operation is correct or contact technical support.",RTC_ERR_CODE_NO_AVAILABLE_DEVICES:"No device found. Check whether the device is ready.",RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES:"No camera found. Check whether the video capture device is ready.",RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES:"No audio input device found. Check whether the audio capture device is ready.",RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES:"No audio output device found.",RTC_ERR_CODE_STATUS_ERROR:"Incorrect room status. Check whether you have joined the room.",RTC_ERR_CODE_WAIT_CONFIG_FAIL:"Obtain delivered configuration failed. Contact technical support.",RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL:"Response to stream push failed. Contact technical support.",RTC_ERR_CODE_REGION_NOT_COVERED:"Server address not found. Contact technical support.",RTC_ERR_CODE_WEBSOCKET_INTERRUPTED:"WebSocket connection was forcibly closed because you left or reconnected to the meeting.",RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED:"No microphone permission. Grant the permission in browser settings.",RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED:"Capture failed. The audio and video capture device does not meet the configured capture requirements.",RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND:"No device found. Check whether the device is ready.",RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE:"Microphone cannot be accessed temporarily. Ensure that other applications are not requesting for accessing the microphone and try again.",RTC_ERR_CODE_ROLE_NO_PERMISSION:"No permission for this user role. Check the role.",RTC_ERR_CODE_ANSWER_SDP_INVALID:"SDP negotiation error. Contact technical support.",RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM:"跨房数量超过最大值",RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM:"跨房内主播人数超过最大值",RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED:"Room audio and video paused.",RTC_ERR_CODE_SIGNATURE_EXPIRED:"Signature expired.",RTC_ERR_CODE_SIGNATURE_INVALID:"Incorrect signature. Check whether the operation is correct or contact technical support.",ERR_GENERAL:"Unknown error. Check whether the operation is correct or contact technical support.",guessYouWantToAsk:"Ask me",audioDeviceNotAllow:"No microphone permission to test devices. Grant the permission in browser settings.",notSupportChangeSpeaker:"This browser does not support device switchover. Select the speaker in system settings.",noSpeaker:"None detected.",noMicrophone:"None detected.",noSpeakerTip:"Connect a speaker first.",noMicrophoneTip:"Connect a microphone first.",audioDevice:"Sound devices",deviceDetection:"Check devices",speaker:"Speaker",detectingSpeaker:"Test",microphone:"Microphone",detectingMicrophone:"Test",cancel:"Cancel",apply:"Save",stopDetection:"Stop",networkAbnormalAndRecovering:"Network error. Reconnecting...",warnNetwrokQualityLeaveTips:"Poor network signal. Check the network.",pleaseEnterStoreCode:"Enter storeCode.",websocketLinksExceeds:"Too many WebSocket connections.",singleTenantWebsocketLinksExceeds:"Too many WebSocket connections of a tenant.",invalidParamter:"Incorrect parameter.",toneResourceError:"Timbre resource error. Contact the administrator.",pleaseEnterDeviceId:"Enter a device ID.",conversationResourceFull:"Dialog resources used up. Contact the administrator to scale up resources.",authorizationExpired:"Authentication has expired. Refresh the page to activate.",currentLanguageNotSupportRecognition:"Voice recognition unavailable for this language. Try with another language.",SISAuthorizationFailed:"SIS authorization error. Contact your admin.",equipmentTest:"Check devices",equipmentTesting:"Checking...",computerMemory:"Computer memory",totalMemory:"Total ",noLessThan:"≥ %s",freeMemory:"Remaining ",diskSpace:"Storage space",allCheck:"Items checked: %s",testCompleted:"Completed",runNeedOk:"Meets running requirements.",volumeTest:"Volume test",deviceName:"Device name",noEnoughFreeMemory:"Insufficient memory",dissatisfied:"Not met",mobvoiUnauthorized:"Mobvoi authentication failed. Check whether the account and AppSecret are correct.",domainIsNotAllowed:"Domain access not allowed. Contact the admin.",failedToLoad:"%s loading failed.",upgradingAndRejoing:"Upgrading... Joining again...",startYourDigitalHumanInteractionJourney:"Chat with virtual human now",mobvoiQuantityNotEnough:"Insufficient Mobvoi question quota. Increase the quota first.",mobvoiRoleIdIsInvalid:"Incorrect role ID in Mobvoi.",iflytekApplicationSceneConfigError:"Contact the administrator to check whether the language scenario was added in iFLYTEK.",refreshAssetFailed:"Query asset failed. Contact the administrator.",sure:"OK",mediaLinkEstablishmentFailed:"Set up media connection failed. Use another network and try again.",sayHelloToStart2:'Just say "%s" to chat.',activating:"Activating...",errorNoEnoughResource2:"Insufficient system resources. Try again later.",errorApplicationConfigurationResourcesFull2:"Insufficient dialog resources. Try again later or contact the administrator to scale out resources.",errorOrderResourcesFull2:"Insufficient dialog resources. Try again later or contact the administrator to scale out resources.",equipmentNormal:"Devices are running properly.",microphoneDeviceNotDetected:"No microphone detected.",collectLogs:"Collect logs",checkEquipment:"Check devices",errorRPCCallFailed:"Internal error. Please try again.",errorAIUIUnauthorized:"Authenticate AIUI configuration failed. Contact the administrator.",errorSpeakUnauthorized:"Authenticate Spark configuration failed. Contact the administrator.",errorOrderResourcesFull:"Create dialog task failed because subscribed resources have been used up. Contact the administrator.",errorApplicationConfigurationResourcesFull:"Create dialog task failed because application configuration resources have been used up. Try again later.",errorCurrentSessionExpired:"Session has expired.",AIUIUnauthorized2:"Authenticate AIUI configuration failed.",subscriptionResourceHasExpired:"Resource has expired and dialog task has been disabled. Renew the resource to continue the dialog.",requestTimedOutTrayAgain:"Request timed out. Try again later.",requestFailed:"Request failed.",requestFailedAndError:"Request failed. %s",websocketIsNotOpen:"WebSocket not connected. Try again later.",ttsInsufficientAccountBalance:"This voice is unavailable due to outstanding amounts. Contact your administrator to use another voice and try again.",errorInteractiveNumberIsInsufficient:"Max. number of daily chat characters reached. Contact the administrator.",errorTokenNumberIsInsufficient:"Max. number of daily chat turns reached. Contact the administrator.",sayGoodbyeToStopChat:'Identifying... Say "%s" to end topic.',sayGoodbyeToStopChatV2:'Identifying... Say "%s" to end topic.',recognizingAndClickToStopV2:"Identifying... Click to end topic.",loading:"Loading...",operateTimeout:"Operation timed out.",clickToCeconnect:"Reconnect",webSocketOpenFailed:"Set up WebSocket connection failed.",operateFailed:"Operation failed.",errorActiveCodeAuthLocked:"Activation locked. Try again in %ss.",sayHelloToStart:'Just say "%s" to chat.',quit:"Exit",maximize:"Maximize",enter:"Join",showInMainScreen:"Primary screen",intelligentInteractiveController:"Controller",showInSecondaryScreen:"Secondary screen",incorrectFormat:"Incorrect format.",pleaseEnterAddress:"Enter the activity address.",pageLoadFailed:"Load page failed.",reload:"Reload",activate:"Activate now",activePageTitle:"Activate intelligent interaction",activePlaceholder:"Activation code",brandNewConversation:"New topic",clickToStart:"Chat now",connecting:"Connecting…",copyErrorInfo:"Copy error info",copyFail:"Copy failed.",copySuccess:"Copied.",defaultErrorMessage:"Check whether the parameters or network is normal.",hint:"Information",jigsawStatusDefault:"Drag the slider to fill the puzzle piece.",jigsawStatusFail:"Verification failed. Please try again.",jigsawStatusSuccess:"Verified.",micPermission:"Microphone not enabled. Enable it and try again.",noEnoughAudioPermission:"No playback permission. Click OK to assign permission.",pageTitle:"Intelligent interaction",pleaseVerifyViaSlider:"Verification",recognizing:"Identifying…",recognizingAndClickToStop:"Identifying... Click to stop",refresh:"Refresh",stopAnswering:"Stop",stopping:"Stopping...",taskError:"Error occurred. Refresh the page and try again.",errorActiveCodeAuthExpired:"Activation code expired. Obtain a new one.",errorActiveCodeAuthFailed:"Activation failed. Enter the activation code again.",errorBrowserNotSupport:"Browser does not support this function. Upgrade the browser or use another one.",errorChatQuotaInsufficient:"Too many users. Try again later.",errorConnectionInterrupted:"Connection lost. Refresh the page.",errorConversationEnded:"Chat already ended or canceled. Refresh the page.",errorDialogConcurrentExceedMaxValue:"Too many concurrent users. Contact the admin.",errorInternalGeneral:"Internal error. Contact R&D engineers.",errorKickOut:"Already joined another room. Refresh the page to join this room.",errorNetworkError:"Network error. Check the network and try again.",errorNoAudioDevicePermission:"Microphone not enabled. Enable it and try again.",errorNoEnoughResource:"Insufficient resources. Try again later.",errorOnceCodeAuthLocked:"Authentication locked. Try again later.",errorPlayNotAllow:"No playback permission. Click OK to assign permission.",errorServerGeneral:"Server error. Contact R&D engineers.",errorSlideVerificatonVerifyFailed:"Verification failed. Please try again.",errorSlideVerificatonVerifyFailedAndExceedMaxTimes:"Slider verification locked. Try again later."}},88727:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},88747:(e,t,r)=>{"use strict";var n=r(94644);var i=n.aTypedArray;var o=n.exportTypedArrayMethod;var a=Math.floor;o("reverse",(function e(){var t=this;var r=i(t).length;var n=a(r/2);var o=0;var s;while(o<n){s=t[o];t[o++]=t[--r];t[r]=s}return t}))},88763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(61347);var o=r(96540);var a=r(69733);var s=u(r(53320));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e,t,r){return t=g(t),v(e,y()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function v(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}let S=function(e){function t(){c(this,t);return p(this,t,arguments)}b(t,e);return f(t,[{key:"render",value:function e(){const{captionList:t,showAnswerChatIdList:r,hideAvatar:o,showAllContentChatId:a}=this.props;const u=t.filter((e=>{if(e.messageType===i.CaptionMessageType.ANSWER){return r.includes(e.chatId)&&e.text}return e.messageType===i.CaptionMessageType.WAITING_ANSWER||e.text}));return u.map(((e,t)=>{if(e.messageType===i.CaptionMessageType.WAITING_ANSWER&&(t!==u.length-1||a.includes(e.chatId))){return null}return(0,n.jsx)(s.default,{itemKey:e.messageType+t,item:e,isLastMessage:t===u.length-1,hideAvatar:o},e.messageType+t)}))}}])}(o.Component);const E=e=>({captionList:e.caption.captionList,showAnswerChatIdList:e.caption.showAnswerChatIdList,videoOrientation:e.main.videoOrientation,showAllContentChatId:e.caption.showAllContentChatId});var w=t["default"]=(0,a.connect)(E)(S)},89195:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("small")},{small:function e(){return i(this,"small","","")}})},89228:(e,t,r)=>{"use strict";r(27495);var n=r(69565);var i=r(36840);var o=r(57323);var a=r(79039);var s=r(78227);var u=r(66699);var c=s("species");var l=RegExp.prototype;e.exports=function(e,t,r,f){var d=s(e);var h=!a((function(){var t={};t[d]=function(){return 7};return""[e](t)!==7}));var p=h&&!a((function(){var t=false;var r=/a/;if(e==="split"){r={};r.constructor={};r.constructor[c]=function(){return r};r.flags="";r[d]=/./[d]}r.exec=function(){t=true;return null};r[d]("");return!t}));if(!h||!p||r){var v=/./[d];var m=t(d,""[e],(function(e,t,r,i,a){var s=t.exec;if(s===o||s===l.exec){if(h&&!a){return{done:true,value:n(v,t,r,i)}}return{done:true,value:n(e,r,t,i)}}return{done:false}}));i(String.prototype,e,m[0]);i(l,d,m[1])}if(f)u(l[d],"sham",true)}},89286:(e,t,r)=>{"use strict";var n=r(94402);var i=r(38469);var o=n.Set;var a=n.add;e.exports=function(e){var t=new o;i(e,(function(e){a(t,e)}));return t}},89379:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(64467);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},89429:(e,t,r)=>{"use strict";var n=r(44576);var i=r(38574);e.exports=function(e){if(i){try{return n.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}}},89463:(e,t,r)=>{"use strict";var n=r(46518);var i=r(43724);var o=r(44576);var a=r(79504);var s=r(39297);var u=r(94901);var c=r(1625);var l=r(655);var f=r(62106);var d=r(77740);var h=o.Symbol;var p=h&&h.prototype;if(i&&u(h)&&(!("description"in p)||h().description!==undefined)){var v={};var m=function e(){var t=arguments.length<1||arguments[0]===undefined?undefined:l(arguments[0]);var r=c(p,this)?new h(t):t===undefined?h():h(t);if(t==="")v[r]=true;return r};d(m,h);m.prototype=p;p.constructor=m;var y=String(h("description detection"))==="Symbol(description detection)";var g=a(p.valueOf);var b=a(p.toString);var _=/^Symbol\((.*)\)[^)]+$/;var S=a("".replace);var E=a("".slice);f(p,"description",{configurable:true,get:function e(){var t=g(this);if(s(v,t))return"";var r=b(t);var n=y?E(r,7,-1):S(r,_,"$1");return n===""?undefined:n}});n({global:true,constructor:true,forced:true},{Symbol:m})}},89544:(e,t,r)=>{"use strict";var n=r(82839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},89557:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(43240),r(81380))}else{}})(this,(function(e){(function(){var t=e;var r=t.x64;var n=r.Word;var i=r.WordArray;var o=t.algo;var a=o.SHA512;var s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);e.sigBytes-=16;return e}});t.SHA384=a._createHelper(s);t.HmacSHA384=a._createHmacHelper(s)})();return e.SHA384}))},89572:(e,t,r)=>{"use strict";var n=r(39297);var i=r(36840);var o=r(53640);var a=r(78227);var s=a("toPrimitive");var u=Date.prototype;if(!n(u,s)){i(u,s,o)}},89777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(96540);r(67914);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e,t,r){return t=p(t),f(e,h()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}let y=function(e){function t(){o(this,t);return l(this,t,arguments)}v(t,e);return s(t,[{key:"render",value:function e(){const{content:t,clickText:r,handleClick:i}=this.props;return(0,n.jsxs)(n.Fragment,{children:[t,(0,n.jsx)("div",{"data-testid":"toastLink",className:"toast-link",onClick:e=>i(e),children:r})]})}}])}(i.Component);var g=t["default"]=y},89854:(e,t,r)=>{"use strict";r.r(t)},89906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wsRetryToastShow=t.wsRetryToastHide=t.toast=t.ToastItem=void 0;var n=r(74848);var i=r(44772);var o=r(5338);var a=d(r(56759));var s=d(r(89777));var u=r(44104);var c=r(26440);var l=r(94855);var f=r(39595);function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}const g=new u.Log({module:"HwICS.UI.Toast"});var b;(function(e){e[e["FIXED"]=0]="FIXED";e[e["UNFIXED"]=1]="UNFIXED"})(b||(b={}));const _=".digital-intelligent-interaction";let S=t.ToastItem=p((function e(t){y(this,e);this.bindToastManager=e=>{this.manager=e;if(this.type===b.UNFIXED){this._task=new i.Timer.TimerTask((()=>this.hide()));this._timerManager&&this._timerManager.cancel().schedule(this._task,this.timeOut)}};this.hide=()=>{g.info("ToastItem hide");this._timerManager&&this._timerManager.cancel();this.show=false;this.manager&&this.manager.render();this._onClose()};this.type=t.type;this.className=t.className||"";this.timeOut=t.timeOut||3e3;this.content=t.content||"";this.entry=t.entry||"";this._onClose=t.onClose||function(){};this.manager=null;this.show=true;this._task=null;this._timerManager=new i.Timer}));let E=p((function e(){y(this,e);this.removeContainerDom=e=>{e+=",removeToastDom";g.info(e);if(this.domNode&&this.root){this.root.unmount();this._container.removeChild(this.domNode);this.domNode=undefined;this.root=undefined}g.info(e,"over")};this.addContainerDom=e=>{if(this.domNode&&this.root){return}this.removeContainerDom(e);this._container=document.querySelector(_);if(!this._container){g.info("addContainerDom not found container");return}this.domNode=document.createElement("div");this._container.appendChild(this.domNode);this.root=(0,o.createRoot)(this.domNode)};this.render=()=>{var e;const t=this.toastShowList.filter((e=>e.show));g.info("render",t.length);(e=this.root)===null||e===void 0?void 0:e.render((0,n.jsx)(a.default,{list:t}))};this.addToastShowList=e=>{g.info("addToastShowList");this.toastShowList=this.toastShowList.filter((e=>e.show&&e.type===b.FIXED));this.toastShowList.push(e);e.bindToastManager(this);this.render()};this.toast=({content:e="no text!",timeOut:t=3e3,className:r="",type:n=b.UNFIXED,onClose:i=()=>{},entry:o=""})=>{try{if(!l.ConfigManager.getConfig(f.ConfigKey.ENABLE_WEAK_ERROR_INFO)){return null}g.info("toast",o,"start",t,r,n);this.addContainerDom(o);const a=new S({type:n,className:r,timeOut:t,content:e,onClose:i,entry:o});this.addToastShowList(a);return a}catch(e){g.error(o,t,r,n,e);return null}};this.domNode=undefined;this.root=undefined;this.toastShowList=[]}));const w=new E;const T=t.toast=w.toast;let I=null;let R;const C=({content:e="no text!",clickText:t="",handleClick:r=()=>{},timeOut:i=3e3,onClose:o=()=>{}})=>w.toast({content:(0,n.jsx)(s.default,{content:e,clickText:t,handleClick:r}),timeOut:i,type:b.FIXED,onClose:o});const k=e=>{g.info("wsRetryToastHide",e,I);if(!I){return}I.hide();I=null;R=false};t.wsRetryToastHide=k;const A=({handleClick:e},t)=>{const{language:r}=(0,c.$getState)().lang;g.info("wsRetryToastShow",t,R);if(R){return}R=true;I=C({content:`${r.webSocketOpenFailed},`,clickText:r.clickToCeconnect,handleClick:()=>{g.info("handleClick",t);e===null||e===void 0?void 0:e();k("handleClick")},onClose:()=>{g.info("onClose",t);I=null;R=false}})};t.wsRetryToastShow=A},89907:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("anchor")},{anchor:function e(t){return i(this,"a","name",t)}})},89955:(e,t,r)=>{"use strict";var n=r(94644);var i=r(59213).findIndex;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("findIndex",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},90019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);r(87029);var i=r(69733);var o=l(r(32365));var a=r(44772);var s=l(r(75540));var u=l(r(95125));var c=r(44104);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=v(e,"string");return"symbol"==typeof t?t:t+""}function v(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,r){return t=_(t),y(e,b()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const T=new c.Log({module:"MainPage"});let I=function(e){function t(){var e;f(this,t);e=m(this,t,arguments);e._pageName="MainPage";return e}S(t,e);return h(t,[{key:"render",value:function e(){const{showLoading:t}=this.props;return(0,n.jsxs)("div",{className:"main-page",onContextMenu:this.dealContextMenu,children:[t?(0,n.jsx)(o.default,{}):(0,n.jsx)("div",{className:"main-page-container",children:(0,n.jsx)(u.default,{})}),(0,n.jsx)("div",{className:"remote-container",children:(0,n.jsx)("div",{style:{visibility:t?"hidden":"visible"},id:"remoteContainer"})})]})}},{key:"dealContextMenu",value:function e(t){T.info("dealContextMenu",t.currentTarget.className||t.currentTarget.tagName);t.preventDefault()}}])}(s.default);I=w([(0,a.componentDecorator)(T)],I);const R=e=>({showLoading:e.main.showLoading});var C=t["default"]=(0,i.connect)(R)(I)},90108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPointByUrl=t.PointCircle=void 0;var n=r(74848);r(30560);var i=r(44104);const o=new i.Log({module:"UI.PointCircle"});const a=e=>{const t=e.size||20;const r={left:e.left-t/2,top:e.top-t/2,width:t,height:t};if(e.left>0&&e.top>0){return(0,n.jsx)("div",{className:"point-circle",style:r})}return null};t.PointCircle=a;let s="";const u=e=>{const{url:t,imageWidth:r,imageHeight:n}=e;try{const e=r/800;const i=new URL(t);const a=Number(i.searchParams.get("xtip"));const u=Number(i.searchParams.get("ytip"));if(s!==JSON.stringify([r,a,u,t])){o.info("getPointByUrl",r,a,u,t);s=JSON.stringify([r,a,u,t])}if(isNaN(a)||isNaN(u)){return{pointX:0,pointY:0}}const c={pointX:a*e,pointY:u*e};if(c.pointX>0&&c.pointX<r&&c.pointY>0&&c.pointY<n){return c}return{pointX:0,pointY:0}}catch(e){o.error("getPointByUrl",t,e);return{pointX:0,pointY:0}}};t.getPointByUrl=u},90157:(e,t,r)=>{const n=r(56886);const i=r(49953);const o=r(99899);const a=r(8820);const s=r(6421);const u=r(7756);const c=r(81332);const l=r(97518);const f=r(74764);const d=r(31427);const h=r(84565);const p=r(30208);const v=r(29801);function m(e,t){const r=e.size;const n=u.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0];const o=n[t][1];for(let t=-1;t<=7;t++){if(i+t<=-1||r<=i+t)continue;for(let n=-1;n<=7;n++){if(o+n<=-1||r<=o+n)continue;if(t>=0&&t<=6&&(n===0||n===6)||n>=0&&n<=6&&(t===0||t===6)||t>=2&&t<=4&&n>=2&&n<=4){e.set(i+t,o+n,true,true)}else{e.set(i+t,o+n,false,true)}}}}}function y(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2===0;e.set(r,6,t,true);e.set(6,r,t,true)}}function g(e,t){const r=s.getPositions(t);for(let t=0;t<r.length;t++){const n=r[t][0];const i=r[t][1];for(let t=-2;t<=2;t++){for(let r=-2;r<=2;r++){if(t===-2||t===2||r===-2||r===2||t===0&&r===0){e.set(n+t,i+r,true,true)}else{e.set(n+t,i+r,false,true)}}}}}function b(e,t){const r=e.size;const n=d.getEncodedBits(t);let i,o,a;for(let t=0;t<18;t++){i=Math.floor(t/3);o=t%3+r-8-3;a=(n>>t&1)===1;e.set(i,o,a,true);e.set(o,i,a,true)}}function _(e,t,r){const n=e.size;const i=h.getEncodedBits(t,r);let o,a;for(o=0;o<15;o++){a=(i>>o&1)===1;if(o<6){e.set(o,8,a,true)}else if(o<8){e.set(o+1,8,a,true)}else{e.set(n-15+o,8,a,true)}if(o<8){e.set(8,n-o-1,a,true)}else if(o<9){e.set(8,15-o-1+1,a,true)}else{e.set(8,15-o-1,a,true)}}e.set(n-8,8,1,true)}function S(e,t){const r=e.size;let n=-1;let i=r-1;let o=7;let a=0;for(let s=r-1;s>0;s-=2){if(s===6)s--;while(true){for(let r=0;r<2;r++){if(!e.isReserved(i,s-r)){let n=false;if(a<t.length){n=(t[a]>>>o&1)===1}e.set(i,s-r,n);o--;if(o===-1){a++;o=7}}}i+=n;if(i<0||r<=i){i-=n;n=-n;break}}}}function E(e,t,r){const i=new o;r.forEach((function(t){i.put(t.mode.bit,4);i.put(t.getLength(),p.getCharCountIndicator(t.mode,e));t.write(i)}));const a=n.getSymbolTotalCodewords(e);const s=l.getTotalCodewordsCount(e,t);const u=(a-s)*8;if(i.getLengthInBits()+4<=u){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const c=(u-i.getLengthInBits())/8;for(let e=0;e<c;e++){i.put(e%2?17:236,8)}return w(i,e,t)}function w(e,t,r){const i=n.getSymbolTotalCodewords(t);const o=l.getTotalCodewordsCount(t,r);const a=i-o;const s=l.getBlocksCount(t,r);const u=i%s;const c=s-u;const d=Math.floor(i/s);const h=Math.floor(a/s);const p=h+1;const v=d-h;const m=new f(v);let y=0;const g=new Array(s);const b=new Array(s);let _=0;const S=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<c?h:p;g[e]=S.slice(y,y+t);b[e]=m.encode(g[e]);y+=t;_=Math.max(_,t)}const E=new Uint8Array(i);let w=0;let T,I;for(T=0;T<_;T++){for(I=0;I<s;I++){if(T<g[I].length){E[w++]=g[I][T]}}}for(T=0;T<v;T++){for(I=0;I<s;I++){E[w++]=b[I][T]}}return E}function T(e,t,r,i){let o;if(Array.isArray(e)){o=v.fromArray(e)}else if(typeof e==="string"){let n=t;if(!n){const t=v.rawSplit(e);n=d.getBestVersionForData(t,r)}o=v.fromString(e,n||40)}else{throw new Error("Invalid data")}const s=d.getBestVersionForData(o,r);if(!s){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!t){t=s}else if(t<s){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+s+".\n")}const u=E(t,r,o);const l=n.getSymbolSize(t);const f=new a(l);m(f,t);y(f);g(f,t);_(f,r,0);if(t>=7){b(f,t)}S(f,u);if(isNaN(i)){i=c.getBestMask(f,_.bind(null,f,r))}c.applyMask(i,f);_(f,r,i);return{modules:f,version:t,errorCorrectionLevel:r,maskPattern:i,segments:o}}t.create=function e(t,r){if(typeof t==="undefined"||t===""){throw new Error("No input text")}let o=i.M;let a;let s;if(typeof r!=="undefined"){o=i.from(r.errorCorrectionLevel,i.M);a=d.from(r.version);s=c.from(r.maskPattern);if(r.toSJISFunc){n.setToSJISFunction(r.toSJISFunc)}}return T(t,a,o,s)}},90228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HttpRequestManager=void 0;var n=r(75625);var i=r(44086);var o=r(44104);var a=r(44772);var s=u(r(19760));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const v=new o.Log({module:"HttpRequestManager"});let m=t.HttpRequestManager=function(){function e(){c(this,e)}return f(e,null,[{key:"doPost",value:async function t(r){const n=await s.default.post(r.url,r.data,r.config);return e.dealHttpResult({entry:r.entry,result:n,url:r.url,showErrorTips:r.showErrorTips})}},{key:"doGet",value:async function t(r){const n=await s.default.get(r.url,r.config);return e.dealHttpResult({entry:r.entry,result:n,url:r.url,showErrorTips:r.showErrorTips})}},{key:"doPut",value:async function t(r){const n=await s.default.put(r.url,r.data,r.config);return e.dealHttpResult({entry:r.entry,result:n,url:r.url,showErrorTips:r.showErrorTips})}},{key:"dealHttpResult",value:function t({entry:r,result:n,url:i,showErrorTips:o=true}){r+=",dealResult";v.debug(r,n);if(e.dealDataErrorInfo({result:n,url:i,entry:r,showErrorTips:o})){return null}if(e.dealErrorData({result:n,url:i,entry:r,showErrorTips:o})){return null}if(e.dealNormalErrorData({result:n,url:i,entry:r,showErrorTips:o})){return null}if(e.dealHttpCodeError({result:n,url:i,entry:r,showErrorTips:o})){return null}return n.data}}])}();m.dealHttpCodeError=({result:e,url:t,entry:r,showErrorTips:o})=>{if(e.status&&e.status!==n.HttpCodes.OK){(0,i.dealHttpError)({url:t,error:{error_code:e.status.toString(),error_msg:e.statusText,request_id:e===null||e===void 0?void 0:e.headers["x-request-id"]},entry:r,showErrorTips:o});return true}return false};m.dealDataErrorInfo=({result:e,url:t,entry:r,showErrorTips:o})=>{var a,s,u;if((a=e.data)!==null&&a!==void 0&&(s=a.error_info)!==null&&s!==void 0&&s.error_code&&((u=e.data.error_info)===null||u===void 0?void 0:u.error_code)!==n.MPSRetCodes.SUCCESS){e.data.error_info.request_id=e.headers["x-request-id"];(0,i.dealHttpError)({url:t,error:e.data.error_info,entry:r,showErrorTips:o});return true}return false};m.dealErrorData=({result:e,url:t,entry:r,showErrorTips:o})=>{var a,s;if((a=e.data)!==null&&a!==void 0&&a.error_code&&((s=e.data)===null||s===void 0?void 0:s.error_code)!==n.RetCodes.SUCCESS){(0,i.dealHttpError)({url:t,error:e.data,entry:r,showErrorTips:o});return true}return false};m.dealNormalErrorData=({result:e,url:t,entry:r,showErrorTips:o})=>{if(e.error){var a,s;let u=e.error.code;if(!u&&!e.error.response){u=n.HttpCodes.NO_RESP.toString()}(0,i.dealHttpError)({url:t,error:{error_code:u,error_msg:e.error.message,request_id:(a=e.error)===null||a===void 0?void 0:(s=a.config)===null||s===void 0?void 0:s.headers["x-request-id"]},entry:r,showErrorTips:o});return true}return false};p([(0,a.printfDecorator)(v)],m,"dealHttpResult",null)},90235:(e,t,r)=>{"use strict";var n=r(59213).forEach;var i=r(34598);var o=i("forEach");e.exports=!o?function e(t){return n(this,t,arguments.length>1?arguments[1]:undefined)}:[].forEach},90394:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.mergeByDay=void 0;var t=e.mergeByDay=function e(t,r){if(t<0||r<0){return false}if(!Number.isInteger(t)||!Number.isInteger(r)){return false}var n=new Date(t);var i=new Date(r);return!(n.getFullYear()!==i.getFullYear()||n.getMonth()!==i.getMonth()||n.getDate()!==i.getDate())}}))},90537:(e,t,r)=>{"use strict";var n=r(80550);var i=r(84428);var o=r(10916).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(undefined,(function(){}))}))},90679:(e,t,r)=>{"use strict";var n=r(1625);var i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},90744:(e,t,r)=>{"use strict";var n=r(69565);var i=r(79504);var o=r(89228);var a=r(28551);var s=r(20034);var u=r(67750);var c=r(2293);var l=r(57829);var f=r(18014);var d=r(655);var h=r(55966);var p=r(56682);var v=r(58429);var m=r(79039);var y=v.UNSUPPORTED_Y;var g=4294967295;var b=Math.min;var _=i([].push);var S=i("".slice);var E=!m((function(){var e=/(?:)/;var t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"}));var w="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;o("split",(function(e,t,r){var i="0".split(undefined,0).length?function(e,r){return e===undefined&&r===0?[]:n(t,this,e,r)}:t;return[function t(r,o){var a=u(this);var c=s(r)?h(r,e):undefined;return c?n(c,r,a,o):n(i,d(a),r,o)},function(e,n){var o=a(this);var s=d(e);if(!w){var u=r(i,o,s,n,i!==t);if(u.done)return u.value}var h=c(o,RegExp);var v=o.unicode;var m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(y?"g":"y");var E=new h(y?"^(?:"+o.source+")":o,m);var T=n===undefined?g:n>>>0;if(T===0)return[];if(s.length===0)return p(E,s)===null?[s]:[];var I=0;var R=0;var C=[];while(R<s.length){E.lastIndex=y?0:R;var k=p(E,y?S(s,R):s);var A;if(k===null||(A=b(f(E.lastIndex+(y?R:0)),s.length))===I){R=l(s,R,v)}else{_(C,S(s,I,R));if(C.length===T)return C;for(var O=1;O<=k.length-1;O++){_(C,k[O]);if(C.length===T)return C}R=I=A}}_(C,S(s,I));return C}]}),w||!E,y)},90757:e=>{"use strict";e.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch(e){}}},90906:(e,t,r)=>{"use strict";r(27495);var n=r(46518);var i=r(69565);var o=r(94901);var a=r(28551);var s=r(655);var u=function(){var e=false;var t=/[ac]/;t.exec=function(){e=true;return/./.exec.apply(this,arguments)};return t.test("abc")===true&&e}();var c=/./.test;n({target:"RegExp",proto:true,forced:!u},{test:function(e){var t=a(this);var r=s(e);var n=t.exec;if(!o(n))return i(c,t,r);var u=i(n,t,r);if(u===null)return false;a(u);return true}})},91100:e=>{e.exports={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf){return e.indexOf(t)}for(r=0,n=e.length;r<n;r++){if(e[r]===t){return r}}return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach){return e.forEach(t,r)}for(n=0,i=e.length;n<i;n++){t.call(r,e[n],n,e)}},trim:function(e){if(String.prototype.trim){return e.trim()}return e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){if(String.prototype.trimRight){return e.trimRight()}return e.replace(/(\s*$)/g,"")}}},91134:(e,t,r)=>{"use strict";var n=r(94644);var i=r(43839).findLastIndex;var o=n.aTypedArray;var a=n.exportTypedArrayMethod;a("findLastIndex",(function e(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined)}))},91181:(e,t,r)=>{"use strict";var n=r(58622);var i=r(44576);var o=r(20034);var a=r(66699);var s=r(39297);var u=r(77629);var c=r(66119);var l=r(30421);var f="Object already initialized";var d=i.TypeError;var h=i.WeakMap;var p,v,m;var y=function(e){return m(e)?v(e):p(e,{})};var g=function(e){return function(t){var r;if(!o(t)||(r=v(t)).type!==e){throw new d("Incompatible receiver, "+e+" required")}return r}};if(n||u.state){var b=u.state||(u.state=new h);b.get=b.get;b.has=b.has;b.set=b.set;p=function(e,t){if(b.has(e))throw new d(f);t.facade=e;b.set(e,t);return t};v=function(e){return b.get(e)||{}};m=function(e){return b.has(e)}}else{var _=c("state");l[_]=true;p=function(e,t){if(s(e,_))throw new d(f);t.facade=e;a(e,_,t);return t};v=function(e){return s(e,_)?e[_]:{}};m=function(e){return s(e,_)}}e.exports={set:p,get:v,has:m,enforce:y,getterFor:g}},91191:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(91291);var a=Date.prototype;var s=i(a.getTime);var u=i(a.setFullYear);n({target:"Date",proto:true},{setYear:function e(t){s(this);var r=o(t);var n=r>=0&&r<=99?r+1900:r;return u(this,n)}})},91291:(e,t,r)=>{"use strict";var n=r(80741);e.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}},91296:(e,t,r)=>{"use strict";var n=r(4495);e.exports=n&&!!Symbol["for"]&&!!Symbol.keyFor},91333:e=>{e.exports=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then}},91590:(e,t,r)=>{"use strict";r.r(t)},91606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JobManager=void 0;var n=r(94855);var i=r(65268);var o=r(44104);var a=r(44246);var s=r(44772);var u=r(39595);var c=m(r(19760));var l=r(75625);var f=r(11686);var d=r(46677);var h=r(90228);var p=r(19993);var v=m(r(86425));function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function E(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function w(e){var t=T(e,"string");return"symbol"==typeof t?t:t+""}function T(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const R=new o.Log({module:"JobManager"});let C=v.default.CancelToken.source();let k=t.JobManager=function(){function e(){_(this,e)}return E(e,null,[{key:"checkJobAlive",value:async function t(r){const n=await e.getJobState({entry:r});return!n||[i.JOB_STATE.WAITING,i.JOB_STATE.PROCESSING].includes(n)}},{key:"checkJobTimeout",value:async function t(r){var o;r+=", checkJobTimeout";const a=((o=n.ConfigManager.getChatInfo(r))===null||o===void 0?void 0:o.job_id)||"";if(a){const t=await e.getChatJobState({entry:r,jobId:a});return(t===null||t===void 0?void 0:t.state)===i.JOB_STATE.SUCCEED&&t.job_finish_reason===i.JOB_SUCCEED_REASON.MUTE_TIMEOUT}return false}},{key:"checkJobEnd",value:async function t(r){let n=r.state;if(!n){n=await e.getJobState({entry:r.entry})}return!!n&&[i.JOB_STATE.SUCCEED,i.JOB_STATE.FAILED,i.JOB_STATE.CANCELED,i.JOB_STATE.IDLE].includes(n)}},{key:"getJobState",value:async function t({jobId:r,entry:i}){if(!r){var o;r=((o=n.ConfigManager.getChatInfo(i))===null||o===void 0?void 0:o.job_id)||""}if(!r){return undefined}const a=await e.getChatJobState({entry:i,jobId:r});R.info("getJobState",a===null||a===void 0?void 0:a.state);return a===null||a===void 0?void 0:a.state}},{key:"stopChatJob",value:async function t({jobId:r,entry:i}){var o;i+=",stopChatJob";if(!r){return}await h.HttpRequestManager.doPost({url:l.BaseUrl.POST_STOP_SMART_CHAT_JOBS.replace("{job_id}",r),config:{headers:{[l.HttpHeaders.AUTH_TOKEN]:((o=n.ConfigManager.getAuthInfo(i))===null||o===void 0?void 0:o.access_token)||""}},entry:i});const{dealMakeSureFunc:a}=s.PromiseUtil.makeSure({fn:e.getJobState,condition:(t,r)=>{R.debug("condition",t,r);return e.checkJobEnd({state:r,entry:t})},delay:2e3,retryCount:6});await a({entry:i,jobId:r})}},{key:"getChatJobState",value:async function t({jobId:r,entry:i}){var o;i+=",getChatJobState";const a=(o=n.ConfigManager.getAuthInfo(i))===null||o===void 0?void 0:o.access_token;if(!a){return null}const s=await c.default.get(l.BaseUrl.GET_SMART_CHAT_JOBS_STATE.replace("{job_id}",r),{headers:{[l.HttpHeaders.AUTH_TOKEN]:a},cancelToken:C.token});const f=s===null||s===void 0?void 0:s.data;if(!f){return f}return g(g(g({},f),e.convertLanguage({languageList:f===null||f===void 0?void 0:f.voice_config_list,defaultLanguage:f===null||f===void 0?void 0:f.default_language})),{},{enableVadInterrupt:n.ConfigManager.getConfig(u.ConfigKey.ENABLE_VAD_INTERRUPT)})}},{key:"stopChatJobState",value:function e(t){t+=",stopChatJobState";R.info("stopChatJobState");C.cancel(t);C=v.default.CancelToken.source()}},{key:"startChatJob",value:async function t({entry:r}){var i;r+=",startChatJob";R.info("startChatJob",r);const o=await e.getReuseJobInfo(r);R.info("startChatJob isReuseJobInfo",!!o);if(o){return o}let d=n.ConfigManager.getExtendParamStr();const v=n.ConfigManager.getConfig(u.ConfigKey.ENABLE_VAD_INTERRUPT);if((0,s.formatType)(s.StringUtil.safeJSONParse(d))!==s.formatType.OBJECT){d=null}if(v){if(d){const e=JSON.parse(d);e.enable_vad_interrupt="1";d=JSON.stringify(e)}else{d=JSON.stringify({enable_vad_interrupt:"1"})}}const m=await c.default.post(l.BaseUrl.POST_START_SMART_CHAT_JOBS,{extend_param:d},{headers:{[l.HttpHeaders.AUTH_TOKEN]:((i=n.ConfigManager.getAuthInfo(r))===null||i===void 0?void 0:i.access_token)||""}});if(!(m!==null&&m!==void 0&&m.data)||(0,s.formatType)(m===null||m===void 0?void 0:m.data)!==s.formatType.OBJECT){p.PrivateNotifyManager.sendRejoinRobotEvent({method:f.InnerICSEventMethod.WAIT_REJOIN,entry:"startchatjob axios failed"});return null}let y=h.HttpRequestManager.dealHttpResult({entry:r,result:m,url:l.BaseUrl.POST_START_SMART_CHAT_JOBS});if(y){y=g(g(g({},y),e.convertLanguage({languageList:y.voice_config_list,defaultLanguage:y.default_language})),{},{enableVadInterrupt:n.ConfigManager.getConfig(u.ConfigKey.ENABLE_VAD_INTERRUPT)});await a.HWIcsElectron.saveChatInfo(y,r)}return y}},{key:"convertLanguage",value:function e({languageList:t,defaultLanguage:r}){const n={};if(r){n.default_language=d.Ics2WebclientLanguage[r]||r}if(t){n.voice_config_list=t.map((e=>g(g({},e),{},{language:d.Ics2WebclientLanguage[e.language]||e.language})))}return n}},{key:"getReuseJobInfo",value:async function t(r){r+=",getReuseJobInfo";const o=await e.getCacheJobInfo({entry:r});const s=o===null||o===void 0?void 0:o.job_id;if(s){if(!n.ConfigManager.getConfig(u.ConfigKey.ENABLE_JOB_CACHE)){await e.stopChatJob({entry:r,jobId:s});return null}const t=await e.getChatJobState({entry:r,jobId:s});if(t&&[i.JOB_STATE.WAITING,i.JOB_STATE.PROCESSING].includes(t.state)&&t.is_pool_mode!==true){R.info("startChatJob","curr job is running, use it");await a.HWIcsElectron.saveChatInfo(t,r);return g(g({},t),{},{chat_subtitle_config:o===null||o===void 0?void 0:o.chat_subtitle_config,video_config:o===null||o===void 0?void 0:o.video_config,isReuse:true})}}return null}},{key:"getCacheJobInfo",value:async function e({entry:t}){t+=",getCacheJobInfo";try{const e=await a.HWIcsElectron.queryChatInfo(t);if((e===null||e===void 0?void 0:e.cacheRobotId)===n.ConfigManager.getRobotId(t)&&(e===null||e===void 0?void 0:e.enableVadInterrupt)===n.ConfigManager.getConfig(u.ConfigKey.ENABLE_VAD_INTERRUPT)){return e}return{}}catch(e){R.error("getCacheJobInfo",t,e);return{}}}}])}();I([(0,s.printfDecorator)(R)],k,"stopChatJob",null);I([(0,s.printfDecorator)(R)],k,"getChatJobState",null);I([(0,s.printfDecorator)(R)],k,"stopChatJobState",null);I([(0,s.printfDecorator)(R)],k,"startChatJob",null);I([(0,s.printfDecorator)(R)],k,"convertLanguage",null);I([(0,s.printfDecorator)(R)],k,"getReuseJobInfo",null);I([(0,s.printfDecorator)(R)],k,"getCacheJobInfo",null)},91625:(e,t,r)=>{"use strict";var n=r(79504);var i=r(56279);var o=r(3451).getWeakData;var a=r(90679);var s=r(28551);var u=r(64117);var c=r(20034);var l=r(72652);var f=r(59213);var d=r(39297);var h=r(91181);var p=h.set;var v=h.getterFor;var m=f.find;var y=f.findIndex;var g=n([].splice);var b=0;var _=function(e){return e.frozen||(e.frozen=new S)};var S=function(){this.entries=[]};var E=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};S.prototype={get:function(e){var t=E(this,e);if(t)return t[1]},has:function(e){return!!E(this,e)},set:function(e,t){var r=E(this,e);if(r)r[1]=t;else this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));if(~t)g(this.entries,t,1);return!!~t}};e.exports={getConstructor:function(e,t,r,n){var f=e((function(e,i){a(e,h);p(e,{type:t,id:b++,frozen:null});if(!u(i))l(i,e[n],{that:e,AS_ENTRIES:r})}));var h=f.prototype;var m=v(t);var y=function(e,t,r){var n=m(e);var i=o(s(t),true);if(i===true)_(n).set(t,r);else i[n.id]=r;return e};i(h,{delete:function(e){var t=m(this);if(!c(e))return false;var r=o(e);if(r===true)return _(t)["delete"](e);return r&&d(r,t.id)&&delete r[t.id]},has:function e(t){var r=m(this);if(!c(t))return false;var n=o(t);if(n===true)return _(r).has(t);return n&&d(n,r.id)}});i(h,r?{get:function e(t){var r=m(this);if(c(t)){var n=o(t);if(n===true)return _(r).get(t);if(n)return n[r.id]}},set:function e(t,r){return y(this,t,r)}}:{add:function e(t){return y(this,t,true)}});return f}}},91725:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(96540),r(31550),r(44772),r(40961),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;r=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return t=p(t),f(e,h()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==typeof t?t:t+""}function b(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let _=e.default=function(e){function t(){s(this,t);return l(this,t,arguments)}v(t,e);return c(t,[{key:"render",value:function e(){const{title:t,content:a,footer:s,getContainer:u,visible:c,transitionName:l,width:f,maskTransitionName:d,mask:h,zIndex:p,maskClosable:v,keyboard:m,onClose:y}=this.props;if(!c){return null}let g="meta-modal";if((0,n.formatType)(a)===n.formatType.STRING){g+="-text"}return(0,i.createPortal)((0,o.jsx)("div",{children:(0,o.jsx)(r.default,{transitionName:l||"zoom",closable:false,title:t,getContainer:u||false,footer:s,visible:c,closeIcon:null,width:f,maskTransitionName:d||"fade",mask:h,zIndex:p,maskClosable:v,prefixCls:g,keyboard:m,onClose:y,children:(0,n.formatType)(a)===n.formatType.STRING?(0,o.jsx)("span",{className:"meta-modal-body-content",title:a,children:a}):a})}),document.body)}}])}(t.Component);y(_,"defaultProps",{getContainer:()=>document.body,mask:true,maskClosable:false,maskStyle:null,title:"",keyboard:false,visible:false});y(_,"confirm",void 0);y(_,"destroyAll",void 0);y(_,"showModalView",void 0)}))},91752:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getArrayBufferWorkerUrl=void 0;var t="\nconst inputCodecs = {\n Int8: 128,\n Int16: 32768,\n Int32: 2147483648,\n Float32: 1,\n};\n\nconst typedArrays = {\n Int8: Int8Array,\n Int16: Int16Array,\n Int32: Int32Array,\n Float32: Float32Array,\n};\n\nconst base64ToUint8Array = (base64Data) => {\n try {\n const binary = atob(base64Data);\n return Uint8Array.from(binary, c => c.charCodeAt(0));\n } catch (e) {\n console.error('base64ToUint8Array error', e);\n return undefined;\n }\n}\n\nconst checkSilence = (dataArray) => {\n if(!dataArray) {\n return true;\n }\n for (let i = 0; i < dataArray?.length; i++) {\n if (Math.abs(dataArray[i]) > 3) {\n return false;\n }\n }\n return true;\n}\n\nconst typedArrayToFloat32 = ({arrayBuffer, codecs}) => {\n try {\n const convertValue = inputCodecs[codecs];\n // 转Float32Array\n let newData = new typedArrays[codecs](arrayBuffer.buffer);\n \n const float32 = new Float32Array(newData.length);\n \n for (let i = 0; i < newData.length; i++) {\n // buffer 缓冲区的数据,需要是IEEE754 里32位的线性PCM,范围从-1到+1\n // 所以对数据进行除法\n // 除以对应的位数范围,得到-1到+1的数据\n float32[i] = newData[i] / convertValue;\n }\n \n return float32;\n } catch (e) {\n console.error('typedArrayToFloat32 error', e);\n return undefined;\n }\n}\nclass ArrayBufferWorker {\n static eventListener(e) {\n const { data } = e;\n let result = null;\n switch(data.method) {\n case 'base64ToUint8Array': \n result = base64ToUint8Array(data.data);\n if(checkSilence(result)) {\n result = null;\n }\n break;\n case 'typedArrayToFloat32': \n result = typedArrayToFloat32(data.data);\n break;\n default: break;\n }\n postMessage({\n res: result,\n sno: data.sno\n });\n }\n}\n\naddEventListener('message', ArrayBufferWorker.eventListener);\n";var r=e.getArrayBufferWorkerUrl=function e(){return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}}))},91955:(e,t,r)=>{"use strict";var n=r(44576);var i=r(93389);var o=r(76080);var a=r(59225).set;var s=r(18265);var u=r(89544);var c=r(44265);var l=r(7860);var f=r(38574);var d=n.MutationObserver||n.WebKitMutationObserver;var h=n.document;var p=n.process;var v=n.Promise;var m=i("queueMicrotask");var y,g,b,_,S;if(!m){var E=new s;var w=function(){var e,t;if(f&&(e=p.domain))e.exit();while(t=E.get())try{t()}catch(e){if(E.head)y();throw e}if(e)e.enter()};if(!u&&!f&&!l&&d&&h){g=true;b=h.createTextNode("");new d(w).observe(b,{characterData:true});y=function(){b.data=g=!g}}else if(!c&&v&&v.resolve){_=v.resolve(undefined);_.constructor=v;S=o(_.then,_);y=function(){S(w)}}else if(f){y=function(){p.nextTick(w)}}else{a=o(a,n);y=function(){a(w)}}m=function(e){if(!E.head)y();E.add(e)}}e.exports=m},92140:(e,t,r)=>{"use strict";var n=r(78227);var i=n("toStringTag");var o={};o[i]="z";e.exports=String(o)==="[object z]"},92168:(e,t,r)=>{"use strict";var n=r(70511);n("isConcatSpreadable")},92224:(e,t,r)=>{"use strict";function n(e,t,r,n){var o=i(_(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=o(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},i.apply(null,arguments)}function o(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_(e)););return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t,r){return t=_(t),d(e,y()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,r))}function d(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function v(e){var t="function"==typeof Map?new Map:void 0;return v=function(e){if(null===e||!g(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return m(e,arguments,_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),b(r,e)},v(e)}function m(e,t,r){if(y())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&b(i,r.prototype),i}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}!function(t,r){true?e.exports=r():0}(void 0,(function(){function e(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}function o(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof r.g?r.g:"undefined"!=typeof self?self:{};function l(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var d=function(e){return e&&e.Math==Math&&e},m=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof c&&c)||function(){return this}()||Function("return this")(),y={},g=function(e){try{return!!e()}catch(e){return!0}},b=!g((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_=!g((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),S=_,E=Function.prototype.call,w=S?E.bind(E):function(){return E.apply(E,arguments)},T={},I={}.propertyIsEnumerable,R=Object.getOwnPropertyDescriptor,C=R&&!I.call({1:2},1);T.f=C?function(e){var t=R(this,e);return!!t&&t.enumerable}:I;var k,A,O=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},P=_,x=Function.prototype,L=x.bind,M=x.call,N=P&&L.bind(M,M),D=P?function(e){return e&&N(e)}:function(e){return e&&function(){return M.apply(e,arguments)}},j=D,U=j({}.toString),V=j("".slice),W=function(e){return V(U(e),8,-1)},B=g,G=W,Z=Object,F=D("".split),H=B((function(){return!Z("z").propertyIsEnumerable(0)}))?function(e){return"String"==G(e)?F(e,""):Z(e)}:Z,X=TypeError,Y=function(e){if(null==e)throw X("Can't call method on "+e);return e},K=H,z=Y,J=function(e){return K(z(e))},Q=function(e){return"function"==typeof e},q=Q,$=function(e){return"object"==typeof e?null!==e:q(e)},ee=m,te=Q,re=function(e,t){return arguments.length<2?(r=ee[e],te(r)?r:void 0):ee[e]&&ee[e][t];var r},ne=D({}.isPrototypeOf),ie=re("navigator","userAgent")||"",oe=m,ae=ie,se=oe.process,ue=oe.Deno,ce=se&&se.versions||ue&&ue.version,le=ce&&ce.v8;le&&(A=(k=le.split("."))[0]>0&&k[0]<4?1:+(k[0]+k[1])),!A&&ae&&(!(k=ae.match(/Edge\/(\d+)/))||k[1]>=74)&&(k=ae.match(/Chrome\/(\d+)/))&&(A=+k[1]);var fe=A,de=fe,he=g,pe=!!Object.getOwnPropertySymbols&&!he((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&de&&de<41})),ve=pe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,me=re,ye=Q,ge=ne,be=Object,_e=ve?function(e){return"symbol"==typeof e}:function(e){var t=me("Symbol");return ye(t)&&ge(t.prototype,be(e))},Se=String,Ee=function(e){try{return Se(e)}catch(e){return"Object"}},we=Q,Te=Ee,Ie=TypeError,Re=function(e){if(we(e))return e;throw Ie(Te(e)+" is not a function")},Ce=Re,ke=function(e,t){var r=e[t];return null==r?void 0:Ce(r)},Ae=w,Oe=Q,Pe=$,xe=TypeError,Le={exports:{}},Me=m,Ne=Object.defineProperty,De=function(e,t){try{Ne(Me,e,{value:t,configurable:!0,writable:!0})}catch(r){Me[e]=t}return t},je=De,Ue="__core-js_shared__",Ve=m[Ue]||je(Ue,{}),We=Ve;(Le.exports=function(e,t){return We[e]||(We[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"});var Be=Y,Ge=Object,Ze=function(e){return Ge(Be(e))},Fe=Ze,He=D({}.hasOwnProperty),Xe=Object.hasOwn||function(e,t){return He(Fe(e),t)},Ye=D,Ke=0,ze=Math.random(),Je=Ye(1..toString),Qe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Je(++Ke+ze,36)},qe=m,$e=Le.exports,et=Xe,tt=Qe,rt=pe,nt=ve,it=$e("wks"),ot=qe.Symbol,at=ot&&ot.for,st=nt?ot:ot&&ot.withoutSetter||tt,ut=function(e){if(!et(it,e)||!rt&&"string"!=typeof it[e]){var t="Symbol."+e;rt&&et(ot,e)?it[e]=ot[e]:it[e]=nt&&at?at(t):st(t)}return it[e]},ct=w,lt=$,ft=_e,dt=ke,ht=function(e,t){var r,n;if("string"===t&&Oe(r=e.toString)&&!Pe(n=Ae(r,e)))return n;if(Oe(r=e.valueOf)&&!Pe(n=Ae(r,e)))return n;if("string"!==t&&Oe(r=e.toString)&&!Pe(n=Ae(r,e)))return n;throw xe("Can't convert object to primitive value")},pt=TypeError,vt=ut("toPrimitive"),mt=function(e,t){if(!lt(e)||ft(e))return e;var r,n=dt(e,vt);if(n){if(void 0===t&&(t="default"),r=ct(n,e,t),!lt(r)||ft(r))return r;throw pt("Can't convert object to primitive value")}return void 0===t&&(t="number"),ht(e,t)},yt=mt,gt=_e,bt=function(e){var t=yt(e,"string");return gt(t)?t:t+""},_t=$,St=m.document,Et=_t(St)&&_t(St.createElement),wt=function(e){return Et?St.createElement(e):{}},Tt=wt,It=!b&&!g((function(){return 7!=Object.defineProperty(Tt("div"),"a",{get:function(){return 7}}).a})),Rt=b,Ct=w,kt=T,At=O,Ot=J,Pt=bt,xt=Xe,Lt=It,Mt=Object.getOwnPropertyDescriptor;y.f=Rt?Mt:function(e,t){if(e=Ot(e),t=Pt(t),Lt)try{return Mt(e,t)}catch(e){}if(xt(e,t))return At(!Ct(kt.f,e,t),e[t])};var Nt={},Dt=b&&g((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),jt=$,Ut=String,Vt=TypeError,Wt=function(e){if(jt(e))return e;throw Vt(Ut(e)+" is not an object")},Bt=b,Gt=It,Zt=Dt,Ft=Wt,Ht=bt,Xt=TypeError,Yt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,zt="enumerable",Jt="configurable",Qt="writable";Nt.f=Bt?Zt?function(e,t,r){if(Ft(e),t=Ht(t),Ft(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Qt in r&&!r[Qt]){var n=Kt(e,t);n&&n[Qt]&&(e[t]=r.value,r={configurable:Jt in r?r[Jt]:n[Jt],enumerable:zt in r?r[zt]:n[zt],writable:!1})}return Yt(e,t,r)}:Yt:function(e,t,r){if(Ft(e),t=Ht(t),Ft(r),Gt)try{return Yt(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Xt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var qt=Nt,$t=O,er=b?function(e,t,r){return qt.f(e,t,$t(1,r))}:function(e,t,r){return e[t]=r,e},tr={exports:{}},rr=b,nr=Xe,ir=Function.prototype,or=rr&&Object.getOwnPropertyDescriptor,ar=nr(ir,"name"),sr={EXISTS:ar,PROPER:ar&&"something"===function(){}.name,CONFIGURABLE:ar&&(!rr||rr&&or(ir,"name").configurable)},ur=Q,cr=Ve,lr=D(Function.toString);ur(cr.inspectSource)||(cr.inspectSource=function(e){return lr(e)});var fr,dr,hr,pr=cr.inspectSource,vr=Q,mr=pr,yr=m.WeakMap,gr=vr(yr)&&/native code/.test(mr(yr)),br=Le.exports,_r=Qe,Sr=br("keys"),Er=function(e){return Sr[e]||(Sr[e]=_r(e))},wr={},Tr=gr,Ir=m,Rr=D,Cr=$,kr=er,Ar=Xe,Or=Ve,Pr=Er,xr=wr,Lr="Object already initialized",Mr=Ir.TypeError,Nr=Ir.WeakMap;if(Tr||Or.state){var Dr=Or.state||(Or.state=new Nr),jr=Rr(Dr.get),Ur=Rr(Dr.has),Vr=Rr(Dr.set);fr=function(e,t){if(Ur(Dr,e))throw new Mr(Lr);return t.facade=e,Vr(Dr,e,t),t},dr=function(e){return jr(Dr,e)||{}},hr=function(e){return Ur(Dr,e)}}else{var Wr=Pr("state");xr[Wr]=!0,fr=function(e,t){if(Ar(e,Wr))throw new Mr(Lr);return t.facade=e,kr(e,Wr,t),t},dr=function(e){return Ar(e,Wr)?e[Wr]:{}},hr=function(e){return Ar(e,Wr)}}var Br={set:fr,get:dr,has:hr,enforce:function(e){return hr(e)?dr(e):fr(e,{})},getterFor:function(e){return function(t){var r;if(!Cr(t)||(r=dr(t)).type!==e)throw Mr("Incompatible receiver, "+e+" required");return r}}},Gr=g,Zr=Q,Fr=Xe,Hr=b,Xr=sr.CONFIGURABLE,Yr=pr,Kr=Br.enforce,zr=Br.get,Jr=Object.defineProperty,Qr=Hr&&!Gr((function(){return 8!==Jr((function(){}),"length",{value:8}).length})),qr=String(String).split("String"),$r=tr.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Fr(e,"name")||Xr&&e.name!==t)&&(Hr?Jr(e,"name",{value:t,configurable:!0}):e.name=t),Qr&&r&&Fr(r,"arity")&&e.length!==r.arity&&Jr(e,"length",{value:r.arity});try{r&&Fr(r,"constructor")&&r.constructor?Hr&&Jr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Kr(e);return Fr(n,"source")||(n.source=qr.join("string"==typeof t?t:"")),e};Function.prototype.toString=$r((function(){return Zr(this)&&zr(this).source||Yr(this)}),"toString");var en=Q,tn=Nt,rn=tr.exports,nn=De,on=function(e,t,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:t;if(en(r)&&rn(r,o,n),n.global)i?e[t]=r:nn(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:tn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},an={},sn=Math.ceil,un=Math.floor,cn=Math.trunc||function(e){var t=+e;return(t>0?un:sn)(t)},ln=cn,fn=function(e){var t=+e;return t!=t||0===t?0:ln(t)},dn=fn,hn=Math.max,pn=Math.min,vn=function(e,t){var r=dn(e);return r<0?hn(r+t,0):pn(r,t)},mn=fn,yn=Math.min,gn=function(e){return e>0?yn(mn(e),9007199254740991):0},bn=gn,_n=function(e){return bn(e.length)},Sn=J,En=vn,wn=_n,Tn=function(e){return function(t,r,n){var i,o=Sn(t),a=wn(o),s=En(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},In={includes:Tn(!0),indexOf:Tn(!1)},Rn=Xe,Cn=J,kn=In.indexOf,An=wr,On=D([].push),Pn=function(e,t){var r,n=Cn(e),i=0,o=[];for(r in n)!Rn(An,r)&&Rn(n,r)&&On(o,r);for(;t.length>i;)Rn(n,r=t[i++])&&(~kn(o,r)||On(o,r));return o},xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ln=Pn,Mn=xn.concat("length","prototype");an.f=Object.getOwnPropertyNames||function(e){return Ln(e,Mn)};var Nn={};Nn.f=Object.getOwnPropertySymbols;var Dn=re,jn=an,Un=Nn,Vn=Wt,Wn=D([].concat),Bn=Dn("Reflect","ownKeys")||function(e){var t=jn.f(Vn(e)),r=Un.f;return r?Wn(t,r(e)):t},Gn=Xe,Zn=Bn,Fn=y,Hn=Nt,Xn=function(e,t,r){for(var n=Zn(t),i=Hn.f,o=Fn.f,a=0;a<n.length;a++){var s=n[a];Gn(e,s)||r&&Gn(r,s)||i(e,s,o(t,s))}},Yn=g,Kn=Q,zn=/#|\.prototype\./,Jn=function(e,t){var r=qn[Qn(e)];return r==ei||r!=$n&&(Kn(t)?Yn(t):!!t)},Qn=Jn.normalize=function(e){return String(e).replace(zn,".").toLowerCase()},qn=Jn.data={},$n=Jn.NATIVE="N",ei=Jn.POLYFILL="P",ti=Jn,ri=m,ni=y.f,ii=er,oi=on,ai=De,si=Xn,ui=ti,ci=function(e,t){var r,n,i,o,a,s=e.target,u=e.global,c=e.stat;if(r=u?ri:c?ri[s]||ai(s,{}):(ri[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=ni(r,n))&&a.value:r[n],!ui(u?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;si(o,i)}(e.sham||i&&i.sham)&&ii(o,"sham",!0),oi(r,n,o,e)}},li="process"==W(m.process),fi=Q,di=String,hi=TypeError,pi=D,vi=Wt,mi=function(e){if("object"==typeof e||fi(e))return e;throw hi("Can't set "+di(e)+" as a prototype")},yi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=pi(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return vi(r),mi(n),t?e(r,n):r.__proto__=n,r}}():void 0),gi=Nt.f,bi=Xe,_i=ut("toStringTag"),Si=function(e,t,r){e&&!r&&(e=e.prototype),e&&!bi(e,_i)&&gi(e,_i,{configurable:!0,value:t})},Ei=re,wi=Nt,Ti=b,Ii=ut("species"),Ri=function(e){var t=Ei(e),r=wi.f;Ti&&t&&!t[Ii]&&r(t,Ii,{configurable:!0,get:function(){return this}})},Ci=ne,ki=TypeError,Ai=function(e,t){if(Ci(t,e))return e;throw ki("Incorrect invocation")},Oi={};Oi[ut("toStringTag")]="z";var Pi="[object z]"===String(Oi),xi=Q,Li=W,Mi=ut("toStringTag"),Ni=Object,Di="Arguments"==Li(function(){return arguments}()),ji=Pi?Li:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Ni(e),Mi))?r:Di?Li(t):"Object"==(n=Li(t))&&xi(t.callee)?"Arguments":n},Ui=D,Vi=g,Wi=Q,Bi=ji,Gi=pr,Zi=function(){},Fi=[],Hi=re("Reflect","construct"),Xi=/^\s*(?:class|function)\b/,Yi=Ui(Xi.exec),Ki=!Xi.exec(Zi),zi=function(e){if(!Wi(e))return!1;try{return Hi(Zi,Fi,e),!0}catch(e){return!1}},Ji=function(e){if(!Wi(e))return!1;switch(Bi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ki||!!Yi(Xi,Gi(e))}catch(e){return!0}};Ji.sham=!0;var Qi,qi,$i,eo,to=!Hi||Vi((function(){var e;return zi(zi.call)||!zi(Object)||!zi((function(){e=!0}))||e}))?Ji:zi,ro=to,no=Ee,io=TypeError,oo=function(e){if(ro(e))return e;throw io(no(e)+" is not a constructor")},ao=Wt,so=oo,uo=ut("species"),co=function(e,t){var r,n=ao(e).constructor;return void 0===n||null==(r=ao(n)[uo])?t:so(r)},lo=_,fo=Function.prototype,ho=fo.apply,po=fo.call,vo="object"==typeof Reflect&&Reflect.apply||(lo?po.bind(ho):function(){return po.apply(ho,arguments)}),mo=Re,yo=_,go=D(D.bind),bo=function(e,t){return mo(e),void 0===t?e:yo?go(e,t):function(){return e.apply(t,arguments)}},_o=re("document","documentElement"),So=D([].slice),Eo=TypeError,wo=function(e,t){if(e<t)throw Eo("Not enough arguments");return e},To=/(?:ipad|iphone|ipod).*applewebkit/i.test(ie),Io=m,Ro=vo,Co=bo,ko=Q,Ao=Xe,Oo=g,Po=_o,xo=So,Lo=wt,Mo=wo,No=To,Do=li,jo=Io.setImmediate,Uo=Io.clearImmediate,Vo=Io.process,Wo=Io.Dispatch,Bo=Io.Function,Go=Io.MessageChannel,Zo=Io.String,Fo=0,Ho={},Xo="onreadystatechange";try{Qi=Io.location}catch(e){}var Yo=function(e){if(Ao(Ho,e)){var t=Ho[e];delete Ho[e],t()}},Ko=function(e){return function(){Yo(e)}},zo=function(e){Yo(e.data)},Jo=function(e){Io.postMessage(Zo(e),Qi.protocol+"//"+Qi.host)};jo&&Uo||(jo=function(e){Mo(arguments.length,1);var t=ko(e)?e:Bo(e),r=xo(arguments,1);return Ho[++Fo]=function(){Ro(t,void 0,r)},qi(Fo),Fo},Uo=function(e){delete Ho[e]},Do?qi=function(e){Vo.nextTick(Ko(e))}:Wo&&Wo.now?qi=function(e){Wo.now(Ko(e))}:Go&&!No?(eo=($i=new Go).port2,$i.port1.onmessage=zo,qi=Co(eo.postMessage,eo)):Io.addEventListener&&ko(Io.postMessage)&&!Io.importScripts&&Qi&&"file:"!==Qi.protocol&&!Oo(Jo)?(qi=Jo,Io.addEventListener("message",zo,!1)):qi=Xo in Lo("script")?function(e){Po.appendChild(Lo("script"))[Xo]=function(){Po.removeChild(this),Yo(e)}}:function(e){setTimeout(Ko(e),0)});var Qo,qo,$o,ea,ta,ra,na,ia,oa={set:jo,clear:Uo},aa=m,sa=/ipad|iphone|ipod/i.test(ie)&&void 0!==aa.Pebble,ua=/web0s(?!.*chrome)/i.test(ie),ca=m,la=bo,fa=y.f,da=oa.set,ha=To,pa=sa,va=ua,ma=li,ya=ca.MutationObserver||ca.WebKitMutationObserver,ga=ca.document,ba=ca.process,_a=ca.Promise,Sa=fa(ca,"queueMicrotask"),Ea=Sa&&Sa.value;Ea||(Qo=function(){var e,t;for(ma&&(e=ba.domain)&&e.exit();qo;){t=qo.fn,qo=qo.next;try{t()}catch(e){throw qo?ea():$o=void 0,e}}$o=void 0,e&&e.enter()},ha||ma||va||!ya||!ga?!pa&&_a&&_a.resolve?((na=_a.resolve(void 0)).constructor=_a,ia=la(na.then,na),ea=function(){ia(Qo)}):ma?ea=function(){ba.nextTick(Qo)}:(da=la(da,ca),ea=function(){da(Qo)}):(ta=!0,ra=ga.createTextNode(""),new ya(Qo).observe(ra,{characterData:!0}),ea=function(){ra.data=ta=!ta}));var wa=Ea||function(e){var t={fn:e,next:void 0};$o&&($o.next=t),qo||(qo=t,ea()),$o=t},Ta=m,Ia=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ra=function(){this.head=null,this.tail=null};Ra.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Ca=Ra,ka=m.Promise,Aa="object"==typeof window&&"object"!=typeof Deno,Oa=m,Pa=ka,xa=Q,La=ti,Ma=pr,Na=ut,Da=Aa,ja=fe;Pa&&Pa.prototype;var Ua=Na("species"),Va=!1,Wa=xa(Oa.PromiseRejectionEvent),Ba=La("Promise",(function(){var e=Ma(Pa),t=e!==String(Pa);if(!t&&66===ja)return!0;if(ja>=51&&/native code/.test(e))return!1;var r=new Pa((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Ua]=n,!(Va=r.then((function(){}))instanceof n)||!t&&Da&&!Wa})),Ga={CONSTRUCTOR:Ba,REJECTION_EVENT:Wa,SUBCLASSING:Va},Za={},Fa=Re,Ha=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=Fa(t),this.reject=Fa(r)};Za.f=function(e){return new Ha(e)};var Xa,Ya,Ka,za=ci,Ja=li,Qa=m,qa=w,$a=on,es=yi,ts=Si,rs=Ri,ns=Re,is=Q,os=$,as=Ai,ss=co,us=oa.set,cs=wa,ls=function(e,t){var r=Ta.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},fs=Ia,ds=Ca,hs=Br,ps=ka,vs=Za,ms="Promise",ys=Ga.CONSTRUCTOR,gs=Ga.REJECTION_EVENT,bs=Ga.SUBCLASSING,_s=hs.getterFor(ms),Ss=hs.set,Es=ps&&ps.prototype,ws=ps,Ts=Es,Is=Qa.TypeError,Rs=Qa.document,Cs=Qa.process,ks=vs.f,As=ks,Os=!!(Rs&&Rs.createEvent&&Qa.dispatchEvent),Ps="unhandledrejection",xs=function(e){var t;return!(!os(e)||!is(t=e.then))&&t},Ls=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&Us(t),t.rejection=1),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===e.promise?c(Is("Promise-chain cycle")):(n=xs(r))?qa(n,r,u,c):u(r)):c(o)}catch(e){l&&!i&&l.exit(),c(e)}},Ms=function(e,t){e.notified||(e.notified=!0,cs((function(){for(var r,n=e.reactions;r=n.get();)Ls(r,e);e.notified=!1,t&&!e.rejection&&Ds(e)})))},Ns=function(e,t,r){var n,i;Os?((n=Rs.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Qa.dispatchEvent(n)):n={promise:t,reason:r},!gs&&(i=Qa["on"+e])?i(n):e===Ps&&ls("Unhandled promise rejection",r)},Ds=function(e){qa(us,Qa,(function(){var t,r=e.facade,n=e.value;if(js(e)&&(t=fs((function(){Ja?Cs.emit("unhandledRejection",n,r):Ns(Ps,r,n)})),e.rejection=Ja||js(e)?2:1,t.error))throw t.value}))},js=function(e){return 1!==e.rejection&&!e.parent},Us=function(e){qa(us,Qa,(function(){var t=e.facade;Ja?Cs.emit("rejectionHandled",t):Ns("rejectionhandled",t,e.value)}))},Vs=function(e,t,r){return function(n){e(t,n,r)}},Ws=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Ms(e,!0))},Bs=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Is("Promise can't be resolved itself");var n=xs(t);n?cs((function(){var r={done:!1};try{qa(n,t,Vs(Bs,r,e),Vs(Ws,r,e))}catch(t){Ws(r,t,e)}})):(e.value=t,e.state=1,Ms(e,!1))}catch(t){Ws({done:!1},t,e)}}};if(ys&&(Ts=(ws=function(e){as(this,Ts),ns(e),qa(Xa,this);var t=_s(this);try{e(Vs(Bs,t),Vs(Ws,t))}catch(e){Ws(t,e)}}).prototype,(Xa=function(e){Ss(this,{type:ms,done:!1,notified:!1,parent:!1,reactions:new ds,rejection:!1,state:0,value:void 0})}).prototype=$a(Ts,"then",(function(e,t){var r=_s(this),n=ks(ss(this,ws));return r.parent=!0,n.ok=!is(e)||e,n.fail=is(t)&&t,n.domain=Ja?Cs.domain:void 0,0==r.state?r.reactions.add(n):cs((function(){Ls(n,r)})),n.promise})),Ya=function(){var e=new Xa,t=_s(e);this.promise=e,this.resolve=Vs(Bs,t),this.reject=Vs(Ws,t)},vs.f=ks=function(e){return e===ws||undefined===e?new Ya(e):As(e)},is(ps)&&Es!==Object.prototype)){Ka=Es.then,bs||$a(Es,"then",(function(e,t){var r=this;return new ws((function(e,t){qa(Ka,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Es.constructor}catch(e){}es&&es(Es,Ts)}za({global:!0,constructor:!0,wrap:!0,forced:ys},{Promise:ws}),ts(ws,ms,!1),rs(ms);var Gs={},Zs=Gs,Fs=ut("iterator"),Hs=Array.prototype,Xs=function(e){return void 0!==e&&(Zs.Array===e||Hs[Fs]===e)},Ys=ji,Ks=ke,zs=Gs,Js=ut("iterator"),Qs=function(e){if(null!=e)return Ks(e,Js)||Ks(e,"@@iterator")||zs[Ys(e)]},qs=w,$s=Re,eu=Wt,tu=Ee,ru=Qs,nu=TypeError,iu=function(e,t){var r=arguments.length<2?ru(e):t;if($s(r))return eu(qs(r,e));throw nu(tu(e)+" is not iterable")},ou=w,au=Wt,su=ke,uu=function(e,t,r){var n,i;au(e);try{if(!(n=su(e,"return"))){if("throw"===t)throw r;return r}n=ou(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return au(n),r},cu=bo,lu=w,fu=Wt,du=Ee,hu=Xs,pu=_n,vu=ne,mu=iu,yu=Qs,gu=uu,bu=TypeError,_u=function(e,t){this.stopped=e,this.result=t},Su=_u.prototype,Eu=function(e,t,r){var n,i,o,a,s,u,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),p=cu(t,l),v=function(e){return n&&gu(n,"normal",e),new _u(!0,e)},m=function(e){return f?(fu(e),h?p(e[0],e[1],v):p(e[0],e[1])):h?p(e,v):p(e)};if(d)n=e;else{if(!(i=yu(e)))throw bu(du(e)+" is not iterable");if(hu(i)){for(o=0,a=pu(e);a>o;o++)if((s=m(e[o]))&&vu(Su,s))return s;return new _u(!1)}n=mu(e,i)}for(u=n.next;!(c=lu(u,n)).done;){try{s=m(c.value)}catch(e){gu(n,"throw",e)}if("object"==typeof s&&s&&vu(Su,s))return s}return new _u(!1)},wu=ut("iterator"),Tu=!1;try{var Iu=0,Ru={next:function(){return{done:!!Iu++}},return:function(){Tu=!0}};Ru[wu]=function(){return this},Array.from(Ru,(function(){throw 2}))}catch(e){}var Cu=function(e,t){if(!t&&!Tu)return!1;var r=!1;try{var n={};n[wu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},ku=ka,Au=Ga.CONSTRUCTOR||!Cu((function(e){ku.all(e).then(void 0,(function(){}))})),Ou=w,Pu=Re,xu=Za,Lu=Ia,Mu=Eu;ci({target:"Promise",stat:!0,forced:Au},{all:function(e){var t=this,r=xu.f(t),n=r.resolve,i=r.reject,o=Lu((function(){var r=Pu(t.resolve),o=[],a=0,s=1;Mu(e,(function(e){var u=a++,c=!1;s++,Ou(r,t,e).then((function(e){c||(c=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var Nu=ci,Du=Ga.CONSTRUCTOR,ju=ka,Uu=re,Vu=Q,Wu=on,Bu=ju&&ju.prototype;if(Nu({target:"Promise",proto:!0,forced:Du,real:!0},{catch:function(e){return this.then(void 0,e)}}),Vu(ju)){var Gu=Uu("Promise").prototype.catch;Bu.catch!==Gu&&Wu(Bu,"catch",Gu,{unsafe:!0})}var Zu=w,Fu=Re,Hu=Za,Xu=Ia,Yu=Eu;ci({target:"Promise",stat:!0,forced:Au},{race:function(e){var t=this,r=Hu.f(t),n=r.reject,i=Xu((function(){var i=Fu(t.resolve);Yu(e,(function(e){Zu(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var Ku=w,zu=Za;ci({target:"Promise",stat:!0,forced:Ga.CONSTRUCTOR},{reject:function(e){var t=zu.f(this);return Ku(t.reject,void 0,e),t.promise}});var Ju=Wt,Qu=$,qu=Za,$u=function(e,t){if(Ju(e),Qu(t)&&t.constructor===e)return t;var r=qu.f(e);return(0,r.resolve)(t),r.promise},ec=ci,tc=Ga.CONSTRUCTOR,rc=$u;re("Promise"),ec({target:"Promise",stat:!0,forced:tc},{resolve:function(e){return rc(this,e)}});let nc=function(e){return e[e.RTC_ERR_CODE_SUCCESS=0]="RTC_ERR_CODE_SUCCESS",e[e.RTC_ERR_CODE_RTC_SDK_ERROR=90000001]="RTC_ERR_CODE_RTC_SDK_ERROR",e[e.RTC_ERR_CODE_WAIT_RSP_TIMEOUT=90000004]="RTC_ERR_CODE_WAIT_RSP_TIMEOUT",e[e.RTC_ERR_CODE_INVALID_PARAMETER=90000005]="RTC_ERR_CODE_INVALID_PARAMETER",e[e.RTC_ERR_CODE_INVALID_OPERATION=90100001]="RTC_ERR_CODE_INVALID_OPERATION",e[e.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES=90100002]="RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES",e[e.RTC_ERR_CODE_NO_AVAILABLE_DEVICES=90100003]="RTC_ERR_CODE_NO_AVAILABLE_DEVICES",e[e.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES=90100004]="RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES",e[e.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES=90100005]="RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES",e[e.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES=90100006]="RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES",e[e.RTC_ERR_CODE_STATUS_ERROR=90100007]="RTC_ERR_CODE_STATUS_ERROR",e[e.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED=90100008]="RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED",e[e.RTC_ERR_CODE_WAIT_CONFIG_FAIL=90100009]="RTC_ERR_CODE_WAIT_CONFIG_FAIL",e[e.RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL=90100010]="RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL",e[e.RTC_ERR_CODE_REGION_NOT_COVERED=90100011]="RTC_ERR_CODE_REGION_NOT_COVERED",e[e.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT=90100012]="RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT",e[e.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT=90100013]="RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT",e[e.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN=90100014]="RTC_ERR_CODE_WEBSOCKET_NOT_OPEN",e[e.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED=90100015]="RTC_ERR_CODE_WEBSOCKET_INTERRUPTED",e[e.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR=90100016]="RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR",e[e.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED=90100017]="RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED",e[e.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED=90100018]="RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED",e[e.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND=90100019]="RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND",e[e.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE=90100020]="RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE",e[e.RTC_ERR_CODE_PLAY_NOT_ALLOW=90100021]="RTC_ERR_CODE_PLAY_NOT_ALLOW",e[e.RTC_ERR_CODE_ROLE_NO_PERMISSION=90100022]="RTC_ERR_CODE_ROLE_NO_PERMISSION",e[e.RTC_ERR_CODE_ANSWER_SDP_INVALID=90100023]="RTC_ERR_CODE_ANSWER_SDP_INVALID",e[e.RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED=90100024]="RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED",e[e.RTC_ERR_CODE_WEBRTC_UNSUPPORTED=90100025]="RTC_ERR_CODE_WEBRTC_UNSUPPORTED",e[e.RTC_ERR_CODE_MEDIA_NETWORK_ERROR=90100026]="RTC_ERR_CODE_MEDIA_NETWORK_ERROR",e[e.RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM=90100027]="RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM",e[e.RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM=90100028]="RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM",e[e.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED=90100029]="RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED",e[e.RTC_ERR_CODE_SIGNATURE_EXPIRED=90100030]="RTC_ERR_CODE_SIGNATURE_EXPIRED",e[e.RTC_ERR_CODE_SIGNATURE_INVALID=90100031]="RTC_ERR_CODE_SIGNATURE_INVALID",e[e.RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED=90100032]="RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED",e[e.RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED=90100033]="RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED",e[e.RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED=90100034]="RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED",e[e.RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED=90100035]="RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED",e[e.RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED=90100036]="RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED",e[e.RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED=90100037]="RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED",e[e.RTC_ERR_CODE_MEDIA_ERROR=90100038]="RTC_ERR_CODE_MEDIA_ERROR",e[e.RTC_ERR_CODE_RTC_ACS=90100100]="RTC_ERR_CODE_RTC_ACS",e[e.RTC_ERR_CODE_RTC_CONTROL_ERROR=90100200]="RTC_ERR_CODE_RTC_CONTROL_ERROR",e[e.RTC_ERR_CODE_SFU_ERROR=90100600]="RTC_ERR_CODE_SFU_ERROR",e}({});const ic={[nc.RTC_ERR_CODE_SUCCESS]:"success",[nc.RTC_ERR_CODE_RTC_SDK_ERROR]:"sdk internal error",[nc.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES]:"not support enumerate devices",[nc.RTC_ERR_CODE_NO_AVAILABLE_DEVICES]:"no available devices",[nc.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES]:"no available video input devices",[nc.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES]:"no available audio input devices",[nc.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES]:"no available audio output devices",[nc.RTC_ERR_CODE_STATUS_ERROR]:"room status error",[nc.RTC_ERR_CODE_INVALID_PARAMETER]:"invalid parameter",[nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED]:'websocket connection state is not "CONNECTED"',[nc.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN]:"websocket is not open",[nc.RTC_ERR_CODE_WAIT_CONFIG_FAIL]:"wait server config fail",[nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT]:"message response timeout",[nc.RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL]:"publish response fail",[nc.RTC_ERR_CODE_REGION_NOT_COVERED]:"current region is not covered, service unavailable",[nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT]:"websocket connect timeout",[nc.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT]:"websocket reconnect timeout",[nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED]:"websocket connection state is idle, interrupt operation",[nc.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED]:"capture failed, permission denied",[nc.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED]:"capture failed, Constraint parameter invalid",[nc.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND]:"capture failed, requested device not found",[nc.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE]:"capture failed, maybe device is occupied by other application",[nc.RTC_ERR_CODE_PLAY_NOT_ALLOW]:"the user didn't interact with the document first, please trigger by gesture",[nc.RTC_ERR_CODE_ROLE_NO_PERMISSION]:"the user role have no permission to operate",[nc.RTC_ERR_CODE_ANSWER_SDP_INVALID]:"the answer sdp is invalid",[nc.RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED]:"the upstream media is not supported",[nc.RTC_ERR_CODE_WEBRTC_UNSUPPORTED]:"the browser does not support, the webrtc component is missing",[nc.RTC_ERR_CODE_MEDIA_NETWORK_ERROR]:"media connection establish failed, please switch network or try again later",[nc.RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM]:"relay room number over maxium number.",[nc.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED]:"room stream status paused",[nc.RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM]:"joiner already exist in relay rooms.",[nc.RTC_ERR_CODE_SIGNATURE_INVALID]:"signature invalid",[nc.RTC_ERR_CODE_SIGNATURE_EXPIRED]:"signature expired",[nc.RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED]:"window or navigator error",[nc.RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED]:"the kernel Chrome version is earlier than 67.",[nc.RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED]:"the websocket component is missing",[nc.RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED]:"RTCPeerConnection unsupport AVC encoders.",[nc.RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED]:"RTCPeerConnection unsupport AVC decoders.",[nc.RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED]:"browser not support, the model is not in the trustlist."};let oc=function(e){function t(e,r){var n;a(this,t);const i=e;let o,s="";i>9e7&&i<90100100||i<100?(o=i,s=r||i in nc&&ic[i]):i>=6e5&&i<7e5?(o=nc.RTC_ERR_CODE_SFU_ERROR,s="code: ".concat(i,", msg: ").concat(r)):i>=2e5&&i<3e5?(o=nc.RTC_ERR_CODE_RTC_CONTROL_ERROR,s="code: ".concat(i,", msg: ").concat(r)):i>=1e5&&i<2e5?(o=nc.RTC_ERR_CODE_RTC_ACS,s="code: ".concat(i,", msg: ").concat(r)):(s="unknow error",o=i),n=f(this,t,[s]),n.code=o,n.message=s;return n}p(t,e);return u(t,[{key:"getCode",value:function e(){return this.code}},{key:"getMsg",value:function e(){return this.message}},{key:"toString",value:function e(){return'["code": '.concat(this.code,', "message": "').concat(this.message,'"]')}}])}(v(Error));var ac=ji,sc=String,uc=function(e){if("Symbol"===ac(e))throw TypeError("Cannot convert a Symbol value to a string");return sc(e)},cc=ci,lc=b,fc=m,dc=D,hc=Xe,pc=Q,vc=ne,mc=uc,yc=Nt.f,gc=Xn,bc=fc.Symbol,_c=bc&&bc.prototype;if(lc&&pc(bc)&&(!("description"in _c)||void 0!==bc().description)){var Sc={},Ec=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:mc(arguments[0]),t=vc(_c,this)?new bc(e):void 0===e?bc():bc(e);return""===e&&(Sc[t]=!0),t};gc(Ec,bc),Ec.prototype=_c,_c.constructor=Ec;var wc="Symbol(test)"==String(bc("test")),Tc=dc(_c.toString),Ic=dc(_c.valueOf),Rc=/^Symbol\((.*)\)[^)]+$/,Cc=dc("".replace),kc=dc("".slice);yc(_c,"description",{configurable:!0,get:function(){var e=Ic(this),t=Tc(e);if(hc(Sc,e))return"";var r=wc?kc(t,7,-1):Cc(t,Rc,"$1");return""===r?void 0:r}}),cc({global:!0,constructor:!0,forced:!0},{Symbol:Ec})}var Ac={},Oc=Pn,Pc=xn,xc=Object.keys||function(e){return Oc(e,Pc)},Lc=b,Mc=Dt,Nc=Nt,Dc=Wt,jc=J,Uc=xc;Ac.f=Lc&&!Mc?Object.defineProperties:function(e,t){Dc(e);for(var r,n=jc(t),i=Uc(t),o=i.length,a=0;o>a;)Nc.f(e,r=i[a++],n[r]);return e};var Vc,Wc=Wt,Bc=Ac,Gc=xn,Zc=wr,Fc=_o,Hc=wt,Xc="prototype",Yc="script",Kc=Er("IE_PROTO"),zc=function(){},Jc=function(e){return"<"+Yc+">"+e+"</"+Yc+">"},Qc=function(e){e.write(Jc("")),e.close();var t=e.parentWindow.Object;return e=null,t},qc=function(){try{Vc=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;qc="undefined"!=typeof document?document.domain&&Vc?Qc(Vc):(t=Hc("iframe"),r="java"+Yc+":",t.style.display="none",Fc.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Jc("document.F=Object")),e.close(),e.F):Qc(Vc);for(var n=Gc.length;n--;)delete qc[Xc][Gc[n]];return qc()};Zc[Kc]=!0;var $c=Object.create||function(e,t){var r;return null!==e?(zc[Xc]=Wc(e),r=new zc,zc[Xc]=null,r[Kc]=e):r=qc(),void 0===t?r:Bc.f(r,t)},el=ut,tl=$c,rl=Nt.f,nl=el("unscopables"),il=Array.prototype;null==il[nl]&&rl(il,nl,{configurable:!0,value:tl(null)});var ol,al,sl,ul=function(e){il[nl][e]=!0},cl=!g((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ll=Xe,fl=Q,dl=Ze,hl=cl,pl=Er("IE_PROTO"),vl=Object,ml=vl.prototype,yl=hl?vl.getPrototypeOf:function(e){var t=dl(e);if(ll(t,pl))return t[pl];var r=t.constructor;return fl(r)&&t instanceof r?r.prototype:t instanceof vl?ml:null},gl=g,bl=Q,_l=yl,Sl=on,El=ut("iterator"),wl=!1;[].keys&&("next"in(sl=[].keys())?(al=_l(_l(sl)))!==Object.prototype&&(ol=al):wl=!0);var Tl=null==ol||gl((function(){var e={};return ol[El].call(e)!==e}));Tl&&(ol={}),bl(ol[El])||Sl(ol,El,(function(){return this}));var Il={IteratorPrototype:ol,BUGGY_SAFARI_ITERATORS:wl},Rl=Il.IteratorPrototype,Cl=$c,kl=O,Al=Si,Ol=Gs,Pl=function(){return this},xl=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Cl(Rl,{next:kl(+!n,r)}),Al(e,i,!1),Ol[i]=Pl,e},Ll=ci,Ml=w,Nl=Q,Dl=xl,jl=yl,Ul=yi,Vl=Si,Wl=er,Bl=on,Gl=Gs,Zl=sr.PROPER,Fl=sr.CONFIGURABLE,Hl=Il.IteratorPrototype,Xl=Il.BUGGY_SAFARI_ITERATORS,Yl=ut("iterator"),Kl="keys",zl="values",Jl="entries",Ql=function(){return this},ql=function(e,t,r,n,i,o,a){Dl(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!Xl&&e in h)return h[e];switch(e){case Kl:case zl:case Jl:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,h=e.prototype,p=h[Yl]||h["@@iterator"]||i&&h[i],v=!Xl&&p||l(i),m="Array"==t&&h.entries||p;if(m&&(s=jl(m.call(new e)))!==Object.prototype&&s.next&&(jl(s)!==Hl&&(Ul?Ul(s,Hl):Nl(s[Yl])||Bl(s,Yl,Ql)),Vl(s,f,!0)),Zl&&i==zl&&p&&p.name!==zl&&(Fl?Wl(h,"name",zl):(d=!0,v=function(){return Ml(p,this)})),i)if(u={values:l(zl),keys:o?v:l(Kl),entries:l(Jl)},a)for(c in u)(Xl||d||!(c in h))&&Bl(h,c,u[c]);else Ll({target:t,proto:!0,forced:Xl||d},u);return h[Yl]!==v&&Bl(h,Yl,v,{name:i}),Gl[t]=v,u},$l=J,ef=ul,tf=Gs,rf=Br,nf=Nt.f,of=ql,af=b,sf="Array Iterator",uf=rf.set,cf=rf.getterFor(sf),lf=of(Array,"Array",(function(e,t){uf(this,{type:sf,target:$l(e),index:0,kind:t})}),(function(){var e=cf(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),ff=tf.Arguments=tf.Array;if(ef("keys"),ef("values"),ef("entries"),af&&"values"!==ff.name)try{nf(ff,"name",{value:"values"})}catch(e){}var df=w,hf=Re,pf=Wt,vf=function(){for(var e,t=pf(this),r=hf(t.delete),n=!0,i=0,o=arguments.length;i<o;i++)e=df(r,t,arguments[i]),n=n&&e;return!!n};ci({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:vf});var mf=w,yf=function(e){return mf(Map.prototype.entries,e)},gf=Wt,bf=bo,_f=yf,Sf=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=gf(this),r=_f(t),n=bf(e,arguments.length>1?arguments[1]:void 0);return!Sf(r,(function(e,r,i){if(!n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Ef=re,wf=bo,Tf=w,If=Re,Rf=Wt,Cf=co,kf=yf,Af=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Rf(this),r=kf(t),n=wf(e,arguments.length>1?arguments[1]:void 0),i=new(Cf(t,Ef("Map"))),o=If(i.set);return Af(r,(function(e,r){n(r,e,t)&&Tf(o,i,e,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});var Of=Wt,Pf=bo,xf=yf,Lf=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Of(this),r=xf(t),n=Pf(e,arguments.length>1?arguments[1]:void 0);return Lf(r,(function(e,r,i){if(n(r,e,t))return i(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var Mf=Wt,Nf=bo,Df=yf,jf=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Mf(this),r=Df(t),n=Nf(e,arguments.length>1?arguments[1]:void 0);return jf(r,(function(e,r,i){if(n(r,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var Uf=Wt,Vf=yf,Wf=function(e,t){return e===t||e!=e&&t!=t},Bf=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return Bf(Vf(Uf(this)),(function(t,r,n){if(Wf(r,e))return n()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Gf=Wt,Zf=yf,Ff=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return Ff(Zf(Gf(this)),(function(t,r,n){if(r===e)return n(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var Hf=re,Xf=bo,Yf=w,Kf=Re,zf=Wt,Jf=co,Qf=yf,qf=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=zf(this),r=Qf(t),n=Xf(e,arguments.length>1?arguments[1]:void 0),i=new(Jf(t,Hf("Map"))),o=Kf(i.set);return qf(r,(function(e,r){Yf(o,i,n(r,e,t),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});var $f=re,ed=bo,td=w,rd=Re,nd=Wt,id=co,od=yf,ad=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=nd(this),r=od(t),n=ed(e,arguments.length>1?arguments[1]:void 0),i=new(id(t,$f("Map"))),o=rd(i.set);return ad(r,(function(e,r){td(o,i,e,n(r,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});var sd=Re,ud=Wt,cd=Eu;ci({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=ud(this),r=sd(t.set),n=arguments.length,i=0;i<n;)cd(arguments[i++],r,{that:t,AS_ENTRIES:!0});return t}});var ld=Wt,fd=Re,dd=yf,hd=Eu,pd=TypeError;ci({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=ld(this),r=dd(t),n=arguments.length<2,i=n?void 0:arguments[1];if(fd(e),hd(r,(function(r,o){n?(n=!1,i=o):i=e(i,o,r,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw pd("Reduce of empty map with no initial value");return i}});var vd=Wt,md=bo,yd=yf,gd=Eu;ci({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=vd(this),r=yd(t),n=md(e,arguments.length>1?arguments[1]:void 0);return gd(r,(function(e,r,i){if(n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var bd=w,_d=Wt,Sd=Re,Ed=TypeError;ci({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=_d(this),n=Sd(r.get),i=Sd(r.has),o=Sd(r.set),a=arguments.length;Sd(t);var s=bd(i,r,e);if(!s&&a<3)throw Ed("Updating absent value");var u=s?bd(n,r,e):Sd(a>2?arguments[2]:void 0)(e,r);return bd(o,r,e,t(u,e,r)),r}});var wd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Td=wt("span").classList,Id=Td&&Td.constructor&&Td.constructor.prototype,Rd=Id===Object.prototype?void 0:Id,Cd=m,kd=wd,Ad=Rd,Od=lf,Pd=er,xd=ut,Ld=xd("iterator"),Md=xd("toStringTag"),Nd=Od.values,Dd=function(e,t){if(e){if(e[Ld]!==Nd)try{Pd(e,Ld,Nd)}catch(t){e[Ld]=Nd}if(e[Md]||Pd(e,Md,t),kd[t])for(var r in Od)if(e[r]!==Od[r])try{Pd(e,r,Od[r])}catch(t){e[r]=Od[r]}}};for(var jd in kd)Dd(Cd[jd]&&Cd[jd].prototype,jd);Dd(Ad,"DOMTokenList");var Ud=W,Vd=Array.isArray||function(e){return"Array"==Ud(e)},Wd=Vd,Bd=to,Gd=$,Zd=ut("species"),Fd=Array,Hd=function(e){var t;return Wd(e)&&(t=e.constructor,(Bd(t)&&(t===Fd||Wd(t.prototype))||Gd(t)&&null===(t=t[Zd]))&&(t=void 0)),void 0===t?Fd:t},Xd=bo,Yd=H,Kd=Ze,zd=_n,Jd=function(e,t){return new(Hd(e))(0===t?0:t)},Qd=D([].push),qd=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,f){for(var d,h,p=Kd(u),v=Yd(p),m=Xd(c,l),y=zd(v),g=0,b=f||Jd,_=t?b(u,y):r||a?b(u,0):void 0;y>g;g++)if((s||g in v)&&(h=m(d=v[g],g,p),e))if(t)_[g]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:Qd(_,d)}else switch(e){case 4:return!1;case 7:Qd(_,d)}return o?-1:n||i?i:_}},$d={forEach:qd(0),map:qd(1),filter:qd(2),some:qd(3),every:qd(4),find:qd(5),findIndex:qd(6),filterReject:qd(7)},eh=g,th=function(e,t){var r=[][e];return!!r&&eh((function(){r.call(null,t||function(){return 1},1)}))},rh=$d.forEach,nh=th("forEach")?[].forEach:function(e){return rh(this,e,arguments.length>1?arguments[1]:void 0)},ih=m,oh=wd,ah=Rd,sh=nh,uh=er,ch=function(e){if(e&&e.forEach!==sh)try{uh(e,"forEach",sh)}catch(t){e.forEach=sh}};for(var lh in oh)oh[lh]&&ch(ih[lh]&&ih[lh].prototype);ch(ah);var fh=In.includes,dh=ul;ci({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(e){return fh(this,e,arguments.length>1?arguments[1]:void 0)}}),dh("includes");var hh=Wt,ph=function(){var e=hh(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},vh=g,mh=m.RegExp,yh=vh((function(){var e=mh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gh=yh||vh((function(){return!mh("a","y").sticky})),bh=yh||vh((function(){var e=mh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),_h={BROKEN_CARET:bh,MISSED_STICKY:gh,UNSUPPORTED_Y:yh},Sh=g,Eh=m.RegExp,wh=Sh((function(){var e=Eh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Th=g,Ih=m.RegExp,Rh=Th((function(){var e=Ih("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ch=w,kh=D,Ah=uc,Oh=ph,Ph=_h,xh=Le.exports,Lh=$c,Mh=Br.get,Nh=wh,Dh=Rh,jh=xh("native-string-replace",String.prototype.replace),Uh=RegExp.prototype.exec,Vh=Uh,Wh=kh("".charAt),Bh=kh("".indexOf),Gh=kh("".replace),Zh=kh("".slice),Fh=function(){var e=/a/,t=/b*/g;return Ch(Uh,e,"a"),Ch(Uh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Hh=Ph.BROKEN_CARET,Xh=void 0!==/()??/.exec("")[1];(Fh||Xh||Hh||Nh||Dh)&&(Vh=function(e){var t,r,n,i,o,a,s,u=this,c=Mh(u),l=Ah(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=Ch(Vh,f,l),u.lastIndex=f.lastIndex,t;var d=c.groups,h=Hh&&u.sticky,p=Ch(Oh,u),v=u.source,m=0,y=l;if(h&&(p=Gh(p,"y",""),-1===Bh(p,"g")&&(p+="g"),y=Zh(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Wh(l,u.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,m++),r=new RegExp("^(?:"+v+")",p)),Xh&&(r=new RegExp("^"+v+"$(?!\\s)",p)),Fh&&(n=u.lastIndex),i=Ch(Uh,h?r:u,y),h?i?(i.input=Zh(i.input,m),i[0]=Zh(i[0],m),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Fh&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),Xh&&i&&i.length>1&&Ch(jh,i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&d)for(i.groups=a=Lh(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Yh=Vh;ci({target:"RegExp",proto:!0,forced:/./.exec!==Yh},{exec:Yh});var Kh=D,zh=on,Jh=Yh,Qh=g,qh=ut,$h=er,ep=qh("species"),tp=RegExp.prototype,rp=D,np=fn,ip=uc,op=Y,ap=rp("".charAt),sp=rp("".charCodeAt),up=rp("".slice),cp=function(e){return function(t,r){var n,i,o=ip(op(t)),a=np(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=sp(o,a))<55296||n>56319||a+1===s||(i=sp(o,a+1))<56320||i>57343?e?ap(o,a):n:e?up(o,a,a+2):i-56320+(n-55296<<10)+65536}},lp={codeAt:cp(!1),charAt:cp(!0)},fp=lp.charAt,dp=D,hp=Ze,pp=Math.floor,vp=dp("".charAt),mp=dp("".replace),yp=dp("".slice),gp=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bp=/\$([$&'`]|\d{1,2})/g,_p=function(e,t,r,n,i,o){var a=r+e.length,s=n.length,u=bp;return void 0!==i&&(i=hp(i),u=gp),mp(o,u,(function(o,u){var c;switch(vp(u,0)){case"$":return"$";case"&":return e;case"`":return yp(t,0,r);case"'":return yp(t,a);case"<":c=i[yp(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var f=pp(l/10);return 0===f?o:f<=s?void 0===n[f-1]?vp(u,1):n[f-1]+vp(u,1):o}c=n[l-1]}return void 0===c?"":c}))},Sp=w,Ep=Wt,wp=Q,Tp=W,Ip=Yh,Rp=TypeError,Cp=vo,kp=w,Ap=D,Op=function(e,t,r,n){var i=qh(e),o=!Qh((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!Qh((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[ep]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!o||!a||r){var s=Kh(/./[i]),u=t(i,""[e],(function(e,t,r,n,i){var a=Kh(e),u=t.exec;return u===Jh||u===tp.exec?o&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));zh(String.prototype,e,u[0]),zh(tp,i,u[1])}n&&$h(tp[i],"sham",!0)},Pp=g,xp=Wt,Lp=Q,Mp=fn,Np=gn,Dp=uc,jp=Y,Up=function(e,t,r){return t+(r?fp(e,t).length:1)},Vp=ke,Wp=_p,Bp=function(e,t){var r=e.exec;if(wp(r)){var n=Sp(r,e,t);return null!==n&&Ep(n),n}if("RegExp"===Tp(e))return Sp(Ip,e,t);throw Rp("RegExp#exec called on incompatible receiver")},Gp=ut("replace"),Zp=Math.max,Fp=Math.min,Hp=Ap([].concat),Xp=Ap([].push),Yp=Ap("".indexOf),Kp=Ap("".slice),zp=function(e){return void 0===e?e:String(e)},Jp="$0"==="a".replace(/./,"$0"),Qp=!!/./[Gp]&&""===/./[Gp]("a","$0"),qp=!Pp((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));Op("replace",(function(e,t,r){var n=Qp?"$":"$0";return[function(e,r){var n=jp(this),i=null==e?void 0:Vp(e,Gp);return i?kp(i,e,n,r):kp(t,Dp(n),e,r)},function(e,i){var o=xp(this),a=Dp(e);if("string"==typeof i&&-1===Yp(i,n)&&-1===Yp(i,"$<")){var s=r(t,o,a,i);if(s.done)return s.value}var u=Lp(i);u||(i=Dp(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var f=[];;){var d=Bp(o,a);if(null===d)break;if(Xp(f,d),!c)break;""===Dp(d[0])&&(o.lastIndex=Up(a,Np(o.lastIndex),l))}for(var h="",p=0,v=0;v<f.length;v++){for(var m=Dp((d=f[v])[0]),y=Zp(Fp(Mp(d.index),a.length),0),g=[],b=1;b<d.length;b++)Xp(g,zp(d[b]));var _=d.groups;if(u){var S=Hp([m],g,y,a);void 0!==_&&Xp(S,_);var E=Dp(Cp(i,void 0,S))}else E=Wp(m,a,y,g,_,i);y>=p&&(h+=Kp(a,p,y)+E,p=y+m.length)}return h+Kp(a,p)}]}),!qp||!Jp||Qp);var $p=$,ev=W,tv=ut("match"),rv=function(e){var t;return $p(e)&&(void 0!==(t=e[tv])?!!t:"RegExp"==ev(e))},nv=w,iv=Xe,ov=ne,av=ph,sv=RegExp.prototype,uv=function(e){var t=e.flags;return void 0!==t||"flags"in sv||iv(e,"flags")||!ov(sv,e)?t:nv(av,e)},cv=ci,lv=w,fv=D,dv=Y,hv=Q,pv=rv,vv=uc,mv=ke,yv=uv,gv=_p,bv=ut("replace"),_v=TypeError,Sv=fv("".indexOf);fv("".replace);var Ev=fv("".slice),wv=Math.max,Tv=function(e,t,r){return r>e.length?-1:""===t?r:Sv(e,t,r)};cv({target:"String",proto:!0},{replaceAll:function(e,t){var r,n,i,o,a,s,u,c,l=dv(this),f=0,d=0,h="";if(null!=e){if(pv(e)&&(r=vv(dv(yv(e))),!~Sv(r,"g")))throw _v("`.replaceAll` does not allow non-global regexes");if(n=mv(e,bv))return lv(n,e,l,t)}for(i=vv(l),o=vv(e),(a=hv(t))||(t=vv(t)),s=o.length,u=wv(1,s),f=Tv(i,o,0);-1!==f;)c=a?vv(t(o,f,i)):gv(o,i,f,[],void 0,t),h+=Ev(i,d,f)+c,d=f+s,f=Tv(i,o,f+u);return d<i.length&&(h+=Ev(i,d)),h}});var Iv=Q,Rv=$,Cv=yi,kv=function(e,t,r){var n,i;return Cv&&Iv(n=t.constructor)&&n!==r&&Rv(i=n.prototype)&&i!==r.prototype&&Cv(e,i),e},Av=Nt.f,Ov=b,Pv=m,xv=D,Lv=ti,Mv=kv,Nv=er,Dv=an.f,jv=ne,Uv=rv,Vv=uc,Wv=uv,Bv=_h,Gv=function(e,t,r){r in e||Av(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Zv=on,Fv=g,Hv=Xe,Xv=Br.enforce,Yv=Ri,Kv=wh,zv=Rh,Jv=ut("match"),Qv=Pv.RegExp,qv=Qv.prototype,$v=Pv.SyntaxError,em=xv(qv.exec),tm=xv("".charAt),rm=xv("".replace),nm=xv("".indexOf),im=xv("".slice),om=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,am=/a/g,sm=/a/g,um=new Qv(am)!==am,cm=Bv.MISSED_STICKY,lm=Bv.UNSUPPORTED_Y,fm=Ov&&(!um||cm||Kv||zv||Fv((function(){return sm[Jv]=!1,Qv(am)!=am||Qv(sm)==sm||"/a/i"!=Qv(am,"i")})));if(Lv("RegExp",fm)){for(var dm=function(e,t){var r,n,i,o,a,s,u=jv(qv,this),c=Uv(e),l=void 0===t,f=[],d=e;if(!u&&c&&l&&e.constructor===dm)return e;if((c||jv(qv,e))&&(e=e.source,l&&(t=Wv(d))),e=void 0===e?"":Vv(e),t=void 0===t?"":Vv(t),d=e,Kv&&"dotAll"in am&&(n=!!t&&nm(t,"s")>-1)&&(t=rm(t,/s/g,"")),r=t,cm&&"sticky"in am&&(i=!!t&&nm(t,"y")>-1)&&lm&&(t=rm(t,/y/g,"")),zv&&(o=function(e){for(var t,r=e.length,n=0,i="",o=[],a={},s=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(t=tm(e,n)))t+=tm(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:em(om,im(e,n+1))&&(n+=2,u=!0),i+=t,c++;continue;case">"===t&&u:if(""===l||Hv(a,l))throw new $v("Invalid capture group name");a[l]=!0,o[o.length]=[l,c],u=!1,l="";continue}u?l+=t:i+=t}return[i,o]}(e),e=o[0],f=o[1]),a=Mv(Qv(e,t),u?this:qv,dm),(n||i||f.length)&&(s=Xv(a),n&&(s.dotAll=!0,s.raw=dm(function(e){for(var t,r=e.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(t=tm(e,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+tm(e,++n);return i}(e),r)),i&&(s.sticky=!0),f.length&&(s.groups=f)),e!==d)try{Nv(a,"source",""===d?"(?:)":d)}catch(e){}return a},hm=Dv(Qv),pm=0;hm.length>pm;)Gv(dm,Qv,hm[pm++]);qv.constructor=dm,dm.prototype=qv,Zv(Pv,"RegExp",dm,{constructor:!0})}Yv("RegExp");const vm=["none","error","warn","info","debug"];var mm="undefined"!=typeof r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ym=[],gm=[],bm="undefined"!=typeof Uint8Array?Uint8Array:Array,_m=!1;function Sm(){_m=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)ym[t]=e[t],gm[e.charCodeAt(t)]=t;gm["-".charCodeAt(0)]=62,gm["_".charCodeAt(0)]=63}function Em(e){return ym[e>>18&63]+ym[e>>12&63]+ym[e>>6&63]+ym[63&e]}function wm(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(Em(n));return i.join("")}function Tm(e){var t;_m||Sm();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(wm(e,s,s+a>u?u:s+a));return 1===n?(t=e[r-1],i+=ym[t>>2],i+=ym[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=ym[t>>10],i+=ym[t>>4&63],i+=ym[t<<2&63],i+="="),o.push(i),o.join("")}function Im(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)}function Rm(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*v}var Cm={}.toString,km=Array.isArray||function(e){return"[object Array]"==Cm.call(e)};function Am(){return Pm.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Om(e,t){if(Am()<t)throw new RangeError("Invalid typed array length");return Pm.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Pm.prototype:(null===e&&(e=new Pm(t)),e.length=t),e}function Pm(e,t,r){if(!(Pm.TYPED_ARRAY_SUPPORT||this instanceof Pm))return new Pm(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Mm(this,e)}return xm(this,e,t,r)}function xm(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);Pm.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Pm.prototype:e=Nm(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!Pm.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Um(t,r);e=Om(e,n);var i=e.write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(jm(t)){var r=0|Dm(t.length);return 0===(e=Om(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Om(e,0):Nm(e,t);if("Buffer"===t.type&&km(t.data))return Nm(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Lm(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Mm(e,t){if(Lm(t),e=Om(e,t<0?0:0|Dm(t)),!Pm.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Nm(e,t){var r=t.length<0?0:0|Dm(t.length);e=Om(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function Dm(e){if(e>=Am())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Am().toString(16)+" bytes");return 0|e}function jm(e){return!(null==e||!e._isBuffer)}function Um(e,t){if(jm(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return fy(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return dy(e).length;default:if(n)return fy(e).length;t=(""+t).toLowerCase(),n=!0}}function Vm(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ey(this,t,r);case"utf8":case"utf-8":return Jm(this,t,r);case"ascii":return qm(this,t,r);case"latin1":case"binary":return $m(this,t,r);case"base64":return zm(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ty(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Wm(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Bm(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Pm.from(t,n)),jm(t))return 0===t.length?-1:Gm(e,t,r,n,i);if("number"==typeof t)return t&=255,Pm.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Gm(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Gm(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function Zm(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function Fm(e,t,r,n){return hy(fy(t,e.length-r),e,r,n)}function Hm(e,t,r,n){return hy(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function Xm(e,t,r,n){return Hm(e,t,r,n)}function Ym(e,t,r,n){return hy(dy(t),e,r,n)}function Km(e,t,r,n){return hy(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function zm(e,t,r){return 0===t&&r===e.length?Tm(e):Tm(e.slice(t,r))}function Jm(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=Qm)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Qm));return r}(n)}Pm.TYPED_ARRAY_SUPPORT=void 0===mm.TYPED_ARRAY_SUPPORT||mm.TYPED_ARRAY_SUPPORT,Am(),Pm.poolSize=8192,Pm._augment=function(e){return e.__proto__=Pm.prototype,e},Pm.from=function(e,t,r){return xm(null,e,t,r)},Pm.TYPED_ARRAY_SUPPORT&&(Pm.prototype.__proto__=Uint8Array.prototype,Pm.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Pm[Symbol.species]),Pm.alloc=function(e,t,r){return function(e,t,r,n){return Lm(t),t<=0?Om(e,t):void 0!==r?"string"==typeof n?Om(e,t).fill(r,n):Om(e,t).fill(r):Om(e,t)}(null,e,t,r)},Pm.allocUnsafe=function(e){return Mm(null,e)},Pm.allocUnsafeSlow=function(e){return Mm(null,e)},Pm.isBuffer=py,Pm.compare=function(e,t){if(!jm(e)||!jm(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},Pm.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Pm.concat=function(e,t){if(!km(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Pm.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Pm.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!jm(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Pm.byteLength=Um,Pm.prototype._isBuffer=!0,Pm.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Wm(this,t,t+1);return this},Pm.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Wm(this,t,t+3),Wm(this,t+1,t+2);return this},Pm.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Wm(this,t,t+7),Wm(this,t+1,t+6),Wm(this,t+2,t+5),Wm(this,t+3,t+4);return this},Pm.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Jm(this,0,e):Vm.apply(this,arguments)},Pm.prototype.equals=function(e){if(!jm(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Pm.compare(this,e)},Pm.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Pm.prototype.compare=function(e,t,r,n,i){if(!jm(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},Pm.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Pm.prototype.indexOf=function(e,t,r){return Bm(this,e,t,r,!0)},Pm.prototype.lastIndexOf=function(e,t,r){return Bm(this,e,t,r,!1)},Pm.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return Zm(this,e,t,r);case"utf8":case"utf-8":return Fm(this,e,t,r);case"ascii":return Hm(this,e,t,r);case"latin1":case"binary":return Xm(this,e,t,r);case"base64":return Ym(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Km(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Pm.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qm=4096;function qm(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function $m(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function ey(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=ly(e[o]);return i}function ty(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function ry(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function ny(e,t,r,n,i,o){if(!jm(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function iy(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function oy(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function ay(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function sy(e,t,r,n,i){return i||ay(e,0,r,4),Rm(e,t,r,n,23,4),r+4}function uy(e,t,r,n,i){return i||ay(e,0,r,8),Rm(e,t,r,n,52,8),r+8}Pm.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Pm.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Pm.prototype;else{var i=t-e;r=new Pm(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},Pm.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||ry(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},Pm.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||ry(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Pm.prototype.readUInt8=function(e,t){return t||ry(e,1,this.length),this[e]},Pm.prototype.readUInt16LE=function(e,t){return t||ry(e,2,this.length),this[e]|this[e+1]<<8},Pm.prototype.readUInt16BE=function(e,t){return t||ry(e,2,this.length),this[e]<<8|this[e+1]},Pm.prototype.readUInt32LE=function(e,t){return t||ry(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Pm.prototype.readUInt32BE=function(e,t){return t||ry(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Pm.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||ry(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},Pm.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||ry(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Pm.prototype.readInt8=function(e,t){return t||ry(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Pm.prototype.readInt16LE=function(e,t){t||ry(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Pm.prototype.readInt16BE=function(e,t){t||ry(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Pm.prototype.readInt32LE=function(e,t){return t||ry(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Pm.prototype.readInt32BE=function(e,t){return t||ry(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Pm.prototype.readFloatLE=function(e,t){return t||ry(e,4,this.length),Im(this,e,!0,23,4)},Pm.prototype.readFloatBE=function(e,t){return t||ry(e,4,this.length),Im(this,e,!1,23,4)},Pm.prototype.readDoubleLE=function(e,t){return t||ry(e,8,this.length),Im(this,e,!0,52,8)},Pm.prototype.readDoubleBE=function(e,t){return t||ry(e,8,this.length),Im(this,e,!1,52,8)},Pm.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||ny(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},Pm.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||ny(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},Pm.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,1,255,0),Pm.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Pm.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,2,65535,0),Pm.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):iy(this,e,t,!0),t+2},Pm.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,2,65535,0),Pm.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):iy(this,e,t,!1),t+2},Pm.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,4,4294967295,0),Pm.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):oy(this,e,t,!0),t+4},Pm.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,4,4294967295,0),Pm.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):oy(this,e,t,!1),t+4},Pm.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);ny(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},Pm.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);ny(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},Pm.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,1,127,-128),Pm.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Pm.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,2,32767,-32768),Pm.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):iy(this,e,t,!0),t+2},Pm.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,2,32767,-32768),Pm.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):iy(this,e,t,!1),t+2},Pm.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,4,2147483647,-2147483648),Pm.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):oy(this,e,t,!0),t+4},Pm.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||ny(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Pm.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):oy(this,e,t,!1),t+4},Pm.prototype.writeFloatLE=function(e,t,r){return sy(this,e,t,!0,r)},Pm.prototype.writeFloatBE=function(e,t,r){return sy(this,e,t,!1,r)},Pm.prototype.writeDoubleLE=function(e,t,r){return uy(this,e,t,!0,r)},Pm.prototype.writeDoubleBE=function(e,t,r){return uy(this,e,t,!1,r)},Pm.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!Pm.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},Pm.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Pm.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=jm(e)?e:fy(new Pm(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var cy=/[^+\/0-9A-Za-z-_]/g;function ly(e){return e<16?"0"+e.toString(16):e.toString(16)}function fy(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function dy(e){return function(e){var t,r,n,i,o,a;_m||Sm();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new bm(3*s/4-o),n=o>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)i=gm[e.charCodeAt(t)]<<18|gm[e.charCodeAt(t+1)]<<12|gm[e.charCodeAt(t+2)]<<6|gm[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=gm[e.charCodeAt(t)]<<2|gm[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=gm[e.charCodeAt(t)]<<10|gm[e.charCodeAt(t+1)]<<4|gm[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(cy,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function hy(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function py(e){return null!=e&&(!!e._isBuffer||vy(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&vy(e.slice(0,0))}(e))}function vy(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function my(){throw new Error("setTimeout has not been defined")}function yy(){throw new Error("clearTimeout has not been defined")}var gy=my,by=yy;function _y(e){if(gy===setTimeout)return setTimeout(e,0);if((gy===my||!gy)&&setTimeout)return gy=setTimeout,setTimeout(e,0);try{return gy(e,0)}catch(t){try{return gy.call(null,e,0)}catch(t){return gy.call(this,e,0)}}}"function"==typeof mm.setTimeout&&(gy=setTimeout),"function"==typeof mm.clearTimeout&&(by=clearTimeout);var Sy,Ey=[],wy=!1,Ty=-1;function Iy(){wy&&Sy&&(wy=!1,Sy.length?Ey=Sy.concat(Ey):Ty=-1,Ey.length&&Ry())}function Ry(){if(!wy){var e=_y(Iy);wy=!0;for(var t=Ey.length;t;){for(Sy=Ey,Ey=[];++Ty<t;)Sy&&Sy[Ty].run();Ty=-1,t=Ey.length}Sy=null,wy=!1,function(e){if(by===clearTimeout)return clearTimeout(e);if((by===yy||!by)&&clearTimeout)return by=clearTimeout,clearTimeout(e);try{return by(e)}catch(t){try{return by.call(null,e)}catch(t){return by.call(this,e)}}}(e)}}function Cy(e,t){this.fun=e,this.array=t}Cy.prototype.run=function(){this.fun.apply(null,this.array)};var ky=mm.performance||{};function Ay(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}ky.now||ky.mozNow||ky.msNow||ky.oNow||ky.webkitNow;var Oy={exports:{}};!function(e){e.exports=function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(!s&&Ay)return Ay(a);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o=Ay,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){var n=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,i,a,s,u,c,l=[],f=0,d=e.length,h=d,p="string"!==n.getTypeOf(e);f<e.length;)h=d-f,i=p?(t=e[f++],r=f<d?e[f++]:0,f<d?e[f++]:0):(t=e.charCodeAt(f++),r=f<d?e.charCodeAt(f++):0,f<d?e.charCodeAt(f++):0),a=t>>2,s=(3&t)<<4|r>>4,u=1<h?(15&r)<<2|i>>6:64,c=2<h?63&i:64,l.push(o.charAt(a)+o.charAt(s)+o.charAt(u)+o.charAt(c));return l.join("")},r.decode=function(e){var t,r,n,a,s,u,c=0,l=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var d,h=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=i.uint8array?new Uint8Array(0|h):new Array(0|h);c<e.length;)t=o.indexOf(e.charAt(c++))<<2|(a=o.indexOf(e.charAt(c++)))>>4,r=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,n=(3&s)<<6|(u=o.indexOf(e.charAt(c++))),d[l++]=t,64!==s&&(d[l++]=r),64!==u&&(d[l++]=n);return d}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var o=i,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var o=i,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=n?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new u("Deflate",e)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,r,i,a,l){var f,d,h=e.file,p=e.compression,v=l!==s.utf8encode,m=o.transformTo("string",l(h.name)),y=o.transformTo("string",s.utf8encode(h.name)),g=h.comment,b=o.transformTo("string",l(g)),_=o.transformTo("string",s.utf8encode(g)),S=y.length!==h.name.length,E=_.length!==g.length,w="",T="",I="",R=h.dir,C=h.date,k={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var A=0;t&&(A|=8),v||!S&&!E||(A|=2048);var O=0,P=0;R&&(O|=16),"UNIX"===a?(P=798,O|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,R)):(P=20,O|=function(e){return 63&(e||0)}(h.dosPermissions)),f=C.getUTCHours(),f<<=6,f|=C.getUTCMinutes(),f<<=5,f|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),S&&(T=n(1,1)+n(u(m),4)+y,w+="up"+n(T.length,2)+T),E&&(I=n(1,1)+n(u(b),4)+_,w+="uc"+n(I.length,2)+I);var x="";return x+="\n\0",x+=n(A,2),x+=p.magic,x+=n(f,2),x+=n(d,2),x+=n(k.crc32,4),x+=n(k.compressedSize,4),x+=n(k.uncompressedSize,4),x+=n(m.length,2),x+=n(w.length,2),{fileRecord:c.LOCAL_FILE_HEADER+x+m+w,dirRecord:c.CENTRAL_FILE_HEADER+n(P,2)+x+n(b.length,2)+"\0\0\0\0"+n(O,4)+n(i,4)+m+w+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function l(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,a),l.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,a){var s=o.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var o=new i(t.streamFiles,r,t.platform,t.encodeFileName),a=0;try{e.forEach((function(e,r){a++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),s=r.options.compressionOptions||t.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),i=e("./external"),o=e("./utf8"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function c(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new s);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new a(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,a=0;a<o.length;a++){var s=o[a],u=s.fileNameStr,c=n.resolve(s.fileNameStr);r.file(c,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(r.file(c).unsafeOriginalName=u)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function i(e,t,r){n.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),r&&r(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:void 0!==Pm,newBufferFrom:function(e,t){if(Pm.from&&Pm.from!==Uint8Array.from)return Pm.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Pm(e,t)},allocBuffer:function(e){if(Pm.alloc)return Pm.alloc(e);var t=new Pm(e);return t.fill(0),t},isBuffer:function(e){return py(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var n,i=o.getTypeOf(t),s=o.extend(r||{},u);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=v(e)),s.createFolders&&(n=p(e))&&m.call(this,n,!0);var f="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!f),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var y=null;y=t instanceof c||t instanceof a?t:d.isNode&&d.isStream(t)?new h(e,t):o.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var g=new l(e,y,s);this.files[e]=g}var i=e("./utf8"),o=e("./utils"),a=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),u=e("./defaults"),c=e("./compressedObject"),l=e("./zipObject"),f=e("./generate"),d=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},v=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:u.createFolders,e=v(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var g={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(y(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(y(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");o.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=f.generateWorker(this,r,n)}catch(e){(t=new a("error")).error(e)}return new s(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=g},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),i=e("../utils");function o(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,n),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),i=e("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,n),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),u=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,t){return new u.Promise((function(r,i){var o=[],s=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,r){o.push(e),t&&t(r)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return a.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Pm.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,o),c);r(e)}catch(e){i(e)}o=[]})).resume()}))}function f(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=r,n.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer=void 0!==Pm,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),a=e("./stream/GenericWorker"),s=new Array(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,o,a=e.length,u=new Array(2*a);for(t=r=0;t<a;)if((i=e[t++])<128)u[r++]=i;else if(4<(o=s[i]))u[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<a;)i=i<<6|63&e[t++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(c,a),c.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(t),u=t;a!==t.length&&(i.uint8array?(u=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(u=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(u),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function u(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],i=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function l(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=l;var d={};d.string={string:s,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},d.array={string:l,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},d.arraybuffer={string:function(e){return l(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:l,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return o.newBufferFrom(e)}},d.nodebuffer={string:l,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:s},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return d[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&o.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,o,s,c){return a.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var l=r.getTypeOf(t);return l?("arraybuffer"===l?t=r.transformTo("uint8array",t):"string"===l&&(c?t=i.decode(t):o&&!0!==s&&(t=function(e){return u(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),a=e("./zipEntry"),s=(e("./utf8"),e("./support"));function u(e){this.files=[],this.loadOptions=e}u.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),u=e("./compressions"),c=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<c.length;f++)n.prototype[c[f]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var u=new e.MessageChannel;u.port1.onmessage=l,r=function(){u.port2.postMessage(0)}}var c=[];function l(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,void 0!==c?c:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(e,t,r){n((function(){var n;try{n=t(r)}catch(n){return o.reject(e,n)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var a=p((function(){t(i,n)}));"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(i);return this.state!==u?f(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(d,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,u=-1,c=new this(i);++u<r;)l(e[u],u);return c;function l(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==r||n||(n=!0,o.resolve(c,a))}),(function(e){n||(n=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a,s=-1,u=new this(i);++s<r;)a=e[s],t.resolve(a).then((function(e){n||(n=!0,o.resolve(u,e))}),(function(e){n||(n=!0,o.reject(u,e))}));return u}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,c=0,l=-1,f=0,d=8;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({level:l,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==c)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[r]);this._dict_set=!0}}function p(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(e,t){var r,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(l),s.next_out=0,s.avail_out=l),1!==(r=n.deflate(s,a))&&r!==c)return this.onEnd(r),!(this.ended=!0);0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c):2!==a||(this.onEnd(c),!(s.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=h,r.deflate=p,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),l=Object.prototype.toString;function f(e){if(!(this instanceof f))return new f(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var r=new f(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}f.prototype.push=function(e,t){var r,s,u,c,f,d,h=this.strm,p=this.options.chunkSize,v=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&v&&(d="string"==typeof v?o.string2buf(v):"[object ArrayBuffer]"===l.call(v)?new Uint8Array(v):v,r=n.inflateSetDictionary(this.strm,d)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,f=o.buf2string(h.output,u),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(h.avail_out=0))},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=f,r.inflate=d,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,r.string2buf=function(e){var t,r,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,s=t||e.length,c=new Array(2*s);for(r=n=0;r<s;)if((i=e[r++])<128)c[n++]=i;else if(4<(o=a[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<s;)i=i<<6|63&e[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,r){var n,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),u=e("./messages"),c=0,l=4,f=0,d=-2,h=-1,p=4,v=2,m=8,y=9,g=286,b=30,_=19,S=2*g+1,E=15,w=3,T=258,I=T+w+1,R=42,C=113,k=1,A=2,O=3,P=4;function x(e,t){return e.msg=u[t],t}function L(e){return(e<<1)-(4<e?9:0)}function M(e){for(var t=e.length;0<=--t;)e[t]=0}function N(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function j(e,t){e.pending_buf[e.pending++]=t}function U(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function V(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-I?e.strstart-(e.w_size-I):0,c=e.window,l=e.w_mask,f=e.prev,d=e.strstart+T,h=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+a]===p&&c[r+a-1]===h&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<d);if(n=T-(d-o),o=d-T,a<n){if(e.match_start=t,s<=(a=n))break;h=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function W(e){var t,r,n,o,u,c,l,f,d,h,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-I)){for(i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;n=e.head[--t],e.head[t]=p<=n?n-p:0,--r;);for(t=r=p;n=e.prev[--t],e.prev[t]=p<=n?n-p:0,--r;);o+=p}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,f=e.strstart+e.lookahead,h=void 0,(d=o)<(h=c.avail_in)&&(h=d),r=0===h?0:(c.avail_in-=h,i.arraySet(l,c.input,c.next_in,h,f),1===c.state.wrap?c.adler=a(c.adler,l,h,f):2===c.state.wrap&&(c.adler=s(c.adler,l,h,f)),c.next_in+=h,c.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=w)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+w-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<w)););}while(e.lookahead<I&&0!==e.strm.avail_in)}function B(e,t){for(var r,n;;){if(e.lookahead<I){if(W(e),e.lookahead<I&&t===c)return k;if(0===e.lookahead)break}if(r=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-I&&(e.match_length=V(e,r)),e.match_length>=w){if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-w),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=w){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(D(e,!1),0===e.strm.avail_out))return k}return e.insert=e.strstart<w-1?e.strstart:w-1,t===l?(D(e,!0),0===e.strm.avail_out?O:P):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?k:A}function G(e,t){for(var r,n,i;;){if(e.lookahead<I){if(W(e),e.lookahead<I&&t===c)return k;if(0===e.lookahead)break}if(r=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=w-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-I&&(e.match_length=V(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===w&&4096<e.strstart-e.match_start)&&(e.match_length=w-1)),e.prev_length>=w&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-w,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-w),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=w-1,e.strstart++,n&&(D(e,!1),0===e.strm.avail_out))return k}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&D(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return k}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<w-1?e.strstart:w-1,t===l?(D(e,!0),0===e.strm.avail_out?O:P):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?k:A}function Z(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function F(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*S),this.dyn_dtree=new i.Buf16(2*(2*b+1)),this.bl_tree=new i.Buf16(2*(2*_+1)),M(this.dyn_ltree),M(this.dyn_dtree),M(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(E+1),this.heap=new i.Buf16(2*g+1),M(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*g+1),M(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function H(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=v,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?R:C,e.adler=2===t.wrap?0:1,t.last_flush=c,o._tr_init(t),f):x(e,d)}function X(e){var t=H(e);return t===f&&function(e){e.window_size=2*e.w_size,M(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=w-1,e.match_available=0,e.ins_h=0}(e.state),t}function Y(e,t,r,n,o,a){if(!e)return d;var s=1;if(t===h&&(t=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),o<1||y<o||r!==m||n<8||15<n||t<0||9<t||a<0||p<a)return x(e,d);8===n&&(n=9);var u=new F;return(e.state=u).strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+w-1)/w),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=r,X(e)}n=[new Z(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(W(e),0===e.lookahead&&t===c)return k;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,D(e,!1),0===e.strm.avail_out))return k;if(e.strstart-e.block_start>=e.w_size-I&&(D(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?O:P):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),k)})),new Z(4,4,8,4,B),new Z(4,5,16,8,B),new Z(4,6,32,32,B),new Z(4,4,16,16,G),new Z(8,16,32,32,G),new Z(8,16,128,128,G),new Z(8,32,128,256,G),new Z(32,128,258,1024,G),new Z(32,258,258,4096,G)],r.deflateInit=function(e,t){return Y(e,t,m,15,8,0)},r.deflateInit2=Y,r.deflateReset=X,r.deflateResetKeep=H,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,f):d},r.deflate=function(e,t){var r,i,a,u;if(!e||!e.state||5<t||t<0)return e?x(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==l)return x(e,0===e.avail_out?-5:d);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===R)if(2===i.wrap)e.adler=0,j(i,31),j(i,139),j(i,8),i.gzhead?(j(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),j(i,255&i.gzhead.time),j(i,i.gzhead.time>>8&255),j(i,i.gzhead.time>>16&255),j(i,i.gzhead.time>>24&255),j(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),j(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(j(i,255&i.gzhead.extra.length),j(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(j(i,0),j(i,0),j(i,0),j(i,0),j(i,0),j(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),j(i,3),i.status=C);else{var h=m+(i.w_bits-8<<4)<<8;h|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=C,U(i,h),0!==i.strstart&&(U(i,e.adler>>>16),U(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending!==i.pending_buf_size));)j(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,j(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,j(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&N(e),i.pending+2<=i.pending_buf_size&&(j(i,255&e.adler),j(i,e.adler>>8&255),e.adler=0,i.status=C)):i.status=C),0!==i.pending){if(N(e),0===e.avail_out)return i.last_flush=-1,f}else if(0===e.avail_in&&L(t)<=L(r)&&t!==l)return x(e,-5);if(666===i.status&&0!==e.avail_in)return x(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(W(e),0===e.lookahead)){if(t===c)return k;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?O:P):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?k:A}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=T){if(W(e),e.lookahead<=T&&t===c)return k;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=w&&0<e.strstart&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+T;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=T-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=w?(r=o._tr_tally(e,1,e.match_length-w),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(D(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?O:P):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?k:A}(i,t):n[i.level].func(i,t);if(p!==O&&p!==P||(i.status=666),p===k||p===O)return 0===e.avail_out&&(i.last_flush=-1),f;if(p===A&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(M(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),N(e),0===e.avail_out))return i.last_flush=-1,f}return t!==l?f:i.wrap<=0?1:(2===i.wrap?(j(i,255&e.adler),j(i,e.adler>>8&255),j(i,e.adler>>16&255),j(i,e.adler>>24&255),j(i,255&e.total_in),j(i,e.total_in>>8&255),j(i,e.total_in>>16&255),j(i,e.total_in>>24&255)):(U(i,e.adler>>>16),U(i,65535&e.adler)),N(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?f:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==R&&69!==t&&73!==t&&91!==t&&103!==t&&t!==C&&666!==t?x(e,d):(e.state=null,t===C?x(e,-3):f):d},r.deflateSetDictionary=function(e,t){var r,n,o,s,u,c,l,h,p=t.length;if(!e||!e.state)return d;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==R||r.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(M(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),u=e.avail_in,c=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,W(r);r.lookahead>=w;){for(n=r.strstart,o=r.lookahead-(w-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+w-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=w-1,W(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=w-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=u,r.wrap=s,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_,S,E,w,T,I,R;r=e.state,n=e.next_in,I=e.input,i=n+(e.avail_in-5),o=e.next_out,R=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,d=r.window,h=r.hold,p=r.bits,v=r.lencode,m=r.distcode,y=(1<<r.lenbits)-1,g=(1<<r.distbits)-1;e:do{p<15&&(h+=I[n++]<<p,p+=8,h+=I[n++]<<p,p+=8),b=v[h&y];t:for(;;){if(h>>>=_=b>>>24,p-=_,0==(_=b>>>16&255))R[o++]=65535&b;else{if(!(16&_)){if(!(64&_)){b=v[(65535&b)+(h&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}S=65535&b,(_&=15)&&(p<_&&(h+=I[n++]<<p,p+=8),S+=h&(1<<_)-1,h>>>=_,p-=_),p<15&&(h+=I[n++]<<p,p+=8,h+=I[n++]<<p,p+=8),b=m[h&g];r:for(;;){if(h>>>=_=b>>>24,p-=_,!(16&(_=b>>>16&255))){if(!(64&_)){b=m[(65535&b)+(h&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&b,p<(_&=15)&&(h+=I[n++]<<p,(p+=8)<_&&(h+=I[n++]<<p,p+=8)),u<(E+=h&(1<<_)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=_,p-=_,(_=o-a)<E){if(l<(_=E-_)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(T=d,(w=0)===f){if(w+=c-_,_<S){for(S-=_;R[o++]=d[w++],--_;);w=o-E,T=R}}else if(f<_){if(w+=c+f-_,(_-=f)<S){for(S-=_;R[o++]=d[w++],--_;);if(w=0,f<S){for(S-=_=f;R[o++]=d[w++],--_;);w=o-E,T=R}}}else if(w+=f-_,_<S){for(S-=_;R[o++]=d[w++],--_;);w=o-E,T=R}for(;2<S;)R[o++]=T[w++],R[o++]=T[w++],R[o++]=T[w++],S-=3;S&&(R[o++]=T[w++],1<S&&(R[o++]=T[w++]))}else{for(w=o-E;R[o++]=R[w++],R[o++]=R[w++],R[o++]=R[w++],2<(S-=3););S&&(R[o++]=R[w++],1<S&&(R[o++]=R[w++]))}break}}break}}while(n<i&&o<s);n-=S=p>>3,h&=(1<<(p-=S<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<s?s-o+257:257-(o-s),r.hold=h,r.bits=p}},{}],49:[function(e,t,r){var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=1,c=2,l=0,f=-2,d=1,h=852,p=592;function v(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=d,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(h),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,l):f}function g(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):f}function b(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,g(e))):f}function _(e,t){var r,n;return e?(n=new m,(e.state=n).window=null,(r=b(e,t))!==l&&(e.state=null),r):f}var S,E,w=!0;function T(e){if(w){var t;for(S=new n.Buf32(512),E=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,S,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,E,0,e.work,{bits:5}),w=!1}e.lencode=S,e.lenbits=9,e.distcode=E,e.distbits=5}function I(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}r.inflateReset=g,r.inflateReset2=b,r.inflateResetKeep=y,r.inflateInit=function(e){return _(e,15)},r.inflateInit2=_,r.inflate=function(e,t){var r,h,p,m,y,g,b,_,S,E,w,R,C,k,A,O,P,x,L,M,N,D,j,U,V=0,W=new n.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return f;12===(r=e.state).mode&&(r.mode=13),y=e.next_out,p=e.output,b=e.avail_out,m=e.next_in,h=e.input,g=e.avail_in,_=r.hold,S=r.bits,E=g,w=b,D=l;e:for(;;)switch(r.mode){case d:if(0===r.wrap){r.mode=13;break}for(;S<16;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(2&r.wrap&&35615===_){W[r.check=0]=255&_,W[1]=_>>>8&255,r.check=o(r.check,W,2,0),S=_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&_)){e.msg="unknown compression method",r.mode=30;break}if(S-=4,N=8+(15&(_>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=512&_?10:12,S=_=0;break;case 2:for(;S<16;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(r.flags=_,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(W[0]=255&_,W[1]=_>>>8&255,r.check=o(r.check,W,2,0)),S=_=0,r.mode=3;case 3:for(;S<32;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.head&&(r.head.time=_),512&r.flags&&(W[0]=255&_,W[1]=_>>>8&255,W[2]=_>>>16&255,W[3]=_>>>24&255,r.check=o(r.check,W,4,0)),S=_=0,r.mode=4;case 4:for(;S<16;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(W[0]=255&_,W[1]=_>>>8&255,r.check=o(r.check,W,2,0)),S=_=0,r.mode=5;case 5:if(1024&r.flags){for(;S<16;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(W[0]=255&_,W[1]=_>>>8&255,r.check=o(r.check,W,2,0)),S=_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(R=r.length)&&(R=g),R&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,m,R,N)),512&r.flags&&(r.check=o(r.check,h,R,m)),g-=R,m+=R,r.length-=R),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(R=0;N=h[m+R++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N)),N&&R<g;);if(512&r.flags&&(r.check=o(r.check,h,R,m)),g-=R,m+=R,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(R=0;N=h[m+R++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N)),N&&R<g;);if(512&r.flags&&(r.check=o(r.check,h,R,m)),g-=R,m+=R,N)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;S<16;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(_!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}S=_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;S<32;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}e.adler=r.check=v(_),S=_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=y,e.avail_out=b,e.next_in=m,e.avail_in=g,r.hold=_,r.bits=S,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){_>>>=7&S,S-=7&S,r.mode=27;break}for(;S<3;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}switch(r.last=1&_,S-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(T(r),r.mode=20,6!==t)break;_>>>=2,S-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}_>>>=2,S-=2;break;case 14:for(_>>>=7&S,S-=7&S;S<32;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&_,S=_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(R=r.length){if(g<R&&(R=g),b<R&&(R=b),0===R)break e;n.arraySet(p,h,m,R,y),g-=R,m+=R,b-=R,y+=R,r.length-=R;break}r.mode=12;break;case 17:for(;S<14;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(r.nlen=257+(31&_),_>>>=5,S-=5,r.ndist=1+(31&_),_>>>=5,S-=5,r.ncode=4+(15&_),_>>>=4,S-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;S<3;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.lens[B[r.have++]]=7&_,_>>>=3,S-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},D=s(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,D){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;O=(V=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,P=65535&V,!((A=V>>>24)<=S);){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(P<16)_>>>=A,S-=A,r.lens[r.have++]=P;else{if(16===P){for(U=A+2;S<U;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(_>>>=A,S-=A,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}N=r.lens[r.have-1],R=3+(3&_),_>>>=2,S-=2}else if(17===P){for(U=A+3;S<U;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}S-=A,N=0,R=3+(7&(_>>>=A)),_>>>=3,S-=3}else{for(U=A+7;S<U;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}S-=A,N=0,R=11+(127&(_>>>=A)),_>>>=7,S-=7}if(r.have+R>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;R--;)r.lens[r.have++]=N}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,j={bits:r.lenbits},D=s(u,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,D){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},D=s(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,D){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=b){e.next_out=y,e.avail_out=b,e.next_in=m,e.avail_in=g,r.hold=_,r.bits=S,a(e,w),y=e.next_out,p=e.output,b=e.avail_out,m=e.next_in,h=e.input,g=e.avail_in,_=r.hold,S=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;O=(V=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,P=65535&V,!((A=V>>>24)<=S);){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(O&&!(240&O)){for(x=A,L=O,M=P;O=(V=r.lencode[M+((_&(1<<x+L)-1)>>x)])>>>16&255,P=65535&V,!(x+(A=V>>>24)<=S);){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}_>>>=x,S-=x,r.back+=x}if(_>>>=A,S-=A,r.back+=A,r.length=P,0===O){r.mode=26;break}if(32&O){r.back=-1,r.mode=12;break}if(64&O){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&O,r.mode=22;case 22:if(r.extra){for(U=r.extra;S<U;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,S-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;O=(V=r.distcode[_&(1<<r.distbits)-1])>>>16&255,P=65535&V,!((A=V>>>24)<=S);){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(!(240&O)){for(x=A,L=O,M=P;O=(V=r.distcode[M+((_&(1<<x+L)-1)>>x)])>>>16&255,P=65535&V,!(x+(A=V>>>24)<=S);){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}_>>>=x,S-=x,r.back+=x}if(_>>>=A,S-=A,r.back+=A,64&O){e.msg="invalid distance code",r.mode=30;break}r.offset=P,r.extra=15&O,r.mode=24;case 24:if(r.extra){for(U=r.extra;S<U;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,S-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===b)break e;if(R=w-b,r.offset>R){if((R=r.offset-R)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}C=R>r.wnext?(R-=r.wnext,r.wsize-R):r.wnext-R,R>r.length&&(R=r.length),k=r.window}else k=p,C=y-r.offset,R=r.length;for(b<R&&(R=b),b-=R,r.length-=R;p[y++]=k[C++],--R;);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;p[y++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;S<32;){if(0===g)break e;g--,_|=h[m++]<<S,S+=8}if(w-=b,e.total_out+=w,r.total+=w,w&&(e.adler=r.check=r.flags?o(r.check,p,w,y-w):i(r.check,p,w,y-w)),w=b,(r.flags?_:v(_))!==r.check){e.msg="incorrect data check",r.mode=30;break}S=_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;S<32;){if(0===g)break e;g--,_+=h[m++]<<S,S+=8}if(_!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}S=_=0}r.mode=29;case 29:D=1;break e;case 30:D=-3;break e;case 31:return-4;default:return f}return e.next_out=y,e.avail_out=b,e.next_in=m,e.avail_in=g,r.hold=_,r.bits=S,(r.wsize||w!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&I(e,e.output,e.next_out,w-e.avail_out)?(r.mode=31,-4):(E-=e.avail_in,w-=e.avail_out,e.total_in+=E,e.total_out+=w,r.total+=w,r.wrap&&w&&(e.adler=r.check=r.flags?o(r.check,p,w,e.next_out-w):i(r.check,p,w,e.next_out-w)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==E&&0===w||4===t)&&D===l&&(D=-5),D)},r.inflateEnd=function(e){if(!e||!e.state)return f;var t=e.state;return t.window&&(t.window=null),e.state=null,l},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,l):f},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?f:11===r.mode&&i(1,t,n,0)!==r.check?-3:I(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,l):f},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,c,l,f,d){var h,p,v,m,y,g,b,_,S,E=d.bits,w=0,T=0,I=0,R=0,C=0,k=0,A=0,O=0,P=0,x=0,L=null,M=0,N=new n.Buf16(16),D=new n.Buf16(16),j=null,U=0;for(w=0;w<=15;w++)N[w]=0;for(T=0;T<u;T++)N[t[r+T]]++;for(C=E,R=15;1<=R&&0===N[R];R--);if(R<C&&(C=R),0===R)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(I=1;I<R&&0===N[I];I++);for(C<I&&(C=I),w=O=1;w<=15;w++)if(O<<=1,(O-=N[w])<0)return-1;if(0<O&&(0===e||1!==R))return-1;for(D[1]=0,w=1;w<15;w++)D[w+1]=D[w]+N[w];for(T=0;T<u;T++)0!==t[r+T]&&(f[D[t[r+T]]++]=T);if(g=0===e?(L=j=f,19):1===e?(L=i,M-=257,j=o,U-=257,256):(L=a,j=s,-1),w=I,y=l,A=T=x=0,v=-1,m=(P=1<<(k=C))-1,1===e&&852<P||2===e&&592<P)return 1;for(;;){for(b=w-A,S=f[T]<g?(_=0,f[T]):f[T]>g?(_=j[U+f[T]],L[M+f[T]]):(_=96,0),h=1<<w-A,I=p=1<<k;c[y+(x>>A)+(p-=h)]=b<<24|_<<16|S,0!==p;);for(h=1<<w-1;x&h;)h>>=1;if(0!==h?(x&=h-1,x+=h):x=0,T++,0==--N[w]){if(w===R)break;w=t[r+f[T]]}if(C<w&&(x&m)!==v){for(0===A&&(A=C),y+=I,O=1<<(k=w-A);k+A<R&&!((O-=N[k+A])<=0);)k++,O<<=1;if(P+=1<<k,1===e&&852<P||2===e&&592<P)return 1;c[v=x&m]=C<<24|k<<16|y-l}}return 0!==x&&(c[y+x]=w-A<<24|64<<16),d.bits=C,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var n=e("../utils/common"),i=0,o=1;function a(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,u=29,c=256,l=c+1+u,f=30,d=19,h=2*l+1,p=15,v=16,m=7,y=256,g=16,b=17,_=18,S=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(l+2));a(I);var R=new Array(2*f);a(R);var C=new Array(512);a(C);var k=new Array(256);a(k);var A=new Array(u);a(A);var O,P,x,L=new Array(f);function M(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function N(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function D(e){return e<256?C[e]:C[256+(e>>>7)]}function j(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function U(e,t,r){e.bi_valid>v-r?(e.bi_buf|=t<<e.bi_valid&65535,j(e,e.bi_buf),e.bi_buf=t>>v-e.bi_valid,e.bi_valid+=r-v):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function V(e,t,r){U(e,r[2*t],r[2*t+1])}function W(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function B(e,t,r){var n,i,o=new Array(p+1),a=0;for(n=1;n<=p;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=W(o[s]++,s))}}function G(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<f;t++)e.dyn_dtree[2*t]=0;for(t=0;t<d;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*y]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Z(e){8<e.bi_valid?j(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function F(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function H(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&F(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!F(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function X(e,t,r){var n,i,o,a,s=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===n?V(e,i,t):(V(e,(o=k[i])+c+1,t),0!==(a=S[o])&&U(e,i-=A[o],a),V(e,o=D(--n),r),0!==(a=E[o])&&U(e,n-=L[o],a)),s<e.last_lit;);V(e,y,t)}function Y(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=h,r=0;r<u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)H(e,o,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],H(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,H(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,v=t.stat_desc.extra_base,m=t.stat_desc.max_length,y=0;for(o=0;o<=p;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<h;r++)m<(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)&&(o=m,y++),u[2*n+1]=o,c<n||(e.bl_count[o]++,a=0,v<=n&&(a=d[n-v]),s=u[2*n],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*n+1]+a)));if(0!==y){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,y-=2}while(0<y);for(o=m;0!==o;o--)for(n=e.bl_count[o];0!==n;)c<(i=e.heap[--r])||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),B(o,c,e.bl_count)}function K(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*g]++):s<=10?e.bl_tree[2*b]++:e.bl_tree[2*_]++,o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))}function z(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s<u&&i===a)){if(s<c)for(;V(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(V(e,i,e.bl_tree),s--),V(e,g,e.bl_tree),U(e,s-3,2)):s<=10?(V(e,b,e.bl_tree),U(e,s-3,3)):(V(e,_,e.bl_tree),U(e,s-11,7));o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}}a(L);var J=!1;function Q(e,t,r,i){U(e,(s<<1)+(i?1:0),3),function(e,t,r,i){Z(e),i&&(j(e,r),j(e,~r)),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}r._tr_init=function(e){J||(function(){var e,t,r,n,i,o=new Array(p+1);for(n=r=0;n<u-1;n++)for(A[n]=r,e=0;e<1<<S[n];e++)k[r++]=n;for(k[r-1]=n,n=i=0;n<16;n++)for(L[n]=i,e=0;e<1<<E[n];e++)C[i++]=n;for(i>>=7;n<f;n++)for(L[n]=i<<7,e=0;e<1<<E[n]-7;e++)C[256+i++]=n;for(t=0;t<=p;t++)o[t]=0;for(e=0;e<=143;)I[2*e+1]=8,e++,o[8]++;for(;e<=255;)I[2*e+1]=9,e++,o[9]++;for(;e<=279;)I[2*e+1]=7,e++,o[7]++;for(;e<=287;)I[2*e+1]=8,e++,o[8]++;for(B(I,l+1,o),e=0;e<f;e++)R[2*e+1]=5,R[2*e]=W(e,5);O=new M(I,S,c+1,l,p),P=new M(R,E,0,f,p),x=new M(new Array(0),w,0,d,m)}(),J=!0),e.l_desc=new N(e.dyn_ltree,O),e.d_desc=new N(e.dyn_dtree,P),e.bl_desc=new N(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,G(e)},r._tr_stored_block=Q,r._tr_flush_block=function(e,t,r,n){var a,s,u=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return o;return i}(e)),Y(e,e.l_desc),Y(e,e.d_desc),u=function(e){var t;for(K(e,e.dyn_ltree,e.l_desc.max_code),K(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=d-1;3<=t&&0===e.bl_tree[2*T[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=r+5,r+4<=a&&-1!==t?Q(e,t,r,n):4===e.strategy||s===a?(U(e,2+(n?1:0),3),X(e,I,R)):(U(e,4+(n?1:0),3),function(e,t,r,n){var i;for(U(e,t-257,5),U(e,r-1,5),U(e,n-4,4),i=0;i<n;i++)U(e,e.bl_tree[2*T[i]+1],3);z(e,e.dyn_ltree,t-1),z(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),X(e,e.dyn_ltree,e.dyn_dtree)),G(e),n&&Z(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(k[r]+c+1)]++,e.dyn_dtree[2*D(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){U(e,2,3),V(e,y,I),function(e){16===e.bi_valid?(j(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e,t){if(!e.setImmediate){var r,n,i,o,a=1,s={},u=!1,c=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,r="[object process]"==={}.toString.call(e.process)?function(e){!function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ey.push(new Cy(e,t)),1!==Ey.length||wy||_y(Ry)}((function(){d(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(d,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return s[a]=i,r(a),a++},l.clearImmediate=f}function f(e){delete s[e]}function d(e){if(u)setTimeout(d,0,e);else{var r=s[e];if(r){u=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{f(e),u=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&d(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==c?c:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}(Oy);var Py=Oy.exports,xy="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ly=on,My=function(e,t,r){for(var n in t)Ly(e,n,t[n],r);return e},Ny=fn,Dy=gn,jy=RangeError,Uy=function(e){if(void 0===e)return 0;var t=Ny(e),r=Dy(t);if(t!==r)throw jy("Wrong length or index");return r},Vy=Array,Wy=Math.abs,By=Math.pow,Gy=Math.floor,Zy=Math.log,Fy=Math.LN2,Hy={pack:function(e,t,r){var n,i,o,a=Vy(r),s=8*r-t-1,u=(1<<s)-1,c=u>>1,l=23===t?By(2,-24)-By(2,-77):0,f=e<0||0===e&&1/e<0?1:0,d=0;for((e=Wy(e))!=e||e===1/0?(i=e!=e?1:0,n=u):(n=Gy(Zy(e)/Fy),e*(o=By(2,-n))<1&&(n--,o*=2),(e+=n+c>=1?l/o:l*By(2,1-c))*o>=2&&(n++,o/=2),n+c>=u?(i=0,n=u):n+c>=1?(i=(e*o-1)*By(2,t),n+=c):(i=e*By(2,c-1)*By(2,t),n=0));t>=8;)a[d++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)a[d++]=255&n,n/=256,s-=8;return a[--d]|=128*f,a},unpack:function(e,t){var r,n=e.length,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)r=256*r+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-1/0:1/0;r+=By(2,t),l-=a}return(c?-1:1)*r*By(2,l-t)}},Xy=Ze,Yy=vn,Ky=_n,zy=function(e){for(var t=Xy(this),r=Ky(t),n=arguments.length,i=Yy(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,a=void 0===o?r:Yy(o,r);a>i;)t[i++]=e;return t},Jy=bt,Qy=Nt,qy=O,$y=function(e,t,r){var n=Jy(t);n in e?Qy.f(e,n,qy(0,r)):e[n]=r},eg=vn,tg=_n,rg=$y,ng=Array,ig=Math.max,og=function(e,t,r){for(var n=tg(e),i=eg(t,n),o=eg(void 0===r?n:r,n),a=ng(ig(o-i,0)),s=0;i<o;i++,s++)rg(a,s,e[i]);return a.length=s,a},ag=m,sg=D,ug=b,cg=xy,lg=sr,fg=er,dg=My,hg=g,pg=Ai,vg=fn,mg=gn,yg=Uy,gg=Hy,bg=yl,_g=yi,Sg=an.f,Eg=Nt.f,wg=zy,Tg=og,Ig=Si,Rg=lg.PROPER,Cg=lg.CONFIGURABLE,kg=Br.get,Ag=Br.set,Og="ArrayBuffer",Pg="DataView",xg="prototype",Lg="Wrong index",Mg=ag[Og],Ng=Mg,Dg=Ng&&Ng[xg],jg=ag[Pg],Ug=jg&&jg[xg],Vg=Object.prototype,Wg=ag.Array,Bg=ag.RangeError,Gg=sg(wg),Zg=sg([].reverse),Fg=gg.pack,Hg=gg.unpack,Xg=function(e){return[255&e]},Yg=function(e){return[255&e,e>>8&255]},Kg=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},zg=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Jg=function(e){return Fg(e,23,4)},Qg=function(e){return Fg(e,52,8)},qg=function(e,t){Eg(e[xg],t,{get:function(){return kg(this)[t]}})},$g=function(e,t,r,n){var i=yg(r),o=kg(e);if(i+t>o.byteLength)throw Bg(Lg);var a=kg(o.buffer).bytes,s=i+o.byteOffset,u=Tg(a,s,s+t);return n?u:Zg(u)},eb=function(e,t,r,n,i,o){var a=yg(r),s=kg(e);if(a+t>s.byteLength)throw Bg(Lg);for(var u=kg(s.buffer).bytes,c=a+s.byteOffset,l=n(+i),f=0;f<t;f++)u[c+f]=l[o?f:t-f-1]};if(cg){var tb=Rg&&Mg.name!==Og;if(hg((function(){Mg(1)}))&&hg((function(){new Mg(-1)}))&&!hg((function(){return new Mg,new Mg(1.5),new Mg(NaN),tb&&!Cg})))tb&&Cg&&fg(Mg,"name",Og);else{(Ng=function(e){return pg(this,Dg),new Mg(yg(e))})[xg]=Dg;for(var rb,nb=Sg(Mg),ib=0;nb.length>ib;)(rb=nb[ib++])in Ng||fg(Ng,rb,Mg[rb]);Dg.constructor=Ng}_g&&bg(Ug)!==Vg&&_g(Ug,Vg);var ob=new jg(new Ng(2)),ab=sg(Ug.setInt8);ob.setInt8(0,2147483648),ob.setInt8(1,2147483649),!ob.getInt8(0)&&ob.getInt8(1)||dg(Ug,{setInt8:function(e,t){ab(this,e,t<<24>>24)},setUint8:function(e,t){ab(this,e,t<<24>>24)}},{unsafe:!0})}else Ng=function(e){pg(this,Dg);var t=yg(e);Ag(this,{bytes:Gg(Wg(t),0),byteLength:t}),ug||(this.byteLength=t)},Dg=Ng[xg],jg=function(e,t,r){pg(this,Ug),pg(e,Dg);var n=kg(e).byteLength,i=vg(t);if(i<0||i>n)throw Bg("Wrong offset");if(i+(r=void 0===r?n-i:mg(r))>n)throw Bg("Wrong length");Ag(this,{buffer:e,byteLength:r,byteOffset:i}),ug||(this.buffer=e,this.byteLength=r,this.byteOffset=i)},Ug=jg[xg],ug&&(qg(Ng,"byteLength"),qg(jg,"buffer"),qg(jg,"byteLength"),qg(jg,"byteOffset")),dg(Ug,{getInt8:function(e){return $g(this,1,e)[0]<<24>>24},getUint8:function(e){return $g(this,1,e)[0]},getInt16:function(e){var t=$g(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=$g(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return zg($g(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return zg($g(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Hg($g(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Hg($g(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){eb(this,1,e,Xg,t)},setUint8:function(e,t){eb(this,1,e,Xg,t)},setInt16:function(e,t){eb(this,2,e,Yg,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){eb(this,2,e,Yg,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){eb(this,4,e,Kg,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){eb(this,4,e,Kg,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){eb(this,4,e,Jg,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){eb(this,8,e,Qg,t,arguments.length>2?arguments[2]:void 0)}});Ig(Ng,Og),Ig(jg,Pg);var sb={ArrayBuffer:Ng,DataView:jg},ub=ci,cb=D,lb=g,fb=Wt,db=vn,hb=gn,pb=co,vb=sb.ArrayBuffer,mb=sb.DataView,yb=mb.prototype,gb=cb(vb.prototype.slice),bb=cb(yb.getUint8),_b=cb(yb.setUint8);ub({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:lb((function(){return!new vb(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(gb&&void 0===t)return gb(fb(this),e);for(var r=fb(this).byteLength,n=db(e,r),i=db(void 0===t?r:t,r),o=new(pb(this,vb))(hb(i-n)),a=new mb(this),s=new mb(o),u=0;n<i;)_b(s,u++,bb(a,n++));return o}});var Sb,Eb,wb,Tb={exports:{}},Ib=xy,Rb=b,Cb=m,kb=Q,Ab=$,Ob=Xe,Pb=ji,xb=Ee,Lb=er,Mb=on,Nb=Nt.f,Db=ne,jb=yl,Ub=yi,Vb=ut,Wb=Qe,Bb=Br.enforce,Gb=Br.get,Zb=Cb.Int8Array,Fb=Zb&&Zb.prototype,Hb=Cb.Uint8ClampedArray,Xb=Hb&&Hb.prototype,Yb=Zb&&jb(Zb),Kb=Fb&&jb(Fb),zb=Object.prototype,Jb=Cb.TypeError,Qb=Vb("toStringTag"),qb=Wb("TYPED_ARRAY_TAG"),$b="TypedArrayConstructor",e_=Ib&&!!Ub&&"Opera"!==Pb(Cb.opera),t_=!1,r_={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},n_={BigInt64Array:8,BigUint64Array:8},i_=function(e){var t=jb(e);if(Ab(t)){var r=Gb(t);return r&&Ob(r,$b)?r[$b]:i_(t)}},o_=function(e){if(!Ab(e))return!1;var t=Pb(e);return Ob(r_,t)||Ob(n_,t)};for(Sb in r_)(wb=(Eb=Cb[Sb])&&Eb.prototype)?Bb(wb)[$b]=Eb:e_=!1;for(Sb in n_)(wb=(Eb=Cb[Sb])&&Eb.prototype)&&(Bb(wb)[$b]=Eb);if((!e_||!kb(Yb)||Yb===Function.prototype)&&(Yb=function(){throw Jb("Incorrect invocation")},e_))for(Sb in r_)Cb[Sb]&&Ub(Cb[Sb],Yb);if((!e_||!Kb||Kb===zb)&&(Kb=Yb.prototype,e_))for(Sb in r_)Cb[Sb]&&Ub(Cb[Sb].prototype,Kb);if(e_&&jb(Xb)!==Kb&&Ub(Xb,Kb),Rb&&!Ob(Kb,Qb))for(Sb in t_=!0,Nb(Kb,Qb,{get:function(){return Ab(this)?this[qb]:void 0}}),r_)Cb[Sb]&&Lb(Cb[Sb],qb,Sb);var a_={NATIVE_ARRAY_BUFFER_VIEWS:e_,TYPED_ARRAY_TAG:t_&&qb,aTypedArray:function(e){if(o_(e))return e;throw Jb("Target is not a typed array")},aTypedArrayConstructor:function(e){if(kb(e)&&(!Ub||Db(Yb,e)))return e;throw Jb(xb(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(Rb){if(r)for(var i in r_){var o=Cb[i];if(o&&Ob(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}Kb[e]&&!r||Mb(Kb,e,r?t:e_&&Fb[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(Rb){if(Ub){if(r)for(n in r_)if((i=Cb[n])&&Ob(i,e))try{delete i[e]}catch(e){}if(Yb[e]&&!r)return;try{return Mb(Yb,e,r?t:e_&&Yb[e]||t)}catch(e){}}for(n in r_)!(i=Cb[n])||i[e]&&!r||Mb(i,e,t)}},getTypedArrayConstructor:i_,isView:function(e){if(!Ab(e))return!1;var t=Pb(e);return"DataView"===t||Ob(r_,t)||Ob(n_,t)},isTypedArray:o_,TypedArray:Yb,TypedArrayPrototype:Kb},s_=m,u_=g,c_=Cu,l_=a_.NATIVE_ARRAY_BUFFER_VIEWS,f_=s_.ArrayBuffer,d_=s_.Int8Array,h_=!l_||!u_((function(){d_(1)}))||!u_((function(){new d_(-1)}))||!c_((function(e){new d_,new d_(null),new d_(1.5),new d_(e)}),!0)||u_((function(){return 1!==new d_(new f_(2),1,void 0).length})),p_=$,v_=Math.floor,m_=Number.isInteger||function(e){return!p_(e)&&isFinite(e)&&v_(e)===e},y_=fn,g_=RangeError,b_=function(e){var t=y_(e);if(t<0)throw g_("The argument can't be less than 0");return t},__=RangeError,S_=function(e,t){var r=b_(e);if(r%t)throw __("Wrong offset");return r},E_=bo,w_=w,T_=oo,I_=Ze,R_=_n,C_=iu,k_=Qs,A_=Xs,O_=a_.aTypedArrayConstructor,P_=ci,x_=m,L_=w,M_=b,N_=h_,D_=a_,j_=sb,U_=Ai,V_=O,W_=er,B_=m_,G_=gn,Z_=Uy,F_=S_,H_=bt,X_=Xe,Y_=ji,K_=$,z_=_e,J_=$c,Q_=ne,q_=yi,$_=an.f,eS=function(e){var t,r,n,i,o,a,s=T_(this),u=I_(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,d=k_(u);if(d&&!A_(d))for(a=(o=C_(u,d)).next,u=[];!(i=w_(a,o)).done;)u.push(i.value);for(f&&c>2&&(l=E_(l,arguments[2])),r=R_(u),n=new(O_(s))(r),t=0;r>t;t++)n[t]=f?l(u[t],t):u[t];return n},tS=$d.forEach,rS=Ri,nS=Nt,iS=y,oS=kv,aS=Br.get,sS=Br.set,uS=Br.enforce,cS=nS.f,lS=iS.f,fS=Math.round,dS=x_.RangeError,hS=j_.ArrayBuffer,pS=hS.prototype,vS=j_.DataView,mS=D_.NATIVE_ARRAY_BUFFER_VIEWS,yS=D_.TYPED_ARRAY_TAG,gS=D_.TypedArray,bS=D_.TypedArrayPrototype,_S=D_.aTypedArrayConstructor,SS=D_.isTypedArray,ES="BYTES_PER_ELEMENT",wS="Wrong length",TS=function(e,t){_S(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},IS=function(e,t){cS(e,t,{get:function(){return aS(this)[t]}})},RS=function(e){var t;return Q_(pS,e)||"ArrayBuffer"==(t=Y_(e))||"SharedArrayBuffer"==t},CS=function(e,t){return SS(e)&&!z_(t)&&t in e&&B_(+t)&&t>=0},kS=function(e,t){return t=H_(t),CS(e,t)?V_(2,e[t]):lS(e,t)},AS=function(e,t,r){return t=H_(t),!(CS(e,t)&&K_(r)&&X_(r,"value"))||X_(r,"get")||X_(r,"set")||r.configurable||X_(r,"writable")&&!r.writable||X_(r,"enumerable")&&!r.enumerable?cS(e,t,r):(e[t]=r.value,e)};M_?(mS||(iS.f=kS,nS.f=AS,IS(bS,"buffer"),IS(bS,"byteOffset"),IS(bS,"byteLength"),IS(bS,"length")),P_({target:"Object",stat:!0,forced:!mS},{getOwnPropertyDescriptor:kS,defineProperty:AS}),Tb.exports=function(e,t,r){var n=e.match(/\d+$/)[0]/8,i=e+(r?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=x_[i],u=s,c=u&&u.prototype,l={},f=function(e,t){cS(e,t,{get:function(){return function(e,t){var r=aS(e);return r.view[o](t*n+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var o=aS(e);r&&(i=(i=fS(i))<0?0:i>255?255:255&i),o.view[a](t*n+o.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};mS?N_&&(u=t((function(e,t,r,i){return U_(e,c),oS(K_(t)?RS(t)?void 0!==i?new s(t,F_(r,n),i):void 0!==r?new s(t,F_(r,n)):new s(t):SS(t)?TS(u,t):L_(eS,u,t):new s(Z_(t)),e,u)})),q_&&q_(u,gS),tS($_(s),(function(e){e in u||W_(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,r,i){U_(e,c);var o,a,s,l=0,d=0;if(K_(t)){if(!RS(t))return SS(t)?TS(u,t):L_(eS,u,t);o=t,d=F_(r,n);var h=t.byteLength;if(void 0===i){if(h%n)throw dS(wS);if((a=h-d)<0)throw dS(wS)}else if((a=G_(i)*n)+d>h)throw dS(wS);s=a/n}else s=Z_(t),o=new hS(a=s*n);for(sS(e,{buffer:o,byteOffset:d,byteLength:a,length:s,view:new vS(o)});l<s;)f(e,l++)})),q_&&q_(u,gS),c=u.prototype=J_(bS)),c.constructor!==u&&W_(c,"constructor",u),uS(c).TypedArrayConstructor=u,yS&&W_(c,yS,i);var d=u!=s;l[i]=u,P_({global:!0,constructor:!0,forced:d,sham:!mS},l),ES in u||W_(u,ES,n),ES in c||W_(c,ES,n),rS(i)}):Tb.exports=function(){},(0,Tb.exports)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var OS=mt,PS=TypeError,xS=zy,LS=function(e){var t=OS(e,"number");if("number"==typeof t)throw PS("Can't convert number to bigint");return BigInt(t)},MS=ji,NS=w,DS=g,jS=a_.aTypedArray,US=a_.exportTypedArrayMethod,VS=D("".slice);US("fill",(function(e){var t=arguments.length;jS(this);var r="Big"===VS(MS(this),0,3)?LS(e):+e;return NS(xS,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),DS((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var WS=m,BS=w,GS=a_,ZS=_n,FS=S_,HS=Ze,XS=g,YS=WS.RangeError,KS=WS.Int8Array,zS=KS&&KS.prototype,JS=zS&&zS.set,QS=GS.aTypedArray,qS=GS.exportTypedArrayMethod,$S=!XS((function(){var e=new Uint8ClampedArray(2);return BS(JS,e,{length:1,0:3},1),3!==e[1]})),eE=$S&&GS.NATIVE_ARRAY_BUFFER_VIEWS&&XS((function(){var e=new KS(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));qS("set",(function(e){QS(this);var t=FS(arguments.length>1?arguments[1]:void 0,1),r=HS(e);if($S)return BS(JS,this,r,t);var n=this.length,i=ZS(r),o=0;if(i+t>n)throw YS("Wrong length");for(;o<i;)this[t+o]=r[o++]}),!$S||eE);var tE=og,rE=Math.floor,nE=function(e,t){var r=e.length,n=rE(r/2);return r<8?iE(e,t):oE(e,nE(tE(e,0,n),t),nE(tE(e,n),t),t)},iE=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},oE=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},aE=nE,sE=ie.match(/firefox\/(\d+)/i),uE=!!sE&&+sE[1],cE=/MSIE|Trident/.test(ie),lE=ie.match(/AppleWebKit\/(\d+)\./),fE=!!lE&&+lE[1],dE=D,hE=g,pE=Re,vE=aE,mE=uE,yE=cE,gE=fe,bE=fE,_E=a_.aTypedArray,SE=a_.exportTypedArrayMethod,EE=m.Uint16Array,wE=EE&&dE(EE.prototype.sort),TE=!(!wE||hE((function(){wE(new EE(2),null)}))&&hE((function(){wE(new EE(2),{})}))),IE=!!wE&&!hE((function(){if(gE)return gE<74;if(mE)return mE<67;if(yE)return!0;if(bE)return bE<602;var e,t,r=new EE(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(wE(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));SE("sort",(function(e){return void 0!==e&&pE(e),IE?wE(this,e):vE(_E(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!IE||TE);var RE,CE={exports:{}},kE={exports:{}},AE=l(Object.freeze({__proto__:null,default:{}}));function OE(){return RE||(RE=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==c&&c.crypto&&(r=c.crypto),!r)try{r=AE}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new u.init(t,e)}}),l=o.enc={},f=l.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=a)this._doProcessBlock(i,f);r=i.splice(0,c),n.sigBytes-=l}return new u.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new v.HMAC.init(e,r).finalize(t)}}});var v=o.algo={};return o}(Math),t)}(kE)),kE.exports}var PE,xE={exports:{}};function LE(){return PE||(PE=1,function(e){var t;e.exports=(t=OE(),function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=r.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),t)}(xE)),xE.exports}var ME,NE={exports:{}};function DE(){return ME||(ME=1,function(e){var t;e.exports=(t=OE(),function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,r=e.init,n=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],i=0;i<t;i++)n[i>>>2]|=e[i]<<24-i%4*8;r.call(this,n,t)}else r.apply(this,arguments)};n.prototype=e}}(),t.lib.WordArray)}(NE)),NE.exports}var jE,UE={exports:{}};function VE(){return jE||(jE=1,function(e){var t;e.exports=(t=OE(),function(){var e=t,r=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return r.create(n,2*t)}}}(),t.enc.Utf16)}(UE)),UE.exports}var WE,BE={exports:{}};function GE(){return WE||(WE=1,function(e){var t;e.exports=(t=OE(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(BE)),BE.exports}var ZE,FE={exports:{}};function HE(){return ZE||(ZE=1,function(e){var t;e.exports=(t=OE(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u<n;u++)o.push(i.charAt(s>>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<i.length;a++)o[i.charCodeAt(a)]=a}var s=i.charAt(64);if(s){var u=e.indexOf(s);-1!==u&&(r=u)}return n(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),t.enc.Base64url)}(FE)),FE.exports}var XE,YE={exports:{}};function KE(){return XE||(XE=1,function(e){var t;e.exports=(t=OE(),function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],h=e[t+2],p=e[t+3],v=e[t+4],m=e[t+5],y=e[t+6],g=e[t+7],b=e[t+8],_=e[t+9],S=e[t+10],E=e[t+11],w=e[t+12],T=e[t+13],I=e[t+14],R=e[t+15],C=o[0],k=o[1],A=o[2],O=o[3];C=c(C,k,A,O,a,7,s[0]),O=c(O,C,k,A,u,12,s[1]),A=c(A,O,C,k,h,17,s[2]),k=c(k,A,O,C,p,22,s[3]),C=c(C,k,A,O,v,7,s[4]),O=c(O,C,k,A,m,12,s[5]),A=c(A,O,C,k,y,17,s[6]),k=c(k,A,O,C,g,22,s[7]),C=c(C,k,A,O,b,7,s[8]),O=c(O,C,k,A,_,12,s[9]),A=c(A,O,C,k,S,17,s[10]),k=c(k,A,O,C,E,22,s[11]),C=c(C,k,A,O,w,7,s[12]),O=c(O,C,k,A,T,12,s[13]),A=c(A,O,C,k,I,17,s[14]),C=l(C,k=c(k,A,O,C,R,22,s[15]),A,O,u,5,s[16]),O=l(O,C,k,A,y,9,s[17]),A=l(A,O,C,k,E,14,s[18]),k=l(k,A,O,C,a,20,s[19]),C=l(C,k,A,O,m,5,s[20]),O=l(O,C,k,A,S,9,s[21]),A=l(A,O,C,k,R,14,s[22]),k=l(k,A,O,C,v,20,s[23]),C=l(C,k,A,O,_,5,s[24]),O=l(O,C,k,A,I,9,s[25]),A=l(A,O,C,k,p,14,s[26]),k=l(k,A,O,C,b,20,s[27]),C=l(C,k,A,O,T,5,s[28]),O=l(O,C,k,A,h,9,s[29]),A=l(A,O,C,k,g,14,s[30]),C=f(C,k=l(k,A,O,C,w,20,s[31]),A,O,m,4,s[32]),O=f(O,C,k,A,b,11,s[33]),A=f(A,O,C,k,E,16,s[34]),k=f(k,A,O,C,I,23,s[35]),C=f(C,k,A,O,u,4,s[36]),O=f(O,C,k,A,v,11,s[37]),A=f(A,O,C,k,g,16,s[38]),k=f(k,A,O,C,S,23,s[39]),C=f(C,k,A,O,T,4,s[40]),O=f(O,C,k,A,a,11,s[41]),A=f(A,O,C,k,p,16,s[42]),k=f(k,A,O,C,y,23,s[43]),C=f(C,k,A,O,_,4,s[44]),O=f(O,C,k,A,w,11,s[45]),A=f(A,O,C,k,R,16,s[46]),C=d(C,k=f(k,A,O,C,h,23,s[47]),A,O,a,6,s[48]),O=d(O,C,k,A,g,10,s[49]),A=d(A,O,C,k,I,15,s[50]),k=d(k,A,O,C,m,21,s[51]),C=d(C,k,A,O,w,6,s[52]),O=d(O,C,k,A,p,10,s[53]),A=d(A,O,C,k,S,15,s[54]),k=d(k,A,O,C,u,21,s[55]),C=d(C,k,A,O,b,6,s[56]),O=d(O,C,k,A,R,10,s[57]),A=d(A,O,C,k,y,15,s[58]),k=d(k,A,O,C,T,21,s[59]),C=d(C,k,A,O,v,6,s[60]),O=d(O,C,k,A,E,10,s[61]),A=d(A,O,C,k,h,15,s[62]),k=d(k,A,O,C,_,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+k|0,o[2]=o[2]+A|0,o[3]=o[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}r.MD5=o._createHelper(u),r.HmacMD5=o._createHmacHelper(u)}(Math),t.MD5)}(YE)),YE.exports}var zE,JE={exports:{}};function QE(){return zE||(zE=1,function(e){var t;e.exports=(t=OE(),function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],u=r[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(n<<5|n>>>27)+u+a[c];f+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,u=s,s=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),t.SHA1)}(JE)),JE.exports}var qE,$E={exports:{}};function ew(){return qE||(qE=1,function(e){var t;e.exports=(t=OE(),function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[h-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=v+c[h-7]+y+c[h-16]}var g=n&i^n&o^i&o,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[h]+c[h];d=f,f=l,l=s,s=a+_|0,a=o,o=i,i=n,n=_+(b+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=o._createHelper(l),r.HmacSHA256=o._createHmacHelper(l)}(Math),t.SHA256)}($E)),$E.exports}var tw,rw={exports:{}};var nw,iw={exports:{}};function ow(){return nw||(nw=1,function(e){var t;e.exports=(t=OE(),LE(),function(){var e=t,r=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=r.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=n.high,p=n.low,v=i.high,m=i.low,y=o.high,g=o.low,b=a.high,_=a.low,S=s.high,E=s.low,w=l.high,T=l.low,I=f.high,R=f.low,C=d.high,k=d.low,A=h,O=p,P=v,x=m,L=y,M=g,N=b,D=_,j=S,U=E,V=w,W=T,B=I,G=R,Z=C,F=k,H=0;H<80;H++){var X,Y,K=c[H];if(H<16)Y=K.high=0|e[t+2*H],X=K.low=0|e[t+2*H+1];else{var z=c[H-15],J=z.high,Q=z.low,q=(J>>>1|Q<<31)^(J>>>8|Q<<24)^J>>>7,$=(Q>>>1|J<<31)^(Q>>>8|J<<24)^(Q>>>7|J<<25),ee=c[H-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[H-7],ae=oe.high,se=oe.low,ue=c[H-16],ce=ue.high,le=ue.low;Y=(Y=(Y=q+ae+((X=$+se)>>>0<$>>>0?1:0))+ne+((X+=ie)>>>0<ie>>>0?1:0))+ce+((X+=le)>>>0<le>>>0?1:0),K.high=Y,K.low=X}var fe,de=j&V^~j&B,he=U&W^~U&G,pe=A&P^A&L^P&L,ve=O&x^O&M^x&M,me=(A>>>28|O<<4)^(A<<30|O>>>2)^(A<<25|O>>>7),ye=(O>>>28|A<<4)^(O<<30|A>>>2)^(O<<25|A>>>7),ge=(j>>>14|U<<18)^(j>>>18|U<<14)^(j<<23|U>>>9),be=(U>>>14|j<<18)^(U>>>18|j<<14)^(U<<23|j>>>9),_e=u[H],Se=_e.high,Ee=_e.low,we=Z+ge+((fe=F+be)>>>0<F>>>0?1:0),Te=ye+ve;Z=B,F=G,B=V,G=W,V=j,W=U,j=N+(we=(we=(we=we+de+((fe+=he)>>>0<he>>>0?1:0))+Se+((fe+=Ee)>>>0<Ee>>>0?1:0))+Y+((fe+=X)>>>0<X>>>0?1:0))+((U=D+fe|0)>>>0<D>>>0?1:0)|0,N=L,D=M,L=P,M=x,P=A,x=O,A=we+(me+pe+(Te>>>0<ye>>>0?1:0))+((O=fe+Te|0)>>>0<fe>>>0?1:0)|0}p=n.low=p+O,n.high=h+A+(p>>>0<O>>>0?1:0),m=i.low=m+x,i.high=v+P+(m>>>0<x>>>0?1:0),g=o.low=g+M,o.high=y+L+(g>>>0<M>>>0?1:0),_=a.low=_+D,a.high=b+N+(_>>>0<D>>>0?1:0),E=s.low=E+U,s.high=S+j+(E>>>0<U>>>0?1:0),T=l.low=T+W,l.high=w+V+(T>>>0<W>>>0?1:0),R=f.low=R+G,f.high=I+B+(R>>>0<G>>>0?1:0),k=d.low=k+F,d.high=C+Z+(k>>>0<F>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=r._createHelper(l),e.HmacSHA512=r._createHmacHelper(l)}(),t.SHA512)}(iw)),iw.exports}var aw,sw={exports:{}};var uw,cw={exports:{}};function lw(){return uw||(uw=1,function(e){var t;e.exports=(t=OE(),LE(),function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64.Word,s=r.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,d=0;d<7;d++){if(1&i){var h=(1<<d)-1;h<32?f^=1<<h:s^=1<<h-32}128&i?i=i<<1^113:i<<=1}l[o]=a.create(s,f)}}();var f=[];!function(){for(var e=0;e<25;e++)f[e]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(k=r[i]).high^=a,k.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var h=0,p=0,v=0;v<5;v++)h^=(k=r[d+5*v]).high,p^=k.low;var m=f[d];m.high=h,m.low=p}for(d=0;d<5;d++){var y=f[(d+4)%5],g=f[(d+1)%5],b=g.high,_=g.low;for(h=y.high^(b<<1|_>>>31),p=y.low^(_<<1|b>>>31),v=0;v<5;v++)(k=r[d+5*v]).high^=h,k.low^=p}for(var S=1;S<25;S++){var E=(k=r[S]).high,w=k.low,T=u[S];T<32?(h=E<<T|w>>>32-T,p=w<<T|E>>>32-T):(h=w<<T-32|E>>>64-T,p=E<<T-32|w>>>64-T);var I=f[c[S]];I.high=h,I.low=p}var R=f[0],C=r[0];for(R.high=C.high,R.low=C.low,d=0;d<5;d++)for(v=0;v<5;v++){var k=r[S=d+5*v],A=f[S],O=f[(d+1)%5+5*v],P=f[(d+2)%5+5*v];k.high=A.high^~O.high&P.high,k.low=A.low^~O.low&P.low}k=r[0];var x=l[s];k.high^=x.high,k.low^=x.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;l++){var f=a[l],d=f.high,h=f.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=o._createHelper(d),r.HmacSHA3=o._createHmacHelper(d)}(Math),t.SHA3)}(cw)),cw.exports}var fw,dw={exports:{}};var hw,pw={exports:{}};function vw(){return hw||(hw=1,function(e){var t;e.exports=(t=OE(),void function(){var e=t,r=e.lib.Base,n=e.enc.Utf8;e.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,u=a.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}())}(pw)),pw.exports}var mw,yw={exports:{}};var gw,bw={exports:{}};function _w(){return gw||(gw=1,function(e){var t;e.exports=(t=OE(),QE(),vw(),function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,u=n.keySize,c=n.iterations;s.length<u;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*u,a}});e.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}}(),t.EvpKDF)}(bw)),bw.exports}var Sw,Ew={exports:{}};function ww(){return Sw||(Sw=1,function(e){var t;e.exports=(t=OE(),_w(),void(t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var u=s.Base64,c=r.algo.EvpKDF,l=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:y}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=f.CBC=function(){var t=d.extend();function r(t,r,n){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<n;a++)t[r+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var u=o.create(a,n);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var v=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:t})}},y=n.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return v.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(r.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=c.create({keySize:t+r,hasher:i}).compute(e,n);else var a=c.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,v.create({key:a,iv:s,salt:n})}},b=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:g}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,y.decrypt.call(this,e,t,i.key,n)}})}()))}(Ew)),Ew.exports}var Tw,Iw={exports:{}};function Rw(){return Tw||(Tw=1,function(e){var t;e.exports=(t=OE(),ww(),t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function r(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i,n),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);r.call(this,e,t,i,n),this._prevBlock=o}}),e}(),t.mode.CFB)}(Iw)),Iw.exports}var Cw,kw={exports:{}};function Aw(){return Cw||(Cw=1,function(e){var t,r,n;e.exports=(n=OE(),ww(),n.mode.CTR=(t=n.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=a[s]}}),t.Decryptor=r,t),n.mode.CTR)}(kw)),kw.exports}var Ow,Pw={exports:{}};function xw(){return Ow||(Ow=1,function(e){var t;e.exports=(t=OE(),ww(),t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function r(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=r(e[0]))&&(e[1]=r(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var u=0;u<i;u++)e[t+u]^=s[u]}});return e.Decryptor=i,e}(),t.mode.CTRGladman)}(Pw)),Pw.exports}var Lw,Mw={exports:{}};function Nw(){return Lw||(Lw=1,function(e){var t,r,n;e.exports=(n=OE(),ww(),n.mode.OFB=(t=n.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),t.Decryptor=r,t),n.mode.OFB)}(Mw)),Mw.exports}var Dw,jw={exports:{}};var Uw,Vw={exports:{}};var Ww,Bw={exports:{}};var Gw,Zw={exports:{}};var Fw,Hw={exports:{}};var Xw,Yw={exports:{}};var Kw,zw={exports:{}};var Jw,Qw={exports:{}};var qw,$w={exports:{}};function eT(){return qw||(qw=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib,n=r.WordArray,i=r.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&l[u])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function h(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(f);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),t.TripleDES)}($w)),$w.exports}var tT,rT={exports:{}};var nT,iT={exports:{}};var oT,aT={exports:{}};var sT,uT={exports:{}};function cT(){return sT||(sT=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function u(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=u(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function l(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=u(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function f(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,u=0,l=0;for(let t=0;t<i+2;t+=2)l=c(e,s,u),s=l.left,u=l.right,e.pbox[t]=s,e.pbox[t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)l=c(e,s,u),s=l.left,u=l.right,e.sbox[t][r]=s,e.sbox[t][r+1]=u;return!0}var d=n.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;f(s,t,r)}},encryptBlock:function(e,t){var r=c(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=l(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=r._createHelper(d)}(),t.Blowfish)}(uT)),uT.exports}!function(e){var t;e.exports=(t=OE(),LE(),DE(),VE(),GE(),HE(),KE(),QE(),ew(),tw||(tw=1,function(e){var t;e.exports=(t=OE(),ew(),function(){var e=t,r=e.lib.WordArray,n=e.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),t.SHA224)}(rw)),ow(),aw||(aw=1,function(e){var t;e.exports=(t=OE(),LE(),ow(),function(){var e=t,r=e.x64,n=r.Word,i=r.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),t.SHA384)}(sw)),lw(),fw||(fw=1,function(e){var t;e.exports=(t=OE(),function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,d,b,_,S,E,w,T,I,R,C,k=this._hash.words,A=l.words,O=f.words,P=a.words,x=s.words,L=u.words,M=c.words;for(E=o=k[0],w=d=k[1],T=b=k[2],I=_=k[3],R=S=k[4],r=0;r<80;r+=1)C=o+e[t+P[r]]|0,C+=r<16?h(d,b,_)+A[0]:r<32?p(d,b,_)+A[1]:r<48?v(d,b,_)+A[2]:r<64?m(d,b,_)+A[3]:y(d,b,_)+A[4],C=(C=g(C|=0,L[r]))+S|0,o=S,S=_,_=g(b,10),b=d,d=C,C=E+e[t+x[r]]|0,C+=r<16?y(w,T,I)+O[0]:r<32?m(w,T,I)+O[1]:r<48?v(w,T,I)+O[2]:r<64?p(w,T,I)+O[3]:h(w,T,I)+O[4],C=(C=g(C|=0,M[r]))+R|0,E=R,R=I,I=g(T,10),T=w,w=C;C=k[1]+b+I|0,k[1]=k[2]+_+R|0,k[2]=k[3]+S+E|0,k[3]=k[4]+o+w|0,k[4]=k[0]+d+T|0,k[0]=C},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function g(e,t){return e<<t|e>>>32-t}e.RIPEMD160=i._createHelper(d),e.HmacRIPEMD160=i._createHmacHelper(d)}(),t.RIPEMD160)}(dw)),vw(),mw||(mw=1,function(e){var t;e.exports=(t=OE(),ew(),vw(),function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.SHA256,s=o.HMAC,u=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=s.create(r.hasher,e),o=i.create(),a=i.create([1]),u=o.words,c=a.words,l=r.keySize,f=r.iterations;u.length<l;){var d=n.update(t).finalize(a);n.reset();for(var h=d.words,p=h.length,v=d,m=1;m<f;m++){v=n.finalize(v),n.reset();for(var y=v.words,g=0;g<p;g++)h[g]^=y[g]}o.concat(d),c[0]++}return o.sigBytes=4*l,o}});e.PBKDF2=function(e,t,r){return u.create(r).compute(e,t)}}(),t.PBKDF2)}(yw)),_w(),ww(),Rw(),Aw(),xw(),Nw(),Dw||(Dw=1,function(e){var t,r;e.exports=(r=OE(),ww(),r.mode.ECB=((t=r.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),r.mode.ECB)}(jw)),Uw||(Uw=1,function(e){var t;e.exports=(t=OE(),ww(),t.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},t.pad.Ansix923)}(Vw)),Ww||(Ww=1,function(e){var t;e.exports=(t=OE(),ww(),t.pad.Iso10126={pad:function(e,r){var n=4*r,i=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(i-1)).concat(t.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},t.pad.Iso10126)}(Bw)),Gw||(Gw=1,function(e){var t;e.exports=(t=OE(),ww(),t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971)}(Zw)),Fw||(Fw=1,function(e){var t;e.exports=(t=OE(),ww(),t.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},t.pad.ZeroPadding)}(Hw)),Xw||(Xw=1,function(e){var t;e.exports=(t=OE(),ww(),t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding)}(Yw)),Kw||(Kw=1,function(e){var t;e.exports=(t=OE(),ww(),function(){var e=t,r=e.lib.CipherParams,n=e.enc.Hex;e.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return r.create({ciphertext:t})}}}(),t.format.Hex)}(zw)),Jw||(Jw=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],l=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var v=e[r],m=e[v],y=e[m],g=257*e[p]^16843008*p;a[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,c[r]=g,g=16843009*y^65537*m^257*v^16843008*r,l[p]=g<<24|g>>>8,f[p]=g<<16|g>>>16,d[p]=g<<8|g>>>24,h[p]=g,r?(r=v^e[e[e[y^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],u=0;u<n;u++){if(a=n-u,u%4)var c=o[a];else c=o[a-4];s[u]=u<4||a<=4?c:l[i[c>>>24]]^f[i[c>>>16&255]]^d[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],d=e[t+3]^r[3],h=4,p=1;p<u;p++){var v=n[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&d]^r[h++],m=n[l>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^r[h++],y=n[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&f]^r[h++];c=v,l=m,f=y,d=g}v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^r[h++],m=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[h++],y=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[h++],e[t]=v,e[t+1]=m,e[t+2]=y,e[t+3]=g},keySize:8});e.AES=r._createHelper(v)}(),t.AES)}(Qw)),eT(),tT||(tT=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib.StreamCipher,n=e.algo,i=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=r._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=r._createHelper(a)}(),t.RC4)}(rT)),nT||(nT=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=d,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=d,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=r._createHelper(s)}(),t.Rabbit)}(iT)),oT||(oT=1,function(e){var t;e.exports=(t=OE(),GE(),KE(),_w(),ww(),function(){var e=t,r=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(n[0]^=c,n[1]^=f,n[2]^=l,n[3]^=d,n[4]^=c,n[5]^=f,n[6]^=l,n[7]^=d,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=r._createHelper(s)}(),t.RabbitLegacy)}(aT)),cT(),t)}(CE);let lT=!0,fT=!0;function dT(e,t,r){const n=e.match(t);return n&&n.length>=r&&parseInt(n[r],10)}function hT(e,t,r){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,i=n.addEventListener;n.addEventListener=function(e,n){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=r(e);t&&(n.handleEvent?n.handleEvent(t):n(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(n,o),i.apply(this,[e,o])};const o=n.removeEventListener;n.removeEventListener=function(e,r){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(r))return o.apply(this,arguments);const n=this._eventMap[t].get(r);return this._eventMap[t].delete(r),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,n])},Object.defineProperty(n,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function pT(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(lT=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function vT(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(fT=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function mT(){if("object"==typeof window){if(lT)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function yT(e,t){fT&&console.warn(e+" is deprecated, please use "+t+" instead.")}function gT(e){return"[object Object]"===Object.prototype.toString.call(e)}function bT(e){return gT(e)?Object.keys(e).reduce((function(t,r){const n=gT(e[r]),i=n?bT(e[r]):e[r],o=n&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[r]:i})}),{}):e}function _T(e,t,r){t&&!r.has(t.id)&&(r.set(t.id,t),Object.keys(t).forEach((n=>{n.endsWith("Id")?_T(e,e.get(t[n]),r):n.endsWith("Ids")&&t[n].forEach((t=>{_T(e,e.get(t),r)}))})))}function ST(e,t,r){const n=r?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)})),o.forEach((t=>{e.forEach((r=>{r.type===n&&r.trackId===t.id&&_T(e,r,i)}))})),i}const ET=mT;function wT(e,t){const r=e&&e.navigator;if(!r.mediaDevices)return;const n=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((r=>{if("require"===r||"advanced"===r||"mediaSource"===r)return;const n="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){t.optional=t.optional||[];let e={};"number"==typeof n.ideal?(e[i("min",r)]=n.ideal,t.optional.push(e),e={},e[i("max",r)]=n.ideal,t.optional.push(e)):(e[i("",r)]=n.ideal,t.optional.push(e))}void 0!==n.exact&&"number"!=typeof n.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",r)]=n.exact):["min","max"].forEach((e=>{void 0!==n[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,r)]=n[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=n(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!r.mediaDevices.getSupportedConstraints||!r.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return r.mediaDevices.enumerateDevices().then((r=>{r=r.filter((e=>"videoinput"===e.kind));let a=r.find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!a&&r.length&&t.includes("back")&&(a=r[r.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=n(e.video),ET("chrome: "+JSON.stringify(e)),i(e)}))}e.video=n(e.video)}return ET("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(r.getUserMedia=function(e,t,n){i(e,(e=>{r.webkitGetUserMedia(e,t,(e=>{n&&n(o(e))}))}))}.bind(r),r.mediaDevices.getUserMedia){const e=r.mediaDevices.getUserMedia.bind(r.mediaDevices);r.mediaDevices.getUserMedia=function(t){return i(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(o(e))))))}}}function TT(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function IT(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(r=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===r.track.id)):{track:r.track};const i=new Event("track");i.track=r.track,i.receiver=n,i.transceiver={receiver:n},i.streams=[t.stream],this.dispatchEvent(i)})),t.stream.getTracks().forEach((r=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===r.id)):{track:r};const i=new Event("track");i.track=r,i.receiver=n,i.transceiver={receiver:n},i.streams=[t.stream],this.dispatchEvent(i)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else hT(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function RT(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){let i=r.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){n.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function CT(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,r,n]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const i=function(e){const t={};return e.result().forEach((e=>{const r={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{r[t]=e.stat(t)})),t[r.id]=r})),t},o=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const n=function(e){r(o(i(e)))};return t.apply(this,[n,e])}return new Promise(((e,r)=>{t.apply(this,[function(t){e(o(i(t)))},r])})).then(r,n)}}function kT(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>ST(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),hT(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>ST(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,r,n;return this.getSenders().forEach((r=>{r.track===e&&(t?n=!0:t=r)})),this.getReceivers().forEach((t=>(t.track===e&&(r?n=!0:r=t),t.track===e))),n||t&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function AT(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){if(!r)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const n=t.apply(this,arguments);return this._shimmedLocalStreams[r.id]?-1===this._shimmedLocalStreams[r.id].indexOf(n)&&this._shimmedLocalStreams[r.id].push(n):this._shimmedLocalStreams[r.id]=[r,n],n};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{const t=this.getSenders().find((t=>t.track===e));if(t)throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();r.apply(this,arguments);const n=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(n)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],n.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const r=this._shimmedLocalStreams[t].indexOf(e);-1!==r&&this._shimmedLocalStreams[t].splice(r,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),i.apply(this,arguments)}}function OT(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return AT(e);const r=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=r.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{const t=this.getSenders().find((t=>t.track===e));if(t)throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const r=new e.MediaStream(t.getTracks());this._streams[t.id]=r,this._reverseStreams[r.id]=t,t=r}n.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let r=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const n=e._reverseStreams[t],i=e._streams[n.id];r=r.replace(new RegExp(i.id,"g"),n.id)})),new RTCSessionDescription({type:t.type,sdp:r})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,r){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const n=[].slice.call(arguments,1);if(1!==n.length||!n[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");const i=this.getSenders().find((e=>e.track===t));if(i)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const o=this._streams[r.id];if(o)o.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const n=new e.MediaStream([t]);this._streams[r.id]=n,this._reverseStreams[n.id]=r,this.addStream(n)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?r.apply(this,[t=>{const r=o(this,t);e[0].apply(null,[r])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):r.apply(this,arguments).then((e=>o(this,e)))}};e.RTCPeerConnection.prototype[t]=n[t]}));const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let r=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const n=e._reverseStreams[t],i=e._streams[n.id];r=r.replace(new RegExp(n.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:r})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const s=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=s.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((r=>{this._streams[r].getTracks().find((t=>e.track===t))&&(t=this._streams[r])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function PT(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]}))}function xT(e,t){hT(e,"negotiationneeded",(e=>{const r=e.target;if(!(t.version<72||r.getConfiguration&&"plan-b"===r.getConfiguration().sdpSemantics)||"stable"===r.signalingState)return e}))}var LT=Object.freeze({__proto__:null,shimMediaStream:TT,shimOnTrack:IT,shimGetSendersWithDtmf:RT,shimGetStats:CT,shimSenderReceiverGetStats:kT,shimAddTrackRemoveTrackWithNative:AT,shimAddTrackRemoveTrack:OT,shimPeerConnection:PT,fixNegotiationNeeded:xT,shimGetUserMedia:wT,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(r){return t(r).then((t=>{const n=r.video&&r.video.width,i=r.video&&r.video.height,o=r.video&&r.video.frameRate;return r.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},n&&(r.video.mandatory.maxWidth=n),i&&(r.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(r)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});function MT(e,t){const r=e&&e.navigator,n=e&&e.MediaStreamTrack;if(r.getUserMedia=function(e,t,n){yT("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(e).then(t,n)},!(t.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){const e=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])},t=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(r){return"object"==typeof r&&"object"==typeof r.audio&&(r=JSON.parse(JSON.stringify(r)),e(r.audio,"autoGainControl","mozAutoGainControl"),e(r.audio,"noiseSuppression","mozNoiseSuppression")),t(r)},n&&n.prototype.getSettings){const t=n.prototype.getSettings;n.prototype.getSettings=function(){const r=t.apply(this,arguments);return e(r,"mozAutoGainControl","autoGainControl"),e(r,"mozNoiseSuppression","noiseSuppression"),r}}if(n&&n.prototype.applyConstraints){const t=n.prototype.applyConstraints;n.prototype.applyConstraints=function(r){return"audio"===this.kind&&"object"==typeof r&&(r=JSON.parse(JSON.stringify(r)),e(r,"autoGainControl","mozAutoGainControl"),e(r,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[r])}}}}function NT(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function DT(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]}));const r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return n.apply(this,[e||null]).then((e=>{if(t.version<53&&!i)try{e.forEach((e=>{e.type=r[e.type]||e.type}))}catch(t){if("TypeError"!==t.name)throw t;e.forEach(((t,n)=>{e.set(n,Object.assign({},t,{type:r[t.type]||t.type}))}))}return e})).then(i,o)}}function jT(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function UT(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),hT(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function VT(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){yT("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function WT(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function BT(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const e=arguments[1],r=e&&"sendEncodings"in e;r&&e.sendEncodings.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const n=t.apply(this,arguments);if(r){const{sender:t}=n,r=t.getParameters();(!("encodings"in r)||1===r.encodings.length&&0===Object.keys(r.encodings[0]).length)&&(r.encodings=e.sendEncodings,t.sendEncodings=e.sendEncodings,this.setParametersPromises.push(t.setParameters(r).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return n})}function GT(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function ZT(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function FT(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}var HT=Object.freeze({__proto__:null,shimOnTrack:NT,shimPeerConnection:DT,shimSenderGetStats:jT,shimReceiverGetStats:UT,shimRemoveStream:VT,shimRTCDataChannel:WT,shimAddTransceiver:BT,shimGetParameters:GT,shimCreateOffer:ZT,shimCreateAnswer:FT,shimGetUserMedia:MT,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(r){if(!r||!r.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===r.video?r.video={mediaSource:t}:r.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(r)})}});function XT(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((r=>t.call(this,r,e))),e.getVideoTracks().forEach((r=>t.call(this,r,e)))},e.RTCPeerConnection.prototype.addTrack=function(e,...r){return r&&r.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const r=e.getTracks();this.getSenders().forEach((e=>{r.includes(e.track)&&this.removeTrack(e)}))})}}function YT(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const r=new Event("addstream");r.stream=t,e.dispatchEvent(r)}))}),t.apply(e,arguments)}}}function KT(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,r=t.createOffer,n=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,r){const n=i.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n};t.setLocalDescription=s,s=function(e,t,r){const n=o.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n},t.setRemoteDescription=s,s=function(e,t,r){const n=a.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n},t.addIceCandidate=s}function zT(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,r=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>r(JT(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,r,n){t.mediaDevices.getUserMedia(e).then(r,n)}.bind(t))}function JT(e){return e&&void 0!==e.video?Object.assign({},e,{video:bT(e.video)}):e}function QT(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,r){if(e&&e.iceServers){const t=[];for(let r=0;r<e.iceServers.length;r++){let n=e.iceServers[r];!n.hasOwnProperty("urls")&&n.hasOwnProperty("url")?(yT("RTCIceServer.url","RTCIceServer.urls"),n=JSON.parse(JSON.stringify(n)),n.urls=n.url,delete n.url,t.push(n)):t.push(e.iceServers[r])}e.iceServers=t}return new t(e,r)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function qT(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function $T(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const r=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video")}return t.apply(this,arguments)}}function eI(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var tI=Object.freeze({__proto__:null,shimLocalStreamsAPI:XT,shimRemoteStreamsAPI:YT,shimCallbacksAPI:KT,shimGetUserMedia:zT,shimConstraints:JT,shimRTCIceServerUrls:QT,shimTrackEventTransceiver:qT,shimCreateOfferLegacy:$T,shimAudioContext:eI}),rI={exports:{}};!function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((e=>e.trim()))},t.splitSections=function(e){return e.split("\nm=").map(((e,t)=>(t>0?"m="+e:e).trim()+"\r\n"))},t.getDescription=function(e){const r=t.splitSections(e);return r&&r[0]},t.getMediaSections=function(e){const r=t.splitSections(e);return r.shift(),r},t.matchPrefix=function(e,r){return t.splitLines(e).filter((e=>0===e.indexOf(r)))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const r={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":r.relatedAddress=t[e+1];break;case"rport":r.relatedPort=parseInt(t[e+1],10);break;case"tcptype":r.tcpType=t[e+1];break;case"ufrag":r.ufrag=t[e+1],r.usernameFragment=t[e+1];break;default:void 0===r[t[e]]&&(r[t[e]]=t[e+1])}return r},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const r=e.component;"rtp"===r?t.push(1):"rtcp"===r?t.push(2):t.push(r),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const r={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),r.name=t[0],r.clockRate=parseInt(t[1],10),r.channels=3===t.length?parseInt(t[2],10):1,r.numChannels=r.channels,r},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const r=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==r?"/"+r:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let r;const n=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<n.length;e++)r=n[e].trim().split("="),t[r[0].trim()]=r[1];return t},t.writeFmtp=function(e){let t="",r=e.payloadType;if(void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const n=[];Object.keys(e.parameters).forEach((t=>{void 0!==e.parameters[t]?n.push(t+"="+e.parameters[t]):n.push(t)})),t+="a=fmtp:"+r+" "+n.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",r=e.payloadType;return void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((e=>{t+="a=rtcp-fb:"+r+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),r={ssrc:parseInt(e.substring(7,t),10)},n=e.indexOf(":",t);return n>-1?(r.attribute=e.substring(t+1,n),r.value=e.substring(n+1)):r.attribute=e.substring(t+1),r},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((e=>parseInt(e,10)))}},t.getMid=function(e){const r=t.matchPrefix(e,"a=mid:")[0];if(r)return r.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,r){return{role:"auto",fingerprints:t.matchPrefix(e+r,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let r="a=setup:"+t+"\r\n";return e.fingerprints.forEach((e=>{r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),r},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,r){return t.matchPrefix(e+r,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,r){const n=t.matchPrefix(e+r,"a=ice-ufrag:")[0],i=t.matchPrefix(e+r,"a=ice-pwd:")[0];return n&&i?{usernameFragment:n.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const r={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=t.splitLines(e)[0].split(" ");r.profile=n[2];for(let i=3;i<n.length;i++){const o=n[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const n=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(n.parameters=i.length?t.parseFmtp(i[0]):{},n.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),r.codecs.push(n),n.name.toUpperCase()){case"RED":case"ULPFEC":r.fecMechanisms.push(n.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach((e=>{r.headerExtensions.push(t.parseExtmap(e))}));const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return r.codecs.forEach((e=>{i.forEach((t=>{e.rtcpFeedback.find((e=>e.type===t.type&&e.parameter===t.parameter))||e.rtcpFeedback.push(t)}))})),r},t.writeRtpDescription=function(e,r){let n="";n+="m="+e+" ",n+=r.codecs.length>0?"9":"0",n+=" "+(r.profile||"UDP/TLS/RTP/SAVPF")+" ",n+=r.codecs.map((e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType)).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",r.codecs.forEach((e=>{n+=t.writeRtpMap(e),n+=t.writeFmtp(e),n+=t.writeRtcpFb(e)}));let i=0;return r.codecs.forEach((e=>{e.maxptime>i&&(i=e.maxptime)})),i>0&&(n+="a=maxptime:"+i+"\r\n"),r.headerExtensions&&r.headerExtensions.forEach((e=>{n+=t.writeExtmap(e)})),n},t.parseRtpEncodingParameters=function(e){const r=[],n=t.parseRtpParameters(e),i=-1!==n.fecMechanisms.indexOf("RED"),o=-1!==n.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute)),s=a.length>0&&a[0].ssrc;let u;const c=t.matchPrefix(e,"a=ssrc-group:FID").map((e=>e.substring(17).split(" ").map((e=>parseInt(e,10)))));c.length>0&&c[0].length>1&&c[0][0]===s&&(u=c[0][1]),n.codecs.forEach((e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&u&&(t.rtx={ssrc:u}),r.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:s,mechanism:o?"red+ulpfec":"red"},r.push(t))}})),0===r.length&&s&&r.push({ssrc:s});let l=t.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substring(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substring(5),10)*.95-16e3:void 0,r.forEach((e=>{e.maxBitrate=l}))),r},t.parseRtcpParameters=function(e){const r={},n=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute))[0];n&&(r.cname=n.value,r.ssrc=n.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");r.reducedSize=i.length>0,r.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return r.mux=o.length>0,r},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let r;const n=t.matchPrefix(e,"a=msid:");if(1===n.length)return r=n[0].substring(7).split(" "),{stream:r[0],track:r[1]};const i=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"msid"===e.attribute));return i.length>0?(r=i[0].value.split(" "),{stream:r[0],track:r[1]}):void 0},t.parseSctpDescription=function(e){const r=t.parseMLine(e),n=t.matchPrefix(e,"a=max-message-size:");let i;n.length>0&&(i=parseInt(n[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:r.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let r=[];return r="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&r.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),r.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,r,n){let i;const o=void 0!==r?r:2;i=e||t.generateSessionId();return"v=0\r\no="+(n||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,r){const n=t.splitLines(e);for(let e=0;e<n.length;e++)switch(n[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[e].substring(2)}return r?t.getDirection(r):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const r=t.splitLines(e)[0].substring(2).split(" ");return{kind:r[0],port:parseInt(r[1],10),protocol:r[2],fmt:r.slice(3).join(" ")}},t.parseOLine=function(e){const r=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:r[0],sessionId:r[1],sessionVersion:parseInt(r[2],10),netType:r[3],addressType:r[4],address:r[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const r=t.splitLines(e);for(let e=0;e<r.length;e++)if(r[e].length<2||"="!==r[e].charAt(1))return!1;return!0},e.exports=t}(rI);var nI=rI.exports,iI=e({__proto__:null,default:nI},[rI.exports]);function oI(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){const r=new t(e),n=nI.parseCandidate(e.candidate),i=Object.assign(r,n);return i.toJSON=function(){return{candidate:i.candidate,sdpMid:i.sdpMid,sdpMLineIndex:i.sdpMLineIndex,usernameFragment:i.usernameFragment}},i}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,hT(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function aI(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=nI.splitSections(e.sdp);return t.shift(),t.some((e=>{const t=nI.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const r=parseInt(t[1],10);return r!=r?-1:r}(arguments[0]),r=function(e){let r=65536;return"firefox"===t.browser&&(r=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),r}(e),n=function(e,r){let n=65536;"firefox"===t.browser&&57===t.version&&(n=65535);const i=nI.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?n=parseInt(i[0].substr(19),10):"firefox"===t.browser&&-1!==r&&(n=2147483637),n}(arguments[0],e);let i;i=0===r&&0===n?Number.POSITIVE_INFINITY:0===r||0===n?Math.max(r,n):Math.min(r,n);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return r.apply(this,arguments)}}function sI(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const r=e.send;e.send=function(){const n=arguments[0],i=n.length||n.size||n.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}const r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=r.apply(this,arguments);return t(e,this),e},hT(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function uI(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const r=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const r=new Event("connectionstatechange",e);t.dispatchEvent(r)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),r.apply(this,arguments)}}))}function cI(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const r=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:r}):t.sdp=r}return r.apply(this,arguments)}}function lI(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const r=e.RTCPeerConnection.prototype.addIceCandidate;r&&0!==r.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function fI(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const r=e.RTCPeerConnection.prototype.setLocalDescription;r&&0!==r.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return r.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return r.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then((e=>r.apply(this,[e])))})}var dI=Object.freeze({__proto__:null,shimRTCIceCandidate:oI,shimMaxMessageSize:aI,shimSendThrowTypeError:sI,shimConnectionState:uI,removeExtmapAllowMixed:cI,shimAddIceCandidateNullOrEmpty:lI,shimParameterlessSetLocalDescription:fI});const hI=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const r=mT,n=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;const{navigator:r}=e;if(r.mozGetUserMedia)t.browser="firefox",t.version=dT(r.userAgent,/Firefox\/(\d+)\./,1);else if(r.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=dT(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!r.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=dT(r.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),i={browserDetails:n,commonShim:dI,extractVersion:dT,disableLog:pT,disableWarnings:vT,sdp:iI};switch(n.browser){case"chrome":if(!LT||!PT||!t.shimChrome)return r("Chrome shim is not included in this adapter release."),i;if(null===n.version)return r("Chrome shim can not determine version, not shimming."),i;r("adapter.js shimming chrome."),i.browserShim=LT,lI(e,n),fI(e),wT(e,n),TT(e),PT(e,n),IT(e),OT(e,n),RT(e),CT(e),kT(e),xT(e,n),oI(e),uI(e),aI(e,n),sI(e),cI(e,n);break;case"firefox":if(!HT||!DT||!t.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=HT,lI(e,n),fI(e),MT(e,n),DT(e,n),NT(e),VT(e),jT(e),UT(e),WT(e),BT(e),GT(e),ZT(e),FT(e),oI(e),uI(e),aI(e,n),sI(e);break;case"safari":if(!tI||!t.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=tI,lI(e,n),fI(e),QT(e),$T(e),KT(e),XT(e),YT(e),qT(e),zT(e),eI(e),oI(e),aI(e,n),sI(e),cI(e,n);break;default:r("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),pI=window.crypto||window.webkitCrypto||window.mozCrypto||window.oCrypto||window.msCrypto,vI={Mac:/(mac os x)\s+([\w_]+)/,Windows:/(windows nt)\s+([\w.]+)/,Ios:/(i(?:pad|phone|pod)).*cpu(?: i(?:pad|phone|pod))? os (\d+(?:[.|_]\d+)+)/,Android:/(android)\s+([\d.]+)/,Ipad:/(ipad).*os\s([\d_]+)/,Iphone:/(iphone\sos)\s([\d_]+)/,Linux:/(x11;)\s(linux)\s(x86_64|mips64|aarch64)/,ChromiumOS:/(x11;)\s(cros)\s(x86_64|mips64|aarch64)\s([\w.]+)\)/},mI=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","_"];let yI,gI;const bI="CommonUtil";let _I=function(){function e(){a(this,e);this.uuidCount=0,this.timeDiff=0,this.platform=(()=>{const e=navigator.userAgent.toLowerCase(),t=e.match(/(micromessenger)\/([\w.()]+)/i),r=t?"-WeChat".concat(t[2]):"";for(const t in vI)if(Object.prototype.hasOwnProperty.call(vI,t)){const n=e.match(vI[t]);if(n)return gI="Ios"===t?n[2].replace(/_/g,"."):"Linux"===t?n[3]:"ChromiumOS"===t?n[4]:n[2],yI=["Ios","Ipad","Iphone"].includes(t)?"IOS":t,t+gI+r}return"unknown"})(),this.userAgent=navigator.userAgent?navigator.userAgent:"",this.browserType=this.getBrowserInfo().type,this.browserVersion=this.getBrowserInfo().version}return u(e,[{key:"sleep",value:async function e(t){return new Promise((e=>{const r=setTimeout((()=>{clearTimeout(r),e()}),t)}))}},{key:"getDeviceID",value:function e(){return this.deviceID||(this.deviceID=this.generateStandardUuid()),this.deviceID}},{key:"generateStandardUuid",value:function e(){let t;if(pI&&(t="function"==typeof pI.randomUUID?pI.randomUUID():""),!t){let e=(new Date).getTime();window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),t="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g,(()=>{const t=(e+16*this.getRandom())%16|0;return e=Math.floor(e/16),t.toString(16)}))}return t}},{key:"getBrowserInfo",value:function e(){const t=navigator.userAgent.toLowerCase();if(-1!=t.indexOf("opera")||-1!=t.indexOf("opr")){let e=this.getVersion(/.*opera\/(\d+\.\d+)*/gi);return 0===e&&(e=this.getVersion(/.*opr\/(\d+\.\d+)*/gi)),{type:"opera",version:e}}if(-1!=t.indexOf("edge")){return{type:"edge",version:this.getVersion(/.*edge\/(\d+\.\d+)*/gi)}}if(-1!=t.indexOf("qqbrowser")){return{type:"qqbrowser",version:this.getVersion(/.*qqbrowser\/(\d+\.\d+)*/gi)}}if(-1!=t.indexOf("hbpc")){return{type:"hauwei",version:this.getVersion(/.*hbpc\/(\d+\.\d+)*/gi)}}return-1!=t.indexOf("micromessenger")?{type:"micromessenger",version:"0"}:"firefox"===hI.browserDetails.browser?{type:"firefox",version:hI.browserDetails.version}:"chrome"===hI.browserDetails.browser?{type:"chrome",version:hI.browserDetails.version}:"safari"===hI.browserDetails.browser?{type:"safari",version:hI.browserDetails.version}:"unknown"}},{key:"getVersion",value:function e(t){const r=t.exec(navigator.userAgent.toLowerCase());let n=0;return r&&2===r.length&&(n=parseFloat(r[1])),n}},{key:"getBrowserType",value:function e(){return this.browserType}},{key:"getBrowserVersion",value:function e(){return this.browserVersion}},{key:"getRandom",value:function t(){return e.getRandomArray(1)[0]/256}},{key:"getRandomUint32",value:function t(){const r=e.getRandomArray(4);return new DataView(r.buffer).getUint32(0)}},{key:"generateUuid",value:function t(r){let n="";const i=e.getRandomArray(33),o=r?22:33;for(let e=0;e<o;e++)n+=mI[Math.round(i[e]%64)];let a="";for(let e=0;e<33-o;e++)a+=mI[63&r],r>>=6;let s=this.uuidCount.toString(16);for(let e=3-s.length;e>0;e--)s="0"+s;return this.uuidCount>4094?this.uuidCount=0:this.uuidCount++,"".concat(n).concat(a).concat(s)}},{key:"generateRandomId",value:function t(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:62,i="";const o=e.getRandomArray(r);for(let e=0;e<r;e++)i+=mI[Math.round(o[e]%n)];return i}},{key:"getPlatform",value:function e(){return this.platform}},{key:"getIosSystemVersion",value:function e(){if("IOS"===this.getSystemType()){const e=navigator.userAgent.toLowerCase().match(vI.Ios);return gI=e[2].replace(/_/g,"."),gI}return"0"}},{key:"iosSystemVersionNum",value:function e(){if("0"===this.getIosSystemVersion())return 0;const t=this.getIosSystemVersion().split("."),r=t[0]+"."+t[1];return parseFloat(r)}},{key:"getSystemType",value:function e(){return yI}},{key:"getRomVersion",value:function e(){return gI}},{key:"getUserAgent",value:function e(){return this.userAgent}},{key:"getNetworkType",value:function e(){const t=navigator.userAgent.match(/NetType\/\w+/),r=t?t[0].toLowerCase().replace("nettype/",""):"";return["wifi","4g","3g","3gnet","2g"].includes(r)?r.toUpperCase():"other"}},{key:"syncLocalTime",value:function e(t){try{if(t){console.debug(bI,"syncLocalTime, serverTime: ".concat(t));const e=new Date(t).getTime();this.timeDiff=(new Date).getTime()-e,console.debug(bI,"syncLocalTime, timeDiff: ".concat(this.timeDiff))}}catch(e){console.error(bI,"syncLocalTime error: ".concat(e))}}},{key:"getCurrentTimestamp",value:function e(){return(new Date).getTime()-this.timeDiff}},{key:"getCurrentTime",value:function e(){const t=new Date(this.getCurrentTimestamp()),r=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0".concat(n):n,o=t.getDate(),a=o<10?"0".concat(o):o,s=t.getHours(),u=s<10?"0".concat(s):s,c=t.getMinutes(),l=c<10?"0".concat(c):c,f=t.getSeconds(),d=f<10?"0".concat(f):f,h=t.getMilliseconds(),p="".concat(h+1e3).substring(1),v=t.getTimezoneOffset()/60,m=v>=0?v:-v,y=(v<=0?"+":"-")+(m<10?"0".concat(m):"".concat(m))+":00";return{year:"".concat(r),month:"".concat(i),day:"".concat(a),hour:"".concat(u),min:"".concat(l),sec:"".concat(d),millsec:p,zoneOff:y}}},{key:"adjustTimeByOffset",value:function e(t){return t-this.timeDiff}},{key:"convertString2Timestamp",value:function e(t){return new Date(t).getTime()}},{key:"generateStreamId",value:function e(){return"2xxxxxxx-8xxx-xxxx-yxxx-xxxx".replace(/[xy]/g,(e=>{const t=16*this.getRandom()|0;return("x"==e?t:3&t|8).toString(16)}))}},{key:"isWKWebview",value:function e(){return/I.*-WeChat.*/gi.test(this.platform)}},{key:"isAppleDevice",value:function e(){return/^(Mac|I).*/gi.test(this.platform)}},{key:"isSafari",value:function e(){return this.isAppleDevice()&&/Safari/i.test(this.getUserAgent())}},{key:"isMobileDevice",value:function e(){return!/^(Mac|Windows).*/gi.test(this.platform)}},{key:"isMobileBrowser",value:function e(){return/Mobile|Android|iPhone|iPod|iPad|(Windows Phone)/i.test(navigator.userAgent)}},{key:"isMobileWeChatBrowser",value:function e(){return this.isMobileDevice()&&/.*MicroMessenger.*/gi.test(navigator.userAgent)}},{key:"isSupportConstraints",value:function e(t){var r;return!!(null===(r=navigator.mediaDevices)||void 0===r?void 0:r.getSupportedConstraints())[t]}},{key:"calculateSha256",value:async function e(t){return new Promise((e=>{const r=new FileReader;r.onloadend=t=>{if(t.target.readyState==FileReader.DONE){const r=CE.exports.lib.WordArray.create(t.target.result),n=CE.exports.SHA256(r).toString();e(n)}},r.readAsArrayBuffer(t)}))}},{key:"getValue",value:function e(t,r){return t||r}},{key:"shieldIpAddress",value:function e(t){return t?t.replace(/\b(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\b/g,"$1.*.*.$2"):null}},{key:"shieldUrlParameters",value:function e(t){if(!t)return t;const r=t.match(/([^?|=|&]+)=([^&]+)/g);return r&&r.forEach((e=>{const r=/([^=]*)=(.*)/g.exec(e);t=t.replace(e,"".concat(r[1],"=").concat(this.secretString(r[2])))})),t}},{key:"shieldNickname",value:function e(t){if(!t)return t;let r="";for(let e=0;e<t.length;e++)r=e%3==0?"".concat(r,"*"):"".concat(r).concat(t.charAt(e));return r}},{key:"secretString",value:function e(t){if(!t)return null;const r="********",n=Math.ceil(t.length/3),i=Math.ceil((t.length-n)/2);return 0===i?"".concat(t.substr(0,n)).concat(r):"".concat(t.substr(0,n)).concat(r).concat(t.substr(-i,i))}}],[{key:"getRandomArray",value:function e(t){const r=new Uint8Array(t);return pI&&pI.getRandomValues(r),r}}])}();const SI=new _I;function EI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?EI(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const TI=Symbol("hrtc_".concat(SI.getCurrentTimestamp())),II=new Map;let RI=!0;const CI=new Map;let kI=function(){function e(){a(this,e);o(this,"logBuffer",[]),o(this,"logBufferSize",5e3)}return u(e,[{key:"error",value:function e(t,r,n){this.log("error",t,r,n)}},{key:"warn",value:function e(t,r,n){this.log("warn",t,r,n)}},{key:"info",value:function e(t,r,n){this.log("info",t,r,n)}},{key:"debug",value:function e(t,r,n){this.log("debug",t,r,n)}},{key:"log",value:function e(t,r,n,i){CI.forEach(((e,t)=>{n.includes(t)&&(n=n.replace(e.pattern,e.newString))}));const o=SI.getCurrentTime(),a=["".concat(o.year,"-").concat(o.month,"-").concat(o.day," ").concat(o.hour,":").concat(o.min,":").concat(o.sec,".").concat(o.millsec),t];if(Object.entries(wI(wI({},i),{},{tag:r,msg:n})).forEach((e=>{let[t,r]=e;"string"==typeof r&&a.push("[".concat(t,": ").concat(r,"]"))})),RI){const e=a.join(" ");for(this.logBuffer.push(e);this.logBuffer.length>=this.logBufferSize;)this.logBuffer.shift()}const s=["".concat(o.year,"-").concat(o.month,"-").concat(o.day," ").concat(o.hour,":").concat(o.min,":").concat(o.sec,".").concat(o.millsec)];vm.indexOf(AI.logLevel)>=vm.indexOf(t)&&console[t](s+" [HRTC] "+"[".concat(t,"] [").concat(r,"] [").concat(n,"]"))}},{key:"clearLogs",value:function e(){this.logBuffer=[]}},{key:"setLogBufferSize",value:function e(t){this.logBufferSize=t}},{key:"getLogBufferSize",value:function e(){return this.logBufferSize}},{key:"getLogBuffer",value:function e(){return this.logBuffer}}],[{key:"setLogCachesEnable",value:function e(t){RI=t}}])}();let AI=function(){function e(){a(this,e)}return u(e,null,[{key:"getLogger",value:function e(t){const r=t||TI;if(!II.has(r)){const e=new kI;return II.set(r,e),e}return II.get(r)}},{key:"deleteLogger",value:function e(t){const r=t||TI;II.has(r)&&II.delete(r)}},{key:"setAllLogLevel",value:function t(r){if(!(vm.indexOf(r)>=0))throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"log level is invalid");e.logLevel=r}},{key:"addPrivacyString",value:function e(t){if(!t)return;if(CI.has(t))return;const r=SI.secretString(t);if(!r)return;const n=t.replaceAll(/([\^|\$|\\|\.|\*|\+|\?|\(|\)|\[|\]|\{|\}|\|])/g,"\\$1"),i={pattern:new RegExp("\\b"+n+"\\b","g"),newString:r};CI.set(t,i)}},{key:"getLogFile",value:async function t(r,n){const i=r.logger,o=SI.getCurrentTime(),a="".concat(o.year,"-").concat(o.month,"-").concat(o.day,"T").concat(o.hour,":").concat(o.min,":").concat(o.sec).concat(o.zoneOff),s="".concat(o.year,"-").concat(o.month,"-").concat(o.day,"T").concat(o.hour,".").concat(o.min,".").concat(o.sec).concat(o.zoneOff.replace(":",".")),u=e.getLogger(),c=i.getLogBuffer(),l=u.getLogBuffer();if(0===c.length&&0===l.length)return null;const f=r.getInfo(),d="".concat(f.userName,"_").concat(f.userId,"##").concat(f.domain,"##").concat(f.appId,"##").concat(s),h=SI.getDeviceID(),p=encodeURIComponent("".concat(n,"##").concat(h,"##").concat(f.appId,"##").concat(a)),v=new Py,m=v.folder("".concat(f.userName,"_").concat(f.userId,"##").concat(f.roomId,"##").concat(f.domain,"##").concat(f.appId));m.file("".concat(d,".log"),"".concat(c.join("\n"))),m.file("hrtc##".concat(a,".log"),"".concat(l.join("\n")));const y=await v.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}});return{sha256:await SI.calculateSha256(y),length:y.size,content:y,urlFileNameEncode:p}}}])}();o(AI,"logLevel",vm[3]);var OI=ci,PI=ka,xI=g,LI=re,MI=Q,NI=co,DI=$u,jI=on,UI=PI&&PI.prototype;if(OI({target:"Promise",proto:!0,real:!0,forced:!!PI&&xI((function(){UI.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=NI(this,LI("Promise")),r=MI(e);return this.then(r?function(r){return DI(t,e()).then((function(){return r}))}:e,r?function(r){return DI(t,e()).then((function(){throw r}))}:e)}}),MI(PI)){var VI=LI("Promise").prototype.finally;UI.finally!==VI&&jI(UI,"finally",VI,{unsafe:!0})}var WI=Re,BI=Ze,GI=H,ZI=_n,FI=TypeError,HI=function(e){return function(t,r,n,i){WI(r);var o=BI(t),a=GI(o),s=ZI(o),u=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw FI("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=r(i,a[u],u,o));return i}},XI={left:HI(!1),right:HI(!0)}.left,YI=fe,KI=li;ci({target:"Array",proto:!0,forced:!th("reduce")||!KI&&YI>79&&YI<83},{reduce:function(e){var t=arguments.length;return XI(this,e,t,t>1?arguments[1]:void 0)}});var zI=w,JI=Re,QI=Wt,qI=function(){for(var e=QI(this),t=JI(e.add),r=0,n=arguments.length;r<n;r++)zI(t,e,arguments[r]);return e};ci({target:"Set",proto:!0,real:!0,forced:!0},{addAll:qI}),ci({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:vf});var $I=re,eR=w,tR=Re,rR=Wt,nR=co,iR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){var t=rR(this),r=new(nR(t,$I("Set")))(t),n=tR(r.delete);return iR(e,(function(e){eR(n,r,e)})),r}});var oR=w,aR=function(e){return oR(Set.prototype.values,e)},sR=Wt,uR=bo,cR=aR,lR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=sR(this),r=cR(t),n=uR(e,arguments.length>1?arguments[1]:void 0);return!lR(r,(function(e,r){if(!n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var fR=re,dR=w,hR=Re,pR=Wt,vR=bo,mR=co,yR=aR,gR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=pR(this),r=yR(t),n=vR(e,arguments.length>1?arguments[1]:void 0),i=new(mR(t,fR("Set"))),o=hR(i.add);return gR(r,(function(e){n(e,e,t)&&dR(o,i,e)}),{IS_ITERATOR:!0}),i}});var bR=Wt,_R=bo,SR=aR,ER=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=bR(this),r=SR(t),n=_R(e,arguments.length>1?arguments[1]:void 0);return ER(r,(function(e,r){if(n(e,e,t))return r(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var wR=re,TR=w,IR=Re,RR=Wt,CR=co,kR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){var t=RR(this),r=new(CR(t,wR("Set"))),n=IR(t.has),i=IR(r.add);return kR(e,(function(e){TR(n,t,e)&&TR(i,r,e)})),r}});var AR=w,OR=Re,PR=Wt,xR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){var t=PR(this),r=OR(t.has);return!xR(e,(function(e,n){if(!0===AR(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}});var LR=re,MR=w,NR=Re,DR=Q,jR=Wt,UR=iu,VR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){var t=UR(this),r=jR(e),n=r.has;return DR(n)||(r=new(LR("Set"))(e),n=NR(r.has)),!VR(t,(function(e,t){if(!1===MR(n,r,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var WR=w,BR=Re,GR=Wt,ZR=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){var t=GR(this),r=BR(t.has);return!ZR(e,(function(e,n){if(!1===WR(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}});var FR=ci,HR=Wt,XR=uc,YR=aR,KR=Eu,zR=D([].join),JR=[].push;FR({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=HR(this),r=YR(t),n=void 0===e?",":XR(e),i=[];return KR(r,JR,{that:i,IS_ITERATOR:!0}),zR(i,n)}});var QR=re,qR=bo,$R=w,eC=Re,tC=Wt,rC=co,nC=aR,iC=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=tC(this),r=nC(t),n=qR(e,arguments.length>1?arguments[1]:void 0),i=new(rC(t,QR("Set"))),o=eC(i.add);return iC(r,(function(e){$R(o,i,n(e,e,t))}),{IS_ITERATOR:!0}),i}});var oC=Re,aC=Wt,sC=aR,uC=Eu,cC=TypeError;ci({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aC(this),r=sC(t),n=arguments.length<2,i=n?void 0:arguments[1];if(oC(e),uC(r,(function(r){n?(n=!1,i=r):i=e(i,r,r,t)}),{IS_ITERATOR:!0}),n)throw cC("Reduce of empty set with no initial value");return i}});var lC=Wt,fC=bo,dC=aR,hC=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=lC(this),r=dC(t),n=fC(e,arguments.length>1?arguments[1]:void 0);return hC(r,(function(e,r){if(n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var pC=re,vC=w,mC=Re,yC=Wt,gC=co,bC=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){var t=yC(this),r=new(gC(t,pC("Set")))(t),n=mC(r.delete),i=mC(r.add);return bC(e,(function(e){vC(n,r,e)||vC(i,r,e)})),r}});var _C=re,SC=Re,EC=Wt,wC=co,TC=Eu;ci({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){var t=EC(this),r=new(wC(t,_C("Set")))(t);return TC(e,SC(r.add),{that:r}),r}});var IC=lp.charAt,RC=uc,CC=Br,kC=ql,AC="String Iterator",OC=CC.set,PC=CC.getterFor(AC);kC(String,"String",(function(e){OC(this,{type:AC,string:RC(e),index:0})}),(function(){var e,t=PC(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=IC(r,n),t.index+=e.length,{value:e,done:!1})}));var xC=g,LC=ut("iterator"),MC=!xC((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[LC]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),NC=tr.exports,DC=Nt,jC=b,UC=D,VC=w,WC=g,BC=xc,GC=Nn,ZC=T,FC=Ze,HC=H,XC=Object.assign,YC=Object.defineProperty,KC=UC([].concat),zC=!XC||WC((function(){if(jC&&1!==XC({b:1},XC(YC({},"a",{enumerable:!0,get:function(){YC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=XC({},e)[r]||BC(XC({},t)).join("")!=n}))?function(e,t){for(var r=FC(e),n=arguments.length,i=1,o=GC.f,a=ZC.f;n>i;)for(var s,u=HC(arguments[i++]),c=o?KC(BC(u),o(u)):BC(u),l=c.length,f=0;l>f;)s=c[f++],jC&&!VC(a,u,s)||(r[s]=u[s]);return r}:XC,JC=Wt,QC=uu,qC=bo,$C=w,ek=Ze,tk=function(e,t,r,n){try{return n?t(JC(r)[0],r[1]):t(r)}catch(t){QC(e,"throw",t)}},rk=Xs,nk=to,ik=_n,ok=$y,ak=iu,sk=Qs,uk=Array,ck=D,lk=2147483647,fk=/[^\0-\u007E]/,dk=/[.\u3002\uFF0E\uFF61]/g,hk="Overflow: input needs wider integers to process",pk=RangeError,vk=ck(dk.exec),mk=Math.floor,yk=String.fromCharCode,gk=ck("".charCodeAt),bk=ck([].join),_k=ck([].push),Sk=ck("".replace),Ek=ck("".split),wk=ck("".toLowerCase),Tk=function(e){return e+22+75*(e<26)},Ik=function(e,t,r){var n=0;for(e=r?mk(e/700):e>>1,e+=mk(e/t);e>455;)e=mk(e/35),n+=36;return mk(n+36*e/(e+38))},Rk=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=gk(e,r++);if(i>=55296&&i<=56319&&r<n){var o=gk(e,r++);56320==(64512&o)?_k(t,((1023&i)<<10)+(1023&o)+65536):(_k(t,i),r--)}else _k(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&_k(t,yk(n));var u=t.length,c=u;for(u&&_k(t,"-");c<i;){var l=lk;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<l&&(l=n);var f=c+1;if(l-o>mk((lk-a)/f))throw pk(hk);for(a+=(l-o)*f,o=l,r=0;r<e.length;r++){if((n=e[r])<o&&++a>lk)throw pk(hk);if(n==o){for(var d=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(d<p)break;var v=d-p,m=36-p;_k(t,yk(Tk(p+v%m))),d=mk(v/m),h+=36}_k(t,yk(Tk(d))),s=Ik(a,f,c==u),a=0,c++}}a++,o++}return bk(t,"")},Ck=ci,kk=m,Ak=w,Ok=D,Pk=b,xk=MC,Lk=on,Mk=My,Nk=Si,Dk=xl,jk=Br,Uk=Ai,Vk=Q,Wk=Xe,Bk=bo,Gk=ji,Zk=Wt,Fk=$,Hk=uc,Xk=$c,Yk=O,Kk=iu,zk=Qs,Jk=wo,Qk=aE,qk=ut("iterator"),$k="URLSearchParams",eA=$k+"Iterator",tA=jk.set,rA=jk.getterFor($k),nA=jk.getterFor(eA),iA=Object.getOwnPropertyDescriptor,oA=function(e){if(!Pk)return kk[e];var t=iA(kk,e);return t&&t.value},aA=oA("fetch"),sA=oA("Request"),uA=oA("Headers"),cA=sA&&sA.prototype,lA=uA&&uA.prototype,fA=kk.RegExp,dA=kk.TypeError,hA=kk.decodeURIComponent,pA=kk.encodeURIComponent,vA=Ok("".charAt),mA=Ok([].join),yA=Ok([].push),gA=Ok("".replace),bA=Ok([].shift),_A=Ok([].splice),SA=Ok("".split),EA=Ok("".slice),wA=/\+/g,TA=Array(4),IA=function(e){return TA[e-1]||(TA[e-1]=fA("((?:%[\\da-f]{2}){"+e+"})","gi"))},RA=function(e){try{return hA(e)}catch(t){return e}},CA=function(e){var t=gA(e,wA," "),r=4;try{return hA(t)}catch(e){for(;r;)t=gA(t,IA(r--),RA);return t}},kA=/[!'()~]|%20/g,AA={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},OA=function(e){return AA[e]},PA=function(e){return gA(pA(e),kA,OA)},xA=Dk((function(e,t){tA(this,{type:eA,iterator:Kk(rA(e).entries),kind:t})}),"Iterator",(function(){var e=nA(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),LA=function(e){this.entries=[],this.url=null,void 0!==e&&(Fk(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===vA(e,0)?EA(e,1):e:Hk(e)))};LA.prototype={type:$k,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=zk(e);if(u)for(r=(t=Kk(e,u)).next;!(n=Ak(r,t)).done;){if(o=(i=Kk(Zk(n.value))).next,(a=Ak(o,i)).done||(s=Ak(o,i)).done||!Ak(o,i).done)throw dA("Expected sequence with length 2");yA(this.entries,{key:Hk(a.value),value:Hk(s.value)})}else for(var c in e)Wk(e,c)&&yA(this.entries,{key:c,value:Hk(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=SA(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=SA(t,"="),yA(this.entries,{key:CA(bA(r)),value:CA(mA(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],yA(r,PA(e.key)+"="+PA(e.value));return mA(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var MA=function(){Uk(this,NA),tA(this,new LA(arguments.length>0?arguments[0]:void 0))},NA=MA.prototype;if(Mk(NA,{append:function(e,t){Jk(arguments.length,2);var r=rA(this);yA(r.entries,{key:Hk(e),value:Hk(t)}),r.updateURL()},delete:function(e){Jk(arguments.length,1);for(var t=rA(this),r=t.entries,n=Hk(e),i=0;i<r.length;)r[i].key===n?_A(r,i,1):i++;t.updateURL()},get:function(e){Jk(arguments.length,1);for(var t=rA(this).entries,r=Hk(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Jk(arguments.length,1);for(var t=rA(this).entries,r=Hk(e),n=[],i=0;i<t.length;i++)t[i].key===r&&yA(n,t[i].value);return n},has:function(e){Jk(arguments.length,1);for(var t=rA(this).entries,r=Hk(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Jk(arguments.length,1);for(var r,n=rA(this),i=n.entries,o=!1,a=Hk(e),s=Hk(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?_A(i,u--,1):(o=!0,r.value=s));o||yA(i,{key:a,value:s}),n.updateURL()},sort:function(){var e=rA(this);Qk(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=rA(this).entries,n=Bk(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new xA(this,"keys")},values:function(){return new xA(this,"values")},entries:function(){return new xA(this,"entries")}},{enumerable:!0}),Lk(NA,qk,NA.entries,{name:"entries"}),Lk(NA,"toString",(function(){return rA(this).serialize()}),{enumerable:!0}),Nk(MA,$k),Ck({global:!0,constructor:!0,forced:!xk},{URLSearchParams:MA}),!xk&&Vk(uA)){var DA=Ok(lA.has),jA=Ok(lA.set),UA=function(e){if(Fk(e)){var t,r=e.body;if(Gk(r)===$k)return t=e.headers?new uA(e.headers):new uA,DA(t,"content-type")||jA(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xk(e,{body:Yk(0,Hk(r)),headers:Yk(0,t)})}return e};if(Vk(aA)&&Ck({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return aA(e,arguments.length>1?UA(arguments[1]):{})}}),Vk(sA)){var VA=function(e){return Uk(this,cA),new sA(e,arguments.length>1?UA(arguments[1]):{})};cA.constructor=VA,VA.prototype=cA,Ck({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:VA})}}var WA,BA=ci,GA=b,ZA=MC,FA=m,HA=bo,XA=D,YA=on,KA=function(e,t,r){return r.get&&NC(r.get,t,{getter:!0}),r.set&&NC(r.set,t,{setter:!0}),DC.f(e,t,r)},zA=Ai,JA=Xe,QA=zC,qA=function(e){var t=ek(e),r=nk(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=qC(i,n>2?arguments[2]:void 0));var a,s,u,c,l,f,d=sk(t),h=0;if(!d||this===uk&&rk(d))for(a=ik(t),s=r?new this(a):uk(a);a>h;h++)f=o?i(t[h],h):t[h],ok(s,h,f);else for(l=(c=ak(t,d)).next,s=r?new this:[];!(u=$C(l,c)).done;h++)f=o?tk(c,i,[u.value,h],!0):u.value,ok(s,h,f);return s.length=h,s},$A=og,eO=lp.codeAt,tO=function(e){var t,r,n=[],i=Ek(Sk(wk(e),dk,"."),".");for(t=0;t<i.length;t++)r=i[t],_k(n,vk(fk,r)?"xn--"+Rk(r):r);return bk(n,".")},rO=uc,nO=Si,iO=wo,oO={URLSearchParams:MA,getState:rA},aO=Br,sO=aO.set,uO=aO.getterFor("URL"),cO=oO.URLSearchParams,lO=oO.getState,fO=FA.URL,dO=FA.TypeError,hO=FA.parseInt,pO=Math.floor,vO=Math.pow,mO=XA("".charAt),yO=XA(/./.exec),gO=XA([].join),bO=XA(1..toString),_O=XA([].pop),SO=XA([].push),EO=XA("".replace),wO=XA([].shift),TO=XA("".split),IO=XA("".slice),RO=XA("".toLowerCase),CO=XA([].unshift),kO="Invalid scheme",AO="Invalid host",OO="Invalid port",PO=/[a-z]/i,xO=/[\d+-.a-z]/i,LO=/\d/,MO=/^0x/i,NO=/^[0-7]+$/,DO=/^\d+$/,jO=/^[\da-f]+$/i,UO=/[\0\t\n\r #%/:<>?@[\\\]^|]/,VO=/[\0\t\n\r #/:<>?@[\\\]^|]/,WO=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,BO=/[\t\n\r]/g,GO=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)CO(t,e%256),e=pO(e/256);return gO(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=bO(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ZO={},FO=QA({},ZO,{" ":1,'"':1,"<":1,">":1,"`":1}),HO=QA({},FO,{"#":1,"?":1,"{":1,"}":1}),XO=QA({},HO,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),YO=function(e,t){var r=eO(e,0);return r>32&&r<127&&!JA(t,e)?e:encodeURIComponent(e)},KO={ftp:21,file:null,http:80,https:443,ws:80,wss:443},zO=function(e,t){var r;return 2==e.length&&yO(PO,mO(e,0))&&(":"==(r=mO(e,1))||!t&&"|"==r)},JO=function(e){var t;return e.length>1&&zO(IO(e,0,2))&&(2==e.length||"/"===(t=mO(e,2))||"\\"===t||"?"===t||"#"===t)},QO=function(e){return"."===e||"%2e"===RO(e)},qO=function(e){return".."===(e=RO(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},$O={},eP={},tP={},rP={},nP={},iP={},oP={},aP={},sP={},uP={},cP={},lP={},fP={},dP={},hP={},pP={},vP={},mP={},yP={},gP={},bP={},_P=function(e,t,r){var n,i,o,a=rO(e);if(t){if(i=this.parse(a))throw dO(i);this.searchParams=null}else{if(void 0!==r&&(n=new _P(r,!0)),i=this.parse(a,null,n))throw dO(i);(o=lO(new cO)).bindURL(this),this.searchParams=o}};_P.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s=this,u=t||$O,c=0,l="",f=!1,d=!1,h=!1;for(e=rO(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=EO(e,WO,"")),e=EO(e,BO,""),n=qA(e);c<=n.length;){switch(i=n[c],u){case $O:if(!i||!yO(PO,i)){if(t)return kO;u=tP;continue}l+=RO(i),u=eP;break;case eP:if(i&&(yO(xO,i)||"+"==i||"-"==i||"."==i))l+=RO(i);else{if(":"!=i){if(t)return kO;l="",u=tP,c=0;continue}if(t&&(s.isSpecial()!=JA(KO,l)||"file"==l&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=l,t)return void(s.isSpecial()&&KO[s.scheme]==s.port&&(s.port=null));l="","file"==s.scheme?u=dP:s.isSpecial()&&r&&r.scheme==s.scheme?u=rP:s.isSpecial()?u=aP:"/"==n[c+1]?(u=nP,c++):(s.cannotBeABaseURL=!0,SO(s.path,""),u=yP)}break;case tP:if(!r||r.cannotBeABaseURL&&"#"!=i)return kO;if(r.cannotBeABaseURL&&"#"==i){s.scheme=r.scheme,s.path=$A(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,u=bP;break}u="file"==r.scheme?dP:iP;continue;case rP:if("/"!=i||"/"!=n[c+1]){u=iP;continue}u=sP,c++;break;case nP:if("/"==i){u=uP;break}u=mP;continue;case iP:if(s.scheme=r.scheme,i==WA)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=$A(r.path),s.query=r.query;else if("/"==i||"\\"==i&&s.isSpecial())u=oP;else if("?"==i)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=$A(r.path),s.query="",u=gP;else{if("#"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=$A(r.path),s.path.length--,u=mP;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=$A(r.path),s.query=r.query,s.fragment="",u=bP}break;case oP:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,u=mP;continue}u=uP}else u=sP;break;case aP:if(u=sP,"/"!=i||"/"!=mO(l,c+1))continue;c++;break;case sP:if("/"!=i&&"\\"!=i){u=uP;continue}break;case uP:if("@"==i){f&&(l="%40"+l),f=!0,o=qA(l);for(var p=0;p<o.length;p++){var v=o[p];if(":"!=v||h){var m=YO(v,XO);h?s.password+=m:s.username+=m}else h=!0}l=""}else if(i==WA||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(f&&""==l)return"Invalid authority";c-=qA(l).length+1,l="",u=cP}else l+=i;break;case cP:case lP:if(t&&"file"==s.scheme){u=pP;continue}if(":"!=i||d){if(i==WA||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(s.isSpecial()&&""==l)return AO;if(t&&""==l&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(l))return a;if(l="",u=vP,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),l+=i}else{if(""==l)return AO;if(a=s.parseHost(l))return a;if(l="",u=fP,t==lP)return}break;case fP:if(!yO(LO,i)){if(i==WA||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||t){if(""!=l){var y=hO(l,10);if(y>65535)return OO;s.port=s.isSpecial()&&y===KO[s.scheme]?null:y,l=""}if(t)return;u=vP;continue}return OO}l+=i;break;case dP:if(s.scheme="file","/"==i||"\\"==i)u=hP;else{if(!r||"file"!=r.scheme){u=mP;continue}if(i==WA)s.host=r.host,s.path=$A(r.path),s.query=r.query;else if("?"==i)s.host=r.host,s.path=$A(r.path),s.query="",u=gP;else{if("#"!=i){JO(gO($A(n,c),""))||(s.host=r.host,s.path=$A(r.path),s.shortenPath()),u=mP;continue}s.host=r.host,s.path=$A(r.path),s.query=r.query,s.fragment="",u=bP}}break;case hP:if("/"==i||"\\"==i){u=pP;break}r&&"file"==r.scheme&&!JO(gO($A(n,c),""))&&(zO(r.path[0],!0)?SO(s.path,r.path[0]):s.host=r.host),u=mP;continue;case pP:if(i==WA||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&zO(l))u=mP;else if(""==l){if(s.host="",t)return;u=vP}else{if(a=s.parseHost(l))return a;if("localhost"==s.host&&(s.host=""),t)return;l="",u=vP}continue}l+=i;break;case vP:if(s.isSpecial()){if(u=mP,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i){if(t||"#"!=i){if(i!=WA&&(u=mP,"/"!=i))continue}else s.fragment="",u=bP}else s.query="",u=gP;break;case mP:if(i==WA||"/"==i||"\\"==i&&s.isSpecial()||!t&&("?"==i||"#"==i)){if(qO(l)?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||SO(s.path,"")):QO(l)?"/"==i||"\\"==i&&s.isSpecial()||SO(s.path,""):("file"==s.scheme&&!s.path.length&&zO(l)&&(s.host&&(s.host=""),l=mO(l,0)+":"),SO(s.path,l)),l="","file"==s.scheme&&(i==WA||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)wO(s.path);"?"==i?(s.query="",u=gP):"#"==i&&(s.fragment="",u=bP)}else l+=YO(i,HO);break;case yP:"?"==i?(s.query="",u=gP):"#"==i?(s.fragment="",u=bP):i!=WA&&(s.path[0]+=YO(i,ZO));break;case gP:t||"#"!=i?i!=WA&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":YO(i,ZO)):(s.fragment="",u=bP);break;case bP:i!=WA&&(s.fragment+=YO(i,FO))}c++}},parseHost:function(e){var t,r,n;if("["==mO(e,0)){if("]"!=mO(e,e.length-1))return AO;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,d=function(){return mO(e,f)};if(":"==d()){if(":"!=mO(e,1))return;f+=2,l=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=r=0;r<4&&yO(jO,d());)t=16*t+hO(d(),16),f++,r++;if("."==d()){if(0==r)return;if(f-=r,c>6)return;for(n=0;d();){if(i=null,n>0){if(!("."==d()&&n<4))return;f++}if(!yO(LO,d()))return;for(;yO(LO,d());){if(o=hO(d(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if(f++,!d())return}else if(d())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(IO(e,1,-1)),!t)return AO;this.host=t}else if(this.isSpecial()){if(e=tO(e),yO(UO,e))return AO;if(t=function(e){var t,r,n,i,o,a,s,u=TO(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==mO(i,0)&&(o=yO(MO,i)?16:8,i=IO(i,8==o?1:2)),""===i)a=0;else{if(!yO(10==o?DO:8==o?NO:jO,i))return e;a=hO(i,o)}SO(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=vO(256,5-t))return null}else if(a>255)return null;for(s=_O(r),n=0;n<r.length;n++)s+=r[n]*vO(256,3-n);return s}(e),null===t)return AO;this.host=t}else{if(yO(VO,e))return AO;for(t="",r=qA(e),n=0;n<r.length;n++)t+=YO(r[n],ZO);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return JA(KO,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&zO(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=GO(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+gO(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw dO(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new SP(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+GO(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(rO(e)+":",$O)},getUsername:function(){return this.username},setUsername:function(e){var t=qA(rO(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=YO(t[r],XO)}},getPassword:function(){return this.password},setPassword:function(e){var t=qA(rO(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=YO(t[r],XO)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?GO(e):GO(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,cP)},getHostname:function(){var e=this.host;return null===e?"":GO(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,lP)},getPort:function(){var e=this.port;return null===e?"":rO(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=rO(e))?this.port=null:this.parse(e,fP))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+gO(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,vP))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=rO(e))?this.query=null:("?"==mO(e,0)&&(e=IO(e,1)),this.query="",this.parse(e,gP)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=rO(e))?("#"==mO(e,0)&&(e=IO(e,1)),this.fragment="",this.parse(e,bP)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var SP=function(e){var t=zA(this,EP),r=iO(arguments.length,1)>1?arguments[1]:void 0,n=sO(t,new _P(e,!1,r));GA||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},EP=SP.prototype,wP=function(e,t){return{get:function(){return uO(this)[e]()},set:t&&function(e){return uO(this)[t](e)},configurable:!0,enumerable:!0}};if(GA&&(KA(EP,"href",wP("serialize","setHref")),KA(EP,"origin",wP("getOrigin")),KA(EP,"protocol",wP("getProtocol","setProtocol")),KA(EP,"username",wP("getUsername","setUsername")),KA(EP,"password",wP("getPassword","setPassword")),KA(EP,"host",wP("getHost","setHost")),KA(EP,"hostname",wP("getHostname","setHostname")),KA(EP,"port",wP("getPort","setPort")),KA(EP,"pathname",wP("getPathname","setPathname")),KA(EP,"search",wP("getSearch","setSearch")),KA(EP,"searchParams",wP("getSearchParams")),KA(EP,"hash",wP("getHash","setHash"))),YA(EP,"toJSON",(function(){return uO(this).serialize()}),{enumerable:!0}),YA(EP,"toString",(function(){return uO(this).serialize()}),{enumerable:!0}),fO){var TP=fO.createObjectURL,IP=fO.revokeObjectURL;TP&&YA(SP,"createObjectURL",HA(TP,fO)),IP&&YA(SP,"revokeObjectURL",HA(IP,fO))}nO(SP,"URL"),BA({global:!0,constructor:!0,forced:!ZA,sham:!GA},{URL:SP});const RP="player-state-change",CP="screen-sharing-stopped",kP="audio-mixing-finished",AP="audio-mixing-played",OP="player-state-trace",PP="Error",xP=["camera-capture"],LP={CameraCapture:xP[0]},MP={low:{sampleRate:16e3,channelCount:1,bitrate:24e3},standard:{sampleRate:48e3,channelCount:1,bitrate:4e4},high:{sampleRate:48e3,channelCount:1,bitrate:128e3}},NP=["low","standard","high"],DP={"90p_1":{width:160,height:90,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"90p_2":{width:120,height:90,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"120p_1":{width:160,height:120,frameRate:15,minBitrate:64e3,maxBitrate:12e4},"120p_2":{width:120,height:120,frameRate:15,minBitrate:64e3,maxBitrate:11e4},"180p_1":{width:320,height:180,frameRate:15,minBitrate:8e4,maxBitrate:32e4},"180p_2":{width:240,height:180,frameRate:15,minBitrate:8e4,maxBitrate:17e4},"180p_3":{width:180,height:180,frameRate:15,minBitrate:64e3,maxBitrate:13e4},"240p_1":{width:320,height:240,frameRate:15,minBitrate:1e5,maxBitrate:4e5},"240p_2":{width:240,height:240,frameRate:15,minBitrate:8e4,maxBitrate:32e4},"270p_1":{width:480,height:270,frameRate:15,minBitrate:16e4,maxBitrate:6e5},"300p_1":{width:400,height:300,frameRate:15,minBitrate:2e5,maxBitrate:5e5},"360p_1":{width:640,height:360,frameRate:15,minBitrate:2e5,maxBitrate:8e5},"360p_2":{width:480,height:360,frameRate:15,minBitrate:2e5,maxBitrate:7e5},"360p_3":{width:360,height:360,frameRate:15,minBitrate:15e4,maxBitrate:6e5},"450p_1":{width:800,height:450,frameRate:15,minBitrate:3e5,maxBitrate:95e4},"480p_1":{width:640,height:480,frameRate:15,minBitrate:25e4,maxBitrate:9e5},"480p_2":{width:480,height:480,frameRate:15,minBitrate:2e5,maxBitrate:8e5},"540p_1":{width:960,height:540,frameRate:15,minBitrate:4e5,maxBitrate:1e6},"630p_1":{width:1120,height:630,frameRate:15,minBitrate:45e4,maxBitrate:115e4},"720p_1":{width:1280,height:720,frameRate:15,minBitrate:5e5,maxBitrate:15e5},"720p_2":{width:960,height:720,frameRate:15,minBitrate:45e4,maxBitrate:11e5},"1080p_1":{width:1920,height:1080,frameRate:15,minBitrate:6e5,maxBitrate:2e6},"1080p_2":{width:1440,height:1080,frameRate:15,minBitrate:55e4,maxBitrate:17e5}},jP=["90p_1","90p_2","120p_1","120p_2","180p_1","180p_2","180p_3","240p_1","240p_2","270p_1","300p_1","360p_1","360p_2","360p_3","450p_1","480p_1","480p_2","540p_1","630p_1","720p_1","720p_2","1080p_1","1080p_2"],UP={"720p":{width:1280,height:720,frameRate:15,bitrate:12e5},"1080p":{width:1920,height:1080,frameRate:15,bitrate:2e6}},VP=["720p","1080p"],WP="inbound-rtp-audio",BP="inbound-rtp-video",GP="outbound-rtp-audio",ZP="outbound-rtp-video",FP="remote-inbound-rtp-audio",HP="remote-inbound-rtp-video";let XP=function(e){return e[e.IDLE=0]="IDLE",e[e.INIT=1]="INIT",e[e.PLAY=2]="PLAY",e[e.PAUSE=3]="PAUSE",e}({});const YP=["IDLE","DISCONNECTED","CONNECTING","RECONNECTING","CONNECTED"];let KP=function(e){return e[e.IDLE=0]="IDLE",e[e.DISCONNECTED=1]="DISCONNECTED",e[e.CONNECTING=2]="CONNECTING",e[e.RECONNECTING=3]="RECONNECTING",e[e.CONNECTED=4]="CONNECTED",e}({}),zP=function(e){return e[e.MediaStatusAvailable=1]="MediaStatusAvailable",e[e.MediaStatusUnavailable=2]="MediaStatusUnavailable",e}({}),JP=function(e){return e[e.BackgroundMusic=1]="BackgroundMusic",e[e.Audio=2]="Audio",e[e.Video=3]="Video",e[e.Aux=4]="Aux",e}({}),QP=function(e){return e[e.MediaOffline=0]="MediaOffline",e[e.MediaMuted=1]="MediaMuted",e[e.MediaUnmuted=2]="MediaUnmuted",e}({});const qP=new Set(["TOP_AUDIO"]);let $P=function(e){return e.configNotify="NOTIFY_CONFIG",e.watchStreamNotify="WATCH_STREAM_NOTIFY",e.disconnectNotify="DISCONNECT_NOTIFY",e.pushStreamNotify="PUSH_STREAM_NOTIFY",e.reconnectNotify="RECONNECT_NOTIFY",e.stopPushStreamNotify="STOP_PUSH_STREAM_NOTIFY",e.changeStreamStatusNotify="CHANGE_STREAM_STATUS_NOTIFY",e.appDataChangeNotify="APP_DATA_NOTIFY",e.top3AudioVolumeNotify="TOP_AUDIO",e.statusChangeNotify="NOTIFY_STATUS",e.publishStatusNotify="PUBLISH_STATUS_NOTIFY",e.uploadLogNotify="UPLOAD_LOG_NOTIFY",e.roomStreamStatusNotify="ROOM_STREAM_STATUS_NOTIFY",e.kickRoomNotify="KICK_ROOM",e}({}),ex=function(e){return e.main="main",e.middle1="middle1",e.middle2="middle2",e.middle3="middle3",e.middle4="middle4",e.slides="slides",e.desktop="desktop",e}({});async function tx(){return new Promise(((e,t)=>{navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices||t(new oc(nc.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES)),navigator.mediaDevices.enumerateDevices().then((r=>{r&&0!==r.length?e(r):t(new oc(nc.RTC_ERR_CODE_NO_AVAILABLE_DEVICES))})).catch((e=>{t(e)}))}))}async function rx(){return new Promise(((e,t)=>{tx().then((r=>{const n=r.filter((e=>"videoinput"===e.kind));n&&0!==n.length?e(n):t(new oc(nc.RTC_ERR_CODE_NO_AVAILABLE_VIDEO_INPUT_DEVICES))})).catch((e=>{t(e)}))}))}const nx="0",ix=-1e3;let ox=function(e){return e[e.Idle=0]="Idle",e[e.Joining=1]="Joining",e[e.Joined=2]="Joined",e[e.Leaving=3]="Leaving",e[e.Rejoining=4]="Rejoining",e}({}),ax=function(e){return e[e.DEFAULT_BANDWIDTH_4M=4096e3]="DEFAULT_BANDWIDTH_4M",e[e.MIN_BAND_WIDTH=3072]="MIN_BAND_WIDTH",e[e.MAX_BAND_WIDTH=51200]="MAX_BAND_WIDTH",e}({}),sx=function(e){return e[e.HRTC_LEAVE_REASON_USER_LEAVE_ROOM=0]="HRTC_LEAVE_REASON_USER_LEAVE_ROOM",e[e.HRTC_LEAVE_REASON_SERVER_ERROR=1]="HRTC_LEAVE_REASON_SERVER_ERROR",e[e.HRTC_LEAVE_REASON_BREAKDOWN=2]="HRTC_LEAVE_REASON_BREAKDOWN",e[e.HRTC_LEAVE_REASON_SERVICE_UNREACHABLE=3]="HRTC_LEAVE_REASON_SERVICE_UNREACHABLE",e[e.HRTC_LEAVE_REASON_INTERNAL_ERROR=4]="HRTC_LEAVE_REASON_INTERNAL_ERROR",e[e.HRTC_LEAVE_REASON_KICKED_OFF=5]="HRTC_LEAVE_REASON_KICKED_OFF",e[e.HRTC_LEAVE_REASON_SIGNATURE_EXPIRED=6]="HRTC_LEAVE_REASON_SIGNATURE_EXPIRED",e[e.HRTC_LEAVE_REASON_RECONNECT_FAILED=7]="HRTC_LEAVE_REASON_RECONNECT_FAILED",e[e.HRTC_LEAVE_REASON_NETWORK_TEST=8]="HRTC_LEAVE_REASON_NETWORK_TEST",e[e.HRTC_LEAVE_REASON_USER_REMOVED=9]="HRTC_LEAVE_REASON_USER_REMOVED",e[e.HRTC_LEAVE_REASON_ROOM_DISMISSED=10]="HRTC_LEAVE_REASON_ROOM_DISMISSED",e}({}),ux=function(e){return e[e.ON=1]="ON",e[e.OFF=2]="OFF",e}({}),cx=function(e){return e[e.portNormal=1]="portNormal",e[e.portReduce=2]="portReduce",e}({});const lx={Error:"Error",StreamAdded:"stream-added",StreamRemoved:"stream-removed",StreamUpdated:"stream-updated",StreamSubscribed:"stream-subscribed",ClientBanned:"client-banned",NetworkQuality:"network-quality",ConnectionStateChanged:"connection-state-changed",PeerJoin:"peer-join",PeerLeave:"peer-leave",LocalLeave:"local-leave",MuteAudio:"mute-audio",UnmuteAudio:"unmute-audio",MuteVideo:"mute-video",UnmuteVideo:"unmute-video",LogUploaded:"log-upload-result",SignatureExpired:"signature-expired",CameraChanged:"camera-changed",RecordingDeviceChanged:"recording-device-changed",PlaybackDeviceChanged:"playback-device-changed",StreamInterrupted:"stream-interrupted",StreamRecovered:"stream-recovered",VolumeIndicator:"volume-indicator",UserNameChanged:"remote-user-name-changed",BatchSubscribeFailed:"batch-subscribe-failed",LiveStreamingUpdated:"live-streaming-updated",RtcStats:"rtc-stats",CmdMsgReceived:"cmd-msg-received",CmdChannelEstablished:"cmd-channel-established",CmdChannelDisconnect:"cmd-channel-disconnect",MediaConnectionStateChanged:"media-connection-state-changed",TransportProtocolChanged:"transport-protocol-changed",TransportStats:"transport-stats",RoomStreamStatus:"room-stream-status",KickRoomStatus:"kick-room"};let fx=function(e){return e[e.NON_ENCRYPTION=0]="NON_ENCRYPTION",e[e.ENCRYPTION_FRAME_SDK=1]="ENCRYPTION_FRAME_SDK",e[e.ENCRYPTION_FRAME_APP=2]="ENCRYPTION_FRAME_APP",e[e.ENCRYPTION_E2E_WITHOUT_MEDIA=3]="ENCRYPTION_E2E_WITHOUT_MEDIA",e}({}),dx=function(e){return e.Connected="CONNECTED",e.Reconnecting="RECONNECTING",e.DisConnected="DISCONNECTED",e}({}),hx=function(e){return e.WEBSOCKET="WebSocket",e.DATA_CHANNEL="DataChannel",e}({}),px=function(e){return e[e.ARRAY_BUFFER=0]="ARRAY_BUFFER",e[e.STRING=1]="STRING",e}({}),vx=function(e){return e[e.PAUSE=0]="PAUSE",e[e.NORMAL=1]="NORMAL",e}({}),mx=function(e){return e[e.NET_OR_SERVERIP_ERROR=1]="NET_OR_SERVERIP_ERROR",e[e.ROOM_NOT_AVAILABLE=2]="ROOM_NOT_AVAILABLE",e[e.SERVER_ERROR=3]="SERVER_ERROR",e[e.SERVER_NO_RESPONSE=4]="SERVER_NO_RESPONSE",e[e.AUTHENTICATION_FAILED=5]="AUTHENTICATION_FAILED",e[e.RETRY_AUTHENTICATION=6]="RETRY_AUTHENTICATION",e[e.SYNCHRONIZE_FAILED=7]="SYNCHRONIZE_FAILED",e[e.URL_ERROR=8]="URL_ERROR",e[e.TERMINAL_ERROR=9]="TERMINAL_ERROR",e}({}),yx=function(e){return e[e.LEAVE_ROOM_SUCCESS=0]="LEAVE_ROOM_SUCCESS",e[e.LEAVE_ROOM_ERROR=1]="LEAVE_ROOM_ERROR",e}({}),gx=function(e){return e[e.ACTION_START=0]="ACTION_START",e[e.ACTION_STOP=1]="ACTION_STOP",e}({}),bx=function(e){return e[e.RESULT_SUCCESS=0]="RESULT_SUCCESS",e[e.RESULT_ERROR=1]="RESULT_ERROR",e}({}),_x=function(e){return e[e.OUTPUT_AUDIO=0]="OUTPUT_AUDIO",e[e.INPUT_AUDIO=1]="INPUT_AUDIO",e[e.INPUT_VIDEO=2]="INPUT_VIDEO",e}({}),Sx=function(e){return e[e.AUDIO=0]="AUDIO",e[e.VIDEO=1]="VIDEO",e[e.AUX=2]="AUX",e}({}),Ex=function(e){return e[e.SUCCESS=0]="SUCCESS",e[e.FAIL=1]="FAIL",e}({});const wx=0,Tx=1;let Ix=function(e){return e[e.SIGNAL=0]="SIGNAL",e[e.MEDIA=1]="MEDIA",e}({}),Rx=function(e){return e[e.CLOSED=0]="CLOSED",e[e.CONNECTED=1]="CONNECTED",e}({}),Cx=function(e){return e[e.EVENT_JOIN_ROOM=1]="EVENT_JOIN_ROOM",e[e.EVENT_LEAVE_ROOM=2]="EVENT_LEAVE_ROOM",e[e.EVENT_WATCH=3]="EVENT_WATCH",e[e.EVENT_OPT_AUDIO=5]="EVENT_OPT_AUDIO",e[e.EVENT_SWITCH_NET=6]="EVENT_SWITCH_NET",e[e.EVENT_OPT_VIDEO=7]="EVENT_OPT_VIDEO",e[e.EVENT_SWITCH_DEVICE=9]="EVENT_SWITCH_DEVICE",e[e.EVENT_DNS_TIME=10]="EVENT_DNS_TIME",e[e.EVENT_SWITCH_ROLE=11]="EVENT_SWITCH_ROLE",e[e.EVENT_SEND_MEDIA=12]="EVENT_SEND_MEDIA",e[e.EVENT_START_MEDIA=13]="EVENT_START_MEDIA",e[e.EVENT_SEND_AUX_STREAM=14]="EVENT_SEND_AUX_STREAM",e[e.EVENT_SUBSCIBE=16]="EVENT_SUBSCIBE",e[e.EVENT_CONNECT_OTHER_ROOM=17]="EVENT_CONNECT_OTHER_ROOM",e[e.EVENT_CONNECTION_CHANNEL_STATUS=18]="EVENT_CONNECTION_CHANNEL_STATUS",e[e.EVENT_SET_UP_STREAM=19]="EVENT_SET_UP_STREAM",e[e.EVENT_SET_AUDIO_POLICY=20]="EVENT_SET_AUDIO_POLICY",e}({}),kx=function(e){return e[e.QoS_UP_STREAM_VIDEO=1001]="QoS_UP_STREAM_VIDEO",e[e.QoS_DOWN_STREAM_VIDEO=1002]="QoS_DOWN_STREAM_VIDEO",e[e.QoS_UP_STREAM_AUDIO=1003]="QoS_UP_STREAM_AUDIO",e[e.QoS_DOWN_STREAM_AUDIO=1004]="QoS_DOWN_STREAM_AUDIO",e[e.QoS_AUX_UP_STREAM_VIDEO=1005]="QoS_AUX_UP_STREAM_VIDEO",e[e.QoS_AUX_DOWN_STREAM_VIDEO=1006]="QoS_AUX_DOWN_STREAM_VIDEO",e[e.QoS_DOWN_STREAM_AUDIO_STAT=1007]="QoS_DOWN_STREAM_AUDIO_STAT",e[e.QoS_UP_STREAM_VIDEO_SUM=1011]="QoS_UP_STREAM_VIDEO_SUM",e[e.QoS_DOWN_STREAM_VIDEO_SUM=1012]="QoS_DOWN_STREAM_VIDEO_SUM",e[e.QoS_UP_STREAM_AUDIO_SUM=1013]="QoS_UP_STREAM_AUDIO_SUM",e[e.QoS_DOWN_STREAM_AUDIO_SUM=1014]="QoS_DOWN_STREAM_AUDIO_SUM",e}({}),Ax=function(e){return e[e.DEVICE_RT_SYSTEM=2001]="DEVICE_RT_SYSTEM",e[e.DEVICE_RT_CAMERA=2002]="DEVICE_RT_CAMERA",e[e.DEVICE_RT_SPEAKER=2003]="DEVICE_RT_SPEAKER",e[e.DEVICE_RT_MICROPHONE=2004]="DEVICE_RT_MICROPHONE",e}({}),Ox=function(e){return e[e.DEVICE_STATUS_SPEAKER=3001]="DEVICE_STATUS_SPEAKER",e[e.DEVICE_STATUS_CAMERA=3002]="DEVICE_STATUS_CAMERA",e[e.DEVICE_STATUS_MICROPHONE=3003]="DEVICE_STATUS_MICROPHONE",e[e.DEVICE_STATUS_DEVICE_CHANGE=3004]="DEVICE_STATUS_DEVICE_CHANGE",e[e.DEVICE_STATUS_ERROR=3005]="DEVICE_STATUS_ERROR",e[e.DEVICE_STATUS_MEDIA_QUALITY=3006]="DEVICE_STATUS_MEDIA_QUALITY",e[e.DEVICE_STATUS_USERAGENT=3007]="DEVICE_STATUS_USERAGENT",e}({}),Px=function(e){return e[e.SIGNAL_REQUEST=401]="SIGNAL_REQUEST",e[e.SIGNAL_RESPONSE=402]="SIGNAL_RESPONSE",e}({}),xx=function(e){return e[e.API_CALL=501]="API_CALL",e[e.CALLBACK_API=502]="CALLBACK_API",e}({}),Lx=function(e){return e[e.FirstFrame=606]="FirstFrame",e}({}),Mx=function(e){return e[e.TraceNuwa=2998]="TraceNuwa",e}({}),Nx=function(e){return e[e.SUCCESS=0]="SUCCESS",e[e.FAIL=1]="FAIL",e}({});const Dx=["watch","batch_watch","cancel_watch"];let jx=function(e){return e[e.SUCCESS=0]="SUCCESS",e[e.NETWORK_CONNECT_ERROR=1]="NETWORK_CONNECT_ERROR",e[e.CLIENT_NOT_IDEL=2]="CLIENT_NOT_IDEL",e[e.SERVER_ERROR=3]="SERVER_ERROR",e[e.INTERNAL_ERROR=9]="INTERNAL_ERROR",e}({});const Ux="2.0.9.545",Vx="a63440e",Wx="v3",Bx=5e3,Gx=1e4,Zx=5,Fx=6,Hx=120,Xx="https://logservice.hicloud.com:443",Yx="1090",Kx=4,zx=1e3,Jx=["webCongestionAlgorithm","webLowLatency","webPlayoutMinDelay","webPlayoutMaxDelay","webFlexfec03","minBitrateByRemb"];let Qx=function(e){return e.TRACK_TYPE_AUDIO="audio",e.TRACK_TYPE_VIDEO="video",e.TYPE_APPLICATION="application",e}({}),qx=function(e){return e.STREAM_TYPE_MAIN="main",e.STREAM_TYPE_AUX="aux",e}({}),$x=function(e){return e[e.USER_SUBSCRIBE_AUDIOPOLICY=0]="USER_SUBSCRIBE_AUDIOPOLICY",e[e.TOPN_AUDIOPOLICY=1]="TOPN_AUDIOPOLICY",e}({}),eL=function(e){return e[e.USER_SUBSCRIBE_AUDIOPOLICY=2]="USER_SUBSCRIBE_AUDIOPOLICY",e[e.TOPN_AUDIOPOLICY=3]="TOPN_AUDIOPOLICY",e}({}),tL=function(e){return e[e.COMMON_SFU_RESOURCE=0]="COMMON_SFU_RESOURCE",e[e.COMPANY_SFU_RESOURCE=1]="COMPANY_SFU_RESOURCE",e[e.MPC_SFU_RESOURCE=2]="MPC_SFU_RESOURCE",e[e.LLL_SFU_RESOURCE=3]="LLL_SFU_RESOURCE",e}({});let rL=function(e){return e[e.NETWORK_QUALITY_UNKNOW=0]="NETWORK_QUALITY_UNKNOW",e[e.NETWORK_QUALITY_GREAT=1]="NETWORK_QUALITY_GREAT",e[e.NETWORK_QUALITY_GOOD=2]="NETWORK_QUALITY_GOOD",e[e.NETWORK_QUALITY_DEFECTS=3]="NETWORK_QUALITY_DEFECTS",e[e.NETWORK_QUALITY_WEAK=4]="NETWORK_QUALITY_WEAK",e[e.NETWORK_QUALITY_BAD=5]="NETWORK_QUALITY_BAD",e[e.NETWORK_QUALITY_DISCONNECT=6]="NETWORK_QUALITY_DISCONNECT",e}({});function nL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function iL(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nL(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nL(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oL(e){const t=jP.find((t=>t.startsWith("".concat(e.height))&&DP[t].width===e.width||parseInt(t)>e.height));t&&(e.maxBitrate&&e.minBitrate||(e.maxBitrate=DP[t].maxBitrate,e.minBitrate=DP[t].minBitrate),e.frameRate||(e.frameRate=DP[t].frameRate))}let aL=function(){function e(){a(this,e)}return u(e,null,[{key:"getLocalProfileByTrack",value:function e(t,r){const n={},i=t.getSettings();if(t.kind===Qx.TRACK_TYPE_AUDIO)n.sampleRate=i.sampleRate,n.channelCount=1;else{var o,a,s,u;const e=t.getConstraints();n.width="number"==typeof e.width?e.width:(null===(o=e.width)||void 0===o?void 0:o.ideal)||i.width,n.height="number"==typeof e.height?e.height:(null===(a=e.height)||void 0===a?void 0:a.ideal)||i.height,n.frameRate=("number"==typeof e.frameRate?e.frameRate:null===(s=e.frameRate)||void 0===s?void 0:s.ideal)||parseInt(null===(u=i.frameRate)||void 0===u?void 0:u.toString()),n.minBitrate=null!=r&&r.minBitrate?null==r?void 0:r.minBitrate:null,n.maxBitrate=null!=r&&r.maxBitrate?null==r?void 0:r.maxBitrate:null,oL(n)}return n}},{key:"formatVideoProfile",value:function e(t){let r={};if(!t){return r=iL({},DP["360p_2"]),r}if("string"==typeof t){if(jP.includes(t)){r=iL({},DP[t])}}else r.height=t.height,r.width=t.width,r.frameRate=t.frameRate,r.maxBitrate=t.maxBitrate,r.minBitrate=t.minBitrate,void 0!==r.width&&void 0!==r.height||(r.width=DP["360p_2"].width,r.height=DP["360p_2"].height),oL(r);return r}},{key:"formatAudioProfile",value:function e(t){let r={};if(!t){return r=iL({},MP.standard),r}if("string"==typeof t){if(NP.includes(t)){r=iL({},MP[t])}}else r.bitrate=t.bitrate,r.channelCount=t.channelCount,r.sampleRate=t.sampleRate,r.sampleRate||(r.sampleRate=16e3),r.channelCount||(r.channelCount=1),r.bitrate||(r.bitrate=24e3);return r}},{key:"formatScreenProfile",value:function e(t){let r={};if(!t){return r=iL({},UP["720p"]),r}if("string"==typeof t){if(VP.includes(t)){r=iL({},UP[t])}}else r.height=t.height,r.width=t.width,r.bitrate=t.bitrate,r.frameRate=t.frameRate,r.width&&r.height||(r.width=UP["720p"].width,r.height=UP["720p"].height),r.frameRate||(r.frameRate=15),r.bitrate||(r.bitrate=UP["720p"].bitrate);return r}},{key:"handleCaptureErrorUtil",value:function e(t){const r=t.name||"";let n;return n=/.*NotAllowedError.*/gi.test(r)?new oc(nc.RTC_ERR_CODE_CAPTURE_PERMISSION_DENIED):/.*OverConstrainedError.*/gi.test(r)?new oc(nc.RTC_ERR_CODE_CAPTURE_OVER_CONSTRAINED):/.*NotReadableError.*/gi.test(r)?new oc(nc.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_READABLE):/.*NotFoundError.*/gi.test(r)?new oc(nc.RTC_ERR_CODE_CAPTURE_DEVICE_NOT_FOUND):new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR,t.message),n}}])}();window.AudioContext=window.AudioContext||window.webkitAudioContext,window.RTCPeerConnection=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;let sL=function(){function e(){a(this,e)}return u(e,null,[{key:"checkSystemRequirements",value:async function t(){let r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sendrecv";if(!window||!navigator){const e=new oc(nc.RTC_ERR_CODE_WINDOW_OR_NAVIGATOR_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}if("chrome"===hI.browserDetails.browser&&e.getBrowserVersion()<67){const e=new oc(nc.RTC_ERR_CODE_CHROME_VERSION_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}if(!this.isWebRTCSupported()){const e=new oc(nc.RTC_ERR_CODE_WEBRTC_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}if(!this.isWebSocketSupported()){const e=new oc(nc.RTC_ERR_CODE_WEBSOCKET_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}if("sendonly"===n||"sendrecv"===n){if(!await this.isH264EncodeSupported()){const e=new oc(nc.RTC_ERR_CODE_WEBRTC_AVC_ENCODE_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}if(!await this.isUserMediaSupported()){const e=new oc(nc.RTC_ERR_CODE_MEDIA_UPSTREAM_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}await this.checkCapture()}if(("recvonly"===n||"sendrecv"===n)&&!await this.isH264DecodeSupported()){const e=new oc(nc.RTC_ERR_CODE_WEBRTC_AVC_DECODE_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}return!SI.isMobileWeChatBrowser()||!r||await e.checkwWeChatSupported()}},{key:"isUserMediaSupported",value:function e(){if(!navigator.mediaDevices)return!1;const t=["getUserMedia","enumerateDevices"];return t.filter((function(e){return e in navigator.mediaDevices})).length===t.length}},{key:"isWebRTCSupported",value:function e(){const t=!!window.RTCPeerConnection;return AI.getLogger().info("system","WebRTCSupported:".concat(t?"YES":"NO")),t}},{key:"isWebSocketSupported",value:function e(){const t="WebSocket"in window&&2===window.WebSocket.CLOSING;return AI.getLogger().info("system","WebSocketSupported:".concat(t?"YES":"NO")),t}},{key:"isH264EncodeSupported",value:async function e(){const t=new RTCPeerConnection,r=document.createElement("canvas");r.getContext("2d");const n=r.captureStream(0);t.addTrack(n.getVideoTracks()[0],n);const i=await t.createOffer();t.close();const o=-1!==i.sdp.toLowerCase().indexOf("h264");return AI.getLogger().info("system","AVCEncodeSupported:".concat(o?"YES":"NO")),o}},{key:"isH264DecodeSupported",value:async function e(){let t=!1,r=!1;for(;;){const e=new RTCPeerConnection,n=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});if(e.close(),r=-1!==n.sdp.toLowerCase().indexOf("h264"),r||t)return AI.getLogger().info("system","AVCDecodeSupported:".concat(r?"YES":"NO")),r;t=!0}}},{key:"checkCapture",value:async function e(){let t=!1;try{const e=await navigator.mediaDevices.getUserMedia({audio:!0});for(const t of e.getTracks())t.stop()}catch(e){t=!0,AI.getLogger().error("system","audio capture fail,msg:".concat(null==e?void 0:e.message))}try{const e=await navigator.mediaDevices.getUserMedia({video:!0});for(const t of e.getTracks())t.stop()}catch(e){if(AI.getLogger().error("system","video capture fail, msg: ".concat(null==e?void 0:e.message)),t)return aL.handleCaptureErrorUtil(e)}return!0}},{key:"checkwWeChatSupported",value:async function t(){if(!e.checkSupportByRegexRules([".*(iphone|ipad).*MicroMessenger.*",".*huawei.*(TBS|XWEB).*MicroMessenger.*",".*honor.*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; V.*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; (C?P|OPPO).*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; (Redmi|MI).*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; SM-.*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; M2.*(TBS|XWEB).*MicroMessenger.*",".*Linux; Android.*; RMX.*(TBS|XWEB).*MicroMessenger.*"])){const e=new oc(nc.RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED);return AI.getLogger().error("system","code:".concat(e.getCode(),", message:").concat(e.getMsg())),e}return this.checkIOSVersion()}},{key:"checkIOSVersion",value:async function e(){if(0===SI.iosSystemVersionNum()||SI.iosSystemVersionNum()>14.3)return!0;const t=new oc(nc.RTC_ERR_CODE_WEBRTC_WECHAT_UNSUPPORTED,"browser not support,iOS system is earlier than or equal to 14.3");return AI.getLogger().error("system","code:".concat(t.getCode(),", message:").concat(t.getMsg())),t}},{key:"checkSupportByRegexRules",value:function e(t){const r=navigator.userAgent;let n=!1;for(const e of t){if(new RegExp(e,"ig").test(r)){n=!0;break}}return n}},{key:"isRTCScreenShareSupported",value:function e(){return"mediaDevices"in navigator&&"getDisplayMedia"in navigator.mediaDevices}},{key:"isChrome",value:function e(){return"chrome"===hI.browserDetails.browser}},{key:"isFirefox",value:function e(){return"firefox"===hI.browserDetails.browser}},{key:"getBrowserVersion",value:function e(){if("safari"===hI.browserDetails.browser){const e=/.*Version\/(\d+).*/gi.exec(navigator.userAgent);if(e&&2===e.length)return parseInt(e[1])}return"chrome"===hI.browserDetails.browser?hI.browserDetails.version||91:hI.browserDetails.version}},{key:"isOnlySupportUnfiedPlan",value:function t(){let r=!0;if("chrome"===hI.browserDetails.browser){r=e.getBrowserVersion()>90}else"safari"===hI.browserDetails.browser&&(r=hI.browserDetails.supportsUnifiedPlan);return r}},{key:"getBrowserInfo",value:function t(){return"".concat(hI.browserDetails.browser.toLowerCase(),"-").concat(e.getBrowserVersion())}}])}();var uL=function(e){return function(t){return function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}(t)===e}},cL=uL("function"),lL=uL("object"),fL=uL("array"),dL=uL("string"),hL=uL("number"),pL=uL("boolean"),vL=uL("undefined"),mL=uL("null");function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function gL(e,t,r){return t=wL(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,IL()?Reflect.construct(t,r||[],wL(e).constructor):t.apply(e,r))}function bL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kL(n.key),n)}}function SL(e,t,r){return t&&_L(e.prototype,t),r&&_L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EL(){return EL="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=wL(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},EL.apply(null,arguments)}function wL(e){return wL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wL(e)}function TL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RL(e,t)}function IL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(IL=function(){return!!e})()}function RL(e,t){return RL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RL(e,t)}function CL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yL(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yL(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kL(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function AL(e){return AL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AL(e)}var OL="baseinfotype",PL="customEvent",xL="elementEvent",LL="clickEvent",ML="HW_",NL="HWBS_",DL="id",jL="idts",UL="viewts",VL="QuotaExceededError",WL=Array.prototype,BL=function(e,t){return WL.includes&&e.includes===WL.includes?e.includes(t):-1!==e.indexOf(t)},GL=function(e,t,r){var n,i=WL.forEach;if(i&&e.forEach===i)e.forEach(t,r);else if((n=e)&&"object"===AL(n)&&isFinite(n.length)&&n.length>=0&&n.length===Math.floor(n.length)&&n.length<Math.pow(2,32))for(var o=0,a=e.length;o<a;o++)o in e&&t.call(r,e[o],o,e);else for(var s in e)Object.hasOwnProperty.call(e,s)&&t.call(r,e[s],s,e)},ZL=function(e){return GL(WL.slice.call(arguments,1),(function(t){GL(t,(function(t,r){e[r]=t}))})),e},FL=function(e,t){return e.indexOf(t)},HL=function(){var e=new Uint8Array(16),t=window;return(t.crypto||t.webkitCrypto||t.mozCrypto||t.oCrypto||t.msCrypto).getRandomValues(e),function(e,t){if(WL.map&&e.map===WL.map)return e.map(t);var r=[];return GL(e,(function(e,n,i){r.push(t(e))})),r}(e,(function(e){return("0"+e.toString(16)).substr(-2)})).join("")},XL=["token","ha_linker"];function YL(e){return e.tagName.toLowerCase()}var KL=function(e){var t=[];return GL(e,(function(e,r){fL(e)?GL(e,(function(n,i){t.push(r+"="+e[i])})):t.push(r+"="+e)})),t.join("&")},zL=function(){return!vL(window.XMLHttpRequest)&&"withCredentials"in new XMLHttpRequest},JL=navigator,QL=function(){return JL&&!vL(JL.sendBeacon)},qL=function e(t){var r=t.parentElement;if(!r)return null;var n=YL(r);return"body"===n||"html"===n?null:"a"===n?r:e(r)},$L=function(){return(new Date).getTime()},eM=function(e){e.length},tM=function(){return window.haJsBridge||{}},rM=function(e){var t=null;try{if(tM().haGetDeviceInfo){var r=$L(),n=tM().haGetDeviceInfo(e),i=$L();t=dL(n)?JSON.parse(n):n,eM("get device info ".concat(e," use ").concat(i-r," ms. info: ").concat(JSON.stringify(t)))}}catch(e){console.error("json parse device info error.")}return t},nM=window,iM={get:function(e){return nM.localStorage.getItem(e)},set:function(e,t){try{nM.localStorage.setItem(e,t)}catch(e){if(e.name===VL)throw new Error(e.name);console.error(e)}},remove:function(e){nM.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";this.set(t,r),this.get(t)!==r&&(e=!1),this.remove(t)}catch(t){e=!1}return e},length:function(){return nM.localStorage.length},key:function(e){return nM.localStorage.key(e)}},oM=document,aM=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)").exec(oM.cookie);return t?decodeURIComponent(t[2]):null},sM=function(e,t,r,n,i,o){if(e&&!/^(?:expires|max-age|path|domain|secure)$/i.test(e)){var a=[];if(a.push("".concat(e,"=").concat(encodeURIComponent(t))),r){var s=new Date;s.setTime(s.getTime()+r),a.push("expires=".concat(s.toUTCString()))}a.push("path=".concat(n||"/")),i&&a.push("domain=".concat(i)),!0===o&&a.push("secure"),oM.cookie=a.join("; ")}},uM=function(e){var t=new Date;t.setTime(t.getTime()-1);var r=aM(e);mL(r)||(oM.cookie=e+"="+r+";expires="+t.toUTCString()+";path=/")};function cM(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener?e.addEventListener(t,r,n):e.attachEvent("on".concat(t),r)}var lM=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=CL(e.split("?"),2),n=r[0],i=r[1];if(!i)return e;var o=i.split("&").filter((function(e){return!BL(t,e.split("=")[0].toLocaleLowerCase())}));return o.length?"".concat(n,"?").concat(o.join("&")):n},fM=function(e){var t={};e.includes("#")&&(e=e.split("#")[0]);var r=e.split("?")[1];if(!r)return t;for(var n=r.split("&"),i=0;i<n.length;++i){var o=CL(n[i].split("="),2),a=o[0],s=o[1];t[decodeURIComponent(a)]=decodeURIComponent(s)}return t},dM=Object.freeze({__proto__:null,deleteUrlQuery:lM,getQueryParamsFromUrl:fM}),hM=document,pM=document,vM=window,mM=SL((function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];bL(this,e),this.isH5=r,this.waitTime=0,this.waitTimeFlagTime=0,this.waitTimeFlag=!0,this.accessTime=$L(),this.config={defaultCookie:{},useCookie:!1,isInit:!1,usedPageUrl:!0,intervalTime:18e5,batchSend:!1},this.globals={idsite:"",title:pM.title,id:"unknown",rid:"unknown",idts:$L(),idvc:0,idn:"",di:{sessionId:"unknown"},refts:$L(),viewts:$L(),CXX:"",uid:"",cvar:""},this.customData={},GL(dM,(function(e,r){t[r]=e})),cM(vM,"beforeunload",this.beforeUnloadHandler.bind(this)),cM(pM,"visibilitychange",this.stateChanged.bind(this)),this.updateSessionId()}),[{key:"updateSessionId",value:function(){var e=rM("sessionId");e&&e.sessionId&&(this.globals.di.sessionId=e.sessionId)}},{key:"beforeUnloadHandler",value:function(){this.config.isInit&&this.config.useCookie&&sM(this.getStoreName(UL),$L(),7776e6,"/"),this.stateChanged()}},{key:"getStoreName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ML,r=arguments.length>2?arguments[2]:void 0;return e&&this.globals.idsite?"".concat(t).concat(e,"_").concat(this.globals.idsite,"_").concat((r||location.host).replace(/\./g,"_")):""}},{key:"handleSessionId",value:function(){var e=this.getStoreName("idn"),t=aM(e);t||(t=HL()),this.globals.idn=t,this.config.useCookie&&sM(e,t,this.config.intervalTime,"/")}},{key:"stateChanged",value:function(){"visible"===pM.visibilityState&&this.updateSessionId(),"hidden"===pM.visibilityState&&this.config.batchSend&&this.batchSendNow(),this.waitTimeFlag?this.waitTime+=$L()-(this.waitTimeFlagTime||this.accessTime):this.waitTimeFlagTime=$L(),this.waitTimeFlag=!this.waitTimeFlag}},{key:"getData",value:function(e,t,r){var n=vM.navigator.userAgent,i=this.globals,o=i.id,a=i.rid,s=i.di,u=i.CXX,c=i.idsite,l=i.uid,f=i.cvar,d=i.idts,h=i.idvc,p=i.idn,v=i.refts,m=i.viewts;return{type:e,vf:o,rid:a,nsid:s.sessionId,rt:t.eventTime,ut:n.match(/AppleWebKit.*Mobile.*/)?-1!==FL(n," wv")?2:1:0,cxx:u,idsite:c,suid:l,cvar:t.cvar||f,idts:d,idvc:h,idn:p,refts:v,viewts:m,hsv:"2.2.7-501",data:r}}},{key:"getFinalSendData",value:function(e){var t=new Date,r=this.globals,n=r.title,i=r.id,o=r.idsite,a=r.cvar,s=r.idts,u=r.idvc,c=r.idn,l=r.refts,f=r.viewts,d=r.rid,h=r.di,p=this.config.usedPageUrl,v={idsite:encodeURIComponent(o),rec:"1",r:"886244",h:t.getHours(),m:t.getMinutes(),s:t.getSeconds(),url:encodeURIComponent(this.deleteUrlQuery(p?vM.location.href:"/",XL)),_id:encodeURIComponent(i),_rid:encodeURIComponent(d),_nsid:encodeURIComponent(h.sessionId),_idts:s,_idvc:u,_idn:c,urlref:this.deleteUrlQuery(pM.referrer,XL),_refts:l,_viewts:f,scd:"24",vpr:"".concat(vM.screen.width," X ").concat(vM.screen.height),cvar:lL(e.cvar||a)?encodeURIComponent(JSON.stringify(e.cvar||a)):encodeURIComponent(e.cvar||a),pdf:"1",qt:"0",data:this.isH5?JSON.stringify(e):encodeURIComponent(JSON.stringify(e))};return"$PageLeave"===e.type||e.type===LL||e.type===xL?ZL({link:encodeURIComponent(n)},v):ZL({action_name:encodeURIComponent(n)},v)}},{key:"initCookie",value:function(e){this.config.isInit=!0;var t=this.config,r=t.useCookie,n=t.defaultCookie.domain;if(r){if(n){var i=this.getStoreName(DL,ML),o=this.getStoreName(jL,ML);uM(i),uM(o)}var a=this.getStoreName(DL,ML,n),s=this.getStoreName(jL,ML,n),u=aM(a),c=aM(s);e&&e(a,u,s,c,n),u||(iM.isSupport()&&iM.get(a)?(u=iM.get(a),c=iM.get(s)||$L()):(u=HL(),c=$L()),sM(a,u,7776e6,"/",n),sM(s,c,7776e6,"/",n)),this.globals.id=u,this.globals.idts=c||$L();var l=this.getStoreName("refts"),f=aM(l);f||pM.referrer&&(f=$L(),sM(l,f,7776e6,"/")),this.globals.refts=f||$L();var d=this.getStoreName(UL),h=aM(d);this.globals.viewts=h||$L();var p=this.getStoreName("idvc"),v=aM(p);v=v?Number(v)+1:iM.isSupport()&&iM.get(p)?Number(iM.get(p))+1:1,sM(p,v,7776e6,"/"),this.globals.idvc=v,iM.isSupport()&&!iM.get(a)&&(iM.set(a,u),iM.set(s,c),iM.set(p,v))}else this.globals.id="unknown",this.globals.idts=$L(),this.globals.refts=$L(),this.globals.viewts=$L(),this.globals.idvc=0;this.handleSessionId()}},{key:"setIdsite",value:function(e){return dL(e)?new RegExp("^[a-zA-Z0-9_./][A-Za-z0-9_./]*$").test(e)?(this.globals.idsite=e,this.initCookie(),this):(console.error("idsite is invalid."),this):(console.error("idsite type should be string."),this)}},{key:"setAutoTrack",value:function(e,t,r){var n=this;if(!lL(e))return this;var i=function(t,r){var i=new t(n);i.init(e),r&&r(i)};if(t)i(t,r);else if(vM.HAAutoTracker)i(vM.HAAutoTracker,r);else{var o=$L();!function(e,t){var r=hM.createElement("script");r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,t())}:r.onload=t,r.src=e,hM.getElementsByTagName("head")[0].appendChild(r)}(e.autotracker_url,(function(){var e=$L();eM("[load+excute] HAWebSDK autotracker module use ".concat(e-o," ms.")),i(vM.HAAutoTracker,r)}))}return this}}]),yM=SL((function e(t,r,n){bL(this,e),this.core=t,this.dataType=r,this.serverUrl=n,this.state=0,this.keys=[],this.queue=[],this.intervalID=null,this.storageDataLength=0,this.getStorageDataLength=!1}),[{key:"isH5",value:function(){return!0===this.core.isH5||void 0!==tM().haGetDeviceInfo}},{key:"init",value:function(){var e=this;this.core.config.batchSend?(GL(["batchSend"],(function(t){var r=e[t];e[t]=function(){0===this.state?r.apply(this,arguments):this.queue.push([t,arguments])}})),!this.intervalID&&this.core.config.batchSend.interval&&(this.intervalID=setInterval((function(){e.batchSend()}),this.core.config.batchSend.interval))):this.intervalID&&clearInterval(this.intervalID)}},{key:"batchSend",value:function(){var e=this,t=this.getEventsToSendFromStorage();0!==t.length&&(this.state=1,this.onReport(this.core.getFinalSendData(t),(function(t){e.state=0,200===t.status?(e.core.config.batchSend.retryTimes=10,GL(e.keys,(function(e){iM.remove(e)})),e.storageDataLength=e.storageDataLength-e.keys.length,e.keys=[],e.batchSend(),e.queue.length>0&&(e[e.queue[0][0]].apply(e,e.queue[0][1]),e.queue=e.queue.splice(0,1))):e.core.config.batchSend.retryTimes<=1?e.intervalID&&clearInterval(e.intervalID):e.core.config.batchSend.retryTimes--}),!0))}},{key:"onceSend",value:function(e,t){this.onReport(this.core.getFinalSendData(e),t,!1)}},{key:"clearStorageData",value:function(){for(var e=0,t=[];e<iM.length();){var r=iM.key(e);this.getKeyType(r)&&t.push(r),e++}GL(t,(function(e){iM.remove(e)})),this.storageDataLength=0}},{key:"getKeyType",value:function(e){return 0===FL(e,NL)&&-1!==FL(e,this.core.globals.idsite)}},{key:"addToStorage",value:function(e,t){try{var r=this.core.config.maxStorageLength;if(!isNaN(r)&&r>0){if(!this.getStorageDataLength){this.getStorageDataLength=!0;for(var n=0;n<iM.length();){var i=iM.key(n);this.getKeyType(i)&&this.storageDataLength++,n++}}if(this.storageDataLength>=r){for(var o=Math.ceil(this.storageDataLength/2),a=0,s=[];a<iM.length();){var u=iM.key(a);this.getKeyType(u)&&s.push(u),a++}s=s.sort((function(e,t){return JSON.parse(iM.get(e)).rt-JSON.parse(iM.get(t)).rt}));for(var c=0;c<o;c++)iM.remove(s[c]),this.storageDataLength--}}var l=JSON.stringify(e);if(tM().haEncrypt){var f=$L();l=tM().haEncrypt(l);var d=$L();eM("data encrypt use ".concat(d-f," ms. encrypted data: ").concat(l))}iM.set(this.core.getStoreName(HL(),NL),l),!isNaN(r)&&r>0&&this.storageDataLength++}catch(r){r.message===VL&&(this.onceSend(e,t),this.batchSend())}}},{key:"getEventsToSendFromStorage",value:function(){var e=[],t=0;if(this.isH5())for(var r=0;r<iM.length();r++){var n=iM.key(r);if(this.getKeyType(n)){var i=rM("network");if(i&&!1===i.network||"false"===i.network)return e;break}}for(;t<iM.length();){var o=iM.key(t);if(this.getKeyType(o)){var a=iM.get(o);try{if(tM().haDecrypt){var s=$L();if(!(a=tM().haDecrypt(a))){iM.remove(o);continue}var u=$L();eM("data decrypt use ".concat(u-s," ms. decrypted data: ").concat(a))}(a=JSON.parse(a)).dataType===this.dataType&&(this.keys.push(o),delete a.dataType,e.push(a))}catch(e){console.error("get storage error.",e)}if(this.keys.length===this.core.config.batchSend.maxLength)return e}t++}return e}},{key:"getServerUrl",value:function(){var e="",t=this.core,r=t.globals.idsite,n=t.config,i=n.debugMode,o=n.customUrlParams,a=n.serverUrl;return i&&(e="x_hasdk_debug=true"),e=e?e+"&idsite="+r:"idsite="+r,KL(o)&&(e=e+"&"+KL(o)),(this.serverUrl||a)+"?"+e}},{key:"onReport",value:function(e,t,r){if(this.core.globals.idsite){if(this.core.config.serverUrl){if(this.core.config.batchSend&&r)this.sendByAjax(e,t);else if(this.core.config.requestMode)switch(this.core.config.requestMode){case"beacon":this.sendByBeacon(e);break;case"ajax":zL()?this.sendByAjax(e,t):this.sendByBeacon(e);break;case"img":this.sendByImg(e)}else this.core.config.isImg?this.sendByImg(e):QL()?this.sendByBeacon(e):zL()?this.sendByAjax(e,t):this.sendByImg(e)}else console.error("serverUrl is empty")}else console.error("idsite is empty")}},{key:"sendByAjax",value:function(e,t){var r=KL(e),n=new XMLHttpRequest;n.open("POST",this.getServerUrl(),!0),ZL(this.core.config.defaultHeaders,{idsite:this.core.globals.idsite}),GL(this.core.config.defaultHeaders,(function(e,t){n.setRequestHeader(t,e)})),this.core.config.batchSend&&(n.timeout=this.core.config.batchSend.timeout),n.send(r),n.onreadystatechange=function(){n.readyState==n.DONE&&t&&cL(t)&&t(n)}}},{key:"sendByImg",value:function(e){var t=KL(e);this.core.config.debugMode&&(t="x_hasdk_debug=true&"+t);var r=new Image(1,1);r.onerror=function(){},r.src=this.core.config.serverUrl+"?"+t}},{key:"sendByBeacon",value:function(e){var t=KL(e),r=new Blob([t],{type:"application/x-www-form-urlencoded;charset=UTF-8"});navigator.sendBeacon(this.getServerUrl(),r)}}]),gM=document,bM=window,_M=function(){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return bL(this,e),(t=gL(this,e,[r])).config.linker={},t.config.serverUrl="",t.config.requestMode="",t.config.isImg=!1,t.config.debugMode=!1,t.config.customUrlParams={},t.config.defaultHeaders={"Content-type":"application/x-www-form-urlencoded;charset=UTF-8"},t.config.maxStorageLength=0,t.defaultSender=new yM(t),t.reportMap={},cM(gM,"click",t.hrefIntercept.bind(t),!0),t}return TL(e,mM),SL(e,[{key:"setMaxStorageLength",value:function(e){this.config.maxStorageLength=e}},{key:"urlAddLinker",value:function(e,t){if(!e)return e;var r=e.split("#"),n=r[0],i=r[1]?"#".concat(r[1]):"",o=n.replace(/(https|http):\/\/([^/?]+)(.*)/,"$2"),a=!1;if(this.config.linker.exclude&&(a=this.config.linker.exclude.includes(o)),this.config.linker.domains&&!a&&this.config.linker.domains.filter((function(e){return new RegExp("".concat(e,"$"),"i").test(o)})).length){t&&t.preventDefault();var s=this.getStoreName(DL,ML,this.config.defaultCookie.domain),u={ts:$L(),id:aM(s)};this.config.linker.ext&&(u.ext=this.config.linker.ext),n=FL(n,"?")>-1?"".concat(n,"&ha_linker=").concat(bM.btoa(JSON.stringify(u))).concat(i):"".concat(n,"?ha_linker=").concat(bM.btoa(JSON.stringify(u))).concat(i)}return n}},{key:"hrefIntercept",value:function(e){var t=e.target||e.srcElement;if("a"!==YL(t)){var r=qL(t);if(!r)return;t=r}var n=t.getAttribute("href");n&&(n=this.urlAddLinker(n,e),FL(n,"ha_linker")>-1&&bM.open(n,t.getAttribute("target")||"_self"))}},{key:"initCookie",value:function(){var t=this;EL(wL(e.prototype),"initCookie",this).call(this,(function(e,r,n,i,o){var a=fM(gM.location.href).ha_linker;if(a)try{var s=JSON.parse(bM.atob(a));!($L()-s.ts>(s.ext||1e4))&&s.id&&(r||(r=s.id,sM(e,r,7776e6,"/",o),i=$L(),sM(n,i,7776e6,"/",o)),t.globals.rid=s.id)}catch(e){console.error("Invalid linker:"+e)}}))}},{key:"getSender",value:function(){var e=this,t=null;return GL(this.reportMap,(function(r){r.url===e.config.serverUrl&&(t=r.sender)})),t||this.defaultSender}},{key:"push",value:function(){for(var e=arguments,t=this,r=function(){var r=e[n],i=r.shift();setTimeout((function(){try{dL(i)?t[i].apply(t,r):t.apply(t,r)}catch(e){console.error("Invalid method:"+i+", please check!")}}),0)},n=0;n<arguments.length;++n)r();return this}},{key:"setOnReportUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this.config.serverUrl=e;var r=e;return vL(t)||(r=t),this.reportMap[r]||(this.reportMap[r]={url:e,sender:new yM(this,r,e)},this.config.batchSend&&this.reportMap[r].sender.init()),this}},{key:"setTitle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.globals.title=e,this}},{key:"setUserAccount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.globals.id=e,this}},{key:"setCXX",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.globals.CXX=e,this}},{key:"setUid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.globals.uid=e,this}},{key:"setPageData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.globals.cvar=e,this}},{key:"setCustomData",value:function(e){return lL(e)||cL(e)?this.customData=e:console.error("The arguments of the setCustomData() method is invalid."),this}},{key:"setHttpHeader",value:function(e){return lL(e)?(ZL(this.config.defaultHeaders,e),this):(console.error("custom header type should be object."),this)}},{key:"setIsUseCookie",value:function(e){if(!pL(e))return console.error("useCookie type should be boolean"),this;if(this.config.useCookie=e,!this.config.useCookie){var t=gM.cookie.split("; "),r=/^(HW_)(id|idts|idvc|idn|viewts|refts)_/;GL(t,(function(e){var t=e.split("=");r.test(t[0])&&uM(t[0])})),this.initCookie()}return this}},{key:"setReportMethod",value:function(e){return pL(e)?(this.config.isImg=e,this):(console.error("isImg type should be boolean."),this)}},{key:"setSessionTimeoutDuration",value:function(e){return hL(e)?(this.config.intervalTime=e,this):(console.error("intervalTime type should be number."),this)}},{key:"setDebugMode",value:function(e){return pL(e)?(this.config.debugMode=e,this):(console.error("debugMode type should be boolean"),this)}},{key:"setCustomUrlParams",value:function(e){if(!lL(e))return console.error("customUrlParams type should be object"),this;for(var t in e){if(BL(["x_hasdk_debug","url","_id","_idts","_idvc","h","m","s","_rid"],t))return console.error("customUrlParams can'n include x_hasdk_debug, url, _id, _idts, _idvc, h, m, s, _rid"),this;var r=e[t];if(!r||!hL(r)&&!dL(r))return console.error("customUrlParams object value should be number or string"),this;if(!new RegExp("^[a-zA-Z0-9_./][A-Za-z0-9_./]*$").test(t)||!new RegExp("^[a-zA-Z_0-9_./][A-Za-z0-9_./]*$").test(r))return console.error("customUrlParams object include invalid key or value"),this;ZL(this.config.customUrlParams,(n={},o=r,(i=kL(i=t))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n))}var n,i,o;return this}},{key:"setIstUseUrl",value:function(e){return pL(e)?(this.config.usedPageUrl=e,this):(console.error("usedPageUrl type should be boolean."),this)}},{key:"setRequestMode",value:function(e){return"ajax"!==e||zL()?"beacon"!==e||QL()?(BL(["beacon","ajax","img"],e)&&(this.config.requestMode=e),this):(console.error("navigator.sendBeacon() is not supported."),this):(console.error("XMLHttpRequest is not supported."),this)}},{key:"setBatchSend",value:function(e){if(!iM.isSupport())return console.error("localStorage is not supported, so batch send is not supported."),this;if(!zL())return console.error("XMLHttpRequest is not supported, so batch send is not supported."),this;var t={timeout:6e3,interval:6e3,maxLength:6,retryTimes:10};return pL(e)&&e?this.config.batchSend=t:lL(e)&&(this.config.batchSend=ZL(t,e)),GL(this.reportMap,(function(e){e.sender&&e.sender.init()})),this}},{key:"batchSendNow",value:function(){return GL(this.reportMap,(function(e){e.sender&&e.sender.batchSend()})),this}},{key:"setLinker",value:function(e){return lL(e)?fL(e.domains)?e.exclude&&!fL(e.exclude)?(console.error("custom exclude type should be Array."),this):(this.config.linker=e,this):(console.error("custom domains type should be Array."),this):(console.error("custom linker type should be object."),this)}},{key:"setUrlLinker",value:function(e){return this.urlAddLinker(e)}},{key:"setCookie",value:function(e){return lL(e)?(this.config.defaultCookie=e,this):(console.error("custom cookie type should be object."),this)}},{key:"clearStorageData",value:function(){this.getSender().clearStorageData()}}])}(),SM=document,EM=window,wM=SM.documentElement,TM=SM.body,IM=document,RM=window,CM=function(){function e(){var t;return bL(this,e),(t=gL(this,e)).config.baseinfotypeSwitch1=!1,t.switch1Num=0,t.config.baseinfotypeSwitch2=!1,t.switch2Num=0,t}return TL(e,_M),SL(e,[{key:"setBaseinfotypeSwitch",value:function(e){return pL(e)?(this.config.baseinfotypeSwitch1=e,e&&0===this.switch1Num&&(this.switch1Num++,cM(IM,"DOMContentLoaded",this.reportPageEntryEvent.bind(this))),this):(console.error("baseinfotypeSwitch1 type should be boolean."),this)}},{key:"setWindowCloseSwitch",value:function(e){return pL(e)?(this.config.baseinfotypeSwitch2=e,e&&0===this.switch2Num&&(this.switch2Num++,cM(RM,"beforeunload",this.reportPageCloseEvent.bind(this))),this):(console.error("baseinfotypeSwitch2 type should be boolean."),this)}},{key:"sendPageinfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.waitTime=0,this.waitTimeFlagTime=0,this.waitTimeFlag=!0,this.accessTime=$L(),this.config.baseinfotypeSwitch1=!0,this.reportPageEntryEvent(e,t),this}},{key:"sendPageClose",value:function(){return this.config.baseinfotypeSwitch2=!0,this.reportPageCloseEvent(),this}},{key:"sendData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a={eventTime:$L(),eventName:e,eventLabel:t,customData:r,cvar:n};return this.execReport(PL,a,i,o),this}},{key:"sendClickData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a={eventTime:$L(),eventName:e,eventLabel:t,customData:r,cvar:n};return this.execReport(LL,a,i,o),this}},{key:"bindclick",value:function(e,t,r,n,i){var o=this,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e===IM?IM:IM.getElementById(e);return s?(cM(s,t,(function(t){var u=t.screenX,c=t.screenY,l=t.clientX,f=t.clientY,d=EM.innerHeight||wM.clientHeight||TM.clientHeight||0,h=EM.innerWidth||wM.clientWidth||TM.clientWidth||0,p={eventTime:$L(),elementId:e,cls:s.className,data:r,cvar:n,position:{res:"".concat(u,"X").concat(c),vpr:"".concat(l,"X").concat(f),doc:"".concat(h,"X").concat(d)}};o.execReport(xL,p,i,a)})),this):this}},{key:"reportPageEntryEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.execReport(OL,{eventTime:$L()},e,t)}},{key:"reportPageCloseEvent",value:function(){this.execReport(OL,{eventTime:$L()})}},{key:"execReport",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.handleSessionId();var i=this.getEventData(e,t),o=this.getSender();this.config.batchSend&&!n?(i.dataType=o.dataType,o.addToStorage(i,r)):o.onceSend(i,r)}},{key:"getEventData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.currentUrl,n=void 0===r?RM.location.href:r,i={url:lM(this.config.usedPageUrl?n:"/",XL),title:this.globals.title,at:this.accessTime,rf:lM(IM.referrer,XL)};return e===OL?(i.res="".concat(RM.screen.width," X ").concat(RM.screen.height),i.cwt=t.eventTime,i.dt=this.waitTime):e===PL||e===LL?(i.en=t.eventName,i.el=t.eventLabel,i.cd=t.customData,i.custom_properties=this.customData):e===xL&&(i.ei=t.elementId===IM?"#document":t.elementId,i.ec=t.cls,i.ps=t.position,i.data=t.data||""),this.getData(e,t,i)}}])}(),kM=$L(),AM=new CM,OM=$L();eM("[excute] hawebsdk use ".concat(OM-kM," ms."));let PM=function(){function e(){a(this,e)}return u(e,null,[{key:"checkStringParameter",value:function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;if(!t&&0===n)return;if("string"!=typeof t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid type: ".concat(t));const o=this.getStringBytes(t);if(o>r||o<n)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid length: ".concat(t));if(i){if(!new RegExp(i).test(t))throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid format: ".concat(t))}}},{key:"checkAppid",value:function e(t){this.checkStringParameter(t,128,1,"^[a-zA-Z0-9!$%()+-:;=@[\\]_~,]{1,128}$")}},{key:"checkCountryCode",value:function e(t){t&&this.checkStringParameter(t,2,2,"^[A-Z]{2}$")}},{key:"checkDomain",value:function e(t){this.checkStringParameter(t,128,1,"^[a-zA-Z0-9-:;<=.>?@[\\]^_{}|~,]{1,128}$")}},{key:"checkRoomId",value:function e(t){this.checkStringParameter(t,64,1,"^[a-zA-Z0-9-_]{1,64}$")}},{key:"checkUserId",value:function e(t){this.checkStringParameter(t,64,1,"^[a-zA-Z0-9-_]{1,64}$")}},{key:"checkUserName",value:function e(t){this.checkStringParameter(t,256,0)}},{key:"checkUserRole",value:function e(t){if("number"!=typeof t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid parameter: ".concat(t));this.checkStringParameter("".concat(t),1,1,"^[0|2]$")}},{key:"checkSFUResourceType",value:function e(t){if(null!=t){if("number"!=typeof t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid paramter: ".concat(t));this.checkStringParameter("".concat(t),1,1,"^[0|1|2|3]$")}}},{key:"checkResourceTags",value:function e(t){if(null!=t&&(!Array.isArray(t)||t.filter((e=>"string"!=typeof e)).length>0))throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid paramter of resourceTags: ".concat(t))}},{key:"checkUserInfo",value:function e(t){if("object"!=typeof t)throw this.logger.error("ParameterValidator","userInfo type invalid "),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"userInfo type invalid");this.checkUserId(t.userId),this.checkUserName(t.userName),this.checkUserRole(t.role),this.checkUserOptionInfo(t.optionInfo)}},{key:"checkJoinParams",value:function e(t,r){this.checkRoomId(t),this.checkUserInfo(r)}},{key:"getStringBytes",value:function e(t){if(!t)return 0;if("string"!=typeof t)return t.byteLength;let r=0;if(window.TextEncoder){return r=(new TextEncoder).encode(t).length,r}const n=t.length;for(let e=0;e<n;e++)t.charCodeAt(e)>255?r+=3:r++;return r}},{key:"checkUserOptionInfo",value:function e(t){if(t&&![!0,!1,null,void 0].includes(t.recordPlaceholder))throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid parameter: ".concat(t.recordPlaceholder))}},{key:"checkSrcMultiRoomInfo",value:function e(t){if(!t.authorization||!t.ctime||"0"!==t.userId)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid paramters: ".concat(t.authorization," ").concat(t.ctime," ").concat(t.userId))}},{key:"checkDstMultiRoomInfo",value:function e(t,r){this.checkRoomId(t.roomId),this.checkUserRole(r);const n=t.role>=r;if(!t.authorization||!t.ctime||!n)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid paramters: ".concat(t.authorization," ").concat(t.ctime," ").concat(t.role))}},{key:"checkCmdMsgValid",value:function t(r){const n=e.getStringBytes(r);if(n>32768)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid msg length: ".concat(n))}}])}();o(PM,"logger",AI.getLogger());var xM=new(function(){function e(){a(this,e)}return u(e,[{key:"setPorxyServer",value:function e(t){PM.checkStringParameter(t,256,1);const r=/(.*:\/\/)?([^:]+):?(.*)?/.exec(t);let n=t;/^((\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))(\.|$)){4}$/.test(r[2])?r[1]||(n="http://".concat(r[2]).concat(r[3]?":":"").concat(r[3]||"")):r[1]||(n="https://".concat(r[2]).concat(r[3]?":":"").concat(r[3]||"")),this.proxyServer=n}},{key:"getProxyServer",value:function e(){return this.proxyServer}}])}());const LM={},MM={grs_sdk_global_route_config_hwrtc:{applications:[],services:[{name:"com.huawei.cloud.videortn",routeBy:"ser_country>geo_ip",servings:[{countryOrAreaGroup:"DR1",addresses:{GLOBAL:"wss://rtc.platform.dbankcloud.com",ROOT:"wss://rtc-drcn.platform.dbankcloud.com"}},{countryOrAreaGroup:"DR2",addresses:{GLOBAL:"wss://rtc.platform.dbankcloud.com",ROOT:"wss://rtc-dra.platform.dbankcloud.com"}},{countryOrAreaGroup:"DR3",addresses:{GLOBAL:"wss://rtc.platform.dbankcloud.com",ROOT:"wss://rtc-dre.platform.dbankcloud.com"}},{countryOrAreaGroup:"DR4",addresses:{GLOBAL:"wss://rtc.platform.dbankcloud.com",ROOT:"wss://rtc-drru.platform.dbankcloud.com"}}],countryOrAreaGroups:[]}],countryOrAreaGroups:[{id:"DR1",name:"China",countriesOrAreas:["CN"],description:"China zone"},{id:"DR2",name:"Asian-African-Latin American",countriesOrAreas:["AE","AF","AG","AI","AM","AO","AQ","AR","AS","AW","AZ","BB","BD","BF","BH","BI","BJ","BL","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CI","CK","CL","CM","CO","CR","CU","CV","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FK","FM","GA","GD","GE","GF","GH","GM","GN","GP","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IN","IO","IQ","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MQ","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NP","NR","NU","OM","PA","PE","PF","PG","PH","PK","PN","PR","PS","PW","PY","QA","RE","RW","SA","SB","SC","SD","SG","SH","SL","SN","SO","SR","SS","ST","SV","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TV","TW","TZ","UG","UY","UZ","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],description:"Asian-African-Latin American zone"},{id:"DR3",name:"Europe",countriesOrAreas:["AD","AL","AN","AT","AU","AX","BA","BE","BG","BQ","CA","CH","CW","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GL","GR","HR","HU","IE","IL","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MF","MK","MT","NL","NO","NZ","PL","PM","PT","RO","RS","SE","SI","SJ","SK","SM","SX","TR","UA","UM","US","VA","VC","XK","YK"],description:"Europe zone"},{id:"DR4",name:"Russia",countriesOrAreas:["RU"],description:"Russia zone"},{id:"DR5",name:"A2",countriesOrAreas:["IR"],description:"A2 zone"}]},grs_sdk_global_route_config_rtcha:{applications:[],services:[{name:"com.huawei.cloud.hianalytics",routeBy:"ser_country",servings:[{countryOrAreaGroup:"DR1",addresses:{ROOT:"https://metrics1.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR2",addresses:{ROOT:"https://metrics3.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR3",addresses:{ROOT:"https://metrics2.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR4",addresses:{ROOT:"https://metrics5.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR5",addresses:{ROOT:"https://metrics4.data.hicloud.com:6447"}}],countryOrAreaGroups:[]},{name:"com.huawei.cloud.hianalytics.aspg",routeBy:"ser_country",servings:[{countryOrAreaGroup:"DR1",addresses:{ROOT:"https://metrics1.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR2",addresses:{ROOT:"https://metrics-dra.dt.hicloud.com:6447"}},{countryOrAreaGroup:"DR3",addresses:{ROOT:"https://metrics2.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR4",addresses:{ROOT:"https://metrics5.data.hicloud.com:6447"}},{countryOrAreaGroup:"DR5",addresses:{ROOT:"https://metrics4.data.hicloud.com:6447"}}],countryOrAreaGroups:[]}],countryOrAreaGroups:[{id:"DR1",name:"China",countriesOrAreas:["CN"],description:"China zone"},{id:"DR2",name:"Asian-African-Latin American",countriesOrAreas:["AE","AF","AG","AI","AM","AO","AQ","AR","AS","AW","AZ","BB","BD","BF","BH","BI","BJ","BL","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CI","CK","CL","CM","CO","CR","CU","CV","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FK","FM","GA","GD","GE","GF","GH","GM","GN","GP","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IN","IO","IQ","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MQ","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NP","NR","NU","OM","PA","PE","PF","PG","PH","PK","PN","PR","PS","PW","PY","QA","RE","RW","SA","SB","SC","SD","SG","SH","SL","SN","SO","SR","SS","ST","SV","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TV","TW","TZ","UG","UY","UZ","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],description:"Asian-African-Latin American zone"},{id:"DR3",name:"Europe",countriesOrAreas:["AD","AL","AN","AT","AU","AX","BA","BE","BG","BQ","CA","CH","CW","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GL","GR","HR","HU","IE","IL","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MF","MK","MT","NL","NO","NZ","PL","PM","PT","RO","RS","SE","SI","SJ","SK","SM","SX","TR","UA","UM","US","VA","VC","XK","YK"],description:"Europe zone"},{id:"DR4",name:"Russia",countriesOrAreas:["RU"],description:"Russia zone"},{id:"DR5",name:"A2",countriesOrAreas:["IR"],description:"A2 zone"}]}},NM="RTCReport";const DM=new(function(){function e(){a(this,e);this.logger=AI.getLogger(),this.regularReport(Bx),AM.push(["setOnReportUrl","".concat(MM.grs_sdk_global_route_config_rtcha.services[0].servings[0].addresses.ROOT,"/webv4")]),AM.push(["setIdsite","com.huawei.rtcsdk"]),AM.setBatchSend({timeout:13e3,interval:!0,maxLength:30}),this.setReportStorageMaxLength(zx),this.records=[],sL.isFirefox()||(window.onbeforeunload=()=>{this.logger.info("stat","window is closing, emergency report"),this.records.length>0&&this.reportRecordsBeacon(this.records),this.clearData()})}return u(e,[{key:"setReportStorageMaxLength",value:function e(t){return t<1||t>5e3?(this.logger.error(NM,"setReportStorageMaxLength ".concat(t," out of range [").concat(1,", ").concat(5e3,"]")),!1):(AM.setMaxStorageLength(t),!0)}},{key:"setReportServer",value:function e(t){this.opsServer=null;const r=xM.getProxyServer();if(r){const e=t.replace(/http(s)?:\/\//,"");this.opsServer="".concat(r,"/").concat(e,"/webv4")}else this.opsServer="".concat(t,"/webv4");AM.push(["setOnReportUrl",this.opsServer])}},{key:"regularReport",value:function e(t){this.reportInterval&&clearInterval(this.reportInterval),this.reportInterval=setInterval((()=>{if(this.opsServer&&0!=this.records.length)try{AM.setRequestMode("ajax"),this.records.forEach((e=>{const t=e.event.toString(),r={rtc_sdk:e};AM.push(["sendData",t,t,r,null,null])})),this.clearData()}catch(e){this.logger.error(NM,"regularReport failed")}}),t)}},{key:"addRecords",value:async function e(t){this.records=this.records.concat(t||[]),this.adjustRecordsLength(this.records)}},{key:"addRecord",value:async function e(t){this.records.push(t),this.adjustRecordsLength(this.records)}},{key:"adjustRecordsLength",value:function e(t){t.length>1e4&&t.splice(0,t.length-1e4)}},{key:"clearData",value:function e(){this.records.length=0}},{key:"immediateReportRecords",value:function e(){this.opsServer&&(this.reportRecords(this.records),this.clearData())}},{key:"reportRecords",value:function e(t){if(this.opsServer)try{AM.setRequestMode("ajax"),t.forEach((e=>{const t=e.event.toString(),r={rtc_sdk:e};AM.push(["sendData",t,t,r,null,t=>{4===t.readyState&&200===t.status||this.addRecord(e)},!0])}))}catch(e){throw this.logger.error(NM,"fetch request failed"),e}}},{key:"reportRecordsBeacon",value:async function e(t){if(this.opsServer)try{AM.setRequestMode("beacon"),t.forEach((e=>{const t=e.event.toString(),r={rtc_sdk:e};AM.push(["sendData",t,t,r,null,null,!0])}))}catch(e){throw this.logger.error(NM,"beacon request failed"),e}}}])}()),jM="STATISTIC_ENABLE",UM="ACCESS_RESOURCE_TYPE",VM="RESOURCE_TAGS",WM="FRAME_ENCRYPTION_MODE",BM="MEDIA_SYNC",GM="MAX_STORAGE_LENGTH",ZM="PORT_TYPE",FM="ENVIRONMENT_SUFFIX",HM="GRS_LOCAL_EXT_INFO",XM="LOG_CACHES_ENABLE",YM={ACCESS_RESOURCE_TYPE:e=>PM.checkSFUResourceType(e),RESOURCE_TAGS:e=>PM.checkResourceTags(e)},KM="ParametersUtil";const zM=new(function(){function e(){a(this,e);this.logger=AI.getLogger(),this.parameters=new Map}return u(e,[{key:"setParameter",value:function e(t,r){if(!t)return this.logger.error(KM,"setParameter, parameterKey is null"),!1;try{if(this.logger.debug(KM,"setParameter, parameterKey: ".concat(t,", parameterValue: ").concat(r)),YM[t]&&YM[t](r),this.parameters.set(t.toLowerCase(),r),t===XM){const e="off"!==r;kI.setLogCachesEnable(e)}else if(t===GM)return DM.setReportStorageMaxLength(r);return!0}catch(e){return this.logger.error(KM,"setParameter occur error: ".concat(e)),!1}}},{key:"getParameter",value:function e(t){try{return t&&this.parameters.has(t.toLowerCase())?this.parameters.get(t.toLowerCase()):null}catch(e){return this.logger.error(KM,"getParameter occur error: ".concat(e)),null}}}])}());let JM=function(e){return e[e.NotJoin=0]="NotJoin",e[e.Joined=1]="Joined",e[e.Rejoining=2]="Rejoining",e}({}),QM=function(e){return e[e.normal=0]="normal",e[e.resolutionChange=1]="resolutionChange",e[e.remoteRejoinCache=2]="remoteRejoinCache",e[e.localRejoin=3]="localRejoin",e}({});const qM={"90p-":{width:120,height:90},"90p":{width:160,height:90},"120p":{width:160,height:120},"180p-":{width:240,height:180},"180p":{width:320,height:180},"240p":{width:320,height:240},"270p":{width:480,height:270},"300p":{width:400,height:300},"360p-":{width:480,height:360},"360p":{width:640,height:360},"450p":{width:800,height:450},"480p":{width:640,height:480},"540p":{width:960,height:540},"630p":{width:1120,height:630},"720p-":{width:960,height:720},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080}};let $M=function(){function e(){a(this,e)}return u(e,null,[{key:"getResolution",value:function e(t,r){const n=Math.min(t,r);return n<180?"LD":n<360?"SD":n<720?"HD":"FHD"}},{key:"getResolutionType",value:function e(t,r){return Object.keys(qM).find((e=>qM[e].width===t&&qM[e].height===r))}}])}();let eN=function(){function e(){a(this,e);let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;this.elements=new Array(t+1),this.front=0,this.tail=0,this._size=0}return u(e,[{key:"getCapacity",value:function e(){return this.elements.length-1}},{key:"isEmpty",value:function e(){return this.front===this.tail}},{key:"size",value:function e(){return this._size}},{key:"push",value:function e(t){this._size===this.getCapacity()&&this.dequeue(),this.elements[this.tail]=t,this.tail=(this.tail+1)%this.elements.length,this._size++}},{key:"dequeue",value:function e(){if(this.isEmpty())throw new Error("Cannot dequeue from an empty queue.");const t=this.elements[this.front];return this.elements[this.front]=null,this.front=(this.front+1)%this.elements.length,this._size--,t}},{key:"getFront",value:function e(){return this.isEmpty()?null:this.elements[this.front]}},{key:"getTail",value:function e(){if(this.isEmpty())return null;const t=0===this.tail?this.elements.length-1:this.tail-1;return this.elements[t]}},{key:"getElement",value:function e(t){return t<0||t>=this.size()?null:this.elements[(this.front+t)%this.elements.length]}}])}();const tN=new(function(){function e(){a(this,e);o(this,"isFireFox",sL.isFirefox()),this.reportSymbol=Symbol("RTCInterval_".concat(SI.getCurrentTimestamp())),this.mapInterval=new eN}return u(e,[{key:"getSymbol",value:function e(){return this.reportSymbol}},{key:"reset",value:function e(){var t;null===(t=this.connectionsManagers)||void 0===t||t.clear(),delete this.mapInterval,this.mapInterval=new eN,clearTimeout(this.gatherTimer),this.gatherTimer=null}},{key:"addConnection",value:function e(t,r){this.connectionsManagers||(this.connectionsManagers=new Map),this.connectionsManagers.set(t,r),this.execMyInterval((async()=>{await this.execInterval()}),100)}},{key:"checkIsMediaStatsType",value:function e(t){return["inbound-rtp","outbound-rtp","remote-inbound-rtp","remote-outbound-rtp"].includes(t.type)}},{key:"checkCandidatePair",value:function e(t){return"candidate-pair"===t.type.toString()&&(!0===t.selected||!0===t.nominated||"succeeded"===t.state)}},{key:"getStatsData",value:async function e(t,r){const n=await(null==r?void 0:r.getStats());n&&n.forEach(((e,r)=>{this.checkIsMediaStatsType(e)?t.set(e.type+"-"+e.kind+"_"+e.ssrc,e):this.checkCandidatePair(e)?(e.currentRoundTripTime=e.currentRoundTripTime||Math.abs(e.lastPacketReceivedTimestamp-e.lastPacketSentTimestamp),t.set(e.type,e)):"track"===e.type.toString()&&t.set(r,e)}))}},{key:"getData",value:async function e(t,r,n){const i=t.getConnection(n);await this.getStatsData(r,i)}},{key:"execInterval",value:async function e(){const t=new Map;for(const e of this.connectionsManagers.keys()){const r=new Map,n=new Map,i=new Map,o=[];o.push(this.getData(this.connectionsManagers.get(e),n,qx.STREAM_TYPE_MAIN)),o.push(this.getData(this.connectionsManagers.get(e),i,qx.STREAM_TYPE_AUX)),await Promise.all(o),r.set(qx.STREAM_TYPE_MAIN,n),r.set(qx.STREAM_TYPE_AUX,i),t.set(e,r)}this.mapInterval.push(t)}},{key:"getLatestRemoteInboundStats",value:function e(t,r,n){var i,o;const a=null===(i=this.mapInterval.getTail())||void 0===i||null===(o=i.get(t))||void 0===o?void 0:o.get(r);if(this.isFireFox){const e=n.split("_"),r=parseInt(e[1]),i=this.connectionsManagers.get(t).getMappingSsrcs(r),o=e[0].concat("_").concat(i).toString();return a&&a.get(o)}return a&&a.get(n)?a.get(n):null}},{key:"getLatestStatsByTrackId",value:function e(t,r,n){var i,o;const a=null===(i=this.mapInterval.getTail())||void 0===i||null===(o=i.get(t))||void 0===o?void 0:o.get(r);return a&&a.get(n)?a.get(n):null}},{key:"getLatestReport",value:function e(t,r){var n,i;return null===(n=this.mapInterval.getTail())||void 0===n||null===(i=n.get(t))||void 0===i?void 0:i.get(r)}},{key:"getLatestStats",value:function e(t,r,n){const i=this.getLatestReport(t,r);return this.getStatsBySsrcLabel(i,n,t)}},{key:"getElementStats",value:function e(t,r,n,i){var o,a;const s=null===(o=this.mapInterval.getElement(i))||void 0===o||null===(a=o.get(t))||void 0===a?void 0:a.get(r);return this.getStatsBySsrcLabel(s,n,t)}},{key:"getStatsBySsrcLabel",value:function e(t,r,n){if(!t)return null;if(this.isFireFox){const e=r.split("_"),i=parseInt(e[1]),o=this.connectionsManagers.get(n).getMappingSsrcs(i),a=e[0].concat("_").concat(o).toString();return t.get(a)}return t.get(r)}},{key:"getLatestValue",value:function e(t,r,n,i){const o=this.getLatestStats(t,r,n);return o?o[i]:null}},{key:"getAllNumber",value:function e(t,r,n,i){const o=this.mapInterval.size(),a=new Array(o);for(let e=0;e<o;e++){const o=this.getElementStats(t,r,n,e);a[e]=o?o[i]:null}return a}},{key:"getFreeze",value:function e(t,r,n,i,o){const a=this.getAllNumber(t,r,n,i),s=a.length;let u=0,c=0;for(let e=1;e<s;e++)a[e-1]&&a[e]&&a[e-1]===a[e]?u+=100:(u>o&&(c+=u),u=0);return u>o&&(c+=u),c}},{key:"execMyInterval",value:function e(t,r){const n=()=>{this.gatherTimer=setTimeout((()=>{t(),n()}),r)};t(),n()}}])}());let rN=function(){function e(t){a(this,e);o(this,"videoFreezeKey",sL.isFirefox()?"packetsReceived":"framesReceived"),o(this,"mediaStatInfo",[]),o(this,"mediaStatDebugInfo",[]),o(this,"mediaStatSumInfo",[]),o(this,"mediaStatSumDebugInfo",[]),o(this,"ACSAddr",""),o(this,"SFUAddr",""),o(this,"lastSenderInfo",new Map),o(this,"lastSenderDebugInfo",new Map),o(this,"encryUserId",new Map),o(this,"remoteStreamInfo",[]),o(this,"audioPolicy",$x.USER_SUBSCRIBE_AUDIOPOLICY),o(this,"LocalStreamInfo",new Map),o(this,"auxsStreamInfo",new Map),o(this,"audioReceiveInfo",{audioReceivePackets:new Map,audioReceivePacketsLost:new Map,audioReceiveBytes:new Map}),o(this,"videoReceiveInfo",{videoReceivePackets:new Map,videoReceivePacketsLost:new Map,videoReceiveBytes:new Map,videoReceiveFrame:new Map}),o(this,"audioReceiveDebugInfo",{audioReceivePackets:new Map,audioReceivePacketsLost:new Map,audioReceiveBytes:new Map}),o(this,"videoReceiveDebugInfo",{videoReceivePackets:new Map,videoReceivePacketsLost:new Map,videoReceiveBytes:new Map,videoReceiveFrame:new Map}),o(this,"inBoundAudioSsrcInfos",[]),o(this,"audioPolicyLastCycle",$x.USER_SUBSCRIBE_AUDIOPOLICY),o(this,"audioStreamReceiverMap",new Map),o(this,"ssrcChangeCount",0),o(this,"audioStreamInfos",[]),o(this,"audioCount",0),o(this,"audioStreamAllInfos",[]),o(this,"audioAllCount",0),o(this,"audioStreamTop3Count",0),o(this,"module_","MediaStats"),o(this,"tempStat",{bytesSent:0,bytesReceived:0,sendBitrate:0,recvBitrate:0,rtt:0,upPktsLostRate:0,downPktsLostRate:0}),o(this,"stat",{bytesSent:0,bytesReceived:0,sendBitrate:0,recvBitrate:0,rtt:0,upPktsLostRate:0,downPktsLostRate:0}),o(this,"audioLevelInfo",{localAudio:new Map,remoteAudio:new Map,top3Audio:new Map}),o(this,"remoteUserMuteStatus",new Map),this.logger=t}return u(e,[{key:"setEncryInfo",value:function e(t,r){this.encryUserId.set(t,r)}},{key:"getEncryInfo",value:function e(t){return this.encryUserId.get(t)}},{key:"clearEncryUserId",value:function e(){this.encryUserId.clear()}},{key:"setRemoteUserManager",value:function e(t){this.remoteUserManager=t}},{key:"setStartSsrc",value:function e(t){this.startSsrc=t}},{key:"updateAudioLevel",value:function e(t){if("local"===t.type){if(!this.audioLevelInfo.localAudio.get("local")){const e=[];this.audioLevelInfo.localAudio.set("local",e)}this.audioLevelInfo.localAudio.get("local").push(t.level)}else if("remoteTop3"===t.type){if(!this.audioLevelInfo.top3Audio.get("".concat(null==t?void 0:t.ssrc))){const e=[];this.audioLevelInfo.top3Audio.set("".concat(null==t?void 0:t.ssrc),e)}this.audioLevelInfo.top3Audio.get("".concat(null==t?void 0:t.ssrc)).push(t.level)}else{if(!this.audioLevelInfo.remoteAudio.get("".concat(null==t?void 0:t.ssrc,"_").concat(null==t?void 0:t.userId))){const e=[];this.audioLevelInfo.remoteAudio.set("".concat(null==t?void 0:t.ssrc,"_").concat(null==t?void 0:t.userId),e)}this.audioLevelInfo.remoteAudio.get("".concat(null==t?void 0:t.ssrc,"_").concat(null==t?void 0:t.userId)).push(t.level)}}},{key:"getAudioLevel",value:function e(t,r,n){let i=0,o=0;return"local"===t&&this.audioLevelInfo.localAudio.get("local")?(this.audioLevelInfo.localAudio.get("local").forEach((e=>{i+=e||0,o++})),this.audioLevelInfo.localAudio.clear()):"remoteTop3"===t&&this.audioLevelInfo.top3Audio.get("".concat(r))?(this.audioLevelInfo.top3Audio.get("".concat(r)).forEach((e=>{i+=e||0,o++})),this.audioLevelInfo.top3Audio.clear()):"remote"===t&&this.audioLevelInfo.remoteAudio.get("".concat(r,"_").concat(n))&&(this.audioLevelInfo.remoteAudio.get("".concat(r,"_").concat(n)).forEach((e=>{i+=e||0,o++})),this.audioLevelInfo.remoteAudio.clear()),0===o?0:Math.ceil(i/o)}},{key:"setConnectionsManager",value:function e(t){this.logger.info(this.module_,"setConnectionsManager"),this.connectionsManager=t}},{key:"setSubscribeInfo",value:function e(t){var r,n,i,o;if(!t)return;const a=this.remoteStreamInfo.find((e=>e.userId===t.userId));if(!a)return this.clearRemoteStreamInfoCache(t),void this.remoteStreamInfo.push(t);(null===(r=t.mainStream)||void 0===r||null===(n=r.tracks)||void 0===n?void 0:n.length)>0&&t.mainStream.tracks.forEach((e=>{a.mainStream.tracks.find((t=>t.trackId===e.trackId))||(this.doClearRemoteStreamInfoCache(t,t.userId,e.cssrc),a.mainStream.tracks.push(e))})),(null===(i=t.auxStream)||void 0===i||null===(o=i.tracks)||void 0===o?void 0:o.length)>0&&t.auxStream.tracks.forEach((e=>{a.auxStream.tracks.find((t=>t.trackId===e.trackId))||(this.doClearRemoteStreamInfoCache(t,t.userId,e.cssrc),a.auxStream.tracks.push(e))}))}},{key:"doClearRemoteStreamInfoCache",value:function e(t,r,n){let i=null;if(t.mainStream.tracks.forEach((e=>{e.cssrc===n&&(i=e.type)})),t.auxStream.tracks.forEach((e=>{e.cssrc===n&&(i=e.type)})),i===Qx.TRACK_TYPE_AUDIO){const e="".concat(n,"-").concat(r);this.audioReceiveInfo.audioReceivePackets.delete(e),this.audioReceiveInfo.audioReceivePacketsLost.delete(e),this.audioReceiveInfo.audioReceiveBytes.delete(e)}else if(i===Qx.TRACK_TYPE_VIDEO){const e="".concat(n,"-").concat(r);this.videoReceiveInfo.videoReceivePackets.delete(e),this.videoReceiveInfo.videoReceivePacketsLost.delete(e),this.videoReceiveInfo.videoReceiveBytes.delete(e),this.videoReceiveInfo.videoReceiveFrame.delete(e)}}},{key:"clearRemoteStreamInfoCache",value:function e(t){this.remoteStreamInfo.filter((e=>e.userId===t.userId)).forEach((e=>{this.clearRemoteStreamInfoCache4Stream(t,e.mainStream),this.clearRemoteStreamInfoCache4Stream(t,e.auxStream)}))}},{key:"clearRemoteStreamInfoCache4Stream",value:function e(t,r){r.tracks.forEach((e=>{const r=e.trackId,n=e.cssrc,i=t.userId;t.mainStream.tracks.forEach((e=>{e.cssrc===n&&e.trackId!==r&&this.doClearRemoteStreamInfoCache(t,i,n)}))}))}},{key:"clearLocalStreamInfoCache",value:function e(t){t&&this.LocalStreamInfo.forEach((e=>{t.ssrc===e.ssrc&&t.uid===e.uid&&t.streamId!==e.streamId&&this.lastSenderInfo.delete("".concat(t.ssrc,"-").concat(t.uid))}))}},{key:"clearAuxsStreamInfoCache",value:function e(t){t&&this.auxsStreamInfo.forEach((e=>{t.ssrc===e.ssrc&&t.uid===e.uid&&t.streamId!==e.streamId&&this.lastSenderInfo.delete("".concat(t.ssrc,"-").concat(t.uid))}))}},{key:"setLocalMainStreamInfo",value:function e(t,r){return!(!r||0===r.length)&&(this.LocalStreamInfo.clear(),r.forEach((e=>{const r={uid:t,streamId:"",ssrc:e.ssrc,type:e.type};e.type===Qx.TRACK_TYPE_AUDIO?r.streamId=e.upstream.streamUid.toString():(r.streamId=e.upstream.streamUid.toString(),r.width=e.upstream.width,r.height=e.upstream.height,r.frame=e.upstream.fps),this.clearLocalStreamInfoCache(r),this.LocalStreamInfo.set(e.resolutionId,r)})),!0)}},{key:"setLocalAuxsStreamInfo",value:function e(t,r){if(!r)return!1;const n=Array.from(r.localTrackPublishInfos.values());return!!n&&(this.auxsStreamInfo.clear(),n.forEach((e=>{const n={uid:t,streamId:e.upstream.streamUid.toString(),ssrc:e.ssrc,type:e.type};e.type===Qx.TRACK_TYPE_VIDEO&&(n.publishInfo={stream:r.localStream}),this.clearAuxsStreamInfoCache(n),this.auxsStreamInfo.set(e.resolutionId,n)})),!0)}},{key:"deleteSubscribeInfo",value:function e(t,r,n){if(n||r){if(r){const e=this.remoteStreamInfo.find((e=>e.userId===t));if(!e)return;const i=r===qx.STREAM_TYPE_MAIN?e.mainStream:e.auxStream;i.tracks=n?i.tracks.filter((e=>e.trackId!==n)):null}}else this.remoteStreamInfo=this.remoteStreamInfo.filter((e=>e.userId!==t))}},{key:"setAudioPolicy",value:function e(t){this.audioPolicyLastCycle=this.audioPolicy,this.audioPolicy=t,this.setAudioStreamInfo()}},{key:"setSFUAddr",value:function e(t){this.SFUAddr=t}},{key:"setACSAddr",value:function e(t){this.ACSAddr=t}},{key:"leaveRoom",value:function e(){this.mediaStatInfo=[]}},{key:"getAudioPolicy",value:function e(){return this.audioPolicy}},{key:"getTransportMediaStats",value:function e(){return this.stat}},{key:"getMediaStatInfo",value:function e(){const t=this.mediaStatInfo;return this.mediaStatInfo=[],t}},{key:"getMediaStatSum",value:function e(){const t=this.mediaStatSumInfo;return this.mediaStatSumInfo=[],t}},{key:"getInBoundAudioSsrc",value:function e(){const t=this.inBoundAudioSsrcInfos;return this.inBoundAudioSsrcInfos=[],t}},{key:"dealStats",value:async function e(){this.connectionsManager.isConnectionsExist()?(this.getAudioStreamInfo(),await this.getSenderInfo(!1),await this.getReceiverInfo(!1),this.stat.bytesSent+=this.tempStat.bytesSent,this.stat.bytesReceived+=this.tempStat.bytesReceived,this.stat.sendBitrate=this.tempStat.sendBitrate,this.stat.recvBitrate=this.tempStat.recvBitrate,this.clearTempStats()):this.logger.debug(this.module_,"peerConnection is undefined")}},{key:"clearTempStats",value:function e(){this.tempStat.bytesSent=0,this.tempStat.bytesReceived=0,this.tempStat.sendBitrate=0,this.tempStat.recvBitrate=0}},{key:"clearMediaStatBytes",value:function e(){this.stat.bytesSent=0,this.stat.bytesReceived=0}},{key:"cleanAudioStreamInfos",value:function e(){this.audioCount=this.audioStreamInfos.length,this.audioAllCount=this.audioStreamAllInfos.length,this.audioStreamInfos=[],this.audioStreamAllInfos=[]}},{key:"updateAudioStreamInfos",value:function e(t,r){if("add"===r){let e=0;this.remoteStreamInfo.forEach((r=>{if(t===r.userId){const t=r.mainStream.tracks.filter((e=>e.streamType===qx.STREAM_TYPE_MAIN&&e.type===Qx.TRACK_TYPE_AUDIO));e=t.length>0?t[0].cssrc:0}}));const r={userid:t,audioSsrc:e};this.audioStreamInfos=this.audioStreamInfos.filter((r=>r.userid!=t||r.audioSsrc!=e)),this.audioStreamAllInfos=this.audioStreamAllInfos.filter((r=>r.userid!=t||r.audioSsrc!=e)),this.audioStreamInfos.push(r),this.audioStreamAllInfos.push(r)}"delete"!==r&&"removed"!==r||(this.audioStreamInfos=this.audioStreamInfos.filter((e=>e.userid!==t)),this.audioStreamAllInfos=this.audioStreamAllInfos.filter((e=>e.userid!==t))),this.audioPolicy!==$x.USER_SUBSCRIBE_AUDIOPOLICY&&this.audioCount===this.audioStreamInfos.length||this.ssrcChangeCount++,this.audioPolicy!==$x.TOPN_AUDIOPOLICY&&this.audioAllCount===this.audioStreamAllInfos.length||this.ssrcChangeCount++}},{key:"updateAudioStreamTop3",value:function e(t){this.audioStreamTop3CountTimer&&clearTimeout(this.audioStreamTop3CountTimer),this.audioStreamTop3CountTimer=setTimeout((()=>{this.audioStreamTop3Count=0}),4e3),this.audioStreamTop3Count=t}},{key:"checkAudioStreamInfosIsExist",value:function e(t,r){return 0!==this.audioStreamInfos.filter((e=>e.userid===t&&e.audioSsrc===r)).length}},{key:"setAudioStreamInfo",value:function e(){this.audioPolicy!==this.audioPolicyLastCycle&&(this.ssrcChangeCount=1,this.audioStreamReceiverMap.clear(),this.audioStreamTop3Count=0,this.audioReceiveInfo.audioReceiveBytes.clear(),this.audioReceiveInfo.audioReceivePackets.clear(),this.audioReceiveInfo.audioReceivePacketsLost.clear())}},{key:"getAudioStreamInfo",value:async function e(){this.audioPolicy===$x.TOPN_AUDIOPOLICY?await this.buildAudioStreamInfo3():this.audioPolicy===$x.USER_SUBSCRIBE_AUDIOPOLICY?await this.buildAudioStreamInfo2():this.logger.debug(this.module_,"mode 1 not uesed")}},{key:"buildAudioStreamInfo3",value:async function e(){const t=[],r={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_DOWN_STREAM_AUDIO_STAT,access_addr:this.ACSAddr,sfu_addr:this.SFUAddr,audio_policy:this.audioPolicy,topn:3,audios_change_cnt:0,audios:t,no_stream_cnt:0};for(let e=0;e<3;e++){var n;const i=this.startSsrc+e,o="".concat(WP,"_").concat(i),a=tN.getLatestStats(null===(n=this.connectionsManager)||void 0===n?void 0:n.getConnectionId(),qx.STREAM_TYPE_MAIN,o);if(a){const e=this.connectionsManager.calcChangedStatistic(a.id,a.packetsReceived||0,["packetsReceived"])||a.packetsReceived,n=this.audioStreamReceiverMap.get(i)||0;let o=!0;0===e?o=!1:void 0===n?o=!0:e===n&&(o=!1),t.push({ssrc:i,userid:"",packet_cnt:e-n}),this.audioStreamReceiverMap.set(i,e),o||r.no_stream_cnt++}}const i=this.audioAllCount<3?this.audioAllCount:3;if(i<3){const e=r.no_stream_cnt-(3-i);r.no_stream_cnt=e<0?0:e}r.audios_change_cnt=this.ssrcChangeCount,this.inBoundAudioSsrcInfos.push(r)}},{key:"buildAudioStreamInfo2",value:async function e(){const t=[],r={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_DOWN_STREAM_AUDIO_STAT,access_addr:this.ACSAddr,sfu_addr:this.SFUAddr,audio_policy:this.audioPolicy,topn:17,audios_change_cnt:0,audios:t,no_stream_cnt:0};this.remoteStreamInfo.every((e=>{var n;if(-1===this.audioStreamInfos.findIndex((t=>t.userid===e.userId)))return!0;const i=Array.from(e.mainStream.tracks.values()).find((e=>e.type===Qx.TRACK_TYPE_AUDIO)),o="".concat(WP,"_").concat(null==i?void 0:i.cssrc),a=tN.getLatestStats(null===(n=this.connectionsManager)||void 0===n?void 0:n.getConnectionId(),qx.STREAM_TYPE_MAIN,o);if(e&&i&&a){const n=e.userId,o=this.connectionsManager.calcChangedStatistic(a.id,a.packetsReceived||0,["packetsReceived"])||a.packetsReceived,s=this.audioStreamReceiverMap.get(i.cssrc)||0;let u=!0;0===o?u=!1:void 0===s?u=!0:o===s&&(u=!1);const c=this.getEncryInfo(e.userId)||SI.secretString(e.userId)||"";t.push({ssrc:i.cssrc,userid:c,packet_cnt:o-s}),this.audioStreamReceiverMap.set(i.cssrc,o),!u&&this.checkAudioStreamInfosIsExist(n,i.cssrc)&&r.no_stream_cnt++}return!0})),r.audios_change_cnt=this.ssrcChangeCount,t.length>0&&this.inBoundAudioSsrcInfos.push(r)}},{key:"getVideoReceiverFrameDecodedMap",value:async function e(){const t=new Map;return await this.buildFrameDecodedMap(qx.STREAM_TYPE_MAIN,t),await this.buildFrameDecodedMap(qx.STREAM_TYPE_AUX,t),t}},{key:"buildFrameDecodedMap",value:async function e(t,r){const n=t===qx.STREAM_TYPE_AUX,i=this.connectionsManager.getReceivers(n?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN);for(let e=0;e<i.length;e++){if("function"!=typeof i[e].getStats)return void this.logger.warn(this.module_,"rtpreceiver is not support getStats");this.remoteStreamInfo.forEach((e=>{const i={};(n?e.auxStream.tracks:e.mainStream.tracks).forEach((o=>{var a;const s=tN.getLatestStats(null===(a=this.connectionsManager)||void 0===a?void 0:a.getConnectionId(),t,"".concat(BP,"_").concat(o.cssrc));if(s){i.userId=e.userId,i.isAux=n,i.decodedFrame=this.connectionsManager.calcChangedStatistic(s.id,s.framesDecoded||0,["framesDecoded"]);const t="".concat(e.userId,",").concat(n?"1":"0");r.get(t)||r.set(t,i)}}))}))}}},{key:"getReceiverInfo",value:async function e(t){const r={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_DOWN_STREAM_AUDIO_SUM,real_band_width:0,bytes:0,pkt_loss:0},n={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_DOWN_STREAM_VIDEO_SUM,real_band_width:0,tmmbr:0,video_tmmbr:0,req_band_width:0,pkt_loss:0,jitter:0,frame_rate:0,first_frame_count:0,bytes:0},i={isAudio:!1,isVideo:!1};await this.buildReceiverInfo(qx.STREAM_TYPE_MAIN,r,n,i,t),await this.buildReceiverInfo(qx.STREAM_TYPE_AUX,r,n,i,t),i.isAudio&&(t?this.mediaStatSumDebugInfo.push(r):this.mediaStatSumInfo.push(r)),i.isVideo&&(t?this.mediaStatSumDebugInfo.push(n):this.mediaStatSumInfo.push(n))}},{key:"buildReceiverInfo",value:async function e(t,r,n,i,o){const a=t===qx.STREAM_TYPE_AUX,s={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_DOWN_STREAM_AUDIO,streams:[]},u={timestamp:SI.getCurrentTimestamp(),event:a?kx.QoS_AUX_DOWN_STREAM_VIDEO:kx.QoS_DOWN_STREAM_VIDEO,qos_estimate:3,streams:[]};a||this.buildAudioReceiverInfo(s,r,o),this.buildVideoReceiverInfo(t,u,n,o),0!==u.streams.length&&(o?this.mediaStatDebugInfo.push(u):this.mediaStatInfo.push(u),i.isVideo=!0),0!==s.streams.length&&(o?this.mediaStatDebugInfo.push(s):this.mediaStatInfo.push(s),i.isAudio=!0)}},{key:"checkMuteStatusIsChange",value:function e(t){const r=this.remoteUserManager.checkSsrcIsMute(t),n=this.remoteUserMuteStatus.get(t),i=!r&&r===n;return this.remoteUserMuteStatus.set(t,r),i}},{key:"buildAudioReceiverInfo",value:function e(t,r,n){let i=null,o=null,a=null,s=0;if(n?(i=this.audioReceiveDebugInfo.audioReceivePackets,o=this.audioReceiveDebugInfo.audioReceivePacketsLost,a=this.audioReceiveDebugInfo.audioReceiveBytes,s=this.rtcStatsInteval):(i=this.audioReceiveInfo.audioReceivePackets,o=this.audioReceiveInfo.audioReceivePacketsLost,a=this.audioReceiveInfo.audioReceiveBytes,s=5),this.audioPolicy===$x.TOPN_AUDIOPOLICY){for(let e=0;e<3;e++){var u;const l={ssrc_uid:"",stream_uid:"",sfu_addr:"",dst_rcv_vel:0,dst_rcv_nel:0,bit_rate:0,pkt_loss:0,rtt:0,jitter:0,bytes:0,pkts:0,lost_pkt_cnt:0,srtp_decode_err:0,max_cont_lost_pkts:0,mos:0,jb_depth:0,play_err:0,play_total_time:5e3,freeze_loss_time:0,freeze_time:0,jitter90:0,jitter95:0,jitter100:0,tsm_count:0,ts_exp_cnt:0,ssrc_change_cnt:0,audio_pkt_error:0,audio_decode_error:0,dst_burst_pkt_lost_cnt:0,dst_burst_cnt:0,dst_burst_pkt_lost_rate:0,dst_audio_jb_discard_lost_rate:0,net_loss:0,rtp_loss:0,dst_mean_lost_rate:0,buffer_max_length:0,buffer_mean_length:0,net_ate_max_delay:0,net_ate_cur_delay:0,jb_max_num_delay:0,jb_cur_num_delay:0,pkt_recv_max_interval:0,pkt_recv_mean_interval:0,ui_sample_rate:0,ui_channels:0,en_codec_type:0,ui_total_pkt_loss:0,ui_buffer_total_length:0,ui_buffer_cal_cnt:0,ui_rec_pkt_cnt:0,i_channel_id:0,ui_dst_inc_bytes:0,ui_recv_redn_rate:0,ui_plc_count:0,bad_pkt_cnt:0,empty_pkt_cnt:0,buf_drop_pkt_cnt:0},f=this.startSsrc+e,d="".concat(WP,"_").concat(f),h=tN.getLatestStats(null===(u=this.connectionsManager)||void 0===u?void 0:u.getConnectionId(),qx.STREAM_TYPE_MAIN,d);if(h){l.ssrc_uid="".concat(f,"-").concat(f),l.stream_uid="STREAMUUID-".concat(f),l.sfu_addr=this.SFUAddr,this.connectionsManager.calcChangedStatistic(h.id,h,["bytesReceived","packetsReceived","packetsLost"]);const e=h.bytesReceived||0;a.get(f)||a.set(f,0),l.bytes=e<a.get(f)?e:e-a.get(f);const t=h.packetsReceived||0;l.jitter=Math.round(1e3*(h.jitter||0)),l.bit_rate=Math.round(l.bytes/(1024*s)*8),n||(this.tempStat.bytesReceived+=l.bytes,this.tempStat.recvBitrate+=l.bit_rate),a.set(f,e);const r=h.packetsLost||0;i.get(f)||i.set(f,0),o.get(f)||o.set(f,0);const u=r>o.get(f)?r-o.get(f):0;l.lost_pkt_cnt=u;const p=t<i.get(f)?t:t-i.get(f);l.pkts=p,l.pkt_loss=0===p?0:Math.round(u/(p+u)*100),o.set(f,r),i.set(f,t),l.dst_rcv_vel=this.getAudioLevel("remoteTop3",f);const v=this.remoteUserManager.checkRemoteTop3NeedReport();var c;if(this.remoteUserManager&&v)l.freeze_loss_time=tN.getFreeze(null===(c=this.connectionsManager)||void 0===c?void 0:c.getConnectionId(),qx.STREAM_TYPE_MAIN,d,"packetsReceived",100)}l.ssrc_uid&&(t.streams.push(l),r.real_band_width+=Math.round(l.bytes/(1024*s)*8))}return}const l={audioReceivePackets:i,audioReceivePacketsLost:o,audioReceiveBytes:a,interval:s};this.buildAudioReceiver4SubscribedMode(l,t,r,n)}},{key:"buildAudioReceiver4SubscribedMode",value:function e(t,r,n,i){this.remoteStreamInfo.forEach((e=>{var o;const a={ssrc_uid:"",stream_uid:"",sfu_addr:"",dst_rcv_vel:0,dst_rcv_nel:0,bit_rate:0,pkt_loss:0,rtt:0,jitter:0,bytes:0,pkts:0,lost_pkt_cnt:0,srtp_decode_err:0,max_cont_lost_pkts:0,mos:0,jb_depth:0,play_err:0,play_total_time:5e3,freeze_loss_time:0,freeze_time:0,jitter90:0,jitter95:0,jitter100:0,tsm_count:0,ts_exp_cnt:0,ssrc_change_cnt:0,audio_pkt_error:0,audio_decode_error:0,dst_burst_pkt_lost_cnt:0,dst_burst_cnt:0,dst_burst_pkt_lost_rate:0,dst_audio_jb_discard_lost_rate:0,net_loss:0,rtp_loss:0,dst_mean_lost_rate:0,buffer_max_length:0,buffer_mean_length:0,net_ate_max_delay:0,net_ate_cur_delay:0,jb_max_num_delay:0,jb_cur_num_delay:0,pkt_recv_max_interval:0,pkt_recv_mean_interval:0,ui_sample_rate:0,ui_channels:0,en_codec_type:0,ui_total_pkt_loss:0,ui_buffer_total_length:0,ui_buffer_cal_cnt:0,ui_rec_pkt_cnt:0,i_channel_id:0,ui_dst_inc_bytes:0,ui_recv_redn_rate:0,ui_plc_count:0,bad_pkt_cnt:0,empty_pkt_cnt:0,buf_drop_pkt_cnt:0},s=Array.from(e.mainStream.tracks.values()).find((e=>e.type===Qx.TRACK_TYPE_AUDIO&&e.state===QM.normal)),u="".concat(WP,"_").concat(null==s?void 0:s.cssrc),c=tN.getLatestStats(null===(o=this.connectionsManager)||void 0===o?void 0:o.getConnectionId(),qx.STREAM_TYPE_MAIN,u);if(e&&s&&c){const r=this.getEncryInfo(e.userId)||SI.secretString(e.userId),n="".concat(s.cssrc,"-").concat(r);a.ssrc_uid=n,a.stream_uid="".concat(s.trackId)||"STREAMUUID-".concat(s.cssrc),a.sfu_addr=this.SFUAddr,this.connectionsManager.calcChangedStatistic(c.id,c,["bytesReceived","packetsReceived","packetsLost"]);const o=c.bytesReceived||0;t.audioReceiveBytes.get(n)||t.audioReceiveBytes.set(n,0),a.bytes=o<t.audioReceiveBytes.get(n)?o:o-t.audioReceiveBytes.get(n);const f=c.packetsReceived;a.jitter=Math.round(1e3*(c.jitter||0)),a.bit_rate=Math.round(a.bytes/(1024*t.interval)*8),i||(this.tempStat.bytesReceived+=a.bytes,this.tempStat.recvBitrate+=a.bit_rate),t.audioReceiveBytes.set(n,o);const d=c.packetsLost||0;t.audioReceivePackets.get(n)||t.audioReceivePackets.set(n,0),t.audioReceivePacketsLost.get(n)||t.audioReceivePacketsLost.set(n,0);const h=d>t.audioReceivePacketsLost.get(n)?d-t.audioReceivePacketsLost.get(n):0;a.lost_pkt_cnt=h;const p=f<t.audioReceivePackets.get(n)?f:f-t.audioReceivePackets.get(n);a.pkts=p,a.pkt_loss=0===p?0:Math.round(h/(p+h)*100),t.audioReceivePacketsLost.set(n,d),t.audioReceivePackets.set(n,f),a.dst_rcv_vel=this.getAudioLevel("remote",s.cssrc,e.userId);const v=this.checkMuteStatusIsChange(null==s?void 0:s.cssrc);var l;if(this.remoteUserManager&&v)a.freeze_loss_time=tN.getFreeze(null===(l=this.connectionsManager)||void 0===l?void 0:l.getConnectionId(),qx.STREAM_TYPE_MAIN,u,"packetsReceived",100)}a.ssrc_uid&&(r.streams.push(a),n.real_band_width+=Math.round(a.bytes/(1024*t.interval)*8))}))}},{key:"buildVideoReceiverInfo",value:function t(r,n,i,o){let a="",s=null,u=null,c=null,l=null,f=0;o?(s=this.videoReceiveDebugInfo.videoReceivePackets,u=this.videoReceiveDebugInfo.videoReceivePacketsLost,c=this.videoReceiveDebugInfo.videoReceiveBytes,l=this.videoReceiveDebugInfo.videoReceiveFrame,f=this.rtcStatsInteval):(s=this.videoReceiveInfo.videoReceivePackets,u=this.videoReceiveInfo.videoReceivePacketsLost,c=this.videoReceiveInfo.videoReceiveBytes,l=this.videoReceiveInfo.videoReceiveFrame,f=5),this.remoteStreamInfo.forEach((t=>{(r===qx.STREAM_TYPE_MAIN?t.mainStream.tracks.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.state===QM.normal)):t.auxStream.tracks.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.state===QM.normal))).forEach((d=>{var h,p;const v={ssrc_uid:"",stream_uid:"",sfu_addr:"",expect_pic_w:0,expect_pic_h:0,image_width:0,image_height:0,roc:0,buffered:0,bit_rate:0,frame_rate:0,pkt_loss:0,rtt:0,jitter:0,bytes:0,jb_depth:0,fir_req_cnt:0,parse_srtp_fail:0,fir_frame_cnt:0,freeze_200ms_cnt:0,freeze_600ms_cnt:0,freeze_1000ms_cnt:0,freeze_200ms_time:0,freeze_600ms_time:0,freeze_1000ms_time:0,dec_key_frame_cnt:0,dec_key_frame_size:0,max_cont_lost_pkts:0,freeze_cnt:0,act_dec_runtime:5e3,ui_first_rcv_seq:0,ui_max_decode_delay:0,ui_min_decode_delay:0,ui_mean_decode_delay:0,ui_current_decode_delay:0,ui_max_channel_decode_delay:0,ui_min_channel_decode_delay:0,ui_mean_channel_decode_delay:0,ui_current_channel_decode_delay:0,ui_abnormal_pkt_count:0,ui_codec_pt_error:0,ui_no_dec_data_cnt:0,jb_discard_bytes:0,net_lost_pkt_counts:0,rcv_frame_counts:0,dec_bytes_out:0,rcv_red_bytes:0,dec_delay_over_time_cnt:0,channel_decode_over_time_cnt:0,dec_non_key_frame_size:0,dec_non_key_frame_cnt:0,us_loss_frame_rate:0,ui_pkt_rate:0,us_residual_pkt_loss:0,ul_decoder_start_time:0,us_mean_pkt_loss:0,ui_mean_rtt:0,e_dec_protocol:0,ui_distribute_tmmbr:0,frame_fail_cnt:0,advanced_frame_count:0,base_frame_count:0,before_postprocess_frames_rate:0,after_postprocess_frames_rate:0,red_rate:0,recover_rate:0,jb_listpacket_num:0,not_recv_pkt_cnt:0,not_recv_pkt_total_time:0,nack_request_cnt:0,send_key_request_cnt:0,jb_jitter:0,recv_frame_rate:0,recv_base_layer_frame_cnt:0,recv_mid_layer_frame_cnt:0,recv_out_layer_frame_cnt:0,jb_total_frame_cnt:0,jb_listframe_num:0,output_total_freezetime:0,output_freeze_cnt:0,ref_frame_error_cnt:0,force_out4_key_cnt:0,force_out4_struct_cnt:0,current_output_diftime:0,current_complete_type:0,jb_base_layer_frame_num:0,jb_mid_layer_frame_num:0,jb_out_layer_frame_num:0,freeze_400ms_cnt:0,freeze_400ms_time:0,freeze_200ms_rate:0,freeze_400ms_rate:0,freeze_600ms_rate:0,freeze_1000ms_rate:0,freeze_loss_time:0,first_frame_cnt:0,p_frame_cnt:0,lost_pkt_cnt:0,play_err:0,bad_pkt_cnt:0,empty_pkt_cnt:0,buf_drop_pkt_cnt:0},m="".concat(BP,"_").concat(d.cssrc),y=tN.getLatestStats(null===(h=this.connectionsManager)||void 0===h?void 0:h.getConnectionId(),r,m);if(y){const e=this.getEncryInfo(t.userId)||SI.secretString(t.userId),n="".concat(d.cssrc,"-").concat(e);v.ssrc_uid=n,this.connectionsManager.calcChangedStatistic(y.id,y,["keyFramesDecoded","packetsReceived","packetsLost","bytesReceived","framesDecoded","freezeCount"]),this.buildCommonVideoRecvInfo(v,y,d),this.buildBitRateVideoRecvInfo(y,n,s,u,v);const i=SI.getValue(y.bytesReceived,0),h=c.get(n)||0;v.bytes=i<h?i:i-h,v.bit_rate=Math.round(v.bytes/(1024*f)*8),o||(this.tempStat.bytesReceived+=v.bytes,this.tempStat.recvBitrate+=v.bit_rate),c.set(n,i);const p=l.get(n)||0,b=y.framesDecoded||0,_=b<p?b:b-p;var g;if(v.dec_frame_cnt=_,v.frame_rate=_/f,l.set(n,b),a=y.trackId,v.freeze_200ms_cnt=y.framesDropped,v.fir_req_cnt=y.firCount||0,v.fir_frame_cnt=y.pliCount||0,v.nack_request_cnt=y.nackCount||0,r===qx.STREAM_TYPE_MAIN&&this.remoteUserManager&&this.checkMuteStatusIsChange(d.cssrc))v.freeze_600ms_time=tN.getFreeze(null===(g=this.connectionsManager)||void 0===g?void 0:g.getConnectionId(),r,m,this.videoFreezeKey,500)}const b=tN.getLatestStatsByTrackId(null===(p=this.connectionsManager)||void 0===p?void 0:p.getConnectionId(),r,a);a&&b&&e.buildVideoTrackInfo(v,b),v.ssrc_uid&&(n.streams.push(v),i.real_band_width+=Math.round(v.bytes/(1024*f)*8)),v.rtt=1e3*tN.getLatestValue(t.roomId,r,"candidate-pair","currentRoundTripTime")||0}))}))}},{key:"buildBitRateVideoRecvInfo",value:function e(t,r,n,i,o){const a=SI.getValue(t.packetsReceived,0),s=SI.getValue(t.packetsLost,0),u=n.get(r)||0,c=i.get(r)||0,l=s>c?s-c:0;o.real_lost_pkt_cnt=l;const f=a<u?a:a-u;o.pkts=f,o.pkt_loss=0===f?0:Math.round(l/(f+l)*100),i.set(r,s),n.set(r,a)}},{key:"buildCommonVideoRecvInfo",value:function e(t,r,n){t.sfu_addr=this.SFUAddr,t.stream_uid=n.trackId||"",t.expect_pic_w=n.width||0,t.expect_pic_h=n.height||0,t.dec_key_frame_cnt=r.keyFramesDecoded||0,t.jitter=Math.round(1e3*(r.jitter||0)),t.jb_depth=Math.round(r.jitterBufferDelay||0),t.jb_listpacket_num=Math.round(r.jitterBufferEmittedCount||0),t.jb_jitter=Math.round(1e3*(r.totalDecodeTime||0)),t.jb_mid_layer_frame_num=Math.round(r.totalAssemblyTime||0),t.jb_out_layer_frame_num=Math.round(r.framesAssembledFromMultiplePackets||0),t.output_total_freezetime=Math.round(r.totalFreezesDuration||0),t.output_freeze_cnt=Math.round(r.freezeCount||0),t.force_out4_key_cnt=Math.round(r.totalPausesDuration||0),t.force_out4_struct_cnt=Math.round(r.pauseCount||0),t.not_recv_pkt_cnt=Math.round(r.framesDecoded||0),t.not_recv_pkt_total_time=Math.round(r.totalProcessingDelay||0)}},{key:"getSenderInfo",value:async function e(t){const r={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_UP_STREAM_AUDIO_SUM,tmmbr:0,video_tmmbr:0,resp_band_width:0,real_band_width:0,bytes:0,pkt_loss:0},n={timestamp:SI.getCurrentTimestamp(),event:kx.QoS_UP_STREAM_VIDEO_SUM,tmmbr:0,video_tmmbr:0,resp_band_width:0,real_band_width:0,pkt_loss:0,jitter:0,frame_rate:0,first_frame_count:0,bytes:0},i={isAudio:!1,isVideo:!1};await this.buildSenderInfo(!1,r,n,i,t),await this.buildSenderInfo(!0,r,n,i,t),i.isAudio&&(t?this.mediaStatSumDebugInfo.push(r):this.mediaStatSumInfo.push(r)),i.isVideo&&(t?this.mediaStatSumDebugInfo.push(n):this.mediaStatSumInfo.push(n))}},{key:"buildSenderInfo",value:async function e(t,r,n,i,o){const a=[],s=[],u={ssrc_uid:"",stream_uid:"",sfu_addr:"",src_chan_input_vol_scale:0,src_snd_vel:0,src_snd_nel:0,bit_rate:0,pkt_loss:0,rtt:0,jitter:0,bytes:0,pkts:0,pkt_rate:0,redn_rate:0,ui_bgm_mean_speech_level:0,ui_bgm_mean_noise_level:0,up_vqe_max_delay:0,up_vqe_mean_delay:0,up_capture_max_interval:0,up_capture_mean_interval:0,pre_send_max_delay:0,pre_send_mean_delay:0,up_enc_send_max_delay:0,up_enc_send_mean_delay:0,ui_sample_rate:0,ui_channels:0,en_codec_type:0,i_channel_id:0,ui_src_inc_bytes:0,ui_up_mean_delay:0,ui_up_max_delay:0,ui_up_capture_cnt:0,ui_up_vqe_total_delay:0,ui_pre_send_total_delay:0,ui_up_enc_send_pkt_cnt:0,ui_up_enc_send_total_delay:0,estimate_bit_rate:0,tmmbr:0,bad_pkt_cnt:0},c=t?Array.from(this.auxsStreamInfo.values()).filter((e=>e.type!==Qx.TRACK_TYPE_AUDIO)):Array.from(this.LocalStreamInfo.values());if(0===c.length)return;const l=c.find((e=>e.type===Qx.TRACK_TYPE_AUDIO)),f=c.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)),d=o?this.rtcStatsInteval:5;this.buildAudioSenderInfo(l,u,o),u.ssrc_uid&&(r.real_band_width+=Math.round(u.bytes/(1024*d)*8),i.isAudio=!0,s.push(u)),null==f||f.forEach((e=>{const r={ssrc_uid:"",stream_uid:"",sfu_addr:"",expect_pic_w:0,expect_pic_h:0,expect_frame_rate:0,image_width:0,image_height:0,frame_rate:0,bit_rate:0,max_cont_loss:0,pkt_loss:0,rtt:0,jitter:0,bytes:0,pkts:0,roc:0,first_req_count:0,first_frame_count:0,frame_count:0,redn_rate:0,ui_first_send_seq:0,ui_no_ref_redundance_rate:0,ui_enc_max_bit_rate_set:0,ui_enc_min_bit_rate_set:0,ui_enc_current_bit_rate_set:0,ui_max_encode_delay:0,ui_min_encode_delay:0,ui_mean_encode_delay:0,ui_current_encode_delay:0,ui_buffer_data:0,ui_snd_fir_frame_key_count:0,ui_snd_fir_frame_arq_count:0,ui_snd_fir_frame_period_count:0,ui_max_channel_encode_delay:0,ui_min_channel_encode_delay:0,ui_mean_channel_encode_delay:0,ui_current_channel_encode_delay:0,ui_enc_frame_counts:0,ui_enc_bytes_out:0,ui_estimate_bitrate:0,ui_red_bytes_out:0,ui_nack_bytes_out:0,ui_enc_over_time_cnt:0,ui_enc_delay_over_time_cnt:0,ui_channel_encode_over_time_cnt:0,ui_before_pre_process_frm_cnt:0,ui_after_pre_process_frm_cnt:0,repeat_red_pkt_count:0,usable_bitrate:0,available_enc_bitrate:0,send_pkt_hungry_cnt:0,send_buffer_frm_cnt:0,advanced_frame_cnt:0,base_frame_cnt:0,avg_pre_process_time_in_period:0,max_pre_process_time:0,before_encode_lost_frm_cnt:0,us_sent_mean_lost_rate:0,ui_mean_r_t_t:0,ui_cumulative_lost:0,ui_extended_max_seq_num:0,ui_pkt_rate:0,ui_send_bit_rate:0,f_key_redundance_rate:0,f_ref_redundance_rate:0,f_no_ref_redundance_rate:0,e_enc_protocol:0,before_encode_frames_rate:0,before_send_frames_rate:0,after_send_frames_rate:0,data_cache_bytes:0,input_frame_cnt:0,input_pacing_pkt_cnt:0,input_pacing_fec_pkt_cnt:0,input_pacing_arq_pkt_cnt:0,send_fec_pkt_cnt:0,send_arq_pkt_cnt:0,nack_not_rsp_for_not_find_cnt:0,nack_not_rsp_for_key_cnt:0,nack_not_rsp_for_rtt_cnt:0,nack_not_rsp_for_time_cnt:0,nack_not_rsp_for_bw_cnt:0,deliver_red_rate:0,output_frame_cnt:0,estimate_bit_rate:0,tmmbr:0,p_frame_count:0,key_frame_count:0,bad_pkt_cnt:0,qos_estimate:3};this.buildVideoSenderInfo(e,r,t,o),r.ssrc_uid&&(n.real_band_width+=Math.round(r.bytes/(1024*d)*8),i.isVideo=!0,a.push(r))}));const h=this.getConnectionRemb(t);if(n.video_tmmbr=h>0?Math.round(h/1024):0,n.tmmbr+=n.video_tmmbr,s.length>0){const e={timestamp:SI.getCurrentTimestamp()};e.event=kx.QoS_UP_STREAM_AUDIO,e.streams=s,o?this.mediaStatDebugInfo.push(e):this.mediaStatInfo.push(e)}if(a.length>0){const e={timestamp:SI.getCurrentTimestamp()};e.event=t?kx.QoS_AUX_UP_STREAM_VIDEO:kx.QoS_UP_STREAM_VIDEO,e.streams=a,o?this.mediaStatDebugInfo.push(e):this.mediaStatInfo.push(e)}}},{key:"buildAudioSenderInfo",value:function e(t,r,n){var i,o;if(!t)return;const a=n?this.lastSenderDebugInfo:this.lastSenderInfo,s=n?this.rtcStatsInteval:5,u=a.get("".concat(t.ssrc,"-").concat(t.uid))||{audioSendPackets:0,audioSendPacketsLost:0,audioSendBytes:0,videoSendPackets:0,videoSendPacketsLost:0,videoSendBytes:0};let c="".concat(GP,"_").concat(t.ssrc),l=tN.getLatestStats(null===(i=this.connectionsManager)||void 0===i?void 0:i.getConnectionId(),qx.STREAM_TYPE_MAIN,c);if(l){const e=this.getEncryInfo(t.uid)||SI.secretString(t.uid);r.ssrc_uid="".concat(t.ssrc,"-").concat(e),r.stream_uid=t.streamId,r.sfu_addr=this.SFUAddr;const i=l.bytesSent||0;r.bytes=i<u.audioSendBytes?i:i-u.audioSendBytes;const o=l.packetsSent||0;r.pkts=o<u.audioSendPackets?o:o-u.audioSendPackets,r.bit_rate=Math.round(r.bytes/(1024*s)*8)||0,n||(this.tempStat.bytesSent+=r.bytes,this.tempStat.sendBitrate+=r.bit_rate),u.audioSendBytes=i,u.audioSendPackets=o,r.src_snd_vel=this.getAudioLevel("local",t.ssrc)}if(c="".concat(FP,"_").concat(t.ssrc),l=tN.getLatestStats(null===(o=this.connectionsManager)||void 0===o?void 0:o.getConnectionId(),qx.STREAM_TYPE_MAIN,c),l){r.jitter=Math.round(1e3*l.jitter),r.rtt=Math.round(1e3*(l.roundTripTime||0));const e=l.packetsLost||0,t=e>u.audioSendPacketsLost?e-u.audioSendPacketsLost:0,n=r.pkts;r.pkt_loss=n>0?Math.round(t/(n+t)*100):0,u.audioSendPacketsLost=e}a.set("".concat(t.ssrc,"-").concat(t.uid),u)}},{key:"addExpectInfo",value:function e(t,r){r.expect_pic_w=(null==t?void 0:t.width)||0,r.expect_pic_h=(null==t?void 0:t.height)||0,r.expect_frame_rate=(null==t?void 0:t.frame)||0}},{key:"addRembInfo",value:function e(t,r){const n=this.getConnectionRemb(t);r.usable_bitrate=n>0?Math.round(n/1024):0}},{key:"getConnectionRemb",value:function e(t){let r=0;return this.connectionsManager.isConnectionsExist()?(r+=t?this.getRemb(qx.STREAM_TYPE_AUX):this.getRemb(qx.STREAM_TYPE_MAIN),r):r}},{key:"getRemb",value:function e(t){let r=0;try{const e=tN.getLatestReport(this.connectionsManager.getConnectionId(),t);if(e){const t=e.get("candidate-pair");t&&Object.prototype.hasOwnProperty.call(t,"availableOutgoingBitrate")&&(r=t.availableOutgoingBitrate||0)}}catch(e){this.logger.error(this.module_,"getRemb failed",e)}return r}},{key:"buildVideoSenderInfo",value:function t(r,n,i,o){var a,s;if(!r)return;const u=o?this.lastSenderDebugInfo:this.lastSenderInfo,c=o?this.rtcStatsInteval:5,l=u.get("".concat(r.ssrc,"-").concat(r.uid))||{audioSendPackets:0,audioSendPacketsLost:0,audioSendBytes:0,videoSendPackets:0,videoSendPacketsLost:0,videoSendBytes:0};this.addExpectInfo(r,n),this.addRembInfo(i,n);const f="".concat(ZP,"_").concat(r.ssrc),d=tN.getLatestStats(null===(a=this.connectionsManager)||void 0===a?void 0:a.getConnectionId(),i?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,f);if(d){const t=this.getEncryInfo(r.uid)||SI.secretString(r.uid);n.ssrc_uid="".concat(r.ssrc,"-").concat(t),n.stream_uid=r.streamId,n.sfu_addr=this.SFUAddr,e.buildCommonVideoSendInfo(n,d,r,i);const a=SI.getValue(d.bytesSent,0);n.bytes=a<l.videoSendBytes?a:a-l.videoSendBytes;const s=SI.getValue(d.packetsSent,0);n.pkts=s<l.videoSendPackets?s:s-l.videoSendPackets,l.videoSendPackets=s,n.bit_rate=Math.round(n.bytes/(1024*c)*8)||0,o||(this.tempStat.bytesSent+=n.bytes,this.tempStat.sendBitrate+=n.bit_rate),l.videoSendBytes=a}const h="".concat(HP,"_").concat(r.ssrc),p=tN.getLatestRemoteInboundStats(null===(s=this.connectionsManager)||void 0===s?void 0:s.getConnectionId(),i?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,h);if(p){n.jitter=Math.round(1e3*(p.jitter||0));const e=p.packetsLost||0;if(0!==e){const t=e>l.videoSendPacketsLost?e-l.videoSendPacketsLost:0,r=n.pkts;n.pkt_loss=Math.round(t/(r+t)*100)}else n.pkt_loss=0;l.videoSendPacketsLost=e,n.rtt=Math.round(1e3*(p.roundTripTime||0))}u.set("".concat(r.ssrc,"-").concat(r.uid),l)}},{key:"buildRtcStatsDebugInfo",value:async function e(t){this.rtcStatsInteval=t;const r={mediaStatsDebugInfo:null,mediaStatsSumDebugInfo:null};return this.connectionsManager.isConnectionsExist()?(await this.getSenderInfo(!0),await this.getReceiverInfo(!0),r.mediaStatsDebugInfo=this.mediaStatDebugInfo,r.mediaStatsSumDebugInfo=this.mediaStatSumDebugInfo,this.mediaStatDebugInfo=[],this.mediaStatSumDebugInfo=[],r):(this.logger.debug(this.module_,"peerConnection is undefined"),r)}}],[{key:"buildVideoTrackInfo",value:function e(t,r){t.image_width=r.frameWidth||0,t.image_height=r.frameHeight||0,t.freeze_cnt=r.freezeCount||0}},{key:"buildCommonVideoSendInfo",value:function e(t,r,n,i){if(i){var o;const e=null===(o=n.publishInfo)||void 0===o?void 0:o.stream;t.image_width=(null==e?void 0:e.getScreenWidth())||0,t.image_height=(null==e?void 0:e.getScreenHeight())||0,t.frame_rate=(null==e?void 0:e.getScreenFrameRate())||0}else t.image_width=(null==n?void 0:n.width)||0,t.image_height=(null==n?void 0:n.height)||0,t.frame_rate=(null==n?void 0:n.frame)||0;t.image_width=r.frameWidth||0,t.image_height=r.frameHeight||0,t.frame_rate=Math.round(r.framesPerSecond||0),t.first_frame_count=r.firCount||0,t.frame_count=r.framesSent||0}}])}();let nN=function(){function e(t,r){a(this,e);o(this,"eventInfoMap",new Map),o(this,"reqInfoMap",new Map),o(this,"sfuInfo",{ipAddress:"",videoPort:0,audioPort:0,auxPort:0}),o(this,"deviceInfo",{audioOutputId:void 0,audioInputId:void 0,videoInputId:void 0}),o(this,"mediaOpsData",[]),o(this,"signalSendMsgs",[]),o(this,"signalReceiveMsgs",[]),o(this,"parentSpanIdMap",new Map),o(this,"spanIdMap",new Map),this.logger=t,this.mediaStats=new rN(t),this.module_="RTCStat",this.commInfo={},this.commInfo.instance_id=SI.getDeviceID(),r&&(this.commInfo.appid=r.appId,this.commInfo.domain=r.domain),this.commInfo.sdk_name="hwwebrtc",this.commInfo.corp="",this.commInfo.service_name="rtc",this.commInfo.operator="",this.commInfo.sdk_version="web-".concat(Ux,"-").concat(Vx),this.signalSendMsgs.push("BYE"),this.signalSendMsgs.push("PUSH_STREAM_RES_ALL"),this.signalSendMsgs.push("APPLY_PUSH_STREAM"),this.signalSendMsgs.push("AUDIO_POLICY"),this.signalSendMsgs.push("SWITCH_ROLE"),this.signalSendMsgs.push("CHANGE_STREAM_STATUS"),this.signalSendMsgs.push("APP_DATA"),this.signalSendMsgs.push("ENABLE_AUDIO"),this.signalSendMsgs.push("DISABLE_AUDIO"),this.signalSendMsgs.push("ENABLE_VIDEO"),this.signalSendMsgs.push("DISABLE_VIDEO"),this.signalSendMsgs.push("JOIN_ROOM"),this.signalSendMsgs.push("EXIT_ROOM"),this.signalSendMsgs.push("PING"),this.signalSendMsgs.push("PUSH_STREAM_RESULT"),this.signalSendMsgs.push("GET_ROOM_USERINFO"),this.signalSendMsgs.push("QUERY_PUBLISH"),this.signalSendMsgs.push("START_PUBLISH"),this.signalSendMsgs.push("STOP_PUSH_STREAM"),this.signalSendMsgs.push("STOP_PUBLISH"),this.signalSendMsgs.push("CANCEL_SUBS_STREAM"),this.signalSendMsgs.push("SUBS_STREAM"),this.signalSendMsgs.push("UPDATE_PUBLISH"),this.signalReceiveMsgs.push("WATCH_STREAM_NOTIFY")}return u(e,[{key:"addCommInfo",value:function e(t){return t.timestamp=SI.getCurrentTimestamp(),t.trace_id=this.commInfo.trace_id||"",t.instance_id=this.commInfo.instance_id,t.room_uid=this.commInfo.room_uid||"",t.domain=this.commInfo.domain||"",t.event_name=(null==t?void 0:t.event_name)||"",t.appid=this.commInfo.appid||"",t.corp=this.commInfo.corp||"",t.room_id=this.commInfo.room_id||"",t.user_id=this.getMediaStat().getEncryInfo(this.commInfo.user_id)||SI.secretString(this.commInfo.user_id)||"",t.sdk_version=this.commInfo.sdk_version||"",t.sdk_name=this.commInfo.sdk_name||"",t.service_name=this.commInfo.service_name||"",t.operator=this.commInfo.operator||"",t.net_type=SI.getNetworkType()||"",t.country="",t.province="",t.city="",t}},{key:"setRemoteUserManager",value:function e(t){this.remoteUserManager=t,this.mediaStats.setRemoteUserManager(t)}},{key:"clearMediaStatBytes",value:function e(){this.mediaStats.clearMediaStatBytes()}},{key:"collectReceiverDecodedFrameMap",value:async function e(){return this.mediaStats.getVideoReceiverFrameDecodedMap()}},{key:"setLocalUserInfo",value:function e(t){this.commInfo.room_id=t.roomId,this.commInfo.user_id=t.userId,this.user=t}},{key:"setTraceInfo",value:function e(t){this.commInfo.trace_id=t}},{key:"setRoomUid",value:function e(t){this.commInfo.room_uid=t}},{key:"setSFUAddress",value:function e(t){this.sfuInfo=t,t.ipAddress&&this.mediaStats.setSFUAddr(t.ipAddress)}},{key:"getMediaStat",value:function e(){return this.mediaStats}},{key:"leaveRoom",value:function e(){this.mediaCollectionTimer&&clearTimeout(this.mediaCollectionTimer),this.mediaStats.leaveRoom()}},{key:"startMediaCollector",value:function t(){clearTimeout(this.mediaCollectionTimer),e.isStatiscEnable()&&(this.mediaCollectionTimer=setTimeout((async()=>{try{await this.mediaStats.dealStats(),this.setMediaStatInfo(),this.setMediaStatSumInfo(),this.setInBoundAudioSsrcInfos(),DM.addRecords(this.mediaOpsData),this.mediaOpsData.length=0}catch(e){this.logger.error(this.module_,"startMediaCollector failed ".concat(e))}finally{this.startMediaCollector()}}),5e3))}},{key:"reportAudioMuteInfo",value:function e(t,r){const n=r?1:3;let i;i=1===t?_x.INPUT_AUDIO:_x.OUTPUT_AUDIO,this.reportSwitchDevicesInfo(i,this.deviceInfo.audioInputId,0,n)}},{key:"reportVideoMuteInfo",value:function e(t,r){const n=r?4:5;this.reportSwitchDevicesInfo(_x.INPUT_VIDEO,this.deviceInfo.videoInputId,0,n)}},{key:"setDeviceStatusInfo",value:async function e(){(async function(){return new Promise(((e,t)=>{navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices||t(new oc(nc.RTC_ERR_CODE_NOT_SUPPORT_MEDIA_DEVICES)),navigator.mediaDevices.enumerateDevices().then((r=>{if(r&&0!==r.length){const t={};r.forEach((e=>{"default"!==e.deviceId&&"communications"!==e.deviceId&&(t[e.kind]=[...t[e.kind]||[],e])})),e(t)}else t(new oc(nc.RTC_ERR_CODE_NO_AVAILABLE_DEVICES))})).catch((e=>{t(e)}))}))})().then((e=>{this.setSpeakerDeviceInfo(e.audiooutput||[]),this.setCameraDeviceInfo(e.videoinput||[]),this.setMicrophoneDeviceInfo(e.audioinput||[])})).catch((e=>{this.logger.error(this.module_,"getRTCDeviceGroups failed ".concat(e))}))}},{key:"recordUploadRequsetInfo",value:function e(t){if(null!=t&&t.type&&"PING"!==t.type)switch(this.reqInfoMap.set(t.requestId,t),t.type){case"JOIN_ROOM":t.eventId=Cx.EVENT_JOIN_ROOM,this.eventInfoMap.set(t.eventId,t);break;case"EXIT_ROOM":t.eventId=Cx.EVENT_LEAVE_ROOM,this.eventInfoMap.set(t.eventId,t);break;case"SWITCH_ROLE":t.eventId=Cx.EVENT_SWITCH_ROLE,this.eventInfoMap.set(t.eventId,t);break;case"PUSH_STREAM_RES_ALL":if(t.videoStreams&&t.videoStreams.length>0){t.videoStreams.find((e=>(null==e?void 0:e.content)===ex.desktop))&&(t.eventId=Cx.EVENT_SEND_AUX_STREAM,this.eventInfoMap.set(t.eventId,t))}}}},{key:"getDownloadRequestInfo",value:function e(t){if(null==t||!t.requestId)return"";if("PONG"===t.resultMessage)return"PONG";const r=this.reqInfoMap.get(t.requestId);return r&&(null==r?void 0:r.type)||""}},{key:"recordDownloadRequestInfo",value:function e(t){if(null==t||!t.requestId)return;if("PONG"===t.resultMessage)return;const r=this.reqInfoMap.get(t.requestId);if(r){switch(this.reportSignalRepForServer2Web(r,t),r.type){case"SUBS_STREAM":r.videoUpstreams&&this.reportVideoSub(r.videoSubType,r.requestId,r.videoUpstreams,t.resultCode,t.resultMessage),r.audioUpstreams&&this.reportAudioSub(r.audioSubType,r.requestId,r.audioUpstreams,t.resultCode);break;case"PUSH_STREAM_RES_ALL":r.videoStreams&&r.videoStreams.length>0&&this.reportUpStreamVideoInfo(r.videoStreams,r.requestId,t.resultCode);break;case"AUDIO_POLICY":this.reportAudioPolicyInfo(r.audioPolicy,r.requestId,t.resultCode)}this.reqInfoMap.delete(t.requestId)}}},{key:"setMediaStatInfo",value:function e(){const t=this.mediaStats.getMediaStatInfo()||[];t.forEach((e=>{this.addCommInfo(e)})),this.mediaOpsData=this.mediaOpsData.concat(t)}},{key:"setMediaStatSumInfo",value:function e(){const t=this.mediaStats.getMediaStatSum()||[];t.forEach((e=>{this.addCommInfo(e)})),this.mediaOpsData=this.mediaOpsData.concat(t)}},{key:"setInBoundAudioSsrcInfos",value:function e(){const t=this.mediaStats.getInBoundAudioSsrc()||[];t.forEach((e=>{this.addCommInfo(e)})),this.mediaOpsData=this.mediaOpsData.concat(t)}},{key:"setRequestId",value:function e(t){const r=this.eventInfoMap.get(t.event);return r&&(t.request_id=r.requestId),this}},{key:"transformJoinInfoResult",value:function e(t){if(!t&&0!==t)return jx.INTERNAL_ERROR;let r=jx.INTERNAL_ERROR;switch(t){case nc.RTC_ERR_CODE_SUCCESS:r=jx.SUCCESS;break;case nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED:case nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED:case nc.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT:case nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT:case nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR:case nc.RTC_ERR_CODE_STATUS_ERROR:r=jx.NETWORK_CONNECT_ERROR;break;case nc.RTC_ERR_CODE_WAIT_CONFIG_FAIL:case nc.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN:r=jx.SERVER_ERROR;break;case nc.RTC_ERR_CODE_INVALID_PARAMETER:r=jx.INTERNAL_ERROR}return r}},{key:"reportJoinInfo",value:function t(r,n,i,o,a){var s,u;if(!e.isStatiscEnable())return;this.getMediaStat().setACSAddr(n);const c={};c.event=Cx.EVENT_JOIN_ROOM,c.access_addr=n,c.sfu_addr=this.sfuInfo.ipAddress,c.aport=this.sfuInfo.audioPort,c.vport=this.sfuInfo.videoPort,this.setRequestId(c),c.result=this.transformJoinInfoResult(r),c.platform="web-"+SI.getPlatform(),c.user_agent="web-"+SI.getUserAgent(),c.role=null===(s=this.user)||void 0===s?void 0:s.role,c.join_qos=JSON.stringify(o||{}),c.is_rejoin=i?1:0,c.nick_name=SI.shieldNickname((null===(u=this.user)||void 0===u?void 0:u.userName)||""),c.time_diff_server=0,c.failMessage="".concat(r||" ").concat(a||" "),this.addCommInfo(c),this.joinTime=c.timestamp,this.eventInfoMap.delete(Cx.EVENT_JOIN_ROOM),DM.reportRecords([c])}},{key:"reportRelayJoinInfo",value:function e(t){var r;const n={};n.event=Cx.EVENT_JOIN_ROOM,n.access_addr=t.acsAddr,n.sfu_addr=this.sfuInfo.ipAddress,n.aport=this.sfuInfo.audioPort,n.vport=this.sfuInfo.videoPort,n.request_id=t.requestId,n.result=this.transformJoinInfoResult(t.code),n.platform="web-"+SI.getPlatform(),n.user_agent="web-"+SI.getUserAgent(),n.role=t.role,n.join_qos=JSON.stringify({}),n.is_rejoin=0,n.nick_name=SI.shieldNickname((null===(r=this.user)||void 0===r?void 0:r.userName)||""),n.time_diff_server=0,n.failMessage="".concat(t.code||" ").concat(t.failMessage||" "),this.addCommInfo(n),n.trace_id=t.traceId,n.room_id=t.roomId,n.room_uid=String(t.roomUid),DM.reportRecords([n])}},{key:"reportRelayLeavInfo",value:function t(r){if(!e.isStatiscEnable())return;const n={};n.event=Cx.EVENT_LEAVE_ROOM,n.reason=0,n.result=r.code,n.a_snd_lost_mean=0,n.v_snd_lost_mean=0,n.a_snd_band_width_mean=0,n.v_snd_band_width_mean=0,n.a_snd_rtt_mean=0,n.a_recv_rtt_mean=0,n.v_snd_rtt_mean=0,n.v_recv_rtt_mean=0,n.a_recv_lost_mean=0,n.v_recv_lost_mean=0,n.a_recv_band_width_mean=0,n.v_recv_band_width_mean=0,n.freeze_200ms_cnt=0,n.freeze_600ms_cnt=0,n.freeze_1000ms_cnt=0,n.stut_time_mean=0,n.freeze_400ms_cnt=0,n.freeze_200ms_rate=0,n.freeze_400ms_rate=0,n.freeze_600ms_rate=0,n.freeze_1000ms_rate=0,n.v_snd_frame_rate=0,n.v_snd_pkt_rate=0,n.a_snd_pkt_rate=0,n.v_recv_frame_rate=0,n.v_recv_pkt_rate=0,n.a_recv_pkt_rate=0,n.v_snd_jitter=0,n.v_recv_jitter=0,this.addCommInfo(n),n.trace_id=r.traceId,n.room_id=r.roomId,n.room_uid=String(r.roomUid),n.request_id=r.requestId,n.elapsed=0,DM.reportRecords([n])}},{key:"reportLeavInfo",value:function t(r){if(!e.isStatiscEnable())return;const n={};n.event=Cx.EVENT_LEAVE_ROOM,n.reason=0,n.result=r,n.a_snd_lost_mean=0,n.v_snd_lost_mean=0,n.a_snd_band_width_mean=0,n.v_snd_band_width_mean=0,n.a_snd_rtt_mean=0,n.a_recv_rtt_mean=0,n.v_snd_rtt_mean=0,n.v_recv_rtt_mean=0,n.a_recv_lost_mean=0,n.v_recv_lost_mean=0,n.a_recv_band_width_mean=0,n.v_recv_band_width_mean=0,n.freeze_200ms_cnt=0,n.freeze_600ms_cnt=0,n.freeze_1000ms_cnt=0,n.stut_time_mean=0,n.freeze_400ms_cnt=0,n.freeze_200ms_rate=0,n.freeze_400ms_rate=0,n.freeze_600ms_rate=0,n.freeze_1000ms_rate=0,n.v_snd_frame_rate=0,n.v_snd_pkt_rate=0,n.a_snd_pkt_rate=0,n.v_recv_frame_rate=0,n.v_recv_pkt_rate=0,n.a_recv_pkt_rate=0,n.v_snd_jitter=0,n.v_recv_jitter=0,n.elapsed=(SI.getCurrentTimestamp()-this.joinTime)/1e3,this.addCommInfo(n),this.setRequestId(n),this.eventInfoMap.delete(Cx.EVENT_LEAVE_ROOM),DM.reportRecords([n])}},{key:"reportVideoSub",value:function t(r,n,i,o,a){if(!e.isStatiscEnable())return;const s=[],u=[],c=[],l=[],f=[];null==i||i.forEach((e=>{const t=this.getMediaStat().getEncryInfo(e.pUserId)||SI.secretString(e.pUserId)||"";u.push(t),s.push(e.pSsrcId),f.push((null==e?void 0:e.code)||0);const r=this.remoteUserManager.getStreamInfoByPStreamUid(e.pStreamUid);if(r){const e=$M.getResolutionType(r.width,r.height);c.push(e&&e.toUpperCase().replace("-",""))}else this.logger.warn(this.module_,"Can not getStreamInfoByPStreamUid for reportVideoSub");l.push(String(e.pStreamUid))}));const d={event:Cx.EVENT_WATCH,action:Dx[r],request_id:n,ssrc_list:s.join(","),stream_uid_list:l.join(","),uid_list:u.join(","),img_list:c.join(","),reasonList:f.join(","),result:o,failMessage:0===o?"":a};this.addCommInfo(d),DM.reportRecords([d])}},{key:"reportSwitchDevicesInfo",value:function t(r,n,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6;if(!e.isStatiscEnable())return;r===_x.OUTPUT_AUDIO?this.deviceInfo.audioOutputId=n:r==_x.INPUT_AUDIO?this.deviceInfo.audioInputId=n:r===_x.INPUT_VIDEO&&(this.deviceInfo.videoInputId=n);const a={event:Cx.EVENT_SWITCH_DEVICE,type:r,name:n,result:i,opt:o};this.addCommInfo(a),DM.addRecord(a)}},{key:"reportSwitchRoleInfo",value:function t(r,n){if(!e.isStatiscEnable())return;const i={event:Cx.EVENT_SWITCH_ROLE,role:r,result:n};this.setRequestId(i),this.addCommInfo(i),DM.addRecord(i)}},{key:"reportStartSendMediaStream",value:function t(r,n){if(!e.isStatiscEnable())return;const i={event:Cx.EVENT_SEND_MEDIA,type:r,opt:n};this.addCommInfo(i),DM.reportRecords([i])}},{key:"setMediaCaptureSucc",value:function t(r,n){if(!e.isStatiscEnable())return;const i={event:Cx.EVENT_START_MEDIA,type:r,dev_name:n};this.addCommInfo(i),DM.addRecord(i)}},{key:"reportAuxiliaryStreamShareInfo",value:function t(r,n){if(!e.isStatiscEnable())return;const i={event:Cx.EVENT_SEND_AUX_STREAM,action:r,result:n};this.setRequestId(i),this.addCommInfo(i),DM.reportRecords([i])}},{key:"setAudioSubscribeInfo",value:function t(r,n,i){if(!e.isStatiscEnable())return;const o=[];let a;null==r||r.forEach((e=>{const t={uid:this.getMediaStat().getEncryInfo(null==e?void 0:e.userid)||SI.secretString(null==e?void 0:e.userid)||"",ssrc:(null==e?void 0:e.ssrc)||0};o.push(t),a=e.action-1}));const s={event:Cx.EVENT_SUBSCIBE,request_id:n,policy:this.getMediaStat().getAudioPolicy(),streams:o,action:a,result:i};this.addCommInfo(s),DM.reportRecords([s])}},{key:"reportAudioSub",value:function t(r,n,i,o){if(!e.isStatiscEnable())return;const a=[];null==i||i.forEach((e=>{const t={uid:this.getMediaStat().getEncryInfo(null==e?void 0:e.pUserId)||SI.secretString(null==e?void 0:e.pUserId)||"",ssrc:(null==e?void 0:e.pSsrcId)||0,reason:(null==e?void 0:e.code)||0};a.push(t)}));const s={event:Cx.EVENT_SUBSCIBE,request_id:n,policy:this.getMediaStat().getAudioPolicy(),streams:a,action:r,result:o};this.addCommInfo(s),DM.reportRecords([s])}},{key:"setConnectionStatusInfo",value:function t(r,n){if(!e.isStatiscEnable())return;const i={timestamp:0,event:Cx.EVENT_CONNECTION_CHANNEL_STATUS,type:n,on:r};this.addCommInfo(i),DM.reportRecords([i])}},{key:"reportUpStreamVideoInfo",value:function t(r,n,i){if(!e.isStatiscEnable())return;const o=[],a=[];r.forEach((e=>{a.push($M.getResolution(e.width,e.height)),o.push("".concat(e.width,"*").concat(e.height))}));const s={event:Cx.EVENT_SET_UP_STREAM,request_id:n,resolution_name_list:a.join(","),width_height_list:o.join(","),result:0===i?Ex.SUCCESS:Ex.FAIL};this.addCommInfo(s),DM.addRecord(s)}},{key:"reportAudioPolicyInfo",value:function t(r,n,i){if(!e.isStatiscEnable())return;const o={event:Cx.EVENT_SET_AUDIO_POLICY,request_id:n,policy:r,result:i,topn:r===$x.TOPN_AUDIOPOLICY?3:17};this.addCommInfo(o),DM.addRecord(o)}},{key:"setSysBasicInfo",value:function t(){if(!e.isStatiscEnable())return;const r={event:Ax.DEVICE_RT_SYSTEM,device_cpu:0,app_cpu:0,mem_ratio:0};this.addCommInfo(r),DM.addRecord(r)}},{key:"setCameraInfo",value:function t(r,n){if(!e.isStatiscEnable())return;const i={event:Ax.DEVICE_RT_CAMERA,cap_format:0,cap_width:(null==r?void 0:r.width)||0,cap_height:(null==r?void 0:r.height)||0,cap_frame_rate:(null==r?void 0:r.frameRate)||0,out_width:(null==n?void 0:n.width)||0,out_height:(null==n?void 0:n.height)||0,out_cap_frames:(null==n?void 0:n.frameRate)||0,cap_overtime_cnt:0,frame_capture_time:0,render_frame_rate:0,frame_render_time:0};this.addCommInfo(i),DM.addRecord(i)}},{key:"setSpeakerInputInfo",value:function t(){if(!e.isStatiscEnable())return;const r={event:Ax.DEVICE_RT_SPEAKER,dst_down_vel:0,dst_down_nel:0,speaker_vol:0,speaker_play_err_num:0};this.addCommInfo(r),DM.addRecord(r)}},{key:"setMicrophoneInfo",value:function t(){if(!e.isStatiscEnable())return;const r={event:Ax.DEVICE_RT_MICROPHONE,src_cap_vel:0,src_cap_nel:0,src_mic_vol_scale:0,capture_abnormal:0,mic_vol:0,mic_recoder_err_num:0};this.addCommInfo(r),DM.addRecord(r)}},{key:"setSpeakerDeviceInfo",value:async function t(r){if(!e.isStatiscEnable())return;const n=[];for(let e=0;e<r.length;e++)n.push("".concat(r[e].deviceId,"(").concat(r[e].label,")"));const i={event:Ox.DEVICE_STATUS_SPEAKER,device_nums:r.length,device_list:n.join(",")};this.addCommInfo(i),DM.addRecord(i)}},{key:"setCameraDeviceInfo",value:async function t(r){if(!e.isStatiscEnable())return;const n=[];for(let e=0;e<r.length;e++)n.push("".concat(r[e].deviceId,"(").concat(r[e].label,")"));const i={event:Ox.DEVICE_STATUS_CAMERA,device_nums:r.length,device_list:n.join(",")};this.addCommInfo(i),DM.addRecord(i)}},{key:"setMicrophoneDeviceInfo",value:async function t(r){if(!e.isStatiscEnable())return;const n=[];for(let e=0;e<r.length;e++)n.push("".concat(r[e].deviceId,"(").concat(r[e].label,")"));const i={event:Ox.DEVICE_STATUS_MICROPHONE,device_nums:r.length,device_list:n.join(",")};this.addCommInfo(i),DM.addRecord(i)}},{key:"setDeviceChangedInfo",value:function t(r,n,i){if(!e.isStatiscEnable())return;this.logger.debug(this.module_,"setDeviceChangedInfo type[".concat(r,"] deviceId[").concat(n,"] state[").concat(i,"]"));let o=0;"audioinput"===r?o=1:"videoinput"===r&&(o=2);const a={timestamp:SI.getCurrentTimestamp(),event:Ox.DEVICE_STATUS_DEVICE_CHANGE,type:o,name:n,state:i};this.addCommInfo(a),DM.addRecord(a),this.setDeviceStatusInfo()}},{key:"setDeviceUserAgent",value:function t(){if(!e.isStatiscEnable())return;const r={timestamp:SI.getCurrentTimestamp(),event:Ox.DEVICE_STATUS_USERAGENT,user_agent:navigator.userAgent};this.addCommInfo(r),DM.reportRecords([r])}},{key:"reportSignalReqForLogUpload",value:function t(r){if(!e.isStatiscEnable())return;const n={event:Px.SIGNAL_REQUEST,event_name:"EVENT^log_upload^SDK^OPS",send_time:SI.getCurrentTimestamp(),req_body:r,result:0,source:"sdk",target:"access"};this.addCommInfo(n),DM.addRecord(n)}},{key:"reportSignalReqForHeartBeatLost",value:function t(r,n){var i;if(!e.isStatiscEnable()||"PING"!==r.type)return;let o="";null!==(i=r.body)&&void 0!==i&&i.action&&(o="#"+r.body.action);const a={timestamp:n,event:Px.SIGNAL_REQUEST,event_name:"SIGNAL^".concat(r.type).concat(o,"^SDK^ACS"),request_id:r.requestId,send_time:n,req_body:JSON.stringify(r),result:0,source:"sdk",target:"access"};this.addCommInfo(a),DM.addRecord(a)}},{key:"reportSignalReqForWeb2Server",value:function t(r){if(!e.isStatiscEnable()||!r.type||"PING"===r.type)return;const n="SIGNAL^".concat(r.type,"^SDK^ACS"),i=SI.getCurrentTimestamp(),o={timestamp:i,event:Px.SIGNAL_REQUEST,event_name:n,request_id:r.requestId,send_time:i,req_body:JSON.stringify(r),result:0,source:"sdk",target:"access"};this.addCommInfo(o),DM.addRecord(o)}},{key:"reportSignalReqForServer2Web",value:function t(r){if(e.isStatiscEnable()&&r.type)switch(r.type){case"WATCH_STREAM_NOTIFY":case"APP_DATA_NOTIFY":case"PUBLISH_STATUS_NOTIFY":case"NOTIFY_STATUS":case"UPLOAD_LOG_NOTIFY":case"DISCONNECT_NOTIFY":case"PUSH_STREAM_NOTIFY":case"RECONNECT_NOTIFY":case"STOP_PUSH_STREAM_NOTIFY":case"CHANGE_STREAM_STATUS_NOTIFY":{const e="SIGNAL^".concat(r.type),t={event:Px.SIGNAL_REQUEST,event_name:"".concat(e,"^ACS^SDK"),request_id:r.requestId,send_time:SI.getCurrentTimestamp(),req_body:JSON.stringify(r),result:0,source:"access",target:"sdk"};this.addCommInfo(t),DM.addRecord(t);break}}}},{key:"reportSignalRepForLogUpload",value:function t(r,n){if(!e.isStatiscEnable())return;const i={timestamp:SI.getCurrentTimestamp(),event:Px.SIGNAL_RESPONSE,event_name:"EVENT^log_upload^OPS^SDK",recv_time:SI.getCurrentTimestamp(),rsp_body:r,rsp_code:n,result:0,source:"access",target:"sdk"};this.addCommInfo(i),DM.addRecord(i)}},{key:"reportSignalRepForServer2Web",value:function t(r,n){if(!e.isStatiscEnable())return;const i="SIGNAL^".concat(r.type,"^SDK^ACS"),o=SI.getCurrentTimestamp(),a={event:Px.SIGNAL_RESPONSE,eventName:i,request_id:n.requestId,recv_time:o,rsp_body:JSON.stringify(n),rsp_code:n.result||0,result:n.result||0,source:"access",target:"sdk"};this.addCommInfo(a),DM.addRecord(a)}},{key:"setApiCallInfo",value:function t(r,n,i,o,a){if(!e.isStatiscEnable())return;const s="API^web#".concat(r,"^APP^SDK");for(var u=arguments.length,c=new Array(u>5?u-5:0),l=5;l<u;l++)c[l-5]=arguments[l];const f={api_call_id:SI.generateUuid(),api_name:s,start_time:n,end_time:i,event:xx.API_CALL,event_name:s,params:JSON.stringify(c)};o?f.exception="".concat(o.code," - ").concat(o.message):f.ret=a?JSON.stringify(a):"",this.addCommInfo(f),/checkSystemRequirements/.test(r)?DM.reportRecords([f]):DM.addRecord(f)}},{key:"recordCallbackInfo",value:function t(r,n,i,o,a,s){if(!e.isStatiscEnable())return;if(-1!==xP.indexOf(r))return;const u=s((null==a?void 0:a.stream)||a),c={event:xx.CALLBACK_API,event_name:"CALLBACK^web#".concat(n,"$#").concat(r,"#^SDK^APP"),api_call_id:SI.generateUuid(),callback_name:"CALLBACK^web#".concat(n,"$#").concat(r,"#^SDK^APP"),callback_type:r,params:u,start_time:i,end_time:o};this.addCommInfo(c),DM.addRecord(c)}},{key:"recordCallbackInfoBeacon",value:function t(r,n,i,o,a,s){if(!e.isStatiscEnable())return;if(-1!==xP.indexOf(r))return;const u=s((null==a?void 0:a.stream)||a),c={event:xx.CALLBACK_API,event_name:"CALLBACK^web#".concat(n,"$#").concat(r,"#^SDK^APP"),api_call_id:SI.generateUuid(),callback_name:"CALLBACK^web#".concat(n,"$#").concat(r,"#^SDK^APP"),callback_type:r,params:u,start_time:i,end_time:o};this.addCommInfo(c),DM.reportRecordsBeacon([c])}},{key:"setFirstFrameInfo",value:function t(r){if(!e.isStatiscEnable())return;const n={event:Lx.FirstFrame,startupqos:r};this.addCommInfo(n),DM.addRecord(n)}},{key:"setSpanId",value:function e(t,r){r&&""!==r&&t&&""!==t&&this.spanIdMap.set(t,r)}},{key:"getSpanId",value:function e(t){if(t&&""!==t){const e=this.spanIdMap.get(t);return e&&this.spanIdMap.delete(t),e||""}return""}},{key:"setParentSpanId",value:function e(t,r){t&&""!==t&&r&&""!==r&&this.parentSpanIdMap.set(t,r)}},{key:"getParentSpanId",value:function e(t){if(t&&""!==t){const e=this.parentSpanIdMap.get(t);return e&&this.parentSpanIdMap.delete(t),e||""}return""}},{key:"checkSignalReceiveMsgs",value:function e(t){return this.signalReceiveMsgs.includes(t)}},{key:"checkSignalSendMsgs",value:function e(t){return this.signalSendMsgs.includes(t)}},{key:"reportTraceInfo2Nuwa",value:function t(r){if(!e.isStatiscEnable())return;const n={event:Mx.TraceNuwa,trace_info:"".concat(r.version,"|").concat(r.startTimestamp,"|").concat(r.traceId,"|").concat(r.spanId,"|").concat(r.parentSpanId,"|").concat(r.ip,"|").concat(r.source,"|").concat(r.target,"|").concat(r.spanName,"|").concat(r.status,"|").concat(r.endTimestamp,"||||||||").concat(r.scope)};this.addCommInfo(n),DM.addRecord(n)}},{key:"buildRtcStatsDebugInfo",value:async function e(t){return this.mediaStats.buildRtcStatsDebugInfo(t)}}],[{key:"isStatiscEnable",value:function e(){return"off"!==zM.getParameter(jM)}}])}();const iN={videoinput:"CameraChanged",audioinput:"RecordingDeviceChanged",audiooutput:"PlaybackDeviceChanged"},oN="ADD",aN="REMOVE",sN="DeviceChangeListener";const uN=new(function(){function e(){a(this,e);this.internalEventEmitters=[],this.clientEventEmitter=null,this.deviceChangeCallBack=[],this.initFlag=!1,this.logger=AI.getLogger(),this.stat=new nN(this.logger)}return u(e,[{key:"initDeviceChangedNotify",value:function e(t,r){this.addEventEmitter(t,r),this.initFlag||(this.initFlag=!0,this.registerDeviceChangedNotify())}},{key:"addEventEmitter",value:function e(t,r){r?this.internalEventEmitters.push(t):this.clientEventEmitter=t}},{key:"removeEventEmitter",value:function e(t){t!==this.clientEventEmitter?this.internalEventEmitters=this.internalEventEmitters.filter((e=>e!==t)):this.clientEventEmitter=null}},{key:"registerDeviceChangedNotify",value:function e(){let t=!1;tx().then((e=>{(!e||e.length<=0)&&this.logger.info(sN,"no device available now"),e=e||[],this.preDevices=new Map;for(const t of e)AI.addPrivacyString(t.deviceId),t.deviceId&&"default"!==t.deviceId&&"communications"!==t.deviceId&&this.preDevices.set(t.deviceId,t.kind)})).finally((()=>{navigator.mediaDevices.ondevicechange=async e=>{if(e.isTrusted){if(this.deviceChangeCallBack.push(this.handleDeviceChangeEvent.bind(this)),!t)for(;this.deviceChangeCallBack.length>0;)t=!0,await this.deviceChangeCallBack.shift()(),this.deviceChangeCallBack.length<1&&(t=!1)}else this.logger.error(sN,"device change event trigger by script")}}))}},{key:"handleDeviceChangeEvent",value:async function e(){let t=await tx();t=t||[];const r=new Map;for(const e of t)e.deviceId&&"default"!==e.deviceId&&"communications"!==e.deviceId&&r.set(e.deviceId,e.kind);let n=this.internalEventEmitters;this.clientEventEmitter&&(n=[...this.internalEventEmitters,this.clientEventEmitter]),this.preDevices.forEach(((e,t)=>{r.has(t)||(this.logger.info(sN,"deviceType: ".concat(e," deviceId: ").concat(t," remove")),n.forEach((r=>{r.emit(lx[iN[e]],{deviceId:t,state:aN})})),this.stat.setDeviceChangedInfo(e,t,1))})),r.forEach(((e,t)=>{this.preDevices.has(t)||(this.logger.info(sN,"deviceType: ".concat(e," deviceId: ").concat(t," add")),n.forEach((r=>{r.emit(lx[iN[e]],{deviceId:t,state:oN})})),this.stat.setDeviceChangedInfo(e,t,0))})),this.preDevices=r}}])}());function cN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cN(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cN(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const fN="httpRequest";const dN=new(function(){function e(){a(this,e);this.defaultRequestOption={method:"GET",mode:"cors",cache:"default"},this.logger=AI.getLogger()}return u(e,[{key:"getFetchUrl",value:function e(t){const r=xM.getProxyServer();let n;if(r){const e=/http(?:s)?:\/\/([^/]+)(.*)/.exec(t);if(e&&3===e.length){const i=e[1].split(":");n=i[1]||(/^http:.*/gi.test(t)?"80":"443"),t="".concat(r).concat(e[2]).concat(e[2].indexOf("?")<0?"?":"&","org_domain=").concat(i[0],"&org_port=").concat(n)}return t}return t}},{key:"fetch",value:async function e(t){let r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e4,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,u=0;for(;u<a+1;){const e={};r=SI.generateRandomId(16,10);try{this.logger.debug(fN,"[HTTP_ID:".concat(r,"] fetch request start: ").concat(SI.shieldUrlParameters(t))),this.extendInfosHandle(t,"start",e,s);const c=await this.doFetch(t,n,i,o,r);return u=a+1,this.extendInfosHandle(t,"end",e,s,c),this.logger.debug(fN,"[HTTP_ID:".concat(r,"] fetch request success")),c}catch(n){if(this.logger.error(fN,"[HTTP_ID:".concat(r,"], requestUrl: ").concat(SI.shieldUrlParameters(t),", fetch request failed")),this.extendInfosHandle(t,"end",e,s,n),n instanceof oc&&n.getCode()===nc.RTC_ERR_CODE_REGION_NOT_COVERED)throw u=a+1,n;if(!(u<a))throw n;await SI.sleep(500*SI.getRandom()+500),u++}}}},{key:"doFetch",value:function e(t){let r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const s=new Promise(((e,t)=>{r=setTimeout((()=>{clearTimeout(r),t(new oc(nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT))}),o)})),u=new Promise(((e,o)=>{fetch(this.getFetchUrl(t),lN(lN(lN({},this.defaultRequestOption),n),{headers:i})).then((r=>{if(SI.syncLocalTime(r.headers.get("Date")),!r.ok)return 504===r.status?this.logger.error(fN,"[HTTP_ID:".concat(a,"] doFetch failed: 504")):0===r.status?this.logger.error(fN,"[HTTP_ID:".concat(a,"] doFetch failed: 0")):this.logger.error(fN,"[HTTP_ID:".concat(a,"] doFetch failed: ").concat(r.status)),void o(new oc(r.status,"network error"));let n;const s=r.headers.get("Content-Type")||i["Content-Type"];n=/.*application\/json.*/.test(s)?r.json():/^text.*/.test(s)?r.text():r.arrayBuffer(),n.then((t=>{e({httpCode:r.status,data:t})})).catch((e=>{this.logger.error(fN,"[HTTP_ID:".concat(a,"], requestUrl: ").concat(SI.shieldUrlParameters(t),", doFetch get response failed: ").concat(e)),o(new oc(null==e?void 0:e.name,null==e?void 0:e.message))}))})).catch((e=>{this.logger.error(fN,"[HTTP_ID:".concat(a,"], requestUrl: ").concat(SI.shieldUrlParameters(t),", doFetch failed for exception: ").concat(e)),o(new oc(null==e?void 0:e.name,null==e?void 0:e.message))})).finally((()=>{clearTimeout(r)}))}));return Promise.race([s,u])}},{key:"extendInfosHandle",value:function e(t,r,n,i,o){i&&("start"===r?Object.assign(n,{id:i.length+1,domain:t,start_ms:SI.getCurrentTimestamp(),delay_ms:0,stepName:"dispatch",rspCode:"",errMsg:""}):"end"===r?((/v1\/dns/.test(t)||/global\.talk-cloud\.net/.test(t))&&(n.start_ms=SI.adjustTimeByOffset(n.start_ms)),o instanceof oc?(n.delay_ms=SI.getCurrentTimestamp()-n.start_ms,n.rspCode="".concat(o.getCode()),n.errMsg=o.getMsg()):(n.delay_ms=SI.getCurrentTimestamp()-n.start_ms,n.rspCode=o.httpCode||"200"),i.push(n)):this.logger.info(fN,"cannot handle"))}}])}());var hN=ci,pN=Vd,vN=D([].reverse),mN=[1,2];function yN(){}function gN(){gN.init.call(this)}function bN(e){return void 0===e._maxListeners?gN.defaultMaxListeners:e._maxListeners}function _N(e,t,r,n){var i,o,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]):(o=e._events=new yN,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=bN(e))&&i>0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else a=o[t]=r,++e._eventsCount;return e}function SN(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function EN(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function wN(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}hN({target:"Array",proto:!0,forced:String(mN)===String(mN.reverse())},{reverse:function(){return pN(this)&&(this.length=this.length),vN(this)}}),yN.prototype=Object.create(null),gN.EventEmitter=gN,gN.usingDomains=!1,gN.prototype.domain=void 0,gN.prototype._events=void 0,gN.prototype._maxListeners=void 0,gN.defaultMaxListeners=10,gN.init=function(){this.domain=null,gN.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new yN,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},gN.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},gN.prototype.getMaxListeners=function(){return bN(this)},gN.prototype.emit=function(e){var t,r,n,i,o,a,s,u="error"===e;if(a=this._events)u=u&&null==a.error;else if(!u)return!1;if(s=this.domain,u){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=wN(e,n),o=0;o<n;++o)i[o].call(r)}(r,l,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var i=e.length,o=wN(e,i),a=0;a<i;++a)o[a].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(e,t,r,n,i){if(t)e.call(r,n,i);else for(var o=e.length,a=wN(e,o),s=0;s<o;++s)a[s].call(r,n,i)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,i,o){if(t)e.call(r,n,i,o);else for(var a=e.length,s=wN(e,a),u=0;u<a;++u)s[u].call(r,n,i,o)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];!function(e,t,r,n){if(t)e.apply(r,n);else for(var i=e.length,o=wN(e,i),a=0;a<i;++a)o[a].apply(r,n)}(r,l,this,i)}return!0},gN.prototype.addListener=function(e,t){return _N(this,e,t,!1)},gN.prototype.on=gN.prototype.addListener,gN.prototype.prependListener=function(e,t){return _N(this,e,t,!0)},gN.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,SN(this,e,t)),this},gN.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,SN(this,e,t)),this},gN.prototype.removeListener=function(e,t){var r,n,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0===--this._eventsCount?this._events=new yN:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0===--this._eventsCount)return this._events=new yN,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}(r,i);n.removeListener&&this.emit("removeListener",e,a||t)}return this},gN.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new yN,this._eventsCount=0):r[e]&&(0===--this._eventsCount?this._events=new yN:delete r[e]),this;if(0===arguments.length){for(var n,i=Object.keys(r),o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new yN,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},gN.prototype.listeners=function(e){var t,r,n=this._events;return r=n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[],r},gN.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):EN.call(e,t)},gN.prototype.listenerCount=EN,gN.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};const TN=new(function(){function e(){a(this,e);o(this,"eventHandlers",{visibilitychange:()=>{let e="FOREGROUND";document.hidden&&(e="BACKGROUND");for(const t of this.eventBus.values())t.emit(e)}}),o(this,"eventListeners",{visibilitychange:e=>{"ADD"===e?document.addEventListener("visibilitychange",this.eventHandlers.visibilitychange):document.removeEventListener("visibilitychange",this.eventHandlers.visibilitychange)}}),this.eventBus=new Map,this.addListener("visibilitychange",SI.isMobileDevice.bind(SI))}return u(e,[{key:"register",value:function e(t){const r=SI.generateRandomId(32);return this.eventBus.set(r,t),r}},{key:"unregister",value:function e(t){t&&this.eventBus.delete(t)}},{key:"addListener",value:function e(t,r){r&&!r()||this.eventListeners[t]&&this.eventListeners[t]("ADD")}},{key:"removeListener",value:function e(t){this.eventListeners[t]&&this.eventListeners[t]("REMOVE")}}])}());let IN=function(){function e(){a(this,e);this.context_=new AudioContext,this.script_=this.context_.createScriptProcessor(2048,1,1),this.script_.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r=0,n=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e],Math.abs(t[e])>.99&&(n+=1);this.instant_=Math.sqrt(r/t.length),this.slow_=.95*this.slow_+.05*this.instant_,this.clip_=n/t.length},this.instant_=0,this.slow_=0,this.clip_=0}return u(e,[{key:"connectToSource",value:function e(t){return new Promise(((e,r)=>{try{const r=new MediaStream;r.addTrack(t),this.mic_=this.context_.createMediaStreamSource(r),this.mic_.connect(this.script_),this.script_.connect(this.context_.destination),e()}catch(e){r(e)}}))}},{key:"stop",value:function e(){this.mic_.disconnect(),this.script_.disconnect(),this.context_.close()}},{key:"getVolume",value:function e(){return parseFloat(this.instant_.toFixed(2))}}])}();let RN=function(){function e(t){a(this,e);this.module_="RTCPlayer",this.mediaStream_=new MediaStream,this.log_=t.logger,this.track_=t.track,this.playerDiv_=t.playerDiv,this.playerId_=t.playerId,this.playerElement_=null,this.state_="NONE",this.event_=new gN,this.pauseCount=0,this.listenHandlers={canPlayHandler:this.canPlayHandler.bind(this),playingHandler:this.playingHandler.bind(this),playerEndedHandler:this.playerEndedHandler.bind(this),playerPausedHandler:this.playerPausedHandler.bind(this),mediaErrorHandler:this.mediaErrorHandler.bind(this),trackEndedHandler:this.trackEndedHandler.bind(this),trackMutedHandler:this.trackMutedHandler.bind(this),trackUnmutedHandler:this.trackUnmutedHandler.bind(this),playHandler:null,backgroundHandler:this.backgroundHandler.bind(this),foregroundHandler:this.foregroundHandler.bind(this)},this.retryPlayNum=0}return u(e,[{key:"on",value:function e(t,r){this.event_.on(t,r)}},{key:"off",value:function e(t,r){this.event_.removeListener(t,r)}},{key:"foregroundHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, application is foreground"),this.module_.indexOf("Audio")>0&&this.track_&&this.trackEnable!==this.track_.enabled&&(this.track_.enabled=this.trackEnable),"PAUSED"===this.state_&&(this.module_.indexOf("Video")>0?this.event_.emit("videoCanPlay"):this.event_.emit("audioCanPlay"))}},{key:"backgroundHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, application is background"),this.module_.indexOf("Audio")>0&&this.track_&&(this.trackEnable=this.track_.enabled,this.trackEnable&&(this.track_.enabled=!1))}},{key:"canPlayHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player is canplay status"),this.event_.emit(this.module_.indexOf("Video")>0?"videoCanPlay":"audioCanPlay"),this.event_.emit(OP,{event:"playerCanplay",type:"".concat(this.module_),streamId:this.playerId_})}},{key:"playingHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player is starting playing"),this.event_.emit(OP,{event:"playerPlaying",type:"".concat(this.module_),streamId:this.playerId_}),this.state_="PLAYING",this.event_.emit(RP,{state:this.state_,reason:"playing"})}},{key:"playerEndedHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player is ended"),this.event_.emit(OP,{event:"playerEnded",type:"".concat(this.module_),streamId:this.playerId_}),"STOPPED"!==this.state_&&(this.state_="STOPPED",this.event_.emit(RP,{state:this.state_,reason:"ended"}))}},{key:"playerPausedHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player is paused"),this.event_.emit(OP,{event:"playerPause",type:"".concat(this.module_),streamId:this.playerId_}),this.state_="PAUSED",this.event_.emit(RP,{state:this.state_,reason:"pause"}),this.retryPlayNum>=3?this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"try to play max 3"):this.module_.indexOf("Video")>0?(this.retryPlayNum++,this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"try to play again"),this.event_.emit("videoCanPlay")):this.module_.indexOf("Audio")>0&&(this.retryPlayNum++,this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"try to play again"),this.event_.emit("audioCanPlay"))}},{key:"mediaErrorHandler",value:function e(t){var r,n,i,o;this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, media error"),this.event_.emit(PP,{errCode:nc.RTC_ERR_CODE_MEDIA_ERROR,errMessage:"mediaError code:".concat(null==t||null===(r=t.target)||void 0===r||null===(n=r.error)||void 0===n?void 0:n.code,", message:").concat(null==t||null===(i=t.target)||void 0===i||null===(o=i.error)||void 0===o?void 0:o.message)})}},{key:"trackEndedHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, player track is ended"),this.event_.emit(OP,{event:"trackEnded",type:"".concat(this.module_),streamId:this.playerId_}),"STOPPED"!==this.state_&&(this.state_="STOPPED",this.event_.emit(RP,{state:this.state_,reason:"ended",trackEnded:!0}))}},{key:"trackMutedHandler",value:function e(){this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"handleEvents, track is muted"),this.event_.emit(OP,{event:"trackMute",type:"".concat(this.module_),streamId:this.playerId_}),"PAUSED"!==this.state_&&(this.state_="PAUSED",this.event_.emit(RP,{state:this.state_,reason:"mute"}))}},{key:"trackUnmutedHandler",value:function e(){this.log_.debug("".concat(this.module_,"#[").concat(this.playerId_,"]"),"handleEvents, track is unmuted"),this.event_.emit(OP,{event:"trackUnmute",type:"".concat(this.module_),streamId:this.playerId_}),"PAUSED"===this.state_&&(this.state_="PLAYING",this.event_.emit(RP,{state:this.state_,reason:"unmute"}))}},{key:"closeAllEvents",value:function e(){var t,r,n,i,o,a,s,u,c;null===(t=this.playerElement_)||void 0===t||t.removeEventListener("canplay",this.listenHandlers.canPlayHandler),null===(r=this.playerElement_)||void 0===r||r.removeEventListener("playing",this.listenHandlers.playingHandler),null===(n=this.playerElement_)||void 0===n||n.removeEventListener("ended",this.listenHandlers.playerEndedHandler),null===(i=this.playerElement_)||void 0===i||i.removeEventListener("pause",this.listenHandlers.playerPausedHandler),null===(o=this.track_)||void 0===o||o.removeEventListener("ended",this.listenHandlers.trackEndedHandler),null===(a=this.track_)||void 0===a||a.removeEventListener("mute",this.listenHandlers.trackMutedHandler),null===(s=this.track_)||void 0===s||s.removeEventListener("unmute",this.listenHandlers.trackUnmutedHandler),null===(u=this.event_)||void 0===u||u.removeListener("videoCanPlay",this.listenHandlers.playHandler),null===(c=this.event_)||void 0===c||c.removeListener("audioCanPlay",this.listenHandlers.playHandler),this.event_.removeListener("FOREGROUND",this.listenHandlers.foregroundHandler),this.event_.removeListener("BACKGROUND",this.listenHandlers.backgroundHandler),TN.unregister(this.sysEventRegisterUid)}},{key:"handleEvents",value:function e(){this.playerElement_.addEventListener("canplay",this.listenHandlers.canPlayHandler),this.playerElement_.addEventListener("playing",this.listenHandlers.playingHandler),this.playerElement_.addEventListener("ended",this.listenHandlers.playerEndedHandler),this.playerElement_.addEventListener("pause",this.listenHandlers.playerPausedHandler),this.playerElement_.addEventListener("error",this.listenHandlers.mediaErrorHandler),this.track_.addEventListener("ended",this.listenHandlers.trackEndedHandler),this.track_.addEventListener("mute",this.listenHandlers.trackMutedHandler),this.track_.addEventListener("unmute",this.listenHandlers.trackUnmutedHandler),this.event_.on("FOREGROUND",this.listenHandlers.foregroundHandler),this.event_.on("BACKGROUND",this.listenHandlers.backgroundHandler),this.sysEventRegisterUid=TN.register(this.event_)}},{key:"stop",value:function e(){this.closeAllEvents(),this.playerElement_&&(this.playerElement_.srcObject=null),this.playerElement_=null,this.mediaStream_=new MediaStream,this.log_.info(this.module_,"stop success")}},{key:"replaceTrack",value:function e(t){this.log_.info(this.module_,"replaceTrack start");const r=this.module_.indexOf("Audio")>0?this.mediaStream_.getAudioTracks():this.mediaStream_.getVideoTracks(),n=r.length?r[0]:null;n!==t&&(n&&this.mediaStream_.removeTrack(n),this.mediaStream_.addTrack(t),this.track_=t)}},{key:"resume",value:async function e(t){return new Promise(((e,r)=>{this.playerElement_?this.playerElement_.play().then((()=>{this.log_.info(this.module_,"audio player resume success, streamId:".concat(this.playerId_,", playParameters: ").concat(JSON.stringify(t))),e(null)})).catch((e=>{this.log_.error(this.module_,"player resume failed, errmsg=".concat(e," , playParameters: ").concat(JSON.stringify(t))),"NotAllowedError"===e.name?r(new oc(nc.RTC_ERR_CODE_PLAY_NOT_ALLOW)):r(new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR,e.message))})):r(new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"resume failed, element is null"))}))}},{key:"multiPlatformAdapter",value:async function e(){return new Promise((e=>{if(SI.isWKWebview()){const t=window.WeixinJSBridge;t?(this.log_.info(this.module_,"multiPlatformAdapter handle begin"),t.invoke("getNetworkType",{},(()=>{e()}),!1)):document.addEventListener("WeixinJSBridgeReady",(()=>{this.log_.info(this.module_,"multiPlatformAdapter WeixinJSBridgeReady, handle begin"),t.invoke("getNetworkType",{},(()=>{e()}),!1)}))}else e()}))}},{key:"doPlay",value:async function e(t,r,n){let i;return await this.multiPlatformAdapter(),i=this.module_.indexOf("Video")>0?", screenFit:".concat(n.objectFit,", mirror:").concat(n.mirror):", deviceId:".concat(n.outputDeviceId,", volume:").concat(n.volume,", muted:").concat(n.muted),this.playerElement_.play().then((()=>{var e,r;this.log_.info(this.module_,"play success, parentDiv id:".concat(null===(e=this.playerDiv_)||void 0===e?void 0:e.id,", resolutionId or streamId:").concat(this.playerId_,", physical track id:").concat(null===(r=this.track_)||void 0===r?void 0:r.id).concat(i)),this.afterPlayStrategy(),this.retryPlayNum=0,t(null)})).catch((e=>{var t,n;this.log_.error(this.module_,"play failed, errmsg=".concat(e,",parentDiv id:").concat(null===(t=this.playerDiv_)||void 0===t?void 0:t.id,", resolutionId or streamId:").concat(this.playerId_,", physical track id:").concat(null===(n=this.track_)||void 0===n?void 0:n.id).concat(i)),"NotAllowedError"===e.name?r(new oc(nc.RTC_ERR_CODE_PLAY_NOT_ALLOW)):r(new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR,e.message))})).finally((()=>{clearTimeout(this.playTimeOutTimer)}))}},{key:"afterPlayStrategy",value:function e(){if(!this.pauseCount&&SI.getPlatform().indexOf("Ios15")>=0){this.log_.error(this.module_,SI.getPlatform());const e=setTimeout((()=>{clearTimeout(e),this.playerElement_.pause(),this.pauseCount++}),100)}}}])}();let CN=function(e){function t(e){var r;a(this,t);r=f(this,t,[{logger:e.logger,track:e.track,playerDiv:e.playerDiv,playerId:e.playerId}]),r.module_="RTCAudioPlayer",r.muted_=e.muted,r.outputDeviceId_="",r.volume_="number"==typeof(null==e?void 0:e.volume)?e.volume:.5,r.soundMeter_=null;return r}p(t,e);return u(t,[{key:"play",value:async function e(){return new Promise(((e,t)=>{let r,n=!0;var i;(r=this.playerDiv_?this.playerDiv_.querySelector("#audio_".concat(this.playerId_)):this.playerElement_,r)||(r=document.createElement("audio"),r.muted=this.muted_,r.setAttribute("id","audio_".concat(this.playerId_)),r.setAttribute("autoplay",""),r.setAttribute("playsinline",""),r.setAttribute("muted",""),null===(i=this.playerDiv_)||void 0===i||i.appendChild(r),n=!1);"sinkId"in HTMLMediaElement.prototype&&this.outputDeviceId_&&r.setSinkId(this.outputDeviceId_),0===this.mediaStream_.getAudioTracks().length&&this.mediaStream_.addTrack(this.track_),r.srcObject=this.mediaStream_,this.playerElement_=r,this.setVolume(this.volume_),this.handleEvents(),clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=setTimeout((()=>{this.log_.info(this.module_,"trigger audioCanPlay event by Timer"),this.event_.emit("audioCanPlay"),this.playTimeOutTimer&&(clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=setTimeout((()=>{this.log_.info(this.module_,"audio playing timeout"),clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=null,e(null)}),2e3))}),n?0:1e3),this.listenHandlers.playHandler&&this.event_.removeListener("audioCanPlay",this.listenHandlers.playHandler),this.listenHandlers.playHandler=this.doPlay.bind(this,e,t,{deviceId:this.outputDeviceId_,volume:this.volume_,muted:this.muted_}),this.event_.on("audioCanPlay",this.listenHandlers.playHandler)}))}},{key:"setSinkId",value:async function e(t){this.outputDeviceId_!==t&&(await this.playerElement_.setSinkId(t),this.outputDeviceId_=t)}},{key:"setVolume",value:function e(t){this.playerElement_.volume=t}},{key:"getAudioLevel",value:function e(){return this.soundMeter_||(this.soundMeter_=new IN,this.soundMeter_.connectToSource(this.track_)),this.soundMeter_.getVolume()}},{key:"stop",value:function e(){n(t,"stop",this,3)([]),this.soundMeter_&&(this.soundMeter_.stop(),this.soundMeter_=null)}},{key:"resume",value:async function e(){return n(t,"resume",this,3)([{streamId:this.playerId_,deviceId:this.outputDeviceId_,volume:this.volume_,muted:this.muted_}])}},{key:"replaceTrack",value:function e(r){n(t,"replaceTrack",this,3)([r]),this.soundMeter_&&(this.soundMeter_.stop(),this.soundMeter_=null)}},{key:"replayAudio",value:function e(){let t;this.log_.debug("".concat(this.module_,"#").concat(this.playerId_),"replay audio to handle media error"),t=this.playerDiv_?this.playerDiv_.querySelector("#audio_".concat(this.playerId_)):this.playerElement_,this.track_?(t.srcObject=new MediaStream([this.track_]),this.log_.info(this.module_,"replay audio success")):this.log_.error(this.module_,"replay audio failed: track is null or undefined")}}])}(RN);let kN=function(e){function t(e){var r;a(this,t);r=f(this,t,[{logger:e.logger,track:e.track,playerDiv:e.parentDiv,playerId:e.playerId}]),r.module_="RTCVideoPlayer",r.objectFit_=e.objectFit,r.mirror_=e.mirror;return r}p(t,e);return u(t,[{key:"play",value:async function e(){return new Promise(((e,t)=>{let r=this.playerDiv_.querySelector("#video_".concat(this.playerId_)),n=!0;if(!r){r=document.createElement("video"),r.muted=!0;let e="0";this.mirror_&&(e="180deg"),r.setAttribute("id","video_".concat(this.playerId_)),r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.transform="rotateY(".concat(e,")"),r.style["object-fit"]=this.objectFit_,r.setAttribute("autoplay",""),r.setAttribute("playsinline",""),r.setAttribute("muted",""),this.playerDiv_.appendChild(r),n=!1}0===this.mediaStream_.getVideoTracks().length&&this.mediaStream_.addTrack(this.track_),r.srcObject=this.mediaStream_,this.playerElement_=r,this.handleEvents(),clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=setTimeout((()=>{this.log_.info(this.module_,"trigger videoCanPlay event by Timer"),this.event_.emit("videoCanPlay"),this.playTimeOutTimer&&(clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=setTimeout((()=>{this.log_.info(this.module_,"video playing timeout"),clearTimeout(this.playTimeOutTimer),this.playTimeOutTimer=null,e(null)}),2e3))}),n?0:1e3),this.listenHandlers.playHandler&&this.event_.removeListener("videoCanPlay",this.listenHandlers.playHandler),this.listenHandlers.playHandler=this.doPlay.bind(this,e,t,{objectFit:this.objectFit_,mirror:this.mirror_}),this.event_.on("videoCanPlay",this.listenHandlers.playHandler)}))}},{key:"resume",value:async function e(){return n(t,"resume",this,3)([{streamId:this.playerId_,screentFit:this.objectFit_,mirror:this.mirror_}])}},{key:"getVideoFrame",value:function e(){const t=document.createElement("canvas");return t.width=this.playerElement_.videoWidth,t.height=this.playerElement_.videoHeight,t.getContext("2d").drawImage(this.playerElement_,0,0),t.toDataURL("image/png")}}])}(RN);const AN=SI.isSafari(),ON=(e,t)=>{SI.isSupportConstraints("aspectRatio")&&!AN&&(e.aspectRatio={ideal:t.width/t.height}),e.width=AN?{min:DP["90p_2"].width}:{min:DP["90p_2"].width,ideal:t.width},e.height=AN?{min:DP["90p_2"].height}:{min:DP["90p_2"].height,ideal:t.height},e.frameRate=t.frameRate};let PN=function(){function e(){a(this,e)}return u(e,null,[{key:"getOptimalVideoConstraint",value:function e(t,r){const n={},i=[];["user","environment","left","right"].includes(t)?n.facingMode={exact:t}:n.deviceId={exact:t};const o=[{width:r.width,height:r.height},{aspectRatio:r.width/r.height}];i.push(...o),ON(n,r),n.advanced=i;const a={};return a.video=n,a}},{key:"getSuboptimalVideoConstraint",value:function e(t,r){const n={};["user","environment","left","right"].includes(t)?n.facingMode={exact:t}:n.deviceId={exact:t},ON(n,r);const i={};return i.video=n,i}},{key:"getNextVideoConstraint",value:function e(t,r){const n={};["user","environment","left","right"].includes(t)?n.facingMode={exact:t}:n.deviceId={exact:t},ON(n,r);const i={};return i.video=n,i}},{key:"getWorstVideoConstraint",value:function e(t,r){const n={};["user","environment","left","right"].includes(t)?n.facingMode={ideal:t}:n.deviceId={ideal:t},ON(n,r);const i={};return i.video=n,i}},{key:"getRecoveryVideoConstraint",value:function e(){const t={video:!0};return t}},{key:"initScreenShareConstraint",value:function e(t,r){const n={};if(AN?(n.video={frameRate:r.frameRate},r.width&&(n.video.width={max:r.width}),r.height&&(n.video.height={max:r.height})):n.video={width:r.width||void 0,height:r.height||void 0,frameRate:r.frameRate},t){const e={sampleRate:MP.high.sampleRate,channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0};sL.isChrome()&&(e.googNoiseSuppression=!0,e.googAutoGainControl=!0,e.googAutoGainControl2=!0),n.audio=e}return n}},{key:"initAudioConstraint",value:function e(t,r){const n={},i={sampleRate:r.sampleRate,channelCount:r.channelCount,deviceId:t,echoCancellation:!0};return sL.isFirefox()&&t&&(i.deviceId={exact:t}),i.noiseSuppression=!0,i.autoGainControl=!0,sL.isChrome()&&(i.googNoiseSuppression=!0,i.googAutoGainControl=!0,i.googAutoGainControl2=!0),n.audio=i,n}}])}();var xN=function(e){return e[e.Stopped=0]="Stopped",e[e.Playing=1]="Playing",e[e.Closed=2]="Closed",e}(xN||{});const LN="HRTCTrack";let MN=function(){function e(t){a(this,e);this.log_=t.logger||AI.getLogger(),this.trackType_=t.trackType,this.streamType_=t.streamType,this.isRemote_=t.isRemote,this.resolutionId_=t.resolutionId,t.track?this.setLocalProfileByTrack(t.track):this.setTrackProfile(t.trackProfile),this.track_=t.track,this.playState_=xN.Closed,this.trackMuted_=!1,this.event_=t.event||new gN,this.trackType_===Qx.TRACK_TYPE_AUDIO?this.statusChangeReporter_=e=>{this.event_.emit(RP,{type:Qx.TRACK_TYPE_AUDIO,id:this.getResolutionId(),state:e.state,reason:e.reason})}:this.statusChangeReporter_=e=>{this.event_.emit(RP,{type:Qx.TRACK_TYPE_VIDEO,id:this.getResolutionId(),state:e.state,reason:e.reason})},this.statusTraceReporter_=e=>{this.event_.emit(OP,e)},this.errorReporter_=e=>{this.event_.emit(PP,e)}}return u(e,[{key:"initScreenShare",value:async function e(t){const r=PN.initScreenShareConstraint(t,this.profile_);this.log_.info(LN,"initScreenShare, screen constraints: ".concat(JSON.stringify(r)));const n=[],i={type:Qx.TRACK_TYPE_AUDIO},o={type:Qx.TRACK_TYPE_VIDEO};return new Promise((e=>{navigator.mediaDevices.getDisplayMedia(r).then((e=>{const r=e.getVideoTracks()[0];this.track_&&(this.track_.stop(),this.player_&&this.player_.replaceTrack(r)),this.track_=r,o.track=r,this.content=ex.desktop,r.onended=()=>{this.event_.emit(CP,this.trackId_||this.resolutionId_)},t&&(0===(e.getAudioTracks()||[]).length?this.log_.info(LN,"initScreenShare, cannot capture system output audio, pls make sure checked the share Audio option in share page"):i.track=e.getAudioTracks()[0])})).catch((e=>{this.log_.error(LN,"initScreenShare, getDisplayMedia failed, errMsg= ".concat(e)),i.error=this.handleCaptureError(e),o.error=i.error})).finally((()=>{n.push(i),n.push(o),e(n)}))}))}},{key:"initAudioCapture",value:async function e(t){const r=PN.initAudioConstraint(t,this.profile_);return await this.getUserMedia(r,Qx.TRACK_TYPE_AUDIO,ex.main)}},{key:"initVideoCapture",value:async function t(r,n){let i;return"environment"===r&&(r=await this.getBackCameraDeviceId()),this.log_.info(LN,"initVideoCapture, try getOptimalVideoConstraint"),i=await this.getUserMedia(PN.getOptimalVideoConstraint(r,this.profile_),Qx.TRACK_TYPE_VIDEO,n),e.isTrackAvailable(i.track)?i:(this.log_.info(LN,"initVideoCapture, try getSuboptimalVideoConstraint"),i=await this.getUserMedia(PN.getSuboptimalVideoConstraint(r,this.profile_),Qx.TRACK_TYPE_VIDEO,n),e.isTrackAvailable(i.track)?i:(this.log_.info(LN,"initVideoCapture, try getNextVideoConstraint"),i=await this.getUserMedia(PN.getNextVideoConstraint(r,this.profile_),Qx.TRACK_TYPE_VIDEO,n),e.isTrackAvailable(i.track)?i:(this.log_.info(LN,"initVideoCapture, try getWorstVideoConstraint"),i=await this.getUserMedia(PN.getWorstVideoConstraint(r,this.profile_),Qx.TRACK_TYPE_VIDEO,n),e.isTrackAvailable(i.track)?i:(this.log_.info(LN,"initVideoCapture, try getRecoveryVideoConstraint"),await this.getUserMedia(PN.getRecoveryVideoConstraint(),Qx.TRACK_TYPE_VIDEO,n)))))}},{key:"findBackMainCamera",value:async function e(t){this.log_.info(LN,"curTrack: ".concat(JSON.stringify(this.track_))),this.track_&&this.track_.stop();for(const e of t)try{const t=await navigator.mediaDevices.getUserMedia({video:{deviceId:e.deviceId}}),r=t.getVideoTracks()[0];if("environment"===r.getSettings().facingMode){for(const e of t.getTracks())e.stop();return e}for(const e of t.getTracks())e.stop()}catch(t){this.log_.error(LN,"findBackMainCamera error: ".concat(e.deviceId,", ").concat(t))}return null}},{key:"getBackCameraDeviceId",value:async function e(){let t,r="environment";const n=await rx(),i=SI.getSystemType();if("IOS"===i){for(const e of n)if(["back camera","后置相机"].includes(e.label.toLowerCase())){t=e;break}}else if("Android"===i&&n.length>0){n.reverse();const e=n.find((e=>e.label.indexOf("back")>0));if(e)t=e;else{const e=await this.findBackMainCamera(n);e&&(t=e)}}return t&&(r=t.deviceId,this.log_.info(LN,"trans environment to deviceId:".concat(r,", label:").concat(t.label))),r}},{key:"getUserMedia",value:async function e(t,r,n){const i={type:r};try{var o;null===(o=this.track_)||void 0===o||o.stop();const e=await navigator.mediaDevices.getUserMedia(t),a=r===Qx.TRACK_TYPE_VIDEO?e.getVideoTracks()[0]:e.getAudioTracks()[0];return await this.replaceTrack(a),i.track=this.track_,this.content=n,i.type===Qx.TRACK_TYPE_VIDEO&&this.setCameraCaptureReport(),i}catch(e){return i.error=this.handleCaptureError(e,r),i}}},{key:"setCameraCaptureReport",value:function e(){this.cameraCaptureHandleTimer&&clearInterval(this.cameraCaptureHandleTimer),this.cameraCaptureHandleTimer=setInterval((()=>{if(this.track_&&this.profile_){var e;const t=this.track_.getSettings(),r={width:this.profile_.width,height:this.profile_.height,frameRate:parseInt(null===(e=this.profile_.frameRate)||void 0===e?void 0:e.toString())||0};this.event_.emit(LP.CameraCapture,t,r)}}),2e3)}},{key:"clearCameraCaptureReport",value:function e(){this.cameraCaptureHandleTimer&&clearInterval(this.cameraCaptureHandleTimer)}},{key:"handleCaptureError",value:function e(t,r){if(/.*Malformed constraints.*/gi.test(t.message))return this.log_.warn(LN,"init ".concat(r||"screen","capture getUserMedia failed, handleCaptureError: ").concat(t)),null;const n=aL.handleCaptureErrorUtil(t);return this.log_.error(LN,"init ".concat(r||"screen","capture getUserMedia failed, handleCaptureError: ").concat(n)),n}},{key:"isClosed",value:function e(){return this.playState_===xN.Closed}},{key:"isPlaying",value:function e(){return this.playState_===xN.Playing}},{key:"getTrackType",value:function e(){return this.trackType_}},{key:"getResolutionId",value:function e(){return this.resolutionId_}},{key:"getTrackId",value:function e(){return this.trackId_}},{key:"getElementId",value:function e(){return this.elementId_}},{key:"getObjectFit",value:function e(){return this.objectFit_}},{key:"setTrackId",value:function e(t){this.trackId_=t}},{key:"getTrackProfile",value:function e(){return this.profile_}},{key:"setTrackContentType",value:function e(t){this.content=t}},{key:"getTrackContentType",value:function e(){return this.content||ex.main}},{key:"updateTrackProfile",value:function e(t){this.trackType_===Qx.TRACK_TYPE_VIDEO&&t&&(this.profile_.width=t.width,this.profile_.height=t.height)}},{key:"setTrackProfile",value:function e(t){this.log_.info(LN,"setTrackProfile begin,uniqueId_:".concat(this.resolutionId_,", ").concat(this.trackType_,",")+"".concat(this.streamType_,", profile:").concat(JSON.stringify(t))),this.trackType_!==Qx.TRACK_TYPE_AUDIO?this.trackType_!==Qx.TRACK_TYPE_VIDEO||this.streamType_!==qx.STREAM_TYPE_MAIN?this.trackType_===Qx.TRACK_TYPE_VIDEO&&this.streamType_===qx.STREAM_TYPE_AUX&&(this.profile_=aL.formatScreenProfile(t)):this.profile_=aL.formatVideoProfile(t):this.profile_=aL.formatAudioProfile(t)}},{key:"getTrack",value:function e(){return this.track_}},{key:"replaceTrack",value:async function e(t){var r;if(t){var n;if(null===(r=this.player_)||void 0===r||r.replaceTrack(t),!this.isRemote_)null===(n=this.track_)||void 0===n||n.stop();this.track_=t,this.track_.enabled=!this.trackMuted_,this.isRemote_||(this.setLocalProfileByTrack(t,this.profile_),this.playState_===xN.Playing&&await this.restart())}}},{key:"setLocalProfileByTrack",value:function e(t,r){this.profile_=aL.getLocalProfileByTrack(t,r),this.log_.info(LN,"setLocalProfileByTrack, this.profile_:".concat(JSON.stringify(this.profile_)))}},{key:"removeTrack",value:function e(){var t;(this.player_&&this.player_.stop(),this.isRemote_)||null===(t=this.track_)||void 0===t||t.stop();this.track_=null}},{key:"play",value:async function e(t,r,n){const i=this.getTrackType();if(this.log_.info(LN,"".concat(i," track begin play, elementId:").concat(r,", playerDiv.id:").concat(t.id,", options:").concat(JSON.stringify(n)," ")),this.playState_===xN.Playing)return this.log_.info(LN,"".concat(i," track is playing, return")),{trackType:i,error:null};if(!this.track_)return this.log_.error(LN,"".concat(i," track is empty")),{trackType:i,error:new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"".concat(i," track is empty"))};switch(this.elementId_=r,this.trackType_){case Qx.TRACK_TYPE_AUDIO:this.player_||(this.log_.info(LN,"create AudioPlayer"),this.player_=new CN({logger:this.log_,playerDiv:t,playerId:this.getTrackId()||this.getResolutionId(),track:this.track_,muted:n.muted,volume:this.audioVolume_}));break;case Qx.TRACK_TYPE_VIDEO:this.objectFit_=n.objectFit,this.player_||(this.log_.info(LN,"create VideoPlayer"),this.player_=new kN({logger:this.log_,parentDiv:t,playerId:this.getTrackId()||this.getResolutionId(),track:this.track_,objectFit:n.objectFit,mirror:n.mirror}))}this.player_.off(RP,this.statusChangeReporter_),this.player_.on(RP,this.statusChangeReporter_),this.player_.off(PP,this.errorReporter_),this.player_.on(PP,this.errorReporter_),this.player_.off(OP,this.statusTraceReporter_),this.player_.on(OP,this.statusTraceReporter_),this.log_.info(LN,"play ".concat(i," track start")),this.playState_=xN.Playing;try{return await this.player_.play(),{trackType:i,error:null}}catch(e){const t=e instanceof oc&&/.*timeout.*/i.test(e.getMsg());return this.log_[t?"warn":"error"](LN,"play ".concat(i," failed: ").concat(e)),this.playState_=xN.Stopped,{trackType:i,error:e}}}},{key:"replay",value:async function e(){if(!this.player_)return this.log_.info(LN,"".concat(this.getTrackType()," player is null")),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"".concat(this.getTrackType()," player is null"));this.player_.off(RP,this.statusChangeReporter_),this.player_.on(RP,this.statusChangeReporter_),this.player_.off(PP,this.errorReporter_),this.player_.on(PP,this.errorReporter_),this.player_.off(OP,this.statusTraceReporter_),this.player_.on(OP,this.statusTraceReporter_),this.log_.info(LN,"rePlay ".concat(this.getTrackType()," track start")),this.playState_=xN.Playing;try{return await this.player_.play(),null}catch(e){return this.log_.error(LN,"replay".concat(this.getTrackType(),", replay failed: ").concat(e)),this.playState_=xN.Stopped,e}}},{key:"stop",value:function e(){this.player_?(this.player_.off(RP,this.statusChangeReporter_),this.player_.off(PP,this.errorReporter_),this.player_.stop(),this.player_=null,this.playState_=xN.Stopped,this.trackMuted_=!1,this.log_.info(LN,"".concat(this.getTrackType()," stop player success"))):this.log_.info(LN,"".concat(this.getTrackType()," player is null"))}},{key:"close",value:function e(){var t;(this.stop(),this.isRemote_)||null===(t=this.track_)||void 0===t||t.stop();this.elementId_="",this.log_.info(LN,"".concat(this.getTrackType()," close success")),this.playState_=xN.Closed,this.clearCameraCaptureReport()}},{key:"resume",value:async function e(){if(!this.player_)return this.log_.info(LN,"".concat(this.getTrackType()," player is null")),null;try{return await this.player_.resume(),null}catch(e){return this.log_.error(LN,"".concat(this.getTrackType()," resume failed: ").concat(e)),e}}},{key:"restart",value:async function e(){this.player_&&(this.player_.stop(),await this.player_.play(),this.log_.info(LN,"restart success"))}},{key:"replayAudio",value:function e(){this.player_?(this.player_.replayAudio(),this.log_.info(LN,"replayAudio success")):this.log_.error(LN,"replayAudio failed: player is null or undefined")}},{key:"getTrackRealityMuted",value:function e(){return!this.track_||this.track_.muted}},{key:"getTrackMuted",value:function e(){return this.track_?!this.track_.enabled:this.trackMuted_}},{key:"muteTrack",value:function e(){this.track_&&(this.track_.enabled=!1),this.trackMuted_=!0}},{key:"unmuteTrack",value:function e(){this.track_&&(this.track_.enabled=!0),this.trackMuted_=!1}},{key:"setSinkId",value:async function e(t){this.trackType_===Qx.TRACK_TYPE_AUDIO&&this.player_&&await this.player_.setSinkId(t)}},{key:"setAudioVolume",value:function e(t){this.trackType_===Qx.TRACK_TYPE_AUDIO&&(this.audioVolume_=t/100,this.player_&&(this.player_.setVolume(this.audioVolume_),this.log_.info(LN,"setAudioVolume volume:".concat(this.audioVolume_))))}},{key:"getAudioLevel",value:function e(){return this.trackType_===Qx.TRACK_TYPE_AUDIO&&this.player_?this.player_.getAudioLevel():0}},{key:"getVideoFrame",value:function e(){return this.trackType_===Qx.TRACK_TYPE_VIDEO&&this.player_?this.player_.getVideoFrame():null}},{key:"setAudioOutput",value:function e(t){this.trackType_===Qx.TRACK_TYPE_AUDIO&&this.player_&&this.player_.setSinkId(t)}}],[{key:"isTrackAvailable",value:function e(t){return!!t&&t.enabled&&!t.muted&&"live"===t.readyState}}])}();const NN="AsyncLock";let DN=function(){function e(){a(this,e);o(this,"callback_",[]),this.callback_=[],this.logger=AI.getLogger()}return u(e,[{key:"lock",value:async function e(t){this.logger.info(NN,"".concat(t," try to get lock")),await new Promise((e=>{const r={callbackFunc:()=>e(),lockTrigger:"".concat(t)};this.callback_.push(r),1===this.callback_.length&&(this.callback_[0].callbackFunc(),this.logger.info(NN,"".concat(this.callback_[0].lockTrigger," got lock")))}))}},{key:"unlock",value:function e(t){if(this.logger.info(NN,"".concat(t," try to unlock")),this.callback_.length>0){const e=this.callback_.shift();this.logger.info(NN,"".concat(e.lockTrigger," unlocked")),this.callback_.length>0&&(this.callback_[0].callbackFunc(),this.logger.info(NN,"".concat(this.callback_[0].lockTrigger," got lock")))}else this.logger.error(NN,"unlock, but no lock exist")}},{key:"clear",value:function e(){for(;this.callback_.length>0;)this.unlock(this.callback_[0].lockTrigger)}}])}();const jN=new DN;function UN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function VN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?UN(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UN(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const WN=["userId"],BN=["signature"];function GN(e){return(t,r,n)=>{const i=n.value;return VN(VN({},n),{},{async value(){const t=this.locker||jN;try{var n,o;null===(n=this.log)||void 0===n||n.info(e,"function ".concat(r," is wating for lock. ")),await t.lock(e),null===(o=this.log)||void 0===o||o.info(e,"function ".concat(r," get a lock. "));for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return await i.apply(this,s)}finally{var c;null===(c=this.log)||void 0===c||c.info(e,"function ".concat(r," release a lock. ")),t.unlock(e)}}})}}function ZN(e){return(t,r,n)=>{const i=n.value,o=e.substr(0,e.indexOf("$"));return VN(VN({},n),{},{async value(){let t,r;const n=SI.getCurrentTimestamp();for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];const c=s||[],l=HN(c);XN(l);try{var f,d;null===(f=this.logger)||void 0===f||f.info(o,"".concat(i.name," async begin : parameters are ").concat(YN(l))),t=await i.apply(this,c);const e=null!=t?HN([t]):[];return null===(d=this.logger)||void 0===d||d.info(o,"".concat(i.name," async end success : result is ").concat(JSON.stringify(e))),t}catch(e){var h;throw null===(h=this.logger)||void 0===h||h.error(o,"".concat(i.name," async end error : ").concat(e)),r=e,e}finally{var p;const i=SI.getCurrentTimestamp(),o=HN(this.getStatExtraInfo?[t,...c,this.getStatExtraInfo()]:[t,...c]);null===(p=this.stat)||void 0===p||p.setApiCallInfo(e,n,i,r,...o)}}})}}function FN(e){return(t,r,n)=>{const i=n.value,o=e.substr(0,e.indexOf("$"));return VN(VN({},n),{},{value(){let t,r;const n=SI.getCurrentTimestamp();for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];const c=s||[],l=HN(c);XN(l);try{var f,d;null===(f=this.logger)||void 0===f||f.info(o,"".concat(i.name," begin : parameters are ").concat(YN(l))),r=i.apply(this,c);const e=null!=r?HN([r]):[];return null===(d=this.logger)||void 0===d||d.info(o,"".concat(i.name," end success : result is ").concat(JSON.stringify(e))),r}catch(e){var h;throw null===(h=this.logger)||void 0===h||h.error(o,"".concat(i.name," end error : ").concat(e)),t=e,e}finally{var p;const i=SI.getCurrentTimestamp(),o=HN(this.getStatExtraInfo?[r,...c,this.getStatExtraInfo()]:[r,...c]);null===(p=this.stat)||void 0===p||p.setApiCallInfo(e,n,i,t,...o)}}})}}function HN(e){try{return e.map((e=>["object","function"].includes(typeof e)?e.getStatInfo?e.getStatInfo():e.getInfo?e.getInfo():e:e))}catch(t){return e}}function XN(e){e&&0!==e.length&&e.forEach((e=>{e&&(Array.isArray(e)?XN(e):WN.forEach((t=>AI.addPrivacyString(e[t]))))}))}function YN(e){return JSON.stringify(e,((e,t)=>{if(!BN.includes(e))return t}))}let KN=function(){function e(){a(this,e)}return u(e,null,[{key:"callAsyncApi",value:async function t(r,n,i,o){let a,s;const u=SI.getCurrentTimestamp(),c=i||[];try{return s=await n.call(r,...c),s}catch(e){throw a=e,e}finally{const t=SI.getCurrentTimestamp(),n=e.doFinalParam([s,...c,r]);r.stat.setApiCallInfo(o,u,t,a,...n)}}},{key:"doFinalParam",value:function e(t){return t.map((e=>["object","function"].includes(typeof e)&&e.getStatInfo?e.getStatInfo():e))}},{key:"callApi",value:function t(r,n,i,o){let a,s;const u=SI.getCurrentTimestamp(),c=i||[];try{return s=n.call(r,...c),s}catch(e){throw a=e,e}finally{const t=SI.getCurrentTimestamp(),n=e.doFinalParam([s,...c,r]);r.stat.setApiCallInfo(o,u,t,a,...n)}}},{key:"callWithTimeout",value:function e(t,r){let n;const i=new oc(nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT),o=new Promise(((e,t)=>{n=t}));let a=null;return r&&(a=setTimeout((()=>{a&&clearTimeout(a),n(i)}),r)),Promise.race([t.finally((()=>{a&&clearTimeout(a)})),o])}},{key:"callWithRetryTimes",value:async function e(t,r,n,i,o){let a=n>=0?n+1:-1,s=1,u=!1;for(;-1===a||a;){let e,c;try{c=await t(s)}catch(r){e=r,u=o&&o(e),console.warn("FunctionUtil","callWithRetryTimes, func:".concat(t.name,", isInterrupted:").concat(u,",")+"retryTimes:".concat(n,", left times:").concat(-1===a?-1:a-1,", tryNumber:").concat(s,", err: ").concat(e))}finally{if(!((e||!e&&r)&&!u&&(-1===a||--a>0))){if(!e)return c;throw e}{const t="number"==typeof i?i:i(e);await SI.sleep(t),s++}}}}}])}();let zN=function(){function e(t){a(this,e);"boolean"!=typeof t?this.eventEmitter_=t:t&&(this.eventEmitter_=new gN)}return u(e,[{key:"on",value:function e(t,r){this.eventEmitter.on(t,r)}},{key:"off",value:function e(t,r){r?this.eventEmitter.removeListener(t,r):this.eventEmitter.removeAllListeners(t)}},{key:"emit",value:function e(t,r){this.eventEmitter.emit(t,r)}},{key:"eventEmitter",get:function(){return this.eventEmitter_},set:function(e){this.eventEmitter_=e}}])}();let JN=function(){function e(t,r){a(this,e);"boolean"!=typeof t?this.logger_=t:t&&(this.logger_=AI.getLogger(r))}return u(e,[{key:"logger",get:function(){return this.logger_},set:function(e){this.logger_=e}}])}();let QN=function(){function e(t,r){a(this,e);"boolean"!=typeof t?this.stat_=t:t&&(this.stat_="boolean"!=typeof r?new nN(AI.getLogger(),r):new nN(AI.getLogger()))}return u(e,[{key:"stat",get:function(){return this.stat_},set:function(e){this.stat_=e}}])}();var qN,$N,eD,tD,rD,nD,iD,oD,aD,sD,uD,cD,lD,fD,dD,hD,pD,vD,mD,yD,gD,bD,_D,SD,ED,wD,TD,ID,RD,CD,kD,AD,OD,PD,xD=new(function(){function e(){a(this,e);this.gen=(()=>{let e=0;return()=>e++})()}return u(e,[{key:"getSequence",value:function e(){return this.gen()}}])}());let LD=function(){function e(){a(this,e);let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitter:!1,logger:!1,stat:!1,config:!1},r=arguments.length>1?arguments[1]:void 0;o(this,"onCallbackMap_",new Map),this.identifiedID_=r||Symbol("identifiedID_".concat(xD.getSequence())),!1!==t.emitter&&(this.emitterAble_=new zN(t.emitter)),!1!==t.logger&&(this.loggerAble_=new JN(t.logger,this.identifiedID_)),!1!==t.stat&&(this.statisticAble_=new QN(t.stat,t.config))}return u(e,[{key:"on",value:function e(t,r,n){var i;n?this.onWithTimeout(t,r):null===(i=this.emitterAble_)||void 0===i||i.on(t,r)}},{key:"off",value:function e(t,r,n){var i;n?this.offWithTimeout(t,r):null===(i=this.emitterAble_)||void 0===i||i.off(t,r)}},{key:"emit",value:function e(t,r){var n;null===(n=this.emitterAble_)||void 0===n||n.emit(t,r)}},{key:"onWithTimeout",value:function e(t,r){var n;const i=this.getOnCallback(t,r);null===(n=this.emitterAble_)||void 0===n||n.on(t,i)}},{key:"offWithTimeout",value:function e(t,r){var n;null===(n=this.emitterAble_)||void 0===n||n.off(t,this.getOffCallback(t,r)||r)}},{key:"getOnCallback",value:function e(t,r){const n=async e=>{const n=SI.getCurrentTimestamp();let i;try{await KN.callWithTimeout(Promise.resolve(await r&&r(e)),1e4),i=SI.getCurrentTimestamp()}catch(e){i=n+5e3}finally{var o,a;null===(o=this.stat)||void 0===o||o.recordCallbackInfo(t.toString(),null===(a=this.getInfo())||void 0===a?void 0:a.moduleName,n,i,e,(e=>["object","function"].includes(typeof e)&&e.getStatInfo?JSON.stringify(e.getStatInfo()):JSON.stringify(e||{})))}},i=this.onCallbackMap_.get(t)||[];return i.push({func:r,callbackFun:n}),this.onCallbackMap_.set(t,i),n}},{key:"getOffCallback",value:function e(t,r){const n=this.onCallbackMap_.get(t)||[],i=n.findIndex((e=>e.func===r));if(i>-1){var o;const e=null===(o=n[i])||void 0===o?void 0:o.callbackFun;return n.splice(i,1),e}return null}},{key:"stat",get:function(){var e;return null===(e=this.statisticAble_)||void 0===e?void 0:e.stat}},{key:"logger",get:function(){var e;return null===(e=this.loggerAble_)||void 0===e?void 0:e.logger}},{key:"eventEmitter",get:function(){if(!this.emitterAble_||!this.emitterAble_.eventEmitter)throw new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);return this.emitterAble_.eventEmitter}},{key:"identifiedID",get:function(){return this.identifiedID_}},{key:"getStatInfo",value:function e(){}}])}();let MD=function(e){function t(e,r,n){var i;a(this,t);i=f(this,t,[e,r]),i.captureResults=n;return i}p(t,e);return u(t,[{key:"getMediaCaptureResult",value:function e(){return this.captureResults}},{key:"getMediaCaptureResultByType",value:function e(t){var r;return null===(r=this.captureResults)||void 0===r?void 0:r.find((e=>e.type===t))}},{key:"toString",value:function e(){return'["code": '.concat(this.code,', "message": "').concat(this.message," : ").concat(JSON.stringify(this.captureResults),'"]')}}])}(oc);let ND=(qN=FN("Stream$getStreamInfo#StreamInfo"),$N=ZN("Stream$play#Promise<void>#string#{ objectFit?: string; muted: boolean; resolutionId?: string; playerElementHidden?: boolean }#string"),eD=FN("Stream$stop#void#StreamOption"),tD=ZN("Stream$resume#Promise<void>#StreamOption"),rD=FN("Stream$close#void#StreamOption"),nD=FN("Stream$replayAudio#void"),iD=FN("Stream$muteAudio#boolean"),oD=FN("Stream$muteVideo#boolean"),aD=FN("Stream$unmuteAudio#boolean"),sD=FN("Stream$unmuteVideo#boolean"),uD=ZN("Stream$setAudioOutput#Promise<void>#string"),cD=FN("Stream$setAudioVolume#void#number"),lD=FN("Stream$getVideoSnapshot#string#string#string#number"),fD=function(e){function t(e){var r;a(this,t);r=f(this,t,[{emitter:!0,logger:e.log||!0,stat:!0}]),o(h(r),"module_","Stream"),r.isRemote_=e.isRemote,r.id_=SI.generateStreamId(),r.type_=e.type,r.isAuxiliary_="auxiliary"===e.type,r.tracks={video:new Map,audio:new Map},r.playDivContainers=new Map,r.traceHandler=r.playerStatusTrace.bind(h(r));return r}p(t,e);return u(t,[{key:"getStreamInfo",value:function e(){return this.getStreamInfoImpl()}},{key:"getStreamInfoImpl",value:function e(){const t={videoProfiles:[]};for(const[e,r]of this.tracks[Qx.TRACK_TYPE_VIDEO])if(r.getTrackType()===Qx.TRACK_TYPE_VIDEO){const n={resolutionId:e,hasTrack:!!r.getTrack(),width:r.getTrackProfile().width,height:r.getTrackProfile().height,frameRate:r.getTrackProfile().frameRate,minBitrate:r.getTrackProfile().minBitrate,maxBitrate:r.getTrackProfile().maxBitrate};t.videoProfiles.push(n)}const r=this.getAnyAudioHRTCTrack();return r&&(t.audioProfile={sampleRate:r.getTrackProfile().sampleRate,channelCount:r.getTrackProfile().channelCount,bitrate:r.getTrackProfile().bitrate,resolutionId:r.getResolutionId()}),this.logger.info(this.module_,"getStreamInfoImpl success: ".concat(JSON.stringify(t))),t}},{key:"getMaxResolutionHRTCTrack",value:function e(t){let r;const n=Array.from(this.tracks[Qx.TRACK_TYPE_VIDEO].values()),i=t?n:n.filter((e=>e.getTrack()));for(const e of i)r?r&&Math.max(e.getTrackProfile().width,e.getTrackProfile().height)-Math.max(r.getTrackProfile().width,r.getTrackProfile().height)>0&&(r=e):r=e;return r}},{key:"getMaxResolutionProfile",value:function e(t){if(0===t.size)return null;let r,n;for(const[e,i]of t)r?Math.max(i.width,i.height)-Math.max(r.width,r.height)>0&&(r=i,n=e):(r=i,n=e);return r?{resolutionId:n,width:r.width,height:r.height,frameRate:r.frameRate,minBitrate:r.minBitrate,maxBitrate:r.maxBitrate}:null}},{key:"getHRTCTracks",value:function e(t){const r=[],n=Array.from(this.tracks[Qx.TRACK_TYPE_AUDIO].values()),i=Array.from(this.tracks[Qx.TRACK_TYPE_VIDEO].values());if(!t)return[...n,...i];const o=void 0===t.hasTrack?n:n.filter((e=>!!e.getTrack()===t.hasTrack)),a=void 0===t.hasTrack?i:i.filter((e=>!!e.getTrack()===t.hasTrack));return t.mediaType?t.mediaType===Qx.TRACK_TYPE_VIDEO?r.push(...a):r.push(...o):(r.push(...o),r.push(...a)),r}},{key:"getHRTCTrackIds",value:function e(t){const r=[];for(const e of this.getHRTCTracks(t))r.push(e.getTrackId());return r}},{key:"getAnyVideoHRTCTrack",value:function e(t){let r;return r=t?this.tracks[Qx.TRACK_TYPE_VIDEO].get(t):this.getMaxResolutionHRTCTrack(!0),r}},{key:"getVideoHRTCTrack",value:function e(t){var r;let n;return n=t?this.tracks[Qx.TRACK_TYPE_VIDEO].get(t):this.getMaxResolutionHRTCTrack(),null!==(r=n)&&void 0!==r&&r.getTrack()?n:null}},{key:"getAnyAudioHRTCTrack",value:function e(){return this.isAuxiliary_?this.tracks[Qx.TRACK_TYPE_AUDIO].get("auxAudio"):this.tracks[Qx.TRACK_TYPE_AUDIO].get("mainAudio")}},{key:"getUninitializedAudioHRTCTrack",value:function e(){const t=this.getAnyAudioHRTCTrack();return null!=t&&t.getTrack()?null:t}},{key:"getUninitializedVideoHRTCTrack",value:function e(t){var r;let n;return n=t?this.tracks[Qx.TRACK_TYPE_VIDEO].get(t):this.getMaxResolutionHRTCTrack(!0),null!==(r=n)&&void 0!==r&&r.getTrack()?null:n}},{key:"getAudioHRTCTrack",value:function e(){const t=this.getAnyAudioHRTCTrack();return null!=t&&t.getTrack()?t:null}},{key:"getUniqueId",value:function e(){return this.id_}},{key:"getInfo",value:function e(){return{moduleName:"Stream",appId:"",roomId:"",userName:"",userId:"",domain:""}}},{key:"startupPlay",value:function e(t,r){this.client_.forEach((e=>{e.startupQoSReportPlay(t,r)}))}},{key:"play",value:async function e(t,r){const n=SI.getCurrentTimestamp();this.startupPlay(this.getUniqueId(),n),await this.playImpl(t,r)}},{key:"playImpl",value:async function e(t,r){let n;if(null!=r&&r.objectFit){if(!/^cover|contain|fill$/.test(r.objectFit))throw this.logger.error(this.module_,"invalid play options.objectFit: ".concat(r.objectFit)),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid play options.objectFit: ".concat(r.objectFit));n=r.objectFit}else n=this.isRemote_&&"auxiliary"===this.getType()?"contain":"cover";const i=!(null==r||!r.muted);if(this.logger.info(this.module_,"stream start to play with elementId: ".concat(t,", options.objectFit: ").concat(n,",options.muted: ").concat(i," resolutionId:").concat(null==r?void 0:r.resolutionId)),!t)throw this.logger.error(this.module_,"elementId:".concat(t," not a invalid HTMLElement Id")),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"elementId:".concat(t," not a invalid HTMLElement Id"));const o=document.getElementById(t);if(!o)throw this.logger.error(this.module_,"document.getElementById by elementId:".concat(t," failed")),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"document.getElementById by elementId:".concat(t," failed"));let a;const s=null!=r&&r.resolutionId?this.getVideoHRTCTrack(r.resolutionId):this.getMaxResolutionHRTCTrack(),u=s?s.getResolutionId():this.id_,c=this.playDivContainers.get(t);if(c){var l;a=c.HTMLElement,o.querySelector("#".concat(a.id))||o.appendChild(a),this.logger.info(this.module_,"get exist player div, key:".concat(t,", div: ").concat(null===(l=c.HTMLElement)||void 0===l?void 0:l.id))}else{a=document.createElement("div"),a.setAttribute("id","player_".concat(u)),a.style.width="100%",a.style.height="100%",a.style.position="relative",a.style.overflow="hidden",a.style["background-color"]="#000",o.appendChild(a);const e={HTMLElement:a,hasVideoTrack:!1,hasAudioTrack:!1};this.playDivContainers.set(t,e),this.logger.info(this.module_,"new player div, key:".concat(t,", div: ").concat(a.id))}a.style.display=null!=r&&r.playerElementHidden?"none":"block",await this.playTracks(t,a,n,i,null==r?void 0:r.resolutionId)}},{key:"reportCanPlay",value:function e(t){this.client_.forEach((e=>{e.startupQoSReportCanPlay(t)}))}},{key:"playerStatusTrace",value:function e(t){this.logger.debug(this.module_,"playerStatusTrace, ".concat(JSON.stringify(t))),null!=t&&t.event&&"playerCanplay"===t.event&&(t.id=this.getUniqueId(),this.reportCanPlay(t))}},{key:"playTracks",value:async function e(t,r,n,i,o){const a=[],s=this.isAuxiliary_?null:this.getAudioHRTCTrack(),u=o?this.getVideoHRTCTrack(o):this.getMaxResolutionHRTCTrack();null!=u&&u.getTrack()&&a.push(u.play(r,t,{objectFit:n,mirror:this.mirror_})),null!=s&&s.getTrack()&&a.push(s.play(r,t,{muted:i})),0!==a.length?(this.off(OP,this.traceHandler),this.on(OP,this.traceHandler),await Promise.all(a).then((e=>{const n=e.filter((e=>null!==e.error));n.length===a.length&&r&&r.remove();const i=e.filter((e=>null===e.error)),o=null==i?void 0:i.some((e=>e.trackType===Qx.TRACK_TYPE_AUDIO)),s=null==i?void 0:i.some((e=>e.trackType===Qx.TRACK_TYPE_VIDEO));if(this.playDivContainers.has(t)&&this.playDivContainers.set(t,{HTMLElement:r,hasAudioTrack:o,hasVideoTrack:s}),n.length>0)throw n[0].error}))):this.logger.warn(this.module_,"no available track for play")}},{key:"stop",value:function e(t){this.stopImpl(t)}},{key:"stopImpl",value:function e(t){var r;this.logger.info(this.module_,"stopImpl begin, option:".concat(JSON.stringify(t)));const n=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}),i=[];var o;(!t||t.video&&!t.resolutionIds?i.push(...n):t.video&&null!==(r=t.resolutionIds)&&void 0!==r&&r.length&&t.resolutionIds.forEach((e=>{const t=this.getVideoHRTCTrack(e);t&&i.push(t)})),i.forEach((e=>{e.stop()})),!t||t.audio)&&(null===(o=this.getAudioHRTCTrack())||void 0===o||o.stop())}},{key:"resume",value:async function e(t){await this.resumeImpl(t)}},{key:"resumeImpl",value:async function e(t){var r;this.logger.info(this.module_,"resumeImpl begin, option:".concat(JSON.stringify(t)));const n=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}),i=[];!t||t.video&&!t.resolutionIds?i.push(...n):t.video&&null!==(r=t.resolutionIds)&&void 0!==r&&r.length&&t.resolutionIds.forEach((e=>{const t=this.getVideoHRTCTrack(e);t&&i.push(t)}));const o=[];if(i.forEach((e=>{o.push(e.resume())})),!t||t.audio){const e=this.getAudioHRTCTrack();e&&o.push(e.resume())}await Promise.all(o)}},{key:"close",value:function e(t){this.closeImpl(t)}},{key:"closeImpl",value:function e(t){if(this.logger.info(this.module_,"closeImpl begin, options:".concat(JSON.stringify(t))),this.client_=[],!t||t.video&&!t.resolutionIds&&t.audio){for(const e of this.getHRTCTracks({hasTrack:!0}))e.close();for(const e of this.playDivContainers.values())e.HTMLElement&&e.HTMLElement.remove();return this.playDivContainers.clear(),void uN.removeEventEmitter(this.eventEmitter)}if(t.video){var r;const e=[];if(null!==(r=t.resolutionIds)&&void 0!==r&&r.length)t.resolutionIds.forEach((t=>{const r=this.getVideoHRTCTrack(t);r&&e.push(r)}));else{const t=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO});e.push(...t)}e.forEach((e=>{const t=null==e?void 0:e.getElementId();if(e.close(),t){const e=this.playDivContainers.get(t);var r,n,i;if(e)if(e.hasVideoTrack=!1,this.logger.debug(this.module_,"closeImpl, elementId:".concat(t,", divInfo: ").concat(null===(r=e.HTMLElement)||void 0===r?void 0:r.id,", hasAudioTrack: ").concat(e.hasAudioTrack,", hasVideoTrack: ").concat(e.hasVideoTrack,"}")),!e.hasAudioTrack)null===(n=this.playDivContainers.get(t))||void 0===n||null===(i=n.HTMLElement)||void 0===i||i.remove(),this.playDivContainers.delete(t),this.logger.info(this.module_,"closeImpl, release elementId: ".concat(t))}}))}t.audio&&this.closeAudio();this.getHRTCTracks({hasTrack:!0}).every((e=>e.isClosed()))&&(uN.removeEventEmitter(this.eventEmitter),this.mediaStream=null)}},{key:"closeAudio",value:function e(){const t=this.getAudioHRTCTrack();if(t){const e=t.getElementId();if(t.close(),e){const t=this.playDivContainers.get(e);var r,n,i;if(t)if(t.hasAudioTrack=!1,this.logger.debug(this.module_,"closeAudio, elementId:".concat(e,", divInfo: ").concat(null===(r=t.HTMLElement)||void 0===r?void 0:r.id,", hasAudioTrack: ").concat(t.hasAudioTrack,", hasVideoTrack: ").concat(t.hasVideoTrack,"}")),!t.hasVideoTrack)null===(n=this.playDivContainers.get(e))||void 0===n||null===(i=n.HTMLElement)||void 0===i||i.remove(),this.playDivContainers.delete(e),this.logger.info(this.module_,"closeAudio, release elementId: ".concat(e))}}}},{key:"replayAudio",value:function e(){this.replayAudioImpl()}},{key:"replayAudioImpl",value:function e(){var t;null===(t=this.getAudioHRTCTrack())||void 0===t||t.replayAudio()}},{key:"muteAudio",value:function e(){return this.muteAudioImpl()}},{key:"muteAudioImpl",value:function e(){try{const e=this.getAudioHRTCTrack();return!!e&&(e.muteTrack(),!0)}catch(e){return this.logger.error(this.module_,"muteAudio failed: ".concat(e)),!1}}},{key:"muteVideo",value:function e(){return this.muteVideoImpl()}},{key:"muteVideoImpl",value:function e(){try{if(!this.hasVideoTrack())return!1;for(const e of this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}))e.muteTrack();return!0}catch(e){return this.logger.error(this.module_,"muteVideo failed: ".concat(e)),!1}}},{key:"unmuteAudio",value:function e(){return this.unmuteAudioImpl()}},{key:"unmuteAudioImpl",value:function e(){try{const e=this.getAudioHRTCTrack();return!!e&&(e.unmuteTrack(),!0)}catch(e){return this.logger.error(this.module_,"unmuteAudio failed: ".concat(e)),!1}}},{key:"unmuteVideo",value:function e(){return this.unmuteVideoImpl()}},{key:"unmuteVideoImpl",value:function e(){try{if(!this.hasVideoTrack())return!1;for(const e of this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}))e.unmuteTrack();return!0}catch(e){return this.logger.error(this.module_,"unmuteVideo failed: ".concat(e)),!1}}},{key:"getId",value:function e(){var t;return null===(t=this.getMaxResolutionHRTCTrack(!0))||void 0===t?void 0:t.getTrackId()}},{key:"getUserId",value:function e(){return this.userId_}},{key:"getType",value:function e(){return this.type_}},{key:"setAudioOutput",value:async function e(t){return this.setAudioOutputImpl(t)}},{key:"setAudioOutputImpl",value:async function e(t){try{const e=this.getAudioHRTCTrack();e&&await e.setSinkId(t),this.stat.reportSwitchDevicesInfo(_x.OUTPUT_AUDIO,t,Nx.SUCCESS)}catch(e){throw this.stat.reportSwitchDevicesInfo(_x.OUTPUT_AUDIO,t,Nx.FAIL),e}}},{key:"setAudioVolume",value:function e(t){this.setAudioVolumeImpl(t)}},{key:"setAudioVolumeImpl",value:function e(t){const r=this.getAudioHRTCTrack();r&&r.setAudioVolume(t)}},{key:"getAudioLevel",value:function e(){const t=this.getAudioHRTCTrack();return t?t.getAudioLevel():0}},{key:"hasAudioTrack",value:function e(){return!!this.getAudioHRTCTrack()}},{key:"hasVideoTrack",value:function e(){return Array.from(this.tracks[Qx.TRACK_TYPE_VIDEO].values()).filter((e=>e.getTrack())).length>0}},{key:"isAuxiliary",value:function e(){return this.isAuxiliary_}},{key:"getAudioTrack",value:function e(){const t=this.getAudioHRTCTrack();return t?t.getTrack():null}},{key:"getVideoTrack",value:function e(t){const r=this.getVideoHRTCTrack(t);return r?r.getTrack():null}},{key:"getVideoFrame",value:function e(t){const r=this.getVideoHRTCTrack(t);return r?r.getVideoFrame():null}},{key:"on",value:function e(r,i){n(t,"on",this,3)([r,i,-1===xP.indexOf(r.toString())])}},{key:"off",value:function e(r,i){n(t,"off",this,3)([r,i,-1===xP.indexOf(r.toString())])}},{key:"restart",value:async function e(t){var r;if(t)return void await(null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.restart());const n=[];for(const e of this.getHRTCTracks({hasTrack:!0}))n.push(e.restart());await Promise.all(n)}},{key:"rePlayAudio",value:async function e(){const t=this.getAudioHRTCTrack();t&&!t.isPlaying()&&await t.replay()}},{key:"getStatInfo",value:function e(){return{isRemote_:this.isRemote_,type_:this.type_,userId_:this.userId_,id_:this.id_,isAuxiliary_:this.isAuxiliary_}}},{key:"getStatExtraInfo",value:function e(){return{isRemote:this.isRemote_,id:this.id_,userId:this.userId_}}},{key:"hasAudio",value:function e(){var t;const r=!!(null===(t=this.getAudioHRTCTrack())||void 0===t?void 0:t.getTrack());return this.logger.debug(this.module_,"hasAudio: ".concat(r)),r}},{key:"hasVideo",value:function e(){const t=this.hasVideoTrack();return this.logger.debug(this.module_,"hasVideo: ".concat(t)),t}},{key:"getVideoSnapshot",value:function e(t,r,n){var i;let o;this.logger.info(this.module_,"streamType:".concat(this.getType())),o=t?this.getVideoHRTCTrack(t):this.getMaxResolutionHRTCTrack();const a=null===(i=o)||void 0===i?void 0:i.getElementId();if(a){const e=this.playDivContainers.get(a).HTMLElement.querySelector("video"),t=document.createElement("canvas");let i;t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d").drawImage(e,0,0),(n=Number(n))>=0&&n<=1?i=n:(i=1,this.logger.warn(this.module_,"encoderOptions invalid, use default value: 1"));let o="";o="jpeg"===r?t.toDataURL("image/jpeg",i):"webp"===r?t.toDataURL("image/webp",i):t.toDataURL("image/png");const s=o.split(";base64,"),u=s[0].split(":")[1],c=window.atob(s[1]),l=c.length,f=new Uint8Array(l);for(let e=0;e<l;++e)f[e]=c.charCodeAt(e);return URL.createObjectURL(new Blob([f],{type:u}))}return this.logger.warn(this.module_,"this elementId is not exist"),""}}])}(LD),s(fD.prototype,"getStreamInfo",[qN],Object.getOwnPropertyDescriptor(fD.prototype,"getStreamInfo"),fD.prototype),s(fD.prototype,"play",[$N],Object.getOwnPropertyDescriptor(fD.prototype,"play"),fD.prototype),s(fD.prototype,"stop",[eD],Object.getOwnPropertyDescriptor(fD.prototype,"stop"),fD.prototype),s(fD.prototype,"resume",[tD],Object.getOwnPropertyDescriptor(fD.prototype,"resume"),fD.prototype),s(fD.prototype,"close",[rD],Object.getOwnPropertyDescriptor(fD.prototype,"close"),fD.prototype),s(fD.prototype,"replayAudio",[nD],Object.getOwnPropertyDescriptor(fD.prototype,"replayAudio"),fD.prototype),s(fD.prototype,"muteAudio",[iD],Object.getOwnPropertyDescriptor(fD.prototype,"muteAudio"),fD.prototype),s(fD.prototype,"muteVideo",[oD],Object.getOwnPropertyDescriptor(fD.prototype,"muteVideo"),fD.prototype),s(fD.prototype,"unmuteAudio",[aD],Object.getOwnPropertyDescriptor(fD.prototype,"unmuteAudio"),fD.prototype),s(fD.prototype,"unmuteVideo",[sD],Object.getOwnPropertyDescriptor(fD.prototype,"unmuteVideo"),fD.prototype),s(fD.prototype,"setAudioOutput",[uD],Object.getOwnPropertyDescriptor(fD.prototype,"setAudioOutput"),fD.prototype),s(fD.prototype,"setAudioVolume",[cD],Object.getOwnPropertyDescriptor(fD.prototype,"setAudioVolume"),fD.prototype),s(fD.prototype,"getVideoSnapshot",[lD],Object.getOwnPropertyDescriptor(fD.prototype,"getVideoSnapshot"),fD.prototype),fD),DD=(dD=ZN("LocalStream$initialize#Promise<StreamInitializeResult>"),hD=ZN("LocalStream$addAudioTrackCapture#Promise<MediaStreamTrack>#string"),pD=ZN("LocalStream$addVideoTrackCapture#Promise<MediaStreamTrack>#VideoCaptureOption"),vD=FN("LocalStream$setAudioProfile#void#string|RTCAudioProfile"),mD=ZN("LocalStream$setVideoProfile#void#string|RTCVideoProfile"),yD=ZN("LocalStream$addResolution#Promise<RTCVideoProfileInfo>#string|RTCVideoProfile#boolean"),gD=ZN("LocalStream$removeResolution#Promise<void>#string"),bD=FN("LocalStream$setScreenProfile#void#string|RTCScreenProfile"),_D=ZN("LocalStream$switchDevice#Promise<void>#string#string"),SD=ZN("LocalStream$addTrack#Promise<void>#MediaStreamTrack#string"),ED=ZN("LocalStream$removeTrack#Promise<void>#MediaStreamTrack#string"),wD=ZN("LocalStream$replaceTrack#Promise<void>#MediaStreamTrack#string#string"),TD=FN("LocalStream$bindScreenAudio2RelatedStream#void#LocalStream#boolean"),ID=ZN("LocalStream$startAudioMixing#Promise<void>#AudioMixOption"),RD=ZN("LocalStream$stopAudioMixing#Promise<void>"),CD=FN("LocalStream$pauseAudioMixing#void"),kD=FN("LocalStream$resumeAudioMixing#void"),AD=FN("LocalStream$setAudioMixingVolume#void#number"),OD=FN("LocalStream$setAudioMixingPosition#void#number"),PD=function(e){function t(e){var r;a(this,t);r=f(this,t,[{isRemote:!1,type:"local",log:null}]),r.module_="LocalStream",r.userId_=e.userId,r.audio_=e.audio,r.microphoneId_=e.microphoneId,r.video_=e.video,r.cameraId_=e.cameraId,r.facingMode_=e.facingMode,r.screen_=e.screen,r.isAuxiliary_=!!r.screen_,r.screenAudio_=e.screenAudio,r.audioSource_=e.audioSource,r.videoSource_=e.videoSource,r.mirror_=e.mirror,r.client_=[],r.audioMixOption_={filePath:null,startTime:0,replace:!1,loop:!1,repeatCount:1},r.audioMixInfo_={audioMixState:XP.IDLE,audioCtx:null,mediaNode:null,sourceNode:null,buffer:null,destNode:null,gainNode:null,gainValue:.5,startAt:0,pauseAt:0,pauseDur:0,playAutoEnded:!1,totalDur:0},r.mutePackageData=new Uint8Array([255,241,80,128,3,223,252,222,2,0,76,97,118,99,53,56,46,55,53,46,49,48,48,0,66,32,8,193,24,56,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28,255,241,80,128,1,191,252,33,16,4,96,140,28]).buffer,r.muteSendInfo={audioMixState:XP.IDLE,audioCtx:null,mediaNode:null,sourceNode:null,destNode:null},r.screenShareMixInfo={bindStream:null,screenShareAudioNode:null,destNode:null,gainNode:null,gainValue:.5,status:XP.INIT,muteMainAudio:!1},r.videoProfiles_=new Map,r.videoContents=new Map,r.logger.info(r.module_,"new local stream, stream config: ".concat(JSON.stringify(e)));return r}p(t,e);return u(t,[{key:"setMediaStream",value:function e(t){this.mediaStream||(this.mediaStream=new MediaStream),this.mediaStream.addTrack(t)}},{key:"getMediaStream",value:function e(){return this.mediaStream}},{key:"getLocalId",value:function e(){return this.id_}},{key:"initialize",value:async function e(){return await this.initializeImpl()}},{key:"setVideoContentHint",value:function e(t){if("detail"!==t&&"motion"!==t&&"text"!==t){const e=new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"invalid input parameter type");throw this.logger.error(this.module_,"setVideoContentHint fail, errMsg: ".concat(e)),e}const r=this.getVideoTrack();r&&"contentHint"in r?(r.contentHint=t,this.logger.info(this.module_,"set video track contentHint to: ".concat(t))):this.logger.info(this.module_,"no video track or no video contentHint in track")}},{key:"reset",value:async function e(){this.closeImpl();for(const e of this.getHRTCTracks({hasTrack:!0})){const t=e.getTrack();t&&await this.removeTrack(t)}this.tracks[Qx.TRACK_TYPE_VIDEO].clear(),this.tracks[Qx.TRACK_TYPE_AUDIO].clear()}},{key:"initAuxStreamWithTrack",value:function e(t,r){const n=[];if(t){const e=new MN({streamType:qx.STREAM_TYPE_AUX,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:t,event:this.eventEmitter});this.tracks[Qx.TRACK_TYPE_AUDIO].set("auxAudio",e),n.push({type:Qx.TRACK_TYPE_AUDIO,track:t})}if(r){const e=new MN({streamType:qx.STREAM_TYPE_AUX,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:r,event:this.eventEmitter});this.tracks[Qx.TRACK_TYPE_VIDEO].set(e.getResolutionId(),e),n.push({type:Qx.TRACK_TYPE_VIDEO,track:r})}return this.appendDefaultLocalTrack(this.getMaxResolutionProfile(this.videoProfiles_),this.audioProfile_),new MD(nc.RTC_ERR_CODE_SUCCESS,"",n)}},{key:"initAuxStream",value:async function e(){if(this.audioSource_||this.videoSource_)return this.initAuxStreamWithTrack(this.audioSource_,this.videoSource_);{var t,r,n,i;const e=new MN({streamType:qx.STREAM_TYPE_AUX,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,trackProfile:this.screenProfile_,logger:this.logger,resolutionId:this.generateResolutionId(),event:this.eventEmitter}),o=await e.initScreenShare(this.screenAudio_),a=null===(t=o.find((e=>e.error)))||void 0===t?void 0:t.error;if(a)throw this.logger.error(this.module_,"initAuxStream, fail, errMsg = ".concat(a)),a instanceof oc?new MD(a.getCode(),a.getMsg(),o):a;this.stat.setMediaCaptureSucc(Sx.AUX,null===(r=e.getTrack())||void 0===r?void 0:r.label),this.tracks[Qx.TRACK_TYPE_VIDEO].set(e.getResolutionId(),e),this.setMediaStream(null===(n=o.find((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.track)))||void 0===n?void 0:n.track),this.setVideoContentHint("detail");const s=null===(i=o.find((e=>e.type===Qx.TRACK_TYPE_AUDIO&&e.track)))||void 0===i?void 0:i.track;return s&&this.tracks[Qx.TRACK_TYPE_AUDIO].set("auxAudio",new MN({streamType:qx.STREAM_TYPE_AUX,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:s,event:this.eventEmitter})),this.auxStreamStopByNativeHandler=()=>{this.close(),this.eventEmitter.removeListener(CP,this.auxStreamStopByNativeHandler)},this.eventEmitter.on(CP,this.auxStreamStopByNativeHandler),new MD(nc.RTC_ERR_CODE_SUCCESS,"",o)}}},{key:"initMainStreamWithCfg",value:async function e(){const t=this.getMaxResolutionProfile(this.videoProfiles_);return await this.addCaptureWithCfg(this.video_,this.audio_,t,this.audioProfile_,ex.main)}},{key:"initMainStream",value:async function e(){return uN.initDeviceChangedNotify(this.eventEmitter,!0),this.on(lx.CameraChanged,(e=>{"REMOVE"===e.state&&this.clearEffectiveDeviceId(e.deviceId,"videoInput")})),this.on(lx.RecordingDeviceChanged,(e=>{"REMOVE"===e.state&&this.client_.length>0&&this.client_[0].getPublishAudioSender()&&(this.startSendMutePackage(),this.clearEffectiveDeviceId(e.deviceId,"audioInput"))})),this.on(LP.CameraCapture,((e,t)=>{this.setCameraCaptureReport(e,t)})),this.audioSource_||this.videoSource_?this.initMainStreamWithTrack(this.audioSource_,this.videoSource_):await this.initMainStreamWithCfg()}},{key:"initializeImpl",value:async function e(){this.logger.info(this.module_,"initializeImpl begin");try{return await this.reset(),this.screen_?await this.initAuxStream():await this.initMainStream()}catch(e){throw this.logger.error(this.module_,"initializeImpl fail, errMsg:".concat(e)),"function"!=typeof e.getMediaCaptureResult&&"function"==typeof e.getCode?new MD(e.getCode(),e.getMsg(),null):e}}},{key:"setCameraCaptureReport",value:function e(t,r){this.client_.forEach((e=>{e.setCameraCaptureReport(t,r)}))}},{key:"addCaptureWithCfg",value:async function e(t,r,n,i,o){this.logger.info(this.module_,"addCaptureWithCfg begin, video:".concat(t,", audio:").concat(r,",")+"camera:".concat(this.getCurrentCameraId(),", microphone:").concat(this.getCurrentMicrophoneId(),",")+"videoProfileInfo:".concat(JSON.stringify(n),", audioProfile:").concat(JSON.stringify(i)));if((this.tracks&&this.tracks[Qx.TRACK_TYPE_VIDEO].size)>=2){const e=new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"resolution count can not be greater than ".concat(2));throw this.logger.error(this.module_,"addCaptureWithCfg fail, errMsg is=".concat(e)),e}const a=[];let s,u;t&&(s=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,trackProfile:n,logger:this.logger,resolutionId:n?n.resolutionId:this.generateResolutionId(),event:this.eventEmitter}),a.push(s.initVideoCapture(this.getCurrentCameraId()||this.facingMode_,o))),r&&(u=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,trackProfile:i,logger:this.logger,resolutionId:this.generateResolutionId(),event:this.eventEmitter}),a.push(u.initAudioCapture(this.getCurrentMicrophoneId())));const c=await Promise.all(a);let l=null;for(const e of c)if(e.error)l="".concat(l).concat(l?"":";").concat(e.error.getMsg());else{var f;if(e.type===Qx.TRACK_TYPE_AUDIO)this.tracks[Qx.TRACK_TYPE_AUDIO].set("mainAudio",u),this.stat.setMediaCaptureSucc(Sx.AUDIO,u.getTrack().label);else Array.from(Array.from(this.tracks[Qx.TRACK_TYPE_VIDEO].values()).values()).some((e=>e.getTrackMuted()))&&s.muteTrack(),this.tracks[Qx.TRACK_TYPE_VIDEO].set(s.getResolutionId(),s),this.stat.setMediaCaptureSucc(Sx.VIDEO,null===(f=s.getTrack())||void 0===f?void 0:f.label),n&&this.videoProfiles_.set(s.getResolutionId(),n),this.videoContents.set(s.getResolutionId(),o);this.setMediaStream(e.track),this.appendDefaultLocalTrack(n,i),this.updateEffectiveDeviceInfo(e)}if(l){const e=new MD(nc.RTC_ERR_CODE_INVALID_OPERATION,"browser initialize capture fail, ".concat(l),c);throw this.logger.error(this.module_,"addCaptureWithCfg fail, errMsg= ".concat(e)),e}return this.logger.info(this.module_,"addCaptureWithCfg success, camera:".concat(this.getCurrentCameraId(),", microphone:").concat(this.getCurrentMicrophoneId())),new MD(nc.RTC_ERR_CODE_SUCCESS,"",c)}},{key:"appendDefaultLocalTrack",value:function e(t,r){if(!this.getAnyAudioHRTCTrack()){const e=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,trackProfile:r,logger:this.logger,resolutionId:this.generateResolutionId(),event:this.eventEmitter});e.setTrackContentType(ex.main),this.tracks[Qx.TRACK_TYPE_AUDIO].set("mainAudio",e),this.logger.info(this.module_,"addDefaultEmptyTrack success, audioTrack:".concat(e.getResolutionId(),",")+"track profile:".concat(JSON.stringify(e.getTrackProfile())))}if(!this.getAnyVideoHRTCTrack(null==t?void 0:t.resolutionId)){const e=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,trackProfile:t,logger:this.logger,resolutionId:t?t.resolutionId:this.generateResolutionId(),event:this.eventEmitter});e.setTrackContentType(ex.main),this.tracks[Qx.TRACK_TYPE_VIDEO].set(e.getResolutionId(),e),this.logger.info(this.module_,"addDefaultEmptyTrack success, videoTrack:".concat(e.getResolutionId(),",")+"track profile:".concat(JSON.stringify(e.getTrackProfile())))}}},{key:"generateResolutionId",value:function e(){return this.id_+"-"+SI.generateRandomId(8,16)}},{key:"initMainStreamWithTrack",value:function e(t,r){const n=[];if(t){const e=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:t,event:this.eventEmitter});this.tracks[Qx.TRACK_TYPE_AUDIO].set("mainAudio",e),n.push({type:Qx.TRACK_TYPE_AUDIO,track:t})}if(r){const e=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:r,event:this.eventEmitter});this.tracks[Qx.TRACK_TYPE_VIDEO].set(e.getResolutionId(),e),n.push({type:Qx.TRACK_TYPE_VIDEO,track:r})}return this.appendDefaultLocalTrack(this.getMaxResolutionProfile(this.videoProfiles_),this.audioProfile_),new MD(nc.RTC_ERR_CODE_SUCCESS,"",n)}},{key:"addAudioTrackCapture",value:async function e(t){return await this.addAudioTrackCaptureImpl(t)}},{key:"addAudioTrackCaptureImpl",value:async function e(t){var r;this.logger.info(this.module_,"addAudioTrackCaptureImpl, microphoneId: ".concat(t));const n=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,trackProfile:this.audioProfile_,logger:this.logger,resolutionId:this.generateResolutionId(),event:this.eventEmitter}),i=await n.initAudioCapture(t||this.microphoneId_);if(i.error)throw this.logger.error(this.module_,"addAudioTrackCaptureImpl fail, errMsg: ".concat(i.error)),i.error;return this.stat.setMediaCaptureSucc(Sx.AUDIO,null===(r=i.track)||void 0===r?void 0:r.label),this.updateEffectiveDeviceInfo(i),await this.addTrackImpl(i.track),i.track}},{key:"addVideoTrackCapture",value:async function e(t){return await this.addVideoTrackCaptureImpl(t)}},{key:"addVideoTrackCaptureImpl",value:async function e(t){var r;this.logger.info(this.module_,"addVideoTrackCaptureImpl, option: ".concat(JSON.stringify(t)));const n=null==t?void 0:t.resolutionId,i=n?this.videoProfiles_.get(n):this.getMaxResolutionProfile(this.videoProfiles_),o=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!1,trackProfile:i,logger:this.logger,resolutionId:this.generateResolutionId(),event:this.eventEmitter}),a=(null==t?void 0:t.cameraId)||this.cameraId_||this.facingMode_,s=await o.initVideoCapture(a,n?this.videoContents.get(n):ex.main);if(s.error)throw this.logger.error(this.module_,"addVideoTrackCaptureImpl fail, errMsg: ".concat(s.error)),s.error;return this.updateEffectiveDeviceInfo(s),this.stat.setMediaCaptureSucc(Sx.AUDIO,null===(r=s.track)||void 0===r?void 0:r.label),await this.addTrackImpl(s.track,n),s.track}},{key:"updateEffectiveDeviceInfo",value:function e(t){t.type===Qx.TRACK_TYPE_VIDEO?(this.effectiveCameraId_=t.track.getSettings().deviceId,this.logger.info(this.module_,"updateEffectiveDeviceInfo, effectiveCameraId_: ".concat(this.effectiveCameraId_))):t.type===Qx.TRACK_TYPE_AUDIO&&(this.effectiveMicrophoneId_=t.track.getSettings().deviceId,this.logger.info(this.module_,"updateEffectiveDeviceInfo, effectiveMicrophoneId_: ".concat(this.effectiveMicrophoneId_)))}},{key:"getCurrentCameraId",value:function e(){return this.cameraId_||this.effectiveCameraId_}},{key:"getCurrentMicrophoneId",value:function e(){return this.microphoneId_||this.effectiveMicrophoneId_}},{key:"getAudioSendBitrate",value:function e(){const t=this.getAudioHRTCTrack();return t?t.getTrackProfile().bitrate:0}},{key:"isAudioMuted",value:function e(){const t=this.getAudioHRTCTrack();return!t||t.getTrackMuted()}},{key:"isVideoMuted",value:function e(t){const r=this.getVideoHRTCTrack(t);return!r||r.getTrackMuted()}},{key:"setAudioProfile",value:function e(t){this.setAudioProfileImpl(t)}},{key:"setAudioProfileImpl",value:function e(t){const r=this.getAudioHRTCTrack();this.audioProfile_=t,null==r||r.setTrackProfile(t)}},{key:"getVideoMaxBitrate",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.maxBitrate:0}},{key:"getVideoMaxSendBitrate",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.maxBitrate<35e4?n.maxBitrate-2e4:n.maxBitrate:0}},{key:"getVideoMiniBitrate",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.minBitrate:0}},{key:"getVideoWidth",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.width:0}},{key:"getVideoHeight",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.height:0}},{key:"getVideoFrameRate",value:function e(t){var r;const n=null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile();return n?n.frameRate:0}},{key:"getVideoProfile",value:function e(t){var r;return null===(r=this.getVideoHRTCTrack(t))||void 0===r?void 0:r.getTrackProfile()}},{key:"setVideoProfile",value:async function e(t,r){await this.setVideoProfileImpl(t,r)}},{key:"addResolution",value:async function e(t,r){return await this.addResolutionImpl(t,r)}},{key:"addResolutionImpl",value:async function e(t,r){try{if(this.videoSource_||this.audioSource_)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"localStream created by videoSource or audioSource");const e=aL.formatVideoProfile(t),n={resolutionId:this.generateResolutionId(),width:e.width,height:e.height,frameRate:e.frameRate,minBitrate:e.minBitrate,maxBitrate:e.maxBitrate};this.logger.info(this.module_,"addResolutionImpl begin, profile:".concat(JSON.stringify(n)," ")),await this.addCaptureWithCfg(!0,r,n,this.audioProfile_,ex.slides);for(const e of this.client_)await e.publish(this);return this.logger.info(this.module_,"addResolutionImpl success"),n}catch(e){throw this.logger.error(this.module_,"addResolutionImpl fail, errMsg:".concat(e)),"function"!=typeof e.getMediaCaptureResult?new MD(e.getCode(),e.getMsg(),null):e}}},{key:"removeResolution",value:async function e(t){return this.removeResolutionImpl(t)}},{key:"removeResolutionImpl",value:async function e(t){this.logger.info(this.module_,"removeResolutionImpl begin, resolutionId:".concat(t));const r=this.getVideoHRTCTrack(t);if(!r)throw this.logger.error(this.module_,"removeResolutionImpl, resolutionId:".concat(t," not found ")),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"resolutionId:".concat(t," not found"));this.tracks[Qx.TRACK_TYPE_VIDEO].delete(t),r.removeTrack();const n=this.getHRTCTracks({mediaType:Qx.TRACK_TYPE_VIDEO});n&&0!==n.length||this.tracks[Qx.TRACK_TYPE_AUDIO].delete("mainAudio");for(const e of this.client_)await e.publish(this);this.logger.info(this.module_,"removeResolutionImpl success, resolutionId:".concat(t))}},{key:"setVideoProfileImpl",value:async function e(t,r){var n;if(this.logger.info(this.module_,"setVideoProfile begin, profile: ".concat(JSON.stringify(t))),"string"!=typeof t&&(null==t?void 0:t.maxBitrate)<64e3)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"maxBitrate cannot be less than 64000");const i=this.getVideoHRTCTrack(r),o=aL.formatVideoProfile(t);if(!i){const e=this.generateResolutionId();return void this.videoProfiles_.set(e,o)}const a={};SI.isSupportConstraints("aspectRatio")&&(a.aspectRatio={ideal:o.width/o.height}),a.width={ideal:o.width},a.height={ideal:o.height},a.frameRate={ideal:o.frameRate},await(null===(n=i.getTrack())||void 0===n?void 0:n.applyConstraints(a).then((()=>{this.logger.info(this.module_,"setVideoProfile, constraint: ".concat(JSON.stringify(i.getTrack().getConstraints()))),i.setLocalProfileByTrack(i.getTrack(),o),this.videoProfiles_.set(i.getResolutionId(),o),this.client_.forEach((async e=>{if(e){const t=e.getMainStreamSenderByTrack(i.getTrackId());await e.setSendBitrate(t,this.getVideoMaxSendBitrate(i.getResolutionId()),this.isAuxiliary()?"auxVideo":"mainVideo"),await e.publish(this)}}))})).catch((e=>{throw aL.handleCaptureErrorUtil(e)})))}},{key:"getScreenSendBitrate",value:function e(){const t=this.getVideoHRTCTrack();return t?t.getTrackProfile().bitrate:0}},{key:"getScreenWidth",value:function e(){const t=this.getVideoHRTCTrack();return t?t.getTrackProfile().width:0}},{key:"getScreenHeight",value:function e(){const t=this.getVideoHRTCTrack();return t?t.getTrackProfile().height:0}},{key:"getScreenFrameRate",value:function e(){const t=this.getVideoHRTCTrack();return t?t.getTrackProfile().frameRate:0}},{key:"setScreenProfile",value:function e(t){this.setScreenProfileImpl(t)}},{key:"setScreenProfileImpl",value:function e(t){const r=this.getVideoHRTCTrack();this.screenProfile_=t,r&&r.setTrackProfile(t)}},{key:"switchVideoDevice",value:async function e(t){var r;this.logger.info(this.module_,"switchVideoDevice begin, cameraId is ".concat(t));const n=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO});if(0===n.length)return void this.logger.error(this.module_,"switchVideoDevice failed, no video tracks");const i=[];for(const e of n){var o;null===(o=this.mediaStream)||void 0===o||o.removeTrack(e.getTrack()),e.setTrackProfile(this.videoProfiles_.get(e.getResolutionId())),i.push(e.initVideoCapture(t,e.getTrackContentType()))}const a=await Promise.all(i),s=[];for(const e of a){var u,c,l;if(e.error)throw e.error;null===(u=this.mediaStream)||void 0===u||u.addTrack(e.track);const t=e.track.getConstraints(),r=e.track.getSettings(),i="number"==typeof t.width?t.width:(null===(c=t.width)||void 0===c?void 0:c.ideal)||r.width,o="number"==typeof t.height?t.height:(null===(l=t.height)||void 0===l?void 0:l.ideal)||r.height,a=n.find((e=>{const t=e.getTrackProfile();return t.width===i&&t.height===o||t.width===o&&t.height===i}));for(const t of this.client_){const r=t.getMainStreamSenderByTrack(null==a?void 0:a.getTrackId());r&&s.push(r.replaceTrack(e.track))}}if(a.length&&(this.cameraId_=t,this.effectiveCameraId_=t),0!==s.length){this.stat.setMediaCaptureSucc(Sx.VIDEO,null===(r=a[0].track)||void 0===r?void 0:r.label),await Promise.all(s);for(const e of this.client_)await e.publish(this);this.logger.info(this.module_,"switchVideoDevice success")}else this.logger.debug(this.module_,"switchVideoDevice, no need replace sender track")}},{key:"switchAudioDevice",value:async function e(t){var r,n,i;this.logger.info(this.module_,"switchAudioDevice begin, microphoneId is ".concat(t));const o=this.getAudioHRTCTrack();if(!o)return void this.logger.error(this.module_,"switchAudioDevice failed, no audio tracks");null===(r=this.mediaStream)||void 0===r||r.removeTrack(o.getTrack());const a=await o.initAudioCapture(t);if(a.error)throw a.error;this.stat.setMediaCaptureSucc(Sx.AUDIO,null===(n=a.track)||void 0===n?void 0:n.label),this.replaceMixAudioTrack(a.track),null===(i=this.mediaStream)||void 0===i||i.addTrack(a.track);const s=[];this.client_.forEach((e=>{const t=e.getPublishAudioSender();t&&s.push(t.replaceTrack(this.getPublishAudioTrack()))})),0===s.length&&this.logger.info(this.module_,"switchAudioDevice, no need replace sender track"),this.microphoneId_=t,this.effectiveMicrophoneId_=t,await Promise.all(s)}},{key:"switchDevice",value:async function e(t,r){return await this.switchDeviceImpl(t,r)}},{key:"switchDeviceImpl",value:async function e(t,r){return new Promise(((e,n)=>{if(this.logger.info(this.module_,"switchDeviceImpl begin, type:".concat(t,", deviceId:").concat(r)),t===Qx.TRACK_TYPE_AUDIO){if("default"!==r&&(this.effectiveMicrophoneId_===r||this.audioSource_))return void e();this.switchAudioDevice(r).then((()=>{this.stopSendMutePackage(),this.stat.reportSwitchDevicesInfo(_x.INPUT_AUDIO,r,Nx.SUCCESS),e()})).catch((e=>{this.stat.reportSwitchDevicesInfo(_x.INPUT_AUDIO,r,Nx.FAIL),this.logger.error(this.module_,"switchDevice failed, errmsg= ".concat(e)),n(new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR))}))}else if(t===Qx.TRACK_TYPE_VIDEO){if(this.effectiveCameraId_===r||this.videoSource_)return void e();this.switchVideoDevice(r).then((()=>{this.stat.reportSwitchDevicesInfo(_x.INPUT_VIDEO,r,Nx.SUCCESS),e()})).catch((e=>{this.stat.reportSwitchDevicesInfo(_x.INPUT_VIDEO,r,Nx.FAIL),this.logger.error(this.module_,"switchDevice failed, errmsg= ".concat(e)),n(new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR))}))}else n(new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"invalid media type:".concat(t)))}))}},{key:"addTrack",value:async function e(t,r){return await this.addTrackImpl(t,r)}},{key:"addTrackImpl",value:async function e(t,r){var n;if(!t)throw this.logger.error(this.module_,"addTrack, track is null"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"track is null");if(this.logger.info(this.module_,"addTrackImpl begin, resolutionId:".concat(r,", physical track id:").concat(t.id)),t.kind===Qx.TRACK_TYPE_AUDIO){const e=this.getUninitializedAudioHRTCTrack();if(!e)throw this.logger.error(this.module_,"addTrackImpl failed, audio track already exist"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"audio track already exist");{await e.replaceTrack(t),this.replaceMixAudioTrack(t);const n=this.getAnyVideoHRTCTrack(r),i=null!=n&&n.isPlaying()?n:null;i&&await this.play(i.getElementId(),{objectFit:i.getObjectFit(),muted:i.getTrackMuted(),resolutionId:i.getResolutionId()}),this.logger.info(this.module_,"addTrackImpl success , track type is audio,"+"physical track id:".concat(t.id))}}else{const e=this.getUninitializedVideoHRTCTrack(r);if(!e)throw this.logger.error(this.module_,"addTrackImpl failed, video track already exist"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"video track already exist");{await e.replaceTrack(t);const r=this.getAnyAudioHRTCTrack(),n=null!=r&&r.isPlaying()?r:null;n&&await this.play(n.getElementId(),{objectFit:n.getObjectFit(),muted:n.getTrackMuted(),resolutionId:null}),this.logger.info(this.module_,"addTrackImpl success , track type is video,"+"physical track id:".concat(t.id))}}null===(n=this.mediaStream)||void 0===n||n.addTrack(t);for(const e of this.client_)e&&await e.publish(this)}},{key:"removeTrack",value:async function e(t){return await this.removeTrackImpl(t)}},{key:"removeTrackImpl",value:async function e(t){var r;if(!t)throw this.logger.error(this.module_,"removeTrack, track is null"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"track is null");if(t.kind===Qx.TRACK_TYPE_AUDIO)for(const[e,r]of this.tracks[Qx.TRACK_TYPE_AUDIO]){var n;t.id===(null==r||null===(n=r.getTrack())||void 0===n?void 0:n.id)&&(r.removeTrack(),this.tracks[Qx.TRACK_TYPE_AUDIO].set(e,r),this.logger.info(this.module_,"removeTrackImpl success , track type is ".concat(r.getTrackType(),",")+"physical track id:".concat(t.id)))}else for(const[e,r]of this.tracks[Qx.TRACK_TYPE_VIDEO]){var i;t.id===(null==r||null===(i=r.getTrack())||void 0===i?void 0:i.id)&&(r.removeTrack(),this.tracks[Qx.TRACK_TYPE_VIDEO].set(e,r),this.logger.info(this.module_,"removeTrackImpl success , track type is ".concat(r.getTrackType(),",")+"physical track id:".concat(t.id)))}null===(r=this.mediaStream)||void 0===r||r.removeTrack(t);for(const e of this.client_)e&&await e.publish(this)}},{key:"replaceTrack",value:async function e(t,r,n){return await this.replaceTrackImpl(t,r,n)}},{key:"replaceTrackImpl",value:async function e(t,r,n){var i,o,a;if(!t)throw this.logger.error(this.module_,"replaceTrack, track is null"),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);let s;r===Qx.TRACK_TYPE_AUDIO?(s=this.getAudioHRTCTrack(),this.replaceMixAudioTrack(t)):r===Qx.TRACK_TYPE_VIDEO&&(s=this.getVideoHRTCTrack(n)),null===(i=this.mediaStream)||void 0===i||i.removeTrack(s.getTrack()),null===(o=this.mediaStream)||void 0===o||o.addTrack(t),await(null===(a=s)||void 0===a?void 0:a.replaceTrack(t));for(const e of this.client_)e&&await e.publish(this)}},{key:"addClient",value:function e(t){this.client_=this.client_.filter((e=>e&&e.getSymbol()!==t.getSymbol())),t&&this.client_.push(t)}},{key:"removeClient",value:function e(t){t&&-1!==this.client_.indexOf(t)&&this.client_.splice(this.client_.indexOf(t),1)}},{key:"muteAudio",value:function e(){return!!n(t,"muteAudio",this,3)([])&&(this.stat.reportAudioMuteInfo(1,!0),this.client_.forEach((e=>{e.changeStreamMuteStatusNotify(!0,Qx.TRACK_TYPE_AUDIO),e.reportAudioMuteInfo(1,!0)})),!0)}},{key:"muteVideo",value:function e(){return!!n(t,"muteVideo",this,3)([])&&(this.stat.reportVideoMuteInfo(this.userId_,!0),this.client_.forEach((e=>{var t;const r=(null===(t=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}))||void 0===t?void 0:t.length)>1;e.changeStreamMuteStatusNotify(!0,Qx.TRACK_TYPE_VIDEO,this.isAuxiliary_?ex.desktop:ex.main,r),e.reportVideoMuteInfo(this.userId_,!0)})),!0)}},{key:"unmuteAudio",value:function e(){return!!n(t,"unmuteAudio",this,3)([])&&(this.stat.reportAudioMuteInfo(1,!1),this.client_.forEach((e=>{e.changeStreamMuteStatusNotify(!1,Qx.TRACK_TYPE_AUDIO),e.reportAudioMuteInfo(1,!1)})),!0)}},{key:"unmuteVideo",value:function e(){return!!n(t,"unmuteVideo",this,3)([])&&(this.stat.reportVideoMuteInfo(this.userId_,!1),this.client_.forEach((e=>{var t;const r=(null===(t=this.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}))||void 0===t?void 0:t.length)>1;e.changeStreamMuteStatusNotify(!1,Qx.TRACK_TYPE_VIDEO,this.isAuxiliary_?ex.desktop:ex.main,r),e.reportVideoMuteInfo(this.userId_,!1)})),!0)}},{key:"closeImpl",value:function e(r){!1!==(null==r?void 0:r.audio)&&(this.closeScreenShareAudio(),this.isAuxiliary()||this.audioMixInfo_.playAutoEnded||this.audioMixInfo_.audioMixState===XP.IDLE||this.audioMixInfo_.audioMixState===XP.INIT||this.stopAudioMixing()),n(t,"closeImpl",this,3)([r])}},{key:"clearEffectiveDeviceId",value:function e(t,r){this.logger.info(this.module_,"clearEffectiveDeviceId, Input:".concat(t,", type:").concat(r)),"audioInput"===r?this.effectiveMicrophoneId_===t&&(this.effectiveMicrophoneId_="",this.logger.info(this.module_,"clearEffectiveDeviceId, audioInput:".concat(t))):"videoInput"===r&&this.effectiveCameraId_===t&&(this.effectiveCameraId_="",this.logger.info(this.module_,"clearEffectiveDeviceId, videoInput:".concat(t)))}},{key:"startSendMutePackage",value:function e(){var t;this.logger.debug(this.module_,"start SendMutePackage");const r=null===(t=this.getAudioHRTCTrack())||void 0===t?void 0:t.getTrack();if(!r||"ended"!==r.readyState)return void this.logger.info(this.module_,"removed device is not in use, startSendMutePackage end");if(this.muteSendInfo.audioMixState!=XP.IDLE||!this.client_[0].getPublishAudioSender())return void this.logger.info(this.module_,"the condition is not met, startSendMutePackage end");this.muteSendInfo.audioCtx||(this.muteSendInfo.audioCtx=new AudioContext);let n=this.mutePackageData.slice(0);this.muteSendInfo.audioCtx.decodeAudioData(n,(e=>{var t;this.muteSendInfo.destNode=this.muteSendInfo.audioCtx.createMediaStreamDestination(),this.muteSendInfo.sourceNode=this.muteSendInfo.audioCtx.createBufferSource(),this.muteSendInfo.sourceNode.buffer=e,this.muteSendInfo.sourceNode.connect(this.muteSendInfo.destNode),this.muteSendInfo.sourceNode.loop=!0,this.muteSendInfo.sourceNode.start(0,0),this.muteSendInfo.audioMixState=XP.PLAY,null===(t=this.client_[0].getPublishAudioSender())||void 0===t||t.replaceTrack(this.muteSendInfo.destNode.stream.getAudioTracks()[0]),this.logger.info(this.module_,"startSendMutePackage success"),n=null}),(()=>{this.muteSendInfo.audioMixState=XP.IDLE,this.logger.info(this.module_,"startSendMutePackage failed"),n=null}))}},{key:"stopSendMutePackage",value:function e(){var t,r,n;this.logger.info(this.module_,"stopSendMutePackage begin"),this.muteSendInfo.audioMixState===XP.PLAY?(null===(t=this.muteSendInfo.mediaNode)||void 0===t||t.connect(this.muteSendInfo.destNode),null===(r=this.muteSendInfo.sourceNode)||void 0===r||r.stop(),null===(n=this.muteSendInfo.sourceNode)||void 0===n||n.disconnect(),this.muteSendInfo.sourceNode=null,this.muteSendInfo.audioMixState=XP.IDLE):this.logger.info(this.module_,"stopSendMutePackage end")}},{key:"bindScreenAudio2RelatedStream",value:function e(t,r){this.bindScreenAudio2RelatedStreamImpl(t,r)}},{key:"bindScreenAudio2RelatedStreamImpl",value:function e(t,r){if(this.logger.info(this.module_,"bindScreenAudio2RelatedStreamImpl, streamId: ".concat(t.getId())),r&&!t.hasAudioTrack()){const e=this.getAudioTrack();if(e){const r=new MN({streamType:qx.STREAM_TYPE_MAIN,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!1,logger:this.logger,resolutionId:this.generateResolutionId(),track:e,event:this.eventEmitter});t.tracks[Qx.TRACK_TYPE_AUDIO].set("mainAudio",r)}}this.screenShareMixInfo.bindStream=t,t.screenShareMixInfo.bindStream=this;this.mixScreenAudio(r)||(this.screenShareMixInfo.bindStream=null,t.screenShareMixInfo.bindStream=null)}},{key:"mixScreenAudio",value:function e(){var t;let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.screenShareMixInfo.bindStream;if(!this.isAuxiliary()||null==n||!n.getAudioHRTCTrack()||!this.getAudioHRTCTrack())return this.logger.error(this.module_,"mixScreenAudio2MainStreamAudio failed, isAuxiliary: ".concat(this.isAuxiliary()," ,main stream or audio track is null")),!1;if(this.screenShareMixInfo.status=XP.PLAY,!n.audioMixInfo_.audioCtx){var i;n.audioMixInfo_.audioCtx=new AudioContext,n.audioMixInfo_.destNode=n.audioMixInfo_.audioCtx.createMediaStreamDestination();const e=null===(i=n.getAudioHRTCTrack())||void 0===i?void 0:i.getTrack();e&&(n.audioMixInfo_.mediaNode=n.audioMixInfo_.audioCtx.createMediaStreamSource(new MediaStream([e])),n.audioMixInfo_.mediaNode.connect(n.audioMixInfo_.destNode))}r&&(n.audioMixInfo_.mediaNode.disconnect(n.screenShareMixInfo.destNode),this.logger.info(this.module_,"mixScreenAudio2MainStreamAudio, only play screen share audio stream"));const o=null===(t=this.getAudioHRTCTrack())||void 0===t?void 0:t.getTrack();return this.screenShareMixInfo.screenShareAudioNode=n.audioMixInfo_.audioCtx.createMediaStreamSource(new MediaStream([o])),this.screenShareMixInfo.destNode=n.audioMixInfo_.destNode,this.screenShareMixInfo.gainNode=n.audioMixInfo_.audioCtx.createGain(),this.screenShareMixInfo.gainNode.gain.value=this.screenShareMixInfo.gainValue,this.screenShareMixInfo.screenShareAudioNode.connect(this.screenShareMixInfo.gainNode),this.screenShareMixInfo.gainNode.connect(this.screenShareMixInfo.destNode),this.screenShareMixInfo.muteMainAudio=r,!0}},{key:"getPublishAudioTrack",value:function e(){var r;if(this.isAuxiliary()){if(this.screenShareMixInfo.destNode&&this.screenShareMixInfo.destNode.stream){const e=this.screenShareMixInfo.destNode.stream.getAudioTracks();if(e&&e.length>0)return e[0]}}else{const e=this.screenShareMixInfo.bindStream;if(e){const t=e.client_.length>0&&e.client_[0].getPublishVideoSender(qx.STREAM_TYPE_AUX).length,r=this.audioMixInfo_.audioMixState===XP.PAUSE||this.audioMixInfo_.audioMixState===XP.PLAY;if((t||r)&&this.audioMixInfo_.destNode&&this.audioMixInfo_.destNode.stream){const e=this.audioMixInfo_.destNode.stream.getAudioTracks();if(e&&e.length>0)return e[0]}}else if(this.audioMixInfo_.destNode&&this.audioMixInfo_.destNode.stream){const e=this.audioMixInfo_.destNode.stream.getAudioTracks();if(e&&e.length>0)return e[0]}}return null===(r=n(t,"getAudioHRTCTrack",this,3)([]))||void 0===r?void 0:r.getTrack()}},{key:"resumeMixScreenAudio",value:async function e(){const t=this.screenShareMixInfo.bindStream;if(!(this.isAuxiliary()&&t&&this.screenShareMixInfo.gainNode&&this.screenShareMixInfo.destNode))return void this.logger.info(this.module_,"cannot resumeMixScreenAudio, isAuxiliary: ".concat(this.isAuxiliary()));this.screenShareMixInfo.gainNode.connect(this.screenShareMixInfo.destNode);const r=t.client_.length>0&&t.client_[0].getPublishAudioSender(),n=this.client_.length>0&&this.client_[0].getPublishVideoSender(qx.STREAM_TYPE_AUX).length;r&&n&&await t.client_[0].getPublishAudioSender().replaceTrack(this.getPublishAudioTrack())}},{key:"stopMixScreenAudio",value:async function e(){this.screenShareMixInfo.gainNode&&this.screenShareMixInfo.destNode?this.screenShareMixInfo.gainNode.disconnect(this.screenShareMixInfo.destNode):this.logger.info(this.module_,"stopScreenAudio gainNode or destNode is null")}},{key:"setAudioVolume",value:function e(r){if(this.isAuxiliary()){if(!this.screenShareMixInfo.bindStream||this.screenShareMixInfo.status!==XP.PLAY)return void this.logger.error(this.module_,"setScreenAudioVolume failed for play status error");const e=r/100;this.logger.info(this.module_,"setScreenAudioVolume: "+e),this.screenShareMixInfo.gainNode.gain.value=e,this.screenShareMixInfo.gainValue=e}else n(t,"setAudioVolume",this,3)([r])}},{key:"closeScreenShareAudio",value:function e(){if(this.isAuxiliary())this.screenShareMixInfo.gainNode&&this.screenShareMixInfo.gainNode.disconnect(),this.screenShareMixInfo.screenShareAudioNode&&this.screenShareMixInfo.screenShareAudioNode.disconnect(),this.screenShareMixInfo.gainNode=null,this.screenShareMixInfo.gainValue=.5,this.screenShareMixInfo.screenShareAudioNode=null,this.screenShareMixInfo.bindStream=null,this.screenShareMixInfo.status=XP.INIT;else{const e=this.screenShareMixInfo.bindStream;if(!e)return void this.logger.debug(this.module_,"closeScreenShareAudio, no need closeScreenShareAudio, aux stream is null");e.closeScreenShareAudio(),this.screenShareMixInfo.bindStream=null}}},{key:"startAudioMixing",value:async function e(t){await this.startAudioMixingImpl(t),this.eventEmitter.emit(AP),this.logger.info(this.module_,"emit ".concat(AP," at startAudioMixing"))}},{key:"startAudioMixingImpl",value:async function e(t){var r,n;if(this.logger.info(this.module_,"startAudioMixing start at: "+t.startTime),this.checkAudioMixingParameter(),this.audioMixInfo_.audioMixState===XP.IDLE&&this.initIdleAudioMixInfo(),this.audioMixInfo_.audioMixState!==XP.INIT)throw this.logger.error(this.module_,"startAudioMixing status: ".concat(this.audioMixInfo_.audioMixState)),new oc(nc.RTC_ERR_CODE_STATUS_ERROR,"startAudioMixing status: ".concat(this.audioMixInfo_.audioMixState));(this.setAudioMixOption(t),this.audioMixOption_.replace)?this.logger.info(this.module_,"startAudioMixing: replace"):null===(n=this.audioMixInfo_.mediaNode)||void 0===n||n.connect(this.audioMixInfo_.destNode);await(null===(r=this.client_[0].getPublishAudioSender())||void 0===r?void 0:r.replaceTrack(this.audioMixInfo_.destNode.stream.getAudioTracks()[0]));try{const e=await dN.fetch(this.audioMixOption_.filePath);await this.audioMixInfo_.audioCtx.decodeAudioData(e.data,(e=>{this.audioMixInfo_.startAt=SI.getCurrentTimestamp(),this.audioMixInfo_.pauseAt=0,this.audioMixInfo_.pauseDur=0,this.audioMixInfo_.playAutoEnded=!1,this.audioMixInfo_.totalDur=0,this.audioMixInfo_.sourceNode=this.audioMixInfo_.audioCtx.createBufferSource(),this.audioMixInfo_.sourceNode.onended=()=>{Math.abs(this.audioMixInfo_.totalDur-(SI.getCurrentTimestamp()-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur))<200&&(this.stopAudioMixing(),this.audioMixInfo_.playAutoEnded=!0,this.eventEmitter.emit(kP),this.logger.info(this.module_,"emit ".concat(kP," at startAudioMixingImpl")))},this.audioMixInfo_.sourceNode.buffer=e,this.audioMixInfo_.buffer=e,this.audioMixInfo_.sourceNode.connect(this.audioMixInfo_.gainNode),this.audioMixInfo_.gainNode.connect(this.audioMixInfo_.destNode),this.audioMixInfo_.audioMixState=XP.PLAY,this.logger.info(this.module_,"startAudioMixing, duration: ".concat(this.getAudioMixingDuration())),this.doAudioMixing(),this.logger.info(this.module_,"startAudioMixing end")}),(e=>{throw this.logger.error(this.module_,"startAudioMixing, decode audio failed"),e}))}catch(e){var i,o,a;if(this.logger.error(this.module_,"startAudioMixing failed: ".concat(e)),this.audioMixInfo_.audioMixState=XP.INIT,!this.audioMixOption_.replace)null===(a=this.audioMixInfo_.mediaNode)||void 0===a||a.disconnect(this.audioMixInfo_.destNode);throw null===(i=this.client_[0].getPublishAudioSender())||void 0===i||i.replaceTrack(null===(o=this.getAudioHRTCTrack())||void 0===o?void 0:o.getTrack()),e}}},{key:"doAudioMixing",value:function e(){if(this.audioMixOption_.repeatCount>1){if(this.audioMixOption_.startTime>=this.getAudioMixingDuration())throw this.logger.error(this.module_,"startAudioMixing: ".concat(this.audioMixInfo_.audioMixState)),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"startAudioMixing: not valid startTime");this.audioMixInfo_.sourceNode.loop=!0;const e=this.audioMixOption_.repeatCount*this.getAudioMixingDuration()-this.audioMixOption_.startTime;this.audioMixInfo_.totalDur=e,this.audioMixInfo_.sourceNode.start(0,this.audioMixOption_.startTime/1e3,e/1e3)}else this.audioMixInfo_.sourceNode.loop=this.audioMixOption_.loop,this.audioMixOption_.loop?this.audioMixInfo_.totalDur=1/0:(this.getAudioMixingDuration()<=this.audioMixOption_.startTime&&(this.logger.info(this.module_,"startAudioMixing, bookmark: ".concat(this.audioMixOption_.startTime," invalid and reset to begin.")),this.audioMixOption_.startTime=0),this.audioMixInfo_.totalDur=this.getAudioMixingDuration()-this.audioMixOption_.startTime),this.audioMixInfo_.sourceNode.start(0,this.audioMixOption_.startTime/1e3)}},{key:"setAudioMixOption",value:function e(t){t.replace||(t.replace=!1),t.startTime||(t.startTime=0),t.loop||(t.loop=!1),t.repeatCount&&!t.loop||(t.repeatCount=0),this.audioMixOption_=t}},{key:"initIdleAudioMixInfo",value:function e(){if(!this.audioMixInfo_.audioCtx){var t;this.audioMixInfo_.audioCtx=new AudioContext,this.audioMixInfo_.destNode=this.audioMixInfo_.audioCtx.createMediaStreamDestination();const e=null===(t=this.getAudioHRTCTrack())||void 0===t?void 0:t.getTrack();e&&(this.audioMixInfo_.mediaNode=this.audioMixInfo_.audioCtx.createMediaStreamSource(new MediaStream([e])))}this.audioMixInfo_.gainNode=this.audioMixInfo_.audioCtx.createGain(),this.audioMixInfo_.gainNode.gain.value=this.audioMixInfo_.gainValue,this.audioMixInfo_.audioMixState=XP.INIT}},{key:"checkAudioMixingParameter",value:function e(){if(!this.client_||this.client_.length<1||!this.client_[0].getPublishAudioSender())throw this.logger.error(this.module_,"startAudioMixing failed"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"no mediaStream or no client or no audio!")}},{key:"replaceMixAudioTrack",value:function e(t){if(this.audioMixInfo_.audioMixState!==XP.IDLE&&this.audioMixInfo_.audioMixState!==XP.INIT&&this.audioMixInfo_.mediaNode&&this.audioMixInfo_.destNode){if(this.audioMixOption_.replace)return;return this.audioMixInfo_.mediaNode.disconnect(this.audioMixInfo_.destNode),this.audioMixInfo_.mediaNode=null,this.audioMixInfo_.mediaNode=this.audioMixInfo_.audioCtx.createMediaStreamSource(new MediaStream([t])),void this.audioMixInfo_.mediaNode.connect(this.audioMixInfo_.destNode)}if(!this.isAuxiliary_){var r;const e=null===(r=this.screenShareMixInfo.bindStream)||void 0===r?void 0:r.screenShareMixInfo;e&&!e.muteMainAudio&&this.audioMixInfo_.audioCtx&&this.audioMixInfo_.destNode&&(this.audioMixInfo_.mediaNode=this.audioMixInfo_.audioCtx.createMediaStreamSource(new MediaStream([t])),this.audioMixInfo_.mediaNode.connect(this.audioMixInfo_.destNode))}}},{key:"stopAudioMixing",value:async function e(){await this.stopAudioMixingImpl()}},{key:"stopAudioMixingImpl",value:async function e(){if(!this.audioMixInfo_.playAutoEnded)if(this.audioMixInfo_.audioMixState!==XP.IDLE&&this.audioMixInfo_.audioMixState!==XP.INIT){try{var t,r;await(null===(t=this.client_[0].getPublishAudioSender())||void 0===t?void 0:t.replaceTrack(null===(r=this.getAudioHRTCTrack())||void 0===r?void 0:r.getTrack()))}catch(e){throw this.logger.error(this.module_,"stopAudioMixing: ".concat(this.audioMixInfo_.audioMixState,", errMsg = ").concat(e)),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR)}var n;if(this.logger.info(this.module_,"stopAudioMixing"),!this.audioMixOption_.replace&&this.audioMixInfo_.audioMixState!==XP.PAUSE)null===(n=this.audioMixInfo_.mediaNode)||void 0===n||n.disconnect(this.audioMixInfo_.destNode);this.audioMixInfo_.sourceNode.stop(),this.audioMixInfo_.buffer=null,this.audioMixInfo_.sourceNode.disconnect(),this.audioMixInfo_.gainNode.disconnect(),this.audioMixInfo_.gainValue=.5,this.audioMixInfo_.sourceNode=null,this.audioMixInfo_.playAutoEnded=!1,this.audioMixInfo_.audioMixState=XP.INIT}else this.logger.info(this.module_,"stopAudioMixing: ".concat(this.audioMixInfo_.audioMixState))}},{key:"pauseAudioMixing",value:function e(){this.pauseAudioMixingImpl()}},{key:"pauseAudioMixingImpl",value:function e(){if(this.audioMixInfo_.audioMixState===XP.PLAY){this.logger.info(this.module_,"pauseAudioMixing"),this.audioMixOption_.replace||this.audioMixInfo_.mediaNode.disconnect(this.audioMixInfo_.destNode);try{var t,r;null===(t=this.client_[0].getPublishAudioSender())||void 0===t||t.replaceTrack(null===(r=this.getAudioHRTCTrack())||void 0===r?void 0:r.getTrack())}catch(e){throw this.logger.error(this.module_,"pauseAudioMixing, errMsg = ".concat(e)),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR)}this.audioMixInfo_.sourceNode.stop(),this.audioMixInfo_.sourceNode.disconnect(),this.audioMixInfo_.gainNode.disconnect(),this.audioMixInfo_.pauseAt=SI.getCurrentTimestamp(),this.audioMixInfo_.audioMixState=XP.PAUSE}else this.logger.error(this.module_,"pauseAudioMixing: ".concat(this.audioMixInfo_.audioMixState))}},{key:"resumeAudioMixing",value:function e(){this.resumeAudioMixingImpl(),this.eventEmitter.emit(AP),this.logger.info(this.module_,"emit ".concat(AP," at resumeAudioMixing"))}},{key:"resumeAudioMixingImpl",value:function e(){if(this.audioMixInfo_.audioMixState!==XP.PAUSE)return void this.logger.error(this.module_,"resumeAudioMixing: ".concat(this.audioMixInfo_.audioMixState));this.logger.info(this.module_,"resumeAudioMixing"),this.audioMixOption_.replace||this.audioMixInfo_.mediaNode.connect(this.audioMixInfo_.destNode);try{var t;null===(t=this.client_[0].getPublishAudioSender())||void 0===t||t.replaceTrack(this.audioMixInfo_.destNode.stream.getAudioTracks()[0])}catch(e){throw this.logger.error(this.module_,"pauseAudioMixing, errMsg = ".concat(e)),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR)}this.audioMixInfo_.sourceNode=this.audioMixInfo_.audioCtx.createBufferSource(),this.audioMixInfo_.sourceNode.onended=()=>{Math.abs(this.audioMixInfo_.totalDur-(SI.getCurrentTimestamp()-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur))<200&&(this.stopAudioMixing(),this.audioMixInfo_.playAutoEnded=!0,this.eventEmitter.emit(kP),this.logger.info(this.module_,"emit ".concat(kP," at resumeAudioMixingImpl")))},this.audioMixInfo_.sourceNode.buffer=this.audioMixInfo_.buffer,this.audioMixInfo_.sourceNode.connect(this.audioMixInfo_.gainNode),this.audioMixInfo_.gainNode.connect(this.audioMixInfo_.destNode);const r=this.audioMixInfo_.pauseAt-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur,n=r+this.audioMixOption_.startTime;if(this.audioMixOption_.repeatCount>1){this.audioMixInfo_.sourceNode.loop=!0;const e=this.audioMixOption_.repeatCount*this.getAudioMixingDuration()-this.audioMixOption_.startTime-r;this.audioMixInfo_.sourceNode.start(0,n%this.getAudioMixingDuration()/1e3,e/1e3)}else this.audioMixInfo_.sourceNode.loop=this.audioMixOption_.loop,this.audioMixInfo_.sourceNode.start(0,n%this.getAudioMixingDuration()/1e3);this.audioMixInfo_.pauseDur=this.audioMixInfo_.pauseDur+SI.getCurrentTimestamp()-this.audioMixInfo_.pauseAt,this.audioMixInfo_.audioMixState=XP.PLAY}},{key:"getAudioMixingCurrentPosition",value:function e(){let t=0;if(this.audioMixInfo_.audioMixState===XP.PAUSE)t=this.audioMixInfo_.pauseAt;else{if(this.audioMixInfo_.audioMixState!==XP.PLAY)return 0;t=SI.getCurrentTimestamp()}const r=this.getAudioMixingDuration();let n=(t-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur+this.audioMixOption_.startTime)%r;return n=Math.min(Math.round(n),r),this.logger.debug(this.module_,"getAudioMixingDuration: ".concat(n)),n}},{key:"getAudioMixingDuration",value:function e(){if(this.audioMixInfo_.audioMixState!==XP.PLAY&&this.audioMixInfo_.audioMixState!==XP.PAUSE)return this.logger.error(this.module_,"getAudioMixingDuration failed for play status error"),0;const t=1e3*this.audioMixInfo_.sourceNode.buffer.duration;return this.logger.debug(this.module_,"getAudioMixingDuration: ".concat(t)),t}},{key:"setAudioMixingVolume",value:function e(t){this.setAudioMixingVolumeImpl(t)}},{key:"setAudioMixingVolumeImpl",value:function e(t){if(this.audioMixInfo_.audioMixState!==XP.PLAY&&this.audioMixInfo_.audioMixState!==XP.PAUSE)return void this.logger.error(this.module_,"setAudioMixingVolume failed for play status error");const r=t/100;this.logger.debug(this.module_,"setAudioMixingVolume: "+r),this.audioMixInfo_.gainValue=r,this.audioMixInfo_.gainNode.gain.value=r}},{key:"setAudioMixingPosition",value:function e(t){this.setAudioMixingPositionImpl(t)}},{key:"setAudioMixingPositionImpl",value:function e(t){if(this.audioMixInfo_.audioMixState!==XP.PLAY&&this.audioMixInfo_.audioMixState!==XP.PAUSE)return void this.logger.error(this.module_,"setAudioMixingPosition failed for play status error");const r=this.getAudioMixingDuration();if(t<0||t>r)return void this.logger.error(this.module_,"setAudioMixingPosition failed for params error");let n;this.logger.debug(this.module_,"setAudioMixingPosition: ".concat(t)),this.audioMixInfo_.mediaNode.connect(this.audioMixInfo_.destNode),this.audioMixInfo_.sourceNode.stop(),this.audioMixInfo_.sourceNode.disconnect(),this.audioMixInfo_.gainNode.disconnect(),this.audioMixInfo_.sourceNode=null,n=this.audioMixInfo_.audioMixState===XP.PAUSE?this.audioMixInfo_.pauseAt:SI.getCurrentTimestamp();const i=n-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur+this.audioMixOption_.startTime;if(this.audioMixOption_.replace&&(this.audioMixInfo_.mediaNode.disconnect(this.audioMixInfo_.destNode),this.logger.info(this.module_,"resumeAudioMixing: replace")),this.audioMixInfo_.startAt=SI.getCurrentTimestamp(),this.audioMixInfo_.pauseAt=0,this.audioMixInfo_.pauseDur=0,this.audioMixInfo_.playAutoEnded=!1,this.audioMixInfo_.sourceNode=this.audioMixInfo_.audioCtx.createBufferSource(),this.audioMixInfo_.sourceNode.onended=()=>{Math.abs(this.audioMixInfo_.totalDur-(SI.getCurrentTimestamp()-this.audioMixInfo_.startAt-this.audioMixInfo_.pauseDur))<200&&(this.stopAudioMixing(),this.audioMixInfo_.playAutoEnded=!0,this.eventEmitter.emit(kP),this.logger.info(this.module_,"emit ".concat(kP," at setAudioMixingPositionImpl")))},this.audioMixInfo_.sourceNode.buffer=this.audioMixInfo_.buffer,this.audioMixInfo_.sourceNode.connect(this.audioMixInfo_.gainNode),this.audioMixInfo_.gainNode.connect(this.audioMixInfo_.destNode),i>=r&&this.audioMixOption_.repeatCount>1&&(this.audioMixOption_.repeatCount=Math.max(0,this.audioMixOption_.repeatCount-Math.floor(i/r))),this.audioMixOption_.repeatCount>1){this.audioMixInfo_.sourceNode.loop=!0;const e=this.audioMixOption_.repeatCount*r-t;this.audioMixInfo_.totalDur=e,this.audioMixInfo_.sourceNode.start(0,t/1e3,e/1e3)}else this.audioMixOption_.loop?this.audioMixInfo_.totalDur=1/0:this.audioMixInfo_.totalDur=r-t,this.audioMixInfo_.sourceNode.loop=this.audioMixOption_.loop,this.audioMixInfo_.sourceNode.start(0,t/1e3);this.audioMixOption_.startTime=t,this.audioMixInfo_.audioMixState===XP.PAUSE&&this.pauseAudioMixing()}},{key:"getStatInfo",value:function e(){return{audioProfile_:this.audioProfile_,videoProfile_:this.videoProfiles_,screenProfile_:this.screenProfile_,audio_:this.audio_,video_:this.video_,cameraId_:this.getCurrentCameraId(),facingMode_:this.facingMode_,microphoneId_:this.getCurrentMicrophoneId(),screen_:this.screen_,screenAudio_:this.screenAudio_}}}])}(ND),s(PD.prototype,"initialize",[dD],Object.getOwnPropertyDescriptor(PD.prototype,"initialize"),PD.prototype),s(PD.prototype,"addAudioTrackCapture",[hD],Object.getOwnPropertyDescriptor(PD.prototype,"addAudioTrackCapture"),PD.prototype),s(PD.prototype,"addVideoTrackCapture",[pD],Object.getOwnPropertyDescriptor(PD.prototype,"addVideoTrackCapture"),PD.prototype),s(PD.prototype,"setAudioProfile",[vD],Object.getOwnPropertyDescriptor(PD.prototype,"setAudioProfile"),PD.prototype),s(PD.prototype,"setVideoProfile",[mD],Object.getOwnPropertyDescriptor(PD.prototype,"setVideoProfile"),PD.prototype),s(PD.prototype,"addResolution",[yD],Object.getOwnPropertyDescriptor(PD.prototype,"addResolution"),PD.prototype),s(PD.prototype,"removeResolution",[gD],Object.getOwnPropertyDescriptor(PD.prototype,"removeResolution"),PD.prototype),s(PD.prototype,"setScreenProfile",[bD],Object.getOwnPropertyDescriptor(PD.prototype,"setScreenProfile"),PD.prototype),s(PD.prototype,"switchDevice",[_D],Object.getOwnPropertyDescriptor(PD.prototype,"switchDevice"),PD.prototype),s(PD.prototype,"addTrack",[SD],Object.getOwnPropertyDescriptor(PD.prototype,"addTrack"),PD.prototype),s(PD.prototype,"removeTrack",[ED],Object.getOwnPropertyDescriptor(PD.prototype,"removeTrack"),PD.prototype),s(PD.prototype,"replaceTrack",[wD],Object.getOwnPropertyDescriptor(PD.prototype,"replaceTrack"),PD.prototype),s(PD.prototype,"bindScreenAudio2RelatedStream",[TD],Object.getOwnPropertyDescriptor(PD.prototype,"bindScreenAudio2RelatedStream"),PD.prototype),s(PD.prototype,"startAudioMixing",[ID],Object.getOwnPropertyDescriptor(PD.prototype,"startAudioMixing"),PD.prototype),s(PD.prototype,"stopAudioMixing",[RD],Object.getOwnPropertyDescriptor(PD.prototype,"stopAudioMixing"),PD.prototype),s(PD.prototype,"pauseAudioMixing",[CD],Object.getOwnPropertyDescriptor(PD.prototype,"pauseAudioMixing"),PD.prototype),s(PD.prototype,"resumeAudioMixing",[kD],Object.getOwnPropertyDescriptor(PD.prototype,"resumeAudioMixing"),PD.prototype),s(PD.prototype,"setAudioMixingVolume",[AD],Object.getOwnPropertyDescriptor(PD.prototype,"setAudioMixingVolume"),PD.prototype),s(PD.prototype,"setAudioMixingPosition",[OD],Object.getOwnPropertyDescriptor(PD.prototype,"setAudioMixingPosition"),PD.prototype),PD);let jD=function(e){function t(e){var r;a(this,t);r=f(this,t,[{isRemote:!0,type:e.type,log:e.log}]),r.userId_=e.userId,r.client_=[],r.client_.push(e.client),r.module_="RemoteStream",r.roomId_=e.roomId,r.userName_=e.userName;return r}p(t,e);return u(t,[{key:"muteAudio",value:function e(){return!!n(t,"muteAudio",this,3)([])&&(this.stat.reportAudioMuteInfo(2,!0),!0)}},{key:"unmuteAudio",value:function e(){return!!n(t,"unmuteAudio",this,3)([])&&(this.stat.reportAudioMuteInfo(2,!1),!0)}},{key:"getVideoHRTCTrackByTrackId",value:function e(t){let r;for(const e of this.tracks[Qx.TRACK_TYPE_VIDEO].values())if(e.getTrackId()===t){r=e;break}return r}},{key:"updateRemoteResolutions",value:function e(t,r,n,i){if(!r)return;const o=this.getHRTCTrackIds({mediaType:Qx.TRACK_TYPE_VIDEO}),a=r.map((e=>e.streamId));for(const e of o)if(null==a||!a.includes(e))for(const r of this.getHRTCTracks({mediaType:Qx.TRACK_TYPE_VIDEO}))if((null==r?void 0:r.getTrackId())===e){this.logger.info(this.module_,"updateRemoteResolutions, streamType:".concat(t,",delete track:").concat(e)),this.stop({audio:!1,video:!0,resolutionIds:[e]}),this.removeRemoteVideoTrack(e),this.tracks[Qx.TRACK_TYPE_VIDEO].delete(r.getResolutionId());break}for(const e of r){if(o.includes(e.streamId)){var s;null===(s=this.getVideoHRTCTrackByTrackId(e.streamId))||void 0===s||s.updateTrackProfile(e);continue}const r=new MN({streamType:t,trackType:Qx.TRACK_TYPE_VIDEO,isRemote:!0,trackProfile:{width:e.width,height:e.height},logger:this.logger,resolutionId:e.streamId,event:this.eventEmitter});r.setTrackId(e.streamId||r.getResolutionId()),this.tracks[Qx.TRACK_TYPE_VIDEO].set(e.streamId,r)}const u=this.getAnyAudioHRTCTrack();if(n){if(!u){const e=new MN({streamType:t,trackType:Qx.TRACK_TYPE_AUDIO,isRemote:!0,logger:this.logger,resolutionId:null!=i?i:this.id_,event:this.eventEmitter});this.tracks[Qx.TRACK_TYPE_AUDIO].set("mainAudio",e)}}else u&&(this.logger.info(this.module_,"updateRemoteResolutions, streamType:".concat(t,",delete audio track")),this.stop({audio:!0,video:!1}),this.removeRemoteAudioTrack(),this.tracks[Qx.TRACK_TYPE_AUDIO].delete("mainAudio"));this.logger.info(this.module_,"updateResolutions success,userId:".concat(this.getUserId(),", streamType:").concat(t,",")+"new resolution is ".concat(this.getHRTCTracksProfileString()," hasAudio: ").concat(this.hasAudioTrack()))}},{key:"getHRTCTracksProfileString",value:function e(){const t=this.getHRTCTracks();let r="";return t.forEach((e=>{r=r+e.getTrackId()+":"+JSON.stringify(e.getTrackProfile())+","})),r}},{key:"addRemoteTrack",value:function e(t,r){if(t.kind===Qx.TRACK_TYPE_AUDIO){const e=this.getAnyAudioHRTCTrack();null==e||e.replaceTrack(t)}else{const e=Array.from(this.tracks[Qx.TRACK_TYPE_VIDEO].values()).find((e=>e.getTrackId()===r));null==e||e.replaceTrack(t)}this.logger.info(this.module_,"addRemoteTrack MediaStreamTrack for trackId:".concat(r," success,userId:").concat(this.getUserId(),", type:").concat(this.getType(),",")+"new resolution is ".concat(this.getHRTCTracksProfileString(),", hasAudio: ").concat(this.hasAudioTrack()))}},{key:"isTracksReady",value:function e(t,r){if(this.isRemote_){let e=!0;if(null!=t&&t.length){const r=this.getHRTCTrackIds();for(const n of t)if(!r.includes(n)||!this.getVideoHRTCTrackByTrackId(n).getTrack()){e=!1;break}}const n=this.getAudioHRTCTrack(),i=n&&!!n.getTrack(),o=e&&(!r||i);return this.logger.debug(this.module_,"isTracksReady userId:".concat(this.getUserId(),", type:").concat(this.getType(),",")+"result: ".concat(o,",videoTrackIds: ").concat(t,", isVideoReady:").concat(e,", isAudioReady:").concat(i)),o}return!0}},{key:"isTrackReady",value:function e(t,r){if(this.isRemote_){var n;if(t===Qx.TRACK_TYPE_VIDEO)return!(null===(n=this.getVideoHRTCTrackByTrackId(r))||void 0===n||!n.getTrack());return!!this.getAudioHRTCTrack()}return!1}},{key:"removeRemoteAudioTrack",value:function e(){const t=this.getAnyAudioHRTCTrack();t&&t.removeTrack()}},{key:"removeRemoteVideoTrack",value:function e(t){const r=this.tracks[Qx.TRACK_TYPE_VIDEO].get(t);r&&r.removeTrack()}},{key:"getUserName",value:function e(){return this.userName_}},{key:"updateUserName",value:function e(t){this.userName_=t}}])}(ND);const UD=0,VD=2;let WD=function(e){return e.JOINER="anchor",e.PLAYER="audience",e}({}),BD=function(e){return e[e.JOINER=0]="JOINER",e[e.PLAYER=2]="PLAYER",e}({});let GD=function(){function e(){a(this,e)}return u(e,[{key:"identifiedID",get:function(){return this.identifiedID_},set:function(e){this.identifiedID_=e}},{key:"roomId",get:function(){return this.roomId_},set:function(e){this.roomId_=e}},{key:"signature",get:function(){return this.signature_},set:function(e){this.signature_=e}},{key:"ctime",get:function(){return this.ctime_},set:function(e){this.ctime_=e}},{key:"userId",get:function(){return this.userId_},set:function(e){this.userId_=e}},{key:"encUserId",get:function(){return this.encUserId_},set:function(e){this.encUserId_=e}},{key:"userName",get:function(){return this.userName_},set:function(e){this.userName_=e}},{key:"role",get:function(){return this.role_},set:function(e){this.role_=e}},{key:"roleSignalType",get:function(){return VD===this.role_?WD.PLAYER:WD.JOINER}},{key:"appData",get:function(){return this.appData_},set:function(e){this.appData_=e}},{key:"removeRelayInfo",value:function e(t){this.relayInfos_=this.relayInfos_.filter((e=>e.roomId!==t))}},{key:"addRelayInfo",value:function e(t,r){this.relayInfos_||(this.relayInfos_=[]),this.relayInfos_.push({roomId:t,role:r})}},{key:"getRelayInfos",value:function e(){return this.relayInfos_}}])}();const ZD=new Map;let FD=function(){function e(){a(this,e)}return u(e,null,[{key:"get",value:function e(t){return ZD.get(t)}},{key:"delete",value:function e(t){ZD.delete(t)}},{key:"init",value:function e(t,r,n){const i=new GD;return i.identifiedID=t,i.userId=n.userId,i.userName=n.userName,i.role=n.role,i.signature=n.signature,i.ctime=n.ctime,i.appData={},n.userName&&(i.appData.nickname=n.userName),n.optionInfo&&[!0,!1].includes(n.optionInfo.recordPlaceholder)&&(i.appData.show_window=n.optionInfo.recordPlaceholder),i.roomId=r,ZD.set(t,i),i}},{key:"transLocalUserToJoinConfig",value:function e(t){var r;return{userId:t.userId,userName:t.userName,signature:t.signature,ctime:t.ctime,role:t.role,optionInfo:{recordPlaceholder:null===(r=t.appData)||void 0===r?void 0:r.show_window}}}},{key:"renewSignature",value:function e(t,r,n){if(ZD.has(t)){const e=ZD.get(t);return e.ctime=r,e.signature=n,e}return null}}])}();let HD=function(e){return e.ReceiveData="ReceiveData",e.ConnectionQuality="ConnectionQuality",e.Reconnected="Reconnected",e.SessionUnavailable="SessionUnavailable",e.ConnectionUnavailable="ConnectionUnavailable",e.ConnectionStateChanged="ConnectionStateChanged",e.AuthenticateFail="AuthenticateFail",e.SignatureExpired="SignatureExpired",e.ClientBanned="ClientBanned",e}({});let XD=function(){function e(){a(this,e);o(this,"state_",[])}return u(e,[{key:"default",value:function e(t){return this.defaultVal_=t,this}},{key:"get",value:function e(){return 0!=this.state_.length?this.state_[this.state_.length-1]:null}},{key:"set",value:function e(t){return 2==this.state_.length&&this.state_.unshift(),this.state_.push(t),this}},{key:"pre",value:function e(){return this.state_.length>=2?this.state_[this.state_.length-2]:null}},{key:"reset",value:function e(){return this.state_=[],this.state_[0]=this.defaultVal_,this}},{key:"state",get:function(){return this.state_}}])}();let YD=function(e){function t(){a(this,t);return f(this,t,arguments)}p(t,e);return u(t,[{key:"isChanged",value:function e(){return this.state.length>1&&this.get()!==this.pre()}},{key:"getDiffInfo",value:function e(){return this.isChanged()?{updated:this.state[1]}:{}}}])}(XD);let KD=function(e){return e[e.Health=1]="Health",e[e.SubHealth=4]="SubHealth",e[e.Unavailable=6]="Unavailable",e}({});const zD="HealthMonitor";let JD=function(e){function t(e){var r;a(this,t);r=f(this,t,[{emitter:!0,logger:e.logger}]),r.client=e,r.reset();return r}p(t,e);return u(t,[{key:"reset",value:function e(){this.streamDetectTimer&&(clearInterval(this.streamDetectTimer),this.streamDetectTimer=null),this.streamStats={mainStream:{bytesIn:(new YD).default(0).set(0).set(0),bytesOut:(new YD).default(0).set(0).set(0)},auxStream:{bytesIn:(new YD).default(0).set(0).set(0),bytesOut:(new YD).default(0).set(0).set(0)},upQuality:(new YD).default(rL.NETWORK_QUALITY_UNKNOW).set(rL.NETWORK_QUALITY_UNKNOW).set(rL.NETWORK_QUALITY_UNKNOW),downQuality:(new YD).default(rL.NETWORK_QUALITY_UNKNOW).set(rL.NETWORK_QUALITY_UNKNOW).set(rL.NETWORK_QUALITY_UNKNOW)}}},{key:"isStreamAvailable",value:function e(){if(!this.client)return!1;const t=this.isAvailableStreamIncoming(qx.STREAM_TYPE_MAIN),r=this.isAvailableStreamIncoming(qx.STREAM_TYPE_AUX),n=this.isAvailableStreamOutgoing(qx.STREAM_TYPE_MAIN),i=this.isAvailableStreamOutgoing(qx.STREAM_TYPE_AUX);return t||r||n||i}},{key:"getWsConnectionHealthStatus",value:function e(){return this.streamDetectTimer?this.isStreamAvailable()?KD.SubHealth:KD.Unavailable:KD.Health}},{key:"startStreamStateDetection",value:function e(){this.streamDetectTimer||(this.streamDetectTimer=setInterval((async()=>{if(this.client){const e=this.client.getICETransportStat(qx.STREAM_TYPE_MAIN);e&&this.updateStreamStat(e,qx.STREAM_TYPE_MAIN);const t=this.client.getICETransportStat(qx.STREAM_TYPE_AUX);t&&this.updateStreamStat(t,qx.STREAM_TYPE_AUX),this.updateConnectionQuality(this.getWsConnectionHealthStatus())}}),3e3))}},{key:"stopStreamStateDetection",value:function e(){this.streamDetectTimer&&(clearInterval(this.streamDetectTimer),this.streamDetectTimer=null,this.updateConnectionQuality(this.getWsConnectionHealthStatus()))}},{key:"updateConnectionQuality",value:function e(t){if(!this.client)return;const r=this.client.isSendingStream()?t:rL.NETWORK_QUALITY_UNKNOW,n=this.client.isReceivingStream()?t:rL.NETWORK_QUALITY_UNKNOW;this.updateSignalQuality(r,n)}},{key:"isAvailableStreamIncoming",value:function e(r){const n=r===qx.STREAM_TYPE_MAIN?this.streamStats.mainStream:this.streamStats.auxStream;return n.bytesIn.get()-n.bytesIn.pre()>t.getMinAvailableBytes()}},{key:"isAvailableStreamOutgoing",value:function e(r){const n=r===qx.STREAM_TYPE_MAIN?this.streamStats.mainStream:this.streamStats.auxStream;return n.bytesOut.get()-n.bytesOut.pre()>t.getMinAvailableBytes()}},{key:"updateStreamStat",value:function e(t,r){const n=r===qx.STREAM_TYPE_MAIN?this.streamStats.mainStream:this.streamStats.auxStream;this.logger.info(zD,"".concat(r," : bytesIn:").concat(t.bytesReceived," ,bytesOut:").concat(t.bytesSent)),n.bytesIn.set(t.bytesReceived),n.bytesOut.set(t.bytesSent)}},{key:"updateSignalQuality",value:function e(t,r){if(this.streamStats.upQuality.set(t),this.streamStats.downQuality.set(r),this.logger.info(zD,"upQuality:".concat(this.streamStats.upQuality.pre(),",").concat("".concat(t)," ,downQuality:").concat(this.streamStats.downQuality.pre(),",").concat("".concat(r))),this.streamStats.upQuality.isChanged()||this.streamStats.downQuality.isChanged()){const e={uplinkNetworkQuality:t,downlinkNetworkQuality:r};this.logger.info(zD,"emit network-quality:".concat(JSON.stringify(e))),this.eventEmitter.emit(HD.ConnectionQuality,e)}}},{key:"getInfo",value:function e(){return{moduleName:"HealthMonitor"}}}],[{key:"getMinAvailableBytes",value:function e(){return MP.low.bitrate/8*3}}])}(LD);function QD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const qD="Socket",$D="heartbeat",ej="reconnectingEnd";var tj=function(e){return e[e.normal=1e3]="normal",e[e.multiKickoff=4e3]="multiKickoff",e[e.authenticateFail=4001]="authenticateFail",e[e.kickoff=4002]="kickoff",e[e.releaseRoom=4003]="releaseRoom",e[e.heartbeatTimeout=4004]="heartbeatTimeout",e[e.serverReconnectReq=4005]="serverReconnectReq",e[e.serveReconnectReqWithoutSfu=4006]="serveReconnectReqWithoutSfu",e[e.signatureFail=4009]="signatureFail",e}(tj||{});let rj=0;let nj=function(e){function t(e,r,n){var i;a(this,t);i=f(this,t,[{emitter:!0,logger:n.logger,stat:n.stat}]),o(h(i),"callbacks",new Map),i.taskId=1e3,i.appId=e,i.edgeNodeDomains=r,i.clientConfig=n.clientConfig;const s=new YD;s.default(KP.IDLE).reset().set(KP.IDLE),i.wsStatus={state:s,isHeartbeat:!1,isWsReconnecting:!1,hasEverConnected:!1},i.healthMonitor=new JD(n),i.healthMonitor.on(HD.ConnectionQuality,i.getConnectionQualityListener()),i.wsReset();return i}p(t,e);return u(t,[{key:"setKeepAliveParams",value:function e(t){this.heartBeatConfig=t}},{key:"setTraceId",value:function e(t){this.traceId=t}},{key:"wsReset",value:function e(){var t;this.closeConnection(),this.traceId="",this.connectId="",this.wsUrl="",this.acsIP="",this.wsStatus.state.reset(),this.wsStatus.hasEverConnected=!1,this.userInfo=void 0,null===(t=this.healthMonitor)||void 0===t||t.reset()}},{key:"wsDisconnect",value:function e(){this.healthMonitor.off(HD.ConnectionQuality),this.wsReset(),this.healthMonitor=void 0}},{key:"getConnectionQualityListener",value:function e(){return e=>{this.emit(HD.ConnectionQuality,e)}}},{key:"wsConnect",value:async function e(t,r,n,i,o,a,s){this.logger.info(qD,"wsConnect, acsIP:".concat(r,", firstTimeout:").concat(o,", retryTimeout:").concat(a,", retryCount:").concat(i,",retryInterval:").concat(s)),this.wsStatus.isWsReconnecting&&(this.logger.info(qD,"wsConnect, waiting for reconnecting ending"),await this.stopReconnecting(),this.logger.info(qD,"wsConnect, reconnecting end")),this.acsIP=r,this.userInfo=t,this.wsStatus.state.set(KP.DISCONNECTED),await this.doConnect(r,n,i,o,a,s,!1)}},{key:"refreshUserInfo",value:function e(t){this.userInfo=t}},{key:"startHeartbeat",value:async function e(){try{if(this.wsStatus.isHeartbeat)return void this.logger.warn(qD,"startHeartbeat, isHeartbeat so return");this.wsStatus.isHeartbeat=!0;const e=async e=>await this.sendHeartbeat(e);return await KN.callWithRetryTimes(e,!0,-1,this.getAsyncInterval(1e3*this.heartBeatConfig.heartBeatPeriod),this.needInterrupted())}catch(e){this.logger.warn(qD,"startHeartbeat, error:".concat(e))}finally{this.wsStatus.isHeartbeat=!1}}},{key:"wsSendRequest",value:async function e(t,r,n,i,o){this.logger.debug(qD,"wsSendRequest: ".concat(t.type," - ").concat(t.requestId));return await KN.callWithRetryTimes((async e=>await this.wsSendReqOnce(t.requestId,t,r,n,e)),!1,i,this.getAsyncInterval(o),this.needInterrupted())}},{key:"wsSendResponse",value:function e(t){this.ws.send(t)}},{key:"generateRequestId",value:function e(){return this.traceId,this.traceId+"Web"+(this.taskId++).toString()}},{key:"doConnect",value:async function e(t,r,n,i,o,a,s){return await KN.callWithRetryTimes((async e=>await this.wsConnectOnce(t,r,i,o,e,s)),!1,n,this.getAsyncInterval(a),this.needInterrupted())}},{key:"wsConnectOnce",value:async function e(t,r,n,i,o,a){if([KP.IDLE,KP.CONNECTING].includes(this.wsStatus.state.get())||!this.userInfo)throw new oc(nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED);if(this.wsStatus.state.get()!==KP.DISCONNECTED)return this.logger.error(qD,"wsConnectOnce, cusState:".concat(this.wsStatus.state.get(),", not DISCONNECTED, return")),null;this.connectId=this.taskId.toString(),this.wsUrl=this.getWsUrl(t,a);const s=SI.getCurrentTimestamp();this.ws=new WebSocket(this.wsUrl),this.logger.info(qD,"wsConnectOnce, url:".concat(SI.shieldUrlParameters(this.wsUrl),", connectId:").concat(this.connectId,", begin create websocket connection with server ")),1!==o||a?this.triggerConnectStatesChangeEvent(KP.RECONNECTING):this.triggerConnectStatesChangeEvent(KP.CONNECTING),this.ws.onopen=this.onopen.bind(this),this.ws.onerror=this.onerror.bind(this),this.ws.onmessage=this.onmessage.bind(this),this.ws.onclose=this.onclose.bind(this);const u={id:((null==r?void 0:r.length)||0)+1,domain:this.edgeNodeDomains.get(t),start_ms:SI.getCurrentTimestamp(),delay_ms:0,stepName:"wsConnect",rspCode:"",errMsg:""};try{const e=1===o?n:i;await this.getConnectionResp(e),u.delay_ms=SI.getCurrentTimestamp()-u.start_ms,u.rspCode="101"}catch(e){throw this.logger.error(qD,"wsConnectOnce, connect occur exception, connectId:".concat(this.connectId,", error: ").concat(e)),u.delay_ms=SI.getCurrentTimestamp()-u.start_ms,"function"==typeof e.getCode&&(u.rspCode="".concat(e.getCode()),u.errMsg=e.getMsg()),e}finally{null==r||r.push(u);const e=SI.getCurrentTimestamp(),t={version:"v1",startTimestamp:s,traceId:this.xNuwaTraceId,spanId:this.xNuwaSpanId,parentSpanId:"0000000000000000",ip:"",source:"SDK",target:"WiseCloudRtcAccessService",spanName:"connect",status:"0",endTimestamp:e,url:"",httpMethod:"",requestSize:"",responseSize:"",statusCode:"",tag:"",Events:"",scope:"videortn"};this.stat.reportTraceInfo2Nuwa(t)}}},{key:"stopReconnecting",value:async function e(){let t=null;this.wsStatus.state.set(KP.IDLE);const r=[new Promise((e=>{this.callbacks.set(ej,(r=>{t&&clearTimeout(t),e(r)}))})),new Promise(((e,r)=>{t=setTimeout((()=>{r(new oc(nc.RTC_ERR_CODE_WEBSOCKET_RECONNECT_TIMEOUT))}),3e4)}))];return await Promise.race(r).then((e=>e)).finally((()=>{this.callbacks.delete(ej)}))}},{key:"getConnectionResp",value:async function e(r){const n=this.connectId;await KN.callWithTimeout(new Promise(((e,r)=>{this.callbacks.set(n,(i=>{if(i.isSuccess)this.logger.info(qD,"getConnectionResp, connectId:".concat(n,", connect success")),this.triggerConnectStatesChangeEvent(KP.CONNECTED),e();else{const e=t.newSocketException(i);this.logger.info(qD,"getConnectionResp, connectId:".concat(n,", connect fail, errMsg=").concat(e)),r(e)}}))})),r).catch((e=>{if(this.triggerConnectStatesChangeEvent(KP.DISCONNECTED),e.getCode()!==nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT)throw e;throw this.logger.error(qD,"getConnectionResp, connectId:".concat(n,", websocket connect timeout after ").concat(r," ms")),this.ws&&this.ws.readyState===this.ws.CONNECTING&&(this.logger.info(qD,"getConnectionResp, connectId:".concat(n,",websocket connect timeout, close webSocket manual")),this.ws.close()),new oc(nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT)})).finally((()=>{this.callbacks.delete(n)}))}},{key:"getWsUrl",value:function e(t,r){let n,i;this.xNuwaTraceId=SI.generateRandomId(32,16),this.xNuwaSpanId=SI.generateRandomId(16,16);let o,a="443";const s=/ws(?:s)?:\/\/([^/]+)(.*)/.exec(this.edgeNodeDomains.get(t));if(s&&3===s.length){const e=s[1].split(":");i=e[0],a=e[1]||"443",o=s[2]}else i=this.edgeNodeDomains.get(t),o="/websocket";const u=xM.getProxyServer();return n=u?/^http.*/.test(u)?u.replace("http","ws"):u.replace("https","wss"):"".concat("wss","://").concat(i,":").concat(a),n="".concat(n).concat(o,"?appId=").concat(escape(this.appId),"&roomId=").concat(escape(this.userInfo.roomId))+"&userId=".concat(escape(this.userInfo.userId),"&role=").concat(this.userInfo.roleSignalType,"&Authorization=").concat(escape(this.userInfo.signature))+"&ctime=".concat(this.userInfo.ctime,"&clientVersion=").concat(Ux,"&clientType=").concat(SI.getSystemType())+"&romVersion=".concat(SI.getRomVersion(),"&agentType=").concat(2,"&netType=").concat(SI.getNetworkType())+"&traceId=".concat(this.traceId,"&x-nuwa-trace-id=").concat(this.xNuwaTraceId,"&x-nuwa-span-id=").concat(this.xNuwaSpanId)+"&HoldTime=".concat(120).concat(r?"&reconnect=true":"")+"&instanceId=".concat(SI.getDeviceID().replace(/[-]/g,"")).concat(this.clientConfig.countryCode?"&clientCountryCode=".concat(this.clientConfig.countryCode):""),u&&(n="".concat(n,"&org_domain=").concat(i,"&org_port=").concat(a)),n}},{key:"cancelWsCloseCallBack",value:function e(){this.ws&&(this.ws.onclose=e=>{this.logger.info(qD,"cancelWsCloseCallBack, connect close,code:".concat(e.code,", reason:").concat(e.reason))})}},{key:"closeConnection",value:function e(){this.ws&&(this.logger.info(qD,"close ws when reset"),this.cancelWsCloseCallBack(),this.ws.close(),this.ws=null)}},{key:"triggerConnectStatesChangeEvent",value:function e(t,r){this.wsStatus.state.set(t);const n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?QD(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QD(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({prevState:YP[this.wsStatus.state.pre()],curState:YP[this.wsStatus.state.get()]},r);this.wsStatus.state.isChanged()&&(this.logger.info(qD,"triggerConnectStatesChangeEvent, emit:".concat(lx.ConnectionStateChanged,", body:").concat(JSON.stringify(n))),this.emit(HD.ConnectionStateChanged,n))}},{key:"needInterrupted",value:function e(){return e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED}},{key:"getAsyncInterval",value:function e(t){return e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT?0:t}},{key:"wsSendReqOnce",value:async function e(r,n,i,o,a){const s=t.removeWatchType(n),u=SI.getCurrentTimestamp();try{if(this.wsStatus.state.get()===KP.IDLE)throw new oc(nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED);if(!this.ws||this.ws.readyState!==this.ws.OPEN)throw new oc(nc.RTC_ERR_CODE_WEBSOCKET_NOT_OPEN);a>1&&this.logger.debug(qD,"wsSendReq: ".concat(r,", retry send message"));const e=JSON.stringify(s);this.ws.send(e),this.stat&&(this.stat.reportSignalReqForWeb2Server(s),this.stat.recordUploadRequsetInfo(n));const t=1===a?i:o;return await this.getResponse(s,t)}catch(e){throw this.logger.error(qD,"wsSendReq: ".concat(r,", type: ").concat(s.type,", tryNumber: ").concat(a,",error: ").concat(e)),"PING"===n.type&&this.healthMonitor.startStreamStateDetection(),this.recordWsException(n,e,u),e}finally{const e=this.stat.checkSignalSendMsgs((null==s?void 0:s.type)||""),t=s["x-nuwa-span-id"],r=SI.getCurrentTimestamp(),n={version:"v1",startTimestamp:u,traceId:s["x-nuwa-trace-id"],spanId:t,parentSpanId:e?"0000000000000000":this.stat.getParentSpanId(s["x-nuwa-span-id"]),ip:"",source:"SDK",target:"WiseCloudRtcAccessService",spanName:(null==s?void 0:s.type)||"",status:"0",endTimestamp:r,url:"",httpMethod:"",requestSize:"",responseSize:"",statusCode:"",tag:"",Events:"",scope:"videortn"};this.stat.reportTraceInfo2Nuwa(n)}}},{key:"recordWsException",value:function e(t,r,n){if("PING"!==t.type)switch(t.type){case"SUBS_STREAM":{const e=r.getCode(),n=r.getMsg();t.videoUpstreams&&this.stat.reportVideoSub(t.videoSubType,t.requestId,t.videoUpstreams,e,n),t.audioUpstreams&&this.stat.reportAudioSub(t.audioSubType,t.requestId,t.audioUpstreams,e);break}}else this.stat.reportSignalReqForHeartBeatLost(t,n)}},{key:"getResponse",value:async function e(t,r){let n=null;const i=[new Promise((e=>{const r="PING"===t.type?$D:t.requestId;this.callbacks.set(r,(t=>{n&&clearTimeout(n),e(t)}))})),new Promise(((e,t)=>{n=setTimeout((()=>{t(new oc(nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT))}),r)}))];return await Promise.race(i).finally((()=>{const e="PING"===t.type?$D:t.requestId;this.callbacks.delete(e)}))}},{key:"onopen",value:function e(t){this.callbacks.has(this.connectId)&&this.callbacks.get(this.connectId)({isSuccess:!0}),this.logger.info(qD,"onopen, wss[".concat(SI.shieldUrlParameters(this.wsUrl),"], connectId:").concat(this.connectId,", connect success, ").concat(JSON.stringify(t))),this.stat.setConnectionStatusInfo(Rx.CONNECTED,Ix.SIGNAL)}},{key:"onerror",value:function e(t){this.logger.error(qD,"onerror, connectId:".concat(this.connectId,", websocket occur error:").concat(JSON.stringify(t))),this.stat.setConnectionStatusInfo(Rx.CLOSED,Ix.SIGNAL),this.callbacks.has(this.connectId)&&this.callbacks.get(this.connectId)({isSuccess:!1})}},{key:"onmessage",value:function e(t){if(null==t||!t.data)return;const r=JSON.parse(t.data);this.wsStatus.hasEverConnected=!0,rj=0;const n=this.callbacks.get($D);if(n&&n(r),r.type)this.emit(HD.ReceiveData,r);else{const e=this.callbacks.get(r.requestId);e&&e(r)}this.stat.reportSignalReqForServer2Web(r);const i=this.stat.getDownloadRequestInfo(r);this.stat.recordDownloadRequestInfo(r);const o=this.stat.checkSignalReceiveMsgs((null==r?void 0:r.type)||""),a=SI.generateRandomId(16,16),s=r["x-nuwa-span-id"];o&&this.stat.setSpanId(s,a);const u=SI.getCurrentTimestamp(),c={version:"v1",startTimestamp:u,traceId:r["x-nuwa-trace-id"],spanId:a,parentSpanId:s,ip:"",source:"WiseCloudRtcAccessService",target:"SDK",spanName:(null==r?void 0:r.type)||i,status:"0",endTimestamp:u,url:"",httpMethod:"",requestSize:"",responseSize:"",statusCode:"",tag:"",Events:"",scope:"videortn"};this.stat.reportTraceInfo2Nuwa(c)}},{key:"onclose",value:async function e(r){const n=r.code,i=r.reason;if(this.logger.warn(qD,"onclose,connectId:".concat(this.connectId,", code:").concat(n,", reason:").concat(i)),this.stat.setConnectionStatusInfo(Rx.CLOSED,Ix.SIGNAL),this.callbacks.has(this.connectId)&&this.callbacks.get(this.connectId)({isSuccess:!1,code:n,reason:i}),this.triggerConnectStatesChangeEvent(KP.DISCONNECTED,{code:n,reason:i}),t.isServerAuthFail(n))this.handleServerAuthFail();else{if(!t.isSignatureFail(n))return t.isKickedOff(n)?(this.logger.warn(qD,"handleKickedOff, emit:".concat(HD.ClientBanned)),void this.emit(HD.ClientBanned)):t.isServerSessionValidateFail(n)?(this.logger.warn(qD,"onclose, emit:".concat(HD.SessionUnavailable)),void this.emit(HD.SessionUnavailable)):void(n===tj.heartbeatTimeout||n===tj.serveReconnectReqWithoutSfu||n>1e3&&n<4e3?await this.reconnect():this.logger.error(qD,"onclose, no handler"));this.handleSignatureFail()}}},{key:"handleServerAuthFail",value:function e(){this.logger.error(qD,"handleServerAuthFail, auth failed to leave room"),this.logger.warn(qD,"handleServerAuthFail, emit:".concat(HD.AuthenticateFail," ")),this.emit(HD.AuthenticateFail)}},{key:"handleSignatureFail",value:async function e(){this.logger.warn(qD,"handle signature fail, emit:".concat(HD.SignatureExpired)),this.wsStatus.hasEverConnected?(this.emit(HD.SignatureExpired,{type:"reconnect"}),rj<5?(this.logger.warn(qD,"signature expired, try reconnect: retry times: ".concat(rj+1)),await this.reconnect(),rj++):this.emit(HD.SessionUnavailable)):this.emit(HD.SignatureExpired,{type:"join"})}},{key:"reconnect",value:async function e(){if(this.logger.info(qD,"reconnect, not user call leave, network error, go ws reconnecting"),!this.wsStatus.hasEverConnected)return this.logger.info(qD,"reconnect, haven't connect yet, so return"),null;if(this.wsStatus.isWsReconnecting)return this.logger.info(qD,"reconnect, isWsReConnecting so return"),null;try{this.wsStatus.isWsReconnecting=!0;const e=12e3,t=1e3;await this.doConnect(this.acsIP,null,-1,e,e,t,!0),this.logger.info(qD,"wsReconnect, success");const r=this.callbacks.get(ej);r&&r("success"),this.logger.warn(qD,"emit:".concat(HD.Reconnected)),this.emit(HD.Reconnected)}catch(e){this.logger.error(qD,"wsReconnect, errMsg:".concat(e));const t=this.callbacks.get(ej);t&&t(e)}finally{this.wsStatus.isWsReconnecting=!1}}},{key:"sendHeartbeat",value:async function e(t){try{if([KP.IDLE,KP.CONNECTING].includes(this.wsStatus.state.get()))throw this.logger.info(qD,"sendHeartbeat, but wsStatus is IDLE or CONNECTING, interrupted"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED);if(!this.traceId)throw this.logger.error(qD,"sendHeartbeat, traceId is null"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED);const e={type:"PING",traceId:this.traceId,requestId:this.generateRequestId(),version:Wx,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};await this.wsSendRequest(e,1e3*this.heartBeatConfig.heartBeatPeriod,1e3*this.heartBeatConfig.heartBeatPeriod,this.heartBeatConfig.heartBeatRetryTimes,1e3*this.heartBeatConfig.heartBeatPeriod),this.healthMonitor.stopStreamStateDetection()}catch(e){this.logger.info(qD,"sendHeartbeat,father tryNumber:".concat(t,",child heartbeat retry out of limit:").concat(this.heartBeatConfig.heartBeatRetryTimes," and fail, error:").concat(e)),this.handleHeartbeatFail(e)}}},{key:"handleHeartbeatFail",value:function e(t){if("function"==typeof(null==t?void 0:t.getCode)&&t.getCode()===nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED)throw this.logger.warn(qD,"handleHeartbeatFail, ErrorCode.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED"),t;const r=this.healthMonitor.getWsConnectionHealthStatus();this.logger.warn(qD,"handleHeartbeatFail, healthStatus:".concat(r)),r===KD.Unavailable&&(this.logger.info(qD,"handleHeartbeatFail, connection unavailable when error:".concat(t)),this.logger.warn(qD,"emit:".concat(HD.ConnectionUnavailable)),this.emit(HD.ConnectionUnavailable))}},{key:"getInfo",value:function e(){return{moduleName:"Socket"}}}],[{key:"newSocketException",value:function e(t){if(t.isSuccess)return null;const r=nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR,n=t.code,i="".concat(n||""," websocket connect error");return new oc(r,i)}},{key:"removeWatchType",value:function e(t){if(null!=t&&t.watchType){const e=JSON.parse(JSON.stringify(t));return delete e.watchType,e}return t}},{key:"isServerAuthFail",value:function e(t){return[tj.authenticateFail,tj.releaseRoom].includes(t)}},{key:"isSignatureFail",value:function e(t){return[tj.signatureFail].includes(t)}},{key:"isKickedOff",value:function e(t){return[tj.multiKickoff,tj.kickoff].includes(t)}},{key:"isServerSessionValidateFail",value:function e(t){return[tj.serverReconnectReq].includes(t)}}])}(LD);let ij=function(e){return e[e.MAIN=0]="MAIN",e[e.DESKTOP=1]="DESKTOP",e}({}),oj=function(e){return e.SEND_RECV="sendrecv",e.SEND_ONLY="sendonly",e.RECV_ONLY="recvonly",e.INACTIVE="inactive",e}({}),aj=function(e){return e[e.cmdPayload=99]="cmdPayload",e}({}),sj=function(e){return e[e.opusPayload=112]="opusPayload",e}({}),uj=function(e){return e[e.rtxPayLoad=107]="rtxPayLoad",e[e.h264PayLoad=122]="h264PayLoad",e[e.redPayLoad=110]="redPayLoad",e[e.ulpfecPayLoad=127]="ulpfecPayLoad",e[e.fec03PayLoad=125]="fec03PayLoad",e}({}),cj=function(e){return e[e.fec03PayLoad=9e4]="fec03PayLoad",e}({}),lj=function(e){return e.H264="H264",e.H265="H265",e.H264H265="H264H265",e.OPUS="opus",e}({});const fj="signal",dj=5e3;let hj=function(e){function t(e,r,n){var i;a(this,t);i=f(this,t,[{emitter:!0,logger:n.logger,stat:n.stat},n.getSymbol()]),i.edgeNodeDomains=r,i.socket=new nj(e,r,n),i.onSocketEvent(),i.reset();return i}p(t,e);return u(t,[{key:"on",value:function e(r,i){n(t,"on",this,3)([r,i])}},{key:"off",value:function e(r,i){n(t,"off",this,3)([r,i])}},{key:"reset",value:function e(){var t;this.traceId="",this.isConnecting=!1,null===(t=this.socket)||void 0===t||t.wsReset()}},{key:"disconnect",value:function e(){var t;this.offSocketEvent(),this.reset(),null===(t=this.socket)||void 0===t||t.wsDisconnect(),this.socket=void 0}},{key:"getConnectionQualityListener",value:function e(){return e=>{this.emit(lx.NetworkQuality,e)}}},{key:"getConnectionStateChangedListener",value:function e(){return e=>{this.emit(lx.ConnectionStateChanged,e)}}},{key:"getSignatureExpiredListener",value:function e(){return e=>{this.emit(HD.SignatureExpired,e)}}},{key:"getReceiveDataListener",value:function e(){return e=>{this.receiveMsg(e)}}},{key:"getSessionUnavailableListener",value:function e(){return e=>{this.emit(HD.SessionUnavailable,e)}}},{key:"getConnectionUnavailableListener",value:function e(){return e=>{this.emit(HD.ConnectionUnavailable,e)}}},{key:"getReconnectedListener",value:function e(){return e=>{this.emit(HD.Reconnected,e)}}},{key:"getAuthenticateFailListener",value:function e(){return e=>{this.emit(HD.AuthenticateFail,e)}}},{key:"getKickedOffListener",value:function e(){return e=>{this.emit(HD.ClientBanned,e)}}},{key:"onSocketEvent",value:function e(){this.socket&&(this.socket.on(HD.ConnectionQuality,this.getConnectionQualityListener()),this.socket.on(HD.ConnectionStateChanged,this.getConnectionStateChangedListener()),this.socket.on(HD.SignatureExpired,this.getSignatureExpiredListener()),this.socket.on(HD.ReceiveData,this.getReceiveDataListener()),this.socket.on(HD.SessionUnavailable,this.getSessionUnavailableListener()),this.socket.on(HD.ConnectionUnavailable,this.getConnectionUnavailableListener()),this.socket.on(HD.Reconnected,this.getReconnectedListener()),this.socket.on(HD.AuthenticateFail,this.getAuthenticateFailListener()),this.socket.on(HD.ClientBanned,this.getKickedOffListener()))}},{key:"offSocketEvent",value:function e(){this.socket&&(this.socket.off(HD.ConnectionQuality),this.socket.off(HD.ConnectionStateChanged),this.socket.off(HD.SignatureExpired),this.socket.off(HD.ReceiveData),this.socket.off(HD.SessionUnavailable),this.socket.off(HD.ConnectionUnavailable),this.socket.off(HD.Reconnected),this.socket.off(HD.AuthenticateFail),this.socket.off(HD.ClientBanned))}},{key:"getRandomAcsIp",value:function e(){let t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(1===this.edgeNodeDomains.size||r)return this.selectedAcsIp="default",this.selectedAcsIp;let n=0;return this.selectedAcsIp?(t=[...this.edgeNodeDomains.keys()].filter((e=>"default"!==e&&e!==this.selectedAcsIp)),t.length<1||(n=Math.round(SI.getRandom()*(t.length-1)),this.selectedAcsIp=t[n]),this.selectedAcsIp):(t=[...this.edgeNodeDomains.keys()].filter((e=>"default"!==e)),n=Math.round(SI.getRandom()*(t.length-1)),this.selectedAcsIp=t[n],this.selectedAcsIp)}},{key:"connect",value:async function e(t,r){if(this.isConnecting)return this.logger.info(fj,"connect, isConnecting so return"),null;this.traceId=SI.generateStandardUuid(),this.socket.setTraceId(this.traceId);try{this.isConnecting=!0;const e=async e=>await this.connectOnce(t,r,e);return await KN.callWithRetryTimes(e,!1,2,this.getAsyncInterval(),this.needInterrupted())}finally{this.isConnecting=!1}}},{key:"refreshUserInfo",value:function e(t){this.socket.refreshUserInfo(t)}},{key:"needInterrupted",value:function e(){return e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED}},{key:"getAsyncInterval",value:function e(){return()=>Math.round(500*SI.getRandom()+500)}},{key:"connectOnce",value:async function e(r,n,i){const o=this.getRandomAcsIp(t.isLastTry(2,i));if(!o)throw this.logger.error(fj,"selectedAcsIP is null"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED,"no available servers to connect");return await this.socket.wsConnect(r,o,n,0,1e4,0,0),"default"===o?this.edgeNodeDomains.get("default"):o}},{key:"join",value:async function e(r,n,i,o,a,s,u,c){return new Promise(((e,l)=>{const f=t.setJoinRequest(r,n,i,o,a,s,u,c);this.sendRequest(f).then((t=>{var r;0!==t.resultCode?(this.logger.error(fj,"join code:".concat(t.resultCode,",msg:").concat(t.resultMessage)),l(new oc(Number(t.resultCode),t.resultMessage))):(null===(r=t.userInfos)||void 0===r||r.forEach((e=>{AI.addPrivacyString(e.userId),AI.addPrivacyString(e.appData.nickname)})),e(t))})).catch((e=>{l(e)}))}))}},{key:"subscribe",value:async function e(t,r,n){const i={type:"SUBS_STREAM",videoUpstreams:t,audioUpstreams:r,videoSubType:1,audioSubType:1,watchType:n,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)},o=await this.sendRequest(i);if(0!==o.resultCode){const e=JSON.stringify(i);throw this.logger.error(fj,"subscribe fail,err_code:".concat(o.resultCode,",")+"error_msg:".concat(o.resultMessage,",request ").concat(e)),new oc(Number(o.resultCode),o.resultMessage)}return this.logger.info(fj,"subscribe send msg result:".concat(o.resultMessage)),o}},{key:"queryRoomUsers",value:async function e(t){var r;const n={type:"GET_ROOM_USERINFO","x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};null!=t&&t.length&&(n.userIds=t);const i=await this.sendRequest(n);if(0!==i.resultCode)throw this.logger.error(fj,"queryRoomUsers fail,err_code:".concat(i.resultCode,",error_msg:").concat(i.resultMessage)),new oc(Number(i.resultCode),i.resultMessage);return null===(r=i.userInfos)||void 0===r||r.forEach((e=>{AI.addPrivacyString(e.userId),AI.addPrivacyString(e.appData.nickname)})),this.logger.info(fj,"queryRoomUsers send msg result:".concat(i.resultMessage)),i}},{key:"leave",value:async function e(){try{const e=await this.sendRequest({type:"EXIT_ROOM"});if(0!==e.resultCode)throw this.logger.error(fj,"leave, exit room, err_code:".concat(e.resultCode,",error_msg:").concat(e.resultMessage)),new oc(Number(e.resultCode),e.resultMessage);const t=await this.sendRequest({type:"BYE"});if(0!==t.resultCode)throw this.logger.error(fj,"leave, exit room, err_code:".concat(t.resultCode,",error_msg:").concat(t.resultMessage)),new oc(Number(t.resultCode),t.resultMessage)}catch(e){throw new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR)}}},{key:"changeStreamStatus",value:async function e(t){try{return t.type="CHANGE_STREAM_STATUS",await this.sendRequest(t)}catch(e){throw this.logger.error(fj,"changeStreamStatus fail, error:".concat(e)),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR)}}},{key:"switchRole",value:async function e(r,n){const i=t.setSwitchRoleRequest(r,n),o=await this.sendRequest(i);if(0!==o.resultCode)throw this.logger.error(fj,"switch user role fail,err_code:".concat(o.resultCode,",error_msg:").concat(o.resultMessage)),new oc(Number(o.resultCode),o.resultMessage);return o}},{key:"pushStreamResponse",value:async function e(t){this.logger.info(fj,"pushStreamRep send msg start:");try{await this.socket.wsSendResponse(JSON.stringify(t)),this.logger.info(fj,"pushStreamRep send response")}catch(e){throw this.logger.error(fj,"pushStreamRep send response fail, errMsg = ".concat(e)),new oc(nc.RTC_ERR_CODE_PUBLISH_RESPONSE_FAIL)}}},{key:"keepAlive",value:function e(){this.logger.info(fj,"keepAlive"),this.socket.startHeartbeat()}},{key:"sendRequest",value:async function e(t){return this.assignCommonMsgInfo(t),await this.socket.wsSendRequest(t,dj,dj,2,dj)}},{key:"assignCommonMsgInfo",value:function e(t){Object.assign(t,{traceId:this.traceId,requestId:this.socket.generateRequestId(),version:Wx,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)})}},{key:"publish",value:async function e(t){return new Promise(((e,r)=>{const n=[],i=[];t.forEach((e=>{e.codec===lj.H264?(this.mobileBrowserInvertedWidthAndHeight(e),n.push({content:e.content,mute:e.mute,width:e.width,height:e.height,fps:e.fps,maxFs:e.maxFs,maxMbps:e.maxMbps,codec:e.codec,pt:e.pt,streamData:e.streamData,streamUid:e.streamUid,ssrc:e.ssrc,createDate:e.createDate})):e.codec===lj.OPUS&&i.push({content:e.content,mute:e.mute,channels:e.channels,sampleRate:e.sampleRate,maxMbps:e.maxMbps,codec:e.codec,pt:e.pt,streamData:e.streamData,streamUid:e.streamUid,ssrc:e.ssrc,createDate:e.createDate})}));const o={type:"PUSH_STREAM_RES_ALL",pushStreamType:0,videoStreams:n,audioStreams:i,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};this.sendRequest(o).then((t=>{0!==t.resultCode?(this.logger.error(fj,"publish resp code:".concat(t.resultCode,",msg:").concat(t.resultMessage)),r(new oc(Number(t.resultCode),t.resultMessage))):e(t)})).catch((e=>{r(e)}))}))}},{key:"mobileBrowserInvertedWidthAndHeight",value:function e(t){if(SI.isMobileBrowser()){const e=t.width;t.width=t.height,t.height=e,this.logger.info(fj,"Invert Resolution")}}},{key:"appData",value:async function e(t,r,n){return new Promise(((e,i)=>{const o={};Object.assign(o,t),o[r]=n;const a={type:"APP_DATA",appData:o};this.sendRequest(a).then((t=>{0!==t.resultCode?(this.logger.error(fj,"appset code:".concat(t.resultCode,",msg:").concat(t.resultMessage)),i(new oc(Number(t.resultCode),t.resultMessage))):e(t)})).catch((e=>{i(e)}))}))}},{key:"changeAudioPolicy",value:async function e(t){return new Promise(((e,r)=>{const n={type:"AUDIO_POLICY",audioPolicy:t,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};this.sendRequest(n).then((i=>{if(0!==i.resultCode){const e=JSON.stringify(n);this.logger.error(fj,"change audioPolicy code:".concat(i.resultCode,",audioPolicy:").concat(t,",msg:").concat(i.resultMessage," request ").concat(e)),r(new oc(Number(i.resultCode),i.resultMessage))}else this.logger.info(fj,"change audioPolicy ".concat(t," success")),e(i)})).catch((e=>{this.logger.info(fj,"change audioPolicy ".concat(t," exception")),r(e)}))}))}},{key:"updateLiveStreaming",value:async function e(t,r,n){return new Promise(((e,i)=>{const o={type:"UPDATE_PUBLISH",traceId:SI.generateStandardUuid(),taskId:t,config:r,userInfos:n,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};this.sendRequest(o).then((t=>{if(0!==t.resultCode){const e=JSON.stringify(o);this.logger.error(fj,"updateLiveStreaming code:".concat(t.resultCode,", msg:").concat(t.resultMessage,", request ").concat(e)),i(new oc(Number(t.resultCode),t.resultMessage))}else this.logger.info(fj,"updateLiveStreaming success"),e(t)})).catch((e=>{this.logger.info(fj,"updateLiveStreaming failed: ".concat(e)),i(e)}))}))}},{key:"startLiveStreaming",value:async function e(t,r,n,i){return new Promise(((e,o)=>{const a={type:"START_PUBLISH",traceId:SI.generateStandardUuid(),taskId:t,config:n,userInfos:i,urls:r,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};this.sendRequest(a).then((t=>{if(0!==t.resultCode){const e=JSON.stringify(a);this.logger.error(fj,"startLiveStreamRequest code:".concat(t.resultCode,", msg:").concat(t.resultMessage,", request ").concat(e)),o(new oc(Number(t.resultCode),t.resultMessage))}else this.logger.info(fj,"startLiveStreamRequest success"),e(t)})).catch((e=>{this.logger.info(fj,"startLiveStreamRequest failed: ".concat(e)),o(e)}))}))}},{key:"stopLiveStreaming",value:async function e(t){return new Promise(((e,r)=>{const n={type:"STOP_PUBLISH",traceId:SI.generateStandardUuid(),taskId:t,"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)};this.sendRequest(n).then((t=>{if(0!==t.resultCode){const e=JSON.stringify(n);this.logger.error(fj,"stopLiveStreaming code:".concat(t.resultCode,", msg:").concat(t.resultMessage,", request ").concat(e)),r(new oc(Number(t.resultCode),t.resultMessage))}else this.logger.info(fj,"stopLiveStreaming success"),e(t)})).catch((e=>{this.logger.info(fj,"stopLiveStreaming failed: ".concat(e)),r(e)}))}))}},{key:"receiveMsg",value:function e(t){if(t.type)switch(qP.has("".concat(t.type))||this.logger.info(fj,"message type: ".concat(t.type)),t.type){case $P.statusChangeNotify:var r;null===(r=t.infos)||void 0===r||r.forEach((e=>{AI.addPrivacyString(e.userId),AI.addPrivacyString(e.appData.nickname)})),this.emit($P.statusChangeNotify,t);break;case $P.uploadLogNotify:this.emit($P.uploadLogNotify,t);break;case $P.pushStreamNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.pushStreamNotify,t);break}case $P.stopPushStreamNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.stopPushStreamNotify,t);break}case $P.watchStreamNotify:this.emit($P.watchStreamNotify,t);break;case $P.changeStreamStatusNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.changeStreamStatusNotify,t);break}case $P.disconnectNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.disconnectNotify,t);break}case $P.reconnectNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.reconnectNotify,t);break}case $P.configNotify:this.emit($P.configNotify,t);break;case $P.appDataChangeNotify:{const e=t;AI.addPrivacyString(e.userId),this.emit($P.appDataChangeNotify,t);break}case $P.top3AudioVolumeNotify:var n;null===(n=t.topUserAudios)||void 0===n||n.forEach((e=>{AI.addPrivacyString(e.userId)})),this.emit($P.top3AudioVolumeNotify,t);break;case $P.publishStatusNotify:this.emit($P.publishStatusNotify,t);break;case $P.roomStreamStatusNotify:this.emit($P.roomStreamStatusNotify,t);break;case $P.kickRoomNotify:this.emit($P.kickRoomNotify);break;default:this.logger.error(fj,"unknown message type ".concat(t.type))}else this.logger.error(fj,"unknown message:".concat(t))}},{key:"setConfigParams",value:function e(t){this.socket.setKeepAliveParams(t)}},{key:"getInfo",value:function e(){return{traceId:this.traceId}}},{key:"mediaRelay",value:function e(t,r,n){return new Promise(((e,i)=>{var o,a,s;const u={type:"ROOM_MEDIA_RELAY",srcRoomToken:{roomId:n.roomId,userId:(null===(o=t.srcRoomRelayInfo)||void 0===o?void 0:o.userId)||"0",role:0===n.role?WD.JOINER:WD.PLAYER,ctime:null===(a=t.srcRoomRelayInfo)||void 0===a?void 0:a.ctime,token:null===(s=t.srcRoomRelayInfo)||void 0===s?void 0:s.authorization}};u[r?"addDstRoomInfo":"removeDstRoomInfo"]=t.dstRoomRelayInfo.map((e=>({roomId:e.roomId,userId:n.userId,role:0===e.role?WD.JOINER:WD.PLAYER,ctime:e.ctime,token:e.authorization}))),this.sendRequest(u).then((t=>{0!==t.resultCode?i(new oc(Number(t.resultCode),t.resultMessage)):(this.logger.info(fj,"mediaRelay success"),e(t))})).catch((e=>{this.logger.info(fj,"mediaRelay failed: ".concat(e)),i(e)}))}))}}],[{key:"isLastTry",value:function e(t,r){return r===t+1}},{key:"setJoinRequest",value:function e(t,r,n,i,o,a,s,u){const c={type:"JOIN_ROOM",sdp:{secCap:"sec3.0",sfuType:zM.getParameter(UM)||tL.COMMON_SFU_RESOURCE,crypto:{type:1},frameType:zM.getParameter(WM)||fx.NON_ENCRYPTION,audios:[{content:ex.main,codecs:[{codec:lj.OPUS,pt:sj.opusPayload,ability:2}],audioLevel:3}],videos:[{content:ex.main,codecs:[{codec:lj.H264,pt:uj.h264PayLoad,ability:2}]},{content:ex.slides,codecs:[{codec:lj.H264,pt:uj.h264PayLoad,ability:2}]}],desktopVideos:[{content:ex.desktop,codecs:[{codec:lj.H264,pt:uj.h264PayLoad,ability:2}]}],audioPolicy:i,bandwidths:o},negSdp:[{type:ij.MAIN,sdp:r},{type:ij.DESKTOP,sdp:n}],scenario:1,relayMode:0,agentType:2,appData:t.appData,mediaData:{portType:a},"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)},l=zM.getParameter(VM);return l&&(c.sdp.resourceTags=l),s&&(c.sdp.command={codecs:[{codec:lj.OPUS,pt:aj.cmdPayload}],content:"cmd=1"}),Object.assign(c.mediaData,u||{}),c}},{key:"setSwitchRoleRequest",value:function e(t,r){return{type:"SWITCH_ROLE",role:t===UD?WD.JOINER:WD.PLAYER,authorization:r.signature,ctime:parseInt(r.ctime),"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16)}}}])}(LD);let pj=function(){function e(){a(this,e);this.audioStreams=new Map,this.logger=AI.getLogger()}return u(e,[{key:"getAudioStreams",value:function e(){return[...this.audioStreams.values()]}},{key:"getAudioStream",value:function e(t){return this.audioStreams.get(t)}},{key:"addAudioStream",value:function e(t,r){const n={audioPlayer:null,audioMediaTrack:null,streamId:t,ssrc:r,playStatus:"init"};this.audioStreams.set(t,n)}},{key:"updateAudioStream",value:function e(t,r){const n=this.audioStreams.get(t);n.audioMediaTrack=r,n.audioPlayer=new CN({logger:this.logger,playerId:t,track:r})}},{key:"getAudioLevel",value:function e(){const t=[];for(const e of this.audioStreams.values()){var r;t.push({streamId:e.streamId,ssrc:e.ssrc,level:null===(r=e.audioPlayer)||void 0===r?void 0:r.getAudioLevel()})}return t}},{key:"setAudioOutput",value:async function e(t){if("sinkId"in HTMLMediaElement.prototype&&t)for(const e of this.audioStreams.values())await e.audioPlayer.setSinkId(t)}},{key:"setAudioVolume",value:function e(t){const r=t/100;for(const e of this.audioStreams.values()){var n;if("notAllow"===e.playStatus)this.resume(e.streamId).then((()=>{var t;null===(t=e.audioPlayer)||void 0===t||t.setVolume(r)}));else null===(n=e.audioPlayer)||void 0===n||n.setVolume(r)}}},{key:"muteAudio",value:function e(t){for(const e of this.audioStreams.values())t||"notAllow"!==e.playStatus?e.audioMediaTrack.enabled=!t:this.resume(e.streamId).then((()=>{e.audioMediaTrack.enabled=!t}))}},{key:"isAudioMuted",value:function e(){const t=Array.from(this.audioStreams.values());return!t.every((e=>"normal"===e.playStatus))||!t.every((e=>e.audioMediaTrack.enabled))}},{key:"play",value:async function e(t){return new Promise(((e,r)=>{for(const o of this.audioStreams.values()){var n;if(t){if(o.streamId===t){var i;null===(i=o.audioPlayer)||void 0===i||i.play().then((()=>{o.playStatus="normal",e(null)})).catch((e=>{this.logger.error("RemoteTopNAudioStreams","resume failed, error: ".concat(e)),o.playStatus="notAllow",r(e)}));break}}else null===(n=o.audioPlayer)||void 0===n||n.play().then((()=>{o.playStatus="normal",e(null)})).catch((e=>{this.logger.error("RemoteTopNAudioStreams","resume failed, error: ".concat(e)),o.playStatus="notAllow",r(e)}))}}))}},{key:"resume",value:async function e(t){for(const e of this.audioStreams.values())try{var r;if(t){if(e.streamId===t){var n;await(null===(n=e.audioPlayer)||void 0===n?void 0:n.resume()),e.playStatus="normal";break}}else await(null===(r=e.audioPlayer)||void 0===r?void 0:r.resume()),e.playStatus="normal"}catch(t){this.logger.error("RemoteTopNAudioStreams","resume failed, error: ".concat(t)),e.playStatus="notAllow"}}},{key:"setAudioVolume4Id",value:function e(t,r){for(const e of this.audioStreams.values())if(e.streamId===t&&e.audioPlayer){"notAllow"===e.playStatus?this.resume(t).then((()=>{e.audioPlayer.setVolume(r/100)})):e.audioPlayer.setVolume(r/100);break}}},{key:"close",value:function e(t){if(t&&this.audioStreams.has(t)){const e=this.audioStreams.get(t);return e.audioPlayer.stop(),e.audioMediaTrack=null,e.audioPlayer=null,e.playStatus="init",void this.audioStreams.delete(t)}for(const e of this.audioStreams.values())e.audioPlayer.stop(),e.audioMediaTrack=null,e.audioPlayer=null,e.playStatus="init";this.audioStreams.clear()}}])}();const vj="LocalStreamPublishManager";let mj=function(){function e(){a(this,e);this.logger=AI.getLogger(),this.localStreams=new Map,this.sdpRepInfo=null}return u(e,[{key:"reset",value:function e(){Array.from(this.localStreams.values()).forEach((e=>{e.localTrackPublishInfos.clear()})),this.logger.info(vj,"reset successfully")}},{key:"getStreamTrackInfo",value:function e(t){const r=[];let n;return t.getHRTCTracks({hasTrack:!0}).forEach((e=>{const i=e.getTrackProfile();if(e.getTrackType()===Qx.TRACK_TYPE_AUDIO)e.setTrackId(this.sdpRepInfo.audio.streamCodecs[0].streamUid.toString()),n={type:Qx.TRACK_TYPE_AUDIO,resolutionId:e.getResolutionId(),upstream:{content:ex.main,mute:e.getTrackMuted(),maxMbps:Math.round((i.bitrate||0)/1e3),sampleRate:i.sampleRate,channels:i.channelCount,codec:lj.OPUS,pt:sj.opusPayload,streamUid:this.sdpRepInfo.audio.streamCodecs[0].streamUid,ssrc:this.sdpRepInfo.audio.sendSsrcBegin}};else{let r;if(t.isAuxiliary())e.setTrackId(this.sdpRepInfo.desktopVideo.streamCodecs[0].streamUid.toString()),r={content:ex.desktop,mute:e.getTrackMuted(),width:i.width,height:i.height,fps:i.frameRate,maxMbps:Math.round((i.maxBitrate||0)/1e3),maxFs:i.frameRate,codec:lj.H264,pt:uj.h264PayLoad,streamUid:this.sdpRepInfo.desktopVideo.streamCodecs[0].streamUid,ssrc:this.sdpRepInfo.desktopVideo.sendSsrcBegin};else{const t=e.getTrackContentType(),n=this.sdpRepInfo.video.streamCodecs.find((e=>e.content===t)).streamUid;e.setTrackId(n.toString()),r={content:t,mute:e.getTrackMuted(),width:i.width,height:i.height,fps:i.frameRate,maxMbps:Math.round((i.maxBitrate||0)/1e3),maxFs:i.frameRate,codec:lj.H264,pt:uj.h264PayLoad,streamUid:n,ssrc:t===ex.main?this.sdpRepInfo.video.sendSsrcBegin:this.sdpRepInfo.video.sendSsrcEnd}}n={type:Qx.TRACK_TYPE_VIDEO,resolutionId:e.getResolutionId(),upstream:r}}r.push(n)})),this.logger.debug(vj,"getStreamTrackInfo, get trackInfos: ".concat(JSON.stringify(r))),r}},{key:"getLocalStream",value:function e(t){const r=this.localStreams.get(t);return r?r.localStream:null}},{key:"generatePubInfoWhenPublish",value:function e(t,r){const n={allTracks2Publish:[],tracks2NewPublish:[],tracks2KeepPublish:[],tracks2UnPublish:[]},i=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,o=this.localStreams.get(i);return o&&0!==o.localTrackPublishInfos.size?this.isSameStreamId(t)?this.updateStream(t,n):this.replaceStream(t,n):this.addStream(t,n,r),this.buildAll2PublishTrackInfo(n.allTracks2Publish,t.isAuxiliary(),!0),this.logger.info(vj,"generatePubInfoWhenPublish tracks2Update input: ".concat(JSON.stringify(n))),n}},{key:"setSdpRepInfo",value:function e(t){this.sdpRepInfo=t}},{key:"buildAll2PublishTrackInfo",value:function e(t,r,n){r?(this.buildMediaPubInfo(t,Qx.TRACK_TYPE_VIDEO,qx.STREAM_TYPE_MAIN),this.buildMediaPubInfo(t,Qx.TRACK_TYPE_AUDIO,qx.STREAM_TYPE_MAIN),n&&this.buildMediaPubInfo(t,Qx.TRACK_TYPE_VIDEO,qx.STREAM_TYPE_AUX)):(this.buildMediaPubInfo(t,Qx.TRACK_TYPE_VIDEO,qx.STREAM_TYPE_AUX),n&&(this.buildMediaPubInfo(t,Qx.TRACK_TYPE_VIDEO,qx.STREAM_TYPE_MAIN),this.buildMediaPubInfo(t,Qx.TRACK_TYPE_AUDIO,qx.STREAM_TYPE_MAIN)))}},{key:"buildMediaPubInfo",value:function e(t,r,n){var i;const o=null===(i=this.localStreams.get(n))||void 0===i?void 0:i.localTrackPublishInfos;o&&Array.from(o.values()).filter((e=>e.type===r)).forEach((e=>{e.sender&&(e.upstream.mute=!e.sender.track.enabled),t.push(e)}))}},{key:"isSameStreamId",value:function e(t){const r=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN;return this.localStreams.get(r).streamId===t.getLocalId()}},{key:"updateStream",value:function t(r,n){this.logger.info(vj,"updateStream, update stream begin");const i=[],o=r.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,a=this.getStreamTrackInfo(r),s=this.localStreams.get(o);a.forEach((e=>{const t=s.localTrackPublishInfos.get(e.resolutionId);i.push(e),t?(t.upstream.mute=e.upstream.mute,t.published&&n.tracks2KeepPublish.push(t),t.watched&&!t.published&&n.tracks2NewPublish.push(t)):this.addTrack(o,e,n,s)}));const u=[];Array.from(s.localTrackPublishInfos.values()).forEach((t=>{const r=i.find((e=>e.resolutionId===t.resolutionId));if(r){if(!e.isSameResolution(r,t)){const e={type:r.type,resolutionId:r.resolutionId,upstream:r.upstream,published:t.published,watched:t.watched,ssrc:t.ssrc,sender:t.sender};s.localTrackPublishInfos.set(r.resolutionId,e)}}else t.published&&n.tracks2UnPublish.push(t),u.push(t.resolutionId)})),u.forEach((e=>{s.localTrackPublishInfos.delete(e)})),this.logger.info(vj,"updateStream, update stream ".concat(r.getLocalId()," successfully\n ").concat(e.getString4TrackPublishInfos(s.localTrackPublishInfos)))}},{key:"replaceStream",value:function e(t,r){return this.logger.info(vj,"replaceStream begin"),this.addStream(t,r)}},{key:"addStream",value:function t(r,n,i){const o=r.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,a=this.getStreamTrackInfo(r),s={localStream:r,streamId:r.getLocalId(),localTrackPublishInfos:new Map};a.forEach((e=>{this.addTrack(o,e,n,s,i)})),this.localStreams.set(o,s),this.logger.info(vj,"addStream, add stream ".concat(r.getLocalId()," successfully ,\n ").concat(e.getString4TrackPublishInfos(s.localTrackPublishInfos)))}},{key:"generatePubInfoWhenUnPublish",value:function e(t){const r=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,n={allTracks2Publish:[],tracks2KeepPublish:[],tracks2NewPublish:[],tracks2UnPublish:[]},i=this.localStreams.get(r);return i?(Array.from(i.localTrackPublishInfos.values()).filter((e=>e.published)).forEach((e=>{n.tracks2UnPublish.push(e)})),this.buildAll2PublishTrackInfo(n.allTracks2Publish,t.isAuxiliary(),!1),n):(this.logger.warn(vj,"stream not publish"),n.allTracks2Publish=null,n)}},{key:"removeStream",value:function e(t){const r=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN;if(!this.localStreams.has(r))throw this.logger.error(vj,"removeStream, stream not exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);this.localStreams.delete(r)}},{key:"generatePubInfoWhenWatch",value:function e(t,r,n,i){if(this.logger.info(vj,"generatePubInfoWhenWatch watch ".concat(t," streams")),!r||!n)return null;const o={allTracks2Publish:null,tracks2KeepPublish:[],tracks2NewPublish:[],tracks2UnPublish:[]},a=this.localStreams.get(t);if(!a)return this.logger.info(vj,"generatePubInfoWhenWatch, stream not exist"),null;const s=Array.from(a.localTrackPublishInfos.values());return 0===r.length&&0===n.length?s.forEach((e=>{this.renewTrack2Update(!1,e,o)})):i===Qx.TRACK_TYPE_VIDEO&&0===r.length&&n.length>0&&s.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).forEach((e=>{this.renewTrack2Update(!1,e,o)})),s.forEach((e=>{if(r.length>0&&e.type===Qx.TRACK_TYPE_VIDEO){const t=r.find((t=>t===e.upstream.ssrc));this.renewTrack2Update(!!t,e,o)}if(n.length>0&&e.type===Qx.TRACK_TYPE_AUDIO){const t=n.find((t=>t===e.upstream.ssrc));this.renewTrack2Update(!!t,e,o)}})),r.forEach((e=>{s.some((t=>e===t.upstream.ssrc))||this.logger.error(vj,"generatePubInfoWhenWatch, watch video ssrc:".concat(e," is not exist"))})),n.forEach((e=>{s.some((t=>e===t.upstream.ssrc))||this.logger.error(vj,"generatePubInfoWhenWatch, watch audio ssrc:".concat(e," is not exist"))})),o}},{key:"renewTrack2Update",value:function e(t,r,n){t?r.published?(n.tracks2KeepPublish.push(r),this.logger.info(vj,"generatePubInfoWhenWatch, keep ".concat(r.type," ssrc:").concat(r.ssrc))):(r.watched=!0,n.tracks2NewPublish.push(r),this.logger.info(vj,"generatePubInfoWhenWatch, new publish ".concat(r.type," ssrc:").concat(r.ssrc))):r.published&&(r.watched=!1,n.tracks2UnPublish.push(r),this.logger.info(vj,"generatePubInfoWhenWatch, new unpublish ".concat(r.type," ssrc:").concat(r.ssrc)))}},{key:"addTrack",value:function t(r,n,i,o,a){const s=e.getDefaultWatchFlag(r,n.type,a),u={type:n.type,resolutionId:n.resolutionId,published:!1,watched:s,upstream:n.upstream,ssrc:n.upstream.ssrc,sender:null};u.watched&&i.tracks2NewPublish.push(u),o.localTrackPublishInfos.set(n.resolutionId,u),this.logger.info(vj,"addTrack, add track for resolutionId ".concat(n.resolutionId," successfully"))}},{key:"publishAuxVideoTrackOK",value:function e(t,r){this.publishTrackSuccess(qx.STREAM_TYPE_AUX,Qx.TRACK_TYPE_VIDEO,t,r)}},{key:"publishMainVideoTrackOK",value:function e(t,r,n){this.publishTrackSuccess(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO,t,r,n)}},{key:"publishMainAudioTrackOK",value:function e(t,r){this.publishTrackSuccess(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO,t,r)}},{key:"publishTrackSuccess",value:function e(t,r,n,i,o){const a=this.localStreams.get(t);if(!a)throw this.logger.error(vj,"stream is empty"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const s=this.getTrackInfo(a,r,o);if(!s)throw this.logger.error(vj,"getTrackInfo return empty"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);s.published&&this.logger.info(vj,"stream already published"),s.published=!0,s.sender=n,this.logger.info(vj,"publish track for trackId: ".concat(o," successfully"))}},{key:"unPublishTrackSuccess",value:function e(t,r,n){const i=this.localStreams.get(t);if(!i)throw this.logger.error(vj,"stream is empty"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(r===Qx.TRACK_TYPE_VIDEO&&!n)throw this.logger.error(vj,"video trackId is empty"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const o=this.getTrackInfo(i,r,n);o?(o.published||this.logger.info(vj,"stream already unPublished"),o.published=!1,o.sender=null,this.logger.info(vj,"unPublish track for trackId: ".concat(n," successfully"))):this.logger.info(vj,"getTrackInfo return empty")}},{key:"getMainStreamVideoPublishInfo",value:function e(){return this.getTrackPublishInfos(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO)}},{key:"getPublishedMainVideoTrackInfo",value:function e(t){const r=this.getTrackPublishInfo(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO,t);return null!=r&&r.published&&r.sender?r:null}},{key:"getPublishedMainAudioTrackInfo",value:function e(){const t=this.getTrackPublishInfo(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO);return null!=t&&t.published&&t.sender?t:null}},{key:"getPublishedAuxVideoTrackInfo",value:function e(){const t=this.getTrackPublishInfo(qx.STREAM_TYPE_AUX,Qx.TRACK_TYPE_VIDEO);return null!=t&&t.published&&t.sender?t:null}},{key:"getPublishedMainVideoTrackInfos",value:function e(){const t=this.getTrackPublishInfos(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO);return(null==t?void 0:t.length)>0?t.filter((e=>e.published&&e.sender)):null}},{key:"getPublishedMainStreamInfos",value:function e(){const t=this.getTrackPublishInfos(qx.STREAM_TYPE_MAIN);return(null==t?void 0:t.length)>0?t.filter((e=>e.published&&e.sender)):null}},{key:"getPublishedAuxStreamInfo",value:function e(){const t=this.localStreams.get(qx.STREAM_TYPE_AUX);if(!t)return null;return Array.from(t.localTrackPublishInfos.values()).find((e=>e.published&&e.sender))?t:null}},{key:"getTrackPublishInfos",value:function e(t,r){const n=this.localStreams.get(t);return n?r?Array.from(n.localTrackPublishInfos.values()).filter((e=>e.type===r)):Array.from(n.localTrackPublishInfos.values()):(this.logger.info(vj,"getTrackPublishInfos, not found"),null)}},{key:"getTrackPublishInfo",value:function e(t,r,n){const i=this.localStreams.get(t);return i?this.getTrackInfo(i,r,n):null}},{key:"isAuxVideoTrackPublished",value:function e(){const t=this.isTrackPublished(qx.STREAM_TYPE_AUX,Qx.TRACK_TYPE_VIDEO);return this.logger.info(vj,"isAuxVideoTrackPublished: ".concat(t)),t}},{key:"isMainStreamPublished",value:function e(){const t=this.isTrackPublished(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO)||this.isTrackPublished(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO);return this.logger.info(vj,"isMainVideoTrackPublished: ".concat(t)),t}},{key:"isTrackPublished",value:function e(t,r,n){const i=this.localStreams.get(t);if(!i)return this.logger.info(vj,"isTrackPublished, not found"),!1;const o=this.getTrackInfo(i,r,n);return o?o.published&&!!o.sender:(this.logger.info(vj,"isTrackPublished, not found"),!1)}},{key:"getTrackInfo",value:function t(r,n,i){if(!r||0===r.localTrackPublishInfos.size)return null;if(n===Qx.TRACK_TYPE_AUDIO)return Array.from(r.localTrackPublishInfos.values()).find((e=>e.type===Qx.TRACK_TYPE_AUDIO));if(i)return Array.from(r.localTrackPublishInfos.values()).find((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.upstream.streamUid.toString()===i));const o=e.getMaxResolutionId(r);return o?r.localTrackPublishInfos.get(o):null}},{key:"unPublishAuxStreamOK",value:function e(){this.unPublishStreamSuccess(qx.STREAM_TYPE_AUX)}},{key:"unPublishMainStreamOK",value:function e(){this.unPublishStreamSuccess(qx.STREAM_TYPE_MAIN)}},{key:"unPublishStreamSuccess",value:function e(t){var r;const n=this.localStreams.get(t);n?(null===(r=n.localStream)||void 0===r||r.getHRTCTracks({hasTrack:!0,mediaType:Qx.TRACK_TYPE_VIDEO}).forEach((e=>e&&e.setTrackId(""))),this.removeStream(n.localStream),this.logger.info(vj,"unPublishStreamSuccess, ".concat(t))):this.logger.warn(vj,"stream not publish")}},{key:"isAuxVideoTrackValid",value:function e(t){return this.isTrackValid(qx.STREAM_TYPE_AUX,Qx.TRACK_TYPE_VIDEO,t)}},{key:"isTrackValid",value:function e(t,r,n){const i=this.localStreams.get(t);return i?Array.from(i.localTrackPublishInfos.values()).some((e=>e.type===r&&e.upstream.streamUid.toString()===n)):(this.logger.info(vj,"isTrackValid, not found"),!1)}},{key:"generateOptTags",value:function e(t,r){const n=[],i=this.localStreams.get(t);if(!i)return n;return Array.from(i.localTrackPublishInfos.values()).filter((e=>e.type===r&&e.published&&e.sender)).forEach((e=>{if(r===Qx.TRACK_TYPE_VIDEO){const t=e.upstream?e.upstream.height:0,r=e.upstream?e.upstream.width:0,i="".concat(e.ssrc,":").concat(t,"*").concat(r);n.push(i)}else{var t;const r=null===(t=i.localStream.getAudioHRTCTrack())||void 0===t?void 0:t.getTrackProfile(),o="".concat(e.ssrc,":").concat(r?r.sampleRate:0);n.push(o)}})),n}},{key:"generateMainAudioOptTag",value:function e(){const t=this.generateOptTags(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO);return t.length>0?t[0]:null}},{key:"generateAuxOptTag",value:function e(){const t=this.generateOptTags(qx.STREAM_TYPE_AUX,Qx.TRACK_TYPE_VIDEO);return t.length>0?t[0]:null}},{key:"generateMainVideoOptTags",value:function e(){const t=this.generateOptTags(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO);return t.length>0?t:null}}],[{key:"getString4TrackPublishInfos",value:function e(t){let r;for(const e of t.entries())r="".concat(r||""," resolutionId: ").concat(e[0],", track type: ").concat(e[1].type,", watched: ").concat(e[1].watched,", published: ").concat(e[1].published);return r}},{key:"isSameResolution",value:function e(t,r){return t.upstream.height===r.upstream.height&&t.upstream.width===r.upstream.width}},{key:"getDefaultWatchFlag",value:function e(t,r,n){return t===qx.STREAM_TYPE_MAIN&&r===Qx.TRACK_TYPE_AUDIO||(null==n?void 0:n.autoPushVideo)&&r===Qx.TRACK_TYPE_VIDEO}},{key:"getMaxResolutionId",value:function e(t){var r,n;return null==t||null===(r=t.localStream)||void 0===r||null===(n=r.getMaxResolutionHRTCTrack())||void 0===n?void 0:n.getResolutionId()}}])}();var yj={},gj={exports:{}},bj=gj.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(bj).forEach((function(e){bj[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))})),function(e){var t=function(e){return String(Number(e))===e?Number(e):e},r=function(e,r,n){var i=e.name&&e.names;e.push&&!r[e.push]?r[e.push]=[]:i&&!r[e.name]&&(r[e.name]={});var o=e.push?{}:i?r[e.name]:r;!function(e,r,n,i){if(i&&!n)r[i]=t(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(r[n[o]]=t(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&r[e.push].push(o)},n=gj.exports,i=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},o=[],a=t;return e.split(/(\r\n|\r|\n)/).filter(i).forEach((function(e){var t=e[0],i=e.slice(2);"m"===t&&(o.push({rtp:[],fmtp:[]}),a=o[o.length-1]);for(var s=0;s<(n[t]||[]).length;s+=1){var u=n[t][s];if(u.reg.test(i))return r(u,a,i)}})),t.media=o,t};var o=function(e,r){var n=r.split(/=(.+)/,2);return 2===n.length?e[n[0]]=t(n[1]):1===n.length&&r.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\s?/).reduce(o,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(" ").map(Number)},e.parseRemoteCandidates=function(e){for(var r=[],n=e.split(" ").map(t),i=0;i<n.length;i+=3)r.push({component:n[i],ip:n[i+1],port:n[i+2]});return r},e.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(o,{})}))},e.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var r,n=!1;return"~"!==e[0]?r=t(e):(r=t(e.substring(1,e.length)),n=!0),{scid:r,paused:n}}))}))}}(yj);var _j=gj.exports,Sj=/%[sdv%]/g,Ej=function(e){var t=1,r=arguments,n=r.length;return e.replace(Sj,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},wj=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return Ej.apply(null,n)},Tj=["v","o","s","i","u","e","p","c","b","t","r","z","a"],Ij=["i","c","b","a"],Rj=yj,Cj=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var r=t.outerOrder||Tj,n=t.innerOrder||Ij,i=[];return r.forEach((function(t){_j[t].forEach((function(r){r.name in e&&null!=e[r.name]?i.push(wj(t,r,e)):r.push in e&&null!=e[r.push]&&e[r.push].forEach((function(e){i.push(wj(t,r,e))}))}))})),e.media.forEach((function(e){i.push(wj("m",_j.m[0],e)),n.forEach((function(t){_j[t].forEach((function(r){r.name in e&&null!=e[r.name]?i.push(wj(t,r,e)):r.push in e&&null!=e[r.push]&&e[r.push].forEach((function(e){i.push(wj(t,r,e))}))}))}))})),i.join("\r\n")+"\r\n"},kj=Cj,Aj=Rj.parse,Oj=Rj.parseParams;const Pj="packetization-mode",xj="profile-level-id",Lj="sps-pps-idr-in-keyframe",Mj=["groups","media"],Nj=["candidates","connection","direction","mid","payloads","port","protocol","rtp","type","fmtp","ssrcs"];let Dj=function(){function e(t){a(this,e);o(this,"module_","sdp"),o(this,"ssrcAttrCname_","cname"),o(this,"ssrcAttrMslabel_","mslabel"),o(this,"ssrcAttrLabel_","label"),o(this,"ssrcAttrMsid_","msid"),this.logger_=t}return u(e,[{key:"setPortType",value:function e(t){this.portType_=t}},{key:"parseSdp",value:function e(t){if(!t)return void this.logger_.error(this.module_,"parseSdp failed : sdp is null ");const r=Aj(t);if(0!==r.media.length)return r;this.logger_.error(this.module_,"parseSdp failed : the media of sdp is null ")}},{key:"printSdpInfo",value:function e(t){const r=this.parseSdp(t);if(r){for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(Mj.includes(e)||delete r[e],"media"===e&&r[e].forEach((e=>{for(const t in e)Nj.includes(t)||delete e[t]})));return SI.shieldIpAddress(kj(r))}}},{key:"getMedias",value:function e(t,r){return t.media.filter((e=>{let{type:t}=e;return t===r}))}},{key:"deleteUnexpectedMedia",value:function e(t){t.media&&(t.media=t.media.filter((e=>{let{type:t}=e;return t===Qx.TRACK_TYPE_VIDEO||t===Qx.TRACK_TYPE_AUDIO||t===Qx.TYPE_APPLICATION})),this.portType_===cx.portNormal&&t.groups&&(t.groups=t.groups.filter((e=>{let{type:t}=e;return"BUNDLE"!==t.toLocaleUpperCase()}))))}},{key:"transformVideoPayload",value:function t(r,n){if(!r.rtp)return void this.logger_.warn(this.module_,"transformVideoPayload failed ,rtp is null");let i=null,o=null,a=0;for(const t of r.rtp){if(t.codec.toUpperCase()!==lj.H264)continue;o||(o=t.payload,this.logger_.info(this.module_,"record firstPayload, firstPayload: ".concat(o)));const n=e.getPacketizationMode(r.fmtp,t.payload),s=e.getProfileLevelId(r.fmtp,t.payload);if(1===n&&(0===a&&(o=t.payload,a=1),"42e01f"===s)){i=t.payload,this.logger_.info(this.module_,"set retainPayload in transformVideoPayload, retainPayload: ".concat(i));break}}i||(i=o,this.logger_.info(this.module_,"no expected payload, use firstPayload as retainPayload, retainPayload: ".concat(i))),i?(e.deletePayload(r,i),e.modifyPayload(r,uj.h264PayLoad),e.addVideoFec(r,n),e.addFmtpAttr(r,uj.h264PayLoad,"max-br","5000000"),e.addFmtpAttr(r,uj.h264PayLoad,Lj,"1"),e.addFmtpAttr(r,uj.rtxPayLoad,"apt","".concat(uj.h264PayLoad)),e.addFmtpAttr(r,uj.rtxPayLoad,Lj,"1")):this.logger_.error(this.module_,"transformVideoPayload failed,can not find expected payload.")}},{key:"transformAudioPayload",value:function t(r){if(!r.rtp)return void this.logger_.warn(this.module_,"transformAudioPayload failed, rtp is null");let n;for(const e of r.rtp)if(e.codec.toLowerCase()===lj.OPUS){n=e.payload;break}n?(e.deletePayload(r,n),e.modifyPayload(r,sj.opusPayload),e.addNack(r)):this.logger_.error(this.module_,"transformAudioPayload failed,can not find expected payload.")}},{key:"deleteRetransmissionSsrc",value:function e(t){if(!t.ssrcGroups||!t.ssrcs)return;const r=[];t.ssrcGroups.forEach((e=>{let{ssrcs:t}=e;const n=this.getRetransmissionSsrc(t);null!=n&&r.push(n)})),0!==r.length&&(t.ssrcGroups=void 0,t.ssrcs=t.ssrcs.filter((e=>{let{id:t}=e;return!r.includes(t.toString())})))}},{key:"addVideoSsrcRange",value:function e(t,r){!r||r.length<1||(t.invalid||(t.invalid=[]),t.invalid.push({value:"send-ssrc-list:".concat(r.join(","))}))}},{key:"modifyCandidate",value:function e(t,r){if(!t.candidates){const e=null==r?void 0:r.find((e=>"".concat(t.mid)==="".concat(e.sdpMid)));if(e){const r=/.*generation\s(\d+).*/.exec(e.candidate)||[],n=/.*network\-id\s(\d+).*/.exec(e.candidate)||[],i=/.*network\-cost\s(\d+).*/.exec(e.candidate)||[];t.candidates=t.candidates||[],t.candidates.push({foundation:e.foundation,component:"rtp"===e.component?1:2,transport:e.protocol,priority:e.priority,ip:e.address,port:e.port,type:e.type,raddr:e.relatedAddress,rport:e.relatedPort,tcptype:e.tcpType,generation:2===r.length?parseInt(r[1]):void 0,"network-id":2===n.length?parseInt(n[1]):void 0,"network-cost":2===i.length?parseInt(i[1]):void 0})}}}},{key:"getRetransmissionSsrc",value:function e(t){if(!t)return void this.logger_.warn(this.module_,"getRetransmissionSsrc failed, ssrcs is null");const r=t.split(" ");if(2===r.length)return r[1];this.logger_.warn(this.module_,"getRetransmissionSsrc failed, ssrcs(".concat(t,") is invalid"))}},{key:"generateSsrcMslabel",value:function e(){return SI.generateRandomId(36)}},{key:"containsValidVideoPayload",value:function e(t){this.logger_.debug(this.module_,"containsValidVideoPayload, offerSdp: ".concat(this.printSdpInfo(t)));const r=this.parseSdp(t);if(!r)return this.logger_.error(this.module_,"containsValidVideoPayload failed,the sdp is invalid"),!1;return this.getMedias(r,Qx.TRACK_TYPE_VIDEO).some((e=>{var t;return null===(t=e.rtp)||void 0===t?void 0:t.some((e=>e.codec.toUpperCase()===lj.H264))}))}},{key:"transformOfferSdp",value:function e(t,r){this.logger_.info(this.module_,"transformOfferSdp begin");const n=this.parseSdp(t);if(!n)return void this.logger_.error(this.module_,"transformOfferSdp failed,the sdp is invalid");this.checkWhetherSDPisSupportedFlexfec(n,r),this.deleteUnexpectedMedia(n);const i=this.getMedias(n,Qx.TRACK_TYPE_VIDEO),o=this.getMedias(n,Qx.TRACK_TYPE_AUDIO);i.forEach((e=>{this.transformVideoPayload(e,r),this.deleteRetransmissionSsrc(e)})),o.forEach((e=>{this.transformAudioPayload(e),this.deleteRetransmissionSsrc(e)}));const a=kj(n);return this.logger_.debug(this.module_,"transformOfferSdp success, sdp: ".concat(this.printSdpInfo(a))),a}},{key:"checkWhetherSDPisSupportedFlexfec",value:function e(t,r){const n=this.getMedias(t,Qx.TRACK_TYPE_VIDEO);for(let e=0;e<n.length;e++){const t=!!n[e].rtp.filter((e=>{let{codec:t}=e;return"flexfec-03"===t}));if(r&&(r.fecEnable=t,this.logger_.info(this.module_,"checkWhetherSDPisSupportedFlexfec fecEnable: ".concat(t))),t)break}}},{key:"editOrigin",value:function e(t){t.origin&&(t.origin.username=sL.getBrowserInfo())}},{key:"modifyAuxSdpInfo",value:function e(t,r,n){const i=this.parseSdp(t);if(!i)return void this.logger_.error(this.module_,"modifyAuxSdpInfo failed,the sdp is invalid : ".concat(t));this.editOrigin(i);const o=this.getMedias(i,Qx.TRACK_TYPE_VIDEO);o&&o.length>0&&(this.addVideoSsrcRange(o[0],n),this.modifyCandidate(o[0],r));const a=kj(i);return this.logger_.debug(this.module_,"modifyAuxSdpInfo success, sdp: ".concat(this.printSdpInfo(a))),a}},{key:"modifyMainSdpInfo",value:function t(r,n,i,o,a,s){const u=this.parseSdp(r);if(!u)return void this.logger_.error(this.module_,"modifyMainSdpInfo failed, the sdp is invalid : ".concat(r));this.editOrigin(u);const c=this.getMedias(u,Qx.TRACK_TYPE_VIDEO),l=this.getMedias(u,Qx.TRACK_TYPE_AUDIO);let f="",d="";if(c&&c.length>0&&(this.addVideoSsrcRange(c[0],i),this.modifyCandidate(c[0],n),d=c[0].mid,c.length>1))for(let e=0;e<u.media.length;e++)u.media[e].type!==Qx.TRACK_TYPE_AUDIO&&u.media[e].mid!==c[0].mid&&delete u.media[e];l&&l.length>0&&(e.addAudioSsrcRange(l[0],o,a),this.modifyCandidate(l[0],n),f=l[0].mid);for(const e of u.groups||[])if("BUNDLE"===e.type){e.mids="".concat(f," ").concat(d);break}a&&this.addNegCmdInfo(u,s);const h=kj(u);return this.logger_.debug(this.module_,"modifyMainSdpInfo success, sdp: ".concat(this.printSdpInfo(h))),h}},{key:"addNegCmdInfo",value:function e(t,r){if(r){const e=this.parseSdp(r).media.find((e=>e.type===Qx.TYPE_APPLICATION)),n=t.media.filter((e=>null==e?void 0:e.type)),i=n[n.length-1];e.mid=["audio","video"].includes(i.mid)?"data":i.mid+1,t.media.push(e),t.groups.forEach((t=>{"BUNDLE"===t.type&&(t.mids="".concat(t.mids," ").concat(e.mid))}))}const n={type:"application",port:443,protocol:"TCP/WSS/RTP *",setup:"active",invalid:[]};n.invalid.push({value:"connection:new"}),n.invalid.push({value:"content:cmd"}),n.invalid.push({value:"bindCrypto-type:0"}),n.invalid.push({value:"bindCrypto-method:hmac-share256"}),t.media.push(n)}},{key:"getSfuInfo",value:function e(t,r){const n=this.parseSdp(t),i={ipAddress:"",auxPort:0};let o;const a=this.getMedias(n,Qx.TRACK_TYPE_AUDIO);a&&a.length>0&&(i.audioPort=a[0].port,o=a[0].connection);const s=this.getMedias(n,Qx.TRACK_TYPE_VIDEO);if(s&&s.length>0&&(i.videoPort=s[0].port,o=s[0].connection),o&&(i.ipAddress=o.ip),r){const e=this.parseSdp(r),t=this.getMedias(e,Qx.TRACK_TYPE_VIDEO);t&&t.length>0&&t[0].connection&&(i.auxPort=t[0].port)}return i}}],[{key:"addAudioSsrcRange",value:function e(t,r,n){if(r)if(t.invalid||(t.invalid=[]),n){const e=SI.getRandomUint32();t.invalid.push({value:"send-ssrc-list:".concat(r,",").concat(e)})}else t.invalid.push({value:"send-ssrc-list:".concat(r)})}},{key:"getPacketizationMode",value:function e(t,r){if(!t)return 1;for(const e of t){if(e.payload!==r)continue;if(!e.config.includes(Pj))return 1;const t=Oj(e.config);return null==t[Pj]?1:parseInt(String(t[Pj]),10)}return 1}},{key:"getProfileLevelId",value:function e(t,r){if(!t)return"";for(const e of t){if(e.payload!==r)continue;if(!e.config.includes(xj))return"";const t=Oj(e.config);return t[xj]?String(t[xj]):""}return""}},{key:"deletePayload",value:function e(t,r){t.rtp&&(t.rtp=t.rtp.filter((e=>{let{payload:t}=e;return t===r}))),t.rtcpFb&&(t.rtcpFb=t.rtcpFb.filter((e=>{let{payload:t}=e;return t===r}))),t.fmtp&&(t.fmtp=t.fmtp.filter((e=>{let{payload:t}=e;return t===r}))),t.payloads=r.toString()}},{key:"modifyPayload",value:function e(t,r){t.rtp&&t.rtp.forEach((e=>{e.payload=r})),t.rtcpFb&&t.rtcpFb.forEach((e=>{e.payload=r})),t.fmtp&&t.fmtp.forEach((e=>{e.payload=r,t.type===Qx.TRACK_TYPE_AUDIO&&/stereo/.test(e.config)&&(e.config=e.config.replace("stereo=1","stereo=0"))})),t.payloads=r.toString()}},{key:"addVideoFec",value:function e(t,r){t.rtp||(t.rtp=[]),t.rtp.push({payload:uj.rtxPayLoad,codec:"rtx",rate:9e4}),t.rtp.push({payload:uj.redPayLoad,codec:"red",rate:9e4}),t.rtp.push({payload:uj.ulpfecPayLoad,codec:"ulpfec",rate:9e4}),null!=r&&r.fecEnable?(t.rtp.push({payload:125,codec:"flexfec-03",rate:9e4}),t.payloads="".concat(uj.rtxPayLoad," ").concat(t.payloads," ").concat(uj.redPayLoad," ").concat(uj.ulpfecPayLoad," 125")):t.payloads="".concat(uj.rtxPayLoad," ").concat(t.payloads," ").concat(uj.redPayLoad," ").concat(uj.ulpfecPayLoad)}},{key:"addFmtpAttr",value:function e(t,r,n,i){if(!t.fmtp||0===t.fmtp.length)return t.fmtp=[],void t.fmtp.push({payload:r,config:n+"="+i});const o=t.fmtp.find((e=>e.payload===r));if(o){if(Oj(o.config)[n])return;o.config=o.config+";"+n+"="+i}else t.fmtp.push({payload:r,config:n+"="+i})}},{key:"addNack",value:function e(t){const r=t.rtp[0].payload;t.rtcpFb||(t.rtcpFb=[]),t.rtcpFb.push({payload:r,type:"ccm",subtype:"fir"}),t.rtcpFb.push({payload:r,type:"nack"}),t.rtcpFb.push({payload:r,type:"nack",subtype:"pli"})}},{key:"generateSsrcLabel",value:function e(){return"".concat(SI.generateRandomId(8,36),"-").concat(SI.generateRandomId(4,36),"-").concat(SI.generateRandomId(4,36),"-").concat(SI.generateRandomId(4,36),"-").concat(SI.generateRandomId(12,36))}},{key:"addSsrcAttr",value:function e(t,r,n){t.ssrcs||(t.ssrcs=[]);for(let e=0;e<n.length;e++)t.ssrcs.push({id:r,attribute:n[e][0],value:n[e][1]})}},{key:"deleteSsrcAttr",value:function e(t,r){t.ssrcs&&(t.ssrcs=t.ssrcs.filter((e=>{let{id:t}=e;return!r.find((e=>e.toString()===t.toString()))})))}},{key:"getNegCmdInfoAndDelete",value:function e(t){let r="",n="",i=!1;for(let e=0;e<t.length;e++)"application"===t[e].type&&(/TCP\/WSS?\/RTP/gi.test(t[e].protocol)?(t[e].invalid.forEach((e=>{e.value.indexOf("bindCrypto-key")>=0&&(r=e.value.substring(15)),e.value.indexOf("websocket-uri")>=0&&(n=e.value.substring(14))})),t.splice(e,1)):/SCTP/gi.test(t[e].protocol)&&(i=!0));return{bindCryptoKey:r,wsUrl:n,dataChannelEnable:i}}}])}();let jj=function(e){function t(){a(this,t);return f(this,t,arguments)}p(t,e);return u(t,[{key:"hasSSRC",value:function e(t,r){const n=this.parseSdp(t);if(!n)return this.logger_.error(this.module_,"hasSSRC failed"),!1;const i=this.getMedias(n,r);return i&&i.length>0&&!!i[0].ssrcs}},{key:"getMslabelByCname",value:function e(t,r){if(!t)return null;if(!t.ssrcs)return null;let n;for(const e of t.ssrcs)if(e.attribute.toLocaleLowerCase()===this.ssrcAttrCname_&&e.value===r){n=e.id;break}if(!n)return null;for(const e of t.ssrcs)if(e.id===n&&e.attribute.toLocaleLowerCase()===this.ssrcAttrMslabel_)return e.value;return null}},{key:"addSsrc",value:function e(t,r,n,i,o,a){const s=n,u=this.getMslabelByCname(t,s),c=this.getMslabelByCname(r,s);let l,f,d=!1,h=!1;if(u&&u===i||!o||(h=!0),c&&c===i||!a||(d=!0),h&&(l=c||i||this.generateSsrcMslabel()),d&&(f=i||this.generateSsrcMslabel()),this.logger_.debug(this.module_,"addSsrc, userId: ".concat(n,", audioMslabel: ").concat(l," videooMslabel: ").concat(f)),l){const e=Dj.generateSsrcLabel(),r=[[this.ssrcAttrCname_,s],[this.ssrcAttrMslabel_,l],[this.ssrcAttrLabel_,e],[this.ssrcAttrMsid_,l+" "+e]];Dj.addSsrcAttr(t,o,r)}if(f){const e=Dj.generateSsrcLabel(),t=[[this.ssrcAttrCname_,s],[this.ssrcAttrMslabel_,f],[this.ssrcAttrLabel_,e],[this.ssrcAttrMsid_,f+" "+e]];Dj.addSsrcAttr(r,a,t)}return f||l}},{key:"transformAnswerSdp",value:function e(r){this.logger_.debug(this.module_,"transformAnswerSdp, answerSdp: ".concat(this.printSdpInfo(r)));const n=this.parseSdp(r);if(!n)return void this.logger_.error(this.module_,"transformAnswerSdp failed,the sdp is invalid");const i=this.getMedias(n,Qx.TRACK_TYPE_VIDEO),o=this.getMedias(n,Qx.TRACK_TYPE_AUDIO);i&&i.length>0&&(this.portType_===cx.portNormal&&(i[0].rtcpMux=void 0),t.modifyDirection(i[0])),i.forEach((e=>{var t;const r=[];null===(t=e.ext)||void 0===t||t.forEach((e=>{r.find((t=>t.uri===e.uri))||r.push(e)})),r.length>0&&(e.ext=r)})),o&&o.length>0&&(this.portType_===cx.portNormal&&(o[0].rtcpMux=void 0),t.modifyDirection(o[0])),this.portType_===cx.portNormal&&(n.groups=void 0);const{bindCryptoKey:a,wsUrl:s,dataChannelEnable:u}=Dj.getNegCmdInfoAndDelete(n.media),c=kj(n);return this.logger_.debug(this.module_,"transformAnswerSdp success,answerSdp: ".concat(this.printSdpInfo(c))),{remoteDescription:c,bindCryptoKey:a,wsUrl:s,dataChannelEnable:u}}},{key:"deleteSSRC",value:function e(r,n,i){if(0===n.length&&!i)return r;this.logger_.info(this.module_,"deleteVideoSSRC ".concat(n,", ").concat(i));const o=this.parseSdp(r);if(!o)return void this.logger_.error(this.module_,"deleteVideoSSRC failed");const a=this.getMedias(o,Qx.TRACK_TYPE_VIDEO);a&&a.length>0&&(n&&Dj.deleteSsrcAttr(a[0],n),t.modifyDirection(a[0]));const s=this.getMedias(o,Qx.TRACK_TYPE_AUDIO);s&&s.length>0&&(i&&Dj.deleteSsrcAttr(s[0],[i]),t.modifyDirection(s[0]));const u=kj(o);return this.logger_.info(this.module_,"deleteVideoSSRC ".concat(n," success")),u}},{key:"addUser",value:function e(r,n,i,o){const a=this.parseSdp(r);if(!a)return void this.logger_.error(this.module_,"addUser failed,the sdp is invalid : ".concat(r));const s=this.getMedias(a,Qx.TRACK_TYPE_VIDEO),u=this.getMedias(a,Qx.TRACK_TYPE_AUDIO);let c,l;s&&s.length>0&&(c=s[0]),u&&u.length>0&&(l=u[0]);const f=this.addSsrc(l,c,n,i,o.audioSsrc,o.videoSsrc);c&&t.modifyDirection(c),l&&t.modifyDirection(l);const d=kj(a);return this.logger_.debug(this.module_,"addUser success, answerSdp: ".concat(this.printSdpInfo(d))),{answerSdp:d,streamId:f}}},{key:"deleteUser",value:function e(r,n,i){const o=this.parseSdp(r);if(!o)return void this.logger_.error(this.module_,"deleteUser failed,the sdp is invalid : ".concat(r));if((null==n?void 0:n.length)>0){const e=this.getMedias(o,Qx.TRACK_TYPE_VIDEO);e&&e.length>0&&(n.forEach((t=>{t&&Dj.deleteSsrcAttr(e[0],[t])})),t.modifyDirection(e[0]))}if((null==i?void 0:i.length)>0){const e=this.getMedias(o,Qx.TRACK_TYPE_AUDIO);e&&e.length>0&&(i.forEach((t=>{t&&Dj.deleteSsrcAttr(e[0],[t])})),t.modifyDirection(e[0]))}const a=kj(o);return this.logger_.debug(this.module_,"deleteUser success, answerSdp: ".concat(this.printSdpInfo(a))),a}},{key:"modifyPublishOfferSdp",value:function e(r,n,i){this.logger_.debug(this.module_,"modifyPublishOfferSdp start, sdp: ".concat(this.printSdpInfo(r)));const o=this.parseSdp(r);if(!o)return void this.logger_.error(this.module_,"modifyPublishOfferSdp failed, the sdp is invalid: ".concat(r));this.deleteUnexpectedMedia(o);const a=this.getMedias(o,Qx.TRACK_TYPE_VIDEO),s=this.getMedias(o,Qx.TRACK_TYPE_AUDIO);if(a&&a.length>0&&(this.transformVideoPayload(a[0]),this.deleteRetransmissionSsrc(a[0]),n&&n.length>0&&t.modifyMediaSsrc(a[0],n)),s&&s.length>0&&(this.transformAudioPayload(s[0]),this.deleteRetransmissionSsrc(s[0]),i)){const e=[i];t.modifyMediaSsrc(s[0],e)}const u=kj(o);return this.logger_.debug(this.module_,"modifyPublishOfferSdp success, sdp: ".concat(this.printSdpInfo(u))),u}}],[{key:"modifyDirection",value:function e(t){t.ssrcs&&0!==t.ssrcs.length?t.direction=oj.SEND_RECV:t.direction=oj.RECV_ONLY}},{key:"modifyMediaSsrc",value:function e(t,r){if(!t.ssrcs)return;for(let e=0;e<r.length;e++)for(let n=0;n<4;n++)t.ssrcs[4*e+n].id=r[e]}}])}(Dj);let Uj=function(e){function t(){a(this,t);return f(this,t,arguments)}p(t,e);return u(t,[{key:"addSSRC",value:function e(t,r,n,i,o){this.logger_.info(this.module_,"addSSRC streamid: ".concat(n));const a=n||this.generateSsrcMslabel();this.logger_.debug(this.module_,"addSSRC, userId:".concat(r,", mslabel:").concat(a,", streamId:").concat(n,", ssrc:").concat(i,", fec:").concat(o)),t.ssrcs&&delete t.ssrcs;const s=Dj.generateSsrcLabel(),u=[[this.ssrcAttrCname_,r],[this.ssrcAttrMslabel_,a],[this.ssrcAttrLabel_,s],[this.ssrcAttrMsid_,a+" "+s]];return Dj.addSsrcAttr(t,i,u),o&&Dj.addSsrcAttr(t,i+1e3,u),a}},{key:"hasSSRC",value:function e(t,r){const n=this.parseSdp(t);if(!n)return this.logger_.error(this.module_,"hasSSRC failed"),!1;return this.getMedias(n,r).some((e=>(e.direction===oj.SEND_ONLY||e.direction===oj.SEND_RECV)&&!!e.ssrcs))}},{key:"delteInvalidLines",value:function e(t){this.deleteUnexpectedMedia(t);const r=this.getMedias(t,Qx.TRACK_TYPE_VIDEO),n=this.getMedias(t,Qx.TRACK_TYPE_AUDIO);r.forEach((e=>{this.transformVideoPayload(e),this.deleteRetransmissionSsrc(e)})),n.forEach((e=>{this.transformAudioPayload(e),this.deleteRetransmissionSsrc(e)}))}},{key:"getAvailableSenderMedia",value:function e(t,r){return t.media.filter((e=>{let{type:t,direction:n}=e;return t===r&&(n===oj.SEND_ONLY||n===oj.SEND_RECV)}))}},{key:"modifyUnifiedMediaSsrc",value:function e(t,r,n){if(t.ssrcs&&0!==t.ssrcs.length)t.ssrcs.forEach((e=>{e.attribute===this.ssrcAttrCname_&&(e.value=n),e.id=r}));else{const e=[[this.ssrcAttrCname_,n]];Dj.addSsrcAttr(t,r,e)}}},{key:"modifyAnswerDirection",value:function e(t,r){var n;const i=this.parseSdp(t);if(!i)return void this.logger_.error(this.module_,"modifyAnswerDirection failed,the sdp is invalid");const o=null===(n=i.media)||void 0===n?void 0:n.find((e=>"".concat(e.mid)==="".concat(r)));return o&&(o.direction===oj.INACTIVE?o.direction=oj.RECV_ONLY:o.direction===oj.SEND_ONLY&&(o.direction=oj.SEND_RECV)),kj(i)}},{key:"transformAnswerSdp",value:function e(r,n){this.logger_.debug(this.module_,"transformAnswerSdp, answerSdp: ".concat(this.printSdpInfo(r)));const i=this.parseSdp(r),o=this.parseSdp(n);if(!i||!o)return void this.logger_.error(this.module_,"transformAnswerSdp failed,the sdp is invalid");this.getMedias(i,Qx.TRACK_TYPE_AUDIO).forEach((e=>{this.portType_===cx.portNormal&&(e.rtcpMux=void 0),e.ssrcs||(e.direction=oj.INACTIVE)}));let a=this.getMedias(i,Qx.TRACK_TYPE_VIDEO);const s=this.getMedias(o,Qx.TRACK_TYPE_VIDEO);if(s.length!==a.length){const e=a.map((e=>"".concat(e.mid)));s.forEach((r=>{if(!e.includes("".concat(r.mid))){const e=JSON.parse(JSON.stringify(a[0]));e.mid=r.mid,i.media.push(e),t.modifyBundle(i,r.mid)}}))}a=this.getMedias(i,Qx.TRACK_TYPE_VIDEO),a.forEach((e=>{var t;this.portType_===cx.portNormal&&(e.rtcpMux=void 0),e.direction=oj.INACTIVE;const r=[];null===(t=e.ext)||void 0===t||t.forEach((e=>{r.find((t=>t.uri===e.uri))||r.push(e)})),r.length>0&&(e.ext=r)})),this.portType_===cx.portNormal&&(i.groups=void 0);const{bindCryptoKey:u,wsUrl:c,dataChannelEnable:l}=Dj.getNegCmdInfoAndDelete(i.media),f=this.getMedias(i,Qx.TYPE_APPLICATION);if(i.media=i.media.filter((e=>e.type!==Qx.TYPE_APPLICATION)),f.length>0){const e=this.getMedias(i,Qx.TRACK_TYPE_VIDEO).map((e=>parseInt("".concat(e.mid))));f[0].mid="".concat(Math.max(...e)+1),sL.isFirefox()&&(f[0].port=9),i.media.push(...f),t.modifyBundle(i,"".concat(f[0].mid))}const d=kj(i);return this.logger_.debug(this.module_,"transformAnswerSdp success,answerSdp: ".concat(this.printSdpInfo(d))),{remoteDescription:d,bindCryptoKey:u,wsUrl:c,dataChannelEnable:l}}},{key:"addUser",value:function e(r,n,i,o,a,s){var u,c;const l=this.parseSdp(r);if(!l)return this.logger_.error(this.module_,"addUser failed,the sdp is invalid : ".concat(r)),null;const f=this.parseSdp(n);if(!f)return this.logger_.error(this.module_,"addUser failed,the sdp is invalid : ".concat(n)),null;this.delteInvalidLines(f);const d=null===(u=f.media)||void 0===u?void 0:u.find((e=>"".concat(e.mid)===i)),h=null===(c=l.media)||void 0===c?void 0:c.find((e=>e.type===d.type)),p=JSON.parse(JSON.stringify(h));p.mid=i,p.direction=oj.SEND_ONLY,p.type===Qx.TRACK_TYPE_AUDIO&&this.portType_===cx.portReduce&&delete p.candidates;const v=this.addSSRC(p,o,a,s);l.media.push(p),t.modifyBundle(l,i),t.modifyDirectionWhenAddUser(p,d);const m=kj(l),y=kj(f);return this.logger_.debug(this.module_,"addUser success, offer: ".concat(this.printSdpInfo(y)," answer: ").concat(this.printSdpInfo(m))),{offerSdp:y,answerSdp:m,streamId:v}}},{key:"deleteUser",value:async function e(r,n,i,o,a){const s=this.parseSdp(r);if(!s)return this.logger_.error(this.module_,"deleteUser failed,the sdp is invalid : ".concat(r)),null;const u=this.parseSdp(n);if(!u)return this.logger_.error(this.module_,"deleteUser failed,the sdp is invalid : ".concat(n)),null;for(const e of s.media)if(e.ssrcs&&e.ssrcs.some((e=>i.includes(parseInt("".concat(e.id)))))){var c,l;t.modifyDirectionWhenDelUser(e,u.media.find((t=>t.mid===e.mid)));let r=0;for(null===(c=e.ssrcGroups)||void 0===c||c.forEach((e=>{var t;"FEC-FR"===e.semantics&&(r=Number(null===(t=e.ssrcs.split(" "))||void 0===t?void 0:t[1]))}));null!==(f=e.ssrcs)&&void 0!==f&&f.find((e=>e.id===r));){var f,d;const t=null===(d=e.ssrcs)||void 0===d?void 0:d.findIndex((e=>e.id===r));e.ssrcs.splice(t,1)}null===(l=e.ssrcs)||void 0===l||l.forEach((e=>{e.value="-"}));const n=null==o?void 0:o.find((t=>"".concat(t.mid)==="".concat(e.mid)));n&&(n.direction=n.currentDirection===oj.SEND_RECV||n.currentDirection===oj.SEND_ONLY?oj.SEND_ONLY:oj.INACTIVE,await a(n.receiver))}const h=kj(s),p=kj(u);return this.logger_.debug(this.module_,"deleteUser success, offer: ".concat(this.printSdpInfo(p)," answer: ").concat(this.printSdpInfo(h))),{offerSdp:p,answerSdp:h}}},{key:"modifySdpByMid",value:function e(r,n,i,o,a,s,u){var c,l;const f=this.parseSdp(r);if(!f)return this.logger_.error(this.module_,"modifySdpByMid failed,the sdp is invalid : ".concat(r)),null;const d=null===(c=f.media)||void 0===c?void 0:c.find((e=>"".concat(e.mid)===i)),h="video"===d.type,p=this.addSSRC(d,o,a,s,u&&h);u&&h&&(d.payloads="".concat(d.payloads," ").concat(uj.fec03PayLoad),d.rtp.push({payload:uj.fec03PayLoad,codec:"flexfec-03",rate:cj.fec03PayLoad}),d.fmtp.push({payload:uj.fec03PayLoad,config:"repair-window:200000"}),d.ssrcGroups=[],d.ssrcGroups.push({semantics:"FEC-FR",ssrcs:"".concat(s," ").concat(s+1e3)}));const v=this.parseSdp(n);v||this.logger_.error(this.module_,"modifySdpByMid failed,the sdp is invalid : ".concat(n));const m=null===(l=v.media)||void 0===l?void 0:l.find((e=>"".concat(e.mid)===i));t.modifyDirectionWhenAddUser(d,m);const y=kj(f),g=kj(v);return this.logger_.debug(this.module_,"modifySdpByMid success, offer: ".concat(this.printSdpInfo(g)," answer: ").concat(this.printSdpInfo(y))),{offerSdp:g,answerSdp:y,streamId:p}}},{key:"getAllMidsByType",value:function e(t,r){var n;const i=this.parseSdp(t),o=[];return i?(null===(n=i.media)||void 0===n||n.forEach((e=>{e.type===r&&o.push("".concat(e.mid))})),o):(this.logger_.error(this.module_,"getAllMidsByType failed,the sdp is invalid : ".concat(t)),o)}},{key:"getOfferVideoMidBySsrc",value:function e(t,r,n){var i;const o=this.parseSdp(t);let a=null;return o?(null===(i=o.media)||void 0===i||i.forEach((e=>{e.type===r&&e.ssrcs&&e.ssrcs.length>0&&"".concat(e.ssrcs[0].id)==="".concat(n)&&(a="".concat(e.mid))})),a):(this.logger_.error(this.module_,"getOfferVideoMidBySsrc failed,the sdp is invalid : ".concat(t)),a)}},{key:"getIdleTransceiverWithSameSsrc",value:function e(t,r,n){if(!r||0===r.length)return null;const i=this.parseSdp(t);if(!i)return this.logger_.error(this.module_,"getIdleMidWithSameSsrc failed,the sdp is invalid : ".concat(t)),null;const o=i.media.find((e=>!(!e.ssrcs||0===e.ssrcs.length)&&e.ssrcs[0].id===n));let a;for(const e of r)if(o){if("".concat(o.mid)==="".concat(e.mid)){a=r.splice(r.indexOf(e),1)[0];break}}else{const t=i.media.find((t=>"".concat(t.mid)==="".concat(e.mid)));if(!t.ssrcs||0===t.ssrcs.length){a=r.shift();break}}return a}},{key:"deleteSSRC",value:function e(r,n,i,o){if(0===i.length&&!o)return r;this.logger_.info(this.module_,"deleteSSRC ".concat(i,", ").concat(o));const a=this.parseSdp(r),s=this.parseSdp(n);if(!a)return void this.logger_.error(this.module_,"deleteSSRC failed");null==i||i.forEach((e=>{a.media.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).forEach((r=>{var n;if(null!==(n=r.ssrcs)&&void 0!==n&&n.find((t=>t.id===e))){var i;const e=null===(i=s.media)||void 0===i?void 0:i.find((e=>"".concat(e.mid)==="".concat(r.mid)));t.modifyDirectionWhenPublish(r,e,!1),r.ssrcs=void 0}}))})),a.media.filter((e=>e.type===Qx.TRACK_TYPE_AUDIO)).forEach((e=>{var r;if(null!==(r=e.ssrcs)&&void 0!==r&&r.find((e=>e.id===o))){var n;const r=null===(n=s.media)||void 0===n?void 0:n.find((t=>"".concat(t.mid)==="".concat(e.mid)));t.modifyDirectionWhenPublish(e,r,!1),e.ssrcs=void 0}}));const u=kj(a),c=kj(s);return this.logger_.debug(this.module_,"deleteSSRC ".concat(i," success, offer: ").concat(this.printSdpInfo(u)," answer: ").concat(this.printSdpInfo(c))),{offerSdp:u,answerSdp:c}}},{key:"modifyPublishOfferSdp",value:function e(r,n,i,o,a){this.logger_.debug(this.module_,"modifyPublishOfferSdp start, sdp: ".concat(this.printSdpInfo(r)));const s=this.parseSdp(r),u=this.parseSdp(n);if(!s)return void this.logger_.error(this.module_,"modifyPublishOfferSdp failed, the sdp is invalid: ".concat(r));if(this.deleteUnexpectedMedia(s),o&&o.length>0){let e=this.getAvailableSenderMedia(s,Qx.TRACK_TYPE_VIDEO);null==o||o.forEach((r=>{var n;let o=e.find((e=>{var t;return null===(t=e.ssrcs)||void 0===t?void 0:t.find((e=>"".concat(e.id)==="".concat(r)))}));o?e=e.filter((e=>{var t;return!e.ssrcs||(null===(t=e.ssrcs)||void 0===t?void 0:t.find((e=>"".concat(e.id)!=="".concat(r))))})):o=e.shift(),this.transformVideoPayload(o),this.deleteRetransmissionSsrc(o),this.modifyUnifiedMediaSsrc(o,r,i);const a=null===(n=u.media)||void 0===n?void 0:n.find((e=>"".concat(e.mid)==="".concat(o.mid)));t.modifyDirectionWhenPublish(o,a,!0)}))}s.media.filter((e=>{let{type:t,direction:r}=e;return t===Qx.TRACK_TYPE_VIDEO&&r!==oj.SEND_ONLY&&r!==oj.SEND_RECV})).forEach((e=>{this.transformVideoPayload(e),this.deleteRetransmissionSsrc(e),e.ssrcs=void 0}));const c=this.getAvailableSenderMedia(s,Qx.TRACK_TYPE_AUDIO);if(c&&c.length>0){const e=c[0];if(this.transformAudioPayload(e),this.deleteRetransmissionSsrc(e),a){var l;const r=null===(l=u.media)||void 0===l?void 0:l.find((t=>"".concat(t.mid)==="".concat(e.mid)));this.modifyUnifiedMediaSsrc(e,a,i),t.modifyDirectionWhenPublish(e,r,!0)}}const f=kj(s),d=kj(u);return this.logger_.debug(this.module_,"modifyPublishOfferSdp success, offerSdp: ".concat(this.printSdpInfo(f),", answerSdp: ").concat(this.printSdpInfo(d))),{offerSdp:f,answerSdp:d}}},{key:"generateMatchedAnswerWithOffer",value:function e(r,n,i){this.logger_.debug(this.module_,"generateCorrespondingRemoteSdpMedia start, sdp: ".concat(this.printSdpInfo(r)));const o=this.parseSdp(r);this.portType_!==cx.portNormal&&t.modifyBundle(o,n);const a=this.getMedias(o,i);if(!a||0===a.length)return r;const s=JSON.parse(JSON.stringify(a[0]));s.mid=n,delete s.ssrcs,delete s.candidates,s.direction=oj.INACTIVE,o.media.push(s);const u=kj(o);return this.logger_.debug(this.module_,"generateCorrespondingRemoteSdpMedia success, sdp: ".concat(this.printSdpInfo(u))),u}},{key:"getBrowserDefaultSsrc",value:function e(t){const r=this.parseSdp(t),n=this.getMedias(r,Qx.TRACK_TYPE_VIDEO),i=this.getMedias(r,Qx.TRACK_TYPE_AUDIO),o=[];let a;if(n&&n.length>0&&n.forEach((e=>{e.ssrcs&&e.ssrcs.length>0&&o.push(parseInt(e.ssrcs[0].id.toString()))})),i&&i.length>0)for(const e of i)if(e.ssrcs&&e.ssrcs.length>0){a=parseInt(e.ssrcs[0].id.toString());break}return{videoSsrcs:o,audioSsrc:a}}},{key:"getLeastMid",value:function e(t){const r=this.parseSdp(t);if(!r)return void this.logger_.error(this.module_,"getLeastMid failed, the sdp is invalid : ".concat(t));let n;for(const e of r.groups||[])if("BUNDLE"===e.type){const t=(e.mids||"").split(" ");n=t[t.length-1];break}return n}}],[{key:"modifyDirectionWhenAddUser",value:function e(t,r){t&&(t.direction===oj.RECV_ONLY?t.direction=oj.SEND_RECV:t.direction===oj.INACTIVE&&(t.direction=oj.SEND_ONLY)),r&&(r.direction===oj.SEND_ONLY?r.direction=oj.SEND_RECV:r.direction===oj.INACTIVE&&(r.direction=oj.RECV_ONLY))}},{key:"modifyDirectionWhenDelUser",value:function e(t,r){t.direction===oj.SEND_RECV?t.direction=oj.RECV_ONLY:t.direction===oj.SEND_ONLY&&(t.direction=oj.INACTIVE),r.direction===oj.SEND_RECV?r.direction=oj.SEND_ONLY:r.direction===oj.RECV_ONLY&&(r.direction=oj.INACTIVE)}},{key:"modifyBundle",value:function e(t,r){for(const e of t.groups||[])if("BUNDLE"===e.type){if("string"==typeof e.mids){e.mids.split(" ").includes("".concat(r))||(e.mids="".concat(e.mids," ").concat(r))}else"number"==typeof e.mids&&(e.mids="".concat(e.mids," ").concat(r));break}}},{key:"modifyDirectionWhenPublish",value:function e(t,r,n){n?t.direction===oj.RECV_ONLY?t.direction=oj.SEND_RECV:t.direction===oj.INACTIVE&&(t.direction=oj.SEND_ONLY):t.direction===oj.SEND_ONLY?t.direction=oj.INACTIVE:t.direction===oj.SEND_RECV&&(t.direction=oj.RECV_ONLY),n?r.direction===oj.SEND_ONLY?r.direction=oj.SEND_RECV:r.direction===oj.INACTIVE&&(r.direction=oj.RECV_ONLY):r.direction===oj.SEND_RECV?r.direction=oj.SEND_ONLY:r.direction===oj.RECV_ONLY&&(r.direction=oj.INACTIVE)}}])}(Dj);const Vj="PeerConnectionsManager";let Wj=function(e){function t(e,r,n){var i;a(this,t);i=f(this,t,[{logger:e,stat:r,emitter:n}]),o(h(i),"isFireFox",sL.isFirefox()),o(h(i),"userMid",new Map),i.peerConnections=new Map,sL.isOnlySupportUnfiedPlan()?(i.sdpDescMode="unified-plan",i.rtcSdp=new Uj(i.logger)):(i.sdpDescMode="plan-b",i.rtcSdp=new jj(i.logger)),i.logger.debug(Vj,"ConnectionsManager, SDP mode: ".concat(i.sdpDescMode)),i.setPortType(cx.portReduce),i.mainReceiverPreStatisticMap=new Map,i.auxReceiverPreStatisticMap=new Map;return i}p(t,e);return u(t,[{key:"setPortType",value:function e(t){const r=zM.getParameter(ZM)||0;0!==r&&(t=r),t===cx.portNormal&&sL.isOnlySupportUnfiedPlan()&&(t=cx.portReduce),this.portType=t,this.portType===cx.portNormal&&(this.sdpDescMode="plan-b",this.rtcSdp=new jj(this.logger)),this.logger.debug(Vj,"ConnectionsManager, portType: ".concat(1===this.portType?"normal":"reduce")),this.rtcSdp.setPortType(this.portType)}},{key:"getPortType",value:function e(){return this.portType}},{key:"setTurnServer",value:function e(t){this.turnServerConfig=t}},{key:"isConnectionsExist",value:function e(){return this.peerConnections.size>0}},{key:"getConnectionId",value:function e(){return this.uniqueId}},{key:"getReceivers",value:function e(t){var r;const n=null===(r=this.peerConnections.get(t))||void 0===r?void 0:r.connection;if("plan-b"===this.sdpDescMode)return null==n?void 0:n.getReceivers();const i=[],o=null==n?void 0:n.getTransceivers();if(!o)return null;for(const e of o)e.currentDirection!==oj.SEND_RECV&&e.currentDirection!==oj.RECV_ONLY||i.push(e.receiver);return i}},{key:"getSenders",value:function e(t){var r;const n=null===(r=this.peerConnections.get(t))||void 0===r?void 0:r.connection;if("plan-b"===this.sdpDescMode)return null==n?void 0:n.getSenders();const i=[],o=null==n?void 0:n.getTransceivers();if(!o)return null;for(const e of o)e.currentDirection!==oj.SEND_RECV&&e.currentDirection!==oj.SEND_ONLY||i.push(e.sender);return i}},{key:"calcChangedStatistic",value:function e(t,r,n){if(this.mainReceiverPreStatisticMap.has(t)||this.auxReceiverPreStatisticMap.has(t)){const e=this.mainReceiverPreStatisticMap.get(t)||this.auxReceiverPreStatisticMap.get(t);if("number"==typeof r)return Object.prototype.hasOwnProperty.call(e,n[0])?r>=e[n[0]]?r-e[n[0]]:(this.clearReveiverPreStatisticBySsrcLabel(t),r):r;this.doCalcChangedStatisticObject(t,r,e,n)}else if("number"==typeof r)return r}},{key:"doCalcChangedStatisticObject",value:function e(t,r,n,i){if(i&&i.length>0){let e=0;for(const t of i)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]>=n[t]?r[t]=r[t]-n[t]:e++);e>=i.length-1&&this.clearReveiverPreStatisticBySsrcLabel(t)}else{let e=0;for(const t in r)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]>=n[t]?r[t]=r[t]-n[t]:e++);e===Object.keys(r).length&&this.clearReveiverPreStatisticBySsrcLabel(t)}}},{key:"clearReveiverPreStatisticBySsrcLabel",value:function e(t){this.mainReceiverPreStatisticMap.delete(t)||this.auxReceiverPreStatisticMap.delete(t)}},{key:"initConnectionAndSdp",value:async function e(t,r,n,i,o){this.uniqueId=t;const a=this.createPeerConnection(r),s="main"!==r;let u=await this.createOffer(r,{offerToReceiveAudio:!s,offerToReceiveVideo:!0});if(this.isFireFox){r===qx.STREAM_TYPE_MAIN&&(await a.connection.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(u.sdp)}),a.connection.addTransceiver("video",{direction:oj.INACTIVE}),u=await a.connection.createOffer());const e=this.rtcSdp.getBrowserDefaultSsrc(u.sdp);a.videoSendSsrcs=e.videoSsrcs,a.sendSsrcsMapping=new Map,e.videoSsrcs.forEach(((e,t)=>{a.sendSsrcsMapping.set(t,e)})),!s&&e.audioSsrc&&(a.audioSendSsrc=e.audioSsrc,a.sendSsrcsMapping.set(2,e.audioSsrc))}const c=this.rtcSdp.transformOfferSdp(u.sdp,o);if(await a.connection.setLocalDescription({type:"offer",sdp:c}),await this.iceAddressCollect(a.connection),!this.isFireFox){const e=a.connection.localDescription.sdp;this.logger.debug(Vj,"setLocalDescription, ".concat(r,"sdp offer: ").concat(this.rtcSdp.printSdpInfo(e))),await a.connection.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(e)})}s?this.onConnection(a,n.onTrackHandler,!0):this.rtcSdp.containsValidVideoPayload(u.sdp)||i?this.onConnection(a,n.onTrackHandler,!1):(this.destroyPeerConnection(r),this.logger.error(Vj,"initConnectionAndSdp, no H264 payload and try createOffer again"),await this.initConnectionAndSdp(t,r,n,!0))}},{key:"setSsrcsMapping",value:function e(t){const r=this.peerConnections.get(qx.STREAM_TYPE_MAIN);r.sendSsrcsMapping&&r.sendSsrcsMapping.size>0&&(r.sendSsrcsMapping.has(0)&&(r.sendSsrcsMapping.set(t.video.sendSsrcBegin,r.sendSsrcsMapping.get(0)),r.sendSsrcsMapping.delete(0)),r.sendSsrcsMapping.has(1)&&(r.sendSsrcsMapping.set(t.video.sendSsrcEnd,r.sendSsrcsMapping.get(1)),r.sendSsrcsMapping.delete(1)),r.sendSsrcsMapping.has(2)&&(r.sendSsrcsMapping.set(t.audio.sendSsrcBegin,r.sendSsrcsMapping.get(2)),r.sendSsrcsMapping.delete(2)));const n=this.peerConnections.get(qx.STREAM_TYPE_AUX);n.sendSsrcsMapping&&n.sendSsrcsMapping.size>0&&n.sendSsrcsMapping.has(0)&&(n.sendSsrcsMapping.set(t.desktopVideo.sendSsrcBegin,n.sendSsrcsMapping.get(0)),n.sendSsrcsMapping.delete(0))}},{key:"getMappingSsrcs",value:function e(t,r){if(!t)return;let n;return r||"number"!=typeof t?(n=this.peerConnections.get(r),!n.sendSsrcsMapping||n.sendSsrcsMapping.size<1?t:"number"==typeof t?n.sendSsrcsMapping.has(t)?n.sendSsrcsMapping.get(t):t:t.map((e=>n.sendSsrcsMapping.has(e)?n.sendSsrcsMapping.get(e):e))):(n=this.peerConnections.get(qx.STREAM_TYPE_MAIN),n.sendSsrcsMapping.has(t)?n.sendSsrcsMapping.get(t):(n=this.peerConnections.get(qx.STREAM_TYPE_AUX),n.sendSsrcsMapping.get(t)||t))}},{key:"createOffer",value:async function e(t,r){const n=this.peerConnections.get(t).connection,i=await n.createOffer(r);return"plan-b"!==this.sdpDescMode&&(null==n||n.getTransceivers().forEach((e=>{e.direction=oj.INACTIVE}))),i}},{key:"iceCandidateListener",value:function e(t,r){this.logger.info(Vj,"iceCandidateListener of ".concat(r)),t.connection.onicecandidate=e=>{var n;e.candidate&&"udp"===e.candidate.protocol&&(this.logger.info(Vj,"".concat(r," onicecandidate: ").concat(SI.shieldIpAddress(null===(n=e.candidate)||void 0===n?void 0:n.candidate))),t.candidate||(t.candidate=[]),t.candidate.push(e.candidate))}}},{key:"iceRestart",value:function e(t,r,n){if(this.stat.setConnectionStatusInfo(Rx.CLOSED,Ix.MEDIA),t.connectFailedTimes++,this.logger.error(Vj,"".concat(r?"aux":"main"," connection statechange, connectFailedTimes: ").concat(t.connectFailedTimes,".")),t.connectFailedTimes<=30&&(this.logger.error(Vj,"".concat(r?"aux":"main"," connection statechange, emit media error event.")),t.connectFailedTimes%2==0&&this.eventEmitter.emit(lx.Error,{errCode:nc.RTC_ERR_CODE_MEDIA_NETWORK_ERROR,errDesc:"".concat(r?"aux":"main"," peerConnection: ").concat(ic[nc.RTC_ERR_CODE_MEDIA_NETWORK_ERROR])}),30===t.connectFailedTimes))return this.eventEmitter.emit(lx.MediaConnectionStateChanged,{roomId:this.uniqueId,type:r?"aux":"main",state:dx.DisConnected}),void(t.connectFailedTimes=0);t.connection.createOffer({iceRestart:!0}).then((e=>{this.eventEmitter.emit(lx.MediaConnectionStateChanged,{roomId:this.uniqueId,type:r?"aux":"main",state:dx.Reconnecting}),t.connection.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(e.sdp)}),t.connection.setRemoteDescription({sdp:t.connection.remoteDescription.sdp,type:"answer"})})).finally((()=>{n&&n()}))}},{key:"onConnection",value:function e(t,r,n){t.connection.ontrack=e=>{r(e,n)},t.connection.onconnectionstatechange=()=>{if(this.logger.info(Vj,"onconnectionstatechange, ".concat(n?"aux":"main"," connect state is: ").concat(t.connection.connectionState," ;iceConnectionState: ").concat(t.connection.iceConnectionState)),"disconnected"!==t.connection.iceConnectionState)clearTimeout(t.disConnectDelayHandleTimer),t.disConnectDelayHandleTimer=null,"failed"===t.connection.iceConnectionState||"closed"===t.connection.iceConnectionState?(this.logger.info(Vj,"connect state failed go iceRestart: ".concat(t.connection.iceConnectionState)),this.iceRestart(t,n)):"connected"===t.connection.iceConnectionState&&(this.logger.info(Vj,"connect state connect: ".concat(t.connection.iceConnectionState)),this.stat.setConnectionStatusInfo(Rx.CONNECTED,Ix.MEDIA),t.connectFailedTimes=0,this.eventEmitter.emit(lx.MediaConnectionStateChanged,{roomId:this.uniqueId,type:n?"aux":"main",state:dx.Connected}),t.connection.getStats().then((e=>{let t=null;e.forEach((e=>{"candidate-pair"===e.type&&(this.isFireFox&&e.selected||e.nominated)&&(t=e.localCandidateId)})),t&&e.forEach((e=>{e.id===t&&(this.logger.info(Vj,"transport protocol changed, candidateType: ".concat(e.candidateType,", protocol: ").concat(e.protocol)),this.eventEmitter.emit(lx.TransportProtocolChanged,{protocol:e.protocol,candidateType:e.candidateType}))}))})));else{if(t.disConnectDelayHandleTimer)return;t.disConnectDelayHandleTimer=setTimeout((()=>{this.logger.info(Vj,"disConnect state delay handler, go iceRestart: ".concat(t.connection.iceConnectionState)),this.iceRestart(t,n,(()=>{clearTimeout(t.disConnectDelayHandleTimer),t.disConnectDelayHandleTimer=null}))}),5e3)}}}},{key:"iceAddressCollect",value:async function e(t){await new Promise((e=>{let r=null;const n=()=>{this.logger.info(Vj,"ICE collect Gathering State change: ".concat(t.iceGatheringState)),"complete"===t.iceGatheringState&&(clearTimeout(r),this.logger.info(Vj,"ICE collect complete"),t.removeEventListener("icegatheringstatechange",n),e())};t.addEventListener("icegatheringstatechange",n),r=setTimeout((()=>{this.logger.error(Vj,"ICE collect timeout"),clearTimeout(r),e()}),6e3)}))}},{key:"createPeerConnection",value:function e(t){const r={rtcpMuxPolicy:this.portType===cx.portReduce?"require":"negotiate",bundlePolicy:this.portType===cx.portReduce?"max-bundle":"balanced"},n=[];if(this.turnServerConfig){for(const e of this.turnServerConfig.turnServers)n.push("turn:".concat(e,":").concat(this.turnServerConfig.udpPort||3478,"?transport=udp"));r.iceServers=[{urls:n,username:this.turnServerConfig.userName,credential:this.turnServerConfig.credential}],r.iceTransportPolicy="relay"}r.sdpSemantics=this.sdpDescMode;const i=new RTCPeerConnection(r);var o;this.peerConnections.has(t)&&(null===(o=this.peerConnections.get(t).connection)||void 0===o||o.close());const a={connection:i,connectFailedTimes:0};return this.peerConnections.set(t,a),this.iceCandidateListener(a,t),a}},{key:"destroyPeerConnection",value:function e(t,r){const n=this.peerConnections.get(t);n&&(clearTimeout(n.disConnectDelayHandleTimer),n.connectFailedTimes=0,"closed"!==n.connection.signalingState&&(null==r||r.forEach((e=>n.connection.removeTrack(e))),n.connection.close()),"main"===t?this.mainReceiverPreStatisticMap.clear():this.auxReceiverPreStatisticMap.clear(),this.peerConnections.delete(t))}},{key:"modifySdpInfo",value:async function e(t,r){const n=this.peerConnections.get(t);let i=null;if(n)if("main"===t){const e=await this.getDataChannelTemplate(r);i=this.rtcSdp.modifyMainSdpInfo(n.connection.localDescription.sdp,n.candidate,n.videoSendSsrcs,n.audioSendSsrc,r,e)}else i=this.rtcSdp.modifyAuxSdpInfo(n.connection.localDescription.sdp,n.candidate,n.videoSendSsrcs);return i}},{key:"getDataChannelTemplate",value:async function e(t){let r=null;if(!t)return r;let n=null;try{n=new RTCPeerConnection,n.createDataChannel("dataChannelTemplate"),r=(await n.createOffer()).sdp}catch(e){this.logger.error(Vj,"getDataChannelTemplate failed, unsupport datachannel: ".concat(e))}finally{n&&n.close()}return r}},{key:"setLocalDescriptionShim",value:async function e(t,r){let n;!this.isFireFox&&r||(n=(await t.createOffer()).sdp),await t.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(n||r)})}},{key:"handleAnswerSdpFromServer",value:async function e(t,r,n){const i=this.peerConnections.get(t).connection,{remoteDescription:o,bindCryptoKey:a,wsUrl:s,dataChannelEnable:u}=this.rtcSdp.transformAnswerSdp(r,i.localDescription.sdp);let c;this.logger.debug(Vj,"handleAnswerSdpFromServer, ".concat(t," sdp answer: ").concat(this.rtcSdp.printSdpInfo(o))),c=n?await n({remoteDescription:o,bindCryptoKey:a,wsUrl:s,dataChannelEnable:u}):{answerSdp:o},c.offerSdp&&c.offerSdp!==i.localDescription.sdp&&await this.setLocalDescriptionShim(i,c.offerSdp);try{await i.setRemoteDescription({type:"answer",sdp:c.answerSdp})}catch(e){throw this.logger.error(Vj,"setRemoteDescription error, answer sdp invalid or offer sdp invalid"),new oc(nc.RTC_ERR_CODE_ANSWER_SDP_INVALID,(null==e?void 0:e.message)||"setRemoteDescription error, answer sdp invalid or offer sdp invalid")}}},{key:"getSfuInfoFromSdp",value:function e(t,r){return this.rtcSdp.getSfuInfo(t,r)}},{key:"generateAndSetOfferSdpByHandler",value:async function e(t,r){const n=this.peerConnections.get(t).connection;let i;i=r?await r(n.localDescription.sdp):n.localDescription.sdp,await this.setLocalDescriptionShim(n,i)}},{key:"generateAndSetAnswerSdpByHandler",value:async function e(t,r){const n=this.peerConnections.get(t).connection;let i;i=r?(await r(n.remoteDescription.sdp)).answerSdp:n.remoteDescription.sdp,await n.setRemoteDescription({type:"answer",sdp:i})}},{key:"deleteUser",value:async function e(t,r,n){const i=this.peerConnections.get(t).connection,o=i.remoteDescription.sdp;let a={offerSdp:i.localDescription.sdp,answerSdp:o};if("plan-b"===this.sdpDescMode)a.answerSdp=this.rtcSdp.deleteUser(a.answerSdp,r,n);else{const e=null==i?void 0:i.getTransceivers();r&&r.length>0&&(a=await this.rtcSdp.deleteUser(a.answerSdp,a.offerSdp,r,e,(e=>this.recordCurrentReceiverStatistic(t,e)))),n&&n.length>0&&(a=await this.rtcSdp.deleteUser(a.answerSdp,a.offerSdp,n,e,(e=>this.recordCurrentReceiverStatistic(t,e))))}await this.setLocalDescriptionShim(i,a.offerSdp),await i.setRemoteDescription({type:"answer",sdp:a.answerSdp})}},{key:"recordCurrentReceiverStatistic",value:async function e(t,r){const n=await r.getStats();n&&n.forEach(((e,r)=>{(this.isFireFox||/RTCInboundRTP(Video|Audio)Stream_.*/gi.test(r))&&this["main"===t?"mainReceiverPreStatisticMap":"auxReceiverPreStatisticMap"].set(r,e)}))}},{key:"getAllIdleReceiverTransceivers",value:function e(t,r,n){const i=null==t?void 0:t.getTransceivers(),o=this.rtcSdp.getAllMidsByType(n,r);return i.filter((e=>o.includes("".concat(e.mid))&&e.currentDirection!==oj.SEND_RECV&&e.currentDirection!==oj.RECV_ONLY))}},{key:"getIdleSendTransceiver",value:function e(t,r,n,i){const o=null==t?void 0:t.getTransceivers();if(this.isFireFox&&i){const e=this.rtcSdp.getOfferVideoMidBySsrc(n,r,this.getMappingSsrcs(i));return null==o?void 0:o.find((t=>t.mid===e))}const a=this.rtcSdp.getAllMidsByType(n,r);return null==o?void 0:o.find((e=>a.includes("".concat(e.mid))&&e.currentDirection!==oj.SEND_ONLY&&e.currentDirection!==oj.SEND_RECV))}},{key:"addTrack",value:async function e(t,r,n,i){const o=this.peerConnections.get(t).connection;if("plan-b"===this.sdpDescMode)return o.addTrack(r,n);const a=o.localDescription.sdp;let s=this.getIdleSendTransceiver(o,"audio"===r.kind?Qx.TRACK_TYPE_AUDIO:Qx.TRACK_TYPE_VIDEO,a,i);if(s){await s.sender.replaceTrack(r),s.direction=s.currentDirection===oj.RECV_ONLY?oj.SEND_RECV:oj.SEND_ONLY;const e=this.rtcSdp.modifyAnswerDirection(o.remoteDescription.sdp,s.mid);await this.setLocalDescriptionShim(o),await o.setRemoteDescription({type:"answer",sdp:e})}else this.logger.info(Vj,"addTrack, no available sender, addTranscevier"),s=await this.addTransceiver(o,"audio"===r.kind?Qx.TRACK_TYPE_AUDIO:Qx.TRACK_TYPE_VIDEO),await s.sender.replaceTrack(r),s.direction=s.currentDirection===oj.RECV_ONLY?oj.SEND_RECV:oj.SEND_ONLY;return s.sender}},{key:"removeTrack",value:function e(t,r){const n=this.peerConnections.get(t).connection;"closed"!==n.signalingState&&n.removeTrack(r)}},{key:"modifyPublishOfferSdp",value:async function e(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;const s=this.peerConnections.get(t).connection;let u,c,l=(await s.createOffer()).sdp;return(o&&o.length>0||a)&&("plan-b"===this.sdpDescMode?l=this.rtcSdp.deleteSSRC(l,o,a):u=this.rtcSdp.deleteSSRC(l,s.remoteDescription.sdp,this.getMappingSsrcs(o,t),this.getMappingSsrcs(a,t))),"plan-b"===this.sdpDescMode?l=this.rtcSdp.modifyPublishOfferSdp(l,n,i):u=this.rtcSdp.modifyPublishOfferSdp(u?u.offerSdp:l,u?u.answerSdp:s.remoteDescription.sdp,r,this.getMappingSsrcs(n,t),this.getMappingSsrcs(i,t)),"plan-b"===this.sdpDescMode?(await s.setLocalDescription({type:"offer",sdp:l}),await s.setRemoteDescription(s.remoteDescription),c=l):(await this.setLocalDescriptionShim(s,u.offerSdp),await s.setRemoteDescription({type:"answer",sdp:u.answerSdp}),c=u.offerSdp),c}},{key:"addTopAudioUserBatch",value:async function e(t,r,n,i){const o=this.peerConnections.get("main").connection;let a,s={offerSdp:o.localDescription.sdp,answerSdp:t};"plan-b"!==this.sdpDescMode&&(a=this.getAllIdleReceiverTransceivers(o,Qx.TRACK_TYPE_AUDIO,s.answerSdp));for(let e=0;e<n;e++){const t=r+e,n="WebAudio".concat(e)+this.rtcSdp.generateSsrcMslabel(),u={videoSsrc:null,audioSsrc:t};if("plan-b"===this.sdpDescMode)s=this.rtcSdp.addUser(s.answerSdp,n,null,u);else{let e=this.rtcSdp.getIdleTransceiverWithSameSsrc(s.answerSdp,a,t);e||(e=await this.addTransceiver(o,Qx.TRACK_TYPE_AUDIO,s)),e.direction=e.currentDirection===oj.SEND_ONLY?oj.SEND_RECV:oj.RECV_ONLY,s=this.rtcSdp.modifySdpByMid(s.answerSdp,s.offerSdp,e.mid,n,null,t),await this.setLocalDescriptionShim(o,s.offerSdp)}i(s.streamId,t)}return s}},{key:"addUserBatch",value:async function e(t,r,n){if(r.size<1)return void this.logger.debug(Vj,"addUserBatch interrupted for ssrcInfos is null");const i=this.peerConnections.get(t).connection,o=i.remoteDescription.sdp,a=i.localDescription.sdp;let s,u,c={offerSdp:a,answerSdp:o};"plan-b"!==this.sdpDescMode&&(s=this.getAllIdleReceiverTransceivers(i,Qx.TRACK_TYPE_AUDIO,o),u=this.getAllIdleReceiverTransceivers(i,Qx.TRACK_TYPE_VIDEO,o)),this.userMid.clear();for(const[e,t]of r){const r=new Map;this.userMid.set(e,r);for(const o of t){var l;const t=o.streamId;if(null!==(l=zM.getParameter(BM))&&void 0!==l&&!l||"plan-b"===this.sdpDescMode||(o.streamId=e),"plan-b"===this.sdpDescMode)c=this.rtcSdp.addUser(c.answerSdp,e,o.streamId,{videoSsrc:o.videoSsrc,audioSsrc:o.audioSsrc}),c.offerSdp=a;else if(o.audioSsrc){let t=this.rtcSdp.getIdleTransceiverWithSameSsrc(c.answerSdp,s,o.audioSsrc);t||(t=await this.addTransceiver(i,Qx.TRACK_TYPE_AUDIO,c)),t.direction=t.currentDirection===oj.SEND_ONLY?oj.SEND_RECV:oj.RECV_ONLY,c=this.rtcSdp.modifySdpByMid(c.answerSdp,c.offerSdp,t.mid,e,o.streamId,o.audioSsrc)}else if(o.videoSsrc){let a=this.rtcSdp.getIdleTransceiverWithSameSsrc(c.answerSdp,u,o.videoSsrc);if(a){if(this.isFireFox){a.receiver.track.enabled=!1;const e=setTimeout((()=>{clearTimeout(e),a.receiver.track.enabled=!0}),300)}}else a=await this.addTransceiver(i,Qx.TRACK_TYPE_VIDEO,c);a.direction=a.currentDirection===oj.SEND_ONLY?oj.SEND_RECV:oj.RECV_ONLY,c=this.rtcSdp.modifySdpByMid(c.answerSdp,c.offerSdp,a.mid,e,o.streamId,o.videoSsrc,n),r.set(a.mid,t)}await this.setLocalDescriptionShim(i,c.offerSdp),await i.setRemoteDescription({type:"answer",sdp:c.answerSdp})}}}},{key:"getTrackId",value:function e(t,r){return this.userMid.has(t)&&this.userMid.get(t).has(r)?this.userMid.get(t).get(r):"plan-b"===this.sdpDescMode?t:void this.logger.error(Vj,"can not find trackId, user:".concat(t,", mid:").concat(r))}},{key:"addTransceiver",value:async function e(t,r,n){var i;t.addTransceiver(r,{direction:oj.INACTIVE});const o=await t.createOffer();await this.setLocalDescriptionShim(t,o.sdp);const a=this.rtcSdp.getLeastMid(o.sdp),s=this.rtcSdp.generateMatchedAnswerWithOffer((null==n?void 0:n.answerSdp)||t.remoteDescription.sdp,a,r);return n&&(n.offerSdp=o.sdp,n.answerSdp=s),await t.setRemoteDescription({type:"answer",sdp:s}),null==t||null===(i=t.getTransceivers())||void 0===i?void 0:i.find((e=>"".concat(e.mid)===a))}},{key:"getConnection",value:function e(t){var r;return this.isConnectionsExist()&&this.peerConnections.get(t)?null===(r=this.peerConnections.get(t))||void 0===r?void 0:r.connection:null}},{key:"getConnectionRTT",value:function e(){let t=0;if(!this.isConnectionsExist())return t;const r=tN.getLatestReport(this.uniqueId,qx.STREAM_TYPE_MAIN);if(r){const e=r.get("candidate-pair");t=e&&e.currentRoundTripTime||0}return t}},{key:"getICETransportStat",value:function e(t){if(!t)throw this.logger.error(Vj,"getICETransportStat, pcType is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"pcType is null");const r=tN.getLatestReport(this.uniqueId,t);if(!r)return null;try{const e=r.get("candidate-pair");return{currentRoundTripTime:e.currentRoundTripTime||0,availableOutgoingBitrate:e.availableOutgoingBitrate||0,bytesSent:e.bytesSent||0,bytesReceived:e.bytesReceived||0}}catch(e){return this.logger.error(Vj,"getICETransportStat failed",e),null}}},{key:"getInfo",value:function e(){return{moduleName:"PeerConnectionsManager"}}},{key:"refreshOffer",value:async function e(t){const r=this.peerConnections.get(t).connection,n=await r.createOffer();return await r.setLocalDescription({type:"offer",sdp:this.rtcSdp.transformOfferSdp(n.sdp)}),n}}])}(LD);var Bj={exports:{}};!function(e){self,e.exports=function(){var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{GrsBaseInfo:function(){return O},GrsClient:function(){return x},GrsErrorCode:function(){return a},Logger:function(){return f}});var r=function(e){return"string"!=typeof e||""==e},n=function(e){return void 0===e||null==e||"{}"==JSON.stringify(e)},i=function(e){return!(void 0!==e&&e instanceof Array&&"[]"!=JSON.stringify(e))},o=function(e){if("string"!=typeof e||""==e)return{};try{var t=JSON.parse(e);return void 0===t||null==t?{}:t}catch(e){return{}}},a={ERR_OK:0,ERR_INTERNAL_ERROR:1,ERR_INVALID_PARAM:2,ERR_INIT:3,GRS_SET_ROUTER_DIR:4,GRS_SET_SYSTEM_INFO:5,GRS_SERVICE_CONFIGURE_NO_FILE:6,GRS_SERVICE_CONFIGURE_READ_ERROR:7,GRS_SET_CA_FILE:8,GRS_SERVICE_CONFIGURE_PARSE_ERROR:9,GRS_SERVICE_CONFIGURE_PARSE_VALUE_ERROR:10,GRS_ROUTER_CONFIGURE_EMPTY:11,GRS_ROUTER_APP_CONFIGURE_READ_ERROR:12,GRS_ROUTER_SDK_CONFIGURE_READ_ERROR:13,GRS_ROUTER_CONFIGURE_PARSE_VALUE_ERROR:14,GRS_ROUTER_SERVER_NAME_EMPTY:15,GRS_ROUTER_BY_EMPTY:16,GRS_APK_ROUTER_NO_APPLICATION:17,GRS_NOT_FIND:18,GRS_NOT_FIND_APPLICATION:19,GRS_NOT_FIND_SERVICE_LIST:20,GRS_NOT_FIND_SERVING_COUNTRY_GROUP:21,GRS_NOT_FIND_SERVICE:22,GRS_NOT_FIND_ADDRESS:23,GRS_NOT_FIND_COUNTRY:24};function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"setExtLogger",value:function(t,r,n){void 0!==t&&"function"==typeof t&&(e.extLogger=t),e.logLevel=r,e.isDebug=n}},{key:"v",value:function(){arguments.length<e.argsSize||(arguments[0]="[Verbose]"+e.TAG_NETWORKKIT_PRE+arguments[0],e.println(e.VERBOSE,arguments))}},{key:"d",value:function(){arguments.length<e.argsSize||(arguments[0]="[Debug]"+e.TAG_NETWORKKIT_PRE+arguments[0],e.println(e.DEBUG,arguments))}},{key:"i",value:function(){arguments.length<e.argsSize||(arguments[0]="[Info]"+e.TAG_NETWORKKIT_PRE+arguments[0],e.println(e.INFO,arguments))}},{key:"w",value:function(){arguments.length<e.argsSize||(arguments[0]="[Warm]"+e.TAG_NETWORKKIT_PRE+arguments[0],e.println(e.WARN,arguments))}},{key:"e",value:function(){arguments.length<e.argsSize||(arguments[0]="[Error]"+e.TAG_NETWORKKIT_PRE+arguments[0],e.println(e.ERROR,arguments))}},{key:"println",value:function(t,r){if((!(t<e.DEBUG)||e.isDebug)&&(e.isDebug||!(t<e.logLevel))&&void 0!==e.extLogger&&"function"==typeof e.extLogger){var n=[].slice.call(r);e.extLogger.apply(e,s(n))}}}],(r=null)&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();l(f,"TAG_NETWORKKIT_PRE","NetworkKit_"),l(f,"extLogger",void 0),l(f,"isDebug",!1),l(f,"VERBOSE",2),l(f,"DEBUG",3),l(f,"INFO",4),l(f,"WARN",5),l(f,"ERROR",6),l(f,"logLevel",f.INFO),l(f,"argsSize",2);var d=function(e,t,n,o,a,s,u,c){var l=e.name,f=t;if(i(e.countryOrAreaGroups)||(f=e.countryOrAreaGroups),i(f))n[l]="GRS_NOT_FIND_SERVING_COUNTRY_GROUP";else{var d=e.routeBy;if(r(d))n[l]="GRS_ROUTER_BY_EMPTY";else if("unconditional"!==d){var v=h(d,a,s,u,c);if(r(v))n[l]="GRS_NOT_FIND_COUNTRY";else{var m=p(f,v);if(r(m))n[l]="GRS_COUNTRY_CODE_NOT_IN_GROUP";else{var y=e.servings,g=!1;for(var b in y)if(y[b].countryOrAreaGroup===m){o[l]=y[b].addresses,g=!0;break}g||(n[l]="GRS_NOT_FIND_ADDRESS")}}}else o[l]=e.servings[0].addresses}},h=function(e,t,n,i,o){var a="",s=e.split(">");for(var u in s){if("ser_country"===s[u]&&!r(t)){a=t;break}if("reg_country"===s[u]&&!r(n)){a=n;break}if("issue_country"===s[u]&&!r(i)){a=i;break}if("geo_ip"===s[u]&&!r(o)){a=o;break}}return a},p=function(e,t){var r="";for(var n in e)if(e[n].countriesOrAreas.includes(t)){r=e[n].id;break}return r},v=function(e,t){var r={};if(n(e))return r;var i=e.errorList;if(!n(i)&&t in i)return r.results=i[t],r.status="failure",r;var o=e.services;return!n(o)&&t in o?(r.results=o[t],r.status="success",r):(r.results="GRS_NOT_FIND_SERVICE",r.status="notFindService",r)},m=function(e,t,r,n){var i="",o=v(e,r);if("success"===o.status&&n in o.results)return f.i("getGrsUrl","Return The Server Cached Data"),o.results[n];f.i("getGrsUrl","Cannot find "+r+"("+n+") in serverUrlInfo: ",JSON.stringify(e));var a=v(t,r);return"success"===a.status&&n in a.results?(f.i("getGrsUrl","Return The Local JSON Data"),i=a.results[n]):f.i("getGrsUrl","Cannot find "+r+"("+n+") in localUrlInfo: ",JSON.stringify(t)),i},y=function(e,t,r){var n={},i=v(e,r);if("success"===i.status)return f.i("getGrsUrl","Return The Server Cached Data"),i.results;f.i("getGrsUrl","Cannot find "+r+" in serverUrlInfo: ",JSON.stringify(e));var o=v(t,r);return"success"===o.status?n=o.results:f.i("getGrsUrl","Cannot find "+r+" in localUrlInfo: ",JSON.stringify(t)),n};function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var w=function(e,t,r,n){return new Promise((function(i,o){var a={};(function(e,t){return new Promise((function(r,n){var i=setTimeout((function(){n(new Error("TIMEOUT"))}),t);e.then((function(e){clearTimeout(i),r(e)})).catch((function(e){clearTimeout(i),n(e)}))}))})(fetch(e,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t),headers:r,redirect:"follow",referrer:"no-referrer"}),n).then((function(e){a.header=S(e.headers).reduce((function(e,t){return b(b({},e),{},_({},t[0],t[1]))}),{}),a.statusCode=e.status,a.success=!0,a["cache-time"]=(new Date).getTime(),e.json().then((function(e){a.data=e,i(a)}),(function(e){a.success=!1,a.header["cache-control"]="private,max-age=300",a.data=e,a["cache-time"]=(new Date).getTime(),o(a)}))})).catch((function(e){var t={};a.success=!1,t["cache-control"]="private,max-age=300",a.data=e,a.header=t,a["cache-time"]=(new Date).getTime(),o(a)}))}))},T=function(e){return new Promise((function(t,i){var a=e.uniqueCode(),s=o(localStorage.getItem(a)),u="&";if(f.i("getGrsDataFromServerOrCache","Get uniqueCode key From Cache: key(%s): ",a,s),n(s)||r(JSON.stringify(s)))return f.i("getGrsDataFromServerOrCache","The New GrsClient Not any Cache, start to Query GRS Server"),void I(t,e,s,a,u);var c=s.header["cache-control"].split("=");if(s["cache-time"]+1e3*c[1]>=(new Date).getTime())return f.i("getGrsDataFromServerOrCache","During The Suppression Or The Cache Not Expired"),void t(s);u=r(s.header.ETag)?"&":s.header.ETag,I(t,e,s,a,u)}))},I=function(e,t,i,o,a){R(t,a).then((function(t){if(f.d("getGrsDataFromServerOrCache","handleGrsDataFromServer: ",t),t.success){if(200===t.statusCode)return localStorage.setItem(o,JSON.stringify(t)),void e(t);if(304===t.statusCode)return i["cache-time"]=(new Date).getTime(),i.header=t.header,localStorage.setItem(o,JSON.stringify(i)),void e(i);if(503===t.statusCode)return void function(e,t,i,o){n(e)||r(e)?(t.header["cache-control"]="private,max-age="+t.header["Retry-After"],localStorage.setItem(i,JSON.stringify(t)),o(t)):(e["cache-time"]=(new Date).getTime(),e.header["cache-control"]="private,max-age="+t.header["Retry-After"],localStorage.setItem(i,JSON.stringify(e)),o(e))}(i,t,o,e);n(i)||r(i)?(t.header["cache-control"]="private,max-age=300",localStorage.setItem(o,JSON.stringify(t)),e(t)):(i["cache-time"]=(new Date).getTime(),i.header["cache-control"]="private,max-age=300",localStorage.setItem(o,JSON.stringify(i)),e(i))}})).catch((function(t){f.i("getGrsDataFromServerOrCache","handleGrsDataFromServer catch: ",t),n(i)||r(i)?(localStorage.setItem(o,JSON.stringify(t)),e(t)):(i["cache-time"]=(new Date).getTime(),i.header["cache-control"]="private,max-age=300",localStorage.setItem(o,JSON.stringify(i)),e(i))}))},R=function(e,t){var r=e.getServerConfig().grs_server.grs_query_timeout,n=e.getServerConfig().grs_server.grs_base_url,i=e.getServerConfig().grs_server.grs_query_endpoint,o=[];for(var a in n)o.push(n[a]+i+"?"+e.getGrsReqParamJoint());return function(e,t,r,n){f.i("post","urls: ",e);var i=[];return e.forEach((function(e){i.push(w(e,t,r,1e3*n))})),Promise.race(i)}(o,e._servicList,{"Content-Type":"application/json;charset=UTF-8","User-Agent":e.getUserAgent(),"If-None-Match":t},r)};function C(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var O=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.packageName="",this.versionName="",this.productName="",this.productLine="",this.appName="",this.serCountry="",this.regCountry="",this.issueCountry="",this.countrySource="",this.serverConfig={},this.apkRouteConfig={},this.sdkRouteConfig={},this._servicList={services:[]},this._cacheControl=3600,this._serviceName="no_service_name",this._keyName="no_key_name"}var t,i;return t=e,(i=[{key:"setPackageName",value:function(e){this.packageName=e}},{key:"getPackageName",value:function(){return this.packageName}},{key:"setVersionName",value:function(e){this.versionName=e}},{key:"getVersionName",value:function(){return this.versionName}},{key:"setProductName",value:function(e){this.productName=e}},{key:"setProductLine",value:function(e){this.productLine=e}},{key:"getProductLine",value:function(){return this.productLine}},{key:"setAppName",value:function(e){this.appName=e}},{key:"getAppName",value:function(){return this.appName}},{key:"setSerCountry",value:function(e){this.serCountry=e.toUpperCase()}},{key:"getSerCountry",value:function(){return this.serCountry}},{key:"setRegCountry",value:function(e){this.regCountry=e.toUpperCase()}},{key:"getRegCountry",value:function(){return this.regCountry}},{key:"setIssueCountry",value:function(e){this.issueCountry=e.toUpperCase()}},{key:"getIssueCountry",value:function(){return this.issueCountry}},{key:"setCountrySource",value:function(e){this.countrySource=e}},{key:"getCountrySource",value:function(){return this.countrySource}},{key:"setServerConfig",value:function(e){this.serverConfig=e}},{key:"getServerConfig",value:function(){return this.serverConfig}},{key:"setApkRouteConfig",value:function(e){if(!n(e)){if(!e.hasOwnProperty("applications")||!e.hasOwnProperty("services")||!e.hasOwnProperty("countryOrAreaGroups"))return;if(e.applications.length<1)return;this.apkRouteConfig=e,this.appName=e.applications[0].name,e.applications[0].hasOwnProperty("cacheControl")&&(this._cacheControl=e.applications[0].cacheControl);var t=new Set([]),r=e.applications[0].customservices;for(var i in r)t.add(r[i].name);var o=e.services;for(var a in o)t.add(o[a].name);var s=e.applications[0].services;for(var u in s)t.add(s[u]);for(var c in this._servicList.services)t.add(this._servicList.services[c]);this._servicList.services=C(t).sort()}}},{key:"getApkRouteConfig",value:function(){return this.apkRouteConfig}},{key:"setSdkRouteConfig",value:function(e){this.sdkRouteConfig=e;var t=new Set([]);for(var r in e){var n=e[r].services;for(var i in n)t.add(n[i].name)}for(var o in this._servicList.services)t.add(this._servicList.services[o]);this._servicList.services=C(t).sort()}},{key:"getSdkRouteConfig",value:function(){return this.sdkRouteConfig}},{key:"setServiceKeyName",value:function(e,t){this._serviceName=e,this._keyName=t}},{key:"hashCode",value:function(){for(var e=0,t=this.packageName+JSON.stringify(this.serverConfig.grs_server.grs_base_url)+JSON.stringify(this._servicList),r=0;r<t.length;r++)e=Math.imul(31,e)+t.charCodeAt(r)|0;return e}},{key:"uniqueCode",value:function(){return this.appName+"#"+this.serCountry+"#"+this.regCountry+"#"+this.issueCountry+"#"+this.hashCode()}},{key:"getGrsReqParamJoint",value:function(){var e="";return r(this.appName)||(e+="app_name="+this.appName),r(this.versionName)||(r(e)||(e+="&"),e+="app_version="+this.versionName),r(this.packageName)||(r(e)||(e+="&"),e+="package_name="+this.packageName),r(this.serCountry)||(r(e)||(e+="&"),e+="ser_country="+this.serCountry),r(this.regCountry)||(r(e)||(e+="&"),e+="reg_country="+this.regCountry),r(this.issueCountry)||(r(e)||(e+="&"),e+="issue_country="+this.issueCountry),r(this.countrySource)||(r(e)||(e+="&"),e+="country_source="+this.countrySource),e}},{key:"getUserAgent",value:function(){var e,t;try{e=((t=navigator.userAgent.toLowerCase()).indexOf("msie")>0?t.match(/msie [\d.]+;/gi):t.indexOf("firefox")>0?t.match(/firefox\/[\d.]+/gi):t.indexOf("chrome")>0?t.match(/chrome\/[\d.]+/gi):t.indexOf("safari")>0&&t.indexOf("chrome")<0?t.match(/safari\/[\d.]+/gi):void 0)[0].replace("/","; ")}catch(t){e="unknown; web-browser"}return this.packageName+"/"+this.versionName+" ("+e+"; NA) network-grs-web/5.0.9.300 "+this.serviceName}}])&&A(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var x=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._grsBaseInfo=t,this._localUrlInfo={},this._serverUrlInfo={},this._cacheExpirationTime=0,this._isLocalInit=!1}var t,s;return t=e,(s=[{key:"initLocal",value:function(){if(!(this._grsBaseInfo instanceof O))return f.i("GrsClient","new GrsClient(grsBaseInfo): the grsBaseInfo not instanceof GrsBaseInfo",this._grsBaseInfo),a.ERR_INVALID_PARAM;f.i("GrsClient","entry initLocal with GrsBaseInfo: ",this._grsBaseInfo);var e,t=(e=this._grsBaseInfo,r(e.packageName)||r(e.versionName)||r(e.productName)||r(e.productLine)?(f.i("checkGrsBaseInfo","The packageName, versionName, productName, productLine Must Be Set",e),a.ERR_INVALID_PARAM):n(e.getServerConfig())?(f.i("checkGrsBaseInfo","The getServerConfig Must Be Set",e),a.GRS_SERVICE_CONFIGURE_NO_FILE):r(e.getAppName())&&n(e.getSdkRouteConfig())?(f.i("checkGrsBaseInfo","Either set the appName or Give the contents of the SDK file",e),a.ERR_INVALID_PARAM):a.ERR_OK);if(t!==a.ERR_OK)return t;var s=function(e,t){var r=[],o=[],s=[],u=[],c={status:a.ERR_OK};if(!n(e)){if(!e.hasOwnProperty("applications")||!e.hasOwnProperty("services")||!e.hasOwnProperty("countryOrAreaGroups"))return f.e("getAllServicesFromLocal","The Apk Route Config File Must has Property: applications, services and countryOrAreaGroups"),c.status=a.GRS_APK_ROUTER_NO_APPLICATION,c.message="GRS_APK_ROUTER_NO_APPLICATION",c;s=e.applications[0].services;var l=e.applications[0].customservices;for(var d in l)o.includes(l[d].name)||(o.push(l[d].name),r.push(l[d]));var h=e.services;for(var p in h)o.includes(h[p].name)||(o.push(h[p].name),r.push(h[p]));u=e.countryOrAreaGroups}if(!n(t))for(var v in t){if(!t[v].hasOwnProperty("services")||!t[v].hasOwnProperty("countryOrAreaGroups"))return f.e("getAllServicesFromLocal","The Sdk Route Config File Must has Property: services and countryOrAreaGroups"),c.status=a.GRS_ROUTER_SDK_CONFIGURE_READ_ERROR,c.message="GRS_ROUTER_SDK_CONFIGURE_READ_ERROR",c;i(u)&&(u=t[v].countryOrAreaGroups);var m=t[v].services;for(var y in m)o.includes(m[y].name)||(o.push(m[y].name),r.push(m[y]))}for(var g in s)o.includes(s[g])||o.push(s[g]);return c.services=r,c.countryOrAreaGroups=u,c}(this._grsBaseInfo.getApkRouteConfig(),this._grsBaseInfo.getSdkRouteConfig());if(s.status!=a.ERR_OK)return s.status;this._localUrlInfo=function(e,t,r,i,o,a){var s={},u={};for(var c in e){var l=e[c];d(l,t,s,u,r,i,o,a)}var f={};return n(s)||(f.errorList=s),n(u)||(f.services=u),f}(s.services,s.countryOrAreaGroups,this._grsBaseInfo.getSerCountry(),this._grsBaseInfo.getRegCountry(),this._grsBaseInfo.getIssueCountry(),"");var u=this._grsBaseInfo.uniqueCode(),c=o(localStorage.getItem(u));if(void 0!==c&&null!=c&&"{}"!=JSON.stringify(c)&&c.success&&(200==c.statusCode||304==c.statusCode)){this._serverUrlInfo=c.data;var l=c.header["cache-control"].split("=");this._cacheExpirationTime=c["cache-time"]+1e3*l[1]}return this._isLocalInit=!0,a.ERR_OK}},{key:"syncGetGrsUrl",value:function(e,t){var n=this;return this._grsBaseInfo.setServiceKeyName(e,t),new Promise((function(i,o){if(n._isLocalInit){var a=new Date;if(n._cacheExpirationTime<a.getTime())return f.w("GrsClient","SyncGetGrsUrl: The cache has expired. Request To The server asynchronously"),void T(n._grsBaseInfo).then((function(a){f.i("GrsClient","data: ",a),n._serverUrlInfo=a.data;var s=a.header["cache-control"].split("=");n._cacheExpirationTime=a["cache-time"]+1e3*s[1],a.success&&200===a.statusCode?f.i("GrsClient","Success: Synchronization of GRS server data",a):f.i("GrsClient","Failure: Synchronization of GRS server data",a);var u=m(n._serverUrlInfo,n._localUrlInfo,e,t);r(u)?o(new Error("Cannot Get GRS url from serverUrlInfo and localUrlInfo")):i(u)}));var s=m(n._serverUrlInfo,n._localUrlInfo,e,t);r(s)?o(new Error("Cannot Get GRS url from serverUrlInfo and localUrlInfo")):i(s)}else o(new Error("Init() must be Success called before calling the SyncGetGrsUrl()"))}))}},{key:"syncGetGrsUrls",value:function(e){var t=this;return this._grsBaseInfo.setServiceKeyName(e,"no_key_name"),new Promise((function(r,i){if(t._isLocalInit){var o=new Date;if(t._cacheExpirationTime<o.getTime())return f.w("GrsClient","SyncGetGrsUrls: The cache has expired. Request To The server asynchronously"),void T(t._grsBaseInfo).then((function(o){t._serverUrlInfo=o.data;var a=o.header["cache-control"].split("=");t._cacheExpirationTime=o["cache-time"]+1e3*a[1],o.success&&200===o.statusCode?f.i("GrsClient","Success: Synchronization of GRS server data",o):f.i("GrsClient","Failure: Synchronization of GRS server data",o);var s=y(t._serverUrlInfo,t._localUrlInfo,e);n(s)?i(new Error("Cannot Get GRS urls from serverUrlInfo and localUrlInfo")):r(s)}));var a=y(t._serverUrlInfo,t._localUrlInfo,e);n(a)?i(new Error("Cannot Get GRS url from serverUrlInfo and localUrlInfo")):r(a)}else i(new Error("Init() must be Success called before calling the SyncGetGrsUrls()"))}))}},{key:"asyncGetGrsUrl",value:function(e,t,r,n){this.syncGetGrsUrl(e,t).then((function(e){r(e)})).catch((function(e){n(e)}))}},{key:"asyncGetGrsUrls",value:function(e,t,r){this.syncGetGrsUrls(e).then((function(e){t(e)})).catch((function(e){r(e)}))}}])&&P(t.prototype,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();return t}()}(Bj);const Gj={grs_server:{grs_base_url:["https://grs-pub.platform.dbankcloud.com","https://grs-pub.platform.dbankcloud.cn","https://grs-pub.platform.dbankcloud.ru"],grs_query_endpoint:"/grs/2.0/router",grs_query_timeout:2}};function Zj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fj(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zj(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zj(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Hj="access",Xj="com.huawei.cloud.hianalytics.aspg",Yj="com.huawei.cloud.videortn";var Kj=function(e){return e.GLOBAL="GLOBAL",e.ROOT="ROOT",e}(Kj||{});let zj=function(){function e(t){a(this,e);this.logger=t,this.edgeNodeDomains=new Map}return u(e,[{key:"getAccessInfo",value:async function t(r,n){this.edgeNodeDomains.clear();const i=zM.getParameter(FM);if(!r){var o;const t=((null===(o=zM.getParameter(HM))||void 0===o?void 0:o.rtc_webjs_grs_sdk_global_route_config)||MM).grs_sdk_global_route_config_hwrtc.services[0].servings[0].addresses;return this.edgeNodeDomains.set("default",e.generateUrl(Yj,t[(null==i?void 0:i.grsKey)||"GLOBAL"],i)),this.edgeNodeDomains}const a={id:((null==n?void 0:n.length)||0)+1,domain:"GRS",start_ms:SI.getCurrentTimestamp(),delay_ms:0,stepName:"getAccessInfo",rspCode:"",errMsg:""};let s=null,u=null;try{this.grsClient||(this.grsClient=this.createGrsClient(r)),s=await this.getUrlByGrs(Yj,r,i),u=await this.getUrlByGrs(Xj,r,i),a.delay_ms=SI.getCurrentTimestamp()-a.start_ms,a.rspCode="ok",a.errMsg="success"}catch(e){this.logger.error(Hj,"getAccessInfo failed: ".concat(e)),a.delay_ms=SI.getCurrentTimestamp()-a.start_ms,a.rspCode=e.name,a.errMsg=e.message}finally{s||(s=this.getDefaultUrlByCountry(Yj,r,i)),this.edgeNodeDomains.set("default",s),u||(u=this.getDefaultUrlByCountry(Xj,r,i)),DM.setReportServer(u),this.logger.info(Hj,"doAccess, accessUrl: ".concat(s,", haUrl: ").concat(u))}return n.push(a),this.edgeNodeDomains}},{key:"setOpsUrl",value:async function e(t){this.grsClient||(this.grsClient=this.createGrsClient(t));const r=await this.getUrlByGrs(Xj,t);DM.setReportServer(r),this.logger.info(Hj,"getOpsUrl, haUrl: ".concat(r))}},{key:"createGrsClient",value:function e(t){this.logger.info(Hj,"createGrsClient, countryCode:".concat(t)),"none"!==AI.logLevel&&Bj.exports.Logger.setExtLogger(this.logger[AI.logLevel].bind(this.logger),Bj.exports.Logger.ERROR+1-vm.indexOf(AI.logLevel),AI.logLevel===vm[vm.length-1]);const r=new Bj.exports.GrsBaseInfo;r.setPackageName("rtc"),r.setVersionName(Ux),r.setProductLine("rtsa"),r.setProductName("WEB");const n=zM.getParameter(HM)||{},i=n.grs_server_config||Gj,o=xM.getProxyServer(),a=[];if(o)for(const e of i.grs_server.grs_base_url){const t=e.replace(/http(s)?:\/\//,"");a.push("".concat(o,"/").concat(t))}else a.push(...i.grs_server.grs_base_url);const s=Fj(Fj({},i.grs_server),{grs_base_url:a});r.setServerConfig({grs_server:s}),r.setSdkRouteConfig(n.rtc_webjs_grs_sdk_global_route_config||MM),r.setApkRouteConfig(n.grs_app_global_route_config||LM),t&&(r.setSerCountry(t),r.setRegCountry(t),r.setIssueCountry(t));const u=new Bj.exports.GrsClient(r),c=u.initLocal();if(c!==Bj.exports.GrsErrorCode.ERR_OK)throw this.logger.error(Hj,"createGrsClient failed,status: ".concat(c)),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR,"createGrsClient failed,status: ".concat(c));return this.logger.info(Hj,"createGrsClient success"),u}},{key:"getUrlByGrs",value:async function t(r,n,i){let o=null;try{this.logger.info(Hj,"getGrsUrl begin, serviceName:".concat(r,", countryCode:").concat(n,", envInfo:").concat(JSON.stringify(i||{})));const t=r===Yj?e.getGrsKey(n,i):Kj.ROOT;this.logger.info(Hj,"getGrsUrl , serviceName:".concat(r,", envKey:").concat(t));const a=await this.grsClient.syncGetGrsUrl(r,t);o=a?e.generateUrl(r,a,i):this.getDefaultUrlByCountry(r,n,i),this.logger.info(Hj,"getGrsUrl for serviceName:".concat(r," success:").concat(o))}catch(e){this.logger.error(Hj,"serviceName:".concat(r," failed to getGrsUrl: ").concat(e))}finally{o||(o=this.getDefaultUrlByCountry(r,n,i))}return o}},{key:"getDefaultUrlByCountry",value:function t(r,n,i){let o=null;if(r===Yj){const e=MM.grs_sdk_global_route_config_hwrtc.countryOrAreaGroups;let t="DR1";for(const r of e)if(r.countriesOrAreas.includes(n)){t=r.id;break}const r=MM.grs_sdk_global_route_config_hwrtc.services[0].servings;for(const e of r)if(e.countryOrAreaGroup===t){o=e.addresses.ROOT;break}}else{const e=MM.grs_sdk_global_route_config_rtcha.countryOrAreaGroups;let t="DR1";for(const r of e)if(r.countriesOrAreas.includes(n)){t=r.id;break}const r=MM.grs_sdk_global_route_config_rtcha.services[1].servings;for(const e of r)if(e.countryOrAreaGroup===t){o=e.addresses.ROOT;break}}return e.generateUrl(r,o,i)}}],[{key:"getGrsKey",value:function e(t,r){return r?r.grsKey:t?Kj.ROOT:Kj.GLOBAL}},{key:"generateUrl",value:function e(t,r,n){return t===Xj?r:(n=n||{grsKey:"",pathSuffix:""}).pathSuffix?"".concat(r,"/websocket/").concat(n.pathSuffix):r+"/websocket"}}])}();var Jj=function(e){return e.joinRoom="JOIN_ROOM_SUC",e.exitRoom="EXIT_ROOM",e.disableVideo="DISABLE_VIDEO",e.disableAudio="DISABLE_AUDIO",e.enableVideo="ENABLE_VIDEO",e.enableAudio="ENABLE_AUDIO",e}(Jj||{}),Qj=function(e){return e[e.subscribe=0]="subscribe",e[e.unsubscribe=1]="unsubscribe",e}(Qj||{});const qj={LD:{streamUid:-999,pssrc:999,width:160,height:90},SD:{streamUid:-3,pssrc:3,width:320,height:180},HD:{streamUid:-2,pssrc:2,width:640,height:360},FHD:{streamUid:-1,pssrc:1,width:1280,height:720},LD_1:{streamUid:-999,pssrc:999,width:160,height:90},SD_2:{streamUid:-3,pssrc:3,width:320,height:180},HD_3:{streamUid:-2,pssrc:2,width:640,height:360},FHD_4:{streamUid:-1,pssrc:1,width:1280,height:720}};var $j=function(e){return e[e.audio=0]="audio",e[e.mainVideo=1]="mainVideo",e[e.auxVideo=2]="auxVideo",e}($j||{});const eU="RemoteUserManager";let tU=function(){function e(t){a(this,e);this.client=t,this.logger=t.logger,this.remoteUserInfos=new Map,this.previousAudioSubscribedUsers=new Map,this.roomSsrc=new Map}return u(e,[{key:"checkSsrcIsMute",value:function e(t){let r=!0;return this.remoteUserInfos.forEach((e=>{e.userState===JM.Joined&&(e.mainStream&&e.mainStream.remoteTrackInfos&&e.mainStream.remoteTrackInfos.forEach((e=>{e.cssrc===t&&(r=e.mute)})),e.auxStream&&e.auxStream.remoteTrackInfos&&e.auxStream.remoteTrackInfos.forEach((e=>{e.cssrc===t&&(r=e.mute)})))})),r}},{key:"checkRemoteTop3NeedReport",value:function e(){let t=0;return this.remoteUserInfos.forEach((e=>{e.userState===JM.Joined&&e.mainStream&&e.mainStream.remoteTrackInfos&&e.mainStream.remoteTrackInfos.forEach((e=>{e.type===Qx.TRACK_TYPE_AUDIO&&t++}))})),!(t<3)}},{key:"initialize",value:function e(t,r){t&&r&&(this.localUserId=t,this.audioCssrcs=this.getCssrcRangeByType(r,$j.audio),this.mainVideoCssrcs=this.getCssrcRangeByType(r,$j.mainVideo),this.auxVideoCssrcs=this.getCssrcRangeByType(r,$j.auxVideo))}},{key:"getStreamInfoByPStreamUid",value:function e(t){let r=null;return Array.from(this.remoteUserInfos.values()).forEach((e=>{var n,i,o;if(null!==(n=e.mainStream)&&void 0!==n&&n.remoteTrackInfos.get(t.toString()))r=null===(o=e.mainStream)||void 0===o?void 0:o.remoteTrackInfos.get(t.toString());else if(null!==(i=e.auxStream)&&void 0!==i&&i.remoteTrackInfos.get(t.toString())){var a;r=null===(a=e.auxStream)||void 0===a?void 0:a.remoteTrackInfos.get(t.toString())}})),r}},{key:"getCssrcRangeByType",value:function t(r,n){if(!r)throw this.logger.error(eU,"sdpRepInfo is null"),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);const i=n===$j.audio?r.audio:n===$j.mainVideo?r.video:r.desktopVideo,o=null==i?void 0:i.receiveSsrcBegin,a=null==i?void 0:i.receiveSsrcEnd;if(!o||!a||o>=a)throw this.logger.error(eU,"begin or end is invalid"),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);return e.getCssrcRange(o,a)}},{key:"refreshRemoteUserList",value:function e(t,r,n){const i=[],o=this.getUserStreamUpdatedList(t,r);return o?(o.addedUsers.forEach((e=>{const r=this.addUser(e,t,n);r&&i.push(r)})),o.updatedUsers.forEach((e=>{const r=this.updateUser(e,t,n);r&&i.push(r)})),o.removedUsers.forEach((e=>{const r=this.removeUser(e,t,n);r&&i.push(r)})),this.logger.info(eU,"refreshRemoteUserStreamList success, ".concat(this.getTracksUpdateInfosString(i))),i):null}},{key:"addUser",value:function e(t,r,n){return this.updateUser(t,r,n)}},{key:"updateUser",value:function e(t,r,n){var i,o,a;if(t.userId===this.localUserId)return null;const s={userId:t.userId,userUid:t.userUid,nickname:t.appData.nickname,roomId:r,relaySrcRoomId:null===(i=t.relayUserSrcInfo)||void 0===i?void 0:i.roomId},u=null===(o=t.videoStreams)||void 0===o?void 0:o.filter((e=>e.content!==ex.desktop)),c=null===(a=t.videoStreams)||void 0===a?void 0:a.filter((e=>e.content===ex.desktop)),l=t.audioStreams,f=this.getUserInfoById(s.userId,s.roomId),d=this.doRefreshRemoteStreamList(s,qx.STREAM_TYPE_MAIN,u,l,n),h=this.doRefreshRemoteStreamList(s,qx.STREAM_TYPE_AUX,c,null,n),p=this.getUserInfoById(s.userId,s.roomId);return{userInfo:p.userInfo,preUserState:f?p.userState:JM.NotJoin,curUserState:p.userState,isUserNameChanged:null,mainStream:d,auxStream:h}}},{key:"removeUser",value:function e(t,r,n){if(t.userId===this.localUserId)return null;const i={userId:t.userId,userUid:t.userUid,nickname:t.appData.nickname,roomId:r};this.doRefreshRemoteStreamList(i,qx.STREAM_TYPE_MAIN,[],[],n),this.doRefreshRemoteStreamList(i,qx.STREAM_TYPE_AUX,[],[],n);const o={status:Jj.exitRoom,userId:t.userId,userUid:t.userUid},a=this.updateUserListInfo(r,[o]);return a&&0!==a.length?a[0]:null}},{key:"getUserStreamUpdatedList",value:function e(t,r){const n=this.getAllUserInfos(t),i=[],o=[],a=[];return n.forEach((e=>{if(e.userInfo.userId===nx)return;const t=r.find((t=>t.userId===e.userInfo.userId)),n=this.getAllTracksByMediaType(e.userInfo.roomId,e.userInfo.userId,Qx.TRACK_TYPE_VIDEO),i=this.getAllTracksByMediaType(e.userInfo.roomId,e.userInfo.userId,Qx.TRACK_TYPE_AUDIO);if(t){t.audioStreams&&(t.audioStreams=t.audioStreams.filter((e=>"main"===e.content)));const e={userId:t.userId,userUid:t.userUid,appData:t.appData,videoStreams:t.videoStreams,audioStreams:t.audioStreams,relayUserSrcInfo:t.relayUserSrcInfo};o.push(e)}else{const t=n.map((e=>({content:e.content,codec:e.codec,fps:e.fps,height:e.height,maxFs:e.maxFs,maxMbps:e.maxMbps,mute:e.mute,pt:e.pt,ssrc:e.pssrc,streamData:e.streamData,streamUid:parseInt(e.trackId),width:e.width}))),r=i.map((e=>({content:e.content,codec:e.codec,maxMbps:e.maxMbps,mute:e.mute,pt:e.pt,ssrc:e.pssrc,streamData:e.streamData,streamUid:parseInt(e.trackId),channels:e.channels,sampleRate:e.sampleRate}))),o={userId:e.userInfo.userId,userUid:e.userInfo.userUid,appData:{nickname:e.userInfo.nickname},videoStreams:t,audioStreams:r};a.push(o)}})),r.forEach((e=>{if(!n.some((t=>t.userInfo.userId===e.userId))){e.audioStreams&&(e.audioStreams=e.audioStreams.filter((e=>"main"===e.content)));const t={userId:e.userId,userUid:e.userUid,appData:e.appData,videoStreams:e.videoStreams,audioStreams:e.audioStreams,relayUserSrcInfo:e.relayUserSrcInfo};i.push(t)}})),{addedUsers:i,updatedUsers:o,removedUsers:a}}},{key:"updateUserListInfo",value:function e(t,r){if(!r||!t)return null;const n=[],i=[];return r.forEach((e=>{var r;const o={userId:e.userId,userUid:e.userUid,roomId:t,nickname:e.appData?e.appData.nickname:null,relaySrcRoomId:null===(r=e.relayUserSrcInfo)||void 0===r?void 0:r.roomId},a=this.updateUserInfo(o,e.status);a&&n.push(a),i.push(e.userId)})),n.push(...this.getOtherRemoteUserPublishInfos(i,t)),this.logger.info(eU,"updateUserListInfo success, ".concat(this.getTracksUpdateInfosString(n))),n}},{key:"updateUserInfo",value:function t(r,n){if(this.logger.info(eU,"updateUserInfo begin, updateType:".concat(n,", userInfo: ").concat(JSON.stringify(r))),r.userId===this.localUserId)return null;const i=this.getUserInfoById(r.userId,r.roomId),o=i?i.userState:JM.NotJoin,a=!!i&&e.isUserNameChanged(i.userInfo,null==r?void 0:r.nickname);switch(n){case Jj.exitRoom:if(!i)return this.logger.error(eU,"remote user leave, but user not exist"),null;break;case Jj.joinRoom:i||this.initializeRemoteUser(r,!0);break;default:this.logger.error(eU,"updateUserInfo, unknown user status:".concat(n))}const s=this.getUserInfoById(r.userId,r.roomId),u=n===Jj.joinRoom?e.getUserUpdateInfoWhenJoin(o,a,s):e.getUserUpdateInfoWhenQuit(o,s);if(n===Jj.exitRoom&&s.userState===JM.NotJoin){const t=e.generateUniqueId(r.userId,r.roomId);this.remoteUserInfos.delete(t)}return u}},{key:"getTracks4UnSubscribe",value:function e(t){if(!t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const r=[];return t.forEach((e=>{e.isSubscribed&&(e.isSubscribed=!1,r.push(e))})),this.logger.info(eU,"getTracks4UnSubscribe success, tracks4Unsubscribe: ".concat(JSON.stringify(r))),r}},{key:"cachePlayInfo",value:function t(r,n,i,o,a){if(!a)return;const s=this.getUserInfoById(r.userId,r.roomId),u=n===qx.STREAM_TYPE_MAIN?s.mainStream:s.auxStream,c=null==u?void 0:u.subscribeOption;return c?e.isStreamRemoved(i,o)?(c.audio=!1,c.video=!1,void(c.resolutions=null)):void a.forEach((e=>{if(e.isSubscribed){if(c.audio&&e.type===Qx.TRACK_TYPE_AUDIO){var t;const r=null==u||null===(t=u.remoteStream)||void 0===t?void 0:t.getAudioHRTCTrack();r&&(c.audioPlayInfo.playElement=r.getElementId(),c.audioPlayInfo.objectFit=r.getObjectFit(),c.audioPlayInfo.muted=r.getTrackMuted(),e.muted=r.getTrackMuted())}if(c.video&&e.type===Qx.TRACK_TYPE_VIDEO){var r;const t=null==u||null===(r=u.remoteStream)||void 0===r?void 0:r.getVideoHRTCTrackByTrackId(e.trackId);if(t){var n;const r=null===(n=c.resolutions)||void 0===n?void 0:n.find((t=>t.resolutionId===e.trackId));r&&(r.playElement=t.getElementId(),r.objectFit=t.getObjectFit(),r.muted=t.getTrackMuted(),e.muted=t.getTrackMuted())}}}})):void 0}},{key:"getTracks4Subscribe",value:function e(t,r,n,i,o){if(this.logger.debug(eU,"getTracks4Subscribe begin"),!(i&&0!==i.length||o&&0!==o.length))return this.logger.debug(eU,"getTracks4Subscribe success, tracks4Subscribe: []"),[];const a=o.filter((e=>e.isSubscribed)),s=[],u=this.isAudioTrackNeedSubscribe(t.userId,t.roomId,r),c=i.find((e=>e.type===Qx.TRACK_TYPE_AUDIO));if(u&&c){c.cssrc=this.allocateAudioReceiveSsrc(t.roomId),c.isSubscribed=!0;const e=this.getAudioTrackPlayInfo(t.userId,t.roomId,r);e&&e.playElement&&(c.state=QM.resolutionChange,c.playElement=e.playElement,c.objectFit=e.objectFit,c.muted=e.muted);const n=a.find((e=>e.type===Qx.TRACK_TYPE_AUDIO));n&&(c.state=n.state,c.muted=n.muted),s.push(c)}const l=a.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)),f=i.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO));for(const e of f){const n={resolutionId:e.trackId,width:e.width,height:e.height};if(this.updateVideoSubscribeOption(t.userId,t.roomId,r,n,l)){e.cssrc=this.allocateVideoReceiveSsrc(t.roomId,r),e.isSubscribed=!0,e.state=QM.resolutionChange;const i=this.getVideoTrackPlayInfo(t.userId,t.roomId,r,n);i&&(e.playElement=i.playElement,e.objectFit=i.objectFit,e.muted=i.muted);const o=this.getTrack4Replace(e,l);o&&o.state!==QM.normal&&(e.state=o.state,e.muted=o.muted),s.push(e)}}return this.logger.info(eU,"getTracks4Subscribe success, tracks4Subscribe: ".concat(JSON.stringify(s))),s}},{key:"getAudioTrackPlayInfo",value:function e(t,r,n){var i;const o=this.getUserInfoById(t,r);return null===(i=(n===qx.STREAM_TYPE_MAIN?o.mainStream:o.auxStream).subscribeOption)||void 0===i?void 0:i.audioPlayInfo}},{key:"getVideoTrackPlayInfo",value:function e(t,r,n,i){var o,a;const s=this.getUserInfoById(t,r),u=null===(o=(n===qx.STREAM_TYPE_MAIN?s.mainStream:s.auxStream).subscribeOption)||void 0===o||null===(a=o.resolutions)||void 0===a?void 0:a.find((e=>e.resolutionId===i.resolutionId));return u?{playElement:u.playElement,objectFit:u.objectFit,muted:u.muted}:null}},{key:"updateVideoSubscribeOption",value:function e(t,r,n,i,o){const a=this.getUserInfoById(t,r),s=n===qx.STREAM_TYPE_MAIN?a.mainStream:a.auxStream,u=null==s?void 0:s.subscribeOption;if(!u)return!1;if(!u.video)return!1;const c=u.resolutions.find((e=>e.resolutionId===i.resolutionId||e.height===i.height&&e.width===i.width||(null==o?void 0:o.length)));return c&&(c.resolutionId=i.resolutionId),!!c}},{key:"enableTopThreeAudioMode",value:function e(t){const r=this.getAllUserInfos(t);null==r||r.forEach((e=>{var t,r;null!==(t=e.mainStream)&&void 0!==t&&t.subscribeOption&&(e.mainStream.subscribeOption.audio=!1),null!==(r=e.auxStream)&&void 0!==r&&r.subscribeOption&&(e.auxStream.subscribeOption.audio=!1)})),this.logger.info(eU,"enableTopThreeAudioMode success")}},{key:"isAudioTrackNeedSubscribe",value:function e(t,r,n){var i;const o=this.getUserInfoById(t,r),a=n===qx.STREAM_TYPE_MAIN?o.mainStream:o.auxStream;return null==a||null===(i=a.subscribeOption)||void 0===i?void 0:i.audio}},{key:"getTrack4Replace",value:function e(t,r){return(null==r?void 0:r.find((e=>e.trackId===t.trackId||e.height===t.height&&e.width===t.width)))||(null!=r&&r.length?r[0]:null)}},{key:"getAllUserStreamsByType",value:function t(r,n,i){return this.getAllUserInfos(r).map((t=>{const o=n&&n!==qx.STREAM_TYPE_MAIN?null:e.getStreamInfoByType(t,qx.STREAM_TYPE_MAIN,i),a=n&&n!==qx.STREAM_TYPE_AUX?null:e.getStreamInfoByType(t,qx.STREAM_TYPE_AUX,i);return{userId:t.userInfo.userId,roomId:r,mainStream:o,auxStream:a}}))}},{key:"getUserInfoById",value:function t(r,n){const i=e.generateUniqueId(r,n);return this.remoteUserInfos.get(i)}},{key:"getUserInfoByUid",value:function e(t,r){let n=null;for(const e of this.remoteUserInfos.values())if(e.userInfo.userUid===t&&e.userInfo.roomId===r){n=e;break}return n}},{key:"getAllTracksByMediaType",value:function t(r,n,i){var o,a;const s=e.generateUniqueId(n,r),u=this.remoteUserInfos.get(s);if(!u)return null;const c=[],l=null===(o=e.getRemoteTrackInfos(u.mainStream))||void 0===o?void 0:o.filter((e=>e.type===i));l&&c.push(...l);const f=null===(a=e.getRemoteTrackInfos(u.auxStream))||void 0===a?void 0:a.filter((e=>e.type===i));return f&&c.push(...f),c}},{key:"getMaxResolutionTrack",value:function e(t){let r;for(const e of t)e.type!==Qx.TRACK_TYPE_AUDIO&&(r?Math.max(e.width,e.height)-Math.max(r.width,r.height)>0&&(r=e):r=e);return this.logger.info(eU,"getMaxResolutionTrackId, maxResolution: ".concat(JSON.stringify(r))),r}},{key:"getMaxResolutionTrackId",value:function e(t){var r;if(!t)return null;const n=Array.from(t.remoteTrackInfos.values());let i;for(const e of n)e.type!==Qx.TRACK_TYPE_AUDIO&&(i?Math.max(e.width,e.height)-Math.max(i.width,i.height)>0&&(i=e):i=e);return this.logger.info(eU,"getMaxResolutionTrackId, maxResolution: ".concat(JSON.stringify(i))),null===(r=i)||void 0===r?void 0:r.trackId}},{key:"getAllSubscribedMainStream",value:function e(t){const r=this.getAllUserInfos(t),n=[];return r.forEach((e=>{var t;null!==(t=e.mainStream)&&void 0!==t&&t.remoteTrackInfos&&Array.from(e.mainStream.remoteTrackInfos.values()).some((e=>e.isSubscribed))&&n.push(e)})),n}},{key:"batchSubscribeMainStream",value:function t(r,n){if(!r||!n)return null;const i=this.getAllSubscribedMainStream(r),o=[],a=n.find((e=>e.userId===nx));if(a){this.getUserInfoById(nx,r)||this.createRemoteShadowUser(r,a.resolutionIds)}return this.getAllUserInfos(r).forEach((t=>{const a=n.find((e=>e.userId===t.userInfo.userId));if(a){const e={video:!0,audio:!1,resolutionIds:a.resolutionIds,autoAdjustResolution:a.autoAdjustResolution,minResolution:a.minResolution},t=this.subscribeSingleStream(a.userId,r,qx.STREAM_TYPE_MAIN,e,$x.TOPN_AUDIOPOLICY,!0);o.push(t)}else{var s;const r=e.getRemoteTrackInfos(t.mainStream),a=null==r?void 0:r.filter((e=>e.isSubscribed)),u=this.needUnsubscribeMainStream(t,n,i),c=e.getAnotherStreamUpdateInfo(qx.STREAM_TYPE_MAIN,t),l={userInfo:t.userInfo,curUserState:t.userState,preUserState:t.userState,mainStream:{remoteStream:null===(s=t.mainStream)||void 0===s?void 0:s.remoteStream,preTracks:r,curTracks:r,addedTracks:null,updatedTracks:null,removedTracks:null,subscribedTracks:a,tracks4Subscribe:null,tracks4Unsubscribe:a,allSubscribeTracks:u?null:a},auxStream:c};o.push(l)}})),this.logger.info(eU,"batchSubscribeMainStream success, infos: ".concat(this.getTracksUpdateInfosString(o))),o}},{key:"needUnsubscribeMainStream",value:function e(t,r,n){const i=!r.some((e=>e.userId===t.userInfo.userId)),o=n.some((e=>t.userInfo.userId===e.userInfo.userId));return i&&o}},{key:"createRemoteShadowUser",value:function e(t,r){const n={userId:nx,userUid:ix,nickname:"",roomId:t},i=[];null==r||r.forEach((e=>{const t=qj[e]||qj.LD,r={content:ex.main,ssrc:t.pssrc,streamUid:t.streamUid,pt:uj.h264PayLoad,width:t.width,height:t.height};i.push(r)})),this.doRefreshRemoteStreamList(n,qx.STREAM_TYPE_MAIN,i,null,!1),this.logger.info(eU,"createRemoteShadowUser success, upstreams: ".concat(JSON.stringify(i)))}},{key:"subscribeResultCallback",value:function e(t,r){if(t)try{t.successSubscribeInfos.forEach((e=>{var t,r,n,i;null===(t=e.mainStream)||void 0===t||null===(r=t.tracks)||void 0===r||r.forEach((e=>{e.state=QM.normal})),null===(n=e.auxStream)||void 0===n||null===(i=n.tracks)||void 0===i||i.forEach((e=>{e.state=QM.normal}))})),t.failSubscribeInfos.forEach((e=>this.releaseResource(e,r))),t.successUnsubscribeInfos.forEach((e=>this.releaseResource(e,!1))),t.failUnsubscribeInfos.forEach((e=>this.recoverUnsubscribeResource(e,r))),this.logger.info(eU,"subscribeResultCallback success")}catch(e){this.logger.error(eU,"subscribeResultCallback fail, errMsg:".concat(e))}}},{key:"releaseResource",value:function t(r,n){var i,o,a,s;const u=this.getUserInfoById(r.userId,r.roomId);null==r||null===(i=r.mainStream)||void 0===i||null===(o=i.tracks)||void 0===o||o.forEach((t=>{if(this.unAllocateReceiveSsrc(r.roomId,qx.STREAM_TYPE_MAIN,t.type,t.cssrc),t.state=QM.normal,t.isSubscribed=!1,t.isTrackReady=!1,t.cssrc=0,n){const r=u.mainStream.subscribeOption;e.recoverUnsubscribeOption(r,t)}})),null==r||null===(a=r.auxStream)||void 0===a||null===(s=a.tracks)||void 0===s||s.forEach((t=>{if(this.unAllocateReceiveSsrc(r.roomId,qx.STREAM_TYPE_AUX,t.type,t.cssrc),t.state=QM.normal,t.isSubscribed=!1,t.isTrackReady=!1,t.cssrc=0,n){const r=u.mainStream.subscribeOption;e.recoverUnsubscribeOption(r,t)}}))}},{key:"recoverUnsubscribeResource",value:function t(r,n){var i,o,a,s;const u=this.getUserInfoById(r.userId,r.roomId);null==r||null===(i=r.mainStream)||void 0===i||null===(o=i.tracks)||void 0===o||o.forEach((t=>{var i;this.recoverReceiveSsrc(r.roomId,qx.STREAM_TYPE_MAIN,t.type,t.cssrc),t.isSubscribed=!0;const o=null===(i=u.mainStream)||void 0===i?void 0:i.remoteTrackInfos;if(o.has(t.trackId)||o.set(t.trackId,t),n){const r=u.mainStream.subscribeOption;e.recoverSubscribeOption(r,t)}})),null==r||null===(a=r.auxStream)||void 0===a||null===(s=a.tracks)||void 0===s||s.forEach((t=>{var i;this.recoverReceiveSsrc(r.roomId,qx.STREAM_TYPE_AUX,t.type,t.cssrc),t.isSubscribed=!0;const o=null===(i=u.auxStream)||void 0===i?void 0:i.remoteTrackInfos;if(o.has(t.trackId)||o.set(t.trackId,t),n){const r=u.mainStream.subscribeOption;e.recoverSubscribeOption(r,t)}}))}},{key:"subscribeStream",value:function e(t,r,n,i,o,a,s){const u=this.subscribeSingleStream(t,r,n,i,o,a),c=[];if(s&&(s.streamIds=[]),u){c.push(u);(n===qx.STREAM_TYPE_MAIN?u.mainStream.tracks4Subscribe:u.auxStream.tracks4Subscribe).forEach((e=>{e.trackId&&s&&s.streamIds.push(e.trackId)}))}return c.push(...this.getOtherRemoteUserPublishInfos([t],r)),this.logger.info(eU,"subscribeStream success, ".concat(this.getTracksUpdateInfosString(c))),c}},{key:"subscribeSingleStream",value:function t(r,n,i,o,a){var s,u;let c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!r||!n||!o)return null;const f=this.getUserInfoById(r,n);if(!f)return this.logger.error(eU,"subscribeStream fail, user not exist}"),null;const d=[],h=[],p=[],v=e.getRemoteTrackInfos(f.mainStream),m=e.getRemoteTrackInfos(f.auxStream),y=i===qx.STREAM_TYPE_MAIN?v:m,g=null==y?void 0:y.filter((e=>e.isSubscribed));this.updateAudioTrackSubInfo(i,o,l,f,a,d,h,p),this.updateVideoTrackSubInfo(i,o,c,f,d,h,p),this.updateSubscribeOption(r,n,i,o,Qj.subscribe);const b={remoteStream:i===qx.STREAM_TYPE_MAIN?null===(s=f.mainStream)||void 0===s?void 0:s.remoteStream:null===(u=f.auxStream)||void 0===u?void 0:u.remoteStream,preTracks:y,curTracks:y,addedTracks:null,updatedTracks:null,removedTracks:null,subscribedTracks:g,tracks4Subscribe:d,tracks4Unsubscribe:h,allSubscribeTracks:p},_=e.getAnotherStreamUpdateInfo(i,f);return{curUserState:f.userState,preUserState:f.userState,userInfo:f.userInfo,mainStream:i===qx.STREAM_TYPE_MAIN?b:_,auxStream:i===qx.STREAM_TYPE_AUX?b:_}}},{key:"resubscribeMainStreamAudio",value:function e(t){const r=this.previousAudioSubscribedUsers.get(t),n=r?Array.from(r.values()):null;if(this.logger.info(eU,"resubscribeMainStreamAudio, preAudioSubscribedUsers: ".concat(n)),!n)return null;const i={video:!1,audio:!0},o=[];n.forEach((e=>{var r,n;const a=this.subscribeSingleStream(e,t,qx.STREAM_TYPE_MAIN,i,$x.USER_SUBSCRIBE_AUDIOPOLICY);(null==a||null===(r=a.mainStream)||void 0===r||null===(n=r.tracks4Subscribe)||void 0===n?void 0:n.length)>0&&o.push(a)}));const a=[];return a.push(...o),a.push(...this.getOtherRemoteUserPublishInfos(n,t)),this.logger.info(eU,"resubscribeMainStreamAudio success, ".concat(this.getTracksUpdateInfosString(a))),o}},{key:"unsubscribeAllMainStreamAudio",value:function e(t){const r={video:!1,audio:!0},n=[],i=[];return this.getAllUserInfos(t).forEach((e=>{var o;if(null!==(o=e.mainStream)&&void 0!==o&&o.remoteTrackInfos?Array.from(e.mainStream.remoteTrackInfos.values()).some((e=>e.type===Qx.TRACK_TYPE_AUDIO&&e.isSubscribed)):null){i.push(e.userInfo.userId);const o=this.unsubscribeSingleStream(e.userInfo.userId,t,qx.STREAM_TYPE_MAIN,r,$x.TOPN_AUDIOPOLICY);n.push(o)}})),n.push(...this.getOtherRemoteUserPublishInfos(i,t)),this.logger.info(eU,"unsubscribeAllMainStreamAudio success, ".concat(this.getTracksUpdateInfosString(n))),n}},{key:"updateAudioTrackSubInfo",value:function t(r,n,i,o,a,s,u,c){if(!o)return;const l=e.getRemoteTrackInfos(o.mainStream),f=e.getRemoteTrackInfos(o.auxStream),d=r===qx.STREAM_TYPE_MAIN?l:f,h=null==d?void 0:d.find((e=>e.type===Qx.TRACK_TYPE_AUDIO));if(!h)return void this.logger.info(eU,"updateAudioTrackSubInfo: ".concat(r,", no audio track exist"));const p=h.isSubscribed?h:null;if(n.audio&&!h.isSubscribed){a===$x.USER_SUBSCRIBE_AUDIOPOLICY?(h.isSubscribed=!0,h.cssrc=this.allocateAudioReceiveSsrc(o.userInfo.roomId),s.push(h)):this.logger.warn(eU,"updateAudioTrackSubInfo, not common audio mode, but audio option is true, reserve it");const e=this.previousAudioSubscribedUsers.get(o.userInfo.roomId);null==e||e.set(o.userInfo.userId,o.userInfo.userId)}if((p||!p&&s.some((e=>e.type===Qx.TRACK_TYPE_AUDIO)))&&c.push(h),i&&!n.audio&&p){h.isSubscribed=!1,u.push(h);const e=this.previousAudioSubscribedUsers.get(o.userInfo.roomId);null==e||e.delete(o.userInfo.userId)}}},{key:"updateVideoTrackSubInfo",value:function t(r,n,i,o,a,s,u){const c=e.getRemoteTrackInfos(o.mainStream),l=e.getRemoteTrackInfos(o.auxStream),f=r===qx.STREAM_TYPE_MAIN?c:l,d=null==f?void 0:f.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO));if(!d||0===d.length)return;const h=[];d.filter((e=>e.isSubscribed)).forEach((e=>{h.push(e)}));const p=[];if(n.video)if(n.resolutionIds)n.resolutionIds.forEach((e=>{const t=o.userInfo.userId===nx?qj[e].streamUid.toString():e,n=d.find((e=>e.trackId.toString()===t));n&&(p.push(n),h.some((e=>e.trackId.toString()===t))||(n.isSubscribed=!0,n.cssrc=this.allocateVideoReceiveSsrc(o.userInfo.roomId,r),a.push(n)))}));else{const e=this.getMaxResolutionTrack(d).trackId,t=e&&d.find((t=>t.trackId===e));t&&(p.push(t),h.some((t=>t.trackId===e))||(t.isSubscribed=!0,t.cssrc=this.allocateVideoReceiveSsrc(o.userInfo.roomId,r),a.push(t)))}const v=a.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO));v.forEach((e=>{e.autoAdjustResolution=n.autoAdjustResolution||ux.ON,e.minResolution=n.minResolution||"LD"})),u.push(...v),i?h.forEach((e=>{p.some((t=>t.trackId===e.trackId))?u.push(e):(e.isSubscribed=!1,s.push(e))})):u.push(...h)}},{key:"unAllocateReceiveSsrc",value:function e(t,r,n,i){n!==Qx.TRACK_TYPE_AUDIO?this.unAllocateVideoReceiveSsrc(t,r,i):this.unAllocateAudioReceiveSsrc(t,i)}},{key:"recoverReceiveSsrc",value:function e(t,r,n,i){n!==Qx.TRACK_TYPE_AUDIO?this.recoverVideoReceiveSsrc(t,r,i):this.recoverAudioReceiveSsrc(t,i)}},{key:"unAllocateAudioReceiveSsrc",value:function e(t,r){const n=this.roomSsrc.get(t);if(!n)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const i=n.audioReceiveSsrcs.indexOf(r);-1===i&&this.logger.error(eU,"unAllocateAudioReceiveSsrc error, ".concat(r," not allocated")),n.audioReceiveSsrcs.splice(i,1),this.logger.info(eU,"unAllocateAudioReceiveSsrc success, ".concat(r))}},{key:"recoverAudioReceiveSsrc",value:function e(t,r){const n=this.roomSsrc.get(t);if(!n)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);-1===n.audioReceiveSsrcs.indexOf(r)&&n.audioReceiveSsrcs.push(r),this.logger.info(eU,"recoverAudioReceiveSsrc success, ".concat(r))}},{key:"unAllocateVideoReceiveSsrc",value:function e(t,r,n){const i=this.roomSsrc.get(t);if(!i)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const o=i.videoReceiveSsrcs.indexOf(n);-1!==o?(i.videoReceiveSsrcs.splice(o,1),this.logger.info(eU,"unAllocateVideoReceiveSsrc success, ".concat(r,", ").concat(n))):this.logger.error(eU,"unAllocateVideoReceiveSsrc error, ".concat(r,", ").concat(n," not allocated"))}},{key:"recoverVideoReceiveSsrc",value:function e(t,r,n){const i=this.roomSsrc.get(t);if(!i)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);-1===i.videoReceiveSsrcs.indexOf(n)&&i.videoReceiveSsrcs.push(n),this.logger.info(eU,"recoverVideoReceiveSsrc success, ".concat(r,", ").concat(n))}},{key:"allocateAudioReceiveSsrc",value:function e(t){const r=this.roomSsrc.get(t);if(!r)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(!this.audioCssrcs||0===this.audioCssrcs.length)throw this.logger.error(eU,"audio ssrc not found"),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);for(const e of this.audioCssrcs)if(!r.audioReceiveSsrcs.includes(e))return r.audioReceiveSsrcs.push(e),this.logger.info(eU,"allocateAudioReceiveSsrc success, ".concat(e)),e;throw this.logger.error(eU,"have no available audio receive ssrc"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER)}},{key:"allocateVideoReceiveSsrc",value:function e(t,r){const n=this.roomSsrc.get(t);if(!n)throw this.logger.error(eU,"no roomId exist"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);return r===qx.STREAM_TYPE_AUX?this.doAllocateVideoReceiveSsrc(this.auxVideoCssrcs,n.videoReceiveSsrcs):this.doAllocateVideoReceiveSsrc(this.mainVideoCssrcs,n.videoReceiveSsrcs)}},{key:"doAllocateVideoReceiveSsrc",value:function e(t,r){if(!t||0===t.length)throw this.logger.error(eU,"video ssrc not found"),new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR);for(const e of t)if(!r.includes(e))return r.push(e),this.logger.info(eU,"allocateVideoReceiveSsrc success, ".concat(e)),e;throw this.logger.error(eU,"have no available video receive ssrc"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER)}},{key:"unsubscribeStream",value:function e(t,r,n,i){const o=this.unsubscribeSingleStream(t,r,n,i,$x.USER_SUBSCRIBE_AUDIOPOLICY);this.updateSubscribeOption(t,r,n,i,Qj.unsubscribe);const a=[];return o&&a.push(o),a.push(...this.getOtherRemoteUserPublishInfos([t],r)),this.logger.info(eU,"unsubscribeStream success, ".concat(this.getTracksUpdateInfosString(a))),a}},{key:"updateSubscribeOption",value:function e(t,r,n,i,o){if(!i)throw this.logger.error(eU,"updateSubscribeOption fail, trackOption is null}"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const a=this.getUserInfoById(t,r),s=n===qx.STREAM_TYPE_MAIN?a.mainStream:a.auxStream;o===Qj.subscribe?s.subscribeOption=this.getFullSubscribeOptions(s,i):(i.audio&&(s.subscribeOption.audio=!1),i.video&&(i.resolutionIds?i.resolutionIds.forEach((e=>{var t,r;const n=null===(t=s.subscribeOption)||void 0===t||null===(r=t.resolutions)||void 0===r?void 0:r.map((e=>e.resolutionId)).indexOf(e);n>-1&&s.subscribeOption.resolutions.splice(n,1)})):(s.subscribeOption.video=!1,s.subscribeOption.resolutions=null)))}},{key:"getFullSubscribeOptions",value:function t(r,n){if(!n)throw this.logger.error(eU,"trackOption is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const i=[],o={};if(n.video)if(n.resolutionIds)n.resolutionIds.forEach((t=>{e.appendResolutions(r,t,i)}));else{const t=this.getMaxResolutionTrackId(r);e.appendResolutions(r,t,i)}if(n.audio){const e=Array.from(r.remoteTrackInfos.values()).find((e=>e.type===Qx.TRACK_TYPE_AUDIO));null!=e&&e.playElement&&(o.playElement=e.playElement,o.objectFit=e.objectFit,o.muted=e.muted)}return{audio:n.audio,video:n.video,resolutions:i,audioPlayInfo:o,autoAdjustResolution:n.autoAdjustResolution,minResolution:n.minResolution}}},{key:"getRemoteUserInfoById",value:function e(t,r){if(!t||!r)return null;const n=this.getUserInfoById(t,r);return n||(this.logger.error(eU,"unsubscribeSingleStream fail, user not exist}"),null)}},{key:"unsubscribeSingleStream",value:function t(r,n,i,o,a){var s,u;const c=this.getRemoteUserInfoById(r,n);if(null===c)return null;const l=e.getRemoteTrackInfos(c.mainStream),f=e.getRemoteTrackInfos(c.auxStream),d=i===qx.STREAM_TYPE_MAIN?l:f;if(!d||0===d.length)return this.logger.warn(eU,"unsubscribeSingleStream, no track exist ".concat(r)),null;const h=d.filter((e=>e.isSubscribed)),p=[];if(o.audio){const e=d.find((e=>e.type===Qx.TRACK_TYPE_AUDIO&&e.isSubscribed));if(e&&(e.isSubscribed=!1,p.push(e),a===$x.USER_SUBSCRIBE_AUDIOPOLICY)){const e=this.previousAudioSubscribedUsers.get(n);null==e||e.delete(r)}}o.video&&this.unsubscribeVideo(o,h,p,r,d);const v={remoteStream:i===qx.STREAM_TYPE_MAIN?null===(s=c.mainStream)||void 0===s?void 0:s.remoteStream:null===(u=c.auxStream)||void 0===u?void 0:u.remoteStream,preTracks:d,curTracks:d,addedTracks:null,updatedTracks:null,removedTracks:null,subscribedTracks:h,tracks4Subscribe:null,tracks4Unsubscribe:p,allSubscribeTracks:Array.from(d.values()).filter((e=>e.isSubscribed))},m=e.getAnotherStreamUpdateInfo(i,c);return{preUserState:c.userState,curUserState:c.userState,userInfo:c.userInfo,mainStream:i===qx.STREAM_TYPE_MAIN?v:m,auxStream:i===qx.STREAM_TYPE_AUX?v:m}}},{key:"unsubscribeVideo",value:function e(t,r,n,i,o){if(t.resolutionIds)t.resolutionIds.forEach((e=>{const t=i===nx?qj[e].streamUid.toString():e,r=null==o?void 0:o.find((e=>e.trackId.toString()===t&&e.isSubscribed));r&&(r.isSubscribed=!1,n.push(r))}));else{const e=null==r?void 0:r.filter((e=>e.type==Qx.TRACK_TYPE_VIDEO));null==e||e.forEach((e=>{e.isSubscribed=!1,n.push(e)}))}}},{key:"updateUserName",value:function e(t,r,n){var i,o;const a=this.getUserInfoById(t,r);a?(a.userInfo.nickname=n,null===(i=a.mainStream)||void 0===i||i.remoteStream.updateUserName(n),null===(o=a.auxStream)||void 0===o||o.remoteStream.updateUserName(n),this.logger.info(eU,"updateUserName success, userId: ".concat(t,", nickName: ").concat(n))):this.logger.error(eU,"updateUserName fail, user not exist}")}},{key:"isRemoteUserSubscribed",value:function e(t,r){var n,i;const o=this.getUserInfoById(t,r);if(!o)return this.logger.info(eU,"isRemoteUserSubscribed, user not exist}"),!1;const a=!(null===(n=o.mainStream)||void 0===n||!n.remoteTrackInfos)&&Array.from(o.mainStream.remoteTrackInfos.values()).filter((e=>e.isSubscribed)).length>0,s=!(null===(i=o.auxStream)||void 0===i||!i.remoteTrackInfos)&&Array.from(o.auxStream.remoteTrackInfos.values()).filter((e=>e.isSubscribed)).length>0;return a||s}},{key:"getUserInfoByStreamId",value:function e(t,r){return this.getAllUserInfos(t).find((e=>{var t,n,i;const o=(null===(t=e.mainStream)||void 0===t?void 0:t.remoteTrackInfos.has(r))||(null===(n=e.auxStream)||void 0===n?void 0:n.remoteTrackInfos.has(r));return null===(i=zM.getParameter(BM))||void 0===i||i?o||e.userInfo.userId===r:o}))}},{key:"getAllUserInfos",value:function e(t){return Array.from(this.remoteUserInfos.values()).filter((e=>e.userInfo.roomId===t))}},{key:"getAllSubscribedUpdateInfos4Unsubscribe",value:function t(r){return this.getAllUserInfos(r).map((t=>{const r=e.getRemoteTrackInfos(t.mainStream).filter((e=>e.isSubscribed));r.forEach((e=>{e.isSubscribed=!1}));const n=e.getRemoteTrackInfos(t.auxStream).filter((e=>e.isSubscribed));return n.forEach((e=>{e.isSubscribed=!1})),{userInfo:t.userInfo,preUserState:t.userState,curUserState:t.userState,mainStream:{remoteStream:t.mainStream.remoteStream,tracks4Unsubscribe:r,allSubscribeTracks:[]},auxStream:{remoteStream:t.auxStream.remoteStream,tracks4Unsubscribe:n,allSubscribeTracks:[]}}}))}},{key:"initializeRemoteUser",value:function t(r,n){if(!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const i={userInfo:r,userState:n?JM.Joined:JM.NotJoin,mainStream:null,auxStream:null},o=e.generateUniqueId(r.userId,r.roomId);return this.remoteUserInfos.set(o,i),this.roomSsrc.has(r.roomId)||this.roomSsrc.set(r.roomId,{audioReceiveSsrcs:[],videoReceiveSsrcs:[]}),this.logger.info(eU,"initializeRemoteUser success, userInfo: ".concat(JSON.stringify(r))),i}},{key:"updateRemoteUser",value:function e(t){if(!t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const r=this.getUserInfoById(t.userId,t.roomId);return r?(t.nickname=t.nickname||r.userInfo.nickname,r.userInfo=t,this.logger.info(eU,"updateRemoteUser success, userInfo: ".concat(JSON.stringify(t))),r):null}},{key:"initializeRemoteStream",value:function e(t,r,n,i){const o=t===qx.STREAM_TYPE_MAIN?"main":"auxiliary",a=new jD({type:o,log:this.logger,userId:r,client:this.client,roomId:n,userName:i}),s={remoteTrackInfos:new Map,remoteStream:a,subscribeOption:{audio:!1,video:!1}};if(!this.previousAudioSubscribedUsers.has(n)){const e=new Map;this.previousAudioSubscribedUsers.set(n,e)}return this.logger.info(eU,"initializeStreamInfo success, userId: ".concat(r,", type: ").concat(s.remoteStream.getType())),s}},{key:"refreshRemoteStreamList",value:function e(t,r,n){const i=null==r?void 0:r.filter((e=>e.content!==ex.desktop)),o=null==r?void 0:r.filter((e=>e.content===ex.desktop)),a=this.getUserInfoById(t.userId,t.roomId),s=this.doRefreshRemoteStreamList(t,qx.STREAM_TYPE_MAIN,i,n,!1),u=this.doRefreshRemoteStreamList(t,qx.STREAM_TYPE_AUX,o,null,!1),c=this.getUserInfoById(t.userId,t.roomId);return this.getAllPublishInfosWhenStreamUpdate(!a,s,u,c)}},{key:"doRefreshRemoteStreamList",value:function t(r,n,i,o,a){if(this.logger.info(eU,"doRefreshRemoteStreamList begin, streamType:".concat(n,",isLocalRejoin:").concat(a,",")+"userInfo: ".concat(JSON.stringify(r),", allVideoStreams: ").concat(JSON.stringify(i),", allAudioStreams: ").concat(JSON.stringify(o))),r.userId===this.localUserId)return null;const s=this.getUserInfoById(r.userId,r.roomId);r.relaySrcRoomId=r.relaySrcRoomId||(null==s?void 0:s.userInfo.relaySrcRoomId);const u=s?this.updateRemoteUser(r):this.initializeRemoteUser(r,!0),c=this.getStreamInfoByStreamType(n,u,r),l=e.getRemoteTrackInfos(c),f=null==l?void 0:l.filter((e=>e.isSubscribed)),d=c.remoteTrackInfos,h=[],p=[],v=[];null==l||l.forEach((e=>{this.isPreTrackInvalid(i,o,e,a)&&(a&&e.isSubscribed&&(e.state=QM.localRejoin),v.push(e),d.delete(e.trackId))})),this.refreshTracks(i,o,l,d,a,h,p,v),this.cachePlayInfo(r,n,i,o,v);const m=this.getTracks4Subscribe(r,n,c.remoteStream,h,v),y=this.getTracks4UnSubscribe(v),g=Array.from(c.remoteTrackInfos.values());return this.updateRemoteStreamTracks(g,c.remoteStream),{remoteStream:c.remoteStream,preTracks:l,curTracks:g,addedTracks:h,updatedTracks:p,removedTracks:v,subscribedTracks:f,tracks4Subscribe:m,tracks4Unsubscribe:y,allSubscribeTracks:null==g?void 0:g.filter((e=>e.isSubscribed))}}},{key:"refreshTracks",value:function e(t,r,n,i,o,a,s,u){(null!=t&&t.length||null!=r&&r.length)&&(null==n||n.forEach((e=>{e.state===QM.remoteRejoinCache&&(u.push(e),i.delete(e.trackId))}))),this.refreshVideoStreamTracks(t,n,i,o,a,s),this.refreshAudioStreamTracks(r,n,i,o,a,s)}},{key:"refreshVideoStreamTracks",value:function t(r,n,i,o,a,s){null==r||r.forEach((t=>{const r=null==n?void 0:n.find((e=>e.trackId===t.streamUid.toString()));if(r){const n=e.generateUpdateVideoTrack(t,r);i.set(t.streamUid.toString(),n),r.state===QM.remoteRejoinCache||o?(n.isSubscribed=!1,n.isTrackReady=!1,a.push(n)):e.isSameResolution(r,t)&&!e.isMuteStatusChange(r,t)||s.push(r)}else{const r=e.generateNewVideoTrack(t);i.set(t.streamUid.toString(),r),a.push(r)}}))}},{key:"refreshAudioStreamTracks",value:function t(r,n,i,o,a,s){null==r||r.forEach((t=>{if("main"===(null==t?void 0:t.content)){const r=null==n?void 0:n.find((e=>e.trackId===t.streamUid.toString()));if(r){const n=e.generateUpdateAudioTrack(t,r);i.set(t.streamUid.toString(),n),r.state===QM.remoteRejoinCache||o?(n.isSubscribed=!1,n.isTrackReady=!1,a.push(n)):e.isMuteStatusChange(r,t)&&s.push(r)}else{const r=e.generateNewAudioTrack(t);i.set(t.streamUid.toString(),r),a.push(r)}}}))}},{key:"remoteUserReconnect",value:function e(t){if(!t)return;const r=this.getUserInfoById(t.userId,t.roomId);if(!r)return this.logger.error(eU,"remoteUserReconnect, user not exist"),null;this.isRemoteUserSubscribed(t.userId,t.roomId)&&this.cacheHistorySubscription(r),r.userState=JM.Rejoining,this.logger.info(eU,"remoteUserReconnect, update user state to rejoining")}},{key:"cacheHistorySubscription",value:function e(t){if(!t)return null;const r=this.getSubscribedTracksInfo(t.userInfo.userId,t.userInfo.roomId,qx.STREAM_TYPE_MAIN),n=this.getSubscribedTracksInfo(t.userInfo.userId,t.userInfo.roomId,qx.STREAM_TYPE_AUX);null==r||r.forEach((e=>{e.state=QM.remoteRejoinCache})),null==n||n.forEach((e=>{e.state=QM.remoteRejoinCache}))}},{key:"getSubscribedTracksInfo",value:function e(t,r,n){var i,o;const a=this.getUserInfoById(t,r);if(!a)return this.logger.error(eU,"getSubscribedMainTracksInfo, user not exist}"),null;const s=n===qx.STREAM_TYPE_MAIN?null===(i=a.mainStream)||void 0===i?void 0:i.remoteTrackInfos:null===(o=a.auxStream)||void 0===o?void 0:o.remoteTrackInfos;return s&&Array.from(s.values()).filter((e=>e.isSubscribed))}},{key:"getStreamInfoByStreamType",value:function e(t,r,n){if(!(t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream)){const e=this.initializeRemoteStream(t,n.userId,n.roomId,n.nickname);t===qx.STREAM_TYPE_MAIN?r.mainStream=e:r.auxStream=e}return t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream}},{key:"updateRemoteStream",value:function e(t,r,n){const i=null==r?void 0:r.filter((e=>e.content!==ex.desktop)),o=null==r?void 0:r.filter((e=>e.content===ex.desktop)),a=this.doUpdateRemoteStream(t,qx.STREAM_TYPE_MAIN,i,n),s=this.doUpdateRemoteStream(t,qx.STREAM_TYPE_AUX,o,null),u=this.getUserInfoById(t.userId,t.roomId);return{userInfo:u.userInfo,preUserState:u.userState,curUserState:u.userState,isUserNameChanged:null,mainStream:a,auxStream:s}}},{key:"doUpdateRemoteStream",value:function t(r,n,i,o){this.logger.info(eU,"updateRemoteStreamInfo begin, streamType:".concat(n)+"userInfo: ".concat(JSON.stringify(r),", videoStreams: ").concat(JSON.stringify(i),", audioStreams: ").concat(JSON.stringify(o),","));if(!this.getUserInfoById(r.userId,r.roomId))return this.logger.error(eU,"updateRemoteStream, user not exist"),null;const a=this.getUserInfoById(r.userId,r.roomId),s=this.getStreamInfoByStreamType(n,a,r),u=e.getRemoteTrackInfos(s),c=null==u?void 0:u.filter((e=>e.isSubscribed)),l=s.remoteTrackInfos,f=[];null==i||i.forEach((t=>{const r=null==u?void 0:u.find((e=>e.trackId===t.streamUid.toString()));if(r&&(!e.isSameResolution(r,t)||e.isMuteStatusChange(r,t))){const n=e.generateUpdateVideoTrack(t,r);l.set(t.streamUid.toString(),n),f.push(r)}})),null==o||o.forEach((t=>{const r=null==u?void 0:u.find((e=>e.trackId===t.streamUid.toString()));if(r&&e.isMuteStatusChange(r,t)){const n=e.generateUpdateAudioTrack(t,r);l.set(t.streamUid.toString(),n),f.push(r)}}));const d=Array.from(s.remoteTrackInfos.values());return this.updateRemoteStreamTracks(d,s.remoteStream),{remoteStream:s.remoteStream,preTracks:u,curTracks:d,addedTracks:[],updatedTracks:f,removedTracks:[],subscribedTracks:c,tracks4Subscribe:[],tracks4Unsubscribe:[],allSubscribeTracks:null==d?void 0:d.filter((e=>e.isSubscribed))}}},{key:"getAllPublishInfosWhenStreamUpdate",value:function e(t,r,n,i){const o={userInfo:i.userInfo,preUserState:t?JM.NotJoin:i.userState,curUserState:i.userState,isUserNameChanged:null,mainStream:r,auxStream:n},a=[];return a.push(o),a.push(...this.getOtherRemoteUserPublishInfos([i.userInfo.userId],i.userInfo.roomId)),this.logger.info(eU,"updateRemoteStreamInfo success, ".concat(this.getTracksUpdateInfosString(a))),a}},{key:"getOtherRemoteUserPublishInfos",value:function e(t,r){const n=[];return this.getAllUserInfos(r).forEach((e=>{if(!t.includes(e.userInfo.userId)){var r,i,o,a,s,u;const t=null!==(r=e.mainStream)&&void 0!==r&&null!==(i=r.remoteTrackInfos)&&void 0!==i&&i.size?Array.from(e.mainStream.remoteTrackInfos.values()).filter((e=>e.isSubscribed)):null,c=null!==(o=e.auxStream)&&void 0!==o&&null!==(a=o.remoteTrackInfos)&&void 0!==a&&a.size?Array.from(e.auxStream.remoteTrackInfos.values()).filter((e=>e.isSubscribed)):null,l={userInfo:e.userInfo,curUserState:e.userState,preUserState:e.userState,mainStream:{remoteStream:null===(s=e.mainStream)||void 0===s?void 0:s.remoteStream,allSubscribeTracks:t},auxStream:{remoteStream:null===(u=e.auxStream)||void 0===u?void 0:u.remoteStream,allSubscribeTracks:c}};n.push(l)}})),n}},{key:"getTracksUpdateInfosString",value:function t(r){if(!r)return"";let n="";return r.forEach((t=>{n=n+e.getTracksUpdateInfoString(t)+" "})),n}},{key:"updateRemoteStreamTracks",value:function e(t,r){if(!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(!t)return void this.logger.error(eU,"updateRemoteStreamTracks , curAllTracks is null");const n=new Map;let i;t.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).forEach((e=>{n.set(e.trackId.toString(),{streamId:e.trackId.toString(),width:e.width,height:e.height})})),t.filter((e=>e.type===Qx.TRACK_TYPE_AUDIO)).forEach((e=>{i=e.trackId.toString()}));const o=t.some((e=>e.type===Qx.TRACK_TYPE_AUDIO)),a=r.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN;r.updateRemoteResolutions(a,[...n.values()],o,i)}},{key:"isPreTrackInvalid",value:function e(t,r,n,i){return!!i||n.state!==QM.remoteRejoinCache&&(n.type===Qx.TRACK_TYPE_VIDEO&&this.isPreVideoTrackRemoved(t,n)||n.type===Qx.TRACK_TYPE_AUDIO&&this.isPreAudioTrackRemoved(r,n))}},{key:"isPreVideoTrackRemoved",value:function e(t,r){return!(null!=t&&t.some((e=>e.streamUid.toString()===r.trackId)))}},{key:"isPreAudioTrackRemoved",value:function e(t,r){return!(null!=t&&t.some((e=>e.streamUid.toString()===r.trackId)))}},{key:"clear",value:function e(t){if(t){for(const e of this.remoteUserInfos.keys())if(e.indexOf("#".concat(t))>0){var r,n,i,o;const t=this.remoteUserInfos.get(e);null===(r=t.mainStream)||void 0===r||null===(n=r.remoteStream)||void 0===n||n.close(),null===(i=t.auxStream)||void 0===i||null===(o=i.remoteStream)||void 0===o||o.close(),this.remoteUserInfos.delete(e)}this.roomSsrc.delete(t),this.previousAudioSubscribedUsers.delete(t)}}}],[{key:"getCssrcRange",value:function e(t,r){const n=[];let i;for(i=t;i<=r;i++)n.push(i);return n}},{key:"getUserUpdateInfoWhenJoin",value:function e(t,r,n){return n.userState=t===JM.Rejoining?JM.Joined:n.userState,{userInfo:n.userInfo,preUserState:t,curUserState:n.userState,isUserNameChanged:r,mainStream:null,auxStream:null}}},{key:"getUserUpdateInfoWhenQuit",value:function t(r,n){return n.userState=r===JM.Rejoining?r:JM.NotJoin,{userInfo:n.userInfo,preUserState:r,curUserState:n.userState,isUserNameChanged:null,mainStream:e.getStreamListUpdateInfoWhenQuitOrRejoin(n,qx.STREAM_TYPE_MAIN,r),auxStream:e.getStreamListUpdateInfoWhenQuitOrRejoin(n,qx.STREAM_TYPE_AUX,r)}}},{key:"getStreamListUpdateInfoWhenQuitOrRejoin",value:function t(r,n,i){return i===JM.Rejoining?e.getStreamListUpdateInfoWhenRejoin(r,n):e.getStreamListUpdateInfoWhenQuit(r,n)}},{key:"getStreamListUpdateInfoWhenQuit",value:function t(r,n){const i=n===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream,o=e.getRemoteTrackInfos(i),a=null==o?void 0:o.filter((e=>e.isSubscribed));return{remoteStream:null==i?void 0:i.remoteStream,preTracks:o,curTracks:o,addedTracks:[],updatedTracks:[],removedTracks:o,subscribedTracks:a,tracks4Subscribe:[],tracks4Unsubscribe:a,allSubscribeTracks:[]}}},{key:"getStreamListUpdateInfoWhenRejoin",value:function t(r,n){const i=n===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream,o=e.getRemoteTrackInfos(i),a=null==o?void 0:o.filter((e=>e.isSubscribed));return{remoteStream:null==i?void 0:i.remoteStream,preTracks:o,curTracks:o,addedTracks:[],updatedTracks:[],removedTracks:o,subscribedTracks:a,tracks4Subscribe:[],tracks4Unsubscribe:[],allSubscribeTracks:a}}},{key:"isStreamRemoved",value:function e(t,r){return!(t&&0!==t.length||r&&0!==r.length)}},{key:"getStreamInfoByType",value:function t(r,n,i){const o=n===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream,a=e.getRemoteTrackInfos(o),s=e.getTracksByType(a,i);return{remoteStream:o?o.remoteStream:null,tracks:s}}},{key:"getTracksByType",value:function e(t,r){return t&&0!==t.length?r?t.filter((e=>e.type===r)):t:[]}},{key:"isUserNameChanged",value:function e(t,r){return r&&t&&t.nickname&&t.nickname!==r}},{key:"getRemoteTrackInfos",value:function e(t){return null!=t&&t.remoteTrackInfos?Array.from(t.remoteTrackInfos.values()):null}},{key:"recoverSubscribeOption",value:function e(t,r){if(r.type===Qx.TRACK_TYPE_AUDIO)t.audio=!0;else{t.video=!0;const e={resolutionId:r.trackId,width:r.width,height:r.height};t.resolutions.push(e)}}},{key:"recoverUnsubscribeOption",value:function e(t,r){if(r.type===Qx.TRACK_TYPE_AUDIO)t.audio=!1;else{if(!t.video)return;t.resolutions?t.resolutions.forEach((e=>{var r;const n=null==t||null===(r=t.resolutions)||void 0===r?void 0:r.map((e=>e.resolutionId)).indexOf(e.resolutionId);n>-1&&t.resolutions.splice(n,1)})):(t.video=!1,t.resolutions=null)}}},{key:"appendResolutions",value:function e(t,r,n){const i=t.remoteTrackInfos.get(r);if(i){const e={resolutionId:r,width:i.width,height:i.height};i.playElement&&(e.playElement=i.playElement,e.objectFit=i.objectFit,e.muted=i.muted),n.push(e)}}},{key:"generateNewVideoTrack",value:function e(t){return{pt:t.pt,content:t.content,streamType:t.content===ex.desktop?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,trackId:t.streamUid.toString(),isSubscribed:!1,isTrackReady:!1,pssrc:t.ssrc,cssrc:0,type:Qx.TRACK_TYPE_VIDEO,width:t.width,height:t.height,state:QM.normal,mute:t.mute,maxFs:t.maxFs,fps:t.fps}}},{key:"generateNewAudioTrack",value:function e(t){return{pt:t.pt,content:t.content,streamType:t.content===ex.desktop?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,trackId:t.streamUid.toString(),isSubscribed:!1,isTrackReady:!1,pssrc:t.ssrc,cssrc:0,type:Qx.TRACK_TYPE_AUDIO,state:QM.normal,mute:t.mute}}},{key:"generateUpdateVideoTrack",value:function e(t,r){return{pt:t.pt,content:t.content,streamType:t.content===ex.desktop?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,trackId:t.streamUid.toString(),isSubscribed:r.isSubscribed,isTrackReady:r.isTrackReady,pssrc:r.pssrc,cssrc:r.cssrc,type:Qx.TRACK_TYPE_VIDEO,width:t.width,height:t.height,state:r.state,mute:t.mute}}},{key:"generateUpdateAudioTrack",value:function e(t,r){return{pt:t.pt,content:t.content,streamType:t.content===ex.desktop?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,trackId:t.streamUid.toString(),isSubscribed:r.isSubscribed,isTrackReady:r.isTrackReady,pssrc:r.pssrc,cssrc:r.cssrc,type:Qx.TRACK_TYPE_AUDIO,state:r.state,mute:t.mute}}},{key:"getAnotherStreamUpdateInfo",value:function t(r,n){const i=r===qx.STREAM_TYPE_MAIN?n.auxStream:n.mainStream,o=e.getRemoteTrackInfos(i),a=o?o.filter((e=>e.isSubscribed)):null;return{remoteStream:null==i?void 0:i.remoteStream,preTracks:o,curTracks:o,addedTracks:null,updatedTracks:null,removedTracks:null,subscribedTracks:a?[...a]:null,tracks4Subscribe:null,tracks4Unsubscribe:null,allSubscribeTracks:a?[...a]:null}}},{key:"getTracksUpdateInfoString",value:function e(t){var r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_,S,E,w,T,I,R,C,k,A,O,P,x,L,M,N,D,j,U,V,W,B,G,Z,F,H,X,Y,K,z,J,Q,q,$,ee,te;return t?"userId:".concat(t.userInfo.userId,", preUserState: ").concat(t.preUserState,",curUserState: ").concat(t.curUserState,",")+"main stream:"+"".concat(null!==(r=t.mainStream)&&void 0!==r&&null!==(n=r.preTracks)&&void 0!==n&&n.length?"preTracks:"+JSON.stringify(null===(i=t.mainStream)||void 0===i?void 0:i.preTracks)+",":"")+"".concat(null!==(o=t.mainStream)&&void 0!==o&&null!==(a=o.curTracks)&&void 0!==a&&a.length?"curTracks:"+JSON.stringify(null===(s=t.mainStream)||void 0===s?void 0:s.curTracks)+",":"")+"".concat(null!==(u=t.mainStream)&&void 0!==u&&null!==(c=u.addedTracks)&&void 0!==c&&c.length?"addedTracks:"+JSON.stringify(null===(l=t.mainStream)||void 0===l?void 0:l.addedTracks)+",":"")+"".concat(null!==(f=t.mainStream)&&void 0!==f&&null!==(d=f.updatedTracks)&&void 0!==d&&d.length?"updatedTracks:"+JSON.stringify(null===(h=t.mainStream)||void 0===h?void 0:h.updatedTracks)+",":"")+"".concat(null!==(p=t.mainStream)&&void 0!==p&&null!==(v=p.removedTracks)&&void 0!==v&&v.length?"removedTracks:"+JSON.stringify(null===(m=t.mainStream)||void 0===m?void 0:m.removedTracks)+",":"")+"".concat(null!==(y=t.mainStream)&&void 0!==y&&null!==(g=y.subscribedTracks)&&void 0!==g&&g.length?"subscribedTracks:"+JSON.stringify(null===(b=t.mainStream)||void 0===b?void 0:b.subscribedTracks)+",":"")+"".concat(null!==(_=t.mainStream)&&void 0!==_&&null!==(S=_.tracks4Subscribe)&&void 0!==S&&S.length?"tracks4Subscribe:"+JSON.stringify(null===(E=t.mainStream)||void 0===E?void 0:E.tracks4Subscribe)+",":"")+"".concat(null!==(w=t.mainStream)&&void 0!==w&&null!==(T=w.tracks4Unsubscribe)&&void 0!==T&&T.length?"tracks4Unsubscribe:"+JSON.stringify(null===(I=t.mainStream)||void 0===I?void 0:I.tracks4Unsubscribe)+",":"")+"".concat(null!==(R=t.mainStream)&&void 0!==R&&null!==(C=R.allSubscribeTracks)&&void 0!==C&&C.length?"allSubscribeTracks:"+JSON.stringify(null===(k=t.mainStream)||void 0===k?void 0:k.allSubscribeTracks)+",":"")+"aux stream:"+"".concat(null!==(A=t.auxStream)&&void 0!==A&&null!==(O=A.preTracks)&&void 0!==O&&O.length?"preTracks:"+JSON.stringify(null===(P=t.auxStream)||void 0===P?void 0:P.preTracks)+",":"")+"".concat(null!==(x=t.auxStream)&&void 0!==x&&null!==(L=x.curTracks)&&void 0!==L&&L.length?"curTracks:"+JSON.stringify(null===(M=t.auxStream)||void 0===M?void 0:M.curTracks)+",":"")+"".concat(null!==(N=t.auxStream)&&void 0!==N&&null!==(D=N.addedTracks)&&void 0!==D&&D.length?"addedTracks:"+JSON.stringify(null===(j=t.auxStream)||void 0===j?void 0:j.addedTracks)+",":"")+"".concat(null!==(U=t.auxStream)&&void 0!==U&&null!==(V=U.updatedTracks)&&void 0!==V&&V.length?"updatedTracks:"+JSON.stringify(null===(W=t.auxStream)||void 0===W?void 0:W.updatedTracks)+",":"")+"".concat(null!==(B=t.auxStream)&&void 0!==B&&null!==(G=B.removedTracks)&&void 0!==G&&G.length?"removedTracks:"+JSON.stringify(null===(Z=t.auxStream)||void 0===Z?void 0:Z.removedTracks)+",":"")+"".concat(null!==(F=t.auxStream)&&void 0!==F&&null!==(H=F.subscribedTracks)&&void 0!==H&&H.length?"subscribedTracks:"+JSON.stringify(null===(X=t.auxStream)||void 0===X?void 0:X.subscribedTracks)+",":"")+"".concat(null!==(Y=t.auxStream)&&void 0!==Y&&null!==(K=Y.tracks4Subscribe)&&void 0!==K&&K.length?"tracks4Subscribe:"+JSON.stringify(null===(z=t.auxStream)||void 0===z?void 0:z.tracks4Subscribe)+",":"")+"".concat(null!==(J=t.auxStream)&&void 0!==J&&null!==(Q=J.tracks4Unsubscribe)&&void 0!==Q&&Q.length?"tracks4Unsubscribe:"+JSON.stringify(null===(q=t.auxStream)||void 0===q?void 0:q.tracks4Unsubscribe)+",":"")+"".concat(null!==($=t.auxStream)&&void 0!==$&&null!==(ee=$.allSubscribeTracks)&&void 0!==ee&&ee.length?"allSubscribeTracks:"+JSON.stringify(null===(te=t.auxStream)||void 0===te?void 0:te.allSubscribeTracks):""):""}},{key:"isSameResolution",value:function e(t,r){if(!t||!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);return t.height===r.height&&t.width===r.width}},{key:"isMuteStatusChange",value:function e(t,r){if(!t||!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);return t.mute!==r.mute}},{key:"generateUniqueId",value:function e(t,r){if(!t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);return"".concat(t,"#").concat(r)}}])}();function rU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const nU=[200,201,204];const iU=new(function(){function e(){a(this,e)}return u(e,[{key:"setLogServerConfigs",value:function e(t){this.logServerConfigs=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rU(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rU(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({logServerAppId:Yx,payLoad:"",signature:""},t),this.logServerConfigs.logServerAppId=this.logServerConfigs.logServerAppId||Yx}},{key:"uploadLogFile",value:async function e(t,r){let n;try{if(!("off"!==zM.getParameter(XM)))return void t.logger.warn("LogServer","log caches enable is off");const e=this.initConfigs(r);if(!e.payLoad||!e.signature)return void t.logger.warn("LogServer","init config failed, do not upload.");const i=await this.getServerInfo(e);if(i&&0===i.resCode){this.serverDomain=i.serverDomain,this.accessToken=i.accessToken;const r=await AI.getLogFile(t,e.shaSN),o=await this.getUploadInfo(r,e);o&&0===o.resCode?(this.fileUniqueFlag=o.fileUniqueFlag,this.method=o.uploadInfoList[0].method,this.uploadUrl=o.uploadInfoList[0].uploadUrl,this.headers=o.uploadInfoList[0].headers,n=await this.upload2Obs(r.content),n&&await this.notifyUploadSucc(e)):t.logger.warn("LogServer","post upload info fail: ".concat(JSON.stringify(o)))}else t.logger.warn("LogServer","get server fail: ".concat(JSON.stringify(i)))}catch(e){t.logger.warn("LogServer","upload file error: ".concat(e))}}},{key:"initConfigs",value:function e(t){var r,n,i,o;const a=(null==t?void 0:t.taskId)||SI.getDeviceID().replace(/[-]/g,""),s=(null==t?void 0:t.payLoad)||(null===(r=this.logServerConfigs)||void 0===r?void 0:r.payLoad);return{shaSN:a,logServerAppId:(null==t?void 0:t.logServerAppId)||(null===(n=this.logServerConfigs)||void 0===n?void 0:n.logServerAppId),payLoad:s,signature:(null==t?void 0:t.signature)||(null===(i=this.logServerConfigs)||void 0===i?void 0:i.signature),logServerDomain:(null==t?void 0:t.logServerDomain)||(null===(o=this.logServerConfigs)||void 0===o?void 0:o.logServerDomain)||Xx}}},{key:"getServerInfo",value:async function e(t){const r="".concat(t.payLoad,"&appID=").concat(t.logServerAppId),n=await dN.fetch("".concat(t.logServerDomain,"/v2/getServerDomain?appID=").concat(t.logServerAppId),{method:"POST",mode:"cors",cache:"no-cache",body:r},{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",Authorization:"HMAC-SHA256 appID=".concat(t.logServerAppId,', signature="').concat(t.signature,'"')});return null==n?void 0:n.data}},{key:"getUploadInfo",value:async function e(t,r){const n="".concat(r.payLoad,"&logType=0&fileName=").concat(t.urlFileNameEncode,'&fileHashList=[{"fileMd5":"","fileSha256":"').concat(t.sha256,'","fileSize":"').concat(t.length,'"}]&fileSize=').concat(t.length,"&encryptKey=asdfghhjjfsdafaerqw&patchSize=").concat(104857600,"&patchNum=2&patchVer=0"),i="POST&/v2/getUploadInfo&appID=".concat(r.logServerAppId,"&").concat(n,"&appID=").concat(r.logServerAppId),o=CE.exports.enc.Base64.stringify(CE.exports.HmacSHA256(i,this.accessToken)),a=await dN.fetch("https://".concat(this.serverDomain,"/v2/getUploadInfo?appID=").concat(r.logServerAppId),{method:"POST",mode:"cors",cache:"no-cache",body:n},{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",Authorization:"HMAC-SHA256 appID=".concat(r.logServerAppId,', signature="').concat(o,'"')});return null==a?void 0:a.data}},{key:"upload2Obs",value:async function e(t){const r=await dN.fetch("".concat(this.uploadUrl),{method:"".concat(this.method),mode:"cors",cache:"no-cache",body:t},{Authorization:this.headers.Authorization.toString(),"Content-MD5":"","Content-Type":this.headers["Content-Type"],"x-amz-content-sha256":this.headers["x-amz-content-sha256"],"x-amz-date":this.headers["x-amz-date"]});return nU.includes(null==r?void 0:r.httpCode)}},{key:"notifyUploadSucc",value:async function e(t){var r;const n=SI.getCurrentTime(),i="".concat(n.year).concat(n.month).concat(n.day).concat(n.hour).concat(n.min).concat(n.sec),o="".concat(t.payLoad,"&fileUniqueFlag=").concat(this.fileUniqueFlag,"&uploadTime=").concat(i),a="POST&/v2/notifyUploadSucc&appID=".concat(t.logServerAppId,"&").concat(o,"&appID=").concat(t.logServerAppId),s=CE.exports.HmacSHA256(a,this.accessToken),u=CE.exports.enc.Base64.stringify(s),c=await dN.fetch("https://".concat(this.serverDomain,"/v2/notifyUploadSucc?appID=").concat(t.logServerAppId),{method:"POST",mode:"cors",cache:"no-cache",body:o},{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",Authorization:"HMAC-SHA256 appID=".concat(t.logServerAppId,', signature="').concat(u,'"')});return c&&(null===(r=c.data)||void 0===r?void 0:r.resCode)}}])}()),oU="ClientRelayRoomManager";const aU=new(function(){function e(){a(this,e);this.relayClients=new Map,this.logger=AI.getLogger()}return u(e,[{key:"add",value:function e(t,r,n){if(this.relayClients.has(t))this.relayClients.get(t).set(r,n);else{const e=new Map;e.set(r,n),this.relayClients.set(t,e)}}},{key:"find",value:function e(t,r){if(this.relayClients.has(t))return this.relayClients.get(t).get(r)}},{key:"remove",value:function e(t,r){var n;r?null===(n=this.relayClients.get(t))||void 0===n||n.delete(r):this.relayClients.delete(t)}},{key:"addConnectionCache",value:function e(t,r,n){this.add(t,r,n)}},{key:"addRelayConnection",value:function e(t,r){if(t.status!==ox.Joined)throw this.logger.error(oU,"cannot addRelayConnection before join room"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"cannot addRelayConnection before join room");if(t.mainRelayRoomSymbol)throw this.logger.error(oU,"addRelayConnection interface cannot call by relayClient"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"addRelayConnection interface cannot call by relayClient");if(this.relayClients.get(t.clientSymbol).size>Kx)throw this.logger.error(oU,"relayClients size over maxium: ".concat(Kx)),new oc(nc.RTC_ERR_CODE_CLIENT_RELAY_ROOM_OVER_MAXNUM);if(this.find(t.clientSymbol,r))throw this.logger.error(oU,"addRelayConnection:".concat(r," already exist")),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"addRelayConnection:".concat(r," already exist"));return new cV(t.clientConfig,t.clientSymbol)}},{key:"getRelayConnection",value:function e(t,r){return this.find(t.clientSymbol,r)}},{key:"stopRelayConnection",value:function e(t,r){t.mainRelayRoomSymbol?(this.find(t.mainRelayRoomSymbol,r)||this.logger.error(oU,"stopRelayClient:".concat(r," not exist")),this.remove(t.mainRelayRoomSymbol,r)):r?this.remove(t.clientSymbol,r):this.remove(t.clientSymbol)}},{key:"roleValidCheck4RelayRoom",value:function e(t,r){if(r===BD.JOINER){let e=!1;for(const r of this.relayClients.get(t.mainRelayRoomSymbol||t.clientSymbol).values())if(r.userInfo.role===BD.JOINER){e=!0;break}if(e)throw this.logger.error(oU,"only one joiner can include in relayRooms."),new oc(nc.RTC_ERR_CODE_CLIENT_RELAY_JOINER_OVER_MAXNUM)}}},{key:"switchRoleParamsCheck",value:function e(t,r,n){if(r!==BD.JOINER&&r!==BD.PLAYER||null==n||!n.signature||null==n||!n.ctime)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);this.roleValidCheck4RelayRoom(t,r)}}])}());var sU=Ri,uU="ArrayBuffer",cU=sb[uU];ci({global:!0,constructor:!0,forced:m[uU]!==cU},{ArrayBuffer:cU}),sU(uU);var lU={exports:{}};!function(e){e.exports=function(){var e=Math.imul,t=Math.clz32;function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e){if(Array.isArray(e))return e}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,r){return t=f(t),y(e,p()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&g(i,r.prototype),i}function u(e,t){for(var r,n=0;n<t.length;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S(r.key),r)}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f: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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function h(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e,t){return n(e)||v(e,t)||w(e,t)||m()}function _(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=_(e,"string");return"symbol"==typeof t?t:t+""}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function w(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function T(e){var t="function"==typeof Map?new Map:void 0;return T=function(e){function r(){return s(e,arguments,f(this).constructor)}if(null===e||!h(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},T(e)}var I=function(e){var t=Math.abs,r=Math.max,n=Math.floor;function i(e,t){var r;if(a(this,i),(r=o(this,i,[e])).sign=t,Object.setPrototypeOf(r,i.prototype),e>i.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return r}return d(i,e),c(i,[{key:"toDebugString",value:function e(){var t,r=["BigInt["],n=l(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;r.push((i?(i>>>0).toString(16):i)+", ")}}catch(e){n.e(e)}finally{n.f()}return r.push("]"),r.join("")}},{key:"toString",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10;if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":e&e-1?i.__toStringGeneric(this,e,!1):i.__toStringBasePowerOfTwo(this,e)}},{key:"valueOf",value:function(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function(){for(var e=new i(this.length,this.sign),t=0;t<this.length;t++)e[t]=this[t];return e}},{key:"__trim",value:function(){for(var e=this.length,t=this[e-1];0===t;)t=this[--e-1],this.pop();return 0===e&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var e=0;e<this.length;e++)this[e]=0}},{key:"__clzmsd",value:function(){return i.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function(e,t,r){r>this.length&&(r=this.length);for(var n=32767&e,o=e>>>15,a=0,s=t,u=0;u<r;u++){var c=this.__digit(u),l=32767&c,f=c>>>15,d=i.__imul(l,n),h=i.__imul(l,o),p=i.__imul(f,n),v=s+d+a;a=v>>>30,v&=1073741823,a+=(v+=((32767&h)<<15)+((32767&p)<<15))>>>30,s=i.__imul(f,o)+(h>>>15)+(p>>>15),this.__setDigit(u,1073741823&v)}if(0!==a||0!==s)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,r){for(var n,i=0,o=0;o<r;o++)i=(n=this.__halfDigit(t+o)+e.__halfDigit(o)+i)>>>15,this.__setHalfDigit(t+o,32767&n);return i}},{key:"__inplaceSub",value:function(e,t,r){var n=r-1>>>1,i=0;if(1&t){t>>=1;for(var o=this.__digit(t),a=32767&o,s=0;s<n;s++){var u=e.__digit(s),c=(o>>>15)-(32767&u)-i;i=1&c>>>15,this.__setDigit(t+s,(32767&c)<<15|32767&a),i=1&(a=(32767&(o=this.__digit(t+s+1)))-(u>>>15)-i)>>>15}var l=e.__digit(s),f=(o>>>15)-(32767&l)-i;i=1&f>>>15,this.__setDigit(t+s,(32767&f)<<15|32767&a);var d=l>>>15;if(t+s+1>=this.length)throw new RangeError("out of bounds");!(1&r)&&(i=1&(a=(32767&(o=this.__digit(t+s+1)))-d-i)>>>15,this.__setDigit(t+e.length,1073709056&o|32767&a))}else{t>>=1;for(var h=0;h<e.length-1;h++){var p=this.__digit(t+h),v=e.__digit(h),m=(32767&p)-(32767&v)-i,y=(p>>>15)-(v>>>15)-(i=1&m>>>15);i=1&y>>>15,this.__setDigit(t+h,(32767&y)<<15|32767&m)}var g=this.__digit(t+h),b=e.__digit(h),_=(32767&g)-(32767&b)-i;i=1&_>>>15;var S=0;!(1&r)&&(i=1&(S=(g>>>15)-(b>>>15)-i)>>>15),this.__setDigit(t+h,(32767&S)<<15|32767&_)}return i}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t,r=this.__digit(0)>>>e,n=this.length-1,i=0;i<n;i++)t=this.__digit(i+1),this.__setDigit(i,1073741823&t<<30-e|r),r=t>>>e;this.__setDigit(n,r)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:"__setHalfDigit",value:function(e,t){var r=e>>>1,n=this.__digit(r),i=1&e?32767&n|t<<15:1073709056&n|32767&t;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return i.__zero();if(i.__isOneDigitInt(e))return 0>e?i.__oneDigit(-e,!0):i.__oneDigit(e,!1);if(!t(e)||n(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return i.__fromDouble(e)}if("string"==typeof e){var r=i.__fromString(e);if(null===r)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return r}if("boolean"==typeof e)return!0===e?i.__oneDigit(1,!1):i.__zero();if("object"===E(e)){if(e.constructor===i)return e;var o=i.__toPrimitive(e);return i.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var r=e.__unsignedDigit(0);return e.sign?-r:r}var n=e.__digit(t-1),o=i.__clz30(n),a=30*t-o;if(1024<a)return e.sign?-1/0:1/0;var s=a-1,u=n,c=t-1,l=o+3,f=32===l?0:u<<l;f>>>=12;var d=l-12,h=12<=l?0:u<<20+l,p=20+l;for(0<d&&0<c&&(c--,f|=(u=e.__digit(c))>>>30-d,h=u<<d+2,p=d+2);0<p&&0<c;)c--,u=e.__digit(c),h|=30<=p?u<<p-30:u>>>30-p,p-=30;var v=i.__decideRounding(e,p,c,u);if((1===v||0===v&&!(1&~h))&&0==(h=h+1>>>0)&&0!=++f>>>20&&(f=0,1023<++s))return e.sign?-1/0:1/0;var m=e.sign?-2147483648:0;return s=s+1023<<20,i.__kBitConversionInts[i.__kBitConversionIntHigh]=m|s|f,i.__kBitConversionInts[i.__kBitConversionIntLow]=h,i.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?i.__absoluteSubOne(e).__trim():i.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return i.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return!e.sign||1&t.__digit(0)?e:i.unaryMinus(e);if(1<t.length)throw new RangeError("BigInt too big");var r=t.__unsignedDigit(0);if(1===r)return e;if(r>=i.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var n=1+(0|r/30),o=new i(n,e.sign&&!!(1&r));o.__initializeDigits();var a=1<<r%30;return o.__setDigit(n-1,a),o}var s=null,u=e;for(!!(1&r)&&(s=e),r>>=1;0!==r;r>>=1)u=i.multiply(u,u),1&r&&(s=null===s?u:i.multiply(s,u));return s}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;var n=new i(r,e.sign!==t.sign);n.__initializeDigits();for(var o=0;o<e.length;o++)i.__multiplyAccumulate(t,e.__digit(o),n,o);return n.__trim()}},{key:"divide",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(e,t))return i.__zero();var r,n=e.sign!==t.sign,o=t.__unsignedDigit(0);if(1===t.length&&32767>=o){if(1===o)return n===e.sign?e:i.unaryMinus(e);r=i.__absoluteDivSmall(e,o,null)}else r=i.__absoluteDivLarge(e,t,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(e,t))return e;var r=t.__unsignedDigit(0);if(1===t.length&&32767>=r){if(1===r)return i.__zero();var n=i.__absoluteModSmall(e,r);return 0===n?i.__zero():i.__oneDigit(n,e.sign)}var o=i.__absoluteDivLarge(e,t,!1,!0);return o.sign=e.sign,o.__trim()}},{key:"add",value:function(e,t){var r=e.sign;return r===t.sign?i.__absoluteAdd(e,t,r):0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,r):i.__absoluteSub(t,e,!r)}},{key:"subtract",value:function(e,t){var r=e.sign;return r===t.sign?0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,r):i.__absoluteSub(t,e,!r):i.__absoluteAdd(e,t,r)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?i.__rightShiftByAbsolute(e,t):i.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?i.__leftShiftByAbsolute(e,t):i.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>i.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=i.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0<i.__compareToBigInt(e,t)}},{key:"greaterThanOrEqual",value:function(e,t){return 0<=i.__compareToBigInt(e,t)}},{key:"equal",value:function(e,t){if(e.sign!==t.sign)return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e.__digit(r)!==t.__digit(r))return!1;return!0}},{key:"notEqual",value:function(e,t){return!i.equal(e,t)}},{key:"bitwiseAnd",value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){var n=r(e.length,t.length)+1,o=i.__absoluteSubOne(e,n),a=i.__absoluteSubOne(t);return o=i.__absoluteOr(o,a,o),i.__absoluteAddOne(o,!0,o).__trim()}if(e.sign){var s=[t,e];e=s[0],t=s[1]}return i.__absoluteAndNot(e,i.__absoluteSubOne(t)).__trim()}},{key:"bitwiseXor",value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){var n=r(e.length,t.length),o=i.__absoluteSubOne(e,n),a=i.__absoluteSubOne(t);return i.__absoluteXor(o,a,o).__trim()}var s=r(e.length,t.length)+1;if(e.sign){var u=[t,e];e=u[0],t=u[1]}var c=i.__absoluteSubOne(t,s);return c=i.__absoluteXor(c,e,c),i.__absoluteAddOne(c,!0,c).__trim()}},{key:"bitwiseOr",value:function(e,t){var n=r(e.length,t.length);if(!e.sign&&!t.sign)return i.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){var o=i.__absoluteSubOne(e,n),a=i.__absoluteSubOne(t);return o=i.__absoluteAnd(o,a,o),i.__absoluteAddOne(o,!0,o).__trim()}if(e.sign){var s=[t,e];e=s[0],t=s[1]}var u=i.__absoluteSubOne(t,n);return u=i.__absoluteAndNot(u,e,u),i.__absoluteAddOne(u,!0,u).__trim()}},{key:"asIntN",value:function(e,t){if(0===t.length)return t;if(0>(e=n(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return i.__zero();if(e>=i.__kMaxLengthBits)return t;var r=0|(e+29)/30;if(t.length<r)return t;var o=t.__unsignedDigit(r-1),a=1<<(e-1)%30;if(t.length===r&&o<a)return t;if((o&a)!==a)return i.__truncateToNBits(e,t);if(!t.sign)return i.__truncateAndSubFromPowerOfTwo(e,t,!0);if(!(o&a-1)){for(var s=r-2;0<=s;s--)if(0!==t.__digit(s))return i.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===r&&o===a?t:i.__truncateToNBits(e,t)}return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}},{key:"asUintN",value:function(e,t){if(0===t.length)return t;if(0>(e=n(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return i.__zero();if(t.sign){if(e>i.__kMaxLengthBits)throw new RangeError("BigInt too big");return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=i.__kMaxLengthBits)return t;var r=0|(e+29)/30;if(t.length<r)return t;var o=e%30;if(t.length==r){if(0===o)return t;if(0==t.__digit(r-1)>>>o)return t}return i.__truncateToNBits(e,t)}},{key:"ADD",value:function(e,t){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)&&i.__isBigInt(t))return i.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return i.__compare(e,t,0)}},{key:"LE",value:function(e,t){return i.__compare(e,t,1)}},{key:"GT",value:function(e,t){return i.__compare(e,t,2)}},{key:"GE",value:function(e,t){return i.__compare(e,t,3)}},{key:"EQ",value:function(e,t){for(;;){if(i.__isBigInt(e))return i.__isBigInt(t)?i.equal(e,t):i.EQ(t,e);if("number"==typeof e){if(i.__isBigInt(t))return i.__equalToNumber(t,e);if("object"!==E(t))return e==t;t=i.__toPrimitive(t)}else if("string"==typeof e){if(i.__isBigInt(t))return null!==(e=i.__fromString(e))&&i.equal(e,t);if("object"!==E(t))return e==t;t=i.__toPrimitive(t)}else if("boolean"==typeof e){if(i.__isBigInt(t))return i.__equalToNumber(t,+e);if("object"!==E(t))return e==t;t=i.__toPrimitive(t)}else if("symbol"===E(e)){if(i.__isBigInt(t))return!1;if("object"!==E(t))return e==t;t=i.__toPrimitive(t)}else{if("object"!==E(e))return e==t;if("object"===E(t)&&t.constructor!==i)return e==t;e=i.__toPrimitive(e)}}}},{key:"NE",value:function(e,t){return!i.EQ(e,t)}},{key:"DataViewGetBigInt64",value:function(e,t){var r=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return i.asIntN(64,i.DataViewGetBigUint64(e,t,r))}},{key:"DataViewGetBigUint64",value:function(e,t){var r=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],n=b(r?[4,0]:[0,4],2),o=n[0],a=n[1],s=e.getUint32(t+o,r),u=e.getUint32(t+a,r),c=new i(3,!1);return c.__setDigit(0,1073741823&u),c.__setDigit(1,(268435455&s)<<2|u>>>30),c.__setDigit(2,s>>>28),c.__trim()}},{key:"DataViewSetBigInt64",value:function(e,t,r){var n=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];i.DataViewSetBigUint64(e,t,r,n)}},{key:"DataViewSetBigUint64",value:function(e,t,r){var n=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3],o=0,a=0;if(0<(r=i.asUintN(64,r)).length&&(a=r.__digit(0),1<r.length)){var s=r.__digit(1);a|=s<<30,o=s>>>2,2<r.length&&(o|=r.__digit(2)<<28)}var u=b(n?[4,0]:[0,4],2),c=u[0],l=u[1];e.setUint32(t+c,o,n),e.setUint32(t+l,a,n)}},{key:"__zero",value:function(){return new i(0,!1)}},{key:"__oneDigit",value:function(e,t){var r=new i(1,t);return r.__setDigit(0,e),r}},{key:"__decideRounding",value:function(e,t,r,n){if(0<t)return-1;var i;if(0>t)i=-t-1;else{if(0===r)return-1;r--,n=e.__digit(r),i=29}var o=1<<i;if(0==(n&o))return-1;if(n&(o-=1))return 1;for(;0<r;)if(r--,0!==e.__digit(r))return 1;return 0}},{key:"__fromDouble",value:function(e){var t=0>e;i.__kBitConversionDouble[0]=e;var r,n=(2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20)-1023,o=1+(0|n/30),a=new i(o,t),s=1048576,u=1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh]|s,c=i.__kBitConversionInts[i.__kBitConversionIntLow],l=20,f=n%30,d=0;if(f<l){var h=l-f;d=h+32,r=u>>>h,u=u<<32-h|c>>>h,c<<=32-h}else if(f===l)d=32,r=u,u=c,c=0;else{var p=f-l;d=32-p,r=u<<p|c>>>32-p,u=c<<p,c=0}a.__setDigit(o-1,r);for(var v=o-2;0<=v;v--)0<d?(d-=30,r=u>>>2,u=u<<30|c>>>2,c<<=30):r=0,a.__setDigit(v,r);return a.__trim()}},{key:"__isWhitespace",value:function(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=0,n=e.length,o=0;if(o===n)return i.__zero();for(var a=e.charCodeAt(o);i.__isWhitespace(a);){if(++o===n)return i.__zero();a=e.charCodeAt(o)}if(43===a){if(++o===n)return null;a=e.charCodeAt(o),r=1}else if(45===a){if(++o===n)return null;a=e.charCodeAt(o),r=-1}if(0===t){if(t=10,48===a){if(++o===n)return i.__zero();if(88===(a=e.charCodeAt(o))||120===a){if(t=16,++o===n)return null;a=e.charCodeAt(o)}else if(79===a||111===a){if(t=8,++o===n)return null;a=e.charCodeAt(o)}else if(66===a||98===a){if(t=2,++o===n)return null;a=e.charCodeAt(o)}}}else if(16===t&&48===a){if(++o===n)return i.__zero();if(88===(a=e.charCodeAt(o))||120===a){if(++o===n)return null;a=e.charCodeAt(o)}}if(0!==r&&10!==t)return null;for(;48===a;){if(++o===n)return i.__zero();a=e.charCodeAt(o)}var s=n-o,u=i.__kMaxBitsPerChar[t],c=i.__kBitsPerCharTableMultiplier-1;if(s>1073741824/u)return null;var l=new i(0|((u*s+c>>>i.__kBitsPerCharTableShift)+29)/30,!1),f=10>t?t:10,d=10<t?t-10:0;if(t&t-1){l.__initializeDigits();var h=!1,p=0;do{for(var v,m=0,y=1;;){if(v=void 0,a-48>>>0<f)v=a-48;else{if(!((32|a)-97>>>0<d)){h=!0;break}v=(32|a)-87}var g=y*t;if(1073741823<g)break;if(y=g,m=m*t+v,p++,++o===n){h=!0;break}a=e.charCodeAt(o)}var b=0|(u*p+(c=30*i.__kBitsPerCharTableMultiplier-1)>>>i.__kBitsPerCharTableShift)/30;l.__inplaceMultiplyAdd(y,m,b)}while(!h)}else{u>>=i.__kBitsPerCharTableShift;var _=[],S=[],E=!1;do{for(var w,T=0,I=0;;){if(w=void 0,a-48>>>0<f)w=a-48;else{if(!((32|a)-97>>>0<d)){E=!0;break}w=(32|a)-87}if(I+=u,T=T<<u|w,++o===n){E=!0;break}if(a=e.charCodeAt(o),30<I+u)break}_.push(T),S.push(I)}while(!E);i.__fillFromParts(l,_,S)}if(o!==n){if(!i.__isWhitespace(a))return null;for(o++;o<n;o++)if(a=e.charCodeAt(o),!i.__isWhitespace(a))return null}return l.sign=-1===r,l.__trim()}},{key:"__fillFromParts",value:function(e,t,r){for(var n=0,i=0,o=0,a=t.length-1;0<=a;a--){var s=t[a],u=r[a];i|=s<<o,30===(o+=u)?(e.__setDigit(n++,i),o=0,i=0):30<o&&(e.__setDigit(n++,1073741823&i),i=s>>>u-(o-=30))}if(0!==i){if(n>=e.length)throw new Error("implementation bug");e.__setDigit(n++,i)}for(;n<e.length;n++)e.__setDigit(n,0)}},{key:"__toStringBasePowerOfTwo",value:function(e,t){var r=e.length,n=t-1,o=n=(15&(n=(51&(n=(85&n>>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),a=t-1,s=e.__digit(r-1),u=0|(30*r-i.__clz30(s)+o-1)/o;if(e.sign&&u++,268435456<u)throw new Error("string too long");for(var c=Array(u),l=u-1,f=0,d=0,h=0;h<r-1;h++){var p=e.__digit(h),v=(f|p<<d)&a;c[l--]=i.__kConversionChars[v];var m=o-d;for(f=p>>>m,d=30-m;d>=o;)c[l--]=i.__kConversionChars[f&a],f>>>=o,d-=o}var y=(f|s<<d)&a;for(c[l--]=i.__kConversionChars[y],f=s>>>o-d;0!==f;)c[l--]=i.__kConversionChars[f&a],f>>>=o;if(e.sign&&(c[l--]="-"),-1!==l)throw new Error("implementation bug");return c.join("")}},{key:"__toStringGeneric",value:function(e,t,r){var n=e.length;if(0===n)return"";if(1===n){var o=e.__unsignedDigit(0).toString(t);return!1===r&&e.sign&&(o="-"+o),o}var a,s,u=30*n-i.__clz30(e.__digit(n-1)),c=i.__kMaxBitsPerChar[t]-1,l=u*i.__kBitsPerCharTableMultiplier,f=1+(l=0|(l+=c-1)/c)>>1,d=i.exponentiate(i.__oneDigit(t,!1),i.__oneDigit(f,!1)),h=d.__unsignedDigit(0);if(1===d.length&&32767>=h){(a=new i(e.length,!1)).__initializeDigits();for(var p,v=0,m=2*e.length-1;0<=m;m--)p=v<<15|e.__halfDigit(m),a.__setHalfDigit(m,0|p/h),v=0|p%h;s=v.toString(t)}else{var y=i.__absoluteDivLarge(e,d,!0,!0);a=y.quotient;var g=y.remainder.__trim();s=i.__toStringGeneric(g,t,!0)}a.__trim();for(var b=i.__toStringGeneric(a,t,!0);s.length<f;)s="0"+s;return!1===r&&e.sign&&(b="-"+b),b+s}},{key:"__unequalSign",value:function(e){return e?-1:1}},{key:"__absoluteGreater",value:function(e){return e?-1:1}},{key:"__absoluteLess",value:function(e){return e?1:-1}},{key:"__compareToBigInt",value:function(e,t){var r=e.sign;if(r!==t.sign)return i.__unequalSign(r);var n=i.__absoluteCompare(e,t);return 0<n?i.__absoluteGreater(r):0>n?i.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(e,r){if(i.__isOneDigitInt(r)){var n=e.sign,o=0>r;if(n!==o)return i.__unequalSign(n);if(0===e.length){if(o)throw new Error("implementation bug");return 0===r?0:-1}if(1<e.length)return i.__absoluteGreater(n);var a=t(r),s=e.__unsignedDigit(0);return s>a?i.__absoluteGreater(n):s<a?i.__absoluteLess(n):0}return i.__compareToDouble(e,r)}},{key:"__compareToDouble",value:function(e,t){if(t!=t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;var r=e.sign;if(r!==0>t)return i.__unequalSign(r);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;i.__kBitConversionDouble[0]=t;var n=2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var o=n-1023;if(0>o)return i.__absoluteGreater(r);var a=e.length,s=e.__digit(a-1),u=i.__clz30(s),c=30*a-u,l=o+1;if(c<l)return i.__absoluteLess(r);if(c>l)return i.__absoluteGreater(r);var f=1048576|1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh],d=i.__kBitConversionInts[i.__kBitConversionIntLow],h=20,p=29-u;if(p!==(0|(c-1)%30))throw new Error("implementation bug");var v,m=0;if(p<h){var y=h-p;m=y+32,v=f>>>y,f=f<<32-y|d>>>y,d<<=32-y}else if(p===h)m=32,v=f,f=d,d=0;else{var g=p-h;m=32-g,v=f<<g|d>>>32-g,f=d<<g,d=0}if((s>>>=0)>(v>>>=0))return i.__absoluteGreater(r);if(s<v)return i.__absoluteLess(r);for(var b=a-2;0<=b;b--){0<m?(m-=30,v=f>>>2,f=f<<30|d>>>2,d<<=30):v=0;var _=e.__unsignedDigit(b);if(_>v)return i.__absoluteGreater(r);if(_<v)return i.__absoluteLess(r)}if(0!==f||0!==d){if(0===m)throw new Error("implementation bug");return i.__absoluteLess(r)}return 0}},{key:"__equalToNumber",value:function(e,r){return i.__isOneDigitInt(r)?0===r?0===e.length:1===e.length&&e.sign===0>r&&e.__unsignedDigit(0)===t(r):0===i.__compareToDouble(e,r)}},{key:"__comparisonResultToBool",value:function(e,t){return 0===t?0>e:1===t?0>=e:2===t?0<e:3===t?0<=e:void 0}},{key:"__compare",value:function(e,t,r){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(i.__isBigInt(e)&&"string"==typeof t)return null!==(t=i.__fromString(t))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),r);if("string"==typeof e&&i.__isBigInt(t))return null!==(e=i.__fromString(e))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),r);if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)){if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToBigInt(e,t),r);if("number"!=typeof t)throw new Error("implementation bug");return i.__comparisonResultToBool(i.__compareToNumber(e,t),r)}if("number"!=typeof e)throw new Error("implementation bug");if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToNumber(t,e),2^r);if("number"!=typeof t)throw new Error("implementation bug");return 0===r?e<t:1===r?e<=t:2===r?e>t:3===r?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,r){if(e.length<t.length)return i.__absoluteAdd(t,e,r);if(0===e.length)return e;if(0===t.length)return e.sign===r?e:i.unaryMinus(e);var n=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&n++;for(var o,a=new i(n,r),s=0,u=0;u<t.length;u++)s=(o=e.__digit(u)+t.__digit(u)+s)>>>30,a.__setDigit(u,1073741823&o);for(;u<e.length;u++){var c=e.__digit(u)+s;s=c>>>30,a.__setDigit(u,1073741823&c)}return u<a.length&&a.__setDigit(u,s),a.__trim()}},{key:"__absoluteSub",value:function(e,t,r){if(0===e.length)return e;if(0===t.length)return e.sign===r?e:i.unaryMinus(e);for(var n,o=new i(e.length,r),a=0,s=0;s<t.length;s++)a=1&(n=e.__digit(s)-t.__digit(s)-a)>>>30,o.__setDigit(s,1073741823&n);for(;s<e.length;s++){var u=e.__digit(s)-a;a=1&u>>>30,o.__setDigit(s,1073741823&u)}return o.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=e.length;null===r?r=new i(n,t):r.sign=t;for(var o,a=1,s=0;s<n;s++)a=(o=e.__digit(s)+a)>>>30,r.__setDigit(s,1073741823&o);return 0!==a&&r.__setDigitGrow(n,1),r}},{key:"__absoluteSubOne",value:function(e,t){for(var r,n=e.length,o=new i(t=t||n,!1),a=1,s=0;s<n;s++)a=1&(r=e.__digit(s)-a)>>>30,o.__setDigit(s,1073741823&r);if(0!==a)throw new Error("implementation bug");for(var u=n;u<t;u++)o.__setDigit(u,0);return o}},{key:"__absoluteAnd",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=e.length,o=t.length,a=o;if(n<o){a=n;var s=e,u=n;e=t,n=o,t=s,o=u}var c=a;null===r?r=new i(c,!1):c=r.length;for(var l=0;l<a;l++)r.__setDigit(l,e.__digit(l)&t.__digit(l));for(;l<c;l++)r.__setDigit(l,0);return r}},{key:"__absoluteAndNot",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=e.length,o=t.length,a=o;n<o&&(a=n);var s=n;null===r?r=new i(s,!1):s=r.length;for(var u=0;u<a;u++)r.__setDigit(u,e.__digit(u)&~t.__digit(u));for(;u<n;u++)r.__setDigit(u,e.__digit(u));for(;u<s;u++)r.__setDigit(u,0);return r}},{key:"__absoluteOr",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=e.length,o=t.length,a=o;if(n<o){a=n;var s=e,u=n;e=t,n=o,t=s,o=u}var c=n;null===r?r=new i(c,!1):c=r.length;for(var l=0;l<a;l++)r.__setDigit(l,e.__digit(l)|t.__digit(l));for(;l<n;l++)r.__setDigit(l,e.__digit(l));for(;l<c;l++)r.__setDigit(l,0);return r}},{key:"__absoluteXor",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=e.length,o=t.length,a=o;if(n<o){a=n;var s=e,u=n;e=t,n=o,t=s,o=u}var c=n;null===r?r=new i(c,!1):c=r.length;for(var l=0;l<a;l++)r.__setDigit(l,e.__digit(l)^t.__digit(l));for(;l<n;l++)r.__setDigit(l,e.__digit(l));for(;l<c;l++)r.__setDigit(l,0);return r}},{key:"__absoluteCompare",value:function(e,t){var r=e.length-t.length;if(0!=r)return r;for(var n=e.length-1;0<=n&&e.__digit(n)===t.__digit(n);)n--;return 0>n?0:e.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,r,n){if(0!==t){for(var o=32767&t,a=t>>>15,s=0,u=0,c=0;c<e.length;c++,n++){var l=r.__digit(n),f=e.__digit(c),d=32767&f,h=f>>>15,p=i.__imul(d,o),v=i.__imul(d,a),m=i.__imul(h,o);s=(l+=u+p+s)>>>30,l&=1073741823,s+=(l+=((32767&v)<<15)+((32767&m)<<15))>>>30,u=i.__imul(h,a)+(v>>>15)+(m>>>15),r.__setDigit(n,1073741823&l)}for(;0!==s||0!==u;n++){var y=r.__digit(n);y+=s+u,u=0,s=y>>>30,r.__setDigit(n,1073741823&y)}}}},{key:"__internalMultiplyAdd",value:function(e,t,r,n,o){for(var a=r,s=0,u=0;u<n;u++){var c=e.__digit(u),l=i.__imul(32767&c,t),f=i.__imul(c>>>15,t),d=l+((32767&f)<<15)+s+a;a=d>>>30,s=f>>>15,o.__setDigit(u,1073741823&d)}if(o.length>n)for(o.__setDigit(n++,a+s);n<o.length;)o.__setDigit(n++,0);else if(0!==a+s)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;null===r&&(r=new i(e.length,!1));for(var n=0,o=2*e.length-1;0<=o;o-=2){var a=(n<<15|e.__halfDigit(o))>>>0,s=0|a/t,u=0|(a=((n=0|a%t)<<15|e.__halfDigit(o-1))>>>0)/t;n=0|a%t,r.__setDigit(o>>>1,s<<15|u)}return r}},{key:"__absoluteModSmall",value:function(e,t){for(var r=0,n=2*e.length-1;0<=n;n--)r=0|((r<<15|e.__halfDigit(n))>>>0)%t;return r}},{key:"__absoluteDivLarge",value:function(e,t,r,n){var o=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-o,u=null;r&&(u=new i(s+2>>>1,!1)).__initializeDigits();var c=new i(o+2>>>1,!1);c.__initializeDigits();var l=i.__clz15(t.__halfDigit(o-1));0<l&&(t=i.__specialLeftShift(t,l,0));for(var f=i.__specialLeftShift(e,l,1),d=t.__halfDigit(o-1),h=0,p=s;0<=p;p--){var v=32767,m=f.__halfDigit(p+o);if(m!==d){var y=(m<<15|f.__halfDigit(p+o-1))>>>0;v=0|y/d;for(var g=0|y%d,b=t.__halfDigit(o-2),_=f.__halfDigit(p+o-2);i.__imul(v,b)>>>0>(g<<16|_)>>>0&&(v--,!(32767<(g+=d))););}i.__internalMultiplyAdd(t,v,0,a,c);var S=f.__inplaceSub(c,p,o+1);0!==S&&(S=f.__inplaceAdd(t,p,o),f.__setHalfDigit(p+o,32767&f.__halfDigit(p+o)+S),v--),r&&(1&p?h=v<<15:u.__setDigit(p>>>1,h|v))}if(n)return f.__inplaceRightShift(l),r?{quotient:u,remainder:f}:f;if(r)return u;throw new Error("unreachable")}},{key:"__clz15",value:function(e){return i.__clz30(e)-15}},{key:"__specialLeftShift",value:function(e,t,r){var n=e.length,o=new i(n+r,!1);if(0===t){for(var a=0;a<n;a++)o.__setDigit(a,e.__digit(a));return 0<r&&o.__setDigit(n,0),o}for(var s,u=0,c=0;c<n;c++)s=e.__digit(c),o.__setDigit(c,1073741823&s<<t|u),u=s>>>30-t;return 0<r&&o.__setDigit(n,u),o}},{key:"__leftShiftByAbsolute",value:function(e,t){var r=i.__toShiftAmount(t);if(0>r)throw new RangeError("BigInt too big");var n=0|r/30,o=r%30,a=e.length,s=0!==o&&0!=e.__digit(a-1)>>>30-o,u=a+n+(s?1:0),c=new i(u,e.sign);if(0===o){for(var l=0;l<n;l++)c.__setDigit(l,0);for(;l<u;l++)c.__setDigit(l,e.__digit(l-n))}else{for(var f=0,d=0;d<n;d++)c.__setDigit(d,0);for(var h,p=0;p<a;p++)h=e.__digit(p),c.__setDigit(p+n,1073741823&h<<o|f),f=h>>>30-o;if(s)c.__setDigit(a+n,f);else if(0!==f)throw new Error("implementation bug")}return c.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var r=e.length,n=e.sign,o=i.__toShiftAmount(t);if(0>o)return i.__rightShiftByMaximum(n);var a=0|o/30,s=o%30,u=r-a;if(0>=u)return i.__rightShiftByMaximum(n);var c=!1;if(n){var l=(1<<s)-1;if(0!=(e.__digit(a)&l))c=!0;else for(var f=0;f<a;f++)if(0!==e.__digit(f)){c=!0;break}}c&&0===s&&0==~e.__digit(r-1)&&u++;var d=new i(u,n);if(0===s){d.__setDigit(u-1,0);for(var h=a;h<r;h++)d.__setDigit(h-a,e.__digit(h))}else{for(var p,v=e.__digit(a)>>>s,m=r-a-1,y=0;y<m;y++)p=e.__digit(y+a+1),d.__setDigit(y,1073741823&p<<30-s|v),v=p>>>s;d.__setDigit(m,v)}return c&&(d=i.__absoluteAddOne(d,!0,d)),d.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?i.__oneDigit(1,!0):i.__zero()}},{key:"__toShiftAmount",value:function(e){if(1<e.length)return-1;var t=e.__unsignedDigit(0);return t>i.__kMaxLengthBits?-1:t}},{key:"__toPrimitive",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"default";if("object"!==E(e))return e;if(e.constructor===i)return e;if("undefined"!=typeof Symbol&&"symbol"===E(Symbol.toPrimitive)&&e[Symbol.toPrimitive]){var r=e[Symbol.toPrimitive](t);if("object"!==E(r))return r;throw new TypeError("Cannot convert object to primitive value")}var n=e.valueOf;if(n){var o=n.call(e);if("object"!==E(o))return o}var a=e.toString;if(a){var s=a.call(e);if("object"!==E(s))return s}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(e){return i.__isBigInt(e)?e:+e}},{key:"__isBigInt",value:function(e){return"object"===E(e)&&null!==e&&e.constructor===i}},{key:"__truncateToNBits",value:function(e,t){for(var r=0|(e+29)/30,n=new i(r,t.sign),o=r-1,a=0;a<o;a++)n.__setDigit(a,t.__digit(a));var s=t.__digit(o);if(0!=e%30){var u=32-e%30;s=s<<u>>>u}return n.__setDigit(o,s),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,r){for(var n,o=Math.min,a=0|(e+29)/30,s=new i(a,r),u=0,c=a-1,l=0,f=o(c,t.length);u<f;u++)l=1&(n=0-t.__digit(u)-l)>>>30,s.__setDigit(u,1073741823&n);for(;u<c;u++)s.__setDigit(u,1073741823&-l);var d,h=c<t.length?t.__digit(c):0,p=e%30;if(0===p)d=0-h-l,d&=1073741823;else{var v=32-p,m=1<<32-v;d=m-(h=h<<v>>>v)-l,d&=m-1}return s.__setDigit(c,d),s.__trim()}},{key:"__digitPow",value:function(e,t){for(var r=1;0<t;)1&t&&(r*=e),t>>>=1,e*=e;return r}},{key:"__detectBigEndian",value:function(){return i.__kBitConversionDouble[0]=-0,0!==i.__kBitConversionInts[0]}},{key:"__isOneDigitInt",value:function(e){return(1073741823&e)===e}}])}(T(Array));return I.__kMaxLength=33554432,I.__kMaxLengthBits=I.__kMaxLength<<5,I.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],I.__kBitsPerCharTableShift=5,I.__kBitsPerCharTableMultiplier=1<<I.__kBitsPerCharTableShift,I.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],I.__kBitConversionBuffer=new ArrayBuffer(8),I.__kBitConversionDouble=new Float64Array(I.__kBitConversionBuffer),I.__kBitConversionInts=new Int32Array(I.__kBitConversionBuffer),I.__kBitConversionIntHigh=I.__detectBigEndian()?0:1,I.__kBitConversionIntLow=I.__detectBigEndian()?1:0,I.__clz30=t?function(e){return t(e)-2}:function(e){var t=Math.LN2,r=Math.log;return 0===e?30:0|29-(0|r(e>>>0)/t)},I.__imul=e||function(e,t){return 0|e*t},I}()}(lU);var fU=lU.exports;let dU=function(){function e(t,r){a(this,e);o(this,"RTP_HEADER_V_P_X_CC",144),o(this,"RTP_HEADER_V_P_X_CC_BRODACAST",128),this.event=t,this.remoteUserManager=r,this.cmdMsgPacketSeqNum=0}return u(e,[{key:"receivedCmdRtpPacketDecode",value:function e(t){var r,n;const i=new DataView(t),o=i.getUint32(8);if(o!==this.cmdReceiveSsrc)return void AI.getLogger().error("CommandMsgManager","receive msg ssrc not matched, ".concat(this.cmdReceiveSsrc," - ").concat(o));let a=0;if(!(16&i.getUint8(0)))a=12;else{a=16+4*i.getUint16(14)}const s=fU.toNumber(fU.DataViewGetBigUint64(i,a)),u=i.buffer.slice(a+16);let c=null;c=this.msgFormat===px.STRING?hU.ArrayBufferToMsg(u):u,this.event.emit(lx.CmdMsgReceived,{msg:c,srcUserId:null===(r=this.remoteUserManager.getUserInfoByUid(s,this.roomId))||void 0===r||null===(n=r.userInfo)||void 0===n?void 0:n.userId})}},{key:"genCmdRtpPacketMsg",value:function e(t){const r=!t.userUid,n=new DataView(new ArrayBuffer(r?28:44));r?n.setUint8(0,this.RTP_HEADER_V_P_X_CC_BRODACAST):n.setUint8(0,this.RTP_HEADER_V_P_X_CC),n.setUint8(1,this.RTP_HEADER_M_PT),n.setUint16(2,this.cmdMsgPacketSeqNum++),n.setUint32(4,Math.floor((new Date).getTime()/1e3)),n.setUint32(8,this.cmdSendSsrc);const{userUid:i=0,msg:o}=t;let a=0;return r?a=12:(n.setUint16(12,4096),n.setUint16(14,3),n.setUint8(16,21),n.setUint8(17,8),fU.DataViewSetBigUint64(n,18,fU.BigInt(i)),n.setUint16(26,0),a=28),fU.DataViewSetBigUint64(n,a,fU.BigInt(this.selfUserUid)),fU.DataViewSetBigUint64(n,a+8,fU.BigInt(0)),hU.concatArrayBuffer(n.buffer,hU.msgBodyToArrayBuffer(o))}},{key:"sendCommandMsg",value:function e(t,r,n){let i=0;var o,a;r&&(i=null===(o=this.remoteUserManager.getUserInfoById(r,n))||void 0===o||null===(a=o.userInfo)||void 0===a?void 0:a.userUid);return this.transportChannel.sendMessage(this.genCmdRtpPacketMsg({msg:t,userUid:i}))}},{key:"setCommandChannelParams",value:function e(t,r){this.reset(),this.RTP_HEADER_M_PT=r.tranportOptions.payload,this.roomId=t,this.msgFormat=r.msgFormat,this.cmdSendSsrc=r.tranportOptions.sendSsrc,this.cmdReceiveSsrc=r.tranportOptions.receiveSsrc,this.selfUserUid=r.tranportOptions.userUid,this.extraParamsHandle(r),this.initCmdTranportChannel()}}])}();let hU=function(){function e(){a(this,e)}return u(e,null,[{key:"msgBodyToArrayBuffer",value:function e(t){if("string"==typeof t){return(new TextEncoder).encode(t).buffer}return t}},{key:"ArrayBufferToMsg",value:function e(t){return new TextDecoder("utf-8").decode(t)}},{key:"concatArrayBuffer",value:function e(){let t=0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(const e of n)t+=e.byteLength;const o=new Uint8Array(t);let a=0;for(const e of n){const t=new Uint8Array(e);o.set(t,a),a+=e.byteLength}return o.buffer}},{key:"arrayBufferToNumberArray",value:function e(t){const r=[];for(let e=0;e<t.byteLength;e+=4)r.push(t.getUint32(e));return r}},{key:"numberArrayToArrayBuffer",value:function e(t){const r=new DataView(new ArrayBuffer(4*t.length));for(let e=0;e<t.length;e++)r.setUint32(4*e,t[e]);return r.buffer}}])}();const pU="WebsocketMsgManager";let vU=function(){function e(){a(this,e);this.event_=new gN,this.connectionCallbacks=new Map}return u(e,[{key:"on",value:function e(t,r){this.event_.on(t,r)}},{key:"off",value:function e(t,r){r?this.event_.removeListener(t,r):this.event_.removeAllListeners(t)}},{key:"wsConnect",value:async function e(t,r,n,i,o){return await KN.callWithRetryTimes((async e=>await this.wsConnectOnce(t,n,i,e)),!1,r,this.getAsyncInterval(o),this.needInterrupted())}},{key:"getAsyncInterval",value:function e(t){return e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT?0:t}},{key:"needInterrupted",value:function e(){return e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_WEBSOCKET_INTERRUPTED}},{key:"wsConnectOnce",value:async function e(t,r,n,i){this.close(),this.connectionId=SI.generateRandomId(32),this.websocket=new WebSocket(t),this.websocket.binaryType="arraybuffer",AI.getLogger().info(pU,"wsConnectOnce, url:".concat(SI.shieldUrlParameters(t),", begin create websocket ").concat(this.connectionId," connection with server ")),this.websocket.onopen=this.onopen.bind(this),this.websocket.onerror=this.onerror.bind(this),this.websocket.onmessage=this.onmessage.bind(this),this.websocket.onclose=this.onclose.bind(this);try{const e=1===i?r:n;await this.getConnectionResp(e,this.connectionId)}catch(e){throw AI.getLogger().error(pU,"wsConnectOnce, connect occur exception, error: ".concat(e)),e}finally{this.connectionCallbacks.delete(this.connectionId)}}},{key:"getConnectionResp",value:async function e(t,r){await KN.callWithTimeout(new Promise(((e,t)=>{this.connectionCallbacks.set(r,(n=>{if(n.isSuccess)AI.getLogger().info(pU,"getConnectionResp, connectId:".concat(r,", connect success")),e();else{const e=nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_ERROR,i=n.code,o="".concat(i||""," websocket connect error"),a=new oc(e,o);AI.getLogger().info(pU,"getConnectionResp, connectId:".concat(r,", connect fail, errMsg=").concat(a)),t(a)}}))})),t).catch((e=>{if(e.getCode()!==nc.RTC_ERR_CODE_WAIT_RSP_TIMEOUT)throw e;throw AI.getLogger().error(pU,"getConnectionResp, websocket connect timeout after ".concat(t," ms")),this.websocket&&this.websocket.readyState===this.websocket.CONNECTING&&(AI.getLogger().info(pU,"getConnectionResp, websocket connect timeout, close webSocket manual"),this.close()),new oc(nc.RTC_ERR_CODE_WEBSOCKET_CONNECT_TIMEOUT)})).finally((()=>{this.connectionCallbacks.delete(r)}))}},{key:"onopen",value:function e(){AI.getLogger().info(pU,"onopen, wss connection success."),this.connectionCallbacks.has(this.connectionId)&&this.connectionCallbacks.get(this.connectionId)({isSuccess:!0}),this.event_.emit("CMD_CHANNEL_ESTABLISHED")}},{key:"onmessage",value:function e(t){t.data?this.event_.emit("CMD_MSG_REVEIVED",t.data):AI.getLogger().error(pU,"onerror, websocket message is null.")}},{key:"onerror",value:function e(t){AI.getLogger().error(pU,"onerror, websocket occur error:".concat(JSON.stringify(t))),this.connectionCallbacks.has(this.connectionId)&&this.connectionCallbacks.get(this.connectionId)({isSuccess:!1})}},{key:"onclose",value:async function e(t){const r=t.code,n=t.reason;AI.getLogger().warn(pU,"onclose, code:".concat(r,", reason:").concat(n)),this.connectionCallbacks.has(this.connectionId)&&this.connectionCallbacks.get(this.connectionId)({isSuccess:!1,code:r,reason:n}),AI.getLogger().error(pU,"reconnect"),this.event_.emit("CMD_CONNECTION_RECONNECT")}},{key:"sendMessage",value:function e(t){if(!this.websocket)return AI.getLogger().error(pU,"send cmd message failed for websocket is null."),!1;try{return this.websocket.send(t),!0}catch(e){return AI.getLogger().error(pU,"send cmd message failed."),!1}}},{key:"close",value:function e(){this.websocket&&(this.websocket.onopen=null,this.websocket.onerror=null,this.websocket.onmessage=null,this.websocket.onclose=null,this.websocket.close(),this.websocket=null,this.connectionCallbacks.clear())}}])}();let mU=function(e){function t(e,r){var n;a(this,t);n=f(this,t,[e,r]),n.reconnctInterval=[2,5,10,20],n.reconnctIdx=0;return n}p(t,e);return u(t,[{key:"initCmdTranportChannel",value:function e(){this.transportChannel||(this.transportChannel=new vU),this.transportChannel.on("CMD_MSG_REVEIVED",(e=>{this.receivedCmdRtpPacketDecode(e)})),this.transportChannel.on("CMD_CHANNEL_ESTABLISHED",(()=>{AI.getLogger().info(pU,"cmd websocket connection established."),this.event.emit(lx.CmdChannelEstablished,hx.WEBSOCKET),this.reconnctIdx=0,this.transportChannel.sendMessage(this.genCmdBindRtpPacketMsg())})),this.transportChannel.on("CMD_CONNECTION_RECONNECT",(async()=>{if(this.reconnctIdx===this.reconnctInterval.length)AI.getLogger().info(pU,"cmd websocket connection disconnect."),this.event.emit(lx.CmdChannelDisconnect,hx.WEBSOCKET);else try{this.event.emit(lx.CmdChannelReconnecting);const e=this.reconnctInterval[Math.min(this.reconnctIdx,this.reconnctInterval.length-1)];if(AI.getLogger().error(pU,"cmd websocket reconnect wait for ".concat(e,"s.")),await SI.sleep(1e3*e),!this.transportChannel)return;this.reconnctIdx++,AI.getLogger().error(pU,"cmd websocket reconnect begin."),await this.transportChannel.wsConnect(this.cmdSocketUrl,1,1e4,1e4,500)}catch(e){AI.getLogger().error(pU,"cmd websocket reconnect failed: ".concat(e))}}));try{this.transportChannel.wsConnect(this.cmdSocketUrl,1,1e4,1e4,500)}catch(e){AI.getLogger().error(pU,"cmd websocket connect failed: ".concat(e))}}},{key:"extraParamsHandle",value:function e(t){this.bindCryptoKey=t.wsOptions.bindCryptoKey,this.cmdSocketUrl=t.wsOptions.wsDomain?t.wsOptions.wsUrl.replace(/(ws(s)?:\/\/)[^\/|:]+(.*)/,"$1".concat(t.wsOptions.wsDomain,"$3")):t.wsOptions.wsUrl}},{key:"reset",value:function e(){this.roomId=null,this.cmdSendSsrc=0,this.cmdReceiveSsrc=0,this.selfUserUid=0,this.bindCryptoKey=null,this.cmdMsgPacketSeqNum=0,this.reconnctIdx=0,this.transportChannel&&(this.transportChannel.off("CMD_MSG_REVEIVED"),this.transportChannel.off("CMD_CHANNEL_ESTABLISHED"),this.transportChannel.off("CMD_CONNECTION_RECONNECT"),this.transportChannel.close(),this.transportChannel=null)}},{key:"genCmdBindRtpPacketMsg",value:function e(){const t=new DataView(new ArrayBuffer(20));t.setUint8(0,this.RTP_HEADER_V_P_X_CC),t.setUint8(1,this.RTP_HEADER_M_PT),t.setUint16(2,this.cmdMsgPacketSeqNum++),t.setUint32(4,Math.floor((new Date).getTime()/1e3)),t.setUint32(8,this.cmdSendSsrc),t.setUint16(12,4096),t.setUint16(14,1),t.setUint8(16,24),t.setUint8(17,1),t.setUint8(18,0),t.setUint8(19,0);const r=hU.numberArrayToArrayBuffer(CE.exports.HmacSHA256(CE.exports.lib.WordArray.create(hU.arrayBufferToNumberArray(t)),this.bindCryptoKey).words);return hU.concatArrayBuffer(t.buffer,r)}}])}(dU);const yU="DataChannelMsgManager";let gU=function(){function e(t){a(this,e);this.event_=new gN,this.dataChannel=t.createDataChannel("commandMsgDataChannel",{ordered:!0}),this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=this.onopen.bind(this),this.dataChannel.onerror=this.onerror.bind(this),this.dataChannel.onmessage=this.onmessage.bind(this),this.dataChannel.onclose=this.onclose.bind(this)}return u(e,[{key:"on",value:function e(t,r){this.event_.on(t,r)}},{key:"off",value:function e(t,r){r?this.event_.removeListener(t,r):this.event_.removeAllListeners(t)}},{key:"sendMessage",value:function e(t){var r;if(!this.dataChannel||"open"!==this.dataChannel.readyState)return AI.getLogger().error(yU,"send message with dataChannel failed for dataChannel unavaliable: ".concat(null===(r=this.dataChannel)||void 0===r?void 0:r.readyState,".")),!1;try{return this.dataChannel.bufferedAmount>=1024e6&&AI.getLogger().warn(yU,"buffer over high threshold of 1M: ".concat(this.dataChannel.bufferedAmount,", send message may blocked and delay.")),this.dataChannel.send(t),!0}catch(e){return AI.getLogger().error(yU,"send message with dataChannel occur error: ".concat(e,".")),!1}}},{key:"close",value:function e(){clearTimeout(this.dataChannelDisConnectTimer),this.dataChannel&&(this.dataChannel.onopen=null,this.dataChannel.onerror=null,this.dataChannel.onmessage=null,this.dataChannel.onclose=null,this.dataChannel.close(),this.dataChannel=null)}},{key:"onopen",value:function e(){AI.getLogger().info(yU,"onopen, RTCDataChannel connection status: ".concat(this.dataChannel.readyState)),clearTimeout(this.dataChannelDisConnectTimer),this.event_.emit("CMD_CHANNEL_ESTABLISHED")}},{key:"onmessage",value:function e(t){t.data?this.event_.emit("CMD_MSG_REVEIVED",t.data):AI.getLogger().error(yU,"onerror, RTCDataChannel message is null.")}},{key:"onerror",value:function e(t){AI.getLogger().error(yU,"onerror, RTCDataChannel occur error: ".concat(t)),this.dataChannelDisConnectTimer||(this.dataChannelDisConnectTimer=setTimeout((()=>{clearTimeout(this.dataChannelDisConnectTimer),this.event_.emit("CMD_CHANNEL_DISCONNECT")}),3e4))}},{key:"onclose",value:function e(t){AI.getLogger().info(yU,"onclose, RTCDataChannel closed: ".concat(t)),this.dataChannelDisConnectTimer||(this.dataChannelDisConnectTimer=setTimeout((()=>{clearTimeout(this.dataChannelDisConnectTimer),this.event_.emit("CMD_CHANNEL_DISCONNECT")}),3e4))}}])}();let bU=function(e){function t(){a(this,t);return f(this,t,arguments)}p(t,e);return u(t,[{key:"initCmdTranportChannel",value:function e(){this.transportChannel||(this.transportChannel=new gU(this.connection)),this.transportChannel.on("CMD_MSG_REVEIVED",(e=>{n(t,"receivedCmdRtpPacketDecode",this,3)([e])})),this.transportChannel.on("CMD_CHANNEL_ESTABLISHED",(()=>{AI.getLogger().info(yU,"cmd dataChannel connection established."),this.event.emit(lx.CmdChannelEstablished,hx.DATA_CHANNEL)})),this.transportChannel.on("CMD_CHANNEL_DISCONNECT",(()=>{AI.getLogger().info(yU,"cmd dataChannel connection disconnect."),this.event.emit(lx.CmdChannelDisconnect,hx.DATA_CHANNEL)}))}},{key:"extraParamsHandle",value:function e(t){this.connection=t.dataChannelOptions.connection}},{key:"reset",value:function e(){this.roomId=null,this.cmdSendSsrc=0,this.cmdReceiveSsrc=0,this.selfUserUid=0,this.cmdMsgPacketSeqNum=0,this.transportChannel&&(this.transportChannel.off("CMD_MSG_REVEIVED"),this.transportChannel.off("CMD_CHANNEL_ESTABLISHED"),this.transportChannel.close(),this.transportChannel=null)}}])}(dU);var _U,SU,EU,wU,TU,IU,RU,CU,kU,AU,OU,PU,xU,LU,MU,NU,DU,jU,UU,VU,WU,BU,GU,ZU,FU,HU,XU,YU,KU,zU,JU,QU,qU,$U,eV,tV,rV,nV,iV;const oV=1e4;var aV=function(e){return e[e.mute=0]="mute",e[e.unmute=1]="unmute",e[e.noChange=2]="noChange",e}(aV||{});const sV={FHD:ex.main,HD:ex.middle1,SD:ex.middle2,LD:ex.slides},uV="Client";let cV=(_U=FN("Client$destroyClient#void"),SU=FN("Client$enableTopThreeAudioMode#boolean#boolean"),EU=GN("".concat(uV,"_switchAudioMode")),wU=FN("Client$getConnectionState#string"),TU=FN("Client$setNetworkBandwidth#void#NetworkBandwidth"),IU=ZN("Client$join#Promise<void>#string#JoinConfig"),RU=ZN("Client$enableRtcStats#Promise<void>#boolean#number"),CU=ZN("Client$leave#Promise<void>"),kU=ZN("Client$publish#Promise<void>#Stream#PublishOption"),AU=GN("".concat(uV,"_publishImpl")),OU=ZN("Client$unpublish#Promise<void>#Stream"),PU=ZN("Client$subscribeAudio#Promise<RemoteStream | void>#string"),xU=ZN("Client$unSubscribeAudio#Promise<void>#string"),LU=ZN("Client$subscribe#Promise<void>#RemoteStream#SubscribeOption"),MU=ZN("Client$batchSubscribe#Promise<void>#SubscribeParam[]"),NU=ZN("Client$unsubscribe#Promise<void>#Stream#SubscribeOption"),DU=ZN("Client$switchRole#Promise<void>#number#Authorization"),jU=GN("".concat(uV,"_refreshRemoteStreamList")),UU=GN("".concat(uV,"_updateRemoteStream")),VU=GN("".concat(uV,"_removeRemoteStream")),WU=GN("".concat(uV,"_handleWatchMsg")),BU=GN("".concat(uV,"_refreshRoomUserInfos")),GU=FN("Client$setVolume4TopThree#void#number"),ZU=FN("Client$muteAudio4TopThree#void#boolean"),FU=ZN("Client$setAudioOutput4TopThree#void"),HU=FN("Client$isTopNAudioMuted#boolean"),XU=ZN("Client$changeUserName#Promise<boolean>#string"),YU=ZN("Client$startLiveStreaming#Promise<boolean>#string#string[]#PublishConfig#UserConfig[]"),KU=ZN("Client$updateLiveStreaming#Promise<void>#string#string[]#PublishConfig#UserConfig[]"),zU=ZN("Client$stopLiveStreaming#Promise<void>#string"),JU=FN("Client$setProxyServer#void#string"),QU=FN("Client$setTurnServer#void#TurnServerConfig"),qU=ZN("Client$addMultiRoomMediaRelay#Promise<MultiRoomMediaRelayResult[]>#MultiRoomMediaRelayInfo"),$U=ZN("Client$stopMultiRoomMediaRelay#Promise<MultiRoomMediaRelayResult[]>#MultiRoomMediaRelayInfo"),eV=FN("Client$addRelayClient#Client#string"),tV=ZN("Client$stopRelayClient#Promise<void>#string"),rV=FN("Client$enableCommandMsg#boolean#boolean"),nV=FN("Client$renewSignature#boolean#ctime#signature"),iV=function(e){function t(e,r){var n;a(this,t);n=f(this,t,[{logger:!0,stat:!0,emitter:!0,config:e}]),o(h(n),"status",ox.Idle),o(h(n),"localRejoinFlag",!1),o(h(n),"resolutionChangeInfo",{mainResolutionChangeTimer:null,auxResolutionChangeTimer:null,preVideoHeight:new Map}),o(h(n),"sfuConfigs",{}),n.stat.setDeviceStatusInfo(),n.stat.setDeviceUserAgent(),n.clientSymbol=Symbol("".concat(uV,"_").concat(xD.getSequence())),r&&(n.mainRelayRoomSymbol=r),n.locker=new DN,n.roomId="",n.clientConfig=e,n.userInfo=void 0,n.waitConfigCallbackFunc=void 0,n.topNAudioVolume=100,n.audioPolicy=$x.USER_SUBSCRIBE_AUDIOPOLICY,n.connectState={prevState:"DISCONNECTED",curState:"DISCONNECTED"},n.logger.info(uV,"HRTC VERSION = ".concat(Ux,", userAgent = ").concat(navigator.userAgent)),n.top3VolumeUserIds=[],uN.initDeviceChangedNotify(n.eventEmitter,!1),n.accessManager=new zj(n.logger),n.lastCycleFrameDecodedMap=new Map,n.streamInterruptedUsersMap=new Map,n.streamDetectionCriterion=0,n.audioStreams4TopN=new pj,n.downLinkData=null,n.upLinkData=null,n.preNetQuality=null,n.remoteUserManager=new tU(h(n)),n.stat.setRemoteUserManager(n.remoteUserManager),n.connectionsManager=new Wj(n.logger,n.stat,n.eventEmitter),n.streamPublishManager=new mj,n.audioLevelInterval=1e3,n.isLoopRejoining=!1,n.upStreamData=null,n.sdpRepInfo=null,n.startupQoSMap=new Map,n.initReport4WindowEvent(),n.cmdMsgAbility={enable:!1,cmdManager:null,msgFormat:px.STRING},n.roomStreamStatus={},n.isSignatureExpired=!1,n.pktsLostRate={up:0,down:0,preDownRate:[],preRTT:0};return n}p(t,e);return u(t,[{key:"destroyClient",value:function e(){this.lastCycleFrameDecodedMap.clear(),this.streamInterruptedUsersMap.clear(),this.startupQoSMap.clear(),this.resetConnection(),this.logger.clearLogs(),AI.deleteLogger(this.identifiedID)}},{key:"initReport4WindowEvent",value:function e(){window.onunload=()=>{var e,t;const r=SI.getCurrentTimestamp();null===(e=this.stat)||void 0===e||e.recordCallbackInfoBeacon("window-onunload",null===(t=this.getInfo())||void 0===t?void 0:t.moduleName,r,r,{event:"window-onunload"},(e=>["object","function"].includes(typeof e)&&e.getStatInfo?JSON.stringify(e.getStatInfo()):JSON.stringify(e||{})))},window.onbeforeunload=()=>{var e,t;const r=SI.getCurrentTimestamp();null===(e=this.stat)||void 0===e||e.recordCallbackInfoBeacon("window-onbeforeunload",null===(t=this.getInfo())||void 0===t?void 0:t.moduleName,r,r,{event:"window-onbeforeunload"},(e=>["object","function"].includes(typeof e)&&e.getStatInfo?JSON.stringify(e.getStatInfo()):JSON.stringify(e||{})))},window.onhashchange=e=>{var t,r;const n=SI.getCurrentTimestamp();null===(t=this.stat)||void 0===t||t.recordCallbackInfoBeacon("window-onhashchange",null===(r=this.getInfo())||void 0===r?void 0:r.moduleName,n,n,{event:"window-onhashchange",newURL:(null==e?void 0:e.newURL)||"",oldURL:(null==e?void 0:e.oldURL)||""},(e=>["object","function"].includes(typeof e)&&e.getStatInfo?JSON.stringify(e.getStatInfo()):JSON.stringify(e||{})))}}},{key:"getSessionStatus",value:function e(){return this.status}},{key:"on",value:function e(r,i){n(t,"on",this,3)([r,i,![lx.VolumeIndicator,lx.TransportStats].includes(r.toString())])}},{key:"off",value:function e(r,i){n(t,"off",this,3)([r,i,![lx.VolumeIndicator,lx.TransportStats].includes(r.toString())])}},{key:"getSymbol",value:function e(){return this.identifiedID}},{key:"getInfo",value:function e(){var t,r;return{moduleName:"Client",appId:this.clientConfig.appId,roomId:this.roomId,userName:null===(t=this.userInfo)||void 0===t?void 0:t.userName,userId:null===(r=this.userInfo)||void 0===r?void 0:r.userId,domain:this.clientConfig.domain,upStreamData:this.upStreamData,sdpRepInfo:this.sdpRepInfo,countryCode:this.clientConfig.countryCode}}},{key:"enableTopThreeAudioMode",value:function e(t){return this.enableTopThreeAudioModeImpl(t)}},{key:"enableTopThreeAudioModeImpl",value:function e(t){let r=!1;return t&&this.status===ox.Idle&&(this.audioPolicy=$x.TOPN_AUDIOPOLICY,r=!0),r}},{key:"switchAudioMode",value:async function e(t){try{if(t!==eL.TOPN_AUDIOPOLICY&&t!==eL.USER_SUBSCRIBE_AUDIOPOLICY)throw this.logger.error(uV,"audioMode is invalid"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);return t%=2,this.logger.info(uV,"switchAudioMode start, new audioPolicy: ".concat(t,", original audioPolicy: ").concat(this.audioPolicy)),this.status===ox.Joined&&(t===$x.USER_SUBSCRIBE_AUDIOPOLICY&&this.audioPolicy===$x.TOPN_AUDIOPOLICY?(this.audioPolicy=t,await this.switchAudioPolicyTop2User()):t===$x.TOPN_AUDIOPOLICY&&this.audioPolicy===$x.USER_SUBSCRIBE_AUDIOPOLICY&&(this.audioPolicy=t,await this.switchAudioPolicyUser2Top(),this.top3VolumeUserIds&&this.top3VolumeUserIds.length>0&&this.eventEmitter.emit(lx.VolumeIndicator,{userVolumeInfos:this.top3VolumeUserIds}))),this.stat.getMediaStat().setAudioPolicy(this.audioPolicy),this.audioPolicy===$x.USER_SUBSCRIBE_AUDIOPOLICY?eL.USER_SUBSCRIBE_AUDIOPOLICY:eL.TOPN_AUDIOPOLICY}catch(e){this.logger.error(uV,"switchAudioMode, audioPolicy: ".concat(t,", error: ").concat(e))}return this.audioPolicy}},{key:"switchAudioPolicyTop2User",value:async function e(){await this.signal.changeAudioPolicy($x.USER_SUBSCRIBE_AUDIOPOLICY),await this.unsubscribeAudio4Top();const t=this.remoteUserManager.getAllUserStreamsByType(this.roomId,null,Qx.TRACK_TYPE_VIDEO);for(const e of t){const t=e.mainStream.tracks;for(const e of t)e.isSubscribed&&await this.resubscribeUserAudio()}}},{key:"resubscribeUserAudio",value:async function e(){this.logger.info(uV,"resubscribeUserAudio start");const t=this.remoteUserManager.resubscribeMainStreamAudio(this.roomId);await this.updateSubscribe(t),null==t||t.forEach((e=>{var t,r,n,i;(null===(t=e.mainStream)||void 0===t||null===(r=t.tracks4Subscribe)||void 0===r?void 0:r.length)>0&&(null===(n=e.mainStream)||void 0===n||null===(i=n.remoteStream)||void 0===i||i.rePlayAudio())}))}},{key:"switchAudioPolicyUser2Top",value:async function e(){await this.unsubscribeAudio4SubscribeUsers(),await this.signal.changeAudioPolicy($x.TOPN_AUDIOPOLICY),this.remoteUserManager.enableTopThreeAudioMode(this.roomId),await this.connectionsManager.generateAndSetOfferSdpByHandler(qx.STREAM_TYPE_MAIN),await this.connectionsManager.generateAndSetAnswerSdpByHandler(qx.STREAM_TYPE_MAIN,this.addSsrc4Top3.bind(this))}},{key:"unsubscribeAudio4SubscribeUsers",value:async function e(){this.logger.info(uV,"unsubscribeAudio4SubscribeUsers start");const t=this.remoteUserManager.unsubscribeAllMainStreamAudio(this.roomId);await this.updateSubscribe(t)}},{key:"unsubscribeAudio4Top",value:async function e(){await this.unsubscribeUsersAudio()}},{key:"unsubscribeAudio4SubscribeAll",value:async function e(){await this.unsubscribeUsersAudio()}},{key:"unsubscribeUsersAudio",value:async function e(){const t=[];for(const e of this.audioStreams4TopN.getAudioStreams()){const r=e.ssrc;this.audioStreams4TopN.close(e.streamId),this.logger.info(uV,"delete audio ssrc:".concat(r)),t.push(r)}t.length>0&&await this.connectionsManager.deleteUser(qx.STREAM_TYPE_MAIN,null,t)}},{key:"getLocalAudioStats",value:async function e(){const t=new Map,r=this.streamPublishManager.getPublishedMainAudioTrackInfo();if(!r)return this.logger.error(uV,"local stream has not published yet."),t;if("function"!=typeof r.sender.getStats)return this.logger.error(uV,"audio rtpsender is not support getStat"),t;const n={bytesSent:0,packetsSent:0},i=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN),o=this.userInfo.userId||(null==i?void 0:i.getUserId()),a=tN.getLatestStats(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(GP,"_").concat(r.ssrc));return a&&(n.bytesSent=a.bytesSent,n.packetsSent=a.packetsSent,t.set(o,n)),t}},{key:"getLocalVideoStats",value:async function e(){const t=new Map,r={mainStream:[],subStream:null};let n=null,i=null;const o=this.streamPublishManager.getMainStreamVideoPublishInfo();if(o){const e=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN),i=this.userInfo.userId||(null==e?void 0:e.getUserId());for(const e of o){n={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0};const o=tN.getLatestStats(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(ZP,"_").concat(e.ssrc));o&&(n.bytesSent=SI.getValue(o.bytesSent,0),n.packetsSent=SI.getValue(o.packetsSent,0),n.framesEncoded=SI.getValue(o.framesEncoded,0),n.framesSent=SI.getValue(o.framesSent,0),n.frameWidth=SI.getValue(o.frameWidth,0),n.frameHeight=SI.getValue(o.frameHeight,0),t.has(i)?t.get(i).mainStream.push(n):(r.mainStream.push(n),t.set(i,r)))}}else this.logger.debug(uV,"have no local mainstream collect stats");const a=this.streamPublishManager.getPublishedAuxVideoTrackInfo();if(a&&"function"==typeof a.sender.getStats){const e=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN),n=this.userInfo.userId||(null==e?void 0:e.getUserId());i={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0};const o=tN.getLatestStats(this.userInfo.roomId,qx.STREAM_TYPE_AUX,"".concat(ZP,"_").concat(a.ssrc));o&&(i.bytesSent=SI.getValue(o.bytesSent,0),i.packetsSent=SI.getValue(o.packetsSent,0),i.framesEncoded=SI.getValue(o.framesEncoded,0),i.framesSent=SI.getValue(o.framesSent,0),i.frameWidth=SI.getValue(o.frameWidth,0),i.frameHeight=SI.getValue(o.frameHeight,0),t.has(n)?t.get(n).subStream=i:(r.subStream=i,t.set(n,r)))}else this.logger.debug(uV,"have no local substream collect stats");return t}},{key:"getRemoteAudioStats",value:async function e(){const t=new Map,r=this.remoteUserManager.getAllUserStreamsByType(this.roomId,qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO),n=this.connectionsManager.getReceivers(qx.STREAM_TYPE_MAIN);if(!n||0===n.length)return this.logger.error(uV,"getRemoteAudioStats, peerConnection is not support getReceivers"),t;for(const e of r){const r=e.userId;if(e.mainStream)for(const n of e.mainStream.tracks){const e={bytesReceived:0,packetsReceived:0,packetsLost:0},i=tN.getLatestStats(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(WP,"_").concat(n.cssrc));r&&i&&(e.bytesReceived=SI.getValue(i.bytesReceived,0),e.packetsReceived=SI.getValue(i.packetsReceived,0),e.packetsLost=SI.getValue(i.packetsLost,0),this.connectionsManager.calcChangedStatistic(i.id,e,["bytesReceived","packetsReceived","packetsLost"]),t.set(r,e))}}return t}},{key:"getRemoteVideoStats",value:async function e(){const t=new Map,r=this.remoteUserManager.getAllUserStreamsByType(this.roomId,null,Qx.TRACK_TYPE_VIDEO);for(const e of r)e.mainStream&&await this.getRemoteVideoTracksStatistic(e.userId,qx.STREAM_TYPE_MAIN,!1,e.mainStream.tracks,t),e.auxStream&&await this.getRemoteVideoTracksStatistic(e.userId,qx.STREAM_TYPE_AUX,!0,e.auxStream.tracks,t);return t}},{key:"isSendingStream",value:function e(){var t,r;const n=(null===(t=this.connectionsManager.getSenders(qx.STREAM_TYPE_MAIN))||void 0===t?void 0:t.length)>0,i=(null===(r=this.connectionsManager.getSenders(qx.STREAM_TYPE_AUX))||void 0===r?void 0:r.length)>0;return n||i}},{key:"isReceivingStream",value:function e(){var t,r;const n=(null===(t=this.connectionsManager.getReceivers(qx.STREAM_TYPE_MAIN))||void 0===t?void 0:t.length)>0,i=(null===(r=this.connectionsManager.getReceivers(qx.STREAM_TYPE_AUX))||void 0===r?void 0:r.length)>0;return n||i}},{key:"getRemoteVideoTracksStatistic",value:async function e(t,r,n,i,o){if(i&&0!==i.length)for(const e of i){const i=tN.getLatestStats(this.userInfo.roomId,n?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,"".concat(BP,"_").concat(e.cssrc));if(!i)continue;const a={streamId:e.trackId,bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0,frameWidth:0,frameHeight:0,frameRate:0,frameDropped:0};if(a.bytesReceived=SI.getValue(i.bytesReceived,0),a.packetsReceived=SI.getValue(i.packetsReceived,0),a.packetsLost=SI.getValue(i.packetsLost,0),a.framesDecoded=SI.getValue(i.framesDecoded,0),a.frameDropped=SI.getValue(i.framesDropped,0),a.frameRate=SI.getValue(i.framesPerSecond,0),a.frameWidth=i.frameWidth,a.frameHeight=i.frameHeight,this.connectionsManager.calcChangedStatistic(i.id,a,["bytesReceived","packetsReceived","packetsLost","framesDecoded"]),a.frameWidth&&a.frameHeight){const e=i.trackId;if(e){const t=tN.getLatestStats(this.userInfo.roomId,n?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN,e)||{frameWidth:0,frameHeight:0};a.frameWidth=t.frameWidth,a.frameHeight=t.frameHeight}}if(o.has(t))r===qx.STREAM_TYPE_AUX?o.get(t).subStream=a:o.get(t).mainStream.push(a);else{const e={mainStream:[],subStream:null};r===qx.STREAM_TYPE_AUX?e.subStream=a:e.mainStream.push(a),o.set(t,e)}}}},{key:"getDownloadStatistic",value:async function e(t){const r=new Map,n=this.remoteUserManager.getAllUserStreamsByType(this.roomId,null,t);for(const e of n)await this.getTrackDownloadStatistic([...e.mainStream.tracks,...e.auxStream.tracks],r);if(0===r.size)return this.downLinkData=null,-1;let i=0,o=0,a=0;for(const[e,t]of r)if(this.downLinkData&&this.downLinkData.has(e)){const r=t.packetsReceived-this.downLinkData.get(e).packetsReceived;r>0&&(o+=r,i+=Math.max(t.packetsLost-this.downLinkData.get(e).packetsLost,0),a+=Math.max(t.nackCount-this.downLinkData.get(e).nackCount,0))}else o+=t.packetsReceived,i+=t.packetsLost,a+=t.nackCount;let s=0;if(o<=0)s=-1;else{let e=1e3*this.connectionsManager.getConnectionRTT();e?this.pktsLostRate.preRTT=e:e=this.pktsLostRate.preRTT,s=e<=40?100*a/(a+o):e<=60?.9*a*100/(.9*a+o):e<=100?.8*a*100/(.8*a+o):e<=150?.7*a*100/(.7*a+o):.6*a*100/(.6*a+o),s=Math.min(Math.max(100*i/(i+o),s),100)}return this.downLinkData=r,this.logger.debug(uV,"downLinkData packetsLost:".concat(i,", packetsReceived:").concat(o,",rate:").concat(s)),s}},{key:"getTrackDownloadStatistic",value:async function e(t,r){for(const e of t){const t=e.type===Qx.TRACK_TYPE_VIDEO?"".concat(BP):"".concat(WP),n=tN.getLatestStats(this.userInfo.roomId,e.streamType,"".concat(t,"_").concat(e.cssrc)),i={packetsReceived:0,packetsLost:0,nackCount:0};n&&(i.packetsReceived=SI.getValue(n.packetsReceived,0),i.packetsLost=SI.getValue(n.packetsLost,0),i.nackCount=SI.getValue(n.nackCount,0),this.connectionsManager.calcChangedStatistic(n.id,i),r.set(e.cssrc.toString(),i))}}},{key:"getUploadStatistic",value:async function e(r){var n,i;const o=this.streamPublishManager.getPublishedMainVideoTrackInfo(),a=this.streamPublishManager.getPublishedMainAudioTrackInfo(),s=this.streamPublishManager.getPublishedAuxVideoTrackInfo();if(!o&&!a&&!s)return-1;const u={packetsLost:0,packetsSent:0,fractionLost:0},c=r===Qx.TRACK_TYPE_VIDEO?"".concat(ZP):"".concat(GP),l=r===Qx.TRACK_TYPE_VIDEO?(null==o?void 0:o.ssrc)||(null==s?void 0:s.ssrc):null==a?void 0:a.ssrc;if(l){const e=tN.getLatestStats(this.userInfo.roomId,t.getSenderType(r,o),"".concat(c,"_").concat(l));if(e&&(u.packetsSent=SI.getValue(e.packetsSent,0),e.remoteId)){const e=r===Qx.TRACK_TYPE_VIDEO?"".concat(HP):"".concat(FP),n=tN.getLatestRemoteInboundStats(this.userInfo.roomId,t.getSenderType(r,o),"".concat(e,"_").concat(l));u.packetsLost=SI.getValue(null==n?void 0:n.packetsLost,0),u.fractionLost=SI.getValue(null==n?void 0:n.fractionLost,0)}}let f=0,d=0;this.upLinkData?(d=u.packetsSent-this.upLinkData.packetsSent,f=u.packetsLost-this.upLinkData.packetsLost):(d=u.packetsSent,f=u.packetsLost);const h=(null===(n=this.upLinkData)||void 0===n?void 0:n.deltaPacketsSend)||0,p=(null===(i=this.upLinkData)||void 0===i?void 0:i.deltaPacketsLost)||0;this.upLinkData=u,f<=0?(d=h||this.upLinkData.packetsSent,f=p||this.upLinkData.packetsLost):(this.upLinkData.deltaPacketsSend=d,this.upLinkData.deltaPacketsLost=f);const v=d>0?Math.max(f/d*100,100*(u.fractionLost||0)):-1;return this.logger.debug(uV,"upLinkData packetsLost:".concat(u.packetsLost," ").concat(f," ").concat(100*(u.fractionLost||0),", packetssend:").concat(d,", rate:").concat(v)),v}},{key:"getConnectionState",value:function e(){return this.connectState.curState}},{key:"getTransportStats",value:async function e(){const t=this.stat.getMediaStat().getTransportMediaStats(),r=this.streamPublishManager.getPublishedMainVideoTrackInfo();if(r){const e=tN.getLatestStats(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(HP,"_").concat(r.ssrc))||{};t.rtt=1e3*(e.roundTripTime||0)}else t.rtt=1e3*this.connectionsManager.getConnectionRTT();return t.upPktsLostRate=this.pktsLostRate.up,t.downPktsLostRate=this.pktsLostRate.down,t}},{key:"transportStatsRegularReport",value:function e(){clearTimeout(this.transportStatsTimer),this.transportStatsTimer=setTimeout((()=>{clearTimeout(this.transportStatsTimer),this.calcPktsLostRate().then((async()=>{const e=await this.getTransportStats();if(e.downVideoStreams=await this.getRemoteVideoStats(),this.predownVideoStreams)for(const o of e.downVideoStreams.keys()){var t;for(const t of(null===(r=e.downVideoStreams.get(o))||void 0===r?void 0:r.mainStream)||[]){var r,n;const e=((null===(n=this.predownVideoStreams.get(o))||void 0===n?void 0:n.mainStream)||[]).find((e=>e.streamId===t.streamId));t.bitrate=e?8*Math.max(t.bytesReceived-e.bytesReceived,0):t.bytesReceived,t.frameRate=t.frameRate||(e?Math.max(t.framesDecoded-e.framesDecoded,0):t.framesDecoded)}const a=null===(t=e.downVideoStreams.get(o))||void 0===t?void 0:t.subStream;if(a){var i;const e=null===(i=this.predownVideoStreams.get(o))||void 0===i?void 0:i.subStream;a.bitrate=e?8*Math.max(a.bytesReceived-e.bytesReceived,0):a.bytesReceived,a.frameRate=a.frameRate||(e?Math.max(a.framesDecoded-e.framesDecoded,0):a.framesDecoded)}}else for(const t of e.downVideoStreams.keys()){var o;for(const r of(null===(a=e.downVideoStreams.get(t))||void 0===a?void 0:a.mainStream)||[]){var a;r.bitrate=0}const r=null===(o=e.downVideoStreams.get(t))||void 0===o?void 0:o.subStream;r&&(r.bitrate=0)}this.predownVideoStreams=e.downVideoStreams,this.eventEmitter.emit(lx.TransportStats,e)})).finally(this.transportStatsRegularReport.bind(this,this.predownVideoStreams))}),1e3)}},{key:"getICETransportStat",value:function e(t){return this.connectionsManager.getICETransportStat(t)}},{key:"cleanTransportStats",value:function e(){this.stat.clearMediaStatBytes()}},{key:"setNetworkBandwidth",value:function e(t){if((null==t?void 0:t.maxBandwidth)<ax.MIN_BAND_WIDTH||(null==t?void 0:t.maxBandwidth)>ax.MAX_BAND_WIDTH)throw this.logger.info(uV,"MaxBandWidth Limits [3072Kpbs, 51200Kpbs]"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);this.bandwidthParam={maxBandwidth:1e3*(null==t?void 0:t.maxBandwidth)||ax.DEFAULT_BANDWIDTH_4M}}},{key:"join",value:async function e(t,r){return await this.joinImpl(t,r)}},{key:"joinImpl",value:async function e(t,r){AI.addPrivacyString(null==r?void 0:r.userId),AI.addPrivacyString(null==r?void 0:r.userName),AI.addPrivacyString(null==r?void 0:r.signature),this.logger.info(uV,"join room roomId:".concat(t," userId:").concat(r.userId," role:").concat(r.role));const n=[];let i="";this.roomId=t;try{var o,a,s,u;if(this.status!==ox.Idle)throw this.logger.error(uV,"room status error!"),this.stat.reportJoinInfo(mx.ROOM_NOT_AVAILABLE,void 0,!1,void 0,"room status error!"),new oc(nc.RTC_ERR_CODE_STATUS_ERROR);PM.checkJoinParams(t,r),this.mainRelayRoomSymbol&&aU.roleValidCheck4RelayRoom(this,r.role);const e=FD.init(this.identifiedID,t,r);this.userInfo=e;const c=await this.accessManager.getAccessInfo(this.clientConfig.countryCode,n);this.stat.getMediaStat().setAudioPolicy(this.audioPolicy),this.stat.setLocalUserInfo(e),await this.locker.lock("".concat(uV,":joinImpl")),this.newSignal(c),this.signalEvent(),this.status=ox.Joining,i=await this.signal.connect(e,n),this.logger.info(uV,"joinImpl, actualAcsIp:".concat(i)),await this.waitNotifyConfig(n);const l={fecEnable:!1};await this.connectionsManager.initConnectionAndSdp(this.roomId,qx.STREAM_TYPE_MAIN,{onTrackHandler:this.onTrackHandler.bind(this)},!1,l),await this.connectionsManager.initConnectionAndSdp(this.roomId,qx.STREAM_TYPE_AUX,{onTrackHandler:this.onTrackHandler.bind(this)}),this.adjustSfuConfigWithFec(l.fecEnable);const f=await this.connectionsManager.modifySdpInfo(qx.STREAM_TYPE_MAIN,this.cmdMsgAbility.enable),d=await this.connectionsManager.modifySdpInfo(qx.STREAM_TYPE_AUX),h=await this.signal.join(this.userInfo,f,d,this.audioPolicy,null===(o=this.bandwidthParam)||void 0===o?void 0:o.maxBandwidth,this.connectionsManager.getPortType(),this.cmdMsgAbility.enable,this.sfuConfigs);!this.clientConfig.countryCode&&h.countryCode&&this.accessManager.setOpsUrl(h.countryCode),this.sdpRepInfo=h.sdp,h.userInfos.forEach((e=>{this.stat.getMediaStat().setEncryInfo(e.userId,e.userEid)})),null!=h&&h.userEid&&this.stat.getMediaStat().setEncryInfo(this.userInfo.userId,h.userEid.toString());const p=String(h.roomUid);this.stat.setRoomUid(p);const v=null===(a=h.roomStreamStatus)||void 0===a?void 0:a.audience;let m;m=this.audioPolicy===$x.TOPN_AUDIOPOLICY?async e=>{let{remoteDescription:t,bindCryptoKey:r,wsUrl:n,dataChannelEnable:i}=e;return await this.negTransportChannelHandler(h,r,n,i),v===vx.PAUSE&&this.userInfo.role===VD?{answerSdp:t}:await this.addSsrc4Top3(t)}:async e=>{let{remoteDescription:t,bindCryptoKey:r,wsUrl:n,dataChannelEnable:i}=e;return await this.negTransportChannelHandler(h,r,n,i),{answerSdp:t}};const y=null===(s=h.negSdp.find((e=>e.type===ij.MAIN)))||void 0===s?void 0:s.sdp,g=null===(u=h.negSdp.find((e=>e.type===ij.DESKTOP)))||void 0===u?void 0:u.sdp;this.connectionsManager.setSsrcsMapping(this.sdpRepInfo),await this.connectionsManager.handleAnswerSdpFromServer(qx.STREAM_TYPE_MAIN,y,m),await this.connectionsManager.handleAnswerSdpFromServer(qx.STREAM_TYPE_AUX,g),await this.handleRoomStreamStatus(v),this.upStreamData=h.userInfos.find((e=>{var t;return e.userId===(null===(t=this.userInfo)||void 0===t?void 0:t.userId)})),this.remoteUserManager.initialize(this.userInfo.userId,h.sdp),this.stat.setSFUAddress(this.connectionsManager.getSfuInfoFromSdp(y,g)),this.signal.keepAlive(),this.status=ox.Joined,this.logger.info(uV,"join room success"),this.streamPublishManager.setSdpRepInfo(this.sdpRepInfo),this.statJoinRoomInfo(i,!1,n),this.cleanNetworkStatistic(),this.netQualityRegularReport(),this.cleanTransportStats(),this.transportStatsRegularReport(),this.setAudioLevelStatTimer(),aU.addConnectionCache(this.mainRelayRoomSymbol||this.clientSymbol,this.roomId,this),await this.doRefreshRoomUserInfos(this.userInfo.roomId,h.userInfos,!1),this.locker.unlock("".concat(uV,":joinImpl"))}catch(e){throw this.locker.unlock("".concat(uV,":joinImpl")),this.logger.error(uV,"join occur error: ".concat(e)),this.cleanup(),this.stat.reportJoinInfo(null==e?void 0:e.code,i,!1,n,null==e?void 0:e.message),await iU.uploadLogFile(this),e instanceof oc?e:new oc(nc.RTC_ERR_CODE_RTC_SDK_ERROR,null==e?void 0:e.message)}}},{key:"adjustSfuConfigWithFec",value:function e(t){this.sfuConfigFec=t?this.sfuConfigFec:0,this.sfuConfigs.webFlexfec03=this.sfuConfigFec}},{key:"reportLogs",value:function e(){iU.uploadLogFile(this).then((()=>{this.eventEmitter.emit(lx.LogUploaded,{status:200})})).catch((e=>{this.logger.error(uV,"reportLogs occur error: ".concat(e)),this.eventEmitter.emit(lx.LogUploaded,{status:500})}))}},{key:"statJoinRoomInfo",value:function e(t,r,n){this.stat.reportJoinInfo(0,t,r,n,""),this.stat.getMediaStat().setConnectionsManager(this.connectionsManager),tN.addConnection(this.userInfo.roomId,this.connectionsManager),this.stat.getMediaStat().setLocalMainStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedMainStreamInfos()),this.stat.getMediaStat().setLocalAuxsStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedAuxStreamInfo()),this.stat.startMediaCollector()}},{key:"enableRtcStats",value:async function e(t,r){return await this.enableRtcStatsImpl(t,r)}},{key:"enableRtcStatsImpl",value:async function e(t,r){if(this.status!==ox.Joined)throw this.logger.error(uV,"cannot enableRtcStats before join room"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"cannot enableRtcStats before join room");if(!t)return clearTimeout(this.rtcStatsInterval),this.rtcStatsInterval=null,void this.logger.info(uV,"enableRtcStats is disable");if(!Number.isInteger(r)||r<100)throw this.logger.error(uV,"invalid interval"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(t&&this.rtcStatsInterval)throw this.logger.error(uV,"enableRtcStats has been invoked, no need do again"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"enableRtcStats has been invoked, no need do again");return this.rtcStatsCriterion=r,this.doEnableRtcStats()}},{key:"doEnableRtcStats",value:async function e(){let t=0;const r=()=>{this.rtcStatsInterval=setTimeout((async()=>{const e=(await this.stat.buildRtcStatsDebugInfo(this.rtcStatsCriterion/1e3)).mediaStatsDebugInfo;this.doTriggerRtcStats(e,t),t++,r()}),0===t?0:this.rtcStatsCriterion)};r()}},{key:"doTriggerRtcStats",value:function e(t,r){if(0===r)return;if(!t||0==t.length)return;const n=[];t.forEach((e=>{if(!e.event)return;const t=e.streams||[];switch(e.event){case kx.QoS_UP_STREAM_VIDEO:this.addRtcStatInfos(t,!1,Qx.TRACK_TYPE_VIDEO,n);break;case kx.QoS_UP_STREAM_AUDIO:this.addRtcStatInfos(t,!1,Qx.TRACK_TYPE_AUDIO,n,ex.main);break;case kx.QoS_AUX_UP_STREAM_VIDEO:this.addRtcStatInfos(t,!1,Qx.TRACK_TYPE_VIDEO,n,ex.desktop);break;case kx.QoS_DOWN_STREAM_VIDEO:this.addRtcStatInfos(t,!0,Qx.TRACK_TYPE_VIDEO,n);break;case kx.QoS_DOWN_STREAM_AUDIO:this.addRtcStatInfos(t,!0,Qx.TRACK_TYPE_AUDIO,n,ex.main);break;case kx.QoS_AUX_DOWN_STREAM_VIDEO:this.addRtcStatInfos(t,!0,Qx.TRACK_TYPE_VIDEO,n,ex.desktop);break;default:this.logger.debug(uV,"".concat(e.event," no need stats"))}})),this.connectState.curState===YP[KP.CONNECTED]&&n.length>0&&this.eventEmitter.emit(lx.RtcStats,n)}},{key:"addRtcStatInfos",value:function e(t,r,n,i,o){let a={};const s=this.userInfo.userName||this.userInfo.userId;for(let e=0;e<t.length;e++){var u,c,l;a.isRemote=r,a.mediaType=n,a.bitrate=(null===(u=t[e])||void 0===u?void 0:u.bit_rate)||0,a.jitter=(null===(c=t[e])||void 0===c?void 0:c.jitter)||0,a.pktLossRate=(null===(l=t[e])||void 0===l?void 0:l.pkt_loss)||0;let _=null;var f,d,h,p,v,m,y;if(r)_=this.remoteUserManager.getUserInfoByStreamId(this.roomId,"".concat(null===(f=t[e])||void 0===f?void 0:f.stream_uid)),a.userName=(null===(d=_)||void 0===d||null===(h=d.userInfo)||void 0===h?void 0:h.nickname)||(null===(p=_)||void 0===p||null===(v=p.userInfo)||void 0===v?void 0:v.userId)||"remoteTop3";else a.userName=s,a.rtt=(null===(m=t[e])||void 0===m?void 0:m.rtt)||0;if(o)a.streamType=o;else if(n===Qx.TRACK_TYPE_VIDEO){var g,b;if(r)a.streamType="main"===(null===(g=_)||void 0===g||null===(b=g.mainStream)||void 0===b?void 0:b.remoteTrackInfos.get(t[e].stream_uid.toString()).content)?ex.main:ex.slides;else a.streamType="".concat(t[e].ssrc_uid.split("-")[0])==="".concat(this.sdpRepInfo.video.sendSsrcBegin)?ex.main:ex.slides}if(n!==Qx.TRACK_TYPE_AUDIO)a.frameRate=(null===(y=t[e])||void 0===y?void 0:y.frame_rate)||0;i.push(a),a={}}}},{key:"leave",value:async function e(){return await this.leaveImpl()}},{key:"leaveImpl",value:async function e(){return new Promise(((e,t)=>{this.logger.info(uV,"leave room"),this.status!==ox.Joined&&this.status!==ox.Rejoining?t(new oc(nc.RTC_ERR_CODE_STATUS_ERROR)):(this.status=ox.Leaving,this.signal.leave().then((()=>{this.stat.reportLeavInfo(yx.LEAVE_ROOM_SUCCESS)})).catch((()=>{this.stat.reportLeavInfo(yx.LEAVE_ROOM_ERROR)})).finally((()=>{this.doLeaveRoom(),this.stat.getMediaStat().clearEncryUserId(),this.stopStreamResolutionDetection(),this.logger.info(uV,"leave success"),e()})))}))}},{key:"doLeaveRoom",value:function e(){this.cleanup(),this.cleanTransportStats(),this.stat.leaveRoom(),DM.immediateReportRecords(),this.roomStreamStatus={}}},{key:"resetConnection",value:function e(){const t=[],r=this.streamPublishManager.getPublishedMainVideoTrackInfo();r&&t.push(r.sender);const n=this.streamPublishManager.getPublishedMainAudioTrackInfo();n&&t.push(n.sender),this.connectionsManager.destroyPeerConnection(qx.STREAM_TYPE_MAIN,t);const i=this.streamPublishManager.getPublishedAuxVideoTrackInfo();this.connectionsManager.destroyPeerConnection(qx.STREAM_TYPE_AUX,i?[i.sender]:[])}},{key:"rejoin",value:async function e(t,r){this.logger.info(uV,"rejoin room roomId:".concat(t," JoinConfig:").concat(JSON.stringify(r)));const n=[];let i="";this.roomId=t;try{var o,a,s,u;PM.checkJoinParams(t,r),this.mainRelayRoomSymbol&&aU.roleValidCheck4RelayRoom(this,r.role);const e=FD.init(this.identifiedID,t,r);if(this.userInfo=e,this.stat.setLocalUserInfo(e),this.resetConnection(),this.streamPublishManager.reset(),clearTimeout(this.netQualityTimer),clearTimeout(this.transportStatsTimer),this.signal)this.signal.reset();else{const e=await this.accessManager.getAccessInfo(this.clientConfig.countryCode,n);this.newSignal(e),this.signalEvent()}this.status=ox.Joining,i=await this.signal.connect(e,n),this.logger.info(uV,"rejoin, actualAcsIp:".concat(i)),await this.waitNotifyConfig(n);const c={fecEnable:!1};await this.connectionsManager.initConnectionAndSdp(this.roomId,qx.STREAM_TYPE_MAIN,{onTrackHandler:this.onTrackHandler.bind(this)},!1,c),await this.connectionsManager.initConnectionAndSdp(this.roomId,qx.STREAM_TYPE_AUX,{onTrackHandler:this.onTrackHandler.bind(this)});const l=await this.connectionsManager.modifySdpInfo(qx.STREAM_TYPE_MAIN,this.cmdMsgAbility.enable),f=await this.connectionsManager.modifySdpInfo(qx.STREAM_TYPE_AUX),d=await this.signal.join(this.userInfo,l,f,this.audioPolicy,null===(o=this.bandwidthParam)||void 0===o?void 0:o.maxBandwidth,this.connectionsManager.getPortType(),this.cmdMsgAbility.enable,this.sfuConfigs);!this.clientConfig.countryCode&&d.countryCode&&this.accessManager.setOpsUrl(d.countryCode),this.sdpRepInfo=d.sdp,d.userInfos.forEach((e=>{this.stat.getMediaStat().setEncryInfo(e.userId,e.userEid)})),null!=d&&d.userEid&&this.stat.getMediaStat().setEncryInfo(this.userInfo.userId,d.userEid.toString());const h=String(d.roomUid);this.stat.setRoomUid(h);const p=null===(a=d.roomStreamStatus)||void 0===a?void 0:a.audience;let v;v=this.audioPolicy===$x.TOPN_AUDIOPOLICY?async e=>{let{remoteDescription:t,bindCryptoKey:r,wsUrl:n,dataChannelEnable:i}=e;return await this.negTransportChannelHandler(d,r,n,i),p===vx.PAUSE&&this.userInfo.role===VD?{answerSdp:t}:await this.addSsrc4Top3(t)}:async e=>{let{remoteDescription:t,bindCryptoKey:r,wsUrl:n,dataChannelEnable:i}=e;return await this.negTransportChannelHandler(d,r,n,i),{answerSdp:t}};const m=null===(s=d.negSdp.find((e=>e.type===ij.MAIN)))||void 0===s?void 0:s.sdp,y=null===(u=d.negSdp.find((e=>e.type===ij.DESKTOP)))||void 0===u?void 0:u.sdp;this.connectionsManager.setSsrcsMapping(this.sdpRepInfo),await this.connectionsManager.handleAnswerSdpFromServer(qx.STREAM_TYPE_MAIN,m,v),await this.connectionsManager.handleAnswerSdpFromServer(qx.STREAM_TYPE_AUX,y),await this.handleRoomStreamStatus(p),this.upStreamData=d.userInfos.find((e=>{var t;return e.userId===(null===(t=this.userInfo)||void 0===t?void 0:t.userId)})),this.remoteUserManager.initialize(this.userInfo.userId,d.sdp),this.stat.setSFUAddress(this.connectionsManager.getSfuInfoFromSdp(m,y)),this.signal.keepAlive(),this.status=ox.Joined,this.localRejoinFlag=!0,this.streamPublishManager.setSdpRepInfo(this.sdpRepInfo),this.statJoinRoomInfo(i,!0,n),this.cleanNetworkStatistic(),this.netQualityRegularReport(),this.cleanTransportStats(),this.transportStatsRegularReport(),this.setAudioLevelStatTimer(),aU.addConnectionCache(this.mainRelayRoomSymbol||this.clientSymbol,this.roomId,this),await this.doRefreshRoomUserInfos(this.userInfo.roomId,d.userInfos,!0),this.logger.info(uV,"rejoin, rejoin room success")}catch(e){throw this.logger.error(uV,"rejoin room fail, error:".concat(e)),this.stat.reportJoinInfo(null==e?void 0:e.code,i,!0,n,null==e?void 0:e.message),await iU.uploadLogFile(this),e}}},{key:"changeStreamMuteStatusNotify",value:async function e(t,r,n,i){const o={"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16),videoStreams:[]};if(r===Qx.TRACK_TYPE_VIDEO){const e={ssrc:0,mute:t};if(n===ex.desktop)e.ssrc=this.sdpRepInfo.desktopVideo.sendSsrcBegin;else if(e.ssrc=this.sdpRepInfo.video.sendSsrcBegin,i){const e={ssrc:this.sdpRepInfo.video.sendSsrcEnd,mute:t};o.videoStreams.push(e)}o.videoStreams.push(e)}else{const e={ssrc:this.sdpRepInfo.audio.sendSsrcBegin,mute:t};o.audioStreams=[e]}await this.signal.changeStreamStatus(o)}},{key:"setSendBitrate",value:async function e(t,r,n){if(!t)return void this.logger.info(uV,"sender is null");if("function"!=typeof t.getParameters)return void this.logger.info(uV,"sender not support getParameters");if("function"!=typeof t.setParameters)return void this.logger.info(uV,"sender not support setParameters");const i=t.getParameters();i.encodings.length<=0?this.logger.info(uV,"sender has no track, can not set maxBitRate"):(i.encodings[0].maxBitrate=r,await t.setParameters(i),this.logger.info(uV,"success set ".concat(n," sender maxBitrate: ").concat(r)))}},{key:"calcPktsLostRate",value:async function e(){const t=this.connectionsManager.getConnection(qx.STREAM_TYPE_MAIN);if(!t||["disconnected","failed","closed"].includes(t.connectionState))return;let r=await this.getUploadStatistic("video");if(r<0&&(r=await this.getUploadStatistic("audio")),this.pktsLostRate.up=Math.round(r),r=await this.getDownloadStatistic(Qx.TRACK_TYPE_VIDEO),r<0&&(r=await this.getDownloadStatistic(Qx.TRACK_TYPE_AUDIO)),r<0)return void(this.pktsLostRate.down=-1);this.pktsLostRate.preDownRate.push(r),this.pktsLostRate.preDownRate.length>3&&this.pktsLostRate.preDownRate.splice(0,1);const n=this.smoothData(this.pktsLostRate.preDownRate,.9);this.pktsLostRate.down=Math.round(n[n.length-1])}},{key:"smoothData",value:function e(t,r){const n=e=>e.reduce((function(e,t){return e+t}),0)/e.length,i=n(t)*r,o=[];for(let e=0;e<t.length;e++){const r=t[e],a=e>0?o[e-1]:t[t.length-1],s=e<t.length-1?t[e+1]:t[0],u=Number(n([i,a,r,s]).toFixed(2));o.push(u)}return o}},{key:"netQualityRegularReport",value:function e(){clearTimeout(this.netQualityTimer),this.netQualityTimer=setTimeout((()=>{clearTimeout(this.netQualityTimer);let e={uplinkNetworkQuality:0,downlinkNetworkQuality:0};try{var r,n;const a=this.connectionsManager.getConnection(qx.STREAM_TYPE_MAIN);a&&!["disconnected","failed","closed"].includes(a.connectionState)||(e={uplinkNetworkQuality:rL.NETWORK_QUALITY_DISCONNECT,downlinkNetworkQuality:rL.NETWORK_QUALITY_DISCONNECT});let s=null===(r=this.stat)||void 0===r||null===(n=r.getMediaStat())||void 0===n?void 0:n.getConnectionRemb(!1);var i,o;if(!s)s=null===(i=this.stat)||void 0===i||null===(o=i.getMediaStat())||void 0===o?void 0:o.getConnectionRemb(!0);const u=t.judgeNetworkQuality(s);if(e.uplinkNetworkQuality=u,e.downlinkNetworkQuality=u,!this.preNetQuality||this.preNetQuality.uplinkNetworkQuality!==e.uplinkNetworkQuality||this.preNetQuality.downlinkNetworkQuality!==e.downlinkNetworkQuality){const t={uplinkNetworkQuality:e.uplinkNetworkQuality,downlinkNetworkQuality:e.downlinkNetworkQuality};this.logger.info(uV,"emit:".concat(lx.NetworkQuality,", quality:").concat(JSON.stringify(t))),this.eventEmitter.emit(lx.NetworkQuality,t),this.preNetQuality=e}}finally{this.netQualityRegularReport.bind(this)()}}),2e3)}},{key:"validatePublishRequest",value:function e(t){if(this.status!==ox.Joined)throw this.logger.error(uV,"can not publish stream before join room"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"can not publish stream before join room");if(this.userInfo.role===VD)throw this.logger.error(uV,"the player role can not publish stream"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"the player role can not publish stream");if(!t)throw this.logger.error(uV,"stream is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(t.hasAudioTrack()||t.hasVideoTrack()||this.logger.warn(uV,"stream has no audio and video"),"local"!==t.getType())throw this.logger.error(uV,"stream type: ".concat(t.getType()," cannot publish")),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"stream type: ".concat(t.getType()," cannot publish"))}},{key:"publish",value:async function e(t,r){try{return await this.publishImpl(t,r),void(t.isAuxiliary()&&this.stat.reportAuxiliaryStreamShareInfo(gx.ACTION_START,bx.RESULT_SUCCESS))}catch(e){throw t.isAuxiliary()&&this.stat.reportAuxiliaryStreamShareInfo(gx.ACTION_START,bx.RESULT_ERROR),e}}},{key:"publishImpl",value:async function e(t,r){try{if(!t)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"stream is null");if(await this.publishStream(t,r),!t.isAuxiliary()){if(this.stat.getMediaStat().setLocalMainStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedMainStreamInfos())&&(t.hasAudioTrack()&&this.buildSendMediaStreamInfo(JP.Audio),r&&t.hasVideoTrack())){const e=this.streamPublishManager.getPublishedMainVideoTrackInfos().map((e=>e.ssrc));this.buildSendMediaStreamInfo(JP.Video,e)}}}catch(e){throw this.logger.error(uV,"publishImpl fail, errMsg = ".concat(e)),e}}},{key:"publishStream",value:async function e(t,r){this.logger.info(uV,"publish ".concat(t.isAuxiliary()?"aux":"main"," stream")),this.validatePublishRequest(t);const n=t,i=this.streamPublishManager.generatePubInfoWhenPublish(n,r);await this.sendPublishRequest(i.allTracks2Publish),await this.updateStreamTracks(n,i),this.startStreamResolutionDetection(n),n.addClient(this)}},{key:"sendPublishRequest",value:async function e(t){t&&await this.sendPublishReq(t)}},{key:"startStreamResolutionDetection",value:function e(t){var r;if(!t||sL.isFirefox())return;const n=t.isAuxiliary();!n&&this.resolutionChangeInfo.mainResolutionChangeTimer&&(clearInterval(this.resolutionChangeInfo.mainResolutionChangeTimer),this.resolutionChangeInfo.mainResolutionChangeTimer),n&&this.resolutionChangeInfo.auxResolutionChangeTimer&&(clearInterval(this.resolutionChangeInfo.auxResolutionChangeTimer),this.resolutionChangeInfo.auxResolutionChangeTimer=null),this.logger.info(uV,"startStreamResolutionDetection isAuxiliary: ".concat(n));const i=n?this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_AUX):null===(r=this.streamPublishManager)||void 0===r?void 0:r.getLocalStream(qx.STREAM_TYPE_MAIN);if(i)try{this.resolutionChangeInfo[n?"auxResolutionChangeTimer":"mainResolutionChangeTimer"]=setInterval((async()=>{const e=this.streamPublishManager.getStreamTrackInfo(i),t={"x-nuwa-trace-id":SI.generateRandomId(32,16),"x-nuwa-span-id":SI.generateRandomId(16,16),videoStreams:[]};for(const r of e){if("audio"===r.type)return;if(!(n?tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_AUX,"".concat(ZP,"_").concat(r.upstream.ssrc),"packetsSent"):tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(ZP,"_").concat(r.upstream.ssrc),"packetsSent")))continue;const e={resolutionId:r.resolutionId,content:r.upstream.content,streamUid:r.upstream.streamUid,ssrc:r.upstream.ssrc,mute:r.upstream.mute,width:0,height:0};this.resolutionChangeInfo.preVideoHeight.has(e.resolutionId)||this.resolutionChangeInfo.preVideoHeight.set(e.resolutionId,i.getVideoHeight(e.resolutionId));let o=!1;n?(e.height=tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_AUX,"".concat(ZP,"_").concat(e.ssrc),"frameHeight"),e.width=tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_AUX,"".concat(ZP,"_").concat(e.ssrc),"frameWidth")):(e.height=tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(ZP,"_").concat(e.ssrc),"frameHeight"),e.width=tN.getLatestValue(this.userInfo.roomId,qx.STREAM_TYPE_MAIN,"".concat(ZP,"_").concat(e.ssrc),"frameWidth")),o=Math.abs(this.resolutionChangeInfo.preVideoHeight.get(e.resolutionId)-e.height)/this.resolutionChangeInfo.preVideoHeight.get(e.resolutionId)>.1,o&&(t.videoStreams.push(e),this.resolutionChangeInfo.preVideoHeight.set(e.resolutionId,e.height))}t.videoStreams.length>0&&await this.signal.changeStreamStatus(t)}),5e3)}catch(e){throw this.logger.error(uV,"startStreamResolutionDetection, occur error: ".concat(e)),e}}},{key:"stopStreamResolutionDetection",value:function e(t){var r;if(!t)return clearInterval(this.resolutionChangeInfo.mainResolutionChangeTimer),this.resolutionChangeInfo.mainResolutionChangeTimer=null,clearInterval(this.resolutionChangeInfo.auxResolutionChangeTimer),this.resolutionChangeInfo.auxResolutionChangeTimer=null,void this.resolutionChangeInfo.preVideoHeight.clear();t.isAuxiliary()?(clearInterval(this.resolutionChangeInfo.auxResolutionChangeTimer),this.resolutionChangeInfo.auxResolutionChangeTimer=null):(clearInterval(this.resolutionChangeInfo.mainResolutionChangeTimer),this.resolutionChangeInfo.mainResolutionChangeTimer=null),null===(r=t.getStreamInfo().videoProfiles)||void 0===r||r.forEach((e=>this.resolutionChangeInfo.preVideoHeight.delete(e.resolutionId)))}},{key:"updateStreamTracks",value:async function e(t,r){if(!t)return;const n=t.isAuxiliary();r.tracks2UnPublish&&0!==r.tracks2UnPublish.length||r.tracks2NewPublish&&0!==r.tracks2NewPublish.length?n?await this.updateAuxStreamTrack(t,r):await this.updateMainStreamTrack(t,r):this.logger.info(uV,"update ".concat(n?"aux":"main"," streamTracks, no new publish and unpublish, so no need update sdp"))}},{key:"updateMainStreamTrack",value:async function e(t,r){const n=r.tracks2UnPublish.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)),i=this.removeTracksWhenPublish(n),o=r.tracks2UnPublish.filter((e=>e.type===Qx.TRACK_TYPE_AUDIO)),a=this.removeTracksWhenPublish(o),s=a.length>0?a[0]:null,u=r.tracks2NewPublish.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)),c=await this.addVideoTracksWhenPublish(t,u),l=r.tracks2NewPublish.filter((e=>e.type===Qx.TRACK_TYPE_AUDIO)),f=await this.addAudioTrackWhenPublish(t,l),d=r.tracks2KeepPublish.filter((e=>e.type===Qx.TRACK_TYPE_AUDIO)),h=this.getKeepAudioTrackSsrcSender(d),p=r.tracks2KeepPublish.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)),v=this.getKeepVideoTracksSsrcSender(p);await this.generateNewOfferSdp(h,f,v,c,i,s),l.length>0&&await this.sendAudioMedia(t,f),u.length>0&&await this.sendVideoMedia(t,c),null==n||n.forEach((e=>{this.streamPublishManager.unPublishTrackSuccess(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO,e.upstream.streamUid.toString())})),null==o||o.forEach((e=>{this.streamPublishManager.unPublishTrackSuccess(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO,e.upstream.streamUid.toString())}))}},{key:"updateAuxStreamTrack",value:async function e(t,r){if(r.tracks2NewPublish&&r.tracks2NewPublish.length>0){const e=r.tracks2NewPublish&&r.tracks2NewPublish.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO))[0].ssrc,n=await this.connectionsManager.addTrack(qx.STREAM_TYPE_AUX,t.getVideoTrack(),t.getMediaStream());await this.connectionsManager.modifyPublishOfferSdp(qx.STREAM_TYPE_AUX,this.userInfo.userId,[e]),this.logger.info(uV,"aux send bitrate ".concat(t.getScreenSendBitrate())),await this.setSendBitrate(n,t.getScreenSendBitrate(),"auxVideo"),this.streamPublishManager.publishAuxVideoTrackOK(n,e);const i=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_AUX);i&&(i.off(CP,this.addLocalAuxStreamEndedHandler.bind(this)),i.on(CP,this.addLocalAuxStreamEndedHandler.bind(this))),await t.resumeMixScreenAudio()}else{const e=r.tracks2UnPublish;let n=0;e.forEach((e=>{n=e.ssrc,this.connectionsManager.removeTrack(qx.STREAM_TYPE_AUX,e.sender)})),await this.connectionsManager.modifyPublishOfferSdp(qx.STREAM_TYPE_AUX,this.userInfo.userId,[],0,[n]),await t.stopMixScreenAudio()}}},{key:"sendAudioMedia",value:async function e(t,r){if(r)try{await this.setSendBitrate(r.sender,t.getAudioSendBitrate(),"audio"),this.streamPublishManager.publishMainAudioTrackOK(r.sender,r.ssrc),this.logger.info(uV,"sendAudioMedia, send audio media successfully")}catch(e){throw this.logger.error(uV,"sendAudioMedia, occur error: ".concat(e)),e}}},{key:"sendVideoMedia",value:async function e(t,r){if(0!==r.length)try{const e=[];r.forEach((r=>{e.push(this.setSendBitrate(r.sender,t.getVideoMaxSendBitrate(r.resolutionId),"mainVideo"))})),await Promise.all(e).then((()=>{r.forEach((e=>{this.streamPublishManager.publishMainVideoTrackOK(e.sender,e.ssrc,e.streamId)}))})),this.logger.info(uV,"sendVideoMedia, send video media successfully")}catch(e){throw this.logger.error(uV,"sendVideoMedia, occur error: ".concat(e)),e}}},{key:"generateNewOfferSdp",value:async function e(t,r,n,i,o,a){try{const e=[];n.forEach((t=>e.push(t.ssrc))),i.forEach((t=>e.push(t.ssrc)));const s=r?r.ssrc:t?t.ssrc:null,u=[];o.forEach((e=>u.push(e.ssrc)));const c=a?a.ssrc:null,l=await this.connectionsManager.modifyPublishOfferSdp(qx.STREAM_TYPE_MAIN,this.userInfo.userId,e,s,u,c);return this.logger.info(uV,"generateNewOfferSdp successfully"),l}catch(e){throw this.logger.error(uV,"generateNewOfferSdp, occur error: ".concat(e)),e}}},{key:"sendPublishReq",value:async function e(t){try{const e=[];t.forEach((t=>{e.push(t.upstream),this.logger.info(uV,"prepare to send publish req, streamId:".concat(t.upstream.streamUid))})),await this.signal.publish(e),this.logger.info(uV,"sendPublishReq successfully")}catch(e){throw this.logger.error(uV,"sendPublishReq, occur error: ".concat(e)),e}}},{key:"addVideoTracksWhenPublish",value:async function e(t,r){if(0===r.length)return[];try{const e=[];for(const n of r){const r=t.getVideoTrack(n.resolutionId),i=n.ssrc,o=await this.connectionsManager.addTrack(qx.STREAM_TYPE_MAIN,r,t.getMediaStream(),i);e.push({ssrc:i,sender:o,streamId:n.upstream.streamUid.toString(),resolutionId:n.resolutionId}),this.logger.info(uV,"addVideoTracksWhenPublish, add video track of resolutionId:".concat(n.resolutionId,",")+"physical track id:".concat(r.id,", streamId: ").concat(n.upstream.streamUid," with ssrc: ").concat(i," to connection successfully"))}return e}catch(e){throw this.logger.error(uV,"addVideoTracksWhenPublish, occur error: ".concat(e)),e}}},{key:"addAudioTrackWhenPublish",value:async function e(t,r){if(0===r.length)return null;try{const e=t.getPublishAudioTrack(),n=r[0].ssrc,i={ssrc:n,sender:await this.connectionsManager.addTrack(qx.STREAM_TYPE_MAIN,e,t.getMediaStream()),streamId:r[0].upstream.streamUid.toString(),resolutionId:null};return this.logger.info(uV,"addAudioTrackWhenPublish, add audio track for streamId: ".concat(r[0].upstream.streamUid,",")+"physical track id:".concat(null==e?void 0:e.id," to connection successfully")),i}catch(e){throw this.logger.error(uV,"addAudioTrackWhenPublish, occur error: ".concat(e)),e}}},{key:"removeTracksWhenPublish",value:function e(t){if(0===t.length)return[];try{const e=[];return t.forEach((t=>{this.connectionsManager.removeTrack(qx.STREAM_TYPE_MAIN,t.sender),e.push({ssrc:t.ssrc,sender:t.sender,streamId:t.upstream.streamUid.toString(),resolutionId:t.resolutionId}),this.logger.info(uV,"removeTracksWhenPublish, remove ".concat(t.type," track for streamId: ").concat(t.upstream.streamUid," to connection successfully"))})),e}catch(e){throw this.logger.error(uV,"removeTracksWhenPublish, occur error: ".concat(e)),e}}},{key:"getKeepAudioTrackSsrcSender",value:function e(t){const r=[];return t.forEach((e=>{r.push({ssrc:e.ssrc,sender:e.sender,streamId:e.upstream.streamUid.toString(),resolutionId:e.resolutionId})})),r.length>0?r[0]:null}},{key:"getKeepVideoTracksSsrcSender",value:function e(t){const r=[];return t.forEach((e=>{r.push({ssrc:e.ssrc,sender:e.sender,streamId:e.upstream.streamUid.toString(),resolutionId:e.resolutionId})})),r}},{key:"buildSendMediaStreamInfo",value:function e(t,r){switch(t){case JP.Aux:{const e=this.streamPublishManager.generateAuxOptTag();e&&this.stat.reportStartSendMediaStream(Sx.AUX,e);break}case JP.Video:{const e=this.streamPublishManager.generateMainVideoOptTags();e&&e.length>0&&e.forEach((e=>{r.find((t=>-1!=e.indexOf("".concat(t))))&&this.stat.reportStartSendMediaStream(Sx.VIDEO,e)}));break}case JP.Audio:{const e=this.streamPublishManager.generateMainAudioOptTag();e&&this.stat.reportStartSendMediaStream(Sx.AUDIO,e);break}}}},{key:"unpublish",value:async function e(t){try{return await this.unpublishImpl(t),t.isAuxiliary()&&this.stat.reportAuxiliaryStreamShareInfo(gx.ACTION_STOP,bx.RESULT_SUCCESS),void this.stopStreamResolutionDetection(t)}catch(e){throw t.isAuxiliary()&&this.stat.reportAuxiliaryStreamShareInfo(gx.ACTION_STOP,bx.RESULT_ERROR),e}}},{key:"unpublishImpl",value:async function e(t){if(this.userInfo.role===VD)throw this.logger.error(uV,"the player role can not unpublish stream"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"the player role can not unpublish stream");if(!t)throw this.logger.error(uV,"stream is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if("local"!==t.getType())throw this.logger.error(uV,"stream type: ".concat(t.getType()," cannot unpublish")),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"stream type: ".concat(t.getType()," cannot unpublish"));try{await this.locker.lock("".concat(uV,":unpublishImpl")),await this.unPublishStream(t)}finally{this.locker.unlock("".concat(uV,":unpublishImpl"))}}},{key:"unPublishStream",value:async function e(t){await this.unpublishSteamAndSignalIfNeed(t,this.sendPublishRequest.bind(this))}},{key:"unpublishSteamAndSignalIfNeed",value:async function e(t,r){const n=t.isAuxiliary(),i=n?"aux":"main";try{this.logger.info(uV,"unpublish ".concat(i," stream:").concat(t.getId()));const e=t,o=this.streamPublishManager.generatePubInfoWhenUnPublish(e);r&&await r(o.allTracks2Publish),await this.startStreamResolutionDetection(e),await this.updateStreamTracks(e,o),e.removeClient(this),n?this.streamPublishManager.unPublishAuxStreamOK():this.streamPublishManager.unPublishMainStreamOK(),this.logger.info(uV,"unpublish ".concat(i,"stream success: ").concat(t.getId()))}catch(e){throw this.logger.error(uV,"unpublish ".concat(i," stream, ").concat(t.getId()," occur error: ").concat(e)),e}}},{key:"rejoinPublishStreams",value:async function e(t){let r=[];for(const e of t){this.logger.info(uV,"rejoin publish ".concat(e.isAuxiliary()?"aux":"main"," stream"));const t=e;t.removeClient(this),this.validatePublishRequest(e);const n=this.streamPublishManager.generatePubInfoWhenPublish(t);await this.updateStreamTracks(t,n),t.addClient(this),r=[...r,...n.allTracks2Publish]}r=[...new Set(r)],await this.sendPublishRequest(r);for(const e of t){const t=e;await this.startStreamResolutionDetection(t)}}},{key:"addLocalAuxStreamEndedHandler",value:function e(t){this.streamPublishManager.isAuxVideoTrackValid(t)&&this.unpublish(this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_AUX))}},{key:"subscribeAudio",value:async function e(t){return await this.subscribeAudioImpl(t)}},{key:"subscribeAudioImpl",value:async function e(t){if(!t)throw this.logger.error(uV,"subscribeAudioImpl, userId is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"userId is null");const r=new jD({type:"main",log:this.logger,userId:t,client:this,roomId:this.roomId});this.logger.info(uV,"subscribeAudioImpl begin, userId:".concat(t)),await this.subscribeImpl(r,{audio:!0,video:!1});const n=this.remoteUserManager.getUserInfoById(t,this.roomId);if(n){let e=!1;for(const t of null===(i=n.mainStream.remoteTrackInfos)||void 0===i?void 0:i.values()){var i;if(t.type===Qx.TRACK_TYPE_AUDIO&&t.isSubscribed){e=!0;break}}if(e)return n.mainStream.remoteStream}}},{key:"unSubscribeAudio",value:async function e(t){return await this.unSubscribeAudioImpl(t)}},{key:"unSubscribeAudioImpl",value:async function e(t){if(!t)throw this.logger.error(uV,"unSubscribeAudioImpl, userId is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"userId is null");const r=new jD({type:"main",log:this.logger,userId:t,client:this,roomId:this.roomId});this.logger.info(uV,"unSubscribeAudioImpl begin, userId:".concat(t)),await this.unsubscribeImpl(r,{audio:!0,video:!1})}},{key:"startupQoSReportPlay",value:function e(t,r){const n=this.startupQoSMap.get(t);if(n){const e={timestamp:n.start,traceId:n.traceId,spanId:"0.1.1",originIntfName:n.interfaceName,interfaceName:"play",source:"",target:"",resultCode:"",successFlag:"T",duration:r-n.start,async:"N",extendInfo:JSON.stringify({id:n.id,streamIds:n.streamIds})};this.stat.setFirstFrameInfo(e),n.start=r,n.interfaceName="play"}}},{key:"startupQoSReportCanPlay",value:function e(t){const r=SI.getCurrentTimestamp(),n=(null==t?void 0:t.id)&&this.startupQoSMap.get(null==t?void 0:t.id);if(n){const e={timestamp:n.start,traceId:n.traceId,spanId:"0.1.1.1",originIntfName:n.interfaceName,interfaceName:"canplay",source:"",target:"",resultCode:"",successFlag:"T",duration:r-n.start,async:"N",extendInfo:JSON.stringify({id:n.id,streamIds:n.streamIds})};this.stat.setFirstFrameInfo(e)}}},{key:"subscribe",value:async function e(t,r){return await this.subscribeImpl(t,r)}},{key:"subscribeImpl",value:async function e(t,r){if(this.roomStreamStatus.audience===vx.PAUSE&&this.userInfo.role===VD)throw this.logger.error(uV,"subscribeImpl, room stream status is pause"),new oc(nc.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED,"room stream status is ".concat(this.roomStreamStatus.audience));const n=SI.getCurrentTimestamp(),i={traceId:SI.generateRandomId(32,16),spanId:"0",originIntfName:"",interfaceName:"subscribe",id:t.getUniqueId(),start:n};if(!t)throw this.logger.error(uV,"subscribeImpl, stream is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"stream is null");if(r||(r={video:!0,audio:!0}),r.audio||r.video){if(r.video&&![ux.ON,ux.OFF,null,void 0].includes(r.autoAdjustResolution))throw this.logger.error(uV,"the autoAdjustResolution value must be 1 or 2 or empty."),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);await this.doSubscribe(t,r,i)}}},{key:"doSubscribe",value:async function e(t,r,n){if(this.connectState.curState!==YP[KP.CONNECTED])throw this.logger.error(uV,"cannot do subscribe when network disconnected"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED);const i=t.getUserId(),o=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN;this.logger.info(uV,"start subscribe, ".concat(i,", ").concat(o,", option: ").concat(JSON.stringify(r))),this.audioPolicy!==$x.USER_SUBSCRIBE_AUDIOPOLICY&&r.audio&&this.logger.info(uV,"doSubscribe, ".concat(this.audioPolicy," is not common audio mode, but audio option is true, reserve it"));try{await this.locker.lock("".concat(uV,":doSubscribe"));const e=this.remoteUserManager.subscribeStream(i,this.roomId,o,r,this.audioPolicy,!1,n);return await this.updateSubscribe(e,n)}catch(e){throw this.logger.error(uV,"subscribe release lock, subscribe userId ".concat(t.getUserId()," occur error ").concat(e)),e}finally{this.locker.unlock("".concat(uV,":doSubscribe"))}}},{key:"batchSubscribe",value:async function e(t){return await this.doBatchSubscribe(t)}},{key:"checkSubscribeParams",value:function e(t){t.forEach((e=>{if(![ux.OFF,ux.ON,null,void 0].includes(e.autoAdjustResolution))throw this.logger.error(uV,"the autoAdjustResolution value must be 1 or 2"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(!["FHD","HD","SD","LD",null,void 0].includes(e.minResolution))throw this.logger.error(uV,"the minResolution value must be 'FHD','HD','SD','LD'"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER)}))}},{key:"doBatchSubscribe",value:async function e(t){this.logger.info(uV,"doBatchSubscribe, subscribeInfos: ".concat(JSON.stringify(t)));try{this.checkSubscribeParams(t);const e=t.map((e=>({userId:e.userId,resolutionIds:e.resolutionIds,autoAdjustResolution:e.autoAdjustResolution,minResolution:e.minResolution})));await this.locker.lock("".concat(uV,":doBatchSubscribe"));const r=this.remoteUserManager.batchSubscribeMainStream(this.roomId,e);await this.updateSubscribe(r)}catch(e){throw this.logger.error(uV,"batchSubscribe failed, ".concat(e)),e}finally{this.locker.unlock("".concat(uV,":doBatchSubscribe"))}}},{key:"batchDeleteUnusedSsrcInSdp",value:async function e(t,r,n){(r&&0!==r.length||n&&0!==n.length)&&(this.logger.info(uV,"batchDeleteUnusedSsrcInSdp, streamType: ".concat(t,", videoSsrc2Del: ").concat(r,", audioSsrc2Del:").concat(n)),await this.connectionsManager.deleteUser(t,r,n))}},{key:"enableStreamStateDetection",value:async function e(t,r){if(this.status!==ox.Joined)throw this.logger.error(uV,"cannot enable stream detection before join room"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"cannot enable stream detection before join room");if(!t)return clearTimeout(this.streamInterruptedDetectInterval),this.streamInterruptedDetectInterval=null,this.lastCycleFrameDecodedMap.clear(),void this.streamInterruptedUsersMap.clear();if(!Number.isInteger(r)||r<1||r>60)throw this.logger.error(uV,"invalid interval for enable stream detection"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(t&&this.streamInterruptedDetectInterval)throw this.logger.error(uV,"cannot double enable stream detection"),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"cannot double enable stream detection");if(this.streamDetectionCriterion=r,this.lastCycleFrameDecodedMap&&0===this.lastCycleFrameDecodedMap.size){this.remoteUserManager.getAllUserStreamsByType(this.roomId,null,null).forEach((e=>{const t=e.userId;e.mainStream&&this.lastCycleFrameDecodedMap.set(t+",0",{userId:t,decodedFrame:0}),e.auxStream&&this.lastCycleFrameDecodedMap.set(t+",1",{userId:t,decodedFrame:0})}))}await this.startStreamDetection()}},{key:"startStreamDetection",value:async function e(){if(!this.streamInterruptedDetectInterval){const e=1e3,t=()=>{this.streamInterruptedDetectInterval=setTimeout((async()=>{const r=await this.stat.collectReceiverDecodedFrameMap(),n=[],i=[],o=Math.round(1e3*this.streamDetectionCriterion/e);this.streamInterruptedUsersMap.forEach(((e,t)=>{r.has(t)||this.streamInterruptedUsersMap.delete(t)})),r.forEach(((e,t)=>{const r=this.lastCycleFrameDecodedMap&&this.lastCycleFrameDecodedMap.get(t);if(r&&r.decodedFrame===e.decodedFrame){const e=this.streamInterruptedUsersMap.get(t);e?this.streamInterruptedUsersMap.set(t,e+1):this.streamInterruptedUsersMap.set(t,1)}if(r&&r.decodedFrame!==e.decodedFrame){if(this.streamInterruptedUsersMap.get(t)>=o){const r=t.split(",");r[0]!==nx&&i.push({userId:r[0],isScreen:e.isAux})}this.streamInterruptedUsersMap.delete(t)}})),this.lastCycleFrameDecodedMap=r,this.streamInterruptedUsersMap&&this.streamInterruptedUsersMap.forEach(((e,t)=>{if(e===o){const e=t.split(",");e[0]!==nx&&(n.push({userId:e[0],isScreen:"1"===e[1]}),this.logger.info(uV,"stream interrupted, userId: ".concat(e[0],", isAux: ").concat(e[1])))}})),n.length>0&&this.connectState.curState===YP[KP.CONNECTED]&&(this.logger.info(uV,"find stream interrupted users, ".concat(JSON.stringify(n))),this.eventEmitter.emit(lx.StreamInterrupted,n)),i.length>0&&this.connectState.curState===YP[KP.CONNECTED]&&(this.logger.info(uV,"find stream recovered users, ".concat(JSON.stringify(i))),this.eventEmitter.emit(lx.StreamRecovered,i)),t()}),e)};t()}}},{key:"unsubscribe",value:async function e(t,r){return await this.unsubscribeImpl(t,r)}},{key:"unsubscribeImpl",value:async function e(t,r){if(this.logger.info(uV,"start unsubscribe"),this.roomStreamStatus.audience===vx.PAUSE&&this.userInfo.role===VD)throw this.logger.error(uV,"unsubscribeImpl, room stream status is pause"),new oc(nc.RTC_ERR_CODE_ROOM_STREAM_STATUS_PAUSED,"room stream status is ".concat(this.roomStreamStatus.audience));if(this.connectState.curState!==YP[KP.CONNECTED])throw this.logger.error(uV,"cannot do subscribe when network disconnected"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED);if(!t)throw this.logger.error(uV,"stream is null"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"stream is null");const n=t.getUserId(),i=t.isAuxiliary()?qx.STREAM_TYPE_AUX:qx.STREAM_TYPE_MAIN;this.logger.info(uV,"start doUnsubscribe, ".concat(n,", ").concat(i,", option: ").concat(JSON.stringify(r)));try{const e=r||{video:!0,audio:!0};await this.locker.lock("".concat(uV,":doUnsubscribe"));const t=this.remoteUserManager.unsubscribeStream(n,this.roomId,i,e);await this.updateSubscribe(t)}catch(e){throw this.logger.error(uV,"subscribe userId ".concat(t.getUserId()," occur error ").concat(e)),e}finally{this.locker.unlock("".concat(uV,":doUnsubscribe"))}}},{key:"switchRole",value:async function e(t,r){return await this.switchRoleImpl(t,r)}},{key:"switchRoleImpl",value:async function e(t,r){if(this.logger.info(uV,"switchRole from ".concat(this.userInfo.role," to ").concat(t)),this.status!==ox.Joined&&this.status!==ox.Rejoining)throw new oc(nc.RTC_ERR_CODE_STATUS_ERROR);if(this.userInfo.role===t)throw this.logger.error(uV,"new role same with old role, no need switch."),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"new role same with old role, no need switch.");aU.switchRoleParamsCheck(this,t,r);try{if(await this.locker.lock("".concat(uV,":_switchRoleImpl")),this.userInfo.role===UD&&t===VD&&(this.streamPublishManager.isMainStreamPublished()&&await this.unpublishSteamAndSignalIfNeed(this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN)),this.streamPublishManager.isAuxVideoTrackPublished()&&await this.unpublishSteamAndSignalIfNeed(this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_AUX))),!(r&&r.ctime&&r.signature))throw this.logger.error(uV,"authorization is incomplete, please have the correct authorization parameter"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"switchRole authorization parameter is invalid.");{const e=FD.renewSignature(this.identifiedID_,r.ctime,r.signature);this.signal.refreshUserInfo(e)}const e=await this.signal.switchRole(t,r);this.logger.debug(uV,"swithRole resp: ".concat(JSON.stringify(e))),this.userInfo.role===VD&&t===UD&&(this.stat.getMediaStat().setLocalMainStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedMainStreamInfos()),this.stat.getMediaStat().setLocalAuxsStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedAuxStreamInfo())),this.userInfo.role=t,t===UD&&this.roomStreamStatus.audience===vx.PAUSE&&await this.handleRoomStreamStatus(vx.NORMAL,$x.TOPN_AUDIOPOLICY===this.audioPolicy,!0),this.stat.reportSwitchRoleInfo(t,wx),this.locker.unlock("".concat(uV,":_switchRoleImpl")),this.logger.info(uV,"switchRole success")}catch(e){throw this.locker.unlock("".concat(uV,":_switchRoleImpl")),this.logger.error(uV,"switchRole switchRole failed, errMsg = ".concat(e)),this.stat.reportSwitchRoleInfo(t,Tx),e}}},{key:"getPublishAudioSender",value:function e(){var t;return null===(t=this.streamPublishManager.getPublishedMainAudioTrackInfo())||void 0===t?void 0:t.sender}},{key:"getPublishedMainAudioTrackInfo",value:function e(){return this.streamPublishManager.getPublishedMainAudioTrackInfo()}},{key:"getPublishedMainVideoTrackInfos",value:function e(){return this.streamPublishManager.getPublishedMainVideoTrackInfos()}},{key:"getPublishVideoSender",value:function e(t){if(t===qx.STREAM_TYPE_AUX){const e=this.streamPublishManager.getPublishedAuxVideoTrackInfo();if(e)return[e.sender]}const r=[];return this.streamPublishManager.getPublishedMainVideoTrackInfos().forEach((e=>{r.push(e.sender)})),r}},{key:"getMainStreamSenderByTrack",value:function e(t){if(!t)return null;const r=this.streamPublishManager.getPublishedMainVideoTrackInfos().find((e=>e.upstream.streamUid.toString()===t));return null==r?void 0:r.sender}},{key:"waitForTrackBatch",value:async function e(t){const r=t.map((e=>{var t,r;return(null===(t=e.mainStream)||void 0===t||null===(r=t.tracks)||void 0===r?void 0:r.length)>0?1:0})).reduce(((e,t)=>e+t),0),n=t.map((e=>{var t,r;return(null===(t=e.auxStream)||void 0===t||null===(r=t.tracks)||void 0===r?void 0:r.length)>0?1:0})).reduce(((e,t)=>e+t),0);this.logger.debug(uV,"wait for track batch begin, mainStreamCount:".concat(r,", auxStreamCount:").concat(n," "));for(let e=0;e<100;e++){if(this.computeSucceedStreamCount(qx.STREAM_TYPE_MAIN,r,t)+this.computeSucceedStreamCount(qx.STREAM_TYPE_AUX,n,t)===r+n)break;if(99===e)return void this.logger.error(uV,"waitForTrackBatch subscribe on track timeout");await SI.sleep(50)}}},{key:"computeSucceedStreamCount",value:function e(t,r,n){let i=0;return r&&(i=n.map((e=>this.isStreamTrackReady(t,e)?1:0)).reduce(((e,t)=>e+t),0)),i}},{key:"newSignal",value:function e(t){this.signal||(this.signal=new hj(this.clientConfig.appId,t,this))}},{key:"negTransportChannelHandler",value:async function e(r,i,o,a){if(this.cmdMsgAbility.enable)if(r.sdp.cmd){var s,u;if(a)return n(t,"off",this,3)([lx.CmdChannelDisconnect]),AI.getLogger().debug(uV,"negTransportChannelHandler init command channel of datachannel."),null===(s=this.cmdMsgAbility.cmdManager)||void 0===s||s.reset(),this.cmdMsgAbility.cmdManager=new bU(this.eventEmitter,this.remoteUserManager),null===(u=this.cmdMsgAbility.cmdManager)||void 0===u||u.setCommandChannelParams(this.roomId,{tranportOptions:{userUid:r.userUid,sendSsrc:r.sdp.cmd.sendSsrc,receiveSsrc:r.sdp.cmd.receiveSsrc,payload:r.sdp.cmd.pt},dataChannelOptions:{connection:this.connectionsManager.getConnection(qx.STREAM_TYPE_MAIN)},msgFormat:this.cmdMsgAbility.msgFormat}),await this.connectionsManager.refreshOffer(qx.STREAM_TYPE_MAIN),void(i&&o&&n(t,"on",this,3)([lx.CmdChannelDisconnect,e=>{e===hx.DATA_CHANNEL&&(AI.getLogger().debug(uV,"negTransportChannelHandler downgrade to webocket command channel."),this.websocketChannelInit(r,i,o))},!1]));i&&o&&(AI.getLogger().debug(uV,"negTransportChannelHandler init webocket command channel."),this.websocketChannelInit(r,i,o))}else AI.getLogger().error(uV,"negTransportChannelHandler error, cmd signal info missing.")}},{key:"websocketChannelInit",value:function e(t,r,n){var i;null===(i=this.cmdMsgAbility.cmdManager)||void 0===i||i.reset(),this.cmdMsgAbility.cmdManager=new mU(this.eventEmitter,this.remoteUserManager),this.cmdMsgAbility.cmdManager.setCommandChannelParams(this.roomId,{tranportOptions:{userUid:t.userUid,sendSsrc:t.sdp.cmd.sendSsrc,receiveSsrc:t.sdp.cmd.receiveSsrc,payload:t.sdp.cmd.pt},wsOptions:{bindCryptoKey:r,wsUrl:n,wsDomain:t.sdp.domain},msgFormat:this.cmdMsgAbility.msgFormat})}},{key:"onTrackHandler",value:function e(t,r){if(this.logger.info(uV,"peerconnection ontrack event: ".concat(t.track.kind)),t.track.kind===Qx.TRACK_TYPE_VIDEO||this.audioPolicy===$x.USER_SUBSCRIBE_AUDIOPOLICY&&t.track.kind===Qx.TRACK_TYPE_AUDIO){var n,i;let e=t.streams[0].id;const a=this.remoteUserManager.getUserInfoByStreamId(this.roomId,e),s=r?null==a||null===(n=a.auxStream)||void 0===n?void 0:n.remoteStream:null==a||null===(i=a.mainStream)||void 0===i?void 0:i.remoteStream;var o;if(s)this.logger.info(uV,"connection.ontrack streamId=".concat(e,", hasAudio:").concat(s.hasAudioTrack()," hasVideo:").concat(s.hasVideoTrack())),null!==(o=zM.getParameter(BM))&&void 0!==o&&!o||t.track.kind!==Qx.TRACK_TYPE_VIDEO||(e=this.connectionsManager.getTrackId(e,t.transceiver.mid)),s.addRemoteTrack(t.track,e);else this.logger.info(uV,"ontrack stream: ".concat(e," is not existed"))}this.logger.info("onConnection","audio policy:".concat(this.audioPolicy,",track kind:").concat(t.track.kind)),this.audioPolicy===$x.TOPN_AUDIOPOLICY&&t.track.kind===Qx.TRACK_TYPE_AUDIO&&this.saveAudioStream4TopN(t)}},{key:"updateSubscribe",value:async function e(r,n,i){if(this.connectState.curState!==YP[KP.CONNECTED])throw this.logger.error(uV,"cannot do subscribe or unSubscribe when network disconnected"),new oc(nc.RTC_ERR_CODE_WEBSOCKET_NOT_CONNECTED);if(!r||0===r.length)return null;if(!t.isSubscriptionChange(r))return this.logger.info(uV,"no need update subscription"),null;try{const e={successSubscribeInfos:[],failSubscribeInfos:[],successUnsubscribeInfos:[],failUnsubscribeInfos:[]};await this.modifyBrowerSdp(r,e);const t={successSubscribeInfos:[],failSubscribeInfos:[],successUnsubscribeInfos:[],failUnsubscribeInfos:[]};!i&&await this.subscribeSignal(r,t,n),this.clearResource(r);const o=await this.handleRemoteStreamsState(t.successSubscribeInfos),a={successSubscribeInfos:[],failSubscribeInfos:[],successUnsubscribeInfos:[],failUnsubscribeInfos:[]};return(null==o?void 0:o.successSubscribeInfos)&&a.successSubscribeInfos.push(...o.successSubscribeInfos),(null==o?void 0:o.failSubscribeInfos)&&a.failSubscribeInfos.push(...o.failSubscribeInfos),(null==t?void 0:t.failSubscribeInfos)&&a.failSubscribeInfos.push(...t.failSubscribeInfos),(null==t?void 0:t.successUnsubscribeInfos)&&a.successUnsubscribeInfos.push(...t.successUnsubscribeInfos),(null==t?void 0:t.failUnsubscribeInfos)&&a.failUnsubscribeInfos.push(...t.failUnsubscribeInfos),await this.rollbackResource(a.failSubscribeInfos),this.remoteUserManager.subscribeResultCallback(a,!1),this.logger.info(uV,"updateSubscribe end. ".concat(this.getSubscribeResultString(a))),a}catch(e){this.logger.error(uV,"updateSubscribe fail. errMsg:".concat(e));const t=this.getSubscribeExceptionResult(r);throw await this.rollbackResource(t.failSubscribeInfos),this.remoteUserManager.subscribeResultCallback(t,!0),this.logger.info(uV,"updateSubscribe fail end. ".concat(this.getSubscribeResultString(t))),e}}},{key:"modifyBrowerSdp",value:function e(r,n){const i=this.buildSubsReq(r,n),o=t.getUserUpdateInfos(i.joinUserUpdateInfos),a=this.buildDefaultSubsRep(i);this.getSubscribeResult(o,a.videoUpstreams,a.audioUpstreams,n,!1);const s=[],u=[],c=[],l=[];n.successUnsubscribeInfos.forEach((e=>{var t,r,n,i;null===(t=e.mainStream)||void 0===t||null===(r=t.tracks)||void 0===r||r.forEach((e=>{e.type===Qx.TRACK_TYPE_VIDEO?s.push(e.cssrc):c.push(e.cssrc)})),null===(n=e.auxStream)||void 0===n||null===(i=n.tracks)||void 0===i||i.forEach((e=>{e.type===Qx.TRACK_TYPE_VIDEO?u.push(e.cssrc):l.push(e.cssrc)}))}));const f=[];return f.push(this.generateReceiveSdp(qx.STREAM_TYPE_MAIN,n.successSubscribeInfos,s,c)),f.push(this.generateReceiveSdp(qx.STREAM_TYPE_AUX,n.successSubscribeInfos,u,l)),Promise.all(f)}},{key:"getSubscribeExceptionResult",value:function e(t){const r={successSubscribeInfos:[],failSubscribeInfos:[],successUnsubscribeInfos:[],failUnsubscribeInfos:[]};return t.forEach((e=>{var t,n,i,o,a,s,u,c;const l={userId:e.userInfo.userId,roomId:this.roomId,mainStream:{remoteStream:null===(t=e.mainStream)||void 0===t?void 0:t.remoteStream,tracks:null===(n=e.mainStream)||void 0===n?void 0:n.tracks4Subscribe},auxStream:{remoteStream:null===(i=e.auxStream)||void 0===i?void 0:i.remoteStream,tracks:null===(o=e.auxStream)||void 0===o?void 0:o.tracks4Subscribe}},f={userId:e.userInfo.userId,roomId:this.roomId,mainStream:{remoteStream:null===(a=e.mainStream)||void 0===a?void 0:a.remoteStream,tracks:null===(s=e.mainStream)||void 0===s?void 0:s.tracks4Unsubscribe},auxStream:{remoteStream:null===(u=e.auxStream)||void 0===u?void 0:u.remoteStream,tracks:null===(c=e.auxStream)||void 0===c?void 0:c.tracks4Unsubscribe}};this.appendSubscribeResult(r.failSubscribeInfos,l),this.appendSubscribeResult(r.failUnsubscribeInfos,f)})),this.logger.info(uV,"getSubscribeExceptionResult. ".concat(this.getSubscribeResultString(r))),r}},{key:"getSubscribeResultString",value:function e(t){var r,n,i,o;let a;return null==t||null===(r=t.successSubscribeInfos)||void 0===r||r.forEach((e=>{a="".concat(a||""," subscribe success list: ").concat(this.getRemoteUserSubscribeInfoString(e),", ")})),null==t||null===(n=t.failSubscribeInfos)||void 0===n||n.forEach((e=>{a="".concat(a||""," subscribe failed list: ").concat(this.getRemoteUserSubscribeInfoString(e),",")})),null==t||null===(i=t.successUnsubscribeInfos)||void 0===i||i.forEach((e=>{a="".concat(a||""," unsubscribe success list: ").concat(this.getRemoteUserSubscribeInfoString(e),",")})),null==t||null===(o=t.failUnsubscribeInfos)||void 0===o||o.forEach((e=>{a="".concat(a||""," unsubscribe failed list: ").concat(this.getRemoteUserSubscribeInfoString(e))})),a}},{key:"rollbackResource",value:async function e(t){if(t&&0!==t.length)try{const e=[],r=[],n=[],i=[];t.forEach((t=>{var o,a,s,u;null===(o=t.mainStream)||void 0===o||null===(a=o.tracks)||void 0===a||a.forEach((t=>{t.type===Qx.TRACK_TYPE_VIDEO?e.push(t.cssrc):r.push(t.cssrc)})),null===(s=t.auxStream)||void 0===s||null===(u=s.tracks)||void 0===u||u.forEach((e=>{e.type===Qx.TRACK_TYPE_VIDEO?n.push(e.cssrc):i.push(e.cssrc)}))})),await this.batchDeleteUnusedSsrcInSdp(qx.STREAM_TYPE_MAIN,e,r),await this.batchDeleteUnusedSsrcInSdp(qx.STREAM_TYPE_AUX,n,i)}catch(e){this.logger.error(uV,"rollbackResource fail, errMsg:".concat(e))}}},{key:"isNormalStateStream",value:function e(t){const r=t.tracks.filter((e=>e.isTrackReady)),n=t.tracks.filter((e=>e.isTrackReady&&e.state===QM.normal));return r.length&&r.length===n.length}},{key:"handleReadyStream",value:async function e(t,r){var n,i,o,a;t===qx.STREAM_TYPE_MAIN&&(null===(n=r.mainStream)||void 0===n||null===(i=n.tracks)||void 0===i?void 0:i.length)>0?await this.handleReadyStreamByType(r.userId,t,r.mainStream):t===qx.STREAM_TYPE_AUX&&(null===(o=r.auxStream)||void 0===o||null===(a=o.tracks)||void 0===a?void 0:a.length)>0&&await this.handleReadyStreamByType(r.userId,t,r.auxStream)}},{key:"handleReadyStreamByType",value:async function e(t,r,n){this.logger.debug(uV,"handleReadyStreamByType, ".concat(r,", ").concat(JSON.stringify(n.tracks)));try{if(this.isNormalStateStream(n)&&(this.logger.info(uV,"emit ".concat(lx.StreamSubscribed,", userId: ").concat(t,", ").concat(r)),this.eventEmitter.emit(lx.StreamSubscribed,{stream:n.remoteStream}),r===qx.STREAM_TYPE_MAIN)){const e=setTimeout((async()=>{clearTimeout(e),this.reportMediaStatus(t,this.roomId)}),0)}const e=n.tracks.some((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.isTrackReady));for(const t of n.tracks)t.isTrackReady&&await this.handleReadyTrack(t,n.remoteStream,e)}catch(e){this.logger.error(uV,"handleReadyStreamByType fail, errMsg:".concat(e))}}},{key:"getMediaNotifyInfo",value:function e(t,r){const n=[],i=this.remoteUserManager.getAllUserStreamsByType(r,null,null);return null==i||i.forEach((e=>{if(e.userId!==t)return;const i=e.mainStream,o=null==i?void 0:i.tracks.find((e=>e.type===Qx.TRACK_TYPE_AUDIO&&e.isTrackReady));if(o){const e={mediaType:Qx.TRACK_TYPE_AUDIO,roomId:r,userId:t,status:o.mute?zP.MediaStatusUnavailable:zP.MediaStatusAvailable,reason:o.mute?QP.MediaUnmuted:QP.MediaMuted};n.push(e)}const a=null==i?void 0:i.tracks.find((e=>e.type===Qx.TRACK_TYPE_VIDEO&&e.isTrackReady));if(a){const e={mediaType:Qx.TRACK_TYPE_VIDEO,roomId:this.roomId,userId:t,status:a.mute?zP.MediaStatusUnavailable:zP.MediaStatusAvailable,reason:a.mute?QP.MediaUnmuted:QP.MediaMuted};n.push(e)}})),n}},{key:"reportMediaStatus",value:function e(t,r){this.getMediaNotifyInfo(t,r).forEach((e=>{const r=e.mediaType===Qx.TRACK_TYPE_AUDIO?e.status===zP.MediaStatusAvailable?"UnmuteAudio":"MuteAudio":e.status===zP.MediaStatusAvailable?"UnmuteVideo":"MuteVideo";this.logger.info(uV,"emit ".concat(lx[r],", userId: ").concat(t,", type: ").concat(e.mediaType,", status: ").concat(e.status)),this.eventEmitter.emit(lx[r],e)}))}},{key:"handleReadyTrack",value:async function e(t,r,n){const i=t.type===Qx.TRACK_TYPE_VIDEO||t.type===Qx.TRACK_TYPE_AUDIO&&!n,o=[QM.remoteRejoinCache,QM.localRejoin,QM.resolutionChange].includes(t.state);i&&t.playElement&&o&&(this.logger.info(uV,"handleReadyTrack, auto play"),this.logger.info(uV,"video track.muted[".concat(t.muted,"]")),await r.play(t.playElement,{objectFit:t.objectFit,muted:t.muted,resolutionId:t.type===Qx.TRACK_TYPE_VIDEO?t.trackId:null}));const a=t.type===Qx.TRACK_TYPE_AUDIO,s=[QM.remoteRejoinCache,QM.localRejoin,QM.resolutionChange].includes(t.state);if(a&&t.playElement&&s){this.logger.info(uV,"audio track.muted[".concat(t.muted,"]"));const e=r.getAudioHRTCTrack();t.muted?e.muteTrack():e.unmuteTrack()}}},{key:"handleRemoteStreamsState",value:async function e(r){if(!r||0===r.length)return null;await this.waitForTrackBatch(r),this.logger.info(uV,"handleRemoteTracksState, waitForTrackBatch return");const n=[],i=[];for(const e of r){var o,a,s,u;const r=t.newRemoteUserSubscribeInfo(e.userId,this.roomId,null===(o=e.mainStream)||void 0===o?void 0:o.remoteStream,null===(a=e.auxStream)||void 0===a?void 0:a.remoteStream),c=t.newRemoteUserSubscribeInfo(e.userId,this.roomId,null===(s=e.mainStream)||void 0===s?void 0:s.remoteStream,null===(u=e.auxStream)||void 0===u?void 0:u.remoteStream);await this.handleRemoteStreamsStateByType(e,qx.STREAM_TYPE_MAIN,r,c),await this.handleRemoteStreamsStateByType(e,qx.STREAM_TYPE_AUX,r,c),(r.mainStream.tracks.length||r.auxStream.tracks.length)&&n.push(r),(c.mainStream.tracks.length||c.auxStream.tracks.length)&&i.push(c),this.stat.getMediaStat().setSubscribeInfo(e)}return{successSubscribeInfos:n,failSubscribeInfos:i,successUnsubscribeInfos:null,failUnsubscribeInfos:null}}},{key:"isStreamTrackReady",value:function e(t,r){const n=t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream,i=null==n?void 0:n.remoteStream,o=null!=n&&n.tracks?Array.from(n.tracks.values()):null,a=null==o?void 0:o.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).map((e=>e.trackId)),s=null==o?void 0:o.some((e=>e.type===Qx.TRACK_TYPE_AUDIO));return null==i?void 0:i.isTracksReady(a,s)}},{key:"handleRemoteStreamsStateByType",value:async function e(t,r,n,i){var o;const a=this.isStreamTrackReady(r,t);let s=t.mainStream,u=null===(o=t.mainStream)||void 0===o?void 0:o.tracks,c=n.mainStream,l=i.mainStream;var f;r===qx.STREAM_TYPE_AUX&&(s=t.auxStream,u=null===(f=t.auxStream)||void 0===f?void 0:f.tracks,c=n.auxStream,l=i.auxStream);let d=!1;var h,p;a?(null===(h=u)||void 0===h||h.forEach((e=>{e.isTrackReady=!0,d=!0})),u&&c.tracks.push(...u)):null===(p=u)||void 0===p||p.forEach((e=>{var t;null!==(t=s)&&void 0!==t&&t.remoteStream.isTrackReady(e.type,e.trackId)?(e.isTrackReady=!0,d=!0,c.tracks.push(e)):l.tracks.push(e)}));d&&await this.handleReadyStream(r,t)}},{key:"getRemoteUserSubscribeInfoString",value:function e(t){var r,n,i,o;if(!t)return"";let a,s;return null===(r=t.mainStream)||void 0===r||null===(n=r.tracks)||void 0===n||n.forEach((e=>{a="".concat(a||""," ").concat(JSON.stringify(e))})),null===(i=t.auxStream)||void 0===i||null===(o=i.tracks)||void 0===o||o.forEach((e=>{s="".concat(s||""," ").concat(JSON.stringify(e))}))," userId:".concat(t.userId,", mainTracks:").concat(a,", auxTracks:").concat(s," ")}},{key:"releaseTrack",value:function e(t,r){r.type===Qx.TRACK_TYPE_VIDEO?(t.stop({audio:!1,video:!0,resolutionIds:[r.trackId]}),t.removeRemoteVideoTrack(r.trackId),this.logger.info(uV,"releaseTrack ".concat(r.type))):(t.stop({audio:!0}),t.removeRemoteAudioTrack(),this.logger.info(uV,"releaseTrack ".concat(r.type)))}},{key:"clearResource",value:function e(t){try{null==t||t.forEach((e=>{var t,r,n,i;null===(t=e.mainStream)||void 0===t||null===(r=t.tracks4Unsubscribe)||void 0===r||r.forEach((t=>{this.stat.getMediaStat().deleteSubscribeInfo(e.userInfo.userId,qx.STREAM_TYPE_MAIN,t.trackId),this.releaseTrack(e.mainStream.remoteStream,t)})),null===(n=e.auxStream)||void 0===n||null===(i=n.tracks4Unsubscribe)||void 0===i||i.forEach((t=>{this.stat.getMediaStat().deleteSubscribeInfo(e.userInfo.userId,qx.STREAM_TYPE_AUX,t.trackId),this.releaseTrack(e.auxStream.remoteStream,t)}))}))}catch(e){this.logger.error(uV,"clearResource error: ".concat(e))}}},{key:"generateReceiveSdp",value:async function e(t,r,n,i){this.logger.info(uV,"generateReceiveSdp, stream type: ".concat(t,", removeVideoSsrcs: ").concat(n,", removeAudioSsrcs: ").concat(i));const o=r.some((e=>{var r;const n=t===qx.STREAM_TYPE_MAIN?e.mainStream:e.auxStream;return(null==n||null===(r=n.tracks)||void 0===r?void 0:r.length)>0})),a=!!n.length||!!i.length;if(!o&&!a)return null;a&&await this.connectionsManager.deleteUser(t,n,i);const s=new Map;for(const e of r){var u,c;const r=t===qx.STREAM_TYPE_MAIN?null===(u=e.mainStream)||void 0===u?void 0:u.tracks:null===(c=e.auxStream)||void 0===c?void 0:c.tracks;if(r&&!(r.length<1))for(const n of r){this.logger.info(uV,"generateReceiveSdp, userId : ".concat(e.userId,", stream type: ").concat(t,", track type: ").concat(n.type,", ssrc: ").concat(n.cssrc));const r={streamId:n.trackId};n.type===Qx.TRACK_TYPE_VIDEO?(r.videoSsrc=n.cssrc,this.logger.info(uV,"video track.trackId: ".concat(n.trackId))):(r.audioSsrc=n.cssrc,this.logger.info(uV,"audio track.trackId: ".concat(n.trackId))),s.has(e.userId)?s.get(e.userId).push(r):s.set(e.userId,[r])}}await this.connectionsManager.addUserBatch(t,s,0!==this.sfuConfigFec)}},{key:"appendSubscribeResult",value:function e(t,r){var n,i,o,a;if(r&&(null!==(n=r.mainStream)&&void 0!==n&&null!==(i=n.tracks)&&void 0!==i&&i.length||null!==(o=r.auxStream)&&void 0!==o&&null!==(a=o.tracks)&&void 0!==a&&a.length)){const e=t.find((e=>e.userId===r.userId&&e.roomId===r.roomId));var s,u;if(e)null!==(s=e.mainStream)&&void 0!==s&&s.tracks?e.mainStream.tracks.push(...r.mainStream.tracks):e.mainStream=r.mainStream,null!==(u=e.auxStream)&&void 0!==u&&u.tracks?e.auxStream.tracks.push(...r.auxStream.tracks):e.auxStream=r.auxStream;else t.push(r)}}},{key:"buildSubsReq",value:function e(r,n){const i=[],o=[],a=[];return r.forEach((e=>{if(e.curUserState===JM.NotJoin){var r,s,u,c,l,f;const i=t.newRemoteUserSubscribeInfo(e.userInfo.userId,this.roomId,null===(r=e.mainStream)||void 0===r?void 0:r.remoteStream,null===(s=e.auxStream)||void 0===s?void 0:s.remoteStream);null===(u=e.mainStream)||void 0===u||null===(c=u.tracks4Unsubscribe)||void 0===c||c.forEach((e=>{i.mainStream.tracks.push(e)})),null===(l=e.auxStream)||void 0===l||null===(f=l.tracks4Unsubscribe)||void 0===f||f.forEach((e=>{i.auxStream.tracks.push(e)})),this.appendSubscribeResult(n.successUnsubscribeInfos,i)}else{var d,h,p,v;a.push(e),null===(d=e.mainStream)||void 0===d||null===(h=d.allSubscribeTracks)||void 0===h||h.forEach((r=>{t.getUserTrackSubscribeInfo(e.userInfo,i,o,r)})),null===(p=e.auxStream)||void 0===p||null===(v=p.allSubscribeTracks)||void 0===v||v.forEach((r=>{t.getUserTrackSubscribeInfo(e.userInfo,i,o,r)}))}})),{videoSubscribeInfos:i,audioSubscribeInfos:o,joinUserUpdateInfos:a}}},{key:"subscribeSignal",value:async function e(r,n,i){const o=this.buildSubsReq(r,n);if(!t.isSubscriptionChange(o.joinUserUpdateInfos))return;const a=t.getWatchType4Ops(o.videoSubscribeInfos.length);let s;this.logger.info(uV,"subscribeSignal, fullVideoSubscribeInfos: ".concat(JSON.stringify(o.videoSubscribeInfos)," ,")+"fullAudioSubscribeInfos: ".concat(JSON.stringify(o.audioSubscribeInfos)));let u=null;const c=SI.getCurrentTimestamp();if(i){const e={timestamp:i.start,traceId:i.traceId,spanId:"0",originIntfName:"",interfaceName:"subscribe",source:"",target:"",resultCode:"",successFlag:"T",duration:c-i.start,async:"N",extendInfo:JSON.stringify({id:i.id})};this.stat.setFirstFrameInfo(e)}try{u=this.status!==ox.Leaving?await this.signal.subscribe(o.videoSubscribeInfos,o.audioSubscribeInfos,a):this.buildDefaultSubsRep(o)}catch(e){throw s=e,e}finally{if(i){const e=SI.getCurrentTimestamp(),t={timestamp:c,traceId:i.traceId,spanId:"0.1",originIntfName:i.interfaceName,interfaceName:"subscribeSignal",source:"",target:"",resultCode:"",successFlag:s?"F":"T",duration:e-c,async:"N",extendInfo:JSON.stringify({id:i.id,streamIds:i.streamIds})};this.stat.setFirstFrameInfo(t),i.interfaceName="subscribeSignal",i.start=e,this.startupQoSMap.set(i.id,i)}}u.audioUpstreams||u.videoUpstreams||this.logger.error(uV,"subscribeSignal, subscribe stream subscribed no result record, subsResult:".concat(JSON.stringify(u)));const l=t.getUserUpdateInfos(o.joinUserUpdateInfos);this.getSubscribeResult(l,u.videoUpstreams,u.audioUpstreams,n)}},{key:"buildDefaultSubsRep",value:function e(t){const r=[];t.videoSubscribeInfos.forEach((e=>{r.push({cSsrcId:e.cSsrcId,code:0,pSsrcId:e.pSsrcId,pStreamUid:e.pStreamUid,pUserId:e.pUserId,pUserUid:e.pUserUid})}));const n=[];return t.audioSubscribeInfos.forEach((e=>{n.push({cSsrcId:e.cSsrcId,code:0,pSsrcId:e.pSsrcId,pStreamUid:e.pStreamUid,pUserId:e.pUserId,pUserUid:e.pUserUid})})),{audioUpstreams:n,videoUpstreams:r}}},{key:"getSubscribeResult",value:function e(t,r,n,i,o){const a=new Map;null==r||r.forEach((e=>{const t=e.pUserId+"#"+this.roomId,r=a.get(t);if(r)r.tracks.push(e);else{const r={userId:e.pUserId,userUid:e.pStreamUid,tracks:[e]};a.set(t,r)}})),null==n||n.forEach((e=>{const t=e.pUserId+"#"+this.roomId,r=a.get(t);if(r)r.tracks.push(e);else{const r={userId:e.pUserId,userUid:e.pStreamUid,tracks:[e]};a.set(t,r)}})),t.forEach((e=>{this.getStreamSubscribeResult(e,!0,a,i)})),t.forEach((e=>{this.getStreamSubscribeResult(e,!1,a,i)})),this.logger.info(uV,"isRealSubsAction: ".concat(o,", getSubscribeResult success, ").concat(this.getSubscribeResultString(i)))}},{key:"getStreamSubscribeResult",value:function e(r,n,i,o){var a,s,u,c;if(!n)return this.handleUnsubscribeReq(qx.STREAM_TYPE_MAIN,r,o),void this.handleUnsubscribeReq(qx.STREAM_TYPE_AUX,r,o);const l=o.successSubscribeInfos,f=o.failSubscribeInfos,d=t.newRemoteUserSubscribeInfo(r.userInfo.userId,this.roomId,null===(a=r.mainStream)||void 0===a?void 0:a.remoteStream,null===(s=r.auxStream)||void 0===s?void 0:s.remoteStream),h=t.newRemoteUserSubscribeInfo(r.userInfo.userId,this.roomId,null===(u=r.mainStream)||void 0===u?void 0:u.remoteStream,null===(c=r.auxStream)||void 0===c?void 0:c.remoteStream),p=r.userInfo.userId+"#"+this.roomId,v=i.get(p);var m,y,g,b;if(!v&&this.hasTrackSignalReq(r))return f.push({userId:r.userInfo.userId,roomId:this.roomId,mainStream:{remoteStream:null===(m=r.mainStream)||void 0===m?void 0:m.remoteStream,tracks:null===(y=r.mainStream)||void 0===y?void 0:y.tracks4Subscribe},auxStream:{remoteStream:null===(g=r.auxStream)||void 0===g?void 0:g.remoteStream,tracks:null===(b=r.auxStream)||void 0===b?void 0:b.tracks4Subscribe}}),void this.logger.error(uV,"subscribe user ".concat(r.userInfo.userId,", isSubscribe: ").concat(n," subscribed failed,mcs not response"));this.getTracksSubscribeResults(n,r,v,d,h),this.appendToSubscribeResult(d,l,h,f)}},{key:"appendToSubscribeResult",value:function e(t,r,n,i){var o,a,s,u,c,l,f,d;((null===(o=t.mainStream)||void 0===o||null===(a=o.tracks)||void 0===a?void 0:a.length)>0||(null===(s=t.auxStream)||void 0===s||null===(u=s.tracks)||void 0===u?void 0:u.length)>0)&&this.appendSubscribeResult(r,t),((null===(c=n.mainStream)||void 0===c||null===(l=c.tracks)||void 0===l?void 0:l.length)>0||(null===(f=n.auxStream)||void 0===f||null===(d=f.tracks)||void 0===d?void 0:d.length)>0)&&this.appendSubscribeResult(i,n)}},{key:"handleUnsubscribeReq",value:function e(t,r,n){const i=t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream,o=null==i?void 0:i.tracks4Unsubscribe;if(null!=o&&o.length){var a,s,u,c,l;const e=null===(a=i.tracks4Subscribe)||void 0===a?void 0:a.some((e=>e.state===QM.remoteRejoinCache)),f=n.successSubscribeInfos.find((e=>e.userId===r.userInfo.userId&&e.roomId===r.userInfo.roomId)),d=t===qx.STREAM_TYPE_MAIN?null==f||null===(s=f.mainStream)||void 0===s?void 0:s.tracks:null==f||null===(u=f.auxStream)||void 0===u?void 0:u.tracks,h=!d||0===(null==d?void 0:d.filter((e=>e.state===QM.remoteRejoinCache)).length),p={userId:r.userInfo.userId,roomId:this.roomId,mainStream:{remoteStream:null===(c=r.mainStream)||void 0===c?void 0:c.remoteStream,tracks:t===qx.STREAM_TYPE_MAIN?o:[]},auxStream:{remoteStream:null===(l=r.auxStream)||void 0===l?void 0:l.remoteStream,tracks:t===qx.STREAM_TYPE_AUX?o:[]}};this.logger.info(uV,"handleUnsubscribeReq, hasSubscribeReq:".concat(e,", allSubscribeReqFailed:").concat(h)),e&&h?this.appendSubscribeResult(n.failUnsubscribeInfos,p):this.appendSubscribeResult(n.successUnsubscribeInfos,p)}}},{key:"hasTrackSignalReq",value:function e(t){var r,n,i,o;return(null===(r=t.mainStream)||void 0===r||null===(n=r.allSubscribeTracks)||void 0===n?void 0:n.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).length)>0||(null===(i=t.auxStream)||void 0===i||null===(o=i.allSubscribeTracks)||void 0===o?void 0:o.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO)).length)>0}},{key:"getTracksSubscribeResults",value:function e(t,r,n,i,o){var a,s,u,c;const l=t?null===(a=r.mainStream)||void 0===a?void 0:a.tracks4Subscribe:null===(s=r.mainStream)||void 0===s?void 0:s.tracks4Unsubscribe;null==l||l.forEach((e=>{this.getTrackSubscribeResult(t,r.userInfo.userId,e,qx.STREAM_TYPE_MAIN,n,i,o)}));const f=t?null===(u=r.auxStream)||void 0===u?void 0:u.tracks4Subscribe:null===(c=r.auxStream)||void 0===c?void 0:c.tracks4Unsubscribe;null==f||f.forEach((e=>{this.getTrackSubscribeResult(t,r.userInfo.userId,e,qx.STREAM_TYPE_AUX,n,i,o)}))}},{key:"getTrackSubscribeResult",value:function e(t,r,n,i,o,a,s){var u;const c=i===qx.STREAM_TYPE_MAIN?s.mainStream:s.auxStream,l=i===qx.STREAM_TYPE_MAIN?a.mainStream:a.auxStream,f=null==o||null===(u=o.tracks)||void 0===u?void 0:u.find((e=>e.cSsrcId===n.cssrc));f?0!==f.code?(c.tracks.push(n),this.logger.error(uV,"isSubscribe:".concat(t,", subscribe user ").concat(r," ").concat(i," streamUid:").concat(f.pStreamUid," subscribed failed,code:").concat(f.code))):l.tracks.push(n):this.logger.error(uV,"isSubscribe:".concat(t,", subscribe user ").concat(r,", ").concat(i,"\n track req id: ").concat(n.trackId,", ssrc ").concat(n.cssrc," subscribed failed,mcs not response"))}},{key:"updateUserList",value:async function e(t){this.logger.info(uV,"updateUserList start");try{t.infos.forEach((e=>{this.stat.getMediaStat().setEncryInfo(String(e.userId),String(e.userEid))})),await this.locker.lock("".concat(uV,":updateUserList"));const e=this.remoteUserManager.updateUserListInfo(this.roomId,t.infos);if(this.logger.info(uV,"updateUserList , begin"),!e||0===e.length)return void this.logger.error(uV,"updateUserList , userUpdateInfos is null");e.forEach((e=>{if(e.isUserNameChanged&&(this.logger.info(uV,"emit ".concat(lx.UserNameChanged,", ").concat(e.userInfo.userId,"}")),e.mainStream.remoteStream.updateUserName(e.userInfo.nickname),e.auxStream.remoteStream.updateUserName(e.userInfo.nickname),this.eventEmitter.emit(lx.UserNameChanged,{roomId:this.roomId,userId:e.userInfo.userId,userName:e.userInfo.nickname})),e.preUserState===JM.NotJoin&&e.curUserState===JM.Joined)this.logger.info(uV,"emit ".concat(lx.PeerJoin,", ").concat(e.userInfo.userId,":").concat(e.userInfo.nickname)),this.eventEmitter.emit(lx.PeerJoin,{userId:e.userInfo.userId,userName:e.userInfo.nickname,roomId:e.userInfo.roomId,relayRoomId:e.userInfo.relaySrcRoomId});else if(e.preUserState===JM.Joined&&e.curUserState===JM.NotJoin){var t,r,n,i;(null===(t=e.mainStream)||void 0===t||null===(r=t.removedTracks)||void 0===r?void 0:r.length)>0&&(this.logger.info(uV,"emit ".concat(lx.StreamRemoved,", ").concat(e.userInfo.userId,", ").concat(qx.STREAM_TYPE_MAIN)),this.eventEmitter.emit(lx.StreamRemoved,{stream:e.mainStream.remoteStream})),(null===(n=e.auxStream)||void 0===n||null===(i=n.removedTracks)||void 0===i?void 0:i.length)>0&&(this.logger.info(uV,"emit ".concat(lx.StreamRemoved,", ").concat(e.userInfo.userId,", ").concat(qx.STREAM_TYPE_AUX)),this.eventEmitter.emit(lx.StreamRemoved,{stream:e.auxStream.remoteStream})),this.logger.info(uV,"emit ".concat(lx.PeerLeave,", ").concat(e.userInfo.userId)),this.eventEmitter.emit(lx.PeerLeave,{userId:e.userInfo.userId,userName:e.userInfo.nickname,roomId:e.userInfo.roomId,relayRoomId:e.userInfo.relaySrcRoomId,reason:sx.HRTC_LEAVE_REASON_USER_LEAVE_ROOM}),this.stat.getMediaStat().updateAudioStreamInfos(e.userInfo.userId,"removed")}})),await this.updateSubscribe(e)}catch(e){this.logger.error(uV,"updateUserList occur exception ".concat(e))}finally{this.locker.unlock("".concat(uV,":updateUserList"))}}},{key:"refreshRemoteStreamList",value:async function e(t){this.logger.info(uV,"refreshRemoteStreamList start");try{const e={userId:t.userId,userUid:t.userUid,roomId:this.roomId,nickname:null};t.allAudioStreams=t.allAudioStreams.filter((e=>"cmd"!==e.content));const r=this.remoteUserManager.refreshRemoteStreamList(e,t.allVideoStreams,t.allAudioStreams);if(this.logger.info(uV,"refreshRemoteStreamList begin"),!r||0===r.length)return void this.logger.error(uV,"refreshRemoteStreamList , userUpdateInfos is null");const n=r.find((e=>e.userInfo.userId===t.userId));this.updateSingleUser(n),await this.updateSubscribe(r)}catch(e){this.logger.error(uV,"refreshRemoteStreamList occur exception ".concat(e))}}},{key:"updateSingleUser",value:function e(r){var n,i;r.isUserNameChanged&&(this.logger.info(uV,"emit ".concat(lx.UserNameChanged,", ").concat(r.userInfo.userId,"}")),r.mainStream.remoteStream.updateUserName(r.userInfo.nickname),r.auxStream.remoteStream.updateUserName(r.userInfo.nickname),this.eventEmitter.emit(lx.UserNameChanged,{roomId:this.roomId,userId:r.userInfo.userId,userName:r.userInfo.nickname})),r.preUserState===JM.NotJoin&&r.curUserState===JM.Joined&&(this.logger.info(uV,"emit ".concat(lx.PeerJoin,", ").concat(r.userInfo.userId,":").concat(r.userInfo.nickname)),this.eventEmitter.emit(lx.PeerJoin,{userId:r.userInfo.userId,userName:r.userInfo.nickname,roomId:r.userInfo.roomId,relayRoomId:r.userInfo.relaySrcRoomId}));const o=null===(n=r.mainStream)||void 0===n?void 0:n.remoteStream;o&&(t.isStreamAdd(qx.STREAM_TYPE_MAIN,r)?(this.logger.info(uV,"emit ".concat(lx.StreamAdded,", ").concat(r.userInfo.userId,", ").concat(o.getType(),"}")),this.eventEmitter.emit(lx.StreamAdded,{stream:o}),this.updateAudioStreamInfo(r.userInfo.userId,"add",o)):t.isStreamRemove(qx.STREAM_TYPE_MAIN,r)?(this.logger.info(uV,"emit ".concat(lx.StreamRemoved,", ").concat(r.userInfo.userId,", ").concat(o.getType(),"}")),this.eventEmitter.emit(lx.StreamRemoved,{stream:o}),this.updateAudioStreamInfo(r.userInfo.userId,"removed",o)):t.isStreamUpdate(qx.STREAM_TYPE_MAIN,r)&&(this.logger.info(uV,"emit ".concat(lx.StreamUpdated,", ").concat(r.userInfo.userId,", ").concat(o.getType(),"}")),this.eventEmitter.emit(lx.StreamUpdated,{stream:o}),this.updateAudioStreamInfo(r.userInfo.userId,"update",o)));const a=null===(i=r.auxStream)||void 0===i?void 0:i.remoteStream;a&&(t.isStreamAdd(qx.STREAM_TYPE_AUX,r)?(this.logger.info(uV,"emit ".concat(lx.StreamAdded,", ").concat(r.userInfo.userId,", ").concat(a.getType(),"}")),this.eventEmitter.emit(lx.StreamAdded,{stream:a})):t.isStreamRemove(qx.STREAM_TYPE_AUX,r)&&(this.logger.info(uV,"emit ".concat(lx.StreamRemoved,", ").concat(r.userInfo.userId,", ").concat(a.getType(),"}")),this.eventEmitter.emit(lx.StreamRemoved,{stream:a}))),r.preUserState===JM.Joined&&r.curUserState===JM.NotJoin&&(this.logger.info(uV,"emit ".concat(lx.PeerLeave,", ").concat(r.userInfo.userId)),this.eventEmitter.emit(lx.PeerLeave,{userId:r.userInfo.userId,userName:r.userInfo.nickname,roomId:r.userInfo.roomId,relayRoomId:r.userInfo.relaySrcRoomId,reason:sx.HRTC_LEAVE_REASON_USER_LEAVE_ROOM}),this.stat.getMediaStat().updateAudioStreamInfos(r.userInfo.userId,"removed")),this.handleMuteStatus(r)}},{key:"updateAudioStreamInfo",value:function e(t,r,n){var i;if("add"===r)null!==(i=n.getStreamInfo())&&void 0!==i&&i.audioProfile&&this.stat.getMediaStat().updateAudioStreamInfos(t,"add");else if("removed"===r)this.stat.getMediaStat().updateAudioStreamInfos(t,"removed");else{var o;null!==(o=n.getStreamInfo())&&void 0!==o&&o.audioProfile?this.stat.getMediaStat().updateAudioStreamInfos(t,"add"):this.stat.getMediaStat().updateAudioStreamInfos(t,"removed")}}},{key:"remoteUserDisconnectNotify",value:function e(t){t&&this.logger.info(uV,"remoteDisconnectNotify, userId:".concat(t.userId))}},{key:"remoteUserReconnectNotify",value:function e(t){if(!t)return;this.logger.info(uV,"remoteReconnectNotify, userId:".concat(t.userId));const r={userId:t.userId,userUid:t.userUid,roomId:this.roomId,nickname:null};this.remoteUserManager.remoteUserReconnect(r,t.videoStreams,t.audioStreams)}},{key:"updateAppData",value:function e(t){const r=t.userId,n=t.appData.nickname;r&&t.userId!==this.userInfo.userId&&(this.remoteUserManager.updateUserName(r,this.roomId,n),this.eventEmitter.emit(lx.UserNameChanged,{roomId:this.roomId,userId:r,userName:n}))}},{key:"updateRemoteStream",value:async function e(t){this.logger.info(uV,"updateRemoteStream start");try{const e={userId:t.userId,userUid:t.userUid,roomId:this.roomId,nickname:null},r=this.remoteUserManager.updateRemoteStream(e,t.videoStreams,t.audioStreams);if(this.logger.info(uV,"updateRemoteStream , begin"),!r)return void this.logger.error(uV,"updateRemoteStream , userUpdateInfos is null");this.handleMuteStatus(r)}catch(e){this.logger.error(uV,"updateRemoteStream occur exception ".concat(e))}}},{key:"handleMuteStatus",value:function e(r){this.logger.info(uV,"handleMuteStatus begin");const n=t.getMuteChangeStatus(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO,r);n!==aV.noChange&&(this.emitMediaStatusChange(r.userInfo.userId,r.userInfo.roomId,Qx.TRACK_TYPE_AUDIO,n),n===aV.unmute?this.stat.getMediaStat().updateAudioStreamInfos(this.userInfo.userId,"add"):this.stat.getMediaStat().updateAudioStreamInfos(this.userInfo.userId,"removed"));const i=t.getMuteChangeStatus(qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_VIDEO,r);i!==aV.noChange&&this.emitMediaStatusChange(r.userInfo.userId,r.userInfo.roomId,Qx.TRACK_TYPE_VIDEO,i)}},{key:"removeRemoteStream",value:async function e(t){this.logger.info(uV,"removeRemoteStream start");try{const e={userId:t.userId,userUid:t.userUid,roomId:this.roomId,nickname:null};t.allAudioStreams=t.allAudioStreams.filter((e=>"cmd"!==e.content));const r=this.remoteUserManager.refreshRemoteStreamList(e,t.allVideoStreams,t.allAudioStreams);if(this.logger.info(uV,"removeRemoteStream begin"),!r||0===r.length)return void this.logger.error(uV,"removeRemoteStream , userUpdateInfos is null");const n=r.find((e=>e.userInfo.userId===t.userId));this.updateSingleUser(n),await this.updateSubscribe(r)}catch(e){this.logger.error(uV,"removeRemoteStream occur exception ".concat(e))}}},{key:"emitMediaStatusChange",value:function e(t,r,n,i){const o={roomId:r,userId:t,status:i===aV.unmute?zP.MediaStatusAvailable:zP.MediaStatusUnavailable,reason:i===aV.unmute?QP.MediaUnmuted:QP.MediaMuted},a=n===Qx.TRACK_TYPE_AUDIO?i===aV.unmute?"UnmuteAudio":"MuteAudio":i===aV.unmute?"UnmuteVideo":"MuteVideo";this.logger.info(uV,"emit ".concat(lx[a],", userId: ").concat(t,", type: ").concat(n,", status: ").concat(o.status)),this.eventEmitter.emit(lx[a],o)}},{key:"waitNotifyConfig",value:function e(t){return new Promise(((e,r)=>{const n={id:t.length+1,domain:"",start_ms:SI.getCurrentTimestamp(),delay_ms:0,stepName:"configNotify",rspCode:"",errMsg:""};let i=null;this.waitConfigCallbackFunc=()=>{clearTimeout(i),e(),n.delay_ms=SI.getCurrentTimestamp()-n.start_ms,n.rspCode="OK",t.push(n)},this.validSignatureFunc=e=>{clearTimeout(i),r(new oc(e.code,e.message))},i=setTimeout((()=>{this.logger.error(uV,"wait config timeout"),n.rspCode="".concat(nc.RTC_ERR_CODE_WAIT_CONFIG_FAIL),n.errMsg=ic[nc.RTC_ERR_CODE_WAIT_CONFIG_FAIL],n.delay_ms=SI.getCurrentTimestamp()-n.start_ms,t.push(n),e()}),Gx)}))}},{key:"handleConfigNotifyBody",value:function e(t){const{controlDisconnectTimeout:r="30",controlHoldTimeout:n="120",controlPingPeriod:i="5"}=t.appConfigs||{};this.sfuConfigs={},this.sfuConfigFec=0;for(const e of Jx)Object.prototype.hasOwnProperty.call(t.appConfigs,e)&&("webPlayoutMinDelay"!==e&&"webPlayoutMaxDelay"!==e&&"minBitrateByRemb"!==e||"string"!=typeof t.appConfigs[e]?"webFlexfec03"===e?this.sfuConfigFec=Number(t.appConfigs[e]):this.sfuConfigs[e]=t.appConfigs[e]:this.sfuConfigs[e]=Number(t.appConfigs[e]));const o={heartBeatRetryTimes:parseInt(r)/parseInt(i)||Fx,connectionTimeout:parseInt(n)||Hx,heartBeatPeriod:parseInt(i)||Zx};this.waitConfigCallbackFunc&&this.waitConfigCallbackFunc(),this.stat.setTraceInfo(t.traceId),iU.setLogServerConfigs(t.logServerConfigs),this.signal.setConfigParams(o)}},{key:"uploadLog",value:async function e(t){await iU.uploadLogFile(this,t)}},{key:"handleWatchMsg",value:async function e(t){if(null!=t)try{const e=t,r=e.videoSsrcIds,n=e.audioSsrcIds;if(this.sdpRepInfo.cmd&&(null==n?void 0:n.length)>0&&0===n.filter((e=>this.sdpRepInfo.cmd.sendSsrc!==e)).length)return;const i=r.filter((e=>this.sdpRepInfo.video.sendSsrcRange.find((t=>e===t)))),o=r.filter((e=>this.sdpRepInfo.desktopVideo.sendSsrcRange.find((t=>e===t)))),a=[],s=[],u={mainStreamVideoTracks2Update:{},mainStreamAudioTracks2Update:{},auxStreamTracks2Update:{}},c=this.streamPublishManager.generatePubInfoWhenWatch(qx.STREAM_TYPE_MAIN,i,n||[],Qx.TRACK_TYPE_VIDEO);if(await this.publishWhenWatch(qx.STREAM_TYPE_MAIN,c),i&&i.length>0&&(null==c||c.tracks2NewPublish.forEach((e=>{r.find((t=>t===e.ssrc))&&a.push({ssrcId:e.ssrc,status:0})})),null==c||c.tracks2KeepPublish.forEach((e=>{a.push({ssrcId:e.ssrc,status:0})})),u.mainStreamVideoTracks2Update=c),n&&n.length>0){const e=this.streamPublishManager.generatePubInfoWhenWatch(qx.STREAM_TYPE_MAIN,[],n);await this.publishWhenWatch(qx.STREAM_TYPE_MAIN,e),null==e||e.tracks2NewPublish.forEach((e=>{n.find((t=>t===e.ssrc))&&s.push({ssrcId:e.ssrc,status:0})})),null==e||e.tracks2KeepPublish.forEach((e=>{s.push({ssrcId:e.ssrc,status:0})})),u.mainStreamAudioTracks2Update=e}if(o&&o.length>0){const e=this.streamPublishManager.generatePubInfoWhenWatch(qx.STREAM_TYPE_AUX,o,[]);await this.publishWhenWatch(qx.STREAM_TYPE_AUX,e),null==e||e.tracks2NewPublish.forEach((e=>{r.find((t=>t===e.ssrc))&&a.push({ssrcId:e.ssrc,status:0})})),null==e||e.tracks2KeepPublish.forEach((e=>{a.push({ssrcId:e.ssrc,status:0})})),u.auxStreamTracks2Update=e}this.logger.info(uV,"handle watch success, videoSsrcs: ".concat(JSON.stringify(r),", audioSsrcs: ").concat(JSON.stringify(n)));const l=this.stat.getSpanId(e["x-nuwa-span-id"]),f=SI.generateRandomId(16,16);this.stat.setParentSpanId(f,l);const d={type:"WATCH_STREAM_NOTIFY",requestId:e.requestId,traceId:e.traceId,version:e.version,videoSsrcIds:a,audioSsrcIds:s,"x-nuwa-trace-id":e["x-nuwa-trace-id"],"x-nuwa-span-id":f};await this.signal.pushStreamResponse(d),this.reportMediaStreamInfo(u,a),this.logger.info(uV,"handleWatchMsg success")}catch(e){this.logger.error(uV,"handleWatchMsg occur error ".concat(e))}else this.logger.error(uV,"message is null")}},{key:"reportMediaStreamInfo",value:function e(t,r){var n,i,o,a;if(null!==(n=t.mainStreamVideoTracks2Update)&&void 0!==n&&null!==(i=n.tracks2NewPublish)&&void 0!==i&&i.find((e=>e.type===Qx.TRACK_TYPE_VIDEO))){this.stat.getMediaStat().setLocalMainStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedMainStreamInfos())&&this.buildSendMediaStreamInfo(JP.Video,r)}if(null!==(o=t.auxStreamTracks2Update)&&void 0!==o&&null!==(a=o.tracks2NewPublish)&&void 0!==a&&a.filter((e=>e.type===Qx.TRACK_TYPE_VIDEO))){this.stat.getMediaStat().setLocalAuxsStreamInfo(this.userInfo.userId,this.streamPublishManager.getPublishedAuxStreamInfo())&&this.buildSendMediaStreamInfo(JP.Aux)}}},{key:"publishWhenWatch",value:async function e(t,r){if(!r||0===r.tracks2NewPublish.length&&0===r.tracks2KeepPublish.length&&0===r.tracks2UnPublish.length)return void this.logger.info(uV,"handleWatchMsg, watched track no update");const n=this.streamPublishManager.getLocalStream(t);await this.sendPublishRequest(r.allTracks2Publish),await this.startStreamResolutionDetection(n),await this.updateStreamTracks(n,r),this.logger.info(uV,"handleWatchMsg, published stream")}},{key:"setCameraCaptureReport",value:function e(t,r){this.stat.setCameraInfo(t,r)}},{key:"signalEvent",value:function e(){this.signal.on($P.watchStreamNotify,(e=>{this.handleWatchMsg(e)})),this.signal.on($P.pushStreamNotify,(e=>{this.refreshRemoteStreamList(e)})),this.signal.on($P.stopPushStreamNotify,(e=>{this.removeRemoteStream(e)})),this.signal.on($P.changeStreamStatusNotify,(e=>{this.updateRemoteStream(e)})),this.signal.on($P.appDataChangeNotify,(e=>{this.updateAppData(e)})),this.signal.on($P.disconnectNotify,(e=>{this.remoteUserDisconnectNotify(e)})),this.signal.on($P.reconnectNotify,(e=>{this.remoteUserReconnectNotify(e)})),this.signal.on($P.configNotify,(e=>{this.handleConfigNotifyBody(e)})),this.signal.on($P.top3AudioVolumeNotify,(e=>{this.handleMaxVolumeNotify(e)})),this.signal.on($P.statusChangeNotify,(async e=>{await this.updateUserList(e)})),this.signal.on($P.uploadLogNotify,(async e=>{await this.uploadLog(e)})),this.signal.on($P.publishStatusNotify,(e=>{this.handlePublishStatusNotify(e)})),this.signal.on(HD.Reconnected,(async()=>{await this.refreshRoomUserInfos()})),this.signal.on(HD.SessionUnavailable,(async()=>{this.logger.info(uV,"".concat(HD.SessionUnavailable));await this.rejoinLoop(120)})),this.signal.on(HD.ConnectionUnavailable,(async()=>{this.logger.info(uV,"".concat(HD.ConnectionUnavailable));await this.rejoinLoop(120)})),this.signal.on(HD.AuthenticateFail,(async()=>{this.logger.info(uV,"".concat(HD.AuthenticateFail)),this.doLeaveRoom()})),this.signal.on(HD.SignatureExpired,(e=>{this.handleNotifySignatureExpired(e)})),this.signal.on(lx.ConnectionStateChanged,(e=>{this.handleNotifyConnectStateChange(e)})),this.signal.on(lx.NetworkQuality,(e=>{this.eventEmitter.emit(lx.NetworkQuality,e)})),this.signal.on(HD.ClientBanned,(()=>{this.eventEmitter.emit(lx.ClientBanned,{userId:this.userInfo.userId}),this.kickRoom(),this.logger.info(uV,"kick leave success")})),this.signal.on($P.roomStreamStatusNotify,(e=>{this.handleNotifyRoomStreamStatus(e)})),this.signal.on($P.kickRoomNotify,(()=>{this.eventEmitter.emit(lx.KickRoomStatus,this.roomId),this.kickRoom(),this.logger.info(uV,"kick room success")}))}},{key:"kickRoom",value:function e(){this.cleanup(),this.cleanTransportStats(),this.stat.leaveRoom(),DM.immediateReportRecords()}},{key:"refreshRoomUserInfos",value:async function e(){const t=await this.signal.queryRoomUsers(null);await this.doRefreshRoomUserInfos(this.roomId,t.userInfos,!1)}},{key:"doRefreshRoomUserInfos",value:async function e(t,r,n){try{this.logger.debug(uV,"doRefreshRoomUserInfos, begin");const e=this.remoteUserManager.refreshRemoteUserList(t,r,n);if(!e)return null;e.forEach((e=>{this.updateSingleUser(e)})),await this.updateSubscribe(e)}catch(e){this.logger.error(uV,"doRefreshRoomUserInfos, error:".concat(e))}}},{key:"rejoinLoop",value:async function e(t){if(this.isLoopRejoining)return void this.logger.info(uV,"rejoinLoop, isLoopRejoining so return");let r=!1;try{this.isLoopRejoining=!0;const e=async e=>await this.handleRejoin(e),n=e=>"function"==typeof(null==e?void 0:e.getCode)&&e.getCode()===nc.RTC_ERR_CODE_STATUS_ERROR;await KN.callWithRetryTimes(e,!1,t,oV,n),r=!0}catch(e){this.logger.error(uV,"rejoinLoop, rejoin room failed, leave room, error:".concat(e)),this.localRejoinFlag||(this.connectState={prevState:YP[KP.RECONNECTING],curState:YP[KP.DISCONNECTED]},this.eventEmitter.emit(lx.ConnectionStateChanged,this.connectState));try{await this.leaveImpl()}catch(e){this.logger.error(uV,"rejoinLoop, leave failed, error:".concat(e))}}finally{r||this.eventEmitter.emit(lx.LocalLeave),this.isLoopRejoining=!1}}},{key:"handleRejoin",value:async function e(t){if(this.logger.info(uV,"handleRejoin, client status: ".concat(this.status,", tryNumber:").concat(t)),this.status===ox.Idle)throw this.logger.error(uV,"handleRejoin, status:".concat(ox.Idle)),new oc(nc.RTC_ERR_CODE_STATUS_ERROR,"handleRejoin but status is Idle");if(this.isSignatureExpired){if(this.signatureExpiredRejoinTimeout)return void this.logger.info(uV,"signature expired, try rejoin, timer already exists");this.signatureExpiredRejoinTimeout=setTimeout((()=>{throw this.logger.error(uV,"handleRejoin, signature expired and retry limit, exit"),this.cleanup(),new oc(nc.RTC_ERR_CODE_STATUS_ERROR,"handleRejoin but signature expired")}),2e4)}try{await this.locker.lock("".concat(uV,":handleRejoin")),this.status=ox.Rejoining,await this.rejoin(this.roomId,FD.transLocalUserToJoinConfig(this.userInfo)),this.getSessionStatus()===ox.Joined&&(this.logger.info(uV,"handleRejoin, rejoin room success"),this.isSignatureExpired=!1,clearTimeout(this.signatureExpiredRejoinTimeout),this.signatureExpiredRejoinTimeout=void 0,this.connectState={prevState:YP[KP.RECONNECTING],curState:YP[KP.CONNECTED]},this.eventEmitter.emit(lx.ConnectionStateChanged,this.connectState),await this.rejoinPublish(),this.localRejoinFlag=!1)}finally{this.locker.unlock("".concat(uV,":handleRejoin"))}}},{key:"rejoinPublish",value:async function e(){this.logger.info(uV,"rejoin publish stream"),this.connectState.prevState=YP[KP.DISCONNECTED];const t=[],r=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN),n=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_AUX);r&&t.push(r),n&&t.push(n),t.length>0&&await this.rejoinPublishStreams(t)}},{key:"handleNotifySignatureExpired",value:function e(t){this.logger.warn(uV,"handleNotifySignatureExpired");const r={code:0,reason:""};"reconnect"===t.type?(this.logger.warn(uV,"reconnect but signature expired"),r.code=nc.RTC_ERR_CODE_SIGNATURE_EXPIRED,r.reason=ic[nc.RTC_ERR_CODE_SIGNATURE_EXPIRED]):this.isLoopRejoining?(this.logger.warn(uV,"rejoin but signature expired"),this.isSignatureExpired=!0,r.code=nc.RTC_ERR_CODE_SIGNATURE_EXPIRED,r.reason=ic[nc.RTC_ERR_CODE_SIGNATURE_EXPIRED]):(r.code=nc.RTC_ERR_CODE_SIGNATURE_INVALID,r.reason=ic[nc.RTC_ERR_CODE_SIGNATURE_INVALID]),this.validSignatureFunc&&this.validSignatureFunc(r),this.validSignatureFunc=void 0;const n={errorCode:"".concat(r.code),errorMsg:r.reason};this.eventEmitter.emit(lx.SignatureExpired,n)}},{key:"handleNotifyConnectStateChange",value:function e(t){this.logger.info(uV,"ConnectStateChange"),this.eventEmitter.emit(lx.ConnectionStateChanged,t),this.connectState.curState=t.curState}},{key:"cleanNetworkStatistic",value:function e(){this.preNetQuality=null,this.downLinkData=null,this.upLinkData=null}},{key:"cleanup",value:function e(){var t,r,n;null===(t=this.signal)||void 0===t||t.disconnect(),this.signal=null,this.resetConnection(),null===(r=this.remoteUserManager)||void 0===r||r.clear(this.roomId);const i=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN);if(i){i.removeClient(this)}this.streamPublishManager.reset(),clearTimeout(this.streamInterruptedDetectInterval),clearTimeout(this.rtcStatsInterval),clearTimeout(this.netQualityTimer),clearTimeout(this.transportStatsTimer),tN.reset(),this.cleanNetworkStatistic(),this.streamInterruptedDetectInterval=null,this.rtcStatsInterval=null,this.lastCycleFrameDecodedMap.clear(),this.streamInterruptedUsersMap.clear(),this.startupQoSMap.clear(),this.status=ox.Idle,this.locker.clear(),clearInterval(this.audioLevelTimer),aU.stopRelayConnection(this,this.roomId),null===(n=this.cmdMsgAbility.cmdManager)||void 0===n||n.reset(),this.isSignatureExpired=!1,clearTimeout(this.signatureExpiredRejoinTimeout),this.signatureExpiredRejoinTimeout=void 0}},{key:"addSsrc4Top3",value:async function e(t){var r;return this.audioStreams4TopN.close(),await this.addSsrc2SdpBatch(t,null===(r=this.sdpRepInfo.audio)||void 0===r?void 0:r.topNSsrcBegin)}},{key:"setAudioLevelStatTimer",value:function e(){this.audioLevelTimer&&clearInterval(this.audioLevelTimer),this.logger.info(uV,"setAudioLevelStatTimer"),this.audioLevelTimer=setInterval((()=>{try{this.audioStreams4TopN.getAudioLevel().forEach((e=>{const t=Math.round(100*e.level);this.stat.getMediaStat().updateAudioLevel({type:"remotetop3",level:t,ssrc:e.ssrc})}));const e=this.remoteUserManager.getAllUserStreamsByType(this.roomId,qx.STREAM_TYPE_MAIN,Qx.TRACK_TYPE_AUDIO),t=[];e.forEach((e=>{const r=e.mainStream.tracks.find((e=>e.isTrackReady&&e.type===Qx.TRACK_TYPE_AUDIO&&e.isSubscribed));r&&t.push({userId:e.userId,ssrc:r.cssrc})}));for(const e of t){const t=this.remoteUserManager.getUserInfoById(e.userId,this.roomId),r=Math.round(100*t.mainStream.remoteStream.getAudioLevel());this.stat.getMediaStat().updateAudioLevel({type:"remote",level:r,ssrc:e.ssrc,userId:e.userId})}const r=this.streamPublishManager.getLocalStream(qx.STREAM_TYPE_MAIN),n=Math.round(100*(r?r.getAudioLevel():0));this.stat.getMediaStat().updateAudioLevel({type:"local",level:n})}catch(e){this.logger.error(uV,"setAudioLevelStatTimer, occur error: ".concat(e))}}),this.audioLevelInterval)}},{key:"addSsrc2SdpBatch",value:async function e(t,r){if(!r)return null;const n={answerSdp:t},i=await this.connectionsManager.addTopAudioUserBatch(n.answerSdp,r,3,((e,t)=>{this.audioStreams4TopN.addAudioStream(e,t)}));return this.stat.getMediaStat().setStartSsrc(r),i}},{key:"saveAudioStream4TopN",value:async function e(t){this.logger.info(uV,"AudioPolicy:TOPN_AUDIOPOLICY, save audio stream, streamId: ".concat(t.streams[0].id));if(null!=this.audioStreams4TopN.getAudioStream(t.streams[0].id)){this.audioStreams4TopN.updateAudioStream(t.streams[0].id,t.track),this.logger.info(uV,"AudioPolicy:TOPN_AUDIOPOLICY, save audio stream ok, streamId: ".concat(t.streams[0].id));try{await this.audioStreams4TopN.play(t.streams[0].id),this.audioStreams4TopN.setAudioVolume4Id(t.streams[0].id,this.topNAudioVolume),this.logger.info(uV,"AudioPolicy:TOPN_AUDIOPOLICY, auto play audio success, streamId: ".concat(t.streams[0].id))}catch(e){this.logger.error(uV,"AudioPolicy:TOPN_AUDIOPOLICY, auto play audio fail, ".concat(null==e?void 0:e.message,", code:").concat(null==e?void 0:e.errCode)),this.eventEmitter.emit(lx.Error,{errCode:nc.RTC_ERR_CODE_PLAY_NOT_ALLOW,errDesc:"AudioPolicy:TOPN_AUDIOPOLICY, auto play audio fail, ".concat(null==e?void 0:e.message,", code:").concat(null==e?void 0:e.errCode)})}}else this.logger.error(uV,"AudioPolicy:TOPN_AUDIOPOLICY, audio stream of streamId: ".concat(t.streams[0].id," not exist"))}},{key:"handleMaxVolumeNotify",value:function e(t){try{t.topUserAudios&&t.topUserAudios.length>0?(this.top3VolumeUserIds.length=0,t.topUserAudios.forEach((e=>{e.volume=100*(60-(e.volume>60?60:e.volume))/60,this.top3VolumeUserIds.push({user_id:e.userId,volume:e.volume})})),this.audioPolicy===$x.TOPN_AUDIOPOLICY&&this.eventEmitter.emit(lx.VolumeIndicator,{userVolumeInfos:this.top3VolumeUserIds})):this.logger.error(uV,"handleMaxVolumeNotify error,topUserAudios is null")}catch(e){this.logger.error(uV,"handleMaxVolumeNotify error ".concat(null==e?void 0:e.message))}}},{key:"handlePublishStatusNotify",value:function e(t){try{t.urlStatus&&(this.logger.info(uV,"emit ".concat(lx.LiveStreamingUpdated)),this.eventEmitter.emit(lx.LiveStreamingUpdated,t.urlStatus))}catch(e){this.logger.error(uV,"handlePublishStatusNotify error ".concat(e))}}},{key:"setVolume4TopThree",value:function e(t){this.setVolume4TopThreeImpl(t)}},{key:"setVolume4TopThreeImpl",value:function e(t){this.logger.debug(uV,"setVolume4TopThreeImpl volume: "+t),t>100||t<0||this.audioPolicy===$x.TOPN_AUDIOPOLICY&&(this.topNAudioVolume=t,this.audioStreams4TopN.setAudioVolume(t))}},{key:"muteAudio4TopThree",value:function e(t){this.muteAudio4TopThreeImpl(t)}},{key:"muteAudio4TopThreeImpl",value:function e(t){this.logger.debug(uV,"muteAudio4TopThree enable: "+t),this.audioPolicy===$x.TOPN_AUDIOPOLICY&&this.audioStreams4TopN.muteAudio(t)}},{key:"setAudioOutput4TopThree",value:async function e(t){this.audioPolicy===$x.TOPN_AUDIOPOLICY&&await this.audioStreams4TopN.setAudioOutput(t)}},{key:"isTopNAudioMuted",value:function e(){return this.isTopNAudioMutedImpl()}},{key:"isTopNAudioMutedImpl",value:function e(){let t=!1;return this.audioPolicy===$x.TOPN_AUDIOPOLICY&&(t=this.audioStreams4TopN.isAudioMuted(),this.logger.debug(uV,"isTopNAudioMutedImpl : "+t)),t}},{key:"changeUserName",value:async function e(t){return await this.changeUserNameImpl(t)}},{key:"changeUserNameImpl",value:async function e(t){try{return PM.checkUserName(t),await this.signal.appData(this.userInfo.appData,"nickname",t),this.userInfo.appData.nickname=t,!0}catch(e){return this.logger.error(uV,"changeUserNameImpl, error:".concat(e)),!1}}},{key:"reportAudioMuteInfo",value:function e(t,r){this.stat.reportAudioMuteInfo(t,r)}},{key:"reportVideoMuteInfo",value:function e(t,r){this.stat.reportVideoMuteInfo(t,r)}},{key:"startLiveStreaming",value:async function e(t,r,n,i){return await this.startLiveStreamingImpl(t,r,n,i)}},{key:"startLiveStreamingImpl",value:async function e(t,r,n,i){if(this.logger.info(uV,"startLiveStreaming: publishConfig: ".concat(JSON.stringify(n),", userConfig: ").concat(JSON.stringify(i))),!(r&&t&&n&&i))throw this.logger.error(uV,"startLiveStreaming failed for parameter error: empty parameter"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(this.status!==ox.Joined||this.userInfo.role!==UD)throw this.logger.error(uV,"startLiveStreaming failed for permission not allowed"),new oc(nc.RTC_ERR_CODE_ROLE_NO_PERMISSION);const o=this.getLiveStreamingUserInfos(i,99===n.template);if(0===o.length)throw this.logger.error(uV,"startLiveStreaming failed for parameter error:".concat(JSON.stringify(i))),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);try{await this.signal.startLiveStreaming(t,r,n,o),this.logger.info(uV,"startLiveStreaming success, taskId: ".concat(t,", url: ").concat(r))}catch(e){throw this.logger.error(uV,"startLiveStreaming failed: ".concat(e)),e}}},{key:"getLiveStreamingUserInfos",value:function e(t,r){if(!t||0===t.length)return null;const n=[],i=this.userInfo.userId;return t.forEach((e=>{const t={userId:e.userId,audioStreams:[],videoStreams:[],layouts:[]};if(r&&!e.layouts)throw this.logger.error(uV,"getLiveStreamingUserInfos, layouts is null when template=99"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);e.userId===i?this.getLocalLiveStreamingUserInfos(e,t,r):this.getRemoteLiveStreamingUserInfos(e,t,r),(t.audioStreams.length||t.videoStreams.length)&&n.push(t)})),this.logger.info(uV,"getLiveStreamingUserInfos, publishInfos : ".concat(JSON.stringify(n))),n}},{key:"getLocalLiveStreamingUserInfos",value:function e(r,n,i){const o=this.streamPublishManager.getPublishedMainStreamInfos();if(r.audio){var a;const e=null==o||null===(a=o.find((e=>e.type===Qx.TRACK_TYPE_AUDIO)))||void 0===a?void 0:a.ssrc;e&&n.audioStreams.push(e)}if(!r.resolutionIds||0===r.resolutionIds.length)return;const s=this.streamPublishManager.getPublishedAuxVideoTrackInfo();r.resolutionIds.forEach((e=>{var a;const u=null==o||null===(a=o.find((t=>t.resolutionId===e)))||void 0===a?void 0:a.ssrc;u?t.updateSlidePublishInfo(r,n,u,e,i):(null==s?void 0:s.resolutionId)===e&&t.updateSlidePublishInfo(r,n,s.ssrc,e,i)}))}},{key:"getRemoteLiveStreamingUserInfos",value:function e(r,n,i){const o=this.remoteUserManager.getAllUserStreamsByType(this.roomId,null,null),a=null==o?void 0:o.find((e=>e.userId===r.userId));if(a){if(r.audio){var s,u,c;const e=null===(s=a.mainStream)||void 0===s||null===(u=s.tracks)||void 0===u||null===(c=u.find((e=>e.type===Qx.TRACK_TYPE_AUDIO)))||void 0===c?void 0:c.pssrc;e&&n.audioStreams.push(e)}if(!r.resolutionIds||0===r.resolutionIds.length)return;for(const e of r.resolutionIds){var l,f,d;const o=null===(l=a.mainStream)||void 0===l||null===(f=l.tracks)||void 0===f||null===(d=f.find((t=>t.trackId===e)))||void 0===d?void 0:d.pssrc;if(o)t.updateSlidePublishInfo(r,n,o,e,i);else{var h,p,v;const o=null===(h=a.auxStream)||void 0===h||null===(p=h.tracks)||void 0===p||null===(v=p.find((t=>t.trackId===e)))||void 0===v?void 0:v.pssrc;o&&t.updateSlidePublishInfo(r,n,o,e,i)}}}}},{key:"updateLiveStreaming",value:async function e(t,r,n,i){return await this.updateLiveStreamingImpl(t,r,n,i)}},{key:"updateLiveStreamingImpl",value:async function e(t,r,n,i){if(this.logger.info(uV,"updateLiveStreaming: publishConfig: ".concat(JSON.stringify(n),", userConfig: ").concat(JSON.stringify(i))),!(r&&t&&n&&i))throw this.logger.error(uV,"updateLiveStreaming failed for parameter error: empty param"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);if(this.status!==ox.Joined||this.userInfo.role!==UD)throw this.logger.error(uV,"updateLiveStreaming failed for permission not allowed"),new oc(nc.RTC_ERR_CODE_ROLE_NO_PERMISSION);const o=this.getLiveStreamingUserInfos(i,99===n.template);try{await this.signal.updateLiveStreaming(t,n,o),this.logger.info(uV,"updateLiveStreaming success, taskId: ".concat(t,", url: ").concat(r))}catch(e){throw this.logger.error(uV,"updateLiveStreaming failed: ".concat(e)),e}}},{key:"stopLiveStreaming",value:async function e(t){return await this.stopLiveStreamingImpl(t)}},{key:"stopLiveStreamingImpl",value:async function e(t){if(this.logger.info(uV,"stopLiveStreaming: taskId: ".concat(t)),!t)throw this.logger.error(uV,"stopLiveStreaming failed for parameter error: taskId is empty"),new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);try{await this.signal.stopLiveStreaming(t),this.logger.info(uV,"stopLiveStreaming success, taskId: ".concat(t))}catch(e){throw this.logger.error(uV,"stopLiveStreaming failed: ".concat(e)),e}}},{key:"setProxyServer",value:function e(t){xM.setPorxyServer(t)}},{key:"setTurnServer",value:function e(t){var r;null===(r=this.connectionsManager)||void 0===r||r.setTurnServer(t)}},{key:"addMultiRoomMediaRelay",value:async function e(t){if(this.status!==ox.Joined)throw this.logger.error(uV,"addMultiRoomMediaRelay failed for not joined room."),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION);PM.checkSrcMultiRoomInfo(t.srcRoomRelayInfo);for(const e of t.dstRoomRelayInfo)PM.checkDstMultiRoomInfo(e,this.userInfo.role);const r=new Map;t.dstRoomRelayInfo.forEach((e=>{r.set(e.roomId,e.role)}));const n=await this.signal.mediaRelay(t,!0,this.userInfo),i=[];return n.addResult.forEach((async e=>{i.push({roomId:e.roomId,result:e.resultCode,msg:e.resultMessage}),0===e.resultCode?this.userInfo.addRelayInfo(e.roomId,r.get(e.roomId)):this.logger.error(uV,"addMultiRoomMediaRelay failed, roomId: ".concat(e.roomId,", resultCode: ").concat(e.resultCode,", errMsg: ").concat(e.resultMessage)),this.stat.reportRelayJoinInfo({code:e.resultCode,acsAddr:"",requestId:n.requestId,traceId:n.traceId,roomId:e.roomId,role:r.get(e.roomId),roomUid:e.roomUid,failMessage:e.resultMessage})})),i}},{key:"stopMultiRoomMediaRelay",value:async function e(t){if(this.status!==ox.Joined)throw this.logger.error(uV,"stopMultiRoomMediaRelay failed for not joined room."),new oc(nc.RTC_ERR_CODE_INVALID_OPERATION);let r;if(t&&t.dstRoomRelayInfo&&0!==t.dstRoomRelayInfo.length){PM.checkSrcMultiRoomInfo(t.srcRoomRelayInfo);for(const e of t.dstRoomRelayInfo)PM.checkDstMultiRoomInfo(e,this.userInfo.role);r=t}else r={dstRoomRelayInfo:this.userInfo.getRelayInfos()};const n=await this.signal.mediaRelay(r,!1,this.userInfo),i=[];return n.addResult.forEach((async e=>{i.push({roomId:e.roomId,result:e.resultCode,msg:e.resultMessage}),0===e.resultCode?this.userInfo.removeRelayInfo(e.roomId):this.logger.error(uV,"stopMultiRoomMediaRelay failed, roomId: ".concat(e.roomId,", resultCode: ").concat(e.resultCode,", errMsg: ").concat(e.resultMessage)),this.stat.reportRelayLeavInfo({code:e.resultCode,requestId:n.requestId,traceId:n.traceId,roomId:e.roomId,roomUid:e.roomUid})})),i}},{key:"addRelayClient",value:function e(t){return aU.addRelayConnection(this,t)}},{key:"stopRelayClient",value:async function e(t){const r=aU.getRelayConnection(this,t);r&&await r.leave()}},{key:"enableCommandMsg",value:function e(t,r){if(this.status!==ox.Idle&&t)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"pls call enableCommandMsg interface before join room first.");var n;t?this.cmdMsgAbility.msgFormat=(null==r?void 0:r.msgFormat)===px.ARRAY_BUFFER?px.ARRAY_BUFFER:px.STRING:(null===(n=this.cmdMsgAbility.cmdManager)||void 0===n||n.reset(),this.cmdMsgAbility.cmdManager=null);return this.cmdMsgAbility.enable=t,!0}},{key:"sendCommandMsg",value:function e(t,r){var n;if(!this.cmdMsgAbility.enable)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"pls call enableCommandMsg interface before join room first.");if(this.status!==ox.Joined)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"pls call this interface after joined room.");if((null===(n=this.userInfo)||void 0===n?void 0:n.roleSignalType)!==WD.JOINER)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"only joiner can send comand message.");return PM.checkCmdMsgValid(t),this.cmdMsgAbility.cmdManager.sendCommandMsg(t,r,this.roomId)}},{key:"handleNotifyRoomStreamStatus",value:async function e(t){const{audienceState:r}=t;this.logger.info(uV,"handleNotifyRoomStreamStatus handle room stream status : "+r+" role:"+this.userInfo.role),await this.handleRoomStreamStatus(r,$x.TOPN_AUDIOPOLICY===this.audioPolicy&&this.userInfo.role===VD&&vx.NORMAL===r)}},{key:"handleRoomStreamStatus",value:async function e(t,r,n){this.logger.info(uV,"handle room stream status : "+t),this.roomStreamStatus={audience:t};try{if(this.userInfo.role===VD&&t===vx.PAUSE){this.logger.info(uV,"player handle room stream status : "+t);const e=this.remoteUserManager.getAllSubscribedUpdateInfos4Unsubscribe(this.roomId);await this.updateSubscribe(e,null,!0),$x.TOPN_AUDIOPOLICY===this.audioPolicy&&(this.logger.info(uV,"player handle room stream status : "+t+" and topN unsubscribeUsersAudio"),await this.unsubscribeUsersAudio()),this.logger.info(uV,"player handle room stream status : "+t+" and clear intervals"),this.cleanNetworkStatistic(),this.netQualityRegularReport(),this.cleanTransportStats(),this.setAudioLevelStatTimer()}r&&(this.logger.info(uV,"".concat(this.userInfo.role," handle room stream status : ")+t+" and topN addSsrc4Top3"),this.remoteUserManager.enableTopThreeAudioMode(this.roomId),await this.connectionsManager.generateAndSetOfferSdpByHandler(qx.STREAM_TYPE_MAIN),await this.connectionsManager.generateAndSetAnswerSdpByHandler(qx.STREAM_TYPE_MAIN,this.addSsrc4Top3.bind(this))),(n||this.userInfo.role===VD&&[vx.PAUSE,vx.NORMAL].includes(t))&&(this.logger.info(uV,"eventEmitter RoomStreamStatus : "+t),this.eventEmitter.emit(lx.RoomStreamStatus,t))}catch(e){this.logger.error(uV,"RoomStreamStatus : "+t+" error:"+e)}}},{key:"renewSignature",value:function e(t,r){if("string"!=typeof t||"string"!=typeof r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER,"ctime or signature must be string");const n=FD.renewSignature(this.identifiedID,t,r);var i;return n?(this.userInfo=n,null===(i=this.signal)||void 0===i||i.refreshUserInfo(n),this.logger.info(uV,"renewSignature success"),!0):(this.logger.info(uV,"renewSignature fail"),!1)}}],[{key:"getSenderType",value:function e(t,r){return"audio"===t||r&&r.sender?qx.STREAM_TYPE_MAIN:qx.STREAM_TYPE_AUX}},{key:"judgeNetworkQuality",value:function e(t){return(t/=1024)?t>3e3?rL.NETWORK_QUALITY_GREAT:t>1500?rL.NETWORK_QUALITY_GOOD:t>500?rL.NETWORK_QUALITY_DEFECTS:t>150?rL.NETWORK_QUALITY_WEAK:t>30?rL.NETWORK_QUALITY_BAD:rL.NETWORK_QUALITY_DISCONNECT:rL.NETWORK_QUALITY_UNKNOW}},{key:"isStreamAdd",value:function e(t,r){if(!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const n=t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream;return 0===n.preTracks.length&&n.curTracks.length>0}},{key:"isStreamRemove",value:function e(t,r){if(!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const n=t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream;return n.preTracks.length>0&&0===n.curTracks.length}},{key:"isStreamUpdate",value:function e(t,r){if(!r)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const n=t===qx.STREAM_TYPE_MAIN?r.mainStream:r.auxStream;return n.addedTracks.length>0||n.updatedTracks.length>0||n.removedTracks.length>0}},{key:"getMuteChangeStatus",value:function e(r,n,i){if(!i)throw new oc(nc.RTC_ERR_CODE_INVALID_PARAMETER);const o=r===qx.STREAM_TYPE_MAIN?i.mainStream:i.auxStream;return t.getMediaMuteChangeFlag(o,n)}},{key:"getMediaMuteChangeFlag",value:function e(r,n){const i="noTrack",o=r.preTracks.find((e=>e.type===n)),a=r.curTracks.find((e=>e.type===n)),s=o?o.mute:i,u=a?a.mute:i;return t.getMuteChangeFlag(s,u)}},{key:"getMuteChangeFlag",value:function e(t,r){return t!==r?r?aV.mute:aV.unmute:aV.noChange}},{key:"getWatchType4Ops",value:function e(t){return 0===t?"cancel_watch":1===t?"watch":"batch_watch"}},{key:"isSubscriptionChange",value:function e(t){return t.some((e=>{var t,r,n,i,o,a,s,u;return(null===(t=e.mainStream)||void 0===t||null===(r=t.tracks4Subscribe)||void 0===r?void 0:r.length)>0||(null===(n=e.mainStream)||void 0===n||null===(i=n.tracks4Unsubscribe)||void 0===i?void 0:i.length)>0||(null===(o=e.auxStream)||void 0===o||null===(a=o.tracks4Subscribe)||void 0===a?void 0:a.length)>0||(null===(s=e.auxStream)||void 0===s||null===(u=s.tracks4Unsubscribe)||void 0===u?void 0:u.length)>0}))}},{key:"getUserTrackSubscribeInfo",value:function e(t,r,n,i){const o={pSsrcId:i.pssrc,cSsrcId:i.cssrc,pStreamUid:parseInt(i.trackId),pUserId:t.userId,pUserUid:t.userUid};i.type===Qx.TRACK_TYPE_AUDIO?n.push(o):(o.mediaData={width:i.width,height:i.height,maxFps:60},i.autoAdjustResolution===ux.ON&&(o.minReceiveContent=sV[i.minResolution]),r.push(o))}},{key:"getUserUpdateInfos",value:function e(t){return t.filter((e=>{var t,r,n,i,o,a,s,u;return(null===(t=e.mainStream)||void 0===t||null===(r=t.allSubscribeTracks)||void 0===r?void 0:r.length)>0||(null===(n=e.mainStream)||void 0===n||null===(i=n.tracks4Unsubscribe)||void 0===i?void 0:i.length)>0||(null===(o=e.auxStream)||void 0===o||null===(a=o.allSubscribeTracks)||void 0===a?void 0:a.length)>0||(null===(s=e.auxStream)||void 0===s||null===(u=s.tracks4Unsubscribe)||void 0===u?void 0:u.length)>0}))}},{key:"newRemoteUserSubscribeInfo",value:function e(t,r,n,i){return{userId:t,roomId:r,mainStream:{remoteStream:n,tracks:[]},auxStream:{remoteStream:i,tracks:[]}}}},{key:"getSsrcLayout",value:function e(t,r){return{alpha:r.alpha,localX:r.localX,localY:r.localY,renderMode:r.renderMode,ssrc:t,subBackGroundColor:r.subBackGroundColor,subHeight:r.subHeight,subWidth:r.subWidth,zorder:r.zorder}}},{key:"updateSlidePublishInfo",value:function e(r,n,i,o,a){if(n.videoStreams.push(i),a&&r.layouts){const e=r.layouts.find((e=>e.resolutionId===o));if(e){const r=t.getSsrcLayout(i,e);n.layouts.push(r)}}}}])}(LD),s(iV.prototype,"destroyClient",[_U],Object.getOwnPropertyDescriptor(iV.prototype,"destroyClient"),iV.prototype),s(iV.prototype,"enableTopThreeAudioMode",[SU],Object.getOwnPropertyDescriptor(iV.prototype,"enableTopThreeAudioMode"),iV.prototype),s(iV.prototype,"switchAudioMode",[EU],Object.getOwnPropertyDescriptor(iV.prototype,"switchAudioMode"),iV.prototype),s(iV.prototype,"getConnectionState",[wU],Object.getOwnPropertyDescriptor(iV.prototype,"getConnectionState"),iV.prototype),s(iV.prototype,"setNetworkBandwidth",[TU],Object.getOwnPropertyDescriptor(iV.prototype,"setNetworkBandwidth"),iV.prototype),s(iV.prototype,"join",[IU],Object.getOwnPropertyDescriptor(iV.prototype,"join"),iV.prototype),s(iV.prototype,"enableRtcStats",[RU],Object.getOwnPropertyDescriptor(iV.prototype,"enableRtcStats"),iV.prototype),s(iV.prototype,"leave",[CU],Object.getOwnPropertyDescriptor(iV.prototype,"leave"),iV.prototype),s(iV.prototype,"publish",[kU],Object.getOwnPropertyDescriptor(iV.prototype,"publish"),iV.prototype),s(iV.prototype,"publishImpl",[AU],Object.getOwnPropertyDescriptor(iV.prototype,"publishImpl"),iV.prototype),s(iV.prototype,"unpublish",[OU],Object.getOwnPropertyDescriptor(iV.prototype,"unpublish"),iV.prototype),s(iV.prototype,"subscribeAudio",[PU],Object.getOwnPropertyDescriptor(iV.prototype,"subscribeAudio"),iV.prototype),s(iV.prototype,"unSubscribeAudio",[xU],Object.getOwnPropertyDescriptor(iV.prototype,"unSubscribeAudio"),iV.prototype),s(iV.prototype,"subscribe",[LU],Object.getOwnPropertyDescriptor(iV.prototype,"subscribe"),iV.prototype),s(iV.prototype,"batchSubscribe",[MU],Object.getOwnPropertyDescriptor(iV.prototype,"batchSubscribe"),iV.prototype),s(iV.prototype,"unsubscribe",[NU],Object.getOwnPropertyDescriptor(iV.prototype,"unsubscribe"),iV.prototype),s(iV.prototype,"switchRole",[DU],Object.getOwnPropertyDescriptor(iV.prototype,"switchRole"),iV.prototype),s(iV.prototype,"refreshRemoteStreamList",[jU],Object.getOwnPropertyDescriptor(iV.prototype,"refreshRemoteStreamList"),iV.prototype),s(iV.prototype,"updateRemoteStream",[UU],Object.getOwnPropertyDescriptor(iV.prototype,"updateRemoteStream"),iV.prototype),s(iV.prototype,"removeRemoteStream",[VU],Object.getOwnPropertyDescriptor(iV.prototype,"removeRemoteStream"),iV.prototype),s(iV.prototype,"handleWatchMsg",[WU],Object.getOwnPropertyDescriptor(iV.prototype,"handleWatchMsg"),iV.prototype),s(iV.prototype,"refreshRoomUserInfos",[BU],Object.getOwnPropertyDescriptor(iV.prototype,"refreshRoomUserInfos"),iV.prototype),s(iV.prototype,"setVolume4TopThree",[GU],Object.getOwnPropertyDescriptor(iV.prototype,"setVolume4TopThree"),iV.prototype),s(iV.prototype,"muteAudio4TopThree",[ZU],Object.getOwnPropertyDescriptor(iV.prototype,"muteAudio4TopThree"),iV.prototype),s(iV.prototype,"setAudioOutput4TopThree",[FU],Object.getOwnPropertyDescriptor(iV.prototype,"setAudioOutput4TopThree"),iV.prototype),s(iV.prototype,"isTopNAudioMuted",[HU],Object.getOwnPropertyDescriptor(iV.prototype,"isTopNAudioMuted"),iV.prototype),s(iV.prototype,"changeUserName",[XU],Object.getOwnPropertyDescriptor(iV.prototype,"changeUserName"),iV.prototype),s(iV.prototype,"startLiveStreaming",[YU],Object.getOwnPropertyDescriptor(iV.prototype,"startLiveStreaming"),iV.prototype),s(iV.prototype,"updateLiveStreaming",[KU],Object.getOwnPropertyDescriptor(iV.prototype,"updateLiveStreaming"),iV.prototype),s(iV.prototype,"stopLiveStreaming",[zU],Object.getOwnPropertyDescriptor(iV.prototype,"stopLiveStreaming"),iV.prototype),s(iV.prototype,"setProxyServer",[JU],Object.getOwnPropertyDescriptor(iV.prototype,"setProxyServer"),iV.prototype),s(iV.prototype,"setTurnServer",[QU],Object.getOwnPropertyDescriptor(iV.prototype,"setTurnServer"),iV.prototype),s(iV.prototype,"addMultiRoomMediaRelay",[qU],Object.getOwnPropertyDescriptor(iV.prototype,"addMultiRoomMediaRelay"),iV.prototype),s(iV.prototype,"stopMultiRoomMediaRelay",[$U],Object.getOwnPropertyDescriptor(iV.prototype,"stopMultiRoomMediaRelay"),iV.prototype),s(iV.prototype,"addRelayClient",[eV],Object.getOwnPropertyDescriptor(iV.prototype,"addRelayClient"),iV.prototype),s(iV.prototype,"stopRelayClient",[tV],Object.getOwnPropertyDescriptor(iV.prototype,"stopRelayClient"),iV.prototype),s(iV.prototype,"enableCommandMsg",[rV],Object.getOwnPropertyDescriptor(iV.prototype,"enableCommandMsg"),iV.prototype),s(iV.prototype,"renewSignature",[nV],Object.getOwnPropertyDescriptor(iV.prototype,"renewSignature"),iV.prototype),iV);var lV,fV,dV,hV,pV,vV,mV,yV,gV,bV,_V;const SV=new(lV=FN("default$setLogLevel#void#LogLevel"),fV=ZN("default$checkSystemRequirements#Promise<true | RtcError> #boolean"),dV=FN("default$isScreenShareSupported#boolean"),hV=ZN("default$getDevices#Promise<MediaDeviceInfo[]>"),pV=ZN("default$getCameras#Promise<MediaDeviceInfo[]>"),vV=ZN("default$getMicrophones#Promise<MediaDeviceInfo[]>"),mV=ZN("default$getSpeakers#Promise<MediaDeviceInfo[]>"),yV=FN("default$setParameter#boolean#string#string"),gV=FN("default$createClient#Client#ClientConfig"),bV=FN("default$createStream#LocalStream#StreamConfig"),s((_V=function(e){function t(){var e;a(this,t);e=f(this,t,[{logger:!0,stat:!0}]),o(h(e),"VERSION",Ux);return e}p(t,e);return u(t,[{key:"setLogLevel",value:function e(t){AI.setAllLogLevel(t)}},{key:"checkSystemRequirements",value:async function e(t,r){return await sL.checkSystemRequirements(t,r)}},{key:"isScreenShareSupported",value:function e(){return sL.isRTCScreenShareSupported()}},{key:"getDevices",value:async function e(){return await tx()}},{key:"getCameras",value:async function e(){return await rx()}},{key:"getMicrophones",value:async function e(){return await async function(){return new Promise(((e,t)=>{tx().then((r=>{const n=r.filter((e=>"audioinput"===e.kind&&"communications"!==e.deviceId&&"default"!==e.deviceId));n&&0!==n.length?e(n):t(new oc(nc.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_INPUT_DEVICES))})).catch((e=>{t(e)}))}))}()}},{key:"getSpeakers",value:async function e(){return await async function(){return new Promise(((e,t)=>{tx().then((r=>{const n=r.filter((e=>"audiooutput"===e.kind));n&&0!==n.length?e(n):t(new oc(nc.RTC_ERR_CODE_NO_AVAILABLE_AUDIO_OUTPUT_DEVICES))})).catch((e=>{t(e)}))}))}()}},{key:"setParameter",value:function e(t,r){return zM.setParameter(t,r)}},{key:"createClient",value:function e(t){return PM.checkAppid(t.appId),PM.checkCountryCode(t.countryCode),t.domain&&PM.checkDomain(t.domain),new cV(t)}},{key:"createStream",value:function e(t){if(t.screen){if(t.videoSource||t.audioSource){if(!0===t.video||!0===t.audio)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION)}else if(!this.isScreenShareSupported())throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION,"screen share is not supported")}else{if(!0!==t.video&&!0!==t.audio&&!t.videoSource&&!t.audioSource)throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION);if((!0===t.video||!0===t.audio)&&(t.videoSource||t.audioSource))throw new oc(nc.RTC_ERR_CODE_INVALID_OPERATION)}return new DD(t)}},{key:"getInfo",value:function e(){return{moduleName:"default"}}}])}(LD)).prototype,"setLogLevel",[lV],Object.getOwnPropertyDescriptor(_V.prototype,"setLogLevel"),_V.prototype),s(_V.prototype,"checkSystemRequirements",[fV],Object.getOwnPropertyDescriptor(_V.prototype,"checkSystemRequirements"),_V.prototype),s(_V.prototype,"isScreenShareSupported",[dV],Object.getOwnPropertyDescriptor(_V.prototype,"isScreenShareSupported"),_V.prototype),s(_V.prototype,"getDevices",[hV],Object.getOwnPropertyDescriptor(_V.prototype,"getDevices"),_V.prototype),s(_V.prototype,"getCameras",[pV],Object.getOwnPropertyDescriptor(_V.prototype,"getCameras"),_V.prototype),s(_V.prototype,"getMicrophones",[vV],Object.getOwnPropertyDescriptor(_V.prototype,"getMicrophones"),_V.prototype),s(_V.prototype,"getSpeakers",[mV],Object.getOwnPropertyDescriptor(_V.prototype,"getSpeakers"),_V.prototype),s(_V.prototype,"setParameter",[yV],Object.getOwnPropertyDescriptor(_V.prototype,"setParameter"),_V.prototype),s(_V.prototype,"createClient",[gV],Object.getOwnPropertyDescriptor(_V.prototype,"createClient"),_V.prototype),s(_V.prototype,"createStream",[bV],Object.getOwnPropertyDescriptor(_V.prototype,"createStream"),_V.prototype),_V),EV={};return EV.VERSION=SV.VERSION,EV.setLogLevel=SV.setLogLevel.bind(SV),EV.checkSystemRequirements=SV.checkSystemRequirements.bind(SV),EV.isScreenShareSupported=SV.isScreenShareSupported.bind(SV),EV.getDevices=SV.getDevices.bind(SV),EV.getCameras=SV.getCameras.bind(SV),EV.getMicrophones=SV.getMicrophones.bind(SV),EV.getSpeakers=SV.getSpeakers.bind(SV),EV.setParameter=SV.setParameter.bind(SV),EV.createClient=SV.createClient.bind(SV),EV.createStream=SV.createStream.bind(SV),EV}))},92405:(e,t,r)=>{"use strict";var n=r(16468);var i=r(86938);n("Set",(function(e){return function t(){return e(this,arguments.length?arguments[0]:undefined)}}),i)},92726:(e,t)=>{function r(e){if(typeof e==="number"){e=e.toString()}if(typeof e!=="string"){throw new Error("Color should be defined as hex string")}let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8){throw new Error("Invalid hex color: "+e)}if(t.length===3||t.length===4){t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))}if(t.length===6)t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function e(t){if(!t)t={};if(!t.color)t.color={};const n=typeof t.margin==="undefined"||t.margin===null||t.margin<0?4:t.margin;const i=t.width&&t.width>=21?t.width:undefined;const o=t.scale||4;return{width:i,scale:i?4:o,margin:n,color:{dark:r(t.color.dark||"#000000ff"),light:r(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};t.getScale=function e(t,r){return r.width&&r.width>=t+r.margin*2?r.width/(t+r.margin*2):r.scale};t.getImageWidth=function e(r,n){const i=t.getScale(r,n);return Math.floor((r+n.margin*2)*i)};t.qrToImageData=function e(r,n,i){const o=n.modules.size;const a=n.modules.data;const s=t.getScale(o,i);const u=Math.floor((o+i.margin*2)*s);const c=i.margin*s;const l=[i.color.light,i.color.dark];for(let e=0;e<u;e++){for(let t=0;t<u;t++){let n=(e*u+t)*4;let f=i.color.light;if(e>=c&&t>=c&&e<u-c&&t<u-c){const r=Math.floor((e-c)/s);const n=Math.floor((t-c)/s);f=l[a[r*o+n]?1:0]}r[n++]=f.r;r[n++]=f.g;r[n++]=f.b;r[n]=f.a}}}},92744:(e,t,r)=>{"use strict";var n=r(79039);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},92771:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ReactUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==r(t)?t:t+""}function h(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=e.ReactUtil=function(){function e(){c(this,e)}return f(e,null,[{key:"showDifferentProperty",value:function e(t,r,n){var i=[];if(false){}return i}},{key:"reactStopPropagation",value:function e(t){var r,n,i,o,a,s;t===null||t===void 0||(r=(n=t).stopPropagation)===null||r===void 0||r.call(n);t===null||t===void 0||(i=t.nativeEvent)===null||i===void 0||(o=i.stopPropagation)===null||o===void 0||o.call(i);t===null||t===void 0||(a=t.nativeEvent)===null||a===void 0||(s=a.stopImmediatePropagation)===null||s===void 0||s.call(a)}}])}()}))},92796:(e,t,r)=>{"use strict";var n=r(79039);var i=r(94901);var o=/#|\.prototype\./;var a=function(e,t){var r=u[s(e)];return r===l?true:r===c?false:i(t)?n(t):!!t};var s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()};var u=a.data={};var c=a.NATIVE="N";var l=a.POLYFILL="P";e.exports=a},92804:e=>{"use strict";var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";var r=t+"+/";var n=t+"-_";var i=function(e){var t={};var r=0;for(;r<64;r++)t[e.charAt(r)]=r;return t};e.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},92897:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AutoQueryData=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==r(t)?t:t+""}function b(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=e.AutoQueryData=function(){function e(t){p(this,e);y(this,"_opts",void 0);y(this,"_data",void 0);y(this,"_timer",void 0);y(this,"_count",0);y(this,"_firstProm",void 0);this._opts=this._getOpts(t);this._dealGetDataFunc("constructor")}return m(e,[{key:"_getOpts",value:function e(r){if((0,t.formatType)(r)!==t.formatType.OBJECT){throw new Error("opts must a object")}(0,t.getPLogger)().debug("_getOpts",(0,t.formatType)(r.getDataFunc),(0,t.formatType)(r.args));if((0,t.formatType)(r.getDataFunc)!==t.formatType.FUNCTION&&(0,t.formatType)(r.getDataFunc)!==t.formatType.ASYNCFUNCTION){throw new Error("opts.getDataFunc must a function")}if((0,t.formatType)(r.args)!==t.formatType.ARRAY&&(0,t.formatType)(r.args)!==t.formatType.UNDEFINED){throw new Error("opts.args must a array or undefined")}var n=h({},r);if((0,t.formatType)(n.delay)!==t.formatType.NUMBER){n.delay=3e4}return n}},{key:"getSyncData",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";r+=",getSyncData";if(!this._timer){this._dealGetDataFunc(r)}(0,t.getPLogger)().debug(r,this._data);return this._data}},{key:"getData",value:function(){var e=f(c().mark((function e(){var r,n=arguments;return c().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:r=n.length>0&&n[0]!==undefined?n[0]:"";r+=",getData";if(this._timer){i.next=5;break}i.next=5;return this._dealGetDataFunc(r);case 5:if(!this._firstProm){i.next=8;break}i.next=8;return this._firstProm;case 8:(0,t.getPLogger)().debug(r,this._data);return i.abrupt("return",this._data);case 10:case"end":return i.stop()}}),e,this)})));function r(){return e.apply(this,arguments)}return r}()},{key:"stop",value:function e(){(0,t.getPLogger)().debug("stop",this._data);if(this._timer){clearInterval(this._timer)}delete this._timer;delete this._data;delete this._firstProm;this._count=0}},{key:"_dealGetDataFunc",value:function(){var e=f(c().mark((function e(r){var i=this,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:r+=",_dealGetDataFunc";this._timer=setInterval(f(c().mark((function e(){var o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.next=2;return(o=i._opts).getDataFunc.apply(o,n(i._opts.args||[]));case 2:i._data=a.sent;i._count++;(0,t.getPLogger)().debug(r,i._count,i._data);case 5:case"end":return a.stop()}}),e)}))),this._opts.delay);this._count++;this._firstProm=(o=this._opts).getDataFunc.apply(o,n(this._opts.args||[]));a.next=6;return this._firstProm;case 6:this._data=a.sent;(0,t.getPLogger)().debug(r,this._count,this._data);case 8:case"end":return a.stop()}}),e,this)})));function r(t){return e.apply(this,arguments)}return r}()}])}()}))},92901:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(20816);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,n.A)(i.key),i)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},93102:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258),r(44772),r(60334),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toast=void 0;const o=({className:e="",content:n,entry:o,showLog:a})=>{var s;a&&((s=(0,t.getPLogger)())===null||s===void 0?void 0:s.info(o,"Toast",e,(0,r.handleAccountPrint)(n)));e+=" meta-toast";return(0,i.jsx)("div",{className:e,children:(0,i.jsx)("div",{className:"toast-content",children:(0,i.jsx)("div",{className:"toast-text",title:n,children:n})})})};let a;let s;let u;let c;let l;const f=(e,r)=>async()=>{var n;e+=",removeToastDom";if(u){var i;r&&((i=(0,t.getPLogger)())===null||i===void 0?void 0:i.info(e,"wait the result"));await u}r&&((n=(0,t.getPLogger)())===null||n===void 0?void 0:n.info(e));u=new Promise((n=>{requestAnimationFrame((()=>{var i;if(a&&s){s.unmount();document.body.removeChild(a);a=undefined;s=undefined}r&&((i=(0,t.getPLogger)())===null||i===void 0?void 0:i.info(e,"over"));n();u=null}))}));return u};const d=async(e,t)=>{await f(e,t)();a=document.createElement("div");a.id="toastId";document.body.appendChild(a)};const h=async({content:e="no text!",timeOut:u=2,className:h="",showLog:p=false})=>{const v=(0,t.createEntry)("toast");try{var m;p&&((m=(0,t.getPLogger)())===null||m===void 0?void 0:m.info(v,"start",u,h,(0,r.handleAccountPrint)(e)));if(c){await c}if(l){clearTimeout(l)}c=d(v,p).then((()=>{s=(0,n.reactRenderPolyfill)(a);s.render((0,i.jsx)(o,{className:h,content:e,entry:v,showLog:p}));if(typeof u==="number"){u=u*1e3}else{u=2e3}l=setTimeout(f(v,p),u);c=null}))}catch(n){var y;(y=(0,t.getPLogger)())===null||y===void 0?void 0:y.error(v,u,h,(0,r.handleAccountPrint)(e),n)}return c};e.toast=h}))},93142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(44772);var i=r(39595);var o=r(44104);var a=r(26440);var s=r(43260);var u=r(94855);var c=r(39592);var l=r(44246);var f=r(57160);var d=r(11686);function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const g=new o.Log({module:"RejoinManager"});var b;(function(e){e["INIT"]="init";e["DOING"]="doing";e["WAITING"]="waiting"})(b||(b={}));let _=t["default"]=function(){function e(){h(this,e);this._status=b.INIT;this._delayInterval=3e4;this._timerManager=new n.Timer;this._count=0}return v(e,[{key:"rejoin",value:async function e(t){var r;let n=t.entry+",rejoin";const o=((r=u.ConfigManager.getChatInfo(t.entry))===null||r===void 0?void 0:r.job_id)||"";n+=`,${o}`;g.info("rejoin start",t.errorCode,this._status,this._count,n);if(this._status===b.DOING){g.info("rejoin status is doing",n);return}this._count++;this._status=b.DOING;this._timerManager.cancel();await c.HwICS.clearBase(n);(0,a.$dispatch)((0,s.toggleShowLoading)({show:true,contentKey:t.reason}));(0,a.$dispatch)((0,s.togglePageState)(i.PageState.MAIN));l.HWIcsElectron.hideAdvertiseMoreInfo(n);await c.HwICS.joinChatRoom(n);this._status=b.INIT;g.info("rejoin end",n)}},{key:"waitRejoin",value:async function e(t){g.info("rejoin waitRejoin",t);this._status=b.WAITING;this.rejoinTask=new n.Timer.TimerTask((()=>this.rejoin({entry:"rejoin failed",reason:f.RejoinReason.NETWORK_ERROR,errorCode:d.SDKErrorCode.MPS_JOB_STATE_NULL})));this._timerManager.cancel().schedule(this.rejoinTask,this._delayInterval)}},{key:"clearCount",value:function e(t){g.info("rejoin clearCount",t);this._count=0}}],[{key:"getInstance",value:function t(){if(!e.rejoinManager){e.rejoinManager=new e}return e.rejoinManager}}])}();window.addEventListener(d.InnerICSEventKey.REJOIN_EVENT,(e=>{const{method:t,entry:r}=e.detail;if(t===d.InnerICSEventMethod.REJOIN){_.getInstance().rejoin(e.detail)}else if(t===d.InnerICSEventMethod.WAIT_REJOIN){_.getInstance().waitRejoin(r)}}))},93153:(e,t,r)=>{"use strict";var n=r(46518);var i=r(7740);var o=Math.acosh;var a=Math.log;var s=Math.sqrt;var u=Math.LN2;var c=!o||Math.floor(o(Number.MAX_VALUE))!==710||o(Infinity)!==Infinity;n({target:"Math",stat:true,forced:c},{acosh:function e(t){var r=+t;return r<1?NaN:r>94906265.62425156?a(r)+u:i(r-1+s(r-1)*s(r+1))}})},93389:(e,t,r)=>{"use strict";var n=r(44576);var i=r(43724);var o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!i)return n[e];var t=o(n,e);return t&&t.value}},93438:(e,t,r)=>{"use strict";var n=r(28551);var i=r(20034);var o=r(36043);e.exports=function(e,t){n(e);if(i(t)&&t.constructor===e)return t;var r=o.f(e);var a=r.resolve;a(t);return r.promise}},93514:(e,t,r)=>{"use strict";var n=r(6469);n("flat")},93515:(e,t,r)=>{"use strict";var n=r(46518);n({target:"Date",proto:true},{toGMTString:Date.prototype.toUTCString})},93518:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(97751);var s=r(36043);var u=r(1103);var c=r(72652);var l=r(90537);var f="No one promise resolved";n({target:"Promise",stat:true,forced:l},{any:function e(t){var r=this;var n=a("AggregateError");var l=s.f(r);var d=l.resolve;var h=l.reject;var p=u((function(){var e=o(r.resolve);var a=[];var s=0;var u=1;var l=false;c(t,(function(t){var o=s++;var c=false;u++;i(e,r,t).then((function(e){if(c||l)return;l=true;d(e)}),(function(e){if(c||l)return;c=true;a[o]=e;--u||h(new n(a,f))}))}));--u||h(new n(a,f))}));if(p.error)h(p.value);return l.promise}})},93736:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSuffix=e.getFileName=e.formatFileSize=void 0;var r=function e(t){var r=[];for(var n=0;n<(t===null||t===void 0?void 0:t.length);n++){if(t[n]!==""){r.push(t[n])}}return r};var n=e.getFileName=function e(t){var n;var i=t.split("/");i=r(i);i=(n=i[i.length-1])===null||n===void 0?void 0:n.split("\\");i=r(i);return i[i.length-1]||t};var i=e.getSuffix=function e(r){if((0,t.isNullOrEmpty)(r)){r=""}return r.slice((r.lastIndexOf(".")-1>>>0)+2).toLowerCase()};var o=e.formatFileSize=function e(t){if(t<1e3){return t+"B"}else if(t>=1e3&&t<1e6){return Math.round(t*100/1024)/100+"KB"}else if(t>=1e6&&t<1e9){return Math.round(t*100/1024/1024)/100+"MB"}return Math.round(t*100/1024/1024/1024)/100+"GB"}}))},93941:(e,t,r)=>{"use strict";var n=r(46518);var i=r(20034);var o=r(3451).onFreeze;var a=r(92744);var s=r(79039);var u=Object.seal;var c=s((function(){u(1)}));n({target:"Object",stat:true,forced:c,sham:!a},{seal:function e(t){return u&&i(t)?u(o(t)):t}})},93967:(e,t,r)=>{"use strict";var n=r(46518);var i=r(20034);var o=r(3451).onFreeze;var a=r(92744);var s=r(79039);var u=Object.preventExtensions;var c=s((function(){u(1)}));n({target:"Object",stat:true,forced:c,sham:!a},{preventExtensions:function e(t){return u&&i(t)?u(o(t)):t}})},94003:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79039);var o=r(20034);var a=r(22195);var s=r(15652);var u=Object.isFrozen;var c=s||i((function(){u(1)}));n({target:"Object",stat:true,forced:c},{isFrozen:function e(t){if(!o(t))return true;if(s&&a(t)==="ArrayBuffer")return true;return u?u(t):false}})},94052:(e,t,r)=>{"use strict";var n=r(46518);var i=r(34124);n({target:"Object",stat:true,forced:Object.isExtensible!==i},{isExtensible:i})},94170:(e,t,r)=>{"use strict";var n=r(46518);var i=r(30566);n({target:"Function",proto:true,forced:Function.bind!==i},{bind:i})},94298:(e,t,r)=>{"use strict";var n=r(46518);var i=r(77240);var o=r(23061);n({target:"String",proto:true,forced:o("fixed")},{fixed:function e(){return i(this,"tt","","")}})},94402:(e,t,r)=>{"use strict";var n=r(79504);var i=Set.prototype;e.exports={Set,add:n(i.add),has:n(i.has),remove:n(i["delete"]),proto:i}},94483:(e,t,r)=>{"use strict";var n=r(44576);var i=r(89429);var o=r(1548);var a=n.structuredClone;var s=n.ArrayBuffer;var u=n.MessageChannel;var c=false;var l,f,d,h;if(o){c=function(e){a(e,{transfer:[e]})}}else if(s)try{if(!u){l=i("worker_threads");if(l)u=l.MessageChannel}if(u){f=new u;d=new s(2);h=function(e){f.port1.postMessage(null,[e])};if(d.byteLength===2){h(d);if(d.byteLength===0)c=h}}}catch(e){}e.exports=c},94490:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(34376);var a=i([].reverse);var s=[1,2];n({target:"Array",proto:true,forced:String(s)===String(s.reverse())},{reverse:function e(){if(o(this))this.length=this.length;return a(this)}})},94521:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(30258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.updateArrayItemByKeys=e.splitArrayByNum=e.queryItemByKeys=e.hasOneInArray=e.deleteItemByKeys=void 0;function r(e){return a(e)||o(e)||i(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return s(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u=e.splitArrayByNum=function e(n,i){if((0,t.formatType)(n)!==t.formatType.ARRAY){return n}if((0,t.formatType)(i)!==t.formatType.NUMBER){return n}if(i<0){return[n]}var o=[];var a=r(n);while(a.length>i){o.push(a.splice(0,i))}o.push(a);return o};var c=e.updateArrayItemByKeys=function e(r,n,i){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.ARRAY){return r}if((0,t.isNullOrEmpty)(i)){return r}if((0,t.formatType)(i)===t.formatType.ARRAY){i.forEach((function(e){c(r,n,e)}));return r}else if((0,t.formatType)(i)!==t.formatType.OBJECT){return r}var o=r.findIndex((function(e){var r=true;n.forEach((function(n){if((0,t.isNullOrEmpty)(e[n])||(0,t.isNullOrEmpty)(i[n])){r=false}if(e[n]!==i[n]){r=false}}));return r}));if(o===-1){r.push(i);return r}r[o]=i;return r};var l=e.queryItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return undefined}if((0,t.formatType)(n)!==t.formatType.OBJECT){return undefined}return r===null||r===void 0?void 0:r.find((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}))};var f=e.hasOneInArray=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return false}if((0,t.formatType)(n)!==t.formatType.ARRAY){return false}for(var i=0;i<n.length;i++){if(r.includes(n[i])){return true}}return false};var d=e.deleteItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.OBJECT){return r}var i=r.findIndex((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}));if(i!==-1){r.splice(i,1)}return r}}))},94644:(e,t,r)=>{"use strict";var n=r(77811);var i=r(43724);var o=r(44576);var a=r(94901);var s=r(20034);var u=r(39297);var c=r(36955);var l=r(16823);var f=r(66699);var d=r(36840);var h=r(62106);var p=r(1625);var v=r(42787);var m=r(52967);var y=r(78227);var g=r(33392);var b=r(91181);var _=b.enforce;var S=b.get;var E=o.Int8Array;var w=E&&E.prototype;var T=o.Uint8ClampedArray;var I=T&&T.prototype;var R=E&&v(E);var C=w&&v(w);var k=Object.prototype;var A=o.TypeError;var O=y("toStringTag");var P=g("TYPED_ARRAY_TAG");var x="TypedArrayConstructor";var L=n&&!!m&&c(o.opera)!=="Opera";var M=false;var N,D,j;var U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};var V={BigInt64Array:8,BigUint64Array:8};var W=function e(t){if(!s(t))return false;var r=c(t);return r==="DataView"||u(U,r)||u(V,r)};var B=function(e){var t=v(e);if(!s(t))return;var r=S(t);return r&&u(r,x)?r[x]:B(t)};var G=function(e){if(!s(e))return false;var t=c(e);return u(U,t)||u(V,t)};var Z=function(e){if(G(e))return e;throw new A("Target is not a typed array")};var F=function(e){if(a(e)&&(!m||p(R,e)))return e;throw new A(l(e)+" is not a typed array constructor")};var H=function(e,t,r,n){if(!i)return;if(r)for(var a in U){var s=o[a];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(r){try{s.prototype[e]=t}catch(e){}}}if(!C[e]||r){d(C,e,r?t:L&&w[e]||t,n)}};var X=function(e,t,r){var n,a;if(!i)return;if(m){if(r)for(n in U){a=o[n];if(a&&u(a,e))try{delete a[e]}catch(e){}}if(!R[e]||r){try{return d(R,e,r?t:L&&R[e]||t)}catch(e){}}else return}for(n in U){a=o[n];if(a&&(!a[e]||r)){d(a,e,t)}}};for(N in U){D=o[N];j=D&&D.prototype;if(j)_(j)[x]=D;else L=false}for(N in V){D=o[N];j=D&&D.prototype;if(j)_(j)[x]=D}if(!L||!a(R)||R===Function.prototype){R=function e(){throw new A("Incorrect invocation")};if(L)for(N in U){if(o[N])m(o[N],R)}}if(!L||!C||C===k){C=R.prototype;if(L)for(N in U){if(o[N])m(o[N].prototype,C)}}if(L&&v(I)!==C){m(I,C)}if(i&&!u(C,O)){M=true;h(C,O,{configurable:true,get:function(){return s(this)?this[P]:undefined}});for(N in U)if(o[N]){f(o[N],P,N)}}e.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:M&&P,aTypedArray:Z,aTypedArrayConstructor:F,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:X,getTypedArrayConstructor:B,isView:W,isTypedArray:G,TypedArray:R,TypedArrayPrototype:C}},94855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ConfigManager=void 0;var n=r(44772);var i=r(39595);var o=r(26440);var a=r(68847);var s=r(44104);var u=r(21013);var c=h(r(92224));var l=r(65268);var f=r(43260);var d=r(95789);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){var t=S(e,"string");return"symbol"==typeof t?t:t+""}function S(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const E=new s.Log({module:"HwICS.ConfigManager"});const w=g({},a.initialConfigState);let T=t.ConfigManager=function(){function e(){p(this,e)}return m(e,null,[{key:"setConfig",value:function t(r){if((0,n.formatType)(r)===n.formatType.OBJECT){Object.keys(r).forEach((t=>{e._config[t]=r[t]}))}if((r===null||r===void 0?void 0:r.enableBusinessTrack)===false){c.default.setParameter("STATISTIC_ENABLE","off");u.UserTrack.toggleBusinessTrack({enableBusinessTrack:false});d.HwKwsWakeup.enableTrack(false)}else{c.default.setParameter("STATISTIC_ENABLE","on");u.UserTrack.toggleBusinessTrack({enableBusinessTrack:true});d.HwKwsWakeup.enableTrack(true)}E.info("setConfig",e._config);(0,o.$dispatch)((0,a.setUiConfig)(e._config))}},{key:"setThirdPartyConfig",value:function t(r){E.info("setThirdPartyConfig",r);e.thirdPartyConfig=r}},{key:"getThirdPartyConfig",value:function t(){E.info("getThirdPartyConfig",e.thirdPartyConfig);return e.thirdPartyConfig}},{key:"setThirdPartyStream",value:function t(r){E.info("setThirdPartyStream",!!r);e.thirdPartyStream=r}},{key:"getThirdPartyStream",value:function t(){E.info("getThirdPartyStream");return e.thirdPartyStream}},{key:"clearThirdPartyConfig",value:function t(){E.info("clearThirdPartyConfig");e.thirdPartyConfig={}}},{key:"getUHanConfig",value:function t(){var r;return(r=e.thirdPartyConfig)===null||r===void 0?void 0:r.uHan}},{key:"getUHanV2Config",value:function t(){var r;return(r=e.thirdPartyConfig)===null||r===void 0?void 0:r.uHanV2}},{key:"getCustomRecordConfig",value:function t(){var r;return(r=e.thirdPartyConfig)===null||r===void 0?void 0:r.customRecord}},{key:"isThirdPartyEnable",value:function t(){var r,n,i;return((r=e.getUHanConfig())===null||r===void 0?void 0:r.enable)||((n=e.getUHanV2Config())===null||n===void 0?void 0:n.enable)||((i=e.getCustomRecordConfig())===null||i===void 0?void 0:i.enable)}},{key:"getConfig",value:function t(r){if(e.cacheConfig[r]!==e._config[r]){E.info("getConfig",r,e._config[r]);e.cacheConfig[r]=e._config[r]}return e._config[r]}},{key:"getChatInfo",value:function t(r){var n;E.info("getChatInfo",r,(n=e._chatInfo)===null||n===void 0?void 0:n.job_id);return e._chatInfo}},{key:"getPlayerUserInfo",value:function t(r){var n,i,o;const a=(n=e._chatInfo)===null||n===void 0?void 0:(i=n.rtc_room_info)===null||i===void 0?void 0:(o=i.users)===null||o===void 0?void 0:o.find((({user_type:e})=>e===l.USER_TYPE.PLAYER));E.info("getPlayerUserInfo",r,a===null||a===void 0?void 0:a.user_id,a===null||a===void 0?void 0:a.ctime);return a}},{key:"setChatInfo",value:function t({chatInfo:r,entry:n}){E.info("setChatInfo",n);e._chatInfo=r;if(r&&Object.prototype.hasOwnProperty.call(r,"is_transparent")){(0,o.$dispatch)((0,f.toggleIsShowTransparentBg)(r.is_transparent))}}},{key:"updateAuthInfo",value:function t({authInfo:r,entry:n}){E.debug("updateAuthInfo",n,r);e._authInfo=r;u.UserTrack.updateUtParam({random:r===null||r===void 0?void 0:r.access_token,baseUrl:e._baseUrl});d.HwKwsWakeup.setIcsToken((r===null||r===void 0?void 0:r.access_token)||"")}},{key:"getAuthInfo",value:function t(r){E.debug("getAuthInfo",r,e._authInfo);return e._authInfo}},{key:"setInitParam",value:function t(r){E.info("setInitParam",r);e._baseUrl=new URL(r.serverAddress);if(r.robotId){e._robotId=r.robotId}else if(r.taskUrl){e._robotId=n.UrlUtil.getSearchValue(r.taskUrl,"robot_id")||""}if(!r.config){r.config={}}e.setConfig(g(g({},w),r.config));e._container=document.getElementById((r===null||r===void 0?void 0:r.containerId)||"")||document.body;e._extendParamStr=r.extendParamStr||"";u.UserTrack.updateUtParam({robotId:e._robotId,customInfoStr:e._extendParamStr,enableStorageCache:r.config.enableStorageCache})}},{key:"getContainerDom",value:function t(){return e._container}},{key:"getBaseUrl",value:function t(){E.debug("getBaseUrl",e._baseUrl);return e._baseUrl}},{key:"getExtendParamStr",value:function t(){E.debug("getExtendParamStr",e._extendParamStr);return e._extendParamStr}},{key:"getRobotId",value:function t(r){E.debug("getRobotId",r,e._robotId);return e._robotId}},{key:"clearAuthInfo",value:function t(r){E.info("clearAuthInfo",r);delete e._authInfo}},{key:"clearChatInfo",value:function t(r){E.info("clearChatInfo",r);delete e._chatInfo}},{key:"clearConfig",value:function t(){E.info("clearConfig");(0,o.$dispatch)((0,a.resetConfigState)());e._config={};delete e._baseUrl;e._robotId="";e._extendParamStr="";delete e._container;c.default.setParameter("STATISTIC_ENABLE","on");u.UserTrack.resetUtParam()}},{key:"isGammaEnv",value:function t(){var r,i;const o=e.getChatInfo("isGammaEnv");E.info("isGammaEnv",o===null||o===void 0?void 0:(r=o.rtc_room_info)===null||r===void 0?void 0:r.app_id);return(o===null||o===void 0?void 0:(i=o.rtc_room_info)===null||i===void 0?void 0:i.app_id)==="cbu_hmac"||n.UrlUtil.checkIPV4Url((o===null||o===void 0?void 0:o.media_access_url)||"")}},{key:"checkAudioDevice",value:async function t(r=3){try{const t=await navigator.mediaDevices.getUserMedia({audio:true});E.info("checkAudioDevice",r,t);if(e.getConfig(i.ConfigKey.ENABLE_COLLECT_AUDIO_DEMAND)){n.MediaStreamUtil.stopAudioTrack(t)}return true}catch(t){E.error("checkAudioDevice",r,t===null||t===void 0?void 0:t.toString());await(0,n.sleep)(500);let i=false;if(r>0){i=await e.checkAudioDevice(--r)}return i}}},{key:"isAudioDeviceDenied",value:async function t(){try{const t=await navigator.mediaDevices.getUserMedia({audio:true});E.info("isAudioDeviceDenied, false");if(e.getConfig(i.ConfigKey.ENABLE_COLLECT_AUDIO_DEMAND)){n.MediaStreamUtil.stopAudioTrack(t)}return false}catch(e){const t=(e===null||e===void 0?void 0:e.toString())||"";E.error("isAudioDeviceDenied",t);return t.includes("Permission denied")}}}])}();T._config=g({},w);T.cacheConfig={};T._robotId="";T._extendParamStr="";T.thirdPartyConfig={}},94901:e=>{"use strict";var t=typeof document=="object"&&document.all;e.exports=typeof t=="undefined"&&t!==undefined?function(e){return typeof e=="function"||e===t}:function(e){return typeof e=="function"}},95125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=_(r(55961));var o=_(r(51477));r(77200);var a=r(69733);var s=r(44772);var u=_(r(75540));var c=_(r(79947));var l=_(r(4615));var f=r(39595);var d=r(44104);var h=r(31053);var p=r(94855);var v=r(65268);var m=_(r(21873));var y=r(44246);var g=_(r(23364));var b=_(r(46942));function _(e){return e&&e.__esModule?e:{default:e}}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e,t,r){return(t=C(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C(n.key),n)}}function R(e,t,r){return t&&I(e.prototype,t),r&&I(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=k(e,"string");return"symbol"==typeof t?t:t+""}function k(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function A(e,t,r){return t=L(t),O(e,x()?Reflect.construct(t,r||[],L(e).constructor):t.apply(e,r))}function O(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function M(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var D=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const j=new d.Log({module:"HwICS.UI.ChatContainer"});const U={[v.LayoutMode.HUB]:{width:"45%",left:"50%",top:"20%"},[v.LayoutMode.COMPUTER]:{width:"41.25%",height:"80%",left:"50%",top:"10%"},[v.LayoutMode.MOBILE]:undefined};let V=function(e){function t(e){var r;T(this,t);r=A(this,t,[e]);r._pageName="ChatContainer";r.state={remoteContainerStyle:{width:"100%",height:"100%"},layoutStyle:{}};return r}M(t,e);return R(t,[{key:"componentDidMount",value:function e(){this.setLayoutStyle();this.setRemoteContainerStyle()}},{key:"componentDidUpdate",value:function e(t){const{width:r,height:n}=t.remoteContainerSize;const{width:i,height:o}=this.props.remoteContainerSize;if(r!==i&&n!==o){j.info("componentDidUpdate dispatch remoteContainerSizeChange");window.dispatchEvent(new Event("remoteContainerSizeChange"));this.setLayoutStyle();this.setRemoteContainerStyle()}}},{key:"setLayoutStyle",value:function e(){var t,r;const n=(t=this.props.remoteContainerSize)===null||t===void 0?void 0:t.width;const i=(r=this.props.remoteContainerSize)===null||r===void 0?void 0:r.height;const o=this.props.layoutMode;const a="setLayoutStyle";const u=p.ConfigManager.getChatInfo(a);const c=u===null||u===void 0?void 0:u.chat_subtitle_config;const l=u===null||u===void 0?void 0:u.video_config;const f=E({},U[o]||U[v.LayoutMode.COMPUTER]);if(c&&l&&n&&i){const e=n/l.width;j.info(a,"setLayoutStyle",E({},f),e,c);const t=n*(1-parseFloat(f.width)/100);if(!(0,s.isNullOrEmpty)(c.dx)){f.left=`${Math.max(0,Math.min(e*c.dx,t))}px`}if(!(0,s.isNullOrEmpty)(c.dy)){f.top=`${Math.max(0,e*c.dy)}px`}}this.setState({layoutStyle:f})}},{key:"setRemoteContainerStyle",value:function e(){var t,r;const n=(t=this.props.remoteContainerSize)===null||t===void 0?void 0:t.width;const i=(r=this.props.remoteContainerSize)===null||r===void 0?void 0:r.height;const o={};j.info("setRemoteContainerStyle",n,i);if(n){o.width=`${n}px`}if(i){o.height=`${i}px`}this.setState({remoteContainerStyle:E(E({},this.state.remoteContainerStyle),o)})}},{key:"render",value:function e(){const{enableCaption:t,enableChatBtn:r,videoOrientation:a,layoutMode:s,mediaViewShow:u}=this.props;const{remoteContainerStyle:d,layoutStyle:_}=this.state;let S="";const E=p.ConfigManager.getConfig(f.ConfigKey.ENABLE_MEDIA_VIEWER);const w=y.HWIcsElectron.isHWIcsElectron();let T;if(s===v.LayoutMode.HUB){S=(0,b.default)("caption-container","");T=(0,n.jsx)("div",{className:"caption-container-hub",style:_,children:t&&r?(0,n.jsx)(o.default,{}):null})}else if(a===h.VidoOrientationTypesMap.PORTRAIT_PRIMARY){S=(0,b.default)("caption-container","video-portrait-primary");T=(0,n.jsxs)("div",{className:"caption-container-right",children:[t&&(0,n.jsx)(l.default,{}),r&&(0,n.jsx)(i.default,{enableCaption:t})]})}else{S=(0,b.default)("caption-container","video-landscape-primary");T=(0,n.jsxs)("div",{className:"caption-container-right",style:_,children:[t&&(0,n.jsx)(c.default,{}),r&&(0,n.jsx)(i.default,{enableCaption:t})]})}return(0,n.jsxs)("div",{className:S,style:d,children:[u&&E&&(0,n.jsx)(g.default,{}),T,!w&&(0,n.jsx)(m.default,{className:"page-tools-pos"})]})}}])}(u.default);V=D([(0,s.componentDecorator)(j)],V);const W=e=>({enableCaption:e.config[f.ConfigKey.ENABLE_CAPTION],enableChatBtn:e.config[f.ConfigKey.ENABLE_CHAT_BTN],remoteContainerSize:e.main.remoteContainerSize,videoOrientation:e.main.videoOrientation,mediaViewShow:e.mediaView.mediaViewShow,layoutMode:e.main.layoutMode,language:e.lang.language,langCode:e.lang.langCode});var B=t["default"]=(0,a.connect)(W)(V)},95162:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getLocalRecorderUrl=void 0;var t="class LocalRecorder extends AudioWorkletProcessor {\n constructor(e) {\n super(e);\n const bufferSize = e.processorOptions.bufferSize;\n this.bufferSize = bufferSize;\n this.buffer = new Float32Array(bufferSize * 2);\n this.pos = 0;\n this.total = 0;\n this.id = Date.now();\n this.port.onmessage = function (e) {\n if (e.data.kill) {\n this.kill = true;\n }\n };\n }\n\n process(inputs) {\n const input = (inputs[0] || [])[0] || [];\n if (input.length) {\n this.buffer.set(input, this.pos);\n this.pos += input.length;\n const offset = ~~(this.pos / this.bufferSize) * this.bufferSize;\n if (offset) {\n this.port.postMessage(this.formatData(this.buffer.slice(0, offset)));\n const nextBuffer = this.buffer.subarray(offset, this.pos);\n this.buffer = new Float32Array(this.bufferSize * 2);\n this.buffer.set(nextBuffer);\n this.pos = nextBuffer.length;\n }\n }\n return !this.kill;\n }\n\n formatData(float32Arr) {\n const size = float32Arr.length;\n const pcm = new Int16Array(size);\n let sum = 0;\n for (let j = 0; j < size; j++) { // floatTo16BitPCM\n let s = Math.max(-1, Math.min(1, float32Arr[j]));\n s = s < 0 ? s * 0x8000 : s * 0x7FFF;\n pcm[j] = s;\n sum += Math.abs(s);\n }\n this.total+=pcm.byteLength;\n return { pcm, sum, total: this.total, recordId: this.id };\n }\n}\nregisterProcessor('LocalRecorderProcessor', LocalRecorder);";var r=e.getLocalRecorderUrl=function e(){return"data:text/javascript;base64,".concat(btoa(t))}}))},95450:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.typeMap=e.sizeMap=e.colorMap=void 0;const t=e.typeMap={STROKE:" stroke ",FILL:" fill "};const r=e.colorMap={BLUE:" blue ",WHITE:" white ",GRAY:" gray ",RED:" red ",GREEN:" green "};const n=e.sizeMap={NORMAL:" normal ",SMALL:" small ",LARGE:" large ",X_LANGE:" x-large "}}))},95477:(e,t,r)=>{"use strict";var n=r(15823);n("Int32",(function(e){return function t(r,n,i){return e(this,r,n,i)}}))},95633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WebsocketManager=void 0;var n=r(44772);var i=r(94855);var o=r(44104);var a=r(89906);var s=r(61345);var u=r(98020);var c=r(11686);var l=r(84743);var f=r(55798);var d=r(44086);var h=r(90228);var p=r(75625);var v=r(26440);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e){var t=_(e,"string");return"symbol"==typeof t?t:t+""}function _(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var S=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const E=new o.Log({module:"HwICS.Websocket"});const w=30;const T=6e4;let I=t.WebsocketManager=function(){function e({onmessage:t}){m(this,e);this._websocketItem=null;this.realConnect=(0,n.debounce)((async e=>{var t,r;e+=",reconnect";const n=this._wsRetryCount;const i=(t=this._websocketItem)===null||t===void 0?void 0:t.isConnectEnd();E.info("reconnect",e,n,i);if(!i||this._wsRetryCount>=w){return}if(this._wsRetryCount>=1){this._showRetryToast();this._waitRetryTask=l.Utils.waitTask(T);if(!await this._waitRetryTask.promise){return}delete this._waitRetryTask}this._wsRetryCount++;if((r=this._websocketItem)!==null&&r!==void 0&&r.isOpen()){E.info("reconnect cancel, has connected");return}const o=await this.init(e);E.info("reconnect end",e,n,o);window.dispatchEvent(new CustomEvent(c.InnerICSEventKey.STOP_CHAT_EVENT,{detail:{entry:e}}))}),100);this._onmessage=t;this._wsRetryCount=0}return g(e,[{key:"init",value:async function e(t){E.info("create",t,!!this._initProm);if(this._initProm){return this._initProm}this._websocketItem=new s.WebsocketWithHeartBeat;this._initProm=this._getWsUrl().then((async e=>{try{var t;await((t=this._websocketItem)===null||t===void 0?void 0:t.connect({url:e,onerror:this._handleError.bind(this),onclose:this._handleClose.bind(this),onopen:this._handleOpen.bind(this),onmessage:this._onmessage,onHeartbeatTimeOut:this._handleHeartbeatTimeOut.bind(this)}));this._clearReconnectCount("after connect");return{result:true}}catch(e){return{result:false,reason:e==="timeout"?"timeout":""}}}));return this._initProm}},{key:"send",value:async function e({param:t,rsp_action:r,timeout:n,entry:i}){if(!(0,v.$getState)().main.jobIsReady){return{action:t.action,error_code:c.SDKErrorCode.JOB_NOT_READY,error_msg:c.msgMap[c.SDKErrorCode.JOB_NOT_READY],error_level:f.ERROR_LEVEL.NO_PROMPT}}const o=await this.init(i);if(o.result){var a;return(a=this._websocketItem)===null||a===void 0?void 0:a.send({param:t,rsp_action:r,timeout:n,entry:i})}E.info("websocket init failed",o);if(o.reason==="timeout"){return{action:t.action,error_code:c.SDKErrorCode.WEBSOCKET_CONNECT_TIMEOUT,error_msg:"websocket init timeout",error_level:f.ERROR_LEVEL.MINOR}}return{action:t.action,error_code:c.SDKErrorCode.WEBCLIENT_WEBSOCKET_CHANNEL_ABNORMAL,error_msg:"websocket init failed",error_level:f.ERROR_LEVEL.MINOR}}},{key:"reconnect",value:function e(t){this.realConnect(t)}},{key:"clickToReconnect",value:async function e(t){t+=",clickToReconnect";E.info("clickToReconnect",t);const r=await this.init(t);E.info("clickToReconnect end",t,r);if(!r){this._showRetryToast()}}},{key:"destroy",value:function e(t){var r;t+=",destroy";(r=this._waitRetryTask)===null||r===void 0?void 0:r.stop();this._clearOldWebsocket(t);if(this._websocketItem){this._websocketItem.close(t)}}},{key:"_getWsUrl",value:async function e(){var t,r,o;const a=i.ConfigManager.getChatInfo("getWsUrl");const s=await h.HttpRequestManager.doPost({url:p.BaseUrl.CREATE_ONCE_TOKEN,config:{headers:{[p.HttpHeaders.AUTH_TOKEN]:((t=i.ConfigManager.getAuthInfo("getWsUrl"))===null||t===void 0?void 0:t.access_token)||""}},entry:"getWsUrl"});if(!(s!==null&&s!==void 0&&s.access_token)){return""}const u=a===null||a===void 0?void 0:(r=a.chat_access_address)===null||r===void 0?void 0:r.replace(/http[s]?:\/\//,"");const c=u||((o=i.ConfigManager.getBaseUrl())===null||o===void 0?void 0:o.host)||"";if(await(0,d.checkGammaEnvCaError)(`https://${c}/v1/digital-human-chat/chat`)){return""}if(!(a!==null&&a!==void 0&&a.job_id)||!s.access_token){return""}return n.UrlUtil.addQuery(`wss://${c}/v1/digital-human-chat/chat`,{job_id:(a===null||a===void 0?void 0:a.job_id)||"",token:s.access_token})}},{key:"_handleHeartbeatTimeOut",value:function e(){E.info("_handleHeartbeatTimeOut");this._clearOldWebsocket("_handleHeartbeatTimeOut");this.reconnect("_handleHeartbeatTimeOut")}},{key:"_handleError",value:function e(){E.info("_handleError");this._clearOldWebsocket("_handleError");this.reconnect("_handleError")}},{key:"_handleClose",value:function e(t){E.info("_handleClose",t===null||t===void 0?void 0:t.code);this._clearOldWebsocket("_handleClose");if((t===null||t===void 0?void 0:t.code)===u.WebSocketCode.WS_CODE_CLOSE){return}this.reconnect("_handleClose")}},{key:"_handleOpen",value:function e(){E.info("_handleOpen");(0,a.wsRetryToastHide)("_handleOpen")}},{key:"_showRetryToast",value:function e(){(0,a.wsRetryToastShow)({handleClick:()=>{const e="_showRetryToast, click";this._clearReconnectCount(e);this._clearOldWebsocket(e);this.clickToReconnect(e)}},"_showRetryToast")}},{key:"_clearOldWebsocket",value:function e(t){E.info("_clearOldWebsocket",t);delete this._initProm}},{key:"_clearReconnectCount",value:function e(t){E.info("_clearReconnectCount",t);this._wsRetryCount=0}}])}();S([(0,n.printfDecorator)(E)],I.prototype,"_getWsUrl",null)},95636:(e,t,r)=>{"use strict";var n=r(44576);var i=r(79504);var o=r(46706);var a=r(57696);var s=r(55169);var u=r(67394);var c=r(94483);var l=r(1548);var f=n.structuredClone;var d=n.ArrayBuffer;var h=n.DataView;var p=Math.min;var v=d.prototype;var m=h.prototype;var y=i(v.slice);var g=o(v,"resizable","get");var b=o(v,"maxByteLength","get");var _=i(m.getInt8);var S=i(m.setInt8);e.exports=(l||c)&&function(e,t,r){var n=u(e);var i=t===undefined?n:a(t);var o=!g||!g(e);var v;s(e);if(l){e=f(e,{transfer:[e]});if(n===i&&(r||o))return e}if(n>=i&&(!r||o)){v=y(e,0,i)}else{var m=r&&!o&&b?{maxByteLength:b(e)}:undefined;v=new d(i,m);var E=new h(e);var w=new h(v);var T=p(i,n);for(var I=0;I<T;I++)S(w,I,_(E,I))}if(!l)c(e);return v}},95739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RichTextUtils=void 0;var n=r(25127);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let c=t.RichTextUtils=function(){function e(){i(this,e)}return a(e,null,[{key:"getMediaInfo",value:function e(t){const r=t.querySelector("img");const n=t.querySelector("video");const i={imgList:[],videoList:[]};if(r){i.imgList.push(r)}else if(n){i.videoList.push(n)}return i}},{key:"hasMedia",value:function e(t){const r=t.querySelector("img");const n=t.querySelector("video");return!!(r||n)}},{key:"textToTextContent",value:function t(r){var i,o;const a=n.XssManager.getRenderNode(r);const s=((i=a.textContent)===null||i===void 0?void 0:(o=i.trim())===null||o===void 0?void 0:o.replace(/\\n/g,"\n"))||"";return e.filterRedundantPunctuation(s)}},{key:"hasHumanservice",value:function e(t){const r=n.XssManager.getRenderNode(t);const i=r.querySelector("human-service");return Boolean(i)}},{key:"filterRedundantPunctuation",value:function e(t){const r="!?:;、。,";const n=[];let i="";t.split("").forEach((e=>{if(r.includes(e)&&r.includes(i)){n.pop()}n.push(e);i=e}));return n.join("")}}])}()},95789:e=>{(function t(r,n){if(true)e.exports=n();else{var i,o}})(self,(()=>(()=>{var e={125:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(1067),r(299),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.methodDecorator=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"==i(t)?t:t+""}function c(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=new r.Log({module:"methodDecorator"});var f=e.methodDecorator=function e(r){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return function(e,o,s){var u;function c(){for(var e=arguments.length,a=new Array(e),s=0;s<e;s++){a[s]=arguments[s]}var c=Date.now();var f=u.apply(this,a);if(f!==null&&f!==void 0&&f.then){t.UserTrack.addUserTrack({arg1:r,arg2:o,args:{type:"async start",param:JSON.stringify(a)}});return f.then((function(e){t.UserTrack.addUserTrack({arg1:r,arg2:o,arg3:Date.now()-c,args:{type:"async end",result:JSON.stringify(e),param:i?(0,n.handleTokenPrint)(JSON.stringify(a)):JSON.stringify(a)}});l.debug(o,"async end, use time:",Date.now()-c,a,e);return e}))}l.debug(o,"sync end, use time:",Date.now()-c,a,f);t.UserTrack.addUserTrack({arg1:r,arg2:o,arg3:Date.now()-c,args:{type:"sync end",param:i?(0,n.handleTokenPrint)(JSON.stringify(a)):JSON.stringify(a),result:JSON.stringify(f)}});return f}if(s!==null&&s!==void 0&&s.initializer){return a(a({},s),{},{writable:true,initializer:function e(){u=s.initializer.call(this);return c}})}u=s===null||s===void 0?void 0:s.value;return a(a({},s),{},{writable:true,value:c})}}}))},258:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.throttle=e.sleep=e.setPLogger=e.isNullOrEmpty=e.getPLogger=e.getClientId=e.formatType=e.formatDate=e.deepCopy=e.debounce=e.createEntry=e.Noop=void 0;var t=e.Noop=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return r};var r={debug:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},info:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},warn:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)},error:function e(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++){n[i]=arguments[i]}return t(n)}};var n=e.getPLogger=function e(){return r};var i=e.formatType=function e(t){return Object.prototype.toString.apply(t).match(/\[object\s(.*)]/)[1].toLowerCase()};i.STRING="string";i.OBJECT="object";i.PROXYOBJECT="proxyobject";i.FUNCTION="function";i.ARRAY="array";i.BOOLEAN="boolean";i.NUMBER="number";i.PROMISE="promise";i.NULL="null";i.UNDEFINED="undefined";i.NODELIST="nodelist";i.HTMLCOLLECTION="htmlcollection";i.EVENT="event";i.XMLDOCUMENT="xmldocument";i.DOCUMENT="document";i.ASYNCFUNCTION="asyncfunction";var o=e.setPLogger=function e(t){if(i(t===null||t===void 0?void 0:t.debug)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.info)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.warn)===i.FUNCTION&&i(t===null||t===void 0?void 0:t.error)===i.FUNCTION){r=t}};var a=e.isNullOrEmpty=function e(t){var r=i(t);if(r===i.OBJECT){return Object.keys(t).length===0}return t===undefined||t===null||t.toString()==="NaN"||t===""||t.length===0};var s=e.deepCopy=function e(t){if(a(t)){return t}if(i(t)===i.STRING||i(t)===i.NUMBER||i(t)===i.BOOLEAN){return t}return JSON.parse(JSON.stringify(t))};var u=e.formatDate=function e(t,r){var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:parseInt((t.getMilliseconds()/1e3).toFixed(3).substr(2))};if(/(y+)/.test(r)){r=r.replace(RegExp.$1,String(t.getFullYear()).substr(4-RegExp.$1.length))}for(var i in n){if(new RegExp("("+i+")").test(r)){r=r.replace(RegExp.$1,RegExp.$1.length===1?n[i].toString():("00"+n[i]).substr(String(n[i]).length))}}return r};var c=e.getClientId=function(){var e=0;var t=(new Date).getTime();return function(){var r=(new Date).getTime();if(r===t){e++;if(e>999){e=1}}else{t=r;e=0}return t*1e3+e}}();var l=e.createEntry=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";return"".concat(t," ").concat(c())};var f=e.sleep=function e(t){return new Promise((function(e){return setTimeout(e,t)}))};var d=e.debounce=function e(t,r){var n=0;return function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++){i[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){t.apply(void 0,i)}),r)}};var h=e.throttle=function e(t,r){var n;return function(){if(!n){t.apply(void 0,arguments);n=setTimeout((function(){n=null}),r)}}}}))},299:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4772),r(1067)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Log=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=u(e,"string");return"symbol"==n(t)?t:t+""}function u(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.Log=function(){function e(t){var r=t.module;i(this,e);this.debug=e.printfLog("debug",r);this.info=e.printfLog("info",r);this.warn=e.printfLog("warn",r);this.error=e.printfLog("error",r)}return a(e,null,[{key:"setLogLevel",value:function t(r){e.logLevelIndex=e.logLevelList.indexOf(r)}},{key:"getLogLevel",value:function t(){return e.logLevelList[e.logLevelIndex]}},{key:"printfLog",value:function t(n,i){return function(t){try{var o=e.logLevelList.indexOf(n);if(e.logLevelIndex===-1||o<e.logLevelIndex){return""}for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++){s[u-1]=arguments[u]}return(0,r.dealLogPrintf)(n,i,t,s)}catch(e){return""}}}}])}();c.logLevelList=["debug","info","warn","error","none"];c.logLevelIndex=0;(0,t.setPLogger)(new c({module:"HwKwsWakeup.meta-util"}))}))},362:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752),r(258),r(5113)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LocalTransparentVideoBg=e.BasicLocalTransparentVideoBg=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t,r){return t=d(t),a(e,u()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function a(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function t(){return!!e})()}function c(e,t,r,n){var i=l(d(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=f(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},l.apply(null,arguments)}function f(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(){"use strict";v=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=d(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:p,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=w(e,"string");return"symbol"==i(t)?t:t+""}function w(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T=e.BasicLocalTransparentVideoBg=function(){function e(i){var o=this;g(this,e);S(this,"transparentCanvasElem",void 0);S(this,"videoElem",void 0);S(this,"chromakey",void 0);S(this,"similarity",void 0);S(this,"smoothness",void 0);S(this,"spill",void 0);S(this,"keyColor",void 0);S(this,"render",y(v().mark((function e(){return v().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(o.transparentCanvasElem){t.next=3;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","transparentCanvasElem not exist");return t.abrupt("return");case 3:t.next=5;return o.preRender();case 5:try{o.chromakey.dealVideoFrame(o.videoElem,o.transparentCanvasElem)}catch(e){(0,r.getPLogger)().error("LocalTransparentVideoBg.render error",e)}o.videoElem.requestVideoFrameCallback(o.render);case 7:case"end":return t.stop()}}),e)}))));this.videoElem=i.videoElem;this.similarity=i.similarity||.03;this.smoothness=i.smoothness||.22;this.spill=i.spill||.1;this.keyColor=i.keyColor;this.transparentCanvasElem=document.createElement("canvas");this.transparentCanvasElem.setAttribute("id",i.canvasId||"transparentCanvasElem");this.transparentCanvasElem.width=this.videoElem.videoWidth;this.transparentCanvasElem.height=this.videoElem.videoHeight;(0,r.getPLogger)().info("LocalTransparentVideoBg.constructor",this.videoElem.videoWidth,this.videoElem.videoHeight);if(i.algorithmPattern==="B"){this.chromakey=new n.ChromaKeyB({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}else{this.chromakey=new t.ChromaKeyA({similarity:this.similarity,smoothness:this.smoothness,spill:this.spill,keyColor:this.keyColor})}if(!i.rootElem){return}i.rootElem.append(this.transparentCanvasElem);(0,r.getPLogger)().info("LocalTransparentVideoBg.constructor","start render transparent background")}return _(e,[{key:"destroy",value:function e(){(0,r.getPLogger)().info("LocalTransparentVideoBg.destroy");if(this.transparentCanvasElem){this.transparentCanvasElem.remove();this.transparentCanvasElem=null}}},{key:"preRender",value:function(){var e=y(v().mark((function e(){return v().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:if(this.transparentCanvasElem){t.next=2;break}return t.abrupt("return");case 2:if(!(this.videoElem.videoWidth===0)){t.next=6;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","videoWidth is 0");t.next=6;return(0,r.sleep)(50);case 6:if(this.transparentCanvasElem.width!==this.videoElem.videoWidth){(0,r.getPLogger)().info("LocalTransparentVideoBg.render","re set canvas size",this.videoElem.videoWidth,this.videoElem.videoHeight);this.transparentCanvasElem.width=this.videoElem.videoWidth;this.transparentCanvasElem.height=this.videoElem.videoHeight}case 7:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}])}();var I=e.LocalTransparentVideoBg=function(e){function t(e){var n;var i;g(this,t);i=o(this,t,[e]);S(i,"ctx",void 0);S(i,"render",y(v().mark((function e(){var t,n,o;return v().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:if(i.transparentCanvasElem){a.next=3;break}(0,r.getPLogger)().error("LocalTransparentVideoBg.render","transparentCanvasElem not exist");return a.abrupt("return");case 3:a.next=5;return i.preRender();case 5:a.prev=5;a.next=8;return i.chromakey.dealVideoFrameToImage(i.videoElem);case 8:o=a.sent;(t=i.ctx)===null||t===void 0||t.clearRect(0,0,i.transparentCanvasElem.width,i.transparentCanvasElem.height);(n=i.ctx)===null||n===void 0||n.drawImage(o,0,0,i.transparentCanvasElem.width,i.transparentCanvasElem.height);a.next=16;break;case 13:a.prev=13;a.t0=a["catch"](5);(0,r.getPLogger)().error("LocalTransparentVideoBg.render error",a.t0);case 16:i.videoElem.requestVideoFrameCallback(i.render);case 17:case"end":return a.stop()}}),e,null,[[5,13]])}))));i.ctx=(n=i.transparentCanvasElem)===null||n===void 0?void 0:n.getContext("2d",{alpha:true});return i}h(t,e);return _(t,[{key:"destroy",value:function e(){c(t,"destroy",this,3)([]);delete this.ctx}}])}(T)}))},375:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DownloadAudio=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.DownloadAudio=function(){function e(){n(this,e);a(this,"list",[]);a(this,"id",(0,t.getClientId)())}return o(e,[{key:"addDownloadData",value:function e(t){this.list.push(t)}},{key:"downloadFile",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"test";(0,t.getPLogger)().info("downloadFile",this.id,r);var n=new Blob(this.list);var i=document.createElement("a");var o=URL.createObjectURL(n);i.href=o;i.download=r;document.body.appendChild(i);i.click();document.body.removeChild(i);URL.revokeObjectURL(o)}},{key:"clearData",value:function e(){(0,t.getPLogger)().info("clearData",this.id);this.list=[]}}])}()}))},394:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.mergeByDay=void 0;var t=e.mergeByDay=function e(t,r){if(t<0||r<0){return false}if(!Number.isInteger(t)||!Number.isInteger(r)){return false}var n=new Date(t);var i=new Date(r);return!(n.getFullYear()!==i.getFullYear()||n.getMonth()!==i.getMonth()||n.getDate()!==i.getDate())}}))},491:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.startsWith=e.getIsInWhiteListFn=void 0;function r(){return/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi}function n(e){var t=e.url,n=e.whiterList,i=e.ignoreIp;var o=new URL(t);var a=r();if(i&&a.test(o.hostname)){return true}n=n.filter((function(e){return!!e}));for(var s=0;s<n.length;s++){if(o.hostname.endsWith(n[s])){return true}}return false}var i=e.startsWith=function e(t){return function(e){return e.toLowerCase().startsWith(t)}};var o=e.getIsInWhiteListFn=function e(r){return function(e){var i=e.url,o=e.whiterList,a=e.ignoreIp,s=a===void 0?true:a;try{if((0,t.isNullOrEmpty)(i)){return false}if(r(i)){return n({url:i,whiterList:o,ignoreIp:s})}return false}catch(e){return false}}}}))},916:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9524),r(2867)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioContextLocalRecorder=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=d(e,"string");return"symbol"==n(t)?t:t+""}function d(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=e.AudioContextLocalRecorder=function(){function e(n){s(this,e);l(this,"instance",void 0);var i=new AudioContext({sampleRate:16e3});if(n.useScriptProcessor&&!!i.createScriptProcessor){this.instance=new t.ScriptProcessorRecord(n)}else{this.instance=new r.AudioWorkletNodeRecord(n)}}return c(e,[{key:"startRecord",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.startRecord(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=a(i().mark((function e(){return i().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.instance.stopRecord());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.instance.setSinkId(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},1067:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4772),r(3226),r(6425),r(5625)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.dealLogPrintf=e.UserTrack=void 0;n=o(n);function o(e){return e&&e.__esModule?e:{default:e}}function a(){"use strict";a=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};l(S,s,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(L([])));T&&T!==r&&n.call(T,s)&&(S=T);var I=_.prototype=g.prototype=Object.create(S);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==w(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(w(t)+" is not iterable")}return b.prototype=_,i(I,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function s(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,u,"next",e)}function u(e){s(o,n,i,a,u,"throw",e)}a(void 0)}))}}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=m(e,"string");return"symbol"==w(t)?t:t+""}function m(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e){return S(e)||_(e)||b(e)||g()}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return E(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}function _(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){"@babel/helpers - typeof";return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var T=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":w(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var I;(function(e){e["ui"]="meta_studio_web_client"})(I||(I={}));var R="".concat("kwssdk","-").concat("3.0.9","-").concat("202510291436","-v.so.20250220110549-4220430");var C=e.dealLogPrintf=function e(n,i,o,a){try{var s,u;if(n==="none"){return""}var c=(0,t.formatDate)(new Date,"yyyy-MM-dd hh:mm:ss.S");(s=window.console)===null||s===void 0||(u=s[n])===null||u===void 0||u.call.apply(u,[s,"[".concat(c,"][").concat(n,"][").concat(i,"]"),o].concat(y(a)));var l="[".concat(c,"][").concat(n,"][").concat(i,"] ").concat(o," ").concat(JSON.stringify(a));if(n!=="debug"){A===null||A===void 0||A.addUserTrack({arg1:r.Arg1Map.LOGGER_MESSAGE,arg2:i,args:{type:n,entry:o,message:JSON.stringify(a)}})}return l}catch(e){return""}};var k={debug:function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return C("debug","wakeUpUserTrack",t,n)}};var A=e.UserTrack=function(){function e(){d(this,e)}return p(e,null,[{key:"addUserTrack",value:function t(r){var n=r.arg1,i=r.arg2,o=i===void 0?location.hash:i,a=r.arg3,s=a===void 0?-1:a,u=r.args,c=u===void 0?{}:u;try{var f;var d={eventId:I.ui,timestamp:Date.now(),version:e._version,userAgent:e._userAgent,devicePixelRatio,args:l(l({},c),{},{arg1:n,arg2:o,arg3:s,currPageId:e._currPageId,jobId:e._rtcJobId,token:e._robotId,domain:(f=e._baseUrl)===null||f===void 0?void 0:f.hostname,region:"",lineno:this._order})};e._cacheList.push(d);this._order++;if(e._cacheList.length>e._cacheDataSize){e._cacheList.shift()}if(!e._uploading){e._uploadUserTrack()}}catch(e){var h;(h=window.console)===null||h===void 0||h.warn("addUserTrack",{arg1:n,arg2:o,arg3:s,args:c},e)}}},{key:"startUserTrack",value:function t(r){var n=r.arg1,i=r.eventKey,o=i===void 0?"":i,a=r.args;if(!e._eventMap[n+o]){e._eventMap[n+o]={arg1:n,args:a,startTime:Date.now()}}e._checkEventMap()}},{key:"endUserTrack",value:function t(r){var n=r.eventKey,i=n===void 0?"":n,o=r.arg1,a=r.arg2,s=a===void 0?location.hash:a,u=r.arg3,c=u===void 0?-1:u,f=r.args;try{var d=e._eventMap[o+i];if(d){var h=Date.now()-d.startTime;e.addUserTrack({arg1:o,arg2:s,arg3:h,args:l(l({eventKey:i},d.args),f)});delete e._eventMap[o+i]}}catch(e){var p;(p=window.console)===null||p===void 0||p.warn("endUserTrack",{eventKey:i,arg1:o,arg2:s,arg3:c,args:f},e)}}},{key:"toggleBusinessTrack",value:function t(r){var n=r.enableBusinessTrack,i=n===void 0?true:n;e._enableBusinessTrack=i;if(i){e._userAgent=navigator.userAgent;return}e._userAgent=""}},{key:"updateUtParam",value:function t(r){var n=r.jobId,i=r.token,o=r.baseUrl,a=r.robotId;if(n){e._rtcJobId=n}if(i){e._token=i}if(o){e._baseUrl=o}if(a){e._robotId=a}}},{key:"resetUtParam",value:function t(){e._rtcJobId="";e._token="";delete e._baseUrl;e._robotId="";e._enableBusinessTrack=false}},{key:"_uploadUserTrack",value:function(){var r=u(a().mark((function r(){var o;var s,u,c,l;return a().wrap((function r(a){while(1)switch(a.prev=a.next){case 0:if(!(e._cacheList.length>0&&(o=e._baseUrl)!==null&&o!==void 0&&o.origin&&e._enableBusinessTrack&&e._token)){a.next=17;break}e._uploading=true;a.next=4;return(0,t.sleep)(e._uploadCycle);case 4:u=Math.min(e._uploadSize,e._cacheList.length);if(!(u<e._uploadSize&&Date.now()-e._lastUploadTime<e._uploadCycle*5)){a.next=8;break}e._uploadUserTrack();return a.abrupt("return");case 8:c=e.preUpload(e._cacheList.slice(0,u));a.next=11;return n["default"].post("".concat(i.BaseUrl.REPORT),{data:c},{baseURL:(s=e._baseUrl)===null||s===void 0?void 0:s.origin,headers:f(f(f({},i.HttpHeaders.AUTH_TOKEN,e._token),"x-request-terminal-version","3.0.9"),"x-request-terminal-platform","kwssdk")})["catch"]((function(e){window.console.error("_uploadUserTrack",e)}));case 11:l=a.sent;if(!((l===null||l===void 0?void 0:l.status)===i.HttpCodes.OK)){a.next=17;break}e._cacheList.splice(0,u);e._lastUploadTime=Date.now();e._uploadUserTrack();return a.abrupt("return");case 17:e._uploading=false;case 18:case"end":return a.stop()}}),r)})));function o(){return r.apply(this,arguments)}return o}()},{key:"_checkEventMap",value:function t(){Object.keys(e._eventMap).forEach((function(t){if(Date.now()-e._eventMap[t].startTime>e._maxCacheTime){delete e._eventMap[t]}}))}},{key:"preUpload",value:function t(r){return r.map((function(t){if(!t.args.token){t.args.token=e._robotId}if(!t.args.jobId){t.args.jobId=e._rtcJobId}return t}))}}])}();A._cacheList=[];A._currPageId=Date.now().toString();A._version=R;A._eventMap={};A._cacheDataSize=1e3;A._maxCacheTime=72e5;A._uploading=false;A._uploadSize=20;A._uploadCycle=1e3;A._lastUploadTime=0;A._rtcJobId="";A._token="";A._robotId="";A._order=0;A._enableBusinessTrack=false;A._userAgent="";T([(0,t.printfDecorator)(k)],A,"startUserTrack",null);T([(0,t.printfDecorator)(k)],A,"endUserTrack",null);T([(0,t.printfDecorator)(k)],A,"toggleBusinessTrack",null);T([(0,t.printfDecorator)(k)],A,"updateUtParam",null);T([(0,t.printfDecorator)(k)],A,"resetUtParam",null)}))},1068:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getElementScreenPosition=void 0;var t=e.getElementScreenPosition=function e(t){if(!t){return{left:0,top:0}}var r=t;var n=0;var i=0;while(r){n+=r.offsetLeft-r.scrollLeft;i+=r.offsetTop-r.scrollTop;r=r.offsetParent}return{left:n,top:i}}}))},1167:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.loadWasm=e.getModule=void 0;function t(e){return o(e)||i(e)||n(e)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e){if(Array.isArray(e))return a(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==E(t)?t:t+""}function l(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,r){return t=S(t),h(e,g()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}function h(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function e(r){if(null===r||!b(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return y(r,arguments,S(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_(n,r)},m(e)}function y(e,t,r){if(g())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&_(i,r.prototype),i}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function t(){return!!e})()}function b(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e){"@babel/helpers - typeof";return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var w={};var T=e.loadWasm=function e(r,n){Object.assign(w,r);var i=(typeof window==="undefined"?"undefined":E(window))=="object";var o=typeof importScripts=="function";var a=(typeof process==="undefined"?"undefined":E(process))=="object"&&E(process.versions)=="object"&&typeof process.versions.node=="string";var s=!i&&!a&&!o;if(w["ENVIRONMENT"]){throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)")}if(!w.expectedDataFileDownloads){w.expectedDataFileDownloads=0}w.expectedDataFileDownloads++;(function(){var e=typeof ENVIRONMENT_IS_PTHREAD!="undefined"&&ENVIRONMENT_IS_PTHREAD;var t=typeof ENVIRONMENT_IS_WASM_WORKER!="undefined"&&ENVIRONMENT_IS_WASM_WORKER;if(e||t)return;function r(e){var t="";if((typeof window==="undefined"?"undefined":E(window))==="object"){t=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof process==="undefined"&&typeof location!=="undefined"){t=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var r="bin/kws_custom_word.data";var n="kws_custom_word.data";if(typeof w["locateFilePackage"]==="function"&&!w["locateFile"]){w["locateFile"]=w["locateFilePackage"];R("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var i=w["locateFile"]?w["locateFile"](n,""):n;var o=e["remote_package_size"];function a(e,t,r,n){var i=new XMLHttpRequest;i.open("GET",e,true);i.responseType="arraybuffer";i.onprogress=function(r){var n=e;var o=t;if(r.total)o=r.total;if(r.loaded){if(!i.addedTotal){i.addedTotal=true;if(!w.dataFileDownloads)w.dataFileDownloads={};w.dataFileDownloads[n]={loaded:r.loaded,total:o}}else{w.dataFileDownloads[n].loaded=r.loaded}var a=0;var s=0;var u=0;for(var c in w.dataFileDownloads){var l=w.dataFileDownloads[c];a+=l.total;s+=l.loaded;u++}a=Math.ceil(a*w.expectedDataFileDownloads/u);if(w["setStatus"])w["setStatus"]("Downloading data... (".concat(s,"/").concat(a,")"))}else if(!w.dataFileDownloads){if(w["setStatus"])w["setStatus"]("Downloading data...")}};i.onerror=function(t){throw new Error("NetworkError for: "+e)};i.onload=function(e){if(i.status==200||i.status==304||i.status==206||i.status==0&&i.response){var t=i.response;r(t)}else{throw new Error(i.statusText+" : "+i.responseURL)}};i.send(null)}function s(e){console.error("package error:",e)}var u=null;var c=w["getPreloadedPackage"]?w["getPreloadedPackage"](i,o):null;if(!c)a(i,o,(function(e){if(u){u(e);u=null}else{c=e}}),s);function l(){function t(e,t){if(!e)throw t+(new Error).stack}function n(e,t,r){this.start=e;this.end=t;this.audio=r}n.prototype={requests:{},open:function e(t,r){this.name=r;this.requests[r]=this;w["addRunDependency"]("fp ".concat(this.name))},send:function e(){},onload:function e(){var t=this.byteArray.subarray(this.start,this.end);this.finish(t)},finish:function e(t){var r=this;w["FS_createDataFile"](this.name,null,t,true,true,true);w["removeRunDependency"]("fp ".concat(r.name));this.requests[this.name]=null}};var i=e["files"];for(var o=0;o<i.length;++o){new n(i[o]["start"],i[o]["end"],i[o]["audio"]||0).open("GET",i[o]["filename"])}function a(r){t(r,"Loading data file failed.");t(r.constructor.name===ArrayBuffer.name,"bad input to processPackageData");var i=new Uint8Array(r);n.prototype.byteArray=i;var o=e["files"];for(var a=0;a<o.length;++a){n.prototype.requests[o[a].filename].onload()}w["removeRunDependency"]("datafile_bin/kws_custom_word.data")}w["addRunDependency"]("datafile_bin/kws_custom_word.data");if(!w.preloadResults)w.preloadResults={};w.preloadResults[r]={fromCache:false};if(c){a(c);c=null}else{u=a}}if(w["calledRun"]){l()}else{if(!w["preRun"])w["preRun"]=[];w["preRun"].push(l)}}r(n)})();if(w["$ww"]||typeof ENVIRONMENT_IS_PTHREAD!="undefined"&&ENVIRONMENT_IS_PTHREAD)w["preRun"]=[];var c=w["preRun"].slice();if(!w["preRun"])throw"Module.preRun should exist because file support used it; did a pre-js delete it?";c.forEach((function(e){if(w["preRun"].indexOf(e)<0)throw"All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?"}));var l=Object.assign({},w);var h=[];var p="./this.program";var y=function e(t,r){throw r};var g="";function b(e){if(w["locateFile"]){return w["locateFile"](e,g)}return g+e}var _,S,T;if(s){if((typeof process==="undefined"?"undefined":E(process))=="object"&&"function"==="function"||(typeof window==="undefined"?"undefined":E(window))=="object"||typeof importScripts=="function")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(i||o){if(o){g=self.location.href}else if(typeof document!="undefined"&&document.currentScript){g=document.currentScript.src}if(g.startsWith("blob:")){g=""}else{g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1)}if(!((typeof window==="undefined"?"undefined":E(window))=="object"||typeof importScripts=="function"))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");{_=function e(t){var r=new XMLHttpRequest;r.open("GET",t,false);r.send(null);return r.responseText};if(o){T=function e(t){var r=new XMLHttpRequest;r.open("GET",t,false);r.responseType="arraybuffer";r.send(null);return new Uint8Array(r.response)}}S=function e(t,r,n){var i=new XMLHttpRequest;i.open("GET",t,true);i.responseType="arraybuffer";i.onload=function(){if(i.status==200||i.status==0&&i.response){r(i.response);return}n()};i.onerror=n;i.send(null)}}}else{throw new Error("environment detection error")}var I=w["print"]||console.log.bind(console);var R=w["printErr"]||console.error.bind(console);Object.assign(w,l);l=null;vn();if(w["arguments"])h=w["arguments"];Ie("arguments","arguments_");if(w["thisProgram"])p=w["thisProgram"];Ie("thisProgram","thisProgram");if(w["quit"])y=w["quit"];Ie("quit","quit_");x(typeof w["memoryInitializerPrefixURL"]=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");x(typeof w["pthreadMainPrefixURL"]=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");x(typeof w["cdInitializerPrefixURL"]=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");x(typeof w["filePackagePrefixURL"]=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead");x(typeof w["read"]=="undefined","Module.read option was removed (modify read_ in JS)");x(typeof w["readAsync"]=="undefined","Module.readAsync option was removed (modify readAsync in JS)");x(typeof w["readBinary"]=="undefined","Module.readBinary option was removed (modify readBinary in JS)");x(typeof w["setWindowTitle"]=="undefined","Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");x(typeof w["TOTAL_MEMORY"]=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");Ie("asm","wasmExports");Ie("read","read_");Ie("readAsync","readAsync");Ie("readBinary","readBinary");Ie("setWindowTitle","setWindowTitle");x(!a,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable.");x(!s,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var C;if(w["wasmBinary"])C=w["wasmBinary"];Ie("wasmBinary","wasmBinary");if((typeof WebAssembly==="undefined"?"undefined":E(WebAssembly))!="object"){R("no native wasm support detected")}function k(e){var t=atob(e);var r=new Uint8Array(t.length);for(var n=0;n<t.length;++n){r[n]=t.charCodeAt(n)}return r}var A;var O=false;var P;function x(e,t){if(!e){se("Assertion failed"+(t?": "+t:""))}}var L,M,N,D,j,U,V,W;function B(){var e=A.buffer;w["HEAP8"]=L=new Int8Array(e);w["HEAP16"]=N=new Int16Array(e);w["HEAPU8"]=M=new Uint8Array(e);w["HEAPU16"]=D=new Uint16Array(e);w["HEAP32"]=j=new Int32Array(e);w["HEAPU32"]=U=new Uint32Array(e);w["HEAPF32"]=V=new Float32Array(e);w["HEAPF64"]=W=new Float64Array(e)}x(!w["STACK_SIZE"],"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time");x(typeof Int32Array!="undefined"&&typeof Float64Array!=="undefined"&&Int32Array.prototype.subarray!=undefined&&Int32Array.prototype.set!=undefined,"JS engine does not provide full typed array support");x(!w["wasmMemory"],"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally");x(!w["INITIAL_MEMORY"],"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");function G(){var e=Wn();x((e&3)==0);if(e==0){e+=4}U[e>>2]=34821223;U[e+4>>2]=2310721022;U[0>>2]=1668509029}function Z(){if(O)return;var e=Wn();if(e==0){e+=4}var t=U[e>>2];var r=U[e+4>>2];if(t!=34821223||r!=2310721022){se("Stack overflow! Stack cookie has been overwritten at ".concat(De(e),", expected hex dwords 0x89BACDFE and 0x2135467, but received ").concat(De(r)," ").concat(De(t)))}if(U[0>>2]!=1668509029){se("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var e=new Int16Array(1);var t=new Int8Array(e.buffer);e[0]=25459;if(t[0]!==115||t[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var F=[];var H=[];var X=[];var Y=false;function K(){if(w["preRun"]){if(typeof w["preRun"]=="function")w["preRun"]=[w["preRun"]];while(w["preRun"].length){Q(w["preRun"].shift())}}Le(F)}function z(){x(!Y);Y=true;Z();if(!w["noFSInit"]&&!Ot.init.initialized)Ot.init();Ot.ignorePermissions=false;mt.init();Le(H)}function J(){Z();if(w["postRun"]){if(typeof w["postRun"]=="function")w["postRun"]=[w["postRun"]];while(w["postRun"].length){$(w["postRun"].shift())}}Le(X)}function Q(e){F.unshift(e)}function q(e){H.unshift(e)}function $(e){X.unshift(e)}x(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");x(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");x(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");x(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var ee=0;var te=null;var re=null;var ne={};function ie(e){var t=e;while(1){if(!ne[e])return e;e=t+Math.random()}}function oe(e){var t;ee++;(t=w["monitorRunDependencies"])===null||t===void 0||t.call(w,ee);if(e){x(!ne[e]);ne[e]=1;if(te===null&&typeof setInterval!="undefined"){te=setInterval((function(){if(O){clearInterval(te);te=null;return}var e=false;for(var t in ne){if(!e){e=true;R("still waiting on run dependencies:")}R("dependency: ".concat(t))}if(e){R("(end of list)")}}),1e4)}}else{R("warning: run dependency added without ID")}}function ae(e){var t;ee--;(t=w["monitorRunDependencies"])===null||t===void 0||t.call(w,ee);if(e){x(ne[e]);delete ne[e]}else{R("warning: run dependency removed without ID")}if(ee==0){if(te!==null){clearInterval(te);te=null}if(re){var r=re;re=null;r()}}}function se(e){var t;(t=w["onAbort"])===null||t===void 0||t.call(w,e);e="Aborted("+e+")";R(e);O=true;P=1;var r=new WebAssembly.RuntimeError(e);throw r}var ue="data:application/octet-stream;base64,";var ce=function e(t){return t.startsWith(ue)};var le=function e(t){return t.startsWith("file://")};function fe(e,t){return function(){x(Y,"native function `".concat(e,"` called before runtime initialization"));var r=yn[e];x(r,"exported native function `".concat(e,"` not found"));x(arguments.length<=t,"native function `".concat(e,"` called with ").concat(arguments.length," args but expects ").concat(t));return r.apply(void 0,arguments)}}var de=function(e){function t(){f(this,t);return d(this,t,arguments)}v(t,e);return u(t)}(m(Error));var he=function(e){function t(){f(this,t);return d(this,t,arguments)}v(t,e);return u(t)}(de);var pe=function(e){function t(e){var r;f(this,t);r=d(this,t,[e]);r.excPtr=e;var n=pn(e);r.name=n[0];r.message=n[1];return r}v(t,e);return u(t)}(de);function ve(){var e="kws_custom_word.wasm";if(!ce(e)){return b(e)}return e}var me;function ye(e){if(e==me&&C){return new Uint8Array(C)}if(T){return T(e)}throw"both async and sync fetching of the wasm failed"}function ge(e){if(!C&&(i||o)){if(typeof fetch=="function"){return fetch(e,{credentials:"same-origin"}).then((function(t){if(!t["ok"]){throw"failed to load wasm binary file at '".concat(e,"'")}return t["arrayBuffer"]()}))["catch"]((function(){return ye(e)}))}}return Promise.resolve().then((function(){return ye(e)}))}function be(e,t,r){return ge(e).then((function(e){return WebAssembly.instantiate(e,t)})).then(r,(function(e){R("failed to asynchronously prepare wasm: ".concat(e));if(le(me)){R("warning: Loading from a file URI (".concat(me,") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"))}se(e)}))}function _e(e,t,r,n){if(!e&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(t)&&typeof fetch=="function"){return fetch(t,{credentials:"same-origin"}).then((function(e){var i=WebAssembly.instantiateStreaming(e,r);return i.then(n,(function(e){R("wasm streaming compile failed: ".concat(e));R("falling back to ArrayBuffer instantiation");return be(t,r,n)}))}))}return be(t,r,n)}function Se(){return{env:mn,wasi_snapshot_preview1:mn}}function Ee(){var e=Se();function t(e,t){yn=e.exports;A=yn["memory"];x(A,"memory not found in wasm exports");B();Gr=yn["__indirect_function_table"];x(Gr,"table not found in wasm exports");q(yn["__wasm_call_ctors"]);ae("wasm-instantiate");return yn}oe("wasm-instantiate");var r=w;function n(e){x(w===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");r=null;t(e["instance"])}if(w["instantiateWasm"]){try{return w["instantiateWasm"](e,t)}catch(e){R("Module.instantiateWasm callback failed with error: ".concat(e));return false}}if(!me)me=ve();_e(C,me,e,n);return{}}var we;var Te;function Ie(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;if(!Object.getOwnPropertyDescriptor(w,e)){Object.defineProperty(w,e,{configurable:true,get:function n(){var i=r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";se("`Module.".concat(e,"` has been replaced by `").concat(t,"`")+i)}})}}function Re(e){if(Object.getOwnPropertyDescriptor(w,e)){se("`Module.".concat(e,"` was supplied but `").concat(e,"` not included in INCOMING_MODULE_JS_API"))}}function Ce(e){return e==="FS_createPath"||e==="FS_createDataFile"||e==="FS_createPreloadedFile"||e==="FS_unlink"||e==="addRunDependency"||e==="FS_createLazyFile"||e==="FS_createDevice"||e==="removeRunDependency"}function ke(e,t){if(typeof globalThis!="undefined"){Object.defineProperty(globalThis,e,{configurable:true,get:function r(){We("`".concat(e,"` is not longer defined by emscripten. ").concat(t));return undefined}})}}ke("buffer","Please use HEAP8.buffer or wasmMemory.buffer");ke("asm","Please use wasmExports instead");function Ae(e){if(typeof globalThis!="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,e)){Object.defineProperty(globalThis,e,{configurable:true,get:function t(){var r="`".concat(e,"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line");var n=e;if(!n.startsWith("_")){n="$"+e}r+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='".concat(n,"')");if(Ce(e)){r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}We(r);return undefined}})}Oe(e)}function Oe(e){if(!Object.getOwnPropertyDescriptor(w,e)){Object.defineProperty(w,e,{configurable:true,get:function t(){var r="'".concat(e,"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)");if(Ce(e)){r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}se(r)}})}}var Pe={898128:function e(t,r,n,i){if(typeof w=="undefined"||!w.MountedFiles){return 1}var o=Ze(t>>>0);if(o.startsWith("./")){o=o.substring(2)}var a=w.MountedFiles.get(o);if(!a){return 2}var s=r>>>0;var u=n>>>0;var c=i>>>0;if(s+u>a.byteLength){return 3}try{M.set(a.subarray(s,s+u),c);return 0}catch(e){return 4}}};function xe(e){this.name="ExitStatus";this.message="Program terminated with exit(".concat(e,")");this.status=e}var Le=function e(t){while(t.length>0){t.shift()(w)}};function Me(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"i8";if(t.endsWith("*"))t="*";switch(t){case"i1":return L[e];case"i8":return L[e];case"i16":return N[e>>1];case"i32":return j[e>>2];case"i64":se("to do getValue(i64) use WASM_BIGINT");case"float":return V[e>>2];case"double":return W[e>>3];case"*":return U[e>>2];default:se("invalid type for getValue: ".concat(t))}}var Ne=w["noExitRuntime"]||true;var De=function e(t){x(typeof t==="number");t>>>=0;return"0x"+t.toString(16).padStart(8,"0")};function je(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"i8";if(r.endsWith("*"))r="*";switch(r){case"i1":L[e]=t;break;case"i8":L[e]=t;break;case"i16":N[e>>1]=t;break;case"i32":j[e>>2]=t;break;case"i64":se("to do setValue(i64) use WASM_BIGINT");case"float":V[e>>2]=t;break;case"double":W[e>>3]=t;break;case"*":U[e>>2]=t;break;default:se("invalid type for setValue: ".concat(r))}}var Ue=function e(t){return Bn(t)};var Ve=function e(){return Zn()};var We=function e(t){We.shown||(We.shown={});if(!We.shown[t]){We.shown[t]=1;R(t)}};var Be=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var Ge=function e(t,r,n){var i=r+n;var o=r;while(t[o]&&!(o>=i))++o;if(o-r>16&&t.buffer&&Be){return Be.decode(t.subarray(r,o))}var a="";while(r<o){var s=t[r++];if(!(s&128)){a+=String.fromCharCode(s);continue}var u=t[r++]&63;if((s&224)==192){a+=String.fromCharCode((s&31)<<6|u);continue}var c=t[r++]&63;if((s&240)==224){s=(s&15)<<12|u<<6|c}else{if((s&248)!=240)We("Invalid UTF-8 leading byte "+De(s)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!");s=(s&7)<<18|u<<12|c<<6|t[r++]&63}if(s<65536){a+=String.fromCharCode(s)}else{var l=s-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a};var Ze=function e(t,r){x(typeof t=="number","UTF8ToString expects a number (got ".concat(E(t),")"));return t?Ge(M,t,r):""};var Fe=function e(t,r,n,i){se("Assertion failed: ".concat(Ze(t),", at: ")+[r?Ze(r):"unknown filename",n,i?Ze(i):"unknown function"])};var He=[];var Xe=0;var Ye=function e(t){var r=new Je(t);if(!r.get_caught()){r.set_caught(true);Xe--}r.set_rethrown(false);He.push(r);Hn(r.excPtr);return r.get_exception_ptr()};var Ke=0;var ze=function e(){Nn(0,0);x(He.length>0);var t=He.pop();Fn(t.excPtr);Ke=0};var Je=function(){function e(t){f(this,e);this.excPtr=t;this.ptr=t-24}return u(e,[{key:"set_type",value:function e(t){U[this.ptr+4>>2]=t}},{key:"get_type",value:function e(){return U[this.ptr+4>>2]}},{key:"set_destructor",value:function e(t){U[this.ptr+8>>2]=t}},{key:"get_destructor",value:function e(){return U[this.ptr+8>>2]}},{key:"set_caught",value:function e(t){t=t?1:0;L[this.ptr+12]=t}},{key:"get_caught",value:function e(){return L[this.ptr+12]!=0}},{key:"set_rethrown",value:function e(t){t=t?1:0;L[this.ptr+13]=t}},{key:"get_rethrown",value:function e(){return L[this.ptr+13]!=0}},{key:"init",value:function e(t,r){this.set_adjusted_ptr(0);this.set_type(t);this.set_destructor(r)}},{key:"set_adjusted_ptr",value:function e(t){U[this.ptr+16>>2]=t}},{key:"get_adjusted_ptr",value:function e(){return U[this.ptr+16>>2]}},{key:"get_exception_ptr",value:function e(){var t=Kn(this.get_type());if(t){return U[this.excPtr>>2]}var r=this.get_adjusted_ptr();if(r!==0)return r;return this.excPtr}}])}();var Qe=function e(t){if(!Ke){Ke=new pe(t)}throw Ke};var qe=function e(t){return Dn(t)};var $e=function e(t){var r;var n=(r=Ke)===null||r===void 0?void 0:r.excPtr;if(!n){qe(0);return 0}var i=new Je(n);i.set_adjusted_ptr(n);var o=i.get_type();if(!o){qe(0);return n}for(var a in t){var s=t[a];if(s===0||s===o){break}var u=i.ptr+16;if(Yn(s,o,u)){qe(s);return n}}qe(o);return n};var et=function e(){return $e([])};var tt=function e(t){return $e([t])};var rt=function e(){var t=He.pop();if(!t){se("no exception to throw")}var r=t.excPtr;if(!t.get_rethrown()){He.push(t);t.set_rethrown(true);t.set_caught(false);Xe++}Ke=new pe(r);throw Ke};var nt=function e(t,r,n){var i=new Je(t);i.init(r,n);Ke=new pe(t);Xe++;throw Ke};var it=function e(){return Xe};function ot(){x(Pt.varargs!=undefined);var e=j[+Pt.varargs>>2];Pt.varargs+=4;return e}var at=ot;var st={isAbs:function e(t){return t.charAt(0)==="/"},splitPath:function e(t){var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(t).slice(1)},normalizeArray:function e(t,r){var n=0;for(var i=t.length-1;i>=0;i--){var o=t[i];if(o==="."){t.splice(i,1)}else if(o===".."){t.splice(i,1);n++}else if(n){t.splice(i,1);n--}}if(r){for(;n;n--){t.unshift("..")}}return t},normalize:function e(t){var r=st.isAbs(t),n=t.substr(-1)==="/";t=st.normalizeArray(t.split("/").filter((function(e){return!!e})),!r).join("/");if(!t&&!r){t="."}if(t&&n){t+="/"}return(r?"/":"")+t},dirname:function e(t){var r=st.splitPath(t),n=r[0],i=r[1];if(!n&&!i){return"."}if(i){i=i.substr(0,i.length-1)}return n+i},basename:function e(t){if(t==="/")return"/";t=st.normalize(t);t=t.replace(/\/$/,"");var r=t.lastIndexOf("/");if(r===-1)return t;return t.substr(r+1)},join:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return st.normalize(r.join("/"))},join2:function e(t,r){return st.normalize(t+"/"+r)}};var ut=function e(){if((typeof crypto==="undefined"?"undefined":E(crypto))=="object"&&typeof crypto["getRandomValues"]=="function"){return function(e){return crypto.getRandomValues(e)}}else se("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")};var ct=function e(t){return(ct=ut())(t)};var lt={resolve:function e(){var t="",r=false;for(var n=arguments.length-1;n>=-1&&!r;n--){var i=n>=0?n<0||arguments.length<=n?undefined:arguments[n]:Ot.cwd();if(typeof i!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!i){return""}t=i+"/"+t;r=st.isAbs(i)}t=st.normalizeArray(t.split("/").filter((function(e){return!!e})),!r).join("/");return(r?"/":"")+t||"."},relative:function e(t,r){t=lt.resolve(t).substr(1);r=lt.resolve(r).substr(1);function n(e){var t=0;for(;t<e.length;t++){if(e[t]!=="")break}var r=e.length-1;for(;r>=0;r--){if(e[r]!=="")break}if(t>r)return[];return e.slice(t,r-t+1)}var i=n(t.split("/"));var o=n(r.split("/"));var a=Math.min(i.length,o.length);var s=a;for(var u=0;u<a;u++){if(i[u]!==o[u]){s=u;break}}var c=[];for(var u=s;u<i.length;u++){c.push("..")}c=c.concat(o.slice(s));return c.join("/")}};var ft=[];var dt=function e(t){var r=0;for(var n=0;n<t.length;++n){var i=t.charCodeAt(n);if(i<=127){r++}else if(i<=2047){r+=2}else if(i>=55296&&i<=57343){r+=4;++n}else{r+=3}}return r};var ht=function e(t,r,n,i){x(typeof t==="string","stringToUTF8Array expects a string (got ".concat(E(t),")"));if(!(i>0))return 0;var o=n;var a=n+i-1;for(var s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var c=t.charCodeAt(++s);u=65536+((u&1023)<<10)|c&1023}if(u<=127){if(n>=a)break;r[n++]=u}else if(u<=2047){if(n+1>=a)break;r[n++]=192|u>>6;r[n++]=128|u&63}else if(u<=65535){if(n+2>=a)break;r[n++]=224|u>>12;r[n++]=128|u>>6&63;r[n++]=128|u&63}else{if(n+3>=a)break;if(u>1114111)We("Invalid Unicode code point "+De(u)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");r[n++]=240|u>>18;r[n++]=128|u>>12&63;r[n++]=128|u>>6&63;r[n++]=128|u&63}}r[n]=0;return n-o};function pt(e,t,r){var n=r>0?r:dt(e)+1;var i=new Array(n);var o=ht(e,i,0,i.length);if(t)i.length=o;return i}var vt=function e(){if(!ft.length){var t=null;if(typeof window!="undefined"&&typeof window.prompt=="function"){t=window.prompt("Input: ");if(t!==null){t+="\n"}}else{}if(!t){return null}ft=pt(t,true)}return ft.shift()};var mt={ttys:[],init:function e(){},shutdown:function e(){},register:function e(t,r){mt.ttys[t]={input:[],output:[],ops:r};Ot.registerDevice(t,mt.stream_ops)},stream_ops:{open:function e(t){var r=mt.ttys[t.node.rdev];if(!r){throw new Ot.ErrnoError(43)}t.tty=r;t.seekable=false},close:function e(t){t.tty.ops.fsync(t.tty)},fsync:function e(t){t.tty.ops.fsync(t.tty)},read:function e(t,r,n,i,o){if(!t.tty||!t.tty.ops.get_char){throw new Ot.ErrnoError(60)}var a=0;for(var s=0;s<i;s++){var u;try{u=t.tty.ops.get_char(t.tty)}catch(e){throw new Ot.ErrnoError(29)}if(u===undefined&&a===0){throw new Ot.ErrnoError(6)}if(u===null||u===undefined)break;a++;r[n+s]=u}if(a){t.node.timestamp=Date.now()}return a},write:function e(t,r,n,i,o){if(!t.tty||!t.tty.ops.put_char){throw new Ot.ErrnoError(60)}try{for(var a=0;a<i;a++){t.tty.ops.put_char(t.tty,r[n+a])}}catch(e){throw new Ot.ErrnoError(29)}if(i){t.node.timestamp=Date.now()}return a}},default_tty_ops:{get_char:function e(t){return vt()},put_char:function e(t,r){if(r===null||r===10){I(Ge(t.output,0));t.output=[]}else{if(r!=0)t.output.push(r)}},fsync:function e(t){if(t.output&&t.output.length>0){I(Ge(t.output,0));t.output=[]}},ioctl_tcgets:function e(t){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function e(t,r,n){return 0},ioctl_tiocgwinsz:function e(t){return[24,80]}},default_tty1_ops:{put_char:function e(t,r){if(r===null||r===10){R(Ge(t.output,0));t.output=[]}else{if(r!=0)t.output.push(r)}},fsync:function e(t){if(t.output&&t.output.length>0){R(Ge(t.output,0));t.output=[]}}}};var yt=function e(t,r){M.fill(0,t,t+r);return t};var gt=function e(t,r){x(r,"alignment argument is required");return Math.ceil(t/r)*r};var bt=function e(t){t=gt(t,65536);var r=Mn(65536,t);if(!r)return 0;return yt(r,t)};var _t={ops_table:null,mount:function e(t){return _t.createNode(null,"/",16384|511,0)},createNode:function e(t,r,n,i){if(Ot.isBlkdev(n)||Ot.isFIFO(n)){throw new Ot.ErrnoError(63)}_t.ops_table||(_t.ops_table={dir:{node:{getattr:_t.node_ops.getattr,setattr:_t.node_ops.setattr,lookup:_t.node_ops.lookup,mknod:_t.node_ops.mknod,rename:_t.node_ops.rename,unlink:_t.node_ops.unlink,rmdir:_t.node_ops.rmdir,readdir:_t.node_ops.readdir,symlink:_t.node_ops.symlink},stream:{llseek:_t.stream_ops.llseek}},file:{node:{getattr:_t.node_ops.getattr,setattr:_t.node_ops.setattr},stream:{llseek:_t.stream_ops.llseek,read:_t.stream_ops.read,write:_t.stream_ops.write,allocate:_t.stream_ops.allocate,mmap:_t.stream_ops.mmap,msync:_t.stream_ops.msync}},link:{node:{getattr:_t.node_ops.getattr,setattr:_t.node_ops.setattr,readlink:_t.node_ops.readlink},stream:{}},chrdev:{node:{getattr:_t.node_ops.getattr,setattr:_t.node_ops.setattr},stream:Ot.chrdev_stream_ops}});var o=Ot.createNode(t,r,n,i);if(Ot.isDir(o.mode)){o.node_ops=_t.ops_table.dir.node;o.stream_ops=_t.ops_table.dir.stream;o.contents={}}else if(Ot.isFile(o.mode)){o.node_ops=_t.ops_table.file.node;o.stream_ops=_t.ops_table.file.stream;o.usedBytes=0;o.contents=null}else if(Ot.isLink(o.mode)){o.node_ops=_t.ops_table.link.node;o.stream_ops=_t.ops_table.link.stream}else if(Ot.isChrdev(o.mode)){o.node_ops=_t.ops_table.chrdev.node;o.stream_ops=_t.ops_table.chrdev.stream}o.timestamp=Date.now();if(t){t.contents[r]=o;t.timestamp=o.timestamp}return o},getFileDataAsTypedArray:function e(t){if(!t.contents)return new Uint8Array(0);if(t.contents.subarray)return t.contents.subarray(0,t.usedBytes);return new Uint8Array(t.contents)},expandFileStorage:function e(t,r){var n=t.contents?t.contents.length:0;if(n>=r)return;var i=1024*1024;r=Math.max(r,n*(n<i?2:1.125)>>>0);if(n!=0)r=Math.max(r,256);var o=t.contents;t.contents=new Uint8Array(r);if(t.usedBytes>0)t.contents.set(o.subarray(0,t.usedBytes),0)},resizeFileStorage:function e(t,r){if(t.usedBytes==r)return;if(r==0){t.contents=null;t.usedBytes=0}else{var n=t.contents;t.contents=new Uint8Array(r);if(n){t.contents.set(n.subarray(0,Math.min(r,t.usedBytes)))}t.usedBytes=r}},node_ops:{getattr:function e(t){var r={};r.dev=Ot.isChrdev(t.mode)?t.id:1;r.ino=t.id;r.mode=t.mode;r.nlink=1;r.uid=0;r.gid=0;r.rdev=t.rdev;if(Ot.isDir(t.mode)){r.size=4096}else if(Ot.isFile(t.mode)){r.size=t.usedBytes}else if(Ot.isLink(t.mode)){r.size=t.link.length}else{r.size=0}r.atime=new Date(t.timestamp);r.mtime=new Date(t.timestamp);r.ctime=new Date(t.timestamp);r.blksize=4096;r.blocks=Math.ceil(r.size/r.blksize);return r},setattr:function e(t,r){if(r.mode!==undefined){t.mode=r.mode}if(r.timestamp!==undefined){t.timestamp=r.timestamp}if(r.size!==undefined){_t.resizeFileStorage(t,r.size)}},lookup:function e(t,r){throw Ot.genericErrors[44]},mknod:function e(t,r,n,i){return _t.createNode(t,r,n,i)},rename:function e(t,r,n){if(Ot.isDir(t.mode)){var i;try{i=Ot.lookupNode(r,n)}catch(e){}if(i){for(var o in i.contents){throw new Ot.ErrnoError(55)}}}delete t.parent.contents[t.name];t.parent.timestamp=Date.now();t.name=n;r.contents[n]=t;r.timestamp=t.parent.timestamp;t.parent=r},unlink:function e(t,r){delete t.contents[r];t.timestamp=Date.now()},rmdir:function e(t,r){var n=Ot.lookupNode(t,r);for(var i in n.contents){throw new Ot.ErrnoError(55)}delete t.contents[r];t.timestamp=Date.now()},readdir:function e(t){var r=[".",".."];for(var n=0,i=Object.keys(t.contents);n<i.length;n++){var o=i[n];r.push(o)}return r},symlink:function e(t,r,n){var i=_t.createNode(t,r,511|40960,0);i.link=n;return i},readlink:function e(t){if(!Ot.isLink(t.mode)){throw new Ot.ErrnoError(28)}return t.link}},stream_ops:{read:function e(t,r,n,i,o){var a=t.node.contents;if(o>=t.node.usedBytes)return 0;var s=Math.min(t.node.usedBytes-o,i);x(s>=0);if(s>8&&a.subarray){r.set(a.subarray(o,o+s),n)}else{for(var u=0;u<s;u++)r[n+u]=a[o+u]}return s},write:function e(t,r,n,i,o,a){x(!(r instanceof ArrayBuffer));if(r.buffer===L.buffer){a=false}if(!i)return 0;var s=t.node;s.timestamp=Date.now();if(r.subarray&&(!s.contents||s.contents.subarray)){if(a){x(o===0,"canOwn must imply no weird position inside the file");s.contents=r.subarray(n,n+i);s.usedBytes=i;return i}else if(s.usedBytes===0&&o===0){s.contents=r.slice(n,n+i);s.usedBytes=i;return i}else if(o+i<=s.usedBytes){s.contents.set(r.subarray(n,n+i),o);return i}}_t.expandFileStorage(s,o+i);if(s.contents.subarray&&r.subarray){s.contents.set(r.subarray(n,n+i),o)}else{for(var u=0;u<i;u++){s.contents[o+u]=r[n+u]}}s.usedBytes=Math.max(s.usedBytes,o+i);return i},llseek:function e(t,r,n){var i=r;if(n===1){i+=t.position}else if(n===2){if(Ot.isFile(t.node.mode)){i+=t.node.usedBytes}}if(i<0){throw new Ot.ErrnoError(28)}return i},allocate:function e(t,r,n){_t.expandFileStorage(t.node,r+n);t.node.usedBytes=Math.max(t.node.usedBytes,r+n)},mmap:function e(t,r,n,i,o){if(!Ot.isFile(t.node.mode)){throw new Ot.ErrnoError(43)}var a;var s;var u=t.node.contents;if(!(o&2)&&u.buffer===L.buffer){s=false;a=u.byteOffset}else{if(n>0||n+r<u.length){if(u.subarray){u=u.subarray(n,n+r)}else{u=Array.prototype.slice.call(u,n,n+r)}}s=true;a=bt(r);if(!a){throw new Ot.ErrnoError(48)}L.set(u,a)}return{ptr:a,allocated:s}},msync:function e(t,r,n,i,o){_t.stream_ops.write(t,r,0,i,n,false);return 0}}};var St=function e(t,r,n,i){var o=!i?ie("al ".concat(t)):"";S(t,(function(e){x(e,'Loading data file "'.concat(t,'" failed (no arrayBuffer).'));r(new Uint8Array(e));if(o)ae(o)}),(function(e){if(n){n()}else{throw'Loading data file "'.concat(t,'" failed.')}}));if(o)oe(o)};var Et=function e(t,r,n,i,o,a){Ot.createDataFile(t,r,n,i,o,a)};var wt=w["preloadPlugins"]||[];var Tt=function e(t,r,n,i){if(typeof Browser!="undefined")Browser.init();var o=false;wt.forEach((function(e){if(o)return;if(e["canHandle"](r)){e["handle"](t,r,n,i);o=true}}));return o};var It=function e(t,r,n,i,o,a,s,u,c,l){var f=r?lt.resolve(st.join2(t,r)):t;var d=ie("cp ".concat(f));function h(e){function n(e){l===null||l===void 0||l();if(!u){Et(t,r,e,i,o,c)}a===null||a===void 0||a();ae(d)}if(Tt(e,f,n,(function(){s===null||s===void 0||s();ae(d)}))){return}n(e)}oe(d);if(typeof n=="string"){St(n,h,s)}else{h(n)}};var Rt=function e(t){var r={r:0,"r+":2,w:512|64|1,"w+":512|64|2,a:1024|64|1,"a+":1024|64|2};var n=r[t];if(typeof n=="undefined"){throw new Error("Unknown file open mode: ".concat(t))}return n};var Ct=function e(t,r){var n=0;if(t)n|=292|73;if(r)n|=146;return n};var kt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"};var At={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ot={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:function(e){function t(e){var r;f(this,t);r=d(this,t,[kt[e]]);r.name="ErrnoError";r.errno=e;for(var n in At){if(At[n]===e){r.code=n;break}}return r}v(t,e);return u(t)}(m(Error)),genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:function(){function e(){f(this,e);this.shared={}}return u(e,[{key:"object",get:function e(){return this.node},set:function e(t){this.node=t}},{key:"isRead",get:function e(){return(this.flags&2097155)!==1}},{key:"isWrite",get:function e(){return(this.flags&2097155)!==0}},{key:"isAppend",get:function e(){return this.flags&1024}},{key:"flags",get:function e(){return this.shared.flags},set:function e(t){this.shared.flags=t}},{key:"position",get:function e(){return this.shared.position},set:function e(t){this.shared.position=t}}])}(),FSNode:function(){function e(t,r,n,i){f(this,e);if(!t){t=this}this.parent=t;this.mount=t.mount;this.mounted=null;this.id=Ot.nextInode++;this.name=r;this.mode=n;this.node_ops={};this.stream_ops={};this.rdev=i;this.readMode=292|73;this.writeMode=146}return u(e,[{key:"read",get:function e(){return(this.mode&this.readMode)===this.readMode},set:function e(t){t?this.mode|=this.readMode:this.mode&=~this.readMode}},{key:"write",get:function e(){return(this.mode&this.writeMode)===this.writeMode},set:function e(t){t?this.mode|=this.writeMode:this.mode&=~this.writeMode}},{key:"isFolder",get:function e(){return Ot.isDir(this.mode)}},{key:"isDevice",get:function e(){return Ot.isChrdev(this.mode)}}])}(),lookupPath:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};t=lt.resolve(t);if(!t)return{path:"",node:null};var n={follow_mount:true,recurse_count:0};r=Object.assign(n,r);if(r.recurse_count>8){throw new Ot.ErrnoError(32)}var i=t.split("/").filter((function(e){return!!e}));var o=Ot.root;var a="/";for(var s=0;s<i.length;s++){var u=s===i.length-1;if(u&&r.parent){break}o=Ot.lookupNode(o,i[s]);a=st.join2(a,i[s]);if(Ot.isMountpoint(o)){if(!u||u&&r.follow_mount){o=o.mounted.root}}if(!u||r.follow){var c=0;while(Ot.isLink(o.mode)){var l=Ot.readlink(a);a=lt.resolve(st.dirname(a),l);var f=Ot.lookupPath(a,{recurse_count:r.recurse_count+1});o=f.node;if(c++>40){throw new Ot.ErrnoError(32)}}}}return{path:a,node:o}},getPath:function e(t){var r;while(true){if(Ot.isRoot(t)){var n=t.mount.mountpoint;if(!r)return n;return n[n.length-1]!=="/"?"".concat(n,"/").concat(r):n+r}r=r?"".concat(t.name,"/").concat(r):t.name;t=t.parent}},hashName:function e(t,r){var n=0;for(var i=0;i<r.length;i++){n=(n<<5)-n+r.charCodeAt(i)|0}return(t+n>>>0)%Ot.nameTable.length},hashAddNode:function e(t){var r=Ot.hashName(t.parent.id,t.name);t.name_next=Ot.nameTable[r];Ot.nameTable[r]=t},hashRemoveNode:function e(t){var r=Ot.hashName(t.parent.id,t.name);if(Ot.nameTable[r]===t){Ot.nameTable[r]=t.name_next}else{var n=Ot.nameTable[r];while(n){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}}},lookupNode:function e(t,r){var n=Ot.mayLookup(t);if(n){throw new Ot.ErrnoError(n)}var i=Ot.hashName(t.id,r);for(var o=Ot.nameTable[i];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===r){return o}}return Ot.lookup(t,r)},createNode:function e(t,r,n,i){x(E(t)=="object");var o=new Ot.FSNode(t,r,n,i);Ot.hashAddNode(o);return o},destroyNode:function e(t){Ot.hashRemoveNode(t)},isRoot:function e(t){return t===t.parent},isMountpoint:function e(t){return!!t.mounted},isFile:function e(t){return(t&61440)===32768},isDir:function e(t){return(t&61440)===16384},isLink:function e(t){return(t&61440)===40960},isChrdev:function e(t){return(t&61440)===8192},isBlkdev:function e(t){return(t&61440)===24576},isFIFO:function e(t){return(t&61440)===4096},isSocket:function e(t){return(t&49152)===49152},flagsToPermissionString:function e(t){var r=["r","w","rw"][t&3];if(t&512){r+="w"}return r},nodePermissions:function e(t,r){if(Ot.ignorePermissions){return 0}if(r.includes("r")&&!(t.mode&292)){return 2}else if(r.includes("w")&&!(t.mode&146)){return 2}else if(r.includes("x")&&!(t.mode&73)){return 2}return 0},mayLookup:function e(t){if(!Ot.isDir(t.mode))return 54;var r=Ot.nodePermissions(t,"x");if(r)return r;if(!t.node_ops.lookup)return 2;return 0},mayCreate:function e(t,r){try{var n=Ot.lookupNode(t,r);return 20}catch(e){}return Ot.nodePermissions(t,"wx")},mayDelete:function e(t,r,n){var i;try{i=Ot.lookupNode(t,r)}catch(e){return e.errno}var o=Ot.nodePermissions(t,"wx");if(o){return o}if(n){if(!Ot.isDir(i.mode)){return 54}if(Ot.isRoot(i)||Ot.getPath(i)===Ot.cwd()){return 10}}else{if(Ot.isDir(i.mode)){return 31}}return 0},mayOpen:function e(t,r){if(!t){return 44}if(Ot.isLink(t.mode)){return 32}else if(Ot.isDir(t.mode)){if(Ot.flagsToPermissionString(r)!=="r"||r&512){return 31}}return Ot.nodePermissions(t,Ot.flagsToPermissionString(r))},MAX_OPEN_FDS:4096,nextfd:function e(){for(var t=0;t<=Ot.MAX_OPEN_FDS;t++){if(!Ot.streams[t]){return t}}throw new Ot.ErrnoError(33)},getStreamChecked:function e(t){var r=Ot.getStream(t);if(!r){throw new Ot.ErrnoError(8)}return r},getStream:function e(t){return Ot.streams[t]},createStream:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;t=Object.assign(new Ot.FSStream,t);if(r==-1){r=Ot.nextfd()}t.fd=r;Ot.streams[r]=t;return t},closeStream:function e(t){Ot.streams[t]=null},dupStream:function e(t){var r,n;var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;var o=Ot.createStream(t,i);(r=o.stream_ops)===null||r===void 0||(n=r.dup)===null||n===void 0||n.call(r,o);return o},chrdev_stream_ops:{open:function e(t){var r,n;var i=Ot.getDevice(t.node.rdev);t.stream_ops=i.stream_ops;(r=(n=t.stream_ops).open)===null||r===void 0||r.call(n,t)},llseek:function e(){throw new Ot.ErrnoError(70)}},major:function e(t){return t>>8},minor:function e(t){return t&255},makedev:function e(t,r){return t<<8|r},registerDevice:function e(t,r){Ot.devices[t]={stream_ops:r}},getDevice:function e(t){return Ot.devices[t]},getMounts:function e(r){var n=[];var i=[r];while(i.length){var o=i.pop();n.push(o);i.push.apply(i,t(o.mounts))}return n},syncfs:function e(t,r){if(typeof t=="function"){r=t;t=false}Ot.syncFSRequests++;if(Ot.syncFSRequests>1){R("warning: ".concat(Ot.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"))}var n=Ot.getMounts(Ot.root.mount);var i=0;function o(e){x(Ot.syncFSRequests>0);Ot.syncFSRequests--;return r(e)}function a(e){if(e){if(!a.errored){a.errored=true;return o(e)}return}if(++i>=n.length){o(null)}}n.forEach((function(e){if(!e.type.syncfs){return a(null)}e.type.syncfs(e,t,a)}))},mount:function e(t,r,n){if(typeof t=="string"){throw t}var i=n==="/";var o=!n;var a;if(i&&Ot.root){throw new Ot.ErrnoError(10)}else if(!i&&!o){var s=Ot.lookupPath(n,{follow_mount:false});n=s.path;a=s.node;if(Ot.isMountpoint(a)){throw new Ot.ErrnoError(10)}if(!Ot.isDir(a.mode)){throw new Ot.ErrnoError(54)}}var e={type:t,opts:r,mountpoint:n,mounts:[]};var u=t.mount(e);u.mount=e;e.root=u;if(i){Ot.root=u}else if(a){a.mounted=e;if(a.mount){a.mount.mounts.push(e)}}return u},unmount:function e(t){var r=Ot.lookupPath(t,{follow_mount:false});if(!Ot.isMountpoint(r.node)){throw new Ot.ErrnoError(28)}var n=r.node;var i=n.mounted;var o=Ot.getMounts(i);Object.keys(Ot.nameTable).forEach((function(e){var t=Ot.nameTable[e];while(t){var r=t.name_next;if(o.includes(t.mount)){Ot.destroyNode(t)}t=r}}));n.mounted=null;var a=n.mount.mounts.indexOf(i);x(a!==-1);n.mount.mounts.splice(a,1)},lookup:function e(t,r){return t.node_ops.lookup(t,r)},mknod:function e(t,r,n){var i=Ot.lookupPath(t,{parent:true});var o=i.node;var a=st.basename(t);if(!a||a==="."||a===".."){throw new Ot.ErrnoError(28)}var s=Ot.mayCreate(o,a);if(s){throw new Ot.ErrnoError(s)}if(!o.node_ops.mknod){throw new Ot.ErrnoError(63)}return o.node_ops.mknod(o,a,r,n)},create:function e(t,r){r=r!==undefined?r:438;r&=4095;r|=32768;return Ot.mknod(t,r,0)},mkdir:function e(t,r){r=r!==undefined?r:511;r&=511|512;r|=16384;return Ot.mknod(t,r,0)},mkdirTree:function e(t,r){var n=t.split("/");var i="";for(var o=0;o<n.length;++o){if(!n[o])continue;i+="/"+n[o];try{Ot.mkdir(i,r)}catch(e){if(e.errno!=20)throw e}}},mkdev:function e(t,r,n){if(typeof n=="undefined"){n=r;r=438}r|=8192;return Ot.mknod(t,r,n)},symlink:function e(t,r){if(!lt.resolve(t)){throw new Ot.ErrnoError(44)}var n=Ot.lookupPath(r,{parent:true});var i=n.node;if(!i){throw new Ot.ErrnoError(44)}var o=st.basename(r);var a=Ot.mayCreate(i,o);if(a){throw new Ot.ErrnoError(a)}if(!i.node_ops.symlink){throw new Ot.ErrnoError(63)}return i.node_ops.symlink(i,o,t)},rename:function e(t,r){var n=st.dirname(t);var i=st.dirname(r);var o=st.basename(t);var a=st.basename(r);var s,u,c;s=Ot.lookupPath(t,{parent:true});u=s.node;s=Ot.lookupPath(r,{parent:true});c=s.node;if(!u||!c)throw new Ot.ErrnoError(44);if(u.mount!==c.mount){throw new Ot.ErrnoError(75)}var l=Ot.lookupNode(u,o);var f=lt.relative(t,i);if(f.charAt(0)!=="."){throw new Ot.ErrnoError(28)}f=lt.relative(r,n);if(f.charAt(0)!=="."){throw new Ot.ErrnoError(55)}var d;try{d=Ot.lookupNode(c,a)}catch(e){}if(l===d){return}var h=Ot.isDir(l.mode);var p=Ot.mayDelete(u,o,h);if(p){throw new Ot.ErrnoError(p)}p=d?Ot.mayDelete(c,a,h):Ot.mayCreate(c,a);if(p){throw new Ot.ErrnoError(p)}if(!u.node_ops.rename){throw new Ot.ErrnoError(63)}if(Ot.isMountpoint(l)||d&&Ot.isMountpoint(d)){throw new Ot.ErrnoError(10)}if(c!==u){p=Ot.nodePermissions(u,"w");if(p){throw new Ot.ErrnoError(p)}}Ot.hashRemoveNode(l);try{u.node_ops.rename(l,c,a)}catch(e){throw e}finally{Ot.hashAddNode(l)}},rmdir:function e(t){var r=Ot.lookupPath(t,{parent:true});var n=r.node;var i=st.basename(t);var o=Ot.lookupNode(n,i);var a=Ot.mayDelete(n,i,true);if(a){throw new Ot.ErrnoError(a)}if(!n.node_ops.rmdir){throw new Ot.ErrnoError(63)}if(Ot.isMountpoint(o)){throw new Ot.ErrnoError(10)}n.node_ops.rmdir(n,i);Ot.destroyNode(o)},readdir:function e(t){var r=Ot.lookupPath(t,{follow:true});var n=r.node;if(!n.node_ops.readdir){throw new Ot.ErrnoError(54)}return n.node_ops.readdir(n)},unlink:function e(t){var r=Ot.lookupPath(t,{parent:true});var n=r.node;if(!n){throw new Ot.ErrnoError(44)}var i=st.basename(t);var o=Ot.lookupNode(n,i);var a=Ot.mayDelete(n,i,false);if(a){throw new Ot.ErrnoError(a)}if(!n.node_ops.unlink){throw new Ot.ErrnoError(63)}if(Ot.isMountpoint(o)){throw new Ot.ErrnoError(10)}n.node_ops.unlink(n,i);Ot.destroyNode(o)},readlink:function e(t){var r=Ot.lookupPath(t);var n=r.node;if(!n){throw new Ot.ErrnoError(44)}if(!n.node_ops.readlink){throw new Ot.ErrnoError(28)}return lt.resolve(Ot.getPath(n.parent),n.node_ops.readlink(n))},stat:function e(t,r){var n=Ot.lookupPath(t,{follow:!r});var i=n.node;if(!i){throw new Ot.ErrnoError(44)}if(!i.node_ops.getattr){throw new Ot.ErrnoError(63)}return i.node_ops.getattr(i)},lstat:function e(t){return Ot.stat(t,true)},chmod:function e(t,r,n){var i;if(typeof t=="string"){var o=Ot.lookupPath(t,{follow:!n});i=o.node}else{i=t}if(!i.node_ops.setattr){throw new Ot.ErrnoError(63)}i.node_ops.setattr(i,{mode:r&4095|i.mode&~4095,timestamp:Date.now()})},lchmod:function e(t,r){Ot.chmod(t,r,true)},fchmod:function e(t,r){var n=Ot.getStreamChecked(t);Ot.chmod(n.node,r)},chown:function e(t,r,n,i){var o;if(typeof t=="string"){var a=Ot.lookupPath(t,{follow:!i});o=a.node}else{o=t}if(!o.node_ops.setattr){throw new Ot.ErrnoError(63)}o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function e(t,r,n){Ot.chown(t,r,n,true)},fchown:function e(t,r,n){var i=Ot.getStreamChecked(t);Ot.chown(i.node,r,n)},truncate:function e(t,r){if(r<0){throw new Ot.ErrnoError(28)}var n;if(typeof t=="string"){var i=Ot.lookupPath(t,{follow:true});n=i.node}else{n=t}if(!n.node_ops.setattr){throw new Ot.ErrnoError(63)}if(Ot.isDir(n.mode)){throw new Ot.ErrnoError(31)}if(!Ot.isFile(n.mode)){throw new Ot.ErrnoError(28)}var o=Ot.nodePermissions(n,"w");if(o){throw new Ot.ErrnoError(o)}n.node_ops.setattr(n,{size:r,timestamp:Date.now()})},ftruncate:function e(t,r){var n=Ot.getStreamChecked(t);if((n.flags&2097155)===0){throw new Ot.ErrnoError(28)}Ot.truncate(n.node,r)},utime:function e(t,r,n){var i=Ot.lookupPath(t,{follow:true});var o=i.node;o.node_ops.setattr(o,{timestamp:Math.max(r,n)})},open:function e(t,r,n){if(t===""){throw new Ot.ErrnoError(44)}r=typeof r=="string"?Rt(r):r;if(r&64){n=typeof n=="undefined"?438:n;n=n&4095|32768}else{n=0}var i;if(E(t)=="object"){i=t}else{t=st.normalize(t);try{var o=Ot.lookupPath(t,{follow:!(r&131072)});i=o.node}catch(e){}}var a=false;if(r&64){if(i){if(r&128){throw new Ot.ErrnoError(20)}}else{i=Ot.mknod(t,n,0);a=true}}if(!i){throw new Ot.ErrnoError(44)}if(Ot.isChrdev(i.mode)){r&=~512}if(r&65536&&!Ot.isDir(i.mode)){throw new Ot.ErrnoError(54)}if(!a){var s=Ot.mayOpen(i,r);if(s){throw new Ot.ErrnoError(s)}}if(r&512&&!a){Ot.truncate(i,0)}r&=~(128|512|131072);var u=Ot.createStream({node:i,path:Ot.getPath(i),flags:r,seekable:true,position:0,stream_ops:i.stream_ops,ungotten:[],error:false});if(u.stream_ops.open){u.stream_ops.open(u)}if(w["logReadFiles"]&&!(r&1)){if(!Ot.readFiles)Ot.readFiles={};if(!(t in Ot.readFiles)){Ot.readFiles[t]=1}}return u},close:function e(t){if(Ot.isClosed(t)){throw new Ot.ErrnoError(8)}if(t.getdents)t.getdents=null;try{if(t.stream_ops.close){t.stream_ops.close(t)}}catch(e){throw e}finally{Ot.closeStream(t.fd)}t.fd=null},isClosed:function e(t){return t.fd===null},llseek:function e(t,r,n){if(Ot.isClosed(t)){throw new Ot.ErrnoError(8)}if(!t.seekable||!t.stream_ops.llseek){throw new Ot.ErrnoError(70)}if(n!=0&&n!=1&&n!=2){throw new Ot.ErrnoError(28)}t.position=t.stream_ops.llseek(t,r,n);t.ungotten=[];return t.position},read:function e(t,r,n,i,o){x(n>=0);if(i<0||o<0){throw new Ot.ErrnoError(28)}if(Ot.isClosed(t)){throw new Ot.ErrnoError(8)}if((t.flags&2097155)===1){throw new Ot.ErrnoError(8)}if(Ot.isDir(t.node.mode)){throw new Ot.ErrnoError(31)}if(!t.stream_ops.read){throw new Ot.ErrnoError(28)}var a=typeof o!="undefined";if(!a){o=t.position}else if(!t.seekable){throw new Ot.ErrnoError(70)}var s=t.stream_ops.read(t,r,n,i,o);if(!a)t.position+=s;return s},write:function e(t,r,n,i,o,a){x(n>=0);if(i<0||o<0){throw new Ot.ErrnoError(28)}if(Ot.isClosed(t)){throw new Ot.ErrnoError(8)}if((t.flags&2097155)===0){throw new Ot.ErrnoError(8)}if(Ot.isDir(t.node.mode)){throw new Ot.ErrnoError(31)}if(!t.stream_ops.write){throw new Ot.ErrnoError(28)}if(t.seekable&&t.flags&1024){Ot.llseek(t,0,2)}var s=typeof o!="undefined";if(!s){o=t.position}else if(!t.seekable){throw new Ot.ErrnoError(70)}var u=t.stream_ops.write(t,r,n,i,o,a);if(!s)t.position+=u;return u},allocate:function e(t,r,n){if(Ot.isClosed(t)){throw new Ot.ErrnoError(8)}if(r<0||n<=0){throw new Ot.ErrnoError(28)}if((t.flags&2097155)===0){throw new Ot.ErrnoError(8)}if(!Ot.isFile(t.node.mode)&&!Ot.isDir(t.node.mode)){throw new Ot.ErrnoError(43)}if(!t.stream_ops.allocate){throw new Ot.ErrnoError(138)}t.stream_ops.allocate(t,r,n)},mmap:function e(t,r,n,i,o){if((i&2)!==0&&(o&2)===0&&(t.flags&2097155)!==2){throw new Ot.ErrnoError(2)}if((t.flags&2097155)===1){throw new Ot.ErrnoError(2)}if(!t.stream_ops.mmap){throw new Ot.ErrnoError(43)}return t.stream_ops.mmap(t,r,n,i,o)},msync:function e(t,r,n,i,o){x(n>=0);if(!t.stream_ops.msync){return 0}return t.stream_ops.msync(t,r,n,i,o)},ioctl:function e(t,r,n){if(!t.stream_ops.ioctl){throw new Ot.ErrnoError(59)}return t.stream_ops.ioctl(t,r,n)},readFile:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};r.flags=r.flags||0;r.encoding=r.encoding||"binary";if(r.encoding!=="utf8"&&r.encoding!=="binary"){throw new Error('Invalid encoding type "'.concat(r.encoding,'"'))}var n;var i=Ot.open(t,r.flags);var o=Ot.stat(t);var a=o.size;var s=new Uint8Array(a);Ot.read(i,s,0,a,0);if(r.encoding==="utf8"){n=Ge(s,0)}else if(r.encoding==="binary"){n=s}Ot.close(i);return n},writeFile:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};n.flags=n.flags||577;var i=Ot.open(t,n.flags,n.mode);if(typeof r=="string"){var o=new Uint8Array(dt(r)+1);var a=ht(r,o,0,o.length);Ot.write(i,o,0,a,undefined,n.canOwn)}else if(ArrayBuffer.isView(r)){Ot.write(i,r,0,r.byteLength,undefined,n.canOwn)}else{throw new Error("Unsupported data type")}Ot.close(i)},cwd:function e(){return Ot.currentPath},chdir:function e(t){var r=Ot.lookupPath(t,{follow:true});if(r.node===null){throw new Ot.ErrnoError(44)}if(!Ot.isDir(r.node.mode)){throw new Ot.ErrnoError(54)}var n=Ot.nodePermissions(r.node,"x");if(n){throw new Ot.ErrnoError(n)}Ot.currentPath=r.path},createDefaultDirectories:function e(){Ot.mkdir("/tmp");Ot.mkdir("/home");Ot.mkdir("/home/web_user")},createDefaultDevices:function e(){Ot.mkdir("/dev");Ot.registerDevice(Ot.makedev(1,3),{read:function e(){return 0},write:function e(t,r,n,i,o){return i}});Ot.mkdev("/dev/null",Ot.makedev(1,3));mt.register(Ot.makedev(5,0),mt.default_tty_ops);mt.register(Ot.makedev(6,0),mt.default_tty1_ops);Ot.mkdev("/dev/tty",Ot.makedev(5,0));Ot.mkdev("/dev/tty1",Ot.makedev(6,0));var t=new Uint8Array(1024),r=0;var n=function e(){if(r===0){r=ct(t).byteLength}return t[--r]};Ot.createDevice("/dev","random",n);Ot.createDevice("/dev","urandom",n);Ot.mkdir("/dev/shm");Ot.mkdir("/dev/shm/tmp")},createSpecialDirectories:function e(){Ot.mkdir("/proc");var t=Ot.mkdir("/proc/self");Ot.mkdir("/proc/self/fd");Ot.mount({mount:function e(){var r=Ot.createNode(t,"fd",16384|511,73);r.node_ops={lookup:function e(t,r){var n=+r;var i=Ot.getStreamChecked(n);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function e(){return i.path}}};o.parent=o;return o}};return r}},{},"/proc/self/fd")},createStandardStreams:function e(){if(w["stdin"]){Ot.createDevice("/dev","stdin",w["stdin"])}else{Ot.symlink("/dev/tty","/dev/stdin")}if(w["stdout"]){Ot.createDevice("/dev","stdout",null,w["stdout"])}else{Ot.symlink("/dev/tty","/dev/stdout")}if(w["stderr"]){Ot.createDevice("/dev","stderr",null,w["stderr"])}else{Ot.symlink("/dev/tty1","/dev/stderr")}var t=Ot.open("/dev/stdin",0);var r=Ot.open("/dev/stdout",1);var n=Ot.open("/dev/stderr",1);x(t.fd===0,"invalid handle for stdin (".concat(t.fd,")"));x(r.fd===1,"invalid handle for stdout (".concat(r.fd,")"));x(n.fd===2,"invalid handle for stderr (".concat(n.fd,")"))},staticInit:function e(){[44].forEach((function(e){Ot.genericErrors[e]=new Ot.ErrnoError(e);Ot.genericErrors[e].stack="<generic error, no stack>"}));Ot.nameTable=new Array(4096);Ot.mount(_t,{},"/");Ot.createDefaultDirectories();Ot.createDefaultDevices();Ot.createSpecialDirectories();Ot.filesystems={MEMFS:_t}},init:function e(t,r,n){x(!Ot.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");Ot.init.initialized=true;w["stdin"]=t||w["stdin"];w["stdout"]=r||w["stdout"];w["stderr"]=n||w["stderr"];Ot.createStandardStreams()},quit:function e(){Ot.init.initialized=false;Ln(0);for(var t=0;t<Ot.streams.length;t++){var r=Ot.streams[t];if(!r){continue}Ot.close(r)}},findObject:function e(t,r){var n=Ot.analyzePath(t,r);if(!n.exists){return null}return n.object},analyzePath:function e(t,r){try{var n=Ot.lookupPath(t,{follow:!r});t=n.path}catch(e){}var i={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var n=Ot.lookupPath(t,{parent:true});i.parentExists=true;i.parentPath=n.path;i.parentObject=n.node;i.name=st.basename(t);n=Ot.lookupPath(t,{follow:!r});i.exists=true;i.path=n.path;i.object=n.node;i.name=n.node.name;i.isRoot=n.path==="/"}catch(e){i.error=e.errno}return i},createPath:function e(t,r,n,i){t=typeof t=="string"?t:Ot.getPath(t);var o=r.split("/").reverse();while(o.length){var a=o.pop();if(!a)continue;var s=st.join2(t,a);try{Ot.mkdir(s)}catch(e){}t=s}return s},createFile:function e(t,r,n,i,o){var a=st.join2(typeof t=="string"?t:Ot.getPath(t),r);var s=Ct(i,o);return Ot.create(a,s)},createDataFile:function e(t,r,n,i,o,a){var s=r;if(t){t=typeof t=="string"?t:Ot.getPath(t);s=r?st.join2(t,r):t}var u=Ct(i,o);var c=Ot.create(s,u);if(n){if(typeof n=="string"){var l=new Array(n.length);for(var f=0,d=n.length;f<d;++f)l[f]=n.charCodeAt(f);n=l}Ot.chmod(c,u|146);var h=Ot.open(c,577);Ot.write(h,n,0,n.length,0,a);Ot.close(h);Ot.chmod(c,u)}},createDevice:function e(t,r,n,i){var o=st.join2(typeof t=="string"?t:Ot.getPath(t),r);var a=Ct(!!n,!!i);if(!Ot.createDevice.major)Ot.createDevice.major=64;var s=Ot.makedev(Ot.createDevice.major++,0);Ot.registerDevice(s,{open:function e(t){t.seekable=false},close:function e(t){var r;if(i!==null&&i!==void 0&&(r=i.buffer)!==null&&r!==void 0&&r.length){i(10)}},read:function e(t,r,i,o,a){var s=0;for(var u=0;u<o;u++){var c;try{c=n()}catch(e){throw new Ot.ErrnoError(29)}if(c===undefined&&s===0){throw new Ot.ErrnoError(6)}if(c===null||c===undefined)break;s++;r[i+u]=c}if(s){t.node.timestamp=Date.now()}return s},write:function e(t,r,n,o,a){for(var s=0;s<o;s++){try{i(r[n+s])}catch(e){throw new Ot.ErrnoError(29)}}if(o){t.node.timestamp=Date.now()}return s}});return Ot.mkdev(o,a,s)},forceLoadFile:function e(t){if(t.isDevice||t.isFolder||t.link||t.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(_){try{t.contents=pt(_(t.url),true);t.usedBytes=t.contents.length}catch(e){throw new Ot.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:function e(t,r,n,i,a){var s=function(){function e(){f(this,e);this.lengthKnown=false;this.chunks=[]}return u(e,[{key:"get",value:function e(t){if(t>this.length-1||t<0){return undefined}var r=t%this.chunkSize;var n=t/this.chunkSize|0;return this.getter(n)[r]}},{key:"setDataGetter",value:function e(t){this.getter=t}},{key:"cacheLength",value:function e(){var t=new XMLHttpRequest;t.open("HEAD",n,false);t.send(null);if(!(t.status>=200&&t.status<300||t.status===304))throw new Error("Couldn't load "+n+". Status: "+t.status);var r=Number(t.getResponseHeader("Content-length"));var i;var o=(i=t.getResponseHeader("Accept-Ranges"))&&i==="bytes";var a=(i=t.getResponseHeader("Content-Encoding"))&&i==="gzip";var s=1024*1024;if(!o)s=r;var u=function e(t,i){if(t>i)throw new Error("invalid range ("+t+", "+i+") or no bytes requested!");if(i>r-1)throw new Error("only "+r+" bytes available! programmer error!");var o=new XMLHttpRequest;o.open("GET",n,false);if(r!==s)o.setRequestHeader("Range","bytes="+t+"-"+i);o.responseType="arraybuffer";if(o.overrideMimeType){o.overrideMimeType("text/plain; charset=x-user-defined")}o.send(null);if(!(o.status>=200&&o.status<300||o.status===304))throw new Error("Couldn't load "+n+". Status: "+o.status);if(o.response!==undefined){return new Uint8Array(o.response||[])}return pt(o.responseText||"",true)};var c=this;c.setDataGetter((function(e){var t=e*s;var n=(e+1)*s-1;n=Math.min(n,r-1);if(typeof c.chunks[e]=="undefined"){c.chunks[e]=u(t,n)}if(typeof c.chunks[e]=="undefined")throw new Error("doXHR failed!");return c.chunks[e]}));if(a||!r){s=r=1;r=this.getter(0).length;s=r;I("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=r;this._chunkSize=s;this.lengthKnown=true}},{key:"length",get:function e(){if(!this.lengthKnown){this.cacheLength()}return this._length}},{key:"chunkSize",get:function e(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}])}();if(typeof XMLHttpRequest!="undefined"){if(!o)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var c=new s;var l={isDevice:false,contents:c}}else{var l={isDevice:false,url:n}}var d=Ot.createFile(t,r,l,i,a);if(l.contents){d.contents=l.contents}else if(l.url){d.contents=null;d.url=l.url}Object.defineProperties(d,{usedBytes:{get:function e(){return this.contents.length}}});var h={};var p=Object.keys(d.stream_ops);p.forEach((function(e){var t=d.stream_ops[e];h[e]=function(){Ot.forceLoadFile(d);return t.apply(void 0,arguments)}}));function v(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);x(a>=0);if(o.slice){for(var s=0;s<a;s++){t[r+s]=o[i+s]}}else{for(var s=0;s<a;s++){t[r+s]=o.get(i+s)}}return a}h.read=function(e,t,r,n,i){Ot.forceLoadFile(d);return v(e,t,r,n,i)};h.mmap=function(e,t,r,n,i){Ot.forceLoadFile(d);var o=bt(t);if(!o){throw new Ot.ErrnoError(48)}v(e,L,o,t,r);return{ptr:o,allocated:true}};d.stream_ops=h;return d},absolutePath:function e(){se("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function e(){se("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function e(){se("FS.createLink has been removed; use FS.symlink instead")},joinPath:function e(){se("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function e(){se("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function e(){se("FS.standardizePath has been removed; use PATH.normalize instead")}};var Pt={DEFAULT_POLLMASK:5,calculateAt:function e(t,r,n){if(st.isAbs(r)){return r}var i;if(t===-100){i=Ot.cwd()}else{var o=Pt.getStreamFromFD(t);i=o.path}if(r.length==0){if(!n){throw new Ot.ErrnoError(44)}return i}return st.join2(i,r)},doStat:function e(t,r,n){var i=t(r);j[n>>2]=i.dev;j[n+4>>2]=i.mode;U[n+8>>2]=i.nlink;j[n+12>>2]=i.uid;j[n+16>>2]=i.gid;j[n+20>>2]=i.rdev;Te=[i.size>>>0,(we=i.size,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[n+24>>2]=Te[0],j[n+28>>2]=Te[1];j[n+32>>2]=4096;j[n+36>>2]=i.blocks;var o=i.atime.getTime();var a=i.mtime.getTime();var s=i.ctime.getTime();Te=[Math.floor(o/1e3)>>>0,(we=Math.floor(o/1e3),+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[n+40>>2]=Te[0],j[n+44>>2]=Te[1];U[n+48>>2]=o%1e3*1e3;Te=[Math.floor(a/1e3)>>>0,(we=Math.floor(a/1e3),+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[n+56>>2]=Te[0],j[n+60>>2]=Te[1];U[n+64>>2]=a%1e3*1e3;Te=[Math.floor(s/1e3)>>>0,(we=Math.floor(s/1e3),+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[n+72>>2]=Te[0],j[n+76>>2]=Te[1];U[n+80>>2]=s%1e3*1e3;Te=[i.ino>>>0,(we=i.ino,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[n+88>>2]=Te[0],j[n+92>>2]=Te[1];return 0},doMsync:function e(t,r,n,i,o){if(!Ot.isFile(r.node.mode)){throw new Ot.ErrnoError(43)}if(i&2){return 0}var a=M.slice(t,t+n);Ot.msync(r,a,o,n,i)},getStreamFromFD:function e(t){var r=Ot.getStreamChecked(t);return r},varargs:undefined,getStr:function e(t){var r=Ze(t);return r}};function xt(e,t,r){Pt.varargs=r;try{var n=Pt.getStreamFromFD(e);switch(t){case 0:{var i=ot();if(i<0){return-28}while(Ot.streams[i]){i++}var o;o=Ot.dupStream(n,i);return o.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var i=ot();n.flags|=i;return 0}case 12:{var i=at();var a=0;N[i+a>>1]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Lt(e,t){try{var r=Pt.getStreamFromFD(e);return Pt.doStat(Ot.stat,r.path,t)}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var Mt=function e(t,r,n){x(typeof n=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return ht(t,M,r,n)};function Nt(e,t){try{if(t===0)return-28;var r=Ot.cwd();var n=dt(r)+1;if(t<n)return-68;Mt(r,e,t);return n}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Dt(e,t,r){try{var n=Pt.getStreamFromFD(e);n.getdents||(n.getdents=Ot.readdir(n.path));var i=280;var o=0;var a=Ot.llseek(n,0,1);var s=Math.floor(a/i);while(s<n.getdents.length&&o+i<=r){var u;var c;var l=n.getdents[s];if(l==="."){u=n.node.id;c=4}else if(l===".."){var f=Ot.lookupPath(n.path,{parent:true});u=f.node.id;c=4}else{var d=Ot.lookupNode(n.node,l);u=d.id;c=Ot.isChrdev(d.mode)?2:Ot.isDir(d.mode)?4:Ot.isLink(d.mode)?10:8}x(u);Te=[u>>>0,(we=u,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[t+o>>2]=Te[0],j[t+o+4>>2]=Te[1];Te=[(s+1)*i>>>0,(we=(s+1)*i,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[t+o+8>>2]=Te[0],j[t+o+12>>2]=Te[1];N[t+o+16>>1]=280;L[t+o+18]=c;Mt(l,t+o+19,256);o+=i;s+=1}Ot.llseek(n,s*i,0);return o}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function jt(e,t,r){Pt.varargs=r;try{var n=Pt.getStreamFromFD(e);switch(t){case 21509:{if(!n.tty)return-59;return 0}case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var i=n.tty.ops.ioctl_tcgets(n);var o=at();j[o>>2]=i.c_iflag||0;j[o+4>>2]=i.c_oflag||0;j[o+8>>2]=i.c_cflag||0;j[o+12>>2]=i.c_lflag||0;for(var a=0;a<32;a++){L[o+a+17]=i.c_cc[a]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!n.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){var o=at();var s=j[o>>2];var u=j[o+4>>2];var c=j[o+8>>2];var l=j[o+12>>2];var f=[];for(var a=0;a<32;a++){f.push(L[o+a+17])}return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:f})}return 0}case 21519:{if(!n.tty)return-59;var o=at();j[o>>2]=0;return 0}case 21520:{if(!n.tty)return-59;return-28}case 21531:{var o=at();return Ot.ioctl(n,t,o)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);var o=at();N[o>>1]=d[0];N[o+2>>1]=d[1]}return 0}case 21524:{if(!n.tty)return-59;return 0}case 21515:{if(!n.tty)return-59;return 0}default:return-28}}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Ut(e,t){try{e=Pt.getStr(e);return Pt.doStat(Ot.lstat,e,t)}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Vt(e,t,r){try{t=Pt.getStr(t);t=Pt.calculateAt(e,t);t=st.normalize(t);if(t[t.length-1]==="/")t=t.substr(0,t.length-1);Ot.mkdir(t,r,0);return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Wt(e,t,r,n){try{t=Pt.getStr(t);var i=n&256;var o=n&4096;n=n&~6400;x(!n,"unknown flags in __syscall_newfstatat: ".concat(n));t=Pt.calculateAt(e,t,o);return Pt.doStat(i?Ot.lstat:Ot.stat,t,r)}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Bt(e,t,r,n){Pt.varargs=n;try{t=Pt.getStr(t);t=Pt.calculateAt(e,t);var i=n?ot():0;return Ot.open(t,r,i).fd}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Gt(e,t,r,n){try{t=Pt.getStr(t);t=Pt.calculateAt(e,t);if(n<=0)return-28;var i=Ot.readlink(t);var o=Math.min(n,dt(i));var a=L[r+o];Mt(i,r,n+1);L[r+o]=a;return o}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Zt(e){try{e=Pt.getStr(e);Ot.rmdir(e);return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Ft(e,t){try{e=Pt.getStr(e);return Pt.doStat(Ot.stat,e,t)}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function Ht(e,t,r){try{t=Pt.getStr(t);t=Pt.calculateAt(e,t);if(r===0){Ot.unlink(t)}else if(r===512){Ot.rmdir(t)}else{se("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var Xt=function e(){se("native code called abort()")};var Yt=1;var Kt=function e(){return Yt};var zt=function e(t,r,n){return M.copyWithin(t,r,r+n)};var Jt=function e(t,r){x(t==t>>>0||t==(t|0));x(r===(r|0));return r+2097152>>>0<4194305-!!t?(t>>>0)+r*4294967296:NaN};function Qt(e,t,r){var n=Jt(e,t);var i=new Date(n*1e3);j[r>>2]=i.getUTCSeconds();j[r+4>>2]=i.getUTCMinutes();j[r+8>>2]=i.getUTCHours();j[r+12>>2]=i.getUTCDate();j[r+16>>2]=i.getUTCMonth();j[r+20>>2]=i.getUTCFullYear()-1900;j[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0);var a=(i.getTime()-o)/(1e3*60*60*24)|0;j[r+28>>2]=a}var qt=function e(t){return t%4===0&&(t%100!==0||t%400===0)};var $t=[0,31,60,91,121,152,182,213,244,274,305,335];var er=[0,31,59,90,120,151,181,212,243,273,304,334];var tr=function e(t){var r=qt(t.getFullYear());var n=r?$t:er;var i=n[t.getMonth()]+t.getDate()-1;return i};function rr(e,t,r){var n=Jt(e,t);var i=new Date(n*1e3);j[r>>2]=i.getSeconds();j[r+4>>2]=i.getMinutes();j[r+8>>2]=i.getHours();j[r+12>>2]=i.getDate();j[r+16>>2]=i.getMonth();j[r+20>>2]=i.getFullYear()-1900;j[r+24>>2]=i.getDay();var o=tr(i)|0;j[r+28>>2]=o;j[r+36>>2]=-(i.getTimezoneOffset()*60);var a=new Date(i.getFullYear(),0,1);var s=new Date(i.getFullYear(),6,1).getTimezoneOffset();var u=a.getTimezoneOffset();var c=(s!=u&&i.getTimezoneOffset()==Math.min(u,s))|0;j[r+32>>2]=c}var nr=function e(t){var r=function(){var e=new Date(j[t+20>>2]+1900,j[t+16>>2],j[t+12>>2],j[t+8>>2],j[t+4>>2],j[t>>2],0);var r=j[t+32>>2];var n=e.getTimezoneOffset();var i=new Date(e.getFullYear(),0,1);var o=new Date(e.getFullYear(),6,1).getTimezoneOffset();var a=i.getTimezoneOffset();var s=Math.min(a,o);if(r<0){j[t+32>>2]=Number(o!=a&&s==n)}else if(r>0!=(s==n)){var u=Math.max(a,o);var c=r>0?s:u;e.setTime(e.getTime()+(c-n)*6e4)}j[t+24>>2]=e.getDay();var l=tr(e)|0;j[t+28>>2]=l;j[t>>2]=e.getSeconds();j[t+4>>2]=e.getMinutes();j[t+8>>2]=e.getHours();j[t+12>>2]=e.getDate();j[t+16>>2]=e.getMonth();j[t+20>>2]=e.getYear();var f=e.getTime();if(isNaN(f)){return-1}return f/1e3}();return qe((we=r,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)),r>>>0};function ir(e,t,r,n,i,o,a,s){var u=Jt(i,o);try{if(isNaN(u))return 61;var c=Pt.getStreamFromFD(n);var l=Ot.mmap(c,e,u,t,r);var f=l.ptr;j[a>>2]=l.allocated;U[s>>2]=f;return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function or(e,t,r,n,i,o,a){var s=Jt(o,a);try{var u=Pt.getStreamFromFD(i);if(r&2){Pt.doMsync(e,u,t,n,s)}}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var ar=function e(t,r,n,i){var o=(new Date).getFullYear();var a=new Date(o,0,1);var s=new Date(o,6,1);var u=a.getTimezoneOffset();var c=s.getTimezoneOffset();var l=Math.max(u,c);U[t>>2]=l*60;j[r>>2]=Number(u!=c);var f=function e(t){return t.toLocaleTimeString(undefined,{hour12:false,timeZoneName:"short"}).split(" ")[1]};var d=f(a);var h=f(s);x(d);x(h);x(dt(d)<=16,"timezone name truncated to fit in TZNAME_MAX (".concat(d,")"));x(dt(h)<=16,"timezone name truncated to fit in TZNAME_MAX (".concat(h,")"));if(c<u){Mt(d,n,17);Mt(h,i,17)}else{Mt(d,i,17);Mt(h,n,17)}};var sr=[];var ur=function e(t,r){x(Array.isArray(sr));x(r%16==0);sr.length=0;var n;while(n=M[t++]){var i=String.fromCharCode(n);var o=["d","f","i","p"];x(o.includes(i),"Invalid character ".concat(n,'("').concat(i,'") in readEmAsmArgs! Use only [').concat(o,'], and do not specify "v" for void return argument.'));var a=n!=105;a&=n!=112;r+=a&&r%8?4:0;sr.push(n==112?U[r>>2]:n==105?j[r>>2]:W[r>>3]);r+=a?8:4}return sr};var cr=function e(r,n,i){var o=ur(n,i);x(Pe.hasOwnProperty(r),"No EM_ASM constant found at address ".concat(r,". The loaded WebAssembly file is likely out of sync with the generated JavaScript."));return Pe[r].apply(Pe,t(o))};var lr=function e(t,r,n){return cr(t,r,n)};var fr=function e(){return Date.now()};var dr=function e(){return 2147483648};var hr=function e(){return dr()};var pr;pr=function e(){return performance.now()};var vr=function e(t){var r=A.buffer;var n=(t-r.byteLength+65535)/65536;try{A.grow(n);B();return 1}catch(e){R("growMemory: Attempted to grow heap from ".concat(r.byteLength," bytes to ").concat(t," bytes, but got error: ").concat(e))}};var mr=function e(t){var r=M.length;t>>>=0;x(t>r);var n=dr();if(t>n){R("Cannot enlarge memory, requested ".concat(t," bytes, but the limit is ").concat(n," bytes!"));return false}var i=function e(t,r){return t+(r-t%r)%r};for(var o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,t+100663296);var s=Math.min(n,i(Math.max(t,a),65536));var u=vr(s);if(u){return true}}R("Failed to grow the heap from ".concat(r," bytes to ").concat(s," bytes, not enough memory!"));return false};var yr={};var gr=function e(){return p||"./this.program"};var br=function e(){if(!br.strings){var t=((typeof navigator==="undefined"?"undefined":E(navigator))=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:gr()};for(var n in yr){if(yr[n]===undefined)delete r[n];else r[n]=yr[n]}var i=[];for(var n in r){i.push("".concat(n,"=").concat(r[n]))}br.strings=i}return br.strings};var _r=function e(t,r){for(var n=0;n<t.length;++n){x(t.charCodeAt(n)===(t.charCodeAt(n)&255));L[r++]=t.charCodeAt(n)}L[r]=0};var Sr=function e(t,r){var n=0;br().forEach((function(e,i){var o=r+n;U[t+i*4>>2]=o;_r(e,o);n+=e.length+1}));return 0};var Er=function e(t,r){var n=br();U[t>>2]=n.length;var i=0;n.forEach((function(e){return i+=e.length+1}));U[r>>2]=i;return 0};var wr=0;var Tr=function e(){return Ne||wr>0};var Ir=function e(t){P=t;if(!Tr()){var r;(r=w["onExit"])===null||r===void 0||r.call(w,t);O=true}y(t,new xe(t))};var Rr=function e(t,r){P=t;to();if(Tr()&&!r){var n="program exited (with status: ".concat(t,"), but keepRuntimeAlive() is set (counter=").concat(wr,") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)");R(n)}Ir(t)};var Cr=Rr;function kr(e){try{var t=Pt.getStreamFromFD(e);Ot.close(t);return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var Ar=function e(t,r,n,i){var o=0;for(var a=0;a<n;a++){var s=U[r>>2];var u=U[r+4>>2];r+=8;var c=Ot.read(t,L,s,u,i);if(c<0)return-1;o+=c;if(c<u)break;if(typeof i!="undefined"){i+=c}}return o};function Or(e,t,r,n){try{var i=Pt.getStreamFromFD(e);var o=Ar(i,t,r);U[n>>2]=o;return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function Pr(e,t,r,n,i){var o=Jt(t,r);try{if(isNaN(o))return 61;var a=Pt.getStreamFromFD(e);Ot.llseek(a,o,n);Te=[a.position>>>0,(we=a.position,+Math.abs(we)>=1?we>0?+Math.floor(we/4294967296)>>>0:~~+Math.ceil((we-+(~~we>>>0))/4294967296)>>>0:0)],j[i>>2]=Te[0],j[i+4>>2]=Te[1];if(a.getdents&&o===0&&n===0)a.getdents=null;return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var xr=function e(t,r,n,i){var o=0;for(var a=0;a<n;a++){var s=U[r>>2];var u=U[r+4>>2];r+=8;var c=Ot.write(t,L,s,u,i);if(c<0)return-1;o+=c;if(typeof i!="undefined"){i+=c}}return o};function Lr(e,t,r,n){try{var i=Pt.getStreamFromFD(e);var o=xr(i,t,r);U[n>>2]=o;return 0}catch(e){if(typeof Ot=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var Mr=function e(t,r){var n=0;for(var i=0;i<=r;n+=t[i++]){}return n};var Nr=[31,29,31,30,31,30,31,31,30,31,30,31];var Dr=[31,28,31,30,31,30,31,31,30,31,30,31];var jr=function e(t,r){var n=new Date(t.getTime());while(r>0){var i=qt(n.getFullYear());var o=n.getMonth();var a=(i?Nr:Dr)[o];if(r>a-n.getDate()){r-=a-n.getDate()+1;n.setDate(1);if(o<11){n.setMonth(o+1)}else{n.setMonth(0);n.setFullYear(n.getFullYear()+1)}}else{n.setDate(n.getDate()+r);return n}}return n};var Ur=function e(t,r){x(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)");L.set(t,r)};var Vr=function e(t,r,n,i){var o=U[i+40>>2];var a={tm_sec:j[i>>2],tm_min:j[i+4>>2],tm_hour:j[i+8>>2],tm_mday:j[i+12>>2],tm_mon:j[i+16>>2],tm_year:j[i+20>>2],tm_wday:j[i+24>>2],tm_yday:j[i+28>>2],tm_isdst:j[i+32>>2],tm_gmtoff:j[i+36>>2],tm_zone:o?Ze(o):""};var s=Ze(n);var u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in u){s=s.replace(new RegExp(c,"g"),u[c])}var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var f=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){var n=typeof e=="number"?e.toString():e||"";while(n.length<t){n=r[0]+n}return n}function h(e,t){return d(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;if((n=r(e.getFullYear()-t.getFullYear()))===0){if((n=r(e.getMonth()-t.getMonth()))===0){n=r(e.getDate()-t.getDate())}}return n}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=jr(new Date(e.tm_year+1900,0,1),e.tm_yday);var r=new Date(t.getFullYear(),0,4);var n=new Date(t.getFullYear()+1,0,4);var i=v(r);var o=v(n);if(p(i,t)<=0){if(p(o,t)<=0){return t.getFullYear()+1}return t.getFullYear()}return t.getFullYear()-1}var y={"%a":function e(t){return l[t.tm_wday].substring(0,3)},"%A":function e(t){return l[t.tm_wday]},"%b":function e(t){return f[t.tm_mon].substring(0,3)},"%B":function e(t){return f[t.tm_mon]},"%C":function e(t){var r=t.tm_year+1900;return h(r/100|0,2)},"%d":function e(t){return h(t.tm_mday,2)},"%e":function e(t){return d(t.tm_mday,2," ")},"%g":function e(t){return m(t).toString().substring(2)},"%G":m,"%H":function e(t){return h(t.tm_hour,2)},"%I":function e(t){var r=t.tm_hour;if(r==0)r=12;else if(r>12)r-=12;return h(r,2)},"%j":function e(t){return h(t.tm_mday+Mr(qt(t.tm_year+1900)?Nr:Dr,t.tm_mon-1),3)},"%m":function e(t){return h(t.tm_mon+1,2)},"%M":function e(t){return h(t.tm_min,2)},"%n":function e(){return"\n"},"%p":function e(t){if(t.tm_hour>=0&&t.tm_hour<12){return"AM"}return"PM"},"%S":function e(t){return h(t.tm_sec,2)},"%t":function e(){return"\t"},"%u":function e(t){return t.tm_wday||7},"%U":function e(t){var r=t.tm_yday+7-t.tm_wday;return h(Math.floor(r/7),2)},"%V":function e(t){var r=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2){r++}if(!r){r=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;if(n==4||n==5&&qt(t.tm_year%400-1)){r++}}else if(r==53){var i=(t.tm_wday+371-t.tm_yday)%7;if(i!=4&&(i!=3||!qt(t.tm_year)))r=1}return h(r,2)},"%w":function e(t){return t.tm_wday},"%W":function e(t){var r=t.tm_yday+7-(t.tm_wday+6)%7;return h(Math.floor(r/7),2)},"%y":function e(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function e(t){return t.tm_year+1900},"%z":function e(t){var r=t.tm_gmtoff;var n=r>=0;r=Math.abs(r)/60;r=r/60*100+r%60;return(n?"+":"-")+String("0000"+r).slice(-4)},"%Z":function e(t){return t.tm_zone},"%%":function e(){return"%"}};s=s.replace(/%%/g,"\0\0");for(var c in y){if(s.includes(c)){s=s.replace(new RegExp(c,"g"),y[c](a))}}s=s.replace(/\0\0/g,"%");var g=pt(s,false);if(g.length>r){return 0}Ur(g,t);return g.length-1};var Wr=function e(t,r,n,i,o){return Vr(t,r,n,i)};var Br=[];var Gr;var Zr=function e(t){var r=Br[t];if(!r){if(t>=Br.length)Br.length=t+1;Br[t]=r=Gr.get(t)}x(Gr.get(t)==r,"JavaScript-side Wasm function table mirror is out of date!");return r};var Fr=function e(t){var r=w["_"+t];x(r,"Cannot call unknown function "+t+", make sure it is exported");return r};var Hr=function e(t){return Gn(t)};var Xr=function e(t){var r=dt(t)+1;var n=Hr(r);Mt(t,n,r);return n};var Yr=function e(t,r,n,i,o){var a={string:function e(t){var r=0;if(t!==null&&t!==undefined&&t!==0){r=Xr(t)}return r},array:function e(t){var r=Hr(t.length);Ur(t,r);return r}};function s(e){if(r==="string"){return Ze(e)}if(r==="boolean")return Boolean(e);return e}var u=Fr(t);var c=[];var l=0;x(r!=="array",'Return type should not be "array".');if(i){for(var f=0;f<i.length;f++){var d=a[n[f]];if(d){if(l===0)l=Ve();c[f]=d(i[f])}else{c[f]=i[f]}}}var h=u.apply(void 0,c);function p(e){if(l!==0)Ue(l);return s(e)}h=p(h);return h};var Kr=function e(t,r,n,i){return function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++){o[a]=arguments[a]}return Yr(t,r,n,o,i)}};var zr=function e(t,r){x(t<16384);if(t<128){r.push(t)}else{r.push(t%128|128,t>>7)}};var Jr=function e(t){x(!t.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};var n={parameters:[],results:t[0]=="v"?[]:[r[t[0]]]};for(var i=1;i<t.length;++i){x(t[i]in r,"invalid signature char: "+t[i]);n.parameters.push(r[t[i]])}return n};var Qr=function e(t,r){var n=t.slice(0,1);var i=t.slice(1);var o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96);zr(i.length,r);for(var a=0;a<i.length;++a){x(i[a]in o,"invalid signature char: "+i[a]);r.push(o[i[a]])}if(n=="v"){r.push(0)}else{r.push(1,o[n])}};var qr=function e(t,r){x(!r.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");if(typeof WebAssembly.Function=="function"){return new WebAssembly.Function(Jr(r),t)}var n=[1];Qr(r,n);var i=[0,97,115,109,1,0,0,0,1];zr(n.length,i);i.push.apply(i,n);i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(i));var a=new WebAssembly.Instance(o,{e:{f:t}});var s=a.exports["f"];return s};var $r=function e(t,r){if(en){for(var n=t;n<t+r;n++){var i=Zr(n);if(i){en.set(i,n)}}}};var en;var tn=function e(t){if(!en){en=new WeakMap;$r(0,Gr.length)}return en.get(t)||0};var rn=[];var nn=function e(){if(rn.length){return rn.pop()}try{Gr.grow(1)}catch(e){if(!(e instanceof RangeError)){throw e}throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Gr.length-1};var on=function e(t,r){Gr.set(t,r);Br[t]=Gr.get(t)};var an=function e(t,r){x(typeof t!="undefined");var n=tn(t);if(n){return n}var i=nn();try{on(i,t)}catch(e){if(!(e instanceof TypeError)){throw e}x(typeof r!="undefined","Missing signature argument to addFunction: "+t);var o=qr(t,r);on(i,o)}en.set(t,i);return i};var sn=Ot.createPath;var un=function e(t){return Ot.unlink(t)};var cn=Ot.createLazyFile;var ln=Ot.createDevice;var fn=function e(t){return Hn(t)};w["incrementExceptionRefcount"]=fn;var dn=function e(t){return Fn(t)};w["decrementExceptionRefcount"]=dn;var hn=function e(t){var r=Ve();var n=Hr(4);var i=Hr(4);Xn(t,n,i);var o=U[n>>2];var a=U[i>>2];var s=Ze(o);Sn(o);var u;if(a){u=Ze(a);Sn(a)}Ue(r);return[s,u]};var pn=function e(t){return hn(t)};w["getExceptionMessage"]=pn;Ot.createPreloadedFile=It;Ot.staticInit();w["FS_createPath"]=Ot.createPath;w["FS_createDataFile"]=Ot.createDataFile;w["FS_createPreloadedFile"]=Ot.createPreloadedFile;w["FS_unlink"]=Ot.unlink;w["FS_createLazyFile"]=Ot.createLazyFile;w["FS_createDevice"]=Ot.createDevice;function vn(){Re("fetchSettings")}var mn={__assert_fail:Fe,__cxa_begin_catch:Ye,__cxa_end_catch:ze,__cxa_find_matching_catch_2:et,__cxa_find_matching_catch_3:tt,__cxa_rethrow:rt,__cxa_throw:nt,__cxa_uncaught_exceptions:it,__resumeException:Qe,__syscall_fcntl64:xt,__syscall_fstat64:Lt,__syscall_getcwd:Nt,__syscall_getdents64:Dt,__syscall_ioctl:jt,__syscall_lstat64:Ut,__syscall_mkdirat:Vt,__syscall_newfstatat:Wt,__syscall_openat:Bt,__syscall_readlinkat:Gt,__syscall_rmdir:Zt,__syscall_stat64:Ft,__syscall_unlinkat:Ht,_abort_js:Xt,_emscripten_get_now_is_monotonic:Kt,_emscripten_memcpy_js:zt,_gmtime_js:Qt,_localtime_js:rr,_mktime_js:nr,_mmap_js:ir,_munmap_js:or,_tzset_js:ar,emscripten_asm_const_int:lr,emscripten_date_now:fr,emscripten_get_heap_max:hr,emscripten_get_now:pr,emscripten_resize_heap:mr,environ_get:Sr,environ_sizes_get:Er,exit:Cr,fd_close:kr,fd_read:Or,fd_seek:Pr,fd_write:Lr,invoke_diii:Vi,invoke_fi:Li,invoke_fiii:Ui,invoke_i:Pi,invoke_ii:Ti,invoke_iif:Mi,invoke_iii:Ii,invoke_iiii:Ei,invoke_iiiii:bi,invoke_iiiiid:Ni,invoke_iiiiii:_i,invoke_iiiiiii:Oi,invoke_iiiiiiii:xi,invoke_iiiiiiiiiii:Di,invoke_iiiiiiiiiiii:Bi,invoke_iiiiiiiiiiiii:ji,invoke_iiiiij:Ki,invoke_iij:Hi,invoke_j:Xi,invoke_ji:Yi,invoke_jiiii:zi,invoke_v:Ai,invoke_vi:Si,invoke_vii:wi,invoke_viif:Fi,invoke_viii:gi,invoke_viiii:ki,invoke_viiiii:Ri,invoke_viiiiii:Ci,invoke_viiiiiii:Wi,invoke_viiiiiiiiii:Gi,invoke_viiiiiiiiiiiiiii:Zi,strftime:Vr,strftime_l:Wr};var yn=Ee();var gn=fe("__wasm_call_ctors",0);var bn=w["_CopyHeap"]=fe("CopyHeap",3);var _n=fe("__cxa_free_exception",1);var Sn=w["_free"]=fe("free",1);var En=w["_malloc"]=fe("malloc",1);var wn=w["_KWSInit"]=fe("KWSInit",1);var Tn=w["_KWSLogin"]=fe("KWSLogin",1);var In=w["_KWSLogout"]=fe("KWSLogout",0);var Rn=w["_KWSSessionBegin"]=fe("KWSSessionBegin",1);var Cn=w["_KWSSessionEnd"]=fe("KWSSessionEnd",1);var kn=w["_KWSRegisterNotify"]=fe("KWSRegisterNotify",1);var An=w["_KWSAudioWrite"]=fe("KWSAudioWrite",1);var On=w["_KWSRefreshToken"]=fe("KWSRefreshToken",1);var Pn=w["_KWSGetErrorDescription"]=fe("KWSGetErrorDescription",1);var xn=w["_KWSUpdateParams"]=fe("KWSUpdateParams",1);var Ln=fe("fflush",1);var Mn=fe("emscripten_builtin_memalign",2);var Nn=fe("setThrew",2);var Dn=fe("_emscripten_tempret_set",1);var jn=function e(){return(jn=yn["emscripten_stack_init"])()};var Un=function e(){return(Un=yn["emscripten_stack_get_free"])()};var Vn=function e(){return(Vn=yn["emscripten_stack_get_base"])()};var Wn=function e(){return(Wn=yn["emscripten_stack_get_end"])()};var Bn=function e(t){return(Bn=yn["_emscripten_stack_restore"])(t)};var Gn=function e(t){return(Gn=yn["_emscripten_stack_alloc"])(t)};var Zn=function e(){return(Zn=yn["emscripten_stack_get_current"])()};var Fn=fe("__cxa_decrement_exception_refcount",1);var Hn=fe("__cxa_increment_exception_refcount",1);var Xn=fe("__get_exception_message",3);var Yn=fe("__cxa_can_catch",3);var Kn=fe("__cxa_is_pointer_type",1);var zn=w["dynCall_iij"]=fe("dynCall_iij",4);var Jn=w["dynCall_jiji"]=fe("dynCall_jiji",5);var Qn=w["dynCall_j"]=fe("dynCall_j",1);var qn=w["dynCall_ji"]=fe("dynCall_ji",2);var $n=w["dynCall_iiiiij"]=fe("dynCall_iiiiij",7);var ei=w["dynCall_viijii"]=fe("dynCall_viijii",7);var ti=w["dynCall_jiiii"]=fe("dynCall_jiiii",5);var ri=w["dynCall_iiiiijj"]=fe("dynCall_iiiiijj",9);var ni=w["dynCall_iiiiiijj"]=fe("dynCall_iiiiiijj",10);var ii=w["dynCall_viijj"]=fe("dynCall_viijj",7);var oi=w["dynCall_jjjjjjj"]=fe("dynCall_jjjjjjj",13);var ai=w["dynCall_jjjjjj"]=fe("dynCall_jjjjjj",11);var si=w["dynCall_iijjii"]=fe("dynCall_iijjii",8);var ui=w["dynCall_iiij"]=fe("dynCall_iiij",5);var ci=w["dynCall_vij"]=fe("dynCall_vij",4);var li=w["dynCall_viiijii"]=fe("dynCall_viiijii",8);var fi=w["dynCall_viijiiiiiiiii"]=fe("dynCall_viijiiiiiiiii",14);var di=w["dynCall_viiij"]=fe("dynCall_viiij",6);var hi=w["dynCall_jii"]=fe("dynCall_jii",3);var pi=w["dynCall_jfi"]=fe("dynCall_jfi",3);var vi=w["dynCall_viij"]=fe("dynCall_viij",5);var mi=w["dynCall_jiij"]=fe("dynCall_jiij",5);var yi=w["dynCall_jiii"]=fe("dynCall_jiii",4);function gi(e,t,r,n){var i=Ve();try{Zr(e)(t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function bi(e,t,r,n,i){var o=Ve();try{return Zr(e)(t,r,n,i)}catch(e){Ue(o);if(!(e instanceof de))throw e;Nn(1,0)}}function _i(e,t,r,n,i,o){var a=Ve();try{return Zr(e)(t,r,n,i,o)}catch(e){Ue(a);if(!(e instanceof de))throw e;Nn(1,0)}}function Si(e,t){var r=Ve();try{Zr(e)(t)}catch(e){Ue(r);if(!(e instanceof de))throw e;Nn(1,0)}}function Ei(e,t,r,n){var i=Ve();try{return Zr(e)(t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function wi(e,t,r){var n=Ve();try{Zr(e)(t,r)}catch(e){Ue(n);if(!(e instanceof de))throw e;Nn(1,0)}}function Ti(e,t){var r=Ve();try{return Zr(e)(t)}catch(e){Ue(r);if(!(e instanceof de))throw e;Nn(1,0)}}function Ii(e,t,r){var n=Ve();try{return Zr(e)(t,r)}catch(e){Ue(n);if(!(e instanceof de))throw e;Nn(1,0)}}function Ri(e,t,r,n,i,o){var a=Ve();try{Zr(e)(t,r,n,i,o)}catch(e){Ue(a);if(!(e instanceof de))throw e;Nn(1,0)}}function Ci(e,t,r,n,i,o,a){var s=Ve();try{Zr(e)(t,r,n,i,o,a)}catch(e){Ue(s);if(!(e instanceof de))throw e;Nn(1,0)}}function ki(e,t,r,n,i){var o=Ve();try{Zr(e)(t,r,n,i)}catch(e){Ue(o);if(!(e instanceof de))throw e;Nn(1,0)}}function Ai(e){var t=Ve();try{Zr(e)()}catch(e){Ue(t);if(!(e instanceof de))throw e;Nn(1,0)}}function Oi(e,t,r,n,i,o,a){var s=Ve();try{return Zr(e)(t,r,n,i,o,a)}catch(e){Ue(s);if(!(e instanceof de))throw e;Nn(1,0)}}function Pi(e){var t=Ve();try{return Zr(e)()}catch(e){Ue(t);if(!(e instanceof de))throw e;Nn(1,0)}}function xi(e,t,r,n,i,o,a,s){var u=Ve();try{return Zr(e)(t,r,n,i,o,a,s)}catch(e){Ue(u);if(!(e instanceof de))throw e;Nn(1,0)}}function Li(e,t){var r=Ve();try{return Zr(e)(t)}catch(e){Ue(r);if(!(e instanceof de))throw e;Nn(1,0)}}function Mi(e,t,r){var n=Ve();try{return Zr(e)(t,r)}catch(e){Ue(n);if(!(e instanceof de))throw e;Nn(1,0)}}function Ni(e,t,r,n,i,o){var a=Ve();try{return Zr(e)(t,r,n,i,o)}catch(e){Ue(a);if(!(e instanceof de))throw e;Nn(1,0)}}function Di(e,t,r,n,i,o,a,s,u,c,l){var f=Ve();try{return Zr(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){Ue(f);if(!(e instanceof de))throw e;Nn(1,0)}}function ji(e,t,r,n,i,o,a,s,u,c,l,f,d){var h=Ve();try{return Zr(e)(t,r,n,i,o,a,s,u,c,l,f,d)}catch(e){Ue(h);if(!(e instanceof de))throw e;Nn(1,0)}}function Ui(e,t,r,n){var i=Ve();try{return Zr(e)(t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function Vi(e,t,r,n){var i=Ve();try{return Zr(e)(t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function Wi(e,t,r,n,i,o,a,s){var u=Ve();try{Zr(e)(t,r,n,i,o,a,s)}catch(e){Ue(u);if(!(e instanceof de))throw e;Nn(1,0)}}function Bi(e,t,r,n,i,o,a,s,u,c,l,f){var d=Ve();try{return Zr(e)(t,r,n,i,o,a,s,u,c,l,f)}catch(e){Ue(d);if(!(e instanceof de))throw e;Nn(1,0)}}function Gi(e,t,r,n,i,o,a,s,u,c,l){var f=Ve();try{Zr(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){Ue(f);if(!(e instanceof de))throw e;Nn(1,0)}}function Zi(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v){var m=Ve();try{Zr(e)(t,r,n,i,o,a,s,u,c,l,f,d,h,p,v)}catch(e){Ue(m);if(!(e instanceof de))throw e;Nn(1,0)}}function Fi(e,t,r,n){var i=Ve();try{Zr(e)(t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function Hi(e,t,r,n){var i=Ve();try{return zn(e,t,r,n)}catch(e){Ue(i);if(!(e instanceof de))throw e;Nn(1,0)}}function Xi(e){var t=Ve();try{return Qn(e)}catch(e){Ue(t);if(!(e instanceof de))throw e;Nn(1,0)}}function Yi(e,t){var r=Ve();try{return qn(e,t)}catch(e){Ue(r);if(!(e instanceof de))throw e;Nn(1,0)}}function Ki(e,t,r,n,i,o,a){var s=Ve();try{return $n(e,t,r,n,i,o,a)}catch(e){Ue(s);if(!(e instanceof de))throw e;Nn(1,0)}}function zi(e,t,r,n,i){var o=Ve();try{return ti(e,t,r,n,i)}catch(e){Ue(o);if(!(e instanceof de))throw e;Nn(1,0)}}w["addRunDependency"]=oe;w["removeRunDependency"]=ae;w["ccall"]=Yr;w["cwrap"]=Kr;w["addFunction"]=an;w["setValue"]=je;w["getValue"]=Me;w["UTF8ToString"]=Ze;w["stringToUTF8"]=Mt;w["lengthBytesUTF8"]=dt;w["FS_createPreloadedFile"]=It;w["FS_unlink"]=un;w["FS_createPath"]=sn;w["FS_createDevice"]=ln;w["FS_createDataFile"]=Et;w["FS_createLazyFile"]=cn;var Ji=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getTempRet0","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","emscriptenLog","runMainThreadEmAsm","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace"];Ji.forEach(Ae);var Qi=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","out","err","callMain","abort","wasmMemory","wasmExports","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","stackSave","stackRestore","stackAlloc","setTempRet0","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","getFunctionAddress","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","stringToUTF8Array","intArrayFromString","stringToAscii","UTF16Decoder","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","getPreloadedImageData__data","wget","SYSCALLS","preloadPlugins","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS_readFile","FS","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr"];Qi.forEach(Oe);var qi;re=function e(){if(!qi)eo();if(!qi)re=e};function $i(){jn();G()}function eo(){if(ee>0){return}$i();K();if(ee>0){return}function e(){if(qi)return;qi=true;w["calledRun"]=true;if(O)return;z();if(w["onRuntimeInitialized"])w["onRuntimeInitialized"]();x(!w["_main"],'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');J()}if(w["setStatus"]){w["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){w["setStatus"]("")}),1);e()}),1)}else{e()}Z()}function to(){var e=I;var t=R;var r=false;I=R=function e(t){r=true};try{Ln(0);["stdout","stderr"].forEach((function(e){var t;var n=Ot.analyzePath("/dev/"+e);if(!n)return;var i=n.object;var o=i.rdev;var a=mt.ttys[o];if(a!==null&&a!==void 0&&(t=a.output)!==null&&t!==void 0&&t.length){r=true}}))}catch(e){}I=e;R=t;if(r){We("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}}if(w["preInit"]){if(typeof w["preInit"]=="function")w["preInit"]=[w["preInit"]];while(w["preInit"].length>0){w["preInit"].pop()()}}eo()};var I=e.getModule=function e(){return w}}))},1421:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Clipboard=void 0;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=s(e,"string");return"symbol"==a(t)?t:t+""}function s(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(){"use strict";u=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}var f=(0,t.getPLogger)();var d=function e(t){var r=document.createElement("textarea");r.value=t;document.body.appendChild(r);r.focus();r.select();var n=true;try{document.execCommand("copy")}catch(e){f.error("execCommand copy error");n=false}document.body.removeChild(r);return n};var h=function(){var e=l(u().mark((function e(t){return u().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(e){navigator.clipboard.writeText(t).then((function(){e(true)}),(function(t){f.error("writeText error");e(false)}))})));case 1:case"end":return r.stop()}}),e)})));return function t(r){return e.apply(this,arguments)}}();var p=e.Clipboard=function(){function e(){r(this,e)}return i(e,null,[{key:"copyTextToClipboard",value:function(){var e=l(u().mark((function e(t){var r;return u().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=false;if(!(navigator.clipboard&&window.isSecureContext)){n.next=5;break}n.next=4;return h(t);case 4:r=n.sent;case 5:if(!r){r=d(t)}return n.abrupt("return",new Promise((function(e,t){if(r){e()}else{t(new Error("no result"))}})));case 7:case"end":return n.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}()}))},1699:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getWorkerUrl=void 0;var t="\nKCgpPT57dmFyIGU9ezE2NzpmdW5jdGlvbihlLHQpe3ZhciByLG4sbzsoZnVuY3Rpb24oaSxhKXtpZih0cnVlKXshKG49W3RdLHI9YSxvPXR5cGVvZiByPT09ImZ1bmN0aW9uIj9yLmFwcGx5KHQsbik6cixvIT09dW5kZWZpbmVkJiYoZS5leHBvcnRzPW8pKX1lbHNle3ZhciBzfX0pKHR5cGVvZiBnbG9iYWxUaGlzIT09InVuZGVmaW5lZCI/Z2xvYmFsVGhpczp0eXBlb2Ygc2VsZiE9PSJ1bmRlZmluZWQiP3NlbGY6dGhpcywoZnVuY3Rpb24oZSl7InVzZSBzdHJpY3QiO09iamVjdC5kZWZpbmVQcm9wZXJ0eShlLCJfX2VzTW9kdWxlIix7dmFsdWU6dHJ1ZX0pO2UubG9hZFdhc209ZS5nZXRNb2R1bGU9dm9pZCAwO2Z1bmN0aW9uIHQoZSl7cmV0dXJuIGkoZSl8fG8oZSl8fG4oZSl8fHIoKX1mdW5jdGlvbiByKCl7dGhyb3cgbmV3IFR5cGVFcnJvcigiSW52YWxpZCBhdHRlbXB0IHRvIHNwcmVhZCBub24taXRlcmFibGUgaW5zdGFuY2UuXG5JbiBvcmRlciB0byBiZSBpdGVyYWJsZSwgbm9uLWFycmF5IG9iamVjdHMgbXVzdCBoYXZlIGEgW1N5bWJvbC5pdGVyYXRvcl0oKSBtZXRob2QuIil9ZnVuY3Rpb24gbihlLHQpe2lmKGUpe2lmKCJzdHJpbmciPT10eXBlb2YgZSlyZXR1cm4gYShlLHQpO3ZhciByPXt9LnRvU3RyaW5nLmNhbGwoZSkuc2xpY2UoOCwtMSk7cmV0dXJuIk9iamVjdCI9PT1yJiZlLmNvbnN0cnVjdG9yJiYocj1lLmNvbnN0cnVjdG9yLm5hbWUpLCJNYXAiPT09cnx8IlNldCI9PT1yP0FycmF5LmZyb20oZSk6IkFyZ3VtZW50cyI9PT1yfHwvXig/OlVpfEkpbnQoPzo4fDE2fDMyKSg/OkNsYW1wZWQpP0FycmF5JC8udGVzdChyKT9hKGUsdCk6dm9pZCAwfX1mdW5jdGlvbiBvKGUpe2lmKCJ1bmRlZmluZWQiIT10eXBlb2YgU3ltYm9sJiZudWxsIT1lW1N5bWJvbC5pdGVyYXRvcl18fG51bGwhPWVbIkBAaXRlcmF0b3IiXSlyZXR1cm4gQXJyYXkuZnJvbShlKX1mdW5jdGlvbiBpKGUpe2lmKEFycmF5LmlzQXJyYXkoZSkpcmV0dXJuIGEoZSl9ZnVuY3Rpb24gYShlLHQpeyhudWxsPT10fHx0PmUubGVuZ3RoKSYmKHQ9ZS5sZW5ndGgpO2Zvcih2YXIgcj0wLG49QXJyYXkodCk7cjx0O3IrKyluW3JdPWVbcl07cmV0dXJuIG59ZnVuY3Rpb24gcyhlLHQpe2Zvcih2YXIgcj0wO3I8dC5sZW5ndGg7cisrKXt2YXIgbj10W3JdO24uZW51bWVyYWJsZT1uLmVudW1lcmFibGV8fCExLG4uY29uZmlndXJhYmxlPSEwLCJ2YWx1ZSJpbiBuJiYobi53cml0YWJsZT0hMCksT2JqZWN0LmRlZmluZVByb3BlcnR5KGUsYyhuLmtleSksbil9fWZ1bmN0aW9uIHUoZSx0LHIpe3JldHVybiB0JiZzKGUucHJvdG90eXBlLHQpLHImJnMoZSxyKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfWZ1bmN0aW9uIGMoZSl7dmFyIHQ9bChlLCJzdHJpbmciKTtyZXR1cm4ic3ltYm9sIj09Yih0KT90OnQrIiJ9ZnVuY3Rpb24gbChlLHQpe2lmKCJvYmplY3QiIT1iKGUpfHwhZSlyZXR1cm4gZTt2YXIgcj1lW1N5bWJvbC50b1ByaW1pdGl2ZV07aWYodm9pZCAwIT09cil7dmFyIG49ci5jYWxsKGUsdHx8ImRlZmF1bHQiKTtpZigib2JqZWN0IiE9YihuKSlyZXR1cm4gbjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9ZnVuY3Rpb24gZihlLHQpe2lmKCEoZSBpbnN0YW5jZW9mIHQpKXRocm93IG5ldyBUeXBlRXJyb3IoIkNhbm5vdCBjYWxsIGEgY2xhc3MgYXMgYSBmdW5jdGlvbiIpfWZ1bmN0aW9uIGQoZSx0LHIpe3JldHVybiB0PUUodCksdihlLGcoKT9SZWZsZWN0LmNvbnN0cnVjdCh0LHJ8fFtdLEUoZSkuY29uc3RydWN0b3IpOnQuYXBwbHkoZSxyKSl9ZnVuY3Rpb24gdihlLHQpe2lmKHQmJigib2JqZWN0Ij09Yih0KXx8ImZ1bmN0aW9uIj09dHlwZW9mIHQpKXJldHVybiB0O2lmKHZvaWQgMCE9PXQpdGhyb3cgbmV3IFR5cGVFcnJvcigiRGVyaXZlZCBjb25zdHJ1Y3RvcnMgbWF5IG9ubHkgcmV0dXJuIG9iamVjdCBvciB1bmRlZmluZWQiKTtyZXR1cm4gbShlKX1mdW5jdGlvbiBtKGUpe2lmKHZvaWQgMD09PWUpdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKCJ0aGlzIGhhc24ndCBiZWVuIGluaXRpYWxpc2VkIC0gc3VwZXIoKSBoYXNuJ3QgYmVlbiBjYWxsZWQiKTtyZXR1cm4gZX1mdW5jdGlvbiBwKGUsdCl7aWYoImZ1bmN0aW9uIiE9dHlwZW9mIHQmJm51bGwhPT10KXRocm93IG5ldyBUeXBlRXJyb3IoIlN1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uIik7ZS5wcm90b3R5cGU9T2JqZWN0LmNyZWF0ZSh0JiZ0LnByb3RvdHlwZSx7Y29uc3RydWN0b3I6e3ZhbHVlOmUsd3JpdGFibGU6ITAsY29uZmlndXJhYmxlOiEwfX0pLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLCJwcm90b3R5cGUiLHt3cml0YWJsZTohMX0pLHQmJl8oZSx0KX1mdW5jdGlvbiBoKGUpe3ZhciB0PSJmdW5jdGlvbiI9PXR5cGVvZiBNYXA/bmV3IE1hcDp2b2lkIDA7cmV0dXJuIGg9ZnVuY3Rpb24gZShyKXtpZihudWxsPT09cnx8IXcocikpcmV0dXJuIHI7aWYoImZ1bmN0aW9uIiE9dHlwZW9mIHIpdGhyb3cgbmV3IFR5cGVFcnJvcigiU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24iKTtpZih2b2lkIDAhPT10KXtpZih0LmhhcyhyKSlyZXR1cm4gdC5nZXQocik7dC5zZXQocixuKX1mdW5jdGlvbiBuKCl7cmV0dXJuIHkocixhcmd1bWVudHMsRSh0aGlzKS5jb25zdHJ1Y3Rvcil9cmV0dXJuIG4ucHJvdG90eXBlPU9iamVjdC5jcmVhdGUoci5wcm90b3R5cGUse2NvbnN0cnVjdG9yOnt2YWx1ZTpuLGVudW1lcmFibGU6ITEsd3JpdGFibGU6ITAsY29uZmlndXJhYmxlOiEwfX0pLF8obixyKX0saChlKX1mdW5jdGlvbiB5KGUsdCxyKXtpZihnKCkpcmV0dXJuIFJlZmxlY3QuY29uc3RydWN0LmFwcGx5KG51bGwsYXJndW1lbnRzKTt2YXIgbj1bbnVsbF07bi5wdXNoLmFwcGx5KG4sdCk7dmFyIG89bmV3KGUuYmluZC5hcHBseShlLG4pKTtyZXR1cm4gciYmXyhvLHIucHJvdG90eXBlKSxvfWZ1bmN0aW9uIGcoKXt0cnl7dmFyIGU9IUJvb2xlYW4ucHJvdG90eXBlLnZhbHVlT2YuY2FsbChSZWZsZWN0LmNvbnN0cnVjdChCb29sZWFuLFtdLChmdW5jdGlvbigpe30pKSl9Y2F0Y2goZSl7fXJldHVybihnPWZ1bmN0aW9uIHQoKXtyZXR1cm4hIWV9KSgpfWZ1bmN0aW9uIHcoZSl7dHJ5e3JldHVybi0xIT09RnVuY3Rpb24udG9TdHJpbmcuY2FsbChlKS5pbmRleE9mKCJbbmF0aXZlIGNvZGVdIil9Y2F0Y2godCl7cmV0dXJuImZ1bmN0aW9uIj09dHlwZW9mIGV9fWZ1bmN0aW9uIF8oZSx0KXtyZXR1cm4gXz1PYmplY3Quc2V0UHJvdG90eXBlT2Y/T2JqZWN0LnNldFByb3RvdHlwZU9mLmJpbmQoKTpmdW5jdGlvbihlLHQpe3JldHVybiBlLl9fcHJvdG9fXz10LGV9LF8oZSx0KX1mdW5jdGlvbiBFKGUpe3JldHVybiBFPU9iamVjdC5zZXRQcm90b3R5cGVPZj9PYmplY3QuZ2V0UHJvdG90eXBlT2YuYmluZCgpOmZ1bmN0aW9uKGUpe3JldHVybiBlLl9fcHJvdG9fX3x8T2JqZWN0LmdldFByb3RvdHlwZU9mKGUpfSxFKGUpfWZ1bmN0aW9uIGIoZSl7IkBiYWJlbC9oZWxwZXJzIC0gdHlwZW9mIjtyZXR1cm4gYj0iZnVuY3Rpb24iPT10eXBlb2YgU3ltYm9sJiYic3ltYm9sIj09dHlwZW9mIFN5bWJvbC5pdGVyYXRvcj9mdW5jdGlvbihlKXtyZXR1cm4gdHlwZW9mIGV9OmZ1bmN0aW9uKGUpe3JldHVybiBlJiYiZnVuY3Rpb24iPT10eXBlb2YgU3ltYm9sJiZlLmNvbnN0cnVjdG9yPT09U3ltYm9sJiZlIT09U3ltYm9sLnByb3RvdHlwZT8ic3ltYm9sIjp0eXBlb2YgZX0sYihlKX12YXIgUz17fTt2YXIgaz1lLmxvYWRXYXNtPWZ1bmN0aW9uIGUocixuKXtPYmplY3QuYXNzaWduKFMscik7dmFyIG89KHR5cGVvZiB3aW5kb3c9PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKHdpbmRvdykpPT0ib2JqZWN0Ijt2YXIgaT10eXBlb2YgaW1wb3J0U2NyaXB0cz09ImZ1bmN0aW9uIjt2YXIgYT0odHlwZW9mIHByb2Nlc3M9PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKHByb2Nlc3MpKT09Im9iamVjdCImJmIocHJvY2Vzcy52ZXJzaW9ucyk9PSJvYmplY3QiJiZ0eXBlb2YgcHJvY2Vzcy52ZXJzaW9ucy5ub2RlPT0ic3RyaW5nIjt2YXIgcz0hbyYmIWEmJiFpO2lmKFNbIkVOVklST05NRU5UIl0pe3Rocm93IG5ldyBFcnJvcigiTW9kdWxlLkVOVklST05NRU5UIGhhcyBiZWVuIGRlcHJlY2F0ZWQuIFRvIGZvcmNlIHRoZSBlbnZpcm9ubWVudCwgdXNlIHRoZSBFTlZJUk9OTUVOVCBjb21waWxlLXRpbWUgb3B0aW9uIChmb3IgZXhhbXBsZSwgLXNFTlZJUk9OTUVOVD13ZWIgb3IgLXNFTlZJUk9OTUVOVD1ub2RlKSIpfWlmKCFTLmV4cGVjdGVkRGF0YUZpbGVEb3dubG9hZHMpe1MuZXhwZWN0ZWREYXRhRmlsZURvd25sb2Fkcz0wfVMuZXhwZWN0ZWREYXRhRmlsZURvd25sb2FkcysrOyhmdW5jdGlvbigpe3ZhciBlPXR5cGVvZiBFTlZJUk9OTUVOVF9JU19QVEhSRUFEIT0idW5kZWZpbmVkIiYmRU5WSVJPTk1FTlRfSVNfUFRIUkVBRDt2YXIgdD10eXBlb2YgRU5WSVJPTk1FTlRfSVNfV0FTTV9XT1JLRVIhPSJ1bmRlZmluZWQiJiZFTlZJUk9OTUVOVF9JU19XQVNNX1dPUktFUjtpZihlfHx0KXJldHVybjtmdW5jdGlvbiByKGUpe3ZhciB0PSIiO2lmKCh0eXBlb2Ygd2luZG93PT09InVuZGVmaW5lZCI/InVuZGVmaW5lZCI6Yih3aW5kb3cpKT09PSJvYmplY3QiKXt0PXdpbmRvd1siZW5jb2RlVVJJQ29tcG9uZW50Il0od2luZG93LmxvY2F0aW9uLnBhdGhuYW1lLnRvU3RyaW5nKCkuc3Vic3RyaW5nKDAsd2luZG93LmxvY2F0aW9uLnBhdGhuYW1lLnRvU3RyaW5nKCkubGFzdEluZGV4T2YoIi8iKSkrIi8iKX1lbHNlIGlmKHR5cGVvZiBwcm9jZXNzPT09InVuZGVmaW5lZCImJnR5cGVvZiBsb2NhdGlvbiE9PSJ1bmRlZmluZWQiKXt0PWVuY29kZVVSSUNvbXBvbmVudChsb2NhdGlvbi5wYXRobmFtZS50b1N0cmluZygpLnN1YnN0cmluZygwLGxvY2F0aW9uLnBhdGhuYW1lLnRvU3RyaW5nKCkubGFzdEluZGV4T2YoIi8iKSkrIi8iKX12YXIgcj0iYmluL2t3c19jdXN0b21fd29yZC5kYXRhIjt2YXIgbj0ia3dzX2N1c3RvbV93b3JkLmRhdGEiO2lmKHR5cGVvZiBTWyJsb2NhdGVGaWxlUGFja2FnZSJdPT09ImZ1bmN0aW9uIiYmIVNbImxvY2F0ZUZpbGUiXSl7U1sibG9jYXRlRmlsZSJdPVNbImxvY2F0ZUZpbGVQYWNrYWdlIl07TSgid2FybmluZzogeW91IGRlZmluZWQgTW9kdWxlLmxvY2F0ZUZpbGVQYWNrYWdlLCB0aGF0IGhhcyBiZWVuIHJlbmFtZWQgdG8gTW9kdWxlLmxvY2F0ZUZpbGUgKHVzaW5nIHlvdXIgbG9jYXRlRmlsZVBhY2thZ2UgZm9yIG5vdykiKX12YXIgbz1TWyJsb2NhdGVGaWxlIl0/U1sibG9jYXRlRmlsZSJdKG4sIiIpOm47dmFyIGk9ZVsicmVtb3RlX3BhY2thZ2Vfc2l6ZSJdO2Z1bmN0aW9uIGEoZSx0LHIsbil7dmFyIG89bmV3IFhNTEh0dHBSZXF1ZXN0O28ub3BlbigiR0VUIixlLHRydWUpO28ucmVzcG9uc2VUeXBlPSJhcnJheWJ1ZmZlciI7by5vbnByb2dyZXNzPWZ1bmN0aW9uKHIpe3ZhciBuPWU7dmFyIGk9dDtpZihyLnRvdGFsKWk9ci50b3RhbDtpZihyLmxvYWRlZCl7aWYoIW8uYWRkZWRUb3RhbCl7by5hZGRlZFRvdGFsPXRydWU7aWYoIVMuZGF0YUZpbGVEb3dubG9hZHMpUy5kYXRhRmlsZURvd25sb2Fkcz17fTtTLmRhdGFGaWxlRG93bmxvYWRzW25dPXtsb2FkZWQ6ci5sb2FkZWQsdG90YWw6aX19ZWxzZXtTLmRhdGFGaWxlRG93bmxvYWRzW25dLmxvYWRlZD1yLmxvYWRlZH12YXIgYT0wO3ZhciBzPTA7dmFyIHU9MDtmb3IodmFyIGMgaW4gUy5kYXRhRmlsZURvd25sb2Fkcyl7dmFyIGw9Uy5kYXRhRmlsZURvd25sb2Fkc1tjXTthKz1sLnRvdGFsO3MrPWwubG9hZGVkO3UrK31hPU1hdGguY2VpbChhKlMuZXhwZWN0ZWREYXRhRmlsZURvd25sb2Fkcy91KTtpZihTWyJzZXRTdGF0dXMiXSlTWyJzZXRTdGF0dXMiXSgiRG93bmxvYWRpbmcgZGF0YS4uLiAoIi5jb25jYXQocywiLyIpLmNvbmNhdChhLCIpIikpfWVsc2UgaWYoIVMuZGF0YUZpbGVEb3dubG9hZHMpe2lmKFNbInNldFN0YXR1cyJdKVNbInNldFN0YXR1cyJdKCJEb3dubG9hZGluZyBkYXRhLi4uIil9fTtvLm9uZXJyb3I9ZnVuY3Rpb24odCl7dGhyb3cgbmV3IEVycm9yKCJOZXR3b3JrRXJyb3IgZm9yOiAiK2UpfTtvLm9ubG9hZD1mdW5jdGlvbihlKXtpZihvLnN0YXR1cz09MjAwfHxvLnN0YXR1cz09MzA0fHxvLnN0YXR1cz09MjA2fHxvLnN0YXR1cz09MCYmby5yZXNwb25zZSl7dmFyIHQ9by5yZXNwb25zZTtyKHQpfWVsc2V7dGhyb3cgbmV3IEVycm9yKG8uc3RhdHVzVGV4dCsiIDogIitvLnJlc3BvbnNlVVJMKX19O28uc2VuZChudWxsKX1mdW5jdGlvbiBzKGUpe2NvbnNvbGUuZXJyb3IoInBhY2thZ2UgZXJyb3I6IixlKX12YXIgdT1udWxsO3ZhciBjPVNbImdldFByZWxvYWRlZFBhY2thZ2UiXT9TWyJnZXRQcmVsb2FkZWRQYWNrYWdlIl0obyxpKTpudWxsO2lmKCFjKWEobyxpLChmdW5jdGlvbihlKXtpZih1KXt1KGUpO3U9bnVsbH1lbHNle2M9ZX19KSxzKTtmdW5jdGlvbiBsKCl7ZnVuY3Rpb24gdChlLHQpe2lmKCFlKXRocm93IHQrKG5ldyBFcnJvcikuc3RhY2t9ZnVuY3Rpb24gbihlLHQscil7dGhpcy5zdGFydD1lO3RoaXMuZW5kPXQ7dGhpcy5hdWRpbz1yfW4ucHJvdG90eXBlPXtyZXF1ZXN0czp7fSxvcGVuOmZ1bmN0aW9uIGUodCxyKXt0aGlzLm5hbWU9cjt0aGlzLnJlcXVlc3RzW3JdPXRoaXM7U1siYWRkUnVuRGVwZW5kZW5jeSJdKCJmcCAiLmNvbmNhdCh0aGlzLm5hbWUpKX0sc2VuZDpmdW5jdGlvbiBlKCl7fSxvbmxvYWQ6ZnVuY3Rpb24gZSgpe3ZhciB0PXRoaXMuYnl0ZUFycmF5LnN1YmFycmF5KHRoaXMuc3RhcnQsdGhpcy5lbmQpO3RoaXMuZmluaXNoKHQpfSxmaW5pc2g6ZnVuY3Rpb24gZSh0KXt2YXIgcj10aGlzO1NbIkZTX2NyZWF0ZURhdGFGaWxlIl0odGhpcy5uYW1lLG51bGwsdCx0cnVlLHRydWUsdHJ1ZSk7U1sicmVtb3ZlUnVuRGVwZW5kZW5jeSJdKCJmcCAiLmNvbmNhdChyLm5hbWUpKTt0aGlzLnJlcXVlc3RzW3RoaXMubmFtZV09bnVsbH19O3ZhciBvPWVbImZpbGVzIl07Zm9yKHZhciBpPTA7aTxvLmxlbmd0aDsrK2kpe25ldyBuKG9baV1bInN0YXJ0Il0sb1tpXVsiZW5kIl0sb1tpXVsiYXVkaW8iXXx8MCkub3BlbigiR0VUIixvW2ldWyJmaWxlbmFtZSJdKX1mdW5jdGlvbiBhKHIpe3QociwiTG9hZGluZyBkYXRhIGZpbGUgZmFpbGVkLiIpO3Qoci5jb25zdHJ1Y3Rvci5uYW1lPT09QXJyYXlCdWZmZXIubmFtZSwiYmFkIGlucHV0IHRvIHByb2Nlc3NQYWNrYWdlRGF0YSIpO3ZhciBvPW5ldyBVaW50OEFycmF5KHIpO24ucHJvdG90eXBlLmJ5dGVBcnJheT1vO3ZhciBpPWVbImZpbGVzIl07Zm9yKHZhciBhPTA7YTxpLmxlbmd0aDsrK2Epe24ucHJvdG90eXBlLnJlcXVlc3RzW2lbYV0uZmlsZW5hbWVdLm9ubG9hZCgpfVNbInJlbW92ZVJ1bkRlcGVuZGVuY3kiXSgiZGF0YWZpbGVfYmluL2t3c19jdXN0b21fd29yZC5kYXRhIil9U1siYWRkUnVuRGVwZW5kZW5jeSJdKCJkYXRhZmlsZV9iaW4va3dzX2N1c3RvbV93b3JkLmRhdGEiKTtpZighUy5wcmVsb2FkUmVzdWx0cylTLnByZWxvYWRSZXN1bHRzPXt9O1MucHJlbG9hZFJlc3VsdHNbcl09e2Zyb21DYWNoZTpmYWxzZX07aWYoYyl7YShjKTtjPW51bGx9ZWxzZXt1PWF9fWlmKFNbImNhbGxlZFJ1biJdKXtsKCl9ZWxzZXtpZighU1sicHJlUnVuIl0pU1sicHJlUnVuIl09W107U1sicHJlUnVuIl0ucHVzaChsKX19cihuKX0pKCk7aWYoU1siJHd3Il18fHR5cGVvZiBFTlZJUk9OTUVOVF9JU19QVEhSRUFEIT0idW5kZWZpbmVkIiYmRU5WSVJPTk1FTlRfSVNfUFRIUkVBRClTWyJwcmVSdW4iXT1bXTt2YXIgYz1TWyJwcmVSdW4iXS5zbGljZSgpO2lmKCFTWyJwcmVSdW4iXSl0aHJvdyJNb2R1bGUucHJlUnVuIHNob3VsZCBleGlzdCBiZWNhdXNlIGZpbGUgc3VwcG9ydCB1c2VkIGl0OyBkaWQgYSBwcmUtanMgZGVsZXRlIGl0PyI7Yy5mb3JFYWNoKChmdW5jdGlvbihlKXtpZihTWyJwcmVSdW4iXS5pbmRleE9mKGUpPDApdGhyb3ciQWxsIHByZVJ1biB0YXNrcyB0aGF0IGV4aXN0IGJlZm9yZSB1c2VyIHByZS1qcyBjb2RlIHNob3VsZCByZW1haW4gYWZ0ZXI7IGRpZCB5b3UgcmVwbGFjZSBNb2R1bGUgb3IgbW9kaWZ5IE1vZHVsZS5wcmVSdW4/In0pKTt2YXIgbD1PYmplY3QuYXNzaWduKHt9LFMpO3ZhciB2PVtdO3ZhciBtPSIuL3RoaXMucHJvZ3JhbSI7dmFyIHk9ZnVuY3Rpb24gZSh0LHIpe3Rocm93IHJ9O3ZhciBnPSIiO2Z1bmN0aW9uIHcoZSl7aWYoU1sibG9jYXRlRmlsZSJdKXtyZXR1cm4gU1sibG9jYXRlRmlsZSJdKGUsZyl9cmV0dXJuIGcrZX12YXIgXyxFLGs7aWYocyl7aWYoKHR5cGVvZiBwcm9jZXNzPT09InVuZGVmaW5lZCI/InVuZGVmaW5lZCI6Yihwcm9jZXNzKSk9PSJvYmplY3QiJiYiZnVuY3Rpb24iPT09ImZ1bmN0aW9uInx8KHR5cGVvZiB3aW5kb3c9PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKHdpbmRvdykpPT0ib2JqZWN0Inx8dHlwZW9mIGltcG9ydFNjcmlwdHM9PSJmdW5jdGlvbiIpdGhyb3cgbmV3IEVycm9yKCJub3QgY29tcGlsZWQgZm9yIHRoaXMgZW52aXJvbm1lbnQgKGRpZCB5b3UgYnVpbGQgdG8gSFRNTCBhbmQgdHJ5IHRvIHJ1biBpdCBub3Qgb24gdGhlIHdlYiwgb3Igc2V0IEVOVklST05NRU5UIHRvIHNvbWV0aGluZyAtIGxpa2Ugbm9kZSAtIGFuZCBydW4gaXQgc29tZXBsYWNlIGVsc2UgLSBsaWtlIG9uIHRoZSB3ZWI/KSIpfWVsc2UgaWYob3x8aSl7aWYoaSl7Zz1zZWxmLmxvY2F0aW9uLmhyZWZ9ZWxzZSBpZih0eXBlb2YgZG9jdW1lbnQhPSJ1bmRlZmluZWQiJiZkb2N1bWVudC5jdXJyZW50U2NyaXB0KXtnPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQuc3JjfWlmKGcuc3RhcnRzV2l0aCgiYmxvYjoiKSl7Zz0iIn1lbHNle2c9Zy5zdWJzdHIoMCxnLnJlcGxhY2UoL1s/I10uKi8sIiIpLmxhc3RJbmRleE9mKCIvIikrMSl9aWYoISgodHlwZW9mIHdpbmRvdz09PSJ1bmRlZmluZWQiPyJ1bmRlZmluZWQiOmIod2luZG93KSk9PSJvYmplY3QifHx0eXBlb2YgaW1wb3J0U2NyaXB0cz09ImZ1bmN0aW9uIikpdGhyb3cgbmV3IEVycm9yKCJub3QgY29tcGlsZWQgZm9yIHRoaXMgZW52aXJvbm1lbnQgKGRpZCB5b3UgYnVpbGQgdG8gSFRNTCBhbmQgdHJ5IHRvIHJ1biBpdCBub3Qgb24gdGhlIHdlYiwgb3Igc2V0IEVOVklST05NRU5UIHRvIHNvbWV0aGluZyAtIGxpa2Ugbm9kZSAtIGFuZCBydW4gaXQgc29tZXBsYWNlIGVsc2UgLSBsaWtlIG9uIHRoZSB3ZWI/KSIpO3tfPWZ1bmN0aW9uIGUodCl7dmFyIHI9bmV3IFhNTEh0dHBSZXF1ZXN0O3Iub3BlbigiR0VUIix0LGZhbHNlKTtyLnNlbmQobnVsbCk7cmV0dXJuIHIucmVzcG9uc2VUZXh0fTtpZihpKXtrPWZ1bmN0aW9uIGUodCl7dmFyIHI9bmV3IFhNTEh0dHBSZXF1ZXN0O3Iub3BlbigiR0VUIix0LGZhbHNlKTtyLnJlc3BvbnNlVHlwZT0iYXJyYXlidWZmZXIiO3Iuc2VuZChudWxsKTtyZXR1cm4gbmV3IFVpbnQ4QXJyYXkoci5yZXNwb25zZSl9fUU9ZnVuY3Rpb24gZSh0LHIsbil7dmFyIG89bmV3IFhNTEh0dHBSZXF1ZXN0O28ub3BlbigiR0VUIix0LHRydWUpO28ucmVzcG9uc2VUeXBlPSJhcnJheWJ1ZmZlciI7by5vbmxvYWQ9ZnVuY3Rpb24oKXtpZihvLnN0YXR1cz09MjAwfHxvLnN0YXR1cz09MCYmby5yZXNwb25zZSl7cihvLnJlc3BvbnNlKTtyZXR1cm59bigpfTtvLm9uZXJyb3I9bjtvLnNlbmQobnVsbCl9fX1lbHNle3Rocm93IG5ldyBFcnJvcigiZW52aXJvbm1lbnQgZGV0ZWN0aW9uIGVycm9yIil9dmFyIFQ9U1sicHJpbnQiXXx8Y29uc29sZS5sb2cuYmluZChjb25zb2xlKTt2YXIgTT1TWyJwcmludEVyciJdfHxjb25zb2xlLmVycm9yLmJpbmQoY29uc29sZSk7T2JqZWN0LmFzc2lnbihTLGwpO2w9bnVsbDtwbigpO2lmKFNbImFyZ3VtZW50cyJdKXY9U1siYXJndW1lbnRzIl07VGUoImFyZ3VtZW50cyIsImFyZ3VtZW50c18iKTtpZihTWyJ0aGlzUHJvZ3JhbSJdKW09U1sidGhpc1Byb2dyYW0iXTtUZSgidGhpc1Byb2dyYW0iLCJ0aGlzUHJvZ3JhbSIpO2lmKFNbInF1aXQiXSl5PVNbInF1aXQiXTtUZSgicXVpdCIsInF1aXRfIik7Qyh0eXBlb2YgU1sibWVtb3J5SW5pdGlhbGl6ZXJQcmVmaXhVUkwiXT09InVuZGVmaW5lZCIsIk1vZHVsZS5tZW1vcnlJbml0aWFsaXplclByZWZpeFVSTCBvcHRpb24gd2FzIHJlbW92ZWQsIHVzZSBNb2R1bGUubG9jYXRlRmlsZSBpbnN0ZWFkIik7Qyh0eXBlb2YgU1sicHRocmVhZE1haW5QcmVmaXhVUkwiXT09InVuZGVmaW5lZCIsIk1vZHVsZS5wdGhyZWFkTWFpblByZWZpeFVSTCBvcHRpb24gd2FzIHJlbW92ZWQsIHVzZSBNb2R1bGUubG9jYXRlRmlsZSBpbnN0ZWFkIik7Qyh0eXBlb2YgU1siY2RJbml0aWFsaXplclByZWZpeFVSTCJdPT0idW5kZWZpbmVkIiwiTW9kdWxlLmNkSW5pdGlhbGl6ZXJQcmVmaXhVUkwgb3B0aW9uIHdhcyByZW1vdmVkLCB1c2UgTW9kdWxlLmxvY2F0ZUZpbGUgaW5zdGVhZCIpO0ModHlwZW9mIFNbImZpbGVQYWNrYWdlUHJlZml4VVJMIl09PSJ1bmRlZmluZWQiLCJNb2R1bGUuZmlsZVBhY2thZ2VQcmVmaXhVUkwgb3B0aW9uIHdhcyByZW1vdmVkLCB1c2UgTW9kdWxlLmxvY2F0ZUZpbGUgaW5zdGVhZCIpO0ModHlwZW9mIFNbInJlYWQiXT09InVuZGVmaW5lZCIsIk1vZHVsZS5yZWFkIG9wdGlvbiB3YXMgcmVtb3ZlZCAobW9kaWZ5IHJlYWRfIGluIEpTKSIpO0ModHlwZW9mIFNbInJlYWRBc3luYyJdPT0idW5kZWZpbmVkIiwiTW9kdWxlLnJlYWRBc3luYyBvcHRpb24gd2FzIHJlbW92ZWQgKG1vZGlmeSByZWFkQXN5bmMgaW4gSlMpIik7Qyh0eXBlb2YgU1sicmVhZEJpbmFyeSJdPT0idW5kZWZpbmVkIiwiTW9kdWxlLnJlYWRCaW5hcnkgb3B0aW9uIHdhcyByZW1vdmVkIChtb2RpZnkgcmVhZEJpbmFyeSBpbiBKUykiKTtDKHR5cGVvZiBTWyJzZXRXaW5kb3dUaXRsZSJdPT0idW5kZWZpbmVkIiwiTW9kdWxlLnNldFdpbmRvd1RpdGxlIG9wdGlvbiB3YXMgcmVtb3ZlZCAobW9kaWZ5IGVtc2NyaXB0ZW5fc2V0X3dpbmRvd190aXRsZSBpbiBKUykiKTtDKHR5cGVvZiBTWyJUT1RBTF9NRU1PUlkiXT09InVuZGVmaW5lZCIsIk1vZHVsZS5UT1RBTF9NRU1PUlkgaGFzIGJlZW4gcmVuYW1lZCBNb2R1bGUuSU5JVElBTF9NRU1PUlkiKTtUZSgiYXNtIiwid2FzbUV4cG9ydHMiKTtUZSgicmVhZCIsInJlYWRfIik7VGUoInJlYWRBc3luYyIsInJlYWRBc3luYyIpO1RlKCJyZWFkQmluYXJ5IiwicmVhZEJpbmFyeSIpO1RlKCJzZXRXaW5kb3dUaXRsZSIsInNldFdpbmRvd1RpdGxlIik7QyghYSwibm9kZSBlbnZpcm9ubWVudCBkZXRlY3RlZCBidXQgbm90IGVuYWJsZWQgYXQgYnVpbGQgdGltZS4gIEFkZCBgbm9kZWAgdG8gYC1zRU5WSVJPTk1FTlRgIHRvIGVuYWJsZS4iKTtDKCFzLCJzaGVsbCBlbnZpcm9ubWVudCBkZXRlY3RlZCBidXQgbm90IGVuYWJsZWQgYXQgYnVpbGQgdGltZS4gIEFkZCBgc2hlbGxgIHRvIGAtc0VOVklST05NRU5UYCB0byBlbmFibGUuIik7dmFyIEE7aWYoU1sid2FzbUJpbmFyeSJdKUE9U1sid2FzbUJpbmFyeSJdO1RlKCJ3YXNtQmluYXJ5Iiwid2FzbUJpbmFyeSIpO2lmKCh0eXBlb2YgV2ViQXNzZW1ibHk9PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKFdlYkFzc2VtYmx5KSkhPSJvYmplY3QiKXtNKCJubyBuYXRpdmUgd2FzbSBzdXBwb3J0IGRldGVjdGVkIil9ZnVuY3Rpb24gRihlKXt2YXIgdD1hdG9iKGUpO3ZhciByPW5ldyBVaW50OEFycmF5KHQubGVuZ3RoKTtmb3IodmFyIG49MDtuPHQubGVuZ3RoOysrbil7cltuXT10LmNoYXJDb2RlQXQobil9cmV0dXJuIHJ9dmFyIE87dmFyIEQ9ZmFsc2U7dmFyIFA7ZnVuY3Rpb24gQyhlLHQpe2lmKCFlKXtzZSgiQXNzZXJ0aW9uIGZhaWxlZCIrKHQ/IjogIit0OiIiKSl9fXZhciBOLFIsSSxqLEwsVSx4LFc7ZnVuY3Rpb24gQigpe3ZhciBlPU8uYnVmZmVyO1NbIkhFQVA4Il09Tj1uZXcgSW50OEFycmF5KGUpO1NbIkhFQVAxNiJdPUk9bmV3IEludDE2QXJyYXkoZSk7U1siSEVBUFU4Il09Uj1uZXcgVWludDhBcnJheShlKTtTWyJIRUFQVTE2Il09aj1uZXcgVWludDE2QXJyYXkoZSk7U1siSEVBUDMyIl09TD1uZXcgSW50MzJBcnJheShlKTtTWyJIRUFQVTMyIl09VT1uZXcgVWludDMyQXJyYXkoZSk7U1siSEVBUEYzMiJdPXg9bmV3IEZsb2F0MzJBcnJheShlKTtTWyJIRUFQRjY0Il09Vz1uZXcgRmxvYXQ2NEFycmF5KGUpfUMoIVNbIlNUQUNLX1NJWkUiXSwiU1RBQ0tfU0laRSBjYW4gbm8gbG9uZ2VyIGJlIHNldCBhdCBydW50aW1lLiAgVXNlIC1zU1RBQ0tfU0laRSBhdCBsaW5rIHRpbWUiKTtDKHR5cGVvZiBJbnQzMkFycmF5IT0idW5kZWZpbmVkIiYmdHlwZW9mIEZsb2F0NjRBcnJheSE9PSJ1bmRlZmluZWQiJiZJbnQzMkFycmF5LnByb3RvdHlwZS5zdWJhcnJheSE9dW5kZWZpbmVkJiZJbnQzMkFycmF5LnByb3RvdHlwZS5zZXQhPXVuZGVmaW5lZCwiSlMgZW5naW5lIGRvZXMgbm90IHByb3ZpZGUgZnVsbCB0eXBlZCBhcnJheSBzdXBwb3J0Iik7QyghU1sid2FzbU1lbW9yeSJdLCJVc2Ugb2YgYHdhc21NZW1vcnlgIGRldGVjdGVkLiAgVXNlIC1zSU1QT1JURURfTUVNT1JZIHRvIGRlZmluZSB3YXNtTWVtb3J5IGV4dGVybmFsbHkiKTtDKCFTWyJJTklUSUFMX01FTU9SWSJdLCJEZXRlY3RlZCBydW50aW1lIElOSVRJQUxfTUVNT1JZIHNldHRpbmcuICBVc2UgLXNJTVBPUlRFRF9NRU1PUlkgdG8gZGVmaW5lIHdhc21NZW1vcnkgZHluYW1pY2FsbHkiKTtmdW5jdGlvbiB6KCl7dmFyIGU9V24oKTtDKChlJjMpPT0wKTtpZihlPT0wKXtlKz00fVVbZT4+Ml09MzQ4MjEyMjM7VVtlKzQ+PjJdPTIzMTA3MjEwMjI7VVswPj4yXT0xNjY4NTA5MDI5fWZ1bmN0aW9uIEgoKXtpZihEKXJldHVybjt2YXIgZT1XbigpO2lmKGU9PTApe2UrPTR9dmFyIHQ9VVtlPj4yXTt2YXIgcj1VW2UrND4+Ml07aWYodCE9MzQ4MjEyMjN8fHIhPTIzMTA3MjEwMjIpe3NlKCJTdGFjayBvdmVyZmxvdyEgU3RhY2sgY29va2llIGhhcyBiZWVuIG92ZXJ3cml0dGVuIGF0ICIuY29uY2F0KGplKGUpLCIsIGV4cGVjdGVkIGhleCBkd29yZHMgMHg4OUJBQ0RGRSBhbmQgMHgyMTM1NDY3LCBidXQgcmVjZWl2ZWQgIikuY29uY2F0KGplKHIpLCIgIikuY29uY2F0KGplKHQpKSl9aWYoVVswPj4yXSE9MTY2ODUwOTAyOSl7c2UoIlJ1bnRpbWUgZXJyb3I6IFRoZSBhcHBsaWNhdGlvbiBoYXMgY29ycnVwdGVkIGl0cyBoZWFwIG1lbW9yeSBhcmVhIChhZGRyZXNzIHplcm8pISIpfX0oZnVuY3Rpb24oKXt2YXIgZT1uZXcgSW50MTZBcnJheSgxKTt2YXIgdD1uZXcgSW50OEFycmF5KGUuYnVmZmVyKTtlWzBdPTI1NDU5O2lmKHRbMF0hPT0xMTV8fHRbMV0hPT05OSl0aHJvdyJSdW50aW1lIGVycm9yOiBleHBlY3RlZCB0aGUgc3lzdGVtIHRvIGJlIGxpdHRsZS1lbmRpYW4hIChSdW4gd2l0aCAtc1NVUFBPUlRfQklHX0VORElBTiB0byBieXBhc3MpIn0pKCk7dmFyIEc9W107dmFyIFY9W107dmFyIEs9W107dmFyIFk9ZmFsc2U7ZnVuY3Rpb24gcSgpe2lmKFNbInByZVJ1biJdKXtpZih0eXBlb2YgU1sicHJlUnVuIl09PSJmdW5jdGlvbiIpU1sicHJlUnVuIl09W1NbInByZVJ1biJdXTt3aGlsZShTWyJwcmVSdW4iXS5sZW5ndGgpe1ooU1sicHJlUnVuIl0uc2hpZnQoKSl9fU5lKEcpfWZ1bmN0aW9uIFgoKXtDKCFZKTtZPXRydWU7SCgpO2lmKCFTWyJub0ZTSW5pdCJdJiYhRHQuaW5pdC5pbml0aWFsaXplZClEdC5pbml0KCk7RHQuaWdub3JlUGVybWlzc2lvbnM9ZmFsc2U7aHQuaW5pdCgpO05lKFYpfWZ1bmN0aW9uIEooKXtIKCk7aWYoU1sicG9zdFJ1biJdKXtpZih0eXBlb2YgU1sicG9zdFJ1biJdPT0iZnVuY3Rpb24iKVNbInBvc3RSdW4iXT1bU1sicG9zdFJ1biJdXTt3aGlsZShTWyJwb3N0UnVuIl0ubGVuZ3RoKXskKFNbInBvc3RSdW4iXS5zaGlmdCgpKX19TmUoSyl9ZnVuY3Rpb24gWihlKXtHLnVuc2hpZnQoZSl9ZnVuY3Rpb24gUShlKXtWLnVuc2hpZnQoZSl9ZnVuY3Rpb24gJChlKXtLLnVuc2hpZnQoZSl9QyhNYXRoLmltdWwsIlRoaXMgYnJvd3NlciBkb2VzIG5vdCBzdXBwb3J0IE1hdGguaW11bCgpLCBidWlsZCB3aXRoIExFR0FDWV9WTV9TVVBQT1JUIG9yIFBPTFlGSUxMX09MRF9NQVRIX0ZVTkNUSU9OUyB0byBhZGQgaW4gYSBwb2x5ZmlsbCIpO0MoTWF0aC5mcm91bmQsIlRoaXMgYnJvd3NlciBkb2VzIG5vdCBzdXBwb3J0IE1hdGguZnJvdW5kKCksIGJ1aWxkIHdpdGggTEVHQUNZX1ZNX1NVUFBPUlQgb3IgUE9MWUZJTExfT0xEX01BVEhfRlVOQ1RJT05TIHRvIGFkZCBpbiBhIHBvbHlmaWxsIik7QyhNYXRoLmNsejMyLCJUaGlzIGJyb3dzZXIgZG9lcyBub3Qgc3VwcG9ydCBNYXRoLmNsejMyKCksIGJ1aWxkIHdpdGggTEVHQUNZX1ZNX1NVUFBPUlQgb3IgUE9MWUZJTExfT0xEX01BVEhfRlVOQ1RJT05TIHRvIGFkZCBpbiBhIHBvbHlmaWxsIik7QyhNYXRoLnRydW5jLCJUaGlzIGJyb3dzZXIgZG9lcyBub3Qgc3VwcG9ydCBNYXRoLnRydW5jKCksIGJ1aWxkIHdpdGggTEVHQUNZX1ZNX1NVUFBPUlQgb3IgUE9MWUZJTExfT0xEX01BVEhfRlVOQ1RJT05TIHRvIGFkZCBpbiBhIHBvbHlmaWxsIik7dmFyIGVlPTA7dmFyIHRlPW51bGw7dmFyIHJlPW51bGw7dmFyIG5lPXt9O2Z1bmN0aW9uIG9lKGUpe3ZhciB0PWU7d2hpbGUoMSl7aWYoIW5lW2VdKXJldHVybiBlO2U9dCtNYXRoLnJhbmRvbSgpfX1mdW5jdGlvbiBpZShlKXt2YXIgdDtlZSsrOyh0PVNbIm1vbml0b3JSdW5EZXBlbmRlbmNpZXMiXSk9PT1udWxsfHx0PT09dm9pZCAwfHx0LmNhbGwoUyxlZSk7aWYoZSl7QyghbmVbZV0pO25lW2VdPTE7aWYodGU9PT1udWxsJiZ0eXBlb2Ygc2V0SW50ZXJ2YWwhPSJ1bmRlZmluZWQiKXt0ZT1zZXRJbnRlcnZhbCgoZnVuY3Rpb24oKXtpZihEKXtjbGVhckludGVydmFsKHRlKTt0ZT1udWxsO3JldHVybn12YXIgZT1mYWxzZTtmb3IodmFyIHQgaW4gbmUpe2lmKCFlKXtlPXRydWU7TSgic3RpbGwgd2FpdGluZyBvbiBydW4gZGVwZW5kZW5jaWVzOiIpfU0oImRlcGVuZGVuY3k6ICIuY29uY2F0KHQpKX1pZihlKXtNKCIoZW5kIG9mIGxpc3QpIil9fSksMWU0KX19ZWxzZXtNKCJ3YXJuaW5nOiBydW4gZGVwZW5kZW5jeSBhZGRlZCB3aXRob3V0IElEIil9fWZ1bmN0aW9uIGFlKGUpe3ZhciB0O2VlLS07KHQ9U1sibW9uaXRvclJ1bkRlcGVuZGVuY2llcyJdKT09PW51bGx8fHQ9PT12b2lkIDB8fHQuY2FsbChTLGVlKTtpZihlKXtDKG5lW2VdKTtkZWxldGUgbmVbZV19ZWxzZXtNKCJ3YXJuaW5nOiBydW4gZGVwZW5kZW5jeSByZW1vdmVkIHdpdGhvdXQgSUQiKX1pZihlZT09MCl7aWYodGUhPT1udWxsKXtjbGVhckludGVydmFsKHRlKTt0ZT1udWxsfWlmKHJlKXt2YXIgcj1yZTtyZT1udWxsO3IoKX19fWZ1bmN0aW9uIHNlKGUpe3ZhciB0Oyh0PVNbIm9uQWJvcnQiXSk9PT1udWxsfHx0PT09dm9pZCAwfHx0LmNhbGwoUyxlKTtlPSJBYm9ydGVkKCIrZSsiKSI7TShlKTtEPXRydWU7UD0xO3ZhciByPW5ldyBXZWJBc3NlbWJseS5SdW50aW1lRXJyb3IoZSk7dGhyb3cgcn12YXIgdWU9ImRhdGE6YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtO2Jhc2U2NCwiO3ZhciBjZT1mdW5jdGlvbiBlKHQpe3JldHVybiB0LnN0YXJ0c1dpdGgodWUpfTt2YXIgbGU9ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdC5zdGFydHNXaXRoKCJmaWxlOi8vIil9O2Z1bmN0aW9uIGZlKGUsdCl7cmV0dXJuIGZ1bmN0aW9uKCl7QyhZLCJuYXRpdmUgZnVuY3Rpb24gYCIuY29uY2F0KGUsImAgY2FsbGVkIGJlZm9yZSBydW50aW1lIGluaXRpYWxpemF0aW9uIikpO3ZhciByPXluW2VdO0MociwiZXhwb3J0ZWQgbmF0aXZlIGZ1bmN0aW9uIGAiLmNvbmNhdChlLCJgIG5vdCBmb3VuZCIpKTtDKGFyZ3VtZW50cy5sZW5ndGg8PXQsIm5hdGl2ZSBmdW5jdGlvbiBgIi5jb25jYXQoZSwiYCBjYWxsZWQgd2l0aCAiKS5jb25jYXQoYXJndW1lbnRzLmxlbmd0aCwiIGFyZ3MgYnV0IGV4cGVjdHMgIikuY29uY2F0KHQpKTtyZXR1cm4gci5hcHBseSh2b2lkIDAsYXJndW1lbnRzKX19dmFyIGRlPWZ1bmN0aW9uKGUpe2Z1bmN0aW9uIHQoKXtmKHRoaXMsdCk7cmV0dXJuIGQodGhpcyx0LGFyZ3VtZW50cyl9cCh0LGUpO3JldHVybiB1KHQpfShoKEVycm9yKSk7dmFyIHZlPWZ1bmN0aW9uKGUpe2Z1bmN0aW9uIHQoKXtmKHRoaXMsdCk7cmV0dXJuIGQodGhpcyx0LGFyZ3VtZW50cyl9cCh0LGUpO3JldHVybiB1KHQpfShkZSk7dmFyIG1lPWZ1bmN0aW9uKGUpe2Z1bmN0aW9uIHQoZSl7dmFyIHI7Zih0aGlzLHQpO3I9ZCh0aGlzLHQsW2VdKTtyLmV4Y1B0cj1lO3ZhciBuPW1uKGUpO3IubmFtZT1uWzBdO3IubWVzc2FnZT1uWzFdO3JldHVybiByfXAodCxlKTtyZXR1cm4gdSh0KX0oZGUpO2Z1bmN0aW9uIHBlKCl7dmFyIGU9Imt3c19jdXN0b21fd29yZC53YXNtIjtpZighY2UoZSkpe3JldHVybiB3KGUpfXJldHVybiBlfXZhciBoZTtmdW5jdGlvbiB5ZShlKXtpZihlPT1oZSYmQSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KEEpfWlmKGspe3JldHVybiBrKGUpfXRocm93ImJvdGggYXN5bmMgYW5kIHN5bmMgZmV0Y2hpbmcgb2YgdGhlIHdhc20gZmFpbGVkIn1mdW5jdGlvbiBnZShlKXtpZighQSYmKG98fGkpKXtpZih0eXBlb2YgZmV0Y2g9PSJmdW5jdGlvbiIpe3JldHVybiBmZXRjaChlLHtjcmVkZW50aWFsczoic2FtZS1vcmlnaW4ifSkudGhlbigoZnVuY3Rpb24odCl7aWYoIXRbIm9rIl0pe3Rocm93ImZhaWxlZCB0byBsb2FkIHdhc20gYmluYXJ5IGZpbGUgYXQgJyIuY29uY2F0KGUsIiciKX1yZXR1cm4gdFsiYXJyYXlCdWZmZXIiXSgpfSkpWyJjYXRjaCJdKChmdW5jdGlvbigpe3JldHVybiB5ZShlKX0pKX19cmV0dXJuIFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKGZ1bmN0aW9uKCl7cmV0dXJuIHllKGUpfSkpfWZ1bmN0aW9uIHdlKGUsdCxyKXtyZXR1cm4gZ2UoZSkudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIFdlYkFzc2VtYmx5Lmluc3RhbnRpYXRlKGUsdCl9KSkudGhlbihyLChmdW5jdGlvbihlKXtNKCJmYWlsZWQgdG8gYXN5bmNocm9ub3VzbHkgcHJlcGFyZSB3YXNtOiAiLmNvbmNhdChlKSk7aWYobGUoaGUpKXtNKCJ3YXJuaW5nOiBMb2FkaW5nIGZyb20gYSBmaWxlIFVSSSAoIi5jb25jYXQoaGUsIikgaXMgbm90IHN1cHBvcnRlZCBpbiBtb3N0IGJyb3dzZXJzLiBTZWUgaHR0cHM6Ly9lbXNjcmlwdGVuLm9yZy9kb2NzL2dldHRpbmdfc3RhcnRlZC9GQVEuaHRtbCNob3ctZG8taS1ydW4tYS1sb2NhbC13ZWJzZXJ2ZXItZm9yLXRlc3Rpbmctd2h5LWRvZXMtbXktcHJvZ3JhbS1zdGFsbC1pbi1kb3dubG9hZGluZy1vci1wcmVwYXJpbmciKSl9c2UoZSl9KSl9ZnVuY3Rpb24gX2UoZSx0LHIsbil7aWYoIWUmJnR5cGVvZiBXZWJBc3NlbWJseS5pbnN0YW50aWF0ZVN0cmVhbWluZz09ImZ1bmN0aW9uIiYmIWNlKHQpJiZ0eXBlb2YgZmV0Y2g9PSJmdW5jdGlvbiIpe3JldHVybiBmZXRjaCh0LHtjcmVkZW50aWFsczoic2FtZS1vcmlnaW4ifSkudGhlbigoZnVuY3Rpb24oZSl7dmFyIG89V2ViQXNzZW1ibHkuaW5zdGFudGlhdGVTdHJlYW1pbmcoZSxyKTtyZXR1cm4gby50aGVuKG4sKGZ1bmN0aW9uKGUpe00oIndhc20gc3RyZWFtaW5nIGNvbXBpbGUgZmFpbGVkOiAiLmNvbmNhdChlKSk7TSgiZmFsbGluZyBiYWNrIHRvIEFycmF5QnVmZmVyIGluc3RhbnRpYXRpb24iKTtyZXR1cm4gd2UodCxyLG4pfSkpfSkpfXJldHVybiB3ZSh0LHIsbil9ZnVuY3Rpb24gRWUoKXtyZXR1cm57ZW52OmhuLHdhc2lfc25hcHNob3RfcHJldmlldzE6aG59fWZ1bmN0aW9uIGJlKCl7dmFyIGU9RWUoKTtmdW5jdGlvbiB0KGUsdCl7eW49ZS5leHBvcnRzO089eW5bIm1lbW9yeSJdO0MoTywibWVtb3J5IG5vdCBmb3VuZCBpbiB3YXNtIGV4cG9ydHMiKTtCKCk7enI9eW5bIl9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUiXTtDKHpyLCJ0YWJsZSBub3QgZm91bmQgaW4gd2FzbSBleHBvcnRzIik7USh5blsiX193YXNtX2NhbGxfY3RvcnMiXSk7YWUoIndhc20taW5zdGFudGlhdGUiKTtyZXR1cm4geW59aWUoIndhc20taW5zdGFudGlhdGUiKTt2YXIgcj1TO2Z1bmN0aW9uIG4oZSl7QyhTPT09ciwidGhlIE1vZHVsZSBvYmplY3Qgc2hvdWxkIG5vdCBiZSByZXBsYWNlZCBkdXJpbmcgYXN5bmMgY29tcGlsYXRpb24gLSBwZXJoYXBzIHRoZSBvcmRlciBvZiBIVE1MIGVsZW1lbnRzIGlzIHdyb25nPyIpO3I9bnVsbDt0KGVbImluc3RhbmNlIl0pfWlmKFNbImluc3RhbnRpYXRlV2FzbSJdKXt0cnl7cmV0dXJuIFNbImluc3RhbnRpYXRlV2FzbSJdKGUsdCl9Y2F0Y2goZSl7TSgiTW9kdWxlLmluc3RhbnRpYXRlV2FzbSBjYWxsYmFjayBmYWlsZWQgd2l0aCBlcnJvcjogIi5jb25jYXQoZSkpO3JldHVybiBmYWxzZX19aWYoIWhlKWhlPXBlKCk7X2UoQSxoZSxlLG4pO3JldHVybnt9fXZhciBTZTt2YXIga2U7ZnVuY3Rpb24gVGUoZSx0KXt2YXIgcj1hcmd1bWVudHMubGVuZ3RoPjImJmFyZ3VtZW50c1syXSE9PXVuZGVmaW5lZD9hcmd1bWVudHNbMl06dHJ1ZTtpZighT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihTLGUpKXtPYmplY3QuZGVmaW5lUHJvcGVydHkoUyxlLHtjb25maWd1cmFibGU6dHJ1ZSxnZXQ6ZnVuY3Rpb24gbigpe3ZhciBvPXI/IiAodGhlIGluaXRpYWwgdmFsdWUgY2FuIGJlIHByb3ZpZGVkIG9uIE1vZHVsZSwgYnV0IGFmdGVyIHN0YXJ0dXAgdGhlIHZhbHVlIGlzIG9ubHkgbG9va2VkIGZvciBvbiBhIGxvY2FsIHZhcmlhYmxlIG9mIHRoYXQgbmFtZSkiOiIiO3NlKCJgTW9kdWxlLiIuY29uY2F0KGUsImAgaGFzIGJlZW4gcmVwbGFjZWQgYnkgYCIpLmNvbmNhdCh0LCJgIikrbyl9fSl9fWZ1bmN0aW9uIE1lKGUpe2lmKE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoUyxlKSl7c2UoImBNb2R1bGUuIi5jb25jYXQoZSwiYCB3YXMgc3VwcGxpZWQgYnV0IGAiKS5jb25jYXQoZSwiYCBub3QgaW5jbHVkZWQgaW4gSU5DT01JTkdfTU9EVUxFX0pTX0FQSSIpKX19ZnVuY3Rpb24gQWUoZSl7cmV0dXJuIGU9PT0iRlNfY3JlYXRlUGF0aCJ8fGU9PT0iRlNfY3JlYXRlRGF0YUZpbGUifHxlPT09IkZTX2NyZWF0ZVByZWxvYWRlZEZpbGUifHxlPT09IkZTX3VubGluayJ8fGU9PT0iYWRkUnVuRGVwZW5kZW5jeSJ8fGU9PT0iRlNfY3JlYXRlTGF6eUZpbGUifHxlPT09IkZTX2NyZWF0ZURldmljZSJ8fGU9PT0icmVtb3ZlUnVuRGVwZW5kZW5jeSJ9ZnVuY3Rpb24gRmUoZSx0KXtpZih0eXBlb2YgZ2xvYmFsVGhpcyE9InVuZGVmaW5lZCIpe09iamVjdC5kZWZpbmVQcm9wZXJ0eShnbG9iYWxUaGlzLGUse2NvbmZpZ3VyYWJsZTp0cnVlLGdldDpmdW5jdGlvbiByKCl7V2UoImAiLmNvbmNhdChlLCJgIGlzIG5vdCBsb25nZXIgZGVmaW5lZCBieSBlbXNjcmlwdGVuLiAiKS5jb25jYXQodCkpO3JldHVybiB1bmRlZmluZWR9fSl9fUZlKCJidWZmZXIiLCJQbGVhc2UgdXNlIEhFQVA4LmJ1ZmZlciBvciB3YXNtTWVtb3J5LmJ1ZmZlciIpO0ZlKCJhc20iLCJQbGVhc2UgdXNlIHdhc21FeHBvcnRzIGluc3RlYWQiKTtmdW5jdGlvbiBPZShlKXtpZih0eXBlb2YgZ2xvYmFsVGhpcyE9InVuZGVmaW5lZCImJiFPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKGdsb2JhbFRoaXMsZSkpe09iamVjdC5kZWZpbmVQcm9wZXJ0eShnbG9iYWxUaGlzLGUse2NvbmZpZ3VyYWJsZTp0cnVlLGdldDpmdW5jdGlvbiB0KCl7dmFyIHI9ImAiLmNvbmNhdChlLCJgIGlzIGEgbGlicmFyeSBzeW1ib2wgYW5kIG5vdCBpbmNsdWRlZCBieSBkZWZhdWx0OyBhZGQgaXQgdG8geW91ciBsaWJyYXJ5LmpzIF9fZGVwcyBvciB0byBERUZBVUxUX0xJQlJBUllfRlVOQ1NfVE9fSU5DTFVERSBvbiB0aGUgY29tbWFuZCBsaW5lIik7dmFyIG49ZTtpZighbi5zdGFydHNXaXRoKCJfIikpe249IiQiK2V9cis9IiAoZS5nLiAtc0RFRkFVTFRfTElCUkFSWV9GVU5DU19UT19JTkNMVURFPSciLmNvbmNhdChuLCInKSIpO2lmKEFlKGUpKXtyKz0iLiBBbHRlcm5hdGl2ZWx5LCBmb3JjaW5nIGZpbGVzeXN0ZW0gc3VwcG9ydCAoLXNGT1JDRV9GSUxFU1lTVEVNKSBjYW4gZXhwb3J0IHRoaXMgZm9yIHlvdSJ9V2Uocik7cmV0dXJuIHVuZGVmaW5lZH19KX1EZShlKX1mdW5jdGlvbiBEZShlKXtpZighT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihTLGUpKXtPYmplY3QuZGVmaW5lUHJvcGVydHkoUyxlLHtjb25maWd1cmFibGU6dHJ1ZSxnZXQ6ZnVuY3Rpb24gdCgpe3ZhciByPSInIi5jb25jYXQoZSwiJyB3YXMgbm90IGV4cG9ydGVkLiBhZGQgaXQgdG8gRVhQT1JURURfUlVOVElNRV9NRVRIT0RTIChzZWUgdGhlIEVtc2NyaXB0ZW4gRkFRKSIpO2lmKEFlKGUpKXtyKz0iLiBBbHRlcm5hdGl2ZWx5LCBmb3JjaW5nIGZpbGVzeXN0ZW0gc3VwcG9ydCAoLXNGT1JDRV9GSUxFU1lTVEVNKSBjYW4gZXhwb3J0IHRoaXMgZm9yIHlvdSJ9c2Uocil9fSl9fXZhciBQZT17ODk4MTI4OmZ1bmN0aW9uIGUodCxyLG4sbyl7aWYodHlwZW9mIFM9PSJ1bmRlZmluZWQifHwhUy5Nb3VudGVkRmlsZXMpe3JldHVybiAxfXZhciBpPUhlKHQ+Pj4wKTtpZihpLnN0YXJ0c1dpdGgoIi4vIikpe2k9aS5zdWJzdHJpbmcoMil9dmFyIGE9Uy5Nb3VudGVkRmlsZXMuZ2V0KGkpO2lmKCFhKXtyZXR1cm4gMn12YXIgcz1yPj4+MDt2YXIgdT1uPj4+MDt2YXIgYz1vPj4+MDtpZihzK3U+YS5ieXRlTGVuZ3RoKXtyZXR1cm4gM310cnl7Ui5zZXQoYS5zdWJhcnJheShzLHMrdSksYyk7cmV0dXJuIDB9Y2F0Y2goZSl7cmV0dXJuIDR9fX07ZnVuY3Rpb24gQ2UoZSl7dGhpcy5uYW1lPSJFeGl0U3RhdHVzIjt0aGlzLm1lc3NhZ2U9IlByb2dyYW0gdGVybWluYXRlZCB3aXRoIGV4aXQoIi5jb25jYXQoZSwiKSIpO3RoaXMuc3RhdHVzPWV9dmFyIE5lPWZ1bmN0aW9uIGUodCl7d2hpbGUodC5sZW5ndGg+MCl7dC5zaGlmdCgpKFMpfX07ZnVuY3Rpb24gUmUoZSl7dmFyIHQ9YXJndW1lbnRzLmxlbmd0aD4xJiZhcmd1bWVudHNbMV0hPT11bmRlZmluZWQ/YXJndW1lbnRzWzFdOiJpOCI7aWYodC5lbmRzV2l0aCgiKiIpKXQ9IioiO3N3aXRjaCh0KXtjYXNlImkxIjpyZXR1cm4gTltlXTtjYXNlImk4IjpyZXR1cm4gTltlXTtjYXNlImkxNiI6cmV0dXJuIElbZT4+MV07Y2FzZSJpMzIiOnJldHVybiBMW2U+PjJdO2Nhc2UiaTY0IjpzZSgidG8gZG8gZ2V0VmFsdWUoaTY0KSB1c2UgV0FTTV9CSUdJTlQiKTtjYXNlImZsb2F0IjpyZXR1cm4geFtlPj4yXTtjYXNlImRvdWJsZSI6cmV0dXJuIFdbZT4+M107Y2FzZSIqIjpyZXR1cm4gVVtlPj4yXTtkZWZhdWx0OnNlKCJpbnZhbGlkIHR5cGUgZm9yIGdldFZhbHVlOiAiLmNvbmNhdCh0KSl9fXZhciBJZT1TWyJub0V4aXRSdW50aW1lIl18fHRydWU7dmFyIGplPWZ1bmN0aW9uIGUodCl7Qyh0eXBlb2YgdD09PSJudW1iZXIiKTt0Pj4+PTA7cmV0dXJuIjB4Iit0LnRvU3RyaW5nKDE2KS5wYWRTdGFydCg4LCIwIil9O2Z1bmN0aW9uIExlKGUsdCl7dmFyIHI9YXJndW1lbnRzLmxlbmd0aD4yJiZhcmd1bWVudHNbMl0hPT11bmRlZmluZWQ/YXJndW1lbnRzWzJdOiJpOCI7aWYoci5lbmRzV2l0aCgiKiIpKXI9IioiO3N3aXRjaChyKXtjYXNlImkxIjpOW2VdPXQ7YnJlYWs7Y2FzZSJpOCI6TltlXT10O2JyZWFrO2Nhc2UiaTE2IjpJW2U+PjFdPXQ7YnJlYWs7Y2FzZSJpMzIiOkxbZT4+Ml09dDticmVhaztjYXNlImk2NCI6c2UoInRvIGRvIHNldFZhbHVlKGk2NCkgdXNlIFdBU01fQklHSU5UIik7Y2FzZSJmbG9hdCI6eFtlPj4yXT10O2JyZWFrO2Nhc2UiZG91YmxlIjpXW2U+PjNdPXQ7YnJlYWs7Y2FzZSIqIjpVW2U+PjJdPXQ7YnJlYWs7ZGVmYXVsdDpzZSgiaW52YWxpZCB0eXBlIGZvciBzZXRWYWx1ZTogIi5jb25jYXQocikpfX12YXIgVWU9ZnVuY3Rpb24gZSh0KXtyZXR1cm4gQm4odCl9O3ZhciB4ZT1mdW5jdGlvbiBlKCl7cmV0dXJuIEhuKCl9O3ZhciBXZT1mdW5jdGlvbiBlKHQpe1dlLnNob3dufHwoV2Uuc2hvd249e30pO2lmKCFXZS5zaG93blt0XSl7V2Uuc2hvd25bdF09MTtNKHQpfX07dmFyIEJlPXR5cGVvZiBUZXh0RGVjb2RlciE9InVuZGVmaW5lZCI/bmV3IFRleHREZWNvZGVyKCJ1dGY4Iik6dW5kZWZpbmVkO3ZhciB6ZT1mdW5jdGlvbiBlKHQscixuKXt2YXIgbz1yK247dmFyIGk9cjt3aGlsZSh0W2ldJiYhKGk+PW8pKSsraTtpZihpLXI+MTYmJnQuYnVmZmVyJiZCZSl7cmV0dXJuIEJlLmRlY29kZSh0LnN1YmFycmF5KHIsaSkpfXZhciBhPSIiO3doaWxlKHI8aSl7dmFyIHM9dFtyKytdO2lmKCEocyYxMjgpKXthKz1TdHJpbmcuZnJvbUNoYXJDb2RlKHMpO2NvbnRpbnVlfXZhciB1PXRbcisrXSY2MztpZigocyYyMjQpPT0xOTIpe2ErPVN0cmluZy5mcm9tQ2hhckNvZGUoKHMmMzEpPDw2fHUpO2NvbnRpbnVlfXZhciBjPXRbcisrXSY2MztpZigocyYyNDApPT0yMjQpe3M9KHMmMTUpPDwxMnx1PDw2fGN9ZWxzZXtpZigocyYyNDgpIT0yNDApV2UoIkludmFsaWQgVVRGLTggbGVhZGluZyBieXRlICIramUocykrIiBlbmNvdW50ZXJlZCB3aGVuIGRlc2VyaWFsaXppbmcgYSBVVEYtOCBzdHJpbmcgaW4gd2FzbSBtZW1vcnkgdG8gYSBKUyBzdHJpbmchIik7cz0ocyY3KTw8MTh8dTw8MTJ8Yzw8Nnx0W3IrK10mNjN9aWYoczw2NTUzNil7YSs9U3RyaW5nLmZyb21DaGFyQ29kZShzKX1lbHNle3ZhciBsPXMtNjU1MzY7YSs9U3RyaW5nLmZyb21DaGFyQ29kZSg1NTI5NnxsPj4xMCw1NjMyMHxsJjEwMjMpfX1yZXR1cm4gYX07dmFyIEhlPWZ1bmN0aW9uIGUodCxyKXtDKHR5cGVvZiB0PT0ibnVtYmVyIiwiVVRGOFRvU3RyaW5nIGV4cGVjdHMgYSBudW1iZXIgKGdvdCAiLmNvbmNhdChiKHQpLCIpIikpO3JldHVybiB0P3plKFIsdCxyKToiIn07dmFyIEdlPWZ1bmN0aW9uIGUodCxyLG4sbyl7c2UoIkFzc2VydGlvbiBmYWlsZWQ6ICIuY29uY2F0KEhlKHQpLCIsIGF0OiAiKStbcj9IZShyKToidW5rbm93biBmaWxlbmFtZSIsbixvP0hlKG8pOiJ1bmtub3duIGZ1bmN0aW9uIl0pfTt2YXIgVmU9W107dmFyIEtlPTA7dmFyIFllPWZ1bmN0aW9uIGUodCl7dmFyIHI9bmV3IEplKHQpO2lmKCFyLmdldF9jYXVnaHQoKSl7ci5zZXRfY2F1Z2h0KHRydWUpO0tlLS19ci5zZXRfcmV0aHJvd24oZmFsc2UpO1ZlLnB1c2gocik7Vm4oci5leGNQdHIpO3JldHVybiByLmdldF9leGNlcHRpb25fcHRyKCl9O3ZhciBxZT0wO3ZhciBYZT1mdW5jdGlvbiBlKCl7SW4oMCwwKTtDKFZlLmxlbmd0aD4wKTt2YXIgdD1WZS5wb3AoKTtHbih0LmV4Y1B0cik7cWU9MH07dmFyIEplPWZ1bmN0aW9uKCl7ZnVuY3Rpb24gZSh0KXtmKHRoaXMsZSk7dGhpcy5leGNQdHI9dDt0aGlzLnB0cj10LTI0fXJldHVybiB1KGUsW3trZXk6InNldF90eXBlIix2YWx1ZTpmdW5jdGlvbiBlKHQpe1VbdGhpcy5wdHIrND4+Ml09dH19LHtrZXk6ImdldF90eXBlIix2YWx1ZTpmdW5jdGlvbiBlKCl7cmV0dXJuIFVbdGhpcy5wdHIrND4+Ml19fSx7a2V5OiJzZXRfZGVzdHJ1Y3RvciIsdmFsdWU6ZnVuY3Rpb24gZSh0KXtVW3RoaXMucHRyKzg+PjJdPXR9fSx7a2V5OiJnZXRfZGVzdHJ1Y3RvciIsdmFsdWU6ZnVuY3Rpb24gZSgpe3JldHVybiBVW3RoaXMucHRyKzg+PjJdfX0se2tleToic2V0X2NhdWdodCIsdmFsdWU6ZnVuY3Rpb24gZSh0KXt0PXQ/MTowO05bdGhpcy5wdHIrMTJdPXR9fSx7a2V5OiJnZXRfY2F1Z2h0Iix2YWx1ZTpmdW5jdGlvbiBlKCl7cmV0dXJuIE5bdGhpcy5wdHIrMTJdIT0wfX0se2tleToic2V0X3JldGhyb3duIix2YWx1ZTpmdW5jdGlvbiBlKHQpe3Q9dD8xOjA7Tlt0aGlzLnB0cisxM109dH19LHtrZXk6ImdldF9yZXRocm93biIsdmFsdWU6ZnVuY3Rpb24gZSgpe3JldHVybiBOW3RoaXMucHRyKzEzXSE9MH19LHtrZXk6ImluaXQiLHZhbHVlOmZ1bmN0aW9uIGUodCxyKXt0aGlzLnNldF9hZGp1c3RlZF9wdHIoMCk7dGhpcy5zZXRfdHlwZSh0KTt0aGlzLnNldF9kZXN0cnVjdG9yKHIpfX0se2tleToic2V0X2FkanVzdGVkX3B0ciIsdmFsdWU6ZnVuY3Rpb24gZSh0KXtVW3RoaXMucHRyKzE2Pj4yXT10fX0se2tleToiZ2V0X2FkanVzdGVkX3B0ciIsdmFsdWU6ZnVuY3Rpb24gZSgpe3JldHVybiBVW3RoaXMucHRyKzE2Pj4yXX19LHtrZXk6ImdldF9leGNlcHRpb25fcHRyIix2YWx1ZTpmdW5jdGlvbiBlKCl7dmFyIHQ9cW4odGhpcy5nZXRfdHlwZSgpKTtpZih0KXtyZXR1cm4gVVt0aGlzLmV4Y1B0cj4+Ml19dmFyIHI9dGhpcy5nZXRfYWRqdXN0ZWRfcHRyKCk7aWYociE9PTApcmV0dXJuIHI7cmV0dXJuIHRoaXMuZXhjUHRyfX1dKX0oKTt2YXIgWmU9ZnVuY3Rpb24gZSh0KXtpZighcWUpe3FlPW5ldyBtZSh0KX10aHJvdyBxZX07dmFyIFFlPWZ1bmN0aW9uIGUodCl7cmV0dXJuIGpuKHQpfTt2YXIgJGU9ZnVuY3Rpb24gZSh0KXt2YXIgcjt2YXIgbj0ocj1xZSk9PT1udWxsfHxyPT09dm9pZCAwP3ZvaWQgMDpyLmV4Y1B0cjtpZighbil7UWUoMCk7cmV0dXJuIDB9dmFyIG89bmV3IEplKG4pO28uc2V0X2FkanVzdGVkX3B0cihuKTt2YXIgaT1vLmdldF90eXBlKCk7aWYoIWkpe1FlKDApO3JldHVybiBufWZvcih2YXIgYSBpbiB0KXt2YXIgcz10W2FdO2lmKHM9PT0wfHxzPT09aSl7YnJlYWt9dmFyIHU9by5wdHIrMTY7aWYoWW4ocyxpLHUpKXtRZShzKTtyZXR1cm4gbn19UWUoaSk7cmV0dXJuIG59O3ZhciBldD1mdW5jdGlvbiBlKCl7cmV0dXJuICRlKFtdKX07dmFyIHR0PWZ1bmN0aW9uIGUodCl7cmV0dXJuICRlKFt0XSl9O3ZhciBydD1mdW5jdGlvbiBlKCl7dmFyIHQ9VmUucG9wKCk7aWYoIXQpe3NlKCJubyBleGNlcHRpb24gdG8gdGhyb3ciKX12YXIgcj10LmV4Y1B0cjtpZighdC5nZXRfcmV0aHJvd24oKSl7VmUucHVzaCh0KTt0LnNldF9yZXRocm93bih0cnVlKTt0LnNldF9jYXVnaHQoZmFsc2UpO0tlKyt9cWU9bmV3IG1lKHIpO3Rocm93IHFlfTt2YXIgbnQ9ZnVuY3Rpb24gZSh0LHIsbil7dmFyIG89bmV3IEplKHQpO28uaW5pdChyLG4pO3FlPW5ldyBtZSh0KTtLZSsrO3Rocm93IHFlfTt2YXIgb3Q9ZnVuY3Rpb24gZSgpe3JldHVybiBLZX07ZnVuY3Rpb24gaXQoKXtDKFB0LnZhcmFyZ3MhPXVuZGVmaW5lZCk7dmFyIGU9TFsrUHQudmFyYXJncz4+Ml07UHQudmFyYXJncys9NDtyZXR1cm4gZX12YXIgYXQ9aXQ7dmFyIHN0PXtpc0FiczpmdW5jdGlvbiBlKHQpe3JldHVybiB0LmNoYXJBdCgwKT09PSIvIn0sc3BsaXRQYXRoOmZ1bmN0aW9uIGUodCl7dmFyIHI9L14oXC8/fCkoW1xzXFNdKj8pKCg/OlwuezEsMn18W15cL10rP3wpKFwuW14uXC9dKnwpKSg/OltcL10qKSQvO3JldHVybiByLmV4ZWModCkuc2xpY2UoMSl9LG5vcm1hbGl6ZUFycmF5OmZ1bmN0aW9uIGUodCxyKXt2YXIgbj0wO2Zvcih2YXIgbz10Lmxlbmd0aC0xO28+PTA7by0tKXt2YXIgaT10W29dO2lmKGk9PT0iLiIpe3Quc3BsaWNlKG8sMSl9ZWxzZSBpZihpPT09Ii4uIil7dC5zcGxpY2UobywxKTtuKyt9ZWxzZSBpZihuKXt0LnNwbGljZShvLDEpO24tLX19aWYocil7Zm9yKDtuO24tLSl7dC51bnNoaWZ0KCIuLiIpfX1yZXR1cm4gdH0sbm9ybWFsaXplOmZ1bmN0aW9uIGUodCl7dmFyIHI9c3QuaXNBYnModCksbj10LnN1YnN0cigtMSk9PT0iLyI7dD1zdC5ub3JtYWxpemVBcnJheSh0LnNwbGl0KCIvIikuZmlsdGVyKChmdW5jdGlvbihlKXtyZXR1cm4hIWV9KSksIXIpLmpvaW4oIi8iKTtpZighdCYmIXIpe3Q9Ii4ifWlmKHQmJm4pe3QrPSIvIn1yZXR1cm4ocj8iLyI6IiIpK3R9LGRpcm5hbWU6ZnVuY3Rpb24gZSh0KXt2YXIgcj1zdC5zcGxpdFBhdGgodCksbj1yWzBdLG89clsxXTtpZighbiYmIW8pe3JldHVybiIuIn1pZihvKXtvPW8uc3Vic3RyKDAsby5sZW5ndGgtMSl9cmV0dXJuIG4rb30sYmFzZW5hbWU6ZnVuY3Rpb24gZSh0KXtpZih0PT09Ii8iKXJldHVybiIvIjt0PXN0Lm5vcm1hbGl6ZSh0KTt0PXQucmVwbGFjZSgvXC8kLywiIik7dmFyIHI9dC5sYXN0SW5kZXhPZigiLyIpO2lmKHI9PT0tMSlyZXR1cm4gdDtyZXR1cm4gdC5zdWJzdHIocisxKX0sam9pbjpmdW5jdGlvbiBlKCl7Zm9yKHZhciB0PWFyZ3VtZW50cy5sZW5ndGgscj1uZXcgQXJyYXkodCksbj0wO248dDtuKyspe3Jbbl09YXJndW1lbnRzW25dfXJldHVybiBzdC5ub3JtYWxpemUoci5qb2luKCIvIikpfSxqb2luMjpmdW5jdGlvbiBlKHQscil7cmV0dXJuIHN0Lm5vcm1hbGl6ZSh0KyIvIityKX19O3ZhciB1dD1mdW5jdGlvbiBlKCl7aWYoKHR5cGVvZiBjcnlwdG89PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKGNyeXB0bykpPT0ib2JqZWN0IiYmdHlwZW9mIGNyeXB0b1siZ2V0UmFuZG9tVmFsdWVzIl09PSJmdW5jdGlvbiIpe3JldHVybiBmdW5jdGlvbihlKXtyZXR1cm4gY3J5cHRvLmdldFJhbmRvbVZhbHVlcyhlKX19ZWxzZSBzZSgibm8gY3J5cHRvZ3JhcGhpYyBzdXBwb3J0IGZvdW5kIGZvciByYW5kb21EZXZpY2UuIGNvbnNpZGVyIHBvbHlmaWxsaW5nIGl0IGlmIHlvdSB3YW50IHRvIHVzZSBzb21ldGhpbmcgaW5zZWN1cmUgbGlrZSBNYXRoLnJhbmRvbSgpLCBlLmcuIHB1dCB0aGlzIGluIGEgLS1wcmUtanM6IHZhciBjcnlwdG8gPSB7IGdldFJhbmRvbVZhbHVlczogKGFycmF5KSA9PiB7IGZvciAodmFyIGkgPSAwOyBpIDwgYXJyYXkubGVuZ3RoOyBpKyspIGFycmF5W2ldID0gKE1hdGgucmFuZG9tKCkqMjU2KXwwIH0gfTsiKX07dmFyIGN0PWZ1bmN0aW9uIGUodCl7cmV0dXJuKGN0PXV0KCkpKHQpfTt2YXIgbHQ9e3Jlc29sdmU6ZnVuY3Rpb24gZSgpe3ZhciB0PSIiLHI9ZmFsc2U7Zm9yKHZhciBuPWFyZ3VtZW50cy5sZW5ndGgtMTtuPj0tMSYmIXI7bi0tKXt2YXIgbz1uPj0wP248MHx8YXJndW1lbnRzLmxlbmd0aDw9bj91bmRlZmluZWQ6YXJndW1lbnRzW25dOkR0LmN3ZCgpO2lmKHR5cGVvZiBvIT0ic3RyaW5nIil7dGhyb3cgbmV3IFR5cGVFcnJvcigiQXJndW1lbnRzIHRvIHBhdGgucmVzb2x2ZSBtdXN0IGJlIHN0cmluZ3MiKX1lbHNlIGlmKCFvKXtyZXR1cm4iIn10PW8rIi8iK3Q7cj1zdC5pc0FicyhvKX10PXN0Lm5vcm1hbGl6ZUFycmF5KHQuc3BsaXQoIi8iKS5maWx0ZXIoKGZ1bmN0aW9uKGUpe3JldHVybiEhZX0pKSwhcikuam9pbigiLyIpO3JldHVybihyPyIvIjoiIikrdHx8Ii4ifSxyZWxhdGl2ZTpmdW5jdGlvbiBlKHQscil7dD1sdC5yZXNvbHZlKHQpLnN1YnN0cigxKTtyPWx0LnJlc29sdmUocikuc3Vic3RyKDEpO2Z1bmN0aW9uIG4oZSl7dmFyIHQ9MDtmb3IoO3Q8ZS5sZW5ndGg7dCsrKXtpZihlW3RdIT09IiIpYnJlYWt9dmFyIHI9ZS5sZW5ndGgtMTtmb3IoO3I+PTA7ci0tKXtpZihlW3JdIT09IiIpYnJlYWt9aWYodD5yKXJldHVybltdO3JldHVybiBlLnNsaWNlKHQsci10KzEpfXZhciBvPW4odC5zcGxpdCgiLyIpKTt2YXIgaT1uKHIuc3BsaXQoIi8iKSk7dmFyIGE9TWF0aC5taW4oby5sZW5ndGgsaS5sZW5ndGgpO3ZhciBzPWE7Zm9yKHZhciB1PTA7dTxhO3UrKyl7aWYob1t1XSE9PWlbdV0pe3M9dTticmVha319dmFyIGM9W107Zm9yKHZhciB1PXM7dTxvLmxlbmd0aDt1Kyspe2MucHVzaCgiLi4iKX1jPWMuY29uY2F0KGkuc2xpY2UocykpO3JldHVybiBjLmpvaW4oIi8iKX19O3ZhciBmdD1bXTt2YXIgZHQ9ZnVuY3Rpb24gZSh0KXt2YXIgcj0wO2Zvcih2YXIgbj0wO248dC5sZW5ndGg7KytuKXt2YXIgbz10LmNoYXJDb2RlQXQobik7aWYobzw9MTI3KXtyKyt9ZWxzZSBpZihvPD0yMDQ3KXtyKz0yfWVsc2UgaWYobz49NTUyOTYmJm88PTU3MzQzKXtyKz00Oysrbn1lbHNle3IrPTN9fXJldHVybiByfTt2YXIgdnQ9ZnVuY3Rpb24gZSh0LHIsbixvKXtDKHR5cGVvZiB0PT09InN0cmluZyIsInN0cmluZ1RvVVRGOEFycmF5IGV4cGVjdHMgYSBzdHJpbmcgKGdvdCAiLmNvbmNhdChiKHQpLCIpIikpO2lmKCEobz4wKSlyZXR1cm4gMDt2YXIgaT1uO3ZhciBhPW4rby0xO2Zvcih2YXIgcz0wO3M8dC5sZW5ndGg7KytzKXt2YXIgdT10LmNoYXJDb2RlQXQocyk7aWYodT49NTUyOTYmJnU8PTU3MzQzKXt2YXIgYz10LmNoYXJDb2RlQXQoKytzKTt1PTY1NTM2KygodSYxMDIzKTw8MTApfGMmMTAyM31pZih1PD0xMjcpe2lmKG4+PWEpYnJlYWs7cltuKytdPXV9ZWxzZSBpZih1PD0yMDQ3KXtpZihuKzE+PWEpYnJlYWs7cltuKytdPTE5Mnx1Pj42O3JbbisrXT0xMjh8dSY2M31lbHNlIGlmKHU8PTY1NTM1KXtpZihuKzI+PWEpYnJlYWs7cltuKytdPTIyNHx1Pj4xMjtyW24rK109MTI4fHU+PjYmNjM7cltuKytdPTEyOHx1JjYzfWVsc2V7aWYobiszPj1hKWJyZWFrO2lmKHU+MTExNDExMSlXZSgiSW52YWxpZCBVbmljb2RlIGNvZGUgcG9pbnQgIitqZSh1KSsiIGVuY291bnRlcmVkIHdoZW4gc2VyaWFsaXppbmcgYSBKUyBzdHJpbmcgdG8gYSBVVEYtOCBzdHJpbmcgaW4gd2FzbSBtZW1vcnkhIChWYWxpZCB1bmljb2RlIGNvZGUgcG9pbnRzIHNob3VsZCBiZSBpbiByYW5nZSAwLTB4MTBGRkZGKS4iKTtyW24rK109MjQwfHU+PjE4O3JbbisrXT0xMjh8dT4+MTImNjM7cltuKytdPTEyOHx1Pj42JjYzO3JbbisrXT0xMjh8dSY2M319cltuXT0wO3JldHVybiBuLWl9O2Z1bmN0aW9uIG10KGUsdCxyKXt2YXIgbj1yPjA/cjpkdChlKSsxO3ZhciBvPW5ldyBBcnJheShuKTt2YXIgaT12dChlLG8sMCxvLmxlbmd0aCk7aWYodClvLmxlbmd0aD1pO3JldHVybiBvfXZhciBwdD1mdW5jdGlvbiBlKCl7aWYoIWZ0Lmxlbmd0aCl7dmFyIHQ9bnVsbDtpZih0eXBlb2Ygd2luZG93IT0idW5kZWZpbmVkIiYmdHlwZW9mIHdpbmRvdy5wcm9tcHQ9PSJmdW5jdGlvbiIpe3Q9d2luZG93LnByb21wdCgiSW5wdXQ6ICIpO2lmKHQhPT1udWxsKXt0Kz0iXG4ifX1lbHNle31pZighdCl7cmV0dXJuIG51bGx9ZnQ9bXQodCx0cnVlKX1yZXR1cm4gZnQuc2hpZnQoKX07dmFyIGh0PXt0dHlzOltdLGluaXQ6ZnVuY3Rpb24gZSgpe30sc2h1dGRvd246ZnVuY3Rpb24gZSgpe30scmVnaXN0ZXI6ZnVuY3Rpb24gZSh0LHIpe2h0LnR0eXNbdF09e2lucHV0OltdLG91dHB1dDpbXSxvcHM6cn07RHQucmVnaXN0ZXJEZXZpY2UodCxodC5zdHJlYW1fb3BzKX0sc3RyZWFtX29wczp7b3BlbjpmdW5jdGlvbiBlKHQpe3ZhciByPWh0LnR0eXNbdC5ub2RlLnJkZXZdO2lmKCFyKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig0Myl9dC50dHk9cjt0LnNlZWthYmxlPWZhbHNlfSxjbG9zZTpmdW5jdGlvbiBlKHQpe3QudHR5Lm9wcy5mc3luYyh0LnR0eSl9LGZzeW5jOmZ1bmN0aW9uIGUodCl7dC50dHkub3BzLmZzeW5jKHQudHR5KX0scmVhZDpmdW5jdGlvbiBlKHQscixuLG8saSl7aWYoIXQudHR5fHwhdC50dHkub3BzLmdldF9jaGFyKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig2MCl9dmFyIGE9MDtmb3IodmFyIHM9MDtzPG87cysrKXt2YXIgdTt0cnl7dT10LnR0eS5vcHMuZ2V0X2NoYXIodC50dHkpfWNhdGNoKGUpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI5KX1pZih1PT09dW5kZWZpbmVkJiZhPT09MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNil9aWYodT09PW51bGx8fHU9PT11bmRlZmluZWQpYnJlYWs7YSsrO3JbbitzXT11fWlmKGEpe3Qubm9kZS50aW1lc3RhbXA9RGF0ZS5ub3coKX1yZXR1cm4gYX0sd3JpdGU6ZnVuY3Rpb24gZSh0LHIsbixvLGkpe2lmKCF0LnR0eXx8IXQudHR5Lm9wcy5wdXRfY2hhcil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNjApfXRyeXtmb3IodmFyIGE9MDthPG87YSsrKXt0LnR0eS5vcHMucHV0X2NoYXIodC50dHkscltuK2FdKX19Y2F0Y2goZSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjkpfWlmKG8pe3Qubm9kZS50aW1lc3RhbXA9RGF0ZS5ub3coKX1yZXR1cm4gYX19LGRlZmF1bHRfdHR5X29wczp7Z2V0X2NoYXI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gcHQoKX0scHV0X2NoYXI6ZnVuY3Rpb24gZSh0LHIpe2lmKHI9PT1udWxsfHxyPT09MTApe1QoemUodC5vdXRwdXQsMCkpO3Qub3V0cHV0PVtdfWVsc2V7aWYociE9MCl0Lm91dHB1dC5wdXNoKHIpfX0sZnN5bmM6ZnVuY3Rpb24gZSh0KXtpZih0Lm91dHB1dCYmdC5vdXRwdXQubGVuZ3RoPjApe1QoemUodC5vdXRwdXQsMCkpO3Qub3V0cHV0PVtdfX0saW9jdGxfdGNnZXRzOmZ1bmN0aW9uIGUodCl7cmV0dXJue2NfaWZsYWc6MjU4NTYsY19vZmxhZzo1LGNfY2ZsYWc6MTkxLGNfbGZsYWc6MzUzODcsY19jYzpbMywyOCwxMjcsMjEsNCwwLDEsMCwxNywxOSwyNiwwLDE4LDE1LDIzLDIyLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDBdfX0saW9jdGxfdGNzZXRzOmZ1bmN0aW9uIGUodCxyLG4pe3JldHVybiAwfSxpb2N0bF90aW9jZ3dpbnN6OmZ1bmN0aW9uIGUodCl7cmV0dXJuWzI0LDgwXX19LGRlZmF1bHRfdHR5MV9vcHM6e3B1dF9jaGFyOmZ1bmN0aW9uIGUodCxyKXtpZihyPT09bnVsbHx8cj09PTEwKXtNKHplKHQub3V0cHV0LDApKTt0Lm91dHB1dD1bXX1lbHNle2lmKHIhPTApdC5vdXRwdXQucHVzaChyKX19LGZzeW5jOmZ1bmN0aW9uIGUodCl7aWYodC5vdXRwdXQmJnQub3V0cHV0Lmxlbmd0aD4wKXtNKHplKHQub3V0cHV0LDApKTt0Lm91dHB1dD1bXX19fX07dmFyIHl0PWZ1bmN0aW9uIGUodCxyKXtSLmZpbGwoMCx0LHQrcik7cmV0dXJuIHR9O3ZhciBndD1mdW5jdGlvbiBlKHQscil7QyhyLCJhbGlnbm1lbnQgYXJndW1lbnQgaXMgcmVxdWlyZWQiKTtyZXR1cm4gTWF0aC5jZWlsKHQvcikqcn07dmFyIHd0PWZ1bmN0aW9uIGUodCl7dD1ndCh0LDY1NTM2KTt2YXIgcj1Sbig2NTUzNix0KTtpZighcilyZXR1cm4gMDtyZXR1cm4geXQocix0KX07dmFyIF90PXtvcHNfdGFibGU6bnVsbCxtb3VudDpmdW5jdGlvbiBlKHQpe3JldHVybiBfdC5jcmVhdGVOb2RlKG51bGwsIi8iLDE2Mzg0fDUxMSwwKX0sY3JlYXRlTm9kZTpmdW5jdGlvbiBlKHQscixuLG8pe2lmKER0LmlzQmxrZGV2KG4pfHxEdC5pc0ZJRk8obikpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDYzKX1fdC5vcHNfdGFibGV8fChfdC5vcHNfdGFibGU9e2Rpcjp7bm9kZTp7Z2V0YXR0cjpfdC5ub2RlX29wcy5nZXRhdHRyLHNldGF0dHI6X3Qubm9kZV9vcHMuc2V0YXR0cixsb29rdXA6X3Qubm9kZV9vcHMubG9va3VwLG1rbm9kOl90Lm5vZGVfb3BzLm1rbm9kLHJlbmFtZTpfdC5ub2RlX29wcy5yZW5hbWUsdW5saW5rOl90Lm5vZGVfb3BzLnVubGluayxybWRpcjpfdC5ub2RlX29wcy5ybWRpcixyZWFkZGlyOl90Lm5vZGVfb3BzLnJlYWRkaXIsc3ltbGluazpfdC5ub2RlX29wcy5zeW1saW5rfSxzdHJlYW06e2xsc2VlazpfdC5zdHJlYW1fb3BzLmxsc2Vla319LGZpbGU6e25vZGU6e2dldGF0dHI6X3Qubm9kZV9vcHMuZ2V0YXR0cixzZXRhdHRyOl90Lm5vZGVfb3BzLnNldGF0dHJ9LHN0cmVhbTp7bGxzZWVrOl90LnN0cmVhbV9vcHMubGxzZWVrLHJlYWQ6X3Quc3RyZWFtX29wcy5yZWFkLHdyaXRlOl90LnN0cmVhbV9vcHMud3JpdGUsYWxsb2NhdGU6X3Quc3RyZWFtX29wcy5hbGxvY2F0ZSxtbWFwOl90LnN0cmVhbV9vcHMubW1hcCxtc3luYzpfdC5zdHJlYW1fb3BzLm1zeW5jfX0sbGluazp7bm9kZTp7Z2V0YXR0cjpfdC5ub2RlX29wcy5nZXRhdHRyLHNldGF0dHI6X3Qubm9kZV9vcHMuc2V0YXR0cixyZWFkbGluazpfdC5ub2RlX29wcy5yZWFkbGlua30sc3RyZWFtOnt9fSxjaHJkZXY6e25vZGU6e2dldGF0dHI6X3Qubm9kZV9vcHMuZ2V0YXR0cixzZXRhdHRyOl90Lm5vZGVfb3BzLnNldGF0dHJ9LHN0cmVhbTpEdC5jaHJkZXZfc3RyZWFtX29wc319KTt2YXIgaT1EdC5jcmVhdGVOb2RlKHQscixuLG8pO2lmKER0LmlzRGlyKGkubW9kZSkpe2kubm9kZV9vcHM9X3Qub3BzX3RhYmxlLmRpci5ub2RlO2kuc3RyZWFtX29wcz1fdC5vcHNfdGFibGUuZGlyLnN0cmVhbTtpLmNvbnRlbnRzPXt9fWVsc2UgaWYoRHQuaXNGaWxlKGkubW9kZSkpe2kubm9kZV9vcHM9X3Qub3BzX3RhYmxlLmZpbGUubm9kZTtpLnN0cmVhbV9vcHM9X3Qub3BzX3RhYmxlLmZpbGUuc3RyZWFtO2kudXNlZEJ5dGVzPTA7aS5jb250ZW50cz1udWxsfWVsc2UgaWYoRHQuaXNMaW5rKGkubW9kZSkpe2kubm9kZV9vcHM9X3Qub3BzX3RhYmxlLmxpbmsubm9kZTtpLnN0cmVhbV9vcHM9X3Qub3BzX3RhYmxlLmxpbmsuc3RyZWFtfWVsc2UgaWYoRHQuaXNDaHJkZXYoaS5tb2RlKSl7aS5ub2RlX29wcz1fdC5vcHNfdGFibGUuY2hyZGV2Lm5vZGU7aS5zdHJlYW1fb3BzPV90Lm9wc190YWJsZS5jaHJkZXYuc3RyZWFtfWkudGltZXN0YW1wPURhdGUubm93KCk7aWYodCl7dC5jb250ZW50c1tyXT1pO3QudGltZXN0YW1wPWkudGltZXN0YW1wfXJldHVybiBpfSxnZXRGaWxlRGF0YUFzVHlwZWRBcnJheTpmdW5jdGlvbiBlKHQpe2lmKCF0LmNvbnRlbnRzKXJldHVybiBuZXcgVWludDhBcnJheSgwKTtpZih0LmNvbnRlbnRzLnN1YmFycmF5KXJldHVybiB0LmNvbnRlbnRzLnN1YmFycmF5KDAsdC51c2VkQnl0ZXMpO3JldHVybiBuZXcgVWludDhBcnJheSh0LmNvbnRlbnRzKX0sZXhwYW5kRmlsZVN0b3JhZ2U6ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPXQuY29udGVudHM/dC5jb250ZW50cy5sZW5ndGg6MDtpZihuPj1yKXJldHVybjt2YXIgbz0xMDI0KjEwMjQ7cj1NYXRoLm1heChyLG4qKG48bz8yOjEuMTI1KT4+PjApO2lmKG4hPTApcj1NYXRoLm1heChyLDI1Nik7dmFyIGk9dC5jb250ZW50czt0LmNvbnRlbnRzPW5ldyBVaW50OEFycmF5KHIpO2lmKHQudXNlZEJ5dGVzPjApdC5jb250ZW50cy5zZXQoaS5zdWJhcnJheSgwLHQudXNlZEJ5dGVzKSwwKX0scmVzaXplRmlsZVN0b3JhZ2U6ZnVuY3Rpb24gZSh0LHIpe2lmKHQudXNlZEJ5dGVzPT1yKXJldHVybjtpZihyPT0wKXt0LmNvbnRlbnRzPW51bGw7dC51c2VkQnl0ZXM9MH1lbHNle3ZhciBuPXQuY29udGVudHM7dC5jb250ZW50cz1uZXcgVWludDhBcnJheShyKTtpZihuKXt0LmNvbnRlbnRzLnNldChuLnN1YmFycmF5KDAsTWF0aC5taW4ocix0LnVzZWRCeXRlcykpKX10LnVzZWRCeXRlcz1yfX0sbm9kZV9vcHM6e2dldGF0dHI6ZnVuY3Rpb24gZSh0KXt2YXIgcj17fTtyLmRldj1EdC5pc0NocmRldih0Lm1vZGUpP3QuaWQ6MTtyLmlubz10LmlkO3IubW9kZT10Lm1vZGU7ci5ubGluaz0xO3IudWlkPTA7ci5naWQ9MDtyLnJkZXY9dC5yZGV2O2lmKER0LmlzRGlyKHQubW9kZSkpe3Iuc2l6ZT00MDk2fWVsc2UgaWYoRHQuaXNGaWxlKHQubW9kZSkpe3Iuc2l6ZT10LnVzZWRCeXRlc31lbHNlIGlmKER0LmlzTGluayh0Lm1vZGUpKXtyLnNpemU9dC5saW5rLmxlbmd0aH1lbHNle3Iuc2l6ZT0wfXIuYXRpbWU9bmV3IERhdGUodC50aW1lc3RhbXApO3IubXRpbWU9bmV3IERhdGUodC50aW1lc3RhbXApO3IuY3RpbWU9bmV3IERhdGUodC50aW1lc3RhbXApO3IuYmxrc2l6ZT00MDk2O3IuYmxvY2tzPU1hdGguY2VpbChyLnNpemUvci5ibGtzaXplKTtyZXR1cm4gcn0sc2V0YXR0cjpmdW5jdGlvbiBlKHQscil7aWYoci5tb2RlIT09dW5kZWZpbmVkKXt0Lm1vZGU9ci5tb2RlfWlmKHIudGltZXN0YW1wIT09dW5kZWZpbmVkKXt0LnRpbWVzdGFtcD1yLnRpbWVzdGFtcH1pZihyLnNpemUhPT11bmRlZmluZWQpe190LnJlc2l6ZUZpbGVTdG9yYWdlKHQsci5zaXplKX19LGxvb2t1cDpmdW5jdGlvbiBlKHQscil7dGhyb3cgRHQuZ2VuZXJpY0Vycm9yc1s0NF19LG1rbm9kOmZ1bmN0aW9uIGUodCxyLG4sbyl7cmV0dXJuIF90LmNyZWF0ZU5vZGUodCxyLG4sbyl9LHJlbmFtZTpmdW5jdGlvbiBlKHQscixuKXtpZihEdC5pc0Rpcih0Lm1vZGUpKXt2YXIgbzt0cnl7bz1EdC5sb29rdXBOb2RlKHIsbil9Y2F0Y2goZSl7fWlmKG8pe2Zvcih2YXIgaSBpbiBvLmNvbnRlbnRzKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig1NSl9fX1kZWxldGUgdC5wYXJlbnQuY29udGVudHNbdC5uYW1lXTt0LnBhcmVudC50aW1lc3RhbXA9RGF0ZS5ub3coKTt0Lm5hbWU9bjtyLmNvbnRlbnRzW25dPXQ7ci50aW1lc3RhbXA9dC5wYXJlbnQudGltZXN0YW1wO3QucGFyZW50PXJ9LHVubGluazpmdW5jdGlvbiBlKHQscil7ZGVsZXRlIHQuY29udGVudHNbcl07dC50aW1lc3RhbXA9RGF0ZS5ub3coKX0scm1kaXI6ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPUR0Lmxvb2t1cE5vZGUodCxyKTtmb3IodmFyIG8gaW4gbi5jb250ZW50cyl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNTUpfWRlbGV0ZSB0LmNvbnRlbnRzW3JdO3QudGltZXN0YW1wPURhdGUubm93KCl9LHJlYWRkaXI6ZnVuY3Rpb24gZSh0KXt2YXIgcj1bIi4iLCIuLiJdO2Zvcih2YXIgbj0wLG89T2JqZWN0LmtleXModC5jb250ZW50cyk7bjxvLmxlbmd0aDtuKyspe3ZhciBpPW9bbl07ci5wdXNoKGkpfXJldHVybiByfSxzeW1saW5rOmZ1bmN0aW9uIGUodCxyLG4pe3ZhciBvPV90LmNyZWF0ZU5vZGUodCxyLDUxMXw0MDk2MCwwKTtvLmxpbms9bjtyZXR1cm4gb30scmVhZGxpbms6ZnVuY3Rpb24gZSh0KXtpZighRHQuaXNMaW5rKHQubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI4KX1yZXR1cm4gdC5saW5rfX0sc3RyZWFtX29wczp7cmVhZDpmdW5jdGlvbiBlKHQscixuLG8saSl7dmFyIGE9dC5ub2RlLmNvbnRlbnRzO2lmKGk+PXQubm9kZS51c2VkQnl0ZXMpcmV0dXJuIDA7dmFyIHM9TWF0aC5taW4odC5ub2RlLnVzZWRCeXRlcy1pLG8pO0Mocz49MCk7aWYocz44JiZhLnN1YmFycmF5KXtyLnNldChhLnN1YmFycmF5KGksaStzKSxuKX1lbHNle2Zvcih2YXIgdT0wO3U8czt1KyspcltuK3VdPWFbaSt1XX1yZXR1cm4gc30sd3JpdGU6ZnVuY3Rpb24gZSh0LHIsbixvLGksYSl7QyghKHIgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikpO2lmKHIuYnVmZmVyPT09Ti5idWZmZXIpe2E9ZmFsc2V9aWYoIW8pcmV0dXJuIDA7dmFyIHM9dC5ub2RlO3MudGltZXN0YW1wPURhdGUubm93KCk7aWYoci5zdWJhcnJheSYmKCFzLmNvbnRlbnRzfHxzLmNvbnRlbnRzLnN1YmFycmF5KSl7aWYoYSl7QyhpPT09MCwiY2FuT3duIG11c3QgaW1wbHkgbm8gd2VpcmQgcG9zaXRpb24gaW5zaWRlIHRoZSBmaWxlIik7cy5jb250ZW50cz1yLnN1YmFycmF5KG4sbitvKTtzLnVzZWRCeXRlcz1vO3JldHVybiBvfWVsc2UgaWYocy51c2VkQnl0ZXM9PT0wJiZpPT09MCl7cy5jb250ZW50cz1yLnNsaWNlKG4sbitvKTtzLnVzZWRCeXRlcz1vO3JldHVybiBvfWVsc2UgaWYoaStvPD1zLnVzZWRCeXRlcyl7cy5jb250ZW50cy5zZXQoci5zdWJhcnJheShuLG4rbyksaSk7cmV0dXJuIG99fV90LmV4cGFuZEZpbGVTdG9yYWdlKHMsaStvKTtpZihzLmNvbnRlbnRzLnN1YmFycmF5JiZyLnN1YmFycmF5KXtzLmNvbnRlbnRzLnNldChyLnN1YmFycmF5KG4sbitvKSxpKX1lbHNle2Zvcih2YXIgdT0wO3U8bzt1Kyspe3MuY29udGVudHNbaSt1XT1yW24rdV19fXMudXNlZEJ5dGVzPU1hdGgubWF4KHMudXNlZEJ5dGVzLGkrbyk7cmV0dXJuIG99LGxsc2VlazpmdW5jdGlvbiBlKHQscixuKXt2YXIgbz1yO2lmKG49PT0xKXtvKz10LnBvc2l0aW9ufWVsc2UgaWYobj09PTIpe2lmKER0LmlzRmlsZSh0Lm5vZGUubW9kZSkpe28rPXQubm9kZS51c2VkQnl0ZXN9fWlmKG88MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfXJldHVybiBvfSxhbGxvY2F0ZTpmdW5jdGlvbiBlKHQscixuKXtfdC5leHBhbmRGaWxlU3RvcmFnZSh0Lm5vZGUscituKTt0Lm5vZGUudXNlZEJ5dGVzPU1hdGgubWF4KHQubm9kZS51c2VkQnl0ZXMscituKX0sbW1hcDpmdW5jdGlvbiBlKHQscixuLG8saSl7aWYoIUR0LmlzRmlsZSh0Lm5vZGUubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQzKX12YXIgYTt2YXIgczt2YXIgdT10Lm5vZGUuY29udGVudHM7aWYoIShpJjIpJiZ1LmJ1ZmZlcj09PU4uYnVmZmVyKXtzPWZhbHNlO2E9dS5ieXRlT2Zmc2V0fWVsc2V7aWYobj4wfHxuK3I8dS5sZW5ndGgpe2lmKHUuc3ViYXJyYXkpe3U9dS5zdWJhcnJheShuLG4rcil9ZWxzZXt1PUFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKHUsbixuK3IpfX1zPXRydWU7YT13dChyKTtpZighYSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDgpfU4uc2V0KHUsYSl9cmV0dXJue3B0cjphLGFsbG9jYXRlZDpzfX0sbXN5bmM6ZnVuY3Rpb24gZSh0LHIsbixvLGkpe190LnN0cmVhbV9vcHMud3JpdGUodCxyLDAsbyxuLGZhbHNlKTtyZXR1cm4gMH19fTt2YXIgRXQ9ZnVuY3Rpb24gZSh0LHIsbixvKXt2YXIgaT0hbz9vZSgiYWwgIi5jb25jYXQodCkpOiIiO0UodCwoZnVuY3Rpb24oZSl7QyhlLCdMb2FkaW5nIGRhdGEgZmlsZSAiJy5jb25jYXQodCwnIiBmYWlsZWQgKG5vIGFycmF5QnVmZmVyKS4nKSk7cihuZXcgVWludDhBcnJheShlKSk7aWYoaSlhZShpKX0pLChmdW5jdGlvbihlKXtpZihuKXtuKCl9ZWxzZXt0aHJvdydMb2FkaW5nIGRhdGEgZmlsZSAiJy5jb25jYXQodCwnIiBmYWlsZWQuJyl9fSkpO2lmKGkpaWUoaSl9O3ZhciBidD1mdW5jdGlvbiBlKHQscixuLG8saSxhKXtEdC5jcmVhdGVEYXRhRmlsZSh0LHIsbixvLGksYSl9O3ZhciBTdD1TWyJwcmVsb2FkUGx1Z2lucyJdfHxbXTt2YXIga3Q9ZnVuY3Rpb24gZSh0LHIsbixvKXtpZih0eXBlb2YgQnJvd3NlciE9InVuZGVmaW5lZCIpQnJvd3Nlci5pbml0KCk7dmFyIGk9ZmFsc2U7U3QuZm9yRWFjaCgoZnVuY3Rpb24oZSl7aWYoaSlyZXR1cm47aWYoZVsiY2FuSGFuZGxlIl0ocikpe2VbImhhbmRsZSJdKHQscixuLG8pO2k9dHJ1ZX19KSk7cmV0dXJuIGl9O3ZhciBUdD1mdW5jdGlvbiBlKHQscixuLG8saSxhLHMsdSxjLGwpe3ZhciBmPXI/bHQucmVzb2x2ZShzdC5qb2luMih0LHIpKTp0O3ZhciBkPW9lKCJjcCAiLmNvbmNhdChmKSk7ZnVuY3Rpb24gdihlKXtmdW5jdGlvbiBuKGUpe2w9PT1udWxsfHxsPT09dm9pZCAwfHxsKCk7aWYoIXUpe2J0KHQscixlLG8saSxjKX1hPT09bnVsbHx8YT09PXZvaWQgMHx8YSgpO2FlKGQpfWlmKGt0KGUsZixuLChmdW5jdGlvbigpe3M9PT1udWxsfHxzPT09dm9pZCAwfHxzKCk7YWUoZCl9KSkpe3JldHVybn1uKGUpfWllKGQpO2lmKHR5cGVvZiBuPT0ic3RyaW5nIil7RXQobix2LHMpfWVsc2V7dihuKX19O3ZhciBNdD1mdW5jdGlvbiBlKHQpe3ZhciByPXtyOjAsInIrIjoyLHc6NTEyfDY0fDEsIncrIjo1MTJ8NjR8MixhOjEwMjR8NjR8MSwiYSsiOjEwMjR8NjR8Mn07dmFyIG49clt0XTtpZih0eXBlb2Ygbj09InVuZGVmaW5lZCIpe3Rocm93IG5ldyBFcnJvcigiVW5rbm93biBmaWxlIG9wZW4gbW9kZTogIi5jb25jYXQodCkpfXJldHVybiBufTt2YXIgQXQ9ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPTA7aWYodClufD0yOTJ8NzM7aWYocilufD0xNDY7cmV0dXJuIG59O3ZhciBGdD17MDoiU3VjY2VzcyIsMToiQXJnIGxpc3QgdG9vIGxvbmciLDI6IlBlcm1pc3Npb24gZGVuaWVkIiwzOiJBZGRyZXNzIGFscmVhZHkgaW4gdXNlIiw0OiJBZGRyZXNzIG5vdCBhdmFpbGFibGUiLDU6IkFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wgZmFtaWx5Iiw2OiJObyBtb3JlIHByb2Nlc3NlcyIsNzoiU29ja2V0IGFscmVhZHkgY29ubmVjdGVkIiw4OiJCYWQgZmlsZSBudW1iZXIiLDk6IlRyeWluZyB0byByZWFkIHVucmVhZGFibGUgbWVzc2FnZSIsMTA6Ik1vdW50IGRldmljZSBidXN5IiwxMToiT3BlcmF0aW9uIGNhbmNlbGVkIiwxMjoiTm8gY2hpbGRyZW4iLDEzOiJDb25uZWN0aW9uIGFib3J0ZWQiLDE0OiJDb25uZWN0aW9uIHJlZnVzZWQiLDE1OiJDb25uZWN0aW9uIHJlc2V0IGJ5IHBlZXIiLDE2OiJGaWxlIGxvY2tpbmcgZGVhZGxvY2sgZXJyb3IiLDE3OiJEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkIiwxODoiTWF0aCBhcmcgb3V0IG9mIGRvbWFpbiBvZiBmdW5jIiwxOToiUXVvdGEgZXhjZWVkZWQiLDIwOiJGaWxlIGV4aXN0cyIsMjE6IkJhZCBhZGRyZXNzIiwyMjoiRmlsZSB0b28gbGFyZ2UiLDIzOiJIb3N0IGlzIHVucmVhY2hhYmxlIiwyNDoiSWRlbnRpZmllciByZW1vdmVkIiwyNToiSWxsZWdhbCBieXRlIHNlcXVlbmNlIiwyNjoiQ29ubmVjdGlvbiBhbHJlYWR5IGluIHByb2dyZXNzIiwyNzoiSW50ZXJydXB0ZWQgc3lzdGVtIGNhbGwiLDI4OiJJbnZhbGlkIGFyZ3VtZW50IiwyOToiSS9PIGVycm9yIiwzMDoiU29ja2V0IGlzIGFscmVhZHkgY29ubmVjdGVkIiwzMToiSXMgYSBkaXJlY3RvcnkiLDMyOiJUb28gbWFueSBzeW1ib2xpYyBsaW5rcyIsMzM6IlRvbyBtYW55IG9wZW4gZmlsZXMiLDM0OiJUb28gbWFueSBsaW5rcyIsMzU6Ik1lc3NhZ2UgdG9vIGxvbmciLDM2OiJNdWx0aWhvcCBhdHRlbXB0ZWQiLDM3OiJGaWxlIG9yIHBhdGggbmFtZSB0b28gbG9uZyIsMzg6Ik5ldHdvcmsgaW50ZXJmYWNlIGlzIG5vdCBjb25maWd1cmVkIiwzOToiQ29ubmVjdGlvbiByZXNldCBieSBuZXR3b3JrIiw0MDoiTmV0d29yayBpcyB1bnJlYWNoYWJsZSIsNDE6IlRvbyBtYW55IG9wZW4gZmlsZXMgaW4gc3lzdGVtIiw0MjoiTm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZSIsNDM6Ik5vIHN1Y2ggZGV2aWNlIiw0NDoiTm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeSIsNDU6IkV4ZWMgZm9ybWF0IGVycm9yIiw0NjoiTm8gcmVjb3JkIGxvY2tzIGF2YWlsYWJsZSIsNDc6IlRoZSBsaW5rIGhhcyBiZWVuIHNldmVyZWQiLDQ4OiJOb3QgZW5vdWdoIGNvcmUiLDQ5OiJObyBtZXNzYWdlIG9mIGRlc2lyZWQgdHlwZSIsNTA6IlByb3RvY29sIG5vdCBhdmFpbGFibGUiLDUxOiJObyBzcGFjZSBsZWZ0IG9uIGRldmljZSIsNTI6IkZ1bmN0aW9uIG5vdCBpbXBsZW1lbnRlZCIsNTM6IlNvY2tldCBpcyBub3QgY29ubmVjdGVkIiw1NDoiTm90IGEgZGlyZWN0b3J5Iiw1NToiRGlyZWN0b3J5IG5vdCBlbXB0eSIsNTY6IlN0YXRlIG5vdCByZWNvdmVyYWJsZSIsNTc6IlNvY2tldCBvcGVyYXRpb24gb24gbm9uLXNvY2tldCIsNTk6Ik5vdCBhIHR5cGV3cml0ZXIiLDYwOiJObyBzdWNoIGRldmljZSBvciBhZGRyZXNzIiw2MToiVmFsdWUgdG9vIGxhcmdlIGZvciBkZWZpbmVkIGRhdGEgdHlwZSIsNjI6IlByZXZpb3VzIG93bmVyIGRpZWQiLDYzOiJOb3Qgc3VwZXItdXNlciIsNjQ6IkJyb2tlbiBwaXBlIiw2NToiUHJvdG9jb2wgZXJyb3IiLDY2OiJVbmtub3duIHByb3RvY29sIiw2NzoiUHJvdG9jb2wgd3JvbmcgdHlwZSBmb3Igc29ja2V0Iiw2ODoiTWF0aCByZXN1bHQgbm90IHJlcHJlc2VudGFibGUiLDY5OiJSZWFkIG9ubHkgZmlsZSBzeXN0ZW0iLDcwOiJJbGxlZ2FsIHNlZWsiLDcxOiJObyBzdWNoIHByb2Nlc3MiLDcyOiJTdGFsZSBmaWxlIGhhbmRsZSIsNzM6IkNvbm5lY3Rpb24gdGltZWQgb3V0Iiw3NDoiVGV4dCBmaWxlIGJ1c3kiLDc1OiJDcm9zcy1kZXZpY2UgbGluayIsMTAwOiJEZXZpY2Ugbm90IGEgc3RyZWFtIiwxMDE6IkJhZCBmb250IGZpbGUgZm10IiwxMDI6IkludmFsaWQgc2xvdCIsMTAzOiJJbnZhbGlkIHJlcXVlc3QgY29kZSIsMTA0OiJObyBhbm9kZSIsMTA1OiJCbG9jayBkZXZpY2UgcmVxdWlyZWQiLDEwNjoiQ2hhbm5lbCBudW1iZXIgb3V0IG9mIHJhbmdlIiwxMDc6IkxldmVsIDMgaGFsdGVkIiwxMDg6IkxldmVsIDMgcmVzZXQiLDEwOToiTGluayBudW1iZXIgb3V0IG9mIHJhbmdlIiwxMTA6IlByb3RvY29sIGRyaXZlciBub3QgYXR0YWNoZWQiLDExMToiTm8gQ1NJIHN0cnVjdHVyZSBhdmFpbGFibGUiLDExMjoiTGV2ZWwgMiBoYWx0ZWQiLDExMzoiSW52YWxpZCBleGNoYW5nZSIsMTE0OiJJbnZhbGlkIHJlcXVlc3QgZGVzY3JpcHRvciIsMTE1OiJFeGNoYW5nZSBmdWxsIiwxMTY6Ik5vIGRhdGEgKGZvciBubyBkZWxheSBpbykiLDExNzoiVGltZXIgZXhwaXJlZCIsMTE4OiJPdXQgb2Ygc3RyZWFtcyByZXNvdXJjZXMiLDExOToiTWFjaGluZSBpcyBub3Qgb24gdGhlIG5ldHdvcmsiLDEyMDoiUGFja2FnZSBub3QgaW5zdGFsbGVkIiwxMjE6IlRoZSBvYmplY3QgaXMgcmVtb3RlIiwxMjI6IkFkdmVydGlzZSBlcnJvciIsMTIzOiJTcm1vdW50IGVycm9yIiwxMjQ6IkNvbW11bmljYXRpb24gZXJyb3Igb24gc2VuZCIsMTI1OiJDcm9zcyBtb3VudCBwb2ludCAobm90IHJlYWxseSBlcnJvcikiLDEyNjoiR2l2ZW4gbG9nLiBuYW1lIG5vdCB1bmlxdWUiLDEyNzoiZi5kLiBpbnZhbGlkIGZvciB0aGlzIG9wZXJhdGlvbiIsMTI4OiJSZW1vdGUgYWRkcmVzcyBjaGFuZ2VkIiwxMjk6IkNhbiAgIGFjY2VzcyBhIG5lZWRlZCBzaGFyZWQgbGliIiwxMzA6IkFjY2Vzc2luZyBhIGNvcnJ1cHRlZCBzaGFyZWQgbGliIiwxMzE6Ii5saWIgc2VjdGlvbiBpbiBhLm91dCBjb3JydXB0ZWQiLDEzMjoiQXR0ZW1wdGluZyB0byBsaW5rIGluIHRvbyBtYW55IGxpYnMiLDEzMzoiQXR0ZW1wdGluZyB0byBleGVjIGEgc2hhcmVkIGxpYnJhcnkiLDEzNToiU3RyZWFtcyBwaXBlIGVycm9yIiwxMzY6IlRvbyBtYW55IHVzZXJzIiwxMzc6IlNvY2tldCB0eXBlIG5vdCBzdXBwb3J0ZWQiLDEzODoiTm90IHN1cHBvcnRlZCIsMTM5OiJQcm90b2NvbCBmYW1pbHkgbm90IHN1cHBvcnRlZCIsMTQwOiJDYW4ndCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93biIsMTQxOiJUb28gbWFueSByZWZlcmVuY2VzIiwxNDI6Ikhvc3QgaXMgZG93biIsMTQ4OiJObyBtZWRpdW0gKGluIHRhcGUgZHJpdmUpIiwxNTY6IkxldmVsIDIgbm90IHN5bmNocm9uaXplZCJ9O3ZhciBPdD17RVBFUk06NjMsRU5PRU5UOjQ0LEVTUkNIOjcxLEVJTlRSOjI3LEVJTzoyOSxFTlhJTzo2MCxFMkJJRzoxLEVOT0VYRUM6NDUsRUJBREY6OCxFQ0hJTEQ6MTIsRUFHQUlOOjYsRVdPVUxEQkxPQ0s6NixFTk9NRU06NDgsRUFDQ0VTOjIsRUZBVUxUOjIxLEVOT1RCTEs6MTA1LEVCVVNZOjEwLEVFWElTVDoyMCxFWERFVjo3NSxFTk9ERVY6NDMsRU5PVERJUjo1NCxFSVNESVI6MzEsRUlOVkFMOjI4LEVORklMRTo0MSxFTUZJTEU6MzMsRU5PVFRZOjU5LEVUWFRCU1k6NzQsRUZCSUc6MjIsRU5PU1BDOjUxLEVTUElQRTo3MCxFUk9GUzo2OSxFTUxJTks6MzQsRVBJUEU6NjQsRURPTToxOCxFUkFOR0U6NjgsRU5PTVNHOjQ5LEVJRFJNOjI0LEVDSFJORzoxMDYsRUwyTlNZTkM6MTU2LEVMM0hMVDoxMDcsRUwzUlNUOjEwOCxFTE5STkc6MTA5LEVVTkFUQ0g6MTEwLEVOT0NTSToxMTEsRUwySExUOjExMixFREVBRExLOjE2LEVOT0xDSzo0NixFQkFERToxMTMsRUJBRFI6MTE0LEVYRlVMTDoxMTUsRU5PQU5POjEwNCxFQkFEUlFDOjEwMyxFQkFEU0xUOjEwMixFREVBRExPQ0s6MTYsRUJGT05UOjEwMSxFTk9TVFI6MTAwLEVOT0RBVEE6MTE2LEVUSU1FOjExNyxFTk9TUjoxMTgsRU5PTkVUOjExOSxFTk9QS0c6MTIwLEVSRU1PVEU6MTIxLEVOT0xJTks6NDcsRUFEVjoxMjIsRVNSTU5UOjEyMyxFQ09NTToxMjQsRVBST1RPOjY1LEVNVUxUSUhPUDozNixFRE9URE9UOjEyNSxFQkFETVNHOjksRU5PVFVOSVE6MTI2LEVCQURGRDoxMjcsRVJFTUNIRzoxMjgsRUxJQkFDQzoxMjksRUxJQkJBRDoxMzAsRUxJQlNDTjoxMzEsRUxJQk1BWDoxMzIsRUxJQkVYRUM6MTMzLEVOT1NZUzo1MixFTk9URU1QVFk6NTUsRU5BTUVUT09MT05HOjM3LEVMT09QOjMyLEVPUE5PVFNVUFA6MTM4LEVQRk5PU1VQUE9SVDoxMzksRUNPTk5SRVNFVDoxNSxFTk9CVUZTOjQyLEVBRk5PU1VQUE9SVDo1LEVQUk9UT1RZUEU6NjcsRU5PVFNPQ0s6NTcsRU5PUFJPVE9PUFQ6NTAsRVNIVVRET1dOOjE0MCxFQ09OTlJFRlVTRUQ6MTQsRUFERFJJTlVTRTozLEVDT05OQUJPUlRFRDoxMyxFTkVUVU5SRUFDSDo0MCxFTkVURE9XTjozOCxFVElNRURPVVQ6NzMsRUhPU1RET1dOOjE0MixFSE9TVFVOUkVBQ0g6MjMsRUlOUFJPR1JFU1M6MjYsRUFMUkVBRFk6NyxFREVTVEFERFJSRVE6MTcsRU1TR1NJWkU6MzUsRVBST1RPTk9TVVBQT1JUOjY2LEVTT0NLVE5PU1VQUE9SVDoxMzcsRUFERFJOT1RBVkFJTDo0LEVORVRSRVNFVDozOSxFSVNDT05OOjMwLEVOT1RDT05OOjUzLEVUT09NQU5ZUkVGUzoxNDEsRVVTRVJTOjEzNixFRFFVT1Q6MTksRVNUQUxFOjcyLEVOT1RTVVA6MTM4LEVOT01FRElVTToxNDgsRUlMU0VROjI1LEVPVkVSRkxPVzo2MSxFQ0FOQ0VMRUQ6MTEsRU5PVFJFQ09WRVJBQkxFOjU2LEVPV05FUkRFQUQ6NjIsRVNUUlBJUEU6MTM1fTt2YXIgRHQ9e3Jvb3Q6bnVsbCxtb3VudHM6W10sZGV2aWNlczp7fSxzdHJlYW1zOltdLG5leHRJbm9kZToxLG5hbWVUYWJsZTpudWxsLGN1cnJlbnRQYXRoOiIvIixpbml0aWFsaXplZDpmYWxzZSxpZ25vcmVQZXJtaXNzaW9uczp0cnVlLEVycm5vRXJyb3I6ZnVuY3Rpb24oZSl7ZnVuY3Rpb24gdChlKXt2YXIgcjtmKHRoaXMsdCk7cj1kKHRoaXMsdCxbRnRbZV1dKTtyLm5hbWU9IkVycm5vRXJyb3IiO3IuZXJybm89ZTtmb3IodmFyIG4gaW4gT3Qpe2lmKE90W25dPT09ZSl7ci5jb2RlPW47YnJlYWt9fXJldHVybiByfXAodCxlKTtyZXR1cm4gdSh0KX0oaChFcnJvcikpLGdlbmVyaWNFcnJvcnM6e30sZmlsZXN5c3RlbXM6bnVsbCxzeW5jRlNSZXF1ZXN0czowLEZTU3RyZWFtOmZ1bmN0aW9uKCl7ZnVuY3Rpb24gZSgpe2YodGhpcyxlKTt0aGlzLnNoYXJlZD17fX1yZXR1cm4gdShlLFt7a2V5OiJvYmplY3QiLGdldDpmdW5jdGlvbiBlKCl7cmV0dXJuIHRoaXMubm9kZX0sc2V0OmZ1bmN0aW9uIGUodCl7dGhpcy5ub2RlPXR9fSx7a2V5OiJpc1JlYWQiLGdldDpmdW5jdGlvbiBlKCl7cmV0dXJuKHRoaXMuZmxhZ3MmMjA5NzE1NSkhPT0xfX0se2tleToiaXNXcml0ZSIsZ2V0OmZ1bmN0aW9uIGUoKXtyZXR1cm4odGhpcy5mbGFncyYyMDk3MTU1KSE9PTB9fSx7a2V5OiJpc0FwcGVuZCIsZ2V0OmZ1bmN0aW9uIGUoKXtyZXR1cm4gdGhpcy5mbGFncyYxMDI0fX0se2tleToiZmxhZ3MiLGdldDpmdW5jdGlvbiBlKCl7cmV0dXJuIHRoaXMuc2hhcmVkLmZsYWdzfSxzZXQ6ZnVuY3Rpb24gZSh0KXt0aGlzLnNoYXJlZC5mbGFncz10fX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbiBlKCl7cmV0dXJuIHRoaXMuc2hhcmVkLnBvc2l0aW9ufSxzZXQ6ZnVuY3Rpb24gZSh0KXt0aGlzLnNoYXJlZC5wb3NpdGlvbj10fX1dKX0oKSxGU05vZGU6ZnVuY3Rpb24oKXtmdW5jdGlvbiBlKHQscixuLG8pe2YodGhpcyxlKTtpZighdCl7dD10aGlzfXRoaXMucGFyZW50PXQ7dGhpcy5tb3VudD10Lm1vdW50O3RoaXMubW91bnRlZD1udWxsO3RoaXMuaWQ9RHQubmV4dElub2RlKys7dGhpcy5uYW1lPXI7dGhpcy5tb2RlPW47dGhpcy5ub2RlX29wcz17fTt0aGlzLnN0cmVhbV9vcHM9e307dGhpcy5yZGV2PW87dGhpcy5yZWFkTW9kZT0yOTJ8NzM7dGhpcy53cml0ZU1vZGU9MTQ2fXJldHVybiB1KGUsW3trZXk6InJlYWQiLGdldDpmdW5jdGlvbiBlKCl7cmV0dXJuKHRoaXMubW9kZSZ0aGlzLnJlYWRNb2RlKT09PXRoaXMucmVhZE1vZGV9LHNldDpmdW5jdGlvbiBlKHQpe3Q/dGhpcy5tb2RlfD10aGlzLnJlYWRNb2RlOnRoaXMubW9kZSY9fnRoaXMucmVhZE1vZGV9fSx7a2V5OiJ3cml0ZSIsZ2V0OmZ1bmN0aW9uIGUoKXtyZXR1cm4odGhpcy5tb2RlJnRoaXMud3JpdGVNb2RlKT09PXRoaXMud3JpdGVNb2RlfSxzZXQ6ZnVuY3Rpb24gZSh0KXt0P3RoaXMubW9kZXw9dGhpcy53cml0ZU1vZGU6dGhpcy5tb2RlJj1+dGhpcy53cml0ZU1vZGV9fSx7a2V5OiJpc0ZvbGRlciIsZ2V0OmZ1bmN0aW9uIGUoKXtyZXR1cm4gRHQuaXNEaXIodGhpcy5tb2RlKX19LHtrZXk6ImlzRGV2aWNlIixnZXQ6ZnVuY3Rpb24gZSgpe3JldHVybiBEdC5pc0NocmRldih0aGlzLm1vZGUpfX1dKX0oKSxsb29rdXBQYXRoOmZ1bmN0aW9uIGUodCl7dmFyIHI9YXJndW1lbnRzLmxlbmd0aD4xJiZhcmd1bWVudHNbMV0hPT11bmRlZmluZWQ/YXJndW1lbnRzWzFdOnt9O3Q9bHQucmVzb2x2ZSh0KTtpZighdClyZXR1cm57cGF0aDoiIixub2RlOm51bGx9O3ZhciBuPXtmb2xsb3dfbW91bnQ6dHJ1ZSxyZWN1cnNlX2NvdW50OjB9O3I9T2JqZWN0LmFzc2lnbihuLHIpO2lmKHIucmVjdXJzZV9jb3VudD44KXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigzMil9dmFyIG89dC5zcGxpdCgiLyIpLmZpbHRlcigoZnVuY3Rpb24oZSl7cmV0dXJuISFlfSkpO3ZhciBpPUR0LnJvb3Q7dmFyIGE9Ii8iO2Zvcih2YXIgcz0wO3M8by5sZW5ndGg7cysrKXt2YXIgdT1zPT09by5sZW5ndGgtMTtpZih1JiZyLnBhcmVudCl7YnJlYWt9aT1EdC5sb29rdXBOb2RlKGksb1tzXSk7YT1zdC5qb2luMihhLG9bc10pO2lmKER0LmlzTW91bnRwb2ludChpKSl7aWYoIXV8fHUmJnIuZm9sbG93X21vdW50KXtpPWkubW91bnRlZC5yb290fX1pZighdXx8ci5mb2xsb3cpe3ZhciBjPTA7d2hpbGUoRHQuaXNMaW5rKGkubW9kZSkpe3ZhciBsPUR0LnJlYWRsaW5rKGEpO2E9bHQucmVzb2x2ZShzdC5kaXJuYW1lKGEpLGwpO3ZhciBmPUR0Lmxvb2t1cFBhdGgoYSx7cmVjdXJzZV9jb3VudDpyLnJlY3Vyc2VfY291bnQrMX0pO2k9Zi5ub2RlO2lmKGMrKz40MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMzIpfX19fXJldHVybntwYXRoOmEsbm9kZTppfX0sZ2V0UGF0aDpmdW5jdGlvbiBlKHQpe3ZhciByO3doaWxlKHRydWUpe2lmKER0LmlzUm9vdCh0KSl7dmFyIG49dC5tb3VudC5tb3VudHBvaW50O2lmKCFyKXJldHVybiBuO3JldHVybiBuW24ubGVuZ3RoLTFdIT09Ii8iPyIiLmNvbmNhdChuLCIvIikuY29uY2F0KHIpOm4rcn1yPXI/IiIuY29uY2F0KHQubmFtZSwiLyIpLmNvbmNhdChyKTp0Lm5hbWU7dD10LnBhcmVudH19LGhhc2hOYW1lOmZ1bmN0aW9uIGUodCxyKXt2YXIgbj0wO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXtuPShuPDw1KS1uK3IuY2hhckNvZGVBdChvKXwwfXJldHVybih0K24+Pj4wKSVEdC5uYW1lVGFibGUubGVuZ3RofSxoYXNoQWRkTm9kZTpmdW5jdGlvbiBlKHQpe3ZhciByPUR0Lmhhc2hOYW1lKHQucGFyZW50LmlkLHQubmFtZSk7dC5uYW1lX25leHQ9RHQubmFtZVRhYmxlW3JdO0R0Lm5hbWVUYWJsZVtyXT10fSxoYXNoUmVtb3ZlTm9kZTpmdW5jdGlvbiBlKHQpe3ZhciByPUR0Lmhhc2hOYW1lKHQucGFyZW50LmlkLHQubmFtZSk7aWYoRHQubmFtZVRhYmxlW3JdPT09dCl7RHQubmFtZVRhYmxlW3JdPXQubmFtZV9uZXh0fWVsc2V7dmFyIG49RHQubmFtZVRhYmxlW3JdO3doaWxlKG4pe2lmKG4ubmFtZV9uZXh0PT09dCl7bi5uYW1lX25leHQ9dC5uYW1lX25leHQ7YnJlYWt9bj1uLm5hbWVfbmV4dH19fSxsb29rdXBOb2RlOmZ1bmN0aW9uIGUodCxyKXt2YXIgbj1EdC5tYXlMb29rdXAodCk7aWYobil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3Iobil9dmFyIG89RHQuaGFzaE5hbWUodC5pZCxyKTtmb3IodmFyIGk9RHQubmFtZVRhYmxlW29dO2k7aT1pLm5hbWVfbmV4dCl7dmFyIGE9aS5uYW1lO2lmKGkucGFyZW50LmlkPT09dC5pZCYmYT09PXIpe3JldHVybiBpfX1yZXR1cm4gRHQubG9va3VwKHQscil9LGNyZWF0ZU5vZGU6ZnVuY3Rpb24gZSh0LHIsbixvKXtDKGIodCk9PSJvYmplY3QiKTt2YXIgaT1uZXcgRHQuRlNOb2RlKHQscixuLG8pO0R0Lmhhc2hBZGROb2RlKGkpO3JldHVybiBpfSxkZXN0cm95Tm9kZTpmdW5jdGlvbiBlKHQpe0R0Lmhhc2hSZW1vdmVOb2RlKHQpfSxpc1Jvb3Q6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdD09PXQucGFyZW50fSxpc01vdW50cG9pbnQ6ZnVuY3Rpb24gZSh0KXtyZXR1cm4hIXQubW91bnRlZH0saXNGaWxlOmZ1bmN0aW9uIGUodCl7cmV0dXJuKHQmNjE0NDApPT09MzI3Njh9LGlzRGlyOmZ1bmN0aW9uIGUodCl7cmV0dXJuKHQmNjE0NDApPT09MTYzODR9LGlzTGluazpmdW5jdGlvbiBlKHQpe3JldHVybih0JjYxNDQwKT09PTQwOTYwfSxpc0NocmRldjpmdW5jdGlvbiBlKHQpe3JldHVybih0JjYxNDQwKT09PTgxOTJ9LGlzQmxrZGV2OmZ1bmN0aW9uIGUodCl7cmV0dXJuKHQmNjE0NDApPT09MjQ1NzZ9LGlzRklGTzpmdW5jdGlvbiBlKHQpe3JldHVybih0JjYxNDQwKT09PTQwOTZ9LGlzU29ja2V0OmZ1bmN0aW9uIGUodCl7cmV0dXJuKHQmNDkxNTIpPT09NDkxNTJ9LGZsYWdzVG9QZXJtaXNzaW9uU3RyaW5nOmZ1bmN0aW9uIGUodCl7dmFyIHI9WyJyIiwidyIsInJ3Il1bdCYzXTtpZih0JjUxMil7cis9IncifXJldHVybiByfSxub2RlUGVybWlzc2lvbnM6ZnVuY3Rpb24gZSh0LHIpe2lmKER0Lmlnbm9yZVBlcm1pc3Npb25zKXtyZXR1cm4gMH1pZihyLmluY2x1ZGVzKCJyIikmJiEodC5tb2RlJjI5Mikpe3JldHVybiAyfWVsc2UgaWYoci5pbmNsdWRlcygidyIpJiYhKHQubW9kZSYxNDYpKXtyZXR1cm4gMn1lbHNlIGlmKHIuaW5jbHVkZXMoIngiKSYmISh0Lm1vZGUmNzMpKXtyZXR1cm4gMn1yZXR1cm4gMH0sbWF5TG9va3VwOmZ1bmN0aW9uIGUodCl7aWYoIUR0LmlzRGlyKHQubW9kZSkpcmV0dXJuIDU0O3ZhciByPUR0Lm5vZGVQZXJtaXNzaW9ucyh0LCJ4Iik7aWYocilyZXR1cm4gcjtpZighdC5ub2RlX29wcy5sb29rdXApcmV0dXJuIDI7cmV0dXJuIDB9LG1heUNyZWF0ZTpmdW5jdGlvbiBlKHQscil7dHJ5e3ZhciBuPUR0Lmxvb2t1cE5vZGUodCxyKTtyZXR1cm4gMjB9Y2F0Y2goZSl7fXJldHVybiBEdC5ub2RlUGVybWlzc2lvbnModCwid3giKX0sbWF5RGVsZXRlOmZ1bmN0aW9uIGUodCxyLG4pe3ZhciBvO3RyeXtvPUR0Lmxvb2t1cE5vZGUodCxyKX1jYXRjaChlKXtyZXR1cm4gZS5lcnJub312YXIgaT1EdC5ub2RlUGVybWlzc2lvbnModCwid3giKTtpZihpKXtyZXR1cm4gaX1pZihuKXtpZighRHQuaXNEaXIoby5tb2RlKSl7cmV0dXJuIDU0fWlmKER0LmlzUm9vdChvKXx8RHQuZ2V0UGF0aChvKT09PUR0LmN3ZCgpKXtyZXR1cm4gMTB9fWVsc2V7aWYoRHQuaXNEaXIoby5tb2RlKSl7cmV0dXJuIDMxfX1yZXR1cm4gMH0sbWF5T3BlbjpmdW5jdGlvbiBlKHQscil7aWYoIXQpe3JldHVybiA0NH1pZihEdC5pc0xpbmsodC5tb2RlKSl7cmV0dXJuIDMyfWVsc2UgaWYoRHQuaXNEaXIodC5tb2RlKSl7aWYoRHQuZmxhZ3NUb1Blcm1pc3Npb25TdHJpbmcocikhPT0iciJ8fHImNTEyKXtyZXR1cm4gMzF9fXJldHVybiBEdC5ub2RlUGVybWlzc2lvbnModCxEdC5mbGFnc1RvUGVybWlzc2lvblN0cmluZyhyKSl9LE1BWF9PUEVOX0ZEUzo0MDk2LG5leHRmZDpmdW5jdGlvbiBlKCl7Zm9yKHZhciB0PTA7dDw9RHQuTUFYX09QRU5fRkRTO3QrKyl7aWYoIUR0LnN0cmVhbXNbdF0pe3JldHVybiB0fX10aHJvdyBuZXcgRHQuRXJybm9FcnJvcigzMyl9LGdldFN0cmVhbUNoZWNrZWQ6ZnVuY3Rpb24gZSh0KXt2YXIgcj1EdC5nZXRTdHJlYW0odCk7aWYoIXIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDgpfXJldHVybiByfSxnZXRTdHJlYW06ZnVuY3Rpb24gZSh0KXtyZXR1cm4gRHQuc3RyZWFtc1t0XX0sY3JlYXRlU3RyZWFtOmZ1bmN0aW9uIGUodCl7dmFyIHI9YXJndW1lbnRzLmxlbmd0aD4xJiZhcmd1bWVudHNbMV0hPT11bmRlZmluZWQ/YXJndW1lbnRzWzFdOi0xO3Q9T2JqZWN0LmFzc2lnbihuZXcgRHQuRlNTdHJlYW0sdCk7aWYocj09LTEpe3I9RHQubmV4dGZkKCl9dC5mZD1yO0R0LnN0cmVhbXNbcl09dDtyZXR1cm4gdH0sY2xvc2VTdHJlYW06ZnVuY3Rpb24gZSh0KXtEdC5zdHJlYW1zW3RdPW51bGx9LGR1cFN0cmVhbTpmdW5jdGlvbiBlKHQpe3ZhciByLG47dmFyIG89YXJndW1lbnRzLmxlbmd0aD4xJiZhcmd1bWVudHNbMV0hPT11bmRlZmluZWQ/YXJndW1lbnRzWzFdOi0xO3ZhciBpPUR0LmNyZWF0ZVN0cmVhbSh0LG8pOyhyPWkuc3RyZWFtX29wcyk9PT1udWxsfHxyPT09dm9pZCAwfHwobj1yLmR1cCk9PT1udWxsfHxuPT09dm9pZCAwfHxuLmNhbGwocixpKTtyZXR1cm4gaX0sY2hyZGV2X3N0cmVhbV9vcHM6e29wZW46ZnVuY3Rpb24gZSh0KXt2YXIgcixuO3ZhciBvPUR0LmdldERldmljZSh0Lm5vZGUucmRldik7dC5zdHJlYW1fb3BzPW8uc3RyZWFtX29wczsocj0obj10LnN0cmVhbV9vcHMpLm9wZW4pPT09bnVsbHx8cj09PXZvaWQgMHx8ci5jYWxsKG4sdCl9LGxsc2VlazpmdW5jdGlvbiBlKCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNzApfX0sbWFqb3I6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdD4+OH0sbWlub3I6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdCYyNTV9LG1ha2VkZXY6ZnVuY3Rpb24gZSh0LHIpe3JldHVybiB0PDw4fHJ9LHJlZ2lzdGVyRGV2aWNlOmZ1bmN0aW9uIGUodCxyKXtEdC5kZXZpY2VzW3RdPXtzdHJlYW1fb3BzOnJ9fSxnZXREZXZpY2U6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gRHQuZGV2aWNlc1t0XX0sZ2V0TW91bnRzOmZ1bmN0aW9uIGUocil7dmFyIG49W107dmFyIG89W3JdO3doaWxlKG8ubGVuZ3RoKXt2YXIgaT1vLnBvcCgpO24ucHVzaChpKTtvLnB1c2guYXBwbHkobyx0KGkubW91bnRzKSl9cmV0dXJuIG59LHN5bmNmczpmdW5jdGlvbiBlKHQscil7aWYodHlwZW9mIHQ9PSJmdW5jdGlvbiIpe3I9dDt0PWZhbHNlfUR0LnN5bmNGU1JlcXVlc3RzKys7aWYoRHQuc3luY0ZTUmVxdWVzdHM+MSl7TSgid2FybmluZzogIi5jb25jYXQoRHQuc3luY0ZTUmVxdWVzdHMsIiBGUy5zeW5jZnMgb3BlcmF0aW9ucyBpbiBmbGlnaHQgYXQgb25jZSwgcHJvYmFibHkganVzdCBkb2luZyBleHRyYSB3b3JrIikpfXZhciBuPUR0LmdldE1vdW50cyhEdC5yb290Lm1vdW50KTt2YXIgbz0wO2Z1bmN0aW9uIGkoZSl7QyhEdC5zeW5jRlNSZXF1ZXN0cz4wKTtEdC5zeW5jRlNSZXF1ZXN0cy0tO3JldHVybiByKGUpfWZ1bmN0aW9uIGEoZSl7aWYoZSl7aWYoIWEuZXJyb3JlZCl7YS5lcnJvcmVkPXRydWU7cmV0dXJuIGkoZSl9cmV0dXJufWlmKCsrbz49bi5sZW5ndGgpe2kobnVsbCl9fW4uZm9yRWFjaCgoZnVuY3Rpb24oZSl7aWYoIWUudHlwZS5zeW5jZnMpe3JldHVybiBhKG51bGwpfWUudHlwZS5zeW5jZnMoZSx0LGEpfSkpfSxtb3VudDpmdW5jdGlvbiBlKHQscixuKXtpZih0eXBlb2YgdD09InN0cmluZyIpe3Rocm93IHR9dmFyIG89bj09PSIvIjt2YXIgaT0hbjt2YXIgYTtpZihvJiZEdC5yb290KXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigxMCl9ZWxzZSBpZighbyYmIWkpe3ZhciBzPUR0Lmxvb2t1cFBhdGgobix7Zm9sbG93X21vdW50OmZhbHNlfSk7bj1zLnBhdGg7YT1zLm5vZGU7aWYoRHQuaXNNb3VudHBvaW50KGEpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigxMCl9aWYoIUR0LmlzRGlyKGEubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU0KX19dmFyIGU9e3R5cGU6dCxvcHRzOnIsbW91bnRwb2ludDpuLG1vdW50czpbXX07dmFyIHU9dC5tb3VudChlKTt1Lm1vdW50PWU7ZS5yb290PXU7aWYobyl7RHQucm9vdD11fWVsc2UgaWYoYSl7YS5tb3VudGVkPWU7aWYoYS5tb3VudCl7YS5tb3VudC5tb3VudHMucHVzaChlKX19cmV0dXJuIHV9LHVubW91bnQ6ZnVuY3Rpb24gZSh0KXt2YXIgcj1EdC5sb29rdXBQYXRoKHQse2ZvbGxvd19tb3VudDpmYWxzZX0pO2lmKCFEdC5pc01vdW50cG9pbnQoci5ub2RlKSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfXZhciBuPXIubm9kZTt2YXIgbz1uLm1vdW50ZWQ7dmFyIGk9RHQuZ2V0TW91bnRzKG8pO09iamVjdC5rZXlzKER0Lm5hbWVUYWJsZSkuZm9yRWFjaCgoZnVuY3Rpb24oZSl7dmFyIHQ9RHQubmFtZVRhYmxlW2VdO3doaWxlKHQpe3ZhciByPXQubmFtZV9uZXh0O2lmKGkuaW5jbHVkZXModC5tb3VudCkpe0R0LmRlc3Ryb3lOb2RlKHQpfXQ9cn19KSk7bi5tb3VudGVkPW51bGw7dmFyIGE9bi5tb3VudC5tb3VudHMuaW5kZXhPZihvKTtDKGEhPT0tMSk7bi5tb3VudC5tb3VudHMuc3BsaWNlKGEsMSl9LGxvb2t1cDpmdW5jdGlvbiBlKHQscil7cmV0dXJuIHQubm9kZV9vcHMubG9va3VwKHQscil9LG1rbm9kOmZ1bmN0aW9uIGUodCxyLG4pe3ZhciBvPUR0Lmxvb2t1cFBhdGgodCx7cGFyZW50OnRydWV9KTt2YXIgaT1vLm5vZGU7dmFyIGE9c3QuYmFzZW5hbWUodCk7aWYoIWF8fGE9PT0iLiJ8fGE9PT0iLi4iKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigyOCl9dmFyIHM9RHQubWF5Q3JlYXRlKGksYSk7aWYocyl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3Iocyl9aWYoIWkubm9kZV9vcHMubWtub2Qpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDYzKX1yZXR1cm4gaS5ub2RlX29wcy5ta25vZChpLGEscixuKX0sY3JlYXRlOmZ1bmN0aW9uIGUodCxyKXtyPXIhPT11bmRlZmluZWQ/cjo0Mzg7ciY9NDA5NTtyfD0zMjc2ODtyZXR1cm4gRHQubWtub2QodCxyLDApfSxta2RpcjpmdW5jdGlvbiBlKHQscil7cj1yIT09dW5kZWZpbmVkP3I6NTExO3ImPTUxMXw1MTI7cnw9MTYzODQ7cmV0dXJuIER0Lm1rbm9kKHQsciwwKX0sbWtkaXJUcmVlOmZ1bmN0aW9uIGUodCxyKXt2YXIgbj10LnNwbGl0KCIvIik7dmFyIG89IiI7Zm9yKHZhciBpPTA7aTxuLmxlbmd0aDsrK2kpe2lmKCFuW2ldKWNvbnRpbnVlO28rPSIvIituW2ldO3RyeXtEdC5ta2RpcihvLHIpfWNhdGNoKGUpe2lmKGUuZXJybm8hPTIwKXRocm93IGV9fX0sbWtkZXY6ZnVuY3Rpb24gZSh0LHIsbil7aWYodHlwZW9mIG49PSJ1bmRlZmluZWQiKXtuPXI7cj00Mzh9cnw9ODE5MjtyZXR1cm4gRHQubWtub2QodCxyLG4pfSxzeW1saW5rOmZ1bmN0aW9uIGUodCxyKXtpZighbHQucmVzb2x2ZSh0KSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDQpfXZhciBuPUR0Lmxvb2t1cFBhdGgocix7cGFyZW50OnRydWV9KTt2YXIgbz1uLm5vZGU7aWYoIW8pe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQ0KX12YXIgaT1zdC5iYXNlbmFtZShyKTt2YXIgYT1EdC5tYXlDcmVhdGUobyxpKTtpZihhKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcihhKX1pZighby5ub2RlX29wcy5zeW1saW5rKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig2Myl9cmV0dXJuIG8ubm9kZV9vcHMuc3ltbGluayhvLGksdCl9LHJlbmFtZTpmdW5jdGlvbiBlKHQscil7dmFyIG49c3QuZGlybmFtZSh0KTt2YXIgbz1zdC5kaXJuYW1lKHIpO3ZhciBpPXN0LmJhc2VuYW1lKHQpO3ZhciBhPXN0LmJhc2VuYW1lKHIpO3ZhciBzLHUsYztzPUR0Lmxvb2t1cFBhdGgodCx7cGFyZW50OnRydWV9KTt1PXMubm9kZTtzPUR0Lmxvb2t1cFBhdGgocix7cGFyZW50OnRydWV9KTtjPXMubm9kZTtpZighdXx8IWMpdGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDQpO2lmKHUubW91bnQhPT1jLm1vdW50KXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig3NSl9dmFyIGw9RHQubG9va3VwTm9kZSh1LGkpO3ZhciBmPWx0LnJlbGF0aXZlKHQsbyk7aWYoZi5jaGFyQXQoMCkhPT0iLiIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI4KX1mPWx0LnJlbGF0aXZlKHIsbik7aWYoZi5jaGFyQXQoMCkhPT0iLiIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU1KX12YXIgZDt0cnl7ZD1EdC5sb29rdXBOb2RlKGMsYSl9Y2F0Y2goZSl7fWlmKGw9PT1kKXtyZXR1cm59dmFyIHY9RHQuaXNEaXIobC5tb2RlKTt2YXIgbT1EdC5tYXlEZWxldGUodSxpLHYpO2lmKG0pe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKG0pfW09ZD9EdC5tYXlEZWxldGUoYyxhLHYpOkR0Lm1heUNyZWF0ZShjLGEpO2lmKG0pe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKG0pfWlmKCF1Lm5vZGVfb3BzLnJlbmFtZSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNjMpfWlmKER0LmlzTW91bnRwb2ludChsKXx8ZCYmRHQuaXNNb3VudHBvaW50KGQpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigxMCl9aWYoYyE9PXUpe209RHQubm9kZVBlcm1pc3Npb25zKHUsInciKTtpZihtKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcihtKX19RHQuaGFzaFJlbW92ZU5vZGUobCk7dHJ5e3Uubm9kZV9vcHMucmVuYW1lKGwsYyxhKX1jYXRjaChlKXt0aHJvdyBlfWZpbmFsbHl7RHQuaGFzaEFkZE5vZGUobCl9fSxybWRpcjpmdW5jdGlvbiBlKHQpe3ZhciByPUR0Lmxvb2t1cFBhdGgodCx7cGFyZW50OnRydWV9KTt2YXIgbj1yLm5vZGU7dmFyIG89c3QuYmFzZW5hbWUodCk7dmFyIGk9RHQubG9va3VwTm9kZShuLG8pO3ZhciBhPUR0Lm1heURlbGV0ZShuLG8sdHJ1ZSk7aWYoYSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoYSl9aWYoIW4ubm9kZV9vcHMucm1kaXIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDYzKX1pZihEdC5pc01vdW50cG9pbnQoaSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDEwKX1uLm5vZGVfb3BzLnJtZGlyKG4sbyk7RHQuZGVzdHJveU5vZGUoaSl9LHJlYWRkaXI6ZnVuY3Rpb24gZSh0KXt2YXIgcj1EdC5sb29rdXBQYXRoKHQse2ZvbGxvdzp0cnVlfSk7dmFyIG49ci5ub2RlO2lmKCFuLm5vZGVfb3BzLnJlYWRkaXIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU0KX1yZXR1cm4gbi5ub2RlX29wcy5yZWFkZGlyKG4pfSx1bmxpbms6ZnVuY3Rpb24gZSh0KXt2YXIgcj1EdC5sb29rdXBQYXRoKHQse3BhcmVudDp0cnVlfSk7dmFyIG49ci5ub2RlO2lmKCFuKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig0NCl9dmFyIG89c3QuYmFzZW5hbWUodCk7dmFyIGk9RHQubG9va3VwTm9kZShuLG8pO3ZhciBhPUR0Lm1heURlbGV0ZShuLG8sZmFsc2UpO2lmKGEpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKGEpfWlmKCFuLm5vZGVfb3BzLnVubGluayl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNjMpfWlmKER0LmlzTW91bnRwb2ludChpKSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMTApfW4ubm9kZV9vcHMudW5saW5rKG4sbyk7RHQuZGVzdHJveU5vZGUoaSl9LHJlYWRsaW5rOmZ1bmN0aW9uIGUodCl7dmFyIHI9RHQubG9va3VwUGF0aCh0KTt2YXIgbj1yLm5vZGU7aWYoIW4pe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQ0KX1pZighbi5ub2RlX29wcy5yZWFkbGluayl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfXJldHVybiBsdC5yZXNvbHZlKER0LmdldFBhdGgobi5wYXJlbnQpLG4ubm9kZV9vcHMucmVhZGxpbmsobikpfSxzdGF0OmZ1bmN0aW9uIGUodCxyKXt2YXIgbj1EdC5sb29rdXBQYXRoKHQse2ZvbGxvdzohcn0pO3ZhciBvPW4ubm9kZTtpZighbyl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDQpfWlmKCFvLm5vZGVfb3BzLmdldGF0dHIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDYzKX1yZXR1cm4gby5ub2RlX29wcy5nZXRhdHRyKG8pfSxsc3RhdDpmdW5jdGlvbiBlKHQpe3JldHVybiBEdC5zdGF0KHQsdHJ1ZSl9LGNobW9kOmZ1bmN0aW9uIGUodCxyLG4pe3ZhciBvO2lmKHR5cGVvZiB0PT0ic3RyaW5nIil7dmFyIGk9RHQubG9va3VwUGF0aCh0LHtmb2xsb3c6IW59KTtvPWkubm9kZX1lbHNle289dH1pZighby5ub2RlX29wcy5zZXRhdHRyKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig2Myl9by5ub2RlX29wcy5zZXRhdHRyKG8se21vZGU6ciY0MDk1fG8ubW9kZSZ+NDA5NSx0aW1lc3RhbXA6RGF0ZS5ub3coKX0pfSxsY2htb2Q6ZnVuY3Rpb24gZSh0LHIpe0R0LmNobW9kKHQscix0cnVlKX0sZmNobW9kOmZ1bmN0aW9uIGUodCxyKXt2YXIgbj1EdC5nZXRTdHJlYW1DaGVja2VkKHQpO0R0LmNobW9kKG4ubm9kZSxyKX0sY2hvd246ZnVuY3Rpb24gZSh0LHIsbixvKXt2YXIgaTtpZih0eXBlb2YgdD09InN0cmluZyIpe3ZhciBhPUR0Lmxvb2t1cFBhdGgodCx7Zm9sbG93OiFvfSk7aT1hLm5vZGV9ZWxzZXtpPXR9aWYoIWkubm9kZV9vcHMuc2V0YXR0cil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNjMpfWkubm9kZV9vcHMuc2V0YXR0cihpLHt0aW1lc3RhbXA6RGF0ZS5ub3coKX0pfSxsY2hvd246ZnVuY3Rpb24gZSh0LHIsbil7RHQuY2hvd24odCxyLG4sdHJ1ZSl9LGZjaG93bjpmdW5jdGlvbiBlKHQscixuKXt2YXIgbz1EdC5nZXRTdHJlYW1DaGVja2VkKHQpO0R0LmNob3duKG8ubm9kZSxyLG4pfSx0cnVuY2F0ZTpmdW5jdGlvbiBlKHQscil7aWYocjwwKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigyOCl9dmFyIG47aWYodHlwZW9mIHQ9PSJzdHJpbmciKXt2YXIgbz1EdC5sb29rdXBQYXRoKHQse2ZvbGxvdzp0cnVlfSk7bj1vLm5vZGV9ZWxzZXtuPXR9aWYoIW4ubm9kZV9vcHMuc2V0YXR0cil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNjMpfWlmKER0LmlzRGlyKG4ubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDMxKX1pZighRHQuaXNGaWxlKG4ubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI4KX12YXIgaT1EdC5ub2RlUGVybWlzc2lvbnMobiwidyIpO2lmKGkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKGkpfW4ubm9kZV9vcHMuc2V0YXR0cihuLHtzaXplOnIsdGltZXN0YW1wOkRhdGUubm93KCl9KX0sZnRydW5jYXRlOmZ1bmN0aW9uIGUodCxyKXt2YXIgbj1EdC5nZXRTdHJlYW1DaGVja2VkKHQpO2lmKChuLmZsYWdzJjIwOTcxNTUpPT09MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfUR0LnRydW5jYXRlKG4ubm9kZSxyKX0sdXRpbWU6ZnVuY3Rpb24gZSh0LHIsbil7dmFyIG89RHQubG9va3VwUGF0aCh0LHtmb2xsb3c6dHJ1ZX0pO3ZhciBpPW8ubm9kZTtpLm5vZGVfb3BzLnNldGF0dHIoaSx7dGltZXN0YW1wOk1hdGgubWF4KHIsbil9KX0sb3BlbjpmdW5jdGlvbiBlKHQscixuKXtpZih0PT09IiIpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQ0KX1yPXR5cGVvZiByPT0ic3RyaW5nIj9NdChyKTpyO2lmKHImNjQpe249dHlwZW9mIG49PSJ1bmRlZmluZWQiPzQzODpuO249biY0MDk1fDMyNzY4fWVsc2V7bj0wfXZhciBvO2lmKGIodCk9PSJvYmplY3QiKXtvPXR9ZWxzZXt0PXN0Lm5vcm1hbGl6ZSh0KTt0cnl7dmFyIGk9RHQubG9va3VwUGF0aCh0LHtmb2xsb3c6IShyJjEzMTA3Mil9KTtvPWkubm9kZX1jYXRjaChlKXt9fXZhciBhPWZhbHNlO2lmKHImNjQpe2lmKG8pe2lmKHImMTI4KXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigyMCl9fWVsc2V7bz1EdC5ta25vZCh0LG4sMCk7YT10cnVlfX1pZighbyl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDQpfWlmKER0LmlzQ2hyZGV2KG8ubW9kZSkpe3ImPX41MTJ9aWYociY2NTUzNiYmIUR0LmlzRGlyKG8ubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU0KX1pZighYSl7dmFyIHM9RHQubWF5T3BlbihvLHIpO2lmKHMpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKHMpfX1pZihyJjUxMiYmIWEpe0R0LnRydW5jYXRlKG8sMCl9ciY9figxMjh8NTEyfDEzMTA3Mik7dmFyIHU9RHQuY3JlYXRlU3RyZWFtKHtub2RlOm8scGF0aDpEdC5nZXRQYXRoKG8pLGZsYWdzOnIsc2Vla2FibGU6dHJ1ZSxwb3NpdGlvbjowLHN0cmVhbV9vcHM6by5zdHJlYW1fb3BzLHVuZ290dGVuOltdLGVycm9yOmZhbHNlfSk7aWYodS5zdHJlYW1fb3BzLm9wZW4pe3Uuc3RyZWFtX29wcy5vcGVuKHUpfWlmKFNbImxvZ1JlYWRGaWxlcyJdJiYhKHImMSkpe2lmKCFEdC5yZWFkRmlsZXMpRHQucmVhZEZpbGVzPXt9O2lmKCEodCBpbiBEdC5yZWFkRmlsZXMpKXtEdC5yZWFkRmlsZXNbdF09MX19cmV0dXJuIHV9LGNsb3NlOmZ1bmN0aW9uIGUodCl7aWYoRHQuaXNDbG9zZWQodCkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDgpfWlmKHQuZ2V0ZGVudHMpdC5nZXRkZW50cz1udWxsO3RyeXtpZih0LnN0cmVhbV9vcHMuY2xvc2Upe3Quc3RyZWFtX29wcy5jbG9zZSh0KX19Y2F0Y2goZSl7dGhyb3cgZX1maW5hbGx5e0R0LmNsb3NlU3RyZWFtKHQuZmQpfXQuZmQ9bnVsbH0saXNDbG9zZWQ6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdC5mZD09PW51bGx9LGxsc2VlazpmdW5jdGlvbiBlKHQscixuKXtpZihEdC5pc0Nsb3NlZCh0KSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoOCl9aWYoIXQuc2Vla2FibGV8fCF0LnN0cmVhbV9vcHMubGxzZWVrKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig3MCl9aWYobiE9MCYmbiE9MSYmbiE9Mil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfXQucG9zaXRpb249dC5zdHJlYW1fb3BzLmxsc2Vlayh0LHIsbik7dC51bmdvdHRlbj1bXTtyZXR1cm4gdC5wb3NpdGlvbn0scmVhZDpmdW5jdGlvbiBlKHQscixuLG8saSl7QyhuPj0wKTtpZihvPDB8fGk8MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfWlmKER0LmlzQ2xvc2VkKHQpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig4KX1pZigodC5mbGFncyYyMDk3MTU1KT09PTEpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDgpfWlmKER0LmlzRGlyKHQubm9kZS5tb2RlKSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMzEpfWlmKCF0LnN0cmVhbV9vcHMucmVhZCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjgpfXZhciBhPXR5cGVvZiBpIT0idW5kZWZpbmVkIjtpZighYSl7aT10LnBvc2l0aW9ufWVsc2UgaWYoIXQuc2Vla2FibGUpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDcwKX12YXIgcz10LnN0cmVhbV9vcHMucmVhZCh0LHIsbixvLGkpO2lmKCFhKXQucG9zaXRpb24rPXM7cmV0dXJuIHN9LHdyaXRlOmZ1bmN0aW9uIGUodCxyLG4sbyxpLGEpe0Mobj49MCk7aWYobzwwfHxpPDApe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI4KX1pZihEdC5pc0Nsb3NlZCh0KSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoOCl9aWYoKHQuZmxhZ3MmMjA5NzE1NSk9PT0wKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig4KX1pZihEdC5pc0Rpcih0Lm5vZGUubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDMxKX1pZighdC5zdHJlYW1fb3BzLndyaXRlKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigyOCl9aWYodC5zZWVrYWJsZSYmdC5mbGFncyYxMDI0KXtEdC5sbHNlZWsodCwwLDIpfXZhciBzPXR5cGVvZiBpIT0idW5kZWZpbmVkIjtpZighcyl7aT10LnBvc2l0aW9ufWVsc2UgaWYoIXQuc2Vla2FibGUpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDcwKX12YXIgdT10LnN0cmVhbV9vcHMud3JpdGUodCxyLG4sbyxpLGEpO2lmKCFzKXQucG9zaXRpb24rPXU7cmV0dXJuIHV9LGFsbG9jYXRlOmZ1bmN0aW9uIGUodCxyLG4pe2lmKER0LmlzQ2xvc2VkKHQpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig4KX1pZihyPDB8fG48PTApe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI4KX1pZigodC5mbGFncyYyMDk3MTU1KT09PTApe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDgpfWlmKCFEdC5pc0ZpbGUodC5ub2RlLm1vZGUpJiYhRHQuaXNEaXIodC5ub2RlLm1vZGUpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig0Myl9aWYoIXQuc3RyZWFtX29wcy5hbGxvY2F0ZSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMTM4KX10LnN0cmVhbV9vcHMuYWxsb2NhdGUodCxyLG4pfSxtbWFwOmZ1bmN0aW9uIGUodCxyLG4sbyxpKXtpZigobyYyKSE9PTAmJihpJjIpPT09MCYmKHQuZmxhZ3MmMjA5NzE1NSkhPT0yKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcigyKX1pZigodC5mbGFncyYyMDk3MTU1KT09PTEpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDIpfWlmKCF0LnN0cmVhbV9vcHMubW1hcCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDMpfXJldHVybiB0LnN0cmVhbV9vcHMubW1hcCh0LHIsbixvLGkpfSxtc3luYzpmdW5jdGlvbiBlKHQscixuLG8saSl7QyhuPj0wKTtpZighdC5zdHJlYW1fb3BzLm1zeW5jKXtyZXR1cm4gMH1yZXR1cm4gdC5zdHJlYW1fb3BzLm1zeW5jKHQscixuLG8saSl9LGlvY3RsOmZ1bmN0aW9uIGUodCxyLG4pe2lmKCF0LnN0cmVhbV9vcHMuaW9jdGwpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU5KX1yZXR1cm4gdC5zdHJlYW1fb3BzLmlvY3RsKHQscixuKX0scmVhZEZpbGU6ZnVuY3Rpb24gZSh0KXt2YXIgcj1hcmd1bWVudHMubGVuZ3RoPjEmJmFyZ3VtZW50c1sxXSE9PXVuZGVmaW5lZD9hcmd1bWVudHNbMV06e307ci5mbGFncz1yLmZsYWdzfHwwO3IuZW5jb2Rpbmc9ci5lbmNvZGluZ3x8ImJpbmFyeSI7aWYoci5lbmNvZGluZyE9PSJ1dGY4IiYmci5lbmNvZGluZyE9PSJiaW5hcnkiKXt0aHJvdyBuZXcgRXJyb3IoJ0ludmFsaWQgZW5jb2RpbmcgdHlwZSAiJy5jb25jYXQoci5lbmNvZGluZywnIicpKX12YXIgbjt2YXIgbz1EdC5vcGVuKHQsci5mbGFncyk7dmFyIGk9RHQuc3RhdCh0KTt2YXIgYT1pLnNpemU7dmFyIHM9bmV3IFVpbnQ4QXJyYXkoYSk7RHQucmVhZChvLHMsMCxhLDApO2lmKHIuZW5jb2Rpbmc9PT0idXRmOCIpe249emUocywwKX1lbHNlIGlmKHIuZW5jb2Rpbmc9PT0iYmluYXJ5Iil7bj1zfUR0LmNsb3NlKG8pO3JldHVybiBufSx3cml0ZUZpbGU6ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPWFyZ3VtZW50cy5sZW5ndGg+MiYmYXJndW1lbnRzWzJdIT09dW5kZWZpbmVkP2FyZ3VtZW50c1syXTp7fTtuLmZsYWdzPW4uZmxhZ3N8fDU3Nzt2YXIgbz1EdC5vcGVuKHQsbi5mbGFncyxuLm1vZGUpO2lmKHR5cGVvZiByPT0ic3RyaW5nIil7dmFyIGk9bmV3IFVpbnQ4QXJyYXkoZHQocikrMSk7dmFyIGE9dnQocixpLDAsaS5sZW5ndGgpO0R0LndyaXRlKG8saSwwLGEsdW5kZWZpbmVkLG4uY2FuT3duKX1lbHNlIGlmKEFycmF5QnVmZmVyLmlzVmlldyhyKSl7RHQud3JpdGUobyxyLDAsci5ieXRlTGVuZ3RoLHVuZGVmaW5lZCxuLmNhbk93bil9ZWxzZXt0aHJvdyBuZXcgRXJyb3IoIlVuc3VwcG9ydGVkIGRhdGEgdHlwZSIpfUR0LmNsb3NlKG8pfSxjd2Q6ZnVuY3Rpb24gZSgpe3JldHVybiBEdC5jdXJyZW50UGF0aH0sY2hkaXI6ZnVuY3Rpb24gZSh0KXt2YXIgcj1EdC5sb29rdXBQYXRoKHQse2ZvbGxvdzp0cnVlfSk7aWYoci5ub2RlPT09bnVsbCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNDQpfWlmKCFEdC5pc0RpcihyLm5vZGUubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDU0KX12YXIgbj1EdC5ub2RlUGVybWlzc2lvbnMoci5ub2RlLCJ4Iik7aWYobil7dGhyb3cgbmV3IER0LkVycm5vRXJyb3Iobil9RHQuY3VycmVudFBhdGg9ci5wYXRofSxjcmVhdGVEZWZhdWx0RGlyZWN0b3JpZXM6ZnVuY3Rpb24gZSgpe0R0Lm1rZGlyKCIvdG1wIik7RHQubWtkaXIoIi9ob21lIik7RHQubWtkaXIoIi9ob21lL3dlYl91c2VyIil9LGNyZWF0ZURlZmF1bHREZXZpY2VzOmZ1bmN0aW9uIGUoKXtEdC5ta2RpcigiL2RldiIpO0R0LnJlZ2lzdGVyRGV2aWNlKER0Lm1ha2VkZXYoMSwzKSx7cmVhZDpmdW5jdGlvbiBlKCl7cmV0dXJuIDB9LHdyaXRlOmZ1bmN0aW9uIGUodCxyLG4sbyxpKXtyZXR1cm4gb319KTtEdC5ta2RldigiL2Rldi9udWxsIixEdC5tYWtlZGV2KDEsMykpO2h0LnJlZ2lzdGVyKER0Lm1ha2VkZXYoNSwwKSxodC5kZWZhdWx0X3R0eV9vcHMpO2h0LnJlZ2lzdGVyKER0Lm1ha2VkZXYoNiwwKSxodC5kZWZhdWx0X3R0eTFfb3BzKTtEdC5ta2RldigiL2Rldi90dHkiLER0Lm1ha2VkZXYoNSwwKSk7RHQubWtkZXYoIi9kZXYvdHR5MSIsRHQubWFrZWRldig2LDApKTt2YXIgdD1uZXcgVWludDhBcnJheSgxMDI0KSxyPTA7dmFyIG49ZnVuY3Rpb24gZSgpe2lmKHI9PT0wKXtyPWN0KHQpLmJ5dGVMZW5ndGh9cmV0dXJuIHRbLS1yXX07RHQuY3JlYXRlRGV2aWNlKCIvZGV2IiwicmFuZG9tIixuKTtEdC5jcmVhdGVEZXZpY2UoIi9kZXYiLCJ1cmFuZG9tIixuKTtEdC5ta2RpcigiL2Rldi9zaG0iKTtEdC5ta2RpcigiL2Rldi9zaG0vdG1wIil9LGNyZWF0ZVNwZWNpYWxEaXJlY3RvcmllczpmdW5jdGlvbiBlKCl7RHQubWtkaXIoIi9wcm9jIik7dmFyIHQ9RHQubWtkaXIoIi9wcm9jL3NlbGYiKTtEdC5ta2RpcigiL3Byb2Mvc2VsZi9mZCIpO0R0Lm1vdW50KHttb3VudDpmdW5jdGlvbiBlKCl7dmFyIHI9RHQuY3JlYXRlTm9kZSh0LCJmZCIsMTYzODR8NTExLDczKTtyLm5vZGVfb3BzPXtsb29rdXA6ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPStyO3ZhciBvPUR0LmdldFN0cmVhbUNoZWNrZWQobik7dmFyIGk9e3BhcmVudDpudWxsLG1vdW50Onttb3VudHBvaW50OiJmYWtlIn0sbm9kZV9vcHM6e3JlYWRsaW5rOmZ1bmN0aW9uIGUoKXtyZXR1cm4gby5wYXRofX19O2kucGFyZW50PWk7cmV0dXJuIGl9fTtyZXR1cm4gcn19LHt9LCIvcHJvYy9zZWxmL2ZkIil9LGNyZWF0ZVN0YW5kYXJkU3RyZWFtczpmdW5jdGlvbiBlKCl7aWYoU1sic3RkaW4iXSl7RHQuY3JlYXRlRGV2aWNlKCIvZGV2Iiwic3RkaW4iLFNbInN0ZGluIl0pfWVsc2V7RHQuc3ltbGluaygiL2Rldi90dHkiLCIvZGV2L3N0ZGluIil9aWYoU1sic3Rkb3V0Il0pe0R0LmNyZWF0ZURldmljZSgiL2RldiIsInN0ZG91dCIsbnVsbCxTWyJzdGRvdXQiXSl9ZWxzZXtEdC5zeW1saW5rKCIvZGV2L3R0eSIsIi9kZXYvc3Rkb3V0Iil9aWYoU1sic3RkZXJyIl0pe0R0LmNyZWF0ZURldmljZSgiL2RldiIsInN0ZGVyciIsbnVsbCxTWyJzdGRlcnIiXSl9ZWxzZXtEdC5zeW1saW5rKCIvZGV2L3R0eTEiLCIvZGV2L3N0ZGVyciIpfXZhciB0PUR0Lm9wZW4oIi9kZXYvc3RkaW4iLDApO3ZhciByPUR0Lm9wZW4oIi9kZXYvc3Rkb3V0IiwxKTt2YXIgbj1EdC5vcGVuKCIvZGV2L3N0ZGVyciIsMSk7Qyh0LmZkPT09MCwiaW52YWxpZCBoYW5kbGUgZm9yIHN0ZGluICgiLmNvbmNhdCh0LmZkLCIpIikpO0Moci5mZD09PTEsImludmFsaWQgaGFuZGxlIGZvciBzdGRvdXQgKCIuY29uY2F0KHIuZmQsIikiKSk7QyhuLmZkPT09MiwiaW52YWxpZCBoYW5kbGUgZm9yIHN0ZGVyciAoIi5jb25jYXQobi5mZCwiKSIpKX0sc3RhdGljSW5pdDpmdW5jdGlvbiBlKCl7WzQ0XS5mb3JFYWNoKChmdW5jdGlvbihlKXtEdC5nZW5lcmljRXJyb3JzW2VdPW5ldyBEdC5FcnJub0Vycm9yKGUpO0R0LmdlbmVyaWNFcnJvcnNbZV0uc3RhY2s9IjxnZW5lcmljIGVycm9yLCBubyBzdGFjaz4ifSkpO0R0Lm5hbWVUYWJsZT1uZXcgQXJyYXkoNDA5Nik7RHQubW91bnQoX3Qse30sIi8iKTtEdC5jcmVhdGVEZWZhdWx0RGlyZWN0b3JpZXMoKTtEdC5jcmVhdGVEZWZhdWx0RGV2aWNlcygpO0R0LmNyZWF0ZVNwZWNpYWxEaXJlY3RvcmllcygpO0R0LmZpbGVzeXN0ZW1zPXtNRU1GUzpfdH19LGluaXQ6ZnVuY3Rpb24gZSh0LHIsbil7QyghRHQuaW5pdC5pbml0aWFsaXplZCwiRlMuaW5pdCB3YXMgcHJldmlvdXNseSBjYWxsZWQuIElmIHlvdSB3YW50IHRvIGluaXRpYWxpemUgbGF0ZXIgd2l0aCBjdXN0b20gcGFyYW1ldGVycywgcmVtb3ZlIGFueSBlYXJsaWVyIGNhbGxzIChub3RlIHRoYXQgb25lIGlzIGF1dG9tYXRpY2FsbHkgYWRkZWQgdG8gdGhlIGdlbmVyYXRlZCBjb2RlKSIpO0R0LmluaXQuaW5pdGlhbGl6ZWQ9dHJ1ZTtTWyJzdGRpbiJdPXR8fFNbInN0ZGluIl07U1sic3Rkb3V0Il09cnx8U1sic3Rkb3V0Il07U1sic3RkZXJyIl09bnx8U1sic3RkZXJyIl07RHQuY3JlYXRlU3RhbmRhcmRTdHJlYW1zKCl9LHF1aXQ6ZnVuY3Rpb24gZSgpe0R0LmluaXQuaW5pdGlhbGl6ZWQ9ZmFsc2U7Tm4oMCk7Zm9yKHZhciB0PTA7dDxEdC5zdHJlYW1zLmxlbmd0aDt0Kyspe3ZhciByPUR0LnN0cmVhbXNbdF07aWYoIXIpe2NvbnRpbnVlfUR0LmNsb3NlKHIpfX0sZmluZE9iamVjdDpmdW5jdGlvbiBlKHQscil7dmFyIG49RHQuYW5hbHl6ZVBhdGgodCxyKTtpZighbi5leGlzdHMpe3JldHVybiBudWxsfXJldHVybiBuLm9iamVjdH0sYW5hbHl6ZVBhdGg6ZnVuY3Rpb24gZSh0LHIpe3RyeXt2YXIgbj1EdC5sb29rdXBQYXRoKHQse2ZvbGxvdzohcn0pO3Q9bi5wYXRofWNhdGNoKGUpe312YXIgbz17aXNSb290OmZhbHNlLGV4aXN0czpmYWxzZSxlcnJvcjowLG5hbWU6bnVsbCxwYXRoOm51bGwsb2JqZWN0Om51bGwscGFyZW50RXhpc3RzOmZhbHNlLHBhcmVudFBhdGg6bnVsbCxwYXJlbnRPYmplY3Q6bnVsbH07dHJ5e3ZhciBuPUR0Lmxvb2t1cFBhdGgodCx7cGFyZW50OnRydWV9KTtvLnBhcmVudEV4aXN0cz10cnVlO28ucGFyZW50UGF0aD1uLnBhdGg7by5wYXJlbnRPYmplY3Q9bi5ub2RlO28ubmFtZT1zdC5iYXNlbmFtZSh0KTtuPUR0Lmxvb2t1cFBhdGgodCx7Zm9sbG93OiFyfSk7by5leGlzdHM9dHJ1ZTtvLnBhdGg9bi5wYXRoO28ub2JqZWN0PW4ubm9kZTtvLm5hbWU9bi5ub2RlLm5hbWU7by5pc1Jvb3Q9bi5wYXRoPT09Ii8ifWNhdGNoKGUpe28uZXJyb3I9ZS5lcnJub31yZXR1cm4gb30sY3JlYXRlUGF0aDpmdW5jdGlvbiBlKHQscixuLG8pe3Q9dHlwZW9mIHQ9PSJzdHJpbmciP3Q6RHQuZ2V0UGF0aCh0KTt2YXIgaT1yLnNwbGl0KCIvIikucmV2ZXJzZSgpO3doaWxlKGkubGVuZ3RoKXt2YXIgYT1pLnBvcCgpO2lmKCFhKWNvbnRpbnVlO3ZhciBzPXN0LmpvaW4yKHQsYSk7dHJ5e0R0Lm1rZGlyKHMpfWNhdGNoKGUpe310PXN9cmV0dXJuIHN9LGNyZWF0ZUZpbGU6ZnVuY3Rpb24gZSh0LHIsbixvLGkpe3ZhciBhPXN0LmpvaW4yKHR5cGVvZiB0PT0ic3RyaW5nIj90OkR0LmdldFBhdGgodCkscik7dmFyIHM9QXQobyxpKTtyZXR1cm4gRHQuY3JlYXRlKGEscyl9LGNyZWF0ZURhdGFGaWxlOmZ1bmN0aW9uIGUodCxyLG4sbyxpLGEpe3ZhciBzPXI7aWYodCl7dD10eXBlb2YgdD09InN0cmluZyI/dDpEdC5nZXRQYXRoKHQpO3M9cj9zdC5qb2luMih0LHIpOnR9dmFyIHU9QXQobyxpKTt2YXIgYz1EdC5jcmVhdGUocyx1KTtpZihuKXtpZih0eXBlb2Ygbj09InN0cmluZyIpe3ZhciBsPW5ldyBBcnJheShuLmxlbmd0aCk7Zm9yKHZhciBmPTAsZD1uLmxlbmd0aDtmPGQ7KytmKWxbZl09bi5jaGFyQ29kZUF0KGYpO249bH1EdC5jaG1vZChjLHV8MTQ2KTt2YXIgdj1EdC5vcGVuKGMsNTc3KTtEdC53cml0ZSh2LG4sMCxuLmxlbmd0aCwwLGEpO0R0LmNsb3NlKHYpO0R0LmNobW9kKGMsdSl9fSxjcmVhdGVEZXZpY2U6ZnVuY3Rpb24gZSh0LHIsbixvKXt2YXIgaT1zdC5qb2luMih0eXBlb2YgdD09InN0cmluZyI/dDpEdC5nZXRQYXRoKHQpLHIpO3ZhciBhPUF0KCEhbiwhIW8pO2lmKCFEdC5jcmVhdGVEZXZpY2UubWFqb3IpRHQuY3JlYXRlRGV2aWNlLm1ham9yPTY0O3ZhciBzPUR0Lm1ha2VkZXYoRHQuY3JlYXRlRGV2aWNlLm1ham9yKyssMCk7RHQucmVnaXN0ZXJEZXZpY2Uocyx7b3BlbjpmdW5jdGlvbiBlKHQpe3Quc2Vla2FibGU9ZmFsc2V9LGNsb3NlOmZ1bmN0aW9uIGUodCl7dmFyIHI7aWYobyE9PW51bGwmJm8hPT12b2lkIDAmJihyPW8uYnVmZmVyKSE9PW51bGwmJnIhPT12b2lkIDAmJnIubGVuZ3RoKXtvKDEwKX19LHJlYWQ6ZnVuY3Rpb24gZSh0LHIsbyxpLGEpe3ZhciBzPTA7Zm9yKHZhciB1PTA7dTxpO3UrKyl7dmFyIGM7dHJ5e2M9bigpfWNhdGNoKGUpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDI5KX1pZihjPT09dW5kZWZpbmVkJiZzPT09MCl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoNil9aWYoYz09PW51bGx8fGM9PT11bmRlZmluZWQpYnJlYWs7cysrO3Jbbyt1XT1jfWlmKHMpe3Qubm9kZS50aW1lc3RhbXA9RGF0ZS5ub3coKX1yZXR1cm4gc30sd3JpdGU6ZnVuY3Rpb24gZSh0LHIsbixpLGEpe2Zvcih2YXIgcz0wO3M8aTtzKyspe3RyeXtvKHJbbitzXSl9Y2F0Y2goZSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjkpfX1pZihpKXt0Lm5vZGUudGltZXN0YW1wPURhdGUubm93KCl9cmV0dXJuIHN9fSk7cmV0dXJuIER0Lm1rZGV2KGksYSxzKX0sZm9yY2VMb2FkRmlsZTpmdW5jdGlvbiBlKHQpe2lmKHQuaXNEZXZpY2V8fHQuaXNGb2xkZXJ8fHQubGlua3x8dC5jb250ZW50cylyZXR1cm4gdHJ1ZTtpZih0eXBlb2YgWE1MSHR0cFJlcXVlc3QhPSJ1bmRlZmluZWQiKXt0aHJvdyBuZXcgRXJyb3IoIkxhenkgbG9hZGluZyBzaG91bGQgaGF2ZSBiZWVuIHBlcmZvcm1lZCAoY29udGVudHMgc2V0KSBpbiBjcmVhdGVMYXp5RmlsZSwgYnV0IGl0IHdhcyBub3QuIExhenkgbG9hZGluZyBvbmx5IHdvcmtzIGluIHdlYiB3b3JrZXJzLiBVc2UgLS1lbWJlZC1maWxlIG9yIC0tcHJlbG9hZC1maWxlIGluIGVtY2Mgb24gdGhlIG1haW4gdGhyZWFkLiIpfWVsc2UgaWYoXyl7dHJ5e3QuY29udGVudHM9bXQoXyh0LnVybCksdHJ1ZSk7dC51c2VkQnl0ZXM9dC5jb250ZW50cy5sZW5ndGh9Y2F0Y2goZSl7dGhyb3cgbmV3IER0LkVycm5vRXJyb3IoMjkpfX1lbHNle3Rocm93IG5ldyBFcnJvcigiQ2Fubm90IGxvYWQgd2l0aG91dCByZWFkKCkgb3IgWE1MSHR0cFJlcXVlc3QuIil9fSxjcmVhdGVMYXp5RmlsZTpmdW5jdGlvbiBlKHQscixuLG8sYSl7dmFyIHM9ZnVuY3Rpb24oKXtmdW5jdGlvbiBlKCl7Zih0aGlzLGUpO3RoaXMubGVuZ3RoS25vd249ZmFsc2U7dGhpcy5jaHVua3M9W119cmV0dXJuIHUoZSxbe2tleToiZ2V0Iix2YWx1ZTpmdW5jdGlvbiBlKHQpe2lmKHQ+dGhpcy5sZW5ndGgtMXx8dDwwKXtyZXR1cm4gdW5kZWZpbmVkfXZhciByPXQldGhpcy5jaHVua1NpemU7dmFyIG49dC90aGlzLmNodW5rU2l6ZXwwO3JldHVybiB0aGlzLmdldHRlcihuKVtyXX19LHtrZXk6InNldERhdGFHZXR0ZXIiLHZhbHVlOmZ1bmN0aW9uIGUodCl7dGhpcy5nZXR0ZXI9dH19LHtrZXk6ImNhY2hlTGVuZ3RoIix2YWx1ZTpmdW5jdGlvbiBlKCl7dmFyIHQ9bmV3IFhNTEh0dHBSZXF1ZXN0O3Qub3BlbigiSEVBRCIsbixmYWxzZSk7dC5zZW5kKG51bGwpO2lmKCEodC5zdGF0dXM+PTIwMCYmdC5zdGF0dXM8MzAwfHx0LnN0YXR1cz09PTMwNCkpdGhyb3cgbmV3IEVycm9yKCJDb3VsZG4ndCBsb2FkICIrbisiLiBTdGF0dXM6ICIrdC5zdGF0dXMpO3ZhciByPU51bWJlcih0LmdldFJlc3BvbnNlSGVhZGVyKCJDb250ZW50LWxlbmd0aCIpKTt2YXIgbzt2YXIgaT0obz10LmdldFJlc3BvbnNlSGVhZGVyKCJBY2NlcHQtUmFuZ2VzIikpJiZvPT09ImJ5dGVzIjt2YXIgYT0obz10LmdldFJlc3BvbnNlSGVhZGVyKCJDb250ZW50LUVuY29kaW5nIikpJiZvPT09Imd6aXAiO3ZhciBzPTEwMjQqMTAyNDtpZighaSlzPXI7dmFyIHU9ZnVuY3Rpb24gZSh0LG8pe2lmKHQ+byl0aHJvdyBuZXcgRXJyb3IoImludmFsaWQgcmFuZ2UgKCIrdCsiLCAiK28rIikgb3Igbm8gYnl0ZXMgcmVxdWVzdGVkISIpO2lmKG8+ci0xKXRocm93IG5ldyBFcnJvcigib25seSAiK3IrIiBieXRlcyBhdmFpbGFibGUhIHByb2dyYW1tZXIgZXJyb3IhIik7dmFyIGk9bmV3IFhNTEh0dHBSZXF1ZXN0O2kub3BlbigiR0VUIixuLGZhbHNlKTtpZihyIT09cylpLnNldFJlcXVlc3RIZWFkZXIoIlJhbmdlIiwiYnl0ZXM9Iit0KyItIitvKTtpLnJlc3BvbnNlVHlwZT0iYXJyYXlidWZmZXIiO2lmKGkub3ZlcnJpZGVNaW1lVHlwZSl7aS5vdmVycmlkZU1pbWVUeXBlKCJ0ZXh0L3BsYWluOyBjaGFyc2V0PXgtdXNlci1kZWZpbmVkIil9aS5zZW5kKG51bGwpO2lmKCEoaS5zdGF0dXM+PTIwMCYmaS5zdGF0dXM8MzAwfHxpLnN0YXR1cz09PTMwNCkpdGhyb3cgbmV3IEVycm9yKCJDb3VsZG4ndCBsb2FkICIrbisiLiBTdGF0dXM6ICIraS5zdGF0dXMpO2lmKGkucmVzcG9uc2UhPT11bmRlZmluZWQpe3JldHVybiBuZXcgVWludDhBcnJheShpLnJlc3BvbnNlfHxbXSl9cmV0dXJuIG10KGkucmVzcG9uc2VUZXh0fHwiIix0cnVlKX07dmFyIGM9dGhpcztjLnNldERhdGFHZXR0ZXIoKGZ1bmN0aW9uKGUpe3ZhciB0PWUqczt2YXIgbj0oZSsxKSpzLTE7bj1NYXRoLm1pbihuLHItMSk7aWYodHlwZW9mIGMuY2h1bmtzW2VdPT0idW5kZWZpbmVkIil7Yy5jaHVua3NbZV09dSh0LG4pfWlmKHR5cGVvZiBjLmNodW5rc1tlXT09InVuZGVmaW5lZCIpdGhyb3cgbmV3IEVycm9yKCJkb1hIUiBmYWlsZWQhIik7cmV0dXJuIGMuY2h1bmtzW2VdfSkpO2lmKGF8fCFyKXtzPXI9MTtyPXRoaXMuZ2V0dGVyKDApLmxlbmd0aDtzPXI7VCgiTGF6eUZpbGVzIG9uIGd6aXAgZm9yY2VzIGRvd25sb2FkIG9mIHRoZSB3aG9sZSBmaWxlIHdoZW4gbGVuZ3RoIGlzIGFjY2Vzc2VkIil9dGhpcy5fbGVuZ3RoPXI7dGhpcy5fY2h1bmtTaXplPXM7dGhpcy5sZW5ndGhLbm93bj10cnVlfX0se2tleToibGVuZ3RoIixnZXQ6ZnVuY3Rpb24gZSgpe2lmKCF0aGlzLmxlbmd0aEtub3duKXt0aGlzLmNhY2hlTGVuZ3RoKCl9cmV0dXJuIHRoaXMuX2xlbmd0aH19LHtrZXk6ImNodW5rU2l6ZSIsZ2V0OmZ1bmN0aW9uIGUoKXtpZighdGhpcy5sZW5ndGhLbm93bil7dGhpcy5jYWNoZUxlbmd0aCgpfXJldHVybiB0aGlzLl9jaHVua1NpemV9fV0pfSgpO2lmKHR5cGVvZiBYTUxIdHRwUmVxdWVzdCE9InVuZGVmaW5lZCIpe2lmKCFpKXRocm93IkNhbm5vdCBkbyBzeW5jaHJvbm91cyBiaW5hcnkgWEhScyBvdXRzaWRlIHdlYndvcmtlcnMgaW4gbW9kZXJuIGJyb3dzZXJzLiBVc2UgLS1lbWJlZC1maWxlIG9yIC0tcHJlbG9hZC1maWxlIGluIGVtY2MiO3ZhciBjPW5ldyBzO3ZhciBsPXtpc0RldmljZTpmYWxzZSxjb250ZW50czpjfX1lbHNle3ZhciBsPXtpc0RldmljZTpmYWxzZSx1cmw6bn19dmFyIGQ9RHQuY3JlYXRlRmlsZSh0LHIsbCxvLGEpO2lmKGwuY29udGVudHMpe2QuY29udGVudHM9bC5jb250ZW50c31lbHNlIGlmKGwudXJsKXtkLmNvbnRlbnRzPW51bGw7ZC51cmw9bC51cmx9T2JqZWN0LmRlZmluZVByb3BlcnRpZXMoZCx7dXNlZEJ5dGVzOntnZXQ6ZnVuY3Rpb24gZSgpe3JldHVybiB0aGlzLmNvbnRlbnRzLmxlbmd0aH19fSk7dmFyIHY9e307dmFyIG09T2JqZWN0LmtleXMoZC5zdHJlYW1fb3BzKTttLmZvckVhY2goKGZ1bmN0aW9uKGUpe3ZhciB0PWQuc3RyZWFtX29wc1tlXTt2W2VdPWZ1bmN0aW9uKCl7RHQuZm9yY2VMb2FkRmlsZShkKTtyZXR1cm4gdC5hcHBseSh2b2lkIDAsYXJndW1lbnRzKX19KSk7ZnVuY3Rpb24gcChlLHQscixuLG8pe3ZhciBpPWUubm9kZS5jb250ZW50cztpZihvPj1pLmxlbmd0aClyZXR1cm4gMDt2YXIgYT1NYXRoLm1pbihpLmxlbmd0aC1vLG4pO0MoYT49MCk7aWYoaS5zbGljZSl7Zm9yKHZhciBzPTA7czxhO3MrKyl7dFtyK3NdPWlbbytzXX19ZWxzZXtmb3IodmFyIHM9MDtzPGE7cysrKXt0W3Irc109aS5nZXQobytzKX19cmV0dXJuIGF9di5yZWFkPWZ1bmN0aW9uKGUsdCxyLG4sbyl7RHQuZm9yY2VMb2FkRmlsZShkKTtyZXR1cm4gcChlLHQscixuLG8pfTt2Lm1tYXA9ZnVuY3Rpb24oZSx0LHIsbixvKXtEdC5mb3JjZUxvYWRGaWxlKGQpO3ZhciBpPXd0KHQpO2lmKCFpKXt0aHJvdyBuZXcgRHQuRXJybm9FcnJvcig0OCl9cChlLE4saSx0LHIpO3JldHVybntwdHI6aSxhbGxvY2F0ZWQ6dHJ1ZX19O2Quc3RyZWFtX29wcz12O3JldHVybiBkfSxhYnNvbHV0ZVBhdGg6ZnVuY3Rpb24gZSgpe3NlKCJGUy5hYnNvbHV0ZVBhdGggaGFzIGJlZW4gcmVtb3ZlZDsgdXNlIFBBVEhfRlMucmVzb2x2ZSBpbnN0ZWFkIil9LGNyZWF0ZUZvbGRlcjpmdW5jdGlvbiBlKCl7c2UoIkZTLmNyZWF0ZUZvbGRlciBoYXMgYmVlbiByZW1vdmVkOyB1c2UgRlMubWtkaXIgaW5zdGVhZCIpfSxjcmVhdGVMaW5rOmZ1bmN0aW9uIGUoKXtzZSgiRlMuY3JlYXRlTGluayBoYXMgYmVlbiByZW1vdmVkOyB1c2UgRlMuc3ltbGluayBpbnN0ZWFkIil9LGpvaW5QYXRoOmZ1bmN0aW9uIGUoKXtzZSgiRlMuam9pblBhdGggaGFzIGJlZW4gcmVtb3ZlZDsgdXNlIFBBVEguam9pbiBpbnN0ZWFkIil9LG1tYXBBbGxvYzpmdW5jdGlvbiBlKCl7c2UoIkZTLm1tYXBBbGxvYyBoYXMgYmVlbiByZXBsYWNlZCBieSB0aGUgdG9wIGxldmVsIGZ1bmN0aW9uIG1tYXBBbGxvYyIpfSxzdGFuZGFyZGl6ZVBhdGg6ZnVuY3Rpb24gZSgpe3NlKCJGUy5zdGFuZGFyZGl6ZVBhdGggaGFzIGJlZW4gcmVtb3ZlZDsgdXNlIFBBVEgubm9ybWFsaXplIGluc3RlYWQiKX19O3ZhciBQdD17REVGQVVMVF9QT0xMTUFTSzo1LGNhbGN1bGF0ZUF0OmZ1bmN0aW9uIGUodCxyLG4pe2lmKHN0LmlzQWJzKHIpKXtyZXR1cm4gcn12YXIgbztpZih0PT09LTEwMCl7bz1EdC5jd2QoKX1lbHNle3ZhciBpPVB0LmdldFN0cmVhbUZyb21GRCh0KTtvPWkucGF0aH1pZihyLmxlbmd0aD09MCl7aWYoIW4pe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQ0KX1yZXR1cm4gb31yZXR1cm4gc3Quam9pbjIobyxyKX0sZG9TdGF0OmZ1bmN0aW9uIGUodCxyLG4pe3ZhciBvPXQocik7TFtuPj4yXT1vLmRldjtMW24rND4+Ml09by5tb2RlO1Vbbis4Pj4yXT1vLm5saW5rO0xbbisxMj4+Ml09by51aWQ7TFtuKzE2Pj4yXT1vLmdpZDtMW24rMjA+PjJdPW8ucmRldjtrZT1bby5zaXplPj4+MCwoU2U9by5zaXplLCtNYXRoLmFicyhTZSk+PTE/U2U+MD8rTWF0aC5mbG9vcihTZS80Mjk0OTY3Mjk2KT4+PjA6fn4rTWF0aC5jZWlsKChTZS0rKH5+U2U+Pj4wKSkvNDI5NDk2NzI5Nik+Pj4wOjApXSxMW24rMjQ+PjJdPWtlWzBdLExbbisyOD4+Ml09a2VbMV07TFtuKzMyPj4yXT00MDk2O0xbbiszNj4+Ml09by5ibG9ja3M7dmFyIGk9by5hdGltZS5nZXRUaW1lKCk7dmFyIGE9by5tdGltZS5nZXRUaW1lKCk7dmFyIHM9by5jdGltZS5nZXRUaW1lKCk7a2U9W01hdGguZmxvb3IoaS8xZTMpPj4+MCwoU2U9TWF0aC5mbG9vcihpLzFlMyksK01hdGguYWJzKFNlKT49MT9TZT4wPytNYXRoLmZsb29yKFNlLzQyOTQ5NjcyOTYpPj4+MDp+fitNYXRoLmNlaWwoKFNlLSsofn5TZT4+PjApKS80Mjk0OTY3Mjk2KT4+PjA6MCldLExbbis0MD4+Ml09a2VbMF0sTFtuKzQ0Pj4yXT1rZVsxXTtVW24rNDg+PjJdPWklMWUzKjFlMztrZT1bTWF0aC5mbG9vcihhLzFlMyk+Pj4wLChTZT1NYXRoLmZsb29yKGEvMWUzKSwrTWF0aC5hYnMoU2UpPj0xP1NlPjA/K01hdGguZmxvb3IoU2UvNDI5NDk2NzI5Nik+Pj4wOn5+K01hdGguY2VpbCgoU2UtKyh+flNlPj4+MCkpLzQyOTQ5NjcyOTYpPj4+MDowKV0sTFtuKzU2Pj4yXT1rZVswXSxMW24rNjA+PjJdPWtlWzFdO1Vbbis2ND4+Ml09YSUxZTMqMWUzO2tlPVtNYXRoLmZsb29yKHMvMWUzKT4+PjAsKFNlPU1hdGguZmxvb3Iocy8xZTMpLCtNYXRoLmFicyhTZSk+PTE/U2U+MD8rTWF0aC5mbG9vcihTZS80Mjk0OTY3Mjk2KT4+PjA6fn4rTWF0aC5jZWlsKChTZS0rKH5+U2U+Pj4wKSkvNDI5NDk2NzI5Nik+Pj4wOjApXSxMW24rNzI+PjJdPWtlWzBdLExbbis3Nj4+Ml09a2VbMV07VVtuKzgwPj4yXT1zJTFlMyoxZTM7a2U9W28uaW5vPj4+MCwoU2U9by5pbm8sK01hdGguYWJzKFNlKT49MT9TZT4wPytNYXRoLmZsb29yKFNlLzQyOTQ5NjcyOTYpPj4+MDp+fitNYXRoLmNlaWwoKFNlLSsofn5TZT4+PjApKS80Mjk0OTY3Mjk2KT4+PjA6MCldLExbbis4OD4+Ml09a2VbMF0sTFtuKzkyPj4yXT1rZVsxXTtyZXR1cm4gMH0sZG9Nc3luYzpmdW5jdGlvbiBlKHQscixuLG8saSl7aWYoIUR0LmlzRmlsZShyLm5vZGUubW9kZSkpe3Rocm93IG5ldyBEdC5FcnJub0Vycm9yKDQzKX1pZihvJjIpe3JldHVybiAwfXZhciBhPVIuc2xpY2UodCx0K24pO0R0Lm1zeW5jKHIsYSxpLG4sbyl9LGdldFN0cmVhbUZyb21GRDpmdW5jdGlvbiBlKHQpe3ZhciByPUR0LmdldFN0cmVhbUNoZWNrZWQodCk7cmV0dXJuIHJ9LHZhcmFyZ3M6dW5kZWZpbmVkLGdldFN0cjpmdW5jdGlvbiBlKHQpe3ZhciByPUhlKHQpO3JldHVybiByfX07ZnVuY3Rpb24gQ3QoZSx0LHIpe1B0LnZhcmFyZ3M9cjt0cnl7dmFyIG49UHQuZ2V0U3RyZWFtRnJvbUZEKGUpO3N3aXRjaCh0KXtjYXNlIDA6e3ZhciBvPWl0KCk7aWYobzwwKXtyZXR1cm4tMjh9d2hpbGUoRHQuc3RyZWFtc1tvXSl7bysrfXZhciBpO2k9RHQuZHVwU3RyZWFtKG4sbyk7cmV0dXJuIGkuZmR9Y2FzZSAxOmNhc2UgMjpyZXR1cm4gMDtjYXNlIDM6cmV0dXJuIG4uZmxhZ3M7Y2FzZSA0Ont2YXIgbz1pdCgpO24uZmxhZ3N8PW87cmV0dXJuIDB9Y2FzZSAxMjp7dmFyIG89YXQoKTt2YXIgYT0wO0lbbythPj4xXT0yO3JldHVybiAwfWNhc2UgMTM6Y2FzZSAxNDpyZXR1cm4gMH1yZXR1cm4tMjh9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIE50KGUsdCl7dHJ5e3ZhciByPVB0LmdldFN0cmVhbUZyb21GRChlKTtyZXR1cm4gUHQuZG9TdGF0KER0LnN0YXQsci5wYXRoLHQpfWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX12YXIgUnQ9ZnVuY3Rpb24gZSh0LHIsbil7Qyh0eXBlb2Ygbj09Im51bWJlciIsInN0cmluZ1RvVVRGOChzdHIsIG91dFB0ciwgbWF4Qnl0ZXNUb1dyaXRlKSBpcyBtaXNzaW5nIHRoZSB0aGlyZCBwYXJhbWV0ZXIgdGhhdCBzcGVjaWZpZXMgdGhlIGxlbmd0aCBvZiB0aGUgb3V0cHV0IGJ1ZmZlciEiKTtyZXR1cm4gdnQodCxSLHIsbil9O2Z1bmN0aW9uIEl0KGUsdCl7dHJ5e2lmKHQ9PT0wKXJldHVybi0yODt2YXIgcj1EdC5jd2QoKTt2YXIgbj1kdChyKSsxO2lmKHQ8bilyZXR1cm4tNjg7UnQocixlLHQpO3JldHVybiBufWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX1mdW5jdGlvbiBqdChlLHQscil7dHJ5e3ZhciBuPVB0LmdldFN0cmVhbUZyb21GRChlKTtuLmdldGRlbnRzfHwobi5nZXRkZW50cz1EdC5yZWFkZGlyKG4ucGF0aCkpO3ZhciBvPTI4MDt2YXIgaT0wO3ZhciBhPUR0Lmxsc2VlayhuLDAsMSk7dmFyIHM9TWF0aC5mbG9vcihhL28pO3doaWxlKHM8bi5nZXRkZW50cy5sZW5ndGgmJmkrbzw9cil7dmFyIHU7dmFyIGM7dmFyIGw9bi5nZXRkZW50c1tzXTtpZihsPT09Ii4iKXt1PW4ubm9kZS5pZDtjPTR9ZWxzZSBpZihsPT09Ii4uIil7dmFyIGY9RHQubG9va3VwUGF0aChuLnBhdGgse3BhcmVudDp0cnVlfSk7dT1mLm5vZGUuaWQ7Yz00fWVsc2V7dmFyIGQ9RHQubG9va3VwTm9kZShuLm5vZGUsbCk7dT1kLmlkO2M9RHQuaXNDaHJkZXYoZC5tb2RlKT8yOkR0LmlzRGlyKGQubW9kZSk/NDpEdC5pc0xpbmsoZC5tb2RlKT8xMDo4fUModSk7a2U9W3U+Pj4wLChTZT11LCtNYXRoLmFicyhTZSk+PTE/U2U+MD8rTWF0aC5mbG9vcihTZS80Mjk0OTY3Mjk2KT4+PjA6fn4rTWF0aC5jZWlsKChTZS0rKH5+U2U+Pj4wKSkvNDI5NDk2NzI5Nik+Pj4wOjApXSxMW3QraT4+Ml09a2VbMF0sTFt0K2krND4+Ml09a2VbMV07a2U9WyhzKzEpKm8+Pj4wLChTZT0ocysxKSpvLCtNYXRoLmFicyhTZSk+PTE/U2U+MD8rTWF0aC5mbG9vcihTZS80Mjk0OTY3Mjk2KT4+PjA6fn4rTWF0aC5jZWlsKChTZS0rKH5+U2U+Pj4wKSkvNDI5NDk2NzI5Nik+Pj4wOjApXSxMW3QraSs4Pj4yXT1rZVswXSxMW3QraSsxMj4+Ml09a2VbMV07SVt0K2krMTY+PjFdPTI4MDtOW3QraSsxOF09YztSdChsLHQraSsxOSwyNTYpO2krPW87cys9MX1EdC5sbHNlZWsobixzKm8sMCk7cmV0dXJuIGl9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIEx0KGUsdCxyKXtQdC52YXJhcmdzPXI7dHJ5e3ZhciBuPVB0LmdldFN0cmVhbUZyb21GRChlKTtzd2l0Y2godCl7Y2FzZSAyMTUwOTp7aWYoIW4udHR5KXJldHVybi01OTtyZXR1cm4gMH1jYXNlIDIxNTA1OntpZighbi50dHkpcmV0dXJuLTU5O2lmKG4udHR5Lm9wcy5pb2N0bF90Y2dldHMpe3ZhciBvPW4udHR5Lm9wcy5pb2N0bF90Y2dldHMobik7dmFyIGk9YXQoKTtMW2k+PjJdPW8uY19pZmxhZ3x8MDtMW2krND4+Ml09by5jX29mbGFnfHwwO0xbaSs4Pj4yXT1vLmNfY2ZsYWd8fDA7TFtpKzEyPj4yXT1vLmNfbGZsYWd8fDA7Zm9yKHZhciBhPTA7YTwzMjthKyspe05baSthKzE3XT1vLmNfY2NbYV18fDB9cmV0dXJuIDB9cmV0dXJuIDB9Y2FzZSAyMTUxMDpjYXNlIDIxNTExOmNhc2UgMjE1MTI6e2lmKCFuLnR0eSlyZXR1cm4tNTk7cmV0dXJuIDB9Y2FzZSAyMTUwNjpjYXNlIDIxNTA3OmNhc2UgMjE1MDg6e2lmKCFuLnR0eSlyZXR1cm4tNTk7aWYobi50dHkub3BzLmlvY3RsX3Rjc2V0cyl7dmFyIGk9YXQoKTt2YXIgcz1MW2k+PjJdO3ZhciB1PUxbaSs0Pj4yXTt2YXIgYz1MW2krOD4+Ml07dmFyIGw9TFtpKzEyPj4yXTt2YXIgZj1bXTtmb3IodmFyIGE9MDthPDMyO2ErKyl7Zi5wdXNoKE5baSthKzE3XSl9cmV0dXJuIG4udHR5Lm9wcy5pb2N0bF90Y3NldHMobi50dHksdCx7Y19pZmxhZzpzLGNfb2ZsYWc6dSxjX2NmbGFnOmMsY19sZmxhZzpsLGNfY2M6Zn0pfXJldHVybiAwfWNhc2UgMjE1MTk6e2lmKCFuLnR0eSlyZXR1cm4tNTk7dmFyIGk9YXQoKTtMW2k+PjJdPTA7cmV0dXJuIDB9Y2FzZSAyMTUyMDp7aWYoIW4udHR5KXJldHVybi01OTtyZXR1cm4tMjh9Y2FzZSAyMTUzMTp7dmFyIGk9YXQoKTtyZXR1cm4gRHQuaW9jdGwobix0LGkpfWNhc2UgMjE1MjM6e2lmKCFuLnR0eSlyZXR1cm4tNTk7aWYobi50dHkub3BzLmlvY3RsX3Rpb2Nnd2luc3ope3ZhciBkPW4udHR5Lm9wcy5pb2N0bF90aW9jZ3dpbnN6KG4udHR5KTt2YXIgaT1hdCgpO0lbaT4+MV09ZFswXTtJW2krMj4+MV09ZFsxXX1yZXR1cm4gMH1jYXNlIDIxNTI0OntpZighbi50dHkpcmV0dXJuLTU5O3JldHVybiAwfWNhc2UgMjE1MTU6e2lmKCFuLnR0eSlyZXR1cm4tNTk7cmV0dXJuIDB9ZGVmYXVsdDpyZXR1cm4tMjh9fWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX1mdW5jdGlvbiBVdChlLHQpe3RyeXtlPVB0LmdldFN0cihlKTtyZXR1cm4gUHQuZG9TdGF0KER0LmxzdGF0LGUsdCl9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIHh0KGUsdCxyKXt0cnl7dD1QdC5nZXRTdHIodCk7dD1QdC5jYWxjdWxhdGVBdChlLHQpO3Q9c3Qubm9ybWFsaXplKHQpO2lmKHRbdC5sZW5ndGgtMV09PT0iLyIpdD10LnN1YnN0cigwLHQubGVuZ3RoLTEpO0R0Lm1rZGlyKHQsciwwKTtyZXR1cm4gMH1jYXRjaChlKXtpZih0eXBlb2YgRHQ9PSJ1bmRlZmluZWQifHwhKGUubmFtZT09PSJFcnJub0Vycm9yIikpdGhyb3cgZTtyZXR1cm4tZS5lcnJub319ZnVuY3Rpb24gV3QoZSx0LHIsbil7dHJ5e3Q9UHQuZ2V0U3RyKHQpO3ZhciBvPW4mMjU2O3ZhciBpPW4mNDA5NjtuPW4mfjY0MDA7QyghbiwidW5rbm93biBmbGFncyBpbiBfX3N5c2NhbGxfbmV3ZnN0YXRhdDogIi5jb25jYXQobikpO3Q9UHQuY2FsY3VsYXRlQXQoZSx0LGkpO3JldHVybiBQdC5kb1N0YXQobz9EdC5sc3RhdDpEdC5zdGF0LHQscil9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIEJ0KGUsdCxyLG4pe1B0LnZhcmFyZ3M9bjt0cnl7dD1QdC5nZXRTdHIodCk7dD1QdC5jYWxjdWxhdGVBdChlLHQpO3ZhciBvPW4/aXQoKTowO3JldHVybiBEdC5vcGVuKHQscixvKS5mZH1jYXRjaChlKXtpZih0eXBlb2YgRHQ9PSJ1bmRlZmluZWQifHwhKGUubmFtZT09PSJFcnJub0Vycm9yIikpdGhyb3cgZTtyZXR1cm4tZS5lcnJub319ZnVuY3Rpb24genQoZSx0LHIsbil7dHJ5e3Q9UHQuZ2V0U3RyKHQpO3Q9UHQuY2FsY3VsYXRlQXQoZSx0KTtpZihuPD0wKXJldHVybi0yODt2YXIgbz1EdC5yZWFkbGluayh0KTt2YXIgaT1NYXRoLm1pbihuLGR0KG8pKTt2YXIgYT1OW3IraV07UnQobyxyLG4rMSk7TltyK2ldPWE7cmV0dXJuIGl9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIEh0KGUpe3RyeXtlPVB0LmdldFN0cihlKTtEdC5ybWRpcihlKTtyZXR1cm4gMH1jYXRjaChlKXtpZih0eXBlb2YgRHQ9PSJ1bmRlZmluZWQifHwhKGUubmFtZT09PSJFcnJub0Vycm9yIikpdGhyb3cgZTtyZXR1cm4tZS5lcnJub319ZnVuY3Rpb24gR3QoZSx0KXt0cnl7ZT1QdC5nZXRTdHIoZSk7cmV0dXJuIFB0LmRvU3RhdChEdC5zdGF0LGUsdCl9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuLWUuZXJybm99fWZ1bmN0aW9uIFZ0KGUsdCxyKXt0cnl7dD1QdC5nZXRTdHIodCk7dD1QdC5jYWxjdWxhdGVBdChlLHQpO2lmKHI9PT0wKXtEdC51bmxpbmsodCl9ZWxzZSBpZihyPT09NTEyKXtEdC5ybWRpcih0KX1lbHNle3NlKCJJbnZhbGlkIGZsYWdzIHBhc3NlZCB0byB1bmxpbmthdCIpfXJldHVybiAwfWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX12YXIgS3Q9ZnVuY3Rpb24gZSgpe3NlKCJuYXRpdmUgY29kZSBjYWxsZWQgYWJvcnQoKSIpfTt2YXIgWXQ9MTt2YXIgcXQ9ZnVuY3Rpb24gZSgpe3JldHVybiBZdH07dmFyIFh0PWZ1bmN0aW9uIGUodCxyLG4pe3JldHVybiBSLmNvcHlXaXRoaW4odCxyLHIrbil9O3ZhciBKdD1mdW5jdGlvbiBlKHQscil7Qyh0PT10Pj4+MHx8dD09KHR8MCkpO0Mocj09PShyfDApKTtyZXR1cm4gcisyMDk3MTUyPj4+MDw0MTk0MzA1LSEhdD8odD4+PjApK3IqNDI5NDk2NzI5NjpOYU59O2Z1bmN0aW9uIFp0KGUsdCxyKXt2YXIgbj1KdChlLHQpO3ZhciBvPW5ldyBEYXRlKG4qMWUzKTtMW3I+PjJdPW8uZ2V0VVRDU2Vjb25kcygpO0xbcis0Pj4yXT1vLmdldFVUQ01pbnV0ZXMoKTtMW3IrOD4+Ml09by5nZXRVVENIb3VycygpO0xbcisxMj4+Ml09by5nZXRVVENEYXRlKCk7TFtyKzE2Pj4yXT1vLmdldFVUQ01vbnRoKCk7TFtyKzIwPj4yXT1vLmdldFVUQ0Z1bGxZZWFyKCktMTkwMDtMW3IrMjQ+PjJdPW8uZ2V0VVRDRGF5KCk7dmFyIGk9RGF0ZS5VVEMoby5nZXRVVENGdWxsWWVhcigpLDAsMSwwLDAsMCwwKTt2YXIgYT0oby5nZXRUaW1lKCktaSkvKDFlMyo2MCo2MCoyNCl8MDtMW3IrMjg+PjJdPWF9dmFyIFF0PWZ1bmN0aW9uIGUodCl7cmV0dXJuIHQlND09PTAmJih0JTEwMCE9PTB8fHQlNDAwPT09MCl9O3ZhciAkdD1bMCwzMSw2MCw5MSwxMjEsMTUyLDE4MiwyMTMsMjQ0LDI3NCwzMDUsMzM1XTt2YXIgZXI9WzAsMzEsNTksOTAsMTIwLDE1MSwxODEsMjEyLDI0MywyNzMsMzA0LDMzNF07dmFyIHRyPWZ1bmN0aW9uIGUodCl7dmFyIHI9UXQodC5nZXRGdWxsWWVhcigpKTt2YXIgbj1yPyR0OmVyO3ZhciBvPW5bdC5nZXRNb250aCgpXSt0LmdldERhdGUoKS0xO3JldHVybiBvfTtmdW5jdGlvbiBycihlLHQscil7dmFyIG49SnQoZSx0KTt2YXIgbz1uZXcgRGF0ZShuKjFlMyk7TFtyPj4yXT1vLmdldFNlY29uZHMoKTtMW3IrND4+Ml09by5nZXRNaW51dGVzKCk7TFtyKzg+PjJdPW8uZ2V0SG91cnMoKTtMW3IrMTI+PjJdPW8uZ2V0RGF0ZSgpO0xbcisxNj4+Ml09by5nZXRNb250aCgpO0xbcisyMD4+Ml09by5nZXRGdWxsWWVhcigpLTE5MDA7TFtyKzI0Pj4yXT1vLmdldERheSgpO3ZhciBpPXRyKG8pfDA7TFtyKzI4Pj4yXT1pO0xbciszNj4+Ml09LShvLmdldFRpbWV6b25lT2Zmc2V0KCkqNjApO3ZhciBhPW5ldyBEYXRlKG8uZ2V0RnVsbFllYXIoKSwwLDEpO3ZhciBzPW5ldyBEYXRlKG8uZ2V0RnVsbFllYXIoKSw2LDEpLmdldFRpbWV6b25lT2Zmc2V0KCk7dmFyIHU9YS5nZXRUaW1lem9uZU9mZnNldCgpO3ZhciBjPShzIT11JiZvLmdldFRpbWV6b25lT2Zmc2V0KCk9PU1hdGgubWluKHUscykpfDA7TFtyKzMyPj4yXT1jfXZhciBucj1mdW5jdGlvbiBlKHQpe3ZhciByPWZ1bmN0aW9uKCl7dmFyIGU9bmV3IERhdGUoTFt0KzIwPj4yXSsxOTAwLExbdCsxNj4+Ml0sTFt0KzEyPj4yXSxMW3QrOD4+Ml0sTFt0KzQ+PjJdLExbdD4+Ml0sMCk7dmFyIHI9TFt0KzMyPj4yXTt2YXIgbj1lLmdldFRpbWV6b25lT2Zmc2V0KCk7dmFyIG89bmV3IERhdGUoZS5nZXRGdWxsWWVhcigpLDAsMSk7dmFyIGk9bmV3IERhdGUoZS5nZXRGdWxsWWVhcigpLDYsMSkuZ2V0VGltZXpvbmVPZmZzZXQoKTt2YXIgYT1vLmdldFRpbWV6b25lT2Zmc2V0KCk7dmFyIHM9TWF0aC5taW4oYSxpKTtpZihyPDApe0xbdCszMj4+Ml09TnVtYmVyKGkhPWEmJnM9PW4pfWVsc2UgaWYocj4wIT0ocz09bikpe3ZhciB1PU1hdGgubWF4KGEsaSk7dmFyIGM9cj4wP3M6dTtlLnNldFRpbWUoZS5nZXRUaW1lKCkrKGMtbikqNmU0KX1MW3QrMjQ+PjJdPWUuZ2V0RGF5KCk7dmFyIGw9dHIoZSl8MDtMW3QrMjg+PjJdPWw7TFt0Pj4yXT1lLmdldFNlY29uZHMoKTtMW3QrND4+Ml09ZS5nZXRNaW51dGVzKCk7TFt0Kzg+PjJdPWUuZ2V0SG91cnMoKTtMW3QrMTI+PjJdPWUuZ2V0RGF0ZSgpO0xbdCsxNj4+Ml09ZS5nZXRNb250aCgpO0xbdCsyMD4+Ml09ZS5nZXRZZWFyKCk7dmFyIGY9ZS5nZXRUaW1lKCk7aWYoaXNOYU4oZikpe3JldHVybi0xfXJldHVybiBmLzFlM30oKTtyZXR1cm4gUWUoKFNlPXIsK01hdGguYWJzKFNlKT49MT9TZT4wPytNYXRoLmZsb29yKFNlLzQyOTQ5NjcyOTYpPj4+MDp+fitNYXRoLmNlaWwoKFNlLSsofn5TZT4+PjApKS80Mjk0OTY3Mjk2KT4+PjA6MCkpLHI+Pj4wfTtmdW5jdGlvbiBvcihlLHQscixuLG8saSxhLHMpe3ZhciB1PUp0KG8saSk7dHJ5e2lmKGlzTmFOKHUpKXJldHVybiA2MTt2YXIgYz1QdC5nZXRTdHJlYW1Gcm9tRkQobik7dmFyIGw9RHQubW1hcChjLGUsdSx0LHIpO3ZhciBmPWwucHRyO0xbYT4+Ml09bC5hbGxvY2F0ZWQ7VVtzPj4yXT1mO3JldHVybiAwfWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX1mdW5jdGlvbiBpcihlLHQscixuLG8saSxhKXt2YXIgcz1KdChpLGEpO3RyeXt2YXIgdT1QdC5nZXRTdHJlYW1Gcm9tRkQobyk7aWYociYyKXtQdC5kb01zeW5jKGUsdSx0LG4scyl9fWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybi1lLmVycm5vfX12YXIgYXI9ZnVuY3Rpb24gZSh0LHIsbixvKXt2YXIgaT0obmV3IERhdGUpLmdldEZ1bGxZZWFyKCk7dmFyIGE9bmV3IERhdGUoaSwwLDEpO3ZhciBzPW5ldyBEYXRlKGksNiwxKTt2YXIgdT1hLmdldFRpbWV6b25lT2Zmc2V0KCk7dmFyIGM9cy5nZXRUaW1lem9uZU9mZnNldCgpO3ZhciBsPU1hdGgubWF4KHUsYyk7VVt0Pj4yXT1sKjYwO0xbcj4+Ml09TnVtYmVyKHUhPWMpO3ZhciBmPWZ1bmN0aW9uIGUodCl7cmV0dXJuIHQudG9Mb2NhbGVUaW1lU3RyaW5nKHVuZGVmaW5lZCx7aG91cjEyOmZhbHNlLHRpbWVab25lTmFtZToic2hvcnQifSkuc3BsaXQoIiAiKVsxXX07dmFyIGQ9ZihhKTt2YXIgdj1mKHMpO0MoZCk7Qyh2KTtDKGR0KGQpPD0xNiwidGltZXpvbmUgbmFtZSB0cnVuY2F0ZWQgdG8gZml0IGluIFRaTkFNRV9NQVggKCIuY29uY2F0KGQsIikiKSk7QyhkdCh2KTw9MTYsInRpbWV6b25lIG5hbWUgdHJ1bmNhdGVkIHRvIGZpdCBpbiBUWk5BTUVfTUFYICgiLmNvbmNhdCh2LCIpIikpO2lmKGM8dSl7UnQoZCxuLDE3KTtSdCh2LG8sMTcpfWVsc2V7UnQoZCxvLDE3KTtSdCh2LG4sMTcpfX07dmFyIHNyPVtdO3ZhciB1cj1mdW5jdGlvbiBlKHQscil7QyhBcnJheS5pc0FycmF5KHNyKSk7QyhyJTE2PT0wKTtzci5sZW5ndGg9MDt2YXIgbjt3aGlsZShuPVJbdCsrXSl7dmFyIG89U3RyaW5nLmZyb21DaGFyQ29kZShuKTt2YXIgaT1bImQiLCJmIiwiaSIsInAiXTtDKGkuaW5jbHVkZXMobyksIkludmFsaWQgY2hhcmFjdGVyICIuY29uY2F0KG4sJygiJykuY29uY2F0KG8sJyIpIGluIHJlYWRFbUFzbUFyZ3MhIFVzZSBvbmx5IFsnKS5jb25jYXQoaSwnXSwgYW5kIGRvIG5vdCBzcGVjaWZ5ICJ2IiBmb3Igdm9pZCByZXR1cm4gYXJndW1lbnQuJykpO3ZhciBhPW4hPTEwNTthJj1uIT0xMTI7cis9YSYmciU4PzQ6MDtzci5wdXNoKG49PTExMj9VW3I+PjJdOm49PTEwNT9MW3I+PjJdOldbcj4+M10pO3IrPWE/ODo0fXJldHVybiBzcn07dmFyIGNyPWZ1bmN0aW9uIGUocixuLG8pe3ZhciBpPXVyKG4sbyk7QyhQZS5oYXNPd25Qcm9wZXJ0eShyKSwiTm8gRU1fQVNNIGNvbnN0YW50IGZvdW5kIGF0IGFkZHJlc3MgIi5jb25jYXQociwiLiAgVGhlIGxvYWRlZCBXZWJBc3NlbWJseSBmaWxlIGlzIGxpa2VseSBvdXQgb2Ygc3luYyB3aXRoIHRoZSBnZW5lcmF0ZWQgSmF2YVNjcmlwdC4iKSk7cmV0dXJuIFBlW3JdLmFwcGx5KFBlLHQoaSkpfTt2YXIgbHI9ZnVuY3Rpb24gZSh0LHIsbil7cmV0dXJuIGNyKHQscixuKX07dmFyIGZyPWZ1bmN0aW9uIGUoKXtyZXR1cm4gRGF0ZS5ub3coKX07dmFyIGRyPWZ1bmN0aW9uIGUoKXtyZXR1cm4gMjE0NzQ4MzY0OH07dmFyIHZyPWZ1bmN0aW9uIGUoKXtyZXR1cm4gZHIoKX07dmFyIG1yO21yPWZ1bmN0aW9uIGUoKXtyZXR1cm4gcGVyZm9ybWFuY2Uubm93KCl9O3ZhciBwcj1mdW5jdGlvbiBlKHQpe3ZhciByPU8uYnVmZmVyO3ZhciBuPSh0LXIuYnl0ZUxlbmd0aCs2NTUzNSkvNjU1MzY7dHJ5e08uZ3JvdyhuKTtCKCk7cmV0dXJuIDF9Y2F0Y2goZSl7TSgiZ3Jvd01lbW9yeTogQXR0ZW1wdGVkIHRvIGdyb3cgaGVhcCBmcm9tICIuY29uY2F0KHIuYnl0ZUxlbmd0aCwiIGJ5dGVzIHRvICIpLmNvbmNhdCh0LCIgYnl0ZXMsIGJ1dCBnb3QgZXJyb3I6ICIpLmNvbmNhdChlKSl9fTt2YXIgaHI9ZnVuY3Rpb24gZSh0KXt2YXIgcj1SLmxlbmd0aDt0Pj4+PTA7Qyh0PnIpO3ZhciBuPWRyKCk7aWYodD5uKXtNKCJDYW5ub3QgZW5sYXJnZSBtZW1vcnksIHJlcXVlc3RlZCAiLmNvbmNhdCh0LCIgYnl0ZXMsIGJ1dCB0aGUgbGltaXQgaXMgIikuY29uY2F0KG4sIiBieXRlcyEiKSk7cmV0dXJuIGZhbHNlfXZhciBvPWZ1bmN0aW9uIGUodCxyKXtyZXR1cm4gdCsoci10JXIpJXJ9O2Zvcih2YXIgaT0xO2k8PTQ7aSo9Mil7dmFyIGE9ciooMSsuMi9pKTthPU1hdGgubWluKGEsdCsxMDA2NjMyOTYpO3ZhciBzPU1hdGgubWluKG4sbyhNYXRoLm1heCh0LGEpLDY1NTM2KSk7dmFyIHU9cHIocyk7aWYodSl7cmV0dXJuIHRydWV9fU0oIkZhaWxlZCB0byBncm93IHRoZSBoZWFwIGZyb20gIi5jb25jYXQociwiIGJ5dGVzIHRvICIpLmNvbmNhdChzLCIgYnl0ZXMsIG5vdCBlbm91Z2ggbWVtb3J5ISIpKTtyZXR1cm4gZmFsc2V9O3ZhciB5cj17fTt2YXIgZ3I9ZnVuY3Rpb24gZSgpe3JldHVybiBtfHwiLi90aGlzLnByb2dyYW0ifTt2YXIgd3I9ZnVuY3Rpb24gZSgpe2lmKCF3ci5zdHJpbmdzKXt2YXIgdD0oKHR5cGVvZiBuYXZpZ2F0b3I9PT0idW5kZWZpbmVkIj8idW5kZWZpbmVkIjpiKG5hdmlnYXRvcikpPT0ib2JqZWN0IiYmbmF2aWdhdG9yLmxhbmd1YWdlcyYmbmF2aWdhdG9yLmxhbmd1YWdlc1swXXx8IkMiKS5yZXBsYWNlKCItIiwiXyIpKyIuVVRGLTgiO3ZhciByPXtVU0VSOiJ3ZWJfdXNlciIsTE9HTkFNRToid2ViX3VzZXIiLFBBVEg6Ii8iLFBXRDoiLyIsSE9NRToiL2hvbWUvd2ViX3VzZXIiLExBTkc6dCxfOmdyKCl9O2Zvcih2YXIgbiBpbiB5cil7aWYoeXJbbl09PT11bmRlZmluZWQpZGVsZXRlIHJbbl07ZWxzZSByW25dPXlyW25dfXZhciBvPVtdO2Zvcih2YXIgbiBpbiByKXtvLnB1c2goIiIuY29uY2F0KG4sIj0iKS5jb25jYXQocltuXSkpfXdyLnN0cmluZ3M9b31yZXR1cm4gd3Iuc3RyaW5nc307dmFyIF9yPWZ1bmN0aW9uIGUodCxyKXtmb3IodmFyIG49MDtuPHQubGVuZ3RoOysrbil7Qyh0LmNoYXJDb2RlQXQobik9PT0odC5jaGFyQ29kZUF0KG4pJjI1NSkpO05bcisrXT10LmNoYXJDb2RlQXQobil9TltyXT0wfTt2YXIgRXI9ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPTA7d3IoKS5mb3JFYWNoKChmdW5jdGlvbihlLG8pe3ZhciBpPXIrbjtVW3Qrbyo0Pj4yXT1pO19yKGUsaSk7bis9ZS5sZW5ndGgrMX0pKTtyZXR1cm4gMH07dmFyIGJyPWZ1bmN0aW9uIGUodCxyKXt2YXIgbj13cigpO1VbdD4+Ml09bi5sZW5ndGg7dmFyIG89MDtuLmZvckVhY2goKGZ1bmN0aW9uKGUpe3JldHVybiBvKz1lLmxlbmd0aCsxfSkpO1Vbcj4+Ml09bztyZXR1cm4gMH07dmFyIFNyPTA7dmFyIGtyPWZ1bmN0aW9uIGUoKXtyZXR1cm4gSWV8fFNyPjB9O3ZhciBUcj1mdW5jdGlvbiBlKHQpe1A9dDtpZigha3IoKSl7dmFyIHI7KHI9U1sib25FeGl0Il0pPT09bnVsbHx8cj09PXZvaWQgMHx8ci5jYWxsKFMsdCk7RD10cnVlfXkodCxuZXcgQ2UodCkpfTt2YXIgTXI9ZnVuY3Rpb24gZSh0LHIpe1A9dDtyaSgpO2lmKGtyKCkmJiFyKXt2YXIgbj0icHJvZ3JhbSBleGl0ZWQgKHdpdGggc3RhdHVzOiAiLmNvbmNhdCh0LCIpLCBidXQga2VlcFJ1bnRpbWVBbGl2ZSgpIGlzIHNldCAoY291bnRlcj0iKS5jb25jYXQoU3IsIikgZHVlIHRvIGFuIGFzeW5jIG9wZXJhdGlvbiwgc28gaGFsdGluZyBleGVjdXRpb24gYnV0IG5vdCBleGl0aW5nIHRoZSBydW50aW1lIG9yIHByZXZlbnRpbmcgZnVydGhlciBhc3luYyBleGVjdXRpb24gKHlvdSBjYW4gdXNlIGVtc2NyaXB0ZW5fZm9yY2VfZXhpdCwgaWYgeW91IHdhbnQgdG8gZm9yY2UgYSB0cnVlIHNodXRkb3duKSIpO00obil9VHIodCl9O3ZhciBBcj1NcjtmdW5jdGlvbiBGcihlKXt0cnl7dmFyIHQ9UHQuZ2V0U3RyZWFtRnJvbUZEKGUpO0R0LmNsb3NlKHQpO3JldHVybiAwfWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybiBlLmVycm5vfX12YXIgT3I9ZnVuY3Rpb24gZSh0LHIsbixvKXt2YXIgaT0wO2Zvcih2YXIgYT0wO2E8bjthKyspe3ZhciBzPVVbcj4+Ml07dmFyIHU9VVtyKzQ+PjJdO3IrPTg7dmFyIGM9RHQucmVhZCh0LE4scyx1LG8pO2lmKGM8MClyZXR1cm4tMTtpKz1jO2lmKGM8dSlicmVhaztpZih0eXBlb2YgbyE9InVuZGVmaW5lZCIpe28rPWN9fXJldHVybiBpfTtmdW5jdGlvbiBEcihlLHQscixuKXt0cnl7dmFyIG89UHQuZ2V0U3RyZWFtRnJvbUZEKGUpO3ZhciBpPU9yKG8sdCxyKTtVW24+PjJdPWk7cmV0dXJuIDB9Y2F0Y2goZSl7aWYodHlwZW9mIER0PT0idW5kZWZpbmVkInx8IShlLm5hbWU9PT0iRXJybm9FcnJvciIpKXRocm93IGU7cmV0dXJuIGUuZXJybm99fWZ1bmN0aW9uIFByKGUsdCxyLG4sbyl7dmFyIGk9SnQodCxyKTt0cnl7aWYoaXNOYU4oaSkpcmV0dXJuIDYxO3ZhciBhPVB0LmdldFN0cmVhbUZyb21GRChlKTtEdC5sbHNlZWsoYSxpLG4pO2tlPVthLnBvc2l0aW9uPj4+MCwoU2U9YS5wb3NpdGlvbiwrTWF0aC5hYnMoU2UpPj0xP1NlPjA/K01hdGguZmxvb3IoU2UvNDI5NDk2NzI5Nik+Pj4wOn5+K01hdGguY2VpbCgoU2UtKyh+flNlPj4+MCkpLzQyOTQ5NjcyOTYpPj4+MDowKV0sTFtvPj4yXT1rZVswXSxMW28rND4+Ml09a2VbMV07aWYoYS5nZXRkZW50cyYmaT09PTAmJm49PT0wKWEuZ2V0ZGVudHM9bnVsbDtyZXR1cm4gMH1jYXRjaChlKXtpZih0eXBlb2YgRHQ9PSJ1bmRlZmluZWQifHwhKGUubmFtZT09PSJFcnJub0Vycm9yIikpdGhyb3cgZTtyZXR1cm4gZS5lcnJub319dmFyIENyPWZ1bmN0aW9uIGUodCxyLG4sbyl7dmFyIGk9MDtmb3IodmFyIGE9MDthPG47YSsrKXt2YXIgcz1VW3I+PjJdO3ZhciB1PVVbcis0Pj4yXTtyKz04O3ZhciBjPUR0LndyaXRlKHQsTixzLHUsbyk7aWYoYzwwKXJldHVybi0xO2krPWM7aWYodHlwZW9mIG8hPSJ1bmRlZmluZWQiKXtvKz1jfX1yZXR1cm4gaX07ZnVuY3Rpb24gTnIoZSx0LHIsbil7dHJ5e3ZhciBvPVB0LmdldFN0cmVhbUZyb21GRChlKTt2YXIgaT1DcihvLHQscik7VVtuPj4yXT1pO3JldHVybiAwfWNhdGNoKGUpe2lmKHR5cGVvZiBEdD09InVuZGVmaW5lZCJ8fCEoZS5uYW1lPT09IkVycm5vRXJyb3IiKSl0aHJvdyBlO3JldHVybiBlLmVycm5vfX12YXIgUnI9ZnVuY3Rpb24gZSh0LHIpe3ZhciBuPTA7Zm9yKHZhciBvPTA7bzw9cjtuKz10W28rK10pe31yZXR1cm4gbn07dmFyIElyPVszMSwyOSwzMSwzMCwzMSwzMCwzMSwzMSwzMCwzMSwzMCwzMV07dmFyIGpyPVszMSwyOCwzMSwzMCwzMSwzMCwzMSwzMSwzMCwzMSwzMCwzMV07dmFyIExyPWZ1bmN0aW9uIGUodCxyKXt2YXIgbj1uZXcgRGF0ZSh0LmdldFRpbWUoKSk7d2hpbGUocj4wKXt2YXIgbz1RdChuLmdldEZ1bGxZZWFyKCkpO3ZhciBpPW4uZ2V0TW9udGgoKTt2YXIgYT0obz9JcjpqcilbaV07aWYocj5hLW4uZ2V0RGF0ZSgpKXtyLT1hLW4uZ2V0RGF0ZSgpKzE7bi5zZXREYXRlKDEpO2lmKGk8MTEpe24uc2V0TW9udGgoaSsxKX1lbHNle24uc2V0TW9udGgoMCk7bi5zZXRGdWxsWWVhcihuLmdldEZ1bGxZZWFyKCkrMSl9fWVsc2V7bi5zZXREYXRlKG4uZ2V0RGF0ZSgpK3IpO3JldHVybiBufX1yZXR1cm4gbn07dmFyIFVyPWZ1bmN0aW9uIGUodCxyKXtDKHQubGVuZ3RoPj0wLCJ3cml0ZUFycmF5VG9NZW1vcnkgYXJyYXkgbXVzdCBoYXZlIGEgbGVuZ3RoIChzaG91bGQgYmUgYW4gYXJyYXkgb3IgdHlwZWQgYXJyYXkpIik7Ti5zZXQodCxyKX07dmFyIHhyPWZ1bmN0aW9uIGUodCxyLG4sbyl7dmFyIGk9VVtvKzQwPj4yXTt2YXIgYT17dG1fc2VjOkxbbz4+Ml0sdG1fbWluOkxbbys0Pj4yXSx0bV9ob3VyOkxbbys4Pj4yXSx0bV9tZGF5OkxbbysxMj4+Ml0sdG1fbW9uOkxbbysxNj4+Ml0sdG1feWVhcjpMW28rMjA+PjJdLHRtX3dkYXk6TFtvKzI0Pj4yXSx0bV95ZGF5OkxbbysyOD4+Ml0sdG1faXNkc3Q6TFtvKzMyPj4yXSx0bV9nbXRvZmY6TFtvKzM2Pj4yXSx0bV96b25lOmk/SGUoaSk6IiJ9O3ZhciBzPUhlKG4pO3ZhciB1PXsiJWMiOiIlYSAlYiAlZCAlSDolTTolUyAlWSIsIiVEIjoiJW0vJWQvJXkiLCIlRiI6IiVZLSVtLSVkIiwiJWgiOiIlYiIsIiVyIjoiJUk6JU06JVMgJXAiLCIlUiI6IiVIOiVNIiwiJVQiOiIlSDolTTolUyIsIiV4IjoiJW0vJWQvJXkiLCIlWCI6IiVIOiVNOiVTIiwiJUVjIjoiJWMiLCIlRUMiOiIlQyIsIiVFeCI6IiVtLyVkLyV5IiwiJUVYIjoiJUg6JU06JVMiLCIlRXkiOiIleSIsIiVFWSI6IiVZIiwiJU9kIjoiJWQiLCIlT2UiOiIlZSIsIiVPSCI6IiVIIiwiJU9JIjoiJUkiLCIlT20iOiIlbSIsIiVPTSI6IiVNIiwiJU9TIjoiJVMiLCIlT3UiOiIldSIsIiVPVSI6IiVVIiwiJU9WIjoiJVYiLCIlT3ciOiIldyIsIiVPVyI6IiVXIiwiJU95IjoiJXkifTtmb3IodmFyIGMgaW4gdSl7cz1zLnJlcGxhY2UobmV3IFJlZ0V4cChjLCJnIiksdVtjXSl9dmFyIGw9WyJTdW5kYXkiLCJNb25kYXkiLCJUdWVzZGF5IiwiV2VkbmVzZGF5IiwiVGh1cnNkYXkiLCJGcmlkYXkiLCJTYXR1cmRheSJdO3ZhciBmPVsiSmFudWFyeSIsIkZlYnJ1YXJ5IiwiTWFyY2giLCJBcHJpbCIsIk1heSIsIkp1bmUiLCJKdWx5IiwiQXVndXN0IiwiU2VwdGVtYmVyIiwiT2N0b2JlciIsIk5vdmVtYmVyIiwiRGVjZW1iZXIiXTtmdW5jdGlvbiBkKGUsdCxyKXt2YXIgbj10eXBlb2YgZT09Im51bWJlciI/ZS50b1N0cmluZygpOmV8fCIiO3doaWxlKG4ubGVuZ3RoPHQpe249clswXStufXJldHVybiBufWZ1bmN0aW9uIHYoZSx0KXtyZXR1cm4gZChlLHQsIjAiKX1mdW5jdGlvbiBtKGUsdCl7ZnVuY3Rpb24gcihlKXtyZXR1cm4gZTwwPy0xOmU+MD8xOjB9dmFyIG47aWYoKG49cihlLmdldEZ1bGxZZWFyKCktdC5nZXRGdWxsWWVhcigpKSk9PT0wKXtpZigobj1yKGUuZ2V0TW9udGgoKS10LmdldE1vbnRoKCkpKT09PTApe249cihlLmdldERhdGUoKS10LmdldERhdGUoKSl9fXJldHVybiBufWZ1bmN0aW9uIHAoZSl7c3dpdGNoKGUuZ2V0RGF5KCkpe2Nhc2UgMDpyZXR1cm4gbmV3IERhdGUoZS5nZXRGdWxsWWVhcigpLTEsMTEsMjkpO2Nhc2UgMTpyZXR1cm4gZTtjYXNlIDI6cmV0dXJuIG5ldyBEYXRlKGUuZ2V0RnVsbFllYXIoKSwwLDMpO2Nhc2UgMzpyZXR1cm4gbmV3IERhdGUoZS5nZXRGdWxsWWVhcigpLDAsMik7Y2FzZSA0OnJldHVybiBuZXcgRGF0ZShlLmdldEZ1bGxZZWFyKCksMCwxKTtjYXNlIDU6cmV0dXJuIG5ldyBEYXRlKGUuZ2V0RnVsbFllYXIoKS0xLDExLDMxKTtjYXNlIDY6cmV0dXJuIG5ldyBEYXRlKGUuZ2V0RnVsbFllYXIoKS0xLDExLDMwKX19ZnVuY3Rpb24gaChlKXt2YXIgdD1McihuZXcgRGF0ZShlLnRtX3llYXIrMTkwMCwwLDEpLGUudG1feWRheSk7dmFyIHI9bmV3IERhdGUodC5nZXRGdWxsWWVhcigpLDAsNCk7dmFyIG49bmV3IERhdGUodC5nZXRGdWxsWWVhcigpKzEsMCw0KTt2YXIgbz1wKHIpO3ZhciBpPXAobik7aWYobShvLHQpPD0wKXtpZihtKGksdCk8PTApe3JldHVybiB0LmdldEZ1bGxZZWFyKCkrMX1yZXR1cm4gdC5nZXRGdWxsWWVhcigpfXJldHVybiB0LmdldEZ1bGxZZWFyKCktMX12YXIgeT17IiVhIjpmdW5jdGlvbiBlKHQpe3JldHVybiBsW3QudG1fd2RheV0uc3Vic3RyaW5nKDAsMyl9LCIlQSI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gbFt0LnRtX3dkYXldfSwiJWIiOmZ1bmN0aW9uIGUodCl7cmV0dXJuIGZbdC50bV9tb25dLnN1YnN0cmluZygwLDMpfSwiJUIiOmZ1bmN0aW9uIGUodCl7cmV0dXJuIGZbdC50bV9tb25dfSwiJUMiOmZ1bmN0aW9uIGUodCl7dmFyIHI9dC50bV95ZWFyKzE5MDA7cmV0dXJuIHYoci8xMDB8MCwyKX0sIiVkIjpmdW5jdGlvbiBlKHQpe3JldHVybiB2KHQudG1fbWRheSwyKX0sIiVlIjpmdW5jdGlvbiBlKHQpe3JldHVybiBkKHQudG1fbWRheSwyLCIgIil9LCIlZyI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gaCh0KS50b1N0cmluZygpLnN1YnN0cmluZygyKX0sIiVHIjpoLCIlSCI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdih0LnRtX2hvdXIsMil9LCIlSSI6ZnVuY3Rpb24gZSh0KXt2YXIgcj10LnRtX2hvdXI7aWYocj09MClyPTEyO2Vsc2UgaWYocj4xMilyLT0xMjtyZXR1cm4gdihyLDIpfSwiJWoiOmZ1bmN0aW9uIGUodCl7cmV0dXJuIHYodC50bV9tZGF5K1JyKFF0KHQudG1feWVhcisxOTAwKT9Jcjpqcix0LnRtX21vbi0xKSwzKX0sIiVtIjpmdW5jdGlvbiBlKHQpe3JldHVybiB2KHQudG1fbW9uKzEsMil9LCIlTSI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdih0LnRtX21pbiwyKX0sIiVuIjpmdW5jdGlvbiBlKCl7cmV0dXJuIlxuIn0sIiVwIjpmdW5jdGlvbiBlKHQpe2lmKHQudG1faG91cj49MCYmdC50bV9ob3VyPDEyKXtyZXR1cm4iQU0ifXJldHVybiJQTSJ9LCIlUyI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4gdih0LnRtX3NlYywyKX0sIiV0IjpmdW5jdGlvbiBlKCl7cmV0dXJuIlx0In0sIiV1IjpmdW5jdGlvbiBlKHQpe3JldHVybiB0LnRtX3dkYXl8fDd9LCIlVSI6ZnVuY3Rpb24gZSh0KXt2YXIgcj10LnRtX3lkYXkrNy10LnRtX3dkYXk7cmV0dXJuIHYoTWF0aC5mbG9vcihyLzcpLDIpfSwiJVYiOmZ1bmN0aW9uIGUodCl7dmFyIHI9TWF0aC5mbG9vcigodC50bV95ZGF5KzctKHQudG1fd2RheSs2KSU3KS83KTtpZigodC50bV93ZGF5KzM3MS10LnRtX3lkYXktMiklNzw9Mil7cisrfWlmKCFyKXtyPTUyO3ZhciBuPSh0LnRtX3dkYXkrNy10LnRtX3lkYXktMSklNztpZihuPT00fHxuPT01JiZRdCh0LnRtX3llYXIlNDAwLTEpKXtyKyt9fWVsc2UgaWYocj09NTMpe3ZhciBvPSh0LnRtX3dkYXkrMzcxLXQudG1feWRheSklNztpZihvIT00JiYobyE9M3x8IVF0KHQudG1feWVhcikpKXI9MX1yZXR1cm4gdihyLDIpfSwiJXciOmZ1bmN0aW9uIGUodCl7cmV0dXJuIHQudG1fd2RheX0sIiVXIjpmdW5jdGlvbiBlKHQpe3ZhciByPXQudG1feWRheSs3LSh0LnRtX3dkYXkrNiklNztyZXR1cm4gdihNYXRoLmZsb29yKHIvNyksMil9LCIleSI6ZnVuY3Rpb24gZSh0KXtyZXR1cm4odC50bV95ZWFyKzE5MDApLnRvU3RyaW5nKCkuc3Vic3RyaW5nKDIpfSwiJVkiOmZ1bmN0aW9uIGUodCl7cmV0dXJuIHQudG1feWVhcisxOTAwfSwiJXoiOmZ1bmN0aW9uIGUodCl7dmFyIHI9dC50bV9nbXRvZmY7dmFyIG49cj49MDtyPU1hdGguYWJzKHIpLzYwO3I9ci82MCoxMDArciU2MDtyZXR1cm4obj8iKyI6Ii0iKStTdHJpbmcoIjAwMDAiK3IpLnNsaWNlKC00KX0sIiVaIjpmdW5jdGlvbiBlKHQpe3JldHVybiB0LnRtX3pvbmV9LCIlJSI6ZnVuY3Rpb24gZSgpe3JldHVybiIlIn19O3M9cy5yZXBsYWNlKC8lJS9nLCJcMFwwIik7Zm9yKHZhciBjIGluIHkpe2lmKHMuaW5jbHVkZXMoYykpe3M9cy5yZXBsYWNlKG5ldyBSZWdFeHAoYywiZyIpLHlbY10oYSkpfX1zPXMucmVwbGFjZSgvXDBcMC9nLCIlIik7dmFyIGc9bXQocyxmYWxzZSk7aWYoZy5sZW5ndGg+cil7cmV0dXJuIDB9VXIoZyx0KTtyZXR1cm4gZy5sZW5ndGgtMX07dmFyIFdyPWZ1bmN0aW9uIGUodCxyLG4sbyxpKXtyZXR1cm4geHIodCxyLG4sbyl9O3ZhciBCcj1bXTt2YXIgenI7dmFyIEhyPWZ1bmN0aW9uIGUodCl7dmFyIHI9QnJbdF07aWYoIXIpe2lmKHQ+PUJyLmxlbmd0aClCci5sZW5ndGg9dCsxO0JyW3RdPXI9enIuZ2V0KHQpfUMoenIuZ2V0KHQpPT1yLCJKYXZhU2NyaXB0LXNpZGUgV2FzbSBmdW5jdGlvbiB0YWJsZSBtaXJyb3IgaXMgb3V0IG9mIGRhdGUhIik7cmV0dXJuIHJ9O3ZhciBHcj1mdW5jdGlvbiBlKHQpe3ZhciByPVNbIl8iK3RdO0MociwiQ2Fubm90IGNhbGwgdW5rbm93biBmdW5jdGlvbiAiK3QrIiwgbWFrZSBzdXJlIGl0IGlzIGV4cG9ydGVkIik7cmV0dXJuIHJ9O3ZhciBWcj1mdW5jdGlvbiBlKHQpe3JldHVybiB6bih0KX07dmFyIEtyPWZ1bmN0aW9uIGUodCl7dmFyIHI9ZHQodCkrMTt2YXIgbj1WcihyKTtSdCh0LG4scik7cmV0dXJuIG59O3ZhciBZcj1mdW5jdGlvbiBlKHQscixuLG8saSl7dmFyIGE9e3N0cmluZzpmdW5jdGlvbiBlKHQpe3ZhciByPTA7aWYodCE9PW51bGwmJnQhPT11bmRlZmluZWQmJnQhPT0wKXtyPUtyKHQpfXJldHVybiByfSxhcnJheTpmdW5jdGlvbiBlKHQpe3ZhciByPVZyKHQubGVuZ3RoKTtVcih0LHIpO3JldHVybiByfX07ZnVuY3Rpb24gcyhlKXtpZihyPT09InN0cmluZyIpe3JldHVybiBIZShlKX1pZihyPT09ImJvb2xlYW4iKXJldHVybiBCb29sZWFuKGUpO3JldHVybiBlfXZhciB1PUdyKHQpO3ZhciBjPVtdO3ZhciBsPTA7QyhyIT09ImFycmF5IiwnUmV0dXJuIHR5cGUgc2hvdWxkIG5vdCBiZSAiYXJyYXkiLicpO2lmKG8pe2Zvcih2YXIgZj0wO2Y8by5sZW5ndGg7ZisrKXt2YXIgZD1hW25bZl1dO2lmKGQpe2lmKGw9PT0wKWw9eGUoKTtjW2ZdPWQob1tmXSl9ZWxzZXtjW2ZdPW9bZl19fX12YXIgdj11LmFwcGx5KHZvaWQgMCxjKTtmdW5jdGlvbiBtKGUpe2lmKGwhPT0wKVVlKGwpO3JldHVybiBzKGUpfXY9bSh2KTtyZXR1cm4gdn07dmFyIHFyPWZ1bmN0aW9uIGUodCxyLG4sbyl7cmV0dXJuIGZ1bmN0aW9uKCl7Zm9yKHZhciBlPWFyZ3VtZW50cy5sZW5ndGgsaT1uZXcgQXJyYXkoZSksYT0wO2E8ZTthKyspe2lbYV09YXJndW1lbnRzW2FdfXJldHVybiBZcih0LHIsbixpLG8pfX07dmFyIFhyPWZ1bmN0aW9uIGUodCxyKXtDKHQ8MTYzODQpO2lmKHQ8MTI4KXtyLnB1c2godCl9ZWxzZXtyLnB1c2godCUxMjh8MTI4LHQ+PjcpfX07dmFyIEpyPWZ1bmN0aW9uIGUodCl7QyghdC5pbmNsdWRlcygiaiIpLCJpNjQgbm90IHBlcm1pdHRlZCBpbiBmdW5jdGlvbiBzaWduYXR1cmVzIHdoZW4gV0FTTV9CSUdJTlQgaXMgZGlzYWJsZWQiKTt2YXIgcj17aToiaTMyIixqOiJpNjQiLGY6ImYzMiIsZDoiZjY0IixlOiJleHRlcm5yZWYiLHA6ImkzMiJ9O3ZhciBuPXtwYXJhbWV0ZXJzOltdLHJlc3VsdHM6dFswXT09InYiP1tdOltyW3RbMF1dXX07Zm9yKHZhciBvPTE7bzx0Lmxlbmd0aDsrK28pe0ModFtvXWluIHIsImludmFsaWQgc2lnbmF0dXJlIGNoYXI6ICIrdFtvXSk7bi5wYXJhbWV0ZXJzLnB1c2goclt0W29dXSl9cmV0dXJuIG59O3ZhciBacj1mdW5jdGlvbiBlKHQscil7dmFyIG49dC5zbGljZSgwLDEpO3ZhciBvPXQuc2xpY2UoMSk7dmFyIGk9e2k6MTI3LHA6MTI3LGo6MTI2LGY6MTI1LGQ6MTI0LGU6MTExfTtyLnB1c2goOTYpO1hyKG8ubGVuZ3RoLHIpO2Zvcih2YXIgYT0wO2E8by5sZW5ndGg7KythKXtDKG9bYV1pbiBpLCJpbnZhbGlkIHNpZ25hdHVyZSBjaGFyOiAiK29bYV0pO3IucHVzaChpW29bYV1dKX1pZihuPT0idiIpe3IucHVzaCgwKX1lbHNle3IucHVzaCgxLGlbbl0pfX07dmFyIFFyPWZ1bmN0aW9uIGUodCxyKXtDKCFyLmluY2x1ZGVzKCJqIiksImk2NCBub3QgcGVybWl0dGVkIGluIGZ1bmN0aW9uIHNpZ25hdHVyZXMgd2hlbiBXQVNNX0JJR0lOVCBpcyBkaXNhYmxlZCIpO2lmKHR5cGVvZiBXZWJBc3NlbWJseS5GdW5jdGlvbj09ImZ1bmN0aW9uIil7cmV0dXJuIG5ldyBXZWJBc3NlbWJseS5GdW5jdGlvbihKcihyKSx0KX12YXIgbj1bMV07WnIocixuKTt2YXIgbz1bMCw5NywxMTUsMTA5LDEsMCwwLDAsMV07WHIobi5sZW5ndGgsbyk7by5wdXNoLmFwcGx5KG8sbik7by5wdXNoKDIsNywxLDEsMTAxLDEsMTAyLDAsMCw3LDUsMSwxLDEwMiwwLDApO3ZhciBpPW5ldyBXZWJBc3NlbWJseS5Nb2R1bGUobmV3IFVpbnQ4QXJyYXkobykpO3ZhciBhPW5ldyBXZWJBc3NlbWJseS5JbnN0YW5jZShpLHtlOntmOnR9fSk7dmFyIHM9YS5leHBvcnRzWyJmIl07cmV0dXJuIHN9O3ZhciAkcj1mdW5jdGlvbiBlKHQscil7aWYoZW4pe2Zvcih2YXIgbj10O248dCtyO24rKyl7dmFyIG89SHIobik7aWYobyl7ZW4uc2V0KG8sbil9fX19O3ZhciBlbjt2YXIgdG49ZnVuY3Rpb24gZSh0KXtpZighZW4pe2VuPW5ldyBXZWFrTWFwOyRyKDAsenIubGVuZ3RoKX1yZXR1cm4gZW4uZ2V0KHQpfHwwfTt2YXIgcm49W107dmFyIG5uPWZ1bmN0aW9uIGUoKXtpZihybi5sZW5ndGgpe3JldHVybiBybi5wb3AoKX10cnl7enIuZ3JvdygxKX1jYXRjaChlKXtpZighKGUgaW5zdGFuY2VvZiBSYW5nZUVycm9yKSl7dGhyb3cgZX10aHJvdyJVbmFibGUgdG8gZ3JvdyB3YXNtIHRhYmxlLiBTZXQgQUxMT1dfVEFCTEVfR1JPV1RILiJ9cmV0dXJuIHpyLmxlbmd0aC0xfTt2YXIgb249ZnVuY3Rpb24gZSh0LHIpe3pyLnNldCh0LHIpO0JyW3RdPXpyLmdldCh0KX07dmFyIGFuPWZ1bmN0aW9uIGUodCxyKXtDKHR5cGVvZiB0IT0idW5kZWZpbmVkIik7dmFyIG49dG4odCk7aWYobil7cmV0dXJuIG59dmFyIG89bm4oKTt0cnl7b24obyx0KX1jYXRjaChlKXtpZighKGUgaW5zdGFuY2VvZiBUeXBlRXJyb3IpKXt0aHJvdyBlfUModHlwZW9mIHIhPSJ1bmRlZmluZWQiLCJNaXNzaW5nIHNpZ25hdHVyZSBhcmd1bWVudCB0byBhZGRGdW5jdGlvbjogIit0KTt2YXIgaT1Rcih0LHIpO29uKG8saSl9ZW4uc2V0KHQsbyk7cmV0dXJuIG99O3ZhciBzbj1EdC5jcmVhdGVQYXRoO3ZhciB1bj1mdW5jdGlvbiBlKHQpe3JldHVybiBEdC51bmxpbmsodCl9O3ZhciBjbj1EdC5jcmVhdGVMYXp5RmlsZTt2YXIgbG49RHQuY3JlYXRlRGV2aWNlO3ZhciBmbj1mdW5jdGlvbiBlKHQpe3JldHVybiBWbih0KX07U1siaW5jcmVtZW50RXhjZXB0aW9uUmVmY291bnQiXT1mbjt2YXIgZG49ZnVuY3Rpb24gZSh0KXtyZXR1cm4gR24odCl9O1NbImRlY3JlbWVudEV4Y2VwdGlvblJlZmNvdW50Il09ZG47dmFyIHZuPWZ1bmN0aW9uIGUodCl7dmFyIHI9eGUoKTt2YXIgbj1Wcig0KTt2YXIgbz1Wcig0KTtLbih0LG4sbyk7dmFyIGk9VVtuPj4yXTt2YXIgYT1VW28+PjJdO3ZhciBzPUhlKGkpO0VuKGkpO3ZhciB1O2lmKGEpe3U9SGUoYSk7RW4oYSl9VWUocik7cmV0dXJuW3MsdV19O3ZhciBtbj1mdW5jdGlvbiBlKHQpe3JldHVybiB2bih0KX07U1siZ2V0RXhjZXB0aW9uTWVzc2FnZSJdPW1uO0R0LmNyZWF0ZVByZWxvYWRlZEZpbGU9VHQ7RHQuc3RhdGljSW5pdCgpO1NbIkZTX2NyZWF0ZVBhdGgiXT1EdC5jcmVhdGVQYXRoO1NbIkZTX2NyZWF0ZURhdGFGaWxlIl09RHQuY3JlYXRlRGF0YUZpbGU7U1siRlNfY3JlYXRlUHJlbG9hZGVkRmlsZSJdPUR0LmNyZWF0ZVByZWxvYWRlZEZpbGU7U1siRlNfdW5saW5rIl09RHQudW5saW5rO1NbIkZTX2NyZWF0ZUxhenlGaWxlIl09RHQuY3JlYXRlTGF6eUZpbGU7U1siRlNfY3JlYXRlRGV2aWNlIl09RHQuY3JlYXRlRGV2aWNlO2Z1bmN0aW9uIHBuKCl7TWUoImZldGNoU2V0dGluZ3MiKX12YXIgaG49e19fYXNzZXJ0X2ZhaWw6R2UsX19jeGFfYmVnaW5fY2F0Y2g6WWUsX19jeGFfZW5kX2NhdGNoOlhlLF9fY3hhX2ZpbmRfbWF0Y2hpbmdfY2F0Y2hfMjpldCxfX2N4YV9maW5kX21hdGNoaW5nX2NhdGNoXzM6dHQsX19jeGFfcmV0aHJvdzpydCxfX2N4YV90aHJvdzpudCxfX2N4YV91bmNhdWdodF9leGNlcHRpb25zOm90LF9fcmVzdW1lRXhjZXB0aW9uOlplLF9fc3lzY2FsbF9mY250bDY0OkN0LF9fc3lzY2FsbF9mc3RhdDY0Ok50LF9fc3lzY2FsbF9nZXRjd2Q6SXQsX19zeXNjYWxsX2dldGRlbnRzNjQ6anQsX19zeXNjYWxsX2lvY3RsOkx0LF9fc3lzY2FsbF9sc3RhdDY0OlV0LF9fc3lzY2FsbF9ta2RpcmF0Onh0LF9fc3lzY2FsbF9uZXdmc3RhdGF0Old0LF9fc3lzY2FsbF9vcGVuYXQ6QnQsX19zeXNjYWxsX3JlYWRsaW5rYXQ6enQsX19zeXNjYWxsX3JtZGlyOkh0LF9fc3lzY2FsbF9zdGF0NjQ6R3QsX19zeXNjYWxsX3VubGlua2F0OlZ0LF9hYm9ydF9qczpLdCxfZW1zY3JpcHRlbl9nZXRfbm93X2lzX21vbm90b25pYzpxdCxfZW1zY3JpcHRlbl9tZW1jcHlfanM6WHQsX2dtdGltZV9qczpadCxfbG9jYWx0aW1lX2pzOnJyLF9ta3RpbWVfanM6bnIsX21tYXBfanM6b3IsX211bm1hcF9qczppcixfdHpzZXRfanM6YXIsZW1zY3JpcHRlbl9hc21fY29uc3RfaW50OmxyLGVtc2NyaXB0ZW5fZGF0ZV9ub3c6ZnIsZW1zY3JpcHRlbl9nZXRfaGVhcF9tYXg6dnIsZW1zY3JpcHRlbl9nZXRfbm93Om1yLGVtc2NyaXB0ZW5fcmVzaXplX2hlYXA6aHIsZW52aXJvbl9nZXQ6RXIsZW52aXJvbl9zaXplc19nZXQ6YnIsZXhpdDpBcixmZF9jbG9zZTpGcixmZF9yZWFkOkRyLGZkX3NlZWs6UHIsZmRfd3JpdGU6TnIsaW52b2tlX2RpaWk6V28saW52b2tlX2ZpOlJvLGludm9rZV9maWlpOnhvLGludm9rZV9pOkNvLGludm9rZV9paTpUbyxpbnZva2VfaWlmOklvLGludm9rZV9paWk6TW8saW52b2tlX2lpaWk6U28saW52b2tlX2lpaWlpOl9vLGludm9rZV9paWlpaWQ6am8saW52b2tlX2lpaWlpaTpFbyxpbnZva2VfaWlpaWlpaTpQbyxpbnZva2VfaWlpaWlpaWk6Tm8saW52b2tlX2lpaWlpaWlpaWlpOkxvLGludm9rZV9paWlpaWlpaWlpaWk6em8saW52b2tlX2lpaWlpaWlpaWlpaWk6VW8saW52b2tlX2lpaWlpajpYbyxpbnZva2VfaWlqOktvLGludm9rZV9qOllvLGludm9rZV9qaTpxbyxpbnZva2VfamlpaWk6Sm8saW52b2tlX3Y6RG8saW52b2tlX3ZpOmJvLGludm9rZV92aWk6a28saW52b2tlX3ZpaWY6Vm8saW52b2tlX3ZpaWk6d28saW52b2tlX3ZpaWlpOk9vLGludm9rZV92aWlpaWk6QW8saW52b2tlX3ZpaWlpaWk6Rm8saW52b2tlX3ZpaWlpaWlpOkJvLGludm9rZV92aWlpaWlpaWlpaTpIbyxpbnZva2VfdmlpaWlpaWlpaWlpaWlpaTpHbyxzdHJmdGltZTp4cixzdHJmdGltZV9sOldyfTt2YXIgeW49YmUoKTt2YXIgZ249ZmUoIl9fd2FzbV9jYWxsX2N0b3JzIiwwKTt2YXIgd249U1siX0NvcHlIZWFwIl09ZmUoIkNvcHlIZWFwIiwzKTt2YXIgX249ZmUoIl9fY3hhX2ZyZWVfZXhjZXB0aW9uIiwxKTt2YXIgRW49U1siX2ZyZWUiXT1mZSgiZnJlZSIsMSk7dmFyIGJuPVNbIl9tYWxsb2MiXT1mZSgibWFsbG9jIiwxKTt2YXIgU249U1siX0tXU0luaXQiXT1mZSgiS1dTSW5pdCIsMSk7dmFyIGtuPVNbIl9LV1NMb2dpbiJdPWZlKCJLV1NMb2dpbiIsMSk7dmFyIFRuPVNbIl9LV1NMb2dvdXQiXT1mZSgiS1dTTG9nb3V0IiwwKTt2YXIgTW49U1siX0tXU1Nlc3Npb25CZWdpbiJdPWZlKCJLV1NTZXNzaW9uQmVnaW4iLDEpO3ZhciBBbj1TWyJfS1dTU2Vzc2lvbkVuZCJdPWZlKCJLV1NTZXNzaW9uRW5kIiwxKTt2YXIgRm49U1siX0tXU1JlZ2lzdGVyTm90aWZ5Il09ZmUoIktXU1JlZ2lzdGVyTm90aWZ5IiwxKTt2YXIgT249U1siX0tXU0F1ZGlvV3JpdGUiXT1mZSgiS1dTQXVkaW9Xcml0ZSIsMSk7dmFyIERuPVNbIl9LV1NSZWZyZXNoVG9rZW4iXT1mZSgiS1dTUmVmcmVzaFRva2VuIiwxKTt2YXIgUG49U1siX0tXU0dldEVycm9yRGVzY3JpcHRpb24iXT1mZSgiS1dTR2V0RXJyb3JEZXNjcmlwdGlvbiIsMSk7dmFyIENuPVNbIl9LV1NVcGRhdGVQYXJhbXMiXT1mZSgiS1dTVXBkYXRlUGFyYW1zIiwxKTt2YXIgTm49ZmUoImZmbHVzaCIsMSk7dmFyIFJuPWZlKCJlbXNjcmlwdGVuX2J1aWx0aW5fbWVtYWxpZ24iLDIpO3ZhciBJbj1mZSgic2V0VGhyZXciLDIpO3ZhciBqbj1mZSgiX2Vtc2NyaXB0ZW5fdGVtcHJldF9zZXQiLDEpO3ZhciBMbj1mdW5jdGlvbiBlKCl7cmV0dXJuKExuPXluWyJlbXNjcmlwdGVuX3N0YWNrX2luaXQiXSkoKX07dmFyIFVuPWZ1bmN0aW9uIGUoKXtyZXR1cm4oVW49eW5bImVtc2NyaXB0ZW5fc3RhY2tfZ2V0X2ZyZWUiXSkoKX07dmFyIHhuPWZ1bmN0aW9uIGUoKXtyZXR1cm4oeG49eW5bImVtc2NyaXB0ZW5fc3RhY2tfZ2V0X2Jhc2UiXSkoKX07dmFyIFduPWZ1bmN0aW9uIGUoKXtyZXR1cm4oV249eW5bImVtc2NyaXB0ZW5fc3RhY2tfZ2V0X2VuZCJdKSgpfTt2YXIgQm49ZnVuY3Rpb24gZSh0KXtyZXR1cm4oQm49eW5bIl9lbXNjcmlwdGVuX3N0YWNrX3Jlc3RvcmUiXSkodCl9O3ZhciB6bj1mdW5jdGlvbiBlKHQpe3JldHVybih6bj15blsiX2Vtc2NyaXB0ZW5fc3RhY2tfYWxsb2MiXSkodCl9O3ZhciBIbj1mdW5jdGlvbiBlKCl7cmV0dXJuKEhuPXluWyJlbXNjcmlwdGVuX3N0YWNrX2dldF9jdXJyZW50Il0pKCl9O3ZhciBHbj1mZSgiX19jeGFfZGVjcmVtZW50X2V4Y2VwdGlvbl9yZWZjb3VudCIsMSk7dmFyIFZuPWZlKCJfX2N4YV9pbmNyZW1lbnRfZXhjZXB0aW9uX3JlZmNvdW50IiwxKTt2YXIgS249ZmUoIl9fZ2V0X2V4Y2VwdGlvbl9tZXNzYWdlIiwzKTt2YXIgWW49ZmUoIl9fY3hhX2Nhbl9jYXRjaCIsMyk7dmFyIHFuPWZlKCJfX2N4YV9pc19wb2ludGVyX3R5cGUiLDEpO3ZhciBYbj1TWyJkeW5DYWxsX2lpaiJdPWZlKCJkeW5DYWxsX2lpaiIsNCk7dmFyIEpuPVNbImR5bkNhbGxfamlqaSJdPWZlKCJkeW5DYWxsX2ppamkiLDUpO3ZhciBabj1TWyJkeW5DYWxsX2oiXT1mZSgiZHluQ2FsbF9qIiwxKTt2YXIgUW49U1siZHluQ2FsbF9qaSJdPWZlKCJkeW5DYWxsX2ppIiwyKTt2YXIgJG49U1siZHluQ2FsbF9paWlpaWoiXT1mZSgiZHluQ2FsbF9paWlpaWoiLDcpO3ZhciBlbz1TWyJkeW5DYWxsX3ZpaWppaSJdPWZlKCJkeW5DYWxsX3ZpaWppaSIsNyk7dmFyIHRvPVNbImR5bkNhbGxfamlpaWkiXT1mZSgiZHluQ2FsbF9qaWlpaSIsNSk7dmFyIHJvPVNbImR5bkNhbGxfaWlpaWlqaiJdPWZlKCJkeW5DYWxsX2lpaWlpamoiLDkpO3ZhciBubz1TWyJkeW5DYWxsX2lpaWlpaWpqIl09ZmUoImR5bkNhbGxfaWlpaWlpamoiLDEwKTt2YXIgb289U1siZHluQ2FsbF92aWlqaiJdPWZlKCJkeW5DYWxsX3ZpaWpqIiw3KTt2YXIgaW89U1siZHluQ2FsbF9qampqampqIl09ZmUoImR5bkNhbGxfampqampqaiIsMTMpO3ZhciBhbz1TWyJkeW5DYWxsX2pqampqaiJdPWZlKCJkeW5DYWxsX2pqampqaiIsMTEpO3ZhciBzbz1TWyJkeW5DYWxsX2lpamppaSJdPWZlKCJkeW5DYWxsX2lpamppaSIsOCk7dmFyIHVvPVNbImR5bkNhbGxfaWlpaiJdPWZlKCJkeW5DYWxsX2lpaWoiLDUpO3ZhciBjbz1TWyJkeW5DYWxsX3ZpaiJdPWZlKCJkeW5DYWxsX3ZpaiIsNCk7dmFyIGxvPVNbImR5bkNhbGxfdmlpaWppaSJdPWZlKCJkeW5DYWxsX3ZpaWlqaWkiLDgpO3ZhciBmbz1TWyJkeW5DYWxsX3ZpaWppaWlpaWlpaWkiXT1mZSgiZHluQ2FsbF92aWlqaWlpaWlpaWlpIiwxNCk7dmFyIHZvPVNbImR5bkNhbGxfdmlpaWoiXT1mZSgiZHluQ2FsbF92aWlpaiIsNik7dmFyIG1vPVNbImR5bkNhbGxfamlpIl09ZmUoImR5bkNhbGxfamlpIiwzKTt2YXIgcG89U1siZHluQ2FsbF9qZmkiXT1mZSgiZHluQ2FsbF9qZmkiLDMpO3ZhciBobz1TWyJkeW5DYWxsX3ZpaWoiXT1mZSgiZHluQ2FsbF92aWlqIiw1KTt2YXIgeW89U1siZHluQ2FsbF9qaWlqIl09ZmUoImR5bkNhbGxfamlpaiIsNSk7dmFyIGdvPVNbImR5bkNhbGxfamlpaSJdPWZlKCJkeW5DYWxsX2ppaWkiLDQpO2Z1bmN0aW9uIHdvKGUsdCxyLG4pe3ZhciBvPXhlKCk7dHJ5e0hyKGUpKHQscixuKX1jYXRjaChlKXtVZShvKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBfbyhlLHQscixuLG8pe3ZhciBpPXhlKCk7dHJ5e3JldHVybiBIcihlKSh0LHIsbixvKX1jYXRjaChlKXtVZShpKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBFbyhlLHQscixuLG8saSl7dmFyIGE9eGUoKTt0cnl7cmV0dXJuIEhyKGUpKHQscixuLG8saSl9Y2F0Y2goZSl7VWUoYSk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gYm8oZSx0KXt2YXIgcj14ZSgpO3RyeXtIcihlKSh0KX1jYXRjaChlKXtVZShyKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBTbyhlLHQscixuKXt2YXIgbz14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyLG4pfWNhdGNoKGUpe1VlKG8pO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIGtvKGUsdCxyKXt2YXIgbj14ZSgpO3RyeXtIcihlKSh0LHIpfWNhdGNoKGUpe1VlKG4pO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIFRvKGUsdCl7dmFyIHI9eGUoKTt0cnl7cmV0dXJuIEhyKGUpKHQpfWNhdGNoKGUpe1VlKHIpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIE1vKGUsdCxyKXt2YXIgbj14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyKX1jYXRjaChlKXtVZShuKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBBbyhlLHQscixuLG8saSl7dmFyIGE9eGUoKTt0cnl7SHIoZSkodCxyLG4sbyxpKX1jYXRjaChlKXtVZShhKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBGbyhlLHQscixuLG8saSxhKXt2YXIgcz14ZSgpO3RyeXtIcihlKSh0LHIsbixvLGksYSl9Y2F0Y2goZSl7VWUocyk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gT28oZSx0LHIsbixvKXt2YXIgaT14ZSgpO3RyeXtIcihlKSh0LHIsbixvKX1jYXRjaChlKXtVZShpKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBEbyhlKXt2YXIgdD14ZSgpO3RyeXtIcihlKSgpfWNhdGNoKGUpe1VlKHQpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIFBvKGUsdCxyLG4sbyxpLGEpe3ZhciBzPXhlKCk7dHJ5e3JldHVybiBIcihlKSh0LHIsbixvLGksYSl9Y2F0Y2goZSl7VWUocyk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gQ28oZSl7dmFyIHQ9eGUoKTt0cnl7cmV0dXJuIEhyKGUpKCl9Y2F0Y2goZSl7VWUodCk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gTm8oZSx0LHIsbixvLGksYSxzKXt2YXIgdT14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyLG4sbyxpLGEscyl9Y2F0Y2goZSl7VWUodSk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gUm8oZSx0KXt2YXIgcj14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCl9Y2F0Y2goZSl7VWUocik7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gSW8oZSx0LHIpe3ZhciBuPXhlKCk7dHJ5e3JldHVybiBIcihlKSh0LHIpfWNhdGNoKGUpe1VlKG4pO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIGpvKGUsdCxyLG4sbyxpKXt2YXIgYT14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyLG4sbyxpKX1jYXRjaChlKXtVZShhKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBMbyhlLHQscixuLG8saSxhLHMsdSxjLGwpe3ZhciBmPXhlKCk7dHJ5e3JldHVybiBIcihlKSh0LHIsbixvLGksYSxzLHUsYyxsKX1jYXRjaChlKXtVZShmKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBVbyhlLHQscixuLG8saSxhLHMsdSxjLGwsZixkKXt2YXIgdj14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyLG4sbyxpLGEscyx1LGMsbCxmLGQpfWNhdGNoKGUpe1VlKHYpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIHhvKGUsdCxyLG4pe3ZhciBvPXhlKCk7dHJ5e3JldHVybiBIcihlKSh0LHIsbil9Y2F0Y2goZSl7VWUobyk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gV28oZSx0LHIsbil7dmFyIG89eGUoKTt0cnl7cmV0dXJuIEhyKGUpKHQscixuKX1jYXRjaChlKXtVZShvKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBCbyhlLHQscixuLG8saSxhLHMpe3ZhciB1PXhlKCk7dHJ5e0hyKGUpKHQscixuLG8saSxhLHMpfWNhdGNoKGUpe1VlKHUpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIHpvKGUsdCxyLG4sbyxpLGEscyx1LGMsbCxmKXt2YXIgZD14ZSgpO3RyeXtyZXR1cm4gSHIoZSkodCxyLG4sbyxpLGEscyx1LGMsbCxmKX1jYXRjaChlKXtVZShkKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBIbyhlLHQscixuLG8saSxhLHMsdSxjLGwpe3ZhciBmPXhlKCk7dHJ5e0hyKGUpKHQscixuLG8saSxhLHMsdSxjLGwpfWNhdGNoKGUpe1VlKGYpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIEdvKGUsdCxyLG4sbyxpLGEscyx1LGMsbCxmLGQsdixtLHApe3ZhciBoPXhlKCk7dHJ5e0hyKGUpKHQscixuLG8saSxhLHMsdSxjLGwsZixkLHYsbSxwKX1jYXRjaChlKXtVZShoKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBWbyhlLHQscixuKXt2YXIgbz14ZSgpO3RyeXtIcihlKSh0LHIsbil9Y2F0Y2goZSl7VWUobyk7aWYoIShlIGluc3RhbmNlb2YgZGUpKXRocm93IGU7SW4oMSwwKX19ZnVuY3Rpb24gS28oZSx0LHIsbil7dmFyIG89eGUoKTt0cnl7cmV0dXJuIFhuKGUsdCxyLG4pfWNhdGNoKGUpe1VlKG8pO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIFlvKGUpe3ZhciB0PXhlKCk7dHJ5e3JldHVybiBabihlKX1jYXRjaChlKXtVZSh0KTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBxbyhlLHQpe3ZhciByPXhlKCk7dHJ5e3JldHVybiBRbihlLHQpfWNhdGNoKGUpe1VlKHIpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fWZ1bmN0aW9uIFhvKGUsdCxyLG4sbyxpLGEpe3ZhciBzPXhlKCk7dHJ5e3JldHVybiAkbihlLHQscixuLG8saSxhKX1jYXRjaChlKXtVZShzKTtpZighKGUgaW5zdGFuY2VvZiBkZSkpdGhyb3cgZTtJbigxLDApfX1mdW5jdGlvbiBKbyhlLHQscixuLG8pe3ZhciBpPXhlKCk7dHJ5e3JldHVybiB0byhlLHQscixuLG8pfWNhdGNoKGUpe1VlKGkpO2lmKCEoZSBpbnN0YW5jZW9mIGRlKSl0aHJvdyBlO0luKDEsMCl9fVNbImFkZFJ1bkRlcGVuZGVuY3kiXT1pZTtTWyJyZW1vdmVSdW5EZXBlbmRlbmN5Il09YWU7U1siY2NhbGwiXT1ZcjtTWyJjd3JhcCJdPXFyO1NbImFkZEZ1bmN0aW9uIl09YW47U1sic2V0VmFsdWUiXT1MZTtTWyJnZXRWYWx1ZSJdPVJlO1NbIlVURjhUb1N0cmluZyJdPUhlO1NbInN0cmluZ1RvVVRGOCJdPVJ0O1NbImxlbmd0aEJ5dGVzVVRGOCJdPWR0O1NbIkZTX2NyZWF0ZVByZWxvYWRlZEZpbGUiXT1UdDtTWyJGU191bmxpbmsiXT11bjtTWyJGU19jcmVhdGVQYXRoIl09c247U1siRlNfY3JlYXRlRGV2aWNlIl09bG47U1siRlNfY3JlYXRlRGF0YUZpbGUiXT1idDtTWyJGU19jcmVhdGVMYXp5RmlsZSJdPWNuO3ZhciBabz1bIndyaXRlSTUzVG9JNjQiLCJ3cml0ZUk1M1RvSTY0Q2xhbXBlZCIsIndyaXRlSTUzVG9JNjRTaWduYWxpbmciLCJ3cml0ZUk1M1RvVTY0Q2xhbXBlZCIsIndyaXRlSTUzVG9VNjRTaWduYWxpbmciLCJyZWFkSTUzRnJvbUk2NCIsInJlYWRJNTNGcm9tVTY0IiwiY29udmVydEkzMlBhaXJUb0k1MyIsImNvbnZlcnRVMzJQYWlyVG9JNTMiLCJnZXRUZW1wUmV0MCIsImluZXRQdG9uNCIsImluZXROdG9wNCIsImluZXRQdG9uNiIsImluZXROdG9wNiIsInJlYWRTb2NrYWRkciIsIndyaXRlU29ja2FkZHIiLCJlbXNjcmlwdGVuTG9nIiwicnVuTWFpblRocmVhZEVtQXNtIiwianN0b2lfcSIsImxpc3Rlbk9uY2UiLCJhdXRvUmVzdW1lQXVkaW9Db250ZXh0IiwiZHluQ2FsbExlZ2FjeSIsImdldER5bkNhbGxlciIsImR5bkNhbGwiLCJoYW5kbGVFeGNlcHRpb24iLCJydW50aW1lS2VlcGFsaXZlUHVzaCIsInJ1bnRpbWVLZWVwYWxpdmVQb3AiLCJjYWxsVXNlckNhbGxiYWNrIiwibWF5YmVFeGl0IiwiYXNtanNNYW5nbGUiLCJIYW5kbGVBbGxvY2F0b3IiLCJnZXROYXRpdmVUeXBlU2l6ZSIsIlNUQUNLX1NJWkUiLCJTVEFDS19BTElHTiIsIlBPSU5URVJfU0laRSIsIkFTU0VSVElPTlMiLCJyZW1vdmVGdW5jdGlvbiIsInJlYWxseU5lZ2F0aXZlIiwidW5TaWduIiwic3RyTGVuIiwicmVTaWduIiwiZm9ybWF0U3RyaW5nIiwiaW50QXJyYXlUb1N0cmluZyIsIkFzY2lpVG9TdHJpbmciLCJVVEYxNlRvU3RyaW5nIiwic3RyaW5nVG9VVEYxNiIsImxlbmd0aEJ5dGVzVVRGMTYiLCJVVEYzMlRvU3RyaW5nIiwic3RyaW5nVG9VVEYzMiIsImxlbmd0aEJ5dGVzVVRGMzIiLCJzdHJpbmdUb05ld1VURjgiLCJyZWdpc3RlcktleUV2ZW50Q2FsbGJhY2siLCJtYXliZUNTdHJpbmdUb0pzU3RyaW5nIiwiZmluZEV2ZW50VGFyZ2V0IiwiZ2V0Qm91bmRpbmdDbGllbnRSZWN0IiwiZmlsbE1vdXNlRXZlbnREYXRhIiwicmVnaXN0ZXJNb3VzZUV2ZW50Q2FsbGJhY2siLCJyZWdpc3RlcldoZWVsRXZlbnRDYWxsYmFjayIsInJlZ2lzdGVyVWlFdmVudENhbGxiYWNrIiwicmVnaXN0ZXJGb2N1c0V2ZW50Q2FsbGJhY2siLCJmaWxsRGV2aWNlT3JpZW50YXRpb25FdmVudERhdGEiLCJyZWdpc3RlckRldmljZU9yaWVudGF0aW9uRXZlbnRDYWxsYmFjayIsImZpbGxEZXZpY2VNb3Rpb25FdmVudERhdGEiLCJyZWdpc3RlckRldmljZU1vdGlvbkV2ZW50Q2FsbGJhY2siLCJzY3JlZW5PcmllbnRhdGlvbiIsImZpbGxPcmllbnRhdGlvbkNoYW5nZUV2ZW50RGF0YSIsInJlZ2lzdGVyT3JpZW50YXRpb25DaGFuZ2VFdmVudENhbGxiYWNrIiwiZmlsbEZ1bGxzY3JlZW5DaGFuZ2VFdmVudERhdGEiLCJyZWdpc3RlckZ1bGxzY3JlZW5DaGFuZ2VFdmVudENhbGxiYWNrIiwiSlNFdmVudHNfcmVxdWVzdEZ1bGxzY3JlZW4iLCJKU0V2ZW50c19yZXNpemVDYW52YXNGb3JGdWxsc2NyZWVuIiwicmVnaXN0ZXJSZXN0b3JlT2xkU3R5bGUiLCJoaWRlRXZlcnl0aGluZ0V4Y2VwdEdpdmVuRWxlbWVudCIsInJlc3RvcmVIaWRkZW5FbGVtZW50cyIsInNldExldHRlcmJveCIsInNvZnRGdWxsc2NyZWVuUmVzaXplV2ViR0xSZW5kZXJUYXJnZXQiLCJkb1JlcXVlc3RGdWxsc2NyZWVuIiwiZmlsbFBvaW50ZXJsb2NrQ2hhbmdlRXZlbnREYXRhIiwicmVnaXN0ZXJQb2ludGVybG9ja0NoYW5nZUV2ZW50Q2FsbGJhY2siLCJyZWdpc3RlclBvaW50ZXJsb2NrRXJyb3JFdmVudENhbGxiYWNrIiwicmVxdWVzdFBvaW50ZXJMb2NrIiwiZmlsbFZpc2liaWxpdHlDaGFuZ2VFdmVudERhdGEiLCJyZWdpc3RlclZpc2liaWxpdHlDaGFuZ2VFdmVudENhbGxiYWNrIiwicmVnaXN0ZXJUb3VjaEV2ZW50Q2FsbGJhY2siLCJmaWxsR2FtZXBhZEV2ZW50RGF0YSIsInJlZ2lzdGVyR2FtZXBhZEV2ZW50Q2FsbGJhY2siLCJyZWdpc3RlckJlZm9yZVVubG9hZEV2ZW50Q2FsbGJhY2siLCJmaWxsQmF0dGVyeUV2ZW50RGF0YSIsImJhdHRlcnkiLCJyZWdpc3RlckJhdHRlcnlFdmVudENhbGxiYWNrIiwic2V0Q2FudmFzRWxlbWVudFNpemUiLCJnZXRDYW52YXNFbGVtZW50U2l6ZSIsImpzU3RhY2tUcmFjZSIsImdldENhbGxzdGFjayIsImNvbnZlcnRQQ3RvU291cmNlTG9jYXRpb24iLCJjaGVja1dhc2lDbG9jayIsIndhc2lSaWdodHNUb011c2xPRmxhZ3MiLCJ3YXNpT0ZsYWdzVG9NdXNsT0ZsYWdzIiwiY3JlYXRlRHluY2FsbFdyYXBwZXIiLCJzYWZlU2V0VGltZW91dCIsInNldEltbWVkaWF0ZVdyYXBwZWQiLCJjbGVhckltbWVkaWF0ZVdyYXBwZWQiLCJwb2x5ZmlsbFNldEltbWVkaWF0ZSIsImdldFByb21pc2UiLCJtYWtlUHJvbWlzZSIsImlkc1RvUHJvbWlzZXMiLCJtYWtlUHJvbWlzZUNhbGxiYWNrIiwiQnJvd3Nlcl9hc3luY1ByZXBhcmVEYXRhQ291bnRlciIsInNldE1haW5Mb29wIiwiZ2V0U29ja2V0RnJvbUZEIiwiZ2V0U29ja2V0QWRkcmVzcyIsIkZTX21rZGlyVHJlZSIsIl9zZXROZXR3b3JrQ2FsbGJhY2siLCJoZWFwT2JqZWN0Rm9yV2ViR0xUeXBlIiwidG9UeXBlZEFycmF5SW5kZXgiLCJ3ZWJnbF9lbmFibGVfQU5HTEVfaW5zdGFuY2VkX2FycmF5cyIsIndlYmdsX2VuYWJsZV9PRVNfdmVydGV4X2FycmF5X29iamVjdCIsIndlYmdsX2VuYWJsZV9XRUJHTF9kcmF3X2J1ZmZlcnMiLCJ3ZWJnbF9lbmFibGVfV0VCR0xfbXVsdGlfZHJhdyIsImVtc2NyaXB0ZW5XZWJHTEdldCIsImNvbXB1dGVVbnBhY2tBbGlnbmVkSW1hZ2VTaXplIiwiY29sb3JDaGFubmVsc0luR2xUZXh0dXJlRm9ybWF0IiwiZW1zY3JpcHRlbldlYkdMR2V0VGV4UGl4ZWxEYXRhIiwiZW1zY3JpcHRlbldlYkdMR2V0VW5pZm9ybSIsIndlYmdsR2V0VW5pZm9ybUxvY2F0aW9uIiwid2ViZ2xQcmVwYXJlVW5pZm9ybUxvY2F0aW9uc0JlZm9yZUZpcnN0VXNlIiwid2ViZ2xHZXRMZWZ0QnJhY2VQb3MiLCJlbXNjcmlwdGVuV2ViR0xHZXRWZXJ0ZXhBdHRyaWIiLCJfX2dsR2V0QWN0aXZlQXR0cmliT3JVbmlmb3JtIiwid3JpdGVHTEFycmF5IiwicmVnaXN0ZXJXZWJHbEV2ZW50Q2FsbGJhY2siLCJydW5BbmRBYm9ydElmRXJyb3IiLCJBTExPQ19OT1JNQUwiLCJBTExPQ19TVEFDSyIsImFsbG9jYXRlIiwid3JpdGVTdHJpbmdUb01lbW9yeSIsIndyaXRlQXNjaWlUb01lbW9yeSIsInNldEVyck5vIiwiZGVtYW5nbGUiLCJzdGFja1RyYWNlIl07Wm8uZm9yRWFjaChPZSk7dmFyIFFvPVsicnVuIiwiYWRkT25QcmVSdW4iLCJhZGRPbkluaXQiLCJhZGRPblByZU1haW4iLCJhZGRPbkV4aXQiLCJhZGRPblBvc3RSdW4iLCJvdXQiLCJlcnIiLCJjYWxsTWFpbiIsImFib3J0Iiwid2FzbU1lbW9yeSIsIndhc21FeHBvcnRzIiwid3JpdGVTdGFja0Nvb2tpZSIsImNoZWNrU3RhY2tDb29raWUiLCJjb252ZXJ0STMyUGFpclRvSTUzQ2hlY2tlZCIsInN0YWNrU2F2ZSIsInN0YWNrUmVzdG9yZSIsInN0YWNrQWxsb2MiLCJzZXRUZW1wUmV0MCIsInB0clRvU3RyaW5nIiwiemVyb01lbW9yeSIsImV4aXRKUyIsImdldEhlYXBNYXgiLCJncm93TWVtb3J5IiwiRU5WIiwiTU9OVEhfREFZU19SRUdVTEFSIiwiTU9OVEhfREFZU19MRUFQIiwiTU9OVEhfREFZU19SRUdVTEFSX0NVTVVMQVRJVkUiLCJNT05USF9EQVlTX0xFQVBfQ1VNVUxBVElWRSIsImlzTGVhcFllYXIiLCJ5ZGF5RnJvbURhdGUiLCJhcnJheVN1bSIsImFkZERheXMiLCJFUlJOT19DT0RFUyIsIkVSUk5PX01FU1NBR0VTIiwiRE5TIiwiUHJvdG9jb2xzIiwiU29ja2V0cyIsImluaXRSYW5kb21GaWxsIiwicmFuZG9tRmlsbCIsInRpbWVycyIsIndhcm5PbmNlIiwicmVhZEVtQXNtQXJnc0FycmF5IiwicmVhZEVtQXNtQXJncyIsInJ1bkVtQXNtRnVuY3Rpb24iLCJqc3RvaV9zIiwiZ2V0RXhlY3V0YWJsZU5hbWUiLCJrZWVwUnVudGltZUFsaXZlIiwiYXN5bmNMb2FkIiwiYWxpZ25NZW1vcnkiLCJtbWFwQWxsb2MiLCJ3YXNtVGFibGUiLCJub0V4aXRSdW50aW1lIiwiZ2V0Q0Z1bmMiLCJ1bGViMTI4RW5jb2RlIiwic2lnVG9XYXNtVHlwZXMiLCJnZW5lcmF0ZUZ1bmNUeXBlIiwiY29udmVydEpzRnVuY3Rpb25Ub1dhc20iLCJmcmVlVGFibGVJbmRleGVzIiwiZnVuY3Rpb25zSW5UYWJsZU1hcCIsImdldEVtcHR5VGFibGVTbG90IiwidXBkYXRlVGFibGVNYXAiLCJnZXRGdW5jdGlvbkFkZHJlc3MiLCJQQVRIIiwiUEFUSF9GUyIsIlVURjhEZWNvZGVyIiwiVVRGOEFycmF5VG9TdHJpbmciLCJzdHJpbmdUb1VURjhBcnJheSIsImludEFycmF5RnJvbVN0cmluZyIsInN0cmluZ1RvQXNjaWkiLCJVVEYxNkRlY29kZXIiLCJzdHJpbmdUb1VURjhPblN0YWNrIiwid3JpdGVBcnJheVRvTWVtb3J5IiwiSlNFdmVudHMiLCJzcGVjaWFsSFRNTFRhcmdldHMiLCJmaW5kQ2FudmFzRXZlbnRUYXJnZXQiLCJjdXJyZW50RnVsbHNjcmVlblN0cmF0ZWd5IiwicmVzdG9yZU9sZFdpbmRvd2VkU3R5bGUiLCJVTldJTkRfQ0FDSEUiLCJFeGl0U3RhdHVzIiwiZ2V0RW52U3RyaW5ncyIsImRvUmVhZHYiLCJkb1dyaXRldiIsInByb21pc2VNYXAiLCJ1bmNhdWdodEV4Y2VwdGlvbkNvdW50IiwiZXhjZXB0aW9uTGFzdCIsImV4Y2VwdGlvbkNhdWdodCIsIkV4Y2VwdGlvbkluZm8iLCJmaW5kTWF0Y2hpbmdDYXRjaCIsImdldEV4Y2VwdGlvbk1lc3NhZ2VDb21tb24iLCJpbmNyZW1lbnRFeGNlcHRpb25SZWZjb3VudCIsImRlY3JlbWVudEV4Y2VwdGlvblJlZmNvdW50IiwiZ2V0RXhjZXB0aW9uTWVzc2FnZSIsIkJyb3dzZXIiLCJnZXRQcmVsb2FkZWRJbWFnZURhdGFfX2RhdGEiLCJ3Z2V0IiwiU1lTQ0FMTFMiLCJwcmVsb2FkUGx1Z2lucyIsIkZTX21vZGVTdHJpbmdUb0ZsYWdzIiwiRlNfZ2V0TW9kZSIsIkZTX3N0ZGluX2dldENoYXJfYnVmZmVyIiwiRlNfc3RkaW5fZ2V0Q2hhciIsIkZTX3JlYWRGaWxlIiwiRlMiLCJNRU1GUyIsIlRUWSIsIlBJUEVGUyIsIlNPQ0tGUyIsInRlbXBGaXhlZExlbmd0aEFycmF5IiwibWluaVRlbXBXZWJHTEZsb2F0QnVmZmVycyIsIm1pbmlUZW1wV2ViR0xJbnRCdWZmZXJzIiwiR0wiLCJBTCIsIkdMVVQiLCJFR0wiLCJHTEVXIiwiSURCU3RvcmUiLCJTREwiLCJTRExfZ2Z4IiwiYWxsb2NhdGVVVEY4IiwiYWxsb2NhdGVVVEY4T25TdGFjayIsInByaW50IiwicHJpbnRFcnIiXTtRby5mb3JFYWNoKERlKTt2YXIgJG87cmU9ZnVuY3Rpb24gZSgpe2lmKCEkbyl0aSgpO2lmKCEkbylyZT1lfTtmdW5jdGlvbiBlaSgpe0xuKCk7eigpfWZ1bmN0aW9uIHRpKCl7aWYoZWU+MCl7cmV0dXJufWVpKCk7cSgpO2lmKGVlPjApe3JldHVybn1mdW5jdGlvbiBlKCl7aWYoJG8pcmV0dXJuOyRvPXRydWU7U1siY2FsbGVkUnVuIl09dHJ1ZTtpZihEKXJldHVybjtYKCk7aWYoU1sib25SdW50aW1lSW5pdGlhbGl6ZWQiXSlTWyJvblJ1bnRpbWVJbml0aWFsaXplZCJdKCk7QyghU1siX21haW4iXSwnY29tcGlsZWQgd2l0aG91dCBhIG1haW4sIGJ1dCBvbmUgaXMgcHJlc2VudC4gaWYgeW91IGFkZGVkIGl0IGZyb20gSlMsIHVzZSBNb2R1bGVbIm9uUnVudGltZUluaXRpYWxpemVkIl0nKTtKKCl9aWYoU1sic2V0U3RhdHVzIl0pe1NbInNldFN0YXR1cyJdKCJSdW5uaW5nLi4uIik7c2V0VGltZW91dCgoZnVuY3Rpb24oKXtzZXRUaW1lb3V0KChmdW5jdGlvbigpe1NbInNldFN0YXR1cyJdKCIiKX0pLDEpO2UoKX0pLDEpfWVsc2V7ZSgpfUgoKX1mdW5jdGlvbiByaSgpe3ZhciBlPVQ7dmFyIHQ9TTt2YXIgcj1mYWxzZTtUPU09ZnVuY3Rpb24gZSh0KXtyPXRydWV9O3RyeXtObigwKTtbInN0ZG91dCIsInN0ZGVyciJdLmZvckVhY2goKGZ1bmN0aW9uKGUpe3ZhciB0O3ZhciBuPUR0LmFuYWx5emVQYXRoKCIvZGV2LyIrZSk7aWYoIW4pcmV0dXJuO3ZhciBvPW4ub2JqZWN0O3ZhciBpPW8ucmRldjt2YXIgYT1odC50dHlzW2ldO2lmKGEhPT1udWxsJiZhIT09dm9pZCAwJiYodD1hLm91dHB1dCkhPT1udWxsJiZ0IT09dm9pZCAwJiZ0Lmxlbmd0aCl7cj10cnVlfX0pKX1jYXRjaChlKXt9VD1lO009dDtpZihyKXtXZSgic3RkaW8gc3RyZWFtcyBoYWQgY29udGVudCBpbiB0aGVtIHRoYXQgd2FzIG5vdCBmbHVzaGVkLiB5b3Ugc2hvdWxkIHNldCBFWElUX1JVTlRJTUUgdG8gMSAoc2VlIHRoZSBFbXNjcmlwdGVuIEZBUSksIG9yIG1ha2Ugc3VyZSB0byBlbWl0IGEgbmV3bGluZSB3aGVuIHlvdSBwcmludGYgZXRjLiIpfX1pZihTWyJwcmVJbml0Il0pe2lmKHR5cGVvZiBTWyJwcmVJbml0Il09PSJmdW5jdGlvbiIpU1sicHJlSW5pdCJdPVtTWyJwcmVJbml0Il1dO3doaWxlKFNbInByZUluaXQiXS5sZW5ndGg+MCl7U1sicHJlSW5pdCJdLnBvcCgpKCl9fXRpKCl9O3ZhciBUPWUuZ2V0TW9kdWxlPWZ1bmN0aW9uIGUoKXtyZXR1cm4gU319KSl9LDI2ODpmdW5jdGlvbihlLHQpe3ZhciByLG4sbzsoZnVuY3Rpb24oaSxhKXtpZih0cnVlKXshKG49W3RdLHI9YSxvPXR5cGVvZiByPT09ImZ1bmN0aW9uIj9yLmFwcGx5KHQsbik6cixvIT09dW5kZWZpbmVkJiYoZS5leHBvcnRzPW8pKX1lbHNle3ZhciBzfX0pKHR5cGVvZiBnbG9iYWxUaGlzIT09InVuZGVmaW5lZCI/Z2xvYmFsVGhpczp0eXBlb2Ygc2VsZiE9PSJ1bmRlZmluZWQiP3NlbGY6dGhpcywoZnVuY3Rpb24oZSl7InVzZSBzdHJpY3QiO09iamVjdC5kZWZpbmVQcm9wZXJ0eShlLCJfX2VzTW9kdWxlIix7dmFsdWU6dHJ1ZX0pO2UuV29ya2VyQWN0aW9uPWUuV2FrZXVwSW50ZW50aW9ucz1lLlNES0Vycm9yQ29kZT1lLk1haW5BY3Rpb249dm9pZCAwO3ZhciB0OyhmdW5jdGlvbihlKXtlWyJTVUNDRVNTIl09IjAifSkodHx8KGUuU0RLRXJyb3JDb2RlPXQ9e30pKTt2YXIgcjsoZnVuY3Rpb24oZSl7ZVsiU1RBUlQiXT0ic3RhcnQiO2VbIklOVEVSUlVQVCJdPSJpbnRlcnJ1cHQiO2VbIlNUT1AiXT0ic3RvcCJ9KShyfHwoZS5XYWtldXBJbnRlbnRpb25zPXI9e30pKTt2YXIgbjsoZnVuY3Rpb24oZSl7ZVsiSU5JVCJdPSJpbml0IjtlWyJDUkVBVEUiXT0iY3JlYXRlIjtlWyJCRUdJTl9TRVNTSU9OIl09ImJlZ2luU2Vzc2lvbiI7ZVsiV1JJVEVfQVVESU8iXT0id3JpdGVBdWRpbyI7ZVsiRU5EX1NFU1NJT04iXT0iZW5kU2Vzc2lvbiI7ZVsiTE9HT1VUIl09ImxvZ291dCI7ZVsiVVBEQVRFX1BBUkFNUyJdPSJ1cGRhdGVQYXJhbXMifSkobnx8KGUuTWFpbkFjdGlvbj1uPXt9KSk7dmFyIG87KGZ1bmN0aW9uKGUpe2VbIldBS0VVUF9DQUxMQkFDSyJdPSJ3YWtldXBDYWxsYmFjayI7ZVsiQUREX1VTRVJfVFJBQ0siXT0iYWRkVXNlclRyYWNrIjtlWyJFUlJPUiJdPSJlcnJvciJ9KShvfHwoZS5Xb3JrZXJBY3Rpb249bz17fSkpfSkpfSw1Mjk6ZnVuY3Rpb24oZSx0LHIpe3ZhciBuLG8saTsoZnVuY3Rpb24oYSxzKXtpZih0cnVlKXshKG89W3QscigxNjcpLHIoODE0KSxyKDI2OCldLG49cyxpPXR5cGVvZiBuPT09ImZ1bmN0aW9uIj9uLmFwcGx5KHQsbyk6bixpIT09dW5kZWZpbmVkJiYoZS5leHBvcnRzPWkpKX1lbHNle3ZhciB1fX0pKHR5cGVvZiBnbG9iYWxUaGlzIT09InVuZGVmaW5lZCI/Z2xvYmFsVGhpczp0eXBlb2Ygc2VsZiE9PSJ1bmRlZmluZWQiP3NlbGY6dGhpcywoZnVuY3Rpb24oZSx0LHIsbil7InVzZSBzdHJpY3QiO09iamVjdC5kZWZpbmVQcm9wZXJ0eShlLCJfX2VzTW9kdWxlIix7dmFsdWU6dHJ1ZX0pO2UuV29ya2VyV2FzbU1hbmFnZXI9dm9pZCAwO2Z1bmN0aW9uIG8oZSx0KXt2YXIgcj1PYmplY3Qua2V5cyhlKTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbj1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO3QmJihuPW4uZmlsdGVyKChmdW5jdGlvbih0KXtyZXR1cm4gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihlLHQpLmVudW1lcmFibGV9KSkpLHIucHVzaC5hcHBseShyLG4pfXJldHVybiByfWZ1bmN0aW9uIGkoZSl7Zm9yKHZhciB0PTE7dDxhcmd1bWVudHMubGVuZ3RoO3QrKyl7dmFyIHI9bnVsbCE9YXJndW1lbnRzW3RdP2FyZ3VtZW50c1t0XTp7fTt0JTI/byhPYmplY3QociksITApLmZvckVhY2goKGZ1bmN0aW9uKHQpe2EoZSx0LHJbdF0pfSkpOk9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3JzP09iamVjdC5kZWZpbmVQcm9wZXJ0aWVzKGUsT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnMocikpOm8oT2JqZWN0KHIpKS5mb3JFYWNoKChmdW5jdGlvbih0KXtPYmplY3QuZGVmaW5lUHJvcGVydHkoZSx0LE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iocix0KSl9KSl9cmV0dXJuIGV9ZnVuY3Rpb24gYShlLHQscil7cmV0dXJuKHQ9Zih0KSlpbiBlP09iamVjdC5kZWZpbmVQcm9wZXJ0eShlLHQse3ZhbHVlOnIsZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITB9KTplW3RdPXIsZX1mdW5jdGlvbiBzKGUpeyJAYmFiZWwvaGVscGVycyAtIHR5cGVvZiI7cmV0dXJuIHM9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9LHMoZSl9ZnVuY3Rpb24gdShlLHQpe2lmKCEoZSBpbnN0YW5jZW9mIHQpKXRocm93IG5ldyBUeXBlRXJyb3IoIkNhbm5vdCBjYWxsIGEgY2xhc3MgYXMgYSBmdW5jdGlvbiIpfWZ1bmN0aW9uIGMoZSx0KXtmb3IodmFyIHI9MDtyPHQubGVuZ3RoO3IrKyl7dmFyIG49dFtyXTtuLmVudW1lcmFibGU9bi5lbnVtZXJhYmxlfHwhMSxuLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gbiYmKG4ud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLGYobi5rZXkpLG4pfX1mdW5jdGlvbiBsKGUsdCxyKXtyZXR1cm4gdCYmYyhlLnByb3RvdHlwZSx0KSxyJiZjKGUsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KGUsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX1mdW5jdGlvbiBmKGUpe3ZhciB0PWQoZSwic3RyaW5nIik7cmV0dXJuInN5bWJvbCI9PXModCk/dDp0KyIifWZ1bmN0aW9uIGQoZSx0KXtpZigib2JqZWN0IiE9cyhlKXx8IWUpcmV0dXJuIGU7dmFyIHI9ZVtTeW1ib2wudG9QcmltaXRpdmVdO2lmKHZvaWQgMCE9PXIpe3ZhciBuPXIuY2FsbChlLHR8fCJkZWZhdWx0Iik7aWYoIm9iamVjdCIhPXMobikpcmV0dXJuIG47dGhyb3cgbmV3IFR5cGVFcnJvcigiQEB0b1ByaW1pdGl2ZSBtdXN0IHJldHVybiBhIHByaW1pdGl2ZSB2YWx1ZS4iKX1yZXR1cm4oInN0cmluZyI9PT10P1N0cmluZzpOdW1iZXIpKGUpfXZhciB2PWUuV29ya2VyV2FzbU1hbmFnZXI9ZnVuY3Rpb24oKXtmdW5jdGlvbiBlKCl7dSh0aGlzLGUpfXJldHVybiBsKGUsbnVsbCxbe2tleToiaW5pdCIsdmFsdWU6ZnVuY3Rpb24gdChuKXt2YXIgbz1zZWxmLmdldFdhc21Nb2RlbENvbmZpZygpO3ZhciBpPW87aWYocyhvKT09PSJvYmplY3QiKXtkZWxldGUgby5wcmVEYXRhO2k9SlNPTi5zdHJpbmdpZnkobyl9ci5XYXNtTWFuYWdlci5zZXRDYWxsYmFjayh7Y2FsbGJhY2s6ZS5kZWFsQ2FsbGJhY2ssdHJhY2tDYWxsYmFjazplLmRlYWxUcmFja0NhbGxiYWNrfSk7dmFyIGE9ci5XYXNtTWFuYWdlci5pbml0KHttb2RlbENvbmZpZ1N0cjppfSk7ZS5zZW5kVG9NYWluKHthY3Rpb246bi5hY3Rpb24sc25vOm4uc25vLHJlc3VsdDphfSl9fSx7a2V5OiJjcmVhdGUiLHZhbHVlOmZ1bmN0aW9uIHQobil7dmFyIG89SlNPTi5wYXJzZShuLnBhcmFtKTt2YXIgYT0iemgiO2lmKFsiemgiLCJlbiJdLmluY2x1ZGVzKG8ubGFuZ3VhZ2UpKXthPW8ubGFuZ3VhZ2V9ZS5zZW5kVG9NYWluKHthY3Rpb246bi5hY3Rpb24sc25vOm4uc25vLHJlc3VsdDpyLldhc21NYW5hZ2VyLmNyZWF0ZShpKGkoe30sbykse30se2xhbmd1YWdlOmF9KSl9KX19LHtrZXk6ImJlZ2luU2Vzc2lvbiIsdmFsdWU6ZnVuY3Rpb24gdChuKXtlLnNlbmRUb01haW4oe2FjdGlvbjpuLmFjdGlvbixzbm86bi5zbm8scmVzdWx0OnIuV2FzbU1hbmFnZXIuYmVnaW5TZXNzaW9uKCl9KX19LHtrZXk6ImVuZFNlc3Npb24iLHZhbHVlOmZ1bmN0aW9uIHQobil7ZS5zZW5kVG9NYWluKHthY3Rpb246bi5hY3Rpb24sc25vOm4uc25vLHJlc3VsdDpyLldhc21NYW5hZ2VyLmVuZFNlc3Npb24oe3JlYXNvbjoiIn0pfSl9fSx7a2V5OiJsb2dvdXQiLHZhbHVlOmZ1bmN0aW9uIHQobil7ZS5zZW5kVG9NYWluKHthY3Rpb246bi5hY3Rpb24sc25vOm4uc25vLHJlc3VsdDpyLldhc21NYW5hZ2VyLmxvZ291dCgpfSl9fSx7a2V5OiJ3cml0ZUF1ZGlvIix2YWx1ZTpmdW5jdGlvbiB0KG4pe2Uuc2VuZFRvTWFpbih7YWN0aW9uOm4uYWN0aW9uLHNubzpuLnNubyxyZXN1bHQ6ci5XYXNtTWFuYWdlci53cml0ZUF1ZGlvKG4ucGFyYW0pfSl9fSx7a2V5OiJ1cGRhdGVQYXJhbXMiLHZhbHVlOmZ1bmN0aW9uIHQobil7dmFyIG89SlNPTi5wYXJzZShuLnBhcmFtKSxpPW8ubGFuZ3VhZ2UsYT1vLmxvZ0xldmVsO2Uuc2VuZFRvTWFpbih7YWN0aW9uOm4uYWN0aW9uLHNubzpuLnNubyxyZXN1bHQ6ci5XYXNtTWFuYWdlci51cGRhdGVQYXJhbXMoe2xhbmd1YWdlOmksbG9nTGV2ZWw6YSxlbnRyeToiIn0pfSl9fSx7a2V5OiJkZWFsQ2FsbGJhY2siLHZhbHVlOmZ1bmN0aW9uIHQocil7ZS5zZW5kVG9NYWluKHtzbm86MCxhY3Rpb246bi5Xb3JrZXJBY3Rpb24uV0FLRVVQX0NBTExCQUNLLGRhdGE6cn0pfX0se2tleToiZGVhbFRyYWNrQ2FsbGJhY2siLHZhbHVlOmZ1bmN0aW9uIHQocil7ZS5zZW5kVG9NYWluKHtzbm86MCxhY3Rpb246bi5Xb3JrZXJBY3Rpb24uQUREX1VTRVJfVFJBQ0ssZGF0YTpyfSl9fSx7a2V5OiJzZW5kVG9NYWluIix2YWx1ZTpmdW5jdGlvbiBlKHQpe3Bvc3RNZXNzYWdlKHQpfX1dKX0oKTt2YXIgbT1mdW5jdGlvbiBlKHIpe3ZhciBvPUpTT04ucGFyc2Uoci5wYXJhbSksaT1vLndhc21QYXRoLGE9by5kYXRhUGF0aDtpbXBvcnRTY3JpcHRzKGksYSk7dmFyIHM9e29uUnVudGltZUluaXRpYWxpemVkOmZ1bmN0aW9uIGUoKXt2LmluaXQocil9LGxvY2F0ZUZpbGU6ZnVuY3Rpb24gZSh0KXtpZih0LmVuZHNXaXRoKCJ3YXNtIikpe3JldHVybiBzZWxmLmh3S3dzV2FzbURhdGF8fGl8fCJ3YXNtRGF0YS5qcyJ9aWYodC5lbmRzV2l0aCgiZGF0YSIpKXtyZXR1cm4gYXx8Im1vZGVsRGF0YS5qcyJ9cmV0dXJuIHR9LHByaW50RXJyOmZ1bmN0aW9uIGUodCl7di5zZW5kVG9NYWluKHthY3Rpb246bi5Xb3JrZXJBY3Rpb24uRVJST1IsZGF0YToid2FzbSBwcmludEVycjoiK3R9KX0sZ2V0UHJlbG9hZGVkUGFja2FnZTpmdW5jdGlvbiBlKCl7cmV0dXJuIHNlbGYuaHdLd3NXYXNtTW9kZWxEYXRhfX07KDAsdC5sb2FkV2FzbSkocyxzZWxmLmdldFdhc21Nb2RlbENvbmZpZygpLnByZURhdGF8fHtmaWxlczpbe2ZpbGVuYW1lOiIvZGVjb2Rlci5vbm54IixzdGFydDowLGVuZDo1MzQ1NDd9LHtmaWxlbmFtZToiL2VuY29kZXIub25ueCIsc3RhcnQ6NTM0NTQ3LGVuZDoxMjcwNTcyOX0se2ZpbGVuYW1lOiIvam9pbmVyLm9ubngiLHN0YXJ0OjEyNzA1NzI5LGVuZDoxMjgxNzg5Nn0se2ZpbGVuYW1lOiIvdG9rZW5zLnR4dCIsc3RhcnQ6MTI4MTc4OTYsZW5kOjEyODE5MDQ5fV0scmVtb3RlX3BhY2thZ2Vfc2l6ZToxMjgxOTA0OX0pfTt2YXIgcD1hKGEoYShhKGEoYShhKHt9LG4uTWFpbkFjdGlvbi5JTklULChmdW5jdGlvbihlKXtyZXR1cm4gbShlKX0pKSxuLk1haW5BY3Rpb24uQ1JFQVRFLChmdW5jdGlvbihlKXtyZXR1cm4gdi5jcmVhdGUoZSl9KSksbi5NYWluQWN0aW9uLkJFR0lOX1NFU1NJT04sKGZ1bmN0aW9uKGUpe3JldHVybiB2LmJlZ2luU2Vzc2lvbihlKX0pKSxuLk1haW5BY3Rpb24uV1JJVEVfQVVESU8sKGZ1bmN0aW9uKGUpe3JldHVybiB2LndyaXRlQXVkaW8oZSl9KSksbi5NYWluQWN0aW9uLkVORF9TRVNTSU9OLChmdW5jdGlvbihlKXtyZXR1cm4gdi5lbmRTZXNzaW9uKGUpfSkpLG4uTWFpbkFjdGlvbi5MT0dPVVQsKGZ1bmN0aW9uKGUpe3JldHVybiB2LmxvZ291dChlKX0pKSxuLk1haW5BY3Rpb24uVVBEQVRFX1BBUkFNUywoZnVuY3Rpb24oZSl7cmV0dXJuIHYudXBkYXRlUGFyYW1zKGUpfSkpO2FkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihlKXt2YXIgdDt2YXIgcj1lLmRhdGE7KHQ9cFtyLmFjdGlvbl0pPT09bnVsbHx8dD09PXZvaWQgMHx8dC5jYWxsKHAscil9KSl9KSl9LDgxNDpmdW5jdGlvbihlLHQscil7dmFyIG4sbyxpOyhmdW5jdGlvbihhLHMpe2lmKHRydWUpeyEobz1bdCxyKDE2NykscigyNjgpXSxuPXMsaT10eXBlb2Ygbj09PSJmdW5jdGlvbiI/bi5hcHBseSh0LG8pOm4saSE9PXVuZGVmaW5lZCYmKGUuZXhwb3J0cz1pKSl9ZWxzZXt2YXIgdX19KSh0eXBlb2YgZ2xvYmFsVGhpcyE9PSJ1bmRlZmluZWQiP2dsb2JhbFRoaXM6dHlwZW9mIHNlbGYhPT0idW5kZWZpbmVkIj9zZWxmOnRoaXMsKGZ1bmN0aW9uKGUsdCxyKXsidXNlIHN0cmljdCI7T2JqZWN0LmRlZmluZVByb3BlcnR5KGUsIl9fZXNNb2R1bGUiLHt2YWx1ZTp0cnVlfSk7ZS5XYXNtTWFuYWdlcj12b2lkIDA7ZnVuY3Rpb24gbihlKXsiQGJhYmVsL2hlbHBlcnMgLSB0eXBlb2YiO3JldHVybiBuPSJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJiJzeW1ib2wiPT10eXBlb2YgU3ltYm9sLml0ZXJhdG9yP2Z1bmN0aW9uKGUpe3JldHVybiB0eXBlb2YgZX06ZnVuY3Rpb24oZSl7cmV0dXJuIGUmJiJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJmUuY29uc3RydWN0b3I9PT1TeW1ib2wmJmUhPT1TeW1ib2wucHJvdG90eXBlPyJzeW1ib2wiOnR5cGVvZiBlfSxuKGUpfWZ1bmN0aW9uIG8oZSx0KXt2YXIgcj1PYmplY3Qua2V5cyhlKTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbj1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO3QmJihuPW4uZmlsdGVyKChmdW5jdGlvbih0KXtyZXR1cm4gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihlLHQpLmVudW1lcmFibGV9KSkpLHIucHVzaC5hcHBseShyLG4pfXJldHVybiByfWZ1bmN0aW9uIGkoZSl7Zm9yKHZhciB0PTE7dDxhcmd1bWVudHMubGVuZ3RoO3QrKyl7dmFyIHI9bnVsbCE9YXJndW1lbnRzW3RdP2FyZ3VtZW50c1t0XTp7fTt0JTI/byhPYmplY3QociksITApLmZvckVhY2goKGZ1bmN0aW9uKHQpe2EoZSx0LHJbdF0pfSkpOk9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3JzP09iamVjdC5kZWZpbmVQcm9wZXJ0aWVzKGUsT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnMocikpOm8oT2JqZWN0KHIpKS5mb3JFYWNoKChmdW5jdGlvbih0KXtPYmplY3QuZGVmaW5lUHJvcGVydHkoZSx0LE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iocix0KSl9KSl9cmV0dXJuIGV9ZnVuY3Rpb24gYShlLHQscil7cmV0dXJuKHQ9bCh0KSlpbiBlP09iamVjdC5kZWZpbmVQcm9wZXJ0eShlLHQse3ZhbHVlOnIsZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITB9KTplW3RdPXIsZX1mdW5jdGlvbiBzKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9ZnVuY3Rpb24gdShlLHQpe2Zvcih2YXIgcj0wO3I8dC5sZW5ndGg7cisrKXt2YXIgbj10W3JdO24uZW51bWVyYWJsZT1uLmVudW1lcmFibGV8fCExLG4uY29uZmlndXJhYmxlPSEwLCJ2YWx1ZSJpbiBuJiYobi53cml0YWJsZT0hMCksT2JqZWN0LmRlZmluZVByb3BlcnR5KGUsbChuLmtleSksbil9fWZ1bmN0aW9uIGMoZSx0LHIpe3JldHVybiB0JiZ1KGUucHJvdG90eXBlLHQpLHImJnUoZSxyKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfWZ1bmN0aW9uIGwoZSl7dmFyIHQ9ZihlLCJzdHJpbmciKTtyZXR1cm4ic3ltYm9sIj09bih0KT90OnQrIiJ9ZnVuY3Rpb24gZihlLHQpe2lmKCJvYmplY3QiIT1uKGUpfHwhZSlyZXR1cm4gZTt2YXIgcj1lW1N5bWJvbC50b1ByaW1pdGl2ZV07aWYodm9pZCAwIT09cil7dmFyIG89ci5jYWxsKGUsdHx8ImRlZmF1bHQiKTtpZigib2JqZWN0IiE9bihvKSlyZXR1cm4gbzt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9dmFyIGQ9ZS5XYXNtTWFuYWdlcj1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXtzKHRoaXMsZSl9cmV0dXJuIGMoZSxudWxsLFt7a2V5OiJpbml0Iix2YWx1ZTpmdW5jdGlvbiByKG4pe3ZhciBvPSgwLHQuZ2V0TW9kdWxlKSgpO3ZhciBpPSIuLyI7dmFyIGE9Ii4vIjt2YXIgcz0iZGVidWciO3ZhciB1PW8uX21hbGxvYyhvLmxlbmd0aEJ5dGVzVVRGOChuLm1vZGVsQ29uZmlnU3RyKSsxKTt2YXIgYz1vLl9tYWxsb2MoaS5sZW5ndGgrMSk7dmFyIGw9by5fbWFsbG9jKGEubGVuZ3RoKzEpO3ZhciBmPW8uX21hbGxvYyhzLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChuLm1vZGVsQ29uZmlnU3RyLHUsby5sZW5ndGhCeXRlc1VURjgobi5tb2RlbENvbmZpZ1N0cikrMSk7by5zdHJpbmdUb1VURjgoaSxjLGkubGVuZ3RoKzEpO28uc3RyaW5nVG9VVEY4KGEsbCxhLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChzLGYscy5sZW5ndGgrMSk7dmFyIGQ9by5hZGRGdW5jdGlvbigoZnVuY3Rpb24odCl7dmFyIHI7dmFyIG49by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdD4+PjJdKTt2YXIgaT1vLlVURjhUb1N0cmluZyhvLkhFQVAzMlt0KzQ+Pj4yXSk7dmFyIGE9by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdCs0KjI+Pj4yXSk7dmFyIHM9by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdCs0KjM+Pj4yXSk7dmFyIHU9by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdCs0KjQ+Pj4yXSk7dmFyIGM9by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdCs0KjU+Pj4yXSk7dmFyIGw9by5VVEY4VG9TdHJpbmcoby5IRUFQMzJbdCs0KjY+Pj4yXSk7KHI9ZS50cmFja0NhbGxiYWNrKT09PW51bGx8fHI9PT12b2lkIDB8fHIuY2FsbChlLHt0eXBlOm4sZW50cnk6aSxrZXk6YSxzdGFydFRpbWU6cyxlcnJvcjp1LHJlc3VsdDpjLG1lc3NhZ2U6bH0pfSksImlpIik7dmFyIHY9by5fbWFsbG9jKDUqNCk7by5zZXRWYWx1ZSh2LHUsImkzMiIpO28uc2V0VmFsdWUodis0LGMsImkzMiIpO28uc2V0VmFsdWUodis0KjIsbCwiaTMyIik7by5zZXRWYWx1ZSh2KzQqMyxmLCJpMzIiKTtvLnNldFZhbHVlKHYrNCo0LGQsImkzMiIpO3ZhciBtPW8uX0tXU0luaXQodik7by5fZnJlZShjKTtvLl9mcmVlKGwpO28uX2ZyZWUoZik7by5fZnJlZSh2KTtyZXR1cm4gZS5mb3JtYXRSZXN1bHQobSl9fSx7a2V5OiJjcmVhdGUiLHZhbHVlOmZ1bmN0aW9uIHIobil7dmFyIG89KDAsdC5nZXRNb2R1bGUpKCk7dmFyIGk9Ii4vIjt2YXIgYT0iLi8iO3ZhciBzPSJ6aCI7aWYoWyJ6aCIsImVuIl0uaW5jbHVkZXMobi5sYW5ndWFnZSkpe3M9bi5sYW5ndWFnZX12YXIgdT1vLl9tYWxsb2MoaS5sZW5ndGgrMSk7dmFyIGM9by5fbWFsbG9jKGEubGVuZ3RoKzEpO3ZhciBsPW8uX21hbGxvYyhuLnRva2VuLmxlbmd0aCsxKTt2YXIgZj1vLl9tYWxsb2Mobi5pY3NNYW5hZ2VySG9zdC5sZW5ndGgrMSk7dmFyIGQ9by5fbWFsbG9jKG4uam9iSWQubGVuZ3RoKzEpO3ZhciB2PW8uX21hbGxvYyhuLmxvZ0xldmVsLmxlbmd0aCsxKTt2YXIgbT1vLl9tYWxsb2Mocy5sZW5ndGgrMSk7by5zdHJpbmdUb1VURjgoaSx1LGkubGVuZ3RoKzEpO28uc3RyaW5nVG9VVEY4KGEsYyxhLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChuLnRva2VuLGwsbi50b2tlbi5sZW5ndGgrMSk7by5zdHJpbmdUb1VURjgobi5pY3NNYW5hZ2VySG9zdCxmLG4uaWNzTWFuYWdlckhvc3QubGVuZ3RoKzEpO28uc3RyaW5nVG9VVEY4KG4uam9iSWQsZCxuLmpvYklkLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChuLmxvZ0xldmVsLHYsbi5sb2dMZXZlbC5sZW5ndGgrMSk7by5zdHJpbmdUb1VURjgocyxtLHMubGVuZ3RoKzEpO3ZhciBwPW8uX21hbGxvYyg3KjQpO28uc2V0VmFsdWUocCx1LCJpMzIiKTtvLnNldFZhbHVlKHArNCxjLCJpMzIiKTtvLnNldFZhbHVlKHArNCoyLGwsImkzMiIpO28uc2V0VmFsdWUocCs0KjMsZiwiaTMyIik7by5zZXRWYWx1ZShwKzQqNCxkLCJpMzIiKTtvLnNldFZhbHVlKHArNCo1LHYsImkzMiIpO28uc2V0VmFsdWUocCs0KjYsbSwiaTMyIik7dmFyIGg9by5fS1dTTG9naW4ocCk7by5fZnJlZSh1KTtvLl9mcmVlKGMpO28uX2ZyZWUobCk7by5fZnJlZShmKTtvLl9mcmVlKGQpO28uX2ZyZWUodik7by5fZnJlZShtKTtvLl9mcmVlKHApO3JldHVybiBlLmZvcm1hdFJlc3VsdChoKX19LHtrZXk6ImJlZ2luU2Vzc2lvbiIsdmFsdWU6ZnVuY3Rpb24gcigpe3ZhciBuPSgwLHQuZ2V0TW9kdWxlKSgpO3ZhciBvPW4uX21hbGxvYyg0KTtuLnNldFZhbHVlKG8sMCwiaTMyIik7dmFyIGk9bi5fbWFsbG9jKDQpO24uc2V0VmFsdWUoaSxvLCJpMzIiKTt2YXIgYT1uLl9LV1NTZXNzaW9uQmVnaW4oaSk7ZS5zZXNzaW9uSWQ9bi5VVEY4VG9TdHJpbmcoYSk7ZS5hZGRXYXNtQ2FsbGJhY2soKTtyZXR1cm4gZS5mb3JtYXRSZXN1bHQoMCl9fSx7a2V5OiJlbmRTZXNzaW9uIix2YWx1ZTpmdW5jdGlvbiByKG4pe3ZhciBvPSgwLHQuZ2V0TW9kdWxlKSgpO3ZhciBpPW8uX21hbGxvYyhlLnNlc3Npb25JZC5sZW5ndGgrMSk7dmFyIGE9by5fbWFsbG9jKG4ucmVhc29uLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChlLnNlc3Npb25JZCxpLGUuc2Vzc2lvbklkLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChuLnJlYXNvbixhLG4ucmVhc29uLmxlbmd0aCsxKTt2YXIgcz1vLl9tYWxsb2MoMio0KTtvLnNldFZhbHVlKHMsaSwiaTMyIik7by5zZXRWYWx1ZShzKzQsYSwiaTMyIik7dmFyIHU9by5fS1dTU2Vzc2lvbkVuZChzKTtvLl9mcmVlKGkpO28uX2ZyZWUoYSk7by5fZnJlZShzKTtlLnNlc3Npb25JZD0iIjtyZXR1cm4gZS5mb3JtYXRSZXN1bHQodSl9fSx7a2V5OiJsb2dvdXQiLHZhbHVlOmZ1bmN0aW9uIHIoKXt2YXIgbj0oMCx0LmdldE1vZHVsZSkoKTtuLl9LV1NMb2dvdXQoKTtyZXR1cm4gZS5mb3JtYXRSZXN1bHQoMCl9fSx7a2V5OiJ3cml0ZUF1ZGlvIix2YWx1ZTpmdW5jdGlvbiByKG4pe3ZhciBvPSgwLHQuZ2V0TW9kdWxlKSgpO2lmKCFlLnNlc3Npb25JZCl7cmV0dXJue3Jlc3VsdDpmYWxzZX19dmFyIGk9bi5pbnQ4RGF0YTtpZihuLmludDE2RGF0YSl7aT1lLmNvbnZlcnRJbnQxNlRvSW50OChuLmludDE2RGF0YSl9aWYoIWkpe3JldHVybntyZXN1bHQ6ZmFsc2V9fXZhciBhPW8uX21hbGxvYyhlLnNlc3Npb25JZC5sZW5ndGgrMSk7by5zdHJpbmdUb1VURjgoZS5zZXNzaW9uSWQsYSxlLnNlc3Npb25JZC5sZW5ndGgrMSk7dmFyIHM9aS5sZW5ndGg7dmFyIHU9by5fbWFsbG9jKHMpO3ZhciBjPW5ldyBJbnQ4QXJyYXkoby5IRUFQOC5idWZmZXIsdSxzKTt2YXIgbD1uZXcgSW50OEFycmF5KGkuYnVmZmVyKTtjLnNldChsKTt2YXIgZj1vLl9tYWxsb2MoMyo0KTtvLnNldFZhbHVlKGYsYSwiaTMyIik7by5zZXRWYWx1ZShmKzQsdSwiaTMyIik7by5zZXRWYWx1ZShmKzgscywiaTMyIik7by5fS1dTQXVkaW9Xcml0ZShmKTtvLl9mcmVlKGEpO28uX2ZyZWUodSk7by5fZnJlZShmKTtyZXR1cm4gZS5mb3JtYXRSZXN1bHQoMCl9fSx7a2V5OiJ1cGRhdGVQYXJhbXMiLHZhbHVlOmZ1bmN0aW9uIHIobil7dmFyIG89KDAsdC5nZXRNb2R1bGUpKCk7dmFyIGk9by5fbWFsbG9jKG4ubG9nTGV2ZWwubGVuZ3RoKzEpO3ZhciBhPW8uX21hbGxvYyhlLmxhbmd1YWdlLmxlbmd0aCsxKTtvLnN0cmluZ1RvVVRGOChuLmxvZ0xldmVsLGksbi5sb2dMZXZlbC5sZW5ndGgrMSk7by5zdHJpbmdUb1VURjgobi5sYW5ndWFnZSxhLG4ubGFuZ3VhZ2UubGVuZ3RoKzEpO3ZhciBzPW8uX21hbGxvYyg0KjIpO28uc2V0VmFsdWUocyxpLCJpMzIiKTtvLnNldFZhbHVlKHMrNCxhLCJpMzIiKTt2YXIgdT1vLl9LV1NVcGRhdGVQYXJhbXMocyk7by5fZnJlZShpKTtvLl9mcmVlKGEpO28uX2ZyZWUocyk7cmV0dXJuIGUuZm9ybWF0UmVzdWx0KHUpfX0se2tleToic2V0Q2FsbGJhY2siLHZhbHVlOmZ1bmN0aW9uIHQocil7ZS5tc2dDYWxsYmFjaz1yLmNhbGxiYWNrO2UudHJhY2tDYWxsYmFjaz1yLnRyYWNrQ2FsbGJhY2t9fSx7a2V5OiJnZXRFcnJvck1zZ0J5Q29kZSIsdmFsdWU6ZnVuY3Rpb24gZShyKXt0cnl7dmFyIG49KDAsdC5nZXRNb2R1bGUpKCk7dmFyIG89bi5fS1dTR2V0RXJyb3JEZXNjcmlwdGlvbihyKTtpZihvKXt2YXIgaT1uLlVURjhUb1N0cmluZyhvKTt2YXIgYT1KU09OLnBhcnNlKGkpO3ZhciBzPU9iamVjdC5rZXlzKGEpWzBdO3JldHVybntlcnJvckNvZGU6cyxlcnJvck1zZzphW3JdfHwiIn19cmV0dXJue2Vycm9yQ29kZTpyLnRvU3RyaW5nKCksZXJyb3JNc2c6InVua25vd24gcmVhc29uIn19Y2F0Y2goZSl7cmV0dXJue2Vycm9yQ29kZTpyLnRvU3RyaW5nKCksZXJyb3JNc2c6InVua25vd24gcmVhc29uLCIrZS50b1N0cmluZygpfX19fSx7a2V5OiJjb252ZXJ0SW50MTZUb0ludDgiLHZhbHVlOmZ1bmN0aW9uIGUodCl7dmFyIHI9bmV3IEludDhBcnJheSh0Lmxlbmd0aCoyKTtmb3IodmFyIG49MDtuPHQubGVuZ3RoO24rKyl7dmFyIG89dFtuXTtyW24qMl09byYyNTU7cltuKjIrMV09bz4+OCYyNTV9cmV0dXJuIHJ9fSx7a2V5OiJhZGRXYXNtQ2FsbGJhY2siLHZhbHVlOmZ1bmN0aW9uIHIoKXtpZighZS5zZXNzaW9uSWQpe3JldHVybn12YXIgbj0oMCx0LmdldE1vZHVsZSkoKTt2YXIgbz1uLl9tYWxsb2MoZS5zZXNzaW9uSWQubGVuZ3RoKzEpO3ZhciBpPW4uX21hbGxvYyg0KTtuLnN0cmluZ1RvVVRGOChlLnNlc3Npb25JZCxvLGUuc2Vzc2lvbklkLmxlbmd0aCsxKTt2YXIgYT1uLmFkZEZ1bmN0aW9uKChmdW5jdGlvbih0KXt2YXIgcjt2YXIgbz1uLlVURjhUb1N0cmluZyhuLkhFQVAzMlt0Pj4+Ml0pO3ZhciBpPW4uSEVBUDMyW3QrND4+PjJdO3ZhciBhPW4uSEVBUDMyW3QrOD4+PjJdO3ZhciBzPW4uVVRGOFRvU3RyaW5nKG4uSEVBUDMyW3QrMTI+Pj4yXSk7KHI9ZS5tc2dDYWxsYmFjayk9PT1udWxsfHxyPT09dm9pZCAwfHxyLmNhbGwoZSx7c2Vzc2lvbklEOm8sbXNnVHlwZTppLGVycm9yQ29kZTphLHdha2V1cEluZm86c30pfSksInZwIik7dmFyIHM9bi5fbWFsbG9jKDMqNCk7bi5zZXRWYWx1ZShzLG8sImkzMiIpO24uc2V0VmFsdWUocys0LGEsImkzMiIpO24uc2V0VmFsdWUocys0KjIsaSwiaTMyIik7bi5fS1dTUmVnaXN0ZXJOb3RpZnkocyk7bi5fZnJlZShvKTtuLl9mcmVlKGkpO24uX2ZyZWUocyl9fV0pfSgpO2Quc2Vzc2lvbklkPSIiO2QubGFuZ3VhZ2U9InpoIjtkLmZvcm1hdFJlc3VsdD1mdW5jdGlvbihlKXtpZihlLnRvU3RyaW5nKCk9PT1yLlNES0Vycm9yQ29kZS5TVUNDRVNTKXtyZXR1cm57cmVzdWx0OnRydWUsZXJyb3JDb2RlOnIuU0RLRXJyb3JDb2RlLlNVQ0NFU1MsZXJyb3JNc2c6IiJ9fXJldHVybiBpKHtyZXN1bHQ6ZmFsc2V9LGQuZ2V0RXJyb3JNc2dCeUNvZGUoZSkpfX0pKX19O3ZhciB0PXt9O2Z1bmN0aW9uIHIobil7dmFyIG89dFtuXTtpZihvIT09dW5kZWZpbmVkKXtyZXR1cm4gby5leHBvcnRzfXZhciBpPXRbbl09e2V4cG9ydHM6e319O2Vbbl0uY2FsbChpLmV4cG9ydHMsaSxpLmV4cG9ydHMscik7cmV0dXJuIGkuZXhwb3J0c312YXIgbj1yKDUyOSl9KSgpOw==\n";var r=e.getWorkerUrl=function e(){return URL.createObjectURL(new Blob([atob(t)]))}}))},1752:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getArrayBufferWorkerUrl=void 0;var t="\nconst inputCodecs = {\n Int8: 128,\n Int16: 32768,\n Int32: 2147483648,\n Float32: 1,\n};\n\nconst typedArrays = {\n Int8: Int8Array,\n Int16: Int16Array,\n Int32: Int32Array,\n Float32: Float32Array,\n};\n\nconst base64ToUint8Array = (base64Data) => {\n try {\n const binary = atob(base64Data);\n return Uint8Array.from(binary, c => c.charCodeAt(0));\n } catch (e) {\n console.error('base64ToUint8Array error', e);\n return undefined;\n }\n}\n\nconst checkSilence = (dataArray) => {\n if(!dataArray) {\n return true;\n }\n for (let i = 0; i < dataArray?.length; i++) {\n if (Math.abs(dataArray[i]) > 3) {\n return false;\n }\n }\n return true;\n}\n\nconst typedArrayToFloat32 = ({arrayBuffer, codecs}) => {\n try {\n const convertValue = inputCodecs[codecs];\n // 转Float32Array\n let newData = new typedArrays[codecs](arrayBuffer.buffer);\n \n const float32 = new Float32Array(newData.length);\n \n for (let i = 0; i < newData.length; i++) {\n // buffer 缓冲区的数据,需要是IEEE754 里32位的线性PCM,范围从-1到+1\n // 所以对数据进行除法\n // 除以对应的位数范围,得到-1到+1的数据\n float32[i] = newData[i] / convertValue;\n }\n \n return float32;\n } catch (e) {\n console.error('typedArrayToFloat32 error', e);\n return undefined;\n }\n}\nclass ArrayBufferWorker {\n static eventListener(e) {\n const { data } = e;\n let result = null;\n switch(data.method) {\n case 'base64ToUint8Array': \n result = base64ToUint8Array(data.data);\n if(checkSilence(result)) {\n result = null;\n }\n break;\n case 'typedArrayToFloat32': \n result = typedArrayToFloat32(data.data);\n break;\n default: break;\n }\n postMessage({\n res: result,\n sno: data.sno\n });\n }\n}\n\naddEventListener('message', ArrayBufferWorker.eventListener);\n";var r=e.getArrayBufferWorkerUrl=function e(){return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}}))},2144:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(2583),r(1752)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PCMPlayer=e.InputCodecsEnum=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(){"use strict";s=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(n,i){function o(){return new t((function(e,t){r(n,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=v(e,"string");return"symbol"==i(t)?t:t+""}function v(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var m=e.InputCodecsEnum=function(e){e["Int8"]="Int8";e["Int16"]="Int16";e["Int32"]="Int32";e["Float32"]="Float32";return e}({});var y=function(e){e["SUCCESS"]="SUCCESS";e["MUTE"]="MUTE";e["NONE"]="NONE";e["FAIL"]="FAIL";return e}(y||{});var g=function(){function e(t){var i=t.base64,o=t.arrayBuffer,a=t.inputCodec,s=a===void 0?m.Int16:a,u=t.audioCtx,c=t.timeOut,f=c===void 0?1e3:c;l(this,e);h(this,"base64",null);h(this,"arrayBuffer",void 0);h(this,"inputCodec",m.Int16);h(this,"audioBuffer",null);h(this,"initPromise",void 0);h(this,"audioCtx",null);h(this,"timeOut",void 0);h(this,"inputTime",void 0);h(this,"preDealTime",void 0);h(this,"consumeTime",void 0);h(this,"doneTime",void 0);this.base64=i||null;this.arrayBuffer=o;this.audioCtx=u;this.timeOut=f;this.initPromise=this.preDeal();this.inputCodec=s;this.inputTime=Date.now();if(!e.worker){e.worker=new r.WorkerManager({url:(0,n.getArrayBufferWorkerUrl)(),enablePromiseMethod:true,onMessage:function e(){}})}}return d(e,[{key:"preDeal",value:function(){var r=c(s().mark((function r(){var n;var i,o,a,u,c;return s().wrap((function r(s){while(1)switch(s.prev=s.next){case 0:if(!this.arrayBuffer){s.next=4;break}i=this.arrayBuffer;s.next=12;break;case 4:if(!this.base64){s.next=11;break}s.next=7;return Promise.race([(o=e.worker)===null||o===void 0?void 0:o.promisePostMessage({data:this.base64,method:"base64ToUint8Array"}),(0,t.sleep)(this.timeOut)]);case 7:a=s.sent;i=a===null||a===void 0?void 0:a.res;s.next=12;break;case 11:return s.abrupt("return",null);case 12:if(i){s.next=14;break}return s.abrupt("return",null);case 14:s.next=16;return Promise.race([(n=e.worker)===null||n===void 0?void 0:n.promisePostMessage({data:{arrayBuffer:i,codecs:this.inputCodec},method:"typedArrayToFloat32"}),(0,t.sleep)(this.timeOut)]);case 16:u=s.sent;c=u===null||u===void 0?void 0:u.res;if(c){s.next=20;break}return s.abrupt("return",null);case 20:return s.abrupt("return",this.toAudioBuffer(c));case 21:case"end":return s.stop()}}),r,this)})));function n(){return r.apply(this,arguments)}return n}()},{key:"toAudioBuffer",value:function e(t){var r;var n=t.length/1;if(!this.audioCtx){return null}this.audioBuffer=(r=this.audioCtx)===null||r===void 0?void 0:r.createBuffer(1,n,16e3);for(var i=0;i<1;i++){var o=this.audioBuffer.getChannelData(i);var a=i;var s=50;for(var u=0;u<n;u++){o[u]=t[a];if(u>=n-51){o[u]=o[u]*s--/50}if(u<50){o[u]=o[u]*u/50}a+=1}}this.preDealTime=Date.now();return this.audioBuffer}},{key:"consume",value:function(){var e=c(s().mark((function e(){return s().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:this.consumeTime=Date.now();return t.abrupt("return",this.initPromise);case 2:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"done",value:function e(){this.doneTime=Date.now();this.destroy()}},{key:"getStat",value:function e(){return{inputTime:this.inputTime,preDealTime:this.preDealTime,consumeTime:this.consumeTime,doneTime:this.doneTime}}},{key:"getAudioBuffer",value:function e(){return this.audioBuffer}},{key:"destroy",value:function e(){this.audioBuffer=null;this.base64=null;this.audioCtx=null}}])}();h(g,"worker",void 0);var b=function(){function e(t){var r=t.consumeFn,n=t.audioCtx,i=t.inputCodec,o=t.onDone,a=t.timeOut;l(this,e);h(this,"list",[]);h(this,"consumeFn",void 0);h(this,"onDone",void 0);h(this,"inputCodec",m.Int16);h(this,"audioCtx",void 0);h(this,"timeOut",void 0);h(this,"totalInput",0);h(this,"doingNumber",0);h(this,"consumeSuccessNum",0);h(this,"consumeMuteNum",0);h(this,"consumeFailNum",0);h(this,"consumeNoneNum",0);this.consumeFn=r;this.inputCodec=i;this.audioCtx=n;this.timeOut=a;this.onDone=o}return d(e,[{key:"clear",value:function e(){this.list.forEach((function(e){e.destroy()}));this.list=[];this.doingNumber=0;this.totalInput=0;this.consumeSuccessNum=0;this.consumeMuteNum=0;this.consumeFailNum=0;this.consumeNoneNum=0}},{key:"pushBase64",value:function e(t){var r=new g({base64:t,inputCodec:this.inputCodec,audioCtx:this.audioCtx,timeOut:this.timeOut});this.list.push(r);this.totalInput++;this.consume()}},{key:"pushArrayBuffer",value:function e(t){var r=new g({arrayBuffer:t,inputCodec:this.inputCodec,audioCtx:this.audioCtx,timeOut:this.timeOut});this.list.push(r);this.totalInput++;this.consume()}},{key:"stop",value:function e(){}},{key:"consume",value:function(){var e=c(s().mark((function e(){var t;var r;return s().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:if(this.isConsumeImmediately()){n.next=2;break}return n.abrupt("return");case 2:if(!(this.list.length<=0)){n.next=4;break}return n.abrupt("return");case 4:r=this.list.shift();if(r){n.next=7;break}return n.abrupt("return");case 7:this.increase();(t=this.consumeFn)===null||t===void 0||t.call(this,r);case 9:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"done",value:function e(t,r){var n;this.reduce();r.done();if(t===y.SUCCESS){this.consumeSuccessNum++}else if(t===y.FAIL){this.consumeFailNum++}else if(t===y.MUTE){this.consumeMuteNum++}else if(t===y.NONE){this.consumeNoneNum++}(n=this.onDone)===null||n===void 0||n.call(this,{doingNumber:this.doingNumber,totalInput:this.totalInput,consumeSuccessNum:this.consumeSuccessNum,consumeFailNum:this.consumeFailNum,consumeMuteNum:this.consumeMuteNum,consumeNoneNum:this.consumeNoneNum,last:r.getStat()})}},{key:"isConsumeImmediately",value:function e(){return this.doingNumber<=3}},{key:"getWaitingNum",value:function e(){return this.list.length}},{key:"increase",value:function e(){var r=this.doingNumber;this.doingNumber++;if(r<=100&&this.doingNumber>100){(0,t.getPLogger)().error("doingNumber more than 100")}}},{key:"reduce",value:function e(){var r=this.doingNumber;this.doingNumber--;this.consume();if(r>=0&&this.doingNumber<0){(0,t.getPLogger)().error("doingNumber less than 0")}}}])}();var _=e.PCMPlayer=function(){function e(t){l(this,e);h(this,"option",{inputCodec:m.Int16,channelNums:1,sampleRate:8e3,flushTime:1e3});h(this,"audioCtx",void 0);h(this,"audioMediaStreamDestination",void 0);h(this,"gainNode",void 0);h(this,"startTime",void 0);h(this,"muted",false);h(this,"audioConsumeQueue",void 0);h(this,"nodePool",[]);this.option=a({},t);this.checkCodec();this.initAudioContext();this.addAudioContextEvent()}return d(e,[{key:"checkCodec",value:function e(){if(!["Int8","Int16","Int32","Float32"].includes(this.option.inputCodec)){throw new Error("wrong codec.please input one of these codecs:Int8,Int16,Int32,Float32")}return true}},{key:"initAudioContext",value:function e(){var t,r;this.audioCtx=new window.AudioContext;this.audioConsumeQueue=new b({consumeFn:this.flush.bind(this),audioCtx:this.audioCtx,inputCodec:this.option.inputCodec,onDone:this.option.onended,timeOut:(t=this.option)===null||t===void 0?void 0:t.timeOut});this.audioMediaStreamDestination=(r=this.audioCtx)===null||r===void 0?void 0:r.createMediaStreamDestination();this.gainNode=this.audioCtx.createGain();this.gainNode.gain.value=0;this.gainNode.connect(this.audioCtx.destination);this.startTime=this.audioCtx.currentTime;var n=this.audioCtx.createBufferSource();n.buffer=null;n.connect(this.audioMediaStreamDestination);n.connect(this.gainNode);n.start(0)}},{key:"clear",value:function e(r){var n;(0,t.getPLogger)().info("clear",r);(n=this.audioConsumeQueue)===null||n===void 0||n.clear();this.nodePool.forEach((function(e){e.stop();e.disconnect();e.onended=null}));this.nodePool=[]}},{key:"addAudioContextEvent",value:function e(){var t=this;if(this.audioCtx&&typeof t.option.onstatechange==="function"){this.audioCtx.onstatechange=function(e){var r,n;t.audioCtx&&((r=(n=t.option).onstatechange)===null||r===void 0?void 0:r.call(n,this,e,t.audioCtx.state))};return true}return false}},{key:"feedBase64",value:function e(r){var n;if(this.muted){return false}if(!r||(0,t.formatType)(r)!==t.formatType.STRING){(0,t.getPLogger)().error("feedBase64","请传入base64数据");return false}(n=this.audioConsumeQueue)===null||n===void 0||n.pushBase64(r);return true}},{key:"feed",value:function r(n){var i;if(this.muted){return false}var o="feed";if(!e.isTypedArray(n)){(0,t.getPLogger)().error(o,"请传入ArrayBuffer或者任意TypedArray");return false}(i=this.audioConsumeQueue)===null||i===void 0||i.pushArrayBuffer(n);return true}},{key:"getMediaStream",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream}},{key:"getAudioMediaTrack",value:function e(){var t;return(t=this.audioMediaStreamDestination)===null||t===void 0?void 0:t.stream.getAudioTracks()[0]}},{key:"setVolume",value:function e(t){if(!this.gainNode){return}this.gainNode.gain.value=t}},{key:"destroy",value:function e(){var r,n,i,o;(0,t.getPLogger)().info("destroy");(r=this.audioCtx)===null||r===void 0||r.close();(n=this.audioMediaStreamDestination)===null||n===void 0||n.disconnect();(i=this.gainNode)===null||i===void 0||i.disconnect();delete this.audioCtx;delete this.audioMediaStreamDestination;delete this.gainNode;(o=this.audioConsumeQueue)===null||o===void 0||o.clear();delete this.audioConsumeQueue;this.clear("destroy")}},{key:"pause",value:function(){var e=c(s().mark((function e(){var t;return s().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.suspend();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"continue",value:function(){var e=c(s().mark((function e(){var t;return s().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return(t=this.audioCtx)===null||t===void 0?void 0:t.resume();case 2:return r.abrupt("return",true);case 3:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"flush",value:function(){var e=c(s().mark((function e(t){var r,n,i;return s().wrap((function e(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return t.consume();case 2:r=o.sent;if(r){o.next=6;break}(n=this.audioConsumeQueue)===null||n===void 0||n.done(y.NONE,t);return o.abrupt("return",false);case 6:if(!this.muted){o.next=9;break}(i=this.audioConsumeQueue)===null||i===void 0||i.done(y.MUTE,t);return o.abrupt("return",false);case 9:if(this.playAudioBuffer(r,t)){o.next=11;break}return o.abrupt("return",false);case 11:return o.abrupt("return",true);case 12:case"end":return o.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"playAudioBuffer",value:function e(r,n){var i,o=this;if(!this.audioCtx||!this.gainNode||!this.audioMediaStreamDestination){var a;(a=this.audioConsumeQueue)===null||a===void 0||a.done(y.FAIL,n);(0,t.getPLogger)().debug("play","未初始化或已销毁",!this.audioCtx,!this.gainNode,!this.audioMediaStreamDestination);return false}if(!this.startTime||this.startTime<this.audioCtx.currentTime){this.startTime=this.audioCtx.currentTime}var s=((i=this.audioConsumeQueue)===null||i===void 0?void 0:i.getWaitingNum())||0;var u=this.audioCtx.createBufferSource();u.buffer=r;if(s>5){u.playbackRate.value=1.2}u.connect(this.audioMediaStreamDestination);u.connect(this.gainNode);u.onended=function(){var e;(e=o.audioConsumeQueue)===null||e===void 0||e.done(y.SUCCESS,n);if(u){u.stop();u.disconnect();u.onended=null;u=null}};this.nodePool.push(u);u.start(this.startTime);this.startTime+=r.duration;return true}},{key:"playNow",value:function e(){var t;this.startTime=(t=this.audioCtx)===null||t===void 0?void 0:t.currentTime}},{key:"muteAudio",value:function e(){(0,t.getPLogger)().info("muteAudio");this.muted=true}},{key:"unmuteAudio",value:function e(){(0,t.getPLogger)().info("unmuteAudio");this.muted=false}}],[{key:"isTypedArray",value:function e(t){return t.constructor===ArrayBuffer||!!(t.length&&t.buffer&&t.buffer.constructor===ArrayBuffer)}}])}()}))},2265:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.setSessionStorageItem=e.setLocalStorageItem=void 0;var r=function e(r){return function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{key:"",value:""};if(!e){return false}var n=e.key,i=e.value,o=e.isForce;var a=r?window.localStorage:window.sessionStorage;if(!a){(0,t.getPLogger)().warn("setStorageItem no Storage",{isLocalStorage:r,key:n});return false}if(!n){(0,t.getPLogger)().warn("setStorageItem no key",{isLocalStorage:r,key:n});return false}if((0,t.formatType)(i)!==t.formatType.STRING){(0,t.getPLogger)().warn("setStorageItem value not string",{isLocalStorage:r,key:n});return false}try{(0,t.getPLogger)().info("setStorageItem",{isLocalStorage:r,key:n});a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}catch(e){(0,t.getPLogger)().error("setStorageItem",{isLocalStorage:r,key:n,isForce:o,e});if(!o){return false}a.clear();a.setItem(n,i===null||i===void 0?void 0:i.toString());return true}}};var n=e.setLocalStorageItem=r(true);var i=e.setSessionStorageItem=r(false)}))},2583:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WorkerManager=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=e.WorkerManager=function(){function e(r){var n=this;o(this,e);u(this,"worker",void 0);u(this,"messageMap",new Map);u(this,"opts",{url:"",enablePromiseMethod:true});u(this,"customOnMessage",void 0);u(this,"customOnError",void 0);u(this,"createWorker",(function(){(0,t.getPLogger)().debug("createWorker");if(n.worker){return}n.worker=new Worker(n.opts.url);n.worker.onmessage=n.onMessage.bind(n);n.worker.onerror=n.dealError.bind(n);n.worker.onmessageerror=n.dealError.bind(n)}));(0,t.getPLogger)().debug("WorkerManager.constructor",r);if(r.url){this.opts.url=r.url}if(r.enablePromiseMethod){this.opts.enablePromiseMethod=r.enablePromiseMethod}this.customOnMessage=r.onMessage;this.customOnError=r.onError}return s(e,[{key:"promisePostMessage",value:function e(r){var n=this;if(!this.worker){this.createWorker()}return new Promise((function(e){var o;r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(o=n.worker)===null||o===void 0||o.postMessage(r);if(!n.opts.enablePromiseMethod){e({result:true});return}n.messageMap.set(r.sno,e)}))}},{key:"postMessage",value:function e(r){var n;if(!this.worker){this.createWorker()}r=i({},r);if(!r.sno){r.sno=(0,t.getClientId)()}if(!r.now){r.now=Date.now()}(n=this.worker)===null||n===void 0||n.postMessage(r)}},{key:"setOnMessage",value:function e(r){(0,t.getPLogger)().debug("WorkerManager.setOnMessage");this.customOnMessage=r}},{key:"onMessage",value:function e(t){var r,n;if((r=t.data)!==null&&r!==void 0&&r.sno&&this.opts.enablePromiseMethod){var i=this.messageMap.get(t.data.sno);if(i){i===null||i===void 0||i(t.data);this.messageMap["delete"](t.data.sno);return}}(n=this.customOnMessage)===null||n===void 0||n.call(this,t.data)}},{key:"dealError",value:function e(r){var n;(0,t.getPLogger)().error("WorkerManager.dealError",r);delete this.worker;(n=this.customOnError)===null||n===void 0||n.call(this,r)}}])}()}))},2615:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2583),r(258),r(4706)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WebWorkerUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=h(e,"string");return"symbol"==i(t)?t:t+""}function h(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=function(e){e["CLEAR"]="clear";e["SET"]="set";return e}(p||{});var v=e.WebWorkerUtil=function(){function e(){u(this,e)}return l(e,null,[{key:"getManagerInstance",value:function r(){if(!e.timeoutWorker){e.timeoutWorker=new t.WorkerManager({url:(0,n.getTimeWorkerUrl)(),enablePromiseMethod:true,onMessage:e.dealTimeoutMessage})}return e.timeoutWorker}},{key:"setWorkerTimeout",value:function t(n,i){var o=(0,r.getClientId)();(0,r.getPLogger)().debug("setWorkerTimeout",o);e.timeoutCallbackMap.set(o,n);e.getManagerInstance().postMessage({timerId:o,method:p.SET,delay:i});return o}},{key:"workerSleep",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:i=(0,r.getClientId)();return o.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:i,method:p.SET,delay:n}));case 2:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"clearWorkerTimeout",value:function(){var t=s(o().mark((function t(r){return o().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:e.timeoutCallbackMap["delete"](r);return n.abrupt("return",e.getManagerInstance().promisePostMessage({timerId:r,method:p.CLEAR}));case 2:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"dealTimeoutMessage",value:function(){var t=s(o().mark((function t(n){var i;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:(0,r.getPLogger)().debug("dealTimeoutMessage",n);if(n.timerId){o.next=3;break}return o.abrupt("return");case 3:i=e.timeoutCallbackMap.get(n.timerId);i===null||i===void 0||i();e.timeoutCallbackMap["delete"](n.timerId);case 6:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()}])}();f(v,"timeoutWorker",void 0);f(v,"timeoutCallbackMap",new Map)}))},2703:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4772),r(5625),r(9655),r(299)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WakeupHeartbeatManager=void 0;function o(){"use strict";o=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==h(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(h(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=d(e,"string");return"symbol"==h(t)?t:t+""}function d(e,t){if("object"!=h(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function h(e){"@babel/helpers - typeof";return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}var p=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":h(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var v=new i.Log({module:"WakeupHeartbeatManager"});var m=e.WakeupHeartbeatManager=function(){function e(){u(this,e)}return l(e,null,[{key:"setHeartbeatInfo",value:function t(r){v.info("setHeartbeatInfo",r);e.jobId=r.jobId;e.failedCallback=r.failedCallback}},{key:"startHeartBeat",value:function t(r){v.info("startHeartBeat",r);e.heartCount=0;e.timerManager.cancel().schedule(e.heartBeatTask,e.heartbeatInterval)}},{key:"stopHeartBeat",value:function t(r){v.info("stopHeartBeat",r);e.heartCount=0;e.jobId="";e.timerManager.cancel()}},{key:"wakeupHeartbeat",value:function(){var t=s(o().mark((function t(){var i;var a,s,u,c;return o().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:e.heartCount++;a=Date.now();s=e.jobId;o.next=5;return n.HttpRequest.doPost({url:r.BaseUrl.HEARTBEAT.replace("{job_id}",s)});case 5:u=o.sent;c=Date.now()-a;v.info("wakeupHeartbeat",e.heartCount,u===null||u===void 0||(i=u.data)===null||i===void 0?void 0:i.error_code,c,s,e.jobId);o.next=10;return e.handleHeartbeatResult(u===null||u===void 0?void 0:u.data,s);case 10:case"end":return o.stop()}}),t)})));function i(){return t.apply(this,arguments)}return i}()},{key:"handleHeartbeatResult",value:function(){var r=s(o().mark((function r(n,i){return o().wrap((function r(o){while(1)switch(o.prev=o.next){case 0:if(!(!n||(0,t.formatType)(n)!==t.formatType.OBJECT)){o.next=2;break}return o.abrupt("return");case 2:e.checkErrorCodes(n===null||n===void 0?void 0:n.error_code,i);case 3:case"end":return o.stop()}}),r)})));function n(e,t){return r.apply(this,arguments)}return n}()},{key:"checkErrorCodes",value:function t(r,n){var i=e.errorCodeList.includes(r);if(i&&n===e.jobId){var o;(o=e.failedCallback)===null||o===void 0||o.call(e,r);e.stopHeartBeat("checkErrorCodes")}return i}}])}();m.heartbeatInterval=1e4;m.timerManager=new t.Timer({userWebWorker:false});m.heartBeatTask=new t.Timer.TimerTask(m.wakeupHeartbeat);m.errorCodeList=[r.RetCodes.DIALOG_NOT_EXIST,r.RetCodes.DIALOG_NO_PERMISSION,r.RetCodes.WAKEUP_NOT_ENOUGH_CHANNEL];m.heartCount=0;m.jobId="";p([(0,t.printfDecorator)(v)],m,"setHeartbeatInfo",null);p([(0,t.printfDecorator)(v)],m,"startHeartBeat",null);p([(0,t.printfDecorator)(v)],m,"stopHeartBeat",null);p([(0,t.printfDecorator)(v)],m,"wakeupHeartbeat",null);p([(0,t.printfDecorator)(v)],m,"handleHeartbeatResult",null);p([(0,t.printfDecorator)(v)],m,"checkErrorCodes",null)}))},2771:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ReactUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==r(t)?t:t+""}function h(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=e.ReactUtil=function(){function e(){c(this,e)}return f(e,null,[{key:"showDifferentProperty",value:function e(t,r,n){var i=[];if(false){}return i}},{key:"reactStopPropagation",value:function e(t){var r,n,i,o,a,s;t===null||t===void 0||(r=(n=t).stopPropagation)===null||r===void 0||r.call(n);t===null||t===void 0||(i=t.nativeEvent)===null||i===void 0||(o=i.stopPropagation)===null||o===void 0||o.call(i);t===null||t===void 0||(a=t.nativeEvent)===null||a===void 0||(s=a.stopImmediatePropagation)===null||s===void 0||s.call(a)}}])}()}))},2867:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(7057),r(5162),r(9969),r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AudioWorkletNodeRecord=void 0;t=c(t);var o,s,u;function c(e){return e&&e.__esModule?e:{default:e}}function l(){"use strict";l=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,c,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){f(o,n,i,a,s,"next",e)}function s(e){f(o,n,i,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=g(e,"string");return"symbol"==a(t)?t:t+""}function g(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var _=e.AudioWorkletNodeRecord=(o=(0,n.printfDecorator)((0,i.getPLogger)()),s=(0,n.printfDecorator)((0,i.getPLogger)()),u=function(){function e(n){h(this,e);m(this,"audioContext",void 0);this.audioContext=new t["default"]({url:(0,r.getLocalRecorderUrl)(),processorName:"LocalRecorderProcessor",processorOptions:{bufferSize:n.bufferSize},audioCallback:n.audioCallback})}return v(e,[{key:"startRecord",value:function(){var e=d(l().mark((function e(t){return l().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",this.audioContext.start(t));case 1:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=d(l().mark((function e(){return l().wrap((function e(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this.audioContext.stop());case 1:case"end":return t.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}}])}(),b(u.prototype,"startRecord",[o],Object.getOwnPropertyDescriptor(u.prototype,"startRecord"),u.prototype),b(u.prototype,"stopRecord",[s],Object.getOwnPropertyDescriptor(u.prototype,"stopRecord"),u.prototype),u)}))},2897:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AutoQueryData=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return s(e)||a(e)||o(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=b(e,"string");return"symbol"==r(t)?t:t+""}function b(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=e.AutoQueryData=function(){function e(t){p(this,e);y(this,"_opts",void 0);y(this,"_data",void 0);y(this,"_timer",void 0);y(this,"_count",0);y(this,"_firstProm",void 0);this._opts=this._getOpts(t);this._dealGetDataFunc("constructor")}return m(e,[{key:"_getOpts",value:function e(r){if((0,t.formatType)(r)!==t.formatType.OBJECT){throw new Error("opts must a object")}(0,t.getPLogger)().debug("_getOpts",(0,t.formatType)(r.getDataFunc),(0,t.formatType)(r.args));if((0,t.formatType)(r.getDataFunc)!==t.formatType.FUNCTION&&(0,t.formatType)(r.getDataFunc)!==t.formatType.ASYNCFUNCTION){throw new Error("opts.getDataFunc must a function")}if((0,t.formatType)(r.args)!==t.formatType.ARRAY&&(0,t.formatType)(r.args)!==t.formatType.UNDEFINED){throw new Error("opts.args must a array or undefined")}var n=h({},r);if((0,t.formatType)(n.delay)!==t.formatType.NUMBER){n.delay=3e4}return n}},{key:"getSyncData",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";r+=",getSyncData";if(!this._timer){this._dealGetDataFunc(r)}(0,t.getPLogger)().debug(r,this._data);return this._data}},{key:"getData",value:function(){var e=f(c().mark((function e(){var r,n=arguments;return c().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:r=n.length>0&&n[0]!==undefined?n[0]:"";r+=",getData";if(this._timer){i.next=5;break}i.next=5;return this._dealGetDataFunc(r);case 5:if(!this._firstProm){i.next=8;break}i.next=8;return this._firstProm;case 8:(0,t.getPLogger)().debug(r,this._data);return i.abrupt("return",this._data);case 10:case"end":return i.stop()}}),e,this)})));function r(){return e.apply(this,arguments)}return r}()},{key:"stop",value:function e(){(0,t.getPLogger)().debug("stop",this._data);if(this._timer){clearInterval(this._timer)}delete this._timer;delete this._data;delete this._firstProm;this._count=0}},{key:"_dealGetDataFunc",value:function(){var e=f(c().mark((function e(r){var i=this,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:r+=",_dealGetDataFunc";this._timer=setInterval(f(c().mark((function e(){var o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.next=2;return(o=i._opts).getDataFunc.apply(o,n(i._opts.args||[]));case 2:i._data=a.sent;i._count++;(0,t.getPLogger)().debug(r,i._count,i._data);case 5:case"end":return a.stop()}}),e)}))),this._opts.delay);this._count++;this._firstProm=(o=this._opts).getDataFunc.apply(o,n(this._opts.args||[]));a.next=6;return this._firstProm;case 6:this._data=a.sent;(0,t.getPLogger)().debug(r,this._count,this._data);case 8:case"end":return a.stop()}}),e,this)})));function r(t){return e.apply(this,arguments)}return r}()}])}()}))},3226:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Arg1Map=void 0;var t;(function(e){e["SERVER_API"]="wakeup_sdk_web_server_api";e["LOGGER_MESSAGE"]="wakeup_sdk_logger_message";e["WAKEUP_SDK_METHOD"]="wakeup_sdk_method";e["WAKEUP_SDK_NOTIFY"]="wakeup_sdk_notify";e["WAKEUP_SDK_NATIVE_TRACK"]="wakeup_sdk_native_track"})(t||(e.Arg1Map=t={}))}))},3399:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(3830),r(258),r(4521),r(9969),r(2615)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Timer=void 0;var s,u,c,l,f,d,h,p,v;function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){var t=S(e,"string");return"symbol"==a(t)?t:t+""}function S(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var w=(0,r.getPLogger)();var T=function e(r,n){var i;return(r===null||r===void 0||(i=r.constructor)===null||i===void 0?void 0:i.name)===t.TimerTask.name&&n>0};var I=e.Timer=(s=(0,i.printfDecorator)(w),u=(0,i.printfDecorator)(w),c=(0,i.printfDecorator)(w),l=(0,i.customDecorator)({preMethodDeal:T}),f=(0,i.printfDecorator)(w),d=(0,i.customDecorator)({preMethodDeal:T}),h=(0,i.printfDecorator)(w),p=(v=function(){function e(t){var r=this;m(this,e);b(this,"_timerHandlers",[]);b(this,"_cancelTaskIdList",[]);b(this,"userWebWorker",false);b(this,"setTimeout",(function(e,t){if(r.userWebWorker){return o.WebWorkerUtil.setWorkerTimeout(e,t)}return setTimeout(e,t)}));b(this,"clearTimeout",(function(e){if(r.userWebWorker){return o.WebWorkerUtil.clearWorkerTimeout(e)}return clearTimeout(e)}));if(t!==null&&t!==void 0&&t.userWebWorker){this.userWebWorker=true}this.schedule=this.schedule.bind(this);this.scheduleFixedInterval=this.scheduleFixedInterval.bind(this);this.cancel=this.cancel.bind(this);w.debug("Timer.constructor",t)}return g(e,[{key:"cancel",value:function e(){var t=this;w.debug("Timer.cancel");this._timerHandlers.forEach((function(e){return t._cancelTask(e)}));this._timerHandlers=[];return this}},{key:"purge",value:function e(){w.debug("Timer.purge");var t;var r;for(var n=this._timerHandlers.length-1;n>-1;n--){t=this._timerHandlers[n].task;if(t.isCancel()){r=this._timerHandlers.splice(n,1);w.debug("Timer.purge",t,r[0]);this._cancelTask(r[0])}}return this}},{key:"schedule",value:function e(t,r){var i=this;w.debug("Timer.schedule",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){return t.run()["catch"]((function(e){return w.error("schedule")}))["finally"]((function(){var e=Date.now();w.debug("Timer.schedule run",e-o);if(i._cancelTaskIdList.includes(t.id)){w.warn("schedule, this task has already canceled",t.id)}else{i.schedule(t,r)}}))}),r)});return this}},{key:"scheduleFixedInterval",value:function e(t,r){var i=this;w.debug("Timer.scheduleFixedInterval",r);var o=Date.now();(0,n.updateArrayItemByKeys)(this._timerHandlers,["id"],{id:t.id,task:t,time:r,handle:this.setTimeout((function(){var e=Date.now();w.debug("Timer.scheduleFixedInterval run",e-o);t.run()["catch"]((function(e){return w.error("scheduleFixedInterval")}));i.scheduleFixedInterval(t,r)}),r)});return this}},{key:"_cancelTask",value:function e(t){w.debug("Timer._cancelTask");this.clearTimeout(t.handle);if(this._cancelTaskIdList.includes(t.id)){w.warn("_cancelTask, this task has already canceled",t.id)}else{this._cancelTaskIdList.push(t.id)}return this}}])}(),b(v,"TimerTask",t.TimerTask),v),E(p.prototype,"cancel",[s],Object.getOwnPropertyDescriptor(p.prototype,"cancel"),p.prototype),E(p.prototype,"purge",[u],Object.getOwnPropertyDescriptor(p.prototype,"purge"),p.prototype),E(p.prototype,"schedule",[c,l],Object.getOwnPropertyDescriptor(p.prototype,"schedule"),p.prototype),E(p.prototype,"scheduleFixedInterval",[f,d],Object.getOwnPropertyDescriptor(p.prototype,"scheduleFixedInterval"),p.prototype),E(p.prototype,"_cancelTask",[h],Object.getOwnPropertyDescriptor(p.prototype,"_cancelTask"),p.prototype),p)}))},3736:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSuffix=e.getFileName=e.formatFileSize=void 0;var r=function e(t){var r=[];for(var n=0;n<(t===null||t===void 0?void 0:t.length);n++){if(t[n]!==""){r.push(t[n])}}return r};var n=e.getFileName=function e(t){var n;var i=t.split("/");i=r(i);i=(n=i[i.length-1])===null||n===void 0?void 0:n.split("\\");i=r(i);return i[i.length-1]||t};var i=e.getSuffix=function e(r){if((0,t.isNullOrEmpty)(r)){r=""}return r.slice((r.lastIndexOf(".")-1>>>0)+2).toLowerCase()};var o=e.formatFileSize=function e(t){if(t<1e3){return t+"B"}else if(t>=1e3&&t<1e6){return Math.round(t*100/1024)/100+"KB"}else if(t>=1e6&&t<1e9){return Math.round(t*100/1024/1024)/100+"MB"}return Math.round(t*100/1024/1024/1024)/100+"GB"}}))},3803:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.handleUrlPrint=e.handleTokenPrint=e.handlePhoneNumberPrint=e.handleNickNamePrint=e.handleIpPrint=e.handleAccountPrint=e.formatConfName=void 0;var r=e.handlePhoneNumberPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}var n=r.toString();var i=/^1[3456789]\d{9}$/g;var o=n.length;var a=Math.floor((o-3)/2);if(o<3){return n}else if(o<5){return n.substr(0,1)+"***"}else if(o>11){return n.substr(0,2)+"*****"+n.substr(-3)}return i.test(n)?n.substr(0,3)+"****"+n.substr(7):n.substr(0,a)+"***"+n.substr(a+3)};var n=e.handleAccountPrint=function e(n){if((0,t.isNullOrEmpty)(n)||!n){return""}n=n.toString();var i=/^1[3456789]\d{9}$/g;if(i.test(n)){return r(n)}var o=/^\+99|\+8657\d+/g;if(o.test(n)){return n.substr(0,2)+"*****"+n.substr(-3)}if(n.length<=5){return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}if(n.length<=13){return n.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return n.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))};var i=e.handleIpPrint=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||!r){return""}return r.replace(/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/gi,(function(e){return e.replace(/(\d{1,3})$/gi,(function(e,t){return t.replace(/\d/gi,"*")}))}))};var o=e.handleUrlPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.split("?")[0]};var a=e.handleTokenPrint=function e(r){if((0,t.isNullOrEmpty)(r)){return""}r=r.toString();return r.substr(0,2)+"***"+r.substr(-3)};var s=e.handleNickNamePrint=function e(n){if((0,t.isNullOrEmpty)(n)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(n))){return""}n=n.toString();var i=/^1[3|4|5|6|7|8|9][0-9]{9}$/g;if(i.test(n)){return r(n)}return n.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))};var u=e.formatConfName=function e(r){if((0,t.isNullOrEmpty)(r)||![t.formatType.STRING,t.formatType.NUMBER].includes((0,t.formatType)(r))){return""}r=r.toString();var n=r.length;if(n<5){return r.replace(/^([\w\W])([\w\W]+)/gi,(function(e,t,r){return t+r.replace(/[\w\W]/gi,"*")}))}else if(n<=13){return r.replace(/^([\w\W])([\w\W]+)([\w\W])$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}return r.replace(/^([\w\W]{2})([\w\W]+)([\w\W]{3})$/gi,(function(e,t,r,n){return t+r.replace(/[\w\W]/gi,"*")+n}))}}))},3830:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258),r(9969)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TimerTask=void 0;var n,i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=(0,t.getPLogger)();var _=e.TimerTask=(n=(0,r.printfDecorator)(b),i=(0,r.printfDecorator)(b),o=(0,r.printfDecorator)(b),s=(0,r.printfDecorator)(b),u=function(){function e(r){d(this,e);v(this,"id",(0,t.getClientId)());v(this,"_isCancel",false);v(this,"_task",void 0);v(this,"_runCount",0);v(this,"_lastRuntime",0);b.info("TimerTask,".concat(this.id),"constructor",(0,t.formatType)(r));if((0,t.formatType)(r)!==t.formatType.FUNCTION&&(0,t.formatType)(r)!==t.formatType.ASYNCFUNCTION){throw new Error("task is not a function,"+r)}this._task=r}return p(e,[{key:"cancel",value:function e(){b.info("TimerTask,".concat(this.id),"cancel");this._isCancel=true;this._lastRuntime=0;this._runCount=0;return this}},{key:"isCancel",value:function e(){return this._isCancel}},{key:"run",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:b.info("TimerTask,".concat(this.id),"run",this._isCancel,this._runCount);if(!(!this._isCancel&&this._task)){r.next=6;break}this._runCount++;this._lastRuntime=Date.now();r.next=6;return(t=this._task)===null||t===void 0?void 0:t.call(this,this._runCount);case 6:return r.abrupt("return",this);case 7:case"end":return r.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"scheduledExecutionTime",value:function e(){return this._lastRuntime}}])}(),g(u.prototype,"cancel",[n],Object.getOwnPropertyDescriptor(u.prototype,"cancel"),u.prototype),g(u.prototype,"isCancel",[i],Object.getOwnPropertyDescriptor(u.prototype,"isCancel"),u.prototype),g(u.prototype,"run",[o],Object.getOwnPropertyDescriptor(u.prototype,"run"),u.prototype),g(u.prototype,"scheduledExecutionTime",[s],Object.getOwnPropertyDescriptor(u.prototype,"scheduledExecutionTime"),u.prototype),u)}))},3898:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(491),r(8707)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UrlUtil=void 0;function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){return l(e)||c(e,t)||s(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function l(e){if(Array.isArray(e))return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=m(e,"string");return"symbol"==i(t)?t:t+""}function m(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=e.UrlUtil=function(){function e(){f(this,e)}return h(e,null,[{key:"addQuery",value:function r(n,i,o){if((0,t.isNullOrEmpty)(n)||(0,t.isNullOrEmpty)(i)){return n}var a=/\?/.test(n)?"&":"?";var s=(0,t.formatType)(i)===t.formatType.OBJECT?i:e.parseQuery(i);return"".concat(n).concat(a).concat(e.stringfyQuery(s,o))}},{key:"parseQuery",value:function e(r,n){if(!r||(0,t.formatType)(r)!==t.formatType.STRING){return{}}var i=n!==null&&n!==void 0?n:{},a=i.decode,s=a===void 0?true:a;var u=r[0]==="?"?r.slice(1):r;return u.split("&").reduce((function(e,t){var r=t.split("=")||[],n=o(r,2),i=n[0],a=n[1];if(s){i=decodeURIComponent(i);a=decodeURIComponent(a)}e[i]=a;return e}),{})}},{key:"stringfyQuery",value:function e(r,n){if((0,t.isNullOrEmpty)(r)||(0,t.formatType)(r)!==t.formatType.OBJECT||(0,t.formatType)(r)===t.formatType.ARRAY){return""}var i=n!==null&&n!==void 0?n:{},a=i.encode,s=a===void 0?true:a,u=i.addQueryPrefix,c=u===void 0?false:u;var l=Object.entries(r).reduce((function(e,t){var r=o(t,2),n=r[0],i=r[1];var a=s?"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i)):"".concat(n,"=").concat(i);e.push(a);return e}),[]).join("&");return c?"?".concat(l):l}},{key:"getAllUrlSearch",value:function e(r){if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return{}}try{var n=new URL(r);var i=n.searchParams.entries();var o=i.next();var a={};while(!o.done){a[o.value[0]]=decodeURIComponent(o.value[1]);o=i.next()}return a}catch(e){return{}}}},{key:"getSearchValue",value:function e(r,n){if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return null}try{var i=new URL(r);return i.searchParams.get(n)}catch(e){return null}}}])}();p(y,"checkHttpsUrl",(0,r.startsWith)("https://"));p(y,"checkHttpUrl",(0,r.startsWith)("http://"));p(y,"isInHttpsWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("https:")));p(y,"isInHttpWhiteList",(0,r.getIsInWhiteListFn)((0,r.startsWith)("http:")));p(y,"checkIPV4Url",(function(e){try{if(e.hostname){return(0,n.checkIPV4)(e.hostname)}var t=new URL(e);return(0,n.checkIPV4)(t.hostname)}catch(e){return false}}))}))},4081:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBase64Image=void 0;var t=e.checkBase64Image=function e(t){return t.startsWith("data:image/png;base64,")||t.startsWith("data:image/jpeg;base64,")}}))},4317:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(9376)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"HwKwsWakeup",{enumerable:true,get:function e(){return t.HwKwsWakeup}})}))},4521:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.updateArrayItemByKeys=e.splitArrayByNum=e.queryItemByKeys=e.hasOneInArray=e.deleteItemByKeys=void 0;function r(e){return a(e)||o(e)||i(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return s(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u=e.splitArrayByNum=function e(n,i){if((0,t.formatType)(n)!==t.formatType.ARRAY){return n}if((0,t.formatType)(i)!==t.formatType.NUMBER){return n}if(i<0){return[n]}var o=[];var a=r(n);while(a.length>i){o.push(a.splice(0,i))}o.push(a);return o};var c=e.updateArrayItemByKeys=function e(r,n,i){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.ARRAY){return r}if((0,t.isNullOrEmpty)(i)){return r}if((0,t.formatType)(i)===t.formatType.ARRAY){i.forEach((function(e){c(r,n,e)}));return r}else if((0,t.formatType)(i)!==t.formatType.OBJECT){return r}var o=r.findIndex((function(e){var r=true;n.forEach((function(n){if((0,t.isNullOrEmpty)(e[n])||(0,t.isNullOrEmpty)(i[n])){r=false}if(e[n]!==i[n]){r=false}}));return r}));if(o===-1){r.push(i);return r}r[o]=i;return r};var l=e.queryItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return undefined}if((0,t.formatType)(n)!==t.formatType.OBJECT){return undefined}return r===null||r===void 0?void 0:r.find((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}))};var f=e.hasOneInArray=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return false}if((0,t.formatType)(n)!==t.formatType.ARRAY){return false}for(var i=0;i<n.length;i++){if(r.includes(n[i])){return true}}return false};var d=e.deleteItemByKeys=function e(r,n){if((0,t.formatType)(r)!==t.formatType.ARRAY){return r}if((0,t.formatType)(n)!==t.formatType.OBJECT){return r}var i=r.findIndex((function(e){var t=Object.keys(n);for(var r=0;r<t.length;r++){if(e[t[r]]!==n[t[r]]){return false}}return true}));if(i!==-1){r.splice(i,1)}return r}}))},4706:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.timeWorkerScript=e.getTimeWorkerUrl=void 0;var t=e.timeWorkerScript="\nclass TimerWorker {\n static timeoutMap = new Map();\n\n static eventListener(e) {\n const { data } = e;\n switch (data.method) {\n case 'clear':\n TimerWorker.clearTimer(data);\n break;\n case 'set':\n TimerWorker.setTimer(data);\n break;\n default:\n break;\n }\n }\n\n static deleteTimerByKey(key) {\n const timer = TimerWorker.timeoutMap.get(key);\n if (timer) {\n clearInterval(timer);\n TimerWorker.timeoutMap.delete(key);\n return true;\n }\n return false;\n }\n\n static clearTimer(data) {\n const { sno, timerId } = data;\n TimerWorker.sendToMain({ sno, timerId, result: TimerWorker.deleteTimerByKey(timerId) });\n }\n\n static setTimer(data) {\n const { now = 0, sno, timerId, delay = 0 } = data;\n const remainingDelay = TimerWorker.getRealTimeInterval(delay, now);\n TimerWorker.timeoutMap.set(timerId, setTimeout(TimerWorker.dealTimer, remainingDelay, { sno, timerId }));\n }\n\n static getRealTimeInterval(delay, now) {\n const workerNow = performance.now();\n return delay + now - workerNow - performance.timeOrigin;\n }\n\n static dealTimer({ timerId, sno }) {\n TimerWorker.timeoutMap.delete(timerId);\n TimerWorker.sendToMain({ result: true, timerId, sno });\n }\n\n static sendToMain(data) {\n postMessage(data);\n }\n}\n\naddEventListener('message', TimerWorker.eventListener);\n";var r=e.getTimeWorkerUrl=function e(){return URL.createObjectURL(new Blob([t]))}}))},4752:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyA=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return u(e)||s(e,t)||o(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(c)throw i}}return s}}function u(e){if(Array.isArray(e))return e}function c(){"use strict";c=function e(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&i.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,s,u){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function e(r,i){function o(){return new t((function(e,t){n(r,i,e,t)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=S,o(I,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function o(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==r(t)?t:t+""}function y(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=e.ChromaKeyA=function(){function e(t){d(this,e);v(this,"gl",void 0);v(this,"keyColor",void 0);v(this,"opts",void 0);v(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return p(e,[{key:"dealVideoFrame",value:function t(r,n){if(!this.keyColor){this.keyColor=e.handleGetKeyColor(r)}if(!this.gl){this.gl=this.handleInitGl(n);this.handleInitTexture(this.gl)}this.drawImg(r)}},{key:"dealVideoFrameToImage",value:function(){var t=f(c().mark((function t(r){var n;return c().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:if(!this.keyColor){this.keyColor=e.handleGetKeyColor(r)}if(!this.gl){n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n;this.handleInitTexture(this.gl)}this.drawImg(r);return i.abrupt("return",createImageBitmap(this.optCvs,{imageOrientation:"none"}));case 4:case"end":return i.stop()}}),t,this)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"drawImg",value:function e(t){if(!this.gl){return}this.gl.viewport(0,0,t.videoWidth,t.videoHeight);this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,t);this.gl.drawArrays(this.gl.TRIANGLES,0,6)}},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{premultipliedAlpha:false,alpha:true});if(!n){throw Error("Cant create gl context")}var i=this.handleInitShaderProgram(n,e.vertexShader,e.fragmentShader);n.useProgram(i);n.uniform3fv(n.getUniformLocation(i,"keyColor"),this.keyColor.map((function(e){return e/255})));n.uniform1f(n.getUniformLocation(i,"similarity"),this.opts.similarity);n.uniform1f(n.getUniformLocation(i,"smoothness"),this.opts.smoothness);n.uniform1f(n.getUniformLocation(i,"spill"),this.opts.spill);var o=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,o);var a=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1];n.bufferData(n.ARRAY_BUFFER,new Float32Array(a),n.STATIC_DRAW);var s=n.getAttribLocation(i,"a_position");n.vertexAttribPointer(s,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(s);var u=[0,1,0,0,1,0,1,0,1,1,0,1];var c=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,c);n.bufferData(n.ARRAY_BUFFER,new Float32Array(u),n.STATIC_DRAW);var l=n.getAttribLocation(i,"a_texCoord");n.vertexAttribPointer(l,2,n.FLOAT,false,Float32Array.BYTES_PER_ELEMENT*2,0);n.enableVertexAttribArray(l);n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,1);return n}},{key:"handleInitShaderProgram",value:function e(t,r,n){var i=this.handleLoadShader(t,t.VERTEX_SHADER,r);var o=this.handleLoadShader(t,t.FRAGMENT_SHADER,n);var a=t.createProgram();t.attachShader(a,i);t.attachShader(a,o);t.linkProgram(a);if(!t.getProgramParameter(a,t.LINK_STATUS)){var s;throw Error((s=t.getProgramInfoLog(a))!==null&&s!==void 0?s:"Unable to initialize the shader program")}return a}},{key:"handleLoadShader",value:function e(t,r,n){var i=t.createShader(r);t.shaderSource(i,n);t.compileShader(i);if(!t.getShaderParameter(i,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(i);t.deleteShader(i);throw Error(o!==null&&o!==void 0?o:"An error occurred compiling the shaders")}return i}},{key:"handleInitTexture",value:function e(t){var r=t.createTexture();if(!r){throw Error("Create WebGL texture error")}t.bindTexture(t.TEXTURE_2D,r);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);return r}}],[{key:"handleGetKeyColor",value:function e(r){var i=new OffscreenCanvas(1,1);var o=i.getContext("2d");o.drawImage(r,0,0);var a=o.getImageData(0,0,1,1),s=n(a.data,3),u=s[0],c=s[1],l=s[2];(0,t.getPLogger)().info("handleGetKeyColor: ",[u,c,l]);return[u,c,l]}}])}();v(g,"vertexShader","#version 300 es\nlayout (location = 0) in vec4 a_position;\nlayout (location = 1) in vec2 a_texCoord;\nout vec2 v_texCoord;\nvoid main () {\n gl_Position = a_position;\n v_texCoord = a_texCoord;\n}\n");v(g,"fragmentShader","#version 300 es\nprecision mediump float;\nout vec4 FragColor;\nin vec2 v_texCoord;\nuniform sampler2D frameTexture;\nuniform vec3 keyColor;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\n\nvoid main() {\n vec4 rgba = texture(frameTexture, v_texCoord);\n vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);\n float chromaDist = sqrt(dot(chromaVec, chromaVec));\n float baseMask = chromaDist - similarity;\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n rgba.a = fullMask;\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.);\n rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);\n FragColor = rgba;\n}\n")}))},4772:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(2771),r(3898),r(258),r(4081),r(3736),r(3803),r(1068),r(9220),r(9222),r(394),r(4521),r(9969),r(8707),r(8360),r(8159),r(3399),r(2897),r(2265),r(2615),r(375),r(2144),r(362),r(916),r(7867),r(9403),r(4994),r(5555),r(7360),r(1421)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,v,m,y,g,b,_,S,E,w,T,I,R,C,k,A){"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"AtomicAction",{enumerable:true,get:function e(){return C.AtomicAction}});Object.defineProperty(e,"AudioContextLocalRecorder",{enumerable:true,get:function e(){return w.AudioContextLocalRecorder}});Object.defineProperty(e,"AutoQueryData",{enumerable:true,get:function e(){return y.AutoQueryData}});Object.defineProperty(e,"BasicLocalTransparentVideoBg",{enumerable:true,get:function e(){return E.BasicLocalTransparentVideoBg}});Object.defineProperty(e,"Clipboard",{enumerable:true,get:function e(){return A.Clipboard}});Object.defineProperty(e,"CustomPromise",{enumerable:true,get:function e(){return R.CustomPromise}});Object.defineProperty(e,"DownloadAudio",{enumerable:true,get:function e(){return _.DownloadAudio}});Object.defineProperty(e,"InputCodecsEnum",{enumerable:true,get:function e(){return S.InputCodecsEnum}});Object.defineProperty(e,"LazyLoad",{enumerable:true,get:function e(){return p.LazyLoad}});Object.defineProperty(e,"LocalTransparentVideoBg",{enumerable:true,get:function e(){return E.LocalTransparentVideoBg}});Object.defineProperty(e,"MediaDeviceManager",{enumerable:true,get:function e(){return T.MediaDeviceManager}});Object.defineProperty(e,"MediaStreamUtil",{enumerable:true,get:function e(){return k.MediaStreamUtil}});Object.defineProperty(e,"PCMPlayer",{enumerable:true,get:function e(){return S.PCMPlayer}});Object.defineProperty(e,"PromiseUtil",{enumerable:true,get:function e(){return I.PromiseUtil}});Object.defineProperty(e,"RequestTasksQueue",{enumerable:true,get:function e(){return u.RequestTasksQueue}});Object.defineProperty(e,"StringUtil",{enumerable:true,get:function e(){return v.StringUtil}});Object.defineProperty(e,"Timer",{enumerable:true,get:function e(){return m.Timer}});Object.defineProperty(e,"UrlUtil",{enumerable:true,get:function e(){return r.UrlUtil}});Object.defineProperty(e,"WebWorkerUtil",{enumerable:true,get:function e(){return b.WebWorkerUtil}});e.beforeJsonParse=void 0;Object.defineProperty(e,"checkBase64Image",{enumerable:true,get:function e(){return i.checkBase64Image}});e.checkHttpsUrl=e.checkHttpUrl=void 0;Object.defineProperty(e,"checkIPV4",{enumerable:true,get:function e(){return h.checkIPV4}});Object.defineProperty(e,"componentDecorator",{enumerable:true,get:function e(){return d.componentDecorator}});Object.defineProperty(e,"createEntry",{enumerable:true,get:function e(){return n.createEntry}});Object.defineProperty(e,"customDecorator",{enumerable:true,get:function e(){return d.customDecorator}});Object.defineProperty(e,"debounce",{enumerable:true,get:function e(){return n.debounce}});Object.defineProperty(e,"deepCopy",{enumerable:true,get:function e(){return n.deepCopy}});Object.defineProperty(e,"deleteItemByKeys",{enumerable:true,get:function e(){return f.deleteItemByKeys}});Object.defineProperty(e,"escapeRegExp",{enumerable:true,get:function e(){return c.escapeRegExp}});Object.defineProperty(e,"formatConfName",{enumerable:true,get:function e(){return a.formatConfName}});Object.defineProperty(e,"formatDate",{enumerable:true,get:function e(){return n.formatDate}});Object.defineProperty(e,"formatFileSize",{enumerable:true,get:function e(){return o.formatFileSize}});e.formatString=void 0;Object.defineProperty(e,"formatType",{enumerable:true,get:function e(){return n.formatType}});Object.defineProperty(e,"frequentTasksDecoratorFactory",{enumerable:true,get:function e(){return d.frequentTasksDecoratorFactory}});Object.defineProperty(e,"getClientId",{enumerable:true,get:function e(){return n.getClientId}});Object.defineProperty(e,"getElementScreenPosition",{enumerable:true,get:function e(){return s.getElementScreenPosition}});Object.defineProperty(e,"getEmailReg",{enumerable:true,get:function e(){return c.getEmailReg}});Object.defineProperty(e,"getFileName",{enumerable:true,get:function e(){return o.getFileName}});Object.defineProperty(e,"getMobilePhoneReg",{enumerable:true,get:function e(){return c.getMobilePhoneReg}});Object.defineProperty(e,"getNumberReg",{enumerable:true,get:function e(){return c.getNumberReg}});Object.defineProperty(e,"getSipNumberReg",{enumerable:true,get:function e(){return c.getSipNumberReg}});Object.defineProperty(e,"getSuffix",{enumerable:true,get:function e(){return o.getSuffix}});Object.defineProperty(e,"handleAccountPrint",{enumerable:true,get:function e(){return a.handleAccountPrint}});Object.defineProperty(e,"handleIpPrint",{enumerable:true,get:function e(){return a.handleIpPrint}});Object.defineProperty(e,"handleNickNamePrint",{enumerable:true,get:function e(){return a.handleNickNamePrint}});Object.defineProperty(e,"handlePhoneNumberPrint",{enumerable:true,get:function e(){return a.handlePhoneNumberPrint}});Object.defineProperty(e,"handleTokenPrint",{enumerable:true,get:function e(){return a.handleTokenPrint}});Object.defineProperty(e,"handleUrlPrint",{enumerable:true,get:function e(){return a.handleUrlPrint}});Object.defineProperty(e,"hasOneInArray",{enumerable:true,get:function e(){return f.hasOneInArray}});e.isInHttpsWhiteList=e.isInHttpWhiteList=void 0;Object.defineProperty(e,"isNullOrEmpty",{enumerable:true,get:function e(){return n.isNullOrEmpty}});Object.defineProperty(e,"mergeByDay",{enumerable:true,get:function e(){return l.mergeByDay}});Object.defineProperty(e,"printfDecorator",{enumerable:true,get:function e(){return d.printfDecorator}});Object.defineProperty(e,"queryItemByKeys",{enumerable:true,get:function e(){return f.queryItemByKeys}});e.replaceStringPlaceholder=e.reactStopPropagation=void 0;Object.defineProperty(e,"setLocalStorageItem",{enumerable:true,get:function e(){return g.setLocalStorageItem}});Object.defineProperty(e,"setPLogger",{enumerable:true,get:function e(){return n.setPLogger}});Object.defineProperty(e,"setSessionStorageItem",{enumerable:true,get:function e(){return g.setSessionStorageItem}});e.showDifferentProperty=void 0;Object.defineProperty(e,"singleControlDecorator",{enumerable:true,get:function e(){return d.singleControlDecorator}});Object.defineProperty(e,"sleep",{enumerable:true,get:function e(){return n.sleep}});Object.defineProperty(e,"splitArrayByNum",{enumerable:true,get:function e(){return f.splitArrayByNum}});e.splitStringByChar=void 0;Object.defineProperty(e,"throttle",{enumerable:true,get:function e(){return n.throttle}});Object.defineProperty(e,"updateArrayItemByKeys",{enumerable:true,get:function e(){return f.updateArrayItemByKeys}});var O=e.reactStopPropagation=t.ReactUtil.reactStopPropagation;var P=e.showDifferentProperty=t.ReactUtil.showDifferentProperty;var x=e.beforeJsonParse=v.StringUtil.beforeJsonParse;var L=e.splitStringByChar=v.StringUtil.splitStringByChar;var M=e.formatString=v.StringUtil.formatString;var N=e.replaceStringPlaceholder=v.StringUtil.replaceStringPlaceholder;var D=e.checkHttpsUrl=r.UrlUtil.checkHttpsUrl;var j=e.checkHttpUrl=r.UrlUtil.checkHttpUrl;var U=e.isInHttpWhiteList=r.UrlUtil.isInHttpWhiteList;var V=e.isInHttpsWhiteList=r.UrlUtil.isInHttpsWhiteList}))},4976:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(299),r(2583),r(1699),r(5268),r(4772)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MainWasmManager=void 0;function a(){"use strict";a=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==p(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(p(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function s(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,u,"next",e)}function u(e){s(o,n,i,a,u,"throw",e)}a(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return"symbol"==p(t)?t:t+""}function h(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){"@babel/helpers - typeof";return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var v=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":p(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var m=new t.Log({module:"MainWasmManager"});var y=e.MainWasmManager=function(){function e(){c(this,e)}return f(e,null,[{key:"init",value:function(){var t=u(a().mark((function t(o){return a().wrap((function t(a){while(1)switch(a.prev=a.next){case 0:m.debug("init",o);e.worker=new r.WorkerManager({url:(0,n.getWorkerUrl)(),enablePromiseMethod:true,onMessage:e.dealCallback,onError:e.dealWorkerError});return a.abrupt("return",e.sendMsgToWorker({action:i.MainAction.INIT,param:JSON.stringify(o)}));case 3:case"end":return a.stop()}}),t)})));function o(e){return t.apply(this,arguments)}return o}()},{key:"create",value:function(){var t=u(a().mark((function t(r){return a().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:m.debug("create",r);return n.abrupt("return",e.sendMsgToWorker({action:i.MainAction.CREATE,param:JSON.stringify(r)}));case 2:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"beginSession",value:function(){var t=u(a().mark((function t(){return a().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:m.debug("endSession");return r.abrupt("return",e.sendMsgToWorker({action:i.MainAction.BEGIN_SESSION}));case 2:case"end":return r.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()},{key:"endSession",value:function(){var t=u(a().mark((function t(){return a().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:m.debug("endSession");return r.abrupt("return",e.sendMsgToWorker({action:i.MainAction.END_SESSION}));case 2:case"end":return r.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()},{key:"logout",value:function(){var t=u(a().mark((function t(){return a().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:m.debug("logout");return r.abrupt("return",e.sendMsgToWorker({action:i.MainAction.LOGOUT}));case 2:case"end":return r.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()},{key:"writeAudio",value:function(){var t=u(a().mark((function t(r){return a().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",e.sendMsgToWorker({action:i.MainAction.WRITE_AUDIO,param:r}));case 1:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"updateParams",value:function t(r){m.debug("updateParams",r);return e.sendMsgToWorker({action:i.MainAction.UPDATE_PARAMS,param:JSON.stringify(r)})}},{key:"setCallback",value:function t(r){m.debug("setCallback",r);e.msgCallback=r.callback;e.trackCallback=r.trackCallback}},{key:"dealCallback",value:function t(r){var n,o;m.debug("dealCallback",r);switch(r.action){case i.WorkerAction.ADD_USER_TRACK:(n=e.trackCallback)===null||n===void 0||n.call(e,r.data);break;case i.WorkerAction.WAKEUP_CALLBACK:(o=e.msgCallback)===null||o===void 0||o.call(e,r.data);break;case i.WorkerAction.ERROR:m.error("dealCallback",r);break;default:m.info("dealCallback",r);break}}},{key:"dealWorkerError",value:function e(t){m.error("dealWorkerError",t)}},{key:"sendMsgToWorker",value:function(){var t=u(a().mark((function t(r){var n;var i;return a().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:o.next=2;return(n=e.worker)===null||n===void 0?void 0:n.promisePostMessage(r);case 2:i=o.sent;return o.abrupt("return",(i===null||i===void 0?void 0:i.result)||{result:false});case 4:case"end":return o.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()}])}();v([(0,o.printfDecorator)(m)],y,"init",null);v([(0,o.printfDecorator)(m)],y,"create",null);v([(0,o.printfDecorator)(m)],y,"beginSession",null);v([(0,o.printfDecorator)(m)],y,"endSession",null);v([(0,o.printfDecorator)(m)],y,"logout",null);v([(0,o.printfDecorator)(m)],y,"updateParams",null);v([(0,o.printfDecorator)(m)],y,"setCallback",null);v([(0,o.printfDecorator)(m)],y,"dealCallback",null);v([(0,o.printfDecorator)(m)],y,"dealWorkerError",null)}))},4994:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CustomPromise=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var r=s(e,"string");return"symbol"==t(r)?r:r+""}function s(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var u=e.CustomPromise=n((function e(){var t=this;i(this,e);o(this,"promise",void 0);o(this,"resolve",void 0);o(this,"status","pending");o(this,"reject",void 0);o(this,"timer",void 0);o(this,"hasDealPromise",false);o(this,"waitPromise",(function(){return t.promise}));o(this,"dealResolve",(function(e){if(t.hasDealPromise){return}t.hasDealPromise=true;t.timer&&clearTimeout(t.timer);t.status="resolved";t.resolve(e)}));o(this,"dealReject",(function(e){if(t.hasDealPromise){return}t.hasDealPromise=true;t.timer&&clearTimeout(t.timer);t.status="rejected";t.reject(e)}));o(this,"setResolveTimeout",(function(e,r){t.timer&&clearTimeout(t.timer);t.timer=setTimeout((function(){t.dealResolve(r)}),e)}));o(this,"setRejectTimeout",(function(e,r){t.timer&&clearTimeout(t.timer);t.timer=setTimeout((function(){t.dealReject(r)}),e)}));this.promise=new Promise((function(e,r){t.resolve=e;t.reject=r}))}))}))},5113:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4752)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ChromaKeyB=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.ChromaKeyB=function(){function e(t){n(this,e);a(this,"gl",void 0);a(this,"keyColor",void 0);a(this,"opts",void 0);a(this,"texLoc",void 0);a(this,"texWidthLoc",void 0);a(this,"texHeightLoc",void 0);a(this,"keyColorLoc",void 0);a(this,"similarityLoc",void 0);a(this,"smoothnessLoc",void 0);a(this,"spillLoc",void 0);a(this,"optCvs",void 0);this.opts=t;this.keyColor=this.opts.keyColor}return o(e,[{key:"dealVideoFrame",value:function e(r,n){if(!this.keyColor){this.keyColor=t.ChromaKeyA.handleGetKeyColor(r)}if(!this.gl){this.gl=this.handleInitGl(n)}this.drawImg(r)}},{key:"dealVideoFrameToImage",value:function e(r){if(!this.keyColor){this.keyColor=t.ChromaKeyA.handleGetKeyColor(r)}if(!this.gl){var n=document.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;this.gl=this.handleInitGl(n);this.optCvs=n}this.drawImg(r);return createImageBitmap(this.optCvs,{imageOrientation:"none"})}},{key:"drawImg",value:function e(t){var r=this.gl;r.viewport(0,0,t.videoWidth,t.videoHeight);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t);r.uniform1i(this.texLoc,0);r.uniform1f(this.texWidthLoc,t.videoWidth);r.uniform1f(this.texHeightLoc,t.videoHeight);r.uniform3fv(this.keyColorLoc,this.keyColor.map((function(e){return e/255})));r.uniform1f(this.similarityLoc,this.opts.similarity);r.uniform1f(this.smoothnessLoc,this.opts.smoothness);r.uniform1f(this.spillLoc,this.opts.spill);r.drawArrays(r.TRIANGLE_FAN,0,4)}},{key:"handleInitGl",value:function t(r){var n=r.getContext("webgl2",{alpha:true})||r.getContext("webgl",{alpha:true});if(!n){throw Error("Cant create gl context")}var i=n.createShader(n.VERTEX_SHADER);n.shaderSource(i,e.vertexShader);n.compileShader(i);var o=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(o,e.fragmentShader);n.compileShader(o);var a=n.createProgram();n.attachShader(a,i);n.attachShader(a,o);n.linkProgram(a);n.useProgram(a);var s=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,s);n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,1,-1,-1,1,-1,1,1]),n.STATIC_DRAW);var u=n.getAttribLocation(a,"c");n.vertexAttribPointer(u,2,n.FLOAT,false,0,0);n.enableVertexAttribArray(u);n.activeTexture(n.TEXTURE0);var c=n.createTexture();n.bindTexture(n.TEXTURE_2D,c);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR);this.texLoc=n.getUniformLocation(a,"tex");this.texWidthLoc=n.getUniformLocation(a,"texWidth");this.texHeightLoc=n.getUniformLocation(a,"texHeight");this.keyColorLoc=n.getUniformLocation(a,"keyColor");this.similarityLoc=n.getUniformLocation(a,"similarity");this.smoothnessLoc=n.getUniformLocation(a,"smoothness");this.spillLoc=n.getUniformLocation(a,"spill");return n}}])}();a(c,"vertexShader","attribute vec2 c; void main(void) { gl_Position=vec4(c, 0.0, 1.0); }");a(c,"fragmentShader","\nprecision mediump float;\nuniform sampler2D tex;\nuniform float texWidth;\nuniform float texHeight;\nuniform vec3 keyColor;\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\nvec4 GetRgba(float detaX, float detaY) {\n vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);\n vec4 rgba = texture2D(tex, texCoord);\n float green = rgba.g - max(rgba.r, rgba.b);\n float greenKey = keyColor.g - max(keyColor.r, keyColor.b);\n float mask = smoothstep(greenKey-0.1, 0.0, green);\n rgba.a = mask;\n return rgba;\n}\nvec4 ProcessChromaKey() {\n vec4 rgba = GetRgba(0.0, 0.0);\n if (rgba.a > 0.0 && rgba.a < 1.0) {\n vec4 rgbas[9];\n float maxMask = 0.0;\n vec4 minRgba = rgba;\n for (int i = -1; i <= 1; i++) {\n for (int j = -1; j <= 1; j++) {\n vec4 tmp;\n if (i == 0 && j == 0) {\n tmp = rgba;\n } else {\n tmp = GetRgba(float(i), float(j));\n }\n rgbas[(i+1)*3 + (j+1)] = tmp;\n if (tmp.a > maxMask) {\n maxMask = tmp.a;\n minRgba = tmp;\n }\n }\n }\n rgbas[4] = minRgba;\n rgbas[4].a = rgba.a;\n vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);\n\n float gs[9];\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.05;\n gs[4] = 0.6;\n for(int i = 0; i < 9; i++) {\n dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];\n }\n\n gs[0] = gs[2] = gs[6] = gs[8] = 0.05;\n gs[1] = gs[3] = gs[5] = gs[7] = 0.15;\n gs[4] = 0.2;\n for(int i = 0; i < 9; i++) {\n dest.a = dest.a + rgbas[i].a* gs[i];\n }\n rgba.rgb = dest.rgb;\n rgba.a = dest.a;\n if (rgba.g > rgba.r && rgba.g > rgba.b) {\n rgba.g = max(rgba.r, rgba.b);\n }\n rgba.rgb = rgba.rgb * rgba.a;\n } else {\n rgba.rgb = rgba.rgb * rgba.a;\n }\n return rgba;\n}\n\nvoid main(void) {\n gl_FragColor = ProcessChromaKey();\n}")}))},5162:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getLocalRecorderUrl=void 0;var t="class LocalRecorder extends AudioWorkletProcessor {\n constructor(e) {\n super(e);\n const bufferSize = e.processorOptions.bufferSize;\n this.bufferSize = bufferSize;\n this.buffer = new Float32Array(bufferSize * 2);\n this.pos = 0;\n this.total = 0;\n this.id = Date.now();\n this.port.onmessage = function (e) {\n if (e.data.kill) {\n this.kill = true;\n }\n };\n }\n\n process(inputs) {\n const input = (inputs[0] || [])[0] || [];\n if (input.length) {\n this.buffer.set(input, this.pos);\n this.pos += input.length;\n const offset = ~~(this.pos / this.bufferSize) * this.bufferSize;\n if (offset) {\n this.port.postMessage(this.formatData(this.buffer.slice(0, offset)));\n const nextBuffer = this.buffer.subarray(offset, this.pos);\n this.buffer = new Float32Array(this.bufferSize * 2);\n this.buffer.set(nextBuffer);\n this.pos = nextBuffer.length;\n }\n }\n return !this.kill;\n }\n\n formatData(float32Arr) {\n const size = float32Arr.length;\n const pcm = new Int16Array(size);\n let sum = 0;\n for (let j = 0; j < size; j++) { // floatTo16BitPCM\n let s = Math.max(-1, Math.min(1, float32Arr[j]));\n s = s < 0 ? s * 0x8000 : s * 0x7FFF;\n pcm[j] = s;\n sum += Math.abs(s);\n }\n this.total+=pcm.byteLength;\n return { pcm, sum, total: this.total, recordId: this.id };\n }\n}\nregisterProcessor('LocalRecorderProcessor', LocalRecorder);";var r=e.getLocalRecorderUrl=function e(){return"data:text/javascript;base64,".concat(btoa(t))}}))},5268:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WorkerAction=e.WakeupIntentions=e.SDKErrorCode=e.MainAction=void 0;var t;(function(e){e["SUCCESS"]="0"})(t||(e.SDKErrorCode=t={}));var r;(function(e){e["START"]="start";e["INTERRUPT"]="interrupt";e["STOP"]="stop"})(r||(e.WakeupIntentions=r={}));var n;(function(e){e["INIT"]="init";e["CREATE"]="create";e["BEGIN_SESSION"]="beginSession";e["WRITE_AUDIO"]="writeAudio";e["END_SESSION"]="endSession";e["LOGOUT"]="logout";e["UPDATE_PARAMS"]="updateParams"})(n||(e.MainAction=n={}));var i;(function(e){e["WAKEUP_CALLBACK"]="wakeupCallback";e["ADD_USER_TRACK"]="addUserTrack";e["ERROR"]="error"})(i||(e.WorkerAction=i={}))}))},5555:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(4994),r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AtomicAction=e.ATOMIC_ACTION_STATUS=e.ATOMIC_ACTION_RESULT=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=d(e,"string");return"symbol"==n(t)?t:t+""}function d(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=e.ATOMIC_ACTION_RESULT=function(e){e[e["SUCCESS"]=0]="SUCCESS";e[e["FAILED"]=1]="FAILED";return e}({});var p=e.ATOMIC_ACTION_STATUS=function(e){e[e["NOT_INIT"]=0]="NOT_INIT";e[e["IN_INIT"]=1]="IN_INIT";e[e["HAS_INIT"]=2]="HAS_INIT";return e}({});var v=e.AtomicAction=u((function e(n,o){var s=this;c(this,e);l(this,"initPromiseObject",void 0);l(this,"initStatue",void 0);l(this,"name",void 0);l(this,"args",void 0);l(this,"atomicFunction",void 0);l(this,"setArgs",function(){var e=a(i().mark((function e(t){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:s.args=t;case 1:case"end":return r.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());l(this,"reset",a(i().mark((function e(){return i().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:s.initPromiseObject=new t.CustomPromise;s.initStatue=p.NOT_INIT;case 2:case"end":return r.stop()}}),e)}))));l(this,"wait",a(i().mark((function e(){var n;return i().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(!(s.initPromiseObject.status==="resolved")){i.next=2;break}return i.abrupt("return",s.initPromiseObject.waitPromise());case 2:if(!(s.initStatue===p.NOT_INIT)){i.next=18;break}s.initStatue=p.IN_INIT;n=h.FAILED;s.initPromiseObject=new t.CustomPromise;i.prev=6;i.next=9;return s.atomicFunction(s.args);case 9:n=i.sent;if(n===h.SUCCESS){s.initStatue=p.HAS_INIT;s.initPromiseObject.dealResolve(undefined)}else{s.initStatue=p.NOT_INIT;(0,r.getPLogger)().warn("[AtomicAction] name: "+s.name+" finish init ,atomicResult : "+n+", 0:ok,1:failed");s.initPromiseObject.dealReject(new Error("[AtomicAction] name: "+s.name+" finish init ,atomicResult : "+n+", 0:ok,1:failed"))}i.next=18;break;case 13:i.prev=13;i.t0=i["catch"](6);s.initStatue=p.NOT_INIT;(0,r.getPLogger)().warn("[AtomicAction] name1: "+s.name+" exception : ",i.t0);s.initPromiseObject.dealReject(i.t0);case 18:return i.abrupt("return",s.initPromiseObject.waitPromise());case 19:case"end":return i.stop()}}),e,null,[[6,13]])}))));this.initPromiseObject=new t.CustomPromise;this.initStatue=p.NOT_INIT;this.name=n;this.atomicFunction=o}))}))},5625:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RetCodes=e.HttpHeaders=e.HttpCodes=e.BaseUrl=void 0;var t;(function(e){e["REPORT"]="v1/digital-human-chat/endpoint/stats";e["HEARTBEAT"]="/v1/digital-human-chat/wakeup/heartbeat/{job_id}"})(t||(e.BaseUrl=t={}));var r;(function(e){e["AUTH_TOKEN"]="x-auth-token"})(r||(e.HttpHeaders=r={}));var n;(function(e){e[e["NO_RESP"]=-100]="NO_RESP";e[e["OK"]=200]="OK";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED"})(n||(e.HttpCodes=n={}));var i;(function(e){e["SUCCESS"]="MSS.00000000";e["AUTH_FAILED"]="MSS.00000004";e["DIALOG_NOT_EXIST"]="MSS.47010001";e["DIALOG_NO_PERMISSION"]="MSS.47010063";e["WAKEUP_NOT_ENOUGH_CHANNEL"]="MSS.47010203"})(i||(e.RetCodes=i={}))}))},6347:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(258),r(9969),r(7360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i,o,s,u,c,l,f;function d(){"use strict";d=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function e(t,r,n){return t[r]=n}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};l(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=l(S,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),l(I,c,"Generator"),l(I,s,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function y(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=_(e,"string");return"symbol"==a(t)?t:t+""}function _(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var E=e["default"]=(i=(0,r.printfDecorator)((0,t.getPLogger)()),o=(0,r.printfDecorator)((0,t.getPLogger)()),s=(0,r.printfDecorator)((0,t.getPLogger)()),u=(0,r.printfDecorator)((0,t.getPLogger)()),c=(0,r.printfDecorator)((0,t.getPLogger)()),l=(f=function(){function e(r){var n=this;v(this,e);g(this,"audioContext",void 0);g(this,"url",void 0);g(this,"processorName",void 0);g(this,"audioCallback",void 0);g(this,"input",void 0);g(this,"processorOptions",void 0);g(this,"stream",void 0);g(this,"startProm",void 0);g(this,"audioWorkletNode",void 0);g(this,"autoCollectAudio",void 0);g(this,"deviceId",void 0);g(this,"onMessage",(function(e){var t;(t=n.audioCallback)===null||t===void 0||t.call(n,e.data)}));g(this,"dealStart",function(){var r=p(d().mark((function r(i){var o,a,s;return d().wrap((function r(u){while(1)switch(u.prev=u.next){case 0:u.prev=0;u.next=3;return n.stop();case 3:n.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(i!==null&&i!==void 0&&i.stream)){u.next=8;break}n.stream=i.stream;u.next=12;break;case 8:s=i!==null&&i!==void 0&&i.deviceId||n.deviceId?{deviceId:{exact:(i===null||i===void 0?void 0:i.deviceId)||n.deviceId}}:true;u.next=11;return navigator.mediaDevices.getUserMedia({audio:s});case 11:n.stream=u.sent;case 12:(o=n.input)===null||o===void 0||o.disconnect();n.input=n.audioContext.createMediaStreamSource(n.stream);u.next=16;return n.audioContext.audioWorklet.addModule(n.url);case 16:if(n.audioWorkletNode){n.audioWorkletNode.port.onmessage=null}(a=n.audioWorkletNode)===null||a===void 0||a.disconnect();n.audioWorkletNode=new AudioWorkletNode(n.audioContext,n.processorName,{processorOptions:n.processorOptions});n.input.connect(n.audioWorkletNode).connect(n.audioContext.destination);n.audioWorkletNode.port.onmessage=n.onMessage;u.next=26;break;case 23:u.prev=23;u.t0=u["catch"](0);(0,t.getPLogger)().error("dealStart",u.t0);case 26:delete n.startProm;case 27:case"end":return u.stop()}}),r,null,[[0,23]])})));return function(e){return r.apply(this,arguments)}}());(0,t.getPLogger)().debug("constructor",r.processorName);this.url=r.url;this.processorName=r.processorName;this.audioCallback=r.audioCallback;this.processorOptions=r.processorOptions}return y(e,[{key:"start",value:function(){var e=p(d().mark((function e(t){return d().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);if(!this.startProm){this.startProm=this.dealStart(t)}return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stop",value:function(){var e=p(d().mark((function e(){var r,i,o;return d().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(r=this.input)===null||r===void 0||r.disconnect();delete this.input;(i=this.audioWorkletNode)===null||i===void 0||i.disconnect();delete this.audioWorkletNode;a.next=7;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 7:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=14;break;case 11:a.prev=11;a.t0=a["catch"](0);(0,t.getPLogger)().error("stop",a.t0);case 14:case"end":return a.stop()}}),e,this,[[0,11]])})));function r(){return e.apply(this,arguments)}return r}()},{key:"mute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=false;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"unmute",value:function(){var e=p(d().mark((function e(){var t;var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:r=(t=this.stream)===null||t===void 0?void 0:t.getAudioTracks()[0];if(r){n.next=3;break}return n.abrupt("return");case 3:r.enabled=true;case 4:case"end":return n.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function(){var e=p(d().mark((function e(t){var r;return d().wrap((function e(n){while(1)switch(n.prev=n.next){case 0:this.deviceId=t;(r=this.audioContext)===null||r===void 0||r.setSinkId(t);case 2:case"end":return n.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}])}(),g(f,"sampleRate",16e3),f),S(l.prototype,"start",[i],Object.getOwnPropertyDescriptor(l.prototype,"start"),l.prototype),S(l.prototype,"stop",[o],Object.getOwnPropertyDescriptor(l.prototype,"stop"),l.prototype),S(l.prototype,"mute",[s],Object.getOwnPropertyDescriptor(l.prototype,"mute"),l.prototype),S(l.prototype,"unmute",[u],Object.getOwnPropertyDescriptor(l.prototype,"unmute"),l.prototype),S(l.prototype,"setSinkId",[c],Object.getOwnPropertyDescriptor(l.prototype,"setSinkId"),l.prototype),l)}))},6425:(e,t,r)=>{"use strict";function n(e,t){return function r(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype;const{getPrototypeOf:o}=Object;const a=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));const s=e=>{e=e.toLowerCase();return t=>a(t)===e};const u=e=>t=>typeof t===e;const{isArray:c}=Array;const l=u("undefined");function f(e){return e!==null&&!l(e)&&e.constructor!==null&&!l(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d=s("ArrayBuffer");function h(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&d(e.buffer)}return t}const p=u("string");const v=u("function");const m=u("number");const y=e=>e!==null&&typeof e==="object";const g=e=>e===true||e===false;const b=e=>{if(a(e)!=="object"){return false}const t=o(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};const _=s("Date");const S=s("File");const E=s("Blob");const w=s("FileList");const T=e=>y(e)&&v(e.pipe);const I=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||v(e.append)&&((t=a(e))==="formdata"||t==="object"&&v(e.toString)&&e.toString()==="[object FormData]"))};const R=s("URLSearchParams");const[C,k,A,O]=["ReadableStream","Request","Response","Headers"].map(s);const P=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function x(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(c(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=i.length;let a;for(n=0;n<o;n++){a=i[n];t.call(null,e[a],a,e)}}}function L(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}const M=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:r.g})();const N=e=>!l(e)&&e!==M;function D(){const{caseless:e}=N(this)&&this||{};const t={};const r=(r,n)=>{const i=e&&L(t,n)||n;if(b(t[i])&&b(r)){t[i]=D(t[i],r)}else if(b(r)){t[i]=D({},r)}else if(c(r)){t[i]=r.slice()}else{t[i]=r}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&x(arguments[e],r)}return t}const j=(e,t,r,{allOwnKeys:i}={})=>{x(t,((t,i)=>{if(r&&v(t)){e[i]=n(t,r)}else{e[i]=t}}),{allOwnKeys:i});return e};const U=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const V=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};const W=(e,t,r,n)=>{let i;let a;let s;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);a=i.length;while(a-- >0){s=i[a];if((!n||n(s,e,t))&&!u[s]){t[s]=e[s];u[s]=true}}e=r!==false&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};const B=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r};const G=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};const Z=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&o(Uint8Array));const F=(e,t)=>{const r=e&&e[Symbol.iterator];const n=r.call(e);let i;while((i=n.next())&&!i.done){const r=i.value;t.call(e,r[0],r[1])}};const H=(e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n};const X=s("HTMLFormElement");const Y=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}));const K=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);const z=s("RegExp");const J=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};x(r,((r,i)=>{let o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};const Q=e=>{J(e,((t,r)=>{if(v(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!v(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}}))};const q=(e,t)=>{const r={};const n=e=>{e.forEach((e=>{r[e]=true}))};c(e)?n(e):n(String(e).split(t));return r};const $=()=>{};const ee=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function te(e){return!!(e&&v(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const re=e=>{const t=new Array(10);const r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;const i=c(e)?[]:{};x(e,((e,t)=>{const o=r(e,n+1);!l(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};const ne=s("AsyncFunction");const ie=e=>e&&(y(e)||v(e))&&v(e.then)&&v(e.catch);const oe=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{M.addEventListener("message",(({source:r,data:n})=>{if(r===M&&n===e){t.length&&t.shift()()}}),false);return r=>{t.push(r);M.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",v(M.postMessage));const ae=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(M):typeof process!=="undefined"&&process.nextTick||oe;var se={isArray:c,isArrayBuffer:d,isBuffer:f,isFormData:I,isArrayBufferView:h,isString:p,isNumber:m,isBoolean:g,isObject:y,isPlainObject:b,isReadableStream:C,isRequest:k,isResponse:A,isHeaders:O,isUndefined:l,isDate:_,isFile:S,isBlob:E,isRegExp:z,isFunction:v,isStream:T,isURLSearchParams:R,isTypedArray:Z,isFileList:w,forEach:x,merge:D,extend:j,trim:P,stripBOM:U,inherits:V,toFlatObject:W,kindOf:a,kindOfTest:s,endsWith:B,toArray:G,forEachEntry:F,matchAll:H,isHTMLForm:X,hasOwnProperty:K,hasOwnProp:K,reduceDescriptors:J,freezeMethods:Q,toObjectSet:q,toCamelCase:Y,noop:$,toFiniteNumber:ee,findKey:L,global:M,isContextDefined:N,isSpecCompliantForm:te,toJSONObject:re,isAsyncFn:ne,isThenable:ie,setImmediate:oe,asap:ae};function ue(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);if(i){this.response=i;this.status=i.status?i.status:null}}se.inherits(ue,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.status}}});const ce=ue.prototype;const le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{le[e]={value:e}}));Object.defineProperties(ue,le);Object.defineProperty(ce,"isAxiosError",{value:true});ue.from=(e,t,r,n,i,o)=>{const a=Object.create(ce);se.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));ue.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var fe=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function he(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function pe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=he(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function ve(e){return se.isArray(e)&&!e.some(de)}const me=se.toFlatObject(se,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function ye(e,t,r){if(!se.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=se.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!se.isUndefined(r[t])}));const n=r.metaTokens;const i=r.visitor||l;const o=r.dots;const a=r.indexes;const s=r.Blob||typeof Blob!=="undefined"&&Blob;const u=s&&se.isSpecCompliantForm(t);if(!se.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(se.isDate(e)){return e.toISOString()}if(!u&&se.isBlob(e)){throw new ue("Blob is not supported. Use a Buffer instead.")}if(se.isArrayBuffer(e)||se.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function l(e,r,i){let s=e;if(e&&!i&&typeof e==="object"){if(se.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(se.isArray(e)&&ve(e)||(se.isFileList(e)||se.endsWith(r,"[]"))&&(s=se.toArray(e))){r=he(r);s.forEach((function e(n,i){!(se.isUndefined(n)||n===null)&&t.append(a===true?pe([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(de(e)){return true}t.append(pe(i,r,o),c(e));return false}const f=[];const d=Object.assign(me,{defaultVisitor:l,convertValue:c,isVisitable:de});function h(e,r){if(se.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);se.forEach(e,(function e(n,o){const a=!(se.isUndefined(n)||n===null)&&i.call(t,n,se.isString(o)?o.trim():o,r,d);if(a===true){h(n,r?r.concat(o):[o])}}));f.pop()}if(!se.isObject(e)){throw new TypeError("data must be an object")}h(e);return t}function ge(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function be(e,t){this._pairs=[];e&&ye(e,this,t)}const _e=be.prototype;_e.append=function e(t,r){this._pairs.push([t,r])};_e.toString=function e(t){const r=t?function(e){return t.call(this,e,ge)}:ge;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ee(e,t,r){if(!t){return e}const n=r&&r.encode||Se;if(se.isFunction(r)){r={serialize:r}}const i=r&&r.serialize;let o;if(i){o=i(t,r)}else{o=se.isURLSearchParams(t)?t.toString():new be(t,r).toString(n)}if(o){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class we{constructor(){this.handlers=[]}use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){se.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))}}var Te=we;var Ie={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Re=typeof URLSearchParams!=="undefined"?URLSearchParams:be;var Ce=typeof FormData!=="undefined"?FormData:null;var ke=typeof Blob!=="undefined"?Blob:null;var Ae={isBrowser:true,classes:{URLSearchParams:Re,FormData:Ce,Blob:ke},protocols:["http","https","file","blob","url","data"]};const Oe=typeof window!=="undefined"&&typeof document!=="undefined";const Pe=typeof navigator==="object"&&navigator||undefined;const xe=Oe&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0);const Le=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Me=Oe&&window.location.href||"http://localhost";var Ne=Object.freeze({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserWebWorkerEnv:Le,hasStandardBrowserEnv:xe,navigator:Pe,origin:Me});var De={...Ne,...Ae};function je(e,t){return ye(e,new De.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(De.isNode&&se.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Ue(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function Ve(e){const t={};const r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function We(e){function t(e,r,n,i){let o=e[i++];if(o==="__proto__")return true;const a=Number.isFinite(+o);const s=i>=e.length;o=!o&&se.isArray(n)?n.length:o;if(s){if(se.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!se.isObject(n[o])){n[o]=[]}const u=t(e,r,n[o],i);if(u&&se.isArray(n[o])){n[o]=Ve(n[o])}return!a}if(se.isFormData(e)&&se.isFunction(e.entries)){const r={};se.forEachEntry(e,((e,n)=>{t(Ue(e),n,r,0)}));return r}return null}function Be(e,t,r){if(se.isString(e)){try{(t||JSON.parse)(e);return se.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const Ge={transitional:Ie,adapter:["xhr","http","fetch"],transformRequest:[function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const o=se.isObject(t);if(o&&se.isHTMLForm(t)){t=new FormData(t)}const a=se.isFormData(t);if(a){return i?JSON.stringify(We(t)):t}if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t)||se.isReadableStream(t)){return t}if(se.isArrayBufferView(t)){return t.buffer}if(se.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return je(t,this.formSerializer).toString()}if((s=se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ye(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return Be(t)}return t}],transformResponse:[function e(t){const r=this.transitional||Ge.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(se.isResponse(t)||se.isReadableStream(t)){return t}if(t&&se.isString(t)&&(n&&!this.responseType||i)){const n=r&&r.silentJSONParsing;const o=!n&&i;try{return JSON.parse(t)}catch(e){if(o){if(e.name==="SyntaxError"){throw ue.from(e,ue.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{Ge.headers[e]={}}));var Ze=Ge;const Fe=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var He=e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Fe[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};const Xe=Symbol("internals");function Ye(e){return e&&String(e).trim().toLowerCase()}function Ke(e){if(e===false||e==null){return e}return se.isArray(e)?e.map(Ke):String(e)}function ze(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}const Je=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qe(e,t,r,n,i){if(se.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!se.isString(t))return;if(se.isString(n)){return t.indexOf(n)!==-1}if(se.isRegExp(n)){return n.test(t)}}function qe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function $e(e,t){const r=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}class et{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ye(t);if(!i){throw new Error("header name must be a non-empty string")}const o=se.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Ke(e)}}const o=(e,t)=>se.forEach(e,((e,r)=>i(e,r,t)));if(se.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(se.isString(e)&&(e=e.trim())&&!Je(e)){o(He(e),t)}else if(se.isHeaders(e)){for(const[t,n]of e.entries()){i(n,t,r)}}else{e!=null&&i(t,e,r)}return this}get(e,t){e=Ye(e);if(e){const r=se.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return ze(e)}if(se.isFunction(t)){return t.call(this,e,r)}if(se.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=Ye(e);if(e){const r=se.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Qe(this,this[r],r,t)))}return false}delete(e,t){const r=this;let n=false;function i(e){e=Ye(e);if(e){const i=se.findKey(r,e);if(i&&(!t||Qe(r,r[i],i,t))){delete r[i];n=true}}}if(se.isArray(e)){e.forEach(i)}else{i(e)}return n}clear(e){const t=Object.keys(this);let r=t.length;let n=false;while(r--){const i=t[r];if(!e||Qe(this,this[i],i,e,true)){delete this[i];n=true}}return n}normalize(e){const t=this;const r={};se.forEach(this,((n,i)=>{const o=se.findKey(r,i);if(o){t[o]=Ke(n);delete t[i];return}const a=e?qe(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Ke(n);r[a]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);se.forEach(this,((r,n)=>{r!=null&&r!==false&&(t[n]=e&&se.isArray(r)?r.join(", "):r)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach((e=>r.set(e)));return r}static accessor(e){const t=this[Xe]=this[Xe]={accessors:{}};const r=t.accessors;const n=this.prototype;function i(e){const t=Ye(e);if(!r[t]){$e(n,e);r[t]=true}}se.isArray(e)?e.forEach(i):i(e);return this}}et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);se.reduceDescriptors(et.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}));se.freezeMethods(et);var tt=et;function rt(e,t){const r=this||Ze;const n=t||r;const i=tt.from(n.headers);let o=n.data;se.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function nt(e){return!!(e&&e.__CANCEL__)}function it(e,t,r){ue.call(this,e==null?"canceled":e,ue.ERR_CANCELED,t,r);this.name="CanceledError"}se.inherits(it,ue,{__CANCEL__:true});function ot(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new ue("Request failed with status code "+r.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}function at(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function st(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let o=0;let a;t=t!==undefined?t:1e3;return function s(u){const c=Date.now();const l=n[o];if(!a){a=c}r[i]=u;n[i]=c;let f=o;let d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}const h=l&&c-l;return h?Math.round(d*1e3/h):undefined}}function ut(e,t){let r=0;let n=1e3/t;let i;let o;const a=(t,n=Date.now())=>{r=n;i=null;if(o){clearTimeout(o);o=null}e.apply(null,t)};const s=(...e)=>{const t=Date.now();const s=t-r;if(s>=n){a(e,t)}else{i=e;if(!o){o=setTimeout((()=>{o=null;a(i)}),n-s)}}};const u=()=>i&&a(i);return[s,u]}const ct=(e,t,r=3)=>{let n=0;const i=st(50,250);return ut((r=>{const o=r.loaded;const a=r.lengthComputable?r.total:undefined;const s=o-n;const u=i(s);const c=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:r,lengthComputable:a!=null,[t?"download":"upload"]:true};e(l)}),r)};const lt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]};const ft=e=>(...t)=>se.asap((()=>e(...t)));var dt=De.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,De.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(De.origin),De.navigator&&/(msie|trident)/i.test(De.navigator.userAgent)):()=>true;var ht=De.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const a=[e+"="+encodeURIComponent(t)];se.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());se.isString(n)&&a.push("path="+n);se.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mt(e,t,r){let n=!pt(t);if(e&&(n||r==false)){return vt(e,t)}return t}const yt=e=>e instanceof tt?{...e}:e;function gt(e,t){t=t||{};const r={};function n(e,t,r,n){if(se.isPlainObject(e)&&se.isPlainObject(t)){return se.merge.call({caseless:n},e,t)}else if(se.isPlainObject(t)){return se.merge({},t)}else if(se.isArray(t)){return t.slice()}return t}function i(e,t,r,i){if(!se.isUndefined(t)){return n(e,t,r,i)}else if(!se.isUndefined(e)){return n(undefined,e,r,i)}}function o(e,t){if(!se.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!se.isUndefined(t)){return n(undefined,t)}else if(!se.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>i(yt(e),yt(t),r,true)};se.forEach(Object.keys(Object.assign({},e,t)),(function n(o){const a=u[o]||i;const c=a(e[o],t[o],o);se.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var bt=e=>{const t=gt({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=tt.from(a);t.url=Ee(mt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);if(s){a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")))}let u;if(se.isFormData(r)){if(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv){a.setContentType(undefined)}else if((u=a.getContentType())!==false){const[e,...t]=u?u.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}}if(De.hasStandardBrowserEnv){n&&se.isFunction(n)&&(n=n(t));if(n||n!==false&&dt(t.url)){const e=i&&o&&ht.read(o);if(e){a.set(i,e)}}}return t};const _t=typeof XMLHttpRequest!=="undefined";var St=_t&&function(e){return new Promise((function t(r,n){const i=bt(e);let o=i.data;const a=tt.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=i;let l;let f,d;let h,p;function v(){h&&h();p&&p();i.cancelToken&&i.cancelToken.unsubscribe(l);i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,true);m.timeout=i.timeout;function y(){if(!m){return}const t=tt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());const i=!s||s==="text"||s==="json"?m.responseText:m.response;const o={data:i,status:m.status,statusText:m.statusText,headers:t,config:e,request:m};ot((function e(t){r(t);v()}),(function e(t){n(t);v()}),o);m=null}if("onloadend"in m){m.onloadend=y}else{m.onreadystatechange=function e(){if(!m||m.readyState!==4){return}if(m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}m.onabort=function t(){if(!m){return}n(new ue("Request aborted",ue.ECONNABORTED,e,m));m=null};m.onerror=function t(){n(new ue("Network Error",ue.ERR_NETWORK,e,m));m=null};m.ontimeout=function t(){let r=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const o=i.transitional||Ie;if(i.timeoutErrorMessage){r=i.timeoutErrorMessage}n(new ue(r,o.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,m));m=null};o===undefined&&a.setContentType(null);if("setRequestHeader"in m){se.forEach(a.toJSON(),(function e(t,r){m.setRequestHeader(r,t)}))}if(!se.isUndefined(i.withCredentials)){m.withCredentials=!!i.withCredentials}if(s&&s!=="json"){m.responseType=i.responseType}if(c){[d,p]=ct(c,true);m.addEventListener("progress",d)}if(u&&m.upload){[f,h]=ct(u);m.upload.addEventListener("progress",f);m.upload.addEventListener("loadend",h)}if(i.cancelToken||i.signal){l=t=>{if(!m){return}n(!t||t.type?new it(null,e,m):t);m.abort();m=null};i.cancelToken&&i.cancelToken.subscribe(l);if(i.signal){i.signal.aborted?l():i.signal.addEventListener("abort",l)}}const g=at(i.url);if(g&&De.protocols.indexOf(g)===-1){n(new ue("Unsupported protocol "+g+":",ue.ERR_BAD_REQUEST,e));return}m.send(o||null)}))};const Et=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let n;const i=function(e){if(!n){n=true;a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ue?t:new it(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null;i(new ue(`timeout ${t} of ms exceeded`,ue.ETIMEDOUT))}),t);const a=()=>{if(e){o&&clearTimeout(o);o=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}));e=null}};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;s.unsubscribe=()=>se.asap(a);return s}};var wt=Et;const Tt=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0;let i;while(n<r){i=n+t;yield e.slice(n,i);n=i}};const It=async function*(e,t){for await(const r of Rt(e)){yield*Tt(r,t)}};const Rt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const Ct=(e,t,r,n)=>{const i=It(e,t);let o=0;let a;let s=e=>{if(!a){a=true;n&&n(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t){s();e.close();return}let a=n.byteLength;if(r){let e=o+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){s(e);throw e}},cancel(e){s(e);return i.return()}},{highWaterMark:2})};const kt=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const At=kt&&typeof ReadableStream==="function";const Ot=kt&&(typeof TextEncoder==="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer()));const Pt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const xt=At&&Pt((()=>{let e=false;const t=new Request(De.origin,{body:new ReadableStream,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const Lt=64*1024;const Mt=At&&Pt((()=>se.isReadableStream(new Response("").body)));const Nt={stream:Mt&&(e=>e.body)};kt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Nt[t]&&(Nt[t]=se.isFunction(e[t])?e=>e[t]():(e,r)=>{throw new ue(`Response type '${t}' is not supported`,ue.ERR_NOT_SUPPORT,r)})}))})(new Response);const Dt=async e=>{if(e==null){return 0}if(se.isBlob(e)){return e.size}if(se.isSpecCompliantForm(e)){const t=new Request(De.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(se.isArrayBufferView(e)||se.isArrayBuffer(e)){return e.byteLength}if(se.isURLSearchParams(e)){e=e+""}if(se.isString(e)){return(await Ot(e)).byteLength}};const jt=async(e,t)=>{const r=se.toFiniteNumber(e.getContentLength());return r==null?Dt(t):r};var Ut=kt&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:d}=bt(e);c=c?(c+"").toLowerCase():"text";let h=wt([i,o&&o.toAbortSignal()],a);let p;const v=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(u&&xt&&r!=="get"&&r!=="head"&&(m=await jt(l,n))!==0){let e=new Request(t,{method:"POST",body:n,duplex:"half"});let r;if(se.isFormData(n)&&(r=e.headers.get("content-type"))){l.setContentType(r)}if(e.body){const[t,r]=lt(m,ct(ft(u)));n=Ct(e.body,Lt,t,r)}}if(!se.isString(f)){f=f?"include":"omit"}const i="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:i?f:undefined});let o=await fetch(p);const a=Mt&&(c==="stream"||c==="response");if(Mt&&(s||a&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=se.toFiniteNumber(o.headers.get("content-length"));const[r,n]=s&&lt(t,ct(ft(s),true))||[];o=new Response(Ct(o.body,Lt,r,(()=>{n&&n();v&&v()})),e)}c=c||"text";let y=await Nt[se.findKey(Nt,c)||"text"](o,e);!a&&v&&v();return await new Promise(((t,r)=>{ot(t,r,{data:y,headers:tt.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:p})}))}catch(t){v&&v();if(t&&t.name==="TypeError"&&/fetch/i.test(t.message)){throw Object.assign(new ue("Network Error",ue.ERR_NETWORK,e,p),{cause:t.cause||t})}throw ue.from(t,t&&t.code,e,p)}});const Vt={http:fe,xhr:St,fetch:Ut};se.forEach(Vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Wt=e=>`- ${e}`;const Bt=e=>se.isFunction(e)||e===null||e===false;var Gt={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let r;let n;const i={};for(let o=0;o<t;o++){r=e[o];let t;n=r;if(!Bt(r)){n=Vt[(t=String(r)).toLowerCase()];if(n===undefined){throw new ue(`Unknown adapter '${t}'`)}}if(n){break}i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(Wt).join("\n"):" "+Wt(e[0]):"as no adapter specified";throw new ue(`There is no suitable adapter to dispatch the request `+r,"ERR_NOT_SUPPORT")}return n},adapters:Vt};function Zt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new it(null,e)}}function Ft(e){Zt(e);e.headers=tt.from(e.headers);e.data=rt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Gt.getAdapter(e.adapter||Ze.adapter);return t(e).then((function t(r){Zt(e);r.data=rt.call(e,e.transformResponse,r);r.headers=tt.from(r.headers);return r}),(function t(r){if(!nt(r)){Zt(e);if(r&&r.response){r.response.data=rt.call(e,e.transformResponse,r.response);r.response.headers=tt.from(r.response.headers)}}return Promise.reject(r)}))}const Ht="1.8.4";const Xt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Xt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Yt={};Xt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Ht+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(e,n,o)=>{if(t===false){throw new ue(i(n," has been removed"+(r?" in "+r:"")),ue.ERR_DEPRECATED)}if(r&&!Yt[n]){Yt[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};Xt.spelling=function e(t){return(e,r)=>{console.warn(`${r} is likely a misspelling of ${t}`);return true}};function Kt(e,t,r){if(typeof e!=="object"){throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const o=n[i];const a=t[o];if(a){const t=e[o];const r=t===undefined||a(t,o,e);if(r!==true){throw new ue("option "+o+" must be "+r,ue.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new ue("Unknown option "+o,ue.ERR_BAD_OPTION)}}}var zt={assertOptions:Kt,validators:Xt};const Jt=zt.validators;class Qt{constructor(e){this.defaults=e;this.interceptors={request:new Te,response:new Te}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=gt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;if(r!==undefined){zt.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},false)}if(n!=null){if(se.isFunction(n)){t.paramsSerializer={serialize:n}}else{zt.assertOptions(n,{encode:Jt.function,serialize:Jt.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}zt.assertOptions(t,{baseUrl:Jt.spelling("baseURL"),withXsrfToken:Jt.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&se.merge(i.common,i[t.method]);i&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]}));t.headers=tt.concat(o,i);const a=[];let s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));const u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));let c;let l=0;let f;if(!s){const e=[Ft.bind(this),undefined];e.unshift.apply(e,a);e.push.apply(e,u);f=e.length;c=Promise.resolve(t);while(l<f){c=c.then(e[l++],e[l++])}return c}f=a.length;let d=t;l=0;while(l<f){const t=a[l++];const r=a[l++];try{d=t(d)}catch(e){r.call(this,e);break}}try{c=Ft.call(this,d)}catch(e){return Promise.reject(e)}l=0;f=u.length;while(l<f){c=c.then(u[l++],u[l++])}return c}getUri(e){e=gt(this.defaults,e);const t=mt(e.baseURL,e.url,e.allowAbsoluteUrls);return Ee(t,e.params,e.paramsSerializer)}}se.forEach(["delete","get","head","options"],(function e(t){Qt.prototype[t]=function(e,r){return this.request(gt(r||{},{method:t,url:e,data:(r||{}).data}))}}));se.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(gt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Qt.prototype[t]=r();Qt.prototype[t+"Form"]=r(true)}));var qt=Qt;class $t{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(r){t=r}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new it(n,i,o);t(r.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new $t((function t(r){e=r}));return{token:t,cancel:e}}}var er=$t;function tr(e){return function t(r){return e.apply(null,r)}}function rr(e){return se.isObject(e)&&e.isAxiosError===true}const nr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nr).forEach((([e,t])=>{nr[t]=e}));var ir=nr;function or(e){const t=new qt(e);const r=n(qt.prototype.request,t);se.extend(r,qt.prototype,t,{allOwnKeys:true});se.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return or(gt(e,r))};return r}const ar=or(Ze);ar.Axios=qt;ar.CanceledError=it;ar.CancelToken=er;ar.isCancel=nt;ar.VERSION=Ht;ar.toFormData=ye;ar.AxiosError=ue;ar.Cancel=ar.CanceledError;ar.all=function e(t){return Promise.all(t)};ar.spread=tr;ar.isAxiosError=rr;ar.mergeConfig=gt;ar.AxiosHeaders=tt;ar.formToJSON=e=>We(se.isHTMLForm(e)?new FormData(e):e);ar.getAdapter=Gt.getAdapter;ar.HttpStatusCode=ir;ar.default=ar;e.exports=ar},7057:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(6347)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;t=r(t);function r(e){return e&&e.__esModule?e:{default:e}}var n=e["default"]=t["default"]}))},7360:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaStreamUtil=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var r=a(e,"string");return"symbol"==t(r)?r:r+""}function a(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var s=e.MediaStreamUtil=function(){function e(){r(this,e)}return i(e,null,[{key:"stopAudioTrack",value:function e(t){var r;t===null||t===void 0||(r=t.getAudioTracks)===null||r===void 0||(r=r.call(t))===null||r===void 0||r.forEach((function(e){var t;(t=e.stop)===null||t===void 0||t.call(e)}))}}])}()}))},7814:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(1167),r(5268)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.WasmManager=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=e.WasmManager=function(){function e(){s(this,e)}return c(e,null,[{key:"init",value:function r(n){var i=(0,t.getModule)();var o="./";var a="./";var s="debug";var u=i._malloc(i.lengthBytesUTF8(n.modelConfigStr)+1);var c=i._malloc(o.length+1);var l=i._malloc(a.length+1);var f=i._malloc(s.length+1);i.stringToUTF8(n.modelConfigStr,u,i.lengthBytesUTF8(n.modelConfigStr)+1);i.stringToUTF8(o,c,o.length+1);i.stringToUTF8(a,l,a.length+1);i.stringToUTF8(s,f,s.length+1);var d=i.addFunction((function(t){var r;var n=i.UTF8ToString(i.HEAP32[t>>>2]);var o=i.UTF8ToString(i.HEAP32[t+4>>>2]);var a=i.UTF8ToString(i.HEAP32[t+4*2>>>2]);var s=i.UTF8ToString(i.HEAP32[t+4*3>>>2]);var u=i.UTF8ToString(i.HEAP32[t+4*4>>>2]);var c=i.UTF8ToString(i.HEAP32[t+4*5>>>2]);var l=i.UTF8ToString(i.HEAP32[t+4*6>>>2]);(r=e.trackCallback)===null||r===void 0||r.call(e,{type:n,entry:o,key:a,startTime:s,error:u,result:c,message:l})}),"ii");var h=i._malloc(5*4);i.setValue(h,u,"i32");i.setValue(h+4,c,"i32");i.setValue(h+4*2,l,"i32");i.setValue(h+4*3,f,"i32");i.setValue(h+4*4,d,"i32");var p=i._KWSInit(h);i._free(c);i._free(l);i._free(f);i._free(h);return e.formatResult(p)}},{key:"create",value:function r(n){var i=(0,t.getModule)();var o="./";var a="./";var s="zh";if(["zh","en"].includes(n.language)){s=n.language}var u=i._malloc(o.length+1);var c=i._malloc(a.length+1);var l=i._malloc(n.token.length+1);var f=i._malloc(n.icsManagerHost.length+1);var d=i._malloc(n.jobId.length+1);var h=i._malloc(n.logLevel.length+1);var p=i._malloc(s.length+1);i.stringToUTF8(o,u,o.length+1);i.stringToUTF8(a,c,a.length+1);i.stringToUTF8(n.token,l,n.token.length+1);i.stringToUTF8(n.icsManagerHost,f,n.icsManagerHost.length+1);i.stringToUTF8(n.jobId,d,n.jobId.length+1);i.stringToUTF8(n.logLevel,h,n.logLevel.length+1);i.stringToUTF8(s,p,s.length+1);var v=i._malloc(7*4);i.setValue(v,u,"i32");i.setValue(v+4,c,"i32");i.setValue(v+4*2,l,"i32");i.setValue(v+4*3,f,"i32");i.setValue(v+4*4,d,"i32");i.setValue(v+4*5,h,"i32");i.setValue(v+4*6,p,"i32");var m=i._KWSLogin(v);i._free(u);i._free(c);i._free(l);i._free(f);i._free(d);i._free(h);i._free(p);i._free(v);return e.formatResult(m)}},{key:"beginSession",value:function r(){var n=(0,t.getModule)();var i=n._malloc(4);n.setValue(i,0,"i32");var o=n._malloc(4);n.setValue(o,i,"i32");var a=n._KWSSessionBegin(o);e.sessionId=n.UTF8ToString(a);e.addWasmCallback();return e.formatResult(0)}},{key:"endSession",value:function r(n){var i=(0,t.getModule)();var o=i._malloc(e.sessionId.length+1);var a=i._malloc(n.reason.length+1);i.stringToUTF8(e.sessionId,o,e.sessionId.length+1);i.stringToUTF8(n.reason,a,n.reason.length+1);var s=i._malloc(2*4);i.setValue(s,o,"i32");i.setValue(s+4,a,"i32");var u=i._KWSSessionEnd(s);i._free(o);i._free(a);i._free(s);e.sessionId="";return e.formatResult(u)}},{key:"logout",value:function r(){var n=(0,t.getModule)();n._KWSLogout();return e.formatResult(0)}},{key:"writeAudio",value:function r(n){var i=(0,t.getModule)();if(!e.sessionId){return{result:false}}var o=n.int8Data;if(n.int16Data){o=e.convertInt16ToInt8(n.int16Data)}if(!o){return{result:false}}var a=i._malloc(e.sessionId.length+1);i.stringToUTF8(e.sessionId,a,e.sessionId.length+1);var s=o.length;var u=i._malloc(s);var c=new Int8Array(i.HEAP8.buffer,u,s);var l=new Int8Array(o.buffer);c.set(l);var f=i._malloc(3*4);i.setValue(f,a,"i32");i.setValue(f+4,u,"i32");i.setValue(f+8,s,"i32");i._KWSAudioWrite(f);i._free(a);i._free(u);i._free(f);return e.formatResult(0)}},{key:"updateParams",value:function r(n){var i=(0,t.getModule)();var o=i._malloc(n.logLevel.length+1);var a=i._malloc(e.language.length+1);i.stringToUTF8(n.logLevel,o,n.logLevel.length+1);i.stringToUTF8(n.language,a,n.language.length+1);var s=i._malloc(4*2);i.setValue(s,o,"i32");i.setValue(s+4,a,"i32");var u=i._KWSUpdateParams(s);i._free(o);i._free(a);i._free(s);return e.formatResult(u)}},{key:"setCallback",value:function t(r){e.msgCallback=r.callback;e.trackCallback=r.trackCallback}},{key:"getErrorMsgByCode",value:function e(r){try{var n=(0,t.getModule)();var i=n._KWSGetErrorDescription(r);if(i){var o=n.UTF8ToString(i);var a=JSON.parse(o);var s=Object.keys(a)[0];return{errorCode:s,errorMsg:a[r]||""}}return{errorCode:r.toString(),errorMsg:"unknown reason"}}catch(e){return{errorCode:r.toString(),errorMsg:"unknown reason,"+e.toString()}}}},{key:"convertInt16ToInt8",value:function e(t){var r=new Int8Array(t.length*2);for(var n=0;n<t.length;n++){var i=t[n];r[n*2]=i&255;r[n*2+1]=i>>8&255}return r}},{key:"addWasmCallback",value:function r(){if(!e.sessionId){return}var n=(0,t.getModule)();var i=n._malloc(e.sessionId.length+1);var o=n._malloc(4);n.stringToUTF8(e.sessionId,i,e.sessionId.length+1);var a=n.addFunction((function(t){var r;var i=n.UTF8ToString(n.HEAP32[t>>>2]);var o=n.HEAP32[t+4>>>2];var a=n.HEAP32[t+8>>>2];var s=n.UTF8ToString(n.HEAP32[t+12>>>2]);(r=e.msgCallback)===null||r===void 0||r.call(e,{sessionID:i,msgType:o,errorCode:a,wakeupInfo:s})}),"vp");var s=n._malloc(3*4);n.setValue(s,i,"i32");n.setValue(s+4,a,"i32");n.setValue(s+4*2,o,"i32");n._KWSRegisterNotify(s);n._free(i);n._free(o);n._free(s)}}])}();d.sessionId="";d.language="zh";d.formatResult=function(e){if(e.toString()===r.SDKErrorCode.SUCCESS){return{result:true,errorCode:r.SDKErrorCode.SUCCESS,errorMsg:""}}return o({result:false},d.getErrorMsgByCode(e))}}))},7867:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MediaDeviceManager=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var r=l(e,"string");return"symbol"==t(r)?r:r+""}function l(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var f=e.MediaDeviceManager=function(){function e(){o(this,e)}return s(e,null,[{key:"getDefaultDeviceId",value:function(){var t=i(r().mark((function t(n){var i;var o,a,s;return r().wrap((function t(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:o=r.sent;a=o.filter((function(e){return e.kind===n}));s=a.find((function(e){return e.deviceId==="default"}));return r.abrupt("return",s?((i=a.find((function(t){return t.groupId===s.groupId&&!e.defaultDeviceIdList.includes(t.deviceId)})))===null||i===void 0?void 0:i.deviceId)||"":"");case 6:case"end":return r.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"checkDeviceIdExist",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:r.next=2;return navigator.mediaDevices.enumerateDevices();case 2:n=r.sent;return r.abrupt("return",!!n.find((function(e){return e.deviceId===t})));case 4:case"end":return r.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}])}();u(f,"defaultDeviceIdList",["default","communications"])}))},8159:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StringUtil=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=u(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var c=e.StringUtil=i((function e(){o(this,e)}));a(c,"beforeJsonParse",(function(e){return e.replace("","")}));a(c,"replaceStringPlaceholder",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}var i=e.split(r.toString());var o="";i.forEach((function(e,t){o+=e;if(t<i.length-1&&n[t]){o+=n[t]}}));return o}));a(c,"formatString",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}if((0,t.formatType)(e)!==t.formatType.STRING){return e}return e.replace(/\{([^{}]+)}/g,(function(e,r){return(0,t.formatType)(n[r])===t.formatType.STRING||!(0,t.isNullOrEmpty)(n[r])?n[r]:e}))}));a(c,"splitStringByChar",(function(e,r,n){if((0,t.formatType)(e)!==t.formatType.STRING){return e}if((0,t.formatType)(r)!==t.formatType.NUMBER||r<0){return e}if((0,t.formatType)(n)!==t.formatType.STRING){return e}var i="";e.split("").forEach((function(t,o){i+=t;if(o<e.length-1&&(o+1)%r===0){i+=n}}));return i}));a(c,"safeJSONParse",(function(e){try{return JSON.parse(e)}catch(e){return null}}))}))},8360:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LazyLoad=void 0;function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u={};var c=e.LazyLoad=function(){function e(){n(this,e)}return o(e,null,[{key:"getRealLazyApi",value:function r(n,i,o){(0,t.getPLogger)().debug("getRealLazyApi",n,i,o);if((0,t.formatType)(n)!==t.formatType.STRING||(0,t.formatType)(i)!==t.formatType.STRING||(0,t.formatType)(o)!==t.formatType.OBJECT||n===""||i===""){return{}}var a=o;var s=Object.keys(o);var u=Object.getOwnPropertyNames(Object.getPrototypeOf(o));if(u.includes("constructor")){u.splice(u.indexOf("constructor"),1)}var c=s.concat(u);(0,t.getPLogger)().info("getRealLazyApi loadScript, "+n);c.forEach((function(r){if((0,t.formatType)(a[r])===t.formatType.FUNCTION){a[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++){s[u]=arguments[u]}return e.loadScript(n,i).then((function(){var e;(0,t.getPLogger)().info("getRealLazyApi loadScript, real do "+n+"."+r);if(((e=window[n])===null||e===void 0?void 0:e[r])===a[r]){(0,t.getPLogger)().error("getRealLazyApi loadScript, script is error,"+n+"."+r)}else{var i;return(i=window[n])===null||i===void 0||(i=i[r])===null||i===void 0?void 0:i.apply(window[n],s)}return undefined}))["catch"]((function(e){(0,t.getPLogger)().error("getRealLazyApi loadScript,lazy load "+n,e)}))}}}));return a}},{key:"loadScript",value:function e(r,n){(0,t.getPLogger)().debug("loadScript",r,n);if((0,t.formatType)(r)!==t.formatType.STRING||(0,t.formatType)(n)!==t.formatType.STRING||r===""||n===""){return Promise.resolve(undefined)}if(!u[r]){var i=document.createElement("script");i.async=true;u[r]=new Promise((function(e,n){i.onload=function(){(0,t.getPLogger)().info("loadScript, load "+r+" success");e(window[r])};i.onerror=function(){(0,t.getPLogger)().error("loadScript, load "+r+" error");n(new Error("load resource error"))}}));i.src=n;document.head.appendChild(i)}else{(0,t.getPLogger)().info("loadScript, not load "+r+" again")}return u[r]}},{key:"loadCss",value:function e(r){(0,t.getPLogger)().info("loadCss",r);if((0,t.formatType)(r)!==t.formatType.STRING||r===""){return Promise.resolve(undefined)}return new Promise((function(e){var n=document.createElement("link");n.rel="stylesheet";n.href=r;n.onload=function(){(0,t.getPLogger)().info("loadCss, load "+r+" success");e(true)};n.onerror=function(){(0,t.getPLogger)().info("loadCss, load "+r+" error");e(false)};document.head.appendChild(n)}))}}])}()}))},8553:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(6425),r(1067),r(3226)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;t=i(t);function i(e){return e&&e.__esModule?e:{default:e}}function o(e){"@babel/helpers - typeof";return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){var t=l(e,"string");return"symbol"==o(t)?t:t+""}function l(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f="x-request-id";var d;(function(e){e["MATCH"]="match";e["MISMATCH"]="mismatch"})(d||(d={}));var h;(function(e){e["REQUEST_ERROR"]="request_error";e["RESPONSE_ERROR"]="response_error";e["RESPONSE"]="response"})(h||(h={}));function p(e){var t,r,n;return(e===null||e===void 0||(t=e.headers)===null||t===void 0?void 0:t[f])||(e===null||e===void 0||(r=e.response)===null||r===void 0||(r=r.headers)===null||r===void 0?void 0:r[f])||(e===null||e===void 0||(n=e.config)===null||n===void 0||(n=n.headers)===null||n===void 0?void 0:n[f])||""}function v(e){var t;var r=e.config;var n=r===null||r===void 0||(t=r.headers)===null||t===void 0?void 0:t[f];var i=p(e);return n===i}function m(e,t){var i,o;var a=t.config;var u={arg1:n.Arg1Map.SERVER_API,arg2:"".concat(a===null||a===void 0?void 0:a.method,"-").concat(a===null||a===void 0?void 0:a.url),args:{error:(t===null||t===void 0||(i=t.response)===null||i===void 0||(i=i.status)===null||i===void 0?void 0:i.toString())||"",key:p(t),result:(t===null||t===void 0||(o=t.response)===null||o===void 0?void 0:o.data)||""}};r.UserTrack.endUserTrack(s(s({},u),{},{eventKey:p(t),args:s(s({},u.args),{},{type:"".concat(d.MATCH,"-").concat(e)})}));if(!v(t)){r.UserTrack.addUserTrack(s(s({},u),{},{args:s(s({},u.args),{},{type:"".concat(d.MISMATCH,"-").concat(e)})}))}}function y(e){var t=e.headers;var i={arg1:n.Arg1Map.SERVER_API,arg2:"".concat(e===null||e===void 0?void 0:e.method,"-").concat(e===null||e===void 0?void 0:e.url),args:{param:JSON.stringify(e.data),key:t===null||t===void 0?void 0:t[f]}};r.UserTrack.startUserTrack(s(s({},i),{},{eventKey:t===null||t===void 0?void 0:t[f]}));r.UserTrack.addUserTrack(i)}function g(e){var t;var i=e.config;var o={arg1:n.Arg1Map.SERVER_API,arg2:"".concat(i===null||i===void 0?void 0:i.method,"-").concat(i===null||i===void 0?void 0:i.url),args:{error:e===null||e===void 0||(t=e.status)===null||t===void 0?void 0:t.toString(),result:JSON.stringify(i.data),key:p(e)}};r.UserTrack.endUserTrack(s(s({},o),{},{eventKey:p(e),args:s(s({},o.args),{},{type:d.MATCH})}));if(!v(e)){r.UserTrack.addUserTrack(s(s({},o),{},{args:s(s({},o.args),{},{type:d.MISMATCH})}))}}var b=function e(t){var r=[];Object.keys(t).forEach((function(e){var n=t[e];if(n===null||typeof n==="undefined"){return}r.push("".concat(e,"=").concat(encodeURIComponent(n)))}));return r.join("&")};var _=t["default"].create({timeout:3e4,paramsSerializer:b});_.interceptors.request.use((function(e){var t,r;var n=e.headers;n[f]=(t=crypto)===null||t===void 0||(r=t.randomUUID)===null||r===void 0?void 0:r.call(t);n["x-request-terminal-version"]="3.0.9";n["x-request-terminal-platform"]="kwssdk";y(e);return e}),(function(e){m(h.REQUEST_ERROR,e);return Promise.reject(e)}));_.interceptors.response.use((function(e){g(e);return e}),(function(e){m(h.RESPONSE_ERROR,e);if(e!==null&&e!==void 0&&e.response){return e===null||e===void 0?void 0:e.response}return{error:e}}));var S=e["default"]=_}))},8707:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkIPV4=void 0;var r=e.checkIPV4=function e(r){if((0,t.formatType)(r)!==t.formatType.STRING){return false}var n=r.split(".").filter((function(e){return!!e.trim()}));if(n.length!==4){return false}for(var i=0;i<n.length;i++){var o=parseInt(n[i]);if(isNaN(o)){return false}if(o<0||o>255){return false}}return true}}))},9220:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RequestTasksQueue=void 0;function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){"use strict";r=function e(){return n};var e,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==i&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,r){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(t,o){function a(){return new r((function(e,r){n(t,o,e,r)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function t(){for(;++i<r.length;)if(o.call(r,i))return t.value=r[i],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},n.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),n.AsyncIterator=C,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new C(d(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},n}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e){return c(e)||u(e)||s(e)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return l(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var r=m(e,"string");return"symbol"==t(r)?r:r+""}function m(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var y=e.RequestTasksQueue=d((function e(t){var n=this;var a=t.taskFunc,s=t.logger,u=t.timeout,c=u===void 0?5e4:u;h(this,e);p(this,"_queueData",void 0);p(this,"_taskFunc",void 0);p(this,"logger",void 0);p(this,"_timeout",void 0);p(this,"_isRunning",void 0);p(this,"dealTask",(function(e){var t,r;var i=e.args,o=e.timeout;var a="dealTask";var s=Date.now();(t=n.logger)===null||t===void 0||(r=t.debug)===null||r===void 0||r.call(t,a,"start");return new Promise((function(e){o=o||n._timeout;var t=setTimeout((function(){var t,r;(t=(r=n.logger).info)===null||t===void 0||t.call(r,a,"timeout",Date.now()-s);e({reason:"timeout,"+o});n._isRunning=false}),o);n._queueData.push([i,function(r){var i,o;(i=n.logger)===null||i===void 0||(o=i.debug)===null||o===void 0||o.call(i,a,"over,use time",Date.now()-s);clearTimeout(t);e(r)}]);if(!n._isTaskRunning()){n._dealTask()}}))}));p(this,"_dealTask",(function(){if(n._getNoDealDataSize()>0){var e=n._getWillDealData();n._isRunning=true;n._dealTaskFunc.apply(n,o(e[0])).then((function(t){e[1](t);n._dealTask()}))["catch"]((function(t){var r,i;(r=n.logger)===null||r===void 0||(i=r.error)===null||i===void 0||i.call(r,"_dealTask error",t);e[1]({reason:"catch error",error:t});n._dealTask()}))}else{n._isRunning=false}}));p(this,"_dealTaskFunc",i(r().mark((function e(){var t=arguments;return r().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:return r.abrupt("return",n._taskFunc.apply(n,t));case 1:case"end":return r.stop()}}),e)}))));p(this,"_getNoDealDataSize",(function(){return n._queueData.length}));p(this,"_isTaskRunning",(function(){return n._isRunning}));p(this,"_getWillDealData",(function(){return n._queueData.shift()}));this.logger=s||{info:function e(){}};this._queueData=[];this._taskFunc=a;this._isRunning=false;this._timeout=c}))}))},9222:function(e,t){var r,n,i;(function(o,a){if(true){!(n=[t],r=a,i=typeof r==="function"?r.apply(t,n):r,i!==undefined&&(e.exports=i))}else{var s}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getSipNumberReg=e.getNumberReg=e.getMobilePhoneReg=e.getEmailReg=e.getChineseWordReg=e.getChinesePunctuationReg=e.escapeRegExp=void 0;var t=e.escapeRegExp=function e(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")};var r=e.getNumberReg=function e(){return/^([+*#]\d+|\d{4,})$/};var n=e.getMobilePhoneReg=function e(){return/^(1|\+861|0\d{2,3}1)[3456789]\d{9}$/};var i=e.getEmailReg=function e(){return/^[a-z\dA-Z]+[-a-z\dA-Z._]+@([a-z\dA-Z]+(-[a-z\dA-Z]+)?\.)+[a-z]+$/};var o=e.getSipNumberReg=function e(){return/^\+99111\d+/};var a=e.getChineseWordReg=function e(){return/[\u4E00-\u9FFF]/};var s=e.getChinesePunctuationReg=function e(){return/[\u4E00-\u9FFF]/}}))},9376:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(299),r(4772),r(125),r(3226),r(1067),r(9655),r(1167),r(2703),r(7814),r(4976)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i,o,a,s,u,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HwKwsWakeup=void 0;function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){"use strict";p=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,r,n){return t[r]=n}}function l(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",v="executing",m="completed",y={};function g(){}function b(){}function _(){}var S={};c(S,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,a)&&(S=T);var I=_.prototype=g.prototype=Object.create(S);function R(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==E(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?m:h,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(E(t)+" is not iterable")}return b.prototype=_,i(I,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),c(I,u,"Generator"),c(I,a,(function(){return this})),c(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function v(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){v(o,n,i,a,s,"next",e)}function s(e){v(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=S(e,"string");return"symbol"==E(t)?t:t+""}function S(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){"@babel/helpers - typeof";return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var w=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":E(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var T=new t.Log({module:"HwKwsWakeup"});var I=e.HwKwsWakeup=function(){function e(){y(this,e)}return b(e,null,[{key:"initResourcePath",value:function t(r){e.wasmPath=r.wasmPath;e.dataPath=r.dataPath;e.useWorker=r.useWorker===true;e.wasmManagerAdapter=e.useWorker?l.MainWasmManager:c.WasmManager}},{key:"setLogLevel",value:function(){var r=m(p().mark((function r(n){return p().wrap((function r(i){while(1)switch(i.prev=i.next){case 0:if(e.initPromise){i.next=3;break}T.warn("setLogLevel","not init, do nothing");return i.abrupt("return",{result:false});case 3:if(["debug","info","warn","error","none"].includes(n)){i.next=5;break}return i.abrupt("return",{result:false});case 5:t.Log.setLogLevel(n);return i.abrupt("return",e.updateParams("setLogLevel"));case 7:case"end":return i.stop()}}),r)})));function n(e){return r.apply(this,arguments)}return n}()},{key:"setLanguage",value:function(){var t=m(p().mark((function t(r){return p().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:if(e.initPromise){n.next=3;break}T.warn("setLanguage","not init, do nothing");return n.abrupt("return",{result:false});case 3:if(["zh","en"].includes(r)){n.next=5;break}return n.abrupt("return",{result:false});case 5:e.language=r;return n.abrupt("return",e.updateParams("setLanguage"));case 7:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"enableTrack",value:function e(t){o.UserTrack.toggleBusinessTrack({enableBusinessTrack:t})}},{key:"init",value:function(){var t=m(p().mark((function t(){return p().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:T.info("init",!!e.initPromise,e.useWorker);if(!e.initPromise){n.next=3;break}return n.abrupt("return",e.initPromise);case 3:e.wasmManagerAdapter.setCallback({callback:e.dealCallback,trackCallback:e.dealTrackCallback});if(!e.useWorker){n.next=7;break}e.initPromise=l.MainWasmManager.init({wasmPath:e.wasmPath,dataPath:e.dataPath});return n.abrupt("return",e.initPromise);case 7:n.next=9;return e.waitModuleReady();case 9:e.initPromise=new Promise((function(e){var t=self.getWasmModelConfig();var n=t;if((0,r.formatType)(t)===r.formatType.OBJECT){delete t.preData;n=JSON.stringify(t)}var i=c.WasmManager.init({modelConfigStr:n});e(i)}));return n.abrupt("return",e.initPromise);case 11:case"end":return n.stop()}}),t)})));function n(){return t.apply(this,arguments)}return n}()},{key:"create",value:function(){var r=m(p().mark((function r(n){var i;return p().wrap((function r(s){while(1)switch(s.prev=s.next){case 0:s.next=2;return e.init();case 2:if(["zh","en"].includes(n.language)){e.language=n.language}if(["debug","info","warn","error","none"].includes(n.logLevel)){t.Log.setLogLevel(n.logLevel)}o.UserTrack.updateUtParam({token:n.token,jobId:n.jobId,robotId:n.robotId,baseUrl:new URL(n.icsManagerHost)});e.setIcsToken(n.token);a.HttpRequest.setIcsHost(n.icsHost);u.WakeupHeartbeatManager.setHeartbeatInfo({jobId:n.jobId,failedCallback:function t(r){T.error("create failedCallback",r);e.endSession()}});s.next=10;return e.wasmManagerAdapter.create(d(d({},n),{},{language:e.language,logLevel:t.Log.getLogLevel()}));case 10:i=s.sent;if(i.result){u.WakeupHeartbeatManager.startHeartBeat("create")}return s.abrupt("return",i);case 13:case"end":return s.stop()}}),r)})));function n(e){return r.apply(this,arguments)}return n}()},{key:"beginSession",value:function(){var t=m(p().mark((function t(r){var n;return p().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:T.info("beginSession",r,r===null||r===void 0?void 0:r.autoCollectAudio);i.next=3;return e.init();case 3:i.next=5;return e.wasmManagerAdapter.beginSession();case 5:n=i.sent;i.next=8;return e.updateStreamInput(r);case 8:return i.abrupt("return",n);case 9:case"end":return i.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"updateStreamInput",value:function(){var t=m(p().mark((function t(n){var i;return p().wrap((function t(o){while(1)switch(o.prev=o.next){case 0:e.autoCollectAudio=(n===null||n===void 0?void 0:n.autoCollectAudio)!==false;e.stream=n===null||n===void 0?void 0:n.stream;o.next=4;return(i=e.localRecorder)===null||i===void 0?void 0:i.stopRecord();case 4:T.info("updateStreamInput",e.autoCollectAudio,!!(n!==null&&n!==void 0&&n.stream),n);if(!e.autoCollectAudio){o.next=9;break}e.localRecorder=new r.AudioContextLocalRecorder({bufferSize:1024,useScriptProcessor:true,audioCallback:e.audioCallback});o.next=9;return e.localRecorder.startRecord({stream:n===null||n===void 0?void 0:n.stream});case 9:case"end":return o.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"endSession",value:function(){var t=m(p().mark((function t(){var r;var n;return p().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:i.next=2;return e.init();case 2:T.info("endSession");i.next=5;return(r=e.localRecorder)===null||r===void 0?void 0:r.stopRecord();case 5:delete e.localRecorder;i.next=8;return e.wasmManagerAdapter.endSession({reason:""});case 8:n=i.sent;e.lastAudioDataTime=0;e.autoCollectAudio=true;if(e.isMuteTimer){clearTimeout(e.isMuteTimer);delete e.isMuteTimer}return i.abrupt("return",n);case 13:case"end":return i.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()},{key:"logout",value:function(){var t=m(p().mark((function t(){var r;return p().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return e.init();case 2:n.next=4;return e.wasmManagerAdapter.logout();case 4:r=n.sent;o.UserTrack.resetUtParam();u.WakeupHeartbeatManager.stopHeartBeat("logout");return n.abrupt("return",r);case 8:case"end":return n.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()},{key:"registerWakeupNotify",value:function t(r){e.wakeupCallback=r}},{key:"setIcsToken",value:function e(t){a.HttpRequest.setIcsToken(t);o.UserTrack.updateUtParam({token:t})}},{key:"startRecord",value:function t(){e.downloadAudio=new r.DownloadAudio}},{key:"stopRecord",value:function t(){var r,n;(r=e.downloadAudio)===null||r===void 0||r.downloadFile("record.pcm");(n=e.downloadAudio)===null||n===void 0||n.clearData();delete e.downloadAudio}},{key:"writeAudio",value:function(){var t=m(p().mark((function t(r){return p().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",e.writeWakeupAudio({int8Data:r}));case 1:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"writeWakeupAudio",value:function(){var t=m(p().mark((function t(r){return p().wrap((function t(n){while(1)switch(n.prev=n.next){case 0:return n.abrupt("return",e.wasmManagerAdapter.writeAudio(r));case 1:case"end":return n.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"updateMicrophoneDevice",value:function(){var t=m(p().mark((function t(r){var n;return p().wrap((function t(i){while(1)switch(i.prev=i.next){case 0:T.info("updateMicrophoneDevice",r,e.stream);if(e.stream){i.next=4;break}i.next=4;return(n=e.localRecorder)===null||n===void 0?void 0:n.startRecord({deviceId:r});case 4:return i.abrupt("return",{result:true});case 5:case"end":return i.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()},{key:"updateParams",value:function(){var r=m(p().mark((function r(n){var i;return p().wrap((function r(o){while(1)switch(o.prev=o.next){case 0:n+=",updateParams";if(e.initPromise){o.next=4;break}T.warn(n,"not init, do nothing");return o.abrupt("return",{result:false});case 4:o.next=6;return e.init();case 6:i=t.Log.getLogLevel();T.info(n,i,e.language);return o.abrupt("return",e.wasmManagerAdapter.updateParams({language:e.language,logLevel:i,entry:n}));case 9:case"end":return o.stop()}}),r)})));function n(e){return r.apply(this,arguments)}return n}()},{key:"audioCallback",value:function t(r){try{var n;var i=Date.now();var o=i-e.lastAudioDataTime;e.lastAudioDataTime=i;e.audioCallbackCount++;if(o===i){T.info("audioCallback","audio data start",r.pcm.byteLength)}else if(o>300){T.warn("audioCallback","audio data maybe problem",e.audioCallbackCount,o,r.recordId)}if(e.isMuteTimer){clearTimeout(e.isMuteTimer)}e.isMuteTimer=setTimeout((function(){T.warn("audioCallback","no audio data over 10s")}),1e4);(n=e.downloadAudio)===null||n===void 0||n.addDownloadData(r.pcm.buffer);e.writeWakeupAudio({int16Data:r.pcm})}catch(e){T.error("audioCallback",e)}}},{key:"dealCallback",value:function t(r){var n;T.debug("dealCallback",r);(n=e.wakeupCallback)===null||n===void 0||n.call(e,JSON.parse(r.wakeupInfo))}},{key:"dealTrackCallback",value:function e(t){o.UserTrack.addUserTrack({arg1:i.Arg1Map.WAKEUP_SDK_NATIVE_TRACK,args:t})}},{key:"waitModuleReady",value:function t(){var n="waitModuleReady";if(!e.readyPromise){e.readyPromise=new Promise((function(t){T.info(n,"start",e.wasmPath,e.dataPath);var i=setTimeout((function(){T.info(n,"timeout")}),3e4);var o={onRuntimeInitialized:function e(){T.info(n,"init over!");t(true);clearTimeout(i)},locateFile:function t(r){T.info(n,"locateFile",r);if(r.endsWith("wasm")){return self.hwKwsWasmData||e.wasmPath||"wasmData.js"}if(r.endsWith("data")){return e.dataPath||"modelData.js"}return r},printErr:function e(t){T.error(n,"printErr",t)},getPreloadedPackage:function e(t,r){var i;T.info(n,"getPreloadedPackage",t,r,(i=self.hwKwsWasmModelData)===null||i===void 0?void 0:i.byteLength);return self.hwKwsWasmModelData}};if(e.dataPath&&e.wasmPath){Promise.all([r.LazyLoad.loadScript("hwKwsWasmModelData",e.dataPath),r.LazyLoad.loadScript("hwKwsWasmData",e.wasmPath)]).then((function(){(0,s.loadWasm)(o,self.getWasmModelConfig().preData||{files:[{filename:"/decoder.onnx",start:0,end:534547},{filename:"/encoder.onnx",start:534547,end:12705729},{filename:"/joiner.onnx",start:12705729,end:12817896},{filename:"/tokens.txt",start:12817896,end:12819049}],remote_package_size:12819049})}));return}(0,s.loadWasm)(o)}))}return e.readyPromise}}])}();I.version="".concat("3.0.9");I.buildTime="".concat("202510291436");I.wasmPath="";I.dataPath="";I.lastAudioDataTime=0;I.audioCallbackCount=0;I.language="zh";I.autoCollectAudio=true;I.useWorker=false;I.wasmManagerAdapter=c.WasmManager;w([(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"initResourcePath",null);w([(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"setLogLevel",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"setLanguage",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"enableTrack",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"init",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD,true)],I,"create",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"beginSession",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"updateStreamInput",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"endSession",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"logout",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"registerWakeupNotify",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD,true)],I,"setIcsToken",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"startRecord",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"stopRecord",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_METHOD)],I,"updateMicrophoneDevice",null);w([(0,r.printfDecorator)(T)],I,"updateParams",null);w([(0,r.printfDecorator)(T),(0,n.methodDecorator)(i.Arg1Map.WAKEUP_SDK_NOTIFY)],I,"dealCallback",null);w([(0,r.printfDecorator)(T)],I,"dealTrackCallback",null);w([(0,r.printfDecorator)(T)],I,"waitModuleReady",null)}))},9403:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(4994)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PromiseUtil=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){"use strict";i=function e(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new x(n||[]);return a(o,"_invoke",{value:k(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,u,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&o.call(T,u)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function e(n,o){function a(){return new t((function(e,t){r(n,o,e,t)}))}return i=i?i.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=S,a(I,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,u,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function i(t,i){return u.type="throw",u.arg=r,n.next=t,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),l=o.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function e(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==n(t)?t:t+""}function f(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=e.PromiseUtil=function(){function e(){s(this,e)}return c(e,null,[{key:"makeSure",value:function e(r){var n=r.delay||1e3;var o=r.retryCount||50;var s=r.fn;var u=r.condition;var c=1;var l=false;if((0,t.formatType)(n)!==t.formatType.NUMBER||(0,t.formatType)(o)!==t.formatType.NUMBER||!((0,t.formatType)(s)===t.formatType.FUNCTION||(0,t.formatType)(s)===t.formatType.ASYNCFUNCTION)||!((0,t.formatType)(u)===t.formatType.FUNCTION||(0,t.formatType)(u)===t.formatType.ASYNCFUNCTION)){throw new Error("params error")}var f=function(){var e=a(i().mark((function e(){var r,a,d,h,p=arguments;return i().wrap((function e(i){while(1)switch(i.prev=i.next){case 0:if(!l){i.next=2;break}return i.abrupt("return",{result:false,message:"isStop true"});case 2:for(r=p.length,a=new Array(r),d=0;d<r;d++){a[d]=p[d]}i.next=5;return s.apply(void 0,a.concat([c]));case 5:h=i.sent;i.next=8;return u.apply(void 0,a.concat([h]));case 8:if(!i.sent){i.next=10;break}return i.abrupt("return",{result:true});case 10:c++;if(!(c>o)){i.next=13;break}return i.abrupt("return",{result:false,message:"retryCount max"});case 13:i.next=15;return(0,t.sleep)(n);case 15:return i.abrupt("return",f.apply(void 0,a));case 16:case"end":return i.stop()}}),e)})));return function t(){return e.apply(this,arguments)}}();var d=function e(){l=true};return{dealMakeSureFunc:f,stopMakeSureFunc:d}}},{key:"interruptibleSleep",value:function e(t){var n=new r.CustomPromise;n.setResolveTimeout(t,true);return{promise:n.waitPromise(),stop:function e(){n.dealResolve(false)}}}}])}()}))},9524:function(e,t,r){var n,i,o;function a(e){"@babel/helpers - typeof";return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}(function(a,s){if(true){!(i=[t,r(9969),r(258),r(7360)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ScriptProcessorRecord=void 0;var i,o,s,u;function c(){"use strict";c=function e(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function e(t,r,n){return t[r]=n}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new x(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function S(){}var E={};f(E,s,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==r&&n.call(T,s)&&(E=T);var I=S.prototype=b.prototype=Object.create(E);function R(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,u){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function e(n,i){function a(){return new t((function(e,t){r(n,i,e,t)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=S,i(I,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:_,configurable:!0}),_.displayName=f(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},R(C.prototype),f(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new C(d(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(I),f(I,l,"Generator"),f(I,s,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,x.prototype={constructor:x,reset:function t(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!r)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var i=this;function o(t,n){return u.type="throw",u.arg=r,i.next=t,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function e(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function e(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function e(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function t(r,n,i){return this.delegate={iterator:L(r),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function y(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer?(Object.defineProperty(e,t,o),null):o}var b=e.ScriptProcessorRecord=(i=(0,t.printfDecorator)((0,r.getPLogger)()),o=(0,t.printfDecorator)((0,r.getPLogger)()),s=(u=function(){function e(t){var r=this;d(this,e);v(this,"audioContext",void 0);v(this,"param",void 0);v(this,"stream",void 0);v(this,"input",void 0);v(this,"recorder",void 0);v(this,"total",0);v(this,"startProm",void 0);v(this,"autoCollectAudio",void 0);v(this,"getOnaudioprocess",(function(e){return function(t){var n=new Float32Array(t.inputBuffer.getChannelData(0));var i=new Int16Array(n.length);var o=0;for(var a=0;a<n.length;++a){var s=n[a];if(s>=1){s=1}else if(s<=-1){s=-1}n[a]=s;i[a]=s*32767;o+=Math.abs(i[a])}r.total+=i.byteLength;r.param.audioCallback({pcm:i,sum:o,total:r.total,recordId:e})}}));this.param=t}return p(e,[{key:"startRecord",value:function(){var e=f(c().mark((function e(t){return c().wrap((function e(r){while(1)switch(r.prev=r.next){case 0:this.autoCollectAudio=!(t!==null&&t!==void 0&&t.stream);if(!this.startProm){this.startProm=this.dealStartRecord(t)}return r.abrupt("return",this.startProm);case 3:case"end":return r.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"stopRecord",value:function(){var e=f(c().mark((function e(){var t,i,o;return c().wrap((function e(a){while(1)switch(a.prev=a.next){case 0:a.prev=0;(t=this.input)===null||t===void 0||t.disconnect();delete this.input;(i=this.recorder)===null||i===void 0||i.disconnect();delete this.recorder;this.total=0;a.next=8;return(o=this.audioContext)===null||o===void 0?void 0:o.close();case 8:delete this.audioContext;if(this.autoCollectAudio){n.MediaStreamUtil.stopAudioTrack(this.stream)}a.next=15;break;case 12:a.prev=12;a.t0=a["catch"](0);(0,r.getPLogger)().error("stopRecord",a.t0);case 15:case"end":return a.stop()}}),e,this,[[0,12]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"setSinkId",value:function e(t){var r,n;(r=this.audioContext)===null||r===void 0||(n=r.setSinkId)===null||n===void 0||n.call(r,t)}},{key:"dealStartRecord",value:function(){var t=f(c().mark((function t(n){var i,o,a;return c().wrap((function t(s){while(1)switch(s.prev=s.next){case 0:s.prev=0;s.next=3;return this.stopRecord();case 3:this.audioContext=new AudioContext({sampleRate:e.sampleRate});if(!(n!==null&&n!==void 0&&n.stream)){s.next=8;break}this.stream=n.stream;s.next=12;break;case 8:i=n!==null&&n!==void 0&&n.deviceId?{deviceId:{exact:n.deviceId}}:true;s.next=11;return navigator.mediaDevices.getUserMedia({audio:i});case 11:this.stream=s.sent;case 12:if(this.audioContext.createScriptProcessor){(o=this.recorder)===null||o===void 0||o.disconnect();if(this.recorder){this.recorder.onaudioprocess=null}this.recorder=this.audioContext.createScriptProcessor(this.param.bufferSize,1,1);this.recorder.onaudioprocess=this.getOnaudioprocess(Date.now());(a=this.input)===null||a===void 0||a.disconnect();this.input=this.audioContext.createMediaStreamSource(this.stream);this.input.connect(this.recorder).connect(this.audioContext.destination)}s.next=18;break;case 15:s.prev=15;s.t0=s["catch"](0);(0,r.getPLogger)().error("dealStartRecord",s.t0);case 18:delete this.startProm;case 19:case"end":return s.stop()}}),t,this,[[0,15]])})));function n(e){return t.apply(this,arguments)}return n}()}])}(),v(u,"sampleRate",16e3),u),g(s.prototype,"startRecord",[i],Object.getOwnPropertyDescriptor(s.prototype,"startRecord"),s.prototype),g(s.prototype,"stopRecord",[o],Object.getOwnPropertyDescriptor(s.prototype,"stopRecord"),s.prototype),s)}))},9655:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(8553),r(5625),r(4772),r(299)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HttpRequest=void 0;t=o(t);function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=f(e,"string");return"symbol"==d(t)?t:t+""}function f(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){"@babel/helpers - typeof";return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var h=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if((typeof Reflect==="undefined"?"undefined":d(Reflect))==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};var p=new i.Log({module:"HttpRequest"});var v=e.HttpRequest=function(){function e(){s(this,e)}return c(e,null,[{key:"doPost",value:function n(i){return t["default"].post(i.url,i.data,{headers:a({},r.HttpHeaders.AUTH_TOKEN,e.icsToken),baseURL:e.baseUrl})}},{key:"doGet",value:function n(i){return t["default"].get(i.url,{headers:a({},r.HttpHeaders.AUTH_TOKEN,e.icsToken),baseURL:e.baseUrl})}},{key:"setIcsToken",value:function t(r){e.icsToken=r}},{key:"setIcsHost",value:function t(r){e.baseUrl="".concat(r)}}])}();v.icsToken="";v.baseUrl="";h([(0,n.printfDecorator)(p)],v,"doPost",null);h([(0,n.printfDecorator)(p)],v,"doGet",null);h([(0,n.printfDecorator)(p)],v,"setIcsToken",null);h([(0,n.printfDecorator)(p)],v,"setIcsHost",null)}))},9969:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(258),r(2771)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.singleControlDecorator=e.printfDecorator=e.frequentTasksDecoratorFactory=e.customDecorator=e.componentDecorator=void 0;function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return u(e)||s(e)||a(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return c(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=p(e,"string");return"symbol"==n(t)?t:t+""}function p(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v=e.printfDecorator=function e(t){return function(e,r,n){var i;function o(){var e;for(var n=arguments.length,o=new Array(n),a=0;a<n;a++){o[a]=arguments[a]}var s=Date.now();var u=i.apply(this,o);if(u!==null&&u!==void 0&&u.then){return u.then((function(e){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call.apply(n,[t,"printfDecorator async over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[e]));return e}))}t===null||t===void 0||(e=t.debug)===null||e===void 0||e.call.apply(e,[t,"printfDecorator over",r,"use time ".concat(Date.now()-s,"ms")].concat(o,[u]));return u}if(n!==null&&n!==void 0&&n.initializer){return f(f({},n),{},{writable:true,initializer:function e(){var t;i=(t=n.initializer)===null||t===void 0?void 0:t.call(this);return o}})}i=n===null||n===void 0?void 0:n.value;return f(f({},n),{},{writable:true,value:o})}};var m=e.componentDecorator=function e(t){return function(e){var r=e.prototype.render;if(r){e.prototype.render=function(){try{return r.call(this)}catch(r){var n;t===null||t===void 0||(n=t.error)===null||n===void 0||n.call(t,"".concat(e.name," render error"),r);return null}}}if(false){var n,i,o}}};var y=function e(t){var r=t.currResult,n=t.aftMethodDeal,i=t.name;if(typeof n!=="function"){return r}var o=n(r);if(o!==null&&o!==void 0&&o.then){return o.then((function(e){if(e){return r}return Promise.reject(new Error("".concat(i,", aftMethodDeal check failed")))}))}if(o){return r}throw new Error("".concat(i,", aftMethodDeal check failed"))};var g=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal,o=t.fn,a=t.self,s=t.args,u=t.name;var c=function e(){var t=o.apply(a,s);if(t!==null&&t!==void 0&&t.then){return t.then((function(e){return y({currResult:e,aftMethodDeal:n,name:u})}))}return y({currResult:t,aftMethodDeal:n,name:u})};if(typeof r!=="function"){return c()}var l=r.apply(void 0,i(s));if(l!==null&&l!==void 0&&l.then){return l.then((function(e){if(e){return c()}return Promise.reject(new Error("".concat(u,", preMethodDeal check reject error,")+e))}))}if(l){return c()}throw new Error("".concat(u,", preMethodDeal check throw error,")+l)};var b=e.customDecorator=function e(t){var r=t.preMethodDeal,n=t.aftMethodDeal;return function(e,t,i){var o;function a(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++){i[a]=arguments[a]}return g({preMethodDeal:r,aftMethodDeal:n,fn:o,self:this,args:i,name:t})}if(i!==null&&i!==void 0&&i.initializer){return f(f({},i),{},{writable:true,initializer:function e(){var t;o=(t=i.initializer)===null||t===void 0?void 0:t.call(this);return a}})}o=i===null||i===void 0?void 0:i.value;return f(f({},i),{},{writable:true,value:a})}};var _=e.frequentTasksDecoratorFactory=function e(t){var r=new Map;return function(e){return function(n,i,o){var a,s;var u;function c(){if(r.get(e)){var n;t===null||t===void 0||(n=t.debug)===null||n===void 0||n.call(t,"frequentTasksDecorator waitting last call:",e);return r.get(e)}for(var i=arguments.length,o=new Array(i),a=0;a<i;a++){o[a]=arguments[a]}var s=u.apply(this,o);if(s!==null&&s!==void 0&&s.then){r.set(e,s);return s.then((function(t){r["delete"](e);return t}))}r["delete"](e);return s}t===null||t===void 0||(a=t.debug)===null||a===void 0||a.call(t,"frequentTasksDecorator","".concat(n===null||n===void 0||(s=n.constructor)===null||s===void 0?void 0:s.name,".prototype.").concat(i),o);if(o!==null&&o!==void 0&&o.initializer){return f(f({},o),{},{writable:true,initializer:function e(){var t;u=(t=o.initializer)===null||t===void 0?void 0:t.call(this);return c}})}u=o===null||o===void 0?void 0:o.value;return f(f({},o),{},{writable:true,value:c})}}};var S=e.singleControlDecorator=function e(t){return function(e,r,n){var i;var o=false;function a(e){if(o){return t(r,e)}var n=i.call(this,e);if(n!==null&&n!==void 0&&n.then){o=true;return n.then((function(e){o=false;return e}))}o=false;return n}if(n!==null&&n!==void 0&&n.initializer){return f(f({},n),{},{writable:true,initializer:function e(){var t;i=(t=n.initializer)===null||t===void 0?void 0:t.call(this);return a}})}i=n===null||n===void 0?void 0:n.value;return f(f({},n),{},{writable:true,value:a})}}}))}};var t={};function r(n){var i=t[n];if(i!==undefined){return i.exports}var o=t[n]={exports:{}};e[n].call(o.exports,o,o.exports,r);return o.exports}(()=>{r.g=function(){if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}}()})();var n=r(4317);return n})()))},96e3:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(46942),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SoundColumn=void 0;t=n(t);function n(e){return e&&e.__esModule?e:{default:e}}const i=({columnCount:e,currColumnValue:n,className:i})=>(0,r.jsx)("div",{className:(0,t.default)("meta-sound-column",i),children:"0".repeat(e).split("").map(((e,i)=>(0,r.jsx)("div",{className:(0,t.default)("sound-column-item",{used:n>i})},i)))});e.SoundColumn=i}))},96069:(e,t,r)=>{"use strict";var n=r(46518);var i=r(79504);var o=r(63463);var a=r(39297);var s=r(60533).start;var u=r(47452);var c=Array;var l=RegExp.escape;var f=i("".charAt);var d=i("".charCodeAt);var h=i(1.1.toString);var p=i([].join);var v=/^[0-9a-z]/i;var m=/^[$()*+./?[\\\]^{|}]/;var y=RegExp("^[!\"#%&',\\-:;<=>@`~"+u+"]");var g=i(v.exec);var b={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"};var _=function(e){var t=h(d(e,0),16);return t.length<3?"\\x"+s(t,2,"0"):"\\u"+s(t,4,"0")};var S=!l||l("ab")!=="\\x61b";n({target:"RegExp",stat:true,forced:S},{escape:function e(t){o(t);var r=t.length;var n=c(r);for(var i=0;i<r;i++){var s=f(t,i);if(i===0&&g(v,s)){n[i]=_(s)}else if(a(b,s)){n[i]="\\"+b[s]}else if(g(m,s)){n[i]="\\"+s}else if(g(y,s)){n[i]=_(s)}else{var u=d(s,0);if((u&63488)!==55296)n[i]=s;else if(u>=56320||i+1>=r||(d(t,i+1)&64512)!==56320)n[i]=_(s);else{n[i]=s;n[++i]=f(t,i)}}}return p(n,"")}})},96167:(e,t,r)=>{"use strict";var n=r(46518);var i=r(69565);var o=r(79306);var a=r(36043);var s=r(1103);var u=r(72652);var c=r(90537);n({target:"Promise",stat:true,forced:c},{allSettled:function e(t){var r=this;var n=a.f(r);var c=n.resolve;var l=n.reject;var f=s((function(){var e=o(r.resolve);var n=[];var a=0;var s=1;u(t,(function(t){var o=a++;var u=false;s++;i(e,r,t).then((function(e){if(u)return;u=true;n[o]={status:"fulfilled",value:e};--s||c(n)}),(function(e){if(u)return;u=true;n[o]={status:"rejected",reason:e};--s||c(n)}))}));--s||c(n)}));if(f.error)l(f.value);return n.promise}})},96298:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(80754),r(84636),r(39506),r(57165))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var o=[];var a=[];var s=[];var u=i.Rabbit=n.extend({_doReset:function(){var e=this._key.words;var t=this.cfg.iv;for(var r=0;r<4;r++){e[r]=(e[r]<<8|e[r]>>>24)&16711935|(e[r]<<24|e[r]>>>8)&4278255360}var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];var i=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var r=0;r<4;r++){c.call(this)}for(var r=0;r<8;r++){i[r]^=n[r+4&7]}if(t){var o=t.words;var a=o[0];var s=o[1];var u=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var l=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;var f=u>>>16|l&4294901760;var d=l<<16|u&65535;i[0]^=u;i[1]^=f;i[2]^=l;i[3]^=d;i[4]^=u;i[5]^=f;i[6]^=l;i[7]^=d;for(var r=0;r<4;r++){c.call(this)}}},_doProcessBlock:function(e,t){var r=this._X;c.call(this);o[0]=r[0]^r[5]>>>16^r[3]<<16;o[1]=r[2]^r[7]>>>16^r[5]<<16;o[2]=r[4]^r[1]>>>16^r[7]<<16;o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++){o[n]=(o[n]<<8|o[n]>>>24)&16711935|(o[n]<<24|o[n]>>>8)&4278255360;e[t+n]^=o[n]}},blockSize:128/32,ivSize:64/32});function c(){var e=this._X;var t=this._C;for(var r=0;r<8;r++){a[r]=t[r]}t[0]=t[0]+1295307597+this._b|0;t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0;t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0;t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0;t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0;t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0;t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0;t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0;this._b=t[7]>>>0<a[7]>>>0?1:0;for(var r=0;r<8;r++){var n=e[r]+t[r];var i=n&65535;var o=n>>>16;var u=((i*i>>>17)+i*o>>>15)+o*o;var c=((n&4294901760)*n|0)+((n&65535)*n|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0;e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0;e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0;e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0;e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0;e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0;e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0;e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(u)})();return e.Rabbit}))},96319:(e,t,r)=>{"use strict";var n=r(28551);var i=r(9539);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},96395:e=>{"use strict";e.exports=false},96540:(e,t,r)=>{"use strict";if(true){e.exports=r(15287)}else{}},96801:(e,t,r)=>{"use strict";var n=r(43724);var i=r(48686);var o=r(24913);var a=r(28551);var s=r(25397);var u=r(71072);t.f=n&&!i?Object.defineProperties:function e(t,r){a(t);var n=s(r);var i=u(r);var c=i.length;var l=0;var f;while(c>l)o.f(t,f=i[l++],n[f]);return t}},96837:e=>{"use strict";var t=TypeError;var r=9007199254740991;e.exports=function(e){if(e>r)throw t("Maximum allowed index exceeded");return e}},96939:function(e,t,r){(function(n,i,o){if(true){e.exports=t=i(r(19021),r(57165))}else{}})(this,(function(e){e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend();var r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=this._iv;var o=this._counter;if(i){o=this._counter=i.slice(0);this._iv=undefined}var a=o.slice(0);r.encryptBlock(a,0);o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++){e[t+s]^=a[s]}}});t.Decryptor=r;return t}();return e.mode.CTR}))},97040:(e,t,r)=>{"use strict";var n=r(43724);var i=r(24913);var o=r(6980);e.exports=function(e,t,r){if(n)i.f(e,t,o(0,r));else e[t]=r}},97080:(e,t,r)=>{"use strict";var n=r(94402).has;e.exports=function(e){n(e);return e}},97239:function(e,t,r){var n,i,o;(function(a,s){if(true){!(i=[t,r(28802),r(96540),r(44772),r(74848)],n=s,o=typeof n==="function"?n.apply(t,i):n,o!==undefined&&(e.exports=o))}else{var u}})(typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:this,(function(e,t,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=void 0;function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t=d(t),c(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function c(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let g=function(e){function t(e){var r;o(this,t);r=u(this,t,[e]);v(r,"destroy",false);v(r,"_btnOnClick",(e=>{(0,n.reactStopPropagation)(e);const{onClick:t,disabled:i,loading:o}=r.props;const{ing:a}=r.state;if(t&&!(i||o||a)){r.setState({ing:true},(()=>{const e=t();if(e&&e.then){e.then((()=>{r._setIng(false)}))}else{r._setIng(false)}}))}}));v(r,"_setIng",(e=>{if(r.destroy){return}r.setState({ing:e})}));r.state={ing:false};r.destroy=false;return r}h(t,e);return s(t,[{key:"componentWillUnmount",value:function e(){this.destroy=true}},{key:"render",value:function e(){const{type:t,color:r,size:n,title:o,disabled:a,children:s,loading:u,className:c,dataTestid:l,style:f,dataFunc:d}=this.props;let h=`meta-button ${t} ${r} ${n} ${t} ${c}`;const{ing:p}=this.state;if(u){h+=" loading"}if(p||a){h+=" disabled"}return(0,i.jsx)("div",{className:h,onClick:this._btnOnClick,"data-function":d,title:o,"data-testid":l,style:f,children:(0,i.jsx)("div",{className:"btn-text ",children:s})})}}])}(r.Component);v(g,"defaultProps",{type:t.typeMap.FILL,color:t.colorMap.BLUE,size:t.sizeMap.NORMAL,title:"",className:"",loading:false,disabled:false});v(g,"typeMap",t.typeMap);v(g,"sizeMap",t.sizeMap);v(g,"colorMap",t.colorMap);var b=e.default=g}))},97518:(e,t,r)=>{const n=r(49953);const i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function e(t,r){switch(r){case n.L:return i[(t-1)*4+0];case n.M:return i[(t-1)*4+1];case n.Q:return i[(t-1)*4+2];case n.H:return i[(t-1)*4+3];default:return undefined}};t.getTotalCodewordsCount=function e(t,r){switch(r){case n.L:return o[(t-1)*4+0];case n.M:return o[(t-1)*4+1];case n.Q:return o[(t-1)*4+2];case n.H:return o[(t-1)*4+3];default:return undefined}}},97751:(e,t,r)=>{"use strict";var n=r(44576);var i=r(94901);var o=function(e){return i(e)?e:undefined};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},97812:(e,t,r)=>{"use strict";var n=r(46518);var i=r(39297);var o=r(10757);var a=r(16823);var s=r(25745);var u=r(91296);var c=s("symbol-to-string-registry");n({target:"Symbol",stat:true,forced:!u},{keyFor:function e(t){if(!o(t))throw new TypeError(a(t)+" is not a symbol");if(i(c,t))return c[t]}})},97916:(e,t,r)=>{"use strict";var n=r(76080);var i=r(69565);var o=r(48981);var a=r(96319);var s=r(44209);var u=r(33517);var c=r(26198);var l=r(97040);var f=r(70081);var d=r(50851);var h=Array;e.exports=function e(t){var r=o(t);var p=u(this);var v=arguments.length;var m=v>1?arguments[1]:undefined;var y=m!==undefined;if(y)m=n(m,v>2?arguments[2]:undefined);var g=d(r);var b=0;var _,S,E,w,T,I;if(g&&!(this===h&&s(g))){S=p?new this:[];w=f(r,g);T=w.next;for(;!(E=i(T,w)).done;b++){I=y?a(w,m,[E.value,b],true):E.value;l(S,b,I)}}else{_=c(r);S=p?new this(_):h(_);for(;_>b;b++){I=y?m(r[b],b):r[b];l(S,b,I)}}S.length=b;return S}},98020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WebsocketState=t.WebSocketCodeMap=t.WebSocketCode=t.WebSocketBase=void 0;var n=r(44772);var i=r(63226);var o=r(44104);var a=r(21013);var s=r(55798);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const p=new o.Log({module:"HwICS.WebsocketBase"});var v;(function(e){e[e["WS_CODE_CLOSE"]=4001]="WS_CODE_CLOSE"})(v||(t.WebSocketCode=v={}));var m;(function(e){e["INIT"]="INIT";e["CONNECTING"]="CONNECTING";e["CONNECTED"]="CONNECTED";e["CLOSE"]="CLOSE";e["ERROR"]="ERROR"})(m||(t.WebsocketState=m={}));const y=t.WebSocketCodeMap={[v.WS_CODE_CLOSE]:"client close"};let g=t.WebSocketBase=function(){function e(){u(this,e);this._wsId=(0,n.getClientId)().toString();this._state=m.INIT;this.receiveMessage=this.receiveMessage.bind(this)}return l(e,[{key:"infoWidthId",value:function e(...t){p.info(t[0],`${this._wsId}-`,...t)}},{key:"errorWidthId",value:function e(...t){p.error(t[0],`${this._wsId}-`,...t)}},{key:"connect",value:function e({url:t,onclose:r=()=>{},onerror:o=()=>{},onopen:s=()=>{},onmessage:u=()=>{}}){if(this._webSocket){this.infoWidthId("WebSocket has new");return this._connectProm}const c=(0,n.getClientId)().toString();a.UserTrack.addUserTrack({arg1:i.Arg1Map.WEBSOCKET,arg2:"initSocket start",eventKey:c,args:{message:JSON.stringify([this._wsId])}});let l=null;this._connectProm=Promise.race([new Promise(((e,n)=>{try{this.infoWidthId("connect, pre");this._initResolve=e;this.setState(m.CONNECTING);if(!t){this.setState(m.ERROR);const e=new Error("url is empty");o(e);n(e);return}if(!t.startsWith("ws://")&&!t.startsWith("wss://")){t="wss://"+t}this._webSocket=new WebSocket(t);this._webSocket.onclose=e=>{this.setState(m.CLOSE);this.infoWidthId("onclose",e===null||e===void 0?void 0:e.code);this.clear("onclose");r(e);n(e)};this._webSocket.onerror=e=>{this.setState(m.ERROR);this.infoWidthId("onerror",e);n(e);this.clear("onerror");o(e)};this._webSocket.onopen=()=>{this.setState(m.CONNECTED);this.infoWidthId("onopen");a.UserTrack.addUserTrack({arg1:i.Arg1Map.WEBSOCKET,arg2:"initSocket end",eventKey:c,args:{message:JSON.stringify([this._wsId])}});s()};this._webSocket.onmessage=this.receiveMessage;this._onmessage=u}catch(e){this.setState(m.CLOSE);this.errorWidthId("connect",e);o(e);n(e)}})),new Promise(((e,t)=>{l=setTimeout((()=>{this.errorWidthId("timeout");this.close("timeout");o("timeout");t("timeout")}),1e4)}))]).finally((()=>{this.infoWidthId("finally");if(l){clearTimeout(l);l=null}}));return this._connectProm}},{key:"getWS",value:function e(){return this._webSocket}},{key:"setState",value:function e(t){this.infoWidthId("setState",t);this._state=t}},{key:"getState",value:function e(){return this._state}},{key:"isConnectEnd",value:function e(){return[m.CLOSE,m.ERROR,m.CONNECTED].includes(this._state)}},{key:"clear",value:function e(t){this.infoWidthId("clear",t);this.removeEventListener(t);delete this._connectProm;delete this._webSocket}},{key:"close",value:function e(t){t+=",close";this.infoWidthId("close",t,this.isOpen());if(this.isOpen()){var r;(r=this._webSocket)===null||r===void 0?void 0:r.close(v.WS_CODE_CLOSE,y[v.WS_CODE_CLOSE])}this.clear(t)}},{key:"removeEventListener",value:function e(t){this.infoWidthId("removeEvent",t,!!this._webSocket);if(this._webSocket){this._webSocket.onclose=()=>{};this._webSocket.onerror=()=>{};this._webSocket.onopen=()=>{}}this._onmessage=()=>{}}},{key:"getMapId",value:function e(t,r){return`${t}-${r}`}},{key:"isOpen",value:function e(){var t;return((t=this._webSocket)===null||t===void 0?void 0:t.readyState)===s.ReadyState.OPEN}},{key:"receiveMessage",value:function e(t){if((0,n.formatType)(t.data)===n.formatType.STRING){var r;const e=JSON.parse(t.data);(r=this._onmessage)===null||r===void 0?void 0:r.call(this,e)}else{var i;(i=this._onmessage)===null||i===void 0?void 0:i.call(this,t.data)}}}])}();h([(0,n.printfDecorator)(p)],g.prototype,"connect",null);h([(0,n.printfDecorator)(p)],g.prototype,"clear",null);h([(0,n.printfDecorator)(p)],g.prototype,"close",null);h([(0,n.printfDecorator)(p)],g.prototype,"removeEventListener",null)},98137:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>Ve});var n=r(64467);var i=r(89379);var o=r(80296);var a=r(82284);var s=r(46942);var u=r.n(s);var c=r(66588);var l=r(80775);var f=r(96540);var d=null&&["children"];var h=f.createContext({});function p(e){var t=e.children,r=_objectWithoutProperties(e,d);return React.createElement(h.Provider,{value:r},t)}var v=r(23029);var m=r(92901);var y=r(15361);var g=r(52962);var b=function(e){(0,y.A)(r,e);var t=(0,g.A)(r);function r(){(0,v.A)(this,r);return t.apply(this,arguments)}(0,m.A)(r,[{key:"render",value:function e(){return this.props.children}}]);return r}(f.Component);const _=b;var S=r(26956);var E=r(30981);function w(e){var t=f.useRef(false);var r=f.useState(e),n=(0,o.A)(r,2),i=n[0],a=n[1];f.useEffect((function(){t.current=false;return function(){t.current=true}}),[]);function s(e,r){if(r&&t.current){return}a(e)}return[i,s]}function T(e){return e!==undefined}function I(e,t){var r=t||{},n=r.defaultValue,i=r.value,o=r.onChange,a=r.postState;var s=useState((function(){if(T(i)){return i}else if(T(n)){return typeof n==="function"?n():n}else{return typeof e==="function"?e():e}})),u=_slicedToArray(s,2),c=u[0],l=u[1];var f=i!==undefined?i:c;var d=a?a(f):f;var h=useEvent(o);var p=useState([f]),v=_slicedToArray(p,2),m=v[0],y=v[1];useLayoutUpdateEffect((function(){var e=m[0];if(c!==e){h(c,e)}}),[m]);useLayoutUpdateEffect((function(){if(!T(i)){l(i)}}),[i]);var g=useEvent((function(e,t){l(e,t);y([f],t)}));return[d,g]}function R(e,t,r,n){if(!t.length){return r}var i=_toArray(t),o=i[0],a=i.slice(1);var s;if(!e&&typeof o==="number"){s=[]}else if(Array.isArray(e)){s=_toConsumableArray(e)}else{s=_objectSpread({},e)}if(n&&r===undefined&&a.length===1){delete s[o][a[0]]}else{s[o]=R(s[o],a,r,n)}return s}function C(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(t.length&&n&&r===undefined&&!get(e,t.slice(0,-1))){return e}return R(e,t,r,n)}function k(e){return _typeof(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function A(e){return Array.isArray(e)?[]:{}}var O=typeof Reflect==="undefined"?Object.keys:Reflect.ownKeys;function P(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=A(t[0]);t.forEach((function(e){function t(r,i){var o=new Set(i);var a=get(e,r);var s=Array.isArray(a);if(s||k(a)){if(!o.has(a)){o.add(a);var u=get(n,r);if(s){n=C(n,r,[])}else if(!u||_typeof(u)!=="object"){n=C(n,r,A(a))}O(a).forEach((function(e){t([].concat(_toConsumableArray(r),[e]),o)}))}}else{n=C(n,r,a)}}t([])}));return n}var x=r(68210);function L(e){var t=f.useReducer((function(e){return e+1}),0),r=(0,o.A)(t,2),n=r[1];var i=f.useRef(e);var a=(0,S.A)((function(){return i.current}));var s=(0,S.A)((function(e){i.current=typeof e==="function"?e(i.current):e;n()}));return[a,s]}var M="none";var N="appear";var D="enter";var j="leave";var U="none";var V="prepare";var W="start";var B="active";var G="end";var Z="prepared";var F=r(20998);function H(e,t){var r={};r[e.toLowerCase()]=t.toLowerCase();r["Webkit".concat(e)]="webkit".concat(t);r["Moz".concat(e)]="moz".concat(t);r["ms".concat(e)]="MS".concat(t);r["O".concat(e)]="o".concat(t.toLowerCase());return r}function X(e,t){var r={animationend:H("Animation","AnimationEnd"),transitionend:H("Transition","TransitionEnd")};if(e){if(!("AnimationEvent"in t)){delete r.animationend.animation}if(!("TransitionEvent"in t)){delete r.transitionend.transition}}return r}var Y=X((0,F.A)(),typeof window!=="undefined"?window:{});var K={};if((0,F.A)()){var z=document.createElement("div");K=z.style}var J={};function Q(e){if(J[e]){return J[e]}var t=Y[e];if(t){var r=Object.keys(t);var n=r.length;for(var i=0;i<n;i+=1){var o=r[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in K){J[e]=t[o];return J[e]}}}return""}var q=Q("animationend");var $=Q("transitionend");var ee=!!(q&&$);var te=q||"animationend";var re=$||"transitionend";function ne(e,t){if(!e)return null;if((0,a.A)(e)==="object"){var r=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[r]}return"".concat(e,"-").concat(t)}const ie=function(e){var t=(0,f.useRef)();function r(t){if(t){t.removeEventListener(re,e);t.removeEventListener(te,e)}}function n(n){if(t.current&&t.current!==n){r(t.current)}if(n&&n!==t.current){n.addEventListener(re,e);n.addEventListener(te,e);t.current=n}}f.useEffect((function(){return function(){r(t.current)}}),[]);return[n,r]};var oe=(0,F.A)()?f.useLayoutEffect:f.useEffect;const ae=oe;var se=function e(t){return+setTimeout(t,16)};var ue=function e(t){return clearTimeout(t)};if(typeof window!=="undefined"&&"requestAnimationFrame"in window){se=function e(t){return window.requestAnimationFrame(t)};ue=function e(t){return window.cancelAnimationFrame(t)}}var ce=0;var le=new Map;function fe(e){le.delete(e)}var de=function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;ce+=1;var n=ce;function i(e){if(e===0){fe(n);t()}else{var r=se((function(){i(e-1)}));le.set(n,r)}}i(r);return n};de.cancel=function(e){var t=le.get(e);fe(e);return ue(t)};if(false){}const he=de;const pe=function(){var e=f.useRef(null);function t(){he.cancel(e.current)}function r(n){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;t();var o=he((function(){if(i<=1){n({isCanceled:function t(){return o!==e.current}})}else{r(n,i-1)}}));e.current=o}f.useEffect((function(){return function(){t()}}),[]);return[r,t]};var ve=[V,W,B,G];var me=[V,Z];var ye=false;var ge=true;function be(e){return e===B||e===G}const _e=function(e,t,r){var n=w(U),i=(0,o.A)(n,2),a=i[0],s=i[1];var u=pe(),c=(0,o.A)(u,2),l=c[0],d=c[1];function h(){s(V,true)}var p=t?me:ve;ae((function(){if(a!==U&&a!==G){var e=p.indexOf(a);var t=p[e+1];var n=r(a);if(n===ye){s(t,true)}else if(t){l((function(e){function r(){if(e.isCanceled())return;s(t,true)}if(n===true){r()}else{Promise.resolve(n).then(r)}}))}}}),[e,a]);f.useEffect((function(){return function(){d()}}),[]);return[h,a]};function Se(e,t,r,a){var s=a.motionEnter,u=s===void 0?true:s,c=a.motionAppear,l=c===void 0?true:c,d=a.motionLeave,h=d===void 0?true:d,p=a.motionDeadline,v=a.motionLeaveImmediately,m=a.onAppearPrepare,y=a.onEnterPrepare,g=a.onLeavePrepare,b=a.onAppearStart,_=a.onEnterStart,E=a.onLeaveStart,T=a.onAppearActive,I=a.onEnterActive,R=a.onLeaveActive,C=a.onAppearEnd,k=a.onEnterEnd,A=a.onLeaveEnd,O=a.onVisibleChanged;var P=w(),x=(0,o.A)(P,2),U=x[0],G=x[1];var F=L(M),H=(0,o.A)(F,2),X=H[0],Y=H[1];var K=w(null),z=(0,o.A)(K,2),J=z[0],Q=z[1];var q=X();var $=(0,f.useRef)(false);var ee=(0,f.useRef)(null);function te(){return r()}var re=(0,f.useRef)(false);function ne(){Y(M);Q(null,true)}var oe=(0,S.A)((function(e){var t=X();if(t===M){return}var r=te();if(e&&!e.deadline&&e.target!==r){return}var n=re.current;var i;if(t===N&&n){i=C===null||C===void 0?void 0:C(r,e)}else if(t===D&&n){i=k===null||k===void 0?void 0:k(r,e)}else if(t===j&&n){i=A===null||A===void 0?void 0:A(r,e)}if(n&&i!==false){ne()}}));var se=ie(oe),ue=(0,o.A)(se,1),ce=ue[0];var le=function e(t){switch(t){case N:return(0,n.A)((0,n.A)((0,n.A)({},V,m),W,b),B,T);case D:return(0,n.A)((0,n.A)((0,n.A)({},V,y),W,_),B,I);case j:return(0,n.A)((0,n.A)((0,n.A)({},V,g),W,E),B,R);default:return{}}};var fe=f.useMemo((function(){return le(q)}),[q]);var de=_e(q,!e,(function(e){if(e===V){var t=fe[V];if(!t){return ye}return t(te())}if(ve in fe){var r;Q(((r=fe[ve])===null||r===void 0?void 0:r.call(fe,te(),null))||null)}if(ve===B&&q!==M){ce(te());if(p>0){clearTimeout(ee.current);ee.current=setTimeout((function(){oe({deadline:true})}),p)}}if(ve===Z){ne()}return ge})),he=(0,o.A)(de,2),pe=he[0],ve=he[1];var me=be(ve);re.current=me;var Se=(0,f.useRef)(null);ae((function(){if($.current&&Se.current===t){return}G(t);var r=$.current;$.current=true;var n;if(!r&&t&&l){n=N}if(r&&t&&u){n=D}if(r&&!t&&h||!r&&v&&!t&&h){n=j}var i=le(n);if(n&&(e||i[V])){Y(n);pe()}else{Y(M)}Se.current=t}),[t]);(0,f.useEffect)((function(){if(q===N&&!l||q===D&&!u||q===j&&!h){Y(M)}}),[l,u,h]);(0,f.useEffect)((function(){return function(){$.current=false;clearTimeout(ee.current)}}),[]);var Ee=f.useRef(false);(0,f.useEffect)((function(){if(U){Ee.current=true}if(U!==undefined&&q===M){if(Ee.current||U){O===null||O===void 0||O(U)}Ee.current=true}}),[U,q]);var we=J;if(fe[V]&&ve===W){we=(0,i.A)({transition:"none"},we)}return[q,ve,we,U!==null&&U!==void 0?U:t]}function Ee(e){var t=e;if((0,a.A)(e)==="object"){t=e.transitionSupport}function r(e,r){return!!(e.motionName&&t&&r!==false)}var s=f.forwardRef((function(e,t){var a=e.visible,s=a===void 0?true:a,d=e.removeOnLeave,p=d===void 0?true:d,v=e.forceRender,m=e.children,y=e.motionName,g=e.leavedClassName,b=e.eventProps;var S=f.useContext(h),E=S.motion;var w=r(e,E);var T=(0,f.useRef)();var I=(0,f.useRef)();function R(){try{return T.current instanceof HTMLElement?T.current:(0,c.Ay)(I.current)}catch(e){return null}}var C=Se(w,s,R,e),k=(0,o.A)(C,4),A=k[0],O=k[1],P=k[2],x=k[3];var L=f.useRef(x);if(x){L.current=true}var N=f.useCallback((function(e){T.current=e;(0,l.Xf)(t,e)}),[t]);var D;var j=(0,i.A)((0,i.A)({},b),{},{visible:s});if(!m){D=null}else if(A===M){if(x){D=m((0,i.A)({},j),N)}else if(!p&&L.current&&g){D=m((0,i.A)((0,i.A)({},j),{},{className:g}),N)}else if(v||!p&&!g){D=m((0,i.A)((0,i.A)({},j),{},{style:{display:"none"}}),N)}else{D=null}}else{var U;if(O===V){U="prepare"}else if(be(O)){U="active"}else if(O===W){U="start"}var B=ne(y,"".concat(A,"-").concat(U));D=m((0,i.A)((0,i.A)({},j),{},{className:u()(ne(y,A),(0,n.A)((0,n.A)({},B,B&&U),y,typeof y==="string")),style:P}),N)}if(f.isValidElement(D)&&(0,l.f3)(D)){var G=(0,l.A9)(D);if(!G){D=f.cloneElement(D,{ref:N})}}return f.createElement(_,{ref:I},D)}));s.displayName="CSSMotion";return s}const we=Ee(ee);var Te=r(58168);var Ie=r(80045);var Re=r(9417);var Ce="add";var ke="keep";var Ae="remove";var Oe="removed";function Pe(e){var t;if(e&&(0,a.A)(e)==="object"&&"key"in e){t=e}else{t={key:e}}return(0,i.A)((0,i.A)({},t),{},{key:String(t.key)})}function xe(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return e.map(Pe)}function Le(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var r=[];var n=0;var o=t.length;var a=xe(e);var s=xe(t);a.forEach((function(e){var t=false;for(var a=n;a<o;a+=1){var u=s[a];if(u.key===e.key){if(n<a){r=r.concat(s.slice(n,a).map((function(e){return(0,i.A)((0,i.A)({},e),{},{status:Ce})})));n=a}r.push((0,i.A)((0,i.A)({},u),{},{status:ke}));n+=1;t=true;break}}if(!t){r.push((0,i.A)((0,i.A)({},e),{},{status:Ae}))}}));if(n<o){r=r.concat(s.slice(n).map((function(e){return(0,i.A)((0,i.A)({},e),{},{status:Ce})})))}var u={};r.forEach((function(e){var t=e.key;u[t]=(u[t]||0)+1}));var c=Object.keys(u).filter((function(e){return u[e]>1}));c.forEach((function(e){r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||n!==Ae}));r.forEach((function(t){if(t.key===e){t.status=ke}}))}));return r}var Me=["component","children","onVisibleChanged","onAllRemoved"],Ne=["status"];var De=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function je(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:we;var r=function(e){(0,y.A)(o,e);var r=(0,g.A)(o);function o(){var e;(0,v.A)(this,o);for(var t=arguments.length,a=new Array(t),s=0;s<t;s++){a[s]=arguments[s]}e=r.call.apply(r,[this].concat(a));(0,n.A)((0,Re.A)(e),"state",{keyEntities:[]});(0,n.A)((0,Re.A)(e),"removeKey",(function(t){e.setState((function(e){var r=e.keyEntities.map((function(e){if(e.key!==t)return e;return(0,i.A)((0,i.A)({},e),{},{status:Oe})}));return{keyEntities:r}}),(function(){var t=e.state.keyEntities;var r=t.filter((function(e){var t=e.status;return t!==Oe})).length;if(r===0&&e.props.onAllRemoved){e.props.onAllRemoved()}}))}));return e}(0,m.A)(o,[{key:"render",value:function e(){var r=this;var n=this.state.keyEntities;var o=this.props,a=o.component,s=o.children,u=o.onVisibleChanged,c=o.onAllRemoved,l=(0,Ie.A)(o,Me);var d=a||f.Fragment;var h={};De.forEach((function(e){h[e]=l[e];delete l[e]}));delete l.keys;return f.createElement(d,l,n.map((function(e,n){var o=e.status,a=(0,Ie.A)(e,Ne);var c=o===Ce||o===ke;return f.createElement(t,(0,Te.A)({},h,{key:a.key,visible:c,eventProps:a,onVisibleChanged:function e(t){u===null||u===void 0||u(t,{key:a.key});if(!t){r.removeKey(a.key)}}}),(function(e,t){return s((0,i.A)((0,i.A)({},e),{},{index:n}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function e(t,r){var n=t.keys;var i=r.keyEntities;var o=xe(n);var a=Le(i,o);return{keyEntities:a.filter((function(e){var t=i.find((function(t){var r=t.key;return e.key===r}));if(t&&t.status===Oe&&e.status===Ae){return false}return true}))}}}]);return o}(f.Component);(0,n.A)(r,"defaultProps",{component:"div"});return r}const Ue=je(ee);const Ve=we},98406:(e,t,r)=>{"use strict";r(23792);r(27337);var n=r(46518);var i=r(44576);var o=r(93389);var a=r(97751);var s=r(69565);var u=r(79504);var c=r(43724);var l=r(67416);var f=r(36840);var d=r(62106);var h=r(56279);var p=r(10687);var v=r(33994);var m=r(91181);var y=r(90679);var g=r(94901);var b=r(39297);var _=r(76080);var S=r(36955);var E=r(28551);var w=r(20034);var T=r(655);var I=r(2360);var R=r(6980);var C=r(70081);var k=r(50851);var A=r(62529);var O=r(22812);var P=r(78227);var x=r(74488);var L=P("iterator");var M="URLSearchParams";var N=M+"Iterator";var D=m.set;var j=m.getterFor(M);var U=m.getterFor(N);var V=o("fetch");var W=o("Request");var B=o("Headers");var G=W&&W.prototype;var Z=B&&B.prototype;var F=i.TypeError;var H=i.encodeURIComponent;var X=String.fromCharCode;var Y=a("String","fromCodePoint");var K=parseInt;var z=u("".charAt);var J=u([].join);var Q=u([].push);var q=u("".replace);var $=u([].shift);var ee=u([].splice);var te=u("".split);var re=u("".slice);var ne=u(/./.exec);var ie=/\+/g;var oe="<22>";var ae=/^[0-9a-f]+$/i;var se=function(e,t){var r=re(e,t,t+2);if(!ne(ae,r))return NaN;return K(r,16)};var ue=function(e){var t=0;for(var r=128;r>0&&(e&r)!==0;r>>=1){t++}return t};var ce=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63;break}return t>1114111?null:t};var le=function(e){e=q(e,ie," ");var t=e.length;var r="";var n=0;while(n<t){var i=z(e,n);if(i==="%"){if(z(e,n+1)==="%"||n+3>t){r+="%";n++;continue}var o=se(e,n+1);if(o!==o){r+=i;n++;continue}n+=2;var a=ue(o);if(a===0){i=X(o)}else{if(a===1||a>4){r+=oe;n++;continue}var s=[o];var u=1;while(u<a){n++;if(n+3>t||z(e,n)!=="%")break;var c=se(e,n+1);if(c!==c){n+=3;break}if(c>191||c<128)break;Q(s,c);n+=2;u++}if(s.length!==a){r+=oe;continue}var l=ce(s);if(l===null){r+=oe}else{i=Y(l)}}}r+=i;n++}return r};var fe=/[!'()~]|%20/g;var de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};var he=function(e){return de[e]};var pe=function(e){return q(H(e),fe,he)};var ve=v((function e(t,r){D(this,{type:N,target:j(t).entries,index:0,kind:r})}),M,(function e(){var t=U(this);var r=t.target;var n=t.index++;if(!r||n>=r.length){t.target=null;return A(undefined,true)}var i=r[n];switch(t.kind){case"keys":return A(i.key,false);case"values":return A(i.value,false)}return A([i.key,i.value],false)}),true);var me=function(e){this.entries=[];this.url=null;if(e!==undefined){if(w(e))this.parseObject(e);else this.parseQuery(typeof e=="string"?z(e,0)==="?"?re(e,1):e:T(e))}};me.prototype={type:M,bindURL:function(e){this.url=e;this.update()},parseObject:function(e){var t=this.entries;var r=k(e);var n,i,o,a,u,c,l;if(r){n=C(e,r);i=n.next;while(!(o=s(i,n)).done){a=C(E(o.value));u=a.next;if((c=s(u,a)).done||(l=s(u,a)).done||!s(u,a).done)throw new F("Expected sequence with length 2");Q(t,{key:T(c.value),value:T(l.value)})}}else for(var f in e)if(b(e,f)){Q(t,{key:f,value:T(e[f])})}},parseQuery:function(e){if(e){var t=this.entries;var r=te(e,"&");var n=0;var i,o;while(n<r.length){i=r[n++];if(i.length){o=te(i,"=");Q(t,{key:le($(o)),value:le(J(o,"="))})}}}},serialize:function(){var e=this.entries;var t=[];var r=0;var n;while(r<e.length){n=e[r++];Q(t,pe(n.key)+"="+pe(n.value))}return J(t,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){if(this.url)this.url.update()}};var ye=function e(){y(this,ge);var t=arguments.length>0?arguments[0]:undefined;var r=D(this,new me(t));if(!c)this.size=r.entries.length};var ge=ye.prototype;h(ge,{append:function e(t,r){var n=j(this);O(arguments.length,2);Q(n.entries,{key:T(t),value:T(r)});if(!c)this.length++;n.updateURL()},delete:function(e){var t=j(this);var r=O(arguments.length,1);var n=t.entries;var i=T(e);var o=r<2?undefined:arguments[1];var a=o===undefined?o:T(o);var s=0;while(s<n.length){var u=n[s];if(u.key===i&&(a===undefined||u.value===a)){ee(n,s,1);if(a!==undefined)break}else s++}if(!c)this.size=n.length;t.updateURL()},get:function e(t){var r=j(this).entries;O(arguments.length,1);var n=T(t);var i=0;for(;i<r.length;i++){if(r[i].key===n)return r[i].value}return null},getAll:function e(t){var r=j(this).entries;O(arguments.length,1);var n=T(t);var i=[];var o=0;for(;o<r.length;o++){if(r[o].key===n)Q(i,r[o].value)}return i},has:function e(t){var r=j(this).entries;var n=O(arguments.length,1);var i=T(t);var o=n<2?undefined:arguments[1];var a=o===undefined?o:T(o);var s=0;while(s<r.length){var u=r[s++];if(u.key===i&&(a===undefined||u.value===a))return true}return false},set:function e(t,r){var n=j(this);O(arguments.length,1);var i=n.entries;var o=false;var a=T(t);var s=T(r);var u=0;var l;for(;u<i.length;u++){l=i[u];if(l.key===a){if(o)ee(i,u--,1);else{o=true;l.value=s}}}if(!o)Q(i,{key:a,value:s});if(!c)this.size=i.length;n.updateURL()},sort:function e(){var t=j(this);x(t.entries,(function(e,t){return e.key>t.key?1:-1}));t.updateURL()},forEach:function e(t){var r=j(this).entries;var n=_(t,arguments.length>1?arguments[1]:undefined);var i=0;var o;while(i<r.length){o=r[i++];n(o.value,o.key,this)}},keys:function e(){return new ve(this,"keys")},values:function e(){return new ve(this,"values")},entries:function e(){return new ve(this,"entries")}},{enumerable:true});f(ge,L,ge.entries,{name:"entries"});f(ge,"toString",(function e(){return j(this).serialize()}),{enumerable:true});if(c)d(ge,"size",{get:function e(){return j(this).entries.length},configurable:true,enumerable:true});p(ye,M);n({global:true,constructor:true,forced:!l},{URLSearchParams:ye});if(!l&&g(B)){var be=u(Z.has);var _e=u(Z.set);var Se=function(e){if(w(e)){var t=e.body;var r;if(S(t)===M){r=e.headers?new B(e.headers):new B;if(!be(r,"content-type")){_e(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8")}return I(e,{body:R(0,T(t)),headers:R(0,r)})}}return e};if(g(V)){n({global:true,enumerable:true,dontCallGetSet:true,forced:true},{fetch:function e(t){return V(t,arguments.length>1?Se(arguments[1]):{})}})}if(g(W)){var Ee=function e(t){y(this,G);return new W(t,arguments.length>1?Se(arguments[1]):{})};G.constructor=Ee;Ee.prototype=G;n({global:true,constructor:true,dontCallGetSet:true,forced:true},{Request:Ee})}}e.exports={URLSearchParams:ye,getState:j}},98587:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});function n(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}},98690:(e,t,r)=>{"use strict";var n=r(46518);var i=r(53250);var o=Math.exp;n({target:"Math",stat:true},{tanh:function e(t){var r=+t;var n=i(r);var a=i(-r);return n===Infinity?1:a===Infinity?-1:(n-a)/(o(r)+o(-r))}})},98721:(e,t,r)=>{"use strict";var n=r(43724);var i=r(79504);var o=r(62106);var a=URLSearchParams.prototype;var s=i(a.forEach);if(n&&!("size"in a)){o(a,"size",{get:function e(){var t=0;s(this,(function(){t++}));return t},configurable:true,enumerable:true})}},98921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(74848);var i=r(50306);var o=r(96540);var a=c(r(65239));var s=u(r(46942));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(i=t?n:r){if(i.has(e))return i.get(e);i.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(a,t,o):a[t]=e[t]);return a})(e,t)}const l=20;const f="no_device";const d=e=>{const t=Math.round(e/30*l);if(t>l){return l}else if(t<0){return 0}return t};const h=({language:e,deviceType:t,onDeviceChange:r,defaultDeviceId:u,title:c,startBtnTitle:h,noDeviceTip:p,noDevice:v,notSupportChangeTip:m})=>{const y=t==="audiooutput";const g=y?a.default.getInstance().speaker:a.default.getInstance().microphone;const[b,_]=(0,o.useState)(false);const[S,E]=(0,o.useState)(0);const[w,T]=(0,o.useState)([]);const[I,R]=(0,o.useState)(undefined);const C=(0,o.useRef)(undefined);const k=(0,o.useMemo)((()=>w.length>0?w:[{deviceId:f,label:v}]),[w,v]);const A=g.isSupportDeviceSwitch();const O=()=>{if(!w.length){return}if(b){g.stopDetect()}else{if(I!==null&&I!==void 0&&I.deviceId){g.startDetect(I.deviceId)}}};const P=async(e,t)=>{var n;const i=await g.getDevices();T(i);const o=await g.getPreferred(i,((n=e.current)===null||n===void 0?void 0:n.deviceId)||t);R(o);r(o===null||o===void 0?void 0:o.deviceId);if(!i.some((e=>a.AudioDevice.isDeviceSame(o,e)))){g.stopDetect()}};const x=e=>{if(e===(I===null||I===void 0?void 0:I.deviceId)){return}g.stopDetect();const t=w.find((t=>t.deviceId===e));C.current=t;R(t);r(t===null||t===void 0?void 0:t.deviceId)};(0,o.useEffect)((()=>{const e=g.subscribe({onDetect:({volume:e})=>E(d(e)),onDetectStateChange:e=>{_(e);E(0)},onDeviceChange:()=>P(C,u)});return()=>{g.stopDetect();e()}}),[]);(0,o.useEffect)((()=>{P(C,u)}),[u]);return(0,n.jsxs)("div",{className:"device-item",children:[(0,n.jsx)("div",{className:(0,s.default)("device-item-title device-item-h",y?"speaker":"mic"),children:c}),!A&&(0,n.jsx)("div",{className:"device-item-tip",children:m}),(0,n.jsxs)("div",{className:"device-item-content device-item-h",children:[(0,n.jsx)("div",{className:"device-item-select",children:(0,n.jsx)(i.Select,{value:(I===null||I===void 0?void 0:I.deviceId)||f,onChange:x,disabled:!w.length||!A,children:k.map(((e,t)=>(0,n.jsx)(i.Option,{title:e.label,value:e.deviceId,children:(0,n.jsx)("span",{children:e.label})},t)))})}),(0,n.jsx)(i.Button,{type:b?i.Button.typeMap.FILL:i.Button.typeMap.STROKE,dataTestid:"device-detection-speaker",className:"device-detection-btn",onClick:O,disabled:!w.length,children:b?e.stopDetection:h})]}),(0,n.jsx)("div",{className:"device-item-warn-tip device-item-h",children:w.length?(0,n.jsx)(i.SoundColumn,{className:"sound-column",columnCount:l,currColumnValue:S}):(0,n.jsx)("span",{className:"no-device-tip",children:p})})]})};var p=t["default"]=h},99449:(e,t,r)=>{"use strict";var n=r(46518);var i=r(27476);var o=r(77347).f;var a=r(18014);var s=r(655);var u=r(60511);var c=r(67750);var l=r(41436);var f=r(96395);var d=i("".slice);var h=Math.min;var p=l("endsWith");var v=!f&&!p&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}();n({target:"String",proto:true,forced:!v&&!p},{endsWith:function e(t){var r=s(c(this));u(t);var n=arguments.length>1?arguments[1]:undefined;var i=r.length;var o=n===undefined?i:h(a(n),i);var l=s(t);return d(r,o-l.length,o)===l}})},99590:(e,t,r)=>{"use strict";var n=r(91291);var i=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw new i("The argument can't be less than 0");return t}},99700:(e,t,r)=>{"use strict";r.r(t)},99899:e=>{function t(){this.buffer=[];this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++){this.putBit((e>>>t-r-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);if(this.buffer.length<=t){this.buffer.push(0)}if(e){this.buffer[t]|=128>>>this.length%8}this.length++}};e.exports=t}};var t={};function r(n){var i=t[n];if(i!==undefined){return i.exports}var o=t[n]={exports:{}};e[n].call(o.exports,o,o.exports,r);return o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;r.d(t,{a:t});return t}})();(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;r.t=function(n,i){if(i&1)n=this(n);if(i&8)return n;if(typeof n==="object"&&n){if(i&4&&n.__esModule)return n;if(i&16&&typeof n.then==="function")return n}var o=Object.create(null);r.r(o);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=i&2&&n;typeof s=="object"&&!~t.indexOf(s);s=e(s)){Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]))}a["default"]=()=>n;r.d(o,a);return o}})();(()=>{r.d=(e,t)=>{for(var n in t){if(r.o(t,n)&&!r.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();(()=>{r.g=function(){if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}}()})();(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{r.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:true});e.HwICSUiSdk=void 0;var t=r(40159);var i=r(94855);var o=r(44104);var a=r(44772);var s=r(37466);var u=r(39592);var c=r(11686);var l=k(r(92224));var f=r(84743);var d=r(34941);var h=r(45112);var p=r(63226);var v=r(35123);var m=r(72640);var y=r(55798);var g=r(78435);var b=r(46677);var _=r(40494);var S=k(r(93142));var E=r(39595);var w=r(56043);var T=r(75290);var I=r(59969);var R=r(88111);var C=r(56262);function k(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,x(n.key),n)}}function P(e,t,r){return t&&O(e.prototype,t),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=L(e,"string");return"symbol"==typeof t?t:t+""}function L(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=void 0&&(void 0).__decorate||function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o;return i>3&&o&&Object.defineProperty(t,r,o),o};const N=new o.Log({module:"HwICS"});const D=e=>{N.error("repeatCallsCB",e);return{result:false,errorCode:c.SDKErrorCode.METHOD_REPEAT_CALLS,errorMsg:c.msgMap[c.SDKErrorCode.METHOD_REPEAT_CALLS]}};let j=e.HwICSUiSdk=function(){function e(){A(this,e)}return P(e,null,[{key:"checkBrowserSupport",value:async function e(t=false){var r,n;if(f.Utils.getBrowserInfo()===c.BrowserType.UNSUPPORTED){return false}const i=await l.default.checkSystemRequirements(t,"recvonly");if(i===true){N.info("checkBrowserSupport result","true");return true}N.warn("checkBrowserSupport error:",i===null||i===void 0?void 0:(r=i.getCode)===null||r===void 0?void 0:r.call(i),(i===null||i===void 0?void 0:(n=i.getMsg)===null||n===void 0?void 0:n.call(i))||(i===null||i===void 0?void 0:i.toString()));return false}},{key:"checkTransparentBgSupport",value:async function e(){return!!window.VideoFrame}},{key:"create",value:async function e(t){var r;const n=(0,a.createEntry)("create");await u.HwICS.destroy();const i=u.HwICS.dealInitParam({param:t,entry:n});(r=document.getElementById(t.containerId))===null||r===void 0?void 0:r.addEventListener("click",d.dealGlobalClick,{capture:true});if(!i){return}const o=await s.Machine2MachineVerification.onceCodeAuth({onceCode:t.onceCode||"",entry:n});if(!o){return}await u.HwICS.joinChatRoom(n);S.default.getInstance().clearCount(n)}},{key:"setConfig",value:async function e(t){const r=(0,a.createEntry)("setConfig");const n=i.ConfigManager.getConfig(E.ConfigKey.ENABLE_LOCAL_WAKEUP);i.ConfigManager.setConfig(t);if(t.enableLocalWakeup&&!n){await w.LocalWakeup.initWakeup({entry:r,language:g.LanguageManager.getLocalLangCode(r)===b.LanguageCode.EN_US?"en":"zh",wakeupCallback:h.ChatManager.wakeupCallback})}if(t.enableLocalWakeup===false&&n){await w.LocalWakeup.clearWakeup("setConfig")}}},{key:"setLogLevel",value:function e(t){return u.HwICS.setLogLevel(t)}},{key:"addEventListeners",value:function e(r){return t.EventManager.addEventListeners(r)}},{key:"destroy",value:function e(){return u.HwICS.destroy()}},{key:"getJobInfo",value:function e(){return u.HwICS.getJobInfo()}},{key:"startSpeak",value:async function t(){return e.startUserSpeak()}},{key:"stopSpeak",value:async function t(){return e.stopUserSpeak()}},{key:"startUserSpeak",value:async function e(t){return h.ChatManager.startUserSpeak(t)}},{key:"stopUserSpeak",value:async function e(){return _.StreamAdapter.muteLocalAudio("sdk.stopUserSpeak")}},{key:"unmuteRemoteAudio",value:function e(){return _.StreamAdapter.unmuteRemoteAudio("SDK")}},{key:"muteRemoteAudio",value:function e(){return _.StreamAdapter.muteRemoteAudio("SDK")}},{key:"interruptSpeaking",value:async function e(){const t=await h.ChatManager.interruptSpeaking("SDK");await(0,a.sleep)(100);return t}},{key:"sendTextQuestion",value:function e(t){return h.ChatManager.textQuestion({entry:"SDK",text:t.text,questionParam:t.questionParam})}},{key:"startChat",value:function e(t){return h.ChatManager.startChat({entry:"SDK",interactionMode:(t===null||t===void 0?void 0:t.interactionMode)||y.InteractionMode.AUDIO,wakeupType:t===null||t===void 0?void 0:t.wakeupType,preCheckPermissions:t===null||t===void 0?void 0:t.preCheckPermissions})}},{key:"stopChat",value:function e(){return h.ChatManager.stopChat({entry:"SDK"})}},{key:"activeInteractionMode",value:function e(){return m.PortalWssManager.getInstance().activeInteractionMode("SDK")}},{key:"interactionModeSwitch",value:function e(t){return h.ChatManager.interactionModeSwitch({entry:"SDK",interactionMode:t===null||t===void 0?void 0:t.interactionMode})}},{key:"getLanguageInfo",value:function e(){return g.LanguageManager.getLanguageInfo("SDK")}},{key:"changeLanguage",value:function e(t){return g.LanguageManager.setRemoteAndLocalLangCode({entry:"SDK",langCode:t===null||t===void 0?void 0:t.langCode,remember:true})}},{key:"sendDrivenText",value:async function e(t){return h.ChatManager.sendDrivenText(t)}},{key:"startLocalWakeupRecord",value:async function e(){return w.LocalWakeup.startRecord()}},{key:"stopLocalWakeupRecord",value:async function e(){return w.LocalWakeup.stopRecord()}},{key:"initResourcePath",value:async function e(t){return w.LocalWakeup.initResourcePath(t)}},{key:"setThirdPartyConfig",value:function e(t){return T.ThirdPartyManager.setThirdPartyConfig(t)}},{key:"sendCustomLocalAudio",value:async function e(t){R.CustomRecord.sendCustomLocalAudio(t)}},{key:"playRemoteVideo",value:async function e(){return _.StreamAdapter.playRemoteVideo()}},{key:"startStreamRecord",value:async function e(){const t=(0,a.createEntry)("startStreamRecord");return m.PortalWssManager.getInstance().startWsRecord(t)}},{key:"stopStreamRecord",value:async function e(){const t=(0,a.createEntry)("stopStreamRecord");return m.PortalWssManager.getInstance().stopWsRecord(t)}},{key:"subscribe",value:async function e(){return C.SparkRTC.getInstance().subscribe()}},{key:"unSubscribe",value:async function e(){return C.SparkRTC.getInstance().unSubscribe()}}])}();j.version="5.0.4"||0;j.buildTime="202601091418"||0;M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"checkBrowserSupport",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"checkTransparentBgSupport",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD),(0,I.singleControlDecorator)(D)],j,"create",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"setConfig",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"setLogLevel",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"addEventListeners",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"destroy",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"getJobInfo",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"startSpeak",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"stopSpeak",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"startUserSpeak",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"stopUserSpeak",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"unmuteRemoteAudio",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"muteRemoteAudio",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"interruptSpeaking",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"sendTextQuestion",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD),(0,I.singleControlDecorator)(D)],j,"startChat",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD),(0,I.singleControlDecorator)(D)],j,"stopChat",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"activeInteractionMode",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"interactionModeSwitch",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"changeLanguage",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"sendDrivenText",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"startLocalWakeupRecord",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"stopLocalWakeupRecord",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"initResourcePath",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"setThirdPartyConfig",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"playRemoteVideo",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"startStreamRecord",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"stopStreamRecord",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"subscribe",null);M([(0,a.printfDecorator)(N),(0,v.methodDecorator)(p.Arg1Map.HWICSUISDK_METHOD)],j,"unSubscribe",null);window.HwICSUiSdk=j})();return n})()));