@xylink/xy-rtc-sdk 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/action/index.d.ts +20 -5
- package/lib/enum/client.d.ts +15 -0
- package/lib/enum/contraints.d.ts +33 -96
- package/lib/enum/device.d.ts +1 -0
- package/lib/enum/errorCode.d.ts +58 -1
- package/lib/enum/index.d.ts +44 -16
- package/lib/index.d.ts +11 -8
- package/lib/main/client.d.ts +93 -63
- package/lib/main/deviceManager.d.ts +23 -4
- package/lib/main/helper.d.ts +2 -2
- package/lib/main/iauth.d.ts +14 -1
- package/lib/main/layoutManager.d.ts +29 -11
- package/lib/main/meeting.d.ts +71 -34
- package/lib/main/peer.d.ts +70 -121
- package/lib/main/qualityManager.d.ts +38 -9
- package/lib/main/stream.d.ts +237 -104
- package/lib/main/videoManager.d.ts +1 -9
- package/lib/tools/dbManager.d.ts +106 -0
- package/lib/tools/detect.d.ts +2 -2
- package/lib/tools/enum.d.ts +1 -1
- package/lib/tools/httpClient.d.ts +4 -4
- package/lib/tools/i18n.d.ts +1 -1
- package/lib/tools/logger.d.ts +75 -74
- package/lib/tools/logger.worker.d.ts +13 -0
- package/lib/tools/quality.d.ts +113 -0
- package/lib/tools/quality.worker.d.ts +13 -0
- package/lib/tools/queue.d.ts +38 -3
- package/lib/tools/template.d.ts +3 -3
- package/lib/tools/utils.d.ts +8 -0
- package/lib/type/base.d.ts +2 -2
- package/lib/type/client.d.ts +255 -150
- package/lib/type/device.d.ts +21 -15
- package/lib/type/index.d.ts +3 -0
- package/lib/type/layout.d.ts +18 -1
- package/lib/type/logger.d.ts +112 -0
- package/lib/type/meeting.d.ts +11 -2
- package/lib/type/peer.d.ts +20 -0
- package/lib/type/quality.d.ts +101 -0
- package/lib/type/stream.d.ts +332 -134
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +4 -4
- package/lib/tools/db.d.ts +0 -85
package/lib/xyrtc.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.xyRTC=t():e.xyRTC=t()}(self,(()=>(()=>{var e={9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var n=r(4867),i=r(6026),o=r(5327),s=r(4097),a=r(4109),c=r(7985),u=r(5061);e.exports=function(e){return new Promise((function(t,l){var h=e.data,d=e.headers;n.isFormData(h)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+v)}var g=s(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),o(g,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};i(t,l,n),f=null}},f.onabort=function(){f&&(l(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){l(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(u(t,e,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var m=r(4372),y=(e.withCredentials||c(g))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&n.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),l(e),f=null)})),void 0===h&&(h=null),f.send(h)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),i=r(1849),o=r(321),s=r(7185);function a(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var c=a(r(5655));c.Axios=o,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=r(5263),c.CancelToken=r(4972),c.isCancel=r(6502),c.all=function(e){return Promise.all(e)},c.spread=r(8713),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),i=r(5327),o=r(782),s=r(3572),a=r(7185);function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,i){return this.request(n.merge(i||{},{method:e,url:t,data:r}))}})),e.exports=c},782:(e,t,r)=>{"use strict";var n=r(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,r)=>{"use strict";var n=r(1793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,i,o){var s=new Error(e);return n(s,t,r,i,o)}},3572:(e,t,r)=>{"use strict";var n=r(4867),i=r(8527),o=r(6502),s=r(5655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){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:this.config,code:this.code}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={},i=["url","method","params","data"],o=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(i,(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(o,(function(i){n.isObject(t[i])?r[i]=n.deepMerge(e[i],t[i]):void 0!==t[i]?r[i]=t[i]:n.isObject(e[i])?r[i]=n.deepMerge(e[i]):void 0!==e[i]&&(r[i]=e[i])})),n.forEach(s,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var a=i.concat(o).concat(s),c=Object.keys(t).filter((function(e){return-1===a.indexOf(e)}));return n.forEach(c,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var i=r.config.validateStatus;!i||i(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},8527:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),i=r(6016),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,c={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(a=r(5448)),a),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(o)})),e.exports=c},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),i=["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"];e.exports=function(e){var t,r,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4867:(e,t,r)=>{"use strict";var n=r(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,i=arguments.length;n<i;n++)u(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,i=arguments.length;n<i;n++)u(arguments[n],r);return t},extend:function(e,t,r){return u(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},738:(e,t,r)=>{"use strict";const n=r(3341),i=r(6401),o=r(5299);function s(e,t){switch(i(e)){case"object":return function(e,t){if("function"==typeof t)return t(e);if(t||o(e)){const r=new e.constructor;for(let n in e)r[n]=s(e[n],t);return r}return e}(e,t);case"array":return function(e,t){const r=new e.constructor(e.length);for(let n=0;n<e.length;n++)r[n]=s(e[n],t);return r}(e,t);default:return n(e)}}e.exports=s},9662:(e,t,r)=>{var n=r(614),i=r(6330),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(i(e)+" is not a function")}},9483:(e,t,r)=>{var n=r(4411),i=r(6330),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(i(e)+" is not a constructor")}},6077:(e,t,r)=>{var n=r(614),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw o("Can't set "+i(e)+" as a prototype")}},1223:(e,t,r)=>{var n=r(5112),i=r(30),o=r(3070).f,s=n("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),e.exports=function(e){a[s][e]=!0}},1530:(e,t,r)=>{"use strict";var n=r(8710).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},5787:(e,t,r)=>{var n=r(7976),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw i("Incorrect invocation")}},9670:(e,t,r)=>{var n=r(111),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw o(i(e)+" is not an object")}},3013:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(e,t,r)=>{var n=r(7293);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:(e,t,r)=>{"use strict";var n,i,o,s=r(3013),a=r(9781),c=r(7854),u=r(614),l=r(111),h=r(2597),d=r(648),f=r(6330),p=r(8880),v=r(8052),g=r(3070).f,m=r(7976),y=r(9518),b=r(7674),S=r(5112),w=r(9711),k=r(9909),C=k.enforce,x=k.get,E=c.Int8Array,_=E&&E.prototype,I=c.Uint8ClampedArray,A=I&&I.prototype,T=E&&y(E),R=_&&y(_),O=Object.prototype,D=c.TypeError,N=S("toStringTag"),L=w("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",M=s&&!!b&&"Opera"!==d(c.opera),B=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},G={BigInt64Array:8,BigUint64Array:8},H=function(e){var t=y(e);if(l(t)){var r=x(t);return r&&h(r,P)?r.TypedArrayConstructor:H(t)}},U=function(e){if(!l(e))return!1;var t=d(e);return h(j,t)||h(G,t)};for(n in j)(o=(i=c[n])&&i.prototype)?C(o).TypedArrayConstructor=i:M=!1;for(n in G)(o=(i=c[n])&&i.prototype)&&(C(o).TypedArrayConstructor=i);if((!M||!u(T)||T===Function.prototype)&&(T=function(){throw D("Incorrect invocation")},M))for(n in j)c[n]&&b(c[n],T);if((!M||!R||R===O)&&(R=T.prototype,M))for(n in j)c[n]&&b(c[n].prototype,R);if(M&&y(A)!==R&&b(A,R),a&&!h(R,N))for(n in B=!0,g(R,N,{get:function(){return l(this)?this[L]:void 0}}),j)c[n]&&p(c[n],L,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:B&&L,aTypedArray:function(e){if(U(e))return e;throw D("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!b||m(T,e)))return e;throw D(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(a){if(r)for(var i in j){var o=c[i];if(o&&h(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}R[e]&&!r||v(R,e,r?t:M&&_[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(a){if(b){if(r)for(n in j)if((i=c[n])&&h(i,e))try{delete i[e]}catch(e){}if(T[e]&&!r)return;try{return v(T,e,r?t:M&&T[e]||t)}catch(e){}}for(n in j)!(i=c[n])||i[e]&&!r||v(i,e,t)}},getTypedArrayConstructor:H,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||h(j,t)||h(G,t)},isTypedArray:U,TypedArray:T,TypedArrayPrototype:R}},3331:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(9781),s=r(3013),a=r(6530),c=r(8880),u=r(9190),l=r(7293),h=r(5787),d=r(9303),f=r(7466),p=r(7067),v=r(1179),g=r(9518),m=r(7674),y=r(8006).f,b=r(3070).f,S=r(1285),w=r(1589),k=r(8003),C=r(9909),x=a.PROPER,E=a.CONFIGURABLE,_=C.get,I=C.set,A="ArrayBuffer",T="DataView",R="Wrong index",O=n.ArrayBuffer,D=O,N=D&&D.prototype,L=n.DataView,P=L&&L.prototype,M=Object.prototype,B=n.Array,j=n.RangeError,G=i(S),H=i([].reverse),U=v.pack,K=v.unpack,F=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},Y=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},z=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},X=function(e){return U(e,23,4)},W=function(e){return U(e,52,8)},q=function(e,t){b(e.prototype,t,{get:function(){return _(this)[t]}})},$=function(e,t,r,n){var i=p(r),o=_(e);if(i+t>o.byteLength)throw j(R);var s=_(o.buffer).bytes,a=i+o.byteOffset,c=w(s,a,a+t);return n?c:H(c)},Z=function(e,t,r,n,i,o){var s=p(r),a=_(e);if(s+t>a.byteLength)throw j(R);for(var c=_(a.buffer).bytes,u=s+a.byteOffset,l=n(+i),h=0;h<t;h++)c[u+h]=l[o?h:t-h-1]};if(s){var J=x&&O.name!==A;if(l((function(){O(1)}))&&l((function(){new O(-1)}))&&!l((function(){return new O,new O(1.5),new O(NaN),1!=O.length||J&&!E})))J&&E&&c(O,"name",A);else{(D=function(e){return h(this,N),new O(p(e))}).prototype=N;for(var Q,ee=y(O),te=0;ee.length>te;)(Q=ee[te++])in D||c(D,Q,O[Q]);N.constructor=D}m&&g(P)!==M&&m(P,M);var re=new L(new D(2)),ne=i(P.setInt8);re.setInt8(0,2147483648),re.setInt8(1,2147483649),!re.getInt8(0)&&re.getInt8(1)||u(P,{setInt8:function(e,t){ne(this,e,t<<24>>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else N=(D=function(e){h(this,N);var t=p(e);I(this,{bytes:G(B(t),0),byteLength:t}),o||(this.byteLength=t)}).prototype,P=(L=function(e,t,r){h(this,P),h(e,N);var n=_(e).byteLength,i=d(t);if(i<0||i>n)throw j("Wrong offset");if(i+(r=void 0===r?n-i:f(r))>n)throw j("Wrong length");I(this,{buffer:e,byteLength:r,byteOffset:i}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,o&&(q(D,"byteLength"),q(L,"buffer"),q(L,"byteLength"),q(L,"byteOffset")),u(P,{getInt8:function(e){return $(this,1,e)[0]<<24>>24},getUint8:function(e){return $(this,1,e)[0]},getInt16:function(e){var t=$(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=$(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return z($(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return z($(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return K($(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return K($(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Z(this,1,e,F,t)},setUint8:function(e,t){Z(this,1,e,F,t)},setInt16:function(e,t){Z(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Z(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Z(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Z(this,4,e,Y,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Z(this,4,e,X,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Z(this,8,e,W,t,arguments.length>2?arguments[2]:void 0)}});k(D,A),k(L,T),e.exports={ArrayBuffer:D,DataView:L}},1048:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244),s=r(5117),a=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),c=o(r),u=i(e,c),l=i(t,c),h=arguments.length>2?arguments[2]:void 0,d=a((void 0===h?c:i(h,c))-l,c-u),f=1;for(l<u&&u<l+d&&(f=-1,l+=d-1,u+=d-1);d-- >0;)l in r?r[u]=r[l]:s(r,u),u+=f,l+=f;return r}},1285:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244);e.exports=function(e){for(var t=n(this),r=o(t),s=arguments.length,a=i(s>1?arguments[1]:void 0,r),c=s>2?arguments[2]:void 0,u=void 0===c?r:i(c,r);u>a;)t[a++]=e;return t}},8533:(e,t,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},7745:(e,t,r)=>{var n=r(6244);e.exports=function(e,t){for(var r=0,i=n(t),o=new e(i);i>r;)o[r]=t[r++];return o}},8457:(e,t,r)=>{"use strict";var n=r(9974),i=r(6916),o=r(7908),s=r(3411),a=r(7659),c=r(4411),u=r(6244),l=r(6135),h=r(4121),d=r(1246),f=Array;e.exports=function(e){var t=o(e),r=c(this),p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v;g&&(v=n(v,p>2?arguments[2]:void 0));var m,y,b,S,w,k,C=d(t),x=0;if(!C||this===f&&a(C))for(m=u(t),y=r?new this(m):f(m);m>x;x++)k=g?v(t[x],x):t[x],l(y,x,k);else for(w=(S=h(t,C)).next,y=r?new this:[];!(b=i(w,S)).done;x++)k=g?s(S,v,[b.value,x],!0):b.value,l(y,x,k);return y.length=x,y}},1318:(e,t,r)=>{var n=r(5656),i=r(1400),o=r(6244),s=function(e){return function(t,r,s){var a,c=n(t),u=o(c),l=i(s,u);if(e&&r!=r){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},2092:(e,t,r)=>{var n=r(9974),i=r(1702),o=r(8361),s=r(7908),a=r(6244),c=r(5417),u=i([].push),l=function(e){var t=1==e,r=2==e,i=3==e,l=4==e,h=6==e,d=7==e,f=5==e||h;return function(p,v,g,m){for(var y,b,S=s(p),w=o(S),k=n(v,g),C=a(w),x=0,E=m||c,_=t?E(p,C):r||d?E(p,0):void 0;C>x;x++)if((f||x in w)&&(b=k(y=w[x],x,S),e))if(t)_[x]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return x;case 2:u(_,y)}else switch(e){case 4:return!1;case 7:u(_,y)}return h?-1:i||l?l:_}};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)}},6583:(e,t,r)=>{"use strict";var n=r(2104),i=r(5656),o=r(9303),s=r(6244),a=r(9341),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),d=l||!h;e.exports=d?function(e){if(l)return n(u,this,arguments)||0;var t=i(this),r=s(t),a=r-1;for(arguments.length>1&&(a=c(a,o(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},1194:(e,t,r)=>{var n=r(7293),i=r(5112),o=r(7392),s=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,r)=>{"use strict";var n=r(7293);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},3671:(e,t,r)=>{var n=r(9662),i=r(7908),o=r(8361),s=r(6244),a=TypeError,c=function(e){return function(t,r,c,u){n(r);var l=i(t),h=o(l),d=s(l),f=e?d-1:0,p=e?-1:1;if(c<2)for(;;){if(f in h){u=h[f],f+=p;break}if(f+=p,e?f<0:d<=f)throw a("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=p)f in h&&(u=r(u,h[f],f,l));return u}};e.exports={left:c(!1),right:c(!0)}},3658:(e,t,r)=>{"use strict";var n=r(9781),i=r(3157),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!s(e,"length").writable)throw o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},1589:(e,t,r)=>{var n=r(1400),i=r(6244),o=r(6135),s=Array,a=Math.max;e.exports=function(e,t,r){for(var c=i(e),u=n(t,c),l=n(void 0===r?c:r,c),h=s(a(l-u,0)),d=0;u<l;u++,d++)o(h,d,e[u]);return h.length=d,h}},206:(e,t,r)=>{var n=r(1702);e.exports=n([].slice)},4362:(e,t,r)=>{var n=r(1589),i=Math.floor,o=function(e,t){var r=e.length,c=i(r/2);return r<8?s(e,t):a(e,o(n(e,0,c),t),o(n(e,c),t),t)},s=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},a=function(e,t,r,n){for(var i=t.length,o=r.length,s=0,a=0;s<i||a<o;)e[s+a]=s<i&&a<o?n(t[s],r[a])<=0?t[s++]:r[a++]:s<i?t[s++]:r[a++];return e};e.exports=o},7475:(e,t,r)=>{var n=r(3157),i=r(4411),o=r(111),s=r(5112)("species"),a=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===a||n(t.prototype))||o(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},5417:(e,t,r)=>{var n=r(7475);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},3411:(e,t,r)=>{var n=r(9670),i=r(9212);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},7072:(e,t,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},4326:(e,t,r)=>{var n=r(84),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},648:(e,t,r)=>{var n=r(1694),i=r(614),o=r(4326),s=r(5112)("toStringTag"),a=Object,c="Arguments"==o(function(){return arguments}());e.exports=n?o: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=a(e),s))?r:c?o(t):"Object"==(n=o(t))&&i(t.callee)?"Arguments":n}},5631:(e,t,r)=>{"use strict";var n=r(3070).f,i=r(30),o=r(9190),s=r(9974),a=r(5787),c=r(8554),u=r(408),l=r(1656),h=r(6178),d=r(6340),f=r(9781),p=r(2423).fastKey,v=r(9909),g=v.set,m=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){a(e,d),g(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),c(n)||u(n,e[l],{that:e,AS_ENTRIES:r})})),d=h.prototype,v=m(t),y=function(e,t,r){var n,i,o=v(e),s=b(e,t);return s?s.value=r:(o.last=s={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),f?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},b=function(e,t){var r,n=v(e),i=p(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(d,{clear:function(){for(var e=v(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=b(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),f?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),o(d,r?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&n(d,"size",{get:function(){return v(this).size}}),h},setStrong:function(e,t,r){var n=t+" Iterator",i=m(t),o=m(n);l(e,t,(function(e,t){g(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?h("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,h(void 0,!0))}),r?"entries":"values",!r,!0),d(t)}}},7710:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1702),s=r(4705),a=r(8052),c=r(2423),u=r(408),l=r(5787),h=r(614),d=r(8554),f=r(111),p=r(7293),v=r(7072),g=r(8003),m=r(9587);e.exports=function(e,t,r){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),S=y?"set":"add",w=i[e],k=w&&w.prototype,C=w,x={},E=function(e){var t=o(k[e]);a(k,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(s(e,!h(w)||!(b||k.forEach&&!p((function(){(new w).entries().next()})))))C=r.getConstructor(t,e,y,S),c.enable();else if(s(e,!0)){var _=new C,I=_[S](b?{}:-0,1)!=_,A=p((function(){_.has(1)})),T=v((function(e){new w(e)})),R=!b&&p((function(){for(var e=new w,t=5;t--;)e[S](t,t);return!e.has(-0)}));T||((C=t((function(e,t){l(e,k);var r=m(new w,e,C);return d(t)||u(t,r[S],{that:r,AS_ENTRIES:y}),r}))).prototype=k,k.constructor=C),(A||R)&&(E("delete"),E("has"),y&&E("get")),(R||I)&&E(S),b&&k.clear&&delete k.clear}return x[e]=C,n({global:!0,constructor:!0,forced:C!=w},x),g(C,e),b||r.setStrong(C,e,y),C}},9920:(e,t,r)=>{var n=r(2597),i=r(3887),o=r(1236),s=r(3070);e.exports=function(e,t,r){for(var a=i(t),c=s.f,u=o.f,l=0;l<a.length;l++){var h=a[l];n(e,h)||r&&n(r,h)||c(e,h,u(t,h))}}},4964:(e,t,r)=>{var n=r(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4230:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),s=/"/g,a=n("".replace);e.exports=function(e,t,r,n){var c=o(i(e)),u="<"+t;return""!==r&&(u+=" "+r+'="'+a(o(n),s,""")+'"'),u+">"+c+"</"+t+">"}},6178:e=>{e.exports=function(e,t){return{value:e,done:t}}},8880:(e,t,r)=>{var n=r(9781),i=r(3070),o=r(9114);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);e.exports=function(e,t,r){var s=n(t);s in e?i.f(e,s,o(0,r)):e[s]=r}},8052:(e,t,r)=>{var n=r(614),i=r(3070),o=r(6339),s=r(3072);e.exports=function(e,t,r,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:t;if(n(r)&&o(r,u,a),a.global)c?e[t]=r:s(t,r);else{try{a.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},9190:(e,t,r)=>{var n=r(8052);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},3072:(e,t,r)=>{var n=r(7854),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},5117:(e,t,r)=>{"use strict";var n=r(6330),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw i("Cannot delete property "+n(t)+" of "+n(e))}},9781:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:e=>{var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},317:(e,t,r)=>{var n=r(7854),i=r(111),o=n.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},7207:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:e=>{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}},8509:(e,t,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8886:(e,t,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},7871:(e,t,r)=>{var n=r(3823),i=r(5268);e.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},3823:e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(e,t,r)=>{var n=r(8113);e.exports=/MSIE|Trident/.test(n)},1528:(e,t,r)=>{var n=r(8113),i=r(7854);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(e,t,r)=>{var n=r(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(e,t,r)=>{var n=r(4326),i=r(7854);e.exports="process"==n(i.process)},1036:(e,t,r)=>{var n=r(8113);e.exports=/web0s(?!.*chrome)/i.test(n)},8113:(e,t,r)=>{var n=r(5005);e.exports=n("navigator","userAgent")||""},7392:(e,t,r)=>{var n,i,o=r(7854),s=r(8113),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},8008:(e,t,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),s=r(8052),a=r(3072),c=r(9920),u=r(4705);e.exports=function(e,t){var r,l,h,d,f,p=e.target,v=e.global,g=e.stat;if(r=v?n:g?n[p]||a(p,{}):(n[p]||{}).prototype)for(l in t){if(d=t[l],h=e.dontCallGetSet?(f=i(r,l))&&f.value:r[l],!u(v?l:p+(g?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),s(r,l,d,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,r)=>{"use strict";r(4916);var n=r(1702),i=r(8052),o=r(2261),s=r(7293),a=r(5112),c=r(8880),u=a("species"),l=RegExp.prototype;e.exports=function(e,t,r,h){var d=a(e),f=!s((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=f&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return t=!0,null},r[d](""),!t}));if(!f||!p||r){var v=n(/./[d]),g=t(d,""[e],(function(e,t,r,i,s){var a=n(e),c=t.exec;return c===o||c===l.exec?f&&!s?{done:!0,value:v(t,r,i)}:{done:!0,value:a(r,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(l,d,g[1])}h&&c(l[d],"sham",!0)}},6677:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(e,t,r)=>{var n=r(4374),i=Function.prototype,o=i.apply,s=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},9974:(e,t,r)=>{var n=r(1702),i=r(9662),o=r(4374),s=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?s(e,t):function(){return e.apply(t,arguments)}}},4374:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:(e,t,r)=>{"use strict";var n=r(1702),i=r(9662),o=r(111),s=r(2597),a=r(206),c=r(4374),u=Function,l=n([].concat),h=n([].join),d={},f=function(e,t,r){if(!s(d,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";d[t]=u("C,a","return new C("+h(n,",")+")")}return d[t](e,r)};e.exports=c?u.bind:function(e){var t=i(this),r=t.prototype,n=a(arguments,1),s=function(){var r=l(n,a(arguments));return this instanceof s?f(t,r.length,r):t.apply(e,r)};return o(r)&&(s.prototype=r),s}},6916:(e,t,r)=>{var n=r(4374),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},6530:(e,t,r)=>{var n=r(9781),i=r(2597),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},84:(e,t,r)=>{var n=r(4374),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);e.exports=n?s:function(e){return function(){return o.apply(e,arguments)}}},1702:(e,t,r)=>{var n=r(4326),i=r(84);e.exports=function(e){if("Function"===n(e))return i(e)}},5005:(e,t,r)=>{var n=r(7854),i=r(614),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},1246:(e,t,r)=>{var n=r(648),i=r(8173),o=r(8554),s=r(7497),a=r(5112)("iterator");e.exports=function(e){if(!o(e))return i(e,a)||i(e,"@@iterator")||s[n(e)]}},4121:(e,t,r)=>{var n=r(6916),i=r(9662),o=r(9670),s=r(6330),a=r(1246),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return o(n(r,e));throw c(s(e)+" is not iterable")}},8173:(e,t,r)=>{var n=r(9662),i=r(8554);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},647:(e,t,r)=>{var n=r(1702),i=r(7908),o=Math.floor,s=n("".charAt),a=n("".replace),c=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,h,d){var f=r+e.length,p=n.length,v=l;return void 0!==h&&(h=i(h),v=u),a(d,v,(function(i,a){var u;switch(s(a,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,r);case"'":return c(t,f);case"<":u=h[c(a,1,-1)];break;default:var l=+a;if(0===l)return i;if(l>p){var d=o(l/10);return 0===d?i:d<=p?void 0===n[d-1]?s(a,1):n[d-1]+s(a,1):i}u=n[l-1]}return void 0===u?"":u}))}},7854:(e,t,r)=>{var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(e,t,r)=>{var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},3501:e=>{e.exports={}},842:(e,t,r)=>{var n=r(7854);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},490:(e,t,r)=>{var n=r(5005);e.exports=n("document","documentElement")},4664:(e,t,r)=>{var n=r(9781),i=r(7293),o=r(317);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:e=>{var t=Array,r=Math.abs,n=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;e.exports={pack:function(e,a,c){var u,l,h,d=t(c),f=8*c-a-1,p=(1<<f)-1,v=p>>1,g=23===a?n(2,-24)-n(2,-77):0,m=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,u=p):(u=i(o(e)/s),e*(h=n(2,-u))<1&&(u--,h*=2),(e+=u+v>=1?g/h:g*n(2,1-v))*h>=2&&(u++,h/=2),u+v>=p?(l=0,u=p):u+v>=1?(l=(e*h-1)*n(2,a),u+=v):(l=e*n(2,v-1)*n(2,a),u=0));a>=8;)d[y++]=255&l,l/=256,a-=8;for(u=u<<a|l,f+=a;f>0;)d[y++]=255&u,u/=256,f-=8;return d[--y]|=128*m,d},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,s=(1<<o)-1,a=s>>1,c=o-7,u=i-1,l=e[u--],h=127&l;for(l>>=7;c>0;)h=256*h+e[u--],c-=8;for(r=h&(1<<-c)-1,h>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===h)h=1-a;else{if(h===s)return r?NaN:l?-1/0:1/0;r+=n(2,t),h-=a}return(l?-1:1)*r*n(2,h-t)}}},8361:(e,t,r)=>{var n=r(1702),i=r(7293),o=r(4326),s=Object,a=n("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a(e,""):s(e)}:s},9587:(e,t,r)=>{var n=r(614),i=r(111),o=r(7674);e.exports=function(e,t,r){var s,a;return o&&n(s=t.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(e,a),e}},2788:(e,t,r)=>{var n=r(1702),i=r(614),o=r(5465),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},2423:(e,t,r)=>{var n=r(2109),i=r(1702),o=r(3501),s=r(111),a=r(2597),c=r(3070).f,u=r(8006),l=r(1156),h=r(2050),d=r(9711),f=r(6677),p=!1,v=d("meta"),g=0,m=function(e){c(e,v,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},p=!0;var e=u.f,t=i([].splice),r={};r[v]=1,e(r).length&&(u.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===v){t(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,v)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[v].objectID},getWeakData:function(e,t){if(!a(e,v)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[v].weakData},onFreeze:function(e){return f&&p&&h(e)&&!a(e,v)&&m(e),e}};o[v]=!0},9909:(e,t,r)=>{var n,i,o,s=r(4811),a=r(7854),c=r(111),u=r(8880),l=r(2597),h=r(5465),d=r(6200),f=r(3501),p="Object already initialized",v=a.TypeError,g=a.WeakMap;if(s||h.state){var m=h.state||(h.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,n=function(e,t){if(m.has(e))throw v(p);return t.facade=e,m.set(e,t),t},i=function(e){return m.get(e)||{}},o=function(e){return m.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(l(e,y))throw v(p);return t.facade=e,u(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return r}}}},7659:(e,t,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[o]===e)}},3157:(e,t,r)=>{var n=r(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},4067:(e,t,r)=>{var n=r(648),i=r(1702)("".slice);e.exports=function(e){return"Big"===i(n(e),0,3)}},614:(e,t,r)=>{var n=r(4154),i=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},4411:(e,t,r)=>{var n=r(1702),i=r(7293),o=r(614),s=r(648),a=r(5005),c=r(2788),u=function(){},l=[],h=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),p=!d.exec(u),v=function(e){if(!o(e))return!1;try{return h(u,l,e),!0}catch(e){return!1}},g=function(e){if(!o(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,c(e))}catch(e){return!0}};g.sham=!0,e.exports=!h||i((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?g:v},4705:(e,t,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,s=function(e,t){var r=c[a(e)];return r==l||r!=u&&(i(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5988:(e,t,r)=>{var n=r(111),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},8554:e=>{e.exports=function(e){return null==e}},111:(e,t,r)=>{var n=r(614),i=r(4154),o=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},1913:e=>{e.exports=!1},7850:(e,t,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},2190:(e,t,r)=>{var n=r(5005),i=r(614),o=r(7976),s=r(3307),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,a(e))}},408:(e,t,r)=>{var n=r(9974),i=r(6916),o=r(9670),s=r(6330),a=r(7659),c=r(6244),u=r(7976),l=r(4121),h=r(1246),d=r(9212),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,r){var g,m,y,b,S,w,k,C=r&&r.that,x=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),I=!(!r||!r.INTERRUPTED),A=n(t,C),T=function(e){return g&&d(g,"normal",e),new p(!0,e)},R=function(e){return x?(o(e),I?A(e[0],e[1],T):A(e[0],e[1])):I?A(e,T):A(e)};if(E)g=e.iterator;else if(_)g=e;else{if(!(m=h(e)))throw f(s(e)+" is not iterable");if(a(m)){for(y=0,b=c(e);b>y;y++)if((S=R(e[y]))&&u(v,S))return S;return new p(!1)}g=l(e,m)}for(w=E?e.next:g.next;!(k=i(w,g)).done;){try{S=R(k.value)}catch(e){d(g,"throw",e)}if("object"==typeof S&&S&&u(v,S))return S}return new p(!1)}},9212:(e,t,r)=>{var n=r(6916),i=r(9670),o=r(8173);e.exports=function(e,t,r){var s,a;i(e);try{if(!(s=o(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw r;if(a)throw s;return i(s),r}},3061:(e,t,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),s=r(8003),a=r(7497),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!u,r)}),s(e,l,!1,!0),a[l]=c,e}},1656:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1913),s=r(6530),a=r(614),c=r(3061),u=r(9518),l=r(7674),h=r(8003),d=r(8880),f=r(8052),p=r(5112),v=r(7497),g=r(3383),m=s.PROPER,y=s.CONFIGURABLE,b=g.IteratorPrototype,S=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),k="keys",C="values",x="entries",E=function(){return this};e.exports=function(e,t,r,s,p,g,_){c(r,t,s);var I,A,T,R=function(e){if(e===p&&P)return P;if(!S&&e in N)return N[e];switch(e){case k:case C:case x:return function(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",D=!1,N=e.prototype,L=N[w]||N["@@iterator"]||p&&N[p],P=!S&&L||R(p),M="Array"==t&&N.entries||L;if(M&&(I=u(M.call(new e)))!==Object.prototype&&I.next&&(o||u(I)===b||(l?l(I,b):a(I[w])||f(I,w,E)),h(I,O,!0,!0),o&&(v[O]=E)),m&&p==C&&L&&L.name!==C&&(!o&&y?d(N,"name",C):(D=!0,P=function(){return i(L,this)})),p)if(A={values:R(C),keys:g?P:R(k),entries:R(x)},_)for(T in A)(S||D||!(T in N))&&f(N,T,A[T]);else n({target:t,proto:!0,forced:S||D},A);return o&&!_||N[w]===P||f(N,w,P,{name:p}),v[t]=P,A}},3383:(e,t,r)=>{"use strict";var n,i,o,s=r(7293),a=r(614),c=r(111),u=r(30),l=r(9518),h=r(8052),d=r(5112),f=r(1913),p=d("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!c(n)||s((function(){var e={};return n[p].call(e)!==e}))?n={}:f&&(n=u(n)),a(n[p])||h(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7497:e=>{e.exports={}},6244:(e,t,r)=>{var n=r(7466);e.exports=function(e){return n(e.length)}},6339:(e,t,r)=>{var n=r(7293),i=r(614),o=r(2597),s=r(9781),a=r(6530).CONFIGURABLE,c=r(2788),u=r(9909),l=u.enforce,h=u.get,d=Object.defineProperty,f=s&&!n((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=String(String).split("String"),v=e.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),(!o(e,"name")||a&&e.name!==t)&&(s?d(e,"name",{value:t,configurable:!0}):e.name=t),f&&r&&o(r,"arity")&&e.length!==r.arity&&d(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=l(e);return o(n,"source")||(n.source=p.join("string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return i(this)&&h(this).source||c(this)}),"toString")},403:e=>{var t=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*r}},4758:e=>{var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},5948:(e,t,r)=>{var n,i,o,s,a,c,u,l,h=r(7854),d=r(9974),f=r(1236).f,p=r(261).set,v=r(6833),g=r(1528),m=r(1036),y=r(5268),b=h.MutationObserver||h.WebKitMutationObserver,S=h.document,w=h.process,k=h.Promise,C=f(h,"queueMicrotask"),x=C&&C.value;x||(n=function(){var e,t;for(y&&(e=w.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?s():o=void 0,e}}o=void 0,e&&e.enter()},v||y||m||!b||!S?!g&&k&&k.resolve?((u=k.resolve(void 0)).constructor=k,l=d(u.then,u),s=function(){l(n)}):y?s=function(){w.nextTick(n)}:(p=d(p,h),s=function(){p(n)}):(a=!0,c=S.createTextNode(""),new b(n).observe(c,{characterData:!0}),s=function(){c.data=a=!a})),e.exports=x||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,s()),o=t}},8523:(e,t,r)=>{"use strict";var n=r(9662),i=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw 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)}},3929:(e,t,r)=>{var n=r(7850),i=TypeError;e.exports=function(e){if(n(e))throw i("The method doesn't accept regular expressions");return e}},2814:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(1702),s=r(1340),a=r(3111).trim,c=r(1361),u=o("".charAt),l=n.parseFloat,h=n.Symbol,d=h&&h.iterator,f=1/l(c+"-0")!=-1/0||d&&!i((function(){l(Object(d))}));e.exports=f?function(e){var t=a(s(e)),r=l(t);return 0===r&&"-"==u(t,0)?-0:r}:l},3009:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(1702),s=r(1340),a=r(3111).trim,c=r(1361),u=n.parseInt,l=n.Symbol,h=l&&l.iterator,d=/^[+-]?0x/i,f=o(d.exec),p=8!==u(c+"08")||22!==u(c+"0x16")||h&&!i((function(){u(Object(h))}));e.exports=p?function(e,t){var r=a(s(e));return u(r,t>>>0||(f(d,r)?16:10))}:u},1574:(e,t,r)=>{"use strict";var n=r(9781),i=r(1702),o=r(6916),s=r(7293),a=r(1956),c=r(5181),u=r(5296),l=r(7908),h=r(8361),d=Object.assign,f=Object.defineProperty,p=i([].concat);e.exports=!d||s((function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=d({},e)[r]||a(d({},t)).join("")!=i}))?function(e,t){for(var r=l(e),i=arguments.length,s=1,d=c.f,f=u.f;i>s;)for(var v,g=h(arguments[s++]),m=d?p(a(g),d(g)):a(g),y=m.length,b=0;y>b;)v=m[b++],n&&!o(f,g,v)||(r[v]=g[v]);return r}:d},30:(e,t,r)=>{var n,i=r(9670),o=r(6048),s=r(748),a=r(3501),c=r(490),u=r(317),l=r(6200),h=l("IE_PROTO"),d=function(){},f=function(e){return"<script>"+e+"</"+"script>"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;v="undefined"!=typeof document?document.domain&&n?p(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):p(n);for(var r=s.length;r--;)delete v.prototype[s[r]];return v()};a[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(d.prototype=i(e),r=new d,d.prototype=null,r[h]=e):r=v(),void 0===t?r:o.f(r,t)}},6048:(e,t,r)=>{var n=r(9781),i=r(3353),o=r(3070),s=r(9670),a=r(5656),c=r(1956);t.f=n&&!i?Object.defineProperties:function(e,t){s(e);for(var r,n=a(t),i=c(t),u=i.length,l=0;u>l;)o.f(e,r=i[l++],n[r]);return e}},3070:(e,t,r)=>{var n=r(9781),i=r(4664),o=r(3353),s=r(9670),a=r(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";t.f=n?o?function(e,t,r){if(s(e),t=a(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&f in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:d in r?r.configurable:n.configurable,enumerable:h in r?r.enumerable:n.enumerable,writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(s(e),t=a(t),s(r),i)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1236:(e,t,r)=>{var n=r(9781),i=r(6916),o=r(5296),s=r(9114),a=r(5656),c=r(4948),u=r(2597),l=r(4664),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=a(e),t=c(t),l)try{return h(e,t)}catch(e){}if(u(e,t))return s(!i(o.f,e,t),e[t])}},1156:(e,t,r)=>{var n=r(4326),i=r(5656),o=r(8006).f,s=r(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"==n(e)?function(e){try{return o(e)}catch(e){return s(a)}}(e):o(i(e))}},8006:(e,t,r)=>{var n=r(6324),i=r(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,r)=>{var n=r(2597),i=r(614),o=r(7908),s=r(6200),a=r(8544),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=a?u.getPrototypeOf:function(e){var t=o(e);if(n(t,c))return t[c];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof u?l:null}},2050:(e,t,r)=>{var n=r(7293),i=r(111),o=r(4326),s=r(7556),a=Object.isExtensible,c=n((function(){a(1)}));e.exports=c||s?function(e){return!!i(e)&&((!s||"ArrayBuffer"!=o(e))&&(!a||a(e)))}:a},7976:(e,t,r)=>{var n=r(1702);e.exports=n({}.isPrototypeOf)},6324:(e,t,r)=>{var n=r(1702),i=r(2597),o=r(5656),s=r(1318).indexOf,a=r(3501),c=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&c(l,r);for(;t.length>u;)i(n,r=t[u++])&&(~s(l,r)||c(l,r));return l}},1956:(e,t,r)=>{var n=r(6324),i=r(748);e.exports=Object.keys||function(e){return n(e,i)}},5296:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7674:(e,t,r)=>{var n=r(1702),i=r(9670),o=r(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return i(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},4699:(e,t,r)=>{var n=r(9781),i=r(1702),o=r(1956),s=r(5656),a=i(r(5296).f),c=i([].push),u=function(e){return function(t){for(var r,i=s(t),u=o(i),l=u.length,h=0,d=[];l>h;)r=u[h++],n&&!a(i,r)||c(d,e?[r,i[r]]:i[r]);return d}};e.exports={entries:u(!0),values:u(!1)}},288:(e,t,r)=>{"use strict";var n=r(1694),i=r(648);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(e,t,r)=>{var n=r(6916),i=r(614),o=r(111),s=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!o(a=n(r,e)))return a;if(i(r=e.valueOf)&&!o(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!o(a=n(r,e)))return a;throw s("Can't convert object to primitive value")}},3887:(e,t,r)=>{var n=r(5005),i=r(1702),o=r(8006),s=r(5181),a=r(9670),c=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=s.f;return r?c(t,r(e)):t}},857:(e,t,r)=>{var n=r(7854);e.exports=n},2534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:(e,t,r)=>{var n=r(7854),i=r(2492),o=r(614),s=r(4705),a=r(2788),c=r(5112),u=r(7871),l=r(3823),h=r(1913),d=r(7392),f=i&&i.prototype,p=c("species"),v=!1,g=o(n.PromiseRejectionEvent),m=s("Promise",(function(){var e=a(i),t=e!==String(i);if(!t&&66===d)return!0;if(h&&(!f.catch||!f.finally))return!0;if(!d||d<51||!/native code/.test(e)){var r=new i((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[p]=n,!(v=r.then((function(){}))instanceof n))return!0}return!t&&(u||l)&&!g}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:v}},2492:(e,t,r)=>{var n=r(7854);e.exports=n.Promise},9478:(e,t,r)=>{var n=r(9670),i=r(111),o=r(8523);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},612:(e,t,r)=>{var n=r(2492),i=r(7072),o=r(3702).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},8572:e=>{var t=function(){this.head=null,this.tail=null};t.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}},e.exports=t},7651:(e,t,r)=>{var n=r(6916),i=r(9670),o=r(614),s=r(4326),a=r(2261),c=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var u=n(r,e,t);return null!==u&&i(u),u}if("RegExp"===s(e))return n(a,e,t);throw c("RegExp#exec called on incompatible receiver")}},2261:(e,t,r)=>{"use strict";var n,i,o=r(6916),s=r(1702),a=r(1340),c=r(7066),u=r(2999),l=r(2309),h=r(30),d=r(9909).get,f=r(9441),p=r(7168),v=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,y=s("".charAt),b=s("".indexOf),S=s("".replace),w=s("".slice),k=(i=/b*/g,o(g,n=/a/,"a"),o(g,i,"a"),0!==n.lastIndex||0!==i.lastIndex),C=u.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(k||x||C||f||p)&&(m=function(e){var t,r,n,i,s,u,l,f=this,p=d(f),E=a(e),_=p.raw;if(_)return _.lastIndex=f.lastIndex,t=o(m,_,E),f.lastIndex=_.lastIndex,t;var I=p.groups,A=C&&f.sticky,T=o(c,f),R=f.source,O=0,D=E;if(A&&(T=S(T,"y",""),-1===b(T,"g")&&(T+="g"),D=w(E,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==y(E,f.lastIndex-1))&&(R="(?: "+R+")",D=" "+D,O++),r=new RegExp("^(?:"+R+")",T)),x&&(r=new RegExp("^"+R+"$(?!\\s)",T)),k&&(n=f.lastIndex),i=o(g,A?r:f,D),A?i?(i.input=w(i.input,O),i[0]=w(i[0],O),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:k&&i&&(f.lastIndex=f.global?i.index+i[0].length:n),x&&i&&i.length>1&&o(v,i[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&I)for(i.groups=u=h(null),s=0;s<I.length;s++)u[(l=I[s])[0]]=i[l[1]];return i}),e.exports=m},7066:(e,t,r)=>{"use strict";var n=r(9670);e.exports=function(){var e=n(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}},4706:(e,t,r)=>{var n=r(6916),i=r(2597),o=r(7976),s=r(7066),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||i(e,"flags")||!o(a,e)?t:n(s,e)}},2999:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),s=o||n((function(){return!i("a","y").sticky})),a=o||n((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},9441:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,r)=>{var n=r(8554),i=TypeError;e.exports=function(e){if(n(e))throw i("Can't call method on "+e);return e}},7152:(e,t,r)=>{var n=r(7854),i=r(2104),o=r(614),s=r(8113),a=r(206),c=r(8053),u=/MSIE .\./.test(s),l=n.Function,h=function(e){return u?function(t,r){var n=c(arguments.length,1)>2,s=o(t)?t:l(t),u=n?a(arguments,2):void 0;return e(n?function(){i(s,this,u)}:s,r)}:e};e.exports={setTimeout:h(n.setTimeout),setInterval:h(n.setInterval)}},6340:(e,t,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),s=r(9781),a=o("species");e.exports=function(e){var t=n(e),r=i.f;s&&t&&!t[a]&&r(t,a,{configurable:!0,get:function(){return this}})}},8003:(e,t,r)=>{var n=r(3070).f,i=r(2597),o=r(5112)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},6200:(e,t,r)=>{var n=r(2309),i=r(9711),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,r)=>{var n=r(7854),i=r(3072),o="__core-js_shared__",s=n[o]||i(o,{});e.exports=s},2309:(e,t,r)=>{var n=r(1913),i=r(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.0",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(e,t,r)=>{var n=r(9670),i=r(9483),o=r(8554),s=r(5112)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||o(r=n(a)[s])?t:i(r)}},3429:(e,t,r)=>{var n=r(7293);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},8710:(e,t,r)=>{var n=r(1702),i=r(9303),o=r(1340),s=r(4488),a=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,h=o(s(t)),d=i(r),f=h.length;return d<0||d>=f?e?"":void 0:(n=c(h,d))<55296||n>56319||d+1===f||(l=c(h,d+1))<56320||l>57343?e?a(h,d):n:e?u(h,d,d+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},8415:(e,t,r)=>{"use strict";var n=r(9303),i=r(1340),o=r(4488),s=RangeError;e.exports=function(e){var t=i(o(this)),r="",a=n(e);if(a<0||a==1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},3111:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),s=r(1361),a=n("".replace),c="["+s+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),h=function(e){return function(t){var r=o(i(t));return 1&e&&(r=a(r,u,"")),2&e&&(r=a(r,l,"")),r}};e.exports={start:h(1),end:h(2),trim:h(3)}},6293:(e,t,r)=>{var n=r(7392),i=r(7293);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},6532:(e,t,r)=>{var n=r(6916),i=r(5005),o=r(5112),s=r(8052);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,a=o("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return n(r,this)}),{arity:1})}},2015:(e,t,r)=>{var n=r(6293);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},261:(e,t,r)=>{var n,i,o,s,a=r(7854),c=r(2104),u=r(9974),l=r(614),h=r(2597),d=r(7293),f=r(490),p=r(206),v=r(317),g=r(8053),m=r(6833),y=r(5268),b=a.setImmediate,S=a.clearImmediate,w=a.process,k=a.Dispatch,C=a.Function,x=a.MessageChannel,E=a.String,_=0,I={},A="onreadystatechange";try{n=a.location}catch(e){}var T=function(e){if(h(I,e)){var t=I[e];delete I[e],t()}},R=function(e){return function(){T(e)}},O=function(e){T(e.data)},D=function(e){a.postMessage(E(e),n.protocol+"//"+n.host)};b&&S||(b=function(e){g(arguments.length,1);var t=l(e)?e:C(e),r=p(arguments,1);return I[++_]=function(){c(t,void 0,r)},i(_),_},S=function(e){delete I[e]},y?i=function(e){w.nextTick(R(e))}:k&&k.now?i=function(e){k.now(R(e))}:x&&!m?(s=(o=new x).port2,o.port1.onmessage=O,i=u(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!d(D)?(i=D,a.addEventListener("message",O,!1)):i=A in v("script")?function(e){f.appendChild(v("script")).onreadystatechange=function(){f.removeChild(this),T(e)}}:function(e){setTimeout(R(e),0)}),e.exports={set:b,clear:S}},863:(e,t,r)=>{var n=r(1702);e.exports=n(1..valueOf)},1400:(e,t,r)=>{var n=r(9303),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},4599:(e,t,r)=>{var n=r(7593),i=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw i("Can't convert number to bigint");return BigInt(t)}},7067:(e,t,r)=>{var n=r(9303),i=r(7466),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=i(t);if(t!==r)throw o("Wrong length or index");return r}},5656:(e,t,r)=>{var n=r(8361),i=r(4488);e.exports=function(e){return n(i(e))}},9303:(e,t,r)=>{var n=r(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},7466:(e,t,r)=>{var n=r(9303),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},7908:(e,t,r)=>{var n=r(4488),i=Object;e.exports=function(e){return i(n(e))}},4590:(e,t,r)=>{var n=r(3002),i=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw i("Wrong offset");return r}},3002:(e,t,r)=>{var n=r(9303),i=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw i("The argument can't be less than 0");return t}},7593:(e,t,r)=>{var n=r(6916),i=r(111),o=r(2190),s=r(8173),a=r(2140),c=r(5112),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,c=s(e,l);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!i(r)||o(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},4948:(e,t,r)=>{var n=r(7593),i=r(2190);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},1694:(e,t,r)=>{var n={};n[r(5112)("toStringTag")]="z",e.exports="[object z]"===String(n)},1340:(e,t,r)=>{var n=r(648),i=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},6330:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9843:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),s=r(9781),a=r(3832),c=r(260),u=r(3331),l=r(5787),h=r(9114),d=r(8880),f=r(5988),p=r(7466),v=r(7067),g=r(4590),m=r(4948),y=r(2597),b=r(648),S=r(111),w=r(2190),k=r(30),C=r(7976),x=r(7674),E=r(8006).f,_=r(7321),I=r(2092).forEach,A=r(6340),T=r(3070),R=r(1236),O=r(9909),D=r(9587),N=O.get,L=O.set,P=O.enforce,M=T.f,B=R.f,j=Math.round,G=i.RangeError,H=u.ArrayBuffer,U=H.prototype,K=u.DataView,F=c.NATIVE_ARRAY_BUFFER_VIEWS,V=c.TYPED_ARRAY_TAG,Y=c.TypedArray,z=c.TypedArrayPrototype,X=c.aTypedArrayConstructor,W=c.isTypedArray,q="BYTES_PER_ELEMENT",$="Wrong length",Z=function(e,t){X(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},J=function(e,t){M(e,t,{get:function(){return N(this)[t]}})},Q=function(e){var t;return C(U,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},ee=function(e,t){return W(e)&&!w(t)&&t in e&&f(+t)&&t>=0},te=function(e,t){return t=m(t),ee(e,t)?h(2,e[t]):B(e,t)},re=function(e,t,r){return t=m(t),!(ee(e,t)&&S(r)&&y(r,"value"))||y(r,"get")||y(r,"set")||r.configurable||y(r,"writable")&&!r.writable||y(r,"enumerable")&&!r.enumerable?M(e,t,r):(e[t]=r.value,e)};s?(F||(R.f=te,T.f=re,J(z,"buffer"),J(z,"byteOffset"),J(z,"byteLength"),J(z,"length")),n({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var s=e.match(/\d+$/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,h="set"+e,f=i[c],m=f,y=m&&m.prototype,b={},w=function(e,t){M(e,t,{get:function(){return function(e,t){var r=N(e);return r.view[u](t*s+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=N(e);r&&(n=(n=j(n))<0?0:n>255?255:255&n),i.view[h](t*s+i.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};F?a&&(m=t((function(e,t,r,n){return l(e,y),D(S(t)?Q(t)?void 0!==n?new f(t,g(r,s),n):void 0!==r?new f(t,g(r,s)):new f(t):W(t)?Z(m,t):o(_,m,t):new f(v(t)),e,m)})),x&&x(m,Y),I(E(f),(function(e){e in m||d(m,e,f[e])})),m.prototype=y):(m=t((function(e,t,r,n){l(e,y);var i,a,c,u=0,h=0;if(S(t)){if(!Q(t))return W(t)?Z(m,t):o(_,m,t);i=t,h=g(r,s);var d=t.byteLength;if(void 0===n){if(d%s)throw G($);if((a=d-h)<0)throw G($)}else if((a=p(n)*s)+h>d)throw G($);c=a/s}else c=v(t),i=new H(a=c*s);for(L(e,{buffer:i,byteOffset:h,byteLength:a,length:c,view:new K(i)});u<c;)w(e,u++)})),x&&x(m,Y),y=m.prototype=k(z)),y.constructor!==m&&d(y,"constructor",m),P(y).TypedArrayConstructor=m,V&&d(y,V,c);var C=m!=f;b[c]=m,n({global:!0,constructor:!0,forced:C,sham:!F},b),q in m||d(m,q,s),q in y||d(y,q,s),A(c)}):e.exports=function(){}},3832:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(7072),s=r(260).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,c=n.Int8Array;e.exports=!s||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new a(2),1,void 0).length}))},3074:(e,t,r)=>{var n=r(7745),i=r(6304);e.exports=function(e,t){return n(i(e),t)}},7321:(e,t,r)=>{var n=r(9974),i=r(6916),o=r(9483),s=r(7908),a=r(6244),c=r(4121),u=r(1246),l=r(7659),h=r(4067),d=r(260).aTypedArrayConstructor,f=r(4599);e.exports=function(e){var t,r,p,v,g,m,y,b,S=o(this),w=s(e),k=arguments.length,C=k>1?arguments[1]:void 0,x=void 0!==C,E=u(w);if(E&&!l(E))for(b=(y=c(w,E)).next,w=[];!(m=i(b,y)).done;)w.push(m.value);for(x&&k>2&&(C=n(C,arguments[2])),r=a(w),p=new(d(S))(r),v=h(p),t=0;r>t;t++)g=x?C(w[t],t):w[t],p[t]=v?f(g):+g;return p}},6304:(e,t,r)=>{var n=r(260),i=r(6707),o=n.aTypedArrayConstructor,s=n.getTypedArrayConstructor;e.exports=function(e){return o(i(e,s(e)))}},9711:(e,t,r)=>{var n=r(1702),i=0,o=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+o,36)}},3307:(e,t,r)=>{var n=r(6293);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(e,t,r)=>{var n=r(9781),i=r(7293);e.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:e=>{var t=TypeError;e.exports=function(e,r){if(e<r)throw t("Not enough arguments");return e}},4811:(e,t,r)=>{var n=r(7854),i=r(614),o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},6800:(e,t,r)=>{var n=r(857),i=r(2597),o=r(6061),s=r(3070).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||s(t,e,{value:o.f(e)})}},6061:(e,t,r)=>{var n=r(5112);t.f=n},5112:(e,t,r)=>{var n=r(7854),i=r(2309),o=r(2597),s=r(9711),a=r(6293),c=r(3307),u=i("wks"),l=n.Symbol,h=l&&l.for,d=c?l:l&&l.withoutSetter||s;e.exports=function(e){if(!o(u,e)||!a&&"string"!=typeof u[e]){var t="Symbol."+e;a&&o(l,e)?u[e]=l[e]:u[e]=c&&h?h(t):d(t)}return u[e]}},1361:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(7293),s=r(3331),a=r(9670),c=r(1400),u=r(7466),l=r(6707),h=s.ArrayBuffer,d=s.DataView,f=d.prototype,p=i(h.prototype.slice),v=i(f.getUint8),g=i(f.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(p&&void 0===t)return p(a(this),e);for(var r=a(this).byteLength,n=c(e,r),i=c(void 0===t?r:t,r),o=new(l(this,h))(u(i-n)),s=new d(this),f=new d(o),m=0;n<i;)g(f,m++,v(s,n++));return o}})},2222:(e,t,r)=>{"use strict";var n=r(2109),i=r(7293),o=r(3157),s=r(111),a=r(7908),c=r(6244),u=r(7207),l=r(6135),h=r(5417),d=r(1194),f=r(5112),p=r(7392),v=f("isConcatSpreadable"),g=p>=51||!i((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),m=d("concat"),y=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,arity:1,forced:!g||!m},{concat:function(e){var t,r,n,i,o,s=a(this),d=h(s,0),f=0;for(t=-1,n=arguments.length;t<n;t++)if(y(o=-1===t?s:arguments[t]))for(i=c(o),u(f+i),r=0;r<i;r++,f++)r in o&&l(d,f,o[r]);else u(f+1),l(d,f++,o);return d.length=f,d}})},6541:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).every;n({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},3290:(e,t,r)=>{var n=r(2109),i=r(1285),o=r(1223);n({target:"Array",proto:!0},{fill:i}),o("fill")},7327:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},4553:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).findIndex,o=r(1223),s="findIndex",a=!0;s in[]&&Array(1).findIndex((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},9826:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),s="find",a=!0;s in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},9554:(e,t,r)=>{"use strict";var n=r(2109),i=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},1038:(e,t,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(e){Array.from(e)}))},{from:i})},6699:(e,t,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(7293),s=r(1223);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},2772:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(1318).indexOf,s=r(9341),a=i([].indexOf),c=!!a&&1/a([1],1,-0)<0,u=s("indexOf");n({target:"Array",proto:!0,forced:c||!u},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?a(this,e,t)||0:o(this,e,t)}})},9753:(e,t,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(e,t,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),s=r(9909),a=r(3070).f,c=r(1656),u=r(6178),l=r(1913),h=r(9781),d="Array Iterator",f=s.set,p=s.getterFor(d);e.exports=c(Array,"Array",(function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(e){}},1249:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},7042:(e,t,r)=>{"use strict";var n=r(2109),i=r(3157),o=r(4411),s=r(111),a=r(1400),c=r(6244),u=r(5656),l=r(6135),h=r(5112),d=r(1194),f=r(206),p=d("slice"),v=h("species"),g=Array,m=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var r,n,h,d=u(this),p=c(d),y=a(e,p),b=a(void 0===t?p:t,p);if(i(d)&&(r=d.constructor,(o(r)&&(r===g||i(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return f(d,y,b);for(n=new(void 0===r?g:r)(m(b-y,0)),h=0;y<b;y++,h++)y in d&&l(n,h,d[y]);return n.length=h,n}})},5212:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).some;n({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},561:(e,t,r)=>{"use strict";var n=r(2109),i=r(7908),o=r(1400),s=r(9303),a=r(6244),c=r(3658),u=r(7207),l=r(5417),h=r(6135),d=r(5117),f=r(1194)("splice"),p=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var r,n,f,g,m,y,b=i(this),S=a(b),w=o(e,S),k=arguments.length;for(0===k?r=n=0:1===k?(r=0,n=S-w):(r=k-2,n=v(p(s(t),0),S-w)),u(S+r-n),f=l(b,n),g=0;g<n;g++)(m=w+g)in b&&h(f,g,b[m]);if(f.length=n,r<n){for(g=w;g<S-n;g++)y=g+r,(m=g+n)in b?b[y]=b[m]:d(b,y);for(g=S;g>S-n+r;g--)d(b,g-1)}else if(r>n)for(g=S-n;g>w;g--)y=g+r-1,(m=g+n-1)in b?b[y]=b[m]:d(b,y);for(g=0;g<r;g++)b[g+w]=arguments[g+2];return c(b,S-n+r),f}})},3843:(e,t,r)=>{var n=r(2109),i=r(1702),o=Date,s=i(o.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return s(new o)}})},3710:(e,t,r)=>{var n=r(1702),i=r(8052),o=Date.prototype,s="Invalid Date",a="toString",c=n(o.toString),u=n(o.getTime);String(new Date(NaN))!=s&&i(o,a,(function(){var e=u(this);return e==e?c(this):s}))},4812:(e,t,r)=>{var n=r(2109),i=r(7065);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},8309:(e,t,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(1702),s=r(3070).f,a=Function.prototype,c=o(a.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);n&&!i&&s(a,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},8862:(e,t,r)=>{var n=r(2109),i=r(5005),o=r(2104),s=r(6916),a=r(1702),c=r(7293),u=r(3157),l=r(614),h=r(111),d=r(2190),f=r(206),p=r(6293),v=i("JSON","stringify"),g=a(/./.exec),m=a("".charAt),y=a("".charCodeAt),b=a("".replace),S=a(1..toString),w=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,x=!p||c((function(){var e=i("Symbol")();return"[null]"!=v([e])||"{}"!=v({a:e})||"{}"!=v(Object(e))})),E=c((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),_=function(e,t){var r=f(arguments),n=t;if((h(t)||void 0!==e)&&!d(e))return u(t)||(t=function(e,t){if(l(n)&&(t=s(n,this,e,t)),!d(t))return t}),r[1]=t,o(v,null,r)},I=function(e,t,r){var n=m(r,t-1),i=m(r,t+1);return g(k,e)&&!g(C,i)||g(C,e)&&!g(k,n)?"\\u"+S(y(e,0),16):e};v&&n({target:"JSON",stat:!0,arity:3,forced:x||E},{stringify:function(e,t,r){var n=f(arguments),i=o(x?_:v,null,n);return E&&"string"==typeof i?b(i,w,I):i}})},9098:(e,t,r)=>{"use strict";r(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(5631))},1532:(e,t,r)=>{r(9098)},658:(e,t,r)=>{r(2109)({target:"Math",stat:!0},{log10:r(403)})},3689:(e,t,r)=>{r(2109)({target:"Math",stat:!0},{trunc:r(4758)})},9653:(e,t,r)=>{"use strict";var n=r(9781),i=r(7854),o=r(1702),s=r(4705),a=r(8052),c=r(2597),u=r(9587),l=r(7976),h=r(2190),d=r(7593),f=r(7293),p=r(8006).f,v=r(1236).f,g=r(3070).f,m=r(863),y=r(3111).trim,b="Number",S=i.Number,w=S.prototype,k=i.TypeError,C=o("".slice),x=o("".charCodeAt),E=function(e){var t=d(e,"number");return"bigint"==typeof t?t:_(t)},_=function(e){var t,r,n,i,o,s,a,c,u=d(e,"number");if(h(u))throw k("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=y(u),43===(t=x(u,0))||45===t){if(88===(r=x(u,2))||120===r)return NaN}else if(48===t){switch(x(u,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+u}for(s=(o=C(u,2)).length,a=0;a<s;a++)if((c=x(o,a))<48||c>i)return NaN;return parseInt(o,n)}return+u};if(s(b,!S(" 0o1")||!S("0b1")||S("+0x1"))){for(var I,A=function(e){var t=arguments.length<1?0:S(E(e)),r=this;return l(w,r)&&f((function(){m(r)}))?u(Object(t),r,A):t},T=n?p(S):"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(","),R=0;T.length>R;R++)c(S,I=T[R])&&!c(A,I)&&g(A,I,v(S,I));A.prototype=w,w.constructor=A,a(i,b,A,{constructor:!0})}},6977:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9303),s=r(863),a=r(8415),c=r(7293),u=RangeError,l=String,h=Math.floor,d=i(a),f=i("".slice),p=i(1..toFixed),v=function(e,t,r){return 0===t?r:t%2==1?v(e,t-1,r*e):v(e*e,t/2,r)},g=function(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=h(i/1e7)},m=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=h(n/t),n=n%t*1e7},y=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=l(e[t]);r=""===r?n:r+d("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:c((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!c((function(){p({})}))},{toFixed:function(e){var t,r,n,i,a=s(this),c=o(e),h=[0,0,0,0,0,0],p="",b="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return l(a);if(a<0&&(p="-",a=-a),a>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(a*v(2,69,1))-69)<0?a*v(2,-t,1):a/v(2,t,1),r*=4503599627370496,(t=52-t)>0){for(g(h,0,r),n=c;n>=7;)g(h,1e7,0),n-=7;for(g(h,v(10,n,1),0),n=t-1;n>=23;)m(h,1<<23),n-=23;m(h,1<<n),g(h,1,1),m(h,2),b=y(h)}else g(h,0,r),g(h,1<<-t,0),b=y(h)+d("0",c);return b=c>0?p+((i=b.length)<=c?"0."+d("0",c-i)+b:f(b,0,i-c)+"."+f(b,i-c)):p+b}})},9601:(e,t,r)=>{var n=r(2109),i=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9660:(e,t,r)=>{var n=r(2109),i=r(6293),o=r(7293),s=r(5181),a=r(7908);n({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},7941:(e,t,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},1539:(e,t,r)=>{var n=r(1694),i=r(8052),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(e,t,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},4678:(e,t,r)=>{var n=r(2109),i=r(2814);n({global:!0,forced:parseFloat!=i},{parseFloat:i})},1058:(e,t,r)=>{var n=r(2109),i=r(3009);n({global:!0,forced:parseInt!=i},{parseInt:i})},821:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),s=r(8523),a=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{all:function(e){var t=this,r=s.f(t),n=r.resolve,u=r.reject,l=a((function(){var r=o(t.resolve),s=[],a=0,l=1;c(e,(function(e){var o=a++,c=!1;l++,i(r,t,e).then((function(e){c||(c=!0,s[o]=e,--l||n(s))}),u)})),--l||n(s)}));return l.error&&u(l.value),r.promise}})},4164:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3702).CONSTRUCTOR,s=r(2492),a=r(5005),c=r(614),u=r(8052),l=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&c(s)){var h=a("Promise").prototype.catch;l.catch!==h&&u(l,"catch",h,{unsafe:!0})}},3401:(e,t,r)=>{"use strict";var n,i,o,s=r(2109),a=r(1913),c=r(5268),u=r(7854),l=r(6916),h=r(8052),d=r(7674),f=r(8003),p=r(6340),v=r(9662),g=r(614),m=r(111),y=r(5787),b=r(6707),S=r(261).set,w=r(5948),k=r(842),C=r(2534),x=r(8572),E=r(9909),_=r(2492),I=r(3702),A=r(8523),T="Promise",R=I.CONSTRUCTOR,O=I.REJECTION_EVENT,D=I.SUBCLASSING,N=E.getterFor(T),L=E.set,P=_&&_.prototype,M=_,B=P,j=u.TypeError,G=u.document,H=u.process,U=A.f,K=U,F=!!(G&&G.createEvent&&u.dispatchEvent),V="unhandledrejection",Y=function(e){var t;return!(!m(e)||!g(t=e.then))&&t},z=function(e,t){var r,n,i,o=t.value,s=1==t.state,a=s?e.ok:e.fail,c=e.resolve,u=e.reject,h=e.domain;try{a?(s||(2===t.rejection&&Z(t),t.rejection=1),!0===a?r=o:(h&&h.enter(),r=a(o),h&&(h.exit(),i=!0)),r===e.promise?u(j("Promise-chain cycle")):(n=Y(r))?l(n,r,c,u):c(r)):u(o)}catch(e){h&&!i&&h.exit(),u(e)}},X=function(e,t){e.notified||(e.notified=!0,w((function(){for(var r,n=e.reactions;r=n.get();)z(r,e);e.notified=!1,t&&!e.rejection&&q(e)})))},W=function(e,t,r){var n,i;F?((n=G.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!O&&(i=u["on"+e])?i(n):e===V&&k("Unhandled promise rejection",r)},q=function(e){l(S,u,(function(){var t,r=e.facade,n=e.value;if($(e)&&(t=C((function(){c?H.emit("unhandledRejection",n,r):W(V,r,n)})),e.rejection=c||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){l(S,u,(function(){var t=e.facade;c?H.emit("rejectionHandled",t):W("rejectionhandled",t,e.value)}))},J=function(e,t,r){return function(n){e(t,n,r)}},Q=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,X(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw j("Promise can't be resolved itself");var n=Y(t);n?w((function(){var r={done:!1};try{l(n,t,J(ee,r,e),J(Q,r,e))}catch(t){Q(r,t,e)}})):(e.value=t,e.state=1,X(e,!1))}catch(t){Q({done:!1},t,e)}}};if(R&&(B=(M=function(e){y(this,B),v(e),l(n,this);var t=N(this);try{e(J(ee,t),J(Q,t))}catch(e){Q(t,e)}}).prototype,(n=function(e){L(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:void 0})}).prototype=h(B,"then",(function(e,t){var r=N(this),n=U(b(this,M));return r.parent=!0,n.ok=!g(e)||e,n.fail=g(t)&&t,n.domain=c?H.domain:void 0,0==r.state?r.reactions.add(n):w((function(){z(n,r)})),n.promise})),i=function(){var e=new n,t=N(e);this.promise=e,this.resolve=J(ee,t),this.reject=J(Q,t)},A.f=U=function(e){return e===M||undefined===e?new i(e):K(e)},!a&&g(_)&&P!==Object.prototype)){o=P.then,D||h(P,"then",(function(e,t){var r=this;return new M((function(e,t){l(o,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete P.constructor}catch(e){}d&&d(P,B)}s({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:M}),f(M,T,!1,!0),p(T)},7727:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(2492),s=r(7293),a=r(5005),c=r(614),u=r(6707),l=r(9478),h=r(8052),d=o&&o.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s((function(){d.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,a("Promise")),r=c(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)}}),!i&&c(o)){var f=a("Promise").prototype.finally;d.finally!==f&&h(d,"finally",f,{unsafe:!0})}},8674:(e,t,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(9662),s=r(8523),a=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(e){var t=this,r=s.f(t),n=r.reject,u=a((function(){var s=o(t.resolve);c(e,(function(e){i(s,t,e).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},683:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return i(t.reject,void 0,e),t.promise}})},6294:(e,t,r)=>{"use strict";var n=r(2109),i=r(5005),o=r(1913),s=r(2492),a=r(3702).CONSTRUCTOR,c=r(9478),u=i("Promise"),l=o&&!a;n({target:"Promise",stat:!0,forced:o||a},{resolve:function(e){return c(l&&this===u?s:this,e)}})},2419:(e,t,r)=>{var n=r(2109),i=r(5005),o=r(2104),s=r(7065),a=r(9483),c=r(9670),u=r(111),l=r(30),h=r(7293),d=i("Reflect","construct"),f=Object.prototype,p=[].push,v=h((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),g=!h((function(){d((function(){}))})),m=v||g;n({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(e,t){a(e),c(t);var r=arguments.length<3?e:a(arguments[2]);if(g&&!v)return d(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return o(p,n,t),new(o(s,e,n))}var i=r.prototype,h=l(u(i)?i:f),m=o(e,h,t);return u(m)?m:h}})},4916:(e,t,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(e,t,r)=>{"use strict";var n=r(6530).PROPER,i=r(8052),o=r(9670),s=r(1340),a=r(7293),c=r(4706),u="toString",l=RegExp.prototype.toString,h=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d=n&&l.name!=u;(h||d)&&i(RegExp.prototype,u,(function(){var e=o(this);return"/"+s(e.source)+"/"+s(c(e))}),{unsafe:!0})},2023:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3929),s=r(4488),a=r(1340),c=r(4964),u=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(a(s(this)),a(o(e)),arguments.length>1?arguments[1]:void 0)}})},8783:(e,t,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),s=r(1656),a=r(6178),c="String Iterator",u=o.set,l=o.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),r=t.string,i=t.index;return i>=r.length?a(void 0,!0):(e=n(r,i),t.index+=e.length,a(e,!1))}))},9254:(e,t,r)=>{"use strict";var n=r(2109),i=r(4230);n({target:"String",proto:!0,forced:r(3429)("link")},{link:function(e){return i(this,"a","href",e)}})},4723:(e,t,r)=>{"use strict";var n=r(6916),i=r(7007),o=r(9670),s=r(8554),a=r(7466),c=r(1340),u=r(4488),l=r(8173),h=r(1530),d=r(7651);i("match",(function(e,t,r){return[function(t){var r=u(this),i=s(t)?void 0:l(t,e);return i?n(i,t,r):new RegExp(t)[e](c(r))},function(e){var n=o(this),i=c(e),s=r(t,n,i);if(s.done)return s.value;if(!n.global)return d(n,i);var u=n.unicode;n.lastIndex=0;for(var l,f=[],p=0;null!==(l=d(n,i));){var v=c(l[0]);f[p]=v,""===v&&(n.lastIndex=h(i,a(n.lastIndex),u)),p++}return 0===p?null:f}]}))},5306:(e,t,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),s=r(7007),a=r(7293),c=r(9670),u=r(614),l=r(8554),h=r(9303),d=r(7466),f=r(1340),p=r(4488),v=r(1530),g=r(8173),m=r(647),y=r(7651),b=r(5112)("replace"),S=Math.max,w=Math.min,k=o([].concat),C=o([].push),x=o("".indexOf),E=o("".slice),_="$0"==="a".replace(/./,"$0"),I=!!/./[b]&&""===/./[b]("a","$0");s("replace",(function(e,t,r){var o=I?"$":"$0";return[function(e,r){var n=p(this),o=l(e)?void 0:g(e,b);return o?i(o,e,n,r):i(t,f(n),e,r)},function(e,i){var s=c(this),a=f(e);if("string"==typeof i&&-1===x(i,o)&&-1===x(i,"$<")){var l=r(t,s,a,i);if(l.done)return l.value}var p=u(i);p||(i=f(i));var g=s.global;if(g){var b=s.unicode;s.lastIndex=0}for(var _=[];;){var I=y(s,a);if(null===I)break;if(C(_,I),!g)break;""===f(I[0])&&(s.lastIndex=v(a,d(s.lastIndex),b))}for(var A,T="",R=0,O=0;O<_.length;O++){for(var D=f((I=_[O])[0]),N=S(w(h(I.index),a.length),0),L=[],P=1;P<I.length;P++)C(L,void 0===(A=I[P])?A:String(A));var M=I.groups;if(p){var B=k([D],L,N,a);void 0!==M&&C(B,M);var j=f(n(i,void 0,B))}else j=m(D,a,N,L,M,i);N>=R&&(T+=E(a,R,N)+j,R=N+D.length)}return T+E(a,R)}]}),!!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!_||I)},4032:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),s=r(1702),a=r(1913),c=r(9781),u=r(6293),l=r(7293),h=r(2597),d=r(7976),f=r(9670),p=r(5656),v=r(4948),g=r(1340),m=r(9114),y=r(30),b=r(1956),S=r(8006),w=r(1156),k=r(5181),C=r(1236),x=r(3070),E=r(6048),_=r(5296),I=r(8052),A=r(2309),T=r(6200),R=r(3501),O=r(9711),D=r(5112),N=r(6061),L=r(6800),P=r(6532),M=r(8003),B=r(9909),j=r(2092).forEach,G=T("hidden"),H="Symbol",U=B.set,K=B.getterFor(H),F=Object.prototype,V=i.Symbol,Y=V&&V.prototype,z=i.TypeError,X=i.QObject,W=C.f,q=x.f,$=w.f,Z=_.f,J=s([].push),Q=A("symbols"),ee=A("op-symbols"),te=A("wks"),re=!X||!X.prototype||!X.prototype.findChild,ne=c&&l((function(){return 7!=y(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=W(F,t);n&&delete F[t],q(e,t,r),n&&e!==F&&q(F,t,n)}:q,ie=function(e,t){var r=Q[e]=y(Y);return U(r,{type:H,tag:e,description:t}),c||(r.description=t),r},oe=function(e,t,r){e===F&&oe(ee,t,r),f(e);var n=v(t);return f(r),h(Q,n)?(r.enumerable?(h(e,G)&&e[G][n]&&(e[G][n]=!1),r=y(r,{enumerable:m(0,!1)})):(h(e,G)||q(e,G,m(1,{})),e[G][n]=!0),ne(e,n,r)):q(e,n,r)},se=function(e,t){f(e);var r=p(t),n=b(r).concat(le(r));return j(n,(function(t){c&&!o(ae,r,t)||oe(e,t,r[t])})),e},ae=function(e){var t=v(e),r=o(Z,this,t);return!(this===F&&h(Q,t)&&!h(ee,t))&&(!(r||!h(this,t)||!h(Q,t)||h(this,G)&&this[G][t])||r)},ce=function(e,t){var r=p(e),n=v(t);if(r!==F||!h(Q,n)||h(ee,n)){var i=W(r,n);return!i||!h(Q,n)||h(r,G)&&r[G][n]||(i.enumerable=!0),i}},ue=function(e){var t=$(p(e)),r=[];return j(t,(function(e){h(Q,e)||h(R,e)||J(r,e)})),r},le=function(e){var t=e===F,r=$(t?ee:p(e)),n=[];return j(r,(function(e){!h(Q,e)||t&&!h(F,e)||J(n,Q[e])})),n};u||(I(Y=(V=function(){if(d(Y,this))throw z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=O(e),r=function(e){this===F&&o(r,ee,e),h(this,G)&&h(this[G],t)&&(this[G][t]=!1),ne(this,t,m(1,e))};return c&&re&&ne(F,t,{configurable:!0,set:r}),ie(t,e)}).prototype,"toString",(function(){return K(this).tag})),I(V,"withoutSetter",(function(e){return ie(O(e),e)})),_.f=ae,x.f=oe,E.f=se,C.f=ce,S.f=w.f=ue,k.f=le,N.f=function(e){return ie(D(e),e)},c&&(q(Y,"description",{configurable:!0,get:function(){return K(this).description}}),a||I(F,"propertyIsEnumerable",ae,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:V}),j(b(te),(function(e){L(e)})),n({target:H,stat:!0,forced:!u},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?y(e):se(y(e),t)},defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ue}),P(),M(V,H),R[G]=!0},1817:(e,t,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),s=r(1702),a=r(2597),c=r(614),u=r(7976),l=r(1340),h=r(3070).f,d=r(9920),f=o.Symbol,p=f&&f.prototype;if(i&&c(f)&&(!("description"in p)||void 0!==f().description)){var v={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(p,this)?new f(e):void 0===e?f():f(e);return""===e&&(v[t]=!0),t};d(g,f),g.prototype=p,p.constructor=g;var m="Symbol(test)"==String(f("test")),y=s(p.valueOf),b=s(p.toString),S=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),k=s("".slice);h(p,"description",{configurable:!0,get:function(){var e=y(this);if(a(v,e))return"";var t=b(e),r=m?k(t,7,-1):w(t,S,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:g})}},763:(e,t,r)=>{var n=r(2109),i=r(5005),o=r(2597),s=r(1340),a=r(2309),c=r(2015),u=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(o(u,t))return u[t];var r=i("Symbol")(t);return u[t]=r,l[r]=t,r}})},2165:(e,t,r)=>{r(6800)("iterator")},2526:(e,t,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(e,t,r)=>{var n=r(2109),i=r(2597),o=r(2190),s=r(6330),a=r(2309),c=r(2015),u=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!o(e))throw TypeError(s(e)+" is not a symbol");if(i(u,e))return u[e]}})},2990:(e,t,r)=>{"use strict";var n=r(1702),i=r(260),o=n(r(1048)),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(s(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:(e,t,r)=>{"use strict";var n=r(260),i=r(1285),o=r(4599),s=r(648),a=r(6916),c=r(1702),u=r(7293),l=n.aTypedArray,h=n.exportTypedArrayMethod,d=c("".slice);h("fill",(function(e){var t=arguments.length;l(this);var r="Big"===d(s(this),0,3)?o(e):+e;return a(i,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5035:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).filter,o=r(3074),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(s(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},7174:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4731:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:(e,t,r)=>{"use strict";var n=r(7854),i=r(7293),o=r(1702),s=r(260),a=r(6992),c=r(5112)("iterator"),u=n.Uint8Array,l=o(a.values),h=o(a.keys),d=o(a.entries),f=s.aTypedArray,p=s.exportTypedArrayMethod,v=u&&u.prototype,g=!i((function(){v[c].call([1])})),m=!!v&&v.values&&v[c]===v.values&&"values"===v.values.name,y=function(){return l(f(this))};p("entries",(function(){return d(f(this))}),g),p("keys",(function(){return h(f(this))}),g),p("values",y,g||!m,{name:"values"}),p(c,y,g||!m,{name:"values"})},8867:(e,t,r)=>{"use strict";var n=r(260),i=r(1702),o=n.aTypedArray,s=n.exportTypedArrayMethod,a=i([].join);s("join",(function(e){return a(o(this),e)}))},7789:(e,t,r)=>{"use strict";var n=r(260),i=r(2104),o=r(6583),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,s(this),t>1?[e,arguments[1]]:[e])}))},3739:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).map,o=r(6304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return i(s(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},4483:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},9368:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},2056:(e,t,r)=>{"use strict";var n=r(260),i=n.aTypedArray,o=n.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=s(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},3462:(e,t,r)=>{"use strict";var n=r(7854),i=r(6916),o=r(260),s=r(6244),a=r(4590),c=r(7908),u=r(7293),l=n.RangeError,h=n.Int8Array,d=h&&h.prototype,f=d&&d.set,p=o.aTypedArray,v=o.exportTypedArrayMethod,g=!u((function(){var e=new Uint8ClampedArray(2);return i(f,e,{length:1,0:3},1),3!==e[1]})),m=g&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new h(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));v("set",(function(e){p(this);var t=a(arguments.length>1?arguments[1]:void 0,1),r=c(e);if(g)return i(f,this,r,t);var n=this.length,o=s(r),u=0;if(o+t>n)throw l("Wrong length");for(;u<o;)this[t+u]=r[u++]}),!g||m)},678:(e,t,r)=>{"use strict";var n=r(260),i=r(6304),o=r(7293),s=r(206),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=s(a(this),e,t),n=i(this),o=0,c=r.length,u=new n(c);c>o;)u[o]=r[o++];return u}),o((function(){new Int8Array(1).slice()})))},7462:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(7293),s=r(9662),a=r(4362),c=r(260),u=r(8886),l=r(256),h=r(7392),d=r(8008),f=c.aTypedArray,p=c.exportTypedArrayMethod,v=n.Uint16Array,g=v&&i(v.prototype.sort),m=!(!g||o((function(){g(new v(2),null)}))&&o((function(){g(new v(2),{})}))),y=!!g&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(d)return d<602;var e,t,r=new v(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(g(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));p("sort",(function(e){return void 0!==e&&s(e),y?g(this,e):a(f(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))}),!y||m)},5021:(e,t,r)=>{"use strict";var n=r(260),i=r(7466),o=r(1400),s=r(6304),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=a(this),n=r.length,c=o(e,n);return new(s(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-c))}))},2974:(e,t,r)=>{"use strict";var n=r(7854),i=r(2104),o=r(260),s=r(7293),a=r(206),c=n.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,d=!!c&&s((function(){h.call(new c(1))}));l("toLocaleString",(function(){return i(h,d?a(u(this)):u(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!s((function(){c.prototype.toLocaleString.call([1,2])})))},5016:(e,t,r)=>{"use strict";var n=r(260).exportTypedArrayMethod,i=r(7293),o=r(7854),s=r(1702),a=o.Uint8Array,c=a&&a.prototype||{},u=[].toString,l=s([].join);i((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!=u;n("toString",u,h)},2472:(e,t,r)=>{r(9843)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},4747:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(8533),a=r(8880),c=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var u in i)i[u]&&c(n[u]&&n[u].prototype);c(o)},3948:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(6992),a=r(8880),c=r(5112),u=c("iterator"),l=c("toStringTag"),h=s.values,d=function(e,t){if(e){if(e[u]!==h)try{a(e,u,h)}catch(t){e[u]=h}if(e[l]||a(e,l,t),i[t])for(var r in s)if(e[r]!==s[r])try{a(e,r,s[r])}catch(t){e[r]=s[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},6815:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(7152).setInterval;n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},8417:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(7152).setTimeout;n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},2564:(e,t,r)=>{r(6815),r(8417)},452:function(e,t,r){var n;e.exports=(n=r(8249),r(8269),r(8214),r(888),r(5109),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],c=[],u=[],l=[],h=[],d=[],f=[];!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],g=e[v],m=e[g],y=257*e[p]^16843008*p;s[r]=y<<24|y>>>8,a[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*m^65537*g^257*v^16843008*r,l[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,r?(r=v^e[e[e[m^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=r.AES=t.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=[],s=0;s<n;s++)s<r?o[s]=t[s]:(u=o[s-1],s%r?r>6&&s%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[s/r|0]<<24),o[s]=o[s-r]^u);for(var a=this._invKeySchedule=[],c=0;c<n;c++){if(s=n-c,c%4)var u=o[s];else u=o[s-4];a[c]=c<4||s<=4?u:l[i[u>>>24]]^h[i[u>>>16&255]]^d[i[u>>>8&255]]^f[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,u,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,h,d,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,s,a){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],h=e[t+2]^r[2],d=e[t+3]^r[3],f=4,p=1;p<c;p++){var v=n[u>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&d]^r[f++],g=n[l>>>24]^i[h>>>16&255]^o[d>>>8&255]^s[255&u]^r[f++],m=n[h>>>24]^i[d>>>16&255]^o[u>>>8&255]^s[255&l]^r[f++],y=n[d>>>24]^i[u>>>16&255]^o[l>>>8&255]^s[255&h]^r[f++];u=v,l=g,h=m,d=y}v=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&d])^r[f++],g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[d>>>8&255]<<8|a[255&u])^r[f++],m=(a[h>>>24]<<24|a[d>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[f++],y=(a[d>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^r[f++],e[t]=v,e[t+1]=g,e[t+2]=m,e[t+3]=y},keySize:8});e.AES=t._createHelper(v)}(),n.AES)},5109:function(e,t,r){var n;e.exports=(n=r(8249),r(888),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=t.enc,c=(a.Utf8,a.Base64),u=t.algo.EvpKDF,l=r.Cipher=s.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(){s.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:m}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)}}}}()}),h=(r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),d=r.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}}),f=h.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 s=0;s<n;s++)t[r+s]^=i[s]}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=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,s=[],a=0;a<n;a+=4)s.push(i);var c=o.create(s,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},v=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:f,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}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.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})}},m=r.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),s=i.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.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}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=u.create({keySize:t+r}).compute(e,n),s=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,v.create({key:i,iv:s,salt:n})}},b=r.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=m.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);return n.iv=i.iv,m.decrypt.call(this,e,t,i.key,n)}})}()))},8249:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(2480)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},a=s.lib={},c=a.Base={extend:function(e){var t=o(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=c.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||h).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 s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<i;a+=4)t[n+a>>>2]=r[a>>>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=c.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(i());return new u.init(t,e)}}),l=s.enc={},h=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)}},f=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=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=l}return new u.init(r,l)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(a.Hasher=p.extend({cfg:c.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)}}}),s.algo={});return s}(Math),n)},8269:function(e,t,r){var n;e.exports=(n=r(8249),function(){var e=n,t=e.lib.WordArray;function r(e,r,n){for(var i=[],o=0,s=0;s<r;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return t.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 s=(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,a=0;a<4&&o+.75*a<r;a++)i.push(n.charAt(s>>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,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 a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)},3786:function(e,t,r){var n;e.exports=(n=r(8249),function(){var e=n,t=e.lib.WordArray;function r(e,r,n){for(var i=[],o=0,s=0;s<r;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t=!0){var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],s=0;s<n;s+=3)for(var a=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,c=0;c<4&&s+.75*c<n;c++)o.push(i.charAt(a>>>6*(3-c)&63));var u=i.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e,t=!0){var n=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<i.length;s++)o[i.charCodeAt(s)]=s}var a=i.charAt(64);if(a){var c=e.indexOf(a);-1!==c&&(n=c)}return r(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),n.enc.Base64url)},298:function(e,t,r){var n;e.exports=(n=r(8249),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.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 r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var s=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},888:function(e,t,r){var n,i,o,s,a,c,u,l;e.exports=(l=r(8249),r(2783),r(9824),i=(n=l).lib,o=i.Base,s=i.WordArray,a=n.algo,c=a.MD5,u=a.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=s.create(),a=o.words,c=n.keySize,u=n.iterations;a.length<c;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(var l=1;l<u;l++)r=i.finalize(r),i.reset();o.concat(r)}return o.sigBytes=4*c,o}}),n.EvpKDF=function(e,t,r){return u.create(r).compute(e,t)},l.EvpKDF)},2209:function(e,t,r){var n,i,o,s;e.exports=(s=r(8249),r(5109),i=(n=s).lib.CipherParams,o=n.enc.Hex,n.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},s.format.Hex)},9824:function(e,t,r){var n,i,o,s;e.exports=(n=r(8249),o=(i=n).lib.Base,s=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),a=i.words,c=o.words,u=0;u<r;u++)a[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=n,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))}})))},1354:function(e,t,r){var n;e.exports=(n=r(8249),r(4938),r(4433),r(298),r(8269),r(3786),r(8214),r(2783),r(2153),r(7792),r(34),r(7460),r(3327),r(706),r(9824),r(2112),r(888),r(5109),r(8568),r(4242),r(9968),r(7660),r(1148),r(3615),r(2807),r(1077),r(6475),r(6991),r(2209),r(452),r(4253),r(1857),r(4454),r(3974),n)},4433:function(e,t,r){var n;e.exports=(n=r(8249),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init,r=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 r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},8214:function(e,t,r){var n;e.exports=(n=r(8249),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.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,s=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],v=e[t+4],g=e[t+5],m=e[t+6],y=e[t+7],b=e[t+8],S=e[t+9],w=e[t+10],k=e[t+11],C=e[t+12],x=e[t+13],E=e[t+14],_=e[t+15],I=o[0],A=o[1],T=o[2],R=o[3];I=u(I,A,T,R,s,7,a[0]),R=u(R,I,A,T,c,12,a[1]),T=u(T,R,I,A,f,17,a[2]),A=u(A,T,R,I,p,22,a[3]),I=u(I,A,T,R,v,7,a[4]),R=u(R,I,A,T,g,12,a[5]),T=u(T,R,I,A,m,17,a[6]),A=u(A,T,R,I,y,22,a[7]),I=u(I,A,T,R,b,7,a[8]),R=u(R,I,A,T,S,12,a[9]),T=u(T,R,I,A,w,17,a[10]),A=u(A,T,R,I,k,22,a[11]),I=u(I,A,T,R,C,7,a[12]),R=u(R,I,A,T,x,12,a[13]),T=u(T,R,I,A,E,17,a[14]),I=l(I,A=u(A,T,R,I,_,22,a[15]),T,R,c,5,a[16]),R=l(R,I,A,T,m,9,a[17]),T=l(T,R,I,A,k,14,a[18]),A=l(A,T,R,I,s,20,a[19]),I=l(I,A,T,R,g,5,a[20]),R=l(R,I,A,T,w,9,a[21]),T=l(T,R,I,A,_,14,a[22]),A=l(A,T,R,I,v,20,a[23]),I=l(I,A,T,R,S,5,a[24]),R=l(R,I,A,T,E,9,a[25]),T=l(T,R,I,A,p,14,a[26]),A=l(A,T,R,I,b,20,a[27]),I=l(I,A,T,R,x,5,a[28]),R=l(R,I,A,T,f,9,a[29]),T=l(T,R,I,A,y,14,a[30]),I=h(I,A=l(A,T,R,I,C,20,a[31]),T,R,g,4,a[32]),R=h(R,I,A,T,b,11,a[33]),T=h(T,R,I,A,k,16,a[34]),A=h(A,T,R,I,E,23,a[35]),I=h(I,A,T,R,c,4,a[36]),R=h(R,I,A,T,v,11,a[37]),T=h(T,R,I,A,y,16,a[38]),A=h(A,T,R,I,w,23,a[39]),I=h(I,A,T,R,x,4,a[40]),R=h(R,I,A,T,s,11,a[41]),T=h(T,R,I,A,p,16,a[42]),A=h(A,T,R,I,m,23,a[43]),I=h(I,A,T,R,S,4,a[44]),R=h(R,I,A,T,C,11,a[45]),T=h(T,R,I,A,_,16,a[46]),I=d(I,A=h(A,T,R,I,f,23,a[47]),T,R,s,6,a[48]),R=d(R,I,A,T,y,10,a[49]),T=d(T,R,I,A,E,15,a[50]),A=d(A,T,R,I,g,21,a[51]),I=d(I,A,T,R,C,6,a[52]),R=d(R,I,A,T,p,10,a[53]),T=d(T,R,I,A,w,15,a[54]),A=d(A,T,R,I,c,21,a[55]),I=d(I,A,T,R,b,6,a[56]),R=d(R,I,A,T,_,10,a[57]),T=d(T,R,I,A,m,15,a[58]),A=d(A,T,R,I,x,21,a[59]),I=d(I,A,T,R,v,6,a[60]),R=d(R,I,A,T,k,10,a[61]),T=d(T,R,I,A,f,15,a[62]),A=d(A,T,R,I,S,21,a[63]),o[0]=o[0]+I|0,o[1]=o[1]+A|0,o[2]=o[2]+T|0,o[3]=o[3]+R|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),s=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,r,n,i,o,s){var a=e+(t^r^n)+i+s;return(a<<o|a>>>32-o)+t}function d(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+i+s;return(a<<o|a>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)},8568:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(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 s=0;s<r;s++)e[t+s]^=i[s]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=o}}),e}(),n.mode.CFB)},9968:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){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}else e+=1<<24;return e}function r(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),r(s);var a=s.slice(0);n.encryptBlock(a,0);for(var c=0;c<i;c++)e[t+c]^=a[c]}});return e.Decryptor=i,e}(),n.mode.CTRGladman)},4242:function(e,t,r){var n,i,o;e.exports=(o=r(8249),r(5109),o.mode.CTR=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.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 s=o.slice(0);r.encryptBlock(s,0),o[n-1]=o[n-1]+1|0;for(var a=0;a<n;a++)e[t+a]^=s[a]}}),n.Decryptor=i,n),o.mode.CTR)},1148:function(e,t,r){var n,i;e.exports=(i=r(8249),r(5109),i.mode.ECB=((n=i.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),i.mode.ECB)},7660:function(e,t,r){var n,i,o;e.exports=(o=r(8249),r(5109),o.mode.OFB=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.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 s=0;s<n;s++)e[t+s]^=o[s]}}),n.Decryptor=i,n),o.mode.OFB)},3615:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.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}},n.pad.Ansix923)},2807:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},1077:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},6991:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},6475:function(e,t,r){var n;e.exports=(n=r(8249),r(5109),n.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}}},n.pad.ZeroPadding)},2112:function(e,t,r){var n,i,o,s,a,c,u,l,h;e.exports=(h=r(8249),r(2783),r(9824),i=(n=h).lib,o=i.Base,s=i.WordArray,a=n.algo,c=a.SHA1,u=a.HMAC,l=a.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=u.create(r.hasher,e),i=s.create(),o=s.create([1]),a=i.words,c=o.words,l=r.keySize,h=r.iterations;a.length<l;){var d=n.update(t).finalize(o);n.reset();for(var f=d.words,p=f.length,v=d,g=1;g<h;g++){v=n.finalize(v),n.reset();for(var m=v.words,y=0;y<p;y++)f[y]^=m[y]}i.concat(d),c[0]++}return i.sigBytes=4*l,i}}),n.PBKDF2=function(e,t,r){return l.create(r).compute(e,t)},h.PBKDF2)},3974:function(e,t,r){var n;e.exports=(n=r(8249),r(8269),r(8214),r(888),r(5109),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.RabbitLegacy=t.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++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),h=u>>>16|4294901760&l,d=l<<16|65535&u;for(n[0]^=u,n[1]^=h,n[2]^=l,n[3]^=d,n[4]^=u,n[5]^=h,n[6]^=l,n[7]^=d,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.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 c(){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,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^u}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}e.RabbitLegacy=t._createHelper(a)}(),n.RabbitLegacy)},4454:function(e,t,r){var n;e.exports=(n=r(8249),r(8269),r(8214),r(888),r(5109),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.Rabbit=t.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++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),h=u>>>16|4294901760&l,d=l<<16|65535&u;for(i[0]^=u,i[1]^=h,i[2]^=l,i[3]^=d,i[4]^=u,i[5]^=h,i[6]^=l,i[7]^=d,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.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 c(){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,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^u}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}e.Rabbit=t._createHelper(a)}(),n.Rabbit)},1857:function(e,t,r){var n;e.exports=(n=r(8249),r(8269),r(8214),r(888),r(5109),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.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 s=i%r,a=t[s>>>2]>>>24-s%4*8&255;o=(o+n[i]+a)%256;var c=n[i];n[i]=n[o],n[o]=c}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=t._createHelper(i);var s=r.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=t._createHelper(s)}(),n.RC4)},706:function(e,t,r){var n;e.exports=(n=r(8249),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=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]),c=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]),u=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]),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]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=s.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,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,f,S,w,k,C,x,E,_,I,A=this._hash.words,T=h.words,R=d.words,O=a.words,D=c.words,N=u.words,L=l.words;for(k=o=A[0],C=s=A[1],x=f=A[2],E=S=A[3],_=w=A[4],r=0;r<80;r+=1)I=o+e[t+O[r]]|0,I+=r<16?p(s,f,S)+T[0]:r<32?v(s,f,S)+T[1]:r<48?g(s,f,S)+T[2]:r<64?m(s,f,S)+T[3]:y(s,f,S)+T[4],I=(I=b(I|=0,N[r]))+w|0,o=w,w=S,S=b(f,10),f=s,s=I,I=k+e[t+D[r]]|0,I+=r<16?y(C,x,E)+R[0]:r<32?m(C,x,E)+R[1]:r<48?g(C,x,E)+R[2]:r<64?v(C,x,E)+R[3]:p(C,x,E)+R[4],I=(I=b(I|=0,L[r]))+_|0,k=_,_=E,E=b(x,10),x=C,C=I;I=A[1]+f+E|0,A[1]=A[2]+S+_|0,A[2]=A[3]+w+k|0,A[3]=A[4]+o+C|0,A[4]=A[0]+s+x|0,A[0]=I},_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,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function g(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 b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(Math),n.RIPEMD160)},2783:function(e,t,r){var n,i,o,s,a,c,u,l;e.exports=(l=r(8249),i=(n=l).lib,o=i.WordArray,s=i.Hasher,a=n.algo,c=[],u=a.SHA1=s.extend({_doReset:function(){this._hash=new o.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],a=r[4],u=0;u<80;u++){if(u<16)c[u]=0|e[t+u];else{var l=c[u-3]^c[u-8]^c[u-14]^c[u-16];c[u]=l<<1|l>>>31}var h=(n<<5|n>>>27)+a+c[u];h+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=n,n=h}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]+a|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=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=s._createHelper(u),n.HmacSHA1=s._createHmacHelper(u),l.SHA1)},7792:function(e,t,r){var n,i,o,s,a,c;e.exports=(c=r(8249),r(2153),i=(n=c).lib.WordArray,o=n.algo,s=o.SHA256,a=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=s._createHelper(a),n.HmacSHA224=s._createHmacHelper(a),c.SHA224)},2153:function(e,t,r){var n;e.exports=(n=r(8249),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[],c=[];!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&&(a[i]=r(e.pow(n,.5))),c[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],h=r[6],d=r[7],f=0;f<64;f++){if(f<16)u[f]=0|e[t+f];else{var p=u[f-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[f-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[f]=v+u[f-7]+m+u[f-16]}var y=n&i^n&o^i&o,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),S=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&h)+c[f]+u[f];d=h,h=l,l=a,a=s+S|0,s=o,o=i,i=n,n=S+(b+y)|0}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]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+h|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}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)},3327:function(e,t,r){var n;e.exports=(n=r(8249),r(4938),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.x64.Word,a=t.algo,c=[],u=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[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++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:a^=1<<f-32}128&i?i=i<<1^113:i<<=1}l[o]=s.create(a,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=s.create()}();var d=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.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],s=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[i]).high^=s,A.low^=o}for(var a=0;a<24;a++){for(var d=0;d<5;d++){for(var f=0,p=0,v=0;v<5;v++)f^=(A=r[d+5*v]).high,p^=A.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var m=h[(d+4)%5],y=h[(d+1)%5],b=y.high,S=y.low;for(f=m.high^(b<<1|S>>>31),p=m.low^(S<<1|b>>>31),v=0;v<5;v++)(A=r[d+5*v]).high^=f,A.low^=p}for(var w=1;w<25;w++){var k=(A=r[w]).high,C=A.low,x=c[w];x<32?(f=k<<x|C>>>32-x,p=C<<x|k>>>32-x):(f=C<<x-32|k>>>64-x,p=k<<x-32|C>>>64-x);var E=h[u[w]];E.high=f,E.low=p}var _=h[0],I=r[0];for(_.high=I.high,_.low=I.low,d=0;d<5;d++)for(v=0;v<5;v++){var A=r[w=d+5*v],T=h[w],R=h[(d+1)%5+5*v],O=h[(d+2)%5+5*v];A.high=T.high^~R.high&O.high,A.low=T.low^~R.low&O.low}A=r[0];var D=l[a];A.high^=D.high,A.low^=D.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,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 s=this._state,a=this.cfg.outputLength/8,c=a/8,u=[],l=0;l<c;l++){var h=s[l],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),u.push(f),u.push(d)}return new i.init(u,a)},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}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),n.SHA3)},7460:function(e,t,r){var n,i,o,s,a,c,u,l;e.exports=(l=r(8249),r(4938),r(34),i=(n=l).x64,o=i.Word,s=i.WordArray,a=n.algo,c=a.SHA512,u=a.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=c._createHelper(u),n.HmacSHA384=c._createHmacHelper(u),l.SHA384)},34:function(e,t,r){var n;e.exports=(n=r(8249),r(4938),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,s=e.algo;function a(){return i.create.apply(i,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=a()}();var l=s.SHA512=t.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],s=r[3],a=r[4],l=r[5],h=r[6],d=r[7],f=n.high,p=n.low,v=i.high,g=i.low,m=o.high,y=o.low,b=s.high,S=s.low,w=a.high,k=a.low,C=l.high,x=l.low,E=h.high,_=h.low,I=d.high,A=d.low,T=f,R=p,O=v,D=g,N=m,L=y,P=b,M=S,B=w,j=k,G=C,H=x,U=E,K=_,F=I,V=A,Y=0;Y<80;Y++){var z,X,W=u[Y];if(Y<16)X=W.high=0|e[t+2*Y],z=W.low=0|e[t+2*Y+1];else{var q=u[Y-15],$=q.high,Z=q.low,J=($>>>1|Z<<31)^($>>>8|Z<<24)^$>>>7,Q=(Z>>>1|$<<31)^(Z>>>8|$<<24)^(Z>>>7|$<<25),ee=u[Y-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=u[Y-7],se=oe.high,ae=oe.low,ce=u[Y-16],ue=ce.high,le=ce.low;X=(X=(X=J+se+((z=Q+ae)>>>0<Q>>>0?1:0))+ne+((z+=ie)>>>0<ie>>>0?1:0))+ue+((z+=le)>>>0<le>>>0?1:0),W.high=X,W.low=z}var he,de=B&G^~B&U,fe=j&H^~j&K,pe=T&O^T&N^O&N,ve=R&D^R&L^D&L,ge=(T>>>28|R<<4)^(T<<30|R>>>2)^(T<<25|R>>>7),me=(R>>>28|T<<4)^(R<<30|T>>>2)^(R<<25|T>>>7),ye=(B>>>14|j<<18)^(B>>>18|j<<14)^(B<<23|j>>>9),be=(j>>>14|B<<18)^(j>>>18|B<<14)^(j<<23|B>>>9),Se=c[Y],we=Se.high,ke=Se.low,Ce=F+ye+((he=V+be)>>>0<V>>>0?1:0),xe=me+ve;F=U,V=K,U=G,K=H,G=B,H=j,B=P+(Ce=(Ce=(Ce=Ce+de+((he+=fe)>>>0<fe>>>0?1:0))+we+((he+=ke)>>>0<ke>>>0?1:0))+X+((he+=z)>>>0<z>>>0?1:0))+((j=M+he|0)>>>0<M>>>0?1:0)|0,P=N,M=L,N=O,L=D,O=T,D=R,T=Ce+(ge+pe+(xe>>>0<me>>>0?1:0))+((R=he+xe|0)>>>0<he>>>0?1:0)|0}p=n.low=p+R,n.high=f+T+(p>>>0<R>>>0?1:0),g=i.low=g+D,i.high=v+O+(g>>>0<D>>>0?1:0),y=o.low=y+L,o.high=m+N+(y>>>0<L>>>0?1:0),S=s.low=S+M,s.high=b+P+(S>>>0<M>>>0?1:0),k=a.low=k+j,a.high=w+B+(k>>>0<j>>>0?1:0),x=l.low=x+H,l.high=C+G+(x>>>0<H>>>0?1:0),_=h.low=_+K,h.high=E+U+(_>>>0<K>>>0?1:0),A=d.low=A+V,d.high=I+F+(A>>>0<V>>>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=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),n.SHA512)},4253:function(e,t,r){var n;e.exports=(n=r(8249),r(8269),r(8214),r(888),r(5109),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,s=[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],a=[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],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{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],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=s[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(r=0;r<24;r++)u[r/6|0]|=t[(a[r]-1+l)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(a[r+24]-1+l)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[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),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,s=this._rBlock,a=0,c=0;c<8;c++)a|=u[c][((s^i[c])&l[c])>>>0];this._lBlock=s,this._rBlock=o^a}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.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 f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(h);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),n=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=h.createEncryptor(r.create(t)),this._des2=h.createEncryptor(r.create(n)),this._des3=h.createEncryptor(r.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)}(),n.TripleDES)},4938:function(e,t,r){var n;e.exports=(n=r(8249),function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=t.x64={};s.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),s.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}})}(),n)},3729:function(e,t){var r,n,i;n=[],void 0===(i="function"==typeof(r=function(){return function e(t,r,n){var i,o,s=window,a="application/octet-stream",c=n||a,u=t,l=!r&&!n&&u,h=document.createElement("a"),d=function(e){return String(e)},f=s.Blob||s.MozBlob||s.WebKitBlob||d,p=r||"download";if(f=f.call?f.bind(s):Blob,"true"===String(this)&&(c=(u=[u,c])[0],u=u[1]),l&&l.length<2048&&(p=l.split("/").pop().split("?")[0],h.href=l,-1!==h.href.indexOf(l))){var v=new XMLHttpRequest;return v.open("GET",l,!0),v.responseType="blob",v.onload=function(t){e(t.target.response,p,a)},setTimeout((function(){v.send()}),0),v}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&f!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(u),p):S(u);c=(u=b(u)).type||a}else if(/([\x80-\xff])/.test(u)){for(var g=0,m=new Uint8Array(u.length),y=m.length;g<y;++g)m[g]=u.charCodeAt(g);u=new f([m],{type:c})}function b(e){for(var t=e.split(/[:;,]/),r=t[1],n=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),i=n.length,o=0,s=new Uint8Array(i);o<i;++o)s[o]=n.charCodeAt(o);return new f([s],{type:r})}function S(e,t){if("download"in h)return h.href=e,h.setAttribute("download",p),h.className="download-js-link",h.innerHTML="downloading...",h.style.display="none",document.body.appendChild(h),setTimeout((function(){h.click(),document.body.removeChild(h),!0===t&&setTimeout((function(){s.URL.revokeObjectURL(h.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,a)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var r=document.createElement("iframe");document.body.appendChild(r),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,a)),r.src=e,setTimeout((function(){document.body.removeChild(r)}),333)}if(i=u instanceof f?u:new f([u],{type:c}),navigator.msSaveBlob)return navigator.msSaveBlob(i,p);if(s.URL)S(s.URL.createObjectURL(i),!0);else{if("string"==typeof i||i.constructor===d)try{return S("data:"+c+";base64,"+s.btoa(i))}catch(e){return S("data:"+c+","+encodeURIComponent(i))}(o=new FileReader).onload=function(e){S(this.result)},o.readAsDataURL(i)}return!0}})?r.apply(t,n):r)||(e.exports=i)},3792:function(e,t){!function(e){"use strict";var t="0123456789abcdefghijklmnopqrstuvwxyz";function r(e){return t.charAt(e)}function n(e,t){return e&t}function i(e,t){return e|t}function o(e,t){return e^t}function s(e,t){return e&~t}function a(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function c(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="=";function h(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=u.charAt(r>>6)+u.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=u.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=u.charAt(r>>2)+u.charAt((3&r)<<4));(3&n.length)>0;)n+=l;return n}function d(e){var t,n="",i=0,o=0;for(t=0;t<e.length&&e.charAt(t)!=l;++t){var s=u.indexOf(e.charAt(t));s<0||(0==i?(n+=r(s>>2),o=3&s,i=1):1==i?(n+=r(o<<2|s>>4),o=15&s,i=2):2==i?(n+=r(o),n+=r(s>>2),o=3&s,i=3):(n+=r(o<<2|s>>4),n+=r(15&s),i=0))}return 1==i&&(n+=r(o<<2)),n}var f,p=function(e,t){return p=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])},p(e,t)};function v(e,t){function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var g,m={decode:function(e){var t;if(void 0===f){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(f={},t=0;t<16;++t)f[r.charAt(t)]=t;for(r=r.toLowerCase(),t=10;t<16;++t)f[r.charAt(t)]=t;for(t=0;t<n.length;++t)f[n.charAt(t)]=-1}var i=[],o=0,s=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=f[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);o|=a,++s>=2?(i[i.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},y={decode:function(e){var t;if(void 0===g){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="= \f\n\r\t \u2028\u2029";for(g=Object.create(null),t=0;t<64;++t)g[r.charAt(t)]=t;for(t=0;t<n.length;++t)g[n.charAt(t)]=-1}var i=[],o=0,s=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=g[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);o|=a,++s>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=255&o,o=0,s=0):o<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=y.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return y.decode(e)}},b=1e13,S=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var r,n,i=this.buf,o=i.length;for(r=0;r<o;++r)(n=i[r]*e+t)<b?t=0:n-=(t=0|n/b)*b,i[r]=n;t>0&&(i[r]=t)},e.prototype.sub=function(e){var t,r,n=this.buf,i=n.length;for(t=0;t<i;++t)(r=n[t]-e)<0?(r+=b,e=1):e=0,n[t]=r;for(;0===n[n.length-1];)n.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),n=t.length-2;n>=0;--n)r+=(b+t[n]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*b+e[r];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),w="…",k=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,C=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function x(e,t){return e.length>t&&(e=e.substring(0,t)+w),e}var E,_=function(){function e(t,r){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=r)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset "+e+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,r){for(var n="",i=e;i<t;++i)if(n+=this.hexByte(this.get(i)),!0!==r)switch(15&i){case 7:n+=" ";break;case 15:n+="\n";break;default:n+=" "}return n},e.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var n=this.get(r);if(n<32||n>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var r="",n=e;n<t;++n)r+=String.fromCharCode(this.get(n));return r},e.prototype.parseStringUTF=function(e,t){for(var r="",n=e;n<t;){var i=this.get(n++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(n++)):String.fromCharCode((15&i)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return r},e.prototype.parseStringBMP=function(e,t){for(var r,n,i="",o=e;o<t;)r=this.get(o++),n=this.get(o++),i+=String.fromCharCode(r<<8|n);return i},e.prototype.parseTime=function(e,t,r){var n=this.parseStringISO(e,t),i=(r?k:C).exec(n);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),n=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(n+=":"+i[5],i[6]&&(n+=":"+i[6],i[7]&&(n+="."+i[7]))),i[8]&&(n+=" UTC","Z"!=i[8]&&(n+=i[8],i[9]&&(n+=":"+i[9]))),n):"Unrecognized time: "+n},e.prototype.parseInteger=function(e,t){for(var r,n=this.get(e),i=n>127,o=i?255:0,s="";n==o&&++e<t;)n=this.get(e);if(0==(r=t-e))return i?-1:0;if(r>4){for(s=n,r<<=3;0==(128&(+s^o));)s=+s<<1,--r;s="("+r+" bit)\n"}i&&(n-=256);for(var a=new S(n),c=e+1;c<t;++c)a.mulAdd(256,this.get(c));return s+a.toString()},e.prototype.parseBitString=function(e,t,r){for(var n=this.get(e),i="("+((t-e-1<<3)-n)+" bit)\n",o="",s=e+1;s<t;++s){for(var a=this.get(s),c=s==t-1?n:0,u=7;u>=c;--u)o+=a>>u&1?"1":"0";if(o.length>r)return i+x(o,r)}return i+o},e.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return x(this.parseStringISO(e,t),r);var n=t-e,i="("+n+" byte)\n";n>(r/=2)&&(t=e+r);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return n>r&&(i+=w),i},e.prototype.parseOID=function(e,t,r){for(var n="",i=new S,o=0,s=e;s<t;++s){var a=this.get(s);if(i.mulAdd(128,127&a),o+=7,!(128&a)){if(""===n)if((i=i.simplify())instanceof S)i.sub(80),n="2."+i.toString();else{var c=i<80?i<40?0:1:2;n=c+"."+(i-40*c)}else n+="."+i.toString();if(n.length>r)return x(n,r);i=new S,o=0}}return o>0&&(n+=".incomplete"),n},e}(),I=function(){function e(e,t,r,n,i){if(!(n instanceof A))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=n,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return x(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return x(this.stream.parseStringISO(t,t+r),e);case 30:return x(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var r=0,n=this.sub.length;r<n;++r)t+=this.sub[r].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),r=127&t;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===r)return null;t=0;for(var n=0;n<r;++n)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,r=2*this.length;return e.substr(t,r)},e.decode=function(t){var r;r=t instanceof _?t:new _(t,0);var n=new _(r),i=new A(r),o=e.decodeLength(r),s=r.pos,a=s-n.pos,c=null,u=function(){var t=[];if(null!==o){for(var n=s+o;r.pos<n;)t[t.length]=e.decode(r);if(r.pos!=n)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=e.decode(r);if(i.tag.isEOC())break;t[t.length]=i}o=s-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)c=u();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var l=0;l<c.length;++l)if(c[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){c=null}if(null===c){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);r.pos=s+Math.abs(o)}return new e(n,a,o,i,c)},e}(),A=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!=(32&t),this.tagNumber=31&t,31==this.tagNumber){var r=new S;do{t=e.get(),r.mulAdd(128,127&t)}while(128&t);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),T=!0,R=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],O=(1<<26)/R[R.length-1],D=function(){function e(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<<t)-1,o=!1,s="",a=this.t,c=this.DB-a*this.DB%t;if(a-- >0)for(c<this.DB&&(n=this[a]>>c)>0&&(o=!0,s=r(n));a>=0;)c<t?(n=(this[a]&(1<<c)-1)<<t-c,n|=this[--a]>>(c+=this.DB-t)):(n=this[a]>>(c-=t)&i,c<=0&&(c+=this.DB,--a)),n>0&&(o=!0),o&&(s+=r(n));return o?s:"0"},e.prototype.negate=function(){var t=B();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+W(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=B();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r},e.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new L(t):new P(t),this.exp(e,r)},e.prototype.clone=function(){var e=B();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=B();return this.bitwiseTo(e,n,t),t},e.prototype.or=function(e){var t=B();return this.bitwiseTo(e,i,t),t},e.prototype.xor=function(e){var t=B();return this.bitwiseTo(e,o,t),t},e.prototype.andNot=function(e){var t=B();return this.bitwiseTo(e,s,t),t},e.prototype.not=function(){for(var e=B(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=B();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=B();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+a(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=c(this[r]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,i)},e.prototype.clearBit=function(e){return this.changeBit(e,s)},e.prototype.flipBit=function(e){return this.changeBit(e,o)},e.prototype.add=function(e){var t=B();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=B();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=B();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=B();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=B();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=B(),r=B();return this.divRemTo(e,t,r),[t,r]},e.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=X(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new L(t):t.isEven()?new M(t):new P(t);var s=[],a=3,c=r-1,u=(1<<r)-1;if(s[1]=n.convert(this),r>1){var l=B();for(n.sqrTo(s[1],l);a<=u;)s[a]=B(),n.mulTo(l,s[a-2],s[a]),a+=2}var h,d,f=e.t-1,p=!0,v=B();for(i=W(e[f])-1;f>=0;){for(i>=c?h=e[f]>>i-c&u:(h=(e[f]&(1<<i+1)-1)<<c-i,f>0&&(h|=e[f-1]>>this.DB+i-c)),a=r;0==(1&h);)h>>=1,--a;if((i-=a)<0&&(i+=this.DB,--f),p)s[h].copyTo(o),p=!1;else{for(;a>1;)n.sqrTo(o,v),n.sqrTo(v,o),a-=2;a>0?n.sqrTo(o,v):(d=o,o=v,v=d),n.mulTo(v,s[h],o)}for(;f>=0&&0==(e[f]&1<<i);)n.sqrTo(o,v),d=o,o=v,v=d,--i<0&&(i=this.DB-1,--f)}return n.revert(o)},e.prototype.modInverse=function(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return e.ZERO;for(var n=t.clone(),i=this.clone(),o=X(1),s=X(0),a=X(0),c=X(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),r?(a.isEven()&&c.isEven()||(a.addTo(this,a),c.subTo(t,c)),a.rShiftTo(1,a)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(a,o),s.subTo(c,s)):(i.subTo(n,i),r&&a.subTo(o,a),c.subTo(s,c))}return 0!=i.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},e.prototype.pow=function(e){return this.exp(e,new N)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=R[R.length-1]){for(t=0;t<R.length;++t)if(r[0]==R[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<R.length;){for(var n=R[t],i=t+1;i<R.length&&n<O;)n*=R[i++];for(n=r.modInt(n);t<i;)if(n%R[t++]==0)return!1}return r.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(t,r);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==n?255&+t[i]:z(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&0!=(128&+t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,o=Math.floor(e/this.DB),s=this.s<<r&this.DM,a=this.t-1;a>=0;--a)t[a+o+1]=this[a]>>n|s,s=(this[a]&i)<<r;for(a=o-1;a>=0;--a)t[a]=0;t[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&o)<<i,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},e.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},e.prototype.multiplyTo=function(t,r){var n=this.abs(),i=t.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o<i.t;++o)r[o+n.t]=n.am(0,i[o],r,o,0,n.t);r.s=0,r.clamp(),this.s!=t.s&&e.ZERO.subTo(r,r)},e.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,r,n){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=B());var s=B(),a=this.s,c=t.s,u=this.DB-W(i[i.t-1]);u>0?(i.lShiftTo(u,s),o.lShiftTo(u,n)):(i.copyTo(s),o.copyTo(n));var l=s.t,h=s[l-1];if(0!=h){var d=h*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,v=1<<this.F2,g=n.t,m=g-l,y=null==r?B():r;for(s.dlShiftTo(m,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),e.ONE.dlShiftTo(l,y),y.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--m>=0;){var b=n[--g]==h?this.DM:Math.floor(n[g]*f+(n[g-1]+v)*p);if((n[g]+=s.am(0,b,n,m,0,l))<b)for(s.dlShiftTo(m,y),n.subTo(y,n);n[g]<--b;)n.subTo(y,n)}null!=r&&(n.drShiftTo(l,r),a!=c&&e.ZERO.subTo(r,r)),n.t=l,n.clamp(),u>0&&n.rShiftTo(u,n),a<0&&e.ZERO.subTo(n,n)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,r){if(t>4294967295||t<1)return e.ONE;var n=B(),i=B(),o=r.convert(this),s=W(t)-1;for(o.copyTo(n);--s>=0;)if(r.sqrTo(n,i),(t&1<<s)>0)r.mulTo(i,o,n);else{var a=n;n=i,i=a}return r.revert(n)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=X(r),i=B(),o=B(),s="";for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,o);return o.intValue().toString(e)+s},e.prototype.fromRadix=function(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,s=0,a=0,c=0;c<t.length;++c){var u=z(t,c);u<0?"-"==t.charAt(c)&&0==this.signum()&&(o=!0):(a=r*a+u,++s>=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(r,s)),this.dAddOffset(a,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=[],s=7&t;o.length=1+(t>>3),r.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},e.prototype.changeBit=function(t,r){var n=e.ONE.shiftLeft(t);return this.bitwiseTo(n,r,n),n},e.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(var i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,e[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e[n],r,n,0,t-n);r.clamp()},e.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},e.prototype.millerRabin=function(t){var r=this.subtract(e.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);(t=t+1>>1)>R.length&&(t=R.length);for(var o=B(),s=0;s<t;++s){o.fromInt(R[Math.floor(Math.random()*R.length)]);var a=o.modPow(i,this);if(0!=a.compareTo(e.ONE)&&0!=a.compareTo(r)){for(var c=1;c++<n&&0!=a.compareTo(r);)if(0==(a=a.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0},e.prototype.square=function(){var e=B();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var o=r.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)t(r);else{o<s&&(s=o),s>0&&(r.rShiftTo(s,r),n.rShiftTo(s,n));var a=function(){(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),r.signum()>0?setTimeout(a,0):(s>0&&n.lShiftTo(s,n),setTimeout((function(){t(n)}),0))};setTimeout(a,10)}},e.prototype.fromNumberAsync=function(t,r,n,o){if("number"==typeof r)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);var s=this,a=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(e.ONE.shiftLeft(t-1),s),s.isProbablePrime(r)?setTimeout((function(){o()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var c=[],u=7&t;c.length=1+(t>>3),r.nextBytes(c),u>0?c[0]&=(1<<u)-1:c[0]=0,this.fromString(c,256)}},e}(),N=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),L=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),P=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=B();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(D.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=B();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),M=function(){function e(e){this.m=e,this.r2=B(),this.q3=B(),D.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=B();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function B(){return new D(null)}function j(e,t){return new D(e,t)}function G(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i}function H(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,l=a*c+u*s;i=((c=s*c+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+a*u+(i>>>30),r[n++]=1073741823&c}return i}function U(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,l=a*c+u*s;i=((c=s*c+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+a*u,r[n++]=268435455&c}return i}T&&"Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=H,E=30):T&&"Netscape"!=navigator.appName?(D.prototype.am=G,E=26):(D.prototype.am=U,E=28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E;var K=52;D.prototype.FV=Math.pow(2,K),D.prototype.F1=K-E,D.prototype.F2=2*E-K;var F,V,Y=[];for(F="0".charCodeAt(0),V=0;V<=9;++V)Y[F++]=V;for(F="a".charCodeAt(0),V=10;V<36;++V)Y[F++]=V;for(F="A".charCodeAt(0),V=10;V<36;++V)Y[F++]=V;function z(e,t){var r=Y[e.charCodeAt(t)];return null==r?-1:r}function X(e){var t=B();return t.fromInt(e),t}function W(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}D.ZERO=X(0),D.ONE=X(1);var q=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function $(){return new q}var Z,J,Q=256,ee=null;if(null==ee){ee=[],J=0;var te=void 0;if(window.crypto&&window.crypto.getRandomValues){var re=new Uint32Array(256);for(window.crypto.getRandomValues(re),te=0;te<re.length;++te)ee[J++]=255&re[te]}var ne=function(e){if(this.count=this.count||0,this.count>=256||J>=Q)window.removeEventListener?window.removeEventListener("mousemove",ne,!1):window.detachEvent&&window.detachEvent("onmousemove",ne);else try{var t=e.x+e.y;ee[J++]=255&t,this.count+=1}catch(e){}};window.addEventListener?window.addEventListener("mousemove",ne,!1):window.attachEvent&&window.attachEvent("onmousemove",ne)}function ie(){if(null==Z){for(Z=$();J<Q;){var e=Math.floor(65536*Math.random());ee[J++]=255&e}for(Z.init(ee),J=0;J<ee.length;++J)ee[J]=0;J=0}return Z.next()}var oe=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=ie()},e}();function se(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var r=t-e.length-6,n="",i=0;i<r;i+=2)n+="ff";return j("0001"+n+"00"+e,16)}function ae(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=e.length-1;n>=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new oe,s=[];t>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);r[--t]=s[0]}return r[--t]=2,r[--t]=0,new D(r)}var ce=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=j(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=ae(e,this.n.bitLength()+7>>3);if(null==t)return null;var r=this.doPublic(t);if(null==r)return null;var n=r.toString(16);return 0==(1&n.length)?n:"0"+n},e.prototype.encryptLong=function(e){var t=this,r=(this.n.bitLength()+7>>3)-11;try{var n="";return e.length>r?(e.match(/.{1,117}/g).forEach((function(e){var r=t.encrypt(e);n+=r})),h(n)):h(this.encrypt(e))}catch(e){return!1}},e.prototype.decryptLong=function(e){var t=this,r=this.n.bitLength()+7>>3;e=d(e);try{if(e.length>r){var n="";return e.match(/.{1,256}/g).forEach((function(e){var r=t.decrypt(e);n+=r})),n}return this.decrypt(e)}catch(e){return!1}},e.prototype.setPrivate=function(e,t,r){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=j(e,16),this.e=parseInt(t,16),this.d=j(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,r,n,i,o,s,a){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=j(e,16),this.e=parseInt(t,16),this.d=j(r,16),this.p=j(n,16),this.q=j(i,16),this.dmp1=j(o,16),this.dmq1=j(s,16),this.coeff=j(a,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var r=new oe,n=e>>1;this.e=parseInt(t,16);for(var i=new D(t,16);;){for(;this.p=new D(e-n,1,r),0!=this.p.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(n,1,r),0!=this.q.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(D.ONE),a=this.q.subtract(D.ONE),c=s.multiply(a);if(0==c.gcd(i).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(c),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=j(e,16),r=this.doPrivate(t);return null==r?null:ue(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,r){var n=new oe,i=e>>1;this.e=parseInt(t,16);var o=new D(t,16),s=this,a=function(){var t=function(){if(s.p.compareTo(s.q)<=0){var e=s.p;s.p=s.q,s.q=e}var t=s.p.subtract(D.ONE),n=s.q.subtract(D.ONE),i=t.multiply(n);0==i.gcd(o).compareTo(D.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(i),s.dmp1=s.d.mod(t),s.dmq1=s.d.mod(n),s.coeff=s.q.modInverse(s.p),setTimeout((function(){r()}),0)):setTimeout(a,0)},c=function(){s.q=B(),s.q.fromNumberAsync(i,1,n,(function(){s.q.subtract(D.ONE).gcda(o,(function(e){0==e.compareTo(D.ONE)&&s.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(c,0)}))}))},u=function(){s.p=B(),s.p.fromNumberAsync(e-i,1,n,(function(){s.p.subtract(D.ONE).gcda(o,(function(e){0==e.compareTo(D.ONE)&&s.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(a,0)},e.prototype.sign=function(e,t,r){var n=se(he(r)+t(e).toString(),this.n.bitLength()/4);if(null==n)return null;var i=this.doPrivate(n);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},e.prototype.verify=function(e,t,r){var n=j(t,16),i=this.doPublic(n);return null==i?null:de(i.toString(16).replace(/^1f+00/,""))==r(e).toString()},e}();function ue(e,t){for(var r=e.toByteArray(),n=0;n<r.length&&0==r[n];)++n;if(r.length-n!=t-1||2!=r[n])return null;for(++n;0!=r[n];)if(++n>=r.length)return null;for(var i="";++n<r.length;){var o=255&r[n];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}var le={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function he(e){return le[e]||""}function de(e){for(var t in le)if(le.hasOwnProperty(t)){var r=le[t],n=r.length;if(e.substr(0,n)==r)return e.substr(n)}return e}var fe={};fe.lang={extend:function(e,t,r){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var n=function(){};if(n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),r){var i;for(i in r)e.prototype[i]=r[i];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(e,t){for(i=0;i<s.length;i+=1){var r=s[i],n=t[r];"function"==typeof n&&n!=Object.prototype[r]&&(e[r]=n)}})}catch(e){}o(e.prototype,r)}}};var pe={};void 0!==pe.asn1&&pe.asn1||(pe.asn1={}),pe.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";t=new D(n,16).xor(e).add(D.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=pe.asn1,r=t.DERBoolean,n=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,s=t.DERNull,a=t.DERObjectIdentifier,c=t.DEREnumerated,u=t.DERUTF8String,l=t.DERNumericString,h=t.DERPrintableString,d=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,v=t.DERGeneralizedTime,g=t.DERSequence,m=t.DERSet,y=t.DERTaggedObject,b=t.ASN1Util.newObject,S=Object.keys(e);if(1!=S.length)throw"key of param shall be only one.";var w=S[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(e[w]);if("int"==w)return new n(e[w]);if("bitstr"==w)return new i(e[w]);if("octstr"==w)return new o(e[w]);if("null"==w)return new s(e[w]);if("oid"==w)return new a(e[w]);if("enum"==w)return new c(e[w]);if("utf8str"==w)return new u(e[w]);if("numstr"==w)return new l(e[w]);if("prnstr"==w)return new h(e[w]);if("telstr"==w)return new d(e[w]);if("ia5str"==w)return new f(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new v(e[w]);if("seq"==w){for(var k=e[w],C=[],x=0;x<k.length;x++){var E=b(k[x]);C.push(E)}return new g({array:C})}if("set"==w){for(k=e[w],C=[],x=0;x<k.length;x++)E=b(k[x]),C.push(E);return new m({array:C})}if("tag"==w){var _=e[w];if("[object Array]"===Object.prototype.toString.call(_)&&3==_.length){var I=b(_[2]);return new y({tag:_[0],explicit:_[1],obj:I})}var A={};if(void 0!==_.explicit&&(A.explicit=_.explicit),void 0!==_.tag&&(A.tag=_.tag),void 0===_.obj)throw"obj shall be specified for 'tag'.";return A.obj=b(_.obj),new y(A)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},pe.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",r=parseInt(e.substr(0,2),16),n=(t=Math.floor(r/40)+"."+r%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);n+=o.substr(1,7),"0"==o.substr(0,1)&&(t=t+"."+new D(n,2).toString(10),n="")}return t},pe.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new D(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(n=o+n,s=0;s<n.length-1;s+=7){var a=n.substr(s,7);s!=n.length-7&&(a="1"+a),r+=t(parseInt(a,2))}return r};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var s=0;s<i.length;s++)n+=r(i[s]);return n},pe.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var t=this.hV.length/2,r=t.toString(16);if(r.length%2==1&&(r="0"+r),t<128)return r;var n=r.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+r},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},pe.asn1.DERAbstractString=function(e){pe.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},fe.lang.extend(pe.asn1.DERAbstractString,pe.asn1.ASN1Object),pe.asn1.DERAbstractTime=function(e){pe.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var s=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var a=i.getMilliseconds();if(0!=a){var c=n(String(a),3);s=s+"."+(c=c.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,n,i,o){var s=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},fe.lang.extend(pe.asn1.DERAbstractTime,pe.asn1.ASN1Object),pe.asn1.DERAbstractStructured=function(e){pe.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},fe.lang.extend(pe.asn1.DERAbstractStructured,pe.asn1.ASN1Object),pe.asn1.DERBoolean=function(){pe.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},fe.lang.extend(pe.asn1.DERBoolean,pe.asn1.ASN1Object),pe.asn1.DERInteger=function(e){pe.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new D(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},fe.lang.extend(pe.asn1.DERInteger,pe.asn1.ASN1Object),pe.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=pe.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}pe.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var r="0"+e;this.hTLV=null,this.isModified=!0,this.hV=r+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var r=0;r<=t;r++)e+="0";var n="";for(r=0;r<e.length-1;r+=8){var i=e.substr(r,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),n+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+n},this.setByBooleanArray=function(e){for(var t="",r=0;r<e.length;r++)1==e[r]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},fe.lang.extend(pe.asn1.DERBitString,pe.asn1.ASN1Object),pe.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=pe.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}pe.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},fe.lang.extend(pe.asn1.DEROctetString,pe.asn1.DERAbstractString),pe.asn1.DERNull=function(){pe.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},fe.lang.extend(pe.asn1.DERNull,pe.asn1.ASN1Object),pe.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new D(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(n=o+n,s=0;s<n.length-1;s+=7){var a=n.substr(s,7);s!=n.length-7&&(a="1"+a),r+=t(parseInt(a,2))}return r};pe.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var s=0;s<i.length;s++)n+=r(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(e){var t=pe.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},fe.lang.extend(pe.asn1.DERObjectIdentifier,pe.asn1.ASN1Object),pe.asn1.DEREnumerated=function(e){pe.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new D(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},fe.lang.extend(pe.asn1.DEREnumerated,pe.asn1.ASN1Object),pe.asn1.DERUTF8String=function(e){pe.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},fe.lang.extend(pe.asn1.DERUTF8String,pe.asn1.DERAbstractString),pe.asn1.DERNumericString=function(e){pe.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},fe.lang.extend(pe.asn1.DERNumericString,pe.asn1.DERAbstractString),pe.asn1.DERPrintableString=function(e){pe.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},fe.lang.extend(pe.asn1.DERPrintableString,pe.asn1.DERAbstractString),pe.asn1.DERTeletexString=function(e){pe.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},fe.lang.extend(pe.asn1.DERTeletexString,pe.asn1.DERAbstractString),pe.asn1.DERIA5String=function(e){pe.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},fe.lang.extend(pe.asn1.DERIA5String,pe.asn1.DERAbstractString),pe.asn1.DERUTCTime=function(e){pe.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},fe.lang.extend(pe.asn1.DERUTCTime,pe.asn1.DERAbstractTime),pe.asn1.DERGeneralizedTime=function(e){pe.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},fe.lang.extend(pe.asn1.DERGeneralizedTime,pe.asn1.DERAbstractTime),pe.asn1.DERSequence=function(e){pe.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},fe.lang.extend(pe.asn1.DERSequence,pe.asn1.DERAbstractStructured),pe.asn1.DERSet=function(e){pe.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},fe.lang.extend(pe.asn1.DERSet,pe.asn1.DERAbstractStructured),pe.asn1.DERTaggedObject=function(e){pe.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},fe.lang.extend(pe.asn1.DERTaggedObject,pe.asn1.ASN1Object);var ve=function(e){function t(r){var n=e.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(t.hasPrivateKeyProperty(r)||t.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return v(t,e),t.prototype.parseKey=function(e){try{var t=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?m.decode(e):y.unarmor(e),i=I.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=j(t,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var o=i.sub[3].getHexStringValue();this.d=j(o,16);var s=i.sub[4].getHexStringValue();this.p=j(s,16);var a=i.sub[5].getHexStringValue();this.q=j(a,16);var c=i.sub[6].getHexStringValue();this.dmp1=j(c,16);var u=i.sub[7].getHexStringValue();this.dmq1=j(u,16);var l=i.sub[8].getHexStringValue();this.coeff=j(l,16)}else{if(2!==i.sub.length)return!1;var h=i.sub[1].sub[0];t=h.sub[0].getHexStringValue(),this.n=j(t,16),r=h.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new pe.asn1.DERInteger({int:0}),new pe.asn1.DERInteger({bigint:this.n}),new pe.asn1.DERInteger({int:this.e}),new pe.asn1.DERInteger({bigint:this.d}),new pe.asn1.DERInteger({bigint:this.p}),new pe.asn1.DERInteger({bigint:this.q}),new pe.asn1.DERInteger({bigint:this.dmp1}),new pe.asn1.DERInteger({bigint:this.dmq1}),new pe.asn1.DERInteger({bigint:this.coeff})]};return new pe.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return h(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new pe.asn1.DERSequence({array:[new pe.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new pe.asn1.DERNull]}),t=new pe.asn1.DERSequence({array:[new pe.asn1.DERInteger({bigint:this.n}),new pe.asn1.DERInteger({int:this.e})]}),r=new pe.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new pe.asn1.DERSequence({array:[e,r]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return h(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var r="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(r,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(ce),ge=function(){function e(e){e=e||{},this.default_key_size=parseInt(e.default_key_size,10)||1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ve(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(d(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return h(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptLong=function(e){try{for(var t=this.getKey().encryptLong(e)||"",r=this.getKey().decryptLong(t)||"",n=0,i=/null$/g;i.test(r)&&(n++,t=this.getKey().encryptLong(e)||"",r=this.getKey().decryptLong(t)||"",!(n>10)););return t}catch(e){return!1}},e.prototype.decryptLong=function(e){try{return this.getKey().decryptLong(e)}catch(e){return!1}},e.prototype.sign=function(e,t,r){try{return h(this.getKey().sign(e,t,r))}catch(e){return!1}},e.prototype.verify=function(e,t,r){try{return this.getKey().verify(e,d(t),r)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new ve,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version="3.1.4",e}();window.JSEncrypt=ge,e.JSEncrypt=ge,e.default=ge,Object.defineProperty(e,"__esModule",{value:!0})}(t)},5299:(e,t,r)=>{"use strict";var n=r(7798);function i(e){return!0===n(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,r;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")))}},7798:e=>{"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},5733:(e,t,r)=>{e.exports=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,i,s,a,c,u,l=[],h=0,d=e.length,f=d,p="string"!==n.getTypeOf(e);h<e.length;)f=d-h,i=p?(t=e[h++],r=h<d?e[h++]:0,h<d?e[h++]:0):(t=e.charCodeAt(h++),r=h<d?e.charCodeAt(h++):0,h<d?e.charCodeAt(h++):0),s=t>>2,a=(3&t)<<4|r>>4,c=1<f?(15&r)<<2|i>>6:64,u=2<f?63&i:64,l.push(o.charAt(s)+o.charAt(a)+o.charAt(c)+o.charAt(u));return l.join("")},r.decode=function(e){var t,r,n,s,a,c,u=0,l=0,h="data:";if(e.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&f--,e.charAt(e.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=i.uint8array?new Uint8Array(0|f):new Array(0|f);u<e.length;)t=o.indexOf(e.charAt(u++))<<2|(s=o.indexOf(e.charAt(u++)))>>4,r=(15&s)<<4|(a=o.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(c=o.indexOf(e.charAt(u++))),d[l++]=t,64!==a&&(d[l++]=r),64!==c&&(d[l++]=n);return d}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("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)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){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){"use strict";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,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var o=i,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";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){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function c(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(c,s),c.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.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 c("Deflate",e)},r.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";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,s,l){var h,d,f=e.file,p=e.compression,v=l!==a.utf8encode,g=o.transformTo("string",l(f.name)),m=o.transformTo("string",a.utf8encode(f.name)),y=f.comment,b=o.transformTo("string",l(y)),S=o.transformTo("string",a.utf8encode(y)),w=m.length!==f.name.length,k=S.length!==y.length,C="",x="",E="",_=f.dir,I=f.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),v||!w&&!k||(T|=2048);var R=0,O=0;_&&(R|=16),"UNIX"===s?(O=798,R|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(f.unixPermissions,_)):(O=20,R|=function(e){return 63&(e||0)}(f.dosPermissions)),h=I.getUTCHours(),h<<=6,h|=I.getUTCMinutes(),h<<=5,h|=I.getUTCSeconds()/2,d=I.getUTCFullYear()-1980,d<<=4,d|=I.getUTCMonth()+1,d<<=5,d|=I.getUTCDate(),w&&(x=n(1,1)+n(c(g),4)+m,C+="up"+n(x.length,2)+x),k&&(E=n(1,1)+n(c(b),4)+S,C+="uc"+n(E.length,2)+E);var D="";return D+="\n\0",D+=n(T,2),D+=p.magic,D+=n(h,2),D+=n(d,2),D+=n(A.crc32,4),D+=n(A.compressedSize,4),D+=n(A.uncompressedSize,4),D+=n(g.length,2),D+=n(C.length,2),{fileRecord:u.LOCAL_FILE_HEADER+D+g+C,dirRecord:u.CENTRAL_FILE_HEADER+n(O,2)+D+n(b.length,2)+"\0\0\0\0"+n(R,4)+n(i,4)+g+C+b}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),c=e("../crc32"),u=e("../signature");function l(e,t,r,n){s.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,s),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,s.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 u.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,s){var a=o.transformTo("string",s(i));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(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!!s.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(!s.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(){s.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){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var o=new i(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach((function(e,r){s++;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),a=r.options.compressionOptions||t.compressionOptions||{},c=r.dir,u=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:e,dir:c,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";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.1",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){"use strict";var n=e("./utils"),i=e("./external"),o=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),c=e("./nodejsUtils");function u(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);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}),c.isNode&&c.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 s(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(u(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,s=0;s<o.length;s++){var a=o[s],c=a.fileNameStr,u=n.resolve(a.fileNameStr);r.file(u,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(u).unsafeOriginalName=c)}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){"use strict";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){"use strict";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){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function n(e,t,r){var n,i=o.getTypeOf(t),a=o.extend(r||{},c);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=v(e)),a.createFolders&&(n=p(e))&&g.call(this,n,!0);var h="string"===i&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!h),(t instanceof u&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var m=null;m=t instanceof u||t instanceof s?t:d.isNode&&d.isStream(t)?new f(e,t):o.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var y=new l(e,m,a);this.files[e]=y}var i=e("./utf8"),o=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),c=e("./defaults"),u=e("./compressedObject"),l=e("./zipObject"),h=e("./generate"),d=e("./nodejsUtils"),f=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},g=function(e,t){return t=void 0!==t?t:c.createFolders,e=v(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function m(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={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(m(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(m(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=g.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(){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=h.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(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=y},{"./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){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";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){"use strict";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(){},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(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},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){"use strict";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){"use strict";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){"use strict";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){"use strict";var n=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new c(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";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){"use strict";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){"use strict";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){"use strict";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){"use strict";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){"use strict";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)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,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){"use strict";var n=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),s=e("../base64"),a=e("../support"),c=e("../external"),u=null;if(a.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,t){return new c.Promise((function(r,i){var o=[],a=e._internalType,c=e._outputType,u=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 s.encode(t);default:return n.transformTo(e,t)}}(c,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 Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,o),u);r(e)}catch(e){i(e)}o=[]})).resume()}))}function h(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new i(s)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}h.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 u(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,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){"use strict";for(var n=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),c=0;c<256;c++)a[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function l(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,s,a=e.length,c=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(c):new Array(c),o=s=0;s<c;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=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,s=e.length,c=new Array(2*s);for(t=r=0;t<s;)if((i=e[t++])<128)c[r++]=i;else if(4<(o=a[i]))c[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<s;)i=i<<6|63&e[t++],o--;1<o?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,s),u.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 s=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}(t),c=t;s!==t.length&&(i.uint8array?(c=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(c=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(c),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,n.inherits(l,s),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){"use strict";var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),s=e("./external");function a(e){return e}function c(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 u={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=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return u.stringifyByChar(e)}function h(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=l;var d={};d.string={string:a,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,o.allocBuffer(e.length))}},d.array={string:l,array:a,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 h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return o.newBufferFrom(e)}},d.nodebuffer={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:a},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])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,o,a,u){return s.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 s.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&&(u?t=i.decode(t):o&&!0!==a&&(t=function(e){return c(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.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){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),s=e("./zipEntry"),a=e("./support");function c(e){this.files=[],this.loadOptions=e}c.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=a.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 s({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=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),c=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(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 c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[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(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.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=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.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)||s(this.fileName)!==t.readInt(4)?null:a.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)||s(this.fileComment)!==t.readInt(4)?null:a.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){"use strict";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"),s=e("./utf8"),a=e("./compressedObject"),c=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 s.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new c("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 a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof c?this._data:new o(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<u.length;h++)n.prototype[u[h]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(l),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.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 c=new e.MessageChannel;c.port1.onmessage=l,r=function(){c.port2.postMessage(0)}}var u=[];function l(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var n=e("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==i&&f(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 h(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 f(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 s=p((function(){t(i,n)}));"error"===s.status&&n(s.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=u).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}))}))},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(i);return this.state!==c?h(r,this.state===a?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){h(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){h(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)f(e,n);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},u.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},u.reject=function(e){var t=new this(i);return o.reject(t,e)},u.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 s=new Array(r),a=0,c=-1,u=new this(i);++c<r;)l(e[c],c);return u;function l(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==r||n||(n=!0,o.resolve(u,s))}),(function(e){n||(n=!0,o.reject(u,e))}))}},u.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 s,a=-1,c=new this(i);++a<r;)s=e[a],t.resolve(s).then((function(e){n||(n=!0,o.resolve(c,e))}),(function(e){n||(n=!0,o.reject(c,e))}));return c}},{immediate:36}],38:[function(e,t,r){"use strict";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){"use strict";var n=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),c=Object.prototype.toString,u=0,l=-1,h=0,d=8;function f(e){if(!(this instanceof f))return new f(e);this.options=i.assign({level:l,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,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 a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==u)throw new Error(s[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]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==u)throw new Error(s[r]);this._dict_set=!0}}function p(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,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===c.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=n.deflate(a,s))&&r!==u)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u):2!==s||(this.onEnd(u),!(a.avail_out=0))},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===u&&("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=f,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){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),c=e("./zlib/zstream"),u=e("./zlib/gzheader"),l=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(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&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(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,c,u,h,d,f=this.strm,p=this.options.chunkSize,v=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new i.Buf8(p),f.next_out=0,f.avail_out=p),(r=n.inflate(f,s.Z_NO_FLUSH))===s.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===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&r!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(f.output,f.next_out),u=f.next_out-c,h=o.buf2string(f.output,c),f.next_out=u,f.avail_out=p-u,u&&i.arraySet(f.output,f.output,c,u,0),this.onData(h)):this.onData(i.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(g=!0)}while((0<f.avail_in||0===f.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(f.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.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=h,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){"use strict";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,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},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){"use strict";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 s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function c(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,i,o,s,a=e.length,c=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(c),o=s=0;s<c;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return c(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,a=t||e.length,u=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)u[n++]=i;else if(4<(o=s[i]))u[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&e[r++],o--;1<o?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return c(u,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+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,r){"use strict";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){"use strict";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,s=i+r;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),c=e("./messages"),u=0,l=4,h=0,d=-2,f=-1,p=4,v=2,g=8,m=9,y=286,b=30,S=19,w=2*y+1,k=15,C=3,x=258,E=x+C+1,_=42,I=113,A=1,T=2,R=3,O=4;function D(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4<e?9:0)}function L(e){for(var t=e.length;0<=--t;)e[t]=0}function P(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 M(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,P(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function j(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function G(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-E?e.strstart-(e.w_size-E):0,u=e.window,l=e.w_mask,h=e.prev,d=e.strstart+x,f=u[o+s-1],p=u[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+s]===p&&u[r+s-1]===f&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<d);if(n=x-(d-o),o=d-x,s<n){if(e.match_start=t,a<=(s=n))break;f=u[o+s-1],p=u[o+s]}}}while((t=h[t&l])>c&&0!=--i);return s<=e.lookahead?s:e.lookahead}function H(e){var t,r,n,o,c,u,l,h,d,f,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-E)){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(u=e.strm,l=e.window,h=e.strstart+e.lookahead,f=void 0,(d=o)<(f=u.avail_in)&&(f=d),r=0===f?0:(u.avail_in-=f,i.arraySet(l,u.input,u.next_in,f,h),1===u.state.wrap?u.adler=s(u.adler,l,f,h):2===u.state.wrap&&(u.adler=a(u.adler,l,f,h)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+C-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<E&&0!==e.strm.avail_in)}function U(e,t){for(var r,n;;){if(e.lookahead<E){if(H(e),e.lookahead<E&&t===u)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-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-E&&(e.match_length=G(e,r)),e.match_length>=C)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-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&&(M(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<C-1?e.strstart:C-1,t===l?(M(e,!0),0===e.strm.avail_out?R:O):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?A:T}function K(e,t){for(var r,n,i;;){if(e.lookahead<E){if(H(e),e.lookahead<E&&t===u)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-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=C-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-E&&(e.match_length=G(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===C&&4096<e.strstart-e.match_start)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),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+C-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=C-1,e.strstart++,n&&(M(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&M(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}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<C-1?e.strstart:C-1,t===l?(M(e,!0),0===e.strm.avail_out?R:O):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?A:T}function F(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 V(){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=g,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*w),this.dyn_dtree=new i.Buf16(2*(2*b+1)),this.bl_tree=new i.Buf16(2*(2*S+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(k+1),this.heap=new i.Buf16(2*y+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*y+1),L(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 Y(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?_:I,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),h):D(e,d)}function z(e){var t=Y(e);return t===h&&function(e){e.window_size=2*e.w_size,L(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=C-1,e.match_available=0,e.ins_h=0}(e.state),t}function X(e,t,r,n,o,s){if(!e)return d;var a=1;if(t===f&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||m<o||r!==g||n<8||15<n||t<0||9<t||s<0||p<s)return D(e,d);8===n&&(n=9);var c=new V;return(e.state=c).strm=e,c.wrap=a,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+C-1)/C),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=s,c.method=r,z(e)}n=[new F(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(H(e),0===e.lookahead&&t===u)return A;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,M(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-E&&(M(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?R:O):(e.strstart>e.block_start&&(M(e,!1),e.strm.avail_out),A)})),new F(4,4,8,4,U),new F(4,5,16,8,U),new F(4,6,32,32,U),new F(4,4,16,16,K),new F(8,16,32,32,K),new F(8,16,128,128,K),new F(8,32,128,256,K),new F(32,128,258,1024,K),new F(32,258,258,4096,K)],r.deflateInit=function(e,t){return X(e,t,g,15,8,0)},r.deflateInit2=X,r.deflateReset=z,r.deflateResetKeep=Y,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,h):d},r.deflate=function(e,t){var r,i,s,c;if(!e||!e.state||5<t||t<0)return e?D(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==l)return D(e,0===e.avail_out?-5:d);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===_)if(2===i.wrap)e.adler=0,B(i,31),B(i,139),B(i,8),i.gzhead?(B(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)),B(i,255&i.gzhead.time),B(i,i.gzhead.time>>8&255),B(i,i.gzhead.time>>16&255),B(i,i.gzhead.time>>24&255),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(B(i,255&i.gzhead.extra.length),B(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(B(i,0),B(i,0),B(i,0),B(i,0),B(i,0),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,3),i.status=I);else{var f=g+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=I,j(i,f),0!==i.strstart&&(j(i,e.adler>>>16),j(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),P(e),s=i.pending,i.pending!==i.pending_buf_size));)B(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),P(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,B(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),P(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,B(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&P(e),i.pending+2<=i.pending_buf_size&&(B(i,255&e.adler),B(i,e.adler>>8&255),e.adler=0,i.status=I)):i.status=I),0!==i.pending){if(P(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&N(t)<=N(r)&&t!==l)return D(e,-5);if(666===i.status&&0!==e.avail_in)return D(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&666!==i.status){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(H(e),0===e.lookahead)){if(t===u)return A;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(M(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?R:O):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?A:T}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=x){if(H(e),e.lookahead<=x&&t===u)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+x;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=x-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(r=o._tr_tally(e,1,e.match_length-C),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&&(M(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?R:O):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?A:T}(i,t):n[i.level].func(i,t);if(p!==R&&p!==O||(i.status=666),p===A||p===R)return 0===e.avail_out&&(i.last_flush=-1),h;if(p===T&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(L(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),P(e),0===e.avail_out))return i.last_flush=-1,h}return t!==l?h:i.wrap<=0?1:(2===i.wrap?(B(i,255&e.adler),B(i,e.adler>>8&255),B(i,e.adler>>16&255),B(i,e.adler>>24&255),B(i,255&e.total_in),B(i,e.total_in>>8&255),B(i,e.total_in>>16&255),B(i,e.total_in>>24&255)):(j(i,e.adler>>>16),j(i,65535&e.adler)),P(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?h:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==_&&69!==t&&73!==t&&91!==t&&103!==t&&t!==I&&666!==t?D(e,d):(e.state=null,t===I?D(e,-3):h):d},r.deflateSetDictionary=function(e,t){var r,n,o,a,c,u,l,f,p=t.length;if(!e||!e.state)return d;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==_||r.lookahead)return d;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(L(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,p-r.w_size,r.w_size,0),t=f,p=r.w_size),c=e.avail_in,u=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,H(r);r.lookahead>=C;){for(n=r.strstart,o=r.lookahead-(C-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+C-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=C-1,H(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=C-1,r.match_available=0,e.next_in=u,e.input=l,e.avail_in=c,r.wrap=a,h},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";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){"use strict";t.exports=function(e,t){var r,n,i,o,s,a,c,u,l,h,d,f,p,v,g,m,y,b,S,w,k,C,x,E,_;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),o=e.next_out,_=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,h=r.wnext,d=r.window,f=r.hold,p=r.bits,v=r.lencode,g=r.distcode,m=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(f+=E[n++]<<p,p+=8,f+=E[n++]<<p,p+=8),b=v[f&m];t:for(;;){if(f>>>=S=b>>>24,p-=S,0==(S=b>>>16&255))_[o++]=65535&b;else{if(!(16&S)){if(0==(64&S)){b=v[(65535&b)+(f&(1<<S)-1)];continue t}if(32&S){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&b,(S&=15)&&(p<S&&(f+=E[n++]<<p,p+=8),w+=f&(1<<S)-1,f>>>=S,p-=S),p<15&&(f+=E[n++]<<p,p+=8,f+=E[n++]<<p,p+=8),b=g[f&y];r:for(;;){if(f>>>=S=b>>>24,p-=S,!(16&(S=b>>>16&255))){if(0==(64&S)){b=g[(65535&b)+(f&(1<<S)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&b,p<(S&=15)&&(f+=E[n++]<<p,(p+=8)<S&&(f+=E[n++]<<p,p+=8)),c<(k+=f&(1<<S)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=S,p-=S,(S=o-s)<k){if(l<(S=k-S)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=d,(C=0)===h){if(C+=u-S,S<w){for(w-=S;_[o++]=d[C++],--S;);C=o-k,x=_}}else if(h<S){if(C+=u+h-S,(S-=h)<w){for(w-=S;_[o++]=d[C++],--S;);if(C=0,h<w){for(w-=S=h;_[o++]=d[C++],--S;);C=o-k,x=_}}}else if(C+=h-S,S<w){for(w-=S;_[o++]=d[C++],--S;);C=o-k,x=_}for(;2<w;)_[o++]=x[C++],_[o++]=x[C++],_[o++]=x[C++],w-=3;w&&(_[o++]=x[C++],1<w&&(_[o++]=x[C++]))}else{for(C=o-k;_[o++]=_[C++],_[o++]=_[C++],_[o++]=_[C++],2<(w-=3););w&&(_[o++]=_[C++],1<w&&(_[o++]=_[C++]))}break}}break}}while(n<i&&o<a);n-=w=p>>3,f&=(1<<(p-=w<<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<a?a-o+257:257-(o-a),r.hold=f,r.bits=p}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),c=1,u=2,l=0,h=-2,d=1,f=852,p=592;function v(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){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 m(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(f),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,l):h}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,m(e)):h}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)?h:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,y(e))):h}function S(e,t){var r,n;return e?(n=new g,(e.state=n).window=null,(r=b(e,t))!==l&&(e.state=null),r):h}var w,k,C=!0;function x(e){if(C){var t;for(w=new n.Buf32(512),k=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(a(c,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(u,e.lens,0,32,k,0,e.work,{bits:5}),C=!1}e.lencode=w,e.lenbits=9,e.distcode=k,e.distbits=5}function E(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=y,r.inflateReset2=b,r.inflateResetKeep=m,r.inflateInit=function(e){return S(e,15)},r.inflateInit2=S,r.inflate=function(e,t){var r,f,p,g,m,y,b,S,w,k,C,_,I,A,T,R,O,D,N,L,P,M,B,j,G=0,H=new n.Buf8(4),U=[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 h;12===(r=e.state).mode&&(r.mode=13),m=e.next_out,p=e.output,b=e.avail_out,g=e.next_in,f=e.input,y=e.avail_in,S=r.hold,w=r.bits,k=y,C=b,M=l;e:for(;;)switch(r.mode){case d:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(2&r.wrap&&35615===S){H[r.check=0]=255&S,H[1]=S>>>8&255,r.check=o(r.check,H,2,0),w=S=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&S)<<8)+(S>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&S)){e.msg="unknown compression method",r.mode=30;break}if(w-=4,P=8+(15&(S>>>=4)),0===r.wbits)r.wbits=P;else if(P>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<P,e.adler=r.check=1,r.mode=512&S?10:12,w=S=0;break;case 2:for(;w<16;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(r.flags=S,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=S>>8&1),512&r.flags&&(H[0]=255&S,H[1]=S>>>8&255,r.check=o(r.check,H,2,0)),w=S=0,r.mode=3;case 3:for(;w<32;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.head&&(r.head.time=S),512&r.flags&&(H[0]=255&S,H[1]=S>>>8&255,H[2]=S>>>16&255,H[3]=S>>>24&255,r.check=o(r.check,H,4,0)),w=S=0,r.mode=4;case 4:for(;w<16;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.head&&(r.head.xflags=255&S,r.head.os=S>>8),512&r.flags&&(H[0]=255&S,H[1]=S>>>8&255,r.check=o(r.check,H,2,0)),w=S=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.length=S,r.head&&(r.head.extra_len=S),512&r.flags&&(H[0]=255&S,H[1]=S>>>8&255,r.check=o(r.check,H,2,0)),w=S=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(y<(_=r.length)&&(_=y),_&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,g,_,P)),512&r.flags&&(r.check=o(r.check,f,_,g)),y-=_,g+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break e;for(_=0;P=f[g+_++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P)),P&&_<y;);if(512&r.flags&&(r.check=o(r.check,f,_,g)),y-=_,g+=_,P)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===y)break e;for(_=0;P=f[g+_++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P)),P&&_<y;);if(512&r.flags&&(r.check=o(r.check,f,_,g)),y-=_,g+=_,P)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;w<16;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(S!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}w=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(;w<32;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}e.adler=r.check=v(S),w=S=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=b,e.next_in=g,e.avail_in=y,r.hold=S,r.bits=w,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){S>>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}switch(r.last=1&S,w-=1,3&(S>>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6!==t)break;S>>>=2,w-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}S>>>=2,w-=2;break;case 14:for(S>>>=7&w,w-=7&w;w<32;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if((65535&S)!=(S>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&S,w=S=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(y<_&&(_=y),b<_&&(_=b),0===_)break e;n.arraySet(p,f,g,_,m),y-=_,g+=_,b-=_,m+=_,r.length-=_;break}r.mode=12;break;case 17:for(;w<14;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(r.nlen=257+(31&S),S>>>=5,w-=5,r.ndist=1+(31&S),S>>>=5,w-=5,r.ncode=4+(15&S),S>>>=4,w-=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(;w<3;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.lens[U[r.have++]]=7&S,S>>>=3,w-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},M=a(0,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,M){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(;R=(G=r.lencode[S&(1<<r.lenbits)-1])>>>16&255,O=65535&G,!((T=G>>>24)<=w);){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(O<16)S>>>=T,w-=T,r.lens[r.have++]=O;else{if(16===O){for(j=T+2;w<j;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(S>>>=T,w-=T,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}P=r.lens[r.have-1],_=3+(3&S),S>>>=2,w-=2}else if(17===O){for(j=T+3;w<j;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}w-=T,P=0,_=3+(7&(S>>>=T)),S>>>=3,w-=3}else{for(j=T+7;w<j;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}w-=T,P=0,_=11+(127&(S>>>=T)),S>>>=7,w-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=P}}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,B={bits:r.lenbits},M=a(c,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,M){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},M=a(u,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,M){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<=y&&258<=b){e.next_out=m,e.avail_out=b,e.next_in=g,e.avail_in=y,r.hold=S,r.bits=w,s(e,C),m=e.next_out,p=e.output,b=e.avail_out,g=e.next_in,f=e.input,y=e.avail_in,S=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;R=(G=r.lencode[S&(1<<r.lenbits)-1])>>>16&255,O=65535&G,!((T=G>>>24)<=w);){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(R&&0==(240&R)){for(D=T,N=R,L=O;R=(G=r.lencode[L+((S&(1<<D+N)-1)>>D)])>>>16&255,O=65535&G,!(D+(T=G>>>24)<=w);){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}S>>>=D,w-=D,r.back+=D}if(S>>>=T,w-=T,r.back+=T,r.length=O,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=12;break}if(64&R){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.length+=S&(1<<r.extra)-1,S>>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(G=r.distcode[S&(1<<r.distbits)-1])>>>16&255,O=65535&G,!((T=G>>>24)<=w);){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(0==(240&R)){for(D=T,N=R,L=O;R=(G=r.distcode[L+((S&(1<<D+N)-1)>>D)])>>>16&255,O=65535&G,!(D+(T=G>>>24)<=w);){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}S>>>=D,w-=D,r.back+=D}if(S>>>=T,w-=T,r.back+=T,64&R){e.msg="invalid distance code",r.mode=30;break}r.offset=O,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}r.offset+=S&(1<<r.extra)-1,S>>>=r.extra,w-=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(_=C-b,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}I=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),A=r.window}else A=p,I=m-r.offset,_=r.length;for(b<_&&(_=b),b-=_,r.length-=_;p[m++]=A[I++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;p[m++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===y)break e;y--,S|=f[g++]<<w,w+=8}if(C-=b,e.total_out+=C,r.total+=C,C&&(e.adler=r.check=r.flags?o(r.check,p,C,m-C):i(r.check,p,C,m-C)),C=b,(r.flags?S:v(S))!==r.check){e.msg="incorrect data check",r.mode=30;break}w=S=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;w<32;){if(0===y)break e;y--,S+=f[g++]<<w,w+=8}if(S!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}w=S=0}r.mode=29;case 29:M=1;break e;case 30:M=-3;break e;case 31:return-4;default:return h}return e.next_out=m,e.avail_out=b,e.next_in=g,e.avail_in=y,r.hold=S,r.bits=w,(r.wsize||C!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&E(e,e.output,e.next_out,C-e.avail_out)?(r.mode=31,-4):(k-=e.avail_in,C-=e.avail_out,e.total_in+=k,e.total_out+=C,r.total+=C,r.wrap&&C&&(e.adler=r.check=r.flags?o(r.check,p,C,e.next_out-C):i(r.check,p,C,e.next_out-C)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==k&&0===C||4===t)&&M===l&&(M=-5),M)},r.inflateEnd=function(e){if(!e||!e.state)return h;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?0==(2&(r=e.state).wrap)?h:((r.head=t).done=!1,l):h},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?h:11===r.mode&&i(1,t,n,0)!==r.check?-3:E(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,l):h},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";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],s=[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],a=[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,c,u,l,h,d){var f,p,v,g,m,y,b,S,w,k=d.bits,C=0,x=0,E=0,_=0,I=0,A=0,T=0,R=0,O=0,D=0,N=null,L=0,P=new n.Buf16(16),M=new n.Buf16(16),B=null,j=0;for(C=0;C<=15;C++)P[C]=0;for(x=0;x<c;x++)P[t[r+x]]++;for(I=k,_=15;1<=_&&0===P[_];_--);if(_<I&&(I=_),0===_)return u[l++]=20971520,u[l++]=20971520,d.bits=1,0;for(E=1;E<_&&0===P[E];E++);for(I<E&&(I=E),C=R=1;C<=15;C++)if(R<<=1,(R-=P[C])<0)return-1;if(0<R&&(0===e||1!==_))return-1;for(M[1]=0,C=1;C<15;C++)M[C+1]=M[C]+P[C];for(x=0;x<c;x++)0!==t[r+x]&&(h[M[t[r+x]]++]=x);if(y=0===e?(N=B=h,19):1===e?(N=i,L-=257,B=o,j-=257,256):(N=s,B=a,-1),C=E,m=l,T=x=D=0,v=-1,g=(O=1<<(A=I))-1,1===e&&852<O||2===e&&592<O)return 1;for(;;){for(b=C-T,w=h[x]<y?(S=0,h[x]):h[x]>y?(S=B[j+h[x]],N[L+h[x]]):(S=96,0),f=1<<C-T,E=p=1<<A;u[m+(D>>T)+(p-=f)]=b<<24|S<<16|w|0,0!==p;);for(f=1<<C-1;D&f;)f>>=1;if(0!==f?(D&=f-1,D+=f):D=0,x++,0==--P[C]){if(C===_)break;C=t[r+h[x]]}if(I<C&&(D&g)!==v){for(0===T&&(T=I),m+=E,R=1<<(A=C-T);A+T<_&&!((R-=P[A+T])<=0);)A++,R<<=1;if(O+=1<<A,1===e&&852<O||2===e&&592<O)return 1;u[v=D&g]=I<<24|A<<16|m-l|0}}return 0!==D&&(u[m+D]=C-T<<24|64<<16|0),d.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";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){"use strict";var n=e("../utils/common"),i=0,o=1;function s(e){for(var t=e.length;0<=--t;)e[t]=0}var a=0,c=29,u=256,l=u+1+c,h=30,d=19,f=2*l+1,p=15,v=16,g=7,m=256,y=16,b=17,S=18,w=[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],k=[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],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(l+2));s(E);var _=new Array(2*h);s(_);var I=new Array(512);s(I);var A=new Array(256);s(A);var T=new Array(c);s(T);var R,O,D,N=new Array(h);function L(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 P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function M(e){return e<256?I[e]:I[256+(e>>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function j(e,t,r){e.bi_valid>v-r?(e.bi_buf|=t<<e.bi_valid&65535,B(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 G(e,t,r){j(e,r[2*t],r[2*t+1])}function H(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function U(e,t,r){var n,i,o=new Array(p+1),s=0;for(n=1;n<=p;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=H(o[a]++,a))}}function K(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<h;t++)e.dyn_dtree[2*t]=0;for(t=0;t<d;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function F(e){8<e.bi_valid?B(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 V(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 Y(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&V(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!V(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function z(e,t,r){var n,i,o,s,a=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],i=e.pending_buf[e.l_buf+a],a++,0===n?G(e,i,t):(G(e,(o=A[i])+u+1,t),0!==(s=w[o])&&j(e,i-=T[o],s),G(e,o=M(--n),r),0!==(s=k[o])&&j(e,n-=N[o],s)),a<e.last_lit;);G(e,m,t)}function X(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=f,r=0;r<c;r++)0!==o[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)Y(e,o,r);for(i=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(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++,Y(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,v=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(o=0;o<=p;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<f;r++)g<(o=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(o=g,m++),c[2*n+1]=o,u<n||(e.bl_count[o]++,s=0,v<=n&&(s=d[n-v]),a=c[2*n],e.opt_len+=a*(o+s),h&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,m-=2}while(0<m);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)u<(i=e.heap[--r])||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(e,t),U(o,u,e.bl_count)}function W(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<c&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*y]++):a<=10?e.bl_tree[2*b]++:e.bl_tree[2*S]++,o=i,u=(a=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4))}function q(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<c&&i===s)){if(a<u)for(;G(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(G(e,i,e.bl_tree),a--),G(e,y,e.bl_tree),j(e,a-3,2)):a<=10?(G(e,b,e.bl_tree),j(e,a-3,3)):(G(e,S,e.bl_tree),j(e,a-11,7));o=i,u=(a=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4)}}s(N);var $=!1;function Z(e,t,r,i){j(e,(a<<1)+(i?1:0),3),function(e,t,r,i){F(e),i&&(B(e,r),B(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){$||(function(){var e,t,r,n,i,o=new Array(p+1);for(n=r=0;n<c-1;n++)for(T[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(N[n]=i,e=0;e<1<<k[n];e++)I[i++]=n;for(i>>=7;n<h;n++)for(N[n]=i<<7,e=0;e<1<<k[n]-7;e++)I[256+i++]=n;for(t=0;t<=p;t++)o[t]=0;for(e=0;e<=143;)E[2*e+1]=8,e++,o[8]++;for(;e<=255;)E[2*e+1]=9,e++,o[9]++;for(;e<=279;)E[2*e+1]=7,e++,o[7]++;for(;e<=287;)E[2*e+1]=8,e++,o[8]++;for(U(E,l+1,o),e=0;e<h;e++)_[2*e+1]=5,_[2*e]=H(e,5);R=new L(E,w,u+1,l,p),O=new L(_,k,0,h,p),D=new L(new Array(0),C,0,d,g)}(),$=!0),e.l_desc=new P(e.dyn_ltree,R),e.d_desc=new P(e.dyn_dtree,O),e.bl_desc=new P(e.bl_tree,D),e.bi_buf=0,e.bi_valid=0,K(e)},r._tr_stored_block=Z,r._tr_flush_block=function(e,t,r,n){var s,a,c=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<u;t++)if(0!==e.dyn_ltree[2*t])return o;return i}(e)),X(e,e.l_desc),X(e,e.d_desc),c=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),X(e,e.bl_desc),t=d-1;3<=t&&0===e.bl_tree[2*x[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=s&&(s=a)):s=a=r+5,r+4<=s&&-1!==t?Z(e,t,r,n):4===e.strategy||a===s?(j(e,2+(n?1:0),3),z(e,E,_)):(j(e,4+(n?1:0),3),function(e,t,r,n){var i;for(j(e,t-257,5),j(e,r-1,5),j(e,n-4,4),i=0;i<n;i++)j(e,e.bl_tree[2*x[i]+1],3);q(e,e.dyn_ltree,t-1),q(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),z(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&F(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*(A[r]+u+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){j(e,2,3),G(e,m,E),function(e){16===e.bi_valid?(B(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){"use strict";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,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,n,i,o,s=1,a={},c=!1,u=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((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",f,!1):e.attachEvent("onmessage",f),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){i.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(n=u.documentElement,function(e){var t=u.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 a[s]=i,r(s),s++},l.clearImmediate=h}function h(e){delete a[e]}function d(e){if(c)setTimeout(d,0,e);else{var r=a[e];if(r){c=!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{h(e),c=!1}}}}function f(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!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},6401:e=>{var t=Object.prototype.toString;function r(e){return"function"==typeof e.constructor?e.constructor.name:null}e.exports=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var n,i=typeof e;if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return n=e,"GeneratorFunction"===r(n)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){if(e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(r(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(i=t.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")}},3341:(e,t,r)=>{"use strict";const n=Symbol.prototype.valueOf,i=r(6401);e.exports=function(e,t){switch(i(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return function(e){const t=e.length,r=Buffer.allocUnsafe?Buffer.allocUnsafe(t):Buffer.from(t);return e.copy(r),r}(e);case"symbol":return function(e){return n?Object(n.call(e)):{}}(e);case"arraybuffer":return function(e){const t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}(e);case"regexp":return function(e){const t=void 0!==e.flags?e.flags:/\w+$/.exec(e)||void 0,r=new e.constructor(e.source,t);return r.lastIndex=e.lastIndex,r}(e);case"error":return Object.create(e);default:return e}}},2480:()=>{},7061:(e,t,r)=>{var n=r(8698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.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){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),s=new _(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=C(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,s),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var f={};function p(){}function v(){}function g(){}var m={};l(m,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==r&&o.call(b,a)&&(m=b);var S=g.prototype=p.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,s,a,c){var u=d(e[i],e,s);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==n(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function C(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return v.prototype=g,l(S,"constructor",g),l(g,"constructor",v),v.displayName=l(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},w(k.prototype),l(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new k(h(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=I,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return s.type="throw",s.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},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("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(r){return e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:(e,t,r)=>{var n=r(7061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{AutoMute:()=>vi,Client:()=>Sa,DeviceManager:()=>Us,ERROR_CODE:()=>Fn,RecordStatus:()=>pi,RecordingState:()=>fi,Stream:()=>_a,StreamFrameRate:()=>mi,StreamResolution:()=>gi,StreamResolutionLevel:()=>yi,TEMPLATE_TYPE:()=>Si,VideoQuality:()=>bi,default:()=>Da,detectLocator:()=>Js,getLayoutItemState:()=>Ws,getLayoutRotateInfo:()=>$s,getSendSupportedCodec:()=>Zs,getVideoInfoByRotaion:()=>qs});var e=r(4687),t=r.n(e),i=(r(1539),r(8674),r(9601),r(2222),r(2564),r(2772),r(7327),r(4916),r(4723),r(1249),r(1058),function(){var e=navigator.userAgent,t=e.toLocaleLowerCase(),r=navigator.platform.toUpperCase().indexOf("MAC")>=0||/macintosh|mac os x/i.test(e),n=navigator.platform.toUpperCase().indexOf("LINUX")>=0,i=/(?:win)/.test(e),o=/(?:Windows Phone)/.test(e),s=/(?:SymbianOS)/.test(e)||o,a=/(?:Android)/.test(e)||t.indexOf("harmony")>-1,c=/(?:Firefox)/.test(e),u=/(?:Chrome|CriOS)/.test(e)&&!(e.indexOf("Edg")>-1),l=e.indexOf("Edg")>-1,h=e.indexOf("Safari")>-1&&!(e.indexOf("Chrome")>-1),d=/iPad/i.test(e)||e.indexOf("MacIntel")>-1&&navigator.maxTouchPoints>1||e.indexOf("Macintosh")>-1&&navigator.maxTouchPoints>1,f=/(?:iPad|PlayBook)/.test(e)||a&&!/(?:Mobile)/.test(e)||c&&/(?:Tablet)/.test(e),p=/(?:iPhone)/.test(e)&&!f,v=!(p||a||s||d),g=e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1||e.indexOf("baiduboxapp")>-1,m=!!t.match(/firefox/)||e.indexOf("Firefox")>-1,y=!!t.match(/tencenttraveler/)||!!t.match(/qqbrowse/)||e.indexOf("QQ/")>-1||e.indexOf("MicroMessenger")>-1,b=e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,S=e.indexOf("HuaweiBrowser")>-1;return{isTablet:f,isPhone:p,isAndroid:a,isPc:v,isMac:r,isWindows:i,isIPad:d,isChrome:u,isLinux:n,isFirefox:m,isBaidu:g,isQQ:y,isOpera:b,isZhazha:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1||e.indexOf("360SE")>-1||e.indexOf("360EE")>-1||e.indexOf("LBBROWSER")>-1||e.indexOf("UC")>-1||e.indexOf("UBrowser")>-1||e.indexOf("UCWEB")>-1||e.indexOf("Quark")>-1||e.indexOf("MiuiBrowser")>-1||e.indexOf("AliApp(TB")>-1||e.indexOf("Weibo")>-1||e.indexOf("IqiyiApp")>-1||e.indexOf("HuaweiBrowser")>-1||e.indexOf("HUAWEI")>-1||e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1||e.indexOf("SE")>-1||e.indexOf("Maxthon")>-1||e.indexOf("The world")>-1||e.indexOf("MetaSr")>-1||e.indexOf("2345Explorer")>-1||e.indexOf("TencentTraveler")>-1||e.indexOf("Mb2345Browser")>-1,isEdge:l,isSafari:h,isHuaweiBrowser:S}}),o=!i().isPc,s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=i(),c={isMinBrowser:function(){var e=!1,t=a.isChrome,r=a.isEdge,n=(a.isSafari,a.isFirefox);if(t){var i=function(){var e=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);if(null!=e&&5==e.length)return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2],build:e[3],patch:e[4]}}();e=(null==i?void 0:i.major)>=72}else if(r){var o=function(){var e=navigator.userAgent.match(/Ed(?:g)\/([0-9]+)\.([0-9]+)\.([0-9]+)/);if(!(null==e||e.length<4))return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2],build:e[3]}}();e=(null==o?void 0:o.major)>=80}else if(n){var s=function(){var e=navigator.userAgent.match(/Firefox\/([0-9]+)\.([0-9]+)/);if(!(null==e||e.length<3))return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2]}}();e=(null==s?void 0:s.major)>=80}return e},isMobile:function(){var e=!1,t=a.isPhone,r=a.isAndroid,n=a.isIPad;if(r){var i=function(){var e=navigator.userAgent.toLowerCase().match(/android (.*?);/);if(e){var t=e[1].split(".");return t=t.map((function(e){return parseInt(e,10)})),{major:t[0],minor:t[1]}}}()||{major:0,minor:0},o=i.major;i.minor;e=o>=6}else if(t){var s=function(){var e=navigator.userAgent.toLowerCase().match(/cpu( iphone)? os (.*?) like mac os/);if(e){var t=e[2].split("_");return t=t.map((function(e){return parseInt(e,10)})),{major:t[0],minor:t[1]}}}()||{major:0,minor:0},c=s.major,u=s.minor;e=12===c?u>2:c>12}else n&&(e=!0);return e},isFirefox:function(){return a.isFirefox},isSupportReauthorize:function(){var e=a.isPhone,t=a.isSafari,r=a.isIPad,n=a.isFirefox,i=a.isHuaweiBrowser;return!(e||t||r||n||i)},isSupportAppendTrack:function(){return!a.isFirefox},isSupportUserMedia:function(){var e;return!!(null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)||!1},isSupportRTC:function(e){return s(void 0,void 0,void 0,t().mark((function r(){var n,i,o,s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={isSupportRTC:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1},i=["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection"],o=0;case 3:if(!(o<i.length)){t.next=11;break}if(!(i[o]in window)){t.next=8;break}return n.isSupportRTC=!0,t.abrupt("break",11);case 8:o++,t.next=3;break;case 11:if(!n.isSupportRTC){t.next=17;break}return t.next=14,c.isSupportPeerCB(e);case 14:s=t.sent,a=s.isSupportPeer,n=Object.assign(Object.assign({},s),{isSupportRTC:a});case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),r)})))},isSupportPeerCB:function(e){return s(void 0,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){setTimeout((function(){var r;if(RTCPeerConnection){var n,i,o,s=new RTCPeerConnection({iceServers:[]}),a=!1,c=!1,u=!1;if(n=!!(s.createAnswer&&s.createOffer&&s.addEventListener&&s.removeEventListener&&null===s.onnegotiationneeded),i=!!s.addTrack,o=!!(null==s?void 0:s.addTransceiver),e&&(null===(r=null==e?void 0:e.getVideoTracks())||void 0===r?void 0:r.length)&&o){var l=e.getVideoTracks()[0],h=l.getSettings();console.log("setting: ",h);var d=s.addTransceiver(l);d&&(a=!!d.sender.replaceTrack,u=!!d.sender.setStreams),l&&(c=!!l.applyConstraints),d=null}s.close(),t({isSupportPeer:n,isSupportAddtrack:i,isSupportAddTransceiver:o,isSupportReplaceTrack:a,isApplyConstraints:c,isSupportSetStreams:u})}t({isSupportPeer:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1})}),100)})));case 1:case"end":return t.stop()}}),r)})))},isSupportWebsocket:function(){return!!window.WebSocket},isSupportMedia:function(){return!!navigator.mediaDevices},isSupportH264:function(){return s(void 0,void 0,void 0,t().mark((function e(){var r,n,i,o,s,c,u,l,h;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a.isFirefox,s=!1,!o){e.next=13;break}return e.prev=3,c=new RTCPeerConnection,e.next=7,c.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 7:u=e.sent,s=((null===(r=null==u?void 0:u.sdp)||void 0===r?void 0:r.toLowerCase().indexOf("h264"))||-1)>-1,e.next=13;break;case 11:e.prev=11,e.t0=e.catch(3);case 13:try{l=(null===(n=RTCRtpSender.getCapabilities("video"))||void 0===n?void 0:n.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],h=(null===(i=RTCRtpReceiver.getCapabilities("video"))||void 0===i?void 0:i.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],(null==l?void 0:l.length)>0&&h.length>0&&(s=!0)}catch(e){}return e.abrupt("return",s);case 15:case"end":return e.stop()}}),e,null,[[3,11]])})))},osVersion:function(){var e=a.isMac,t=a.isWindows,r=a.isLinux,n=a.isPhone,i=a.isAndroid,o=a.isIPad,s="unknown";return e?s="mac":t?s="windows":r?s="linux":n?s="ios":i?s="android":o&&(s="pad"),s},getNetWork:function(){return navigator.connection||{}}},u=c.isFirefox();function l(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,n.key,n)}}function d(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r(6992),r(8783),r(3948),r(3843),r(3710),r(9554),r(4747),r(3290);const f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,p=Object.keys,v=Array.isArray;function g(e,t){return"object"!=typeof t||p(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||f.Promise||(f.Promise=Promise);const m=Object.getPrototypeOf,y={}.hasOwnProperty;function b(e,t){return y.call(e,t)}function S(e,t){"function"==typeof t&&(t=t(m(e))),("undefined"==typeof Reflect?p:Reflect.ownKeys)(t).forEach((r=>{k(e,r,t[r])}))}const w=Object.defineProperty;function k(e,t,r,n){w(e,t,g(r&&b(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function C(e){return{from:function(t){return e.prototype=Object.create(t.prototype),k(e.prototype,"constructor",e),{extend:S.bind(null,e.prototype)}}}}const x=Object.getOwnPropertyDescriptor;function E(e,t){let r;return x(e,t)||(r=m(e))&&E(r,t)}const _=[].slice;function I(e,t,r){return _.call(e,t,r)}function A(e,t){return t(e)}function T(e){if(!e)throw new Error("Assertion Failed")}function R(e){f.setImmediate?setImmediate(e):setTimeout(e,0)}function O(e,t){return e.reduce(((e,r,n)=>{var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function D(e,t){if(b(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=D(e,t[n]);r.push(o)}return r}var s=t.indexOf(".");if(-1!==s){var a=e[t.substr(0,s)];return void 0===a?void 0:D(a,t.substr(s+1))}}function N(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){T("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)N(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var s=t.substr(0,o),a=t.substr(o+1);if(""===a)void 0===r?v(e)&&!isNaN(parseInt(s))?e.splice(s,1):delete e[s]:e[s]=r;else{var c=e[s];c&&b(e,s)||(c=e[s]={}),N(c,a,r)}}else void 0===r?v(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function L(e){var t={};for(var r in e)b(e,r)&&(t[r]=e[r]);return t}const P=[].concat;function M(e){return P.apply([],e)}const B="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(M([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>f[e])),j=B.map((e=>f[e]));O(B,(e=>[e,!0]));let G=null;function H(e){G="undefined"!=typeof WeakMap&&new WeakMap;const t=U(e);return G=null,t}function U(e){if(!e||"object"!=typeof e)return e;let t=G&&G.get(e);if(t)return t;if(v(e)){t=[],G&&G.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(U(e[r]))}else if(j.indexOf(e.constructor)>=0)t=e;else{const r=m(e);for(var i in t=r===Object.prototype?{}:Object.create(r),G&&G.set(e,t),e)b(e,i)&&(t[i]=U(e[i]))}return t}const{toString:K}={};function F(e){return K.call(e).slice(8,-1)}const V="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Y="symbol"==typeof V?function(e){var t;return null!=e&&(t=e[V])&&t.apply(e)}:function(){return null},z={};function X(e){var t,r,n,i;if(1===arguments.length){if(v(e))return e.slice();if(this===z&&"string"==typeof e)return[e];if(i=Y(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}const W="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var q="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function $(e,t){q=e,Z=t}var Z=()=>!0;const J=!new Error("").stack;function Q(){if(J)try{throw Q.arguments,new Error}catch(e){return e}return new Error}function ee(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(Z).map((e=>"\n"+e)).join("")):""}var te=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],re=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(te),ne={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ie(e,t){this._e=Q(),this.name=e,this.message=t}function oe(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,r)=>r.indexOf(e)===t)).join("\n")}function se(e,t,r,n){this._e=Q(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=oe(e,t)}function ae(e,t){this._e=Q(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=oe(e,t)}C(ie).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ee(this._e,2))}},toString:function(){return this.name+": "+this.message}}),C(se).from(ie),C(ae).from(ie);var ce=re.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const ue=ie;var le=re.reduce(((e,t)=>{var r=t+"Error";function n(e,n){this._e=Q(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ne[t]||r,this.inner=null)}return C(n).from(ue),e[t]=n,e}),{});le.Syntax=SyntaxError,le.Type=TypeError,le.Range=RangeError;var he=te.reduce(((e,t)=>(e[t+"Error"]=le[t],e)),{}),de=re.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=le[t]),e)),{});function fe(){}function pe(e){return e}function ve(e,t){return null==e||e===pe?t:function(r){return t(e(r))}}function ge(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function me(e,t){return e===fe?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?ge(n,this.onsuccess):n),i&&(this.onerror=this.onerror?ge(i,this.onerror):i),void 0!==o?o:r}}function ye(e,t){return e===fe?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?ge(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ge(n,this.onerror):n)}}function be(e,t){return e===fe?t:function(r){var n=e.apply(this,arguments);g(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?ge(i,this.onsuccess):i),o&&(this.onerror=this.onerror?ge(o,this.onerror):o),void 0===n?void 0===s?void 0:s:g(n,s)}}function Se(e,t){return e===fe?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function we(e,t){return e===fe?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}de.ModifyError=se,de.DexieError=ie,de.BulkError=ae;var ke={};const[Ce,xe,Ee]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,m(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,m(t),e]})(),_e=xe&&xe.then,Ie=Ce&&Ce.constructor,Ae=!!Ee;var Te=!1,Re=Ee?()=>{Ee.then(Qe)}:f.setImmediate?setImmediate.bind(null,Qe):f.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Qe(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Qe,0)},Oe=function(e,t){He.push([e,t]),Ne&&(Re(),Ne=!1)},De=!0,Ne=!0,Le=[],Pe=[],Me=null,Be=pe,je={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ct,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Ct(e[0],e[1])}catch(e){}}))}},Ge=je,He=[],Ue=0,Ke=[];function Fe(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=fe,this._lib=!1;var t=this._PSD=Ge;if(q&&(this._stackHolder=Q(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ke)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Xe(this,this._value))}this._state=null,this._value=null,++t.ref,ze(this,e)}const Ve={get:function(){var e=Ge,t=ut;function r(r,n){var i=!e.global&&(e!==Ge||t!==ut);const o=i&&!ft();var s=new Fe(((t,s)=>{qe(this,new Ye(wt(r,e,i,o),wt(n,e,i,o),t,s,e))}));return q&&Je(s,this),s}return r.prototype=ke,r},set:function(e){k(this,"then",e&&e.prototype===ke?Ve:{get:function(){return e},set:Ve.set})}};function Ye(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function ze(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&et();t&&"function"==typeof t.then?ze(e,((e,r)=>{t instanceof Fe?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,We(e)),r&&tt()}}),Xe.bind(null,e))}catch(t){Xe(e,t)}}function Xe(e,t){if(Pe.push(t),null===e._state){var r=e._lib&&et();t=Be(t),e._state=!1,e._value=t,q&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,void 0)}catch(e){}}((()=>{var r=E(t,"stack");t._promise=e,k(t,"stack",{get:()=>Te?r&&(r.get?r.get.apply(t):r.value):e.stack})})),function(e){Le.some((t=>t._value===e._value))||Le.push(e)}(e),We(e),r&&tt()}}function We(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)qe(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===Ue&&(++Ue,Oe((()=>{0==--Ue&&rt()}),[]))}function qe(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ue,Oe($e,[r,e,t])}else e._listeners.push(t)}function $e(e,t,r){try{Me=t;var n,i=t._value;t._state?n=e(i):(Pe.length&&(Pe=[]),n=e(i),-1===Pe.indexOf(i)&&function(e){for(var t=Le.length;t;)if(Le[--t]._value===e._value)return void Le.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{Me=null,0==--Ue&&rt(),--r.psd.ref||r.psd.finalize()}}function Ze(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var i,o,s=e._value;null!=s?(i=s.name||"Error",o=s.message||s,n=ee(s,0)):(i=s,o=""),t.push(i+(o?": "+o:"")+n)}return q&&((n=ee(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&Ze(e._prev,t,r)),t}function Je(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Qe(){et()&&tt()}function et(){var e=De;return De=!1,Ne=!1,e}function tt(){var e,t,r;do{for(;He.length>0;)for(e=He,He=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(He.length>0);De=!0,Ne=!0}function rt(){var e=Le;Le=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Ke.slice(0),r=t.length;r;)t[--r]()}function nt(e){return new Fe(ke,!1,e)}function it(e,t){var r=Ge;return function(){var n=et(),i=Ge;try{return mt(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{mt(i,!1),n&&tt()}}}S(Fe.prototype,{then:Ve,_then:function(e,t){qe(this,new Ye(null,null,e,t,Ge))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?r(e):nt(e))):this.then(null,(e=>e&&e.name===t?r(e):nt(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),nt(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Te=!0;var e=Ze(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Te=!1}}},timeout:function(e,t){return e<1/0?new Fe(((r,n)=>{var i=setTimeout((()=>n(new le.Timeout(t))),e);this.then(r,n).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&k(Fe.prototype,Symbol.toStringTag,"Dexie.Promise"),je.env=yt(),S(Fe,{all:function(){var e=X.apply(null,arguments).map(pt);return new Fe((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach(((i,o)=>Fe.resolve(i).then((r=>{e[o]=r,--n||t(e)}),r)))}))},resolve:e=>{if(e instanceof Fe)return e;if(e&&"function"==typeof e.then)return new Fe(((t,r)=>{e.then(t,r)}));var t=new Fe(ke,!0,e);return Je(t,Me),t},reject:nt,race:function(){var e=X.apply(null,arguments).map(pt);return new Fe(((t,r)=>{e.map((e=>Fe.resolve(e).then(t,r)))}))},PSD:{get:()=>Ge,set:e=>Ge=e},totalEchoes:{get:()=>ut},newPSD:ht,usePSD:bt,scheduler:{get:()=>Oe,set:e=>{Oe=e}},rejectionMapper:{get:()=>Be,set:e=>{Be=e}},follow:(e,t)=>new Fe(((r,n)=>ht(((t,r)=>{var n=Ge;n.unhandleds=[],n.onunhandled=r,n.finalize=ge((function(){!function(e){Ke.push((function t(){e(),Ke.splice(Ke.indexOf(t),1)})),++Ue,Oe((()=>{0==--Ue&&rt()}),[])}((()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])}))}),n.finalize),e()}),t,r,n)))}),Ie&&(Ie.allSettled&&k(Fe,"allSettled",(function(){const e=X.apply(null,arguments).map(pt);return new Fe((t=>{0===e.length&&t([]);let r=e.length;const n=new Array(r);e.forEach(((e,i)=>Fe.resolve(e).then((e=>n[i]={status:"fulfilled",value:e}),(e=>n[i]={status:"rejected",reason:e})).then((()=>--r||t(n)))))}))})),Ie.any&&"undefined"!=typeof AggregateError&&k(Fe,"any",(function(){const e=X.apply(null,arguments).map(pt);return new Fe(((t,r)=>{0===e.length&&r(new AggregateError([]));let n=e.length;const i=new Array(n);e.forEach(((e,o)=>Fe.resolve(e).then((e=>t(e)),(e=>{i[o]=e,--n||r(new AggregateError(i))}))))}))})));const ot={awaits:0,echoes:0,id:0};var st=0,at=[],ct=0,ut=0,lt=0;function ht(e,t,r,n){var i=Ge,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++lt;var s=je.env;o.env=Ae?{Promise:Fe,PromiseProp:{value:Fe,configurable:!0,writable:!0},all:Fe.all,race:Fe.race,allSettled:Fe.allSettled,any:Fe.any,resolve:Fe.resolve,reject:Fe.reject,nthen:kt(s.nthen,o),gthen:kt(s.gthen,o)}:{},t&&g(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=bt(o,e,r,n);return 0===o.ref&&o.finalize(),a}function dt(){return ot.id||(ot.id=++st),++ot.awaits,ot.echoes+=100,ot.id}function ft(){return!!ot.awaits&&(0==--ot.awaits&&(ot.id=0),ot.echoes=100*ot.awaits,!0)}function pt(e){return ot.echoes&&e&&e.constructor===Ie?(dt(),e.then((e=>(ft(),e)),(e=>(ft(),xt(e))))):e}function vt(e){++ut,ot.echoes&&0!=--ot.echoes||(ot.echoes=ot.id=0),at.push(Ge),mt(e,!0)}function gt(){var e=at[at.length-1];at.pop(),mt(e,!1)}function mt(e,t){var r=Ge;if((t?!ot.echoes||ct++&&e===Ge:!ct||--ct&&e===Ge)||St(t?vt.bind(null,e):gt),e!==Ge&&(Ge=e,r===je&&(je.env=yt()),Ae)){var n=je.env.Promise,i=e.env;xe.then=i.nthen,n.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(f,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function yt(){var e=f.Promise;return Ae?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(f,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:xe.then,gthen:e.prototype.then}:{}}function bt(e,t,r,n,i){var o=Ge;try{return mt(e,!0),t(r,n,i)}finally{mt(o,!1)}}function St(e){_e.call(Ce,e)}function wt(e,t,r,n){return"function"!=typeof e?e:function(){var i=Ge;r&&dt(),mt(t,!0);try{return e.apply(this,arguments)}finally{mt(i,!1),n&&St(ft)}}}function kt(e,t){return function(r,n){return e.call(this,wt(r,t),wt(n,t))}}function Ct(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,i={promise:t,reason:e};if(f.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),g(n,i)):f.CustomEvent&&g(n=new CustomEvent("unhandledrejection",{detail:i}),i),n&&f.dispatchEvent&&(dispatchEvent(n),!f.PromiseRejectionEvent&&f.onunhandledrejection))try{f.onunhandledrejection(n)}catch(e){}q&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+_e).indexOf("[native code]")&&(dt=ft=fe);var xt=Fe.reject;function Et(e,t,r,n){if(e.idbdb&&(e._state.openComplete||Ge.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===ce.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Et(e,t,r,n)))):xt(i)}return i._promise(t,((e,t)=>ht((()=>(Ge.trans=i,n(e,t,i)))))).then((e=>i._completion.then((()=>e))))}if(e._state.openComplete)return xt(new le.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return xt(new le.DatabaseClosed);e.open().catch(fe)}return e._state.dbReadyPromise.then((()=>Et(e,t,r,n)))}const _t=String.fromCharCode(65535),It="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",At=[],Tt="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Rt=Tt,Ot=Tt,Dt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Nt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Lt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Pt(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=H(t))[e],t)}class Mt{_trans(e,t,r){const n=this._tx||Ge.trans,i=this.name;function o(e,r,n){if(!n.schema[i])throw new le.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}const s=et();try{return n&&n.db===this.db?n===Ge.trans?n._promise(e,o,r):ht((()=>n._promise(e,o,r)),{trans:n,transless:Ge.transless||Ge}):Et(this.db,e,[this.name],o)}finally{s&&tt()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(v(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=p(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(r&&this.db._maxKey!==_t)return this.where(r.name).equals(r.keyPath.map((t=>e[t])));!r&&q&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:n}=this.schema,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}const[s,a]=t.reduce((([t,r],i)=>{const s=n[i],a=e[i];return[t||s,t||!s?Nt(r,s&&s.multi?e=>{const t=D(e,i);return v(t)&&t.some((e=>o(a,e)))}:e=>o(a,D(e,i))):r]}),[null,null]);return s?this.where(s.name).equals(e[s.keyPath]).filter(a):r?this.filter(a):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,v(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const r=Object.create(e.prototype);for(var n in t)if(b(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){g(this,e)}))}add(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let i=e;return n&&r&&(i=Pt(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[i]}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{N(e,n,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||v(e))return this.where(":id").equals(e).modify(t);{const r=D(e,this.schema.primKey.keyPath);if(void 0===r)return xt(new le.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?p(t).forEach((r=>{N(e,r,t[r])})):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let i=e;return n&&r&&(i=Pt(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[i],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{N(e,n,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Lt}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,r){const n=Array.isArray(t)?t:void 0,i=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new le.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new le.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let a=o&&r?e.map(Pt(o)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:a,wantResults:i}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new ae(`${this.name}.bulkAdd(): ${e} of ${s} operations failed`,n)}))}))}bulkPut(e,t,r){const n=Array.isArray(t)?t:void 0,i=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new le.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new le.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let a=o&&r?e.map(Pt(o)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:a,wantResults:i}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new ae(`${this.name}.bulkPut(): ${e} of ${s} operations failed`,n)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new ae(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)}))}}function Bt(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"==typeof e)return s(e);n||(n=Se),i||(i=fe);var o={subscribers:[],fire:i,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=n(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter((function(t){return t!==e})),o.fire=o.subscribers.reduce(n,i)}};return t[e]=r[e]=o,o}function s(e){p(e).forEach((function(t){var r=e[t];if(v(r))o(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new le.InvalidArgument("Invalid event config");var n=o(t,pe,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach((function(e){R((function(){e.apply(null,t)}))}))}))}}))}}function jt(e,t){return C(t).from({prototype:e}),t}function Gt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Ht(e,t){e.filter=Nt(e.filter,t)}function Ut(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>Nt(n(),t()):t,e.justLimit=r&&!n}function Kt(e,t){if(e.isPrimKey)return t.primaryKey;const r=t.getIndexByKeyPath(e.index);if(!r)throw new le.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Ft(e,t,r){const n=Kt(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function Vt(e,t,r,n){const i=e.replayFilter?Nt(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},s=(e,r,n)=>{if(!i||i(r,n,(e=>r.stop(e)),(e=>r.fail(e)))){var s=r.primaryKey,a=""+s;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(s)),b(o,a)||(o[a]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(s,r),Yt(Ft(e,n,r),e.algorithm,s,!e.keysOnly&&e.valueMapper)])}return Yt(Ft(e,n,r),Nt(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function Yt(e,t,r,n){var i=it(n?(e,t,i)=>r(n(e),t,i):r);return e.then((e=>{if(e)return e.start((()=>{var r=()=>e.continue();t&&!t(e,(e=>r=e),(t=>{e.stop(t),r=fe}),(t=>{e.fail(t),r=fe}))||i(e.value,e,(e=>r=e)),r()}))}))}function zt(e,t){try{const r=Xt(e),n=Xt(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const r=e.length,n=t.length,i=r<n?r:n;for(let r=0;r<i;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(Wt(e),Wt(t));case"Array":return function(e,t){const r=e.length,n=t.length,i=r<n?r:n;for(let r=0;r<i;++r){const n=zt(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function Xt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const r=F(e);return"ArrayBuffer"===r?"binary":r}function Wt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class qt{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,xt.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,xt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Nt(t.algorithm,e)}_iterate(e,t){return Vt(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&g(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((r=>Vt(t,e,r,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,r=t.table.core;if(Gt(t,!0))return r.count({trans:e,query:{index:Kt(t,r.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var n=0;return Vt(t,(()=>(++n,!1)),e,r).then((()=>n))})).then(e)}sortBy(e,t){const r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var s="next"===this._ctx.dir?1:-1;function a(e,t){var r=o(e,i),n=o(t,i);return r<n?-s:r>n?s:0}return this.toArray((function(e){return e.sort(a)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Gt(t,!0)&&t.limit>0){const{valueMapper:r}=t,n=Kt(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then((({result:e})=>r?e.map(r):e))}{const r=[];return Vt(t,(e=>r.push(e)),e,t.table.core).then((()=>r))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Gt(t)?Ut(t,(()=>{var t=e;return(e,r)=>0===t||(1===t?(--t,!1):(r((()=>{e.advance(t),t=0})),!1))})):Ut(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ut(this._ctx,(()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this}until(e,t){return Ht(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,r;return Ht(this._ctx,(function(t){return e(t.value)})),t=this._ctx,r=e,t.isMatch=Nt(t.isMatch,r),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Gt(t,!0)&&t.limit>0)return this._read((e=>{var r=Kt(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return Ht(this._ctx,(function(e){var t=e.primaryKey.toString(),n=b(r,t);return r[t]=!0,!n})),this}modify(e){var t=this._ctx;return this._write((r=>{var n;if("function"==typeof e)n=e;else{var i=p(e),o=i.length;n=function(t){for(var r=!1,n=0;n<o;++n){var s=i[n],a=e[s];D(t,s)!==a&&(N(t,s,a),r=!0)}return r}}const s=t.table.core,{outbound:a,extractKey:c}=s.schema.primaryKey,u=this.db._options.modifyChunkSize||200,l=[];let h=0;const d=[],f=(e,t)=>{const{failures:r,numFailures:n}=t;h+=e-n;for(let e of p(r))l.push(r[e])};return this.clone().primaryKeys().then((i=>{const o=l=>{const h=Math.min(u,i.length-l);return s.getMany({trans:r,keys:i.slice(l,l+h),cache:"immutable"}).then((d=>{const p=[],v=[],g=a?[]:null,m=[];for(let e=0;e<h;++e){const t=d[e],r={value:H(t),primKey:i[l+e]};!1!==n.call(r,r.value,r)&&(null==r.value?m.push(i[l+e]):a||0===zt(c(t),c(r.value))?(v.push(r.value),a&&g.push(i[l+e])):(m.push(i[l+e]),p.push(r.value)))}const y=Gt(t)&&t.limit===1/0&&("function"!=typeof e||e===$t)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&s.mutate({trans:r,type:"add",values:p}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);f(p.length,e)}))).then((()=>(v.length>0||y&&"object"==typeof e)&&s.mutate({trans:r,type:"put",keys:g,values:v,criteria:y,changeSpec:"function"!=typeof e&&e}).then((e=>f(v.length,e))))).then((()=>(m.length>0||y&&e===$t)&&s.mutate({trans:r,type:"delete",keys:m,criteria:y}).then((e=>f(m.length,e))))).then((()=>i.length>l+h&&o(l+u)))}))};return o(0).then((()=>{if(l.length>0)throw new se("Error modifying one or more objects",l,h,d);return i.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Gt(e)&&(e.isPrimKey&&!Ot||3===t.type)?this._write((r=>{const{primaryKey:n}=e.table.core.schema,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((t=>e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((({failures:e,lastResult:r,results:n,numFailures:i})=>{if(i)throw new se("Could not delete some values",Object.keys(e).map((t=>e[t])),t-i);return t-i}))))})):this.modify($t)}}const $t=(e,t)=>t.value=null;function Zt(e,t){return e<t?-1:e===t?0:1}function Jt(e,t){return e>t?-1:e===t?0:1}function Qt(e,t,r){var n=e instanceof or?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function er(e){return new e.Collection(e,(()=>ir(""))).limit(0)}function tr(e,t,r,n,i,o){for(var s=Math.min(e.length,n.length),a=-1,c=0;c<s;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):a>=0?e.substr(0,a)+t[a]+r.substr(a+1):null;i(e[c],u)<0&&(a=c)}return s<n.length&&"next"===o?e+r.substr(e.length):s<e.length&&"prev"===o?e.substr(0,r.length):a<0?null:e.substr(0,a)+n[a]+r.substr(a+1)}function rr(e,t,r,n){var i,o,s,a,c,u,l,h=r.length;if(!r.every((e=>"string"==typeof e)))return Qt(e,"String expected.");function d(e){i=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),o=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),s="next"===e?Zt:Jt;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return s(e.lower,t.lower)}));a=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}d("next");var f=new e.Collection(e,(()=>nr(a[0],c[h-1]+n)));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,c,p))return!0;for(var f=null,v=p;v<h;++v){var g=tr(i,d,a[v],c[v],s,u);null===g&&null===f?p=v+1:(null===f||s(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function nr(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function ir(e){return{type:1,lower:e,upper:e}}class or{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?er(this):new this.Collection(this,(()=>nr(e,t,!r,!n)))}catch(e){return Qt(this,It)}}equals(e){return null==e?Qt(this,It):new this.Collection(this,(()=>ir(e)))}above(e){return null==e?Qt(this,It):new this.Collection(this,(()=>nr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Qt(this,It):new this.Collection(this,(()=>nr(e,void 0,!1)))}below(e){return null==e?Qt(this,It):new this.Collection(this,(()=>nr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Qt(this,It):new this.Collection(this,(()=>nr(void 0,e)))}startsWith(e){return"string"!=typeof e?Qt(this,"String expected."):this.between(e,e+_t,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):rr(this,((e,t)=>0===e.indexOf(t[0])),[e],_t)}equalsIgnoreCase(e){return rr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=X.apply(z,arguments);return 0===e.length?er(this):rr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=X.apply(z,arguments);return 0===e.length?er(this):rr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,_t)}anyOf(){const e=X.apply(z,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Qt(this,It)}if(0===e.length)return er(this);const r=new this.Collection(this,(()=>nr(e[0],e[e.length-1])));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm(((r,i,o)=>{const s=r.key;for(;t(s,e[n])>0;)if(++n,n===e.length)return i(o),!1;return 0===t(s,e[n])||(i((()=>{r.continue(e[n])})),!1)})),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=X.apply(z,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Qt(this,It)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const r=this._cmp,n=this._ascending,i=this._descending,o=this._min,s=this._max;if(0===e.length)return er(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&n(e[0],e[1])<=0)))return Qt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",le.InvalidArgument);const a=!t||!1!==t.includeLowers,c=t&&!0===t.includeUppers;let u,l=n;function h(e,t){return l(e[0],t[0])}try{u=e.reduce((function(e,t){let n=0,i=e.length;for(;n<i;++n){const i=e[n];if(r(t[0],i[1])<0&&r(t[1],i[0])>0){i[0]=o(i[0],t[0]),i[1]=s(i[1],t[1]);break}}return n===i&&e.push(t),e}),[]),u.sort(h)}catch(e){return Qt(this,It)}let d=0;const f=c?e=>n(e,u[d][1])>0:e=>n(e,u[d][1])>=0,p=a?e=>i(e,u[d][0])>0:e=>i(e,u[d][0])>=0;let v=f;const g=new this.Collection(this,(()=>nr(u[0][0],u[u.length-1][1],!a,!c)));return g._ondirectionchange=e=>{"next"===e?(v=f,l=n):(v=p,l=i),u.sort(h)},g._addAlgorithm(((e,t,r)=>{for(var i=e.key;v(i);)if(++d,d===u.length)return t(r),!1;return!!function(e){return!f(e)&&!p(e)}(i)||(0===this._cmp(i,u[d][1])||0===this._cmp(i,u[d][0])||t((()=>{l===n?e.continue(u[d][0]):e.continue(u[d][1])})),!1)})),g}startsWithAnyOf(){const e=X.apply(z,arguments);return e.every((e=>"string"==typeof e))?0===e.length?er(this):this.inAnyRange(e.map((e=>[e,e+_t]))):Qt(this,"startsWithAnyOf() only works with strings")}}function sr(e){return it((function(t){return ar(t),e(t.target.error),!1}))}function ar(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const cr=Bt(null,"storagemutated");class ur{_lock(){return T(!Ge.global),++this._reculock,1!==this._reculock||Ge.global||(Ge.lockOwnerFor=this),this}_unlock(){if(T(!Ge.global),0==--this._reculock)for(Ge.global||(Ge.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{bt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Ge.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,r=this.db._state.dbOpenError;if(T(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new le.DatabaseClosed(r);case"MissingAPIError":throw new le.MissingAPI(r.message,r);default:throw new le.OpenFailed(r)}if(!this.active)throw new le.TransactionInactive;return T(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=it((t=>{ar(t),this._reject(e.error)})),e.onabort=it((t=>{ar(t),this.active&&this._reject(new le.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=it((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&cr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return xt(new le.ReadOnly("Transaction is readonly"));if(!this.active)return xt(new le.TransactionInactive);if(this._locked())return new Fe(((n,i)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,i)},Ge])}));if(r)return ht((()=>{var e=new Fe(((e,r)=>{this._lock();const n=t(e,r,this);n&&n.then&&n.then(e,r)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var n=new Fe(((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)}));return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const r=Fe.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>r));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new Fe(((e,n)=>{r.then((r=>t._waitingQueue.push(it(e.bind(null,r)))),(e=>t._waitingQueue.push(it(n.bind(null,e))))).finally((()=>{t._waitingFor===i&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new le.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(b(t,e))return t[e];const r=this.schema[e];if(!r)throw new le.NotFound("Table "+e+" not part of transaction");const n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function lr(e,t,r,n,i,o,s){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!s?"&":"")+(n?"*":"")+(i?"++":"")+hr(t)}}function hr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function dr(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:O(r,(e=>[e.name,e]))}}let fr=e=>{try{return e.only([[]]),fr=()=>[[]],[[]]}catch(e){return fr=()=>_t,_t}};function pr(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>D(t,e)}(e):t=>D(t,e)}function vr(e){return[].slice.call(e)}let gr=0;function mr(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function yr(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:r,upper:n,lowerOpen:i,upperOpen:o}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}const{schema:i,hasGetAll:o}=function(e,t){const r=vr(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:r}=e,n=v(t),i=null==t,o={},s={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:pr(t)},indexes:vr(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:r,multiEntry:n,keyPath:i}=e,s={name:t,compound:v(i),keyPath:i,unique:r,multiEntry:n,extractKey:pr(i)};return o[mr(i)]=s,s})),getIndexByKeyPath:e=>o[mr(e)]};return o[":id"]=s.primaryKey,null!=t&&(o[mr(t)]=s.primaryKey),s}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),s=i.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:r,keys:i,values:o,range:s}){return new Promise(((a,c)=>{a=it(a);const u=e.objectStore(t),l=null==u.keyPath,h="put"===r||"add"===r;if(!h&&"delete"!==r&&"deleteRange"!==r)throw new Error("Invalid operation type: "+r);const{length:d}=i||o||{length:1};if(i&&o&&i.length!==o.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return a({numFailures:0,failures:{},results:[],lastResult:void 0});let f;const p=[],v=[];let g=0;const m=e=>{++g,ar(e)};if("deleteRange"===r){if(4===s.type)return a({numFailures:g,failures:v,results:[],lastResult:void 0});3===s.type?p.push(f=u.clear()):p.push(f=u.delete(n(s)))}else{const[e,t]=h?l?[o,i]:[o,null]:[i,null];if(h)for(let n=0;n<d;++n)p.push(f=t&&void 0!==t[n]?u[r](e[n],t[n]):u[r](e[n])),f.onerror=m;else for(let t=0;t<d;++t)p.push(f=u[r](e[t])),f.onerror=m}const y=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),a({numFailures:g,failures:v,results:"delete"===r?i:p.map((e=>e.result)),lastResult:t})};f.onerror=e=>{m(e),y(e)},f.onsuccess=y}))},getMany:({trans:e,keys:r})=>new Promise(((n,i)=>{n=it(n);const o=e.objectStore(t),s=r.length,a=new Array(s);let c,u=0,l=0;const h=e=>{const t=e.target;a[t._pos]=t.result,++l===u&&n(a)},d=sr(i);for(let e=0;e<s;++e)null!=r[e]&&(c=o.get(r[e]),c._pos=e,c.onsuccess=h,c.onerror=d,++u);0===u&&n(a)})),get:({trans:e,key:r})=>new Promise(((n,i)=>{n=it(n);const o=e.objectStore(t).get(r);o.onsuccess=e=>n(e.target.result),o.onerror=sr(i)})),query:function(e){return r=>new Promise(((i,o)=>{i=it(i);const{trans:s,values:a,limit:c,query:u}=r,l=c===1/0?void 0:c,{index:h,range:d}=u,f=s.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),v=n(d);if(0===c)return i({result:[]});if(e){const e=a?p.getAll(v,l):p.getAllKeys(v,l);e.onsuccess=e=>i({result:e.target.result}),e.onerror=sr(o)}else{let e=0;const t=a||!("openKeyCursor"in p)?p.openCursor(v):p.openKeyCursor(v),r=[];t.onsuccess=n=>{const o=t.result;return o?(r.push(a?o.value:o.primaryKey),++e===c?i({result:r}):void o.continue()):i({result:r})},t.onerror=sr(o)}}))}(o),openCursor:function({trans:e,values:r,query:i,reverse:o,unique:s}){return new Promise(((a,c)=>{a=it(a);const{index:u,range:l}=i,h=e.objectStore(t),d=u.isPrimaryKey?h:h.index(u.name),f=o?s?"prevunique":"prev":s?"nextunique":"next",p=r||!("openKeyCursor"in d)?d.openCursor(n(l),f):d.openKeyCursor(n(l),f);p.onerror=sr(c),p.onsuccess=it((t=>{const r=p.result;if(!r)return void a(null);r.___id=++gr,r.done=!1;const n=r.continue.bind(r);let i=r.continuePrimaryKey;i&&(i=i.bind(r));const o=r.advance.bind(r),s=()=>{throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw new Error("Cursor not started")},r.fail=it(c),r.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},r.start=e=>{const t=new Promise(((e,t)=>{e=it(e),p.onerror=sr(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=s,e(t)}})),a=()=>{if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=it((e=>{p.onsuccess=a,a()})),r.continue=n,r.continuePrimaryKey=i,r.advance=o,a(),t},a(r)}),c)}))},count({query:e,trans:r}){const{index:i,range:o}=e;return new Promise(((e,s)=>{const a=r.objectStore(t),c=i.isPrimaryKey?a:a.index(i.name),u=n(o),l=u?c.count(u):c.count();l.onsuccess=it((t=>e(t.target.result))),l.onerror=sr(s)}))}}}(e))),a={};return s.forEach((e=>a[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!a[e])throw new Error(`Table '${e}' not found`);return a[e]},MIN_KEY:-1/0,MAX_KEY:fr(t),schema:i}}function br({_novip:e},t){const r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},i){const o=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(yr(t,r,i),e.dbcore);return{dbcore:o}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((t=>{const r=t.name;e.core.schema.tables.some((e=>e.name===r))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function Sr({_novip:e},t,r,n){r.forEach((r=>{const i=n[r];t.forEach((t=>{const n=E(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?k(t,r,{get(){return this.table(r)},set(e){w(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function wr({_novip:e},t){t.forEach((t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]}))}function kr(e,t){return e._cfg.version-t._cfg.version}function Cr(e,t,r,n){const i=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);const s=o._reject.bind(o),a=Ge.transless||Ge;ht((()=>{Ge.trans=o,Ge.transless=a,0===t?(p(i).forEach((e=>{Er(r,e,i[e].primKey,i[e].indexes)})),br(e,r),Fe.follow((()=>e.on.populate.fire(o))).catch(s)):function({_novip:e},t,r,n){const i=[],o=e._versions;let s=e._dbSchema=Ir(e,e.idbdb,n),a=!1;return o.filter((e=>e._cfg.version>=t)).forEach((o=>{i.push((()=>{const i=s,c=o._cfg.dbschema;Ar(e,i,n),Ar(e,c,n),s=e._dbSchema=c;const u=xr(i,c);u.add.forEach((e=>{Er(n,e[0],e[1].primKey,e[1].indexes)})),u.change.forEach((e=>{if(e.recreate)throw new le.Upgrade("Not yet support for changing primary key");{const t=n.objectStore(e.name);e.add.forEach((e=>_r(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),_r(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=o._cfg.contentUpgrade;if(l&&o._cfg.version>t){br(e,n),r._memoizedTables={},a=!0;let t=L(c);u.del.forEach((e=>{t[e]=i[e]})),wr(e,[e.Transaction.prototype]),Sr(e,[e.Transaction.prototype],p(t),t),r.schema=t;const o=W(l);let s;o&&dt();const h=Fe.follow((()=>{if(s=l(r),s&&o){var e=ft.bind(null,null);s.then(e,e)}}));return s&&"function"==typeof s.then?Fe.resolve(s):h.then((()=>s))}})),i.push((t=>{a&&Rt||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((r=>null==e[r]&&t.db.deleteObjectStore(r)))}(o._cfg.dbschema,t),wr(e,[e.Transaction.prototype]),Sr(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema}))})),function e(){return i.length?Fe.resolve(i.shift()(r.idbtrans)).then(e):Fe.resolve()}().then((()=>{var e,t;t=n,p(e=s).forEach((r=>{t.db.objectStoreNames.contains(r)||Er(t,r,e[r].primKey,e[r].indexes)}))}))}(e,t,o,r).catch(s)}))}function xr(e,t){const r={del:[],add:[],change:[]};let n;for(n in e)t[n]||r.del.push(n);for(n in t){const i=e[n],o=t[n];if(i){const e={name:n,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!Tt)e.recreate=!0,r.change.push(e);else{const t=i.idxByName,n=o.idxByName;let s;for(s in t)n[s]||e.del.push(s);for(s in n){const r=t[s],i=n[s];r?r.src!==i.src&&e.change.push(i):e.add.push(i)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}}else r.add.push([n,o])}return r}function Er(e,t,r,n){const i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((e=>_r(i,e))),i}function _r(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Ir(e,t,r){const n={};return I(t.objectStoreNames,0).forEach((e=>{const t=r.objectStore(e);let i=t.keyPath;const o=lr(hr(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),s=[];for(let e=0;e<t.indexNames.length;++e){const r=t.index(t.indexNames[e]);i=r.keyPath;var a=lr(r.name,i,!!r.unique,!!r.multiEntry,!1,i&&"string"!=typeof i,!1);s.push(a)}n[e]=dr(e,o,s)})),n}function Ar({_novip:e},t,r){const n=r.db.objectStoreNames;for(let i=0;i<n.length;++i){const o=n[i],s=r.objectStore(o);e._hasGetAll="getAll"in s;for(let e=0;e<s.indexNames.length;++e){const r=s.indexNames[e],n=s.index(r).keyPath,i="string"==typeof n?n:"["+I(n).join("+")+"]";if(t[o]){const e=t[o].idxByName[i];e&&(e.name=r,delete t[o].idxByName[i],t[o].idxByName[r]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&f.WorkerGlobalScope&&f instanceof f.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class Tr{_parseStoresSpec(e,t){p(e).forEach((r=>{if(null!==e[r]){var n=e[r].split(",").map(((e,t)=>{const r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return lr(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),v(n),0===t)})),i=n.shift();if(i.multi)throw new le.Schema("Primary key cannot be multi-valued");n.forEach((e=>{if(e.auto)throw new le.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new le.Schema("Index must have a name and cannot be an empty string")})),t[r]=dr(r,i,n)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?g(this._cfg.storesSource,e):e;const r=t._versions,n={};let i={};return r.forEach((e=>{g(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,wr(t,[t._allTables,t,t.Transaction.prototype]),Sr(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],p(i),i),t._storeNames=p(i),this}upgrade(e){return this._cfg.contentUpgrade=we(this._cfg.contentUpgrade||fe,e),this}}function Rr(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Zr("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),r.version(1).stores({dbnames:"name"})),r.table("dbnames")}function Or(e){return e&&"function"==typeof e.databases}function Dr(e){return ht((function(){return Ge.letThrough=!0,e()}))}function Nr(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Lr(e){var t=t=>e.next(t),r=i(t),n=i((t=>e.throw(t)));function i(e){return t=>{var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):v(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function Pr(e,t,r){var n=arguments.length;if(n<2)throw new le.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];r=i.pop();var o=M(i);return[e,o,r]}function Mr(e,t,r,n,i){return Fe.resolve().then((()=>{const o=Ge.transless||Ge,s=e._createTransaction(t,r,e._dbSchema,n),a={trans:s,transless:o};if(n)s.idbtrans=n.idbtrans;else try{s.create(),e._state.PR1398_maxLoop=3}catch(n){return n.name===ce.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Mr(e,t,r,null,i)))):xt(n)}const c=W(i);let u;c&&dt();const l=Fe.follow((()=>{if(u=i.call(s,s),u)if(c){var e=ft.bind(null,null);u.then(e,e)}else"function"==typeof u.next&&"function"==typeof u.throw&&(u=Lr(u))}),a);return(u&&"function"==typeof u.then?Fe.resolve(u).then((e=>s.active?e:xt(new le.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>u))).then((e=>(n&&s._resolve(),s._completion.then((()=>e))))).catch((e=>(s._reject(e),xt(e))))}))}function Br(e,t,r){const n=v(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}const jr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const r=e.table(t),{schema:n}=r,i={},o=[];function s(e,t,r){const n=mr(e),a=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l={...r,isVirtual:u,keyTail:t,keyLength:c,extractKey:pr(e),unique:!u&&r.unique};return a.push(l),l.isPrimaryKey||o.push(l),c>1&&s(2===c?e[0]:e.slice(0,c-1),t+1,r),a.sort(((e,t)=>e.keyTail-t.keyTail)),l}const a=s(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[a];for(const e of n.indexes)s(e.keyPath,0,e);function c(t){const r=t.query.index;return r.isVirtual?{...t,query:{index:r,range:(n=t.query.range,i=r.keyTail,{type:1===n.type?2:n.type,lower:Br(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:Br(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}:t;var n,i}const u={...r,schema:{...n,primaryKey:a,indexes:o,getIndexByKeyPath:function(e){const t=i[mr(e)];return t&&t[0]}},count:e=>r.count(c(e)),query:e=>r.query(c(e)),openCursor(t){const{keyTail:n,isVirtual:i,keyLength:o}=t.query.index;return i?r.openCursor(c(t)).then((r=>r&&function(r){const i=Object.create(r,{continue:{value:function(i){null!=i?r.continue(Br(i,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,i){r.continuePrimaryKey(Br(t,e.MAX_KEY,n),i)}},primaryKey:{get:()=>r.primaryKey},key:{get(){const e=r.key;return 1===o?e[0]:e.slice(0,o)}},value:{get:()=>r.value}});return i}(r))):r.openCursor(t)}};return u}}}};function Gr(e,t,r,n){return r=r||{},n=n||"",p(e).forEach((i=>{if(b(t,i)){var o=e[i],s=t[i];if("object"==typeof o&&"object"==typeof s&&o&&s){const e=F(o);e!==F(s)?r[n+i]=t[i]:"Object"===e?Gr(o,s,r,n+i+"."):o!==s&&(r[n+i]=t[i])}else o!==s&&(r[n+i]=t[i])}else r[n+i]=void 0})),p(t).forEach((i=>{b(e,i)||(r[n+i]=t[i])})),r}const Hr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const r=e.table(t),{primaryKey:n}=r.schema,i={...r,mutate(e){const i=Ge.trans,{deleting:o,creating:s,updating:a}=i.table(t).hook;switch(e.type){case"add":if(s.fire===fe)break;return i._promise("readwrite",(()=>c(e)),!0);case"put":if(s.fire===fe&&a.fire===fe)break;return i._promise("readwrite",(()=>c(e)),!0);case"delete":if(o.fire===fe)break;return i._promise("readwrite",(()=>c(e)),!0);case"deleteRange":if(o.fire===fe)break;return i._promise("readwrite",(()=>function(e){return u(e.trans,e.range,1e4)}(e)),!0)}return r.mutate(e);function c(e){const t=Ge.trans,i=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:i}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}(r,e,i).then((c=>{const u=i.map(((r,i)=>{const u=c[i],l={onerror:null,onsuccess:null};if("delete"===e.type)o.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){const o=s.fire.call(l,r,e.values[i],t);null==r&&null!=o&&(r=o,e.keys[i]=r,n.outbound||N(e.values[i],n.keyPath,r))}else{const n=Gr(u,e.values[i]),o=a.fire.call(l,n,r,u,t);if(o){const t=e.values[i];Object.keys(o).forEach((e=>{b(t,e)?t[e]=o[e]:N(t,e,o[e])}))}}return l}));return r.mutate(e).then((({failures:t,results:r,numFailures:n,lastResult:o})=>{for(let n=0;n<i.length;++n){const o=r?r[n]:i[n],s=u[n];null==o?s.onerror&&s.onerror(t[n]):s.onsuccess&&s.onsuccess("put"===e.type&&c[n]?e.values[n]:o)}return{failures:t,results:r,numFailures:n,lastResult:o}})).catch((e=>(u.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function u(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((({result:r})=>c({type:"delete",keys:r,trans:e}).then((n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:u(e,{...t,lower:r[r.length-1],lowerOpen:!0},i)))))}}};return i}})};function Ur(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;const n=[];for(let i=0,o=0;i<t.keys.length&&o<e.length;++i)0===zt(t.keys[i],e[o])&&(n.push(r?H(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}const Kr={stack:"dbcore",level:-1,create:e=>({table:t=>{const r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);const t=Ur(e.keys,e.trans._cache,"clone"===e.cache);return t?Fe.resolve(t):r.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?H(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function Fr(e){return!("from"in e)}const Vr=function(e,t){if(!this){const t=new Vr;return e&&"d"in e&&g(t,e),t}g(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Yr(e,t,r){const n=zt(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(Fr(e))return g(e,{from:t,to:r,d:1});const i=e.l,o=e.r;if(zt(r,e.from)<0)return i?Yr(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},Wr(e);if(zt(t,e.to)>0)return o?Yr(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},Wr(e);zt(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),zt(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;i&&!e.l&&zr(e,i),o&&s&&zr(e,o)}function zr(e,t){Fr(t)||function e(t,{from:r,to:n,l:i,r:o}){Yr(t,r,n),i&&e(t,i),o&&e(t,o)}(e,t)}function Xr(e){let t=Fr(e)?null:{s:0,n:e};return{next(e){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&zt(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||zt(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Wr(e){var t,r;const n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){const t="r"===i?"l":"r",r={...e},n=e[i];e.from=n.from,e.to=n.to,e[i]=n[i],r[i]=n[t],e[t]=r,r.d=qr(r)}e.d=qr(e)}function qr({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}S(Vr.prototype,{add(e){return zr(this,e),this},addKey(e){return Yr(this,e,e),this},addKeys(e){return e.forEach((e=>Yr(this,e,e))),this},[V](){return Xr(this)}});const $r={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,r=new Vr(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{const i=e.table(n),{schema:o}=i,{primaryKey:s}=o,{extractKey:a,outbound:c}=s,u={...i,mutate:e=>{const s=e.trans,a=s.mutatedParts||(s.mutatedParts={}),c=e=>{const r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new Vr)},u=c(""),l=c(":dels"),{type:h}=e;let[d,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return i.mutate(e).then((e=>{if(v(d)){"delete"!==h&&(d=e.results),u.addKeys(d);const t=Ur(d,p);t||"add"===h||l.addKeys(d),(t||f)&&function(e,t,r,n){t.indexes.forEach((function(t){const i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}const s=e=>t.multiEntry&&v(e)?e.forEach((e=>i.addKey(e))):i.addKey(e);(r||n).forEach(((e,t)=>{const i=r&&o(r[t]),a=n&&o(n[t]);0!==zt(i,a)&&(null!=i&&s(i),null!=a&&s(a))}))}))}(c,o,t,f)}else if(d){const e={from:d.lower,to:d.upper};l.add(e),u.add(e)}else u.add(r),l.add(r),o.indexes.forEach((e=>c(e.name).add(r)));return e}))}},l=({query:{index:t,range:r}})=>{var n,i;return[t,new Vr(null!==(n=r.lower)&&void 0!==n?n:e.MIN_KEY,null!==(i=r.upper)&&void 0!==i?i:e.MAX_KEY)]},h={get:e=>[s,new Vr(e.key)],getMany:e=>[s,(new Vr).addKeys(e.keys)],count:l,query:l,openCursor:l};return p(h).forEach((e=>{u[e]=function(o){const{subscr:s}=Ge;if(s){const u=e=>{const r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new Vr)},l=u(""),d=u(":dels"),[f,p]=h[e](o);if(u(f.name||"").add(p),!f.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&o.values&&i.query({...o,values:!1});return i[e].apply(this,arguments).then((r=>{if("query"===e){if(c&&o.values)return t.then((({result:e})=>(l.addKeys(e),r)));const e=o.values?r.result.map(a):r.result;o.values?l.addKeys(e):d.addKeys(e)}else if("openCursor"===e){const e=r,t=o.values;return e&&Object.create(e,{key:{get:()=>(d.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return d.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return r}))}d.add(r)}}return i[e].apply(this,arguments)}})),u}}}};class Zr{constructor(e,t){this._middlewares={},this.verno=0;const r=Zr.dependencies;this._options=t={addons:Zr.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:n}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:fe,dbReadyPromise:null,cancelOpen:fe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;i.dbReadyPromise=new Fe((e=>{i.dbReadyResolve=e})),i.openCanceller=new Fe(((e,t)=>{i.cancelOpen=t})),this._state=i,this.name=e,this.on=Bt(this,"populate","blocked","versionchange","close",{ready:[we,fe]}),this.on.ready.subscribe=A(this.on.ready.subscribe,(e=>(t,r)=>{Zr.vip((()=>{const n=this._state;if(n.openComplete)n.dbOpenError||Fe.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);const n=this;r||e((function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)}))}}))})),this.Collection=(o=this,jt(qt.prototype,(function(e,t){this.db=o;let r=Lt,n=null;if(t)try{r=t()}catch(e){n=e}const i=e._ctx,s=i.table,a=s.hook.reading.fire;this._ctx={table:s,index:i.index,isPrimKey:!i.index||s.schema.primKey.keyPath&&i.index===s.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:n,or:i.or,valueMapper:a!==pe?a:null}}))),this.Table=function(e){return jt(Mt.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Bt(null,{creating:[me,fe],reading:[ve,pe],updating:[be,fe],deleting:[ye,fe]})}))}(this),this.Transaction=function(e){return jt(ur.prototype,(function(t,r,n,i,o){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Bt(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Fe(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),xt(e)}))}))}(this),this.Version=function(e){return jt(Tr.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return jt(or.prototype,(function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};const i=e._deps.indexedDB;if(!i)throw new le.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=(e,t)=>i.cmp(t,e),this._max=(e,t)=>i.cmp(e,t)>0?e:t,this._min=(e,t)=>i.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=fr(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),At.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(jr),this.use(Hr),this.use($r),this.use(Kr),this.vip=Object.create(this,{_vip:{value:!0}}),n.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new le.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new le.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var r=t.filter((t=>t._cfg.version===e))[0];return r||(r=new this.Version(e),t.push(r),t.sort(kr),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Ge.letThrough||this._vip)?e():new Fe(((e,t)=>{if(this._state.openComplete)return t(new le.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new le.DatabaseClosed);this.open().catch(fe)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});const i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:t,level:null==r?10:r,name:n}),i.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>r?e.create!==r:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:r}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?xt(t.dbOpenError):e));q&&(t.openCanceller._stackHolder=Q()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const n=t.openCanceller;function i(){if(t.openCanceller!==n)throw new le.DatabaseClosed("db.open() was cancelled")}let o=t.dbReadyResolve,s=null,a=!1;return Fe.race([n,("undefined"==typeof navigator?Fe.resolve():Nr()).then((()=>new Fe(((n,o)=>{if(i(),!r)throw new le.MissingAPI;const c=e.name,u=t.autoSchema?r.open(c):r.open(c,Math.round(10*e.verno));if(!u)throw new le.MissingAPI;u.onerror=sr(o),u.onblocked=it(e._fireOnBlocked),u.onupgradeneeded=it((n=>{if(s=u.transaction,t.autoSchema&&!e._options.allowEmptyDB){u.onerror=ar,s.abort(),u.result.close();const e=r.deleteDatabase(c);e.onsuccess=e.onerror=it((()=>{o(new le.NoSuchDatabase(`Database ${c} doesnt exist`))}))}else{s.onerror=sr(o);var i=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;a=i<1,e._novip.idbdb=u.result,Cr(e,i/10,s,o)}}),o),u.onsuccess=it((()=>{s=null;const r=e._novip.idbdb=u.result,i=I(r.objectStoreNames);if(i.length>0)try{const n=r.transaction(1===(o=i).length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;const n=e._dbSchema=Ir(0,t,r);e._storeNames=I(t.objectStoreNames,0),Sr(e,[e._allTables],p(n),n)}(e,r,n):(Ar(e,e._dbSchema,n),function(e,t){const r=xr(Ir(0,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((e=>e.add.length||e.change.length)))}(e,n)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),br(e,n)}catch(e){}var o;At.push(e),r.onversionchange=it((r=>{t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=it((t=>{e.on("close").fire(t)})),a&&function({indexedDB:e,IDBKeyRange:t},r){!Or(e)&&"__dbnames"!==r&&Rr(e,t).put({name:r}).catch(fe)}(e._deps,c),n()}),o)}))))]).then((()=>(i(),t.onReadyBeingFired=[],Fe.resolve(Dr((()=>e.on.ready.fire(e.vip)))).then((function r(){if(t.onReadyBeingFired.length>0){let n=t.onReadyBeingFired.reduce(we,fe);return t.onReadyBeingFired=[],Fe.resolve(Dr((()=>n(e.vip)))).then(r)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((r=>{t.dbOpenError=r;try{s&&s.abort()}catch(e){}return n===t.openCanceller&&e._close(),xt(r)})).finally((()=>{t.openComplete=!0,o()}))}(this)}_close(){const e=this._state,t=At.indexOf(this);if(t>=0&&At.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Fe((t=>{e.dbReadyResolve=t})),e.openCanceller=new Fe(((t,r)=>{e.cancelOpen=r}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new le.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Fe(((r,n)=>{const i=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=it((()=>{!function({indexedDB:e,IDBKeyRange:t},r){!Or(e)&&"__dbnames"!==r&&Rr(e,t).delete(r).catch(fe)}(this._deps,this.name),r()})),e.onerror=sr(n),e.onblocked=this._fireOnBlocked};if(e)throw new le.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(i):i()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return p(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Pr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n=Ge.trans;n&&n.db===this&&-1===e.indexOf("!")||(n=null);const i=-1!==e.indexOf("?");let o,s;e=e.replace("!","").replace("?","");try{if(s=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)o="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new le.InvalidArgument("Invalid transaction mode: "+e);o="readwrite"}if(n){if("readonly"===n.mode&&"readwrite"===o){if(!i)throw new le.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");n=null}n&&s.forEach((e=>{if(n&&-1===n.storeNames.indexOf(e)){if(!i)throw new le.SubTransaction("Table "+e+" not included in parent transaction.");n=null}})),i&&n&&!n.active&&(n=null)}}catch(e){return n?n._promise(null,((t,r)=>{r(e)})):xt(e)}const a=Mr.bind(null,this,o,s,n,r);return n?n._promise(o,a,"lock"):Ge.trans?bt(Ge.transless,(()=>this._whenReady(a))):this._whenReady(a)}table(e){if(!b(this._allTables,e))throw new le.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Jr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Qr{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[Jr](){return this}}function en(e,t){return p(t).forEach((r=>{zr(e[r]||(e[r]=new Vr),t[r])})),e}let tn;try{tn={indexedDB:f.indexedDB||f.mozIndexedDB||f.webkitIndexedDB||f.msIndexedDB,IDBKeyRange:f.IDBKeyRange||f.webkitIDBKeyRange}}catch(f){tn={indexedDB:null,IDBKeyRange:null}}const rn=Zr;function nn(e){let t=on;try{on=!0,cr.storagemutated.fire(e)}finally{on=t}}S(rn,{...de,delete:e=>new rn(e,{addons:[]}).delete(),exists:e=>new rn(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Or(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Rr(e,t).toCollection().primaryKeys()}(rn.dependencies).then(e)}catch(e){return xt(new le.MissingAPI)}},defineClass:()=>function(e){g(this,e)},ignoreTransaction:e=>Ge.trans?bt(Ge.transless,e):e(),vip:Dr,async:function(e){return function(){try{var t=Lr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Fe.resolve(t)}catch(e){return xt(e)}}},spawn:function(e,t,r){try{var n=Lr(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:Fe.resolve(n)}catch(e){return xt(e)}},currentTransaction:{get:()=>Ge.trans||null},waitFor:function(e,t){const r=Fe.resolve("function"==typeof e?rn.ignoreTransaction(e):e).timeout(t||6e4);return Ge.trans?Ge.trans.waitFor(r):r},Promise:Fe,debug:{get:()=>q,set:e=>{$(e,"dexie"===e?()=>!0:Dt)}},derive:C,extend:g,props:S,override:A,Events:Bt,on:cr,liveQuery:function(e){return new Qr((t=>{const r=W(e);let n=!1,i={},o={};const s={get closed(){return n},unsubscribe:()=>{n=!0,cr.storagemutated.unsubscribe(l)}};t.start&&t.start(s);let a=!1,c=!1;function u(){return p(o).some((e=>i[e]&&function(e,t){const r=Xr(t);let n=r.next();if(n.done)return!1;let i=n.value;const o=Xr(e);let s=o.next(i.from),a=s.value;for(;!n.done&&!s.done;){if(zt(a.from,i.to)<=0&&zt(a.to,i.from)>=0)return!0;zt(i.from,a.from)<0?i=(n=r.next(a.from)).value:a=(s=o.next(i.from)).value}return!1}(i[e],o[e])))}const l=e=>{en(i,e),u()&&h()},h=()=>{if(a||n)return;i={};const d={},f=function(t){r&&dt();const n=()=>ht(e,{subscr:t,trans:null}),i=Ge.trans?bt(Ge.transless,n):n();return r&&i.then(ft,ft),i}(d);c||(cr("storagemutated",l),c=!0),a=!0,Promise.resolve(f).then((e=>{a=!1,n||(u()?h():(i={},o=d,t.next&&t.next(e)))}),(e=>{a=!1,t.error&&t.error(e),s.unsubscribe()}))};return h(),s}))},extendObservabilitySet:en,getByKeyPath:D,setByKeyPath:N,delByKeyPath:function(e,t){"string"==typeof t?N(e,t,void 0):"length"in t&&[].map.call(t,(function(t){N(e,t,void 0)}))},shallowClone:L,deepClone:H,getObjectDiff:Gr,cmp:zt,asap:R,minKey:-1/0,addons:[],connections:At,errnames:ce,dependencies:tn,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,r)=>e+t/Math.pow(10,2*r)))}),rn.maxKey=fr(rn.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(cr("storagemutated",(e=>{if(!on){let t;Tt?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),on=!0,dispatchEvent(t),on=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{on||nn(e)})));let on=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),cr("storagemutated",(t=>{on||e.postMessage(t)})),e.onmessage=e=>{e.data&&nn(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){cr("storagemutated",(e=>{try{on||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&nn(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&nn(e.changedParts)}))}Fe.rejectionMapper=function(e,t){if(!e||e instanceof ie||e instanceof TypeError||e instanceof SyntaxError||!e.name||!he[e.name])return e;var r=new he[e.name](t||e.message,e);return"stack"in e&&k(r,"stack",{get:function(){return this.inner.stack}}),r},$(q,Dt);r(7042),r(8309),r(1038),r(2526),r(1817),r(2165),r(9753);function sn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return an(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return an(e,t)}(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,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function an(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 cn={storage:window.localStorage,set:function(e,t){if(t){var r=un(t)||"";this.storage.setItem(e,r)}},get:function(e){if(e){var t=this.storage.getItem(e),r=t||"";try{r=JSON.parse(r)}catch(e){r=t||""}return r}},remove:function(e){e&&this.storage.removeItem(e)},clear:function(){this.storage.clear()},removeList:function(e){var t,r=sn(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;this.storage.removeItem(n)}}catch(e){r.e(e)}finally{r.f()}}},un=function(e){if(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t?JSON.stringify(e):e}};const ln=cn;function hn(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function dn(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function fn(e){return[e.schema.primKey].concat(e.schema.indexes).map((function(e){return e.src})).join(",")}function pn(e,t){return new Promise((function(r,n){var i=new FileReader;i.onabort=function(e){return n(new Error("file read aborted"))},i.onerror=function(e){return n(e.target.error)},i.onload=function(e){return r(e.target.result)},"binary"===t?i.readAsArrayBuffer(e):i.readAsText(e)}))}function vn(e,t){if("undefined"==typeof FileReaderSync)throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var r=new FileReaderSync;return"binary"===t?r.readAsArrayBuffer(e):r.readAsText(e)}var gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function mn(e,t){return e(t={exports:{}},t.exports),t.exports}for(var yn=mn((function(e,t){e.exports=function(){function e(t){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(t)}function t(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var s=e.apply(r,n);function a(e){t(s,i,o,a,c,"next",e)}function c(e){t(s,i,o,a,c,"throw",e)}a(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,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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 c(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){s(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){return d(e)||p(e,t)||g()}function l(e){return h(e)||f(e)||v()}function h(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function d(e){if(Array.isArray(e))return e}function f(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function p(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var m=function e(t){n(this,e),this.p=new Promise(t)};m.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(m.prototype[Symbol.toStringTag]="TypesonPromise"),m.prototype.then=function(e,t){var r=this;return new m((function(n,i){r.p.then((function(t){n(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(n,i)}))},m.prototype.catch=function(e){return this.then(null,e)},m.resolve=function(e){return new m((function(t){t(e)}))},m.reject=function(e){return new m((function(t,r){r(e)}))},["all","race"].forEach((function(e){m[e]=function(t){return new m((function(r,n){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(r,n)}))}}));var y={}.toString,b={}.hasOwnProperty,S=Object.getPrototypeOf,w=b.toString;function k(e,t){return I(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function C(e){return y.call(e).slice(8,-1)}function x(t,r){if(!t||"object"!==e(t))return!1;var n=S(t);if(!n)return null===r;var i=b.call(n,"constructor")&&n.constructor;return"function"!=typeof i?null===r:r===i||null!==r&&w.call(i)===w.call(r)||"function"==typeof r&&"string"==typeof i.__typeson__type__&&i.__typeson__type__===r.__typeson__type__}function E(e){return!(!e||"Object"!==C(e))&&(!S(e)||x(e,Object))}function _(e){if(!e||"Object"!==C(e))return!1;var t=S(e);return!t||x(e,Object)||_(t)}function I(t){return t&&"object"===e(t)}function A(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function T(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function R(e,t){if(""===t)return e;var r=t.indexOf(".");if(r>-1){var n=e[T(t.slice(0,r))];return void 0===n?void 0:R(n,t.slice(r+1))}return e[T(t)]}function O(e,t,r){if(""===t)return r;var n=t.indexOf(".");return n>-1?O(e[T(t.slice(0,n))],t.slice(n+1),r):(e[T(t)]=r,e)}function D(t){return null===t?"null":Array.isArray(t)?"array":e(t)}var N=Object.keys,L=Array.isArray,P={}.hasOwnProperty,M=["type","replaced","iterateIn","iterateUnsetNumeric"];function B(e,t){if(""===e.keypath)return-1;var r=e.keypath.match(/\./g)||0,n=t.keypath.match(/\./g)||0;return r&&(r=r.length),n&&(n=n.length),r>n?-1:r<n?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var j=function(){function t(e){n(this,t),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return o(t,[{key:"stringify",value:function(e,t,r,n){n=c({},this.options,{},n,{stringification:!0});var i=this.encapsulate(e,null,n);return L(i)?JSON.stringify(i[0],t,r):i.then((function(e){return JSON.stringify(e,t,r)}))}},{key:"stringifySync",value:function(e,t,r,n){return this.stringify(e,t,r,c({throwOnBadSyncType:!0},n,{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,r,n){return this.stringify(e,t,r,c({throwOnBadSyncType:!0},n,{sync:!1}))}},{key:"parse",value:function(e,t,r){return r=c({},this.options,{},r,{parse:!0}),this.revive(JSON.parse(e,t),r)}},{key:"parseSync",value:function(e,t,r){return this.parse(e,t,c({throwOnBadSyncType:!0},r,{sync:!0}))}},{key:"parseAsync",value:function(e,t,r){return this.parse(e,t,c({throwOnBadSyncType:!0},r,{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.returnTypeNames=!0,this.encapsulate(e,t,r)}},{key:"rootTypeName",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.iterateNone=!0,this.encapsulate(e,t,r)}},{key:"encapsulate",value:function(n,i,o){var s=(o=c({sync:!0},this.options,{},o)).sync,a=this,h={},d=[],f=[],p=[],v=!("cyclic"in o)||o.cyclic,g=o.encapsulateObserver,y=C("",n,v,i||{},p);function b(e){var r=Object.values(h);if(o.iterateNone)return r.length?r[0]:t.getJSONType(e);if(r.length){if(o.returnTypeNames)return l(new Set(r));e&&E(e)&&!P.call(e,"$types")?e.$types=h:e={$:e,$types:{$:h}}}else I(e)&&P.call(e,"$types")&&(e={$:e,$types:!0});return!o.returnTypeNames&&e}function S(e,t){return w.apply(this,arguments)}function w(){return w=r(regeneratorRuntime.mark((function e(t,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(n.map((function(e){return e[1].p})));case 2:return i=e.sent,e.next=5,Promise.all(i.map(function(){var e=r(regeneratorRuntime.mark((function e(r){var i,o,s,a,c,l,h,d,f,p,v,g,y,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=[],o=n.splice(0,1),s=u(o,1),a=s[0],c=u(a,7),l=c[0],h=c[2],d=c[3],f=c[4],p=c[5],v=c[6],g=C(l,r,h,d,i,!0,v),y=x(g,m),!l||!y){e.next=11;break}return e.next=8,g.p;case 8:return b=e.sent,f[p]=b,e.abrupt("return",S(t,i));case 11:return l?f[p]=g:t=y?g.p:g,e.abrupt("return",S(t,i));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)}))),w.apply(this,arguments)}function k(e,t,r){Object.assign(e,t);var n=M.map((function(t){var r=e[t];return delete e[t],r}));r(),M.forEach((function(t,r){e[t]=n[r]}))}function C(r,n,i,s,c,u,l){var p,v={},y=e(n),b=g?function(e){var o=l||s.type||t.getJSONType(n);g(Object.assign(e||v,{keypath:r,value:n,cyclic:i,stateObj:s,promisesData:c,resolvingTypesonPromise:u,awaitingTypesonPromise:x(n,m)},{type:o}))}:null;if(["string","boolean","number","undefined"].includes(y))return void 0===n||"number"===y&&(isNaN(n)||n===-1/0||n===1/0)?(p=s.replaced?n:_(r,n,s,c,!1,u,b))!==n&&(v={replaced:p}):p=n,b&&b(),p;if(null===n)return b&&b(),n;if(i&&!s.iterateIn&&!s.iterateUnsetNumeric&&n&&"object"===e(n)){var S=d.indexOf(n);if(!(S<0))return h[r]="#",b&&b({cyclicKeypath:f[S]}),"#"+f[S];!0===i&&(d.push(n),f.push(r))}var w,I=E(n),T=L(n),R=(I||T)&&(!a.plainObjectReplacers.length||s.replaced)||s.iterateIn?n:_(r,n,s,c,I||T,null,b);if(R!==n?(p=R,v={replaced:R}):""===r&&x(n,m)?(c.push([r,n,i,s,void 0,void 0,s.type]),p=n):T&&"object"!==s.iterateIn||"array"===s.iterateIn?(w=new Array(n.length),v={clone:w}):(["function","symbol"].includes(e(n))||"toJSON"in n||x(n,m)||x(n,Promise)||x(n,ArrayBuffer))&&!I&&"object"!==s.iterateIn?p=n:(w={},s.addLength&&(w.length=n.length),v={clone:w}),b&&b(),o.iterateNone)return w||p;if(!w)return p;if(s.iterateIn){var O=function(e){var t={ownKeys:P.call(n,e)};k(s,t,(function(){var t=r+(r?".":"")+A(e),o=C(t,n[e],Boolean(i),s,c,u);x(o,m)?c.push([t,o,Boolean(i),s,w,e,s.type]):void 0!==o&&(w[e]=o)}))};for(var D in n)O(D);b&&b({endIterateIn:!0,end:!0})}else N(n).forEach((function(e){var t=r+(r?".":"")+A(e);k(s,{ownKeys:!0},(function(){var r=C(t,n[e],Boolean(i),s,c,u);x(r,m)?c.push([t,r,Boolean(i),s,w,e,s.type]):void 0!==r&&(w[e]=r)}))})),b&&b({endIterateOwn:!0,end:!0});if(s.iterateUnsetNumeric){for(var M=n.length,B=function(e){if(!(e in n)){var t=r+(r?".":"")+e;k(s,{ownKeys:!1},(function(){var r=C(t,void 0,Boolean(i),s,c,u);x(r,m)?c.push([t,r,Boolean(i),s,w,e,s.type]):void 0!==r&&(w[e]=r)}))}},j=0;j<M;j++)B(j);b&&b({endIterateUnsetNumeric:!0,end:!0})}return w}function _(e,t,r,n,i,o,c){for(var u=i?a.plainObjectReplacers:a.nonplainObjectReplacers,l=u.length;l--;){var d=u[l];if(d.test(t,r)){var f=d.type;if(a.revivers[f]){var p=h[e];h[e]=p?[f].concat(p):f}return Object.assign(r,{type:f,replaced:!0}),!s&&d.replaceAsync||d.replace?(c&&c({replacing:!0}),C(e,d[s||!d.replaceAsync?"replace":"replaceAsync"](t,r),v&&"readonly",r,n,o,f)):(c&&c({typeDetected:!0}),C(e,t,v&&"readonly",r,n,o,f))}}return t}return p.length?s&&o.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(S(y,p)).then(b):!s&&o.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():o.stringification&&s?[b(y)]:s?b(y):Promise.resolve(b(y))}},{key:"encapsulateSync",value:function(e,t,r){return this.encapsulate(e,t,c({throwOnBadSyncType:!0},r,{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,r){return this.encapsulate(e,t,c({throwOnBadSyncType:!0},r,{sync:!1}))}},{key:"revive",value:function(e,t){var r=e&&e.$types;if(!r)return e;if(!0===r)return e.$;var n=(t=c({sync:!0},this.options,{},t)).sync,i=[],o={},s=!0;r.$&&E(r.$)&&(e=e.$,r=r.$,s=!1);var a=this;function l(e,t){var r=u(a.revivers[e]||[],1)[0];if(!r)throw new Error("Unregistered type: "+e);return n&&!("revive"in r)?t:r[n&&r.revive?"revive":!n&&r.reviveAsync?"reviveAsync":"revive"](t,o)}function h(){var t=[];if(Object.entries(r).forEach((function(e){var n=u(e,2),i=n[0],o=n[1];"#"!==o&&[].concat(o).forEach((function(e){u(a.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:i,type:e}),delete r[i])}))})),t.length)return t.sort(B).reduce((function t(r,n){var i=n.keypath,o=n.type;if(k(r))return r.then((function(e){return t(e,{keypath:i,type:o})}));var s=R(e,i);if(x(s=l(o,s),m))return s.then((function(t){var r=O(e,i,t);r===t&&(e=r)}));var a=O(e,i,s);a===s&&(e=a)}),void 0)}var d=[];function f(e,t,n,o,a){if(!s||"$types"!==e){var c=r[e],h=L(t);if(h||E(t)){var p=h?new Array(t.length):{};for(N(t).forEach((function(r){var i=f(e+(e?".":"")+A(r),t[r],n||p,p,r),o=function(e){return x(e,G)?p[r]=void 0:void 0!==e&&(p[r]=e),e};x(i,m)?d.push(i.then((function(e){return o(e)}))):o(i)})),t=p;i.length;){var v=u(i[0],4),g=v[0],y=v[1],b=v[2],S=v[3],w=R(g,y);if(void 0===w)break;b[S]=w,i.splice(0,1)}}if(!c)return t;if("#"===c){var k=R(n,t.slice(1));return void 0===k&&i.push([n,t.slice(1),o,a]),k}return[].concat(c).reduce((function e(t,r){return x(t,m)?t.then((function(t){return e(t,r)})):l(r,t)}),t)}}function p(e){return x(e,G)?void 0:e}var v,g=h();return x(g,m)?v=g.then((function(){return e})):(v=f("",e,null),d.length&&(v=m.resolve(v).then((function(e){return m.all([e].concat(d))})).then((function(e){return u(e,1)[0]})))),k(v)?n&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():x(v,m)?v.p.then(p):v:!n&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n?p(v):Promise.resolve(p(v))}},{key:"reviveSync",value:function(e,t){return this.revive(e,c({throwOnBadSyncType:!0},t,{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,c({throwOnBadSyncType:!0},t,{sync:!1}))}},{key:"register",value:function(e,r){return r=r||{},[].concat(e).forEach((function e(n){var i=this;if(L(n))return n.map((function(t){return e.call(i,t)}));n&&N(n).forEach((function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(t.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var i=n[e],o=i&&i.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,s=o.filter((function(t){return t.type===e}));if(s.length&&(o.splice(o.indexOf(s[0]),1),delete this.revivers[e],delete this.types[e]),"function"==typeof i){var a=i;i={test:function(e){return e&&e.constructor===a},replace:function(e){return c({},e)},revive:function(e){return Object.assign(Object.create(a.prototype),e)}}}else if(L(i)){var l=u(i,3);i={test:l[0],replace:l[1],revive:l[2]}}if(i&&i.test){var h={type:e,test:i.test.bind(i)};i.replace&&(h.replace=i.replace.bind(i)),i.replaceAsync&&(h.replaceAsync=i.replaceAsync.bind(i));var d="number"==typeof r.fallback?r.fallback:r.fallback?0:1/0;if(i.testPlainObjects?this.plainObjectReplacers.splice(d,0,h):this.nonplainObjectReplacers.splice(d,0,h),i.revive||i.reviveAsync){var f={};i.revive&&(f.revive=i.revive.bind(i)),i.reviveAsync&&(f.reviveAsync=i.reviveAsync.bind(i)),this.revivers[e]=[f,{plain:i.testPlainObjects}]}this.types[e]=i}}),this)}),this),this}}]),t}(),G=function e(){n(this,e)};return G.__typeson__type__="TypesonUndefined",j.Undefined=G,j.Promise=m,j.isThenable=k,j.toStringTag=C,j.hasConstructorOf=x,j.isObject=I,j.isPlainObject=E,j.isUserObject=_,j.escapeKeyPathComponent=A,j.unescapeKeyPathComponent=T,j.getByKeyPath=R,j.getJSONType=D,j.JSON_TYPES=["null","boolean","number","string","array","object"],j}()})),bn=mn((function(e,t){e.exports=function(){function e(t){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})(t)}function t(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,n.key,n)}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(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 s(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){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})(e)}function c(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,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}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 d(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){l(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 f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}(e,t)||v(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 p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||v(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 v(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}function g(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 m=function e(t){c(this,e),this.p=new Promise(t)};m.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(m.prototype[Symbol.toStringTag]="TypesonPromise"),m.prototype.then=function(e,t){var r=this;return new m((function(n,i){r.p.then((function(t){n(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(n,i)}))},m.prototype.catch=function(e){return this.then(null,e)},m.resolve=function(e){return new m((function(t){t(e)}))},m.reject=function(e){return new m((function(t,r){r(e)}))},["all","race"].forEach((function(e){m[e]=function(t){return new m((function(r,n){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(r,n)}))}}));var y={}.toString,b={}.hasOwnProperty,S=Object.getPrototypeOf,w=b.toString;function k(e,t){return _(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function C(e){return y.call(e).slice(8,-1)}function x(e,t){if(!e||"object"!==a(e))return!1;var r=S(e);if(!r)return null===t;var n=b.call(r,"constructor")&&r.constructor;return"function"!=typeof n?null===t:t===n||null!==t&&w.call(n)===w.call(t)||"function"==typeof t&&"string"==typeof n.__typeson__type__&&n.__typeson__type__===t.__typeson__type__}function E(e){return!(!e||"Object"!==C(e))&&(!S(e)||x(e,Object))}function _(e){return e&&"object"===a(e)}function I(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function A(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function T(e,t){if(""===t)return e;var r=t.indexOf(".");if(r>-1){var n=e[A(t.slice(0,r))];return void 0===n?void 0:T(n,t.slice(r+1))}return e[A(t)]}function R(e,t,r){if(""===t)return r;var n=t.indexOf(".");return n>-1?R(e[A(t.slice(0,n))],t.slice(n+1),r):(e[A(t)]=r,e)}function O(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var D=Object.keys,N=Array.isArray,L={}.hasOwnProperty,P=["type","replaced","iterateIn","iterateUnsetNumeric"];function M(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function B(e,t){if(""===e.keypath)return-1;var r=e.keypath.match(/\./g)||0,n=t.keypath.match(/\./g)||0;return r&&(r=r.length),n&&(n=n.length),r>n?-1:r<n?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var j=function(){function e(t){c(this,e),this.options=t,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(e,t,r){t&&u(e.prototype,t),r&&u(e,r)}(e,[{key:"stringify",value:function(e,t,r,n){n=d(d(d({},this.options),n),{},{stringification:!0});var i=this.encapsulate(e,null,n);return N(i)?JSON.stringify(i[0],t,r):i.then((function(e){return JSON.stringify(e,t,r)}))}},{key:"stringifySync",value:function(e,t,r,n){return this.stringify(e,t,r,d(d({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,r,n){return this.stringify(e,t,r,d(d({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"parse",value:function(e,t,r){return r=d(d(d({},this.options),r),{},{parse:!0}),this.revive(JSON.parse(e,t),r)}},{key:"parseSync",value:function(e,t,r){return this.parse(e,t,d(d({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,r){return this.parse(e,t,d(d({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.returnTypeNames=!0,this.encapsulate(e,t,r)}},{key:"rootTypeName",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.iterateNone=!0,this.encapsulate(e,t,r)}},{key:"encapsulate",value:function(t,r,n){var i=M((function(e,t){return O(Promise.all(t.map((function(e){return e[1].p}))),(function(r){return O(Promise.all(r.map(M((function(r){var n=!1,o=[],s=f(t.splice(0,1),1),a=f(s[0],7),c=a[0],u=a[2],l=a[3],h=a[4],d=a[5],p=a[6],v=w(c,r,u,l,o,!0,p),g=x(v,m);return function(e,t){var r=e();return r&&r.then?r.then(t):t(r)}((function(){if(c&&g)return O(v.p,(function(t){return h[d]=t,n=!0,i(e,o)}))}),(function(t){return n?t:(c?h[d]=v:e=g?v.p:v,i(e,o))}))})))),(function(){return e}))}))})),o=(n=d(d({sync:!0},this.options),n)).sync,s=this,c={},u=[],l=[],h=[],v=!("cyclic"in n)||n.cyclic,g=n.encapsulateObserver,y=w("",t,v,r||{},h);function b(t){var r=Object.values(c);if(n.iterateNone)return r.length?r[0]:e.getJSONType(t);if(r.length){if(n.returnTypeNames)return p(new Set(r));t&&E(t)&&!L.call(t,"$types")?t.$types=c:t={$:t,$types:{$:c}}}else _(t)&&L.call(t,"$types")&&(t={$:t,$types:!0});return!n.returnTypeNames&&t}function S(e,t,r){Object.assign(e,t);var n=P.map((function(t){var r=e[t];return delete e[t],r}));r(),P.forEach((function(t,r){e[t]=n[r]}))}function w(t,r,i,o,h,d,f){var p,v={},y=a(r),b=g?function(n){var s=f||o.type||e.getJSONType(r);g(Object.assign(n||v,{keypath:t,value:r,cyclic:i,stateObj:o,promisesData:h,resolvingTypesonPromise:d,awaitingTypesonPromise:x(r,m)},{type:s}))}:null;if(["string","boolean","number","undefined"].includes(y))return void 0===r||Number.isNaN(r)||r===Number.NEGATIVE_INFINITY||r===Number.POSITIVE_INFINITY?(p=o.replaced?r:k(t,r,o,h,!1,d,b))!==r&&(v={replaced:p}):p=r,b&&b(),p;if(null===r)return b&&b(),r;if(i&&!o.iterateIn&&!o.iterateUnsetNumeric&&r&&"object"===a(r)){var C=u.indexOf(r);if(!(C<0))return c[t]="#",b&&b({cyclicKeypath:l[C]}),"#"+l[C];!0===i&&(u.push(r),l.push(t))}var _,A=E(r),T=N(r),R=(A||T)&&(!s.plainObjectReplacers.length||o.replaced)||o.iterateIn?r:k(t,r,o,h,A||T,null,b);if(R!==r?(p=R,v={replaced:R}):""===t&&x(r,m)?(h.push([t,r,i,o,void 0,void 0,o.type]),p=r):T&&"object"!==o.iterateIn||"array"===o.iterateIn?(_=new Array(r.length),v={clone:_}):(["function","symbol"].includes(a(r))||"toJSON"in r||x(r,m)||x(r,Promise)||x(r,ArrayBuffer))&&!A&&"object"!==o.iterateIn?p=r:(_={},o.addLength&&(_.length=r.length),v={clone:_}),b&&b(),n.iterateNone)return _||p;if(!_)return p;if(o.iterateIn){var O=function(e){var n={ownKeys:L.call(r,e)};S(o,n,(function(){var n=t+(t?".":"")+I(e),s=w(n,r[e],Boolean(i),o,h,d);x(s,m)?h.push([n,s,Boolean(i),o,_,e,o.type]):void 0!==s&&(_[e]=s)}))};for(var P in r)O(P);b&&b({endIterateIn:!0,end:!0})}else D(r).forEach((function(e){var n=t+(t?".":"")+I(e);S(o,{ownKeys:!0},(function(){var t=w(n,r[e],Boolean(i),o,h,d);x(t,m)?h.push([n,t,Boolean(i),o,_,e,o.type]):void 0!==t&&(_[e]=t)}))})),b&&b({endIterateOwn:!0,end:!0});if(o.iterateUnsetNumeric){for(var M=r.length,B=function(e){if(!(e in r)){var n=t+(t?".":"")+e;S(o,{ownKeys:!1},(function(){var t=w(n,void 0,Boolean(i),o,h,d);x(t,m)?h.push([n,t,Boolean(i),o,_,e,o.type]):void 0!==t&&(_[e]=t)}))}},j=0;j<M;j++)B(j);b&&b({endIterateUnsetNumeric:!0,end:!0})}return _}function k(e,t,r,n,i,a,u){for(var l=i?s.plainObjectReplacers:s.nonplainObjectReplacers,h=l.length;h--;){var d=l[h];if(d.test(t,r)){var f=d.type;if(s.revivers[f]){var p=c[e];c[e]=p?[f].concat(p):f}return Object.assign(r,{type:f,replaced:!0}),!o&&d.replaceAsync||d.replace?(u&&u({replacing:!0}),w(e,d[o||!d.replaceAsync?"replace":"replaceAsync"](t,r),v&&"readonly",r,n,a,f)):(u&&u({typeDetected:!0}),w(e,t,v&&"readonly",r,n,a,f))}}return t}return h.length?o&&n.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(i(y,h)).then(b):!o&&n.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n.stringification&&o?[b(y)]:o?b(y):Promise.resolve(b(y))}},{key:"encapsulateSync",value:function(e,t,r){return this.encapsulate(e,t,d(d({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,r){return this.encapsulate(e,t,d(d({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"revive",value:function(e,t){var r=e&&e.$types;if(!r)return e;if(!0===r)return e.$;var n=(t=d(d({sync:!0},this.options),t)).sync,i=[],o={},s=!0;r.$&&E(r.$)&&(e=e.$,r=r.$,s=!1);var a=this;function c(e,t){var r=f(a.revivers[e]||[],1)[0];if(!r)throw new Error("Unregistered type: "+e);return n&&!("revive"in r)?t:r[n&&r.revive?"revive":!n&&r.reviveAsync?"reviveAsync":"revive"](t,o)}var u=[];function l(e){return x(e,G)?void 0:e}var h,p=function(){var t=[];if(Object.entries(r).forEach((function(e){var n=f(e,2),i=n[0],o=n[1];"#"!==o&&[].concat(o).forEach((function(e){f(a.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:i,type:e}),delete r[i])}))})),t.length)return t.sort(B).reduce((function t(r,n){var i=n.keypath,o=n.type;if(k(r))return r.then((function(e){return t(e,{keypath:i,type:o})}));var s=T(e,i);if(x(s=c(o,s),m))return s.then((function(t){var r=R(e,i,t);r===t&&(e=r)}));var a=R(e,i,s);a===s&&(e=a)}),void 0)}();return x(p,m)?h=p.then((function(){return e})):(h=function e(t,n,o,a,l){if(!s||"$types"!==t){var h=r[t],d=N(n);if(d||E(n)){var p=d?new Array(n.length):{};for(D(n).forEach((function(r){var i=e(t+(t?".":"")+I(r),n[r],o||p,p,r),s=function(e){return x(e,G)?p[r]=void 0:void 0!==e&&(p[r]=e),e};x(i,m)?u.push(i.then((function(e){return s(e)}))):s(i)})),n=p;i.length;){var v=f(i[0],4),g=v[0],y=v[1],b=v[2],S=v[3],w=T(g,y);if(void 0===w)break;b[S]=w,i.splice(0,1)}}if(!h)return n;if("#"===h){var k=T(o,n.slice(1));return void 0===k&&i.push([o,n.slice(1),a,l]),k}return[].concat(h).reduce((function e(t,r){return x(t,m)?t.then((function(t){return e(t,r)})):c(r,t)}),n)}}("",e,null),u.length&&(h=m.resolve(h).then((function(e){return m.all([e].concat(u))})).then((function(e){return f(e,1)[0]})))),k(h)?n&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():x(h,m)?h.p.then(l):h:!n&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n?l(h):Promise.resolve(l(h))}},{key:"reviveSync",value:function(e,t){return this.revive(e,d(d({throwOnBadSyncType:!0},t),{},{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,d(d({throwOnBadSyncType:!0},t),{},{sync:!1}))}},{key:"register",value:function(t,r){return r=r||{},[].concat(t).forEach((function t(n){var i=this;if(N(n))return n.map((function(e){return t.call(i,e)}));n&&D(n).forEach((function(t){if("#"===t)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(e.JSON_TYPES.includes(t))throw new TypeError("Plain JSON object types are reserved as type names");var i=n[t],o=i&&i.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,s=o.filter((function(e){return e.type===t}));if(s.length&&(o.splice(o.indexOf(s[0]),1),delete this.revivers[t],delete this.types[t]),"function"==typeof i){var a=i;i={test:function(e){return e&&e.constructor===a},replace:function(e){return d({},e)},revive:function(e){return Object.assign(Object.create(a.prototype),e)}}}else if(N(i)){var c=f(i,3);i={test:c[0],replace:c[1],revive:c[2]}}if(i&&i.test){var u={type:t,test:i.test.bind(i)};i.replace&&(u.replace=i.replace.bind(i)),i.replaceAsync&&(u.replaceAsync=i.replaceAsync.bind(i));var l="number"==typeof r.fallback?r.fallback:r.fallback?0:Number.POSITIVE_INFINITY;if(i.testPlainObjects?this.plainObjectReplacers.splice(l,0,u):this.nonplainObjectReplacers.splice(l,0,u),i.revive||i.reviveAsync){var h={};i.revive&&(h.revive=i.revive.bind(i)),i.reviveAsync&&(h.reviveAsync=i.reviveAsync.bind(i)),this.revivers[t]=[h,{plain:i.testPlainObjects}]}this.types[t]=i}}),this)}),this),this}}]),e}(),G=function e(){c(this,e)};G.__typeson__type__="TypesonUndefined",j.Undefined=G,j.Promise=m,j.isThenable=k,j.toStringTag=C,j.hasConstructorOf=x,j.isObject=_,j.isPlainObject=E,j.isUserObject=function e(t){if(!t||"Object"!==C(t))return!1;var r=S(t);return!r||x(t,Object)||e(r)},j.escapeKeyPathComponent=I,j.unescapeKeyPathComponent=A,j.getByKeyPath=T,j.getJSONType=function(e){return null===e?"null":Array.isArray(e)?"array":a(e)},j.JSON_TYPES=["null","boolean","number","string","array","object"];for(var H={userObject:{test:function(e,t){return j.isUserObject(e)},replace:function(e){return function(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){n(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}({},e)},revive:function(e){return e}}},U=[{arrayNonindexKeys:{testPlainObjects:!0,test:function(e,t){return!!Array.isArray(e)&&(Object.keys(e).some((function(e){return String(Number.parseInt(e))!==e}))&&(t.iterateIn="object",t.addLength=!0),!0)},replace:function(e,t){return t.iterateUnsetNumeric=!0,e},revive:function(e){if(Array.isArray(e))return e;var t=[];return Object.keys(e).forEach((function(r){var n=e[r];t[r]=n})),t}}},{sparseUndefined:{test:function(e,t){return void 0===e&&!1===t.ownKeys},replace:function(e){return 0},revive:function(e){}}}],K={undef:{test:function(e,t){return void 0===e&&(t.ownKeys||!("ownKeys"in t))},replace:function(e){return 0},revive:function(e){return new j.Undefined}}},F={StringObject:{test:function(t){return"String"===j.toStringTag(t)&&"object"===e(t)},replace:function(e){return String(e)},revive:function(e){return new String(e)}},BooleanObject:{test:function(t){return"Boolean"===j.toStringTag(t)&&"object"===e(t)},replace:function(e){return Boolean(e)},revive:function(e){return new Boolean(e)}},NumberObject:{test:function(t){return"Number"===j.toStringTag(t)&&"object"===e(t)},replace:function(e){return Number(e)},revive:function(e){return new Number(e)}}},V=[{nan:{test:function(e){return Number.isNaN(e)},replace:function(e){return"NaN"},revive:function(e){return Number.NaN}}},{infinity:{test:function(e){return e===Number.POSITIVE_INFINITY},replace:function(e){return"Infinity"},revive:function(e){return Number.POSITIVE_INFINITY}}},{negativeInfinity:{test:function(e){return e===Number.NEGATIVE_INFINITY},replace:function(e){return"-Infinity"},revive:function(e){return Number.NEGATIVE_INFINITY}}}],Y={date:{test:function(e){return"Date"===j.toStringTag(e)},replace:function(e){var t=e.getTime();return Number.isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(Number.NaN):new Date(e)}}},z={regexp:{test:function(e){return"RegExp"===j.toStringTag(e)},replace:function(e){return{source:e.source,flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")}},revive:function(e){var t=e.source,r=e.flags;return new RegExp(t,r)}}},X={map:{test:function(e){return"Map"===j.toStringTag(e)},replace:function(e){return o(e.entries())},revive:function(e){return new Map(e)}}},W={set:{test:function(e){return"Set"===j.toStringTag(e)},replace:function(e){return o(e.values())},revive:function(e){return new Set(e)}}},q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=new Uint8Array(256),Z=0;Z<q.length;Z++)$[q.charCodeAt(Z)]=Z;var J=function(e,t,r){null==r&&(r=e.byteLength);for(var n=new Uint8Array(e,t||0,r),i=n.length,o="",s=0;s<i;s+=3)o+=q[n[s]>>2],o+=q[(3&n[s])<<4|n[s+1]>>4],o+=q[(15&n[s+1])<<2|n[s+2]>>6],o+=q[63&n[s+2]];return i%3==2?o=o.slice(0,-1)+"=":i%3==1&&(o=o.slice(0,-2)+"=="),o},Q=function(e){var t,r,n,i,o=e.length,s=.75*e.length,a=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);for(var c=new ArrayBuffer(s),u=new Uint8Array(c),l=0;l<o;l+=4)t=$[e.charCodeAt(l)],r=$[e.charCodeAt(l+1)],n=$[e.charCodeAt(l+2)],i=$[e.charCodeAt(l+3)],u[a++]=t<<2|r>>4,u[a++]=(15&r)<<4|n>>2,u[a++]=(3&n)<<6|63&i;return c},ee={arraybuffer:{test:function(e){return"ArrayBuffer"===j.toStringTag(e)},replace:function(e,t){t.buffers||(t.buffers=[]);var r=t.buffers.indexOf(e);return r>-1?{index:r}:(t.buffers.push(e),J(e))},revive:function(t,r){if(r.buffers||(r.buffers=[]),"object"===e(t))return r.buffers[t.index];var n=Q(t);return r.buffers.push(n),n}}},te="undefined"==typeof self?gn:self,re={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,r=te[t];r&&(re[e.toLowerCase()]={test:function(e){return j.toStringTag(e)===t},replace:function(e,t){var r=e.buffer,n=e.byteOffset,i=e.length;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(r);return o>-1?{index:o,byteOffset:n,length:i}:(t.buffers.push(r),{encoded:J(r),byteOffset:n,length:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,i=e.byteOffset,o=e.length,s=e.encoded,a=e.index;return"index"in e?n=t.buffers[a]:(n=Q(s),t.buffers.push(n)),new r(n,i,o)}})}));var ne={dataview:{test:function(e){return"DataView"===j.toStringTag(e)},replace:function(e,t){var r=e.buffer,n=e.byteOffset,i=e.byteLength;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(r);return o>-1?{index:o,byteOffset:n,byteLength:i}:(t.buffers.push(r),{encoded:J(r),byteOffset:n,byteLength:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var r,n=e.byteOffset,i=e.byteLength,o=e.encoded,s=e.index;return"index"in e?r=t.buffers[s]:(r=Q(o),t.buffers.push(r)),new DataView(r,n,i)}}},ie={IntlCollator:{test:function(e){return j.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return j.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return j.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}};function oe(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t.buffer}var se={file:{test:function(e){return"File"===j.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad File access: "+t.status);return{type:e.type,stringContents:t.responseText,name:e.name,lastModified:e.lastModified}},revive:function(e){var t=e.name,r=e.type,n=e.stringContents,i=e.lastModified;return new File([oe(n)],t,{type:r,lastModified:i})},replaceAsync:function(e){return new j.Promise((function(t,r){var n=new FileReader;n.addEventListener("load",(function(){t({type:e.type,stringContents:n.result,name:e.name,lastModified:e.lastModified})})),n.addEventListener("error",(function(){r(n.error)})),n.readAsBinaryString(e)}))}}},ae={bigint:{test:function(e){return"bigint"==typeof e},replace:function(e){return String(e)},revive:function(e){return BigInt(e)}}},ce={bigintObject:{test:function(t){return"object"===e(t)&&j.hasConstructorOf(t,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},ue={cryptokey:{test:function(e){return"CryptoKey"===j.toStringTag(e)&&e.extractable},replaceAsync:function(e){return new j.Promise((function(t,r){crypto.subtle.exportKey("jwk",e).catch((function(e){r(e)})).then((function(r){t({jwk:r,algorithm:e.algorithm,usages:e.usages})}))}))},revive:function(e){var t=e.jwk,r=e.algorithm,n=e.usages;return crypto.subtle.importKey("jwk",t,r,!0,n)}}};return[H,K,U,F,V,Y,z,{imagedata:{test:function(e){return"ImageData"===j.toStringTag(e)},replace:function(e){return{array:o(e.data),width:e.width,height:e.height}},revive:function(e){return new ImageData(new Uint8ClampedArray(e.array),e.width,e.height)}}},{imagebitmap:{test:function(e){return"ImageBitmap"===j.toStringTag(e)||e&&e.dataset&&"ImageBitmap"===e.dataset.toStringTag},replace:function(e){var t=document.createElement("canvas");return t.getContext("2d").drawImage(e,0,0),t.toDataURL()},revive:function(e){var t=document.createElement("canvas"),r=t.getContext("2d"),n=document.createElement("img");return n.addEventListener("load",(function(){r.drawImage(n,0,0)})),n.src=e,t},reviveAsync:function(e){var t=document.createElement("canvas"),r=t.getContext("2d"),n=document.createElement("img");return n.addEventListener("load",(function(){r.drawImage(n,0,0)})),n.src=e,createImageBitmap(t)}}},se,{file:se.file,filelist:{test:function(e){return"FileList"===j.toStringTag(e)},replace:function(e){for(var t=[],r=0;r<e.length;r++)t[r]=e.item(r);return t},revive:function(e){return new(function(){function e(){t(this,e),this._files=arguments[0],this.length=this._files.length}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"item",value:function(e){return this._files[e]}},{key:Symbol.toStringTag,get:function(){return"FileList"}}]),e}())(e)}}},{blob:{test:function(e){return"Blob"===j.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,r=e.stringContents;return new Blob([oe(r)],{type:t})},replaceAsync:function(e){return new j.Promise((function(t,r){var n=new FileReader;n.addEventListener("load",(function(){t({type:e.type,stringContents:n.result})})),n.addEventListener("error",(function(){r(n.error)})),n.readAsBinaryString(e)}))}}}].concat("function"==typeof Map?X:[],"function"==typeof Set?W:[],"function"==typeof ArrayBuffer?ee:[],"function"==typeof Uint8Array?re:[],"function"==typeof DataView?ne:[],"undefined"!=typeof Intl?ie:[],"undefined"!=typeof crypto?ue:[],"undefined"!=typeof BigInt?[ae,ce]:[])}()})),Sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wn=new Uint8Array(256),kn=0;kn<Sn.length;kn++)wn[Sn.codePointAt(kn)]=kn;var Cn=function(e,t,r){null==r&&(r=e.byteLength);for(var n=new Uint8Array(e,t||0,r),i=n.length,o="",s=0;s<i;s+=3)o+=Sn[n[s]>>2],o+=Sn[(3&n[s])<<4|n[s+1]>>4],o+=Sn[(15&n[s+1])<<2|n[s+2]>>6],o+=Sn[63&n[s+2]];return i%3==2?o=o.slice(0,-1)+"=":i%3==1&&(o=o.slice(0,-2)+"=="),o},xn=function(e){var t,r,n,i,o=e.length,s=.75*e.length,a=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);for(var c=new ArrayBuffer(s),u=new Uint8Array(c),l=0;l<o;l+=4)t=wn[e.codePointAt(l)],r=wn[e.codePointAt(l+1)],n=wn[e.codePointAt(l+2)],i=wn[e.codePointAt(l+3)],u[a++]=t<<2|r>>4,u[a++]=(15&r)<<4|n>>2,u[a++]=(3&n)<<6|63&i;return c},En="undefined"==typeof self?global:self,_n={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,r=En[t];r&&(_n[e.toLowerCase()+"2"]={test:function(e){return yn.toStringTag(e)===t},replace:function(e){return{buffer:e.buffer,byteOffset:e.byteOffset,length:e.length}},revive:function(e){var t=e.buffer,n=e.byteOffset,i=e.length;return new r(t,n,i)}})}));var In={arraybuffer:{test:function(e){return"ArrayBuffer"===yn.toStringTag(e)},replace:function(e){return Cn(e,0,e.byteLength)},revive:function(e){return xn(e)}}},An=(new yn).register(bn),Tn="FileReaderSync"in self,Rn=[],On=0;An.register([In,_n,{blob2:{test:function(e){return"Blob"===yn.toStringTag(e)},replace:function(e){if(e.isClosed)throw new Error("The Blob is closed");if(Tn){var t=vn(e,"binary"),r=Cn(t,0,t.byteLength);return{type:e.type,data:r}}Rn.push(e);var n={type:e.type,data:{start:On,end:On+e.size}};return On+=e.size,n},finalize:function(e,t){e.data=Cn(t,0,t.byteLength)},revive:function(e){var t=e.type,r=e.data;return new Blob([xn(r)],{type:t})}}}]),An.mustFinalize=function(){return Rn.length>0},An.finalize=function(e){return hn(void 0,void 0,void 0,(function(){var t,r,n,i,o,s,a,c,u,l;return dn(this,(function(h){switch(h.label){case 0:return[4,pn(new Blob(Rn),"binary")];case 1:if(t=h.sent(),e)for(r=0,n=e;r<n.length;r++)if((i=n[r]).$types)for(a in o=i.$types,(s=o.$)&&(o=o.$),o)c=o[a],(u=An.types[c])&&u.finalize&&(l=Zr.getByKeyPath(i,s?"$."+a:a),u.finalize(l,t.slice(l.start,l.end)));return Rn=[],[2]}}))}))};function Dn(e,t){return hn(this,void 0,void 0,(function(){function r(){return hn(this,void 0,void 0,(function(){var r,u,l,h,d,f,p,v,g;return dn(this,(function(m){switch(m.label){case 0:return[4,Promise.all(e.tables.map((function(e){return e.count()})))];case 1:(r=m.sent()).forEach((function(e,t){return i[t].rowCount=e})),c.totalRows=r.reduce((function(e,t){return e+t})),u=JSON.stringify(s,void 0,o?2:void 0),l=u.lastIndexOf("]"),h=u.substring(0,l),n.push(h),d=t.filter,f=function(r){var i,s,u,l,h,f,p,v,g,m,y;return dn(this,(function(b){switch(b.label){case 0:i=e.table(r),s=i.schema.primKey,u=!!s.keyPath,l=t.numRowsPerChunk||2e3,h=u?{tableName:i.name,inbound:!0,rows:[]}:{tableName:i.name,inbound:!1,rows:[]},f=JSON.stringify(h,void 0,o?2:void 0),o&&(f=f.split("\n").join("\n ")),p=f.lastIndexOf("]"),n.push(f.substring(0,p)),v=null,g=0,m=!0,y=function(){var e,t,h,f,p,y,b,S;return dn(this,(function(w){switch(w.label){case 0:return a&&Zr.ignoreTransaction((function(){return a(c)})),[4,(e=null==v?i.limit(l):i.where(":id").above(v).limit(l)).toArray()];case 1:return 0===(t=w.sent()).length?[2,"break"]:(null!=v&&g>0&&(n.push(","),o&&n.push("\n ")),m=t.length===l,u?(h=d?t.filter((function(e){return d(r,e)})):t,f=h.map((function(e){return An.encapsulate(e)})),An.mustFinalize()?[4,Zr.waitFor(An.finalize(f))]:[3,3]):[3,4]);case 2:w.sent(),w.label=3;case 3:return S=JSON.stringify(f,void 0,o?2:void 0),o&&(S=S.split("\n").join("\n ")),n.push(new Blob([S.substring(1,S.length-1)])),g=h.length,v=t.length>0?Zr.getByKeyPath(t[t.length-1],s.keyPath):null,[3,8];case 4:return[4,e.primaryKeys()];case 5:return p=w.sent(),y=p.map((function(e,r){return[e,t[r]]})),d&&(y=y.filter((function(e){var t=e[0],n=e[1];return d(r,n,t)}))),b=y.map((function(e){return An.encapsulate(e)})),An.mustFinalize()?[4,Zr.waitFor(An.finalize(b))]:[3,7];case 6:w.sent(),w.label=7;case 7:S=JSON.stringify(b,void 0,o?2:void 0),o&&(S=S.split("\n").join("\n ")),n.push(new Blob([S.substring(1,S.length-1)])),g=y.length,v=p.length>0?p[p.length-1]:null,w.label=8;case 8:return c.completedRows+=t.length,[2]}}))},b.label=1;case 1:return m?[5,y()]:[3,3];case 2:return"break"===b.sent()?[3,3]:[3,1];case 3:return n.push(f.substr(p)),c.completedTables+=1,c.completedTables<c.totalTables&&n.push(","),[2]}}))},p=0,v=i,m.label=2;case 2:return p<v.length?(g=v[p].name,[5,f(g)]):[3,5];case 3:m.sent(),m.label=4;case 4:return p++,[3,2];case 5:return n.push(u.substr(l)),c.done=!0,a&&Zr.ignoreTransaction((function(){return a(c)})),[2]}}))}))}var n,i,o,s,a,c;return dn(this,(function(u){switch(u.label){case 0:t=t||{},n=[],i=e.tables.map((function(e){return{name:e.name,schema:fn(e),rowCount:0}})),o=t.prettyJson,s={formatName:"dexie",formatVersion:1,data:{databaseName:e.name,databaseVersion:e.verno,tables:i,data:[]}},a=t.progressCallback,c={done:!1,completedRows:0,completedTables:0,totalRows:NaN,totalTables:e.tables.length},u.label=1;case 1:return u.trys.push([1,,6,7]),t.noTransaction?[4,r()]:[3,3];case 2:return u.sent(),[3,5];case 3:return[4,e.transaction("r",e.tables,r)];case 4:u.sent(),u.label=5;case 5:return[3,7];case 6:return An.finalize(),[7];case 7:return[2,new Blob(n,{type:"text/json"})]}}))}))}var Nn=function(){},Ln=mn((function(e,t){!function(e){var t="object"==typeof process&&process.env?process.env:self;e.parser=function(e){return new B(e)},e.CParser=B,e.CStream=j,e.createStream=function(e){return new j(e)},e.MAX_BUFFER_LENGTH=10485760,e.DEBUG="debug"===t.CDEBUG,e.INFO="debug"===t.CDEBUG||"info"===t.CDEBUG,e.EVENTS=["value","string","key","openobject","closeobject","openarray","closearray","error","end","ready"];var r,n={textNode:void 0,numberNode:""},i=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e})),o=0;for(var s in e.STATE={BEGIN:o++,VALUE:o++,OPEN_OBJECT:o++,CLOSE_OBJECT:o++,OPEN_ARRAY:o++,CLOSE_ARRAY:o++,TEXT_ESCAPE:o++,STRING:o++,BACKSLASH:o++,END:o++,OPEN_KEY:o++,CLOSE_KEY:o++,TRUE:o++,TRUE2:o++,TRUE3:o++,FALSE:o++,FALSE2:o++,FALSE3:o++,FALSE4:o++,NULL:o++,NULL2:o++,NULL3:o++,NUMBER_DECIMAL_POINT:o++,NUMBER_DIGIT:o++},e.STATE)e.STATE[e.STATE[s]]=s;o=e.STATE;const a=9,c=10,u=13,l=32,h=34,d=43,f=44,p=45,v=46,g=48,m=57,y=58,b=69,S=91,w=92,k=93,C=97,x=98,E=101,_=102,I=108,A=110,T=114,R=115,O=116,D=117,N=123,L=125;function P(e){for(var t in n)e[t]=n[t]}Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t});var M=/[\\"\n]/g;function B(t){if(!(this instanceof B))return new B(t);var r=this;P(r),r.bufferCheckPosition=e.MAX_BUFFER_LENGTH,r.q=r.c=r.p="",r.opt=t||{},r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.state=o.BEGIN,r.stack=new Array,r.position=r.column=0,r.line=1,r.slashed=!1,r.unicodeI=0,r.unicodeS=null,r.depth=0,G(r,"onready")}B.prototype={end:function(){V(this)},write:function(t){var r=this;if(this.error)throw this.error;if(r.closed)return F(r,"Cannot write after close. Assign an onready handler.");if(null===t)return V(r);var i=0,s=t.charCodeAt(0),a=r.p;e.DEBUG&&console.log("write -> ["+t+"]");for(;s&&(a=s,r.c=s=t.charCodeAt(i++),a!==s?r.p=a:a=r.p,s);)switch(e.DEBUG&&console.log(i,s,e.STATE[r.state]),r.position++,s===c?(r.line++,r.column=0):r.column++,r.state){case o.BEGIN:s===N?r.state=o.OPEN_OBJECT:s===S?r.state=o.OPEN_ARRAY:Y(s)||F(r,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(Y(s))continue;if(r.state===o.OPEN_KEY)r.stack.push(o.CLOSE_KEY);else{if(s===L){G(r,"onopenobject"),this.depth++,G(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}r.stack.push(o.CLOSE_OBJECT)}s===h?r.state=o.STRING:F(r,'Malformed object key should start with "');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(Y(s))continue;r.state,o.CLOSE_KEY,s===y?(r.state===o.CLOSE_OBJECT?(r.stack.push(o.CLOSE_OBJECT),U(r,"onopenobject"),this.depth++):U(r,"onkey"),r.state=o.VALUE):s===L?(H(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE):s===f?(r.state===o.CLOSE_OBJECT&&r.stack.push(o.CLOSE_OBJECT),U(r),r.state=o.OPEN_KEY):F(r,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(Y(s))continue;if(r.state===o.OPEN_ARRAY){if(G(r,"onopenarray"),this.depth++,r.state=o.VALUE,s===k){G(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}r.stack.push(o.CLOSE_ARRAY)}s===h?r.state=o.STRING:s===N?r.state=o.OPEN_OBJECT:s===S?r.state=o.OPEN_ARRAY:s===O?r.state=o.TRUE:s===_?r.state=o.FALSE:s===A?r.state=o.NULL:s===p?r.numberNode+="-":g<=s&&s<=m?(r.numberNode+=String.fromCharCode(s),r.state=o.NUMBER_DIGIT):F(r,"Bad value");continue;case o.CLOSE_ARRAY:if(s===f)r.stack.push(o.CLOSE_ARRAY),U(r,"onvalue"),r.state=o.VALUE;else if(s===k)H(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;else{if(Y(s))continue;F(r,"Bad array")}continue;case o.STRING:void 0===r.textNode&&(r.textNode="");var u=i-1,l=r.slashed,P=r.unicodeI;e:for(;;){for(e.DEBUG&&console.log(i,s,e.STATE[r.state],l);P>0;)if(r.unicodeS+=String.fromCharCode(s),s=t.charCodeAt(i++),r.position++,4===P?(r.textNode+=String.fromCharCode(parseInt(r.unicodeS,16)),P=0,u=i-1):P++,!s)break e;if(s===h&&!l){r.state=r.stack.pop()||o.VALUE,r.textNode+=t.substring(u,i-1),r.position+=i-1-u;break}if(s===w&&!l&&(l=!0,r.textNode+=t.substring(u,i-1),r.position+=i-1-u,s=t.charCodeAt(i++),r.position++,!s))break;if(l){if(l=!1,s===A?r.textNode+="\n":s===T?r.textNode+="\r":s===O?r.textNode+="\t":s===_?r.textNode+="\f":s===x?r.textNode+="\b":s===D?(P=1,r.unicodeS=""):r.textNode+=String.fromCharCode(s),s=t.charCodeAt(i++),r.position++,u=i-1,s)continue;break}M.lastIndex=i;var B=M.exec(t);if(null===B){i=t.length+1,r.textNode+=t.substring(u,i-1),r.position+=i-1-u;break}if(i=B.index+1,!(s=t.charCodeAt(B.index))){r.textNode+=t.substring(u,i-1),r.position+=i-1-u;break}}r.slashed=l,r.unicodeI=P;continue;case o.TRUE:s===T?r.state=o.TRUE2:F(r,"Invalid true started with t"+s);continue;case o.TRUE2:s===D?r.state=o.TRUE3:F(r,"Invalid true started with tr"+s);continue;case o.TRUE3:s===E?(G(r,"onvalue",!0),r.state=r.stack.pop()||o.VALUE):F(r,"Invalid true started with tru"+s);continue;case o.FALSE:s===C?r.state=o.FALSE2:F(r,"Invalid false started with f"+s);continue;case o.FALSE2:s===I?r.state=o.FALSE3:F(r,"Invalid false started with fa"+s);continue;case o.FALSE3:s===R?r.state=o.FALSE4:F(r,"Invalid false started with fal"+s);continue;case o.FALSE4:s===E?(G(r,"onvalue",!1),r.state=r.stack.pop()||o.VALUE):F(r,"Invalid false started with fals"+s);continue;case o.NULL:s===D?r.state=o.NULL2:F(r,"Invalid null started with n"+s);continue;case o.NULL2:s===I?r.state=o.NULL3:F(r,"Invalid null started with nu"+s);continue;case o.NULL3:s===I?(G(r,"onvalue",null),r.state=r.stack.pop()||o.VALUE):F(r,"Invalid null started with nul"+s);continue;case o.NUMBER_DECIMAL_POINT:s===v?(r.numberNode+=".",r.state=o.NUMBER_DIGIT):F(r,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:g<=s&&s<=m?r.numberNode+=String.fromCharCode(s):s===v?(-1!==r.numberNode.indexOf(".")&&F(r,"Invalid number has two dots"),r.numberNode+="."):s===E||s===b?(-1===r.numberNode.indexOf("e")&&-1===r.numberNode.indexOf("E")||F(r,"Invalid number has two exponential"),r.numberNode+="e"):s===d||s===p?(a!==E&&a!==b&&F(r,"Invalid symbol in number"),r.numberNode+=String.fromCharCode(s)):(K(r),i--,r.state=r.stack.pop()||o.VALUE);continue;default:F(r,"Unknown state: "+r.state)}r.position>=r.bufferCheckPosition&&function(t){var r=Math.max(e.MAX_BUFFER_LENGTH,10),i=0;for(var o in n){var s=void 0===t[o]?0:t[o].length;s>r&&("text"===o?closeText(t):F(t,"Max buffer length exceeded: "+o)),i=Math.max(i,s)}t.bufferCheckPosition=e.MAX_BUFFER_LENGTH-i+t.position}(r);return r},resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{r=Nn}catch(e){r=function(){}}function j(e){if(!(this instanceof j))return new j(e);this._parser=new B(e),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var t=this;r.apply(t),this._parser.onend=function(){t.emit("end")},this._parser.onerror=function(e){t.emit("error",e),t._parser.error=null},i.forEach((function(e){Object.defineProperty(t,"on"+e,{get:function(){return t._parser["on"+e]},set:function(r){if(!r)return t.removeAllListeners(e),t._parser["on"+e]=r,r;t.on(e,r)},enumerable:!0,configurable:!1})}))}function G(t,r,n){e.INFO&&console.log("-- emit",r,n),t[r]&&t[r](n)}function H(e,t,r){U(e),G(e,t,r)}function U(e,t){e.textNode=function(e,t){if(void 0===t)return t;e.trim&&(t=t.trim());e.normalize&&(t=t.replace(/\s+/g," "));return t}(e.opt,e.textNode),void 0!==e.textNode&&G(e,t||"onvalue",e.textNode),e.textNode=void 0}function K(e){e.numberNode&&G(e,"onvalue",parseFloat(e.numberNode)),e.numberNode=""}function F(e,t){return U(e),t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c,t=new Error(t),e.error=t,G(e,"onerror",t),e}function V(e){return e.state===o.VALUE&&0===e.depth||F(e,"Unexpected end"),U(e),e.c="",e.closed=!0,G(e,"onend"),B.call(e,e.opt),e}function Y(e){return e===u||e===c||e===l||e===a}j.prototype=Object.create(r.prototype,{constructor:{value:j}}),j.prototype.write=function(e){e=new Buffer(e);for(var t=0;t<e.length;t++){var r=e[t];if(this.bytes_remaining>0){for(var n=0;n<this.bytes_remaining;n++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+n]=e[n];this.string=this.temp_buffs[this.bytes_in_sequence].toString(),this.bytes_in_sequence=this.bytes_remaining=0,t=t+n-1,this._parser.write(this.string),this.emit("data",this.string)}else if(0===this.bytes_remaining&&r>=128){if(r>=194&&r<=223&&(this.bytes_in_sequence=2),r>=224&&r<=239&&(this.bytes_in_sequence=3),r>=240&&r<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+t>e.length){for(var i=0;i<=e.length-1-t;i++)this.temp_buffs[this.bytes_in_sequence][i]=e[t+i];return this.bytes_remaining=t+this.bytes_in_sequence-e.length,!0}this.string=e.slice(t,t+this.bytes_in_sequence).toString(),t=t+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string)}else{for(var o=t;o<e.length&&!(e[o]>=128);o++);this.string=e.slice(t,o).toString(),this._parser.write(this.string),this.emit("data",this.string),t=o-1}}},j.prototype.end=function(e){return e&&e.length&&this._parser.write(e.toString()),this._parser.end(),!0},j.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),r.prototype.on.call(n,e,t)},j.prototype.destroy=function(){P(this._parser),this.emit("close")}}(t)}));function Pn(e){var t=0,r=function(e){var t,r,n,i=Ln.parser(),o=0,s=[],a=!1,c=!1;return i.onopenobject=function(i){var a={incomplete:!0};t||(t=a),r&&(s.push([n,r,c]),e&&(c?r.push(a):r[n]=a)),r=a,n=i,c=!1,++o},i.onkey=function(e){return n=e},i.onvalue=function(e){return c?r.push(e):r[n]=e},i.oncloseobject=function(){var t;if(delete r.incomplete,n=null,0==--o)a=!0;else{var i=r;t=s.pop(),n=t[0],r=t[1],c=t[2],e||(c?r.push(i):r[n]=i)}},i.onopenarray=function(){var i=[];i.incomplete=!0,t||(t=i),r&&(s.push([n,r,c]),e&&(c?r.push(i):r[n]=i)),r=i,c=!0,n=null,++o},i.onclosearray=function(){var t;if(delete r.incomplete,n=null,0==--o)a=!0;else{var i=r;t=s.pop(),n=t[0],r=t[1],c=t[2],e||(c?r.push(i):r[n]=i)}},{write:function(e){return i.write(e),t},done:function(){return a}}}(!0),n={pullAsync:function(i){return hn(this,void 0,void 0,(function(){var o,s,a;return dn(this,(function(c){switch(c.label){case 0:return o=e.slice(t,t+i),t+=i,[4,pn(o,"text")];case 1:return s=c.sent(),a=r.write(s),n.result=a||{},[2,a]}}))}))},pullSync:function(i){var o=e.slice(t,t+i);t+=i;var s=vn(o,"text"),a=r.write(s);return n.result=a||{},a},done:function(){return r.done()},eof:function(){return t>=e.size},result:{}};return n}function Mn(e,t,r){return hn(this,void 0,void 0,(function(){function n(){return hn(this,void 0,void 0,(function(){var t,n,s,h;return dn(this,(function(d){switch(d.label){case 0:t=function(t){var n,i,o,s,a,h,d,f,p,v,g,m;return dn(this,(function(y){switch(y.label){case 0:if(!t.rows)return[2,"break"];if(!t.rows.incomplete&&0===t.rows.length)return[2,"continue"];if(u&&Zr.ignoreTransaction((function(){return u(l)})),n=t.tableName,i=e.table(n),o=c.tables.filter((function(e){return e.name===n}))[0].schema,!i){if(r.acceptMissingTables)return[2,"continue"];throw new Error("Exported table ".concat(t.tableName," is missing in installed database"))}if(!r.acceptChangedPrimaryKey&&o.split(",")[0]!=i.schema.primKey.src)throw new Error("Primary key differs for table ".concat(t.tableName,". "));for(s=t.rows,a=[],h=0;h<s.length&&!(d=s[h]).incomplete;h++)a.push(An.revive(d));return f=r.filter,p=f?t.inbound?a.filter((function(e){return f(n,e)})):a.filter((function(e){var t=e[0],r=e[1];return f(n,r,t)})):a,v=t.inbound?[void 0,p]:[p.map((function(e){return e[0]})),a.map((function(e){return e[1]}))],g=v[0],m=v[1],r.overwriteValues?[4,i.bulkPut(m,g)]:[3,2];case 1:return y.sent(),[3,4];case 2:return[4,i.bulkAdd(m,g)];case 3:y.sent(),y.label=4;case 4:return l.completedRows+=a.length,a.incomplete||(l.completedTables+=1),s.splice(0,a.length),[2]}}))},n=0,s=c.data,d.label=1;case 1:return n<s.length?(h=s[n],[5,t(h)]):[3,4];case 2:if("break"===d.sent())return[3,4];d.label=3;case 3:return n++,[3,1];case 4:for(;c.data.length>0&&c.data[0].rows&&!c.data[0].rows.incomplete;)c.data.splice(0,1);return o.done()||o.eof()?[3,8]:a?(o.pullSync(i),[3,7]):[3,5];case 5:return[4,Zr.waitFor(o.pullAsync(i))];case 6:d.sent(),d.label=7;case 7:return[3,9];case 8:return[3,10];case 9:return[3,0];case 10:return[2]}}))}))}var i,o,s,a,c,u,l,h,d;return dn(this,(function(f){switch(f.label){case 0:return i=(r=r||{}).chunkSizeBytes||1048576,[4,Bn(t,i)];case 1:if(o=f.sent(),s=o.result,a="FileReaderSync"in self,c=s.data,!r.acceptNameDiff&&e.name!==c.databaseName)throw new Error("Name differs. Current database name is ".concat(e.name," but export is ").concat(c.databaseName));if(!r.acceptVersionDiff&&e.verno!==c.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(e.verno," but export is ").concat(c.databaseVersion));if(u=r.progressCallback,l={done:!1,completedRows:0,completedTables:0,totalRows:c.tables.reduce((function(e,t){return e+t.rowCount}),0),totalTables:c.tables.length},u&&Zr.ignoreTransaction((function(){return u(l)})),!r.clearTablesBeforeImport)return[3,5];h=0,d=e.tables,f.label=2;case 2:return h<d.length?[4,d[h].clear()]:[3,5];case 3:f.sent(),f.label=4;case 4:return h++,[3,2];case 5:return r.noTransaction?[4,n()]:[3,7];case 6:return f.sent(),[3,9];case 7:return[4,e.transaction("rw",e.tables,n)];case 8:f.sent(),f.label=9;case 9:return l.done=!0,u&&Zr.ignoreTransaction((function(){return u(l)})),[2]}}))}))}function Bn(e,t){return hn(this,void 0,void 0,(function(){var r,n;return dn(this,(function(i){switch(i.label){case 0:r="slice"in e?Pn(e):e,i.label=1;case 1:return r.eof()?[3,3]:[4,r.pullAsync(t)];case 2:return i.sent(),r.result.data&&r.result.data.data?[3,3]:[3,1];case 3:if(!(n=r.result)||"dexie"!=n.formatName)throw new Error("Given file is not a dexie export");if(n.formatVersion>1)throw new Error("Format version ".concat(n.formatVersion," not supported"));if(!n.data)throw new Error("No data in export file");if(!n.data.databaseName)throw new Error("Missing databaseName in export file");if(!n.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!n.data.tables)throw new Error("Missing tables in export file");return[2,r]}}))}))}Zr.prototype.export=function(e){return Dn(this,e)},Zr.prototype.import=function(e,t){return Mn(this,e,t)},Zr.import=function(e,t){return function(e,t){return hn(this,void 0,void 0,(function(){var r,n,i,o;return dn(this,(function(s){switch(s.label){case 0:return r=(t=t||{}).chunkSizeBytes||1048576,[4,Bn(e,r)];case 1:return n=s.sent(),i=n.result.data,(o=new Zr(i.databaseName)).version(i.databaseVersion).stores(function(e){for(var t={},r=0,n=e.tables;r<n.length;r++){var i=n[r];t[i.name]=i.schema}return t}(i)),[4,Mn(o,n,t)];case 2:return s.sent(),[2,o]}}))}))}(e,t)};var jn=r(3729),Gn=r.n(jn),Hn=r(5733),Un=r.n(Hn);var Kn={0:"XYSDK:950102",2001:"XYSDK:950104",4104:"XYSDK:950104",4103:"XYSDK:950143",2040:"XYSDK:950141",2009:"XYSDK:950142",10004010:"XYSDK:950144",10002e3:"XYSDK:950144"},Fn={en_US:{"XYSDK:950010":"Custom message length limit, please check","XYSDK:950120":"success","XYSDK:950112":"WebSocket connecting time out","XYSDK:950113":"WebSocket connecting is stopped,reconnecting now...","XYSDK:950114":"WebSocket connecting is stopped","XYSDK:950115":"WebSocket connecting error","XYSDK:950116":"The browser don't support Websocket, please use Chrome","XYSDK:950201":"The client has finished calling and it is forbidden to join the meeting","XYSDK:950202":"Peer need to be created before operation","XYSDK:950203":"Stream need to be created before operation","XYSDK:950223":"Failed to start or stop Audio&Video","XYSDK:950224":"No Mic permission","XYSDK:950225":"No camera permission","XYSDK:950230":"Hang up the meeting","XYSDK:950102":"Login failed","XYSDK:950101":"Wrong parameter","XYSDK:950103":"Failed to get user information","XYSDK:950104":"Incorrect account or password","XYSDK:950141":"The password has expired. Please change the password and log in again","XYSDK:950142":'The mobile number conflicts. Please use the mode of "+country code-mobile number"',"XYSDK:950143":"Your password inputting exceeds 5 times within 30 minutes, the account will be locked for 30 minutes","XYSDK:950144":"Login has expired, please log in again","XYSDK:950601":"Custom layout mode does not support switching layouts","XYSDK:950602":"Custom layout mode does not support requesting stream when full screen","XYSDK:950603":"Custom layout mode does not support paging","XYSDK:950105":"Invalid meeting ID","XYSDK:950106":"Failed to call the number , please try again later","XYSDK:950107":"Require meeting password","XYSDK:950108":"Wrong meeting password","XYSDK:950109":"The meeting ID is not supported","XYSDK:950110":"Failed to join meeting","XYSDK:950130":"The protocol must be HTTPS, or the host name must be Localhost","XYSDK:950111":"Interface request failed","XYSDK:950204":"Failed to create a Client","XYSDK:950517":"Call failed","XYSDK:950518":"Successful call","XYSDK:950519":"Calling, please wait","XYSDK:950530":"Failed to request a full screen stream","XYSDK:950401":"No camera or Mic device","XYSDK:950402":"Can't access camera or Mic device","XYSDK:950403":"Constraint setting cannot be satisfied","XYSDK:950404":"Mic or camera access denied","XYSDK:950405":"The collection flow constraint is null","XYSDK:950406":"Failed to create media stream","XYSDK:950407":"Failed to switch speakers","XYSDK:950501":"The user cancels the screen share","XYSDK:950502":"Operation abnormal,and can't get the screen","XYSDK:950503":"Failed to get the screen","XYSDK:950504":"No video source is available for capture","XYSDK:950505":"Screen sharing failed. Please re-grant screen recording permissions and restart your browser","XYSDK:950506":"Capture screen-Constraint setting failed","XYSDK:950507":"Capture screen-An impermissible constraint setting is specified","XYSDK:950508":"Screen sharing failed. Please re-grant screen recording permissions and restart your browser","XYSDK:950509":"Already sharing screen","XYSDK:950510":"Not selected SourceId","XYSDK:950511":"Operation abnormal,and can't get the screen","XYSDK:950512":"Failed to share content","XYSDK:950513":"Failed to end sharing","XYSDK:950515":"Failed to get the codec format supported by the sender","XYSDK:950408":"Failed to obtain device permissions","XYSDK:950409":"Failed to get device list","XYSDK:950410":"Failed to switch media input device","XYSDK:950514":"No local media streaming","XYSDK:950210":"Failed to switch debug mode","XYSDK:950312":"Failed to start the tour","XYSDK:950205":"Stream is not created","XYSDK:950206":"Stream is created successfully","XYSDK:950207":"DomStream is created successfully","XYSDK:950208":"Failed to create Stream","XYSDK:950209":"Client is not created","XYSDK:950301":"The meeting did not start","XYSDK:953901":"Recording parameter error","XYSDK:953902":"No recording permission","XYSDK:953903":"The cloud conference room does not belong to any enterprise and cannot be recorded","XYSDK:953904":"Insufficient recording space","XYSDK:953905":"Recording did not start"},zh_CN:{"XYSDK:950010":"自定义消息长度超过限制,请检查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket连接超时","XYSDK:950113":"WebSocket连接已关闭,正在重连...","XYSDK:950114":"WebSocket连接已关闭","XYSDK:950115":"WebSocket连接错误","XYSDK:950116":"当前浏览器不支持Websocket,请使用Chrome浏览器","XYSDK:950201":"Client已关闭,禁止加入会议","XYSDK:950202":"需要创建Peer才可操作","XYSDK:950203":"需要创建Stream才可操作","XYSDK:950223":"音视频开启关闭操作失败","XYSDK:950224":"没有麦克风权限","XYSDK:950225":"没有摄像头权限","XYSDK:950230":"挂断会议","XYSDK:950102":"登录失败","XYSDK:950101":"参数有误,请检查","XYSDK:950103":"获取用户信息失败","XYSDK:950104":"账号或密码错误","XYSDK:950141":"该账号密码已过期,请修改密码后重新登录","XYSDK:950142":'登录手机号冲突,请使用"+国家码-手机号"的模式输入',"XYSDK:950143":"您登录失败过于频繁,请30分钟后重试","XYSDK:950144":"登录已失效,请重新登录","XYSDK:950601":"自定义布局模式不支持切换布局","XYSDK:950602":"自定义布局模式不支持全屏请流","XYSDK:950603":"自定义布局模式不支持分页","XYSDK:950105":"无效的会议号","XYSDK:950106":"呼叫失败,请稍后重试","XYSDK:950107":"需要入会密码","XYSDK:950108":"入会密码错误","XYSDK:950109":"暂不支持呼叫此号码","XYSDK:950110":"免密入会失败","XYSDK:950130":"协议必须是 https,或者主机名必须是 localhost","XYSDK:950111":"接口请求失败","XYSDK:950204":"Client创建失败","XYSDK:950517":"呼叫失败","XYSDK:950518":"呼叫成功","XYSDK:950519":"正在呼叫中,请等候","XYSDK:950530":"全屏请流失败","XYSDK:950401":"缺失摄像头或麦克风设备","XYSDK:950402":"摄像头或麦克风设备无法访问","XYSDK:950403":"约束设置无法被满足","XYSDK:950404":"麦克风或摄像头使用权限被拒绝","XYSDK:950405":"采集流约束设置为空","XYSDK:950406":"创建媒体流失败","XYSDK:950407":"切换扬声器失败","XYSDK:950501":"用户取消采集屏幕操作","XYSDK:950502":"操作异常采集屏幕失败","XYSDK:950503":"采集屏幕失败","XYSDK:950504":"没有屏幕视频源可用于捕获","XYSDK:950505":"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器","XYSDK:950506":"采集屏幕-约束设置失败","XYSDK:950507":"采集屏幕-指定了不允许的约束设置\t","XYSDK:950508":"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器","XYSDK:950509":"已经在分享屏幕","XYSDK:950510":"没有 selectedSourceId\t","XYSDK:950511":"操作异常采集屏幕失败","XYSDK:950512":"分享content失败","XYSDK:950513":"结束分享失败\t","XYSDK:950515":"获取发送端支持的编解码格式 失败\t","XYSDK:950408":"获取设备权限失败","XYSDK:950409":"获取设备列表失败","XYSDK:950410":"切换媒体输入设备失败","XYSDK:950514":"本地无媒体流","XYSDK:950312":"开启巡课失败","XYSDK:950205":"Stream对象未创建","XYSDK:950206":"Stream创建成功","XYSDK:950207":"domStream创建成功","XYSDK:950208":"Stream创建失败","XYSDK:950209":"Client对象未创建","XYSDK:950210":"切换调试模式失败","XYSDK:950301":"会议未开始","XYSDK:953901":"录制参数错误","XYSDK:953902":"没有录制权限","XYSDK:953903":"云会议室不属于任何企业,无法录制","XYSDK:953904":"录制空间不足","XYSDK:953905":"录制未开始"},zh_TW:{"XYSDK:950010":"自定義消息長度超過限製,請檢查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket連接超時","XYSDK:950113":"WebSocket連接已關閉,正在重連...","XYSDK:950114":"WebSocket連接已關閉","XYSDK:950115":"WebSocket連接錯誤","XYSDK:950116":"當前瀏覽器不支持Websocket,請使用Chrome瀏覽器","XYSDK:950201":"Client已關閉,禁止加入會議","XYSDK:950202":"需要創建Peer才可操作","XYSDK:950203":"需要創建Stream才可操作","XYSDK:950223":"音視頻開啟關閉操作失敗","XYSDK:950224":"沒有麥克風權限","XYSDK:950225":"沒有攝像頭權限","XYSDK:950230":"掛斷會議","XYSDK:950102":"登錄失敗","XYSDK:950101":"參數有誤,請檢查","XYSDK:950103":"獲取用戶信息失敗","XYSDK:950104":"賬號或密碼錯誤","XYSDK:950141":"該賬號密碼已過期,請修改密碼後重新登錄","XYSDK:950142":'登錄手機號衝突,請使用"+國家碼-手機號"的模式輸入',"XYSDK:950143":"您登錄失敗過於頻繁,請30分鐘後重試","XYSDK:950144":"登錄已失效,請重新登錄","XYSDK:950601":"自定義佈局模式不支持切換佈局","XYSDK:950602":"自定義佈局模式不支持全屏請流","XYSDK:950603":"自定義佈局模式不支持分頁","XYSDK:950105":"無效的會議號","XYSDK:950106":"呼叫失敗,請稍後重試","XYSDK:950107":"需要入會密碼","XYSDK:950108":"入會密碼錯誤","XYSDK:950109":"暫不支持呼叫此號碼","XYSDK:950110":"免密入會失敗","XYSDK:950130":"協議必須是 https,或者主機名必須是 localhost","XYSDK:950111":"接口請求失敗","XYSDK:950204":"Client創建失敗","XYSDK:950517":"呼叫失敗","XYSDK:950518":"呼叫成功","XYSDK:950519":"正在呼叫中,請等候","XYSDK:950530":"全屏請流失敗","XYSDK:950401":"缺失攝像頭或麥克風設備","XYSDK:950402":"攝像頭或麥克風設備無法訪問","XYSDK:950403":"約束設置無法被滿足","XYSDK:950404":"麥克風或攝像頭使用權限被拒絕","XYSDK:950405":"採集流約束設置為空","XYSDK:950406":"創建媒體流失敗","XYSDK:950407":"切換揚聲器失敗","XYSDK:950501":"用戶取消採集屏幕操作","XYSDK:950502":"操作異常採集屏幕失敗","XYSDK:950503":"採集屏幕失敗","XYSDK:950504":"沒有屏幕視頻源可用於捕獲","XYSDK:950505":"屏幕分享失敗,請在系統設置中重新授權屏幕錄製權限,並重啟瀏覽器","XYSDK:950506":"採集屏幕-約束設置失敗","XYSDK:950507":"採集屏幕-指定了不允許的約束設置\t","XYSDK:950508":"屏幕分享失敗,請在系統設置中重新授權屏幕錄製權限,並重啟瀏覽器","XYSDK:950509":"已經在分享屏幕","XYSDK:950510":"沒有 selectedSourceId\t","XYSDK:950511":"操作異常採集屏幕失敗","XYSDK:950512":"分享content失敗","XYSDK:950513":"結束分享失敗\t","XYSDK:950515":"獲取發送端支持的編解碼格式 失敗\t","XYSDK:950408":"獲取設備權限失敗","XYSDK:950409":"獲取設備列表失敗","XYSDK:950410":"切換媒體輸入設備失敗","XYSDK:950514":"本地無媒體流","XYSDK:950210":"切換調試模式失敗","XYSDK:950312":"開啟巡課失敗","XYSDK:950205":"Stream對象未創建","XYSDK:950206":"Stream創建成功","XYSDK:950207":"domStream創建成功","XYSDK:950208":"Stream創建失敗","XYSDK:950209":"Client對象未創建","XYSDK:950301":"會議未開始","XYSDK:953901":"錄製參數錯誤","XYSDK:953902":"沒有錄製權限","XYSDK:953903":"雲會議室不屬於任何企業,無法錄製","XYSDK:953904":"錄製空間不足","XYSDK:953905":"錄製未開始"}},Vn={version:"3.6.00",zh_CN:{"CHARGE:646":"云会议室已达企业允许呼入的上限","CHARGE:647":"终端已达允许呼入的上限","CHARGE:644":"没有呼叫权限","CHARGE:645":"云会议室已达允许呼入的上限","CHARGE:648":"终端已达企业允许呼入的上限","CHARGE:649":"预约会议未到开始时间,无法加入","PS:400":"不支持跨云呼叫","SIG:421":"对方终端不允许外人拨打,请与对方确认后再拨","SIG:422":"您已被主持人移出会议","SIG:420":"号码不正确","SIG:789":"录制已停止","SIG:423":"UNKNOWN","SIG:424":"主持人已结束会议","CHARGE:642":"呼叫失败,企业IPPBX方数已达上限","CHARGE:643":"调度失败,企业监控调度方数已达上限\t","CHARGE:640":"所属部门的云会议室存储空间已满,不能再发起录制","CHARGE:641":"所属企业的云会议室存储空间已满,不能再发起录制","CHARGE:635":"账户余额不足,不能发起PSTN通话,请联系管理员充值后再尝试。","CHARGE:636":"云会议室已达允许呼入的上限","CHARGE:633":"无法呼叫当前号码,您的终端仅允许呼叫通讯录上的用户号码","CHARGE:634":"账户余额支付范围不可用于PSTN通话,请联系管理员开启后再尝试。","CHARGE:639":"云会议室存储空间已满,不能再发起录制","CHARGE:637":"云会议室已达部门允许呼入的上限","CHARGE:638":"云会议室已达企业允许呼入的上限","SIG:419":"对方已开启办公模式。您可滑动下方按钮,发起呼叫","SIG:416":"当前在线呼叫数已达服务上限,请稍候再试","SIG:417":"密码输入超时","SIG:410":"呼叫失败,请再试一次","SIG:4445":"云会议室存储空间已满,不能再发起录制","SIG:411":"终端APP版本过低,请升级后再试","SIG:4446":"所属部门的云会议室存储空间已满,不能再发起录制","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":"密码错误次数达到3次,请稍后重试","SIG:4449":"无效的分享content类型","SIG:415":"同步呼叫信息失败,请稍后再试","SIG:412":"对方版本过低,通话无法接通","SIG:4447":"所属企业的云会议室存储空间已满,不能再发起录制","SIG:413":"对方设置了免打扰","SIG:4448":"未知错误","SIG:4441":"录制超时,请稍后再试","CHARGE:631":"此云会议室为按参会时长计费的会议室。您的账户余额已用尽,不能在此云会议室发起会议,请联系管理员充值或选择其他云会议室。","SIG:4442":"UNKNOWN","CHARGE:632":"主动呼叫权限已被管理员关闭,无法发起呼叫","SIG:4440":"分享content超时,请稍后再试","CHARGE:630":"当前云会议室不允许邀请通讯录外成员","CHARGE:624":"呼叫失败。您呼叫的终端端口使用服务已过期","CHARGE:625":"此会议有终端端口服务已过期,无法支持多方呼叫","CHARGE:622":"没有监看权限","REC:511":"录制服务暂时不可用,请稍后再试","CHARGE:623":"呼叫失败。终端端口使用服务已过期,不能加入云会议室或多方通话。","REC:512":"录制服务暂时不可用,请稍后再试","CHARGE:628":"您呼叫的云会议室不允许匿名用户呼入,请登录或注册后重新呼叫","CHARGE:629":"对方正在会议中,且该会议不允许通讯录外成员呼入,请稍后再试","CHARGE:626":"此会议有终端端口服务已过期,无法邀请更多人加入","CHARGE:627":"呼叫的云会议室不允许通讯录外成员呼入,请联系云会议室管理员","SIG:1503":"分配监控资源失败","SIG:4456":"连接已断开,请重新入会","SIG:4457":"号码输入有误,请核对后重新拨打!","SIG:441":"当前在线呼叫数已达网关服务上限,请稍候重试","SIG:4454":"通话不存在,请核对后重试","SIG:4455":"服务器未连接,请稍后重试","SIG:445":"UNKNOWN","SIG:1501":"shuttle获取MA失败","SIG:4458":"网络异常,呼叫已断开","SIG:1502":"shuttle获取媒体资源失败","SIG:4459":"号码输入有误,请核对后重新拨打!","SIG:4452":"录制失败","CHARGE:620":"无单位归属,不能呼叫H.323设备\t","SIG:440":"云会议室密码不正确,请重试","SIG:4453":"通话已存在,请稍后再试","CHARGE:621":"呼叫失败,单位H.323方数不足","SIG:4450":"不支持分享content","SIG:4451":"带宽不足,分享内容失败","CHARGE:613":"UNKNOWN","CHARGE:614":"UNKNOWN","REC:400":"信令服务与录制服务内部错误。","CHARGE:611":"UNKNOWN","REC:401":"录制服务暂时不可用,请稍后再试","CHARGE:612":"UNKNOWN","REC:402":"录制服务暂时不可用,请稍后再试","CHARGE:617":"UNKNOWN","REC:403":"录制服务暂时不可用,请稍后再试","CHARGE:618":"UNKNOWN","REC:404":"录制不存在","CHARGE:615":"UNKNOWN","REC:405":"录制服务暂时不可用,请稍后再试","CHARGE:616":"会议已被锁定,无法加入,请联系会议发起人解锁后进入。","CHARGE:619":"呼叫失败。终端的云服务端口已过期,请联系管理员续费购买。","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content发送时会议尚未开始","SIG:431":"Content Server创建资源失败INVALID_PASSWORD","SIG:4466":"输入密码超时","REC:406":"录制服务暂时不可用,请稍后再试","SIG:4460":"号码输入有误,请核对后重新拨打!","CHARGE:610":"呼叫失败,您的企业已禁止PSTN通话功能,请联系您的管理员!","SIG:4461":"号码输入有误,请核对后重新拨打!","SIG:1404":"UNKNOWN","SIG:469":"录制正在进行,请勿重复发起录制","CHARGE:441":"当前在线呼叫数已达网关服务上限,请稍候重试","SIG:461":"录制时,本地空间即将耗尽","SIG:462":"录制时,本地空间已耗尽","SIG:580":"pstn呼叫时,第三方服务器报错","REC:465":"本地已开启录制,不能重复发起录制","REC:466":"录制服务暂时不可用,请稍后再试","REC:467":"已达最大录制方数,不能发起录制","REC:468":"录制的存储空间已满,您无法开始录制。\n请删除已有的录制视频,\n或联系管理员购买更多存储空间","REC:469":"UNKNOWN","REC:460":"没有录制权限","REC:463":"录制的存储空间已满,您无法开始录制。\n请删除已有的录制视频,\n或联系管理员购买更多存储空间","SIG:456":"呼叫失败,请再试一次","CHARGE:671":"会议未开始,请等待主持人开始会议后加入","CHARGE:672":"已被移出本次会议,无法入会","CHARGE:670":"您有一场会议正在进行,请先结束该会议","SIG:450":"您的终端目前无法支持此类呼叫","CHARGE:675":"没有可用的视频监控资源","CHARGE:676":"视频监控服务并发超过限制","CHARGE:673":"监控服务已经过期","CCC:501":"数据库操作失败","CHARGE:674":"视频监控服务没有企业归属","CCC:500":"内部服务器错误","CHARGE:668":"会议未通过审批或未到预约开始时间","CCC:602":"输入超时","CHARGE:669":"管理员禁用点对点呼叫","CCC:601":"呼叫超时","CHARGE:666":"超过会议审批允许的最大成员数量,入会失败","CCC:604":"入会超时","CHARGE:667":"超过会议审批允许的最大成员数量,邀请失败","CCC:603":"评价结束","SIG:487":"呼叫已取消","SIG:488":"终端试用期已过,无法继续为您服务了","SIG:485":"已达最大呼叫时长,呼叫已断开","SIG:486":"对方忙,请稍后再试","CHARGE:660":"对方企业账户余额不足,不能发起SDK呼叫","SIG:480":"呼叫失败,请再试一次","CHARGE:661":"对方企业账户尚未开通小程序SDK呼叫服务","SIG:483":"拨打不支持国家的pstn号码","CHARGE:664":"PSTN呼叫已达部门允许呼入的上限","SIG:484":"电话时长已用尽,无法转呼手机号,请联系IT管理员及时充值","CHARGE:665":"服务已过期,请管理员更新服务许可证","CHARGE:420":"号码不正确","CHARGE:662":"对方企业账户余额不足,不能发起小程序SDK呼叫","SIG:482":"邀请失败,请重试","CHARGE:415":"服务已过期,请管理员更新服务许可证","CHARGE:657":"企业账户余额不足,不能发起小程序SDK呼叫","CHARGE:416":"当前在线呼叫数已达服务上限,请稍候再试","CHARGE:658":"web客户端达到企业的呼叫方数限制","CHARGE:655":"企业账户余额不足,不能发起SDK呼叫","CHARGE:414":"H.323接入服务已过期","CHARGE:656":"企业账户尚未开通小程序SDK呼叫服务","CHARGE:659":"对方企业账户尚未开通SDK呼叫服务","STATE:200":"成功","SIG:598":"呼叫失败,请再试一次","SIG:599":"信令消息格式无效","SIG:479":"共享内容路数已达上限,无法发起更多的共享。请等待其他参会者停止共享后再重试","CHARGE:650":"h.323方数已达云会议室允许呼入的上限","CHARGE:653":"会议不支持更多小程序入会,请使用App入会或联系会议管理员","CHARGE:654":"企业账户尚未开通SDK呼叫服务","CHARGE:651":"h.323方数已达部门允许呼入的上限","CCC:600":"用户已被其他座席服务","CHARGE:652":"预约会议已经过期,无法主动加入","SIG:704":"呼叫失败,请再试一次","SIG:703":"呼叫失败,请再试一次","SIG:708":"没有白板分享权限","SIG:709":"不能合并会议","SIG:706":"没有内容标注权限","SIG:707":"没有双流分享权限","CHARGE:481":"对方不允许陌生人呼叫","CCC:415":"坐席名称已存在","CCC:414":"坐席不存在","CCC:417":"IVR配置已存在","CCC:416":"无效的坐席ID","CCC:419":"无效的IVR配置ID","CCC:418":"IVR配置不存在","SIG:498":"当前网络UDP被禁用,无法通话,请联系网络管理员或切换其他网络","SIG:499":"网络异常,呼叫已断开","SIG:496":"媒体超时","SIG:497":"信令超时","SIG:490":"无应答","CHARGE:473":"当前通话人数已满。如需更多人通话,请使用云会议室。","SIG:491":"","CHARGE:474":"当前会议人数已满。请加入通讯录,\n购买更多会议端口,详情请咨询本地经销商。","CHARGE:471":"当前通话人数已满。请使用终端或云会议室召开多方视频会议。","CCC:420":"特服号无效,请重新输入","CHARGE:472":"呼叫无法接通,终端在家最多支持4方通话。","CHARGE:477":"您呼叫的会议已达到最大支持人数,请联系管理员购买或使用超大型会议室。","CHARGE:478":"您的服务可用分钟数不足,无法呼叫。","CCC:421":"号码不存在","CHARGE:475":"当前会议人数已满,请联系管理员%s%s,\n及时为帐户充值,或购买更多会议端口。","CHARGE:476":"您呼叫的会议已达到最大支持人数,请联系管理员购买或使用超大型会议室。","CCC:404":"特服号暂时不可用,请稍后再试","CCC:403":"特服号暂时不可用,请稍后再试","CCC:406":"参数非法","REC:478":"录制中断,网络连接中,请重新发起录制","CHARGE:469":"服务资源使用已达最大值,请稍后重试!","CCC:405":"特服号暂时不可用,请稍后再试","REC:479":"录制中断,服务重启中,请重新发起录制","CCC:408":"企业不存在","CCC:407":"企业已存在","CCC:409":"无效的企业ID","SIG:726":"该号码异常已被限制使用","SIG:727":"呼叫失败,请再试一次","SIG:724":"您已被强制邀请加入新的会议","SIG:725":"呼叫失败,请再试一次","REC:470":"无可用录制服务器,请稍后再试","SIG:722":"设备与配对终端连接断开","SIG:723":"设备与指挥调度服务连接断开","SIG:720":"请稍等,主持人稍后邀请您入会","SIG:721":"会议还未开始,请等待主持人入会","CCC:411":"特服号不存在","CHARGE:467":"已达最大录制方数,不能发起录制","CCC:410":"特服号已存在","CHARGE:464":"录制失败,尚未开通录制服务或服务已过期,请联系管理员购买。","CCC:413":"坐席已存在","CCC:412":"无效的特服号","CHARGE:459":"帐户余额不足,无法支持此呼叫。\n请联系管理员%s%s,及时为帐户充值。","CHARGE:457":"终端电话可用分钟数不足,请充值;或联系管理员,加入通讯录。","CHARGE:458":"暂不支持呼叫国际电话。请联系管理员加入通讯录;或咨询本地经销商,为您的单位开通后台管理帐户。","SIG:716":"网络异常,呼叫已断开","SIG:713":"Content Server创建资源失败","REC:480":"录制失败,因为该会议室已启用单路录制","SIG:714":"Failed to allocated resources for content sharing.","REC:481":"录制中断,网络连接中,请重新发起录制","SIG:719":"呼叫失败,请再试一次","SIG:717":"会议室已超出最高通话时长限制,转为语音通话模式,可联系管理员处理","SIG:718":"语音模式限制已解除","SIG:711":"内容发送时会议尚未开始","SIG:712":"内容发送时会议尚未开始","CHARGE:451":"系统不支持此类型呼叫","CHARGE:452":"您的云会议室不支持邀请电话入会,\n请联系管理员加入通讯录;\n或咨询本地经销商,为您的开通帐户。","CHARGE:450":"您的终端目前无法支持此类呼叫","CHARGE:455":"暂不支持呼叫国际电话号码。","CCC:400":"特服号暂时不可用,请稍后再试","CHARGE:453":"帐户余额不足,无法支持此呼叫。\n请联系管理员%s%s,及时为帐户充值。","CCC:402":"特服号暂时不可用,请稍后再试","CHARGE:454":"终端电话可用分钟数不足,无法呼叫","CCC:401":"特服号暂时不可用,请稍后再试","CHARGE:602":"当前通话人数已达上限,您无法加入。","CHARGE:603":"您呼叫的会议已达最大支持人数。\n设备加入通讯录,可支持更多方会议。\n如需更多支持请呼叫客服终端号’288288’咨询。","CHARGE:721":"不允许互联网链路呼入","CHARGE:601":"会议容量使用现在达到上限,\n无法加入会议。请联系管理员%s%s购买更多会议端口。","CHARGE:606":"当前会议人数已超限,30分钟后将自动结束。\n请加入通讯录,可支持更多方会议。","CHARGE:607":"您的服务可用分钟数不足,无法呼叫。","CHARGE:604":"终端在家仅支持4方通话,当前通话人数已超限,30分钟后将自动结束。","CHARGE:605":"UNKNOWN","SIG:506":"录制服务器内部错误","SIG:504":"呼叫失败,请再试一次","CHARGE:608":"您呼叫的会议已达最大支持人数,请联系IT管理员","SIG:505":"呼叫失败,请再试一次","CHARGE:609":"您呼叫的会议已达最大支持人数,请联系IT管理员,购买超大型云会议室。","SIG:502":"呼叫失败,请再试一次","SIG:4999":"分享内容失败","SIG:503":"呼叫失败,请再试一次","CHARGE:720":"该账号已使用\t","CHARGE:712":"该云会议室已被设置为禁止被监看","CHARGE:713":"该终端正在参会的云会议室被设置为禁止被监看","CHARGE:710":"不支持pstn呼叫","CHARGE:711":"呼叫失败,您的企业已禁止PSTN通话功能,请联系您的管理员!","CHARGE:716":"当前用户不允许参会","CHARGE:717":"当前用户无权限入会","REC:503":"录制服务暂时不可用,请稍后再试","CHARGE:714":"监看权限校验超时,请重试","CHARGE:715":"该号码异常已被限制使用","CHARGE:718":"对方终端不允许拨打","CHARGE:719":"该账号已登录其它终端入会","SURV:580":"监控调度呼叫时,第三方服务报错","REC:505":"录制服务暂时不可用,请稍后再试","REC:506":"直播服务暂时不可用,请稍后再试","REC:507":"录制服务暂时不可用,请稍后再试","REC:509":"录制服务暂时不可用,请稍后再试","CHARGE:701":"企业账户余额不足,无法开启录制。请联系管理员充值后再尝试","CHARGE:702":"个人云会议室不可以用,请选择其他会议室或联系管理员","CHARGE:700":"企业账户未开通多路录制计费服务,无法开启录制。请联系客户咨询开通事宜","CHARGE:705":"H323融合服务器容量不足","CHARGE:706":"云会议室已达允许呼入的上限","CHARGE:703":"呼叫所用的H323集群容量不足","CHARGE:704":"H323融合服务器容量不足","SIG:408":"对方没应答,请稍后再试","SIG:405":"对方设备不在线,请稍后重试","CHARGE:707":"云会议室存储空间已满,不能再发起录制","SIG:409":"建立多点呼叫时的内部消息","SIG:400":"通讯失败,请升级到最新版本","SIG:403":"远端网络异常,呼叫已断开","SIG:404":"对方不在线","SIG:401":"加密算法不匹配","SIG:402":"该会议室不允许关闭摄像头,请开启摄像头加入会议","SURV:483":"同步会议信息失败,请重试","SURV:482":"邀请失败,请重试"},zh_TW:{"CHARGE:644":"沒有呼叫權限","CHARGE:649":"預約會議未到開始時間,無法加入","PS:400":"不支持跨雲呼叫","SIG:421":"對方終端不允許外人撥打,請與對方確認後再撥","SIG:422":"您已被主持人移出會議","SIG:420":"號碼不正確","SIG:789":"錄制已停止","SIG:423":"UNKNOWN","SIG:424":"主持人已結束會議","CHARGE:642":"呼叫失敗,企業IPPBX方數已達上限","CHARGE:643":"調度失敗,企業監控調度方數已達上限","CHARGE:640":"所屬部門的雲會議室存儲空間已滿,不能再發起錄制","CHARGE:641":"所屬企業的雲會議室存儲空間已滿,不能再發起錄制","CHARGE:635":"賬戶余額不足,不能發起PSTN通話,請聯系管理員充值後再嘗試","CHARGE:636":"雲會議室已達允許呼入的上限","CHARGE:633":"無法呼叫當前號碼,您的終端僅允許呼叫通訊錄上的用戶號碼","CHARGE:634":"賬戶余額支付範圍不可用於PSTN通話,請聯系管理員開啟後再嘗試。","CHARGE:639":"雲會議室存儲空間已滿,不能再發起錄制","CHARGE:637":"雲會議室已達部門允許呼入的上限","CHARGE:638":"雲會議室已達企業允許呼入的上限","SIG:419":"對方已開啟辦公模式。您可滑動下方按鈕,發起呼叫","SIG:416":"當前在線呼叫數已達服務上限,請稍後再試","SIG:417":"密碼輸入超時","SIG:410":"呼叫失敗,請再試壹次","SIG:4445":"雲會議室存儲空間已滿,不能再發起錄制","SIG:411":"終端APP版本過低,請升級後再試","SIG:4446":"所屬部門的雲會議室存儲空間已滿,不能再發起錄制","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":" 密碼錯誤次數達到3次,請稍後重試","SIG:4449":"無效的分享content類型","SIG:415":"同步呼叫信息失敗,請稍後再試","SIG:412":"對方版本過低,通話無法接通","SIG:4447":"所屬企業的雲會議室存儲空間已滿,不能再發起錄制","SIG:413":"對方設置了免打擾","SIG:4448":"未知錯誤","CHARGE:631":"此雲會議室為按參會時長計費的會議室。您的帳戶餘額已用盡,不能在此雲會議室發起會議,請聯系管理員充值或選擇其他雲會議室。","SIG:4441":"錄制超時,請稍後再試","CHARGE:632":"主動呼叫權限已被管理員關閉,無法呼叫","SIG:4442":"UNKNOWN","CHARGE:630":"當前雲會議室不允許邀請通訊錄外成員","SIG:4440":"分享content超時,請稍後再試","CHARGE:624":"呼叫失敗。您呼叫的終端埠使用服務已過期。","CHARGE:625":"此會議有終端端口服務已過期,無法支持多方呼叫","CHARGE:622":"沒有監看權限","CHARGE:623":"呼叫失敗。終端埠使用服務已過期,不能加入雲會議室或多方通話","REC:511":"錄制服務暫時不可用,請稍後再試","CHARGE:628":"您呼叫的雲會議室不允許匿名使用者呼入,請登錄或註冊後重新呼叫","REC:512":"錄制服務暫時不可用,請稍後再試","CHARGE:629":"對方正在會議中,且該會議不允許通訊錄外成員呼入,請稍後再試","CHARGE:626":"此會議有終端端口服務已過期,無法邀請更多人加入","CHARGE:627":"呼叫的雲會議室不允許通訊錄外成員呼入,請聯系雲會議室管理員","SIG:1503":"分配監控資源失敗","SIG:4456":"連接已斷開,請重新入會","SIG:4457":"號碼輸入有誤,請核對後重新撥打!","SIG:441":"當前在線呼叫數已達網關服務上限,請稍後重試","SIG:4454":"通話不存在,請核對後重試","SIG:4455":"服務器未連接,請稍後重試","SIG:445":"UNKNOWN","SIG:1501":"shuttle獲取MA失敗","SIG:4458":"網絡異常,呼叫已斷開","SIG:1502":"shuttle獲取媒體資源失敗","SIG:4459":"號碼輸入有誤,請核對後重新撥打!","CHARGE:620":"無單位歸屬,不能呼叫H.323設備","SIG:4452":"錄制失敗","CHARGE:621":"呼叫失敗,單位H.323方數不足","SIG:440":"雲會議室密碼不正確,請重試","SIG:4453":"通話已存在,請稍後再試","SIG:4450":"不支持分享content","SIG:4451":"帶寬不足,分享內容失敗","CHARGE:613":"UNKNOWN","CHARGE:614":"UNKNOWN","CHARGE:611":"UNKNOWN","REC:400":"信令服務與錄製服務內部錯誤。","CHARGE:612":"UNKNOWN","REC:401":"錄制服務暫時不可用,請稍後再試","CHARGE:617":"UNKNOWN","REC:402":"錄制服務暫時不可用,請稍後再試","CHARGE:618":"UNKNOWN","REC:403":"錄制服務暫時不可用,請稍後再試","CHARGE:615":"UNKNOWN","REC:404":"录制不存在","CHARGE:616":"會議已被鎖定,無法加入,請聯系會議發起人解鎖後進入。","REC:405":"錄制服務暫時不可用,請稍後再試","CHARGE:619":"呼叫失敗。終端的雲服務端口已過期,請聯系管理員續費購買。","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content發送時會議尚未開始","SIG:431":"Content Server創建資源失敗","SIG:4466":"輸入密碼超時","REC:406":"錄制服務暫時不可用,請稍後再試","SIG:4460":"號碼輸入有誤,請核對後重新撥打!","CHARGE:610":"呼叫失敗,您的企業已禁止PSTN通話功能,請聯系您的企業管理員!","SIG:4461":"號碼輸入有誤,請核對後重新撥打!","SIG:1404":"UNKNOWN","SIG:469":"錄製正在進行,請勿重複發起錄製","CHARGE:441":"當前在線呼叫數已達網關服務上限,請稍後重試","SIG:461":"錄制時,本地空間即將耗盡","SIG:462":"錄制時,本地空間已耗盡","SIG:580":"pstn呼叫時,第三方服務器報錯","REC:465":"本地已開啟錄制,不能重復發起錄制","REC:466":"錄制服務暫時不可用,請稍後再試!","REC:467":"已達最大錄制方數,不能發起錄制","REC:468":"錄制的存儲空間已滿,您無法開始錄制。\n請刪除已有的錄制視頻,\n或聯系企業管理員購買更多存儲空間。","REC:469":"UNKNOWN","REC:460":"沒有錄製權限","REC:463":"錄制的存儲空間已滿,您無法開始錄制。\n請刪除已有的錄制視頻,\n或聯系企業管理員購買更多存儲空間。","SIG:456":"呼叫失敗,請再試壹次","CHARGE:671":"會議未開始,請等待主持人開始會議後加入","CHARGE:672":"已被移出本次會議,無法入會","CHARGE:670":"您有一場會議正在進行,請先結束該會議","CHARGE:675":"沒有可用的視頻監控資源","SIG:450":"您的終端目前無法支持此類呼叫","CHARGE:676":"視頻監控服務併發超過限制","CCC:501":"數據庫操作失敗","CHARGE:673":"監控服務已經過期","CCC:500":"內部服務器錯誤","CHARGE:674":"視頻監控服務沒有企業歸屬","CCC:602":"输入超时","CHARGE:668":"會議未通過審批或未到預約開始時間","CCC:601":"呼叫超時","CHARGE:669":"管理員禁用點對點呼叫","CCC:604":"入會超時","CHARGE:666":"超過會議審批允許的最大成員數量,入會失敗","CCC:603":"评价结束","CHARGE:667":"超過會議審批允許的最大成員數量,邀請失敗","SIG:487":"呼叫已取消","SIG:488":"終端試用期已過,無法繼續為您服務了","SIG:485":"已達最大呼叫時長,呼叫已斷開","SIG:486":"對方忙,請稍後再試","CHARGE:660":"對方企業帳戶餘額不足,不能發起SDK呼叫","CHARGE:661":"對方企業賬戶尚未開通小程序SDK呼叫服務","SIG:480":"呼叫失敗,請再試壹次","CHARGE:664":"PSTN呼叫已達部門允許呼入的上限","SIG:483":"撥打不支持國家的pstn號碼","CHARGE:665":"小魚易連服務已過期,請企業管理員更新服務許可證","SIG:484":"電話時長已用盡,無法轉呼手機號,請聯繫IT管理員及時充值","CHARGE:420":"號碼不正確","CHARGE:662":"對方企業帳戶餘額不足,不能發起小程序SDK呼叫","SIG:482":"邀請失敗,請重試","CHARGE:415":"小魚易連服務已過期,請企業管理員更新服務許可證","CHARGE:657":"企業帳戶餘額不足,不能發起小程序SDK呼叫","CHARGE:416":"當前在線呼叫數已達服務上限,請稍後再試","CHARGE:658":"web用戶端達到企業的呼叫方數限制","CHARGE:655":"企業帳戶餘額不足,不能發起SDK呼叫","CHARGE:414":"H.323接入服務已過期","CHARGE:656":"企業帳戶尚未開通小程序SDK呼叫服務","CHARGE:659":"對方企業帳戶尚未開通SDK呼叫服務","STATE:200":"成功","SIG:598":"呼叫失敗,請再試壹次","SIG:599":"信令訊息格式無效","SIG:479":"共享內容路數已達上限,無法發起更多的共享。請等待其他參會者停止共享后再重試。","CHARGE:650":"h.323方數已達雲會議室允許呼入的上限","CHARGE:653":"會議不支持更多小程序入會,請使用App入會或聯系會議管理員","CHARGE:654":"企業帳戶尚未開通SDK呼叫服務","CCC:600":"用戶已被其他座席服務","CHARGE:651":"h.323方數已達部門允許呼入的上限","CHARGE:652":"預約會議已經過期,無法主動加入","SIG:704":"呼叫失敗,請再試壹次","SIG:703":"呼叫失敗,請再試壹次","SIG:708":"沒有白板分享權限","SIG:709":"無法合併會議","SIG:706":"沒有內容標記權限\t","SIG:707":"沒有雙流分享權限","CHARGE:481":"終端不允許陌生人呼叫","CCC:415":"坐席名稱已存在","CCC:414":"坐席不存在","CCC:417":"IVR配置已存在","CCC:416":"無效的坐席ID","CCC:419":"無效的IVR配置ID","CCC:418":"IVR配置不存在","SIG:498":"當前網絡UDP被禁用,無法通話,\n請聯系網絡管理員或切換其他網絡","SIG:499":"網絡異常,呼叫已斷開","SIG:496":"媒體超時","SIG:497":"信令超時","CHARGE:473":"當前通話人數已滿。如需更多人通話,請使用雲會議室。手機端下載小魚易連app,註冊即可獲得。","SIG:490":"無應答","CHARGE:474":"當前會議人數已滿,請加入企業通訊錄,\n購買更多會議端口,詳情請咨詢本地經銷商。","SIG:491":"","CCC:420":"特服號暫時不可用,請稍後再試","CHARGE:471":"當前通話人數已滿。請使用終端或雲會議室召開多方視頻會議。","CHARGE:472":"呼叫無法接通,終端在家最多支持4方通話。","CHARGE:477":"您呼叫的會議已達到最大支持人數,請聯系管理員購買或使用超大型會議室。","CCC:421":"號码不存在","CHARGE:478":"您的服務可用分鐘數不足,無法呼叫。","CHARGE:475":"當前會議人數已滿,請聯系企業管理員%s%s,\n及時為企業帳戶充值,或購買更多會議端口。","CHARGE:476":"您呼叫的會議已達到最大支持人數,請聯系管理員購買或使用超大型會議室。","CCC:404":"特服號暫時不可用,請稍後再試","CCC:403":"特服號暫時不可用,請稍後再試","CCC:406":"參數非法","CCC:405":"特服號暫時不可用,請稍後再試","CHARGE:469":"服務資源使用已達最大值,請稍後重試!","REC:478":"錄制中斷,網絡連接中,請重新發起錄制","CCC:408":"企業不存在","REC:479":"錄製中斷,服務重啟中,請重新發起錄製","CCC:407":"企業已存在","CCC:409":"無效的企業ID","SIG:726":"該號碼異常已被限製使用","SIG:727":"呼叫失敗,請再試壹次","SIG:724":"您已被強制邀請加入新的會議","REC:470":"沒有可用的錄製伺服器,請稍後再試","SIG:725":"呼叫失敗,請再試壹次","SIG:722":"設備與配對終端連接斷開","SIG:723":"設備與指揮調度服務連接斷開","SIG:720":"請稍等,主持人稍後邀請您入會","SIG:721":"會議還未開始,請等待主持人入會","CCC:411":"特服號不存在","CCC:410":"特服號已存在","CHARGE:467":"已達最大錄制方數,不能發起錄制","CCC:413":"坐席已存在","CHARGE:464":"錄制失敗,尚未開通錄制服務或服務已過期,請聯系管理員購買。","CCC:412":"無效的特服號","CHARGE:459":"企業帳戶余額不足,無法支持此呼叫。\n請聯系企業管理員%s%s,及時為企業帳戶充值。","CHARGE:457":"終端電話可用分鐘數不足,請充值;或聯系企業管理員,加入企業通訊錄。","CHARGE:458":"暫不支持呼叫國際電話。請聯系企業管理員加入企業通訊錄;或咨詢本地經銷商,為您開通企業帳戶。","SIG:716":"網絡異常,呼叫已斷開","REC:480":"錄製失敗,因為該會議室已啟用單路錄製模式","SIG:713":"Content Server創建資源失敗","REC:481":"錄制中斷,網絡連接中,請重新發起錄制","SIG:714":"Content Server創建資源失敗","SIG:719":"呼叫失敗,請再試壹次","SIG:717":"會議室已超出最高通話時長限制,轉為語音通話模式,可聯繫管理員處理","SIG:718":"語音模式限制已解除","SIG:711":"内容發送時會議尚未開始","SIG:712":"内容發送時會議尚未開始","CHARGE:451":"系統不支持此類型呼叫","CHARGE:452":"您的雲會議室不支持邀請電話入會,\n請聯系企業管理員加入企業通訊錄;\n或咨詢本地經銷商,為您的企業開通企業帳戶。","CHARGE:450":"您的終端目前無法支持此類呼叫","CCC:400":"特服號暫時不可用,請稍後再試","CHARGE:455":"暫不支持呼叫國際電話號碼。","CCC:402":"特服號暫時不可用,請稍後再試","CHARGE:453":"企業帳戶余額不足,無法支持此呼叫。\n請聯系企業管理員%s%s,及時為企業帳戶充值。","CCC:401":"特服號暫時不可用,請稍後再試","CHARGE:454":"終端電話可用分鐘數不足,無法呼叫。","CHARGE:602":"當前通話人數已達上限,您無法加入。","CHARGE:603":"您呼叫的會議已達最大支持人數。\n設備加入企業通訊錄,可支持更多方會議。\n如需更多支持請呼叫客服終端號’288288’咨詢。","CHARGE:721":"不允許互聯網鏈路呼入!","CHARGE:601":"企業會議容量使用現在達到上限,\n無法加入會議。請聯系管理員%s%s購買更多會議端口。","CHARGE:606":"當前會議人數已超限,30分鐘後將自動結束。\n請加入企業通訊錄,可支持更多方會議。","CHARGE:607":"您的服務可用分鐘數不足,無法呼叫。","CHARGE:604":"終端在家僅支持4方通話,當前通話人數已超限,30分鐘後將自動結束","CHARGE:605":"UNKNOWN","SIG:506":"錄製伺服器內部錯誤","CHARGE:608":"您呼叫的會議已達最大支持人數,請聯系企業IT管理員","SIG:504":"呼叫失敗,請再試壹次","CHARGE:609":"您呼叫的會議已達最大支持人數,請聯系企業IT管理員,購買超大型雲會議室。","SIG:505":"呼叫失敗,請再試壹次","SIG:502":"呼叫失敗,請再試壹次","SIG:4999":"分享內容失敗","SIG:503":"呼叫失敗,請再試壹次","CHARGE:720":"該賬號已使用","CHARGE:712":"該雲該雲會議室已被設置為禁止被監看會議室已被設置為禁止被監看","CHARGE:713":"該終端正在參會的雲會議室被設置為禁止被監看","CHARGE:710":"不支持pstn外呼","CHARGE:711":"呼叫失敗,您的企業已禁止PSTN通話功能,請聯系您的企業管理員!","CHARGE:716":"當前用戶不允許參會","CHARGE:717":"當前用戶無權限入會","CHARGE:714":"監看權限校驗超時,請重試","REC:503":"錄制服務暫時不可用,請稍後再試","CHARGE:715":"該號碼異常已被限製使用","CHARGE:718":"對方終端不允許撥打","CHARGE:719":"該賬號已登錄其它終端入會","SURV:580":"監控調度呼叫時,第三方服務報錯","REC:505":"錄制服務暫時不可用,請稍後再試","REC:506":"直播服務暫時不可用,請稍後再試","REC:507":"錄制服務暫時不可用,請稍後再試","REC:509":"錄制服務暫時不可用,請稍後再試","CHARGE:701":"企業帳戶餘額不足,無法開啟錄製。請聯系管理員充值後再嘗試","CHARGE:702":"個人云會議室不可以用,請選擇其他會議室或聯繫管理員","CHARGE:700":"企業帳戶未開通多路錄製計費服務,無法開啟錄製。請聯系客戶諮詢開通事宜","CHARGE:705":"H323融合服務器容量不足","CHARGE:703":"呼叫所用的H323集群容量不足","CHARGE:704":"H323融合服務器容量不足","SIG:408":"對方沒應答,請稍後再試","SIG:405":"對方設備不在線,請稍後重試","SIG:409":"建立多點呼叫時的內部消息","SIG:400":"通訊失敗,請升級到最新版本","SIG:403":"遠端網絡異常,呼叫已斷開","SIG:404":"對方不在線","SIG:401":"加密算法不匹配","SIG:402":"該會議室不允許關閉攝像頭,請開啟攝像頭加入會議","SURV:483":"同步會議信息失敗,請重試","SURV:482":"邀請失敗,請重試"},en_US:{"CHARGE:646":"Cloud meeting has reached the upper limit of organization's allowed incoming calls","CHARGE:647":"Terminal has reached the upper limit of allowed incoming calls","CHARGE:644":"No authority","CHARGE:645":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:648":"Terminal has reached the upper limit of organization's allowed incoming calls","CHARGE:649":"The scheduled meeting is not reached and cannot be joined","PS:400":"Cross-cloud calls are not supported","SIG:421":"Far end does not accept calls by Xiaoyu ID. Please check.","SIG:422":"You are kicked out by chairman.","SIG:420":"Invalid Number.","SIG:789":"Recording has been stopped","SIG:423":"UNKNOWN","SIG:424":"The meeting has ended.","CHARGE:642":"The call failed, and the IPPBX number of the enterprise has reached the upper limit.","CHARGE:643":"Scheduling failed, the number of enterprises monitoring and dispatching reached the upper limit","CHARGE:640":"Cloud storage of department is full and can no longer record","CHARGE:641":"Cloud storage of organization is full and can no longer record","CHARGE:635":"Account balance exhausted, you cannot initiate PSTN calls, please contact the administrator to recharge and then try again.","CHARGE:636":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:633":"The number can not be dialed out. The endpoint is only authorized to call the number on the contact list","CHARGE:634":"Account balance Payment scope is not available for PSTN calls, please contact the administrator to open and then try again.","CHARGE:639":"Cloud storage of user is full and can no longer record","CHARGE:637":"Cloud meeting has reached the upper limit of department's allowed incoming calls","CHARGE:638":"Cloud meeting has reached the upper limit of organization's allowed incoming calls","SIG:419":"Far end has turned on office mode. Please slide to call.","SIG:416":"Current calls have reached the max limit, please try again later.","SIG:417":"Password entry timeout.","SIG:410":"Call is not connected. Please retry.","SIG:4445":"Cloud storage of user is full and can no longer record","SIG:411":"version is too old.","SIG:4446":"Cloud storage of department is full and can no longer record","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":"Password error number reached 3 times, please try again later.","SIG:4449":"The type of sharing content is invalid.","SIG:415":"Synchronization call information failed. Please try again later.","SIG:412":"version is too old.","SIG:4447":"Cloud storage of organization is full and can no longer record","SIG:413":"Far end is in Do Not Disturb mode.","SIG:4448":"Unknown error.","SIG:4441":"Record is time out. Please retry later.","CHARGE:631":"This meeting room is charged by the minutes of the attendees. While your account balance has been exhausted, you cannot initiate a meeting in this meeting room, please contact your administrator to recharge or select another cloud meeting room.","SIG:4442":"UNKNOWN","CHARGE:632":"The endpoint is not authorized to dial out by admin.","SIG:4440":"Sharing content is time out. Please retry later.","CHARGE:630":"The current meeting does not allow non-address book members to call in.","CHARGE:624":"Call failed. The port service of the terminal you called has expired.","CHARGE:625":"This conference port service has expired and cannot support multi-party calls.","CHARGE:622":"No monitoring permission","CHARGE:623":"Call failed. The port service of this terminal has expired, and you cannot use this terminal to join cloud meeting room or multiparty call.","REC:511":"Xiaoyu recording service is not available, please try again later","CHARGE:628":"The meeting ID you called does not allow anonymous users to call in, Please log in or register and call again.","REC:512":"Xiaoyu recording service is not available, please try again later","CHARGE:629":"Far end is in the meeting which does not allow non-address book members to call in,please retry later.","CHARGE:626":"This conference port service has expired, and no more people can be invited.","CHARGE:627":"The meeting ID you called does not allow non-address book members to call in, please contact the administrator of the meeting room.","SIG:1503":"Allocating resource for survelliance failed.","SIG:4456":"The network is disconnected, please try joining the meeting again.","SIG:4457":"Wrong number, please check it and retry.","SIG:441":"Current calls have reached the max limit of gateway, please try again later.","SIG:4454":"No related call, please check and retry later.","SIG:4455":"No connection with server, please retry later.","SIG:445":"UNKNOWN","SIG:1501":"shuttle Get MA failed","SIG:4458":"Network unstable, call disconnected.","SIG:1502":"shuttle Get media resource failed","SIG:4459":"Wrong number, please check it and retry.","SIG:4452":"Record failed.","CHARGE:620":"You don't belong to an organization,and you cannot call H.323 device","SIG:440":"The password of conference is wrong. Please retry.","SIG:4453":"Call exists, please retry later.","CHARGE:621":"Call failed, insufficient H.323 port of your organization","SIG:4450":"Sharing content is unsupported.","SIG:4451":"Sharing content failed for no bandwidth.","CHARGE:613":"UNKNOWN","CHARGE:614":"UNKNOWN","CHARGE:611":"UNKNOWN","REC:400":"Internal errors in signaling and recording services.","CHARGE:612":"UNKNOWN","REC:401":"Xiaoyu recording service is not available, please try again later","CHARGE:617":"UNKNOWN","REC:402":"Xiaoyu recording service is not available, please try again later","CHARGE:618":"UNKNOWN","REC:403":"Xiaoyu recording service is not available, please try again later","CHARGE:615":"UNKNOWN","REC:404":"Record is not found.","CHARGE:616":"The meeting is locked, failed to join. Please contact meeting originator to unlock and join.","REC:405":"Xiaoyu recording service is not available, please try again later","CHARGE:619":"Call failed. The video service of the terminal has expired, please contact IT Admin to renew.","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content cannot be shared before meeting is started.","SIG:431":"Failed to allocated resources for content sharing.","SIG:4466":"Check password timeout","REC:406":"Xiaoyu recording service is not available, please try again later","SIG:4460":"Wrong number, please check it and retry.","CHARGE:610":"Call failed. PSTN call is disabled, please contact your enterprise admin!","SIG:4461":"Wrong number, please check it and retry.","SIG:1404":"UNKNOWN","SIG:469":"Recording is in progress, do not repeat the recording","CHARGE:441":"Current calls have reached the max limit of gateway, please try again later.","SIG:461":"Local storage will be used up soon.","SIG:462":"Local storage is used up.","SIG:580":"Failed to make PSTN call.","REC:465":"Record is started. Not allow repeated record.","REC:466":"Xiaoyu recording service is not available, please try again later.","REC:467":"The maximum number of recordings has been reached and you cannot start recording","REC:468":"Storage space not available, cannot .","REC:469":"UNKNOWN","REC:460":"You don't have recording permission.","REC:463":"Storage space not available, cannot .","SIG:456":"Call is not connected. Please retry.","CHARGE:671":"The meeting did not start,please wait for the host to start the meeting","CHARGE:672":"Has been removed from this meeting and cannot join","CHARGE:670":"You have a meeting in progress, please end the meeting first","SIG:450":"Your device does not support this type of call.","CHARGE:675":"No video surveillance service available","CHARGE:676":"Video surveillance service exceeds limit","CCC:501":"Database operate error","CHARGE:673":"The video surveillance service has expired","CCC:500":"Internal server error","CHARGE:674":"Video surveillance services lack enterprise ownership","CHARGE:668":"The meeting has not been approved or the scheduled start time is not reached and cannot be joined","CHARGE:669":"P2P call prohibited by administrator","CHARGE:666":"The maximum number of participants approved by the meeting has been exceeded\t","CHARGE:667":"The maximum number of participants approved by the meeting has been exceeded","SIG:487":"Call is canceled.","SIG:488":"The trial has expired. Xiaoyu stops service.","SIG:485":"Reach max duration. Call ended","SIG:486":"Far end busy. Please retry later.","CHARGE:660":"The other enterprise account balance is insufficient to initiate SDK calls","SIG:480":"Call is not connected. Please retry.","CHARGE:661":"The other enterprise account has not yet enabled mini-program SDK call service","SIG:483":"PSTN call in this region is not supported.","CHARGE:664":"PSTN calling has reached the upper limit of department's allowed incoming calls","SIG:484":"Telephone minutes exhausted, you cannnot transfer your mobile phone number. Please contact the IT administrator to recharge in time","CHARGE:665":"Xiaoyu service is expired. Please update your license key.","CHARGE:420":"Incorrect Number.","CHARGE:662":"The other enterprise account balance is insufficient to initiate mini-program SDK calls","SIG:482":"The invitation failed, please try again","CHARGE:415":"Xiaoyu service is expired. Please update your license key.","CHARGE:657":"The enterprise account balance is insufficient to initiate mini-program SDK calls","CHARGE:416":"Current calls have reached the max limit, please try again later.","CHARGE:658":"Web client has reached the upper limit of organization's allowed incoming calls","CHARGE:655":"The enterprise account balance is insufficient to initiate SDK calls","CHARGE:414":"H.323 access service has expired","CHARGE:656":"The enterprise account has not yet enabled mini-program SDK call service","CHARGE:659":"The other enterprise account has not yet enabled SDK call service","STATE:200":"成功","SIG:598":"Call is not connected. Please retry.","SIG:599":"Signaling message format is not valid.","SIG:479":"The number of content share has exceeded the max limit, please retry after other participants stop the content share.","CHARGE:650":"The number of h.323 parties has reached the upper limit of the cloud conference room","CHARGE:653":"The meeting you are calling does not support the mini-program call-in service , please use app to join the meeting or contact the conference administrator","CHARGE:654":"The enterprise account has not yet enabled SDK call service","CHARGE:651":"The number of h.323 parties has reached the upper limit of department's allowed incoming calls","CHARGE:652":"The scheduled meeting has expired and cannot be joined","SIG:704":"Call is not connected. Please retry.","SIG:703":"Call is not connected. Please retry.","SIG:708":"You don't have whiteboard sharing permission.","SIG:709":"Meetings cannot be merged","SIG:706":"You don't have content labeling permission","SIG:707":"You don't have dual-stream sharing permissions","CHARGE:481":"You are not allowed to call this Xiaoyu.","CCC:415":"Same seat name is exist","CCC:414":"Seat is not exist","CCC:417":"IVR config is already exist","CCC:416":"Seat id is invalid","CCC:419":"IVR config id is invalid","CCC:418":"IVR config is not exist","SIG:498":"UDP is blocked by the network. Please call administrator or switch to another network.","SIG:499":"Network unstable, call disconnected.","SIG:496":"Media Timeout","SIG:497":"Signal Timeout","SIG:490":"Far end did not answer.MEDIA_TIMEOUT","CHARGE:473":"Current session is full. Please use cloud meeting room to have more people in the same conference. \nDownload XYLink App and register account to get free cloud meeting room.","SIG:491":"","CHARGE:474":"Current session is full. \nPlease purchase more cloud meeting ports.","CCC:420":"The service number is temporarily unavailable. Please try later.","CHARGE:471":"Current session is full. Please use Xiaoyu or cloud meeting room to have multi-party video conference.","CHARGE:472":"Call cannot be connected. Xiaoyu Home can only support 4 people in the same call.","CHARGE:477":"The meeting is full. Please contact the enterprise administrator to purchase or use the super large cloud conference room.","CCC:421":"The service number is not exist","CHARGE:478":"No sufficient available phone minutes to make calls.","CHARGE:475":"Current session is full. Please recharge for your enterprise account or purchase more cloud meeting ports.","CHARGE:476":"The meeting is full. Please contact the enterprise administrator to purchase or use the super large cloud conference room.","CCC:404":"The service number is temporarily unavailable. Please try later.","CCC:403":"The service number is temporarily unavailable. Please try later.","CCC:406":"Parameter is invalid","CCC:405":"The service number is temporarily unavailable. Please try later.","CHARGE:469":"The usage of service resources has reached the limit, please try again later! ","REC:478":"The recording is interrupted, the Network is connecting, please try again later","CCC:408":"Enterprise is not exist","REC:479":"The recording is interrupted, the service is restarting, please try again later","CCC:407":"Enterprise is already exist","CCC:409":"Enterprise Id is invalid","SIG:726":"This number is abnormal and has been restricted. ","SIG:727":"Call is not connected. Please retry.","SIG:724":"You have been forced to join a new meeting","SIG:725":"Call is not connected. Please retry.","REC:470":"No recording server available, please try again later","SIG:722":"Loss of connection between device and pairing terminal","SIG:723":"Loss of connection between device and dispatch service","SIG:720":"Please wait a moment, the chairman will invite you to join the conference later.","SIG:721":"The conference has not started. Please wait the chairman to join the conference.","CCC:411":"Service number is not exist","CCC:410":"Service number is exist","CHARGE:467":"The maximum number of recordings has been reached and you cannot start recording","CCC:413":"Seat is already exist","CHARGE:464":"License is needed to start recording, please contact IT administrator to purchase or renewal recording service.","CCC:412":"Service number is invalid","CHARGE:459":"No sufficient balance in your enterprise account. \nPlease contact IT administrator %s%s to recharge.","CHARGE:457":"No sufficient phone minutes. Please recharge or contact IT administrator to enable enterprise account.","CHARGE:458":"phone calls are not supported. Please contact IT administrator to enable enterprise account and create enterprise contacts.","SIG:716":"Network unstable, call disconnected.","SIG:713":"Failed to allocated resources for content sharing.","REC:480":"Recording failed, because the cloud meeting room single recording mode is enabled","SIG:714":"Failed to allocated resources for content sharing.","REC:481":"The recording is interrupted, the Network is connecting, please try again later","SIG:719":"Call is not connected. Please retry.","SIG:717":"The conference has exceeded the maximum call duration limit and switched to voice call mode,could contact the admin to deal with","SIG:718":"Voice call mode restrictions have been lifted","SIG:711":"Content cannot be shared before meeting is started.","SIG:712":"Content cannot be shared before meeting is started.","CHARGE:451":"Your system does not support this type of call.","CHARGE:452":"Your cloud meeting room does not support inviting phone calls. \nPlease contact IT administrator to enable enterprise account \nand create enterprise contacts.","CHARGE:450":"Your device does not support this type of call.","CCC:400":"The service number is temporarily unavailable. Please try later.","CHARGE:455":"International phone calls are not supported.","CCC:402":"The service number is temporarily unavailable. Please try later.","CHARGE:453":"Insufficient.","CCC:401":"The service number is temporarily unavailable. Please try later.","CHARGE:454":"Insufficient.","CHARGE:602":"The current number of calls has reached the upper limit, and you cannot join","CHARGE:603":"Current session is full. \nPlease contact IT administrator to enable enterprise account to support more participants. \nCall XiaoYu service 288288 for more information","CHARGE:721":"Incoming calls from Internet links are not allowed!","CHARGE:601":"Meeting capacity is over limit. \nPlease contact IT administrator %s%sto purchase more meeting resources.","CHARGE:606":"The current number of meetings has been overrun and will be automatically terminable in 30 minutes. \n please join the address book to support more party meetings.","CHARGE:607":"Your service is not available enough to call.","CHARGE:604":"The terminal supports only 4 Party calls at home. The number of calls is now out of line, and will automatically end in 30 minutes.","CHARGE:605":"UNKNOWN","SIG:506":"Internal error on the recording server.","SIG:504":"Call is not connected. Please retry.","CHARGE:608":"Current session is full. \nPlease contact IT administrator","SIG:505":"Call is not connected. Please retry.","CHARGE:609":"Current session is full. \nPlease contact IT administrator to purchase super-large meeting service","SIG:502":"Call is not connected. Please retry.","SIG:4999":"Sharing content failed.","SIG:503":"Call is not connected. Please retry.","CHARGE:720":"This account has been used","CHARGE:712":"The cloud conference room has been set to prohibit monitoring","CHARGE:713":"The cloud conference room that the terminal is participating in is set to prohibit monitoring","CHARGE:710":"Don't support pstn outbound calls","CHARGE:711":"Call failed. PSTN call is disabled, please contact your enterprise admin!","CHARGE:716":"The current user is not allowed to attend the meeting","CHARGE:717":"The current user has no permission to join","CHARGE:714":"Monitoring permission verification timed out, please try again","REC:503":"Xiaoyu recording service is not available, please try again later","CHARGE:715":"This number is abnormal and has been restricted.","CHARGE:718":"Far end does not accept calls","CHARGE:719":"This account has been logged into other terminals to join","SURV:580":"Failed to make IPC call.","REC:505":"Xiaoyu recording service is not available, please try again later","REC:506":"Live service is not available, please try again later","REC:507":"Xiaoyu recording service is not available, please try again later","REC:509":"Xiaoyu recording service is not available, please try again later","CHARGE:701":"The account balance of your enterprise is insufficient,so you can't initiate a recording. Please contact your administrator to recharge and try again","CHARGE:702":"Personal cloud conference room is not available. Please choose another conference room or contact the administrato","CHARGE:700":"The enterprise account does enable multi-recording service charge,so you can't initiate a recording. Please contact customer service for opening","CHARGE:705":"Call failed, insufficient H.323 port of your organization","CHARGE:706":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:703":"Call failed, the capacity of the H323 cluster used by the call is insufficient.","CHARGE:704":"Call failed, insufficient H.323 port of your organization","SIG:408":"Far end no answer. Please retry later.","SIG:405":"Far end device is not online. Please call again later.","CHARGE:707":"Cloud storage of user is full and can no longer record","SIG:409":"Internal message.","SIG:400":"Failed to connect. Please upgrade to laster version.","SIG:403":"Far end network unstable. Call is disconnected.","SIG:404":"Far end is offline.","SIG:401":"Encryption match failed","SIG:402":"It is not allowed to turn off the camera in this meeting room. Please turn on camera to join the meeting","SURV:483":"Failed to synchronize meeting information. Please try again","SURV:482":"The invitation failed, please try again"}},Yn=(r(9826),"zh_CN"),zn=function(){var e=new Date;return"".concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds()," ").concat(e.getMilliseconds())},Xn=function(){var e=new Date;return"".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds()," ").concat(e.getMilliseconds())},Wn=function(e,t){var r=t-e,n=Math.floor(r/864e5);return n};function qn(e){var t={};return e.forEach((function(e,r){t[r]=e})),t}var $n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return{code:e,msg:r||Fn[Yn][e],detail:t}},Zn=function(e,t,r){return t?{success:e,data:{code:t,msg:r||Fn[Yn][t]}}:{success:e,data:{}}},Jn=function(e,t){if("[object Object]"!==Object.prototype.toString.call(e))return e;if("string"==typeof t)return Object.assign(Object.assign({},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}({},t,"******"));if(Array.isArray(t)){var r=Object.assign({},e);return t.forEach((function(e){void 0!==r[e]&&(r[e]="******")})),r}return e},Qn=function(e){return"number"==typeof e},ei=function(e){return"[object object]"===Object.prototype.toString.call(e).toLocaleLowerCase()},ti=function(e){return"string"==typeof e},ri=function(e){return"boolean"==typeof e},ni=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ii=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"webrtc_log",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"webrtc";l(this,e),this.dbName=n,this.db=new Zr(this.dbName),this.tableCount=Math.max(t,1),this.tableName=r,this.maxTableCount=3}return d(e,[{key:"add",value:function(e){return ni(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u,l,h;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.db){t.next=4;break}return this.db=new Zr(this.db),t.next=4,this.init();case 4:try{n=e.time,i=void 0===n?"":n,o=e.title,s=void 0===o?"":o,a=e.content,c=void 0===a?"":a,u=e.rest,l=void 0===u?[]:u,h=this.num||1,this.db[this.tableName+h]&&this.db[this.tableName+h].add({t:i+JSON.stringify(s),c:JSON.stringify(c)+" "+JSON.stringify(l)}).then((function(){})).catch((function(e){console.log("add db data failed: ",e)}))}catch(e){console.log("add db data failed: ",e)}case 5:case"end":return t.stop()}}),r,this)})))}},{key:"deleteDB",value:function(){return ni(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.db.delete(),Zr.delete(this.dbName),ln.set("xy-webrtc-log",{version:1,num:1}),this.num=1,this.db=null;case 5:case"end":return e.stop()}}),e,this)})))}},{key:"close",value:function(){this.db.close()}},{key:"stop",value:function(){var e=ln.get("xy-webrtc-log")||{version:1,num:1};ln.set("xy-webrtc-log",{version:e.version,num:e.num+1>this.maxTableCount?1:e.num+1})}},{key:"isOpen",value:function(){return this.db&&this.db.isOpen()}},{key:"export",value:function(){return ni(this,void 0,void 0,t().mark((function e(){var r,n,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.db.isOpen()){e.next=4;break}return e.next=4,this.db.open();case 4:return console.log("log download"),e.next=7,Dn(this.db,{prettyJson:!0,progressCallback:this.progressCallback});case 7:return r=e.sent,n=zn(),e.next=11,this.generateZipBlobAsync(r,n,"");case 11:return i=e.sent,console.log("log download..."),Gn()(i,"xy_webrtc_sdk_log_".concat(n,".zip"),"application/zip"),e.abrupt("return",!0);case 17:return e.prev=17,e.t0=e.catch(0),console.error("export db data error: "+e.t0),e.abrupt("return",!1);case 21:case"end":return e.stop()}}),e,this,[[0,17]])})))}},{key:"upload",value:function(e){return ni(this,void 0,void 0,t().mark((function r(){var n,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=null,this.db.isOpen()){t.next=4;break}return t.next=4,this.db.open();case 4:return t.prev=4,t.next=7,Dn(this.db,{prettyJson:!0,progressCallback:this.progressCallback});case 7:return i=t.sent,o=zn(),t.next=11,this.generateZipBlobAsync(i,o,e);case 11:n=t.sent,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(4),console.error("export blob error: "+t.t0);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),r,this,[[4,14]])})))}},{key:"progressCallback",value:function(e){e.totalRows,e.completedRows;return!0}},{key:"open",value:function(){this.db.open()}},{key:"init",value:function(){return ni(this,void 0,void 0,t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.db){e.next=5;break}return this.db=new Zr(this.db),e.next=5,this.init();case 5:return r=ln.get("xy-webrtc-log")||{version:1,num:1},this.num=r.num,this.initStores(),e.next=10,this.db[this.tableName+this.num].clear();case 10:if(this.isOpen()){e.next=13;break}return e.next=13,this.db.open();case 13:e.next=21;break;case 15:return e.prev=15,e.t0=e.catch(0),console.log("init db failed:",e.t0),this.deleteDB(),e.next=21,this.init();case 21:case"end":return e.stop()}}),e,this,[[0,15]])})))}},{key:"getStores",value:function(e){var t=this,r={};return Array(this.tableCount).fill(this.tableCount).forEach((function(n,i){r[t.tableName+(i+1)]=e})),r}},{key:"initStores",value:function(){this.db&&!this.db.isOpen()&&(this.db.version(1).stores(this.getStores("++id,time,title,content,rest")),this.upgradeStores({version:2}),this.upgradeStores())}},{key:"setLogVersion",value:function(e){var t=ln.get("xy-webrtc-log")||{version:1,num:1};ln.set("xy-webrtc-log",Object.assign(Object.assign({},t),{version:e}))}},{key:"upgradeStores",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.version,r=void 0===t?1:t,n=e.tableCount,i=void 0===n?this.tableCount:n,o=e.tableName,s=void 0===o?this.tableName:o,a=e.field,c=void 0===a?"++id,t,c":a;this.db&&!this.db.isOpen()&&(this.tableCount=i,this.tableName=s,r<this.db.verno+1&&(r=this.db.verno+1),this.setLogVersion(r),this.db.version(r).stores(this.getStores(c)).upgrade())}},{key:"generateZipBlobAsync",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return ni(this,void 0,void 0,t().mark((function i(){var o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new(Un()),t.next=3,o.file("xy_webrtc_sdk_log_".concat(n,"_").concat(r,".json"),e,{});case 3:return t.next=5,o.generateAsync({type:"blob",mimeType:"application/zip",compression:"DEFLATE",compressionOptions:{level:9}});case 5:return s=t.sent,t.abrupt("return",s);case 7:case"end":return t.stop()}}),i)})))}}]),e}();const oi=ii;r(9714),r(9653),r(6977);var si="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),ai=new Uint8Array(16);function ci(){if(!si)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return si(ai)}for(var ui=[],li=0;li<256;++li)ui[li]=(li+256).toString(16).substr(1);const hi=function(e,t){var r=t||0,n=ui;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};const di=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||ci)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[n+o]=i[o];return t||hi(i)};var fi,pi,vi,gi,mi,yi,bi,Si,wi=r(3792),ki=r.n(wi),Ci=r(1354),xi=r.n(Ci),Ei=(r(6699),r(2023),r(7941),r(9669)),_i=r.n(Ei);!function(e){e.RECORD_STATE_IDLE="RECORD_STATE_IDLE",e.RECORD_STATE_STARTING="RECORD_STATE_STARTING",e.RECORD_STATE_STARTED="RECORD_STATE_STARTED",e.RECORD_STATE_STOPING="RECORD_STATE_STOPING"}(fi||(fi={})),function(e){e[e.NONE=0]="NONE",e[e.LOCAL_START=1]="LOCAL_START",e[e.REMOTE_STAR=2]="REMOTE_STAR",e[e.REMOTE_PAUSED=3]="REMOTE_PAUSED"}(pi||(pi={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(vi||(vi={})),function(e){e[e.RS90=90]="RS90",e[e.RS180=180]="RS180",e[e.RS360=360]="RS360",e[e.RS720=720]="RS720",e[e.RS1080=1080]="RS1080"}(gi||(gi={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(mi||(mi={})),function(e){e[e.LEVEL90=0]="LEVEL90",e[e.LEVEL180=1]="LEVEL180",e[e.LEVEL360=2]="LEVEL360",e[e.LEVEL720=3]="LEVEL720",e[e.LEVEL1080=4]="LEVEL1080"}(yi||(yi={})),function(e){e[e.LOW=0]="LOW",e[e.NORMAL=1]="NORMAL",e[e.HIGH=2]="HIGH"}(bi||(bi={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE"}(Si||(Si={}));var Ii=i(),Ai=1280,Ti=720,Ri=640,Oi=360,Di=function(e){return Ii.isFirefox?{}:{frameRate:e}},Ni=Object.assign({aspectRatio:1.777777778,resizeMode:"crop-and-scale",width:640,height:360},Di({min:15,exact:15,max:15})),Li=Object.assign({cursor:"always",logicalSurface:!0},Ni),Pi={720:{common:Object.assign(Object.assign(Object.assign({},Li),{width:1280,height:720}),Di(15)),advanced:Object.assign(Object.assign({},Li),{frameRate:{ideal:15,max:15},width:{ideal:1280,max:1280},height:{ideal:720,max:720}})},1080:{common:Object.assign(Object.assign(Object.assign({},Li),{width:1920,height:1080}),Di(15)),advanced:Object.assign(Object.assign({},Li),{frameRate:{ideal:15,max:15},width:{ideal:1920,max:1920},height:{ideal:1080,max:1080}})}},Mi={180:{common:Object.assign(Object.assign(Object.assign({},Ni),{width:320,height:180}),Di(15)),advanced:Object.assign(Object.assign({},Ni),{frameRate:{min:15,exact:15,max:15},width:{min:320,ideal:320,max:320},height:{min:180,ideal:180,max:180}})},360:{common:Object.assign(Object.assign(Object.assign({},Ni),{width:640,height:360}),Di(15)),advanced:Object.assign(Object.assign({},Ni),{frameRate:{min:15,exact:15,max:15},width:{min:640,ideal:640,max:640},height:{min:360,ideal:360,max:360}})},720:{common:Object.assign(Object.assign(Object.assign({},Ni),{width:1280,height:720}),Di(30)),advanced:Object.assign(Object.assign({},Ni),{frameRate:{min:5,ideal:30,max:30},width:{min:1280,ideal:1280,max:1280},height:{min:720,ideal:720,max:720}})}},Bi={"90P":0,"180P":1,"360P":2,"720P":3,"1080P":4,"4K":5,Num:6},ji={180:50,360:100,720:200},Gi="pc",Hi="mobile",Ui="sideBar",Ki="professional",Fi="video/H264",Vi=17,Yi=9999999999,zi=112,Xi=13333,Wi=["XYSDK:950401","XYSDK:950402","XYSDK:950403","XYSDK:950404","XYSDK:950405","XYSDK:950406"],qi=["CONFNO","HARD","TVBOX","BRUCE","DESK","SOFT","H323"],$i=[0,1,2],Zi=[0,1,2,3,4,5],Ji={none:0,wifi:1,"3g":2,wired:3,"2g":4,"4g":5,wwan:6,"3g_china_mobile":7},Qi={muteAudio:{type:"AUDIO_MUTE",status:!1},muteVideo:{type:"VIDEO_MUTE",status:!1},unmuteAudio:{type:"AUDIO_UN_MUTE",status:!0},unmuteVideo:{type:"VIDEO_UN_MUTE",status:!0}},eo={bundlePolicy:"max-bundle",iceCandidatePoolSize:0,iceServers:[],iceTransportPolicy:"all",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"},to={OK:"STATE:200",SERVER_INNER_ERROR:"SIG:4448",PEER_NET_DISCONNECT:"SIG:403",LOCAL_NET_DISCONNECT:"SIG:499"},ro={CLIENT_TYPE:"webrtc",INIT_INTERNELS:{bytesReceived:0,bytesReceivedSecond:0,bytesSent:0,bytesSentSecond:0,jitterSent:0,jitterReceived:0,audioSendJitter:0,roundTripTime:0,fractionLostSent:0,fractionLostReceived:0,mimeType:Fi,timestamp:0,receiver:{},sender:{},audioReceiver:{},audioSender:{}},RESOLUTION:1,ROSTER:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""},SELF_MOCK_PID:Yi,HOR_CONTAINER_RATIO:1.778,VER_CONTAINER_RATIO:.5625,RATIO_MAP:{0:0,1:90,2:180,3:270},MAP_RESOLUTION_INDEX:{90:0,180:1,360:2,720:3,1080:4},RESOLUTION_MAP:{0:90,1:180,2:360,3:720,4:1080},VIDE_BANDWIDTH_BIT:1e3,LOGIN_INFO:{callUri:"",securityKey:"",access_token:"",refresh_token:"",id:0,displayName:""},LAYOUT:{position:[],resolution:0,rotate:0,quality:0,state:"NORMAL",roster:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""}},MAP_RESOLUTION_STRING:{90:{width:160,height:90},180:{width:320,height:180},360:{width:640,height:360},720:{width:1280,height:720},1080:{width:1920,height:1080}},CONF_INFO:{participantCount:0,totalEpCount:0,chairManUrl:"",contentUri:"",actSpkUri:"",mediaGroupInfo:[]},CLOUD_ROOOM_INFO:{meetingControlPassword:"",meetingNumber:"",password:""},CONFERENCE_INFO:{callNumber:"",callUrl:"",deviceId:"",deviceType:"",displayName:"",number:"",numberType:"",confAuxProperties:{watermarkContent:""},avatar:"",inviteInfo:{displayName:"",inEnterprise:!0,inviteAppUrl:"",inviteUrl:"",invokSchema:"",linkNumber:"",mobileWebrtcVisibleSetting:!0,number:"",password:"",pstnNumber:"",shareUrl:"",userAvatar:"",userName:"",userProfileId:"",voiceNumber:"",webrtcSetting:!0,webrtcUrl:""}},MAX_PEOPLE_RESOLUTION:gi.RS720},no=["SPEAKER","GALLERY"],io=["MULTI_PIC_CONTENT_HIGH_PRIORITY","MULTI_PIC_ACTIVE_HIGH_PRIORITY","TWO_PIC_PIP","CONTENT_ONLY","TWO_PIC_SYMMETRIC"],oo="SPEAKER",so="MULTI_PIC_CONTENT_HIGH_PRIORITY",ao="standardWebRtc",co="thirdWebRtc",uo={muteAudio:"audioMute",unmuteAudio:"audioUnmute",muteVideo:"videoMute",unmuteVideo:"videoUnmute"},lo=0,ho=1,fo=2,po={180:3,360:2,720:1},vo={0:"",1:"HIDE",2:"SDKMonitor+hide"},go=["HIDE","SDKMonitor+hide"],mo=["Chinese","English"],yo=["clientId","clientSecret","password","token","pwd","securityKey","access_token","refresh_token"],bo={enableMeetingShout:!1,enableV2States:!0,enableCheckRecordPermission:!1,enableBandwidthSetting:!1,enableMeetingInvite:!1,enableMeetingOwner:!1,enableAutoResizeLayout:!0,enableLowResolution:!1,enableSpeakerInfo:!1,enableLayoutAvatar:!1,enableMobileNotAuth:!1,enableWatermarkContent:!0},So={clientConfigName:"RemoteSDKConfig",configName:"downLinkCeilingRate"},wo={clientConfigName:"RemoteSDKConfig",configName:"upLinkCeilingRate"},ko={clientConfigName:"mediaConfig",configName:"pvrxResolution"},Co=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},xo={errorCode:10002e3};const Eo=function(){function e(r){var n=this;l(this,e),this.assignOptions=function(e){return Object.assign({},n.commonOption,e,{params:Object.assign({},n.commonOption.params,e&&e.params)})},this.get=function(e,t){return n.axios.get(e,n.assignOptions(t)).catch((function(e){return e}))},this.put=function(e,t,r){return n.axios.put(e,t,n.assignOptions(r)).catch((function(e){return e}))},this.post=function(e,t,r){return n.axios.post(e,t,n.assignOptions(r)).catch((function(e){return e}))},this.delete=function(e,t){return n.axios.delete(e,n.assignOptions(t)).catch((function(e){return e}))},this.commonOption=r,this.loginInfo=null,this.logger=null,this.baseUrl="",this.clientId="",this.clientSecret="",this.retryCount=0;var i=Object.assign(Object.assign({},r),{headers:{"n-ua":"PL=webrtc-sdk&AV=1.0.0&DR=&RL=&MF=&MO=web&OS=web-sdk&API=&LCLO=&LCLA=&CK="}});_i().defaults.timeout=1e4,this.axios=_i().create(i),this.axios.interceptors.request.use((function(e){var t=Math.ceil(1e4*Math.random());return e.url.includes("random=")||(e.url.includes("?")?e.url+="&random=".concat(t):e.url+="?random=".concat(t)),n.setHttpConfig(e),n.logger&&n.logger.log("[http] request:",e.url),e})),this.axios.interceptors.response.use((function(e){return n.logger&&n.logger.log("[http] response:",null==e?void 0:e.data),e}),(function(e){return Co(n,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u,l,h,d;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger&&this.logger.log("[http] response error:",e),!e.response){t.next=24;break}if(a=e.response||{},c=a.status,u=a.data,401!==c||(null==u?void 0:u.errorCode)!==xo.errorCode){t.next=24;break}if(!(this.retryCount>=1)){t.next=7;break}return this.retryCount=0,t.abrupt("return",Promise.reject(xo));case 7:return t.prev=7,t.next=10,this.refreshToken({baseURL:e.config.baseURL});case 10:if(!(l=t.sent)){t.next=18;break}return h=l.access_token,null===(n=this.logger)||void 0===n||n.log("[http] error.config pre:",e.config),(null===(i=e.config.params)||void 0===i?void 0:i.token)&&(e.config.params.token=h),(null===(o=e.config.data)||void 0===o?void 0:o.includes("token"))&&(d=JSON.parse(e.config.data),e.config.data=JSON.stringify(Object.assign(d,{token:h})),null===(s=this.logger)||void 0===s||s.log("[http] error.config new:",e.config)),this.axios.defaults.headers.post["Content-Type"]="application/json",t.abrupt("return",this.axios.request(e.config));case 18:t.next=24;break;case 20:return t.prev=20,t.t0=t.catch(7),this.retryCount=0,t.abrupt("return",Promise.reject(xo));case 24:return t.abrupt("return",Promise.reject(e.response));case 25:case"end":return t.stop()}}),r,this,[[7,20]])})))}))}return d(e,[{key:"refreshToken",value:function(e){var r,n=e.baseURL,i=void 0===n?this.baseUrl:n,o=e.refresh_token,s=void 0===o?"":o;return Co(this,void 0,void 0,t().mark((function e(){var n,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=s||(null===(r=this.loginInfo)||void 0===r?void 0:r.refresh_token)){e.next=3;break}return e.abrupt("return",Promise.reject(xo));case 3:return e.prev=3,e.next=6,_i()({method:"post",baseURL:i,url:"admin/login/refresh_token",timeout:5e3,headers:{"x-xy-clientid":this.clientId},data:{refresh_token:s}});case 6:if(!(n=e.sent)||200!==n.status){e.next=13;break}return o=n.data.data,this.loginInfo=o,e.abrupt("return",Promise.resolve(o));case 13:return e.abrupt("return",Promise.reject(xo));case 14:e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(3),e.abrupt("return",Promise.reject(xo));case 19:case"end":return e.stop()}}),e,this,[[3,16]])})))}},{key:"setLogger",value:function(e){this.logger=e}},{key:"setBaseUrl",value:function(e){var t=this;e!==this.baseUrl&&delete this.axios.defaults.headers.authorization,this.baseUrl=e,this.axios.interceptors.request.use((function(e){return e.baseURL=t.baseUrl,e}),(function(e){return Promise.reject(e)}))}},{key:"setClientInfo",value:function(e){var t=e.clientId,r=e.clientSecret;this.clientId=t,this.clientSecret=r}},{key:"setHttpConfig",value:function(e){if(1===e.sign){var t=e.method,r=void 0===t?"GET":t,n=e.data,i=e.url,o=void 0===i?"":i,s=e.params,a=e.clientId,c=void 0===a?this.clientId:a,u=e.clientSecret,l=void 0===u?this.clientSecret:u,h="";Object.keys(s).map((function(e){h&&(h+="&"),h+="".concat(e,"=").concat(encodeURIComponent(s[e]))}));var d=h?o+"&"+h:o,f=this.loginInfo||{access_token:""},p=f.access_token,v=void 0===p?"":p,g=f.signSecret,m="string"==typeof n?n:JSON.stringify(n)||"",y={method:r.toLocaleUpperCase(),body:m,url:d,clienttype:ro.CLIENT_TYPE,clientId:c,clientSecret:l,token:v,signSecret:g};e.headers=Object.assign(Object.assign({},e.headers),this.getApiHeader(y))}}},{key:"getApiHeader",value:function(e){var t=e.method,r=e.url,n=e.body,i=void 0===n?"":n,o=e.clientId,s=void 0===o?"":o,a=e.clienttype,c=void 0===a?"":a,u=e.clientSecret,l=void 0===u?"":u,h=e.signSecret,d=void 0===h?"":h,f=e.token,p=void 0===f?"":f,v=Math.random(),g=(new Date).getTime(),m=xi().MD5(i).toString(),y="x-xy-clientid=".concat(s,"&x-xy-nonce=").concat(v,"&x-xy-signtype=HMAC_SHA256&x-xy-timestamp=").concat(g),b=(d||l)+"&",S="".concat(t.toLocaleUpperCase(),"\n").concat(y,"\n").concat(r,"\n").concat(m,"\n").concat(b),w=xi().HmacSHA256(S,b).toString().toLocaleUpperCase();return Object.assign({"x-xy-clientid":s,"x-xy-clienttype":c,"x-xy-nonce":v,"x-xy-timestamp":g,"x-xy-signtype":"HMAC_SHA256","x-xy-sign":w,"x-xy-signatureversion":"2.0"},p&&{Authorization:"Bearer ".concat(p||"")})}},{key:"setLoginInfo",value:function(e){this.loginInfo=e}},{key:"getLoginInfo",value:function(){return this.loginInfo}}]),e}();var _o="3.8.1 - build on 2023-05-08 10:12",Io=window.location,Ao=Io.protocol,To=void 0===Ao?"https:":Ao;"localhost"===Io.hostname&&(To="https:");var Ro={"https:":"wss:","http:":"ws:"},Oo={wssProtocol:Ro[To],protocol:To,host:"cloudapi.xylink.com",logHost:"log.xylink.com"},Do=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},No=function(){function e(){l(this,e),this.httpDefaultBaseUrl="".concat(Oo.protocol,"//").concat(Oo.host),this.logHttpDefaultBaseUrl="".concat(Oo.protocol,"//").concat(Oo.logHost),this.http=new Eo({baseURL:this.httpDefaultBaseUrl,timeout:2e4,sign:1}),this.logHttp=new Eo({baseURL:this.logHttpDefaultBaseUrl,timeout:2e4,sign:0}),this.meetingInfo={meetingId:"",callUri:"",vcNumber:""},this.seqId=0,this.statesTime={timeDiff:0},this.commonParams={securityKey:""},this.randomDeviceSN=di()}return d(e,[{key:"setBaseUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e&&this.http.setBaseUrl(e),t&&this.logHttp.setBaseUrl(t)}},{key:"setLogBaseUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e&&this.logHttp.setBaseUrl(e)}},{key:"setClientInfo",value:function(e){var t=e.clientId,r=e.clientSecret;this.http.setClientInfo({clientId:t,clientSecret:r})}},{key:"setLogger",value:function(e){this.http.setLogger(e),this.logHttp.setLogger(e)}},{key:"setMeetingInfo",value:function(e){this.meetingInfo=e}},{key:"setLoginInfo",value:function(e){this.http.setLoginInfo(e)}},{key:"getLoginInfo",value:function(){return this.http.getLoginInfo()}},{key:"upload",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.logHttp.post("/api/rest/v1/log/standardLog",e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),r,this)})))}},{key:"login",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setLoginInfo(null),n=e.userName,i=e.password,o=e.extId,s="/api/rest/iauth/v5/en/login",o&&(s+="?extId=".concat(o)),t.next=6,this.http.put(s,{account:n,password:i,deviceType:Vi,deviceSn:this.randomDeviceSN});case 6:return(a=t.sent).data&&200===a.status&&(this.setCommonParams(a.data),this.http.setLoginInfo(a.data.token)),t.abrupt("return",a);case 9:case"end":return t.stop()}}),r,this)})))}},{key:"encryptLogin",value:function(e){var r;return Do(this,void 0,void 0,t().mark((function n(){var i,o,s,a,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setLoginInfo(null),i=e.userName,o=e.password,t.next=4,this.getPublicKey(i);case 4:return s=t.sent,(a=new(ki())).setPublicKey(s),c=a.encryptLong(xi().SHA512(o).toString(xi().enc.Hex)),u={account:i,password:c,deviceType:Vi,pubKey:s,deviceSn:this.randomDeviceSN},t.next=11,this.http.post("/api/rest/iauth/external/en/encrypt/custom/login/v1",u);case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:if(l=t.t0,1000005!==(null===(r=null==l?void 0:l.data)||void 0===r?void 0:r.errorCode)){t.next=19;break}return t.next=18,this.customLogin(Object.assign(Object.assign({},u),{password:a.encryptLong(o)}));case 18:l=t.sent;case 19:return 200===l.status&&l.data&&(this.setCommonParams(l.data),this.http.setLoginInfo(l.data.token)),t.abrupt("return",l);case 21:case"end":return t.stop()}}),n,this)})))}},{key:"getSdkUserInfo",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setLoginInfo(null),n=e.displayName,i=e.extId,o=e.extUserId,a={extId:i,displayName:n},(s=void 0===o?"":o)&&Object.assign(a,{externalUserId:s}),t.next=6,this.http.post("/api/rest/internal/v1/en/sdk/webRtc/user?extId=".concat(i),a);case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0={};case 9:return t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),r,this)})))}},{key:"getUserInfo",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.get("/admin/current/userinfo/bytoken",{params:{token:e}});case 2:if(!(n=t.sent).data||0!==n.data.code){t.next=6;break}return this.setCommonParams(n.data.data),t.abrupt("return",n.data.data);case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}}),r,this)})))}},{key:"getCallUri",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/uss/v4/callUrlInfoV2",{params:Object.assign(Object.assign({},e),{securityKey:n,version:"v5"})});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"verifyPassword",value:function(e,r){return Do(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,t.next=3,this.http.put("/api/rest/uss/v4/en/cloudmeeting/validation?securityKey=".concat(i),{number:e,passwd:r});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"hand",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.meetingInfo,i=n.meetingId,o=n.callUri,s=n.vcNumber,t.next=3,this.http.post("/page/api/rest/v2/".concat(e,"?meetingId=").concat(i,"&di=").concat(o,"&conferenceNo=").concat(s));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"getDefaultServerConfig",value:function(){return Do(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.http.get("/api/rest/clientConfg/v3/getDefaultServerConfig?securityKey=".concat(this.commonParams.securityKey));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getServerConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Do(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.post("/api/rest/clientConfg/external/serverConfig/default/v1",{excludeConfigNameList:[],includeConfigNameList:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),r,this)})))}},{key:"getCodeByJson",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=null,t.prev=1,t.next=4,new Eo({baseURL:""}).get(e);case 4:(i=t.sent)&&200===i.status&&i.data&&(n=i.data),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(1);case 10:return t.abrupt("return",n);case 11:case"end":return t.stop()}}),r,null,[[1,8]])})))}},{key:"getConference",value:function(e,r,n){return Do(this,void 0,void 0,t().mark((function i(){var o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(n||{}).autoMute,s=void 0===o?0:o,t.abrupt("return",this.http.get("/api/rest/v1/meetingroom/hidden/soft/conference?userProfileId=".concat(e,"&securityKey=").concat(r,"&autoMute=").concat(s)));case 2:case"end":return t.stop()}}),i,this)})))}},{key:"setStates",value:function(e,r){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Do(this,void 0,void 0,t().mark((function o(){var s,a,c,u,l,h,d,f,p,v,g,m,y,b,S;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=this.meetingInfo,a=s.meetingId,c=void 0===a?"":a,u=s.callUri,l=String((new Date).getTime()),h=String((new Date).getTime()+this.statesTime.timeDiff),d=[{seqId:String(this.seqId),createTime:l,alignTime:h,category:e,eventName:r,version:"1.0",meetingId:c,eventValue:JSON.stringify(i)}],f={device:u,msgVer:"0.0.2",sendTime:String((new Date).getTime()),states:d},t.prev=5,p=(new Date).getTime(),t.next=9,this.http.post("/api/rest/v3/device/v2states",f);case 9:v=t.sent,this.seqId++,(null===(n=null==v?void 0:v.data)||void 0===n?void 0:n.currentTime)&&(g=v.data.currentTime,m=void 0===g?0:g,y=(new Date).getTime(),b=Math.round((y-p)/2),S=Number(m)+b-y,this.statesTime.timeDiff=S),t.next=16;break;case 14:t.prev=14,t.t0=t.catch(5);case 16:case"end":return t.stop()}}),o,this,[[5,14]])})))}},{key:"ignoreMeetingMonitor",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(1e3*Math.random()).toFixed(),i=this.commonParams.securityKey,o="/api/rest/uss/v1/cloudmeeting/monitor?securityKey=".concat(i,"&conferenceNumber=").concat(e,"&nonce=").concat(n),t.next=5,this.http.get(o);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),r,this)})))}},{key:"getAllocation",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Do(this,void 0,void 0,t().mark((function i(){var o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="".concat(r,"/api/rest/allocator/v1/webrtc/allocation?key=").concat(e),s={},n&&(s={sign:0}),t.next=5,this.http.get(o,s);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),i,this)})))}},{key:"getWatermarkContent",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,i="/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/".concat(e,"?securityKey=").concat(n),t.next=4,this.http.get(i);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),r,this)})))}},{key:"getEnterpriseId",value:function(e){var r,n=e.extId,i=e.clientId,o=e.clientSecret,s=e.httpServer,a=void 0===s?this.httpDefaultBaseUrl:s;return Do(this,void 0,void 0,t().mark((function e(){var s,c;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s="/api/rest/v1/sdk/enterpriseToken/findByExtId?extId=".concat(n),e.next=3,this.http.get(s,{baseURL:a,sign:1,clientSecret:o,clientId:i});case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(200!==(c=e.t0).status){e.next=9;break}return e.abrupt("return",(null===(r=c.data)||void 0===r?void 0:r.enterpriseId)||"");case 9:return e.abrupt("return","");case 10:case"end":return e.stop()}}),e,this)})))}},{key:"locator",value:function(e){var r=e.extId,n=e.clientId,i=e.clientSecret,o=e.httpServer,s=void 0===o?this.httpDefaultBaseUrl:o;return Do(this,void 0,void 0,t().mark((function e(){var o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="/api/rest/v1/locator/".concat(r,"/node/config"),e.next=3,this.http.get(o,{baseURL:s,sign:1,clientSecret:i,clientId:n});case 3:if(200!==(a=e.sent).status){e.next=6;break}return e.abrupt("return",a.data||[]);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"monitorOperation",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/api/rest/avcloud/external/monitor/monitorOperation/v1",t.next=3,this.http.post("/api/rest/avcloud/external/monitor/monitorOperation/v1",e);case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0={};case 6:return n=t.t0,i=n.data,o=n.status,t.abrupt("return",[200!=+o,i]);case 10:case"end":return t.stop()}}),r,this)})))}},{key:"updateWebViewProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.monitorOperation({meetingId:e,action:"updateWebViewProp",operations:t})}},{key:"checkPermissionWithMeetingNumber",value:function(e,r){return Do(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/api/rest/v3/en/recording/authorization",i=this.commonParams.securityKey,t.next=4,this.http.get("/api/rest/v3/en/recording/authorization",{params:{confNumber:e,meetingId:r,securityKey:i}});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/v3/en/charge/storage?recordingUrl=".concat(e,"&securityKey=").concat(n));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"getEnterpriseMediaConfig",value:function(e,r){return Do(this,void 0,void 0,t().mark((function n(){var i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,t.next=3,this.http.post("/api/rest/clientConfg/external/enterpriseConfig/v4",r,{params:{userId:e,securityKey:i,deviceType:Vi}});case 3:if(200!==(o=t.sent).status){t.next=6;break}return t.abrupt("return",o.data||{});case 6:return t.abrupt("return",{});case 7:case"end":return t.stop()}}),n,this)})))}},{key:"refreshToken",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.refreshToken({refresh_token:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),r,this)})))}},{key:"getMeetingInviteInfo",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,i=e.conferenceNumber,t.next=4,this.http.get("/page/client/shareConference/infomation?conferenceNumber=".concat(i,"&securityKey=").concat(n));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),r,this)})))}},{key:"getCloudMeetingRooms",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/v3/en/user/".concat(e,"/cloudMeetingRooms?securityKey=").concat(n));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"getInComingCallUrlInfo",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){var n,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.commonParams.securityKey,i={avatar:""},t.prev=2,t.next=5,this.http.get("/api/rest/v4/en/incomingcallUrlInfo?securityKey=".concat(n,"&callUrl=").concat(e));case 5:200===(o=t.sent).status&&(i=o.data||{}),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(2);case 11:return t.abrupt("return",i);case 12:case"end":return t.stop()}}),r,this,[[2,9]])})))}},{key:"sendVideoControlResult",value:function(e,r){return Do(this,void 0,void 0,t().mark((function n(){var i,o,s,a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,o=this.meetingInfo,s=o.meetingId,a=void 0===s?"":s,c=o.callUri,u=o.vcNumber,t.next=4,this.http.post("/page/api/rest/v2/callback?securityKey=".concat(i,"&meetingId=").concat(a,"&deviceUri=").concat(c,"&conferenceNo=").concat(u,"&mpvc="),{type:e,value:r});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"setCommonParams",value:function(e){var t=(e||{}).securityKey;this.commonParams.securityKey=t}},{key:"getPublicKey",value:function(e){var r;return Do(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.get("/api/rest/iauth/v1/en/publicKey",{params:{account:e,deviceType:Vi}});case 2:if(200!==(i=t.sent).status){t.next=5;break}return t.abrupt("return",(null===(r=i.data)||void 0===r?void 0:r.pubkey)||"");case 5:return t.abrupt("return","");case 6:case"end":return t.stop()}}),n,this)})))}},{key:"customLogin",value:function(e){return Do(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.post("/api/rest/iauth/external/en/custom/login/v1",e);case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0={};case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),r,this)})))}}]),e}();const Lo=new No;var Po=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Mo=function(){function e(){var r=this;l(this,e),this.stopDB=function(){r.db.stop()},this.openDB=function(){r.db.open()},this.initDB=function(){return Po(r,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.db.init();case 2:case"end":return e.stop()}}),e,this)})))},this.setLogLevel=function(e){r.currentLevel=e},this.putLog=function(e,n,i,o){return Po(r,void 0,void 0,t().mark((function r(){var s,a=this;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(s={time:o,title:e,content:n,rest:i},!this.db||!this.db.isOpen()){r.next=12;break}if(!this.cacheData.length||this.isAddCache){r.next=8;break}return this.isAddCache=!0,r.next=6,Promise.all(this.cacheData.map((function(e){return Po(a,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.db.add(e);case 2:case"end":return t.stop()}}),r,this)})))})));case 6:this.cacheData=[],this.isAddCache=!1;case 8:return r.next=10,this.db.add(s);case 10:r.next=14;break;case 12:this.cacheData.length>10&&this.cacheData.shift(),this.cacheData.push(s);case 14:case"end":return r.stop()}}),r,this)})))},this.downloadLog=function(){return Po(r,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.db.export();case 2:case"end":return e.stop()}}),e,this)})))},this.setLogServer=function(e){Lo.setLogBaseUrl(e)},this.db=new oi(10),this.LogLevel={INFO:"INFO",DEBUG:"DEBUG",WARNING:"WARNING",ERROR:"ERROR",NONE:"NONE"},this.currentLevel=this.LogLevel.NONE,this.isArrowUpload=!0,this.cacheData=[],this.isAddCache=!1}return d(e,[{key:"debug",value:function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.LogLevel.DEBUG,i=zn(),o=arguments.length,s=new Array(o>2?o-2:0),a=2;a<o;a++)s[a-2]=arguments[a];this.currentLevel===n&&"meeting-stats"!==t&&(e=console).log.apply(e,["[".concat(Xn(),"][DEBUG]"),t,r].concat(s));this.putLog(t,r,s,i)}},{key:"log",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.LogLevel,i=n.INFO,o=n.DEBUG,s=zn();r=Jn(r,yo);for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];this.currentLevel!==o&&this.currentLevel!==i||(t=console).log.apply(t,["[".concat(Xn(),"][INFO]"),e,r].concat(c));this.putLog(e,r,c,s)}},{key:"warn",value:function(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.LogLevel,i=n.INFO,o=n.DEBUG,s=n.WARNING,a=zn(),c=arguments.length,u=new Array(c>2?c-2:0),l=2;l<c;l++)u[l-2]=arguments[l];this.currentLevel!==o&&this.currentLevel!==i&&this.currentLevel!==s||(t=console).log.apply(t,["[".concat(Xn(),"][WARN]"),e,r].concat(u));this.putLog(e,r,u,a)}},{key:"error",value:function(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.LogLevel,i=n.INFO,o=n.DEBUG,s=n.ERROR,a=n.WARNING,c=zn(),u=arguments.length,l=new Array(u>2?u-2:0),h=2;h<u;h++)l[h-2]=arguments[h];this.currentLevel!==o&&this.currentLevel!==s&&this.currentLevel!==i&&this.currentLevel!==a||(t=console).log.apply(t,["[".concat(Xn(),"][ERROR]"),e,r].concat(l));this.putLog(e,r,l,c)}},{key:"enableLogUpload",value:function(){this.isArrowUpload=!0}},{key:"disableLogUpload",value:function(){this.isArrowUpload=!1}},{key:"uploadLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Po(this,void 0,void 0,t().mark((function i(){var o,s,a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isArrowUpload){t.next=37;break}return t.next=3,this.db.upload(e);case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0="";case 6:return o=t.t0,s=new FormData,a=Math.ceil(1e4*Math.random())+"",c=Date.now()+"",s.append("comments",n||e),s.append("sn",a),s.append("userId",a),s.append("deviceId",a),s.append("deviceType","WebrtcSDK"),s.append("userDisplayName",e),s.append("deviceDisplayName",navigator.userAgent),s.append("dataType","userSubmit"),s.append("account",r),s.append("number",""),s.append("softwareVersion",""),s.append("osVersion",""),s.append("deviceModel",""),s.append("crashType","UI"),s.append("crashTime",c),s.append("suffixName",".zip"),s.append("file",o,"webrtc_log.zip"),t.prev=27,t.next=30,Lo.upload(s);case 30:return u=t.sent,t.abrupt("return",u&&(u.status>=200||u.status<300));case 34:return t.prev=34,t.t1=t.catch(27),t.abrupt("return",!1);case 37:case"end":return t.stop()}}),i,this,[[27,34]])})))}}]),e}();r(2419);function Bo(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 jo(e,t){if(e){if("string"==typeof e)return Bo(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)?Bo(e,t):void 0}}function Go(e){return function(e){if(Array.isArray(e))return Bo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jo(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 Ho(e){return Ho="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},Ho(e)}function Uo(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=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(e,t)||jo(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 Ko(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fo(e,t){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fo(e,t)}function Vo(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&&Fo(e,t)}function Yo(e,t){if(t&&("object"===Ho(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ko(e)}function zo(e){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zo(e)}r(4812),r(4553),r(5306),r(9254),r(1532);var Xo={en_US:{default:"The call is abnormal, please try again later",OK:"Call ended",KickoutTipContent:"Your account is logged in at another location and you are forced to go offline",SHARE_CONTENT_FAILED:"Share content failed",LOCAL_NET_DISCONNECT:"The network is interrupted and the call is disconnected",TOKEN_INVALID:"Login has expired, please log in again"},zh_CN:{default:"呼叫异常,请稍后重试",OK:"通话已结束",KickoutTipContent:"您的账号在另一地点登录,您被迫下线",SHARE_CONTENT_FAILED:"分享屏幕失败",LOCAL_NET_DISCONNECT:"网络中断,呼叫已断开",TOKEN_INVALID:"登录已失效,请重新登录"},zh_TW:{default:"呼叫異常,請稍後重試",OK:"通話已結束",KickoutTipContent:"您的賬號在另一地點登錄,您被迫下線",SHARE_CONTENT_FAILED:"分享屏幕失敗",LOCAL_NET_DISCONNECT:"網絡中斷,呼叫已斷開",TOKEN_INVALID:"登錄已失效,請重新登錄"}},Wo=function(){function e(){l(this,e),this.events={}}return d(e,[{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if("function"!=typeof t)throw new TypeError("The listener not a function");this.events||(this.events={}),this.events[e]||(this.events[e]=[]),this.events[e].push({total:r,listener:t})}},{key:"once",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.on(e,t,r)}},{key:"removeListener",value:function(e){this.events[e]&&(this.events[e].length=0)}},{key:"removeAllListener",value:function(){this.events={}}},{key:"emmit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.events[e]&&this.events[e].forEach((function(r,i){if((-1===r.total||r.total>=1||"function"==typeof r.listener)&&r.listener.apply(t,n),r.total>=1){var o=t.events[e][i].total-1;t.events[e][i].total=o,0===o&&(t.events[e][i].listener=function(){})}}))}}]),e}(),qo=[],$o=function(){function e(t,r){var n=this;l(this,e),this.onOpenSocket=function(e){n.isConnected=!0,n.lockReconnect=!1,n.reconnectCount=0,n.options.openHeatBeat&&n.sendHeartBeat(),n.emit("open",e)},this.onHandleMessage=function(e){n.options.openHeatBeat&&e.data===n.options.pangData?n.clearPangTimer():n.emit("message",e)},this.onCloseSocket=function(e){if(n.isConnected=!1,n.logger.log("close websocket success",e.code+","+e.reason+","+e.wasClean),n.logger.log("this.messageList: ",n.messageList),4e3===e.code)return n.isClose=!0,void n.emit("close",e);n.lockReconnect||(n.reconnectCount>=1?n.reconnectTimer||(n.reconnectTimer=setTimeout((function(){n.reConnect(),n.reconnectTimer=null}),n.reconnectOffset)):n.reConnect(),n.emit("error",e))},this.onErrorSocket=function(e){n.logger.log("error connection websocket"),n.isConnected=!1,n.lockReconnect||(n.reconnectCount>=1?n.reconnectTimer||(n.reconnectTimer=setTimeout((function(){n.reConnect(),n.reconnectTimer=null}),n.reconnectOffset)):n.reConnect(),n.emit("error",e))};this.logger=r.logger,this.client=r,this.options=Object.assign(Object.assign({},{protocols:[],pingData:"PING",pangData:"PONG",autoReConnect:!0,openHeatBeat:!0,params:{}}),t),this.heatBeatFrequency=15e3,this.timeOffset=1e4,this.reconnectCount=0,this.reconnectLimit=5,this.lockReconnect=!1,this.messageList={},this.headBeatTimer=null,this.isConnected=!1,this.isClose=!1,this.reconnectOffset=3e3,this.reconnectTimer=null,this.connect(!1),this.addEvent()}return d(e,[{key:"connect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,r=t.url,n=t.params,i=r+"?";if(window.WebSocket){var o=Object.keys(n),s=o.length;o.forEach((function(t,r){var o=r===s-1?"":"&";i+=e&&"start"===t?"".concat(t,"=",!1):"".concat(t,"=").concat(n[t]),i+=o})),this.logger.log("[wss]wss url:",i),this.socket=new WebSocket(i,this.options.protocols),qo.push(this.socket),e&&(this.lockReconnect=!1)}else this.emit("error",$n("XYSDK:950116","Current browser cannot support Websocket, please use XyRTC sdk in chrome!"))}},{key:"addEvent",value:function(){this.socket.addEventListener("open",this.onOpenSocket),this.socket.addEventListener("message",this.onHandleMessage),this.socket.addEventListener("close",this.onCloseSocket),this.socket.addEventListener("error",this.onErrorSocket)}},{key:"removeEvent",value:function(){this.socket.removeEventListener("open",this.onOpenSocket),this.socket.removeEventListener("message",this.onHandleMessage),this.socket.removeEventListener("close",this.onCloseSocket),this.socket.removeEventListener("error",this.onErrorSocket)}},{key:"sendHeartBeat",value:function(){var e=this;this.headBeatTimer||(this.socket.send(this.options.pingData||"PING"),this.clearTimeout()),this.headBeatTimer=setInterval((function(){e.client.disconnected?e.clearBeatTimer():(e.socket.send(e.options.pingData||"PING"),e.clearTimeout())}),this.heatBeatFrequency)}},{key:"clearTimeout",value:function(){var e=this;this.pangTimer=setTimeout((function(){e.emit("timeout",""),e.options.autoReConnect&&e.reConnect()}),this.timeOffset)}},{key:"emit",value:function(e,t){this.messageList[e]&&this.messageList[e].forEach((function(e){e(t)}))}},{key:"clearPangTimer",value:function(){this.pangTimer&&clearTimeout(this.pangTimer)}},{key:"clearBeatTimer",value:function(){this.headBeatTimer&&clearInterval(this.headBeatTimer)}},{key:"clearReconnectTimer",value:function(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}},{key:"reset",value:function(){this.clearBeatTimer(),this.clearPangTimer(),this.clearReconnectTimer(),this.messageList={}}},{key:"on",value:function(e,t){this.messageList[e]?this.messageList[e].push(t):this.messageList[e]=[t]}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.socket&&this.socket.close(),qo.map((function(e){e&&e.close()})),qo=[],this.clearBeatTimer(),this.clearPangTimer(),this.clearReconnectTimer(),e||(this.messageList={}),this.removeEvent()}},{key:"send",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n="string"==typeof e,i=t&&!n?JSON.stringify(e):e,o={0:"connection",1:"open",2:"closing",3:"closed"};r&&(this.logger.log("send wss message: ",e),this.isConnected||(this.logger.log("wss connected status: ",this.isConnected),this.logger.log("socket connection status: ",o[this.socket.readyState]||"unknown"))),this.isConnected?this.isClose?this.logger.log("send wss msg failed, because socket is close"):(1===this.socket.readyState&&(this.socket.send(i),r&&this.logger.log("msg sent successfully")),"STOP_CALL"===e.type&&this.stopCall()):r&&this.logger.log("send wss msg failed, because socket is closed")}},{key:"stopCall",value:function(){var e=this;this.isConnected=!1,setTimeout((function(){e.close()}),10)}},{key:"reConnect",value:function(){if(!this.client.disconnected&&!this.lockReconnect){if(this.reconnectCount>=this.reconnectLimit)return this.isClose=!0,void this.emit("close",null);this.lockReconnect=!0,this.reconnectCount+=1,this.logger.log("reconnect is trigger"),this.logger.log("reconnect count:",this.reconnectCount),this.close(!0),this.emit("reconnect",""),this.connect(!0),this.addEvent()}}}]),e}();const Zo=$o;r(5212);var Jo=r(738),Qo=r.n(Jo);function es(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ts(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ts(e,t)}(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,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function ts(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 rs=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ns=function(){function e(t,r){l(this,e),this.filterInternels=function(e){var t=Qo()(e);return Object.keys(t.audioReceiver).forEach((function(e){var r=t.audioReceiver[e];r.bytesReceivedSecond>0||r.audioLevel||delete t.audioReceiver[e]})),t};var n=t.logger,i=t.invite;this.client=t,this.peerStatus={peerconnectionStatus:"disconnected",iceConnectionState:"disconnected"},this.invite=i,this.logger=n,this.connectCount=0,this.stream=r,this.streamSenders=[],this.senderTimmer=null,this.internels=Qo()(ro.INIT_INTERNELS),this.isShareContent=!1,this.isResendContentOffer=lo,this.isRestartIceConnection=!1,this.isFirstConnected=!1,this.onHandleNegotiationNeeded=this.onHandleNegotiationNeeded.bind(this),this.onHandleIceConnectionStateChange=this.onHandleIceConnectionStateChange.bind(this),this.onHandleConnectionStateChange=this.onHandleConnectionStateChange.bind(this),this.onHandleIcecandidateerror=this.onHandleIcecandidateerror.bind(this),this.onTrack=this.onTrack.bind(this),this.init()}return d(e,[{key:"getInternels",value:function(){return this.internels}},{key:"init",value:function(){this.initTimmer(),this.peerConnection=new RTCPeerConnection(eo),this.peerConnection.onnegotiationneeded=this.onHandleNegotiationNeeded,this.peerConnection.oniceconnectionstatechange=this.onHandleIceConnectionStateChange,this.peerConnection.onconnectionstatechange=this.onHandleConnectionStateChange,this.peerConnection.onicecandidateerror=this.onHandleIcecandidateerror,null===this.peerConnection.ontrack?this.peerConnection.ontrack=this.onTrack:this.peerConnection.addEventListener("track",this.onTrack)}},{key:"sendEmmit",value:function(e,t,r,n){this.isRestartIceConnection&&"XYSDK:950517"!==t||("XYSDK:950518"===t&&this.client.setPeerConnectionStatus(!0),this.client.emmit(e,{code:t,msg:r,detail:n}))}},{key:"stopConnectTimmer",value:function(){this.isRestartIceConnection=!1,this.connectTimmer&&clearTimeout(this.connectTimmer),this.connectTimmer=null,this.connectCount=0}},{key:"initTimmer",value:function(){var e=this;this.connectTimmer=setTimeout((function(){var t=e.peerStatus,r=t.peerconnectionStatus,n=t.iceConnectionState,i=Qo()(e.peerStatus);return e.connectCount>40?(e.sendEmmit("call-status","XYSDK:950517","呼叫失败","PEER_NET_DISCONNECT"),e.stopConnectTimmer(),void e.logger.log("loop peer status after 40s: ",i)):"connected"!==r&&"unknown"!==r||"connected"!==n&&"completed"!==n?(20===e.connectCount&&(e.sendEmmit("call-status","XYSDK:950519","正在呼叫中,请等候","waiting"),e.logger.log("loop peer status after 20s: ",i)),e.connectCount+=.5,void e.initTimmer()):(e.isFirstConnected=!0,e.sendEmmit("call-status","XYSDK:950518","入会成功","success"),e.stopConnectTimmer(),void e.logger.log("loop peer status: ",i))}),500)}},{key:"onHandleNegotiationNeeded",value:function(){return rs(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createBaseOfferConnection();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"createBaseOfferConnection",value:function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rs(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.peerConnection){t.next=10;break}return t.next=4,this.peerConnection.createOffer(r);case 4:return(i=t.sent).sdp=null===(e=i.sdp)||void 0===e?void 0:e.replace("useinbandfec=1","useinbandfec=0"),t.next=8,this.peerConnection.setLocalDescription(i);case 8:this.sendSocketMessage("offer",{sdp:i.sdp}),this.client.sendPeopleCapability();case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),this.logger.error("create offer error: ",t.t0);case 15:case"end":return t.stop()}}),n,this,[[0,12]])})))}},{key:"sendSocketMessage",value:function(e,t){var r=this.invite,n=r.meetingId,i=r.callerUri,o=r.callIndex;this.client.sendSocketMessage({type:"PASS_THROUGH",callIndex:o,body:Object.assign({type:e,meetingId:n,endpointId:i},t)})}},{key:"handleCandidate",value:function(e){var r;return rs(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return delete e.type,t.prev=1,t.next=4,null===(r=this.peerConnection)||void 0===r?void 0:r.addIceCandidate(new RTCIceCandidate(e));case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),this.logger.error("peer add ice candidate error: ",t.t0);case 9:case"end":return t.stop()}}),n,this,[[1,6]])})))}},{key:"handleAnswer",value:function(e){var r;return rs(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,null===(r=this.peerConnection)||void 0===r?void 0:r.setRemoteDescription(new RTCSessionDescription(e));case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),this.logger.log("handle answer error:",{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,code:null===t.t0||void 0===t.t0?void 0:t.t0.code,message:null===t.t0||void 0===t.t0?void 0:t.t0.message});case 8:case"end":return t.stop()}}),n,this,[[0,5]])})))}},{key:"setBandWidth",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ro.VIDE_BANDWIDTH_BIT,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return rs(this,void 0,void 0,t().mark((function o(){var s,a,c,u,l,h;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=es(this.streamSenders),t.prev=1,s.s();case 3:if((a=s.n()).done){t.next=22;break}if(c=a.value,!(u=c.sender)||!u.track||"video"!==u.track.kind||e!==u.track.id){t.next=20;break}return l=null,t.prev=8,l=u.getParameters()||{encodings:[{maxBitrate:ro.VIDE_BANDWIDTH_BIT}]},h=n?1e3*r:r,(null==l?void 0:l.encodings)&&l.encodings[0]?l.encodings[0].maxBitrate=h:l.encodings=[{maxBitrate:h}],t.next=14,u.setParameters(l);case 14:this.logger.log("set bandwidth successfully",{params:l,realBandwidth:h,trackId:u.track.id,streamId:null==i?void 0:i.id}),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(8),this.logger.error("set bandwidth failed",l,t.t0);case 20:t.next=3;break;case 22:t.next=27;break;case 24:t.prev=24,t.t1=t.catch(1),s.e(t.t1);case 27:return t.prev=27,s.f(),t.finish(27);case 30:case"end":return t.stop()}}),o,this,[[1,24,27,30],[8,17]])})))}},{key:"onHandleIceConnectionStateChange",value:function(e){var r,n;return rs(this,void 0,void 0,t().mark((function i(){var o,s,a,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.peerStatus.peerconnectionStatus,s=this.peerConnection||{connectionState:"unknown"},a=s.connectionState,c=void 0===a?"unknown":a,this.logger.log("the peerConnection connectionState when ice change: ",null===(r=this.peerConnection)||void 0===r?void 0:r.connectionState),this.peerStatus={iceConnectionState:null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.iceConnectionState,peerconnectionStatus:"connected"===o?o:c},!u){t.next=10;break}if("unknown"!==this.peerStatus.peerconnectionStatus||"disconnected"!==this.peerStatus.iceConnectionState&&"failed"!==this.peerStatus.iceConnectionState&&"closed"!==this.peerStatus.iceConnectionState){t.next=10;break}return this.logger.log("[Firefox] ice state: ",this.peerStatus.iceConnectionState),"STARTING"===this.client.shareContentStatus&&this.client.sendContentCapabilityMessage(),t.next=10,this.restartIceConnection();case 10:this.logger.log("ice change status: ",Qo()(this.peerStatus));case 11:case"end":return t.stop()}}),i,this)})))}},{key:"onHandleConnectionStateChange",value:function(){var e;return rs(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(null===(e=this.peerConnection)||void 0===e?void 0:e.connectionState)||"",this.logger.log("peerconnection status change: ",{currentStatus:n,previousStatus:this.peerStatus.peerconnectionStatus}),"connected"!==this.peerStatus.peerconnectionStatus||"connected"===n){t.next=10;break}return"STARTING"===this.client.shareContentStatus&&this.client.sendContentCapabilityMessage(),this.peerStatus=Object.assign(Object.assign({},this.peerStatus),{peerconnectionStatus:n}),this.logger.log("this.peerStatus before restart: ",this.peerStatus),t.next=8,this.restartIceConnection();case 8:t.next=12;break;case 10:this.peerStatus=Object.assign(Object.assign({},this.peerStatus),{peerconnectionStatus:n}),this.logger.log("this.peerStatus: ",this.peerStatus);case 12:case"end":return t.stop()}}),r,this)})))}},{key:"onHandleIcecandidateerror",value:function(e){this.logger.log("ice candidate error:",e)}},{key:"restartIceConnection",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return rs(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("restart ice connection:",{isRestartIceConnection:this.isRestartIceConnection,isFirstConnected:this.isFirstConnected}),this.isRestartIceConnection=e&&this.isFirstConnected,this.initTimmer(),t.next=5,this.createBaseOfferConnection({iceRestart:!0});case 5:case"end":return t.stop()}}),r,this)})))}},{key:"close",value:function(){var e=this;this.stopConnectTimmer(),this.peerConnection&&(this.streamSenders.forEach((function(t){var r;(null==t?void 0:t.sender)&&(null===(r=e.peerConnection)||void 0===r||r.removeTrack(t.sender))})),this.peerConnection.onicecandidate=null,this.peerConnection.removeEventListener&&this.peerConnection.removeEventListener("track",this.onTrack),this.peerConnection.ontrack=null,this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicegatheringstatechange=null,this.peerConnection.onnegotiationneeded=null,this.peerConnection&&this.peerConnection.close&&this.peerConnection.close(),this.peerConnection=null),this.senderTimmer&&clearInterval(this.senderTimmer),this.senderTimmer=null,this.isShareContent=!1,this.isFirstConnected=!1,this.isRestartIceConnection=!1}},{key:"setRestartIceConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isRestartIceConnection=e}},{key:"publish",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ALL",r=e.getMediaStreams(),n=r.streams,i=r.pipelineStreams,o=r.contentStreams;"ALL"===t?("NORMAL"!==e.current.type&&"AUDIO_ONLY"!==e.current.type&&"VIDEO_ONLY"!==e.current.type||this.addTransceiver(n,"sendrecv"),this.addTransceiver(i,"recvonly"),this.logger.log("publish people stream successfully")):"CONTENT"===t&&(this.isShareContent?this.resetContentStream(o):(this.addTransceiver(o,"sendonly"),this.isResendContentOffer===ho&&(this.isResendContentOffer=fo),this.logger.log("push content use addTransceiver.")),this.isShareContent=!0,this.logger.log("publish content stream successfully: ",this.streamSenders)),this.initSenderStatus()}},{key:"reSendContentOffer",value:function(){this.isResendContentOffer===lo&&(this.isResendContentOffer=ho)}},{key:"resetContentStream",value:function(e){var t;if(this.replaceTrack(e),this.isResendContentOffer===ho){var r=e.find((function(e){return"720"===e.resolution}));if(r){var n=null===(t=r.stream)||void 0===t?void 0:t.getAudioTracks()[0];n&&this.addStreamRenders(n,"sendonly",r)}this.isResendContentOffer=fo}this.logger.log("push content use replaceTrack.")}},{key:"replacePeopleVideoTrack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video";this.logger.log("replace peopoe video track: ",t);var r=e.getMediaStreams(),n=r.streams;"audio"===t?this.replaceAudioTrack(n):this.replaceVideoTrack(n)}},{key:"initSenderStatus",value:function(){var e=this;this.senderInterval=0,this.senderTimmer||(this.calcMeetingStats(),this.senderTimmer=setInterval((function(){return rs(e,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.senderInterval=this.senderInterval+1,e.next=3,this.calcMeetingStats();case 3:case"end":return e.stop()}}),e,this)})))}),2e3))}},{key:"closeContentStream",value:function(){var e=this;this.streamSenders.forEach((function(t,r){"contentStream"===t.type&&(t.sender.replaceTrack(null),e.streamSenders[r].status="ended")}))}},{key:"getPeerStatus",value:function(){var e=this.peerStatus.peerconnectionStatus;return this.logger.log("get peer status: ",this.peerStatus),"connected"===e}},{key:"setStream",value:function(e,t){var r,n=this;this.logger.log("set stream: ",{streamListLen:e.length,kind:t});var i=(null===(r=this.peerConnection)||void 0===r?void 0:r.getTransceivers())||[],o=0,s=0;e.forEach((function(e){var r;null===(r=e.stream)||void 0===r||r.getTracks().forEach((function(r){if(r.kind===t&&("audio"===t&&"180"===e.resolution||"video"===t))for(;o<i.length;){if(!i[o].sender.track&&"sendrecv"!==i[o].direction&&i[o].receiver.track.kind===r.kind){i[o].direction="sendrecv",i[o].sender.setStreams(e.stream),i[o].sender.replaceTrack(r),0===s&&(n.logger.log("sender replace track success"),s++),n.setStreamSenders(r,e,i[o]),o++;break}o++}}))}))}},{key:"calcMeetingStats",value:function(){return rs(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,u,l,h,d,f,p,v,g,m,y,b,S,w,k,C,x,E,_,I,A,T,R,O,D,N,L,P,M,B,j,G,H,U,K,F,V,Y,z,X,W,q,$;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Qo()(ro.INIT_INTERNELS),n=!1,i=this.client.invite.callerUri,o=this.client.getLayoutList(),s=0,a=0,u=0,l=0,h=0,d=0,f=0,p=0,v=this.client.getAudioTrackList(),g=v.length,r.mimeType=Fi,r.timestamp=(new Date).valueOf(),m=es(o.entries()),e.prev=17,m.s();case 19:if((y=m.n()).done){e.next=41;break}if(b=Uo(y.value,2),b[0],S=b[1],w=S.roster.endpointId,w===i||S.roster.videoTxMute){e.next=39;break}if(k=S.roster.id,!(C=this.client.getVideoManagers())||!C[k]){e.next=39;break}if(x=C[k],!((E=null==x?void 0:x.getVideoTracks())&&E[0]&&this.peerConnection)){e.next=39;break}return e.next=32,this.peerConnection.getStats(E[0]);case 32:_=e.sent,I=this.getReceiverStatus(_,S,r),s+=I.bytesReceivedSecond||0,h+=I.packetsReceivedSecond||0,d+=I.packetsLostSecond||0,!I.frameWidth&&E[0]&&(A=E[0].getSettings(),T=A.width,R=void 0===T?0:T,O=A.height,D=void 0===O?0:O,I.frameWidth=R,I.frameHeight=D),r.receiver[E[0].id]=I;case 39:e.next=19;break;case 41:e.next=46;break;case 43:e.prev=43,e.t0=e.catch(17),m.e(e.t0);case 46:return e.prev=46,m.f(),e.finish(46);case 49:N=0;case 50:if(!(N<v.length)){e.next=67;break}if(L=v[N],!(P=L.rest.track)||"live"!==P.readyState||!this.peerConnection){e.next=64;break}return e.next=56,this.peerConnection.getStats(P);case 56:M=e.sent,(B=this.getReceiverAudioTrackStatus(M,P)).bytesReceivedSecond=Math.max(B.bytesReceivedSecond,0),f+=B.packetsReceivedSecond||0,p+=B.packetsLostSecond||0,j=g===N+1,Object.assign(B,{isContent:j}),r.audioReceiver[P.id]=B;case 64:N++,e.next=50;break;case 67:G=0,H=0,U=0,K=0,F=es(this.streamSenders.entries()),e.prev=72,F.s();case 74:if((V=F.n()).done){e.next=90;break}if(Y=Uo(V.value,2),Y[0],"active"!==(z=Y[1]).status||!z.track){e.next=88;break}return e.next=79,z.sender.getStats();case 79:X=e.sent,W="audio"===z.track.kind?"audioSender":"sender",q=this.getSenderStatus(W,X,r,z,!n),"video"===z.track.kind&&(a+=q.bytesSentSecond||0,u+=q.packetsSentSecond||0,l+=q.packetsLostSecond||0,U=Math.max(U,1e3*(q.jitter||0)),K=Math.max(K,1e3*(q.roundTripTime||0))),"audio"===z.track.kind&&(H+=q.packetsSentSecond||0,G+=q.packetsLostSecond||0,r.audioSendJitter=Math.floor(1e3*(q.jitter||0))),r.jitterSent=Math.floor(U),r.roundTripTime=Math.floor(K),r[W][z.track.id]=q,n=!0;case 88:e.next=74;break;case 90:e.next=95;break;case 92:e.prev=92,e.t1=e.catch(72),F.e(e.t1);case 95:return e.prev=95,F.f(),e.finish(95);case 98:r.fractionLostSent=this.getLost(u,l),r.audioSendLost=this.getLost(H,G),r.fractionLostReceived=this.getLost(h,d),r.audioRecvLost=this.getLost(f,p),r.bytesSentSecond=a,r.bytesReceivedSecond=s,this.internels=r,$=this.filterInternels(r),this.client.reportQualityData($),this.client.debug&&this.client.sendInternels($),this.senderInterval>=3&&r.bytesSentSecond<500&&(this.logger.debug("get network:",c.getNetWork()),this.logger.debug("meeting-stats",r),this.senderInterval=0);case 109:case"end":return e.stop()}}),e,this,[[17,43,46,49],[72,92,95,98]])})))}},{key:"getLost",value:function(e,t){return 0===e?0:Math.max(Math.floor(t/(t+e)*100),0)}},{key:"addTransceiver",value:function(e,t){var r=this;e.forEach((function(e){var n=e.status,i=e.domStream,o=e.stream;"NORMAL"===n?null==o||o.getTracks().forEach((function(n){r.addStreamRenders(n,t,e)})):"DOMSTRING"===n&&i.forEach((function(n){r.addStreamRenders(n,t,e)}))})),this.logger.log("transceiver senders: ",this.streamSenders)}},{key:"addStreamRenders",value:function(e,t,r){var n=this.addTransceiverByPeer(e,t,r);this.setStreamSenders(e,r,n)}},{key:"preferCodec",value:function(e,t){var r=[];return e.forEach((function(e){e.mimeType===t&&r.push(e)})),r}},{key:"addTransceiverByPeer",value:function(e,t,r){var n,i={direction:t},o="NORMAL"===r.status,s=e.kind;return o&&r.stream&&(i.streams=[r.stream],s=e),null===(n=this.peerConnection)||void 0===n?void 0:n.addTransceiver(s,i)}},{key:"setStreamSenders",value:function(e,r,n){var i;return rs(this,void 0,void 0,t().mark((function o(){var s,a,c,l,h,d,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s="NORMAL"===r.status,a=e.kind,c={resolution:r.resolution,track:s?e:null,sender:n.sender,type:r.type,status:s?"active":"invalid"},("video"!==a||"remoteStream"!==r.type&&"contentStream"!==r.type)&&("audio"!==a||"180"!==r.resolution&&"contentStream"!==r.type)){t.next=24;break}if(!u||"video"!==(null===(i=c.track)||void 0===i?void 0:i.kind)){t.next=23;break}if(!(l=c.sender)||!l.track||"video"!==l.track.kind){t.next=23;break}return h=l.track.getSettings().height,d=null,f=1,t.prev=10,720===h&&(f=po[c.resolution]),360===h&&"180"===c.resolution&&(f=2),(null==(d=l.getParameters()||{encodings:[{}]})?void 0:d.encodings)&&d.encodings[0]?d.encodings[0].scaleResolutionDownBy=f:d.encodings=[{scaleResolutionDownBy:f}],this.logger.log("set stream sender in firefox:",d),t.next=18,l.setParameters(d);case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(10),this.logger.error("set bandwidth failed",d,t.t0);case 23:this.streamSenders.push(c);case 24:case"end":return t.stop()}}),o,this,[[10,20]])})))}},{key:"replaceAudioTrack",value:function(e){var t=this;this.logger.log("replace audio track");var r=e.find((function(e){return"180"===e.resolution&&e.stream}));if(null==r?void 0:r.stream){var n=r.stream.getAudioTracks()[0];this.streamSenders.forEach((function(e,r){"180"===e.resolution&&e.track&&"audio"===e.track.kind&&(e.sender.replaceTrack(n),t.streamSenders[r].status="active",t.streamSenders[r].track=n)}))}}},{key:"replaceVideoTrack",value:function(e){var t=this;this.logger.log("replace video track:",e.length),e.forEach((function(e){var r;null===(r=e.stream)||void 0===r||r.getTracks().forEach((function(r){"video"===(null==r?void 0:r.kind)&&t.streamSenders.forEach((function(n,i){var o;"video"===(null===(o=n.track)||void 0===o?void 0:o.kind)&&n.type===e.type&&e.resolution===n.resolution&&(n.sender.replaceTrack(r),t.streamSenders[i].status="active",t.streamSenders[i].track=r)}))}))}))}},{key:"replaceTrack",value:function(e){var t=this;e.forEach((function(e){var r;null===(r=e.stream)||void 0===r||r.getTracks().forEach((function(r){t.streamSenders.forEach((function(n,i){var o;(null===(o=n.track)||void 0===o?void 0:o.kind)===(null==r?void 0:r.kind)&&n.type===e.type&&e.resolution===n.resolution&&(n.sender.replaceTrack(r),t.streamSenders[i].status="active",t.streamSenders[i].track=r)}))}))}))}},{key:"getSenderStatus",value:function(e,t,r,n,i){var o=this,s={};if(t.forEach((function(t){var a,c,u,l,h,d=t.type,f=t.bytesReceived,p=void 0===f?0:f,v=t.timestamp,g=void 0===v?0:v,m=t.mimeType,y=t.audioLevel,b=void 0===y?0:y;switch(r.timestamp=g,r.mimeType=Fi,s.isContent="contentStream"===n.type,d){case"transport":if(i){var S=t.bytesSent,w=void 0===S?0:S,k=o.rateBytesCalculator(t,"bytesSent","timestamp",8,1),C=o.rateBytesCalculator(t,"bytesReceived","timestamp",8,1);r.bytesSent=w,r.bytesReceived=p,r.bytesReceivedSecond=C,r.timestamp=g,r.bytesSentSecond=k}break;case"track":var x=t.frameWidth,E=void 0===x?0:x,_=t.frameHeight,I=void 0===_?0:_,A=t.framesSent,T=void 0===A?0:A,R=t.hugeFramesSent,O=void 0===R?0:R,D=o.rateBytesCalculator(t,"framesSent","timestamp",1,1e3,o.internels[e][(null===(a=n.track)||void 0===a?void 0:a.id)||""]);"sender"===e&&(s.frameWidth=E,s.frameHeight=I),s.framesSent=T,s.framesSentSecond=D,s.hugeFramesSent=O,s.timestamp=g,s.type=n.type,s.status=n.status,s.resolution=n.resolution,s.expBandwidth=10;break;case"outbound-rtp":var N=t.bytesSent,L=t.framesEncoded,P=t.packetsSent,M=t.keyFramesEncoded,B=void 0===M?"N/A":M,j=t.nackCount,G=t.ssrc,H=t.pliCount,U=void 0===H?0:H,K=t.firCount,F=void 0===K?0:K,V=o.rateBytesCalculator(t,"framesEncoded","timestamp",1,1e3,o.internels[e][(null===(c=n.track)||void 0===c?void 0:c.id)||""]),Y=o.rateBytesCalculator(t,"bytesSent","timestamp",8,1,o.internels[e][(null===(u=n.track)||void 0===u?void 0:u.id)||""]),z=o.rateBytesCalculator(t,"packetsSent","timestamp",1,1e3,o.internels[e][(null===(l=n.track)||void 0===l?void 0:l.id)||""]);"sender"===e&&(t.frameWidth&&(s.frameWidth=t.frameWidth),t.frameHeight&&(s.frameHeight=t.frameHeight)),s.bytesSent=N,s.bytesSentSecond=Y,s.framesEncoded=L,s.framesEncodedSecond=V,s.timestamp=g,s.packetsSent=P,s.packetsSentSecond=z,s.keyFramesEncoded=B,s.pliCount=U,s.firCount=F,s.nackCount=j,s.ssrc=G,s.type=n.type,s.status=n.status,s.resolution=n.resolution,s.expBandwidth=10;break;case"codec":i&&(r.mimeType=m),s.mimeType=m;break;case"media-source":s.audioLevel=Number((100*b).toFixed(0));break;case"remote-inbound-rtp":var X=t.jitter,W=void 0===X?0:X,q=t.packetsLost,$=void 0===q?0:q,Z=t.roundTripTime,J=void 0===Z?0:Z,Q=o.rateBytesCalculator(t,"packetsLost","timestamp",1,1e3,o.internels[e][(null===(h=n.track)||void 0===h?void 0:h.id)||""]);s.packetsLost=$,s.packetsLostSecond=Q,s.jitter=W,s.roundTripTime=J}})),!s.framesSentSecond&&u&&(s.framesSentSecond=30),!s.frameWidth){var a=ro.MAP_RESOLUTION_STRING[n.resolution],c=a.width,l=void 0===c?0:c,h=a.height,d=void 0===h?0:h;s.frameWidth=l,s.frameHeight=d}return s}},{key:"calcAudioLevel",value:function(e){if(e<316e-7)return 0;var t=100*e;return Number(t>1?t.toFixed(0):t.toFixed(2))}},{key:"getReceiverStatus",value:function(e,t,r){var n=this,i={endpointId:t.roster.endpointId,participantId:t.roster.participantId},o=0;return e.forEach((function(e){var r,s=e.type,a=e.timestamp,c=void 0===a?0:a,u=t.roster,l=u.displayName,h=u.isContent,d=u.id,f=u.ExpectHeight,p=void 0===f?0:f,v=u.ExpectWidth,g=void 0===v?0:v,m=n.client.getVideoManagers(),y="";m&&m[d]&&(y=(null===(r=(m[d].getVideoTracks()||[])[0])||void 0===r?void 0:r.id)||"");switch(i.ExpectHeight=p,i.ExpectWidth=g,i.isContent=h,s){case"track":var b=e.frameWidth,S=void 0===b?0:b,w=e.frameHeight,k=void 0===w?0:w,C=e.framesReceived,x=void 0===C?0:C,E=e.jitterBufferDelay,_=void 0===E?0:E,I=n.rateBytesCalculator(e,"framesReceived","timestamp",1,1e3,n.internels.receiver[y]);i.frameWidth=S,i.frameHeight=k,i.framesReceived=x,i.framesReceivedSecond=I,i.jitterBufferDelay=_,i.timestamp=c,i.type="video",i.status="active",i.name=l,i.expResolution=0;break;case"inbound-rtp":var A=e.bytesReceived,T=e.framesDecoded,R=e.packetsReceived,O=e.packetsLost,D=e.keyFramesDecoded,N=void 0===D?"N/A":D,L=e.nackCount,P=e.pliCount,M=e.framesPerSecond,B=e.framesDropped,j=e.ssrc,G=e.jitter,H=n.rateBytesCalculator(e,"framesDecoded","timestamp",1,1e3,n.internels.receiver[y]),U=n.rateBytesCalculator(e,"bytesReceived","timestamp",8,1,n.internels.receiver[y]),K=n.rateBytesCalculator(e,"packetsReceived","timestamp",1,1e3,n.internels.receiver[y]),F=n.rateBytesCalculator(e,"packetsLost","timestamp",1,1e3,n.internels.receiver[y]);if(e.frameWidth&&(i.frameWidth=e.frameWidth),e.frameHeight&&(i.frameHeight=e.frameHeight),e.framesReceived){var V=n.rateBytesCalculator(e,"framesReceived","timestamp",1,1e3,n.internels.receiver[y]);i.framesReceived=e.framesReceived,i.framesReceivedSecond=V}i.bytesReceived=A,i.bytesReceivedSecond=U,i.framesDecoded=T,i.framesDecodedSecond=H,i.packetsReceived=R,i.packetsReceivedSecond=K,i.packetsLost=O,i.packetsLostSecond=F,i.keyFramesDecoded=N,i.nackCount=L,i.pliCount=P,i.framesPerSecond=M,i.framesDropped=B,i.ssrc=j,i.jitter=G,i.timestamp=c,i.type="video",i.status="active",i.name=l,i.expResolution=0,G&&(o=Math.max(o,1e3*G))}})),r.jitterReceived=Math.floor(o),i}},{key:"getReceiverAudioTrackStatus",value:function(e,t){var r=this,n={type:"audio"},i=t.id,o="audioReceiver";return e.forEach((function(e){var t=e.type,s=e.mimeType;if(n.mimeType="audio/opus","track"===t){var a=e.framesReceived,c=void 0===a?0:a,u=e.jitterBufferDelay,l=void 0===u?0:u,h=e.timestamp,d=void 0===h?0:h,f=r.rateBytesCalculator(e,"framesReceived","timestamp",1,1e3,r.internels[o][i]);n.framesReceived=c,n.framesReceivedSecond=f,n.jitterBufferDelay=l,n.timestamp=d,n.status="active",n.expResolution=0,e.audioLevel&&(n.audioLevel=r.calcAudioLevel(e.audioLevel))}else if("inbound-rtp"===t){var p=e.bytesReceived,v=e.framesDecoded,g=e.packetsReceived,m=e.keyFramesDecoded,y=void 0===m?"N/A":m,b=e.nackCount,S=e.pliCount,w=e.framesPerSecond,k=e.framesDropped,C=e.ssrc,x=e.jitter,E=e.timestamp,_=e.insertedSamplesForDeceleration,I=void 0===_?0:_,A=e.totalSamplesReceived,T=void 0===A?0:A,R=e.removedSamplesForAcceleration,O=void 0===R?0:R,D=r.rateBytesCalculator(e,"framesDecoded","timestamp",1,1e3,r.internels[o][i]),N=r.rateBytesCalculator(e,"bytesReceived","timestamp",8,1,r.internels[o][i]),L=r.rateBytesCalculator(e,"insertedSamplesForDeceleration","timestamp",1,1e3,r.internels[o][i]),P=r.rateBytesCalculator(e,"totalSamplesReceived","timestamp",1,1e3,r.internels[o][i]),M=r.rateBytesCalculator(e,"removedSamplesForAcceleration","timestamp",1,1e3,r.internels[o][i]);n.bytesReceived=p,n.bytesReceivedSecond=N,n.framesDecoded=v,n.framesDecodedSecond=D,n.packetsReceived=g,n.keyFramesDecoded=y,n.nackCount=b,n.pliCount=S,n.framesPerSecond=w,n.framesDropped=k,n.ssrc=C,n.jitter=x,n.insertedSamplesForDeceleration=I,n.insertedSamplesForDecelerationSecond=L,n.totalSamplesReceived=T,n.totalSamplesReceivedSecond=P,n.removedSamplesForAcceleration=O,n.removedSamplesForAccelerationSecond=M,n.timestamp=E,n.status="active",e.audioLevel&&(n.audioLevel=r.calcAudioLevel(e.audioLevel))}"codec"===t&&s&&(n.mimeType=s)})),n}},{key:"rateBytesCalculator",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5?arguments[5]:void 0,s=o||this.internels,a=Number(s[t])||0,c=Number(e[t])||0,u=Number(s[r]),l=Number(e[r]);if([u,l,a,c].some((function(e){return"number"!=typeof e})))return 0;if(l===u)return 0;var h=n*(c-a),d=(l-u)/i;return Math.max(Math.floor(h/d),0)}},{key:"onTrack",value:function(e){this.client.emmit("track",e)}}]),e}(),is=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const os=function(){function e(t){l(this,e),this.logger=t,this.loginInfo=ro.LOGIN_INFO}return d(e,[{key:"getLoginInfo",value:function(){return this.loginInfo||{}}},{key:"setLoginInfo",value:function(e){this.logger.log("[iauth] set login info:",e),this.loginInfo=e}},{key:"loginExternalAccount",value:function(e){return is(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u,l,h,d,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[iauth] loginExternalAccount:",e),n=e.displayName,i=e.extId,o=e.extUserId,s=/^[0-9a-zA-Z_-]{1,50}$/,n||i){t.next=5;break}return t.abrupt("return",$n("XYSDK:950101",e));case 5:if(!o){t.next=10;break}if(s.test(o)){t.next=10;break}return a="extUserId can only contain numbers, letters, _ and -, and the length cannot be greater than 50",this.logger.log("loginExternalAccount params error:",a),t.abrupt("return",$n("XYSDK:950101",e,a));case 10:return t.prev=10,t.next=13,Lo.getSdkUserInfo(e);case 13:if(c=t.sent,u=c.status,l=c.data,{userName:"",password:""},200!==u){t.next=25;break}return d=l.userName,f=l.password,h={userName:d,password:f},t.next=22,this.login(h,e);case 22:return t.abrupt("return",t.sent);case 25:return t.abrupt("return",$n("XYSDK:950103",{status:u,data:l}));case 26:t.next=31;break;case 28:return t.prev=28,t.t0=t.catch(10),t.abrupt("return",$n("XYSDK:950103",t.t0));case 31:case"end":return t.stop()}}),r,this,[[10,28]])})))}},{key:"login",value:function(e,r){return is(this,void 0,void 0,t().mark((function n(){var i,o,s,a,c,u,l,h,d,f,p,v,g,m,y,b,S;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(i=r||{}).extId,s=i.extUserId,a=e.userName,c=e.password,this.logger.log("[iauth] login:",Object.assign(Object.assign({},e),r)),t.prev=3,this.logger.log("[iauth] encryptLogin"),t.next=7,Lo.encryptLogin({userName:a,password:c,extId:o});case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0={};case 10:if(404!==(null==(u=t.t0)?void 0:u.status)&&10002e3!==(null==u?void 0:u.errorCode)){t.next=16;break}return this.logger.log("[iauth] unEncrypted login"),t.next=15,Lo.login({userName:a,password:c,extId:o});case 15:u=t.sent;case 16:if(200!==(null==u?void 0:u.status)){t.next=23;break}return l=u.data,h=l.securityKey,d=l.callUri,f=l.token,p=f.access_token,v=f.refresh_token,g=l.userProfile,m=g.displayName,y=g.id,this.loginInfo={securityKey:h,callUri:d,refresh_token:v,access_token:p,id:y,displayName:m,extUserId:s},this.logger.log("[iauth] login data:",this.loginInfo),t.abrupt("return",$n("XYSDK:950120",{access_token:p}));case 23:return this.logger.error("[iauth]login error: ",u),b=(u||{}).data,S=Kn[b.errorCode]||Kn[0],t.abrupt("return",$n(S,b));case 27:t.next=33;break;case 29:return t.prev=29,t.t1=t.catch(3),this.logger.error("[iauth]catch login error:: ",t.t1),t.abrupt("return",$n("XYSDK:950102",t.t1));case 33:case"end":return t.stop()}}),n,this,[[3,29]])})))}}]),e}(),ss="function"==typeof atob,as="function"==typeof btoa,cs="function"==typeof Buffer,us="function"==typeof TextDecoder?new TextDecoder:void 0,ls="function"==typeof TextEncoder?new TextEncoder:void 0,hs=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ds=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(hs),fs=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ps=String.fromCharCode.bind(String),vs="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),gs=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),ms=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),ys=e=>{let t,r,n,i,o="";const s=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=hs[t>>18&63]+hs[t>>12&63]+hs[t>>6&63]+hs[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},bs=as?e=>btoa(e):cs?e=>Buffer.from(e,"binary").toString("base64"):ys,Ss=cs?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(ps.apply(null,e.subarray(r,r+4096)));return bs(t.join(""))},ws=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?ps(192|t>>>6)+ps(128|63&t):ps(224|t>>>12&15)+ps(128|t>>>6&63)+ps(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return ps(240|t>>>18&7)+ps(128|t>>>12&63)+ps(128|t>>>6&63)+ps(128|63&t)},ks=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Cs=e=>e.replace(ks,ws),xs=cs?e=>Buffer.from(e,"utf8").toString("base64"):ls?e=>Ss(ls.encode(e)):e=>bs(Cs(e)),Es=(e,t=!1)=>t?gs(xs(e)):xs(e),_s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Is=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return ps(55296+(t>>>10))+ps(56320+(1023&t));case 3:return ps((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return ps((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},As=e=>e.replace(_s,Is),Ts=e=>{if(e=e.replace(/\s+/g,""),!fs.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,i="";for(let o=0;o<e.length;)t=ds[e.charAt(o++)]<<18|ds[e.charAt(o++)]<<12|(r=ds[e.charAt(o++)])<<6|(n=ds[e.charAt(o++)]),i+=64===r?ps(t>>16&255):64===n?ps(t>>16&255,t>>8&255):ps(t>>16&255,t>>8&255,255&t);return i},Rs=ss?e=>atob(ms(e)):cs?e=>Buffer.from(e,"base64").toString("binary"):Ts,Os=cs?e=>vs(Buffer.from(e,"base64")):e=>vs(Rs(e),(e=>e.charCodeAt(0))),Ds=cs?e=>Buffer.from(e,"base64").toString("utf8"):us?e=>us.decode(Os(e)):e=>As(Rs(e)),Ns=e=>ms(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),Ls=e=>Ds(Ns(e)),Ps=Es,Ms=Ls;r(6541);function Bs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zo(e);if(t){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yo(this,r)}}var js=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Gs={DEVICES:{audioInputList:[],audioOutputList:[],videoInList:[]},currentSelectedDevice:{deviceId:"",groupId:"",label:""}},Hs=function(e){Vo(n,e);var r=Bs(n);function n(e){var t;return l(this,n),(t=r.call(this)).logger=e||new Mo,t.navigator=navigator||window.navigator,t.currentDeviceList=Gs.DEVICES,t.nextDeviceList=Gs.DEVICES,t.currentUsedDevice={videoInput:Gs.currentSelectedDevice,audioInput:Gs.currentSelectedDevice,audioOutput:Gs.currentSelectedDevice},t.currentPermission={microphone:"",camera:""},t.handlePermissionCameraStateChanged=t.handlePermissionCameraStateChanged.bind(Ko(t)),t.handlePermissionPhoneStateChanged=t.handlePermissionPhoneStateChanged.bind(Ko(t)),t.mediaDevicesChange=t.mediaDevicesChange.bind(Ko(t)),t.initDeviceEvent(),t}return d(n,[{key:"getDevicePermission",value:function(){return this.currentPermission}},{key:"getNextDeviceList",value:function(){return this.nextDeviceList}},{key:"setCurrentUsedDevice",value:function(e){return js(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.emmit("currentDevice",e),this.logger.log("[DM]current used device in first calling: ",e),this.currentUsedDevice=Qo()(e),t.next=5,this.getPrivateDevices();case 5:n=t.sent,this.currentDeviceList=Qo()(n),this.mediaDevicesChange();case 8:case"end":return t.stop()}}),r,this)})))}},{key:"setCurrentUsedDeviceByType",value:function(e,t){if("audio"===e){var r=this.currentDeviceList.audioInputList.find((function(e){return e.deviceId===t}));r&&(this.currentUsedDevice.audioInput=r)}else if("video"===e){var n=this.currentDeviceList.videoInList.find((function(e){return e.deviceId===t}));n&&(this.currentUsedDevice.videoInput=n)}}},{key:"setAudioOutputDevice",value:function(e,t){var r=this;e&&void 0!==e.sinkId?e.setSinkId(t).then((function(){r.logger.log("[DM]switch audio output device successfully: ".concat(t))})).catch((function(e){var t=e;"SecurityError"===e.name&&(t="You need to use HTTPS for selecting audio output device: ".concat(e)),r.logger.error(t)})):this.logger.warn("[DM]Browser does not support output device selection.")}},{key:"emmitDevices",value:function(){return js(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.init();case 2:return e.next=4,this.emmitPermission();case 4:return e.next=6,this.mediaDevicesChange();case 6:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(){return js(this,void 0,void 0,t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivateDevices();case 2:return r=e.sent,e.prev=3,e.next=6,this.getPermission();case 6:this.currentPermission=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),this.currentPermission={microphone:"unknown",camera:"unknown"};case 12:this.currentDeviceList=this.nextDeviceList=r,this.logger.log("[DM]current device list: ",this.currentDeviceList),this.logger.log("[DM]current permission: ",this.currentPermission);case 15:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"destroy",value:function(){var e;this.removeDeviceEvent(),this.permissionCameraStatus&&this.permissionCameraStatus.removeEventListener("change",this.handlePermissionCameraStateChanged),this.permissionPhoneStatus&&this.permissionPhoneStatus.removeEventListener("change",this.handlePermissionPhoneStateChanged),null===(e=this.logger)||void 0===e||e.stopDB()}},{key:"getPrivateDevices",value:function(){return js(this,void 0,void 0,t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={audioInputList:[],audioOutputList:[],videoInList:[]},e.prev=1,e.next=4,this.getDevices();case 4:r=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this.logger.log("[DM]get device failed: ",e.t0);case 10:return e.abrupt("return",r);case 11:case"end":return e.stop()}}),e,this,[[1,7]])})))}},{key:"getDevices",value:function(){return js(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.navigator.mediaDevices.enumerateDevices();case 3:return r=e.sent,n=[],i=[],o=[],r.forEach((function(e){var t=Uo(e.kind.match(/(\w+)(input|output)/i),3),r=t[0],s=t[1],a=t[2];if(!e.label.match(/\(Virtual\)$/)&&e.deviceId){var c={deviceId:e.deviceId,kind:r,type:s,direction:a,label:e.label,groupId:e.groupId};"audioinput"===e.kind?n.push(c):"audiooutput"===e.kind?i.push(c):"videoinput"===e.kind&&o.push(c)}})),s={audioInputList:n,audioOutputList:i,videoInList:o},e.abrupt("return",s);case 12:return e.prev=12,e.t0=e.catch(0),e.abrupt("return",Promise.reject($n("XYSDK:950409",e.t0)));case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))}},{key:"setPermission",value:function(e){this.currentPermission=e,this.emmit("permission",this.currentPermission)}},{key:"emmitPermission",value:function(){this.currentPermission.camera&&this.emmit("permission",this.currentPermission)}},{key:"query",value:function(e){return js(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.navigator.permissions.query({name:e});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",Promise.reject($n("XYSDK:950408",t.t0)));case 10:case"end":return t.stop()}}),r,this,[[0,7]])})))}},{key:"handlePermissionCameraStateChanged",value:function(e){return js(this,void 0,void 0,t().mark((function r(){var n,i,o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]camera permission changed: ",e),n=e.target.state,i=this.currentPermission.camera,"granted"!==n||"granted"===i){t.next=10;break}return t.next=6,this.getPrivateDevices();case 6:o=t.sent,s={detail:o,nextDevice:{audioInput:void 0,audioOutput:void 0,videoInput:void 0}},this.logger.log("[DM]next used device when camera permission changed: ",s),this.emmit("device",s);case 10:"change"===e.type&&(this.currentPermission.camera=n),this.emmit("permission",this.currentPermission);case 12:case"end":return t.stop()}}),r,this)})))}},{key:"handlePermissionPhoneStateChanged",value:function(e){return js(this,void 0,void 0,t().mark((function r(){var n,i,o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]microphone permission changed: ",e),n=e.target.state,i=this.currentPermission.microphone,"granted"!==n||"granted"===i){t.next=10;break}return t.next=6,this.getPrivateDevices();case 6:o=t.sent,s={detail:o,nextDevice:{audioInput:void 0,audioOutput:void 0,videoInput:void 0}},this.logger.log("[DM]next used device when microphone permission changed: ",s),this.emmit("device",s);case 10:"change"===e.type&&(this.currentPermission.microphone=n),this.emmit("permission",this.currentPermission);case 12:case"end":return t.stop()}}),r,this)})))}},{key:"getPermission",value:function(){return js(this,void 0,void 0,t().mark((function e(){var r,n,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.query("camera");case 3:return r=e.sent,e.next=6,this.query("microphone");case 6:return n=e.sent,i={camera:r.state,microphone:n.state},this.permissionCameraStatus||(this.permissionCameraStatus=r,this.permissionCameraStatus.addEventListener("change",this.handlePermissionCameraStateChanged)),this.permissionPhoneStatus||(this.permissionPhoneStatus=n,this.permissionPhoneStatus.addEventListener("change",this.handlePermissionPhoneStateChanged)),e.abrupt("return",i);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 16:case"end":return e.stop()}}),e,this,[[0,13]])})))}},{key:"diffAudioDevice",value:function(e,t){var r;if(e.length===t.length){var n=e[0]&&e[0].deviceId||"default",i=t[0]&&t[0].deviceId||"default",o=e[0]&&e[0].label||"",s=t[0]&&t[0].label||"";n===i&&o===s||(r=t[0])}else r=t.filter((function(t){return e.every((function(e){return e.deviceId!==t.deviceId}))}))[0],e.length>t.length&&(r=t[0]);return r}},{key:"diffVideoDevice",value:function(e,t){var r;return r=t.filter((function(t){return e.every((function(e){return e.deviceId!==t.deviceId}))}))[0],e.length>t.length&&(r=t[0]),r}},{key:"diffDevices",value:function(e,t){var r=e.audioInputList,n=e.audioOutputList,i=e.videoInList,o=t.audioInputList,s=t.audioOutputList,a=t.videoInList,c=this.diffAudioDevice(r,o),u=this.diffAudioDevice(n,s);return{audioInput:c,videoInput:this.diffVideoDevice(i,a),audioOutput:u}}},{key:"mediaDevicesChange",value:function(){return js(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivateDevices();case 2:r=e.sent,n=this.currentUsedDevice.videoInput,this.nextDeviceList=Qo()(r),this.logger.log("[DM]nextDeviceList when mediaDevicesChange:",this.nextDeviceList),this.logger.log("[DM]currentDeviceList when mediaDevicesChange:",this.currentDeviceList),i=this.diffDevices(this.currentDeviceList,this.nextDeviceList),o=i.videoInput,s=i.audioInput,o&&o.deviceId!==(null==n?void 0:n.deviceId)?this.currentUsedDevice.videoInput=o:i.videoInput=void 0,this.currentUsedDevice.audioInput=s,this.currentDeviceList=Qo()(r),a={detail:r,nextDevice:i},this.logger.log("[DM]next used device when mediaDevicesChange: ",a),this.emmit("device",a);case 15:case"end":return e.stop()}}),e,this)})))}},{key:"initDeviceEvent",value:function(){var e;null===(e=this.navigator.mediaDevices)||void 0===e||e.addEventListener("devicechange",this.mediaDevicesChange)}},{key:"removeDeviceEvent",value:function(){var e;null===(e=this.navigator.mediaDevices)||void 0===e||e.removeEventListener("devicechange",this.mediaDevicesChange)}}]),n}(Wo);const Us=Hs;r(561);var Ks=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Fs=function(){function e(t,r){l(this,e),this.key="",this.wrapEleId="",this.videoEle=null,this.stream=null,this.streamId="",this.state="",this.cb=function(){},t&&(this.logger=t),this.isContent=!!r,this.streamTimmerCountDown=500,this.loadStatus="LOAD_START",this.streamStatus="ENABLED",this.streamStatusTimmer=null,this.onCanPlay=this.onCanPlay.bind(this),this.onLoadStart=this.onLoadStart.bind(this),this.onError=this.onError.bind(this),this.onUnmute=this.onUnmute.bind(this),this.onMute=this.onMute.bind(this),this.onEnded=this.onEnded.bind(this),this.onAbort=this.onAbort.bind(this),this.onEmptied=this.onEmptied.bind(this),this.onVideoEnded=this.onVideoEnded.bind(this),this.onLoadeddata=this.onLoadeddata.bind(this),this.onStalled=this.onStalled.bind(this),this.onSuspend=this.onSuspend.bind(this),this.onWaiting=this.onWaiting.bind(this)}return d(e,[{key:"initVideoStreamById",value:function(e,t){var r=(null==t?void 0:t.id)||"";this.key=e,r!==this.streamId&&(this.stream&&this.removeStreamTrackEventListener(),t&&this.initStreamTrackEventListener(t),this.stream=t),this.setSrcObject(r),this.streamId=r}},{key:"getVideoTracks",value:function(){return this.stream?this.stream.getVideoTracks():[]}},{key:"updateLocalTrack",value:function(){this.removeStreamTrackEventListener(),this.initStreamTrackEventListener(this.stream),this.sendVideoStatus()}},{key:"initVideoSource",value:function(e){var t=document.getElementById(e);if(t){var r=t.querySelector("video");if(r)r.autoplay=!0,r.playsInline=!0,r.controls=!1,r.defaultMuted=!0,r.muted=!0;else{var n=document.createElement("video");n.autoplay=!0,n.playsInline=!0,n.controls=!1,n.defaultMuted=!0,n.muted=!0,t.appendChild(n),r=n}this.wrapEleId!==e||r!==this.videoEle?(this.videoEle&&this.videoEle!==r&&this.removeEventListener(this.videoEle),this.wrapEleId=e,this.videoEle=r,this.initEventListener(this.videoEle),this.logger.log("[VM]init video source: ",{key:this.key,wrapEleId:this.wrapEleId}),this.setSrcObject()):this.logger.log("[vm]update video ele",e)}else{var i="Not found wrap video element use id ".concat(this.wrapEleId," selector");this.logger.log(i)}}},{key:"setSrcObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ks(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.stream){t.next=3;break}return this.logger.warn("[VM]setSrcObject: stream not exist",{streamId:e}),t.abrupt("return");case 3:if(!this.videoEle||this.isHaveSrcObject()&&this.streamId===e){t.next=15;break}if(this.videoEle.srcObject=this.stream,!this.videoEle.paused){t.next=14;break}return t.prev=6,t.next=9,this.videoEle.play();case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),"NotAllowedError"===(null===t.t0||void 0===t.t0?void 0:t.t0.name)&&(this.emmit(this.key,{status:"VIDEO_PLAY_FAILED",id:this.key,error:t.t0}),this.logger.warn("[VM] video play error: ",t.t0));case 14:this.logger.log("[VM]set video srcObject: ",{key:this.key,streamId:this.streamId});case 15:case"end":return t.stop()}}),r,this,[[6,11]])})))}},{key:"initEventListener",value:function(e){e.addEventListener("canplay",this.onCanPlay),e.addEventListener("loadstart",this.onLoadStart),e.addEventListener("error",this.onError),e.addEventListener("waiting",this.onWaiting),e.addEventListener("suspend",this.onSuspend),e.addEventListener("stalled",this.onStalled),e.addEventListener("loadeddata",this.onLoadeddata),e.addEventListener("ended",this.onVideoEnded),e.addEventListener("emptied",this.onEmptied),e.addEventListener("abort",this.onAbort)}},{key:"removeEventListener",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.videoEle;null==e||e.removeEventListener("canplay",this.onCanPlay),null==e||e.removeEventListener("loadstart",this.onLoadStart),null==e||e.removeEventListener("error",this.onError),null==e||e.removeEventListener("waiting",this.onWaiting),null==e||e.removeEventListener("suspend",this.onSuspend),null==e||e.removeEventListener("stalled",this.onStalled),null==e||e.removeEventListener("loadeddata",this.onLoadeddata),null==e||e.removeEventListener("ended",this.onVideoEnded),null==e||e.removeEventListener("emptied",this.onEmptied),null==e||e.removeEventListener("abort",this.onAbort)}},{key:"initStreamTrackEventListener",value:function(e){var t,r,n;null===(t=null==e?void 0:e.getVideoTracks()[0])||void 0===t||t.addEventListener("mute",this.onMute),null===(r=null==e?void 0:e.getVideoTracks()[0])||void 0===r||r.addEventListener("unmute",this.onUnmute),null===(n=null==e?void 0:e.getVideoTracks()[0])||void 0===n||n.addEventListener("ended",this.onEnded)}},{key:"removeStreamTrackEventListener",value:function(){var e,t,r,n,i,o;this.streamStatus="ENABLED",null===(t=null===(e=this.stream)||void 0===e?void 0:e.getVideoTracks()[0])||void 0===t||t.removeEventListener("mute",this.onMute),null===(n=null===(r=this.stream)||void 0===r?void 0:r.getVideoTracks()[0])||void 0===n||n.removeEventListener("unmute",this.onUnmute),null===(o=null===(i=this.stream)||void 0===i?void 0:i.getVideoTracks()[0])||void 0===o||o.removeEventListener("ended",this.onEnded)}},{key:"isHaveSrcObject",value:function(){return this.videoEle&&this.videoEle.srcObject}},{key:"setSource",value:function(e,t){this.logger.log("[vm]set source",{key:e,thisKey:this.key,wrapId:t,thisWrapId:this.wrapEleId}),this.key=e,this.initVideoSource(t)}},{key:"destroy",value:function(){this.clearTrackStatusTimmer(),this.removeEventListener(this.videoEle),this.stream&&this.removeStreamTrackEventListener(),this.videoEle&&(this.videoEle.srcObject=null),this.key="",this.wrapEleId="",this.videoEle=null,this.stream=null,this.streamId="",this.state=""}},{key:"setVideoStatusChange",value:function(e){this.cb=e}},{key:"onEnded",value:function(){this.streamStatus="ENDED",this.sendVideoStatus()}},{key:"onMute",value:function(){var e=this;this.streamStatus="MUTE",this.clearTrackStatusTimmer(),this.streamStatusTimmer=setTimeout((function(){"MUTE"===e.streamStatus&&e.sendVideoStatus()}),this.streamTimmerCountDown)}},{key:"onUnmute",value:function(){this.clearTrackStatusTimmer(),this.streamStatus="ENABLED",this.sendVideoStatus()}},{key:"onSuspend",value:function(){this.logger.log("video suspend",this.key)}},{key:"onWaiting",value:function(){this.logger.log("video waiting",this.key)}},{key:"onStalled",value:function(){this.logger.log("video stalled",this.key)}},{key:"onLoadeddata",value:function(){this.logger.log("video loadeddata",this.key)}},{key:"onVideoEnded",value:function(){this.logger.log("video videoEnded",this.key)}},{key:"onEmptied",value:function(){this.logger.log("video emptied",this.key)}},{key:"onAbort",value:function(){this.logger.log("video abort",this.key)}},{key:"onCanPlay",value:function(){this.logger.log("video canplay",this.key),this.loadStatus="CANPLAY",this.sendVideoStatus()}},{key:"onLoadStart",value:function(){this.logger.log("video loadstart",this.key),this.loadStatus="LOAD_START",this.sendVideoStatus()}},{key:"onError",value:function(){this.logger.log("video error",this.key),this.loadStatus="ERROR"}},{key:"clearTrackStatusTimmer",value:function(){this.streamStatusTimmer&&(clearTimeout(this.streamStatusTimmer),this.streamStatusTimmer=null)}},{key:"sendVideoStatus",value:function(){"CANPLAY"===this.loadStatus&&"ENABLED"===this.streamStatus?("CANPLAY"!==this.state&&(this.streamTimmerCountDown=1e4),this.state="CANPLAY",this.emmit(this.key,{status:"CANPLAY",id:this.key})):"ENDED"===this.streamStatus?(this.state="ENDED",this.emmit(this.key,{status:"ENDED",id:this.key})):"LOAD_START"!==this.loadStatus&&"MUTE"!==this.streamStatus||this.isContent&&"CANPLAY"===this.loadStatus||(this.state="REQUEST",this.emmit(this.key,{status:"REQUEST",id:this.key}))}},{key:"emmit",value:function(e,t){this.cb&&this.cb(e,t)}}]),e}();const Vs=Fs;r(4678);var Ys,zs,Xs=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Ws=function(e,t,r){var n=e.roster,i=n.videoRxMute,o=n.videoTxMute,s=n.deviceType,a=n.isContent,c=n.isLocal;return a?o?"AUDIO_CONTENT":t&&"REQUEST"!==r&&r?"NORMAL":"REQUEST":i&&o?"AUDIO_ONLY":o||"ENDED"===r?"MUTE":"tel"===s||"pstngw"===s?"AUDIO_TEL":t&&"REQUEST"!==r||c?"NORMAL":"REQUEST"},qs=function(e,t,r,n,i){var o=parseFloat((e/t).toFixed(3)),s=ro.RATIO_MAP[i],a=parseFloat((n/o).toFixed(3)),c=parseFloat((r*o).toFixed(3));return o<ro.HOR_CONTAINER_RATIO||a>r?(a=r,c=parseFloat((r*o).toFixed(3))):(a=parseFloat((n/o).toFixed(3)),c=n),{realWidth:c,realHeight:a,realRotate:s}},$s=function(e,t,r){var n=e.width,i=void 0===n?16:n,o=e.height,s=void 0===o?9:o,a=e.rotation,c={};if(a>=0&&a<=3){var u=1===a||3===a,l=qs(u?s:i,u?i:s,r,t,a),h=l.realWidth,d=l.realHeight,f=l.realRotate;c={transform:"rotateZ(".concat(f,"deg)"),width:"".concat(u?d:h,"px"),height:"".concat(u?h:d,"px")}}return c},Zs=function(){return new Promise((function(e,t){var r,n,i=["video/VP8","video/H264"],o=["audio/opus"];c.isFirefox()&&e({video:i,audio:o});try{o=(null===(r=RTCRtpSender.getCapabilities("audio"))||void 0===r?void 0:r.codecs.filter((function(e){return"audio/opus"===e.mimeType})).map((function(e){return e.mimeType})))||[],e({video:i=(i=(null===(n=RTCRtpSender.getCapabilities("video"))||void 0===n?void 0:n.codecs.filter((function(e){return"video/H264"===e.mimeType||"video/VP8"===e.mimeType})).map((function(e){return e.mimeType})))||[]).filter((function(e,t){return i.indexOf(e)===t})),audio:o})}catch(e){t(e)}}))},Js=function(e){var r=e.extId,n=e.clientId,i=e.clientSecret,o=e.httpServer;return Xs(void 0,void 0,void 0,t().mark((function e(){var s,a,c,u;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r&&n&&i||Promise.reject($n("XYSDK:950101")),s="",e.prev=2,e.next=5,Lo.getEnterpriseId({extId:r,clientId:n,clientSecret:i,httpServer:o});case 5:if(!(a=e.sent)){e.next=21;break}return e.next=9,Lo.locator({extId:a,clientId:n,clientSecret:i,httpServer:o});case 9:if(c=e.sent,!((u=c.filter((function(e){return"WebrtcSigGW"===e.serverName}))).length>0)){e.next=20;break}return e.prev=12,e.next=15,new Promise((function(e,r){var n=u.length;u.map((function(i){return Xs(void 0,void 0,void 0,t().mark((function o(){var s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=i.innerIp.split(":")[0],t.prev=1,"https:",t.next=5,_i().get("".concat("https:","//").concat(s),{timeout:2e3});case 5:e(i.innerIp),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),0===--n&&r("All promises were rejected");case 12:case"end":return t.stop()}}),o,null,[[1,8]])})))}))}));case 15:s=e.sent,e.next=20;break;case 18:e.prev=18,e.t0=e.catch(12);case 20:case 21:return e.abrupt("return",s);case 24:return e.prev=24,e.t1=e.catch(2),e.abrupt("return",Promise.reject(e.t1));case 27:case"end":return e.stop()}}),e,null,[[2,24],[12,18]])})))},Qs=.5625,ea=[-30,-30,1,1],ta={"1-1":[{position:[0,0,1,1],resolution:{normal:3,low:2,high:4},type:Si.LOCAL}],"2-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:Si.LOCAL}],"3-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.75,.333,.25,.333],resolution:{normal:1,low:1}}],"4-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.75,.333,.25,.333],resolution:{normal:1,low:1}},{position:[.75,.666,.25,.333],resolution:{normal:1,low:1}}],"5-1":[{position:[.125,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}}],"6-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}}],"7-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.25,.25,.25],resolution:{normal:1,low:1}}],"8-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.25,.25,.25],resolution:{normal:1,low:1}},{position:[.75,0,.25,.25],resolution:{normal:1,low:1}}]},ra={"1-1":[{position:[0,0,1,1],resolution:{normal:3,low:2,high:4},type:Si.LOCAL}],"2-1":[{position:[0,0,.5,1],resolution:{normal:3,low:2,high:4}},{position:[.5,0,.5,1],resolution:{normal:3,low:2,high:4},type:Si.LOCAL}],"3-1":[{position:[.25,0,.5,.5],resolution:{normal:2,low:2}},{position:[0,.5,.5,.5],resolution:{normal:2,low:2},type:Si.LOCAL},{position:[.5,.5,.5,.5],resolution:{normal:2,low:2}}],"4-1":[{position:[0,0,.5,.5],resolution:{normal:2,low:1}},{position:[0,.5,.5,.5],resolution:{normal:2,low:1},type:Si.LOCAL},{position:[.5,0,.5,.5],resolution:{normal:2,low:1}},{position:[.5,.5,.5,.5],resolution:{normal:2,low:1}}],"5-1":[{position:[0,0,.333,.5],resolution:{normal:1,low:1}},{position:[0,.5,.333,.5],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.333,0,.333,.5],resolution:{normal:1,low:1}},{position:[.666,0,.333,.5],resolution:{normal:1,low:1}},{position:[.333,.5,.333,.5],resolution:{normal:1,low:1}}],"6-1":[{position:[0,0,.333,.5],resolution:{normal:1,low:1}},{position:[0,.5,.333,.5],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.333,0,.333,.5],resolution:{normal:1,low:1}},{position:[.666,0,.333,.5],resolution:{normal:1,low:1}},{position:[.333,.5,.333,.5],resolution:{normal:1,low:1}},{position:[.666,.5,.333,.5],resolution:{normal:1,low:1}}],"7-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}}],"8-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.666,.333,.333],resolution:{normal:1,low:1}}],"9-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:Si.LOCAL},{position:[.333,.666,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.666,.333,.333],resolution:{normal:1,low:1}}]},na={SPEAKER:{length:8,temp:{0:ta["1-1"],1:ta["1-1"],2:ta["2-1"],3:ta["3-1"],4:ta["4-1"],5:ta["5-1"],6:ta["6-1"],7:ta["7-1"],8:ta["8-1"]},rate:{0:.5625,1:.5625,2:.4218,3:.4218,4:.4218,5:.5625,6:.5625,7:.5625,8:.5625}},GALLERY:{length:9,temp:{0:ra["1-1"],1:ra["1-1"],2:ra["2-1"],3:ra["3-1"],4:ra["4-1"],5:ra["5-1"],6:ra["6-1"],7:ra["7-1"],8:ra["8-1"],9:ra["9-1"]},rate:{0:.5625,1:.5625,2:.2812,3:.5625,4:.5625,5:.375,6:.375,7:.5625,8:.5625,9:.5625}}},ia={MULTI_PIC_CONTENT_HIGH_PRIORITY:(Ys=na.SPEAKER,zs=Qo()(Ys),Object.keys(zs.temp).forEach((function(e){var t=zs.temp[e];t[0].resolution={normal:4,low:3},t[0].quality=2,t[0].type=Si.CONTENT})),zs),MULTI_PIC_ACTIVE_HIGH_PRIORITY:function(e){var t=Qo()(e);return Object.keys(t.temp).forEach((function(e){var r=Number(e);if(r>0){var n=t.temp[e];r<=2&&(n[r-1].resolution={normal:3,low:3},n[r-1].type=Si.CONTENT),r>2&&(n[2].resolution={normal:3,low:3},n[2].type=Si.CONTENT)}})),t}(na.SPEAKER),TWO_PIC_PIP:{length:2,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:2,type:Si.CONTENT}],2:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:2,type:Si.CONTENT,zIndex:1},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},zIndex:2}]},rate:{1:.5625,2:.5625}},CONTENT_ONLY:{length:1,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:2,type:Si.CONTENT}]},rate:{1:.5625}},TWO_PIC_SYMMETRIC:{length:2,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:2,type:Si.CONTENT}],2:[{position:[0,0,.5,1],resolution:{normal:4,low:3},quality:2,type:Si.CONTENT},{position:[.5,0,.5,1],resolution:{normal:3,low:2,high:4}}]},rate:{1:.5625,2:.2812}}},oa=Object.assign(Object.assign({},na),ia),sa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t="https://sdk-source.xylink.com/h5/webrtc/device/";return"".concat(t).concat(e,".png")},aa={webrtc:sa(),soft:sa(),hard:sa("nemo"),nemono:sa("nemo"),virtualnemo:sa("nemo"),nemo:sa("nemo"),tvbox:sa("tvbox"),h323:sa("h323"),bruce:sa("bruce"),desk:sa(),tel:sa("tel"),shtl:sa("shtl"),default:sa()},ca=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ua=function(){function e(t){var r;l(this,e),this.client=t,this.logger=t.logger,this.customLayoutMap=new Map,this.layoutList=new Map,this.videoManagers={},this.originOrderRosters=[],this.orderRosterList=[],this.selfRoster=Object.assign(Object.assign({},ro.ROSTER),{isLocal:!0}),this.newLayoutList=[],this.initLayout=[],this.templateMode=(null===(r=t.config)||void 0===r?void 0:r.templateMode)||"SPEAKER",this.templateRate={previous:Qs,next:0},this.content={previous:null,next:null},this.screenInfo={width:0,height:0,rateHeight:0,rateWidth:0},this.internelsLayout={},this.forceFullScreenId="",this.localContent=null,this.preConfInfo=null,this.confInfo=Qo()(ro.CONF_INFO),this.pageInfo={pageSize:9,currentPage:0,totalPage:0},this.isLocalShareContent=!1,this.calculateScreenInfo(),this.onVideoStatusChange=this.onVideoStatusChange.bind(this)}return d(e,[{key:"getNewLayout",value:function(){return this.newLayoutList}},{key:"getOrderRosterList",value:function(){return this.orderRosterList}},{key:"getOriginOrderRosters",value:function(){return this.originOrderRosters}},{key:"getLayoutList",value:function(){return this.layoutList}},{key:"getCustomLayoutList",value:function(){return this.customLayoutMap}},{key:"getTemplateRate",value:function(){return this.templateRate}},{key:"getContentRosterItem",value:function(){return this.content.next}},{key:"getSelfRoster",value:function(){return this.selfRoster}},{key:"getScreenInfo",value:function(){return this.screenInfo}},{key:"getVideoManagers",value:function(){return this.videoManagers}},{key:"getForceFullScreenId",value:function(){return this.forceFullScreenId}},{key:"getTemplateMode",value:function(){return this.templateMode}},{key:"getConfInfo",value:function(){return this.confInfo}},{key:"getInternelsLayout",value:function(){return this.internelsLayout}},{key:"getLocalShareState",value:function(){return this.isLocalShareContent}},{key:"setOrderRosterList",value:function(e){this.orderRosterList=e}},{key:"setOriginOrderRosters",value:function(e){this.originOrderRosters=e}},{key:"setForceFullScreenId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.forceFullScreenId=e,this.client.emmit("force-full-screen",this.forceFullScreenId)}},{key:"setTemplateMode",value:function(e){this.templateMode=e}},{key:"setContentRosterItem",value:function(e){this.content={previous:e,next:e}}},{key:"setConfInfo",value:function(e){e.contentUri||(this.content.next=null),this.confInfo=e}},{key:"setLocalShareContent",value:function(e){this.isLocalShareContent=e,this.pageInfo.currentPage=0,this.templateMode=e?"GALLERY":"SPEAKER",this.client.emmit("page-info",this.pageInfo),this.confInfo.contentUri="",this.calcRequestNewLayout()}},{key:"calcTemplate",value:function(){var e,t=[],r=this.pageInfo,n=r.currentPage,i=r.pageSize;switch(this.templateMode){case"MULTI_PIC_ACTIVE_HIGH_PRIORITY":this.orderRosterList[0]=this.orderRosterList.splice(2,1,this.orderRosterList[0])[0],this.orderRosterList=this.orderRosterList.filter(Boolean);break;case"TWO_PIC_PIP":case"TWO_PIC_SYMMETRIC":this.orderRosterList.length>2&&(this.orderRosterList=this.orderRosterList.filter((function(e){return!e.isLocal})));break;case"CONTENT_ONLY":this.orderRosterList=this.orderRosterList.filter((function(e){return!e.isLocal}))}var o=this.orderRosterList.length;n>1&&!this.forceFullScreenId&&(o=i);var s=oa[this.templateMode]||oa.SPEAKER,a=s.temp,c=s.rate,u=s.length;if((t=a[o]||a[u],e=c[o]||c[u],1===this.pageInfo.currentPage&&9===o)&&this.orderRosterList.find((function(e){return e.isLocal}))){var l=[(t=Qo()(t))[6],t[1]];t[1]=l[0],t[6]=l[1]}return{tempLayout:t,templateRate:e}}},{key:"initLayoutManager",value:function(){var e=this.templateRate.next,t=this.calcTemplate(),r=t.tempLayout,n=t.templateRate;e!==n&&(this.templateRate={next:n,previous:n},this.calculateScreenInfo()),this.initLayout=Qo()(r),this.newLayoutList=this.calculateNewLayoutList()}},{key:"onVideoStatusChange",value:function(e,t){this.logger.log("[LM]on video status change: ",{key:e,data:t});var r,n="AUTO"===this.client.config.layout,i=n?this.layoutList:this.customLayoutMap,o=t.status,s=i.has(e),a=!1;if("VIDEO_PLAY_FAILED"===o&&this.client.emmit("play-failed",{type:"video",key:e,error:t.error}),s){var c=i.get(e),u=c.state,l=c.roster.isLocal;"NORMAL"!==u&&"REQUEST"!==u||"ENDED"!==o?"NORMAL"!==u||"REQUEST"!==o||l?("REQUEST"!==u&&"INVALID"!==u||"CANPLAY"!==o)&&("MUTE"!==u||"CANPLAY"!==o||l)||(r="NORMAL",a=!0):(r="REQUEST",a=!0):(r="INVALID",a=!0),a&&(i.set(e,Object.assign(Object.assign({},c),{state:r})),n?this.layoutList=i:this.customLayoutMap=i,this.client.sendLayoutMessage())}}},{key:"setVideoRenderer",value:function(e,t){if(this.logger.log("[lm]set video renderer:",{key:e,wrapEleId:t}),!this.videoManagers[e]){this.logger.log("[lm]Not Match VM: ",e);var r="1"===e.charAt(e.length-1);this.videoManagers[e]=new Vs(this.logger,r),this.videoManagers[e].setVideoStatusChange(this.onVideoStatusChange)}this.videoManagers[e].setSource(e,t)}},{key:"removeVideoRenderer",value:function(e,t){this.videoManagers[e]&&(this.logger.log("[lm]remove VM: ",e),delete this.videoManagers[e])}},{key:"playVideo",value:function(e){return ca(this,void 0,void 0,t().mark((function r(){var n,i,o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0,i=Object.keys(this.videoManagers);case 1:if(!(n<i.length)){t.next=12;break}if(o=i[n],!(e&&e.indexOf(o)>-1)&&e){t.next=9;break}if(!(null==(s=this.videoManagers[o].videoEle)?void 0:s.srcObject)){t.next=9;break}return t.next=8,s.play();case 8:this.logger.log("replay video successfully:",o);case 9:n++,t.next=1;break;case 12:case"end":return t.stop()}}),r,this)})))}},{key:"updateLocalTrack",value:function(){var e=this.selfRoster.id,t=this.videoManagers[e];t&&t.updateLocalTrack()}},{key:"updateStreams",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r="AUTO"===this.client.config.layout,n=r?this.layoutList:this.customLayoutMap,i=this.client.getLayoutRosters(),o=i.total.length;n.forEach((function(t,r){var s=t.roster,a=s.isLocal,c=s.id,u=s.isContent,l=!1;e.videoManagers[c]||(e.videoManagers[c]=new Vs(e.logger,u),e.videoManagers[c].setVideoStatusChange(e.onVideoStatusChange)),e.videoManagers[c].match=!0;var h=e.videoManagers[c].state;if(a){var d=e.client.getPreviewStreams().previewStreams,f=((void 0===d?[]:d)[0]||{stream:null}).stream;e.videoManagers[c].initVideoStreamById(c,f);var p=Ws(t,f,h),v=n.get(r);v&&n.set(r,Object.assign(Object.assign({},v),{state:p}))}else{for(var g=0;g<o;g++){var m=i.total[g],y=m.participantId,b=m.mediagroupid,S=m.videoTrackId;if(t.roster.participantId+t.roster.mediagroupid===y+b){var w=e.getVideoStreamByTrackId(S).videoStream;l=!0,e.videoManagers[c].initVideoStreamById(c,w);var k=Ws(t,w,h),C=n.get(r);C&&n.set(r,Object.assign(Object.assign({},C),{state:k}));break}}if(!l){e.videoManagers[c].initVideoStreamById(c,null);var x=Ws(t,null,h),E=n.get(r);E&&n.set(r,Object.assign(Object.assign({},E),{state:x}))}}})),this.clearInvalidVideoManagers(),this.logger.log("updated new layout list",qn(n)),r?this.layoutList=n:this.customLayoutMap=n,t&&this.client.sendLayoutMessage()}},{key:"clearInvalidVideoManagers",value:function(){var e=this;Object.keys(this.videoManagers).forEach((function(t){e.videoManagers[t].match?delete e.videoManagers[t].match:(e.videoManagers[t].destroy(),delete e.videoManagers[t])}))}},{key:"calcPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.confInfo,t=this.preConfInfo||{},r=t.contentUri,n=void 0===r?"":r,i=t.chairManUrl,o=void 0===i?"":i,s=e.participantCount,a=e.contentUri,c=e.chairManUrl,u=this.pageInfo,l=u.pageSize,h=u.currentPage,d=Math.min(zi,s),f=Math.ceil(d/l);h=Math.min(h,f),this.pageInfo.totalPage=f,this.pageInfo.currentPage=h;var p=!1;!o&&c&&(p=!0),!n&&a&&(p=!0),n&&!a&&"GALLERY"!==this.templateMode&&(p=!0),this.isLocalShareContent&&(this.templateMode="GALLERY",this.pageInfo.currentPage=0,p=!1),p&&(this.pageInfo.currentPage=0,this.templateMode=a?so:oo),this.preConfInfo=Qo()(this.confInfo),this.logger.log("[AUTO] pageInfo:",this.pageInfo),this.client.emmit("page-info",this.pageInfo)}},{key:"setPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.forceFullScreenId&&this.setForceFullScreenId(""),this.pageInfo.currentPage=e;var t=this.confInfo.contentUri;this.templateMode=e>0?"GALLERY":t?this.templateModeTemp:oo,this.calcRequestNewLayout(),this.client.emmit("page-info",this.pageInfo)}},{key:"calcForceFullScreenRequestLayout",value:function(){var e=this.pageInfo.pageSize,t=[],r=this.forceFullScreenId===this.selfRoster.id,n=this.layoutList.get(this.forceFullScreenId);if(r)this.createAutoLayout([]);else{var i=(null==n?void 0:n.roster)||{},o=i.endpointId,s=void 0===o?"":o,a=i.mediagroupid,c=Si.CONTENT,u=Si.PEOPLE,l=function(e){var t=Si.CONTENT,r=yi.LEVEL1080,n=yi.LEVEL720,i=e===t?r:n;return{position:[0,0,1,1],resolution:{normal:i,low:i,high:r},quality:e===t?2:1,type:e}}(1===a?c:u),h=l.resolution,d=l.quality,f=void 0===d?bi.NORMAL:d,p=this.convertResolutionLevel(h);t.push({calluri:s,mediagroupid:a,resolution:p,quality:f}),this.client.requestNewLayout(t,e,0)}}},{key:"calcRequestNewLayout",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageInfo;if(this.logger.log("calc request layout page info:",t),this.forceFullScreenId)this.calcForceFullScreenRequestLayout();else{var r=this.confInfo,n=r.participantCount,i=void 0===n?0:n,o=r.chairManUrl,s=void 0===o?"":o,a=r.contentUri,c=void 0===a?"":a,u=t.pageSize,l=t.currentPage,h=t.totalPage,d=this.client.getLocalHide(),f=0===l&&c?1:0,p=Math.min(zi,i),v=p+f-(d?1:0),g=v,m=this.client.getOnHold(),y=s&&s!==this.selfRoster.endpointId,b=[];if(i<=1&&!c)this.client.requestNewLayout([{mediagroupid:0,calluri:this.selfRoster.endpointId,resolution:3,quality:1}],u,0);else if(m)this.client.requestNewLayout(b,u,0);else{if(l===h&&l>0&&(g=v-(l-1)*u),y&&(g=f+(d?1:2),l=0),this.isLocalShareContent&&(g=Math.min(v,4)),(g=Math.min(g,u))>0){var S=oa[this.templateMode],w=S.temp,k=S.length,C=w[g]||w[Math.max(1,k)],x=["TWO_PIC_PIP","TWO_PIC_SYMMETRIC"],E=d||x.includes(this.templateMode)||l>1,_=Si.LOCAL,I=Si.CONTENT;C.forEach((function(t){var r=t.resolution,n=t.type,i=t.quality,o=void 0===i?1:i,a="";(n!==_||E)&&(0!==l||e.isLocalShareContent||(a=n===I?c:s),b.push({mediagroupid:n===I?1:0,calluri:a,resolution:e.convertResolutionLevel(r),quality:o}))}))}this.logger.log("request layout:",b),this.client.requestNewLayout(b,u,l,[],{uiShowLocalWhenPageMode:!d})}}}},{key:"createAutoLayout",value:function(e){var t=this;if(this.forceFullScreenId)if(this.forceFullScreenId===this.selfRoster.id)e=[];else{var r=e.find((function(e){return e.calluri+e.mediagroupid===t.forceFullScreenId}));if(!r||1===r.mediagroupid&&!this.confInfo.contentUri)return this.setForceFullScreenId(""),void this.calcRequestNewLayout()}this.createOrderRoster(e),this.createLayout()}},{key:"createOrderRoster",value:function(e){this.orderRosterList=[];var t=e.length,r=this.client.getLocalHide(),n=this.confInfo.chairManUrl;if(0!==t){for(var i=0;i<t;i++){var o,s,a=e[i],c=a.calluri,u=void 0===c?"":c,l=a.mediagroupid,h=a.isAudioMute,d=a.isVideoMute,f=a.remoteName,p=a.remoteType,v=a.MuteReason;s=u+l,o=Object.assign(Object.assign({},a),{id:s,isLocal:!1,isContent:1===l,displayName:f,endpointId:u,audioTxMute:h,videoTxMute:d,videoRxMute:!1,deviceType:p,audioRxMute:!1,videoMuteReason:v,isForceFullScreen:0===l&&u===n,isLastAdd:!1,onHold:!1,isPolling:!1}),1===l?(this.confInfo.contentUri&&(this.content=Object.assign(Object.assign({},this.content),{next:o})),this.orderRosterList.splice(0,0,o)):this.orderRosterList.push(o)}(!this.forceFullScreenId||this.forceFullScreenId&&this.forceFullScreenId===this.selfRoster.id)&&!r&&this.pageInfo.currentPage<=1&&this.orderRosterList.splice(1,0,this.selfRoster)}else this.orderRosterList=[this.selfRoster]}},{key:"createCustomLayout",value:function(e){var t=this,r=this.client.getFeatureConfig().enableLayoutAvatar;this.createOrderRoster(e),this.orderRosterList.forEach((function(e,n){var i=e.id,o=e.deviceType,s=t.customLayoutMap.has(i),a=aa[o]||aa.default;if(s){var c=t.customLayoutMap.get(i);t.customLayoutMap.set(i,Object.assign(Object.assign({},c),{roster:e,resolution:0,quality:0,deal:!0,index:n}))}else t.customLayoutMap.set(i,Object.assign({roster:e,rotate:{},state:"NORMAL",resolution:0,quality:0,deal:!0,index:n},r&&{avatar:a}))})),this.clearInvalidLayout(),this.logger.log("[v2]custom layout map: ",this.customLayoutMap)}},{key:"requestLayout",value:function(e){var t=this,r=this.orderRosterList;e.forEach((function(e){var n=e.callUri,i=void 0===n?"":n,o=e.isContent,s=e.resolution,a=e.quality,c=i+Number(o),u=t.customLayoutMap.has(c),l=r.findIndex((function(e){return e.endpointId+Number(e.isContent)===c})),h=r[l],d=a>0?100*a:100;if(u){var f=t.customLayoutMap.get(c);t.customLayoutMap.set(c,Object.assign(Object.assign({},f),{roster:h,resolution:s,quality:d,deal:!0}))}else t.customLayoutMap.set(c,{roster:h,rotate:{},state:"NORMAL",resolution:s,quality:d,deal:!0})})),this.clearInvalidLayout();var n=this.customLayoutCalculator();this.client.sendCustomLayout(n),this.logger.log("custom layout list: ",this.customLayoutMap)}},{key:"calculatePosition",value:function(){var e=this,t={left:"0px",top:"0px",width:"0px",height:"0px"},r={width:0,height:0};this.layoutList.forEach((function(n,i){var o=e.screenInfo,s=o.rateWidth,a=o.rateHeight,c=Uo(n.position,4),u=c[0],l=c[1],h=c[2],d=c[3],f=Math.round(s*u),p=Math.round(a*l),v=Math.round(s*h),g=Math.round(a*d);t={left:"".concat(f,"px"),top:"".concat(p,"px"),width:"".concat(v,"px"),height:"".concat(g,"px")},r={width:v,height:g},n.zIndex&&(t.zIndex=n.zIndex),e.layoutList.set(i,Object.assign(Object.assign({},n),{positionStyle:t,positionInfo:r}))}))}},{key:"calculateRotate",value:function(){var e=this;this.client.getRotationInfo().forEach((function(t){var r=t.participantId,n=t.mediagroupid,i=e.getLayoutKeyByRotateInfo(r,n),o={};if(i){var s=e.layoutList.get(i);if(s){var a=s.positionInfo||{width:0,height:0},c=a.width,u=a.height;o=$s(t,c,u),e.layoutList.set(i,Object.assign(Object.assign({},s),{rotate:o}))}}})),this.client.config.localMirror&&this.localMirrorRotate()}},{key:"getVideoStreamByTrackId",value:function(e){for(var t=this.client.getVideoTrackList(),r=t.length,n={videoStream:null,track:null},i=0;i<r;i++){var o=t[i].data,s=t[i].rest,a=o.streams[0].id;if((a=a.replace("-st","-tk-vd"))===e){n={videoStream:o.streams[0],track:s.track};break}}return n}},{key:"calculateNewLayoutList",value:function(){for(var e=this.orderRosterList.length,t=this.initLayout.length,r=this.client.getFeatureConfig().enableLowResolution,n=[],i=this.client.getSpeakerInfo(),o=0;o<e;o++){var s=this.orderRosterList[o];if(Object.assign(s,{isActiveSpeaker:0===s.mediagroupid&&s.endpointId===i.endpointId}),!(o<t))break;var a=this.initLayout[o]||{},c=a.position,u=void 0===c?ea:c,l=a.zIndex,h=void 0===l?0:l,d=a.resolution,f=void 0===d?{normal:1,low:1}:d;n.push({roster:s,position:u,resolution:r?f.low:f.normal,zIndex:h})}return n}},{key:"calculateScreenInfo",value:function(){var e=this.client.getClientConfig();if("CUSTOM"===e.layout)return{width:0,height:0,rateHeight:0,rateWidth:0};var t=e.container||{elementId:"",offset:[]},r=t.elementId,n=void 0===r?"":r,i=t.offset,o=void 0===i?[]:i,s=n?document.getElementById(n):null,a=Uo(o,4),c=a[0],u=void 0===c?0:c,l=a[1],h=void 0===l?0:l,d=a[2],f=void 0===d?0:d,p=a[3],v=void 0===p?0:p,g=Number(u)+Number(h),m=Number(f)+Number(v),y=(null==s?void 0:s.clientHeight)||document.body.clientHeight,b=(null==s?void 0:s.clientWidth)||document.body.clientWidth,S=y-g,w=b-m,k=S>0?S:y,C=w>0?w:b,x=Math.floor(C*this.templateRate.next),E=Math.floor(k/this.templateRate.next),_={rateHeight:0,rateWidth:0,width:C,height:k};_=k>x?{rateWidth:C,rateHeight:x,width:C,height:k}:{rateWidth:E,rateHeight:k,width:C,height:k},this.forceFullScreenId&&(_={rateWidth:C,rateHeight:k,width:C,height:k}),this.logger.log("client screen info: ",_),this.screenInfo=_,this.client.sendScreenInfoMessage(_)}},{key:"createLayout",value:function(){var e=this.client.getPeerConnectionStatus();if(this.initLayoutManager(),this.createBaseLayout(),this.updateStreams(!1),this.calculatePosition(),this.calculateRotate(),this.client.sendLayoutMessage(),this.logger.log("create layout: ",qn(this.layoutList)),this.logger.log("current template mode:",this.templateMode),"GALLERY"!==this.templateMode&&(this.templateModeTemp=this.templateMode),this.client.sendTemplateMode(this.templateMode),e){var t=this.content,r=t.previous,n=t.next;(null==r?void 0:r.participantId)!==(null==n?void 0:n.participantId)&&this.client.sendContentRosterMessage(n)}}},{key:"calculateOrderRosterList",value:function(){var e=this.client.getOriginRosters(),t=this.client.getInviteInfo().callerUri,r=this.client.getContentSenderPid(),n=this.client.getSpeakerInfo(),i=this.client.getLocalHide(),o=e.length,s={content:[],chairmain:[],selfRoster:[],activeSpeaker:[],audioVideoUnmute:[],audioUnmute:[],videoUnmute:[],audioVideoMute:[]},a=[];this.localContent=null;for(var c=0;c<o;c++){var u=e[c],l=u.mediagroupid,h=u.endpointId;u.isActiveSpeaker=!1,u.isLocal=!1,u.id=h+l,u.endpointId===t&&u.isContent?this.localContent=u:"record"!==u.deviceType&&(u.isContent&&r>0&&u.participantId!==r||(u.isContent&&r>0&&u.participantId===r?s.content.push(u):u.isForceFullScreen?s.chairmain.push(u):u.endpointId===t&&i&&o>1||(u.endpointId!==t||u.isContent||i?n.endpointId&&n.endpointId===u.endpointId?(u.isActiveSpeaker=!0,s.activeSpeaker.push(u)):u.audioTxMute||u.videoTxMute?u.audioTxMute||!u.videoTxMute?!u.audioTxMute||u.videoTxMute?u.audioTxMute&&u.videoTxMute&&s.audioVideoMute.push(u):s.videoUnmute.push(u):s.audioUnmute.push(u):s.audioVideoUnmute.push(u):(u.isLocal=!0,this.selfRoster.participantId=u.participantId,s.selfRoster.push(u)))))}for(var d in this.localContent&&s.content&&(s.content=[]),s)a=a.concat(s[d]);return a}},{key:"switchLayout",value:function(e){this.forceFullScreenId&&this.setForceFullScreenId("");var t=this.confInfo.contentUri,r=t?io:no,n=e;if(n)r.findIndex((function(e){return e===n}))<0&&"GALLERY"!==n&&(n=t?so:oo);else if("GALLERY"===this.templateMode)n=this.templateModeTemp;else{n=this.templateMode;var i=r.findIndex((function(e){return e===n})),o=i+1>=r.length?0:i+1;n=r[o]}return this.templateMode=n,this.pageInfo.currentPage="GALLERY"===this.templateMode?1:0,this.calcRequestNewLayout(),this.client.emmit("page-info",this.pageInfo),this.logger.log("switch layout Mode: ",n),n}},{key:"clearVideoManagersUseMonitorList",value:function(e){var t=this;e.forEach((function(e){t.videoManagers[e]&&(t.videoManagers[e].destroy(),delete t.videoManagers[e])}))}},{key:"setLocalStatus",value:function(e){if(this.logger.log("set local status: ",e),this.selfRoster=Object.assign(Object.assign({},this.selfRoster),e),!this.forceFullScreenId||this.forceFullScreenId===this.selfRoster.id){var t=this.selfRoster,r=t.endpointId,n=t.mediagroupid,i=r+n,o="AUTO"===this.client.config.layout?this.layoutList:this.customLayoutMap,s=o.get(i),a=this.orderRosterList.findIndex((function(e){return e.endpointId===r&&e.mediagroupid===n}));a>-1&&(this.orderRosterList[a]=this.selfRoster),s&&o.set(i,Object.assign(Object.assign({},s),{roster:this.selfRoster})),this.updateStreams()}}},{key:"clearInvalidLayout",value:function(){var e="AUTO"===this.client.config.layout?this.layoutList:this.customLayoutMap;e.forEach((function(t,r){t.deal?e.set(r,Object.assign(Object.assign({},t),{deal:!1})):e.delete(r)}))}},{key:"createBaseLayout",value:function(){var e=this,t=this.client.getFeatureConfig().enableLayoutAvatar;this.newLayoutList.forEach((function(r){var n=r.roster,i=r.position,o=r.zIndex,s=r.resolution,a=n.endpointId,c=n.mediagroupid,u=(n.deviceType,a+c);if(e.layoutList.has(u)){var l=e.layoutList.get(u);e.layoutList.set(u,Object.assign(Object.assign({},l),{roster:n,position:i,zIndex:o,resolution:s,deal:!0}))}else{var h=aa[n.deviceType]||aa.default;e.layoutList.set(u,Object.assign({roster:n,position:i,zIndex:o,resolution:s,state:"NORMAL",rotate:{},positionStyle:{left:"",top:"",width:"",height:""},positionInfo:{width:0,height:0},deal:!0,quality:100},t&&{avatar:h}))}})),this.clearInvalidLayout()}},{key:"customLayoutCalculator",value:function(){var e=[],t={};return this.customLayoutMap.forEach((function(r){var n=r.roster||{},i=n.isContent,o=n.id,s=n.isLocal,a=n.participantId,c=r.resolution,u=void 0===c?1:c,l=r.quality,h=void 0===l?100:l,d=h>0?100*h:100;s||(e.push({pid:a,resolution:u,quality:d,mediagroupid:Number(i)}),t[o]={resolution:ro.RESOLUTION_MAP[u],quality:d})})),this.internelsLayout=t,e}},{key:"getLayoutKeyByRotateInfo",value:function(e,t){var r="";return this.layoutList.forEach((function(n){var i=n.roster,o=i.isContent,s=i.endpointId,a=i.mediagroupid;i.participantId===e&&1===t===o&&(r=s+a)})),r}},{key:"localMirrorRotate",value:function(){var e=this.client.invite.callerUri+"0";if(this.layoutList.has(e)){var t=this.layoutList.get(e);this.layoutList.set(e,Object.assign(Object.assign({},t),{rotate:{transform:"rotateY(180deg)"}}))}}},{key:"convertResolutionLevel",value:function(e){var t=this.client.getFeatureConfig().enableLowResolution,r=this.client.getEnterpriseMediaConfig().isSupportHighResolution,n=void 0!==r&&r,i=e.normal,o=e.low,s=e.high;return t?o:n&&s||i}}],[{key:"getCustomLayoutItem",value:function(e,t,r){var n=e.roster.isContent;return{pid:e.roster.participantId,resolution:t,quality:r,mediagroupid:n?1:0}}}]),e}(),la=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ha=function(){function e(t,r){l(this,e),this.client=t,this.logger=r,this.conferenceInfo=ro.CONFERENCE_INFO,this.mediaConfig={},this.rxBandwidth=0,this.recordPermission={authorize:!1,recordingUrl:""},this.cloudRoomInfo={meetingControlPassword:"",meetingNumber:"",password:""},this.confMgmtUrl=null,this.layoutAvatarMap=new Map}return d(e,[{key:"getRecordPermission",value:function(){return this.recordPermission}},{key:"getLayoutAvatarMap",value:function(){return this.layoutAvatarMap}},{key:"getEnterpriseMediaConfig",value:function(){return this.mediaConfig}},{key:"getRxBandwidth",value:function(){return this.rxBandwidth}},{key:"handleUserInfo",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.client.getLoginInfo(),!this.client.getFeatureConfig().enableMeetingOwner){e.next=5;break}return e.next=5,this.getCloudMeetingRooms();case 5:n=Object.assign({},r,{cloudRoomInfo:this.cloudRoomInfo}),this.logger.log("[meeting]Emmit user info: ",n),this.client.emmit("user-info",n);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"handleConferenceInfo",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l,h,d,f;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[meeting]Handle conf info"),r=this.client.getInviteInfo(),n=r.vcNumber,i=void 0===n?"":n,o=r.meetingId,s=r.commonJson,a=void 0===s?"":s,c=this.client.getCallInfo(),u=c.meeting,l=c.confNumber,h=this.client.getFeatureConfig(),d=i||l,f=a&&JSON.parse(a)||{},this.conferenceInfo=Object.assign({},ro.CONFERENCE_INFO,u,{callNumber:d},{meetingId:o}),e.next=9,this.getVCConfInfo(i,l);case 9:if(!h.enableWatermarkContent){e.next=12;break}return e.next=12,this.getWatermarkContent(f.confAuxProperties);case 12:if(this.handleWaitingRoomInfo(f.waitingRoomProps),!h.enableMeetingInvite){e.next=16;break}return e.next=16,this.getMeetingInviteInfo();case 16:this.logger.log("[meeting]emmit conference info: ",this.conferenceInfo),this.client.emmit("conference-info",this.conferenceInfo);case 18:case"end":return e.stop()}}),e,this)})))}},{key:"getConfMgmtUrl",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l,h,d,f,p,v,g,m,y,b,S,w;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[invoke] getConfMgmtUrl"),r=this.client.getInviteInfo(),r.callIndex){e.next=4;break}return e.abrupt("return",null);case 4:if(e.prev=4,this.confMgmtUrl){e.next=10;break}return e.next=8,Lo.getServerConfig(["meetingControl","meetingControlMemebersUrl","sidebarMeetingControlUrl"]);case 8:(n=e.sent)&&200===n.status&&n.data&&(i=n.data,o=i.meetingControl,s=void 0===o?"":o,a=i.meetingControlMemebersUrl,c=void 0===a?"":a,u=i.sidebarMeetingControlUrl,l=void 0===u?"":u,this.confMgmtUrl={pc:s,member:c,side:l});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this.logger.log("getConfMgmtUrl error:",e.t0);case 15:return h=this.confMgmtUrl||{},d=h.pc,f=void 0===d?"":d,p=h.member,v=void 0===p?"":p,g=h.side,m=void 0===g?"":g,y=Hi,b=Ui,S=Ki,w={pc:this.getMeetingControlUrl(f),member:this.getMeetingControlUrl(v),mobile:this.getMeetingControlUrl(f,y),side:this.getMeetingControlUrl(m,b),professional:this.getMeetingControlUrl(f,S)},this.logger.log("return ConfMgmtUrl:",w),e.abrupt("return",w);case 20:case"end":return e.stop()}}),e,this,[[4,12]])})))}},{key:"getMeetingControlUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gi,r=this.client.getInviteInfo(),n=r.vcNumber,i=this.client.getLoginInfo(),o=i.securityKey,s=_o.split("- build on"),a=Ki,c=Gi,u=Ui;return e&&(e="".concat(e,"?conferenceNo=").concat(n,"&securityKey=").concat(o,"&locale=").concat(Yn,"&platform=").concat(t===a?c:t,"&version=").concat(s[0],"&from=sdk"),t===u&&(e+="&fromSidebar=true&hideSwitchIco=true"),t===a&&(e+="#/professional")),e}},{key:"getVCConfInfo",value:function(e,r){return la(this,void 0,void 0,t().mark((function n(){var i,o,s,a,c,u,l,h,d,f,p,v,g,m,y;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||r===e){t.next=13;break}return t.prev=1,t.next=4,Lo.getCallUri({number:e,deviceType:Vi,country:"CN"});case 4:i=t.sent,o=i.data||{},s=o.displayName,a=void 0===s?"":s,c=o.numberType,u=void 0===c?"":c,l=o.callUrl,h=void 0===l?"":l,d=o.avatar,f=void 0===d?"":d,p=o.deviceType,v=void 0===p?"":p,g=o.deviceId,m=void 0===g?"":g,y=this.conferenceInfo,this.conferenceInfo=Object.assign(Object.assign({},y),{displayName:a,numberType:u,callUrl:h,avatar:f,deviceType:v,deviceId:m}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),this.logger.error("[meeting]Get calluri info err: ",t.t0);case 13:case"end":return t.stop()}}),n,this,[[1,10]])})))}},{key:"getWatermarkContent",value:function(e){return la(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n={watermark:"",displayConfNo:"",inoutReminder:""},e&&(n=JSON.parse(e)||{}),"1"!==n.watermark||!this.conferenceInfo){t.next=14;break}return t.prev=3,t.next=6,Lo.getWatermarkContent(this.conferenceInfo.callNumber);case 6:i=t.sent,o=i.data||{watermarkContent:""},s=o.watermarkContent,a=void 0===s?"":s,this.conferenceInfo.confAuxProperties={watermarkContent:a},t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),this.logger.error("[meeting]Get conf watermark content error: ",t.t0);case 14:case"end":return t.stop()}}),r,this,[[3,11]])})))}},{key:"getMeetingInviteInfo",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.client.getCallInfo(),n=r.confNumber,e.prev=1,e.next=4,Lo.getMeetingInviteInfo({conferenceNumber:n});case 4:200===(i=e.sent).status?this.conferenceInfo.inviteInfo=i.data:this.logger.warn("[meeting]Get invite info err: ",i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logger.error("[meeting]Get meeting invite info error: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"checkPermissionWithMeetingNumber",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.client.getInviteInfo(),n=r.meetingId,i=r.vcNumber,o=void 0===i?"":i,this.logger.log("[meeting]check record permission: ",{meetingId:n,vcNumber:o}),e.prev=2,e.next=5,Lo.checkPermissionWithMeetingNumber(o,n);case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:s=e.t0,a=s.status,c=s.data,200===a&&(u=c.authorize,l=c.recordingUrl,this.recordPermission={authorize:u,recordingUrl:l}),e.next=17;break;case 14:e.prev=14,e.t1=e.catch(2),this.logger.log("[meeting]check permission err:",e.t1);case 17:return this.client.emmit("record-permission",this.recordPermission),e.abrupt("return",this.recordPermission);case 19:case"end":return e.stop()}}),e,this,[[2,14]])})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return la(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[meeting]check record storage space: ",e),t.prev=1,t.next=4,Lo.checkStorageSpaceWithRecordingUrl(e);case 4:n=t.sent,i=n.status,o=n.data,400===i&&(s=o.developerMessage,a=o.errorCode,c=o.userMessage,Object.assign(this.recordPermission,{developerMessage:s,errorCode:a,userMessage:c})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),this.logger.log("check record storage space err:",t.t0);case 12:return this.client.emmit("record-permission",this.recordPermission),t.abrupt("return",this.recordPermission);case 14:case"end":return t.stop()}}),r,this,[[1,9]])})))}},{key:"getCloudMeetingRooms",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l,h;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.client.getLoginInfo(),n=r.id,e.prev=1,e.next=4,Lo.getCloudMeetingRooms(n);case 4:200===(i=e.sent).status?(o=i.data[0]||{},s=o.meetingControlPassword,a=void 0===s?"":s,c=o.meetingNumber,u=void 0===c?"":c,l=o.password,h=void 0===l?"":l,this.cloudRoomInfo={meetingControlPassword:a,meetingNumber:u,password:h}):this.logger.error("[iauth]get cloud meeting rooms error: ",i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logger.error("[iauth]get cloud meeting rooms err: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"handleWaitingRoomInfo",value:function(e){if(e){var t=(e||{}).waitingState,r=!!(void 0===t?0:t);this.client.setOnHold(r),this.client.emmit("onhold",r)}}},{key:"handleLayoutAvatar",value:function(e){return la(this,void 0,void 0,t().mark((function r(){var n=this;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:Promise.all(e.map((function(e){return la(n,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.roster.id)){t.next=12;break}return i=n.slice(0,n.length-1),o=aa[e.roster.deviceType]||aa.default,this.layoutAvatarMap.set(n,o),t.next=7,Lo.getInComingCallUrlInfo(i);case 7:s=t.sent,a=(s||{}).avatar,(c=void 0===a?"":a)&&c.indexOf("images/deviceavatars")>-1&&(c=""),this.layoutAvatarMap.set(n,c||o),c&&this.client.sendLayoutMessage(!1);case 12:case"end":return t.stop()}}),r,this)})))})));case 1:case"end":return r.stop()}}),r)})))}},{key:"setEnterpriseConfig",value:function(){return la(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l,h,d,f,p,v,g,m,y;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[meeting] set enterprise config"),e.prev=1,r=[],n=this.client.getFeatureConfig(),i=n.enableBandwidthSetting,o=So,s=wo,a=ko,i&&(r=[].concat(Go(r),[o,s,a])),r.length){e.next=8;break}return e.abrupt("return");case 8:return c=this.client.getLoginInfo(),u=c.id,e.next=11,Lo.getEnterpriseMediaConfig(u,r);case 11:l=e.sent,h=l.RemoteSDKConfig,d=l.mediaConfig,this.logger.log("enterprise config result:",{RemoteSDKConfig:h,mediaConfig:d}),h&&(this.rxBandwidth=1024*~~(h.downLinkCeilingRate||0)),d&&(f=ro.MAX_PEOPLE_RESOLUTION,p=d.pvrxResolution,g=!1,m=f,(v=void 0===p?"":p)&&(y=v.split(";"),m=~~y[0].split("_")[1]||f,g=m>f),this.mediaConfig=Object.assign(Object.assign({},d),{isSupportHighResolution:g,maxRequestResolution:m})),e.next=21;break;case 19:e.prev=19,e.t0=e.catch(1);case 21:case"end":return e.stop()}}),e,this,[[1,19]])})))}},{key:"convertReqList",value:function(e){this.logger.log("[meeting] convert request list:",e);var t=ro.MAP_RESOLUTION_INDEX[ro.MAX_PEOPLE_RESOLUTION];return this.mediaConfig.isSupportHighResolution||(e=e.map((function(e){return!e.isContent&&e.resolution>t&&(e.resolution=t),e}))),e}}]),e}();const da=ha;var fa=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return!1;var t=!0;return e.some((function(e){var r=e||{},n=r.calluri,i=(r.mediagroupid,r.quality),o=r.resolution;("string"!=typeof n||$i.indexOf(i)<0||Zi.indexOf(o)<0)&&(t=!1)})),t};r(3689),r(658),r(2479);const pa=function(){function e(t,r){l(this,e),this.client=t,this.layoutManager=r,this.reportDataTimer=0,this.previousInternals=null,this.internals=null,this.participantCount=1,this.meetingQualityData={callNumber:"",deviceId:"",meetingId:"",osVersion:navigator.userAgent,sockProto:"udpProto",swVersion:_o,cdrVersion:10,deviceType:Vi}}return d(e,[{key:"reportQualityData",value:function(e){var t,r;if(!this.meetingQualityData.callNumber){var n=this.client.invite,i=n.meetingId,o=n.callerUri,s=n.remoteUri,a=n.vcNumber;this.meetingQualityData.callNumber=s||a+"@CONFNO",this.meetingQualityData.deviceId=o.split("@")[0],this.meetingQualityData.meetingId=i}var c=((null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo())||{}).participantCount,u=void 0===c?1:c;if(this.participantCount=u,this.reportDataTimer=this.reportDataTimer+1,this.reportDataTimer%2==0){this.internals=e,this.calcQualityData(0);var l=this.client.getLocalShareContent(),h=((null===(r=this.layoutManager)||void 0===r?void 0:r.getConfInfo())||{}).contentUri;((void 0===h?"":h)||l)&&this.calcQualityData(1),this.reportDataTimer=0}this.previousInternals=e}},{key:"calcAudioLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(e/=100)<316e-7?-90:Math.trunc(20*Math.log10(e))}},{key:"calcQualityData",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.internals){var o=this.internals,s=o.receiver,a=o.sender,c=o.audioReceiver,u=o.audioSender,l=o.jitterReceived,h=o.jitterSent,d=o.fractionLostSent,f=o.fractionLostReceived,p=o.roundTripTime,v=o.audioSendJitter,g=o.audioSendLost,m=void 0===g?0:g,y=o.audioRecvLost,b=void 0===y?0:y,S=this.previousInternals||{audioReceiver:{}},w=S.audioReceiver,k=0,C=[],x=0,E=0,_=this.participantCount>1?0:200,I=0,A=-90,T=-90,R=0,O=(null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster())||{participantId:0,endpointId:""},D=[{callUri:O.endpointId,participantId:O.participantId,sessionId:0,audioStream:[],videoStream:[]}],N=[],L=new Map,P=[],M=0,B=0,j=0,G=0,H=0;Object.values(a).map((function(e){var t=e.bytesSentSecond,r=e.frameWidth,i=e.frameHeight,o=e.framesEncodedSecond,s=e.resolution,a=e.isContent,c=e.expBandwidth;!!n===a&&(I+=t,R+=c,D[0].videoStream.push({fr:o,height:i,width:r}),P.push({Height:i,Width:r,framerate:o,resNum:1,resolution:s&&Bi[s.toUpperCase()]||1}))})),Object.values(s).map((function(e){var t=e.frameWidth,r=e.frameHeight,i=e.framesDecodedSecond,o=e.participantId,s=e.bytesReceivedSecond,a=e.jitter,c=void 0===a?0:a,u=e.isContent,l=e.framesReceivedSecond,h=e.ExpectWidth,d=void 0===h?0:h,f=e.ExpectHeight,p=void 0===f?0:f;if(!!n===u){_+=s,k=Math.ceil(Math.max(k,c)),M+=t*r*l,B+=d*p*l;var v=t+"*"+r,g=L.get(v);g?(g.resNum+=1,g.framerate+=l,L.set(v,g)):L.set(v,{Width:t,Height:r,framerate:l,resNum:1,resolution:Bi["".concat(r,"P")]||1}),C.push({participantId:o||0,videoStream:[{fr:i,height:t,width:r}]})}})),Object.values(u).map((function(e){var t=e.bytesSentSecond,i=e.audioLevel,o=void 0===i?0:i,s=e.expBandwidth,a=e.isContent;!!n===a&&(R+=s,A=r.calcAudioLevel(o),E+=t)})),Object.values(w).map((function(e){var t=e.insertedSamplesForDecelerationSecond,r=void 0===t?0:t,i=e.removedSamplesForAccelerationSecond,o=void 0===i?0:i,s=e.totalSamplesReceivedSecond,a=void 0===s?0:s,c=e.isContent;!!n===c&&(G+=r,G+=o,H+=a)})),Object.values(c).map((function(e){var t=e.bytesReceivedSecond,r=e.audioLevel,i=void 0===r?0:r,o=e.insertedSamplesForDecelerationSecond,s=void 0===o?0:o,a=e.removedSamplesForAccelerationSecond,c=void 0===a?0:a,u=e.totalSamplesReceivedSecond,l=void 0===u?0:u,h=e.isContent;!!n===h&&(G+=s,G+=c,H+=l,j=Math.max(j,i),E+=t)})),L.forEach((function(e,t){var r=e.framerate,n=e.resNum;e.framerate=r/n,N.push(e)}));var U=(null===(t=navigator.connection)||void 0===t?void 0:t.type)||"none",K=B?Math.floor(M/B*100):-1,F=H?Math.floor(G/H*100):0;T=this.calcAudioLevel(j);var V={sessionName:n,networkType:Ji[U]||0,timestampSec:1e3*parseInt((new Date).getTime()/1e3+""),audioCaptureEnergy:A,audioRenderEnergy:T,audioDownLinkBw:x,audioUpLinkBw:E,avrMissLipsync:0,videoUplinkBw:I,videoDownLinkBw:_,videoPxRatio:K,videoRecvDelay:0,videoSendDelay:0,videoRecvJitter:l,videoSendJitter:h,isLast:i,recvStreams:C,sendStreams:D,videoQuality:N,videoSendQuality:P,dbaDownLinkBw:_,dbaUplinkBw:I,videoSendRtt:p,audioSendRtt:p,audioSendJitter:v,videoRecvLost:f,videoSendLost:d,audioSendLost:m,audioRecvLost:b,upExpectedBw:R,downMaxExpectedBw:3e3,downMinExpectedBw:3e3,audioPlcPct:F},Y={content:Object.assign({},this.meetingQualityData,V)};this.client.sendSocketMessage({type:"PASS_THROUGH",body:{type:"dataReport",data:Y}},!1,!1)}}},{key:"stopReportData",value:function(){this.client.off("meeting-stats"),this.calcQualityData(0,!0)}}]),e}();r(7727);var va=function(){function e(){l(this,e),this.waitingQueue=[],this.isRunning=!1}return d(e,[{key:"addTask",value:function(e){var t=this;return new Promise((function(r,n){t.isRunning?t.waitingQueue.push({task:e,resolve:r,reject:n}):(t.isRunning=!0,t.execute(e,r,n))}))}},{key:"execute",value:function(e,t,r){var n=this;e().then((function(e){t(e)})).catch((function(e){r(e)})).finally((function(){if(n.waitingQueue.length){var e=n.waitingQueue.shift();e&&n.execute(e.task,e.resolve,e.reject)}else n.isRunning=!1}))}}]),e}();const ga=va;var ma={version:"3.7.30",zh_CN:{"MMS:unmute.video.timeout":"{dn}已拒绝开启摄像头","MMS:voice.mode":"{dn}已拒绝开启摄像头","MMS:no.camera.permission":"{dn}已拒绝开启摄像头","MMS:called":"您正在被主会场点名","MMS:supervised":"正在接受主会场督导","MMS:driving.mode":"{dn}已拒绝开启摄像头","MMS:device.bt.limit":"当前终端受带宽限制,不支持开启摄像头","MMS:test":"测试","MMS:callroll":"主会场正在点名","MMS:reject.unmute.video":"{dn}已拒绝开启摄像头"},zh_TW:{"MMS:unmute.video.timeout":"{dn}已拒絕開啟攝像頭","MMS:voice.mode":"{dn}已拒絕開啟攝像頭","MMS:no.camera.permission":"{dn}已拒絕開啟攝像頭","MMS:called":"您正在被主會場點名","MMS:supervised":"正在接受主會場督導","MMS:driving.mode":"{dn}已拒絕開啟攝像頭","MMS:device.bt.limit":"當前終端受帶寬限製,不支持開啟攝像頭","MMS:test":"测试","MMS:callroll":"主會場正在點名","MMS:reject.unmute.video":"{dn}已拒絕開啟攝像頭"},en_US:{"MMS:voice.mode":"{dn} refused to turn on the camera","MMS:no.camera.permission":"{dn} refused to turn on the camera","MMS:nmute.video.timeout":"{dn} refused to turn on the camera","MMS:called":"You are being called by host","MMS:supervised":"Meeting supervision is on-going by host","MMS:driving.mode":"{dn} refused to turn on the camera","MMS:device.bt.limit":"The terminal does not support enabling the camera currently due to bandwidth limitation.","MMS:test":"test","MMS:callroll":"Calling roll at the main place","MMS:reject.unmute.video":"{dn} refused to turn on the camera"}};function ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zo(e);if(t){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yo(this,r)}}var ba=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Sa=function(e){Vo(n,e);var r=ya(n);function n(e,t){var i,o;l(this,n),(i=r.call(this)).onSetAudioStream=function(e){if(e&&i.stream){var t=i.stream.getMediaStreams().previewStreams;"mute"===e&&t.length&&i.stream.setAudioOrVideoStatus("muteAudio"),"unmute"===e&&t.length&&i.stream.setAudioOrVideoStatus("unmuteAudio")}},i.logger=t,i.clientErrorState="NONE",i.callInfo={token:"",confNumber:""},i.onhold=!1;try{i.logger.initDB(),Lo.setLogger(i.logger)}catch(e){i.logger.error("Init db error: ",e)}i.logger.log("System info: ",navigator.userAgent),i.logger.log("Version: ",_o),i.logger.log("Init config: ",e),i.logger.log("Location: ",window.location),i.config=e,i.setActionInfo(),e.layout&&(i.config.layout=e.layout.toUpperCase()),i.iauth=new os(i.logger),i.autoMode="AUTO"===(null===(o=e.layout)||void 0===o?void 0:o.toUpperCase()),i.debug=!!e.debug,i.localHide=!!e.localHide;var s=n.getHideId(e);return i.hideId=s,i.config.__hideId=s,i.featureConfig=bo,i.disconnected=!1,i.clientStatus=!0,i.peerConnectionStatus=!1,i.isAutoBandwidth=!0,i.seq=0,i.token="",i.speakerInfo={endpointId:"",pid:0},i.stream=null,i.rosters=[],i.videoTrackList=[],i.audioTrackList=[],i.layoutManager=new ua(Ko(i)),i.meeting=new da(Ko(i),i.logger),i.layoutRosters={content:[],people:[],total:[]},i.pushType="ALL",i.cacheMeetingControlMessage=null,i.rotationInfo={people:[],content:[],total:[]},i.customLayoutSeq=0,i.contentSenderPid=0,i.invite={callerUri:"",callIndex:0,automute:"",meetingId:""},i.shareContentTimer=null,i.shareContentStatus="ENDED",i.streamChangeList={content:[],people:[]},i.autoSwitchDevice=!0,i.audioManagers={},i.limitResolution={content:[],people:[]},i.customLayoutCacheList=null,i.contentOnholdInfo={is:!1,audioTrackId:"",contentUrl:""},i.deviceManager=null,i.isPermissionDenied={camera:!1,microphone:!1},i.contentMode="VIDEO",i.isSubscribeBulkRoster=!1,i.isSubscribeTranslation=!1,i.recordState="",i.speakerInfos=[],i.errorcode=ln.get("xy-error-code")||Vn,i.i18nCode=ln.get("xy-i18n-code")||ma,i.onScreenChangeEvent=i.onScreenChangeEvent.bind(Ko(i)),i.onDocumentChange=function(e,t,r){var n,i=null;return function(){var o=+new Date,s=this,a=arguments;i&&clearTimeout(i),n||(n=o),o-n>=r?(e.apply(s,a),n=o):i=setTimeout((function(){e.apply(s,a)}),t)}}(i.onScreenChangeEvent,15,30),i.deviceManager=new Us(i.logger),i.initDeviceManagerEvent(),i.qualityManager=new pa(Ko(i),i.layoutManager),i.isShareContent=!1,i.handStatus=!1,i.operateQueue=new ga,i.logger.log("Merged config: ",i.config),i}return d(n,[{key:"getLoginInfo",value:function(){return this.iauth.getLoginInfo()}},{key:"getFeatureConfig",value:function(){return this.featureConfig}},{key:"getCallInfo",value:function(){return this.callInfo}},{key:"getClientConfig",value:function(){return this.config}},{key:"getVideoManagers",value:function(){var e;return null===(e=this.layoutManager)||void 0===e?void 0:e.getVideoManagers()}},{key:"getPreviewStreams",value:function(){var e;return(null===(e=this.stream)||void 0===e?void 0:e.getMediaStreams())||{previewStreams:[]}}},{key:"getVideoTrackList",value:function(){return this.videoTrackList}},{key:"getLayoutRosters",value:function(){return this.layoutRosters}},{key:"getOriginRosters",value:function(){return this.rosters}},{key:"getInviteInfo",value:function(){return this.invite}},{key:"getContentSenderPid",value:function(){return this.contentSenderPid}},{key:"getSpeakerInfo",value:function(){return this.speakerInfo}},{key:"getLocalHide",value:function(){return this.localHide}},{key:"getRotationInfo",value:function(){return this.rotationInfo.total}},{key:"getPeerConnectionStatus",value:function(){return this.peerConnectionStatus}},{key:"getOnHold",value:function(){return this.onhold}},{key:"getAudioTrackList",value:function(){return this.audioTrackList||[]}},{key:"getLayoutList",value:function(){var e,t,r=this.config.layout;return"AUTO"===r?null===(e=this.layoutManager)||void 0===e?void 0:e.getLayoutList():"CUSTOM"===r?null===(t=this.layoutManager)||void 0===t?void 0:t.getCustomLayoutList():void 0}},{key:"getSelfRoster",value:function(){var e;return null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster()}},{key:"getLocalShareContent",value:function(){return this.isShareContent}},{key:"getEnterpriseMediaConfig",value:function(){return this.meeting.getEnterpriseMediaConfig()}},{key:"setOnHold",value:function(e){this.onhold=e}},{key:"loginXYlinkAccount",value:function(e,r){return ba(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] login xylink account:",{userName:e,password:r}),t.next=3,this.iauth.login({userName:e,password:r});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"loginExternalAccount",value:function(e){return ba(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] login external account:",e),t.next=3,this.iauth.loginExternalAccount(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"resetInitParameter",value:function(){this.debug=!!this.config.debug,this.localHide=!!this.config.localHide,this.hideId=this.config.__hideId,this.isPermissionDenied={camera:!1,microphone:!1},this.isSubscribeBulkRoster=!1,this.isSubscribeTranslation=!1}},{key:"setContentMode",value:function(e){this.contentMode=e}},{key:"setFeatureConfig",value:function(e){if(this.logger.log("[client]set feature config: ",e),!ei(e))return this.logger.warn("[client]rejected because params error"),$n("XYSDK:950101");this.featureConfig=Object.assign({},bo,e),this.logger.log("merged feat config: ",this.featureConfig),this.featureConfig.enableAutoResizeLayout&&this.autoMode&&this.initWindowResizeEvent(),this.setLimitResolution()}},{key:"setLimitResolution",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.featureConfig.enableLowResolution;this.limitResolution={content:t?["1080"]:[],people:t||e?["720"]:[]}}},{key:"getConfMgmtUrl",value:function(){return this.logger.log("[client] getConfMgmtUrl"),this.meeting.getConfMgmtUrl()}},{key:"toggleLocal",value:function(){var e=this;return this.logger.log("[client] toggleLocal:",this.autoMode),new Promise((function(t,r){var n;e.autoMode?(e.localHide=!e.localHide,null===(n=e.layoutManager)||void 0===n||n.calcRequestNewLayout(),e.sendsOriginOrderRosterMessage(),t({status:e.localHide})):(e.localHide=!e.localHide,t({status:e.localHide}))}))}},{key:"toggleHideId",value:function(){var e=this;return this.logger.log("[client] toggleHideId:",this.hideId),new Promise((function(t,r){e.hideId=e.hideId?"":e.config.__hideId,e.sendSocketMessage({type:"UPDATE_HIDEID",hideId:e.hideId}),t(!!e.hideId)}))}},{key:"setVideoRenderer",value:function(e,t){var r;this.logger.log("[client] setVideoRenderer:",{key:e,wrapEleId:t}),null===(r=this.layoutManager)||void 0===r||r.setVideoRenderer(e,t)}},{key:"removeVideoRender",value:function(e,t){var r;this.logger.log("[client] removeVideoRender:",{key:e,wrapEleId:t}),null===(r=this.layoutManager)||void 0===r||r.removeVideoRenderer(e,t)}},{key:"playVideo",value:function(e){var t=this;return this.logger.log("[client] playVideo:",e),new Promise((function(r,n){var i;try{null===(i=t.layoutManager)||void 0===i||i.playVideo(e),r(!0)}catch(e){t.logger.log("video replay failed:",e),n(!1)}}))}},{key:"playAudio",value:function(){var e=this;return this.logger.log("[client] playAudio:"),new Promise((function(r,n){return ba(e,void 0,void 0,t().mark((function e(){var i,o,s,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,i=0,o=Object.keys(this.audioManagers);case 2:if(!(i<o.length)){e.next=19;break}if(!(s=o[i])){e.next=16;break}if(!(null==(a=this.audioManagers[s].ele)?void 0:a.srcObject)){e.next=16;break}return e.prev=7,e.next=10,a.play();case 10:this.logger.log("audio replay success..."),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),this.logger.log("audio replay failed:",e.t0);case 16:i++,e.next=2;break;case 19:r(!0),e.next=26;break;case 22:e.prev=22,e.t1=e.catch(0),this.logger.log("audio replay failed:",e.t1),n(!1);case 26:case"end":return e.stop()}}),e,this,[[0,22],[7,13]])})))}))}},{key:"setAudioRenderer",value:function(e,r){var n,i,o;return ba(this,void 0,void 0,t().mark((function s(){var a,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] setAudioRenderer:",e),this.audioManagers[e]||(this.audioManagers[e]={ele:r}),a=this.audioManagers[e],this.logger.log("setAudioRenderer render ele srcObject:",null===(n=null==a?void 0:a.ele)||void 0===n?void 0:n.srcObject),!a||!a.ele||a.ele.srcObject){t.next=23;break}if(!((c=this.audioTrackList.findIndex((function(t){return t.rest.streamId===e})))>=0)){t.next=23;break}return u=this.audioTrackList[c].data.streams[0],a.ele.srcObject=u,this.logger.log("setAudioRenderer audioTrack:",u.id),t.prev=10,t.next=13,a.ele.play();case 13:this.logger.log("setAudioRenderer play:",u.id),l=null===(i=this.stream)||void 0===i?void 0:i.config.devices,this.stream&&l&&l.audioOutputValue&&"default"!==l.audioOutputValue&&(null===(o=this.deviceManager)||void 0===o||o.setAudioOutputDevice(a.ele,l.audioOutputValue)),this.logger.log("audio play success: ",u.id,u.active,a.ele.paused),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(10),this.emmit("play-failed",{type:"audio",key:e,error:t.t0}),this.logger.warn("audio play error: ",t.t0);case 23:case"end":return t.stop()}}),s,this,[[10,19]])})))}},{key:"switchAutoDevice",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.logger.log("[client] switchAutoDevice",t),new Promise((function(r,n){e.autoSwitchDevice=!!t,r(e.autoSwitchDevice)}))}},{key:"setActionInfo",value:function(){var e=this.config,t=e.server,r=void 0===t?"":t,n=e.httpServer,i=e.wssServer,o=e.logServer,s=e.clientId,a=e.clientSecret,c=void 0===a?"":a,u=e.checkSSL,l=Oo.protocol,h=Oo.wssProtocol;(void 0===u||u)&&(h=Ro[l="https:"]),this.config.httpServer=n||"".concat(l,"//").concat(r),this.config.wssServer=i||"".concat(h,"//").concat(r);var d=o||ln.get("xy-log-server");Lo.setBaseUrl(this.config.httpServer,d),Lo.setClientInfo({clientId:s,clientSecret:c})}},{key:"sendV2States",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.featureConfig.enableV2States&&Lo.setStates(e,t,r)}},{key:"switchLayout",value:function(e){var t=this;return this.logger.log("[client] switchLayout: ",e),new Promise((function(r,n){var i;t.autoMode?(e=(null===(i=t.layoutManager)||void 0===i?void 0:i.switchLayout(e))||"SPEAKER",t.sendV2States("oper-confOperation","layout"),r(e)):n($n("XYSDK:950601"))}))}},{key:"setPageInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.logger.log("[client] setPageInfo: ",t),"AUTO"!==this.config.layout)return Promise.reject($n("XYSDK:950603"));null===(e=this.layoutManager)||void 0===e||e.setPageInfo(t)}},{key:"checkPermissionWithMeetingNumber",value:function(){return ba(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.meeting.checkPermissionWithMeetingNumber();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return ba(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.meeting.checkStorageSpaceWithRecordingUrl(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),r,this)})))}},{key:"handleSocketMessage",value:function(e,t){if(!this.disconnected)switch(e.type){case"CALL_INDEX":this.onCallIndexMessage(e);break;case"CONNECTED":t(this.clientStatus&&!this.disconnected),this.onConnectedMessage(e);break;case"confMgmtReport":this.logger.log("Get meeting control confMgmtReport message: ",e),this.onMeetingControlMessage(e);break;case"SUB_TITLE":this.logger.log("Get meeting control SUB_TITLE message: ",e),this.onSubTitle(e);break;case"CANCEL_HANGUP":this.logger.log("Get CANCEL_HANGUP message: ",e),this.emmit("cancel-handup",!0);break;case"WAITING_STATE":this.logger.log("Get WAITING_STATE message:",e),this.handleWaitingState(e);break;case"PASS_THROUGH":this.onPassThroughMessage(e);break;case"mediaNotifyInfo":this.logger.log("Get mediaNotifyInfo message: ",e);break;case"MEDIA_CHANGED":this.logger.log("Get MEDIA_CHANGED message: ",e),this.onMediaChangedMessage();break;case"DIS_CONNECTED":this.logger.log("Get disconnected message: ",e),this.onDisConnectedMessage(e);break;case"CALL_EXCEPTION_REPORT":this.logger.log("Get exception message: ",e),this.onCallExceptionMessage(e);break;case"DualStreamReport":this.logger.log("Get share stream message: ",e),this.onDualStreamMessage(e);break;case"MONITOR_STATE_REPORT":this.logger.log("Get monitor state report: ",e),this.onMonitorReportMessage(e);break;case"RecordingStateChanged":this.logger.log("Get recording state changed:",e),this.onRecordingStateChangedMessage(e);break;case"RecordStatusNotification":this.logger.log("Get record status notification:",e),this.onRecordStatusNotfiMessage(e);break;case"EPMESSAGE":this.logger.log("Get EPMESSAGE message:",e),this.onEPMessage(e);break;default:this.logger.log("接收到其他ws消息",e)}}},{key:"onEPMessage",value:function(e){var t=JSON.parse(e.body),r=t.value;if("toast"===t.key){var n=r.dn,i=void 0===n?"":n,o=r.message,s=void 0===o?"":o,a=s,c=this.i18nCode[Yn][s];c&&(a=c.replace("{dn}",i)),r.message=a}this.emmit("meeting-control-video",t)}},{key:"sendVideoControlResult",value:function(e,r){return ba(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]invoke sendVideoControlResult: ",{type:e,data:r}),ei(r)){t.next=4;break}return this.logger.log("[client]invoke params error"),t.abrupt("return",Promise.reject($n("XYSDK:950101",r)));case 4:return i=JSON.stringify(r),t.next=7,Lo.sendVideoControlResult(e,i);case 7:return t.abrupt("return",Promise.resolve($n("XYSDK:950120",{},"success")));case 8:case"end":return t.stop()}}),n,this)})))}},{key:"onRecordStatusNotfiMessage",value:function(e){var t,r=e.callUri;e.isLocal=r===(null===(t=this.getSelfRoster())||void 0===t?void 0:t.endpointId),this.emmit("record-status-notification",e)}},{key:"onRecordingStateChangedMessage",value:function(e){var t=e.reason,r=e.state;this.recordState=r;var n=this.errorcode[Yn][t];"CHARGE:641"===t&&(n=this.meeting.getRecordPermission().developerMessage+n);e.reasonText=n,this.emmit("recording-state-changed",e)}},{key:"onDualStreamMessage",value:function(e){var t,r,n,i,o,s=this,a=e.state,c=function(){s.shareContentTimer&&clearTimeout(s.shareContentTimer),s.shareContentTimer=null};if("SENDING"===a)this.shareContentStatus="STARTING",null===(t=this.stream)||void 0===t||t.emmit("start-share-content",{}),null===(r=this.layoutManager)||void 0===r||r.setLocalShareContent(!0),this.sendV2States("oper-confOperation","content",{contentType:"desk"}),c();else if("IDLE"===a){var u=Xo[Yn].SHARE_CONTENT_FAILED;"STATE:200"===e.code?null===(n=this.stream)||void 0===n||n.emmit("stop-share-content",{}):(e.code&&this.errorcode&&this.errorcode[Yn]&&(u=this.errorcode[Yn][e.code]),null===(i=this.stream)||void 0===i||i.emmit("stop-share-content",$n("XYSDK:950512",{message:u}))),null===(o=this.layoutManager)||void 0===o||o.setLocalShareContent(!1),this.shareContentStatus="ENDED",c()}}},{key:"onCallExceptionMessage",value:function(e){var t=Xo[Yn][e.exception];e.code&&this.errorcode&&(t=this.errorcode[Yn][e.code]),t=t||Xo[Yn].default,this.disconnected=!0,this.emmit("disconnected",$n("XYSDK:950230",{message:t})),this.close("SERVER_INNER_ERROR")}},{key:"onDisConnectedMessage",value:function(e){var t=e.detail,r=void 0===t?"default":t,n=e.code,i=void 0===n?"STATE:200":n,o=e.reason,s=void 0===o?"":o,a=Xo[Yn][r];"KickoutTipContent"!==r&&"The device locked"!==r&&"OK"!==r&&i&&this.errorcode&&(a=this.errorcode[Yn][e.code]),a=a||Xo[Yn].default,this.disconnected=!0;var c={message:a,code:i,detail:r,reason:s};this.logger.log("emmit disconnected msg:",c),this.emmit("disconnected",$n("XYSDK:950230",c)),this.clientStatus=!1,this.stream&&this.stream.close(),this.close("SERVER_INNER_ERROR")}},{key:"onMediaChangedMessage",value:function(){var e;this.peer&&this.stream&&(u?(this.peer.close(),this.peer=new ns(this,this.stream),this.peer.setRestartIceConnection(!0),this.peer.publish(this.stream,"ALL"),this.isShareContent&&(null===(e=this.peer)||void 0===e||e.publish(this.stream,"CONTENT"))):this.peer&&this.peer.restartIceConnection()),"STARTING"===this.shareContentStatus&&this.sendContentCapabilityMessage(),this.sendConfParam(),this.isSubscribeBulkRoster&&this.subscribeBulkRoster(),this.sendWebRxBandwidth(),this.isSubscribeTranslation&&this.startTranslation(),this.videoTrackList=[],this.audioTrackList=[],this.emmit("media_changed_migrate",!0)}},{key:"onCallIndexMessage",value:function(e){var t;if(this.invite=Object.assign(Object.assign({},this.invite),e),this.logger.log("Get callIndex message: ",this.invite),"AUTO"===this.config.layout){var r=null===(t=this.layoutManager)||void 0===t?void 0:t.getScreenInfo();r&&this.sendScreenInfoMessage(r)}}},{key:"onConnectedMessage",value:function(e){this.invite=Object.assign(Object.assign({},this.invite),e),this.logger.log("Get connected message: ",this.invite),this.setLocalRosterStatus(),this.sendAudioStatus(!!this.config.muteAudio),this.meeting.handleConferenceInfo(),this.featureConfig.enableCheckRecordPermission&&this.meeting.checkPermissionWithMeetingNumber(),this.meeting.handleUserInfo();var t=this.invite,r=t.meetingId,n=t.callerUri,i=t.vcNumber,o=void 0===i?"":i;Lo.setMeetingInfo({meetingId:r,callUri:n,vcNumber:o}),this.meeting.setEnterpriseConfig(),this.sendV2States("sta-confStatus","callIn",{callType:"initiativeJoin",appName:this.config.isThird?co:ao,audioMute:this.config.muteAudio,videoMute:this.config.muteVideo})}},{key:"setLocalRosterStatus",value:function(){var e,t=this.iauth.getLoginInfo().extUserId;null===(e=this.layoutManager)||void 0===e||e.setLocalStatus({endpointId:this.invite.callerUri,participantId:Yi,id:this.invite.callerUri+0,audioTxMute:this.config.muteAudio,videoTxMute:this.config.muteVideo,extUserId:t})}},{key:"onMonitorReportMessage",value:function(e){var t=e.code,r=e.monitorInfo,n=r.failUriList,i=this.errorcode[Yn],o=JSON.parse(JSON.stringify(n));if(o=o.map((function(e){var t="未知错误",r=e.status;return"SIG:412"===r||"SIG:4464"===r?t="终端暂不支持":i&&(t=i[r]),Object.assign(Object.assign({},e),{message:t})})),"STATE:200"===t)this.emmit("start-monitor-report",{monitorInfo:Object.assign(Object.assign({},r),{failUriList:o})});else{var s="";t&&i&&(s=i[t]),this.emmit("stop-monitor-report",$n("XYSDK:950312",{message:s}))}}},{key:"makeCall",value:function(e){var r,n,i;return ba(this,void 0,void 0,t().mark((function o(){var s,a,c,u,l,h,d=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] makeCall params: ",e),s=window.location,a=s.protocol,c=s.hostname,u=e.token,l=e.confNumber,"https:"===a||"localhost"===c||!this.config.checkSSL){t.next=5;break}return t.abrupt("return",Promise.reject($n("XYSDK:950130")));case 5:if("[object Object]"===Object.prototype.toString.call(e)){t.next=7;break}return t.abrupt("return",Promise.reject($n("XYSDK:950101",e)));case 7:if(u&&l){t.next=9;break}return t.abrupt("return",Promise.reject($n("XYSDK:950101",e)));case 9:if(this.clientStatus){t.next=11;break}return t.abrupt("return",Promise.reject($n("XYSDK:950201")));case 11:return null===(r=this.layoutManager)||void 0===r||r.setLocalStatus({displayName:e.displayName||""}),t.next=14,null===(n=this.deviceManager)||void 0===n?void 0:n.emmitDevices();case 14:return t.prev=14,t.next=17,this.getBasicInfo(e);case 17:if(!this.config.isVerifyMeetingId){t.next=23;break}return t.next=20,this.verifyMeeting(e);case 20:if(!(h=t.sent)||h.success){t.next=23;break}return t.abrupt("return",Promise.reject(h.data));case 23:t.next=29;break;case 25:return t.prev=25,t.t0=t.catch(14),this.logger.log("make call error:",t.t0),t.abrupt("return",Promise.reject($n(Kn[null===(i=null===t.t0||void 0===t.t0?void 0:t.t0.data)||void 0===i?void 0:i.errorCode]||"XYSDK:950106",t.t0)));case 29:return t.abrupt("return",new Promise((function(e,t){d.initWss(e,t)})));case 30:case"end":return t.stop()}}),o,this,[[14,25]])})))}},{key:"startCall",value:function(){var e=this.callInfo,t=e.confNumber,r=e.displayName,n=void 0===r?"":r,i=e.password,o=void 0===i?"":i,s=e.meeting,a=this.config,c=a.__hideId,u=void 0===c?"":c,l=a.__monitorMode,h=void 0===l?"":l,d=a.muteAudio,f=a.muteVideo,p=(s||{callUrl:t+"@CONFNO"}).callUrl,v=void 0===p?"":p,g=this.iauth.getLoginInfo().cellPhone;this.invite.callIndex||this.sendSocketMessage({type:"START_CALL",calleeNumber:v,displayName:n,pwd:o,callMode:"AUDIO_VIDEO",mediaAppend:{audioEncCapList:[99],videoEncCapList:[106]},hideId:u,monitorMode:h,callerNumber:g,muteAudio:d,muteVideo:f})}},{key:"stopCall",value:function(e){if(this.invite.callIndex){var t=this.invite.callIndex;this.disconnected?e="SERVER_INNER_ERROR":"PUBLISH_ERROR"===this.clientErrorState?e="PEER_NET_DISCONNECT":"WS_CLOSE"!==this.clientErrorState&&"WS_ERROR"!==this.clientErrorState||(e="LOCAL_NET_DISCONNECT"),this.sendSocketMessage({type:"STOP_CALL",reason:e,code:to[e],callIndex:t},!1)}}},{key:"publish",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isShareContent:!1,isShareFile:!1,isShareWhiteBoard:!1,isSharePeople:!1};if(this.logger.log("[client] publish:",n),this.logger.log("get network when publish:",c.getNetWork()),this.clientStatus&&!this.disconnected){if(this.isShareContent=!!n.isShareContent,!n.isSharePeople)return n.isShareContent?(this.sendContentCapabilityMessage(e),void(null===(r=this.peer)||void 0===r||r.publish(e,"CONTENT"))):void 0;try{this.stream=e,this.peer=new ns(this,e),e.setClientObj(this),this.peer.publish(e,"ALL"),"CUSTOM"===this.config.layout&&(null===(t=this.layoutManager)||void 0===t||t.initLayoutManager()),this.initTrackEvent()}catch(e){this.logger.error("publish error: ",e),this.clientErrorState="PUBLISH_ERROR",this.emmit("call-status",$n("XYSDK:950517",e))}}}},{key:"sendContentCapabilityMessage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stream,r=this.invite,n=r.callerUri,i=void 0===n?"":n,o=r.meetingId,s=t.getMediaStreams(),a=s.contentStreams;console.log("this.limitResolution: ",this.limitResolution);var c=a.filter((function(t){return console.log("item: ",t),"NORMAL"===t.status&&!e.limitResolution.content.includes(t.resolution)})).map((function(e){var t;return{streamId:(null===(t=e.stream)||void 0===t?void 0:t.id)||"",resolution:ro.MAP_RESOLUTION_INDEX[e.resolution]}}));c.length?(this.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"contentCapability",streams:c}}),this.logger.log("contentCapability:",c)):this.logger.log("contentCapability is null"),this.setLimitResolution(!0),this.sendPeopleCapability()}},{key:"applyShareContent",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.shareContentStatus="PENDING",this.sendSocketMessage({type:"START_CONTENT",mode:this.contentMode,enableAnnotation:!1}),this.shareContentTimer=setTimeout((function(){var e;"PENDING"===r.shareContentStatus&&(r.shareContentStatus="ENDED",null===(e=r.stream)||void 0===e||e.emmit("stop-share-content",{}),r.shareContentTimer&&(clearTimeout(r.shareContentTimer),r.shareContentTimer=null))}),1e4);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"stopShareContent",value:function(){var e=this;return this.logger.log("[client] stopShareContent"),this.isShareContent=!1,this.setLimitResolution(),this.stream&&this.sendPeopleCapability(),new Promise((function(t,r){try{"STARTING"!==e.shareContentStatus&&"PENDING"!==e.shareContentStatus||e.sendSocketMessage({type:"STOP_CONTENT",mode:e.contentMode}),e.peer&&e.peer.closeContentStream(),e.stream&&e.stream.closeContentStream(),e.shareContentStatus="ENDED",e.streamChangeList.content=[],t(!0)}catch(e){r($n("XYSDK:950513",e))}}))}},{key:"initTrackEvent",value:function(){var e=this;this.on("track",(function(t){var r=t.track,n=r.id,i=r.kind,o=t.streams[0]||{};e.logger.log("client onTrack event: ",{track:{id:n,kind:i},stream:null==o?void 0:o.id}),t&&t.track.kind&&e.mergeTrackList(t),e.logger.log("video and audio track list: ",{video:e.videoTrackList,audio:e.audioTrackList})}))}},{key:"handleContentOnholdAudio",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.contentOnholdInfo,r=e.streamId,n=e.track,i=t.audioTrackId,o=t.contentUrl;r===i&&(n.enabled=!!o,this.logger.log("content audio track when content onhold,",r))}},{key:"mergeTrackList",value:function(e){var t,r=e.track,n=r.kind,i=r.id,o={streamId:e.streams[0].id,track:r,trackId:i},s={status:"remote",data:e,rest:o};"video"===n?(this.videoTrackList.push(s),null===(t=this.layoutManager)||void 0===t||t.updateStreams(),this.emmit("video-track",this.videoTrackList)):"audio"===n&&(this.handleContentOnholdAudio(o),this.audioTrackList.push(s),this.emmit("audio-track",this.audioTrackList))}},{key:"destroy",value:function(){var e=this;return this.logger.log("[client] destroy"),new Promise((function(t,r){try{e.stream&&e.stream.close(),e.close(),t(!0)}catch(e){r($n("XYSDK:950204",e))}}))}},{key:"close",value:function(){var e,t,r,n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"OK";this.logger.log("[client] close:",i),this.logger.log("get network when close:",c.getNetWork()),null===(e=this.qualityManager)||void 0===e||e.stopReportData(),this.resetInitParameter(),this.contentOnholdInfo={is:!1,audioTrackId:"",contentUrl:""},this.clientStatus&&(this.clientStatus=!1,this.stopShareContent(),this.stopCall(i),this.peer&&this.peer.close(),this.removeWindowResizeEvent(),this.removeAllListener(),null===(t=this.layoutManager)||void 0===t||t.clearInvalidVideoManagers(),null===(r=this.layoutManager)||void 0===r||r.setForceFullScreenId(),this.socketTask&&this.socketTask.close(),this.deviceManager&&this.deviceManager.destroy(),this.customLayoutSeq=0,this.audioManagers={},this.layoutManager=null,this.deviceManager=null,this.handStatus=!1,this.logger.log("client closed successfully"),setTimeout((function(){n.logger.stopDB()}),100))}},{key:"getConference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{autoMute:0};return ba(this,void 0,void 0,t().mark((function o(){var s,a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] getConference:",{id:e,sk:r,token:n,params:i}),s=this.iauth.getLoginInfo(),a=r||(null==s?void 0:s.securityKey),c=e||(null==s?void 0:s.id),t.prev=4,Lo.setLoginInfo(n),t.next=8,Lo.getConference(c,a,i);case 8:if(200!==(null==(u=t.sent)?void 0:u.status)){t.next=13;break}return t.abrupt("return",u.data);case 13:return t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:{}}));case 14:t.next=19;break;case 16:return t.prev=16,t.t0=t.catch(4),t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:t.t0}));case 19:case"end":return t.stop()}}),o,this,[[4,16]])})))}},{key:"getServerConfig",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,c,u,l,h,d,f,p,v;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=ln.get("xy-error-code"),n=ln.get("xy-i18n-code"),i=ln.get("xy-timestamp"),o=(new Date).valueOf(),s=Wn(Number(i),Number(o)),a=["logServer"],c=!1,r&&n&&s<1||(a=["i18n","errorcode","logServer"],c=!0),e.next=11,Lo.getServerConfig(a);case 11:if(!(u=e.sent)||200!==u.status||!u.data){e.next=22;break}if(l=u.data,h=l.errorcode,d=l.i18n,f=void 0===d?"{}":d,p=l.logServer,v=void 0===p?"":p,ln.set("xy-log-server",v),this.config.logServer=v,Lo.setLogBaseUrl(this.config.logServer),!c){e.next=22;break}return e.next=20,this.getCodeByJson("errorcode",h,r);case 20:return e.next=22,this.getCodeByJson("i18n",f,n);case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),this.logger.log("getServerConfig error:",e.t0);case 27:case"end":return e.stop()}}),e,this,[[0,24]])})))}},{key:"getCodeByJson",value:function(e,r,n){return ba(this,void 0,void 0,t().mark((function i(){var o,s,a,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=null==n?void 0:n.version,r="string"==typeof r?JSON.parse(r):r,a=(s=r).link,c=s.version,u=(new Date).valueOf(),c!==o){t.next=6;break}return t.abrupt("return");case 6:if(t.t0=a,!t.t0){t.next=11;break}return t.next=10,Lo.getCodeByJson(a);case 10:t.t0=t.sent;case 11:(l=t.t0)&&("errorcode"===e?(this.errorcode=l,ln.set("xy-error-code",this.errorcode)):"i18n"===e&&(this.i18nCode=l,ln.set("xy-i18n-code",this.i18nCode)),ln.set("xy-timestamp",u));case 13:case"end":return t.stop()}}),i,this)})))}},{key:"videoAudioOperate",value:function(e){var r=this;return new Promise((function(n,i){return ba(r,void 0,void 0,t().mark((function r(){var o,s,a,c,u,l,h,d,f,p=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.stream){t.next=36;break}if(a=Qi[e].type,c=this.stream.getMediaStreams(),u=c.previewStreams,l=this.stream.current.type,this.logger.log("video or audio operate: ",e),h=this.isPermissionDenied.microphone||"FAILED"===this.stream.current.type,d=this.isPermissionDenied.camera||"FAILED"===this.stream.current.type,"unmuteAudio"!==e||!h){t.next=10;break}return this.logger.log("No permission to do audio operations"),t.abrupt("return",i($n("XYSDK:950224")));case 10:if("unmuteVideo"!==e||!d){t.next=13;break}return this.logger.log("No permission to do video operations"),t.abrupt("return",i($n("XYSDK:950225")));case 13:if(this.peer){t.next=16;break}return this.logger.log("Need to create a peer to do audio and video operations"),t.abrupt("return",i($n("XYSDK:950202")));case 16:if(u.length){t.next=19;break}return this.logger.log("Need to create a stream to do audio and video operations"),t.abrupt("return",i($n("XYSDK:950203")));case 19:return t.prev=19,f=Qi[e].status,t.next=23,this.stream.setAudioOrVideoStatus(e);case 23:"muteAudio"===e||"unmuteAudio"===e?(null===(o=this.layoutManager)||void 0===o||o.setLocalStatus({audioTxMute:!f}),this.sendAudioStatus(!f),this.onSpeakerInfoMessage()):"muteVideo"!==e&&"unmuteVideo"!==e||(null===(s=this.layoutManager)||void 0===s||s.setLocalStatus({videoTxMute:!f}),this.sendVideoStatus(!f)),l=this.stream.current.type,"unmuteVideo"!==e?this.sendOperationMessage(a):"NORMAL"!==l&&"VIDEO_ONLY"!==l||setTimeout((function(){p.sendOperationMessage(a),p.stream&&p.isAutoBandwidth&&p.streamChange&&p.stream.handleChangeStream(p.streamChange,p.peer,p.streamChange.mediagroupid||0)}),800),this.sendV2States("oper-confOperation",uo[e]),n(e),t.next=34;break;case 30:t.prev=30,t.t0=t.catch(19),this.logger.log("video or audio operate error:",t.t0),i($n("XYSDK:950223",t.t0));case 34:t.next=37;break;case 36:i($n("XYSDK:950203"));case 37:case"end":return t.stop()}}),r,this,[[19,30]])})))}))}},{key:"muteAudio",value:function(){var e=this;return this.logger.log("[client] muteAudio"),this.operateQueue.addTask((function(){return e.videoAudioOperate("muteAudio")}))}},{key:"muteVideo",value:function(){var e=this;return this.logger.log("[client] muteVideo"),this.operateQueue.addTask((function(){return e.videoAudioOperate("muteVideo")}))}},{key:"unmuteAudio",value:function(){var e=this;return this.logger.log("[client] unmuteAudio"),this.operateQueue.addTask((function(){return e.videoAudioOperate("unmuteAudio")}))}},{key:"unmuteVideo",value:function(){var e=this;return this.logger.log("[client] unmuteVideo"),this.operateQueue.addTask((function(){return e.videoAudioOperate("unmuteVideo")}))}},{key:"setPollingAudioStatus",value:function(e,r){return ba(this,void 0,void 0,t().mark((function n(){var i,o,s,a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] setPollingAudioStatus: ",{type:e,callUriList:r}),i="string"==typeof r?[r]:Array.isArray(r)?r:[],r&&i.length){t.next=5;break}return this.logger.warn("callUriList should be string or string array."),t.abrupt("return");case 5:if(o=this.invite.meetingId,"mute"!==e&&"unmute"!==e){t.next=24;break}return t.prev=7,t.next=10,Lo.updateWebViewProp(o,i.map((function(t){return{callUri:t,params:'{"audioEnable": '.concat("mute"===e?'"false"':'"true"',"}")}})));case 10:if(s=t.sent,a=Uo(s,2),c=a[0],u=a[1],c){t.next=18;break}return t.abrupt("return",u);case 18:return t.abrupt("return",$n("XYSDK:950111",u));case 19:t.next=24;break;case 21:return t.prev=21,t.t0=t.catch(7),t.abrupt("return",$n("XYSDK:950111",t.t0));case 24:case"end":return t.stop()}}),n,this,[[7,21]])})))}},{key:"onHandUp",value:function(){return this.logger.log("[client] onHandUp"),this.onHand("handup",!0)}},{key:"onHandDown",value:function(){return this.logger.log("[client] onHandDown"),this.onHand("handdown",!1)}},{key:"onMute",value:function(){return this.logger.log("[client] onMute"),this.onHand("mute",!1)}},{key:"onHand",value:function(e,r){var n=this;return this.handStatus=r,new Promise((function(i,o){return ba(n,void 0,void 0,t().mark((function n(){var s,a,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Lo.hand(e);case 3:200===(s=t.sent).status&&0===s.data.code?i(r):(a=(null==s?void 0:s.data)||{},c=a.errorCode,o($n(Kn[c]||"XYSDK:950111",s.data))),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),o($n(Kn[null===t.t0||void 0===t.t0?void 0:t.t0.errorCode]||"XYSDK:950111",t.t0));case 10:case"end":return t.stop()}}),n,null,[[0,7]])})))}))}},{key:"sendConfParam",value:function(){var e=this.invite,t=e.meetingId,r=e.callerUri;this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"ConfParam",inoutReminder:"true"===this.invite.inoutReminder,uiNeedSpeakers:this.featureConfig.enableSpeakerInfo,meetingId:t,endpointId:r}})}},{key:"getSendSupportedCodec",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] getSendSupportedCodec"),e.prev=1,e.next=4,Zs();case 4:return r=e.sent,this.logger.log("get capabilities:",r),e.abrupt("return",r);case 9:return e.prev=9,e.t0=e.catch(1),this.logger.error("get capabilities error: ",e.t0),e.abrupt("return",Promise.reject($n("XYSDK:950515",e.t0)));case 13:case"end":return e.stop()}}),e,this,[[1,9]])})))}},{key:"setPeerConnectionStatus",value:function(e){var t,r;if(this.logger.log("setPeerConnectionStatus:",e),this.peerConnectionStatus=e,this.stream&&!this.stream.isSupportReauthorize&&(this.config.muteVideo&&this.muteVideo(),this.config.muteAudio&&this.muteAudio()),this.sendConfParam(),e){this.invite.automute&&(this.logger.log("setPeerConnectionStatus setAudioStream:",this.invite.automute),this.handleAutoMute(this.invite.automute)),this.cacheMeetingControlMessage&&this.cacheMeetingControlMessage.type&&this.onMeetingControlMessage(this.cacheMeetingControlMessage);var n=null===(t=this.layoutManager)||void 0===t?void 0:t.getContentRosterItem();n&&this.sendContentRosterMessage(n),null===(r=this.stream)||void 0===r||r.sendStreamStatus(),this.sendWebRxBandwidth()}}},{key:"sendWebRxBandwidth",value:function(){var e=this.invite,t=e.meetingId,r=e.callerUri,n=this.meeting.getRxBandwidth();n&&this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"setWebRxBandwidth",meetingId:t,endpointId:r,rxBandwidth:n}})}},{key:"handleAutoMute",value:function(e){var t;this.logger.log("handle automute:",e);var r="";this.onSetAudioStream(e),"mute"===e||"forcemute"===e?r="muteAudio":"unmute"===e&&(r="unmuteAudio"),r&&(null===(t=this.layoutManager)||void 0===t||t.setLocalStatus({audioTxMute:"muteAudio"===r}),this.sendAudioStatus(r))}},{key:"onMeetingControlMessage",value:function(e){var t,r,n,i,o=e.muteOperation,s=e.disableMute,a=e.chairmanUri,c=void 0===a?"":a,u=e.contentIsDisabled,l=void 0!==u&&u,h=e.commonJson,d=void 0===h?"":h,f=e.isMuteSpeaker,p=e.recordIsDisabled,v=e.groupInfoList,g="",m=!1;if(null===(t=this.layoutManager)||void 0===t||t.setLocalStatus({isForceFullScreen:c===this.invite.callerUri}),this.peerConnectionStatus){if(s&&(m=!0),o&&this.stream&&this.deviceManager&&this.layoutManager)if("denied"!==this.deviceManager.getDevicePermission().microphone){var y=this.stream.getMediaStreams().previewStreams;g="mute"===o?"muteAudio":"unmuteAudio","mute"===o&&y.length&&(this.stream.setAudioOrVideoStatus("muteAudio"),m=!0),"unmute"===o&&y.length&&(this.stream.setAudioOrVideoStatus("unmuteAudio"),m=!1),this.layoutManager.setLocalStatus({audioTxMute:m}),this.sendAudioStatus(g),this.sendV2States("sta-msgCallback",uo[g])}if(d){var b=JSON.parse(d),S=(b.rename&&JSON.parse(b.rename)||{tmpName:""}).tmpName;S&&(null===(r=this.layoutManager)||void 0===r||r.setLocalStatus({displayName:Ms(S)}))}!c||c===(null===(n=this.cacheMeetingControlMessage)||void 0===n?void 0:n.chairmanUri)&&"on"!==f&&"off"!==f||null===(i=this.layoutManager)||void 0===i||i.setForceFullScreenId();var w={chairmanUri:c,disableMute:s,muteOperation:g,contentIsDisabled:l,isMuteSpeaker:f,recordIsDisabled:p,groupInfoList:v};this.logger.log("emmit meeting-control: ",w),this.emmit("meeting-control",w)}this.cacheMeetingControlMessage=e}},{key:"onSubTitle",value:function(e){var t=e.content,r=t&&JSON.parse(t);this.i18nCode&&this.i18nCode[Yn]&&(r.content=this.i18nCode[Yn][r.i18nKey||""]||r.content),this.emmit("sub-title",r),this.sendV2States("sta-msgCallback","subtitle")}},{key:"sendCustomMessage",value:function(e){if(e&&e.data&&"string"!=typeof e.data)return this.logger.warn("send custom message params error: ",Ho(e.data)),$n("XYSDK:950101",e);var t=e.data,r=Ps(t),n=t.length;if(n>1846666)return this.logger.log("send custom message size limited: ",{oriLen:n,base64Len:r.length}),$n("XYSDK:950010",e);var i=t.length<=Xi,o=e.data.substring(Xi,0),s=Object.assign(Object.assign({},e),{type:"userCustomizedBizMsg",data:r});return this.logger.log("send custom message",Object.assign(Object.assign({},e),{data:"".concat(o,"..."),oriLen:t.length,base64Len:r.length})),this.sendSocketMessage({type:"PASS_THROUGH",body:s},!0,i),$n("XYSDK:950120")}},{key:"onPassThroughMessage",value:function(e){var t,r,n,i=this;switch(e.body.type){case"roster":this.logger.log("roster message: ",e);var o=e.body,s=o.contentSenderPid,a=void 0===s?0:s,c=o.rosterInfo;if(0===c.length)return;this.contentSenderPid=a,this.rosters=c,this.sendsOriginOrderRosterMessage();break;case"participantsNum":this.logger.log("participant message: ",e);break;case"speakersInfo":this.logger.log("speakers info message: ",e);var u=e.body.speaker;this.speakerInfo=u,this.emmit("speaker-info",{speakerInfo:u});break;case"speakerInfo":this.logger.log("speaker info message v2: ",e),this.speakerInfos=e.body.speakerInfos,this.onSpeakerInfoMessage();break;case"layoutResult":var l=e.body.layout;0===e.body.mediagroupid?this.layoutRosters.people=l:1===e.body.mediagroupid&&(this.layoutRosters.content=l),this.layoutRosters.total=[].concat(Go(this.layoutRosters.people),Go(this.layoutRosters.content)),this.logger.log("layout result message: ",this.layoutRosters.total),this.customLayoutSeq===e.body.rSeq&&(null===(t=this.layoutManager)||void 0===t||t.updateStreams());break;case"streamChange":this.logger.log("stream change message: ",e),this.streamChange=e.body;var h=e.body,d=h.mediagroupid,f=h.streamChangeInfo;this.streamChangeList[0===d?"people":"content"]=f,this.logger.log("stream change list: ",Qo()(this.streamChangeList)),this.stream&&this.isAutoBandwidth&&this.stream.handleChangeStream(this.streamChange,this.peer,e.body.mediagroupid||0);break;case"rotationChange":this.logger.log("layout rotation message: ",e),this.updateRotationInfo(e),this.logger.log("rotation info: ",this.rotationInfo),this.autoMode&&(null===(r=this.layoutManager)||void 0===r||r.calculateRotate(),this.sendLayoutMessage()),this.emmit("rotation-change",this.rotationInfo.total);break;case"candidate":this.logger.log("receive candidate:",e),this.peer.handleCandidate(e.body);break;case"answer":this.logger.log("receive answer:",e),this.peer.handleAnswer(e.body);break;case"mediaOnhold":this.logger.log("media onhold message: ",e);break;case"confChangeInfo":this.logger.log("[receive]conf change info message: ",e);var p=e.body,v=p.chairManUrl,g=void 0===v?"":v,m=p.contentUri,y=void 0===m?"":m,b=p.actSpkUri,S=void 0===b?"":b,w=p.totalEpCount,k=void 0===w?0:w,C=p.displayableEpCount,x=void 0===C?0:C,E=p.mediaGroupInfo,_=void 0===E?[]:E,I=x,A=this.contentOnholdInfo.is&&!this.contentOnholdInfo.contentUrl;this.logger.log("content onhold:",A),this.autoMode&&(I=this.hideId?x+1:x);var T={participantCount:I,totalEpCount:k,chairManUrl:g,contentUri:A?"":y,actSpkUri:S,mediaGroupInfo:_},R=null===(n=this.layoutManager)||void 0===n?void 0:n.getConfInfo();(null==R?void 0:R.totalEpCount)!==k&&this.emmit("participants-count",{participantsNum:k}),this.layoutManager&&(this.layoutManager.setConfInfo(T),this.autoMode?(this.layoutManager.calcPageInfo(),this.layoutManager.calcRequestNewLayout()):1!==k||y||this.layoutManager.createCustomLayout([])),this.logger.log("emmit conf change info message: ",T),this.emmit("conf-change-info",T);break;case"layoutResultEx":this.logger.log("[receive][v2]layout result message: ",e),this.layoutRosters.total=e.body.layout||[],this.logger.log("[v2]layout result: ",this.layoutRosters.total),this.layoutManager&&("AUTO"===this.config.layout?this.layoutManager.createAutoLayout(this.layoutRosters.total):(this.layoutManager.createCustomLayout(this.layoutRosters.total),this.layoutManager.updateStreams()));break;case"inoutnotify":this.logger.log("[receive]inoutnotify message: ",e);var O=e.body.info||[],D=[];O.map((function(e){if(e.e!==i.invite.callerUri){var t=e.a,r=t.split(":");r.length>1&&(t=r[1]),D.push({displayName:e.c,action:e.t,userId:t})}})),this.emmit("in-out-reminder",D);break;case"bulkRoster":this.logger.log("bulk roster message: ",e);var N=e.body,L=N.bulkRosterType,P=void 0===L?0:L,M=N.addRosterInfo,B=void 0===M?[]:M,j=N.changeRosterInfo,G=void 0===j?[]:j,H=N.deleteRosterInfo,U=void 0===H?[]:H;this.emmit("bulkRoster",{bulkRosterType:P,addRosterInfo:B,changeRosterInfo:G,deleteRosterInfo:U});break;case"confproperties":if(0===e.mg&&(this.contentOnholdInfo.is=!0),1===e.mg){this.logger.log("conf properties message: ",e);var K=e.body.confpropertiesInfo;(void 0===K?[]:K).forEach((function(e){"contentOnhold"===e.type&&i.handleContentOnhold(e)}))}break;case"multiGroupInfo":this.logger.log("receive multi group info",e);var F=e.body.mediagrps,V=void 0===F?[]:F,Y=e.endpointId;this.emmit("multi-group-info",{endpointId:Y,mediagrps:V});break;case"translationContent":if(this.logger.log("receive translationContent:",e),!this.onhold){var z=e.body;this.logger.log("emmit translationContent:",e),this.emmit("translation-content",z)}break;case"userCustomizedBizMsg":var X=e.body.data;X.length>Xi?this.logger.log("SDK get userCustomizedBizMsg max message: ",Object.assign({},e.body,{length:X.length,data:""})):this.logger.log("SDK get userCustomizedBizMsg message: ",e);var W=Ms(X),q=Object.assign(Object.assign({},e.body),{data:W});this.emmit("custom-message-recv",q);break;default:this.logger.log("get pass though default message: ",e)}}},{key:"onSpeakerInfoMessage",value:function(){var e,t=Go(this.speakerInfos);if(this.featureConfig.enableSpeakerInfo){var r=null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster();if(t.length<3&&r&&!r.audioTxMute){var n=r||{},i=n.endpointId,o=n.displayName,s=n.participantId;t.push({alias:i,name:o,pid:s})}this.emmit("speakers-info",{speakersInfo:t})}}},{key:"handleContentOnhold",value:function(e){var t,r,n,i,o,s,a=this,c=e.audioTrackId,u=void 0===c?"":c,l=e.contentUrl,h=void 0===l?"":l,d=null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo(),f=null===(r=this.layoutManager)||void 0===r?void 0:r.getSelfRoster(),p=null===(n=this.layoutManager)||void 0===n?void 0:n.getLocalShareState();if(this.contentOnholdInfo.is){(h===(null==f?void 0:f.endpointId)||p)&&(h="");var v={audioTrackId:u,contentUrl:h,is:!0};h&&h===this.contentOnholdInfo.contentUrl||!d||(d.contentUri=h,this.autoMode&&(null===(i=this.layoutManager)||void 0===i||i.calcPageInfo(d),null===(o=this.layoutManager)||void 0===o||o.calcRequestNewLayout()),this.audioTrackList.map((function(e){a.handleContentOnholdAudio(e.rest,v)})),null===(s=this.layoutManager)||void 0===s||s.setConfInfo(d),this.emmit("conf-change-info",d)),this.contentOnholdInfo=v}}},{key:"handleWaitingState",value:function(e){var t=e.waitingState,r=void 0===t?0:t,n=e.automute,i=void 0===n?"":n;this.onhold=!!r,this.onhold&&this.handStatus&&(this.handStatus=!1,this.emmit("cancel-handup",!0)),!this.onhold&&i&&this.handleAutoMute(i),this.emmit("onhold",this.onhold)}},{key:"switchAutoBandwidth",value:function(){this.logger.log("[client] switchAutoBandwidth");var e=!this.isAutoBandwidth;return this.isAutoBandwidth=e,e}},{key:"disconnectInWssError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{code:1e3};if(this.logger.log("disconnected wss error",e),!this.disconnected&&this.clientStatus){this.clientErrorState="XYSDK:950114"===e?"WS_CLOSE":"WS_ERROR";var r=4e3===(null==t?void 0:t.code)?"TOKEN_INVALID":"LOCAL_NET_DISCONNECT";this.emmit("disconnected",$n(e,{message:Xo[Yn][r],key:r,detail:r},"[internal] disconnected meeting"))}}},{key:"switchDebug",value:function(e){var t=this;return this.logger.log("[client] switchDebug"),new Promise((function(r,n){"boolean"!=typeof e&&n($n("XYSDK:950101"));try{t.debug=e,t.peer&&t.peer.initSenderStatus(),r(t.debug)}catch(e){n($n("XYSDK:950210"))}}))}},{key:"requestLayout",value:function(e){var t=this;return new Promise((function(r,n){var i,o;t.logger.log("[client] requestLayout: ",e);var s=e.length>9?9:e.length;e.length=s,null===(i=t.layoutManager)||void 0===i||i.requestLayout(e),null===(o=t.layoutManager)||void 0===o||o.updateStreams(),r("successfully")}))}},{key:"requestNewLayout",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0;return new Promise((function(s,a){if(n.logger.log("new layout request list: ",{reqList:e,extReqList:i,maxViewCountPerPage:t,pageIndex:r}),!fa(e))return a($n("XYSDK:950101",{reqList:e}));if(!fa(i))return a($n("XYSDK:950101",{extReqList:i}));~~t>9&&(t=9),"CUSTOM"===n.config.layout&&(e=n.meeting.convertReqList(e),i=n.meeting.convertReqList(i)),n.logger.log("reqList:",e),n.logger.log("extReqList:",i),r=Math.max(0,r);var c=n.invite,u=c.callerUri,l=void 0===u?"":u,h=c.meetingId;n.sendSocketMessage({type:"PASS_THROUGH",body:Object.assign({type:"customLayoutEx",conferenceId:h,endpointId:l,layoutMode:0,pageIndex:r,maxViewCountPerPage:t,streams:e,extStreams:i},o)}),s(!0)}))}},{key:"requestAutoPollingLayout",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2?arguments[2]:void 0;return new Promise((function(i,o){t.autoMode&&o("Auto mode not support request layout");var s=t.invite,a=s.callerUri,c=s.meetingId;t.logger.log("send request auto polling layout data: ",{command:e,interval:r,reqList:n}),t.sendSocketMessage({type:"PASS_THROUGH",body:{type:"customLayoutEx",conferenceId:c,endpointId:a,layoutMode:1,pageIndex:0,PollingCommand:e,pollingInterval:Number(r)||0,streams:n}}),i(!0)}))}},{key:"applyVideoOrAudio",value:function(e){var t,r,n,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.logger.log("apply video ro audio: ",{kind:e,isFirst:o}),this.stream){if(o){var s=null===(t=this.stream)||void 0===t?void 0:t.getMediaStreams(),a=s.streams;null===(r=this.peer)||void 0===r||r.setStream(a,e)}else null===(n=this.peer)||void 0===n||n.replacePeopleVideoTrack(this.stream,e);"video"===e&&this.layoutManager&&this.layoutManager.updateLocalTrack()}null===(i=this.stream)||void 0===i||i.updateDeviceByLocalStream()}},{key:"sendAudioStatus",value:function(e){ri(e)&&(e=e?"muteAudio":"unmuteAudio"),this.logger.log("emmit audio-status: ",e),this.emmit("audio-status",{status:e})}},{key:"sendVideoStatus",value:function(e){ri(e)&&(e=e?"muteVideo":"unmuteVideo"),this.logger.log("emmit video-status: ",e),this.emmit("video-status",{status:e})}},{key:"sendLayoutMessage",value:function(){var e,t,r,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=new Map,o="AUTO"===this.config.layout;if(o)i=(null===(e=this.layoutManager)||void 0===e?void 0:e.getLayoutList())||new Map;else if(i=(null===(t=this.layoutManager)||void 0===t?void 0:t.getCustomLayoutList())||new Map,0===(null===(r=this.customLayoutCacheList)||void 0===r?void 0:r.length)&&0===(null==i?void 0:i.size))return;var s=this.meeting.getLayoutAvatarMap(),a=[],c=[],u=this.featureConfig.enableLayoutAvatar;i.forEach((function(e,t){if(u){var r=s.get(t);r?e.avatar=r:c.push(e)}var n=e.index,i=void 0===n?-1:n;i>-1?(delete e[i],a[i]=e):a.push(e)}));var l=a.filter((function(e){return!!e}));o?(this.logger.log("emmit layout",l),this.emmit("layout",l)):(this.customLayoutCacheList=l,this.logger.log("emmit custom layout",l),this.emmit("custom-layout",l)),u&&c.length>0&&n&&this.meeting.handleLayoutAvatar(c)}},{key:"sendOriginOrderedRosterMessage",value:function(){var e,t=null===(e=this.layoutManager)||void 0===e?void 0:e.getOriginOrderRosters();this.emmit("roster",{rosters:t})}},{key:"sendsOriginOrderRosterMessage",value:function(){var e,t,r=(null===(e=this.layoutManager)||void 0===e?void 0:e.calculateOrderRosterList())||[];null===(t=this.layoutManager)||void 0===t||t.setOriginOrderRosters(r),this.emmit("roster",{rosters:r})}},{key:"sendScreenInfoMessage",value:function(e){this.emmit("screen-info",Qo()(e))}},{key:"sendContentRosterMessage",value:function(e){var t;null===(t=this.layoutManager)||void 0===t||t.setContentRosterItem(e),this.emmit("content",{data:e})}},{key:"sendTemplateMode",value:function(e){this.emmit("template-mode",e)}},{key:"sendOperationMessage",value:function(e){this.sendSocketMessage({type:e})}},{key:"updateRotationInfo",value:function(e){var t=this,r=e.body.rosterInfo||[],n=0===e.body.mediagroupid?"people":"content";this.rotationInfo[n]=r,this.rotationInfo.total=[];var i=this.rotationInfo,o=i.people,s=i.content,a=function(e,r){e.forEach((function(e){t.rotationInfo.total.push(Object.assign(Object.assign({},e),{mediagroupid:r,id:e.participantId+""+r}))}))};a(o,0),a(s,1)}},{key:"sendCustomLayout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.invite,r=t.callerUri,n=void 0===r?"":r,i=t.meetingId;this.customLayoutSeq=this.customLayoutSeq+1,this.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:i,endpointId:n,type:"customLayout",streams:e,rSeq:this.customLayoutSeq}})}},{key:"reportQualityData",value:function(e){e=this.getInternels(e),this.qualityManager.reportQualityData(e)}},{key:"getInternels",value:function(e){var t,r=(null===(t=this.layoutManager)||void 0===t?void 0:t.getInternelsLayout())||{pid:{resolution:0,quality:0}};Object.keys(e.receiver).forEach((function(t){var n=e.receiver[t],i=n.isContent,o=n.type+Number(i);r[o]&&(e.receiver[t].expResolution=r[o].resolution)}));for(var n=Object.keys(e.sender),i=n.length,o=0;o<i;o++){var s=e.sender[n[o]],a=this.streamChangeList.content.length,c=this.streamChangeList.people.length;if("remoteStream"===s.type&&(e.sender[n[o]].expBandwidth=ji[s.resolution]),c)for(var u=0;u<c;u++){var l=this.streamChangeList.people[u];if(ro.RESOLUTION_MAP[l.resolution]===Number(s.resolution)&&"remoteStream"===s.type){e.sender[n[o]].expBandwidth=l.bandwidth;break}}if(a)for(var h=0;h<a;h++){var d=this.streamChangeList.content[h];if(ro.RESOLUTION_MAP[d.resolution]===Number(s.resolution)&&"contentStream"===s.type){e.sender[n[o]].expBandwidth=d.bandwidth;break}}}return e}},{key:"sendInternels",value:function(e){this.emmit("meeting-stats",this.getInternels(e))}},{key:"off",value:function(e){this.logger.log("[client] off:",e),this.removeListener(e)}},{key:"onScreenChangeEvent",value:function(){this.autoMode&&this.layoutManager&&(this.layoutManager.calculateScreenInfo(),this.layoutManager.calculatePosition(),this.layoutManager.calculateRotate(),this.sendLayoutMessage())}},{key:"initWindowResizeEvent",value:function(){window.addEventListener("resize",this.onDocumentChange)}},{key:"removeWindowResizeEvent",value:function(){window.removeEventListener("resize",this.onDocumentChange)}},{key:"sendPeopleCapability",value:function(){var e=this,t=this.invite,r=t.callIndex,n=t.callerUri,i=void 0===n?"":n,o=t.meetingId;if(this.stream){var s=this.stream.streams.filter((function(t){return"NORMAL"===t.status&&!e.limitResolution.people.includes(t.resolution)})).map((function(e){var t;return{streamId:(null===(t=e.stream)||void 0===t?void 0:t.id)||"",resolution:ro.MAP_RESOLUTION_INDEX[e.resolution]}}));this.logger.log("stream resolution info: ",s),this.sendSocketMessage({type:"PASS_THROUGH",callIndex:r,body:{type:"peopleCapability",meetingId:o,endpointId:i,streams:s}})}}},{key:"forceFullScreen",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.logger.log("[client] force full screen:",t),new Promise((function(r,n){if(!e.autoMode)return n($n("XYSDK:950602"));if(t&&"string"!=typeof t)return n($n("XYSDK:950101"));if(e.layoutManager){var i=e.layoutManager.getLayoutList(),o=e.layoutManager.getForceFullScreenId();if(t){if(!(null==i?void 0:i.get(t)))return n($n("XYSDK:950101"));if(t===o)return r(t)}try{e.layoutManager.setForceFullScreenId(t),e.layoutManager.calcRequestNewLayout(),r(t)}catch(e){n($n("XYSDK:950530"))}}}))}},{key:"sendSocketMessage",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.invite,i=n.callIndex,o=n.callerUri,s=void 0===o?"":o,a=n.meetingId,c={callIndex:i,meetingId:a,endpointId:s,callUri:s},u=Object.assign(Object.assign({},e),c);if(t){var l=this.seq+"";this.socketTask&&this.socketTask.send(Object.assign(Object.assign({},u),{seq:l}),!0,r),this.seq++}else this.socketTask&&this.socketTask.send(u,!0,r)}},{key:"getBasicInfo",value:function(e){return ba(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.token,this.callInfo=e,this.token=n,i=this.iauth.getLoginInfo(),t.prev=4,o=n||i.access_token,i.securityKey){t.next=12;break}return t.next=9,Lo.getUserInfo(o);case 9:s=t.sent,c=(a=s||{}).securityKey,u=a.userProfile,this.iauth.setLoginInfo(Object.assign(Object.assign({},i),{id:(null==u?void 0:u.id)||i.id,securityKey:c}));case 12:this.getServerConfig(),t.next=18;break;case 15:return t.prev=15,t.t0=t.catch(4),t.abrupt("return",Promise.reject(t.t0));case 18:case"end":return t.stop()}}),r,this,[[4,15]])})))}},{key:"verifyMeeting",value:function(e){return ba(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u,l,h,d,f,p,v,g,m,y,b,S,w,k,C,x,E,_,I,A,T,R,O,D,N;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.token,i=e.confNumber,o=e.password,s=void 0===o?"":o,this.callInfo=e,this.token=n,a={success:!1,data:{}},t.prev=4,t.next=7,Lo.getCallUri({number:i,deviceType:Vi,country:"CN"});case 7:if(c=t.sent,u=c.data,l=u.avatar,h=void 0===l?"":l,d=u.callNumber,f=void 0===d?"":d,p=u.callUrl,v=void 0===p?"":p,g=u.deviceId,m=void 0===g?"":g,y=u.deviceType,b=void 0===y?"":y,S=u.displayName,w=void 0===S?"":S,k=u.number,C=void 0===k?"":k,x=u.numberType,E=void 0===x?"":x,_=u.enablePwd,I=void 0!==_&&_,A={avatar:h,callNumber:f,callUrl:v,deviceId:m,deviceType:b,displayName:w,number:C||i,numberType:E},T=qi.findIndex((function(e){return e===b}))>-1,!T){t.next=44;break}if(this.callInfo=Object.assign(this.callInfo,{meeting:A}),a=Zn(!0),!I||!go.includes(this.hideId)){t.next=31;break}return a=Zn(!1,"XYSDK:950110"),t.prev=17,t.next=20,Lo.ignoreMeetingMonitor(i);case 20:if(t.t0=t.sent,t.t0){t.next=23;break}t.t0={};case 23:R=t.t0,200===R.status&&(a=Zn(!0)),t.next=30;break;case 28:t.prev=28,t.t1=t.catch(17);case 30:return t.abrupt("return",a);case 31:if(!I){t.next=43;break}if(a=Zn(!1,"XYSDK:950107"),!s){t.next=43;break}return t.next=36,Lo.verifyPassword(i,s);case 36:if(t.t2=t.sent,t.t2){t.next=39;break}t.t2={};case 39:O=t.t2,D=O.status,a=Zn(!0),200!==D&&204!==D&&(a=Zn(!1,"XYSDK:950108"));case 43:return t.abrupt("return",a);case 44:if(!E){t.next=46;break}return t.abrupt("return",Zn(!1,"XYSDK:950109"));case 46:if(!(null==u?void 0:u.errorCode)){t.next=50;break}if(1001!==(N=u.errorCode)&&2036!==N){t.next=50;break}return t.abrupt("return",Zn(!1,"XYSDK:950105"));case 50:return t.abrupt("return",Promise.reject(c));case 53:return t.prev=53,t.t3=t.catch(4),t.abrupt("return",Promise.reject(t.t3));case 56:case"end":return t.stop()}}),r,this,[[4,53],[17,28]])})))}},{key:"refreshToken",value:function(e){return Lo.refreshToken(e)}},{key:"setAudioOutputDevice",value:function(e){var t=this;Object.keys(this.audioManagers).forEach((function(r){var n,i=t.audioManagers[r];i.ele&&(null===(n=t.deviceManager)||void 0===n||n.setAudioOutputDevice(i.ele,e))}))}},{key:"removeAudioRender",value:function(e){this.logger.log("[client] removeAudioRender:",e),this.audioManagers[e]&&(this.logger.log("remove audio render: ",e),delete this.audioManagers[e])}},{key:"startMonitor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.logger.log("[monitor]start monitor:",e),this.invite.callIndex&&this.sendSocketMessage({type:"START_MONITOR",uriList:e})}},{key:"stopMonitor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.logger.log("[monitor]stop monitor:",e),this.invite.callIndex&&(this.layoutManager&&this.layoutManager.clearVideoManagersUseMonitorList(e),this.sendSocketMessage({type:"STOP_MONITOR",uriList:e}))}},{key:"subscribeBulkRoster",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){if(r.invite.callIndex){var n=r.invite,i=n.callerUri,o=n.meetingId;r.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeBulkRoster"}}),r.isSubscribeBulkRoster=!0,e(!0)}else t($n("XYSDK:950517"))})));case 1:case"end":return e.stop()}}),e)})))}},{key:"startTranslation",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] startTranslation"),e.abrupt("return",new Promise((function(e,t){if(r.invite.callIndex){var n=r.invite,i=n.callerUri,o=n.meetingId;r.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeTranslation",operation:1}}),r.isSubscribeTranslation=!0,e(!0)}else t($n("XYSDK:950301"))})));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"stopTranslation",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] startTranslation"),e.abrupt("return",new Promise((function(e,t){if(r.invite.callIndex){var n=r.invite,i=n.callerUri,o=n.meetingId;r.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeTranslation",operation:2}}),r.isSubscribeTranslation=!1,e(!0)}else t($n("XYSDK:950301"))})));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"setTranslationLanguage",value:function(e){return ba(this,void 0,void 0,t().mark((function r(){var n=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] setTranslationLanguage:",e),t.abrupt("return",new Promise((function(t,r){if(n.invite.callIndex){var i=n.invite,o=i.callerUri,s=i.meetingId;e=mo.includes(e)?e:"English",n.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:s,endpointId:o,language:e,type:"setTranslationLanguage"}}),t(!0)}else r($n("XYSDK:950301"))})));case 2:case"end":return t.stop()}}),r,this)})))}},{key:"startCloudRecord",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r,n,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.meeting.getRecordPermission(),this.logger.log("[client]Start cloud record:",r),n=r.authorize,i=this.invite.remoteUri,n){e.next=6;break}return e.abrupt("return",Promise.reject($n("XYSDK:953902")));case 6:this.sendSocketMessage({type:"START_RECORD",remoteUri:i});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"stopCloudRecord",value:function(){return ba(this,void 0,void 0,t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[client] stop record:",this.recordState),r=this.invite.remoteUri,this.recordState===fi.RECORD_STATE_STARTED){e.next=4;break}return e.abrupt("return",Promise.reject($n("XYSDK:953905")));case 4:this.sendSocketMessage({type:"STOP_RECORD",remoteUri:r});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"reSendContentOffer",value:function(){this.peer.reSendContentOffer()}},{key:"updateLayoutSize",value:function(){this.onDocumentChange()}},{key:"bindTrackGroup",value:function(e,t){if(this.logger.log("[client]bind track group: ",{trackType:e,mediagroupId:t}),!ti(e)||!Qn(t))return this.logger.warn("params type error"),$n("XYSDK:950101",{trackType:e,mediagroupId:t});var r=this.invite,n=r.callerUri,i=r.meetingId,o={grpId:t,mediaStreamId:""};if(this.stream){var s=this.stream.getRemoteAudioStream();s&&(o.mediaStreamId=s.id)}return this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"bindAudioTrack",conferenceId:i,endpointId:n,bindinfo:o}}),!0}},{key:"startMonitorGroup",value:function(e){return this.setMonitorGroup("start",e)}},{key:"stopMonitorGroup",value:function(e){return this.setMonitorGroup("stop",e)}},{key:"setMonitorGroup",value:function(e,t){if(this.logger.log("[monitor]".concat(e," monitor group"),t),!this.invite.callIndex)return $n("XYSDK:950517");if(!t||!t.length)return!0;var r=this.invite,n=r.callerUri,i=r.meetingId;return this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"start"===e?"startMediaGrp":"stopMediaGrp",conferenceId:i,endpointId:n,mediagrps:t.map((function(e){return{id:e}}))}}),!0}},{key:"initDeviceManagerEvent",value:function(){var e,t,r,n=this;null===(e=this.deviceManager)||void 0===e||e.on("permission",(function(e){n.logger.log("deviceManager permission changed: ",e),"denied"===e.camera&&(n.isPermissionDenied.camera=!0),"denied"===e.microphone&&(n.isPermissionDenied.microphone=!0),n.emmit("permission",e)})),null===(t=this.deviceManager)||void 0===t||t.on("currentDevice",(function(e){n.emmit("currentDevice",e)})),null===(r=this.deviceManager)||void 0===r||r.on("device",(function(e){var t=e.nextDevice,r=t.audioInput,i=t.videoInput,o=t.audioOutput;try{n.autoSwitchDevice&&(r&&n.stream&&n.stream.switchDevice("audio",r.deviceId),i&&n.stream&&n.stream.switchDevice("video",i.deviceId),o&&n.setAudioOutputDevice(o.deviceId)),n.emmit("device",e)}catch(e){n.logger.log("auto switch device failed:",e)}}))}},{key:"getWssUrl",value:function(){var e;return ba(this,void 0,void 0,t().mark((function r(){var n,i,o,s,a,c,u,l,h,d,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.config,i=n.isSupportHybridCloud,o=n.wssServer,s=void 0===o?"":o,a="",c="",t.prev=3,this.logger.log("[wss] isSupportHybridCloud:",i),i&&(u=s.split("//")[1].split("/")[0],a="".concat(Oo.protocol,"//").concat(u)),this.logger.log("[wss] getAllocation server in HybridCloud:",a),l=this.iauth.getLoginInfo(),h=l.id,t.next=10,Lo.getAllocation(h,a,i);case 10:d=t.sent,c=(null===(e=null==d?void 0:d.data)||void 0===e?void 0:e.serverId)||"",t.next=16;break;case 14:t.prev=14,t.t0=t.catch(3);case 16:return f="".concat(s,"/websocket/webrtc").concat(c?"/".concat(c):""),t.abrupt("return",f);case 18:case"end":return t.stop()}}),r,this,[[3,14]])})))}},{key:"initWss",value:function(e,r){var n;return ba(this,void 0,void 0,t().mark((function r(){var i,o=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[wss] init wss"),this.socketTask&&this.socketTask.close(),t.next=4,this.getWssUrl();case 4:i=t.sent,this.token=(null===(n=Lo.getLoginInfo())||void 0===n?void 0:n.access_token)||this.token,this.socketTask=new Zo({url:i,params:{token:this.token,start:!0,cap:"".concat(Ps("3"))}},this),this.socketTask.on("open",(function(e){o.logger.log("websocket is connected:",i),o.logger.log("Version: ",_o),o.invite.callIndex&&o.peer.restartIceConnection(),o.startCall(),o.emmit("socket-open",e)})),this.socketTask.on("message",(function(t){var r=t.data;if(r){var n=JSON.parse(r);o.handleSocketMessage(n,e),o.emmit("socket-message",n)}})),this.socketTask.on("close",(function(e){o.logger.log("连接已关闭"),o.disconnectInWssError("XYSDK:950114",{code:null==e?void 0:e.code}),o.emmit("socket-close",$n("XYSDK:950114",{code:null==e?void 0:e.code})),o.close("LOCAL_NET_DISCONNECT")})),this.socketTask.on("timeout",(function(){o.logger.log("websocket connect timeout"),o.emmit("socket-timeout",$n("XYSDK:950112"))})),this.socketTask.on("error",(function(e){o.logger.log("Websocket connect is error",e),o.emmit("socket-error",$n("XYSDK:950115",e))})),this.socketTask.on("reconnect",(function(e){o.logger.log("Websocket reconnect: ","Websocket connected is close, reconnect..."),o.emmit("socket-reconnect",$n("XYSDK:950113",e))}));case 13:case"end":return t.stop()}}),r,this)})))}}],[{key:"getClientInstance",value:function(e,t){return this.instance||(this.instance=new n(e,t)),this.instance}},{key:"getCustomLayoutItem",value:function(e,t,r){var n=e.roster.isContent;return{pid:e.roster.participantId,resolution:t,quality:r,mediagroupid:n?1:0}}},{key:"getHideId",value:function(e){var t="",r=e.__hideId,n=void 0===r?"":r;return n&&("HIDE"===n?t="HIDE":Qn(n)?t=vo[n]||"":ti(n)&&(t=n)),t}}]),n}(Wo),wa=(r(9575),r(2472),r(2990),r(8927),r(3105),r(5035),r(4345),r(7174),r(2846),r(4731),r(7209),r(6319),r(8867),r(7789),r(3739),r(9368),r(4483),r(2056),r(3462),r(678),r(7462),r(3824),r(5021),r(2974),r(5016),function(){function e(t){l(this,e),this.level=0,this.stream=t}return d(e,[{key:"getAudioLevel",value:function(){if(this.analyser){this.analyser.getByteTimeDomainData(this.timeDomainData);var e=0,t=0,r=this.timeDomainData.length;for(t=0;t<r;t++)e=Math.max(e,Math.abs(this.timeDomainData[t]-128));this.level=e}var n=Math.min(100,100*Number((this.level/64).toFixed(2)));return parseInt(n+"")}},{key:"init",value:function(){var e=window.AudioContext||window.webkitAudioContext;e?(this.audioContext=new e,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.sourceNode=this.audioContext.createMediaStreamSource(this.stream),this.timeDomainData=new Uint8Array(this.analyser.frequencyBinCount),this.sourceNode.connect(this.analyser)):console.log("init audio content failed: ",e)}}]),e}());function ka(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ca(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ca(e,t)}(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,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function Ca(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 xa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zo(e);if(t){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yo(this,r)}}var Ea=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},_a=function(e){Vo(n,e);var r=xa(n);function n(e){var t;l(this,n),t=r.call(this);var i=e.logger,o=e.client,s=void 0===o?null:o;return t.streams=[],t.pipelineStreams=[],t.contentStreams=[],t.previewStreams=[],t.logger=i,t.client=s,t.isShareContent=!1,t.streamStatus=!0,t.config={devices:{}},t.current={type:"FAILED",detail:""},t.audioDeviceId="",t.videoDeviceId="",t.isFirefox=c.isFirefox(),t.isReduceResolution=!1,t.isSupportReauthorize=c.isSupportReauthorize(),t.isSupportAppendTrack=c.isSupportAppendTrack(),t}return d(n,[{key:"getLocalStream",value:function(){return this.previewStreams}},{key:"getIndexFromStreamChange",value:function(e,t){var r=e.id;return t.findIndex((function(e){return e.streamId===r}))}},{key:"off",value:function(e){this.removeListener(e)}},{key:"handleChangeStream",value:function(e,r,n){return Ea(this,void 0,void 0,t().mark((function i(){var s,a,c,u,l,h,d,f,p,v,g,m,y,b,S,w;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=e.streamChangeInfo,a=0===n?this.streams:this.contentStreams,c=a.length,!o||"hidden"!==document.visibilityState||0!==s.length){t.next=6;break}return this.logger.log("not handle set band width when document is hidden in mobile"),t.abrupt("return");case 6:u=0;case 7:if(!(u<c)){t.next=46;break}if(l=a[u],h=l.status,d=l.stream,f=l.resolution,l.type,"NORMAL"!==h){t.next=43;break}p=(null==d?void 0:d.getVideoTracks())||[],v=p.length,g=d?this.getIndexFromStreamChange(d,s):-1,m=0;case 14:if(!(m<v)){t.next=43;break}if(!(y=p[m])){t.next=40;break}if(-1===g){t.next=30;break}return b=s[g],S=b.bandwidth>=100?b.bandwidth:100,t.prev=20,t.next=23,r.setBandWidth(y.id,S,!0,d);case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(20),this.logger.log("[stream]set band width failed:",t.t0);case 28:t.next=40;break;case 30:return t.prev=30,w=ji[f]||10,t.next=35,r.setBandWidth(y.id,w,!0,d);case 35:t.next=40;break;case 37:t.prev=37,t.t1=t.catch(30),this.logger.log("[stream]reduce band width failed:",t.t1);case 40:m++,t.next=14;break;case 43:u++,t.next=7;break;case 46:case"end":return t.stop()}}),i,this,[[20,25],[30,37]])})))}},{key:"setAudioOutput",value:function(e){var t=this;if(this.logger.log("set audio output device: ".concat(e)),"string"!=typeof e){return this.logger.log("Parameter must be a string"),Promise.reject($n("XYSDK:950101"))}return new Promise((function(r,n){var i;try{null===(i=t.client)||void 0===i||i.setAudioOutputDevice(e),r({deviceId:e})}catch(e){n($n("XYSDK:950407",e))}}))}},{key:"switchDevice",value:function(e,r){var n,i,o;return Ea(this,void 0,void 0,t().mark((function s(){var a,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("switch device: type: ".concat(e,", deviceId: ").concat(r)),a=["audio","video"],"string"==typeof e&&a.includes(e)&&"string"==typeof r){t.next=4;break}return t.abrupt("return",Promise.reject($n("XYSDK:950101")));case 4:if(c=null===(n=this.client)||void 0===n?void 0:n.getSelfRoster(),u=(c||{videoTxMute:!1}).videoTxMute,t.prev=6,"audio"!==e||!r){t.next=11;break}return this.audioDeviceId=r,t.next=11,this.replaceAudioTrack();case 11:if("video"!==e||!r){t.next=22;break}if(this.videoDeviceId=r,!this.isSupportReauthorize){t.next=19;break}if(u){t.next=17;break}return t.next=17,this.replaceVideoTrack();case 17:t.next=22;break;case 19:return t.next=21,this.replaceVideoTrack();case 21:u&&this.setStreamStatus("muteVideo");case 22:return null===(o=null===(i=this.client)||void 0===i?void 0:i.deviceManager)||void 0===o||o.setCurrentUsedDeviceByType(e,r),t.abrupt("return",!0);case 26:return t.prev=26,t.t0=t.catch(6),t.abrupt("return",Promise.reject($n("XYSDK:950410",t.t0)));case 29:case"end":return t.stop()}}),s,this,[[6,26]])})))}},{key:"sendStreamStatus",value:function(){this.emmit("stream-status",this.current)}},{key:"replaceAudioTrack",value:function(){var e;return Ea(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!0,this.streams.every((function(e){var t;if("180"===e.resolution){var r=(null===(t=e.stream)||void 0===t?void 0:t.getAudioTracks())||[];n=r&&r.length>0,r.forEach((function(t){var r;t.stop(),null===(r=e.stream)||void 0===r||r.removeTrack(t)}))}})),t.prev=2,t.next=5,this.createNextAudioTracks();case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(2),t.abrupt("return",Promise.reject(t.t0));case 10:null===(e=this.client)||void 0===e||e.applyVideoOrAudio("audio",!n),this.audioLevel=null;case 12:case"end":return t.stop()}}),r,this,[[2,7]])})))}},{key:"replaceVideoTrack",value:function(){var e,r,n;return Ea(this,void 0,void 0,t().mark((function i(){var o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]replace video track"),o=null===(e=this.previewStreams[0])||void 0===e?void 0:e.stream,s=o&&o.getVideoTracks().length>0,!o){t.next=18;break}return t.prev=4,this.isSupportAppendTrack||(this.logger.log("The first step is to delete the track when replaceVideoTrack..."),this.removePreviousVideoTracks(!0)),t.next=8,this.createNextVideoTracks();case 8:this.isSupportAppendTrack&&this.removePreviousVideoTracks(),null===(r=this.client)||void 0===r||r.applyVideoOrAudio("video",!s),null===(n=this.client)||void 0===n||n.sendPeopleCapability(),t.next=16;break;case 13:return t.prev=13,t.t0=t.catch(4),t.abrupt("return",Promise.reject(t.t0));case 16:t.next=19;break;case 18:return t.abrupt("return",Promise.reject($n("XYSDK:950514")));case 19:case"end":return t.stop()}}),i,this,[[4,13]])})))}},{key:"setAudioOrVideoStatus",value:function(e){var r,n,i;return Ea(this,void 0,void 0,t().mark((function o(){var s,a,c,u,l=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("set audio or video status: ",e),"unmuteAudio"!==e&&"unmuteVideo"!==e||"SEND_ONLY"!==this.current.type){t.next=13;break}return s={},a="video","unmuteAudio"===e&&(s={muteAudio:!1},a="audio"),"unmuteVideo"===e&&(s={muteVideo:!1},a="video"),t.next=8,this.init(this.config,s);case 8:if(c=t.sent,null===(r=this.client)||void 0===r||r.applyVideoOrAudio(a,!0),"XYSDK:950207"!==c.code){t.next=12;break}return t.abrupt("return",Promise.reject(c));case 12:return t.abrupt("return",c);case 13:if(!this.isSupportReauthorize||"unmuteAudio"!==e){t.next=26;break}if(u=(null===(i=null===(n=this.streams.find((function(e){return"180"===e.resolution})))||void 0===n?void 0:n.stream)||void 0===i?void 0:i.getAudioTracks())||[],u.length>0){t.next=26;break}return t.prev=17,t.next=20,this.replaceAudioTrack();case 20:return t.abrupt("return");case 23:return t.prev=23,t.t0=t.catch(17),t.abrupt("return",Promise.reject(t.t0));case 26:if("muteAudio"!==e&&"unmuteAudio"!==e||this.setStreamStatus(e),"muteVideo"===e&&setTimeout((function(){l.logger.log("setTimeout muteVideo......"),l.setStreamStatus(e)}),10),"unmuteVideo"!==e){t.next=41;break}if(t.prev=29,this.isSupportReauthorize){t.next=34;break}this.setStreamStatus(e),t.next=36;break;case 34:return t.next=36,this.replaceVideoTrack();case 36:t.next=41;break;case 38:return t.prev=38,t.t1=t.catch(29),t.abrupt("return",Promise.reject(t.t1));case 41:case"end":return t.stop()}}),o,this,[[17,23],[29,38]])})))}},{key:"setStreamStatus",value:function(e){var t=this;this.logger.log("setStreamStatus type:",e),this.previewStreams.forEach((function(r){r.stream&&t.setStreamTracksStatus(r.stream,e)})),this.streams.forEach((function(r){r.stream&&t.setStreamTracksStatus(r.stream,e)}))}},{key:"getNextAudioContraints",value:function(e){var t=n.getContraints(!1,!0),r={};return e&&(r={deviceId:{exact:e}}),t.audio&&Object.assign(t.audio,r),this.logger.log("create next audio track contraints:",t),t}},{key:"getNextAudioMedia",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.audioDeviceId;return Ea(this,void 0,void 0,t().mark((function r(){var n,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getNextAudioContraints(e),t.prev=1,t.next=4,this.getUserMedia(n);case 4:case 14:i=t.sent,t.next=20;break;case 7:return t.prev=7,t.t0=t.catch(1),this.logger.error("create next audio track error:",t.t0),t.prev=10,n=this.getNextAudioContraints(""),t.next=14,this.getUserMedia(n);case 17:return t.prev=17,t.t1=t.catch(10),t.abrupt("return",Promise.reject(t.t1));case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),r,this,[[1,7],[10,17]])})))}},{key:"createNextAudioTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.audioDeviceId;return Ea(this,void 0,void 0,t().mark((function r(){var n,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("create next audio tracks: ",e),n=null,t.prev=2,t.next=5,this.getNextAudioMedia(e);case 5:n=t.sent,t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(2),i=this.handleCreateStreamError(t.t0),t.abrupt("return",Promise.reject(i));case 12:o=n.getAudioTracks()[0],this.streams.some((function(e){var t;if("180"===e.resolution)return null===(t=e.stream)||void 0===t||t.addTrack(o),!0}));case 14:case"end":return t.stop()}}),r,this,[[2,8]])})))}},{key:"getNextVideoContraints",value:function(e){var t=n.getContraints(!0,!1),r={};return e&&(r={deviceId:{exact:e}}),t.video&&Object.assign(t.video,r),this.logger.log("create next video track contraints:",t),t}},{key:"getNextVideoMedia",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.videoDeviceId;return Ea(this,void 0,void 0,t().mark((function r(){var n,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getNextVideoContraints(e),t.prev=1,t.next=4,this.getUserMedia(n);case 4:case 14:i=t.sent,t.next=21;break;case 7:return t.prev=7,t.t0=t.catch(1),this.logger.error("create next video track error:",t.t0),t.prev=10,n.video&&(delete n.video.width,delete n.video.height),t.next=14,this.getUserMedia(n);case 17:return t.prev=17,t.t1=t.catch(10),this.logger.error("create next video track error again:",t.t0),t.abrupt("return",Promise.reject(t.t1));case 21:return t.abrupt("return",i);case 22:case"end":return t.stop()}}),r,this,[[1,7],[10,17]])})))}},{key:"createNextVideoTracks",value:function(){var e,r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.videoDeviceId;return Ea(this,void 0,void 0,t().mark((function o(){var s,a,c,u,l,h,d,f=this;return t().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return this.logger.log("create next video tracks: ",i),s=null,o.prev=2,o.next=5,this.getNextVideoMedia(i);case 5:s=o.sent,o.next=12;break;case 8:return o.prev=8,o.t0=o.catch(2),a=this.handleCreateStreamError(o.t0),o.abrupt("return",Promise.reject(a));case 12:c=s.getVideoTracks()[0],u=[c.clone(),c.clone(),c.clone()],null===(e=this.previewStreams[0].stream)||void 0===e||e.addTrack(c),l=ka(this.streams.entries()),o.prev=16,d=t().mark((function e(){var i,o,s,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Uo(h.value,2),o=i[0],s=i[1],e.prev=1,a=f.getPeopleContraints(Number(s.resolution)),f.isFirefox){e.next=6;break}return e.next=6,u[o].applyConstraints(a);case 6:null===(r=s.stream)||void 0===r||r.addTrack(u[o]),f.streams[o].status="NORMAL",f.logger.log("create next remote track constraints:",a,f.streams),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(1),f.logger.error("new video track apply constraints error: ",e.t0),f.streams[o].status="INVALID",null===(n=f.streams[o].stream)||void 0===n||n.getTracks().forEach((function(e){e.stop(),f.logger.log("disabled track",u[o].id)}));case 16:case"end":return e.stop()}}),e,null,[[1,11]])})),l.s();case 19:if((h=l.n()).done){o.next=23;break}return o.delegateYield(d(),"t1",21);case 21:o.next=19;break;case 23:o.next=28;break;case 25:o.prev=25,o.t2=o.catch(16),l.e(o.t2);case 28:return o.prev=28,l.f(),o.finish(28);case 31:case"end":return o.stop()}}),o,this,[[2,8],[16,25,28,31]])})))}},{key:"removePreviousVideoTracks",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=(null===(e=this.previewStreams[0].stream)||void 0===e?void 0:e.getVideoTracks())||[];if(n||!(i.length<2)){var o=this.getEndedTrack(i);o&&(o.stop(),null===(t=this.previewStreams[0].stream)||void 0===t||t.removeTrack(o)),this.streams.forEach((function(e){var t,n,i=(null===(t=e.stream)||void 0===t?void 0:t.getVideoTracks())||[],o=r.getEndedTrack(i);o&&(o.stop(),null===(n=e.stream)||void 0===n||n.removeTrack(o))}))}}},{key:"getEndedTrack",value:function(e){return e.find((function(e){return"ended"===e.readyState}))||e[0]}},{key:"setStreamTracksStatus",value:function(e,t){var r=this;null==e||e.getTracks().forEach((function(e){if("audio"!==e.kind||"muteAudio"!==t&&"unmuteAudio"!==t||(e.enabled=Qi[t].status),r.isSupportReauthorize)"video"===e.kind&&"muteVideo"===t&&(Qi[t].status||e.stop());else if("video"===e.kind&&("muteVideo"===t||"unmuteVideo"===t)){var n=Qi[t].status;e.enabled=n}}))}},{key:"close",value:function(){this.streamStatus=!1;var e=0;this.clearAudioLevel(),this.streams&&(e+=this.closeStreams(this.streams)),this.pipelineStreams&&(e+=this.closeStreams(this.pipelineStreams)),this.previewStreams&&(e+=this.closeStreams(this.previewStreams)),this.isShareContent&&this.closeContentStream(),this.isShareContent=!1,this.streams=[],this.pipelineStreams=[],this.contentStreams=[],this.previewStreams=[],this.logger.log("stream closed successfully: ",e)}},{key:"closeStreams",value:function(e){var t=0;return e.forEach((function(e){var r;"NORMAL"===e.status&&(null===(r=e.stream)||void 0===r||r.getTracks().forEach((function(e){e.stop(),t+=1})))})),t}},{key:"getMediaStreams",value:function(){return{previewStreams:this.previewStreams,streams:this.streams,pipelineStreams:this.pipelineStreams,contentStreams:this.contentStreams}}},{key:"init",value:function(){var e,r,n,i,o,s,a,c,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{devices:{}},h=arguments.length>1?arguments[1]:void 0;return Ea(this,void 0,void 0,t().mark((function d(){var f,p,v,g,m,y,b,S,w,k,C,x,E,_,I,A,T,R;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("stream init config:",{config:l,params:h}),this.streamStatus){t.next=3;break}return t.abrupt("return",Promise.reject($n("XYSDK:950205")));case 3:if(this.client){t.next=5;break}return t.abrupt("return",Promise.reject($n("XYSDK:950209")));case 5:if(this.config=l,f=(null==l?void 0:l.devices)||{audioInputValue:"",videoInValue:""},p=f.audioInputValue,v=void 0===p?"":p,g=f.videoInValue,m=void 0===g?"":g,y=null===(e=this.client.deviceManager)||void 0===e?void 0:e.getDevicePermission(),b=y.camera,S=y.microphone,w=!0,k=!0,C={type:"NORMAL",detail:"successfully"},w=!(null!==(r=null==h?void 0:h.muteVideo)&&void 0!==r?r:null===(n=this.client)||void 0===n?void 0:n.config.muteVideo),k=!(null!==(i=null==h?void 0:h.muteAudio)&&void 0!==i?i:null===(o=this.client)||void 0===o?void 0:o.config.muteAudio),"denied"===b&&(w=!1,C={type:"AUDIO_ONLY",detail:"Camera is not found or permission denied"}),"denied"===S&&(k=!1,C={type:"VIDEO_ONLY",detail:"Microphone is not found or permission denied"}),x=this.client.getFeatureConfig(),E=x.enableMobileNotAuth,this.isSupportReauthorize||E||(w=!0,k=!0,this.logger.log("[ios] init constraints: ",{video:w,audio:k})),this.current=C,w||k){t.next=22;break}return t.next=21,this.dealWithoutStreams();case 21:return t.abrupt("return",t.sent);case 22:return t.prev=22,t.next=25,this.getStream(w,k,m,v);case 25:return t.abrupt("return",t.sent);case 28:if(t.prev=28,t.t0=t.catch(22),_=this.handleCreateStreamError(t.t0),I=_.code,this.logger.log("get stream is error:",_),!w||"XYSDK:950406"!==I&&"XYSDK:950403"!==I){t.next=47;break}return this.logger.log("Reduce resolution to get stream..."),this.isReduceResolution=!0,t.prev=36,t.next=39,this.getStream(w,k,m,v,!0);case 39:return t.abrupt("return",t.sent);case 42:t.prev=42,t.t1=t.catch(36),_=this.handleCreateStreamError(t.t0),I=_.code,this.logger.log("Reduce resolution to get stream is error:",_);case 47:if(!Wi.includes(I)){t.next=80;break}if(this.logger.log("Init domStream successfully",{status:_,err:t.t0}),!w||!k||"XYSDK:950404"===I){t.next=73;break}return t.prev=50,this.logger.log("only video stream create..."),t.next=54,this.getStream(!0,!1,m,v);case 54:return t.abrupt("return",t.sent);case 57:t.prev=57,t.t2=t.catch(50),this.logger.log("get video stream failed:",t.t2);case 60:return t.prev=60,this.logger.log("only audio stream create..."),t.next=64,this.getStream(!1,!0,m,v);case 64:return t.abrupt("return",t.sent);case 67:t.prev=67,t.t3=t.catch(60),this.logger.log("get audio stream failed:",t.t3);case 70:return t.next=72,this.dealWithoutStreams();case 72:return t.abrupt("return",t.sent);case 73:return A=null===(a=null===(s=this.client)||void 0===s?void 0:s.deviceManager)||void 0===a?void 0:a.getDevicePermission(),T=A.camera,R=A.microphone,null===(u=null===(c=this.client)||void 0===c?void 0:c.deviceManager)||void 0===u||u.setPermission({camera:w&&"unknown"===T?"denied":T,microphone:k&&"unknown"===R?"denied":R}),t.next=77,this.dealWithoutStreams(_);case 77:return t.abrupt("return",t.sent);case 80:return this.logger.warn("Init stream failed",{status:_,err:t.t0}),this.current={type:"FAILED",detail:_},t.abrupt("return",Promise.reject($n("XYSDK:950208",Object.assign({status:_},this.current))));case 83:case"end":return t.stop()}}),d,this,[[22,28],[36,42],[50,57],[60,67]])})))}},{key:"getPeopleContraints",value:function(e){return this.isReduceResolution||this.isFirefox?Mi[e].common:Mi[e].advanced}},{key:"getContentContraints",value:function(e){return this.isReduceResolution||this.isFirefox?Pi[e].common:Pi[e].advanced}},{key:"getStream",value:function(e,r,n,i){var o,s,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Ea(this,void 0,void 0,t().mark((function c(){var u,l,h,d,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,u=this.getInitContraints(e,r,n,i,a),this.logger.log("init contraints:",u),t.next=5,this.getUserMedia(u);case 5:return l=t.sent,(null===(o=null==u?void 0:u.audio)||void 0===o?void 0:o.echoCancellation)&&l.getAudioTracks()[0].applyConstraints({echoCancellation:!0}),this.logger.log("base remote stream: ",l),t.next=10,this.initStreams(l);case 10:return this.streamStatus||this.close(),(null===(s=this.client)||void 0===s?void 0:s.deviceManager)&&(h=this.client.deviceManager.getDevicePermission(),d=h.camera,f=h.microphone,this.client.deviceManager.setPermission({camera:e?"granted":d,microphone:r?"granted":f})),this.emmit("local-stream",this.previewStreams),t.abrupt("return",$n("XYSDK:950206",this.previewStreams));case 16:return t.prev=16,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 19:case"end":return t.stop()}}),c,this,[[0,16]])})))}},{key:"dealWithoutStreams",value:function(e){return Ea(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=$n("XYSDK:950405"),this.current={type:this.isSupportReauthorize?"SEND_ONLY":"FAILED",detail:(null==e?void 0:e.msg)||n.msg},t.next=4,this.initStreams(null);case 4:return t.abrupt("return",$n("XYSDK:950207",this.current,null==e?void 0:e.msg));case 5:case"end":return t.stop()}}),r,this)})))}},{key:"getInitContraints",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?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s={};o&&(s={width:Ri,height:Oi});var a=n.getContraints(e,t,s);if(i&&"default"!==i){var c={deviceId:{exact:i}};this.audioDeviceId=i,a.audio&&Object.assign(a.audio,c)}if(r){var u={deviceId:{exact:r}};this.videoDeviceId=r,a.video&&Object.assign(a.video,u)}return this.logger.log("get init constraints: ",a),a}},{key:"initStreams",value:function(e){return Ea(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.initPreviewStream(e);case 2:return t.next=4,this.initRemoteStreams(e);case 4:this.initPipelineStreams();case 5:case"end":return t.stop()}}),r,this)})))}},{key:"initPipelineStreams",value:function(){for(var e=[],t=this.streams.filter((function(t){var r,n;return"NORMAL"===t.status&&((null===(r=t.stream)||void 0===r?void 0:r.getAudioTracks()[0])||e.push({type:"audio"}),(null===(n=t.stream)||void 0===n?void 0:n.getVideoTracks()[0])||e.push({type:"video"})),"NORMAL"===t.status})).length,r=1;r<=11-t;r++)e.push({type:"all"});var n=0;this.pipelineStreams=e.map((function(e){n++;var t=[{kind:"video"},{kind:"audio"}];return"all"!==e.type&&(t=[{kind:e.type}]),{stream:null,domStream:t,status:"DOMSTRING",type:"pipelineStream",resolution:"90"}})),this.logger.log("temp stream count:",n)}},{key:"initRemoteStreams",value:function(e){var r,n,i,o;return Ea(this,void 0,void 0,t().mark((function s(){var a,c,u,l,h,d,f,p=this;return t().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!e){s.next=29;break}if(!this.isFirefox){s.next=5;break}this.initFirefoxRemoteStreams(e),s.next=27;break;case 5:a=e.clone(),c=e.clone(),a.getAudioTracks().forEach((function(e){e.stop(),a.removeTrack(e)})),c.getAudioTracks().forEach((function(e){e.stop(),c.removeTrack(e)})),u={stream:null,domStream:[],status:"NORMAL",type:"remoteStream",resolution:"180"},this.streams=[Object.assign(Object.assign({},u),{stream:e}),Object.assign(Object.assign({},u),{stream:a,resolution:"360"}),Object.assign(Object.assign({},u),{stream:c,resolution:"720"})],l=ka(this.streams.entries()),s.prev=12,d=t().mark((function e(){var s,a,c,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=Uo(h.value,2),a=s[0],c=s[1],!(u=null===(r=c.stream)||void 0===r?void 0:r.getVideoTracks()[0])){e.next=15;break}return e.prev=3,l=p.getPeopleContraints(Number(c.resolution)),e.next=7,u.applyConstraints(l);case 7:p.logger.log("init remote track constraints:",l,null===(n=c.stream)||void 0===n?void 0:n.id,u.getSettings()),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(3),p.logger.error("init remote track constraints failed:",e.t0,null===(i=c.stream)||void 0===i?void 0:i.id),p.streams[a].status="INVALID",null===(o=p.streams[a].stream)||void 0===o||o.getTracks().forEach((function(e){e.stop(),p.logger.log("disabled track",u.id)}));case 15:case"end":return e.stop()}}),e,null,[[3,10]])})),l.s();case 15:if((h=l.n()).done){s.next=19;break}return s.delegateYield(d(),"t0",17);case 17:s.next=15;break;case 19:s.next=24;break;case 21:s.prev=21,s.t1=s.catch(12),l.e(s.t1);case 24:return s.prev=24,l.f(),s.finish(24);case 27:s.next=32;break;case 29:f={stream:null,domStream:[{kind:"video"},{kind:"audio"}],status:"DOMSTRING",type:"remoteStream",resolution:"90"},this.streams=[Object.assign(Object.assign({},f),{resolution:"180"}),Object.assign(Object.assign({},f),{resolution:"360"}),Object.assign(Object.assign({},f),{resolution:"720"})],this.logger.log("None remote stream, init dom stream: ",this.streams);case 32:case"end":return s.stop()}}),s,this,[[12,21,24,27]])})))}},{key:"initFirefoxRemoteStreams",value:function(e){var r,n;return Ea(this,void 0,void 0,t().mark((function i(){var o,s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=e.clone(),s=e.clone(),null===(r=o.getAudioTracks()[0])||void 0===r||r.stop(),null===(n=s.getAudioTracks()[0])||void 0===n||n.stop(),a={stream:null,domStream:[],status:"NORMAL",type:"remoteStream",resolution:"180"},this.streams=[Object.assign(Object.assign({},a),{stream:e,resolution:"720"}),Object.assign(Object.assign({},a),{stream:s,resolution:"360"}),Object.assign(Object.assign({},a),{stream:o})];case 6:case"end":return t.stop()}}),i,this)})))}},{key:"initPreviewStream",value:function(e){var r,n,i;return Ea(this,void 0,void 0,t().mark((function o(){var s,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=16;break}if(t.prev=1,s={stream:e.clone(),domStream:[],status:"NORMAL",type:"previewStream",resolution:"360"},this.isFirefox){t.next=6;break}return t.next=6,null===(n=null===(r=s.stream)||void 0===r?void 0:r.getVideoTracks()[0])||void 0===n?void 0:n.applyConstraints(this.getPeopleContraints(360));case 6:null===(i=s.stream)||void 0===i||i.getAudioTracks().forEach((function(e){e.stop()})),this.logger.log("init local stream successfully"),this.previewStreams=[s],t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),this.logger.error("init local constraints failed: ",t.t0);case 14:t.next=18;break;case 16:a={stream:null,domStream:[{kind:"video"}],status:"DOMSTRING",type:"previewStream",resolution:"360"},this.previewStreams=[a];case 18:case"end":return t.stop()}}),o,this,[[1,11]])})))}},{key:"getRemoteAudioStream",value:function(){var e=this;this.logger.log("[stream]get remote audio stream");var t=this.streams,r=null;return t.some((function(t){return"180"===t.resolution&&(r=t.stream,e.logger.log("[stream]Match audio stream: ",r.id),!0)})),r}},{key:"setClientObj",value:function(e){this.client=e,this.updateDeviceByLocalStream()}},{key:"updateDeviceByLocalStream",value:function(){var e,t,r,n,i,o,s,a,c,u;if("NORMAL"===this.current.type||"AUDIO_ONLY"===this.current.type||"VIDEO_ONLY"===this.current.type){var l=null===(e=this.previewStreams[0].stream)||void 0===e?void 0:e.getAudioTracks()[0],h=null===(t=this.previewStreams[0].stream)||void 0===t?void 0:t.getVideoTracks()[0],d=null==l?void 0:l.getSettings(),f=null==h?void 0:h.getSettings(),p={audioInput:d?{deviceId:d.deviceId||"",groupId:d.groupId||"",label:(null==l?void 0:l.label)||""}:{deviceId:(null===(n=null===(r=this.config)||void 0===r?void 0:r.devices)||void 0===n?void 0:n.audioInputValue)||"default",groupId:"",label:""},videoInput:f?{deviceId:f.deviceId||"",groupId:f.groupId||"",label:(null==h?void 0:h.label)||""}:{deviceId:(null===(o=null===(i=this.config)||void 0===i?void 0:i.devices)||void 0===o?void 0:o.videoInValue)||"",groupId:"",label:""},audioOutput:{deviceId:(null===(a=null===(s=this.config)||void 0===s?void 0:s.devices)||void 0===a?void 0:a.audioOutputValue)||"default",groupId:"",label:""}};this.logger.log("Cache preview stream device info by tracks: ",p),null===(u=null===(c=this.client)||void 0===c?void 0:c.deviceManager)||void 0===u||u.setCurrentUsedDevice(p)}}},{key:"getAudioLevel",value:function(e){var t=this;return new Promise((function(r,n){var i;if(e?i=e:t.streams.length&&(i=t.streams[0].stream),i&&!t.audioLevel)t.audioLevel=new wa(i),t.audioLevel.init(),r(t.audioLevel.getAudioLevel());else if(t.audioLevel){r(t.audioLevel.getAudioLevel())}else t.client&&(t.client.logger.warn("GetAudio level must need have local stream!"),n($n("XYSDK:950514")))}))}},{key:"clearAudioLevel",value:function(){this.audioLevel=null}},{key:"closeContentStream",value:function(){var e=this;if(this.logger.log("close content stream"),this.isShareContent){this.off("start-share-content"),this.off("stop-share-content"),this.contentStreams.forEach((function(t,r){var n;null===(n=t.stream)||void 0===n||n.getTracks().forEach((function(t){var n;t.stop(),t.onended=null,null===(n=e.contentStreams[r].stream)||void 0===n||n.removeTrack(t)})),e.contentStreams[r].status="INVALID"})),this.isShareContent=!1,this.logger.log("content stream closed successfully")}}},{key:"createContentStream",value:function(){var e,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{screenAudio:!1},i=n.screenAudio;return Ea(this,void 0,void 0,t().mark((function n(){var o,s,a,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream] createContentStream func"),!this.isShareContent){t.next=4;break}return this.logger.warn("Already share content!"),t.abrupt("return",Promise.reject($n("XYSDK:950509")));case 4:return t.prev=4,i&&(null===(e=this.client)||void 0===e||e.setContentMode("BOTH")),this.createBaseContentStreams(),o=(null===(r=this.client)||void 0===r?void 0:r.getFeatureConfig())||{},s=o.enableLowResolution,a={video:this.getContentContraints(s?720:1080),audio:i},this.logger.log("create content contraints:",a),t.next=12,navigator.mediaDevices.getDisplayMedia(a);case 12:return c=t.sent,t.next=15,this.dealCaptureStream(c);case 15:return this.logger.log("capture content stream success... "),t.abrupt("return",this.contentStreams);case 19:return t.prev=19,t.t0=t.catch(4),this.logger.error("capture content stream failed: ",t.t0),this.isShareContent=!1,t.abrupt("return",Promise.reject(this.handleCreateContentStreamError(t.t0)));case 24:case"end":return t.stop()}}),n,this,[[4,19]])})))}},{key:"electronCapture",value:function(e){var t=this;return new Promise((function(r,n){navigator.webkitGetUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,minWidth:1920,maxWidth:1920,minHeight:1080,maxHeight:1080}}},(function(e){r(e)}),(function(e){t.logger.log("capture electron err: ",e),n(e)}))}))}},{key:"getElectronContentSources",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["window","screen"];return Ea(this,void 0,void 0,t().mark((function n(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getSources({types:r});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),n,null,[[0,7]])})))}},{key:"createElectronContentStream",value:function(e){return Ea(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isShareContent){t.next=3;break}return this.logger.warn("Already share content!"),t.abrupt("return",Promise.reject($n("XYSDK:950509")));case 3:if(e){t.next=6;break}return this.logger.warn("No selected sourceId!"),t.abrupt("return",Promise.reject($n("XYSDK:950510")));case 6:return this.createBaseContentStreams(),t.prev=7,t.next=10,this.electronCapture(e);case 10:return n=t.sent,t.next=13,this.dealCaptureStream(n);case 13:return t.abrupt("return",this.contentStreams);case 16:return t.prev=16,t.t0=t.catch(7),this.logger.error("capture electron content stream failed: ",t.t0),this.isShareContent=!1,t.abrupt("return",this.handleCreateContentStreamError(t.t0));case 21:case"end":return t.stop()}}),r,this,[[7,16]])})))}},{key:"getPreviewStream",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{video:{},audio:{}};return Ea(this,void 0,void 0,t().mark((function i(){var o,s,a,c,u,l,h;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o=n.video,s=void 0===o?{}:o,a=n.audio,c=void 0===a?{}:a,u={},e&&(u.video=Object.assign({},Ni,s)),r&&(u.audio=Object.assign({},c)),this.logger.log("get preview stream constraints:",u),t.next=8,this.getUserMedia(u);case 8:return l=t.sent,t.abrupt("return",l);case 12:return t.prev=12,t.t0=t.catch(0),h=this.handleCreateStreamError(t.t0),t.abrupt("return",Promise.reject(h));case 16:case"end":return t.stop()}}),i,this,[[0,12]])})))}},{key:"getUserMedia",value:function(e){return Ea(this,void 0,void 0,t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.logger.log("get user media constraints:",e),t.next=4,navigator.mediaDevices.getUserMedia(e);case 4:return n=t.sent,this.logger.log("get user media active:",n.active),t.abrupt("return",n);case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 12:case"end":return t.stop()}}),r,this,[[0,9]])})))}},{key:"handleCloseShareContentEvent",value:function(e,t){var r=this,n=!1,i=!1;e.onended=function(){(n=!0)&&i&&r.emmit("stop-share-content",{})},t.onended=function(){i=!0,n&&i&&r.emmit("stop-share-content",{})}}},{key:"dealCaptureStream",value:function(e){return Ea(this,void 0,void 0,t().mark((function r(){var n,i,o,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getVideoTracks()[0],i=n.clone(),o=this.getContentContraints(720),s=e.getAudioTracks()[0],t.prev=4,t.next=7,i.applyConstraints(o);case 7:t.next=13;break;case 9:t.prev=9,t.t0=t.catch(4),this.contentStreams[1].status="INVALID",this.logger.error("set 720p content stream contraints error: ",t.t0);case 13:this.handleCloseShareContentEvent(n,i),this.updateContentStreamTrack(n,i,s),this.client&&this.client.applyShareContent(),this.logger.log("create share content stream: ",this.contentStreams);case 17:case"end":return t.stop()}}),r,this,[[4,9]])})))}},{key:"createBaseContentStreams",value:function(){if(this.isShareContent=!0,!this.contentStreams.length){var e=new MediaStream,t=new MediaStream;this.contentStreams=[{type:"contentStream",stream:e,domStream:[],status:"NORMAL",resolution:"1080"},{type:"contentStream",stream:t,domStream:[],status:"NORMAL",resolution:"720"}]}}},{key:"updateContentStreamTrack",value:function(e,t,r){var n=this;this.contentStreams=this.contentStreams.map((function(i){var o,s;return i.stream&&("1080"===i.resolution?i.stream.addTrack(e):(i.stream.addTrack(t),r&&(i.stream.addTrack(r),null===(o=n.client)||void 0===o||o.reSendContentOffer(),n.logger.log("content audio stream:",null===(s=i.stream)||void 0===s?void 0:s.id),n.logger.log("content audio track:",r.id)))),Object.assign(Object.assign({},i),{status:"NORMAL",isSupport:!0})}))}},{key:"handleCreateContentStreamError",value:function(e){var t=e.name,r=e.message;return $n("NotAllowedError"===t?"Permission denied by system"===r?"XYSDK:950508":"Permission denied"===r?"XYSDK:950501":"XYSDK:950511":"InvalidStateError"===t?"XYSDK:950502":"AbortError"===t?"XYSDK:950503":"NotFoundError"===t?"XYSDK:950504":"NotReadableError"===t?"XYSDK:950505":"OverconstrainedError"===t?"XYSDK:950506":"TypeError"===t?"XYSDK:950507":"XYSDK:950503",e)}},{key:"handleCreateStreamError",value:function(e){var t={code:"",msg:"",detail:""};return t="NotFoundError"==e.name||"DevicesNotFoundError"==e.name?$n("XYSDK:950401",e):"NotReadableError"==e.name||"TrackStartError"==e.name?$n("XYSDK:950402",e):"OverconstrainedError"==e.name||"ConstraintNotSatisfiedError"==e.name?$n("XYSDK:950403",e):"NotAllowedError"==e.name||"PermissionDeniedError"==e.name||e.message.includes("NotAllowedError")?$n("XYSDK:950404",e):"TypeError"==e.name||"TypeError"==e.name?$n("XYSDK:950405",e):$n("XYSDK:950406",e),this.logger.error(t),t}}],[{key:"getStreamInstance",value:function(e){return this.instance||(this.instance=new n(e)),this.instance}},{key:"getContraints",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]:{},i=n.getSupportConstraints(),o={},s={},a={audio:o,video:s},c=r.channelCount,u=void 0===c?1:c,l=r.autoGainControl,h=void 0===l||l,d=r.noiseSuppression,f=void 0===d||d,p=r.echoCancellation,v=void 0===p||p,g=r.frameRate,m=void 0===g?Ni.frameRate:g,y=r.aspectRatio,b=void 0===y?Ni.aspectRatio:y,S=r.resizeMode,w=void 0===S?Ni.resizeMode:S,k=r.width,C=void 0===k?Ai:k,x=r.height,E=void 0===x?Ti:x,_={channelCount:u,autoGainControl:h,noiseSuppression:f,echoCancellation:v},I=Object.assign({aspectRatio:b,resizeMode:w,width:C,height:E},m&&{frameRate:m});return Object.keys(_).forEach((function(e){o[e]=_[e]})),Object.keys(I).forEach((function(e){i[e]&&(s[e]=I[e])})),a.audio=!!t&&o,a.video=!!e&&s,a}},{key:"getSupportConstraints",value:function(){var e={channelCount:!0,frameRate:!0,aspectRatio:!0,width:!0,height:!0};return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&(e=navigator.mediaDevices.getSupportedConstraints()),e}}]),n}(Wo),Ia=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Aa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Ta="color: #3876ff;",Ra="*********************************************************",Oa={version:_o,client:null,checkSupportWebRTC:function(){return Aa(void 0,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,u,l,h,d;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.isSupportRTC();case 2:return r=e.sent,e.next=5,c.isSupportUserMedia();case 5:return n=e.sent,i=c.isSupportWebsocket(),o=c.isMobile(),s=c.isMinBrowser(),e.next=11,c.isSupportH264();case 11:return a=e.sent,u=r.isSupportRTC,l=r.isSupportAddTransceiver,h=r.isSupportAddtrack,d={result:(s||o)&&u&&i&&a,detail:{isSupportRTC:u,isSupportWebsocket:i,isSupportBrowser:s,isSupportMobileBrowser:o,isSupportH264:a,isSupportAddTransceiver:l,isSupportAddtrack:h,isSupportUserMedia:n}},Oa.logger.debug("desktop support result: ",d),e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})))},checkSupportMobileWebRTC:function(){return Aa(void 0,void 0,void 0,t().mark((function e(){var r,n,i,o,s,a,u;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.isMobile(),e.next=3,Oa.checkSupportWebRTC();case 3:return n=e.sent,i=n.detail,o=i.isSupportRTC,s=i.isSupportWebsocket,a=i.isSupportH264,u={result:r&&o&&s&&a,detail:Object.assign({},n.detail)},Oa.logger.debug("mobile support result: ",u),e.abrupt("return",u);case 9:case"end":return e.stop()}}),e)})))},checkSupportShareContent:function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)},setLocale:function(e){!function(e){Yn=["en_US","zh_CN","zh_TW"].find((function(t){return t.toUpperCase()===e.toUpperCase()}))||"zh_CN"}(e)},logger:new Mo,createClient:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clientId:"",clientSecret:""},t=Oa.logger,r=Oo.host,n={server:r,layout:"AUTO",debug:!1,muteAudio:!1,muteVideo:!1,localHide:!1,localMirror:!0,isThird:!0,isVerifyMeetingId:!0,clientId:"",clientSecret:"",isSupportHybridCloud:!1,__hideId:0,__monitorMode:"",checkSSL:!0},i=e.container||{},o=Object.assign(Object.assign(Object.assign({},n),e),{container:i}),s=new Sa(o,t);return Oa.client=s,s},createStream:function(){var e=Oa.logger;return new _a({logger:e,client:Oa.client})},setConfig:function(e){Lo.setLoginInfo(e);var t=e||{},r=t.client_id,n=t.client_secret;r&&Lo.setClientInfo({clientId:r,clientSecret:n})},closePreviewStream:function(e){return Ia(void 0,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&e.getTracks().forEach((function(e){e.enabled=!1,e.stop()}));case 1:case"end":return t.stop()}}),r)})))},setOutputAudioDevice:function(e,t){e&&void 0!==e.sinkId?e.setSinkId(t).then((function(){})).catch((function(e){var t=e;"SecurityError"===(null==e?void 0:e.name)&&(t="You need to use HTTPS for selecting audio output device: ".concat(e)),console.error(t)})):console.warn("Browser does not support output device selection.")},render:(console.group("小鱼易连 WebRTC SDK"),console.info("%c".concat(Ra," \n\t\n * 欢迎使用 XY RTC SDK - 小鱼易连Web云视频 \n\t\n * 版本:").concat(_o," \n\t\n * 文档地址:https://openapi.xylink.com/common/meeting/doc/description?platform=web \n\t\n * 体验地址:https://cdn.xylink.com/webrtc/web/index.html \n\t\n * 问题反馈:https://github.com/xylink-com/xylink-rtc-demo/issues \n\t\n * 联系方式:luojinghui(luojinghui424@gmail.com) \n\n").concat(Ra),Ta),console.info("%c[INFO] XY Agent:"+navigator.userAgent+"\n",Ta),void console.groupEnd())};const Da=Oa;window.xyRTC={logger:Oa.logger,version:_o}})(),n})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.xyRTC=t():e.xyRTC=t()}(self,(()=>(()=>{var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(5327),a=n(4097),s=n(4109),c=n(7985),u=n(5061);e.exports=function(e){return new Promise((function(t,l){var h=e.data,f=e.headers;r.isFormData(h)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password||"";f.Authorization="Basic "+btoa(p+":"+v)}var g=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),o(g,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};i(t,l,r),d=null}},d.onabort=function(){d&&(l(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(u(t,e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(4372),y=(e.withCredentials||c(g))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(f,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),l(e),d=null)})),void 0===h&&(h=null),d.send(h)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),a=n(7185);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var c=s(n(5655));c.Axios=o,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(e){return Promise.all(e)},c.spread=n(8713),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),a=n(3572),s=n(7185);function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,i){return this.request(r.merge(i||{},{method:e,url:t,data:n}))}})),e.exports=c},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),a=n(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){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:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},i=["url","method","params","data"],o=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(o,(function(i){r.isObject(t[i])?n[i]=r.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:r.isObject(e[i])?n[i]=r.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),r.forEach(a,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}));var s=i.concat(o).concat(a),c=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return r.forEach(c,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},8527:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(5448)),s),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(o)})),e.exports=c},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["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"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]="object"==typeof n?e({},n):n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},738:(e,t,n)=>{"use strict";const r=n(3341),i=n(6401),o=n(5299);function a(e,t){switch(i(e)){case"object":return function(e,t){if("function"==typeof t)return t(e);if(t||o(e)){const n=new e.constructor;for(let r in e)n[r]=a(e[r],t);return n}return e}(e,t);case"array":return function(e,t){const n=new e.constructor(e.length);for(let r=0;r<e.length;r++)n[r]=a(e[r],t);return n}(e,t);default:return r(e)}}e.exports=a},9662:(e,t,n)=>{var r=n(614),i=n(6330),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not a function")}},9483:(e,t,n)=>{var r=n(4411),i=n(6330),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not a constructor")}},6077:(e,t,n)=>{var r=n(614),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw o("Can't set "+i(e)+" as a prototype")}},1223:(e,t,n)=>{var r=n(5112),i=n(30),o=n(3070).f,a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,n)=>{"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:(e,t,n)=>{var r=n(7976),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw i("Incorrect invocation")}},9670:(e,t,n)=>{var r=n(111),i=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not an object")}},3013:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(e,t,n)=>{var r=n(7293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:(e,t,n)=>{"use strict";var r,i,o,a=n(3013),s=n(9781),c=n(7854),u=n(614),l=n(111),h=n(2597),f=n(648),d=n(6330),p=n(8880),v=n(8052),g=n(7045),m=n(7976),y=n(9518),b=n(7674),S=n(5112),w=n(9711),E=n(9909),x=E.enforce,C=E.get,k=c.Int8Array,O=k&&k.prototype,I=c.Uint8ClampedArray,A=I&&I.prototype,_=k&&y(k),T=O&&y(O),R=Object.prototype,D=c.TypeError,N=S("toStringTag"),L=w("TYPED_ARRAY_TAG"),M="TypedArrayConstructor",P=a&&!!b&&"Opera"!==f(c.opera),j=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=y(e);if(l(t)){var n=C(t);return n&&h(n,M)?n[M]:G(t)}},K=function(e){if(!l(e))return!1;var t=f(e);return h(B,t)||h(U,t)};for(r in B)(o=(i=c[r])&&i.prototype)?x(o)[M]=i:P=!1;for(r in U)(o=(i=c[r])&&i.prototype)&&(x(o)[M]=i);if((!P||!u(_)||_===Function.prototype)&&(_=function(){throw D("Incorrect invocation")},P))for(r in B)c[r]&&b(c[r],_);if((!P||!T||T===R)&&(T=_.prototype,P))for(r in B)c[r]&&b(c[r].prototype,T);if(P&&y(A)!==T&&b(A,T),s&&!h(T,N))for(r in j=!0,g(T,N,{configurable:!0,get:function(){return l(this)?this[L]:void 0}}),B)c[r]&&p(c[r],L,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:j&&L,aTypedArray:function(e){if(K(e))return e;throw D("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!b||m(_,e)))return e;throw D(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var i in B){var o=c[i];if(o&&h(o.prototype,e))try{delete o.prototype[e]}catch(n){try{o.prototype[e]=t}catch(e){}}}T[e]&&!n||v(T,e,n?t:P&&O[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(s){if(b){if(n)for(r in B)if((i=c[r])&&h(i,e))try{delete i[e]}catch(e){}if(_[e]&&!n)return;try{return v(_,e,n?t:P&&_[e]||t)}catch(e){}}for(r in B)!(i=c[r])||i[e]&&!n||v(i,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=f(e);return"DataView"===t||h(B,t)||h(U,t)},isTypedArray:K,TypedArray:_,TypedArrayPrototype:T}},3331:(e,t,n)=>{"use strict";var r=n(7854),i=n(1702),o=n(9781),a=n(3013),s=n(6530),c=n(8880),u=n(7045),l=n(9190),h=n(7293),f=n(5787),d=n(9303),p=n(7466),v=n(7067),g=n(1179),m=n(9518),y=n(7674),b=n(8006).f,S=n(1285),w=n(1589),E=n(8003),x=n(9909),C=s.PROPER,k=s.CONFIGURABLE,O="ArrayBuffer",I="DataView",A="prototype",_="Wrong index",T=x.getterFor(O),R=x.getterFor(I),D=x.set,N=r[O],L=N,M=L&&L[A],P=r[I],j=P&&P[A],B=Object.prototype,U=r.Array,G=r.RangeError,K=i(S),H=i([].reverse),F=g.pack,V=g.unpack,Y=function(e){return[255&e]},z=function(e){return[255&e,e>>8&255]},W=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},q=function(e){return F(e,23,4)},$=function(e){return F(e,52,8)},Z=function(e,t,n){u(e[A],t,{configurable:!0,get:function(){return n(this)[t]}})},J=function(e,t,n,r){var i=v(n),o=R(e);if(i+t>o.byteLength)throw G(_);var a=o.bytes,s=i+o.byteOffset,c=w(a,s,s+t);return r?c:H(c)},Q=function(e,t,n,r,i,o){var a=v(n),s=R(e);if(a+t>s.byteLength)throw G(_);for(var c=s.bytes,u=a+s.byteOffset,l=r(+i),h=0;h<t;h++)c[u+h]=l[o?h:t-h-1]};if(a){var ee=C&&N.name!==O;if(h((function(){N(1)}))&&h((function(){new N(-1)}))&&!h((function(){return new N,new N(1.5),new N(NaN),1!=N.length||ee&&!k})))ee&&k&&c(N,"name",O);else{(L=function(e){return f(this,M),new N(v(e))})[A]=M;for(var te,ne=b(N),re=0;ne.length>re;)(te=ne[re++])in L||c(L,te,N[te]);M.constructor=L}y&&m(j)!==B&&y(j,B);var ie=new P(new L(2)),oe=i(j.setInt8);ie.setInt8(0,2147483648),ie.setInt8(1,2147483649),!ie.getInt8(0)&&ie.getInt8(1)||l(j,{setInt8:function(e,t){oe(this,e,t<<24>>24)},setUint8:function(e,t){oe(this,e,t<<24>>24)}},{unsafe:!0})}else M=(L=function(e){f(this,M);var t=v(e);D(this,{type:O,bytes:K(U(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[A],j=(P=function(e,t,n){f(this,j),f(e,M);var r=T(e),i=r.byteLength,a=d(t);if(a<0||a>i)throw G("Wrong offset");if(a+(n=void 0===n?i-a:p(n))>i)throw G("Wrong length");D(this,{type:I,buffer:e,byteLength:n,byteOffset:a,bytes:r.bytes}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=a)})[A],o&&(Z(L,"byteLength",T),Z(P,"buffer",R),Z(P,"byteLength",R),Z(P,"byteOffset",R)),l(j,{getInt8:function(e){return J(this,1,e)[0]<<24>>24},getUint8:function(e){return J(this,1,e)[0]},getInt16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return X(J(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return X(J(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return V(J(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return V(J(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Q(this,1,e,Y,t)},setUint8:function(e,t){Q(this,1,e,Y,t)},setInt16:function(e,t){Q(this,2,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Q(this,2,e,z,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Q(this,4,e,W,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Q(this,4,e,W,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Q(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Q(this,8,e,$,t,arguments.length>2?arguments[2]:void 0)}});E(L,O),E(P,I),e.exports={ArrayBuffer:L,DataView:P}},1048:(e,t,n)=>{"use strict";var r=n(7908),i=n(1400),o=n(6244),a=n(5117),s=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),c=o(n),u=i(e,c),l=i(t,c),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?c:i(h,c))-l,c-u),d=1;for(l<u&&u<l+f&&(d=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:a(n,u),u+=d,l+=d;return n}},1285:(e,t,n)=>{"use strict";var r=n(7908),i=n(1400),o=n(6244);e.exports=function(e){for(var t=r(this),n=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)t[s++]=e;return t}},8533:(e,t,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7745:(e,t,n)=>{var r=n(6244);e.exports=function(e,t){for(var n=0,i=r(t),o=new e(i);i>n;)o[n]=t[n++];return o}},8457:(e,t,n)=>{"use strict";var r=n(9974),i=n(6916),o=n(7908),a=n(3411),s=n(7659),c=n(4411),u=n(6244),l=n(6135),h=n(4121),f=n(1246),d=Array;e.exports=function(e){var t=o(e),n=c(this),p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v;g&&(v=r(v,p>2?arguments[2]:void 0));var m,y,b,S,w,E,x=f(t),C=0;if(!x||this===d&&s(x))for(m=u(t),y=n?new this(m):d(m);m>C;C++)E=g?v(t[C],C):t[C],l(y,C,E);else for(w=(S=h(t,x)).next,y=n?new this:[];!(b=i(w,S)).done;C++)E=g?a(S,v,[b.value,C],!0):b.value,l(y,C,E);return y.length=C,y}},1318:(e,t,n)=>{var r=n(5656),i=n(1400),o=n(6244),a=function(e){return function(t,n,a){var s,c=r(t),u=o(c),l=i(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,n)=>{var r=n(9974),i=n(1702),o=n(8361),a=n(7908),s=n(6244),c=n(5417),u=i([].push),l=function(e){var t=1==e,n=2==e,i=3==e,l=4==e,h=6==e,f=7==e,d=5==e||h;return function(p,v,g,m){for(var y,b,S=a(p),w=o(S),E=r(v,g),x=s(w),C=0,k=m||c,O=t?k(p,x):n||f?k(p,0):void 0;x>C;C++)if((d||C in w)&&(b=E(y=w[C],C,S),e))if(t)O[C]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return C;case 2:u(O,y)}else switch(e){case 4:return!1;case 7:u(O,y)}return h?-1:i||l?l:O}};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)}},6583:(e,t,n)=>{"use strict";var r=n(2104),i=n(5656),o=n(9303),a=n(6244),s=n(9341),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;e.exports=f?function(e){if(l)return r(u,this,arguments)||0;var t=i(this),n=a(t),s=n-1;for(arguments.length>1&&(s=c(s,o(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},1194:(e,t,n)=>{var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,n)=>{"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},3671:(e,t,n)=>{var r=n(9662),i=n(7908),o=n(8361),a=n(6244),s=TypeError,c=function(e){return function(t,n,c,u){r(n);var l=i(t),h=o(l),f=a(l),d=e?f-1:0,p=e?-1:1;if(c<2)for(;;){if(d in h){u=h[d],d+=p;break}if(d+=p,e?d<0:f<=d)throw s("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=p)d in h&&(u=n(u,h[d],d,l));return u}};e.exports={left:c(!1),right:c(!0)}},3658:(e,t,n)=>{"use strict";var r=n(9781),i=n(3157),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!a(e,"length").writable)throw o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},1589:(e,t,n)=>{var r=n(1400),i=n(6244),o=n(6135),a=Array,s=Math.max;e.exports=function(e,t,n){for(var c=i(e),u=r(t,c),l=r(void 0===n?c:n,c),h=a(s(l-u,0)),f=0;u<l;u++,f++)o(h,f,e[u]);return h.length=f,h}},206:(e,t,n)=>{var r=n(1702);e.exports=r([].slice)},4362:(e,t,n)=>{var r=n(1589),i=Math.floor,o=function(e,t){var n=e.length,c=i(n/2);return n<8?a(e,t):s(e,o(r(e,0,c),t),o(r(e,c),t),t)},a=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},s=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e};e.exports=o},7475:(e,t,n)=>{var r=n(3157),i=n(4411),o=n(111),a=n(5112)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},5417:(e,t,n)=>{var r=n(7475);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},3411:(e,t,n)=>{var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){i(e,"throw",t)}}},7072:(e,t,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:(e,t,n)=>{var r=n(1702),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},648:(e,t,n)=>{var r=n(1694),i=n(614),o=n(4326),a=n(5112)("toStringTag"),s=Object,c="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:c?o(t):"Object"==(r=o(t))&&i(t.callee)?"Arguments":r}},5631:(e,t,n)=>{"use strict";var r=n(30),i=n(7045),o=n(9190),a=n(9974),s=n(5787),c=n(8554),u=n(408),l=n(1656),h=n(6178),f=n(6340),d=n(9781),p=n(2423).fastKey,v=n(9909),g=v.set,m=v.getterFor;e.exports={getConstructor:function(e,t,n,l){var h=e((function(e,i){s(e,f),g(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),d||(e.size=0),c(i)||u(i,e[l],{that:e,AS_ENTRIES:n})})),f=h.prototype,v=m(t),y=function(e,t,n){var r,i,o=v(e),a=b(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},b=function(e,t){var n,r=v(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(f,{clear:function(){for(var e=v(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,n=v(t),r=b(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),d?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=v(this),r=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),o(f,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),d&&i(f,"size",{configurable:!0,get:function(){return v(this).size}}),h},setStrong:function(e,t,n){var r=t+" Iterator",i=m(t),o=m(r);l(e,t,(function(e,t){g(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?h("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(t)}}},7710:(e,t,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(1702),a=n(4705),s=n(8052),c=n(2423),u=n(408),l=n(5787),h=n(614),f=n(8554),d=n(111),p=n(7293),v=n(7072),g=n(8003),m=n(9587);e.exports=function(e,t,n){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),S=y?"set":"add",w=i[e],E=w&&w.prototype,x=w,C={},k=function(e){var t=o(E[e]);s(E,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!d(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!h(w)||!(b||E.forEach&&!p((function(){(new w).entries().next()})))))x=n.getConstructor(t,e,y,S),c.enable();else if(a(e,!0)){var O=new x,I=O[S](b?{}:-0,1)!=O,A=p((function(){O.has(1)})),_=v((function(e){new w(e)})),T=!b&&p((function(){for(var e=new w,t=5;t--;)e[S](t,t);return!e.has(-0)}));_||((x=t((function(e,t){l(e,E);var n=m(new w,e,x);return f(t)||u(t,n[S],{that:n,AS_ENTRIES:y}),n}))).prototype=E,E.constructor=x),(A||T)&&(k("delete"),k("has"),y&&k("get")),(T||I)&&k(S),b&&E.clear&&delete E.clear}return C[e]=x,r({global:!0,constructor:!0,forced:x!=w},C),g(x,e),b||n.setStrong(x,e,y),x}},9920:(e,t,n)=>{var r=n(2597),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t,n){for(var s=i(t),c=a.f,u=o.f,l=0;l<s.length;l++){var h=s[l];r(e,h)||n&&r(n,h)||c(e,h,u(t,h))}}},4964:(e,t,n)=>{var r=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4230:(e,t,n)=>{var r=n(1702),i=n(4488),o=n(1340),a=/"/g,s=r("".replace);e.exports=function(e,t,n,r){var c=o(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+s(o(r),a,""")+'"'),u+">"+c+"</"+t+">"}},6178:e=>{e.exports=function(e,t){return{value:e,done:t}}},8880:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},7045:(e,t,n)=>{var r=n(6339),i=n(3070);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},8052:(e,t,n)=>{var r=n(614),i=n(3070),o=n(6339),a=n(3072);e.exports=function(e,t,n,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(r(n)&&o(n,u,s),s.global)c?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},9190:(e,t,n)=>{var r=n(8052);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},3072:(e,t,n)=>{var r=n(7854),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},5117:(e,t,n)=>{"use strict";var r=n(6330),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw i("Cannot delete property "+r(t)+" of "+r(e))}},9781:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:e=>{var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:n}},317:(e,t,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},7207:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:e=>{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}},8509:(e,t,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8886:(e,t,n)=>{var r=n(8113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},7871:(e,t,n)=>{var r=n(3823),i=n(5268);e.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},9363:e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(e,t,n)=>{var r=n(8113);e.exports=/MSIE|Trident/.test(r)},1528:(e,t,n)=>{var r=n(8113);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},6833:(e,t,n)=>{var r=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(e,t,n)=>{var r=n(4326);e.exports="undefined"!=typeof process&&"process"==r(process)},1036:(e,t,n)=>{var r=n(8113);e.exports=/web0s(?!.*chrome)/i.test(r)},8113:e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(e,t,n)=>{var r,i,o=n(7854),a=n(8113),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},8008:(e,t,n)=>{var r=n(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(8052),s=n(3072),c=n(9920),u=n(4705);e.exports=function(e,t){var n,l,h,f,d,p=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in t){if(f=t[l],h=e.dontCallGetSet?(d=i(n,l))&&d.value:n[l],!u(v?l:p+(g?".":"#")+l,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,n)=>{"use strict";n(4916);var r=n(1470),i=n(8052),o=n(2261),a=n(7293),s=n(5112),c=n(8880),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,h){var f=s(e),d=!a((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=d&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t}));if(!d||!p||n){var v=r(/./[f]),g=t(f,""[e],(function(e,t,n,i,a){var s=r(e),c=t.exec;return c===o||c===l.exec?d&&!a?{done:!0,value:v(t,n,i)}:{done:!0,value:s(n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(l,f,g[1])}h&&c(l[f],"sham",!0)}},6677:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(e,t,n)=>{var r=n(4374),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},9974:(e,t,n)=>{var r=n(1470),i=n(9662),o=n(4374),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},4374:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:(e,t,n)=>{"use strict";var r=n(1702),i=n(9662),o=n(111),a=n(2597),s=n(206),c=n(4374),u=Function,l=r([].concat),h=r([].join),f={};e.exports=c?u.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),c=function(){var n=l(r,s(arguments));return this instanceof c?function(e,t,n){if(!a(f,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";f[t]=u("C,a","return new C("+h(r,",")+")")}return f[t](e,n)}(t,n.length,n):t.apply(e,n)};return o(n)&&(c.prototype=n),c}},6916:(e,t,n)=>{var r=n(4374),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:(e,t,n)=>{var r=n(9781),i=n(2597),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},5668:(e,t,n)=>{var r=n(1702),i=n(9662);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1470:(e,t,n)=>{var r=n(4326),i=n(1702);e.exports=function(e){if("Function"===r(e))return i(e)}},1702:(e,t,n)=>{var r=n(4374),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);e.exports=r?a:function(e){return function(){return o.apply(e,arguments)}}},5005:(e,t,n)=>{var r=n(7854),i=n(614);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},1246:(e,t,n)=>{var r=n(648),i=n(8173),o=n(8554),a=n(7497),s=n(5112)("iterator");e.exports=function(e){if(!o(e))return i(e,s)||i(e,"@@iterator")||a[r(e)]}},4121:(e,t,n)=>{var r=n(6916),i=n(9662),o=n(9670),a=n(6330),s=n(1246),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return o(r(n,e));throw c(a(e)+" is not iterable")}},8044:(e,t,n)=>{var r=n(1702),i=n(3157),o=n(614),a=n(4326),s=n(1340),c=r([].push);e.exports=function(e){if(o(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!=a(u)&&"String"!=a(u)||c(n,s(u))}var l=n.length,h=!0;return function(e,t){if(h)return h=!1,t;if(i(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},8173:(e,t,n)=>{var r=n(9662),i=n(8554);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},647:(e,t,n)=>{var r=n(1702),i=n(7908),o=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,h,f){var d=n+e.length,p=r.length,v=l;return void 0!==h&&(h=i(h),v=u),s(f,v,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,d);case"<":u=h[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var f=o(l/10);return 0===f?i:f<=p?void 0===r[f-1]?a(s,1):r[f-1]+a(s,1):i}u=r[l-1]}return void 0===u?"":u}))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:(e,t,n)=>{var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},3501:e=>{e.exports={}},842:e=>{e.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},490:(e,t,n)=>{var r=n(5005);e.exports=r("document","documentElement")},4664:(e,t,n)=>{var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:e=>{var t=Array,n=Math.abs,r=Math.pow,i=Math.floor,o=Math.log,a=Math.LN2;e.exports={pack:function(e,s,c){var u,l,h,f=t(c),d=8*c-s-1,p=(1<<d)-1,v=p>>1,g=23===s?r(2,-24)-r(2,-77):0,m=e<0||0===e&&1/e<0?1:0,y=0;for((e=n(e))!=e||e===1/0?(l=e!=e?1:0,u=p):(u=i(o(e)/a),e*(h=r(2,-u))<1&&(u--,h*=2),(e+=u+v>=1?g/h:g*r(2,1-v))*h>=2&&(u++,h/=2),u+v>=p?(l=0,u=p):u+v>=1?(l=(e*h-1)*r(2,s),u+=v):(l=e*r(2,v-1)*r(2,s),u=0));s>=8;)f[y++]=255&l,l/=256,s-=8;for(u=u<<s|l,d+=s;d>0;)f[y++]=255&u,u/=256,d-=8;return f[--y]|=128*m,f},unpack:function(e,t){var n,i=e.length,o=8*i-t-1,a=(1<<o)-1,s=a>>1,c=o-7,u=i-1,l=e[u--],h=127&l;for(l>>=7;c>0;)h=256*h+e[u--],c-=8;for(n=h&(1<<-c)-1,h>>=-c,c+=t;c>0;)n=256*n+e[u--],c-=8;if(0===h)h=1-s;else{if(h===a)return n?NaN:l?-1/0:1/0;n+=r(2,t),h-=s}return(l?-1:1)*n*r(2,h-t)}}},8361:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(4326),a=Object,s=r("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?s(e,""):a(e)}:a},9587:(e,t,n)=>{var r=n(614),i=n(111),o=n(7674);e.exports=function(e,t,n){var a,s;return o&&r(a=t.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(e,s),e}},2788:(e,t,n)=>{var r=n(1702),i=n(614),o=n(5465),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},2423:(e,t,n)=>{var r=n(2109),i=n(1702),o=n(3501),a=n(111),s=n(2597),c=n(3070).f,u=n(8006),l=n(1156),h=n(2050),f=n(9711),d=n(6677),p=!1,v=f("meta"),g=0,m=function(e){c(e,v,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},p=!0;var e=u.f,t=i([].splice),n={};n[v]=1,e(n).length&&(u.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===v){t(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,v)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[v].objectID},getWeakData:function(e,t){if(!s(e,v)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[v].weakData},onFreeze:function(e){return d&&p&&h(e)&&!s(e,v)&&m(e),e}};o[v]=!0},9909:(e,t,n)=>{var r,i,o,a=n(4811),s=n(7854),c=n(111),u=n(8880),l=n(2597),h=n(5465),f=n(6200),d=n(3501),p="Object already initialized",v=s.TypeError,g=s.WeakMap;if(a||h.state){var m=h.state||(h.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,r=function(e,t){if(m.has(e))throw v(p);return t.facade=e,m.set(e,t),t},i=function(e){return m.get(e)||{}},o=function(e){return m.has(e)}}else{var y=f("state");d[y]=!0,r=function(e,t){if(l(e,y))throw v(p);return t.facade=e,u(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return n}}}},7659:(e,t,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,n)=>{var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4067:(e,t,n)=>{var r=n(648);e.exports=function(e){var t=r(e);return"BigInt64Array"==t||"BigUint64Array"==t}},614:(e,t,n)=>{var r=n(4154),i=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},4411:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(614),a=n(648),s=n(5005),c=n(2788),u=function(){},l=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=r(f.exec),p=!f.exec(u),v=function(e){if(!o(e))return!1;try{return h(u,l,e),!0}catch(e){return!1}},g=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(f,c(e))}catch(e){return!0}};g.sham=!0,e.exports=!h||i((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?g:v},4705:(e,t,n)=>{var r=n(7293),i=n(614),o=/#|\.prototype\./,a=function(e,t){var n=c[s(e)];return n==l||n!=u&&(i(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},5988:(e,t,n)=>{var r=n(111),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},8554:e=>{e.exports=function(e){return null==e}},111:(e,t,n)=>{var r=n(614),i=n(4154),o=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===o}:function(e){return"object"==typeof e?null!==e:r(e)}},1913:e=>{e.exports=!1},7850:(e,t,n)=>{var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},2190:(e,t,n)=>{var r=n(5005),i=n(614),o=n(7976),a=n(3307),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&o(t.prototype,s(e))}},408:(e,t,n)=>{var r=n(9974),i=n(6916),o=n(9670),a=n(6330),s=n(7659),c=n(6244),u=n(7976),l=n(4121),h=n(1246),f=n(9212),d=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,n){var g,m,y,b,S,w,E,x=n&&n.that,C=!(!n||!n.AS_ENTRIES),k=!(!n||!n.IS_RECORD),O=!(!n||!n.IS_ITERATOR),I=!(!n||!n.INTERRUPTED),A=r(t,x),_=function(e){return g&&f(g,"normal",e),new p(!0,e)},T=function(e){return C?(o(e),I?A(e[0],e[1],_):A(e[0],e[1])):I?A(e,_):A(e)};if(k)g=e.iterator;else if(O)g=e;else{if(!(m=h(e)))throw d(a(e)+" is not iterable");if(s(m)){for(y=0,b=c(e);b>y;y++)if((S=T(e[y]))&&u(v,S))return S;return new p(!1)}g=l(e,m)}for(w=k?e.next:g.next;!(E=i(w,g)).done;){try{S=T(E.value)}catch(e){f(g,"throw",e)}if("object"==typeof S&&S&&u(v,S))return S}return new p(!1)}},9212:(e,t,n)=>{var r=n(6916),i=n(9670),o=n(8173);e.exports=function(e,t,n){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return i(a),n}},3061:(e,t,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:o(+!u,n)}),a(e,l,!1,!0),s[l]=c,e}},1656:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(1913),a=n(6530),s=n(614),c=n(3061),u=n(9518),l=n(7674),h=n(8003),f=n(8880),d=n(8052),p=n(5112),v=n(7497),g=n(3383),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,S=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),E="keys",x="values",C="entries",k=function(){return this};e.exports=function(e,t,n,a,p,g,O){c(n,t,a);var I,A,_,T=function(e){if(e===p&&M)return M;if(!S&&e in N)return N[e];switch(e){case E:case x:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},R=t+" Iterator",D=!1,N=e.prototype,L=N[w]||N["@@iterator"]||p&&N[p],M=!S&&L||T(p),P="Array"==t&&N.entries||L;if(P&&(I=u(P.call(new e)))!==Object.prototype&&I.next&&(o||u(I)===b||(l?l(I,b):s(I[w])||d(I,w,k)),h(I,R,!0,!0),o&&(v[R]=k)),m&&p==x&&L&&L.name!==x&&(!o&&y?f(N,"name",x):(D=!0,M=function(){return i(L,this)})),p)if(A={values:T(x),keys:g?M:T(E),entries:T(C)},O)for(_ in A)(S||D||!(_ in N))&&d(N,_,A[_]);else r({target:t,proto:!0,forced:S||D},A);return o&&!O||N[w]===M||d(N,w,M,{name:p}),v[t]=M,A}},3383:(e,t,n)=>{"use strict";var r,i,o,a=n(7293),s=n(614),c=n(111),u=n(30),l=n(9518),h=n(8052),f=n(5112),d=n(1913),p=f("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(r=i):v=!0),!c(r)||a((function(){var e={};return r[p].call(e)!==e}))?r={}:d&&(r=u(r)),s(r[p])||h(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},7497:e=>{e.exports={}},6244:(e,t,n)=>{var r=n(7466);e.exports=function(e){return r(e.length)}},6339:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(614),a=n(2597),s=n(9781),c=n(6530).CONFIGURABLE,u=n(2788),l=n(9909),h=l.enforce,f=l.get,d=String,p=Object.defineProperty,v=r("".slice),g=r("".replace),m=r([].join),y=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),S=e.exports=function(e,t,n){"Symbol("===v(d(t),0,7)&&(t="["+g(d(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(s?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&a(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=h(e);return a(r,"source")||(r.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=S((function(){return o(this)&&f(this).source||u(this)}),"toString")},403:e=>{var t=Math.log,n=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*n}},4758:e=>{var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5948:(e,t,n)=>{var r,i,o,a,s,c=n(7854),u=n(9974),l=n(1236).f,h=n(261).set,f=n(8572),d=n(6833),p=n(1528),v=n(1036),g=n(5268),m=c.MutationObserver||c.WebKitMutationObserver,y=c.document,b=c.process,S=c.Promise,w=l(c,"queueMicrotask"),E=w&&w.value;if(!E){var x=new f,C=function(){var e,t;for(g&&(e=b.domain)&&e.exit();t=x.get();)try{t()}catch(e){throw x.head&&r(),e}e&&e.enter()};d||g||v||!m||!y?!p&&S&&S.resolve?((a=S.resolve(void 0)).constructor=S,s=u(a.then,a),r=function(){s(C)}):g?r=function(){b.nextTick(C)}:(h=u(h,c),r=function(){h(C)}):(i=!0,o=y.createTextNode(""),new m(C).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),E=function(e){x.head||r(),x.add(e)}}e.exports=E},8523:(e,t,n)=>{"use strict";var r=n(9662),i=TypeError,o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw i("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},3929:(e,t,n)=>{var r=n(7850),i=TypeError;e.exports=function(e){if(r(e))throw i("The method doesn't accept regular expressions");return e}},2814:(e,t,n)=>{var r=n(7854),i=n(7293),o=n(1702),a=n(1340),s=n(3111).trim,c=n(1361),u=o("".charAt),l=r.parseFloat,h=r.Symbol,f=h&&h.iterator,d=1/l(c+"-0")!=-1/0||f&&!i((function(){l(Object(f))}));e.exports=d?function(e){var t=s(a(e)),n=l(t);return 0===n&&"-"==u(t,0)?-0:n}:l},3009:(e,t,n)=>{var r=n(7854),i=n(7293),o=n(1702),a=n(1340),s=n(3111).trim,c=n(1361),u=r.parseInt,l=r.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=o(f.exec),p=8!==u(c+"08")||22!==u(c+"0x16")||h&&!i((function(){u(Object(h))}));e.exports=p?function(e,t){var n=s(a(e));return u(n,t>>>0||(d(f,n)?16:10))}:u},1574:(e,t,n)=>{"use strict";var r=n(9781),i=n(1702),o=n(6916),a=n(7293),s=n(1956),c=n(5181),u=n(5296),l=n(7908),h=n(8361),f=Object.assign,d=Object.defineProperty,p=i([].concat);e.exports=!f||a((function(){if(r&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=f({},e)[n]||s(f({},t)).join("")!=i}))?function(e,t){for(var n=l(e),i=arguments.length,a=1,f=c.f,d=u.f;i>a;)for(var v,g=h(arguments[a++]),m=f?p(s(g),f(g)):s(g),y=m.length,b=0;y>b;)v=m[b++],r&&!o(d,g,v)||(n[v]=g[v]);return n}:f},30:(e,t,n)=>{var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),c=n(490),u=n(317),l=n(6200),h="prototype",f="script",d=l("IE_PROTO"),p=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},g=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;m="undefined"!=typeof document?document.domain&&r?g(r):(t=u("iframe"),n="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):g(r);for(var i=a.length;i--;)delete m[h][a[i]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[h]=i(e),n=new p,p[h]=null,n[d]=e):n=m(),void 0===t?n:o.f(n,t)}},6048:(e,t,n)=>{var r=n(9781),i=n(3353),o=n(3070),a=n(9670),s=n(5656),c=n(1956);t.f=r&&!i?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),i=c(t),u=i.length,l=0;u>l;)o.f(e,n=i[l++],r[n]);return e}},3070:(e,t,n)=>{var r=n(9781),i=n(4664),o=n(3353),a=n(9670),s=n(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";t.f=r?o?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=l(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:h in n?n[h]:r[h],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(a(e),t=s(t),a(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:(e,t,n)=>{var r=n(9781),i=n(6916),o=n(5296),a=n(9114),s=n(5656),c=n(4948),u=n(2597),l=n(4664),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=s(e),t=c(t),l)try{return h(e,t)}catch(e){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},1156:(e,t,n)=>{var r=n(4326),i=n(5656),o=n(8006).f,a=n(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==r(e)?function(e){try{return o(e)}catch(e){return a(s)}}(e):o(i(e))}},8006:(e,t,n)=>{var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,n)=>{var r=n(2597),i=n(614),o=n(7908),a=n(6200),s=n(8544),c=a("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=o(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},2050:(e,t,n)=>{var r=n(7293),i=n(111),o=n(4326),a=n(7556),s=Object.isExtensible,c=r((function(){s(1)}));e.exports=c||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!=o(e))&&(!s||s(e)))}:s},7976:(e,t,n)=>{var r=n(1702);e.exports=r({}.isPrototypeOf)},6324:(e,t,n)=>{var r=n(1702),i=n(2597),o=n(5656),a=n(1318).indexOf,s=n(3501),c=r([].push);e.exports=function(e,t){var n,r=o(e),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~a(l,n)||c(l,n));return l}},1956:(e,t,n)=>{var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:(e,t,n)=>{var r=n(5668),i=n(9670),o=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),o(r),t?e(n,r):n.__proto__=r,n}}():void 0)},4699:(e,t,n)=>{var r=n(9781),i=n(1702),o=n(1956),a=n(5656),s=i(n(5296).f),c=i([].push),u=function(e){return function(t){for(var n,i=a(t),u=o(i),l=u.length,h=0,f=[];l>h;)n=u[h++],r&&!s(i,n)||c(f,e?[n,i[n]]:i[n]);return f}};e.exports={entries:u(!0),values:u(!1)}},288:(e,t,n)=>{"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(e,t,n)=>{var r=n(6916),i=n(614),o=n(111),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!o(s=r(n,e)))return s;if(i(n=e.valueOf)&&!o(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!o(s=r(n,e)))return s;throw a("Can't convert object to primitive value")}},3887:(e,t,n)=>{var r=n(5005),i=n(1702),o=n(8006),a=n(5181),s=n(9670),c=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?c(t,n(e)):t}},857:(e,t,n)=>{var r=n(7854);e.exports=r},2534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:(e,t,n)=>{var r=n(7854),i=n(2492),o=n(614),a=n(4705),s=n(2788),c=n(5112),u=n(7871),l=n(3823),h=n(1913),f=n(7392),d=i&&i.prototype,p=c("species"),v=!1,g=o(r.PromiseRejectionEvent),m=a("Promise",(function(){var e=s(i),t=e!==String(i);if(!t&&66===f)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new i((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(v=n.then((function(){}))instanceof r))return!0}return!t&&(u||l)&&!g}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:v}},2492:(e,t,n)=>{var r=n(7854);e.exports=r.Promise},9478:(e,t,n)=>{var r=n(9670),i=n(111),o=n(8523);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},612:(e,t,n)=>{var r=n(2492),i=n(7072),o=n(3702).CONSTRUCTOR;e.exports=o||!i((function(e){r.all(e).then(void 0,(function(){}))}))},8572:e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},7651:(e,t,n)=>{var r=n(6916),i=n(9670),o=n(614),a=n(4326),s=n(2261),c=TypeError;e.exports=function(e,t){var n=e.exec;if(o(n)){var u=r(n,e,t);return null!==u&&i(u),u}if("RegExp"===a(e))return r(s,e,t);throw c("RegExp#exec called on incompatible receiver")}},2261:(e,t,n)=>{"use strict";var r,i,o=n(6916),a=n(1702),s=n(1340),c=n(7066),u=n(2999),l=n(2309),h=n(30),f=n(9909).get,d=n(9441),p=n(7168),v=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,y=a("".charAt),b=a("".indexOf),S=a("".replace),w=a("".slice),E=(i=/b*/g,o(g,r=/a/,"a"),o(g,i,"a"),0!==r.lastIndex||0!==i.lastIndex),x=u.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(E||C||x||d||p)&&(m=function(e){var t,n,r,i,a,u,l,d=this,p=f(d),k=s(e),O=p.raw;if(O)return O.lastIndex=d.lastIndex,t=o(m,O,k),d.lastIndex=O.lastIndex,t;var I=p.groups,A=x&&d.sticky,_=o(c,d),T=d.source,R=0,D=k;if(A&&(_=S(_,"y",""),-1===b(_,"g")&&(_+="g"),D=w(k,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(k,d.lastIndex-1))&&(T="(?: "+T+")",D=" "+D,R++),n=new RegExp("^(?:"+T+")",_)),C&&(n=new RegExp("^"+T+"$(?!\\s)",_)),E&&(r=d.lastIndex),i=o(g,A?n:d,D),A?i?(i.input=w(i.input,R),i[0]=w(i[0],R),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:E&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),C&&i&&i.length>1&&o(v,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&I)for(i.groups=u=h(null),a=0;a<I.length;a++)u[(l=I[a])[0]]=i[l[1]];return i}),e.exports=m},7066:(e,t,n)=>{"use strict";var r=n(9670);e.exports=function(){var e=r(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}},4706:(e,t,n)=>{var r=n(6916),i=n(2597),o=n(7976),a=n(7066),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||i(e,"flags")||!o(s,e)?t:r(a,e)}},2999:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp,o=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},9441:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,n)=>{var r=n(8554),i=TypeError;e.exports=function(e){if(r(e))throw i("Can't call method on "+e);return e}},7152:(e,t,n)=>{"use strict";var r,i=n(7854),o=n(2104),a=n(614),s=n(9363),c=n(8113),u=n(206),l=n(8053),h=i.Function,f=/MSIE .\./.test(c)||s&&((r=i.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));e.exports=function(e,t){var n=t?2:1;return f?function(r,i){var s=l(arguments.length,1)>n,c=a(r)?r:h(r),f=s?u(arguments,n):[],d=s?function(){o(c,this,f)}:c;return t?e(d,i):e(d)}:e}},6340:(e,t,n)=>{"use strict";var r=n(5005),i=n(7045),o=n(5112),a=n(9781),s=o("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},8003:(e,t,n)=>{var r=n(3070).f,i=n(2597),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,o)&&r(e,o,{configurable:!0,value:t})}},6200:(e,t,n)=>{var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,n)=>{var r=n(7854),i=n(3072),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:(e,t,n)=>{var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(e,t,n)=>{var r=n(9670),i=n(9483),o=n(8554),a=n(5112)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||o(n=r(s)[a])?t:i(n)}},3429:(e,t,n)=>{var r=n(7293);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},8710:(e,t,n)=>{var r=n(1702),i=n(9303),o=n(1340),a=n(4488),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,h=o(a(t)),f=i(n),d=h.length;return f<0||f>=d?e?"":void 0:(r=c(h,f))<55296||r>56319||f+1===d||(l=c(h,f+1))<56320||l>57343?e?s(h,f):r:e?u(h,f,f+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},8415:(e,t,n)=>{"use strict";var r=n(9303),i=n(1340),o=n(4488),a=RangeError;e.exports=function(e){var t=i(o(this)),n="",s=r(e);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},6091:(e,t,n)=>{var r=n(6530).PROPER,i=n(7293),o=n(1361);e.exports=function(e){return i((function(){return!!o[e]()||"
"!=="
"[e]()||r&&o[e].name!==e}))}},3111:(e,t,n)=>{var r=n(1702),i=n(4488),o=n(1340),a=n(1361),s=r("".replace),c=RegExp("^["+a+"]+"),u=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var n=o(i(t));return 1&e&&(n=s(n,c,"")),2&e&&(n=s(n,u,"$1")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},6293:(e,t,n)=>{var r=n(7392),i=n(7293),o=n(7854).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6532:(e,t,n)=>{var r=n(6916),i=n(5005),o=n(5112),a=n(8052);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return r(n,this)}),{arity:1})}},2015:(e,t,n)=>{var r=n(6293);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},261:(e,t,n)=>{var r,i,o,a,s=n(7854),c=n(2104),u=n(9974),l=n(614),h=n(2597),f=n(7293),d=n(490),p=n(206),v=n(317),g=n(8053),m=n(6833),y=n(5268),b=s.setImmediate,S=s.clearImmediate,w=s.process,E=s.Dispatch,x=s.Function,C=s.MessageChannel,k=s.String,O=0,I={},A="onreadystatechange";f((function(){r=s.location}));var _=function(e){if(h(I,e)){var t=I[e];delete I[e],t()}},T=function(e){return function(){_(e)}},R=function(e){_(e.data)},D=function(e){s.postMessage(k(e),r.protocol+"//"+r.host)};b&&S||(b=function(e){g(arguments.length,1);var t=l(e)?e:x(e),n=p(arguments,1);return I[++O]=function(){c(t,void 0,n)},i(O),O},S=function(e){delete I[e]},y?i=function(e){w.nextTick(T(e))}:E&&E.now?i=function(e){E.now(T(e))}:C&&!m?(a=(o=new C).port2,o.port1.onmessage=R,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!f(D)?(i=D,s.addEventListener("message",R,!1)):i=A in v("script")?function(e){d.appendChild(v("script"))[A]=function(){d.removeChild(this),_(e)}}:function(e){setTimeout(T(e),0)}),e.exports={set:b,clear:S}},863:(e,t,n)=>{var r=n(1702);e.exports=r(1..valueOf)},1400:(e,t,n)=>{var r=n(9303),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},4599:(e,t,n)=>{var r=n(7593),i=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw i("Can't convert number to bigint");return BigInt(t)}},7067:(e,t,n)=>{var r=n(9303),i=n(7466),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw o("Wrong length or index");return n}},5656:(e,t,n)=>{var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9303:(e,t,n)=>{var r=n(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},7466:(e,t,n)=>{var r=n(9303),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:(e,t,n)=>{var r=n(4488),i=Object;e.exports=function(e){return i(r(e))}},4590:(e,t,n)=>{var r=n(3002),i=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw i("Wrong offset");return n}},3002:(e,t,n)=>{var r=n(9303),i=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw i("The argument can't be less than 0");return t}},7593:(e,t,n)=>{var r=n(6916),i=n(111),o=n(2190),a=n(8173),s=n(2140),c=n(5112),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var n,c=a(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},4948:(e,t,n)=>{var r=n(7593),i=n(2190);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},1694:(e,t,n)=>{var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},1340:(e,t,n)=>{var r=n(648),i=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},6330:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9843:(e,t,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(6916),a=n(9781),s=n(3832),c=n(260),u=n(3331),l=n(5787),h=n(9114),f=n(8880),d=n(5988),p=n(7466),v=n(7067),g=n(4590),m=n(4948),y=n(2597),b=n(648),S=n(111),w=n(2190),E=n(30),x=n(7976),C=n(7674),k=n(8006).f,O=n(7321),I=n(2092).forEach,A=n(6340),_=n(7045),T=n(3070),R=n(1236),D=n(9909),N=n(9587),L=D.get,M=D.set,P=D.enforce,j=T.f,B=R.f,U=Math.round,G=i.RangeError,K=u.ArrayBuffer,H=K.prototype,F=u.DataView,V=c.NATIVE_ARRAY_BUFFER_VIEWS,Y=c.TYPED_ARRAY_TAG,z=c.TypedArray,W=c.TypedArrayPrototype,X=c.aTypedArrayConstructor,q=c.isTypedArray,$="BYTES_PER_ELEMENT",Z="Wrong length",J=function(e,t){X(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},Q=function(e,t){_(e,t,{configurable:!0,get:function(){return L(this)[t]}})},ee=function(e){var t;return x(H,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},te=function(e,t){return q(e)&&!w(t)&&t in e&&d(+t)&&t>=0},ne=function(e,t){return t=m(t),te(e,t)?h(2,e[t]):B(e,t)},re=function(e,t,n){return t=m(t),!(te(e,t)&&S(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?j(e,t,n):(e[t]=n.value,e)};a?(V||(R.f=ne,T.f=re,Q(W,"buffer"),Q(W,"byteOffset"),Q(W,"byteLength"),Q(W,"length")),r({target:"Object",stat:!0,forced:!V},{getOwnPropertyDescriptor:ne,defineProperty:re}),e.exports=function(e,t,n){var a=e.match(/\d+/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,h="set"+e,d=i[c],m=d,y=m&&m.prototype,b={},w=function(e,t){j(e,t,{get:function(){return function(e,t){var n=L(e);return n.view[u](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=L(e);n&&(r=(r=U(r))<0?0:r>255?255:255&r),i.view[h](t*a+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};V?s&&(m=t((function(e,t,n,r){return l(e,y),N(S(t)?ee(t)?void 0!==r?new d(t,g(n,a),r):void 0!==n?new d(t,g(n,a)):new d(t):q(t)?J(m,t):o(O,m,t):new d(v(t)),e,m)})),C&&C(m,z),I(k(d),(function(e){e in m||f(m,e,d[e])})),m.prototype=y):(m=t((function(e,t,n,r){l(e,y);var i,s,c,u=0,h=0;if(S(t)){if(!ee(t))return q(t)?J(m,t):o(O,m,t);i=t,h=g(n,a);var f=t.byteLength;if(void 0===r){if(f%a)throw G(Z);if((s=f-h)<0)throw G(Z)}else if((s=p(r)*a)+h>f)throw G(Z);c=s/a}else c=v(t),i=new K(s=c*a);for(M(e,{buffer:i,byteOffset:h,byteLength:s,length:c,view:new F(i)});u<c;)w(e,u++)})),C&&C(m,z),y=m.prototype=E(W)),y.constructor!==m&&f(y,"constructor",m),P(y).TypedArrayConstructor=m,Y&&f(y,Y,c);var x=m!=d;b[c]=m,r({global:!0,constructor:!0,forced:x,sham:!V},b),$ in m||f(m,$,a),$ in y||f(y,$,a),A(c)}):e.exports=function(){}},3832:(e,t,n)=>{var r=n(7854),i=n(7293),o=n(7072),a=n(260).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,c=r.Int8Array;e.exports=!a||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},3074:(e,t,n)=>{var r=n(7745),i=n(6304);e.exports=function(e,t){return r(i(e),t)}},7321:(e,t,n)=>{var r=n(9974),i=n(6916),o=n(9483),a=n(7908),s=n(6244),c=n(4121),u=n(1246),l=n(7659),h=n(4067),f=n(260).aTypedArrayConstructor,d=n(4599);e.exports=function(e){var t,n,p,v,g,m,y,b,S=o(this),w=a(e),E=arguments.length,x=E>1?arguments[1]:void 0,C=void 0!==x,k=u(w);if(k&&!l(k))for(b=(y=c(w,k)).next,w=[];!(m=i(b,y)).done;)w.push(m.value);for(C&&E>2&&(x=r(x,arguments[2])),n=s(w),p=new(f(S))(n),v=h(p),t=0;n>t;t++)g=C?x(w[t],t):w[t],p[t]=v?d(g):+g;return p}},6304:(e,t,n)=>{var r=n(260),i=n(6707),o=r.aTypedArrayConstructor,a=r.getTypedArrayConstructor;e.exports=function(e){return o(i(e,a(e)))}},9711:(e,t,n)=>{var r=n(1702),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},3307:(e,t,n)=>{var r=n(6293);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(e,t,n)=>{var r=n(9781),i=n(7293);e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:e=>{var t=TypeError;e.exports=function(e,n){if(e<n)throw t("Not enough arguments");return e}},4811:(e,t,n)=>{var r=n(7854),i=n(614),o=r.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},6800:(e,t,n)=>{var r=n(857),i=n(2597),o=n(6061),a=n(3070).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},6061:(e,t,n)=>{var r=n(5112);t.f=r},5112:(e,t,n)=>{var r=n(7854),i=n(2309),o=n(2597),a=n(9711),s=n(6293),c=n(3307),u=r.Symbol,l=i("wks"),h=c?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return o(l,e)||(l[e]=s&&o(u,e)?u[e]:h("Symbol."+e)),l[e]}},1361:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:(e,t,n)=>{"use strict";var r=n(2109),i=n(1470),o=n(7293),a=n(3331),s=n(9670),c=n(1400),u=n(7466),l=n(6707),h=a.ArrayBuffer,f=a.DataView,d=f.prototype,p=i(h.prototype.slice),v=i(d.getUint8),g=i(d.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(p&&void 0===t)return p(s(this),e);for(var n=s(this).byteLength,r=c(e,n),i=c(void 0===t?n:t,n),o=new(l(this,h))(u(i-r)),a=new f(this),d=new f(o),m=0;r<i;)g(d,m++,v(a,r++));return o}})},2222:(e,t,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),c=n(6244),u=n(7207),l=n(6135),h=n(5417),f=n(1194),d=n(5112),p=n(7392),v=d("isConcatSpreadable"),g=p>=51||!i((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),m=function(e){if(!a(e))return!1;var t=e[v];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,arity:1,forced:!g||!f("concat")},{concat:function(e){var t,n,r,i,o,a=s(this),f=h(a,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(m(o=-1===t?a:arguments[t]))for(i=c(o),u(d+i),n=0;n<i;n++,d++)n in o&&l(f,d,o[n]);else u(d+1),l(f,d++,o);return f.length=d,f}})},6541:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).every;r({target:"Array",proto:!0,forced:!n(9341)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},7327:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},4553:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).findIndex,o=n(1223),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9826:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).find,o=n(1223),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9554:(e,t,n)=>{"use strict";var r=n(2109),i=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},1038:(e,t,n)=>{var r=n(2109),i=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(e){Array.from(e)}))},{from:i})},6699:(e,t,n)=>{"use strict";var r=n(2109),i=n(1318).includes,o=n(7293),a=n(1223);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},2772:(e,t,n)=>{"use strict";var r=n(2109),i=n(1470),o=n(1318).indexOf,a=n(9341),s=i([].indexOf),c=!!s&&1/s([1],1,-0)<0;r({target:"Array",proto:!0,forced:c||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:o(this,e,t)}})},9753:(e,t,n)=>{n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},6992:(e,t,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(3070).f,c=n(1656),u=n(6178),l=n(1913),h=n(9781),f="Array Iterator",d=a.set,p=a.getterFor(f);e.exports=c(Array,"Array",(function(e,t){d(this,{type:f,target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(e){}},1249:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},7042:(e,t,n)=>{"use strict";var r=n(2109),i=n(3157),o=n(4411),a=n(111),s=n(1400),c=n(6244),u=n(5656),l=n(6135),h=n(5112),f=n(1194),d=n(206),p=f("slice"),v=h("species"),g=Array,m=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var n,r,h,f=u(this),p=c(f),y=s(e,p),b=s(void 0===t?p:t,p);if(i(f)&&(n=f.constructor,(o(n)&&(n===g||i(n.prototype))||a(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return d(f,y,b);for(r=new(void 0===n?g:n)(m(b-y,0)),h=0;y<b;y++,h++)y in f&&l(r,h,f[y]);return r.length=h,r}})},5212:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).some;r({target:"Array",proto:!0,forced:!n(9341)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},561:(e,t,n)=>{"use strict";var r=n(2109),i=n(7908),o=n(1400),a=n(9303),s=n(6244),c=n(3658),u=n(7207),l=n(5417),h=n(6135),f=n(5117),d=n(1194)("splice"),p=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var n,r,d,g,m,y,b=i(this),S=s(b),w=o(e,S),E=arguments.length;for(0===E?n=r=0:1===E?(n=0,r=S-w):(n=E-2,r=v(p(a(t),0),S-w)),u(S+n-r),d=l(b,r),g=0;g<r;g++)(m=w+g)in b&&h(d,g,b[m]);if(d.length=r,n<r){for(g=w;g<S-r;g++)y=g+n,(m=g+r)in b?b[y]=b[m]:f(b,y);for(g=S;g>S-r+n;g--)f(b,g-1)}else if(n>r)for(g=S-r;g>w;g--)y=g+n-1,(m=g+r-1)in b?b[y]=b[m]:f(b,y);for(g=0;g<n;g++)b[g+w]=arguments[g+2];return c(b,S-r+n),d}})},3843:(e,t,n)=>{var r=n(2109),i=n(1702),o=Date,a=i(o.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return a(new o)}})},3710:(e,t,n)=>{var r=n(1702),i=n(8052),o=Date.prototype,a="Invalid Date",s="toString",c=r(o[s]),u=r(o.getTime);String(new Date(NaN))!=a&&i(o,s,(function(){var e=u(this);return e==e?c(this):a}))},4812:(e,t,n)=>{var r=n(2109),i=n(7065);r({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},8309:(e,t,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(1702),a=n(7045),s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},8862:(e,t,n)=>{var r=n(2109),i=n(5005),o=n(2104),a=n(6916),s=n(1702),c=n(7293),u=n(614),l=n(2190),h=n(206),f=n(8044),d=n(6293),p=String,v=i("JSON","stringify"),g=s(/./.exec),m=s("".charAt),y=s("".charCodeAt),b=s("".replace),S=s(1..toString),w=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,x=/^[\uDC00-\uDFFF]$/,C=!d||c((function(){var e=i("Symbol")();return"[null]"!=v([e])||"{}"!=v({a:e})||"{}"!=v(Object(e))})),k=c((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),O=function(e,t){var n=h(arguments),r=f(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=a(r,this,p(e),t)),!l(t))return t},o(v,null,n)},I=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return g(E,e)&&!g(x,i)||g(x,e)&&!g(E,r)?"\\u"+S(y(e,0),16):e};v&&r({target:"JSON",stat:!0,arity:3,forced:C||k},{stringify:function(e,t,n){var r=h(arguments),i=o(C?O:v,null,r);return k&&"string"==typeof i?b(i,w,I):i}})},9098:(e,t,n)=>{"use strict";n(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(5631))},1532:(e,t,n)=>{n(9098)},658:(e,t,n)=>{n(2109)({target:"Math",stat:!0},{log10:n(403)})},3689:(e,t,n)=>{n(2109)({target:"Math",stat:!0},{trunc:n(4758)})},9653:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9781),a=n(7854),s=n(857),c=n(1702),u=n(4705),l=n(2597),h=n(9587),f=n(7976),d=n(2190),p=n(7593),v=n(7293),g=n(8006).f,m=n(1236).f,y=n(3070).f,b=n(863),S=n(3111).trim,w="Number",E=a[w],x=s[w],C=E.prototype,k=a.TypeError,O=c("".slice),I=c("".charCodeAt),A=function(e){var t,n,r,i,o,a,s,c,u=p(e,"number");if(d(u))throw k("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=S(u),43===(t=I(u,0))||45===t){if(88===(n=I(u,2))||120===n)return NaN}else if(48===t){switch(I(u,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=O(u,2)).length,s=0;s<a;s++)if((c=I(o,s))<48||c>i)return NaN;return parseInt(o,r)}return+u},_=u(w,!E(" 0o1")||!E("0b1")||E("+0x1")),T=function(e){var t,n=arguments.length<1?0:E(function(e){var t=p(e,"number");return"bigint"==typeof t?t:A(t)}(e));return f(C,t=this)&&v((function(){b(t)}))?h(Object(n),this,T):n};T.prototype=C,_&&!i&&(C.constructor=T),r({global:!0,constructor:!0,wrap:!0,forced:_},{Number:T});var R=function(e,t){for(var n,r=o?g(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(","),i=0;r.length>i;i++)l(t,n=r[i])&&!l(e,n)&&y(e,n,m(t,n))};i&&x&&R(s[w],x),(_||i)&&R(s[w],E)},6977:(e,t,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(9303),a=n(863),s=n(8415),c=n(7293),u=RangeError,l=String,h=Math.floor,f=i(s),d=i("".slice),p=i(1..toFixed),v=function(e,t,n){return 0===t?n:t%2==1?v(e,t-1,n*e):v(e*e,t/2,n)},g=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=h(i/1e7)},m=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=h(r/t),r=r%t*1e7},y=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=l(e[t]);n=""===n?r:n+f("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:c((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!c((function(){p({})}))},{toFixed:function(e){var t,n,r,i,s=a(this),c=o(e),h=[0,0,0,0,0,0],p="",b="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return l(s);if(s<0&&(p="-",s=-s),s>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(s*v(2,69,1))-69)<0?s*v(2,-t,1):s/v(2,t,1),n*=4503599627370496,(t=52-t)>0){for(g(h,0,n),r=c;r>=7;)g(h,1e7,0),r-=7;for(g(h,v(10,r,1),0),r=t-1;r>=23;)m(h,1<<23),r-=23;m(h,1<<r),g(h,1,1),m(h,2),b=y(h)}else g(h,0,n),g(h,1<<-t,0),b=y(h)+f("0",c);return b=c>0?p+((i=b.length)<=c?"0."+f("0",c-i)+b:d(b,0,i-c)+"."+d(b,i-c)):p+b}})},9601:(e,t,n)=>{var r=n(2109),i=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9660:(e,t,n)=>{var r=n(2109),i=n(6293),o=n(7293),a=n(5181),s=n(7908);r({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},7941:(e,t,n)=>{var r=n(2109),i=n(7908),o=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},1539:(e,t,n)=>{var r=n(1694),i=n(8052),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(e,t,n)=>{var r=n(2109),i=n(4699).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},4678:(e,t,n)=>{var r=n(2109),i=n(2814);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},1058:(e,t,n)=>{var r=n(2109),i=n(3009);r({global:!0,forced:parseInt!=i},{parseInt:i})},821:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),a=n(8523),s=n(2534),c=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(e){var t=this,n=a.f(t),r=n.resolve,u=n.reject,l=s((function(){var n=o(t.resolve),a=[],s=0,l=1;c(e,(function(e){var o=s++,c=!1;l++,i(n,t,e).then((function(e){c||(c=!0,a[o]=e,--l||r(a))}),u)})),--l||r(a)}));return l.error&&u(l.value),n.promise}})},4164:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3702).CONSTRUCTOR,a=n(2492),s=n(5005),c=n(614),u=n(8052),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&c(a)){var h=s("Promise").prototype.catch;l.catch!==h&&u(l,"catch",h,{unsafe:!0})}},3401:(e,t,n)=>{"use strict";var r,i,o,a=n(2109),s=n(1913),c=n(5268),u=n(7854),l=n(6916),h=n(8052),f=n(7674),d=n(8003),p=n(6340),v=n(9662),g=n(614),m=n(111),y=n(5787),b=n(6707),S=n(261).set,w=n(5948),E=n(842),x=n(2534),C=n(8572),k=n(9909),O=n(2492),I=n(3702),A=n(8523),_="Promise",T=I.CONSTRUCTOR,R=I.REJECTION_EVENT,D=I.SUBCLASSING,N=k.getterFor(_),L=k.set,M=O&&O.prototype,P=O,j=M,B=u.TypeError,U=u.document,G=u.process,K=A.f,H=K,F=!!(U&&U.createEvent&&u.dispatchEvent),V="unhandledrejection",Y=function(e){var t;return!(!m(e)||!g(t=e.then))&&t},z=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,h=e.domain;try{s?(a||(2===t.rejection&&Z(t),t.rejection=1),!0===s?n=o:(h&&h.enter(),n=s(o),h&&(h.exit(),i=!0)),n===e.promise?u(B("Promise-chain cycle")):(r=Y(n))?l(r,n,c,u):c(n)):u(o)}catch(e){h&&!i&&h.exit(),u(e)}},W=function(e,t){e.notified||(e.notified=!0,w((function(){for(var n,r=e.reactions;n=r.get();)z(n,e);e.notified=!1,t&&!e.rejection&&q(e)})))},X=function(e,t,n){var r,i;F?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!R&&(i=u["on"+e])?i(r):e===V&&E("Unhandled promise rejection",n)},q=function(e){l(S,u,(function(){var t,n=e.facade,r=e.value;if($(e)&&(t=x((function(){c?G.emit("unhandledRejection",r,n):X(V,n,r)})),e.rejection=c||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){l(S,u,(function(){var t=e.facade;c?G.emit("rejectionHandled",t):X("rejectionhandled",t,e.value)}))},J=function(e,t,n){return function(r){e(t,r,n)}},Q=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,W(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw B("Promise can't be resolved itself");var r=Y(t);r?w((function(){var n={done:!1};try{l(r,t,J(ee,n,e),J(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,W(e,!1))}catch(t){Q({done:!1},t,e)}}};if(T&&(j=(P=function(e){y(this,j),v(e),l(r,this);var t=N(this);try{e(J(ee,t),J(Q,t))}catch(e){Q(t,e)}}).prototype,(r=function(e){L(this,{type:_,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:0,value:void 0})}).prototype=h(j,"then",(function(e,t){var n=N(this),r=K(b(this,P));return n.parent=!0,r.ok=!g(e)||e,r.fail=g(t)&&t,r.domain=c?G.domain:void 0,0==n.state?n.reactions.add(r):w((function(){z(r,n)})),r.promise})),i=function(){var e=new r,t=N(e);this.promise=e,this.resolve=J(ee,t),this.reject=J(Q,t)},A.f=K=function(e){return e===P||undefined===e?new i(e):H(e)},!s&&g(O)&&M!==Object.prototype)){o=M.then,D||h(M,"then",(function(e,t){var n=this;return new P((function(e,t){l(o,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete M.constructor}catch(e){}f&&f(M,j)}a({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:P}),d(P,_,!1,!0),p(_)},7727:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(2492),a=n(7293),s=n(5005),c=n(614),u=n(6707),l=n(9478),h=n(8052),f=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),n=c(e);return this.then(n?function(n){return l(t,e()).then((function(){return n}))}:e,n?function(n){return l(t,e()).then((function(){throw n}))}:e)}}),!i&&c(o)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},8674:(e,t,n)=>{n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),a=n(8523),s=n(2534),c=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(e){var t=this,n=a.f(t),r=n.reject,u=s((function(){var a=o(t.resolve);c(e,(function(e){i(a,t,e).then(n.resolve,r)}))}));return u.error&&r(u.value),n.promise}})},683:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return i(t.reject,void 0,e),t.promise}})},6294:(e,t,n)=>{"use strict";var r=n(2109),i=n(5005),o=n(1913),a=n(2492),s=n(3702).CONSTRUCTOR,c=n(9478),u=i("Promise"),l=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return c(l&&this===u?a:this,e)}})},2419:(e,t,n)=>{var r=n(2109),i=n(5005),o=n(2104),a=n(7065),s=n(9483),c=n(9670),u=n(111),l=n(30),h=n(7293),f=i("Reflect","construct"),d=Object.prototype,p=[].push,v=h((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),g=!h((function(){f((function(){}))})),m=v||g;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(e,t){s(e),c(t);var n=arguments.length<3?e:s(arguments[2]);if(g&&!v)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return o(p,r,t),new(o(a,e,r))}var i=n.prototype,h=l(u(i)?i:d),m=o(e,h,t);return u(m)?m:h}})},4916:(e,t,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(e,t,n)=>{"use strict";var r=n(6530).PROPER,i=n(8052),o=n(9670),a=n(1340),s=n(7293),c=n(4706),u="toString",l=RegExp.prototype[u],h=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=r&&l.name!=u;(h||f)&&i(RegExp.prototype,u,(function(){var e=o(this);return"/"+a(e.source)+"/"+a(c(e))}),{unsafe:!0})},2023:(e,t,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(3929),a=n(4488),s=n(1340),c=n(4964),u=i("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},8783:(e,t,n)=>{"use strict";var r=n(8710).charAt,i=n(1340),o=n(9909),a=n(1656),s=n(6178),c="String Iterator",u=o.set,l=o.getterFor(c);a(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},9254:(e,t,n)=>{"use strict";var r=n(2109),i=n(4230);r({target:"String",proto:!0,forced:n(3429)("link")},{link:function(e){return i(this,"a","href",e)}})},4723:(e,t,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),a=n(8554),s=n(7466),c=n(1340),u=n(4488),l=n(8173),h=n(1530),f=n(7651);i("match",(function(e,t,n){return[function(t){var n=u(this),i=a(t)?void 0:l(t,e);return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=o(this),i=c(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return f(r,i);var u=r.unicode;r.lastIndex=0;for(var l,d=[],p=0;null!==(l=f(r,i));){var v=c(l[0]);d[p]=v,""===v&&(r.lastIndex=h(i,s(r.lastIndex),u)),p++}return 0===p?null:d}]}))},5306:(e,t,n)=>{"use strict";var r=n(2104),i=n(6916),o=n(1702),a=n(7007),s=n(7293),c=n(9670),u=n(614),l=n(8554),h=n(9303),f=n(7466),d=n(1340),p=n(4488),v=n(1530),g=n(8173),m=n(647),y=n(7651),b=n(5112)("replace"),S=Math.max,w=Math.min,E=o([].concat),x=o([].push),C=o("".indexOf),k=o("".slice),O="$0"==="a".replace(/./,"$0"),I=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(e,t,n){var o=I?"$":"$0";return[function(e,n){var r=p(this),o=l(e)?void 0:g(e,b);return o?i(o,e,r,n):i(t,d(r),e,n)},function(e,i){var a=c(this),s=d(e);if("string"==typeof i&&-1===C(i,o)&&-1===C(i,"$<")){var l=n(t,a,s,i);if(l.done)return l.value}var p=u(i);p||(i=d(i));var g=a.global;if(g){var b=a.unicode;a.lastIndex=0}for(var O=[];;){var I=y(a,s);if(null===I)break;if(x(O,I),!g)break;""===d(I[0])&&(a.lastIndex=v(s,f(a.lastIndex),b))}for(var A,_="",T=0,R=0;R<O.length;R++){for(var D=d((I=O[R])[0]),N=S(w(h(I.index),s.length),0),L=[],M=1;M<I.length;M++)x(L,void 0===(A=I[M])?A:String(A));var P=I.groups;if(p){var j=E([D],L,N,s);void 0!==P&&x(j,P);var B=d(r(i,void 0,j))}else B=m(D,s,N,L,P,i);N>=T&&(_+=k(s,T,N)+B,T=N+D.length)}return _+k(s,T)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!O||I)},3210:(e,t,n)=>{"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},4032:(e,t,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(6916),a=n(1702),s=n(1913),c=n(9781),u=n(6293),l=n(7293),h=n(2597),f=n(7976),d=n(9670),p=n(5656),v=n(4948),g=n(1340),m=n(9114),y=n(30),b=n(1956),S=n(8006),w=n(1156),E=n(5181),x=n(1236),C=n(3070),k=n(6048),O=n(5296),I=n(8052),A=n(7045),_=n(2309),T=n(6200),R=n(3501),D=n(9711),N=n(5112),L=n(6061),M=n(6800),P=n(6532),j=n(8003),B=n(9909),U=n(2092).forEach,G=T("hidden"),K="Symbol",H="prototype",F=B.set,V=B.getterFor(K),Y=Object[H],z=i.Symbol,W=z&&z[H],X=i.TypeError,q=i.QObject,$=x.f,Z=C.f,J=w.f,Q=O.f,ee=a([].push),te=_("symbols"),ne=_("op-symbols"),re=_("wks"),ie=!q||!q[H]||!q[H].findChild,oe=c&&l((function(){return 7!=y(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=$(Y,t);r&&delete Y[t],Z(e,t,n),r&&e!==Y&&Z(Y,t,r)}:Z,ae=function(e,t){var n=te[e]=y(W);return F(n,{type:K,tag:e,description:t}),c||(n.description=t),n},se=function(e,t,n){e===Y&&se(ne,t,n),d(e);var r=v(t);return d(n),h(te,r)?(n.enumerable?(h(e,G)&&e[G][r]&&(e[G][r]=!1),n=y(n,{enumerable:m(0,!1)})):(h(e,G)||Z(e,G,m(1,{})),e[G][r]=!0),oe(e,r,n)):Z(e,r,n)},ce=function(e,t){d(e);var n=p(t),r=b(n).concat(fe(n));return U(r,(function(t){c&&!o(ue,n,t)||se(e,t,n[t])})),e},ue=function(e){var t=v(e),n=o(Q,this,t);return!(this===Y&&h(te,t)&&!h(ne,t))&&(!(n||!h(this,t)||!h(te,t)||h(this,G)&&this[G][t])||n)},le=function(e,t){var n=p(e),r=v(t);if(n!==Y||!h(te,r)||h(ne,r)){var i=$(n,r);return!i||!h(te,r)||h(n,G)&&n[G][r]||(i.enumerable=!0),i}},he=function(e){var t=J(p(e)),n=[];return U(t,(function(e){h(te,e)||h(R,e)||ee(n,e)})),n},fe=function(e){var t=e===Y,n=J(t?ne:p(e)),r=[];return U(n,(function(e){!h(te,e)||t&&!h(Y,e)||ee(r,te[e])})),r};u||(I(W=(z=function(){if(f(W,this))throw X("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=D(e),n=function(e){this===Y&&o(n,ne,e),h(this,G)&&h(this[G],t)&&(this[G][t]=!1),oe(this,t,m(1,e))};return c&&ie&&oe(Y,t,{configurable:!0,set:n}),ae(t,e)})[H],"toString",(function(){return V(this).tag})),I(z,"withoutSetter",(function(e){return ae(D(e),e)})),O.f=ue,C.f=se,k.f=ce,x.f=le,S.f=w.f=he,E.f=fe,L.f=function(e){return ae(N(e),e)},c&&(A(W,"description",{configurable:!0,get:function(){return V(this).description}}),s||I(Y,"propertyIsEnumerable",ue,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),U(b(re),(function(e){M(e)})),r({target:K,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?y(e):ce(y(e),t)},defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:he}),P(),j(z,K),R[G]=!0},1817:(e,t,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(1702),s=n(2597),c=n(614),u=n(7976),l=n(1340),h=n(7045),f=n(9920),d=o.Symbol,p=d&&d.prototype;if(i&&c(d)&&(!("description"in p)||void 0!==d().description)){var v={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(p,this)?new d(e):void 0===e?d():d(e);return""===e&&(v[t]=!0),t};f(g,d),g.prototype=p,p.constructor=g;var m="Symbol(test)"==String(d("test")),y=a(p.valueOf),b=a(p.toString),S=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),E=a("".slice);h(p,"description",{configurable:!0,get:function(){var e=y(this);if(s(v,e))return"";var t=b(e),n=m?E(t,7,-1):w(t,S,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},763:(e,t,n)=>{var r=n(2109),i=n(5005),o=n(2597),a=n(1340),s=n(2309),c=n(2015),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=a(e);if(o(u,t))return u[t];var n=i("Symbol")(t);return u[t]=n,l[n]=t,n}})},2165:(e,t,n)=>{n(6800)("iterator")},2526:(e,t,n)=>{n(4032),n(763),n(6620),n(8862),n(9660)},6620:(e,t,n)=>{var r=n(2109),i=n(2597),o=n(2190),a=n(6330),s=n(2309),c=n(2015),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!o(e))throw TypeError(a(e)+" is not a symbol");if(i(u,e))return u[e]}})},2990:(e,t,n)=>{"use strict";var r=n(1702),i=n(260),o=r(n(1048)),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:(e,t,n)=>{"use strict";var r=n(260),i=n(1285),o=n(4599),a=n(648),s=n(6916),c=n(1702),u=n(7293),l=r.aTypedArray,h=r.exportTypedArrayMethod,f=c("".slice);h("fill",(function(e){var t=arguments.length;l(this);var n="Big"===f(a(this),0,3)?o(e):+e;return s(i,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5035:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).filter,o=n(3074),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},7174:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4731:(e,t,n)=>{"use strict";var r=n(260),i=n(1318).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:(e,t,n)=>{"use strict";var r=n(260),i=n(1318).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:(e,t,n)=>{"use strict";var r=n(7854),i=n(7293),o=n(1702),a=n(260),s=n(6992),c=n(5112)("iterator"),u=r.Uint8Array,l=o(s.values),h=o(s.keys),f=o(s.entries),d=a.aTypedArray,p=a.exportTypedArrayMethod,v=u&&u.prototype,g=!i((function(){v[c].call([1])})),m=!!v&&v.values&&v[c]===v.values&&"values"===v.values.name,y=function(){return l(d(this))};p("entries",(function(){return f(d(this))}),g),p("keys",(function(){return h(d(this))}),g),p("values",y,g||!m,{name:"values"}),p(c,y,g||!m,{name:"values"})},8867:(e,t,n)=>{"use strict";var r=n(260),i=n(1702),o=r.aTypedArray,a=r.exportTypedArrayMethod,s=i([].join);a("join",(function(e){return s(o(this),e)}))},7789:(e,t,n)=>{"use strict";var r=n(260),i=n(2104),o=n(6583),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,a(this),t>1?[e,arguments[1]]:[e])}))},3739:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).map,o=n(6304),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},4483:(e,t,n)=>{"use strict";var r=n(260),i=n(3671).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},9368:(e,t,n)=>{"use strict";var r=n(260),i=n(3671).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},2056:(e,t,n)=>{"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=this,n=i(t).length,r=a(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}))},3462:(e,t,n)=>{"use strict";var r=n(7854),i=n(6916),o=n(260),a=n(6244),s=n(4590),c=n(7908),u=n(7293),l=r.RangeError,h=r.Int8Array,f=h&&h.prototype,d=f&&f.set,p=o.aTypedArray,v=o.exportTypedArrayMethod,g=!u((function(){var e=new Uint8ClampedArray(2);return i(d,e,{length:1,0:3},1),3!==e[1]})),m=g&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new h(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));v("set",(function(e){p(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=c(e);if(g)return i(d,this,n,t);var r=this.length,o=a(n),u=0;if(o+t>r)throw l("Wrong length");for(;u<o;)this[t+u]=n[u++]}),!g||m)},678:(e,t,n)=>{"use strict";var r=n(260),i=n(6304),o=n(7293),a=n(206),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=a(s(this),e,t),r=i(this),o=0,c=n.length,u=new r(c);c>o;)u[o]=n[o++];return u}),o((function(){new Int8Array(1).slice()})))},7462:(e,t,n)=>{"use strict";var r=n(260),i=n(2092).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:(e,t,n)=>{"use strict";var r=n(7854),i=n(1470),o=n(7293),a=n(9662),s=n(4362),c=n(260),u=n(8886),l=n(256),h=n(7392),f=n(8008),d=c.aTypedArray,p=c.exportTypedArrayMethod,v=r.Uint16Array,g=v&&i(v.prototype.sort),m=!(!g||o((function(){g(new v(2),null)}))&&o((function(){g(new v(2),{})}))),y=!!g&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(f)return f<602;var e,t,n=new v(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(g(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));p("sort",(function(e){return void 0!==e&&a(e),y?g(this,e):s(d(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!y||m)},5021:(e,t,n)=>{"use strict";var r=n(260),i=n(7466),o=n(1400),a=n(6304),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=s(this),r=n.length,c=o(e,r);return new(a(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,i((void 0===t?r:o(t,r))-c))}))},2974:(e,t,n)=>{"use strict";var r=n(7854),i=n(2104),o=n(260),a=n(7293),s=n(206),c=r.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,f=!!c&&a((function(){h.call(new c(1))}));l("toLocaleString",(function(){return i(h,f?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},5016:(e,t,n)=>{"use strict";var r=n(260).exportTypedArrayMethod,i=n(7293),o=n(7854),a=n(1702),s=o.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);i((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!=u;r("toString",u,h)},2472:(e,t,n)=>{n(9843)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},4747:(e,t,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(8533),s=n(8880),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in i)i[u]&&c(r[u]&&r[u].prototype);c(o)},3948:(e,t,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(6992),s=n(8880),c=n(5112),u=c("iterator"),l=c("toStringTag"),h=a.values,f=function(e,t){if(e){if(e[u]!==h)try{s(e,u,h)}catch(t){e[u]=h}if(e[l]||s(e,l,t),i[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var d in i)f(r[d]&&r[d].prototype,d);f(o,"DOMTokenList")},6815:(e,t,n)=>{var r=n(2109),i=n(7854),o=n(7152)(i.setInterval,!0);r({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},8417:(e,t,n)=>{var r=n(2109),i=n(7854),o=n(7152)(i.setTimeout,!0);r({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},2564:(e,t,n)=>{n(6815),n(8417)},452:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],h=[],f=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var v=e[n],g=e[v],m=e[g],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,u[n]=y,y=16843009*m^65537*g^257*v^16843008*n,l[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,f[p]=y<<8|y>>>24,d[p]=y,n?(n=v^e[e[e[m^v]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=t[a]:(u=o[a-1],a%n?n>6&&a%n==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/n|0]<<24),o[a]=o[a-n]^u);for(var s=this._invKeySchedule=[],c=0;c<r;c++){if(a=r-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^h[i[u>>>16&255]]^f[i[u>>>8&255]]^d[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var c=this._nRounds,u=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<c;p++){var v=r[u>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&f]^n[d++],g=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&u]^n[d++],m=r[h>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&l]^n[d++],y=r[f>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&h]^n[d++];u=v,l=g,h=m,f=y}v=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&f])^n[d++],g=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^n[d++],m=(s[h>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^n[d++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^n[d++],e[t]=v,e[t+1]=g,e[t+2]=m,e[t+3]=y},keySize:8});e.AES=t._createHelper(v)}(),r.AES)},5109:function(e,t,n){var r;e.exports=(r=n(8249),n(888),void(r.lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc,c=(s.Utf8,s.Base64),u=t.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,n){this.cfg=this.cfg.extend(n),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:m}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),h=(n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),f=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}}),d=h.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<r;a++)t[n+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var c=o.create(a,r);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},v=(n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.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}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(c)},parse:function(e){var t,n=c.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=u.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,v.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=m.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,m.decrypt.call(this,e,t,i.key,r)}})}()))},8249:function(e,t,n){var r;e.exports=(r=r||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!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(2480)}catch(e){}var i=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.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},s=a.lib={},c=s.Base={extend:function(e){var t=o(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=s.WordArray=c.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new u.init(t,e)}}),l=a.enc={},h=l.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.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 h=0;h<c;h+=a)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(s.Hasher=p.extend({cfg:c.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,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new v.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),r)},8269:function(e,t,n){var r;e.exports=(r=n(8249),function(){var e=r,t=e.lib.WordArray;function n(e,n,r){for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;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<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);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+/="}}(),r.enc.Base64)},3786:function(e,t,n){var r;e.exports=(r=n(8249),function(){var e=r,t=e.lib.WordArray;function n(e,n,r){for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c<r;c++)o.push(i.charAt(s>>>6*(3-c)&63));var u=i.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e,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 c=e.indexOf(s);-1!==c&&(r=c)}return n(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)},298:function(e,t,n){var r;e.exports=(r=n(8249),function(){var e=r,t=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,n=e.sigBytes,r=[],i=0;i<n;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i<n;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},888:function(e,t,n){var r,i,o,a,s,c,u,l;e.exports=(l=n(8249),n(2783),n(9824),i=(r=l).lib,o=i.Base,a=i.WordArray,s=r.algo,c=s.MD5,u=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,c=r.keySize,u=r.iterations;s.length<c;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var l=1;l<u;l++)n=i.finalize(n),i.reset();o.concat(n)}return o.sigBytes=4*c,o}}),r.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},l.EvpKDF)},2209:function(e,t,n){var r,i,o,a;e.exports=(a=n(8249),n(5109),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},a.format.Hex)},9824:function(e,t,n){var r,i,o,a;e.exports=(r=n(8249),o=(i=r).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,c=o.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=r,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,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},1354:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),n(4433),n(298),n(8269),n(3786),n(8214),n(2783),n(2153),n(7792),n(34),n(7460),n(3327),n(706),n(9824),n(2112),n(888),n(5109),n(8568),n(4242),n(9968),n(7660),n(1148),n(3615),n(2807),n(1077),n(6475),n(6991),n(2209),n(452),n(4253),n(1857),n(4454),n(3974),r)},4433:function(e,t,n){var r;e.exports=(r=n(8249),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=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 n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},8214:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],v=e[t+4],g=e[t+5],m=e[t+6],y=e[t+7],b=e[t+8],S=e[t+9],w=e[t+10],E=e[t+11],x=e[t+12],C=e[t+13],k=e[t+14],O=e[t+15],I=o[0],A=o[1],_=o[2],T=o[3];I=u(I,A,_,T,a,7,s[0]),T=u(T,I,A,_,c,12,s[1]),_=u(_,T,I,A,d,17,s[2]),A=u(A,_,T,I,p,22,s[3]),I=u(I,A,_,T,v,7,s[4]),T=u(T,I,A,_,g,12,s[5]),_=u(_,T,I,A,m,17,s[6]),A=u(A,_,T,I,y,22,s[7]),I=u(I,A,_,T,b,7,s[8]),T=u(T,I,A,_,S,12,s[9]),_=u(_,T,I,A,w,17,s[10]),A=u(A,_,T,I,E,22,s[11]),I=u(I,A,_,T,x,7,s[12]),T=u(T,I,A,_,C,12,s[13]),_=u(_,T,I,A,k,17,s[14]),I=l(I,A=u(A,_,T,I,O,22,s[15]),_,T,c,5,s[16]),T=l(T,I,A,_,m,9,s[17]),_=l(_,T,I,A,E,14,s[18]),A=l(A,_,T,I,a,20,s[19]),I=l(I,A,_,T,g,5,s[20]),T=l(T,I,A,_,w,9,s[21]),_=l(_,T,I,A,O,14,s[22]),A=l(A,_,T,I,v,20,s[23]),I=l(I,A,_,T,S,5,s[24]),T=l(T,I,A,_,k,9,s[25]),_=l(_,T,I,A,p,14,s[26]),A=l(A,_,T,I,b,20,s[27]),I=l(I,A,_,T,C,5,s[28]),T=l(T,I,A,_,d,9,s[29]),_=l(_,T,I,A,y,14,s[30]),I=h(I,A=l(A,_,T,I,x,20,s[31]),_,T,g,4,s[32]),T=h(T,I,A,_,b,11,s[33]),_=h(_,T,I,A,E,16,s[34]),A=h(A,_,T,I,k,23,s[35]),I=h(I,A,_,T,c,4,s[36]),T=h(T,I,A,_,v,11,s[37]),_=h(_,T,I,A,y,16,s[38]),A=h(A,_,T,I,w,23,s[39]),I=h(I,A,_,T,C,4,s[40]),T=h(T,I,A,_,a,11,s[41]),_=h(_,T,I,A,p,16,s[42]),A=h(A,_,T,I,m,23,s[43]),I=h(I,A,_,T,S,4,s[44]),T=h(T,I,A,_,x,11,s[45]),_=h(_,T,I,A,O,16,s[46]),I=f(I,A=h(A,_,T,I,d,23,s[47]),_,T,a,6,s[48]),T=f(T,I,A,_,y,10,s[49]),_=f(_,T,I,A,k,15,s[50]),A=f(A,_,T,I,g,21,s[51]),I=f(I,A,_,T,x,6,s[52]),T=f(T,I,A,_,p,10,s[53]),_=f(_,T,I,A,w,15,s[54]),A=f(A,_,T,I,c,21,s[55]),I=f(I,A,_,T,b,6,s[56]),T=f(T,I,A,_,O,10,s[57]),_=f(_,T,I,A,m,15,s[58]),A=f(A,_,T,I,C,21,s[59]),I=f(I,A,_,T,v,6,s[60]),T=f(T,I,A,_,E,10,s[61]),_=f(_,T,I,A,d,15,s[62]),A=f(A,_,T,I,S,21,s[63]),o[0]=o[0]+I|0,o[1]=o[1]+A|0,o[2]=o[2]+_|0,o[3]=o[3]+T|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=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 u(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},8568:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=o}}),e}(),r.mode.CFB)},9968:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(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 c=0;c<i;c++)e[t+c]^=s[c]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)},4242:function(e,t,n){var r,i,o;e.exports=(o=n(8249),n(5109),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=a[s]}}),r.Decryptor=i,r),o.mode.CTR)},1148:function(e,t,n){var r,i;e.exports=(i=n(8249),n(5109),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),i.mode.ECB)},7660:function(e,t,n){var r,i,o;e.exports=(o=n(8249),n(5109),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)e[t+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},3615:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+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}},r.pad.Ansix923)},2807:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},1077:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},6991:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(e,t,n){var r,i,o,a,s,c,u,l,h;e.exports=(h=n(8249),n(2783),n(9824),i=(r=h).lib,o=i.Base,a=i.WordArray,s=r.algo,c=s.SHA1,u=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=u.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,c=o.words,l=n.keySize,h=n.iterations;s.length<l;){var f=r.update(t).finalize(o);r.reset();for(var d=f.words,p=d.length,v=f,g=1;g<h;g++){v=r.finalize(v),r.reset();for(var m=v.words,y=0;y<p;y++)d[y]^=m[y]}i.concat(f),c[0]++}return i.sigBytes=4*l,i}}),r.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)},h.PBKDF2)},3974:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,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],r=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++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(r[0]^=u,r[1]^=h,r[2]^=l,r[3]^=f,r[4]^=u,r[5]^=h,r[6]^=l,r[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];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,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}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=t._createHelper(s)}(),r.RabbitLegacy)},4454:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);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],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,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(i[0]^=u,i[1]^=h,i[2]^=l,i[3]^=f,i[4]^=u,i[5]^=h,i[6]^=l,i[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];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,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}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=t._createHelper(s)}(),r.Rabbit)},1857:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}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,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._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=t._createHelper(a)}(),r.RC4)},706:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,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]),c=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]),u=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]),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]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,S,w,E,x,C,k,O,I,A=this._hash.words,_=h.words,T=f.words,R=s.words,D=c.words,N=u.words,L=l.words;for(E=o=A[0],x=a=A[1],C=d=A[2],k=S=A[3],O=w=A[4],n=0;n<80;n+=1)I=o+e[t+R[n]]|0,I+=n<16?p(a,d,S)+_[0]:n<32?v(a,d,S)+_[1]:n<48?g(a,d,S)+_[2]:n<64?m(a,d,S)+_[3]:y(a,d,S)+_[4],I=(I=b(I|=0,N[n]))+w|0,o=w,w=S,S=b(d,10),d=a,a=I,I=E+e[t+D[n]]|0,I+=n<16?y(x,C,k)+T[0]:n<32?m(x,C,k)+T[1]:n<48?g(x,C,k)+T[2]:n<64?v(x,C,k)+T[3]:p(x,C,k)+T[4],I=(I=b(I|=0,L[n]))+O|0,E=O,O=k,k=b(C,10),C=x,x=I;I=A[1]+d+k|0,A[1]=A[2]+S+O|0,A[2]=A[3]+w+E|0,A[3]=A[4]+o+x|0,A[4]=A[0]+a+C|0,A[0]=I},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>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=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function v(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function m(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},2783:function(e,t,n){var r,i,o,a,s,c,u,l;e.exports=(l=n(8249),i=(r=l).lib,o=i.WordArray,a=i.Hasher,s=r.algo,c=[],u=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=0;u<80;u++){if(u<16)c[u]=0|e[t+u];else{var l=c[u-3]^c[u-8]^c[u-14]^c[u-16];c[u]=l<<1|l>>>31}var h=(r<<5|r>>>27)+s+c[u];h+=u<20?1518500249+(i&o|~i&a):u<40?1859775393+(i^o^a):u<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(u),r.HmacSHA1=a._createHmacHelper(u),l.SHA1)},7792:function(e,t,n){var r,i,o,a,s,c;e.exports=(c=n(8249),n(2153),i=(r=c).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),c.SHA224)},2153:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),c[i]=n(e.pow(r,1/3)),i++),r++}();var u=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=0;d<64;d++){if(d<16)u[d]=0|e[t+d];else{var p=u[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[d-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=v+u[d-7]+m+u[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),S=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&h)+c[d]+u[d];f=h,h=l,l=s,s=a+S|0,a=o,o=i,i=r,r=S+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},3327:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,c=[],u=[],l=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,f=0;f<7;f++){if(1&i){var d=(1<<f)-1;d<32?h^=1<<d:s^=1<<d-32}128&i?i=i<<1^113:i<<=1}l[o]=a.create(s,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=a.create()}();var f=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 n=this._state,r=this.blockSize/2,i=0;i<r;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),(A=n[i]).high^=a,A.low^=o}for(var s=0;s<24;s++){for(var f=0;f<5;f++){for(var d=0,p=0,v=0;v<5;v++)d^=(A=n[f+5*v]).high,p^=A.low;var g=h[f];g.high=d,g.low=p}for(f=0;f<5;f++){var m=h[(f+4)%5],y=h[(f+1)%5],b=y.high,S=y.low;for(d=m.high^(b<<1|S>>>31),p=m.low^(S<<1|b>>>31),v=0;v<5;v++)(A=n[f+5*v]).high^=d,A.low^=p}for(var w=1;w<25;w++){var E=(A=n[w]).high,x=A.low,C=c[w];C<32?(d=E<<C|x>>>32-C,p=x<<C|E>>>32-C):(d=x<<C-32|E>>>64-C,p=E<<C-32|x>>>64-C);var k=h[u[w]];k.high=d,k.low=p}var O=h[0],I=n[0];for(O.high=I.high,O.low=I.low,f=0;f<5;f++)for(v=0;v<5;v++){var A=n[w=f+5*v],_=h[w],T=h[(f+1)%5+5*v],R=h[(f+2)%5+5*v];A.high=_.high^~T.high&R.high,A.low=_.low^~T.low&R.low}A=n[0];var D=l[s];A.high^=D.high,A.low^=D.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],l=0;l<c;l++){var h=a[l],f=h.high,d=h.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u.push(d),u.push(f)}return new i.init(u,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(f),t.HmacSHA3=o._createHmacHelper(f)}(Math),r.SHA3)},7460:function(e,t,n){var r,i,o,a,s,c,u,l;e.exports=(l=n(8249),n(4938),n(34),i=(r=l).x64,o=i.Word,a=i.WordArray,s=r.algo,c=s.SHA512,u=s.SHA384=c.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=c._createHelper(u),r.HmacSHA384=c._createHmacHelper(u),l.SHA384)},34:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var c=[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)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var l=a.SHA512=t.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 n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=r.high,p=r.low,v=i.high,g=i.low,m=o.high,y=o.low,b=a.high,S=a.low,w=s.high,E=s.low,x=l.high,C=l.low,k=h.high,O=h.low,I=f.high,A=f.low,_=d,T=p,R=v,D=g,N=m,L=y,M=b,P=S,j=w,B=E,U=x,G=C,K=k,H=O,F=I,V=A,Y=0;Y<80;Y++){var z,W,X=u[Y];if(Y<16)W=X.high=0|e[t+2*Y],z=X.low=0|e[t+2*Y+1];else{var q=u[Y-15],$=q.high,Z=q.low,J=($>>>1|Z<<31)^($>>>8|Z<<24)^$>>>7,Q=(Z>>>1|$<<31)^(Z>>>8|$<<24)^(Z>>>7|$<<25),ee=u[Y-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=u[Y-7],ae=oe.high,se=oe.low,ce=u[Y-16],ue=ce.high,le=ce.low;W=(W=(W=J+ae+((z=Q+se)>>>0<Q>>>0?1:0))+re+((z+=ie)>>>0<ie>>>0?1:0))+ue+((z+=le)>>>0<le>>>0?1:0),X.high=W,X.low=z}var he,fe=j&U^~j&K,de=B&G^~B&H,pe=_&R^_&N^R&N,ve=T&D^T&L^D&L,ge=(_>>>28|T<<4)^(_<<30|T>>>2)^(_<<25|T>>>7),me=(T>>>28|_<<4)^(T<<30|_>>>2)^(T<<25|_>>>7),ye=(j>>>14|B<<18)^(j>>>18|B<<14)^(j<<23|B>>>9),be=(B>>>14|j<<18)^(B>>>18|j<<14)^(B<<23|j>>>9),Se=c[Y],we=Se.high,Ee=Se.low,xe=F+ye+((he=V+be)>>>0<V>>>0?1:0),Ce=me+ve;F=K,V=H,K=U,H=G,U=j,G=B,j=M+(xe=(xe=(xe=xe+fe+((he+=de)>>>0<de>>>0?1:0))+we+((he+=Ee)>>>0<Ee>>>0?1:0))+W+((he+=z)>>>0<z>>>0?1:0))+((B=P+he|0)>>>0<P>>>0?1:0)|0,M=N,P=L,N=R,L=D,R=_,D=T,_=xe+(ge+pe+(Ce>>>0<me>>>0?1:0))+((T=he+Ce|0)>>>0<he>>>0?1:0)|0}p=r.low=p+T,r.high=d+_+(p>>>0<T>>>0?1:0),g=i.low=g+D,i.high=v+R+(g>>>0<D>>>0?1:0),y=o.low=y+L,o.high=m+N+(y>>>0<L>>>0?1:0),S=a.low=S+P,a.high=b+M+(S>>>0<P>>>0?1:0),E=s.low=E+B,s.high=w+j+(E>>>0<B>>>0?1:0),C=l.low=C+G,l.high=x+U+(C>>>0<G>>>0?1:0),O=h.low=O+H,h.high=k+K+(O>>>0<H>>>0?1:0),A=f.low=A+V,f.high=I+F+(A>>>0<V>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),r.SHA512)},4253:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib,n=t.WordArray,i=t.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],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{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],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(n=0;n<24;n++)u[n/6|0]|=t[(s[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=t[28+(s[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[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,n){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function d(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=i._createHelper(h);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=h.createEncryptor(n.create(t)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.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)}(),r.TripleDES)},4938:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return o.create(n,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}})}(),r)},3729:function(e,t){var n,r,i;r=[],void 0===(i="function"==typeof(n=function(){return function e(t,n,r){var i,o,a=window,s="application/octet-stream",c=r||s,u=t,l=!n&&!r&&u,h=document.createElement("a"),f=function(e){return String(e)},d=a.Blob||a.MozBlob||a.WebKitBlob||f,p=n||"download";if(d=d.call?d.bind(a):Blob,"true"===String(this)&&(c=(u=[u,c])[0],u=u[1]),l&&l.length<2048&&(p=l.split("/").pop().split("?")[0],h.href=l,-1!==h.href.indexOf(l))){var v=new XMLHttpRequest;return v.open("GET",l,!0),v.responseType="blob",v.onload=function(t){e(t.target.response,p,s)},setTimeout((function(){v.send()}),0),v}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&d!==f))return navigator.msSaveBlob?navigator.msSaveBlob(b(u),p):S(u);c=(u=b(u)).type||s}else if(/([\x80-\xff])/.test(u)){for(var g=0,m=new Uint8Array(u.length),y=m.length;g<y;++g)m[g]=u.charCodeAt(g);u=new d([m],{type:c})}function b(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),i=r.length,o=0,a=new Uint8Array(i);o<i;++o)a[o]=r.charCodeAt(o);return new d([a],{type:n})}function S(e,t){if("download"in h)return h.href=e,h.setAttribute("download",p),h.className="download-js-link",h.innerHTML="downloading...",h.style.display="none",document.body.appendChild(h),setTimeout((function(){h.click(),document.body.removeChild(h),!0===t&&setTimeout((function(){a.URL.revokeObjectURL(h.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(i=u instanceof d?u:new d([u],{type:c}),navigator.msSaveBlob)return navigator.msSaveBlob(i,p);if(a.URL)S(a.URL.createObjectURL(i),!0);else{if("string"==typeof i||i.constructor===f)try{return S("data:"+c+";base64,"+a.btoa(i))}catch(e){return S("data:"+c+","+encodeURIComponent(i))}(o=new FileReader).onload=function(e){S(this.result)},o.readAsDataURL(i)}return!0}})?n.apply(t,r):n)||(e.exports=i)},3792:function(e,t){!function(e){"use strict";var t="0123456789abcdefghijklmnopqrstuvwxyz";function n(e){return t.charAt(e)}function r(e,t){return e&t}function i(e,t){return e|t}function o(e,t){return e^t}function a(e,t){return e&~t}function s(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function c(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="=";function h(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=u.charAt(n>>6)+u.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=u.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=u.charAt(n>>2)+u.charAt((3&n)<<4));(3&r.length)>0;)r+=l;return r}function f(e){var t,r="",i=0,o=0;for(t=0;t<e.length&&e.charAt(t)!=l;++t){var a=u.indexOf(e.charAt(t));a<0||(0==i?(r+=n(a>>2),o=3&a,i=1):1==i?(r+=n(o<<2|a>>4),o=15&a,i=2):2==i?(r+=n(o),r+=n(a>>2),o=3&a,i=3):(r+=n(o<<2|a>>4),r+=n(15&a),i=0))}return 1==i&&(r+=n(o<<2)),r}var d,p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},p(e,t)};function v(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var g,m={decode:function(e){var t;if(void 0===d){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(d={},t=0;t<16;++t)d[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)d[n.charAt(t)]=t;for(t=0;t<r.length;++t)d[r.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=d[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},y={decode:function(e){var t;if(void 0===g){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="= \f\n\r\t \u2028\u2029";for(g=Object.create(null),t=0;t<64;++t)g[n.charAt(t)]=t;for(t=0;t<r.length;++t)g[r.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=g[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);o|=s,++a>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=255&o,o=0,a=0):o<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=y.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return y.decode(e)}},b=1e13,S=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*e+t)<b?t=0:r-=(t=0|r/b)*b,i[n]=r;t>0&&(i[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,i=r.length;for(t=0;t<i;++t)(n=r[t]-e)<0?(n+=b,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(b+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*b+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),w="…",E=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,x=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function C(e,t){return e.length>t&&(e=e.substring(0,t)+w),e}var k,O=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset "+e+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,i="",o=e;o<t;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),i=(n?E:x).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=r>127,o=i?255:0,a="";r==o&&++e<t;)r=this.get(e);if(0==(n=t-e))return i?-1:0;if(n>4){for(a=r,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var s=new S(r),c=e+1;c<t;++c)s.mulAdd(256,this.get(c));return a+s.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),c=a==t-1?r:0,u=7;u>=c;--u)o+=s>>u&1?"1":"0";if(o.length>n)return i+C(o,n)}return i+o},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return C(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return r>n&&(i+=w),i},e.prototype.parseOID=function(e,t,n){for(var r="",i=new S,o=0,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===r)if((i=i.simplify())instanceof S)i.sub(80),r="2."+i.toString();else{var c=i<80?i<40?0:1:2;r=c+"."+(i-40*c)}else r+="."+i.toString();if(r.length>n)return C(r,n);i=new S,o=0}}return o>0&&(r+=".incomplete"),r},e}(),I=function(){function e(e,t,n,r,i){if(!(r instanceof A))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return C(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return C(this.stream.parseStringISO(t,t+n),e);case 30:return C(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},e.decode=function(t){var n;n=t instanceof O?t:new O(t,0);var r=new O(n),i=new A(n),o=e.decodeLength(n),a=n.pos,s=a-r.pos,c=null,u=function(){var t=[];if(null!==o){for(var r=a+o;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(n);if(i.tag.isEOC())break;t[t.length]=i}o=a-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)c=u();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var l=0;l<c.length;++l)if(c[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){c=null}if(null===c){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new e(r,s,o,i,c)},e}(),A=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!=(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new S;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),_=!0,T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],R=(1<<26)/T[T.length-1],D=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,i=(1<<t)-1,o=!1,a="",s=this.t,c=this.DB-s*this.DB%t;if(s-- >0)for(c<this.DB&&(r=this[s]>>c)>0&&(o=!0,a=n(r));s>=0;)c<t?(r=(this[s]&(1<<c)-1)<<t-c,r|=this[--s]>>(c+=this.DB-t)):(r=this[s]>>(c-=t)&i,c<=0&&(c+=this.DB,--s)),r>0&&(o=!0),o&&(a+=n(r));return o?a:"0"},e.prototype.negate=function(){var t=j();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+X(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=j();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new L(t):new M(t),this.exp(e,n)},e.prototype.clone=function(){var e=j();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=j();return this.bitwiseTo(e,r,t),t},e.prototype.or=function(e){var t=j();return this.bitwiseTo(e,i,t),t},e.prototype.xor=function(e){var t=j();return this.bitwiseTo(e,o,t),t},e.prototype.andNot=function(e){var t=j();return this.bitwiseTo(e,a,t),t},e.prototype.not=function(){for(var e=j(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=j();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=j();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+s(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=c(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,i)},e.prototype.clearBit=function(e){return this.changeBit(e,a)},e.prototype.flipBit=function(e){return this.changeBit(e,o)},e.prototype.add=function(e){var t=j();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=j();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=j();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=j();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=j();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=j(),n=j();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),o=W(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new L(t):t.isEven()?new P(t):new M(t);var a=[],s=3,c=n-1,u=(1<<n)-1;if(a[1]=r.convert(this),n>1){var l=j();for(r.sqrTo(a[1],l);s<=u;)a[s]=j(),r.mulTo(l,a[s-2],a[s]),s+=2}var h,f,d=e.t-1,p=!0,v=j();for(i=X(e[d])-1;d>=0;){for(i>=c?h=e[d]>>i-c&u:(h=(e[d]&(1<<i+1)-1)<<c-i,d>0&&(h|=e[d-1]>>this.DB+i-c)),s=n;0==(1&h);)h>>=1,--s;if((i-=s)<0&&(i+=this.DB,--d),p)a[h].copyTo(o),p=!1;else{for(;s>1;)r.sqrTo(o,v),r.sqrTo(v,o),s-=2;s>0?r.sqrTo(o,v):(f=o,o=v,v=f),r.mulTo(v,a[h],o)}for(;d>=0&&0==(e[d]&1<<i);)r.sqrTo(o,v),f=o,o=v,v=f,--i<0&&(i=this.DB-1,--d)}return r.revert(o)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),i=this.clone(),o=W(1),a=W(0),s=W(0),c=W(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(t,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(s,o),a.subTo(c,a)):(i.subTo(r,i),n&&s.subTo(o,s),c.subTo(a,c))}return 0!=i.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},e.prototype.pow=function(e){return this.exp(e,new N)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=T[T.length-1]){for(t=0;t<T.length;++t)if(n[0]==T[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<T.length;){for(var r=T[t],i=t+1;i<T.length&&r<R;)r*=T[i++];for(r=n.modInt(r);t<i;)if(r%T[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var s=8==r?255&+t[i]:z(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&+t[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)t[s+o+1]=this[s]>>r|a,a=(this[s]&i)<<n;for(s=o-1;s>=0;--s)t[s]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),i=t.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=j());var a=j(),s=this.s,c=t.s,u=this.DB-X(i[i.t-1]);u>0?(i.lShiftTo(u,a),o.lShiftTo(u,r)):(i.copyTo(a),o.copyTo(r));var l=a.t,h=a[l-1];if(0!=h){var f=h*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,v=1<<this.F2,g=r.t,m=g-l,y=null==n?j():n;for(a.dlShiftTo(m,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),e.ONE.dlShiftTo(l,y),y.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--m>=0;){var b=r[--g]==h?this.DM:Math.floor(r[g]*d+(r[g-1]+v)*p);if((r[g]+=a.am(0,b,r,m,0,l))<b)for(a.dlShiftTo(m,y),r.subTo(y,r);r[g]<--b;)r.subTo(y,r)}null!=n&&(r.drShiftTo(l,n),s!=c&&e.ZERO.subTo(n,n)),r.t=l,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=j(),i=j(),o=n.convert(this),a=X(t)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(t&1<<a)>0)n.mulTo(i,o,r);else{var s=r;r=i,i=s}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=W(n),i=j(),o=j(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(e).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,s=0,c=0;c<t.length;++c){var u=z(t,c);u<0?"-"==t.charAt(c)&&0==this.signum()&&(o=!0):(s=n*s+u,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=[],a=7&t;o.length=1+(t>>3),n.nextBytes(o),a>0?o[0]&=(1<<a)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(t=t+1>>1)>T.length&&(t=T.length);for(var o=j(),a=0;a<t;++a){o.fromInt(T[Math.floor(Math.random()*T.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(n)){for(var c=1;c++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=j();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)t(n);else{o<a&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(s,0):(a>0&&r.lShiftTo(a,r),setTimeout((function(){t(r)}),0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,n,r,o){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),i,this),this.isEven()&&this.dAddOffset(1,0);var a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>t&&a.subTo(e.ONE.shiftLeft(t-1),a),a.isProbablePrime(n)?setTimeout((function(){o()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var c=[],u=7&t;c.length=1+(t>>3),n.nextBytes(c),u>0?c[0]&=(1<<u)-1:c[0]=0,this.fromString(c,256)}},e}(),N=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),L=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),M=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=j();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(D.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=j();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),P=function(){function e(e){this.m=e,this.r2=j(),this.q3=j(),D.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=j();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function j(){return new D(null)}function B(e,t){return new D(e,t)}function U(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i}function G(e,t,n,r,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,l=s*c+u*a;i=((c=a*c+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+s*u+(i>>>30),n[r++]=1073741823&c}return i}function K(e,t,n,r,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,l=s*c+u*a;i=((c=a*c+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+s*u,n[r++]=268435455&c}return i}_&&"Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=G,k=30):_&&"Netscape"!=navigator.appName?(D.prototype.am=U,k=26):(D.prototype.am=K,k=28),D.prototype.DB=k,D.prototype.DM=(1<<k)-1,D.prototype.DV=1<<k;var H=52;D.prototype.FV=Math.pow(2,H),D.prototype.F1=H-k,D.prototype.F2=2*k-H;var F,V,Y=[];for(F="0".charCodeAt(0),V=0;V<=9;++V)Y[F++]=V;for(F="a".charCodeAt(0),V=10;V<36;++V)Y[F++]=V;for(F="A".charCodeAt(0),V=10;V<36;++V)Y[F++]=V;function z(e,t){var n=Y[e.charCodeAt(t)];return null==n?-1:n}function W(e){var t=j();return t.fromInt(e),t}function X(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}D.ZERO=W(0),D.ONE=W(1);var q=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function $(){return new q}var Z,J,Q=256,ee=null;if(null==ee){ee=[],J=0;var te=void 0;if(window.crypto&&window.crypto.getRandomValues){var ne=new Uint32Array(256);for(window.crypto.getRandomValues(ne),te=0;te<ne.length;++te)ee[J++]=255&ne[te]}var re=function(e){if(this.count=this.count||0,this.count>=256||J>=Q)window.removeEventListener?window.removeEventListener("mousemove",re,!1):window.detachEvent&&window.detachEvent("onmousemove",re);else try{var t=e.x+e.y;ee[J++]=255&t,this.count+=1}catch(e){}};window.addEventListener?window.addEventListener("mousemove",re,!1):window.attachEvent&&window.attachEvent("onmousemove",re)}function ie(){if(null==Z){for(Z=$();J<Q;){var e=Math.floor(65536*Math.random());ee[J++]=255&e}for(Z.init(ee),J=0;J<ee.length;++J)ee[J]=0;J=0}return Z.next()}var oe=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=ie()},e}();function ae(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return B("0001"+r+"00"+e,16)}function se(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new oe,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new D(n)}var ce=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=B(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=se(e,this.n.bitLength()+7>>3);if(null==t)return null;var n=this.doPublic(t);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},e.prototype.encryptLong=function(e){var t=this,n=(this.n.bitLength()+7>>3)-11;try{var r="";return e.length>n?(e.match(/.{1,117}/g).forEach((function(e){var n=t.encrypt(e);r+=n})),h(r)):h(this.encrypt(e))}catch(e){return!1}},e.prototype.decryptLong=function(e){var t=this,n=this.n.bitLength()+7>>3;e=f(e);try{if(e.length>n){var r="";return e.match(/.{1,256}/g).forEach((function(e){var n=t.decrypt(e);r+=n})),r}return this.decrypt(e)}catch(e){return!1}},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=B(e,16),this.e=parseInt(t,16),this.d=B(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,i,o,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=B(e,16),this.e=parseInt(t,16),this.d=B(n,16),this.p=B(r,16),this.q=B(i,16),this.dmp1=B(o,16),this.dmq1=B(a,16),this.coeff=B(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new oe,r=e>>1;this.e=parseInt(t,16);for(var i=new D(t,16);;){for(;this.p=new D(e-r,1,n),0!=this.p.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(r,1,n),0!=this.q.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),c=a.multiply(s);if(0==c.gcd(i).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=B(e,16),n=this.doPrivate(t);return null==n?null:ue(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new oe,i=e>>1;this.e=parseInt(t,16);var o=new D(t,16),a=this,s=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(D.ONE),r=a.q.subtract(D.ONE),i=t.multiply(r);0==i.gcd(o).compareTo(D.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout((function(){n()}),0)):setTimeout(s,0)},c=function(){a.q=j(),a.q.fromNumberAsync(i,1,r,(function(){a.q.subtract(D.ONE).gcda(o,(function(e){0==e.compareTo(D.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(c,0)}))}))},u=function(){a.p=j(),a.p.fromNumberAsync(e-i,1,r,(function(){a.p.subtract(D.ONE).gcda(o,(function(e){0==e.compareTo(D.ONE)&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,n){var r=ae(he(n)+t(e).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},e.prototype.verify=function(e,t,n){var r=B(t,16),i=this.doPublic(r);return null==i?null:fe(i.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();function ue(e,t){for(var n=e.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}var le={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function he(e){return le[e]||""}function fe(e){for(var t in le)if(le.hasOwnProperty(t)){var n=le[t],r=n.length;if(e.substr(0,r)==n)return e.substr(r)}return e}var de={};de.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var i;for(i in n)e.prototype[i]=n[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(e,t){for(i=0;i<a.length;i+=1){var n=a[i],r=t[n];"function"==typeof r&&r!=Object.prototype[n]&&(e[n]=r)}})}catch(e){}o(e.prototype,n)}}};var pe={};void 0!==pe.asn1&&pe.asn1||(pe.asn1={}),pe.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";t=new D(r,16).xor(e).add(D.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=pe.asn1,n=t.DERBoolean,r=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,c=t.DEREnumerated,u=t.DERUTF8String,l=t.DERNumericString,h=t.DERPrintableString,f=t.DERTeletexString,d=t.DERIA5String,p=t.DERUTCTime,v=t.DERGeneralizedTime,g=t.DERSequence,m=t.DERSet,y=t.DERTaggedObject,b=t.ASN1Util.newObject,S=Object.keys(e);if(1!=S.length)throw"key of param shall be only one.";var w=S[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new n(e[w]);if("int"==w)return new r(e[w]);if("bitstr"==w)return new i(e[w]);if("octstr"==w)return new o(e[w]);if("null"==w)return new a(e[w]);if("oid"==w)return new s(e[w]);if("enum"==w)return new c(e[w]);if("utf8str"==w)return new u(e[w]);if("numstr"==w)return new l(e[w]);if("prnstr"==w)return new h(e[w]);if("telstr"==w)return new f(e[w]);if("ia5str"==w)return new d(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new v(e[w]);if("seq"==w){for(var E=e[w],x=[],C=0;C<E.length;C++){var k=b(E[C]);x.push(k)}return new g({array:x})}if("set"==w){for(E=e[w],x=[],C=0;C<E.length;C++)k=b(E[C]),x.push(k);return new m({array:x})}if("tag"==w){var O=e[w];if("[object Array]"===Object.prototype.toString.call(O)&&3==O.length){var I=b(O[2]);return new y({tag:O[0],explicit:O[1],obj:I})}var A={};if(void 0!==O.explicit&&(A.explicit=O.explicit),void 0!==O.tag&&(A.tag=O.tag),void 0===O.obj)throw"obj shall be specified for 'tag'.";return A.obj=b(O.obj),new y(A)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},pe.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);r+=o.substr(1,7),"0"==o.substr(0,1)&&(t=t+"."+new D(r,2).toString(10),r="")}return t},pe.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new D(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);return r},pe.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var t=this.hV.length/2,n=t.toString(16);if(n.length%2==1&&(n="0"+n),t<128)return n;var r=n.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+n},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},pe.asn1.DERAbstractString=function(e){pe.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},de.lang.extend(pe.asn1.DERAbstractString,pe.asn1.ASN1Object),pe.asn1.DERAbstractTime=function(e){pe.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var r=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var s=i.getMilliseconds();if(0!=s){var c=r(String(s),3);a=a+"."+(c=c.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,r,i,o){var a=new Date(Date.UTC(e,t-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},de.lang.extend(pe.asn1.DERAbstractTime,pe.asn1.ASN1Object),pe.asn1.DERAbstractStructured=function(e){pe.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},de.lang.extend(pe.asn1.DERAbstractStructured,pe.asn1.ASN1Object),pe.asn1.DERBoolean=function(){pe.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},de.lang.extend(pe.asn1.DERBoolean,pe.asn1.ASN1Object),pe.asn1.DERInteger=function(e){pe.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new D(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},de.lang.extend(pe.asn1.DERInteger,pe.asn1.ASN1Object),pe.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=pe.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}pe.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var i=e.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},de.lang.extend(pe.asn1.DERBitString,pe.asn1.ASN1Object),pe.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=pe.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}pe.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},de.lang.extend(pe.asn1.DEROctetString,pe.asn1.DERAbstractString),pe.asn1.DERNull=function(){pe.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},de.lang.extend(pe.asn1.DERNull,pe.asn1.ASN1Object),pe.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new D(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};pe.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=pe.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},de.lang.extend(pe.asn1.DERObjectIdentifier,pe.asn1.ASN1Object),pe.asn1.DEREnumerated=function(e){pe.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new D(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},de.lang.extend(pe.asn1.DEREnumerated,pe.asn1.ASN1Object),pe.asn1.DERUTF8String=function(e){pe.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},de.lang.extend(pe.asn1.DERUTF8String,pe.asn1.DERAbstractString),pe.asn1.DERNumericString=function(e){pe.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},de.lang.extend(pe.asn1.DERNumericString,pe.asn1.DERAbstractString),pe.asn1.DERPrintableString=function(e){pe.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},de.lang.extend(pe.asn1.DERPrintableString,pe.asn1.DERAbstractString),pe.asn1.DERTeletexString=function(e){pe.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},de.lang.extend(pe.asn1.DERTeletexString,pe.asn1.DERAbstractString),pe.asn1.DERIA5String=function(e){pe.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},de.lang.extend(pe.asn1.DERIA5String,pe.asn1.DERAbstractString),pe.asn1.DERUTCTime=function(e){pe.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},de.lang.extend(pe.asn1.DERUTCTime,pe.asn1.DERAbstractTime),pe.asn1.DERGeneralizedTime=function(e){pe.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},de.lang.extend(pe.asn1.DERGeneralizedTime,pe.asn1.DERAbstractTime),pe.asn1.DERSequence=function(e){pe.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},de.lang.extend(pe.asn1.DERSequence,pe.asn1.DERAbstractStructured),pe.asn1.DERSet=function(e){pe.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},de.lang.extend(pe.asn1.DERSet,pe.asn1.DERAbstractStructured),pe.asn1.DERTaggedObject=function(e){pe.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},de.lang.extend(pe.asn1.DERTaggedObject,pe.asn1.ASN1Object);var ve=function(e){function t(n){var r=e.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return v(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?m.decode(e):y.unarmor(e),i=I.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=B(t,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=B(o,16);var a=i.sub[4].getHexStringValue();this.p=B(a,16);var s=i.sub[5].getHexStringValue();this.q=B(s,16);var c=i.sub[6].getHexStringValue();this.dmp1=B(c,16);var u=i.sub[7].getHexStringValue();this.dmq1=B(u,16);var l=i.sub[8].getHexStringValue();this.coeff=B(l,16)}else{if(2!==i.sub.length)return!1;var h=i.sub[1].sub[0];t=h.sub[0].getHexStringValue(),this.n=B(t,16),n=h.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new pe.asn1.DERInteger({int:0}),new pe.asn1.DERInteger({bigint:this.n}),new pe.asn1.DERInteger({int:this.e}),new pe.asn1.DERInteger({bigint:this.d}),new pe.asn1.DERInteger({bigint:this.p}),new pe.asn1.DERInteger({bigint:this.q}),new pe.asn1.DERInteger({bigint:this.dmp1}),new pe.asn1.DERInteger({bigint:this.dmq1}),new pe.asn1.DERInteger({bigint:this.coeff})]};return new pe.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return h(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new pe.asn1.DERSequence({array:[new pe.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new pe.asn1.DERNull]}),t=new pe.asn1.DERSequence({array:[new pe.asn1.DERInteger({bigint:this.n}),new pe.asn1.DERInteger({int:this.e})]}),n=new pe.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new pe.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return h(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(ce),ge=function(){function e(e){e=e||{},this.default_key_size=parseInt(e.default_key_size,10)||1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ve(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(f(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return h(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptLong=function(e){try{for(var t=this.getKey().encryptLong(e)||"",n=this.getKey().decryptLong(t)||"",r=0,i=/null$/g;i.test(n)&&(r++,t=this.getKey().encryptLong(e)||"",n=this.getKey().decryptLong(t)||"",!(r>10)););return t}catch(e){return!1}},e.prototype.decryptLong=function(e){try{return this.getKey().decryptLong(e)}catch(e){return!1}},e.prototype.sign=function(e,t,n){try{return h(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,f(t),n)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new ve,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version="3.1.4",e}();window.JSEncrypt=ge,e.JSEncrypt=ge,e.default=ge,Object.defineProperty(e,"__esModule",{value:!0})}(t)},5299:(e,t,n)=>{"use strict";var r=n(7798);function i(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},7798:e=>{"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},6401:e=>{var t=Object.prototype.toString;function n(e){return"function"==typeof e.constructor?e.constructor.name:null}e.exports=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var r=typeof e;if("boolean"===r)return"boolean";if("string"===r)return"string";if("number"===r)return"number";if("symbol"===r)return"symbol";if("function"===r)return"GeneratorFunction"===n(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){if(e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(n(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(r=t.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")}},3341:(e,t,n)=>{"use strict";const r=Symbol.prototype.valueOf,i=n(6401);e.exports=function(e,t){switch(i(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return function(e){const t=e.length,n=Buffer.allocUnsafe?Buffer.allocUnsafe(t):Buffer.from(t);return e.copy(n),n}(e);case"symbol":return function(e){return r?Object(r.call(e)):{}}(e);case"arraybuffer":return function(e){const t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}(e);case"regexp":return function(e){const t=void 0!==e.flags?e.flags:/\w+$/.exec(e)||void 0,n=new e.constructor(e.source,t);return n.lastIndex=e.lastIndex,n}(e);case"error":return Object.create(e);default:return e}}},477:e=>{"use strict";e.exports=function(e,t,n,r){var i=self||window;try{try{var o;try{o=new i.Blob([e])}catch(t){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),c=new i[t](s,n);return a.revokeObjectURL(s),c}catch(r){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new i[t](r,n)}}},2480:()=>{},7061:(e,t,n)=>{var r=n(8698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),s=new A(r||[]);return a(o,"_invoke",{value:C(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p={};function v(){}function g(){}function m(){}var y={};h(y,c,(function(){return this}));var b=Object.getPrototypeOf,S=b&&b(b(_([])));S&&S!==n&&o.call(S,c)&&(y=S);var w=m.prototype=v.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,a,s,c){var u=d(e[i],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function _(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return g.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:g,configurable:!0}),g.displayName=h(m,l,"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,m):(e.__proto__=m,h(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},E(x.prototype),h(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new x(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),h(w,l,"Generator"),h(w,c,(function(){return this})),h(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(n){return e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:(e,t,n)=>{var r=n(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{AutoMute:()=>I,CaptureStatus:()=>K,Client:()=>Xr,ConstraintMode:()=>B,ContentMode:()=>w,DeviceKind:()=>A,DeviceManager:()=>xn,ERROR_CODE:()=>J,FacingMode:()=>k,LayoutAvatarType:()=>V,LayoutMode:()=>E,LogLevel:()=>$,LogOperateType:()=>q,Logger:()=>vn,MessageKind:()=>X,MuteReason:()=>O,NetworkQualityLevel:()=>Y,OperateType:()=>S,PermissionType:()=>H,PriorityMode:()=>G,PushType:()=>y,QualityOperateType:()=>z,RTCDirection:()=>W,RecordStatus:()=>C,RecordingState:()=>x,ShareContentStatus:()=>b,SimulcastMode:()=>U,Stream:()=>ei,StreamCurrentType:()=>T,StreamFrameRate:()=>N,StreamKind:()=>P,StreamOrigin:()=>j,StreamResolution:()=>D,StreamResolutionLevel:()=>L,StreamStatus:()=>_,StreamType:()=>R,TemplateType:()=>F,VideoQuality:()=>M,default:()=>ci,detectLocator:()=>Or,getLayoutItemState:()=>Er,getLayoutRotateInfo:()=>Cr,getSendSupportedCodec:()=>kr,getVideoInfoByRotaion:()=>xr});var e=n(4687),t=n.n(e),i=(n(1539),n(8674),n(9601),n(9554),n(4747),n(8309),function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))});n(2419);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.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)?o(e,t):void 0}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||a(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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){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)}function l(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function f(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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,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 g(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 d(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var y,b,S,w,E,x,C,k,O,I,A,_,T,R,D,N,L,M,P,j,B,U,G,K,H,F,V,Y,z,W,X,q,$;n(4812),n(9826),n(4916),n(4723),n(7327),n(6541),n(6699),n(2023),n(3843),n(3710);!function(e){e.CONTENT="CONTENT",e.PIPE="PIPE",e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.VIDEO_AUDIO="VIDEO_AUDIO",e.VIDEO_AUDIO_PIPE="VIDEO_AUDIO_PIPE"}(y||(y={})),function(e){e.ENDED="ENDED",e.STARTING="STARTING",e.PENDING="PENDING"}(b||(b={})),function(e){e.MUTE_AUDIO="muteAudio",e.UNMUTE_AUDIO="unmuteAudio",e.MUTE_VIDEO="muteVideo",e.UNMUTE_VIDEO="unmuteVideo"}(S||(S={})),function(e){e.NONE="NONE",e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.BOTH="BOTH"}(w||(w={})),function(e){e.AUTO="AUTO",e.CUSTOM="CUSTOM"}(E||(E={})),function(e){e.RECORD_STATE_IDLE="RECORD_STATE_IDLE",e.RECORD_STATE_STARTING="RECORD_STATE_STARTING",e.RECORD_STATE_STARTED="RECORD_STATE_STARTED",e.RECORD_STATE_STOPING="RECORD_STATE_STOPING"}(x||(x={})),function(e){e[e.NONE=0]="NONE",e[e.LOCAL_START=1]="LOCAL_START",e[e.REMOTE_STAR=2]="REMOTE_STAR",e[e.REMOTE_PAUSED=3]="REMOTE_PAUSED"}(C||(C={})),function(e){e.FRONT="FRONT",e.BACK="BACK"}(k||(k={})),function(e){e[e.MuteByUser=0]="MuteByUser",e[e.MuteByBWLimit=1]="MuteByBWLimit",e[e.MuteByNoInput=2]="MuteByNoInput",e[e.MuteByConfMgmt=3]="MuteByConfMgmt",e[e.MuteByDeviceDetection=4]="MuteByDeviceDetection",e[e.MuteByPhoneCall=5]="MuteByPhoneCall"}(O||(O={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(I||(I={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(A||(A={})),function(e){e.NORMAL="NORMAL",e.FAILED="FAILED",e.DISABLED="DISABLED",e.UNKNOWN="UNKNOWN"}(_||(_={})),function(e){e.NORMAL="NORMAL",e.NORMAL_VIDEO="NORMAL_VIDEO",e.NORMAL_AUDIO="NORMAL_AUDIO",e.RECEIVE_ONLY="RECEIVE_ONLY",e.FAILED="FAILED",e.UNKNOWN="UNKNOWN"}(T||(T={})),function(e){e.CONTENT="CONTENT",e.PREVIEW="PREVIEW",e.PIPELINE="PIPELINE",e.REMOTE="REMOTE"}(R||(R={})),function(e){e[e.RS90=90]="RS90",e[e.RS180=180]="RS180",e[e.RS360=360]="RS360",e[e.RS720=720]="RS720",e[e.RS1080=1080]="RS1080"}(D||(D={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(N||(N={})),function(e){e[e.LEVEL90=0]="LEVEL90",e[e.LEVEL180=1]="LEVEL180",e[e.LEVEL360=2]="LEVEL360",e[e.LEVEL720=3]="LEVEL720",e[e.LEVEL1080=4]="LEVEL1080"}(L||(L={})),function(e){e[e.LOW=0]="LOW",e[e.NORMAL=1]="NORMAL",e[e.HIGH=2]="HIGH"}(M||(M={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.ALL="ALL"}(P||(P={})),function(e){e.SDK="SDK",e.CUSTOM="CUSTOM"}(j||(j={})),function(e){e.COMMON="COMMON",e.ADVANCED="ADVANCED",e.FAILED="FAILED"}(B||(B={})),function(e){e.MULTI_RES="MULTI_RESOLUTION",e.SCALE_RES="SCALE_RESOLUTION"}(U||(U={})),function(e){e.VERY_LOW="very-low",e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(G||(G={})),function(e){e.CAPTURE="CAPTURE",e.KEEP="KEEP",e.FAILED="FAILED"}(K||(K={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt",e.UNKNOWN="unknown",e.FAILED="failed"}(H||(H={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE"}(F||(F={})),function(e){e[e.NONE=-1]="NONE",e[e.TEXT=0]="TEXT",e[e.IMAGE=1]="IMAGE"}(V||(V={})),function(e){e[e.Bad=1]="Bad",e[e.Poor=2]="Poor",e[e.Good=3]="Good",e[e.Excellent=4]="Excellent"}(Y||(Y={})),function(e){e.STATS="STATS",e.INIT="INIT",e.DESTROY="DESTROY",e.STATS_VIDEO_RECEIVER="STATS_VIDEO_RECEIVER",e.STATS_AUDIO_RECEIVER="STATS_AUDIO_RECEIVER",e.STATS_SENDER="STATS_SENDER",e.INTERNALS="INTERNALS",e.REPORT_INTERNALS="REPORT_INTERNALS",e.REPORT_NETWORK_LEVEL="REPORT_NETWORK_LEVEL"}(z||(z={})),function(e){e.INACTIVE="inactive",e.RECVONLY="recvonly",e.SENDONLY="sendonly",e.SENDRECV="sendrecv"}(W||(W={})),function(e){e.LOG="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR"}(X||(X={})),function(e){e.LOGGER="LOGGER",e.INIT="INIT",e.DESTROY="DESTROY",e.DOWNLOAD="DOWNLOAD",e.UPLOAD="UPLOAD"}(q||(q={})),function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARNING="WARNING",e.ERROR="ERROR",e.NONE="NONE"}($||($={}));n(2564),n(2222),n(9753);var Z={0:"XYSDK:950102",2001:"XYSDK:950104",4104:"XYSDK:950104",4103:"XYSDK:950143",2040:"XYSDK:950141",2009:"XYSDK:950142",10004010:"XYSDK:950144",10002e3:"XYSDK:950144",40000017:"XYSDK:950147",2016:"XYSDK:950146"},J={en_US:{"XYSDK:950010":"Custom message length limit, please check","XYSDK:950120":"success","XYSDK:950112":"WebSocket connecting time out","XYSDK:950113":"WebSocket connecting is stopped,reconnecting now...","XYSDK:950114":"WebSocket connecting is stopped","XYSDK:950115":"WebSocket connecting error","XYSDK:950116":"The browser don't support Websocket, please use Chrome","XYSDK:950201":"The client has finished calling and it is forbidden to join the meeting","XYSDK:950202":"Peer need to be created before operation","XYSDK:950203":"Stream need to be created before operation","XYSDK:950223":"Failed to start or stop Audio&Video","XYSDK:950224":"No Mic permission","XYSDK:950225":"No camera permission","XYSDK:950230":"Hang up the meeting","XYSDK:950102":"Login failed","XYSDK:950101":"Wrong parameter","XYSDK:950103":"Failed to get user information","XYSDK:950104":"Incorrect account or password","XYSDK:950141":"The password has expired. Please change the password and log in again","XYSDK:950142":'The mobile number conflicts. Please use the mode of "+country code-mobile number"',"XYSDK:950143":"Your password inputting exceeds 5 times within 30 minutes, the account will be locked for 30 minutes","XYSDK:950144":"Login has expired, please log in again","XYSDK:950601":"Custom layout mode does not support switching layouts","XYSDK:950602":"Custom layout mode does not support requesting stream when full screen","XYSDK:950603":"Custom layout mode does not support paging","XYSDK:950105":"Invalid meeting ID","XYSDK:950106":"Failed to call the number , please try again later","XYSDK:950107":"Require meeting password","XYSDK:950108":"Wrong meeting password","XYSDK:950109":"The meeting ID is not supported","XYSDK:950110":"Failed to join meeting","XYSDK:950130":"The protocol must be HTTPS, or the host name must be Localhost","XYSDK:950111":"Interface request failed","XYSDK:950204":"Failed to create a Client","XYSDK:950517":"Call failed","XYSDK:950518":"Successful call","XYSDK:950519":"Calling, please wait","XYSDK:950530":"Failed to request a full screen stream","XYSDK:950401":"No camera or Mic device","XYSDK:950402":"Can't access camera or Mic device","XYSDK:950403":"Constraint setting cannot be satisfied","XYSDK:950404":"Mic or camera access denied","XYSDK:950405":"The collection flow constraint is null","XYSDK:950411":"Camera permission denied","XYSDK:950412":"Microphone permission denied","XYSDK:950406":"Failed to create media stream","XYSDK:950407":"Failed to switch speakers","XYSDK:950501":"The user cancels the screen share","XYSDK:950502":"Operation abnormal,and can't get the screen","XYSDK:950503":"Failed to get the screen","XYSDK:950504":"No video source is available for capture","XYSDK:950505":"Screen sharing failed. Please re-grant screen recording permissions and restart your browser","XYSDK:950506":"Capture screen-Constraint setting failed","XYSDK:950507":"Capture screen-An impermissible constraint setting is specified","XYSDK:950508":"Screen sharing failed. Please re-grant screen recording permissions","XYSDK:950509":"Already sharing screen","XYSDK:950510":"Not selected SourceId","XYSDK:950511":"Operation abnormal,and can't get the screen","XYSDK:950512":"Failed to share content","XYSDK:950513":"Failed to end sharing","XYSDK:950515":"Failed to get the codec format supported by the sender","XYSDK:950408":"Failed to obtain device permissions","XYSDK:950409":"Failed to get device list","XYSDK:950410":"Failed to switch media input device","XYSDK:950514":"No local media streaming","XYSDK:950312":"Failed to start the tour","XYSDK:950205":"Stream is not created","XYSDK:950206":"Stream is created successfully","XYSDK:950207":"Pipe is created successfully","XYSDK:950208":"Failed to create Stream","XYSDK:950209":"Client is not created","XYSDK:950210":"Failed to switch debug mode","XYSDK:950211":"No available stream configurations","XYSDK:950301":"The meeting did not start","XYSDK:953901":"Recording parameter error","XYSDK:953902":"No recording permission","XYSDK:953903":"The cloud conference room does not belong to any enterprise and cannot be recorded","XYSDK:953904":"Insufficient recording space","XYSDK:953905":"Recording did not start","XYSDK:950146":"The login has been restricted due to an abnormal account.","XYSDK:950147":"The account has been disabled. For recovery, please contact the administrator!"},zh_CN:{"XYSDK:950010":"自定义消息长度超过限制,请检查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket连接超时","XYSDK:950113":"WebSocket连接已关闭,正在重连...","XYSDK:950114":"WebSocket连接已关闭","XYSDK:950115":"WebSocket连接错误","XYSDK:950116":"当前浏览器不支持Websocket,请使用Chrome浏览器","XYSDK:950201":"Client已关闭,禁止加入会议","XYSDK:950202":"需要创建Peer才可操作","XYSDK:950203":"需要创建Stream才可操作","XYSDK:950223":"音视频开启关闭操作失败","XYSDK:950224":"没有麦克风权限","XYSDK:950225":"没有摄像头权限","XYSDK:950230":"挂断会议","XYSDK:950102":"登录失败","XYSDK:950101":"参数有误,请检查","XYSDK:950103":"获取用户信息失败","XYSDK:950104":"账号或密码错误","XYSDK:950141":"该账号密码已过期,请修改密码后重新登录","XYSDK:950142":'登录手机号冲突,请使用"+国家码-手机号"的模式输入',"XYSDK:950143":"您登录失败过于频繁,请30分钟后重试","XYSDK:950144":"登录已失效,请重新登录","XYSDK:950601":"自定义布局模式不支持切换布局","XYSDK:950602":"自定义布局模式不支持全屏请流","XYSDK:950603":"自定义布局模式不支持分页","XYSDK:950105":"无效的会议号","XYSDK:950106":"呼叫失败,请稍后重试","XYSDK:950107":"需要入会密码","XYSDK:950108":"入会密码错误","XYSDK:950109":"暂不支持呼叫此号码","XYSDK:950110":"免密入会失败","XYSDK:950130":"协议必须是 https,或者主机名必须是 localhost","XYSDK:950111":"接口请求失败","XYSDK:950204":"Client创建失败","XYSDK:950517":"呼叫失败","XYSDK:950518":"呼叫成功","XYSDK:950519":"正在呼叫中,请等候","XYSDK:950530":"全屏请流失败","XYSDK:950401":"缺失摄像头或麦克风设备","XYSDK:950402":"摄像头或麦克风设备无法访问","XYSDK:950403":"约束设置无法被满足","XYSDK:950404":"麦克风或摄像头使用权限被拒绝","XYSDK:950411":"摄像头使用权限被拒绝","XYSDK:950412":"麦克风使用权限被拒绝","XYSDK:950405":"采集流约束设置为空","XYSDK:950406":"创建媒体流失败","XYSDK:950407":"切换扬声器失败","XYSDK:950501":"取消分享屏幕","XYSDK:950502":"操作异常采集屏幕失败","XYSDK:950503":"采集屏幕失败","XYSDK:950504":"没有屏幕视频源可用于捕获","XYSDK:950505":"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器","XYSDK:950506":"采集屏幕-约束设置失败","XYSDK:950507":"采集屏幕-指定了不允许的约束设置\t","XYSDK:950508":"屏幕分享失败,请在系统设置中授权屏幕录制权限","XYSDK:950509":"已经在分享屏幕","XYSDK:950510":"没有 selectedSourceId\t","XYSDK:950511":"操作异常采集屏幕失败","XYSDK:950512":"分享content失败","XYSDK:950513":"结束分享失败\t","XYSDK:950515":"获取发送端支持的编解码格式 失败\t","XYSDK:950408":"获取设备权限失败","XYSDK:950409":"获取设备列表失败","XYSDK:950410":"切换媒体输入设备失败","XYSDK:950514":"本地无媒体流","XYSDK:950312":"开启巡课失败","XYSDK:950205":"Stream对象未创建","XYSDK:950206":"Stream创建成功","XYSDK:950207":"管道创建成功","XYSDK:950208":"Stream创建失败","XYSDK:950209":"Client对象未创建","XYSDK:950210":"切换调试模式失败","XYSDK:950211":"未匹配到可用的流配置","XYSDK:950301":"会议未开始","XYSDK:953901":"录制参数错误","XYSDK:953902":"没有录制权限","XYSDK:953903":"云会议室不属于任何企业,无法录制","XYSDK:953904":"录制空间不足","XYSDK:953905":"录制未开始","XYSDK:950146":"账号异常被限制登录","XYSDK:950147":"账号已停用,如需恢复请联系管理员!"},zh_TW:{"XYSDK:950010":"自定義消息長度超過限製,請檢查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket連接超時","XYSDK:950113":"WebSocket連接已關閉,正在重連...","XYSDK:950114":"WebSocket連接已關閉","XYSDK:950115":"WebSocket連接錯誤","XYSDK:950116":"當前瀏覽器不支持Websocket,請使用Chrome瀏覽器","XYSDK:950201":"Client已關閉,禁止加入會議","XYSDK:950202":"需要創建Peer才可操作","XYSDK:950203":"需要創建Stream才可操作","XYSDK:950223":"音視頻開啟關閉操作失敗","XYSDK:950224":"沒有麥克風權限","XYSDK:950225":"沒有攝像頭權限","XYSDK:950230":"掛斷會議","XYSDK:950102":"登錄失敗","XYSDK:950101":"參數有誤,請檢查","XYSDK:950103":"獲取用戶信息失敗","XYSDK:950104":"賬號或密碼錯誤","XYSDK:950141":"該賬號密碼已過期,請修改密碼後重新登錄","XYSDK:950142":'登錄手機號衝突,請使用"+國家碼-手機號"的模式輸入',"XYSDK:950143":"您登錄失敗過於頻繁,請30分鐘後重試","XYSDK:950144":"登錄已失效,請重新登錄","XYSDK:950601":"自定義佈局模式不支持切換佈局","XYSDK:950602":"自定義佈局模式不支持全屏請流","XYSDK:950603":"自定義佈局模式不支持分頁","XYSDK:950105":"無效的會議號","XYSDK:950106":"呼叫失敗,請稍後重試","XYSDK:950107":"需要入會密碼","XYSDK:950108":"入會密碼錯誤","XYSDK:950109":"暫不支持呼叫此號碼","XYSDK:950110":"免密入會失敗","XYSDK:950130":"協議必須是 https,或者主機名必須是 localhost","XYSDK:950111":"接口請求失敗","XYSDK:950204":"Client創建失敗","XYSDK:950517":"呼叫失敗","XYSDK:950518":"呼叫成功","XYSDK:950519":"正在呼叫中,請等候","XYSDK:950530":"全屏請流失敗","XYSDK:950401":"缺失攝像頭或麥克風設備","XYSDK:950402":"攝像頭或麥克風設備無法訪問","XYSDK:950403":"約束設置無法被滿足","XYSDK:950404":"麥克風或攝像頭使用權限被拒絕","XYSDK:950411":"攝像頭使用權限被拒絕","XYSDK:950412":"麥克風使用權限被拒絕","XYSDK:950405":"採集流約束設置為空","XYSDK:950406":"創建媒體流失敗","XYSDK:950407":"切換揚聲器失敗","XYSDK:950501":"取消分享屏幕","XYSDK:950502":"操作異常採集屏幕失敗","XYSDK:950503":"採集屏幕失敗","XYSDK:950504":"沒有屏幕視頻源可用於捕獲","XYSDK:950505":"屏幕分享失敗,請在系統設置中重新授權屏幕錄製權限,並重啟瀏覽器","XYSDK:950506":"採集屏幕-約束設置失敗","XYSDK:950507":"採集屏幕-指定了不允許的約束設置\t","XYSDK:950508":"屏幕分享失敗,請在系統設置中授權屏幕錄製權限","XYSDK:950509":"已經在分享屏幕","XYSDK:950510":"沒有 selectedSourceId\t","XYSDK:950511":"操作異常採集屏幕失敗","XYSDK:950512":"分享content失敗","XYSDK:950513":"結束分享失敗\t","XYSDK:950515":"獲取發送端支持的編解碼格式 失敗\t","XYSDK:950408":"獲取設備權限失敗","XYSDK:950409":"獲取設備列表失敗","XYSDK:950410":"切換媒體輸入設備失敗","XYSDK:950514":"本地無媒體流","XYSDK:950312":"開啟巡課失敗","XYSDK:950205":"Stream對象未創建","XYSDK:950206":"Stream創建成功","XYSDK:950207":"管道創建成功","XYSDK:950208":"Stream創建失敗","XYSDK:950209":"Client對象未創建","XYSDK:950210":"切換調試模式失敗","XYSDK:950211":"未匹配到可用的流配置","XYSDK:950301":"會議未開始","XYSDK:953901":"錄製參數錯誤","XYSDK:953902":"沒有錄製權限","XYSDK:953903":"雲會議室不屬於任何企業,無法錄製","XYSDK:953904":"錄製空間不足","XYSDK:953905":"錄製未開始","XYSDK:950146":"賬號異常被限制登錄","XYSDK:950147":"賬號已停用,如需恢復請聯系管理員!"}},Q={version:"3.9.02",zh_CN:{"CHARGE:646":"云会议室已达企业允许呼入的上限","CHARGE:647":"终端已达允许呼入的上限","CHARGE:644":"没有呼叫权限","CHARGE:645":"云会议室已达允许呼入的上限","CHARGE:648":"终端已达企业允许呼入的上限","CHARGE:649":"预约会议未到开始时间,无法加入","PS:400":"不支持跨云呼叫","SIG:421":"对方终端不允许外人拨打,请与对方确认后再拨","SIG:422":"您已被主持人移出会议","SIG:420":"号码不正确","SIG:789":"录制已停止","SIG:423":"UNKNOWN","SIG:424":"主持人已结束会议","CHARGE:642":"呼叫失败,企业IPPBX方数已达上限","CHARGE:643":"调度失败,企业监控调度方数已达上限\t","CHARGE:640":"所属部门的云会议室存储空间已满,不能再发起录制","CHARGE:641":"所属企业的云会议室存储空间已满,不能再发起录制","CHARGE:635":"账户余额不足,不能发起PSTN通话,请联系管理员充值后再尝试。","CHARGE:636":"云会议室已达允许呼入的上限","CHARGE:633":"无法呼叫当前号码,您的终端仅允许呼叫通讯录上的用户号码","CHARGE:634":"账户余额支付范围不可用于PSTN通话,请联系管理员开启后再尝试。","CHARGE:639":"云会议室存储空间已满,不能再发起录制","MC:504":"级联资源受限,入会失败","CHARGE:637":"云会议室已达部门允许呼入的上限","CHARGE:638":"云会议室已达企业允许呼入的上限","SIG:419":"对方已开启办公模式。您可滑动下方按钮,发起呼叫","SIG:416":"当前在线呼叫数已达服务上限,请稍候再试","SIG:417":"密码输入超时","SIG:410":"呼叫失败,请再试一次","SIG:4445":"云会议室存储空间已满,不能再发起录制","SIG:411":"终端APP版本过低,请升级后再试","SIG:4446":"所属部门的云会议室存储空间已满,不能再发起录制","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":"密码错误次数达到3次,请稍后重试","SIG:4449":"无效的分享conten类型","SIG:415":"同步呼叫信息失败,请稍后再试","SIG:412":"对方版本过低,通话无法接通","SIG:4447":"所属企业的云会议室存储空间已满,不能再发起录制","SIG:413":"对方设置了免打扰","SIG:4448":"未知错误","SIG:4441":"录制超时,请稍后再试","CHARGE:631":"此云会议室为按参会时长计费的会议室。您的账户余额已用尽,不能在此云会议室发起会议,请联系管理员充值或选择其他云会议室。","SIG:4442":"UNKNOWN","CHARGE:632":"主动呼叫权限已被管理员关闭,无法发起呼叫","SIG:4440":"分享content超时,请稍后再试","CHARGE:630":"当前云会议室不允许邀请通讯录外成员","CHARGE:624":"呼叫失败。您呼叫的终端端口使用服务已过期","CHARGE:625":"此会议有终端端口服务已过期,无法支持多方呼叫","CHARGE:622":"没有监看权限","REC:511":"录制服务暂时不可用,请稍后再试","CHARGE:623":"呼叫失败。终端端口使用服务已过期,不能加入云会议室或多方通话。","REC:512":"录制服务暂时不可用,请稍后再试","CHARGE:628":"您呼叫的云会议室不允许匿名用户呼入,请登录或注册后重新呼叫","CHARGE:629":"对方正在会议中,且该会议不允许通讯录外成员呼入,请稍后再试","CHARGE:626":"此会议有终端端口服务已过期,无法邀请更多人加入","CHARGE:627":"呼叫的云会议室不允许通讯录外成员呼入,请联系云会议室管理员","SIG:1503":"分配监控资源失败","SIG:4456":"连接已断开,请重新入会","SIG:4457":"号码输入有误,请核对后重新拨打!","SIG:441":"当前在线呼叫数已达网关服务上限,请稍候重试","SIG:4454":"通话不存在,请核对后重试","SIG:4455":"服务器未连接,请稍后重试","SIG:445":"UNKNOWN","SIG:1501":"shuttle获取MA失败","SIG:4458":"网络异常,呼叫已断开","SIG:1502":"shuttle获取媒体资源失败","SIG:4459":"号码输入有误,请核对后重新拨打!","SIG:4452":"录制失败","CHARGE:620":"无单位归属,不能呼叫H.323设备\t","CHARGE:741":"企业账户未开通公有云MCU级联服务,不能发起呼叫。","SIG:440":"云会议室密码不正确,请重试","SIG:4453":"通话已存在,请稍后再试","CHARGE:621":"呼叫失败,单位H.323方数不足","CHARGE:742":"会议已达最大支持人数,请联系管理员购买扩容。","SIG:4450":"不支持分享content","SIG:4451":"带宽不足,分享内容失败","CHARGE:740":"企业账户余额不足,不能使用公有云MCU级联服务发起呼叫","CHARGE:613":"UNKNOWN","CHARGE:734":"当前录制并发数已达平台上限,请稍后再试","CHARGE:614":"UNKNOWN","REC:400":"信令服务与录制服务内部错误。","CHARGE:611":"UNKNOWN","CHARGE:732":"当前ippbx总并发数已达平台上限,请稍后再试","REC:401":"录制服务暂时不可用,请稍后再试","CHARGE:612":"UNKNOWN","CHARGE:733":"呼叫失败,您呼叫的终端不属于您的呼叫范围","REC:402":"录制服务暂时不可用,请稍后再试","CHARGE:617":"UNKNOWN","REC:403":"录制服务暂时不可用,请稍后再试","CHARGE:618":"UNKNOWN","REC:404":"录制不存在","CHARGE:615":"UNKNOWN","REC:405":"录制服务暂时不可用,请稍后再试","CHARGE:616":"会议已被锁定,无法加入,请联系会议发起人解锁后进入。","CHARGE:619":"呼叫失败。终端的云服务端口已过期,请联系管理员续费购买。","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content发送时会议尚未开始","SIG:431":"Content Server创建资源失败INVALID_PASSWORD","SIG:4466":"输入密码超时","REC:406":"录制服务暂时不可用,请稍后再试","SIG:4460":"号码输入有误,请核对后重新拨打!","CHARGE:730":"云会议室已达部门允许呼入的上限","CHARGE:610":"呼叫失败,您的企业已禁止PSTN通话功能,请联系您的管理员!","CHARGE:731":"当前h323总并发数已达平台上限,请稍后再试","SIG:4461":"号码输入有误,请核对后重新拨打!","SIG:1404":"UNKNOWN","SIG:469":"录制正在进行,请勿重复发起录制","CHARGE:441":"当前在线呼叫数已达网关服务上限,请稍候重试","SIG:461":"录制时,本地空间即将耗尽","SIG:462":"录制时,本地空间已耗尽","SIG:580":"pstn呼叫时,第三方服务器报错","REC:465":"本地已开启录制,不能重复发起录制","REC:466":"录制服务暂时不可用,请稍后再试","CHARGE:677":"当前ipc总并发数已达平台上限,请稍后再试","REC:467":"已达最大录制方数,不能发起录制","REC:468":"录制的存储空间已满,您无法开始录制。\n请删除已有的录制视频,\n或联系管理员购买更多存储空间","REC:469":"UNKNOWN","REC:460":"没有录制权限","REC:463":"录制的存储空间已满,您无法开始录制。\n请删除已有的录制视频,\n或联系管理员购买更多存储空间","SIG:456":"呼叫失败,请再试一次","CHARGE:671":"会议未开始,请等待主持人开始会议后加入","CHARGE:672":"已被移出本次会议,无法入会","CHARGE:670":"您有一场会议正在进行,请先结束该会议","SIG:450":"您的终端目前无法支持此类呼叫","CHARGE:675":"没有可用的视频监控资源","CHARGE:676":"视频监控服务并发超过限制","CHARGE:673":"监控服务已经过期","CCC:501":"数据库操作失败","CHARGE:674":"视频监控服务没有企业归属","CCC:500":"内部服务器错误","CHARGE:668":"会议未通过审批或未到预约开始时间","CCC:602":"输入超时","CHARGE:669":"管理员禁用点对点呼叫","CCC:601":"呼叫超时","CHARGE:666":"超过会议审批允许的最大成员数量,入会失败","CCC:604":"入会超时","CHARGE:667":"超过会议审批允许的最大成员数量,邀请失败","CCC:603":"评价结束","CHARGE:10000":"参会方信息有变,无法参会","SIG:487":"呼叫已取消","SIG:488":"终端试用期已过,无法继续为您服务了","SIG:485":"已达最大呼叫时长,呼叫已断开","SIG:486":"对方忙,请稍后再试","CHARGE:660":"对方企业账户余额不足,不能发起SDK呼叫","SIG:480":"呼叫失败,请再试一次","CHARGE:661":"对方企业账户尚未开通小程序SDK呼叫服务","SIG:483":"拨打不支持国家的pstn号码","CHARGE:664":"PSTN呼叫已达部门允许呼入的上限","SIG:484":"电话时长已用尽,无法转呼手机号,请联系IT管理员及时充值","CHARGE:665":"服务已过期,请管理员更新服务许可证","CHARGE:420":"号码不正确","CHARGE:662":"对方企业账户余额不足,不能发起小程序SDK呼叫","SIG:482":"邀请失败,请重试","CHARGE:415":"服务已过期,请管理员更新服务许可证","CHARGE:657":"企业账户余额不足,不能发起小程序SDK呼叫","CHARGE:416":"当前在线呼叫数已达服务上限,请稍候再试","CHARGE:658":"web客户端达到企业的呼叫方数限制","CHARGE:655":"企业账户余额不足,不能发起SDK呼叫","CHARGE:414":"H.323接入服务已过期","CHARGE:656":"企业账户尚未开通小程序SDK呼叫服务","CHARGE:659":"对方企业账户尚未开通SDK呼叫服务","STATE:200":"成功","SIG:598":"呼叫失败,请再试一次","SIG:599":"信令消息格式无效","SIG:479":"共享内容路数已达上限,无法发起更多的共享。请等待其他参会者停止共享后再重试","CHARGE:650":"h.323方数已达云会议室允许呼入的上限","CHARGE:653":"会议不支持更多小程序入会,请使用App入会或联系会议管理员","CHARGE:654":"企业账户尚未开通SDK呼叫服务","CHARGE:651":"h.323方数已达部门允许呼入的上限","CCC:600":"用户已被其他座席服务","CHARGE:652":"预约会议已经过期,无法主动加入","SIG:704":"呼叫失败,请再试一次","SIG:703":"呼叫失败,请再试一次","SIG:708":"没有白板分享权限","SIG:709":"不能合并会议","SIG:706":"没有内容标注权限","SIG:707":"没有双流分享权限","CHARGE:481":"对方不允许陌生人呼叫","CCC:415":"坐席名称已存在","CCC:414":"坐席不存在","CCC:417":"IVR配置已存在","CCC:416":"无效的坐席ID","CCC:419":"无效的IVR配置ID","CCC:418":"IVR配置不存在","SIG:498":"当前网络UDP被禁用,无法通话,请联系网络管理员或切换其他网络","SIG:499":"网络异常,呼叫已断开","SIG:496":"媒体超时","SIG:497":"信令超时","SIG:490":"无应答","CHARGE:473":"当前通话人数已满。如需更多人通话,请使用云会议室。","SIG:491":"","CHARGE:474":"当前会议人数已满。请加入通讯录,\n购买更多会议端口,详情请咨询本地经销商。","CHARGE:471":"当前通话人数已满。请使用终端或云会议室召开多方视频会议。","CCC:420":"特服号无效,请重新输入","CHARGE:472":"呼叫无法接通,终端在家最多支持4方通话。","CHARGE:477":"您呼叫的会议已达到最大支持人数,请联系管理员购买或使用超大型会议室。","CHARGE:478":"您的服务可用分钟数不足,无法呼叫。","CCC:421":"号码不存在","CHARGE:475":"当前会议人数已满,请联系管理员%s%s,\n及时为帐户充值,或购买更多会议端口。","CHARGE:476":"您呼叫的会议已达到最大支持人数,请联系管理员购买或使用超大型会议室。","CCC:404":"特服号暂时不可用,请稍后再试","CCC:403":"特服号暂时不可用,请稍后再试","CCC:406":"参数非法","REC:478":"录制中断,网络连接中,请重新发起录制","CHARGE:469":"服务资源使用已达最大值,请稍后重试!","CCC:405":"特服号暂时不可用,请稍后再试","REC:479":"录制中断,服务重启中,请重新发起录制","CCC:408":"企业不存在","CCC:407":"企业已存在","CCC:409":"无效的企业ID","SIG:726":"该号码异常已被限制使用","SIG:727":"呼叫失败,请再试一次","SIG:724":"您已被强制邀请加入新的会议","SIG:725":"呼叫失败,请再试一次","REC:470":"无可用录制服务器,请稍后再试","SIG:722":"设备与配对终端连接断开","SIG:723":"设备与指挥调度服务连接断开","SIG:720":"请稍等,主持人稍后邀请您入会","SIG:721":"会议还未开始,请等待主持人入会","CCC:411":"特服号不存在","CHARGE:467":"已达最大录制方数,不能发起录制","CCC:410":"特服号已存在","CHARGE:464":"录制失败,尚未开通录制服务或服务已过期,请联系管理员购买。","CHARGE:20001":"当前会议室无权限邀请此设备入会","CCC:413":"坐席已存在","CHARGE:20000":"无权限呼叫此设备","CCC:412":"无效的特服号","CHARGE:459":"帐户余额不足,无法支持此呼叫。\n请联系管理员%s%s,及时为帐户充值。","CHARGE:457":"终端电话可用分钟数不足,请充值;或联系管理员,加入通讯录。","CHARGE:458":"暂不支持呼叫国际电话。请联系管理员加入通讯录;或咨询本地经销商,为您的单位开通后台管理帐户。","SIG:716":"网络异常,呼叫已断开","SIG:713":"Content Server创建资源失败","REC:480":"录制失败,因为该会议室已启用单路录制","SIG:714":"Failed to allocated resources for content sharing.","REC:481":"录制中断,网络连接中,请重新发起录制","SIG:719":"呼叫失败,请再试一次","SIG:717":"会议室已超出最高通话时长限制,转为语音通话模式,可联系管理员处理","SIG:718":"语音模式限制已解除","SIG:711":"内容发送时会议尚未开始","SIG:712":"内容发送时会议尚未开始","CHARGE:451":"系统不支持此类型呼叫","CHARGE:452":"您的云会议室不支持邀请电话入会,\n请联系管理员加入通讯录;\n或咨询本地经销商,为您的开通帐户。","CHARGE:450":"您的终端目前无法支持此类呼叫","CHARGE:455":"暂不支持呼叫国际电话号码。","CCC:400":"特服号暂时不可用,请稍后再试","CHARGE:453":"帐户余额不足,无法支持此呼叫。\n请联系管理员%s%s,及时为帐户充值。","CCC:402":"特服号暂时不可用,请稍后再试","CHARGE:454":"终端电话可用分钟数不足,无法呼叫","CCC:401":"特服号暂时不可用,请稍后再试","CHARGE:602":"当前通话人数已达上限,您无法加入。","CHARGE:723":"已设置用户呼叫隔离","CHARGE:603":"您呼叫的会议已达最大支持人数。\n设备加入通讯录,可支持更多方会议。\n如需更多支持请呼叫客服终端号’288288’咨询。","CHARGE:724":"当前总并发数已达平台上限,请稍后再试","CHARGE:721":"不允许互联网链路呼入","CHARGE:601":"会议容量使用现在达到上限,\n无法加入会议。请联系管理员%s%s购买更多会议端口。","CHARGE:722":"已设置硬终端呼叫隔离","CHARGE:606":"当前会议人数已超限,30分钟后将自动结束。\n请加入通讯录,可支持更多方会议。","CHARGE:607":"您的服务可用分钟数不足,无法呼叫。","CHARGE:604":"终端在家仅支持4方通话,当前通话人数已超限,30分钟后将自动结束。","CHARGE:725":"请稍等,主持人稍后邀请您入会","CHARGE:605":"UNKNOWN","CHARGE:726":"您呼叫的云会议室不允许临时用户呼入,请联系管理员","SIG:506":"录制服务器内部错误","SIG:504":"呼叫失败,请再试一次","CHARGE:608":"您呼叫的会议已达最大支持人数,请联系IT管理员","CHARGE:729":"已达到部门录制并发上限,请联系企业管理员","SIG:505":"呼叫失败,请再试一次","CHARGE:609":"您呼叫的会议已达最大支持人数,请联系IT管理员,购买超大型云会议室。","SIG:502":"呼叫失败,请再试一次","SIG:4999":"分享内容失败","SIG:503":"呼叫失败,请再试一次","CHARGE:720":"该账号已使用\t","CHARGE:712":"该云会议室已被设置为禁止被监看","CHARGE:713":"该终端正在参会的云会议室被设置为禁止被监看","CHARGE:710":"不支持pstn呼叫","CHARGE:711":"呼叫失败,您的企业已禁止PSTN通话功能,请联系您的管理员!","CHARGE:716":"用户不在线,无法参会","CHARGE:717":"当前用户无权限入会","REC:503":"录制服务暂时不可用,请稍后再试","CHARGE:714":"监看权限校验超时,请重试","CHARGE:715":"该号码异常已被限制使用","CHARGE:718":"对方终端不允许拨打","CHARGE:719":"该账号已登录其它终端入会","SURV:580":"监控调度呼叫时,第三方服务报错","REC:505":"录制服务暂时不可用,请稍后再试","REC:506":"直播服务暂时不可用,请稍后再试","REC:507":"录制服务暂时不可用,请稍后再试","REC:509":"录制服务暂时不可用,请稍后再试","CHARGE:701":"企业账户余额不足,无法开启录制。请联系管理员充值后再尝试","CHARGE:702":"个人云会议室不可以用,请选择其他会议室或联系管理员","CHARGE:700":"企业账户未开通多路录制计费服务,无法开启录制。请联系客户咨询开通事宜","CHARGE:705":"H323融合服务器容量不足","CHARGE:706":"云会议室已达允许呼入的上限","CHARGE:703":"呼叫所用的H323集群容量不足","CHARGE:704":"H323融合服务器容量不足","SIG:408":"对方没应答,请稍后再试","SIG:405":"对方设备不在线,请稍后重试","CHARGE:707":"云会议室存储空间已满,不能再发起录制","SIG:409":"建立多点呼叫时的内部消息","SIG:400":"通讯失败,请升级到最新版本","SIG:403":"远端网络异常,呼叫已断开","SIG:404":"对方不在线","SIG:401":"加密算法不匹配","SIG:402":"该会议室不允许关闭摄像头,请开启摄像头加入会议","SURV:483":"同步会议信息失败,请重试","SURV:482":"邀请失败,请重试"},zh_TW:{"CHARGE:644":"沒有呼叫權限","CHARGE:649":"預約會議未到開始時間,無法加入","PS:400":"不支持跨雲呼叫","SIG:421":"對方終端不允許外人撥打,請與對方確認後再撥","SIG:422":"您已被主持人移出會議","SIG:420":"號碼不正確","SIG:789":"錄制已停止","SIG:423":"UNKNOWN","SIG:424":"主持人已結束會議","CHARGE:642":"呼叫失敗,企業IPPBX方數已達上限","CHARGE:643":"調度失敗,企業監控調度方數已達上限","CHARGE:640":"所屬部門的雲會議室存儲空間已滿,不能再發起錄制","CHARGE:641":"所屬企業的雲會議室存儲空間已滿,不能再發起錄制","CHARGE:635":"賬戶余額不足,不能發起PSTN通話,請聯系管理員充值後再嘗試","CHARGE:636":"雲會議室已達允許呼入的上限","CHARGE:633":"無法呼叫當前號碼,您的終端僅允許呼叫通訊錄上的用戶號碼","CHARGE:634":"賬戶余額支付範圍不可用於PSTN通話,請聯系管理員開啟後再嘗試。","CHARGE:639":"雲會議室存儲空間已滿,不能再發起錄制","MC:504":"級聯資源受限,入會失敗","CHARGE:637":"雲會議室已達部門允許呼入的上限","CHARGE:638":"雲會議室已達企業允許呼入的上限","SIG:419":"對方已開啟辦公模式。您可滑動下方按鈕,發起呼叫","SIG:416":"當前在線呼叫數已達服務上限,請稍後再試","SIG:417":"密碼輸入超時","SIG:410":"呼叫失敗,請再試壹次","SIG:4445":"雲會議室存儲空間已滿,不能再發起錄制","SIG:411":"終端APP版本過低,請升級後再試","SIG:4446":"所屬部門的雲會議室存儲空間已滿,不能再發起錄制","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":" 密碼錯誤次數達到3次,請稍後重試","SIG:4449":"無效的分享content類型","SIG:415":"同步呼叫信息失敗,請稍後再試","SIG:412":"對方版本過低,通話無法接通","SIG:4447":"所屬企業的雲會議室存儲空間已滿,不能再發起錄制","SIG:413":"對方設置了免打擾","SIG:4448":"未知錯誤","CHARGE:631":"此雲會議室為按參會時長計費的會議室。您的帳戶餘額已用盡,不能在此雲會議室發起會議,請聯系管理員充值或選擇其他雲會議室。","SIG:4441":"錄制超時,請稍後再試","CHARGE:632":"主動呼叫權限已被管理員關閉,無法呼叫","SIG:4442":"UNKNOWN","CHARGE:630":"當前雲會議室不允許邀請通訊錄外成員","SIG:4440":"分享content超時,請稍後再試","CHARGE:624":"呼叫失敗。您呼叫的終端埠使用服務已過期。","CHARGE:625":"此會議有終端端口服務已過期,無法支持多方呼叫","CHARGE:622":"沒有監看權限","CHARGE:623":"呼叫失敗。終端埠使用服務已過期,不能加入雲會議室或多方通話","REC:511":"錄制服務暫時不可用,請稍後再試","CHARGE:628":"您呼叫的雲會議室不允許匿名使用者呼入,請登錄或註冊後重新呼叫","REC:512":"錄制服務暫時不可用,請稍後再試","CHARGE:629":"對方正在會議中,且該會議不允許通訊錄外成員呼入,請稍後再試","CHARGE:626":"此會議有終端端口服務已過期,無法邀請更多人加入","CHARGE:627":"呼叫的雲會議室不允許通訊錄外成員呼入,請聯系雲會議室管理員","SIG:1503":"分配監控資源失敗","SIG:4456":"連接已斷開,請重新入會","SIG:4457":"號碼輸入有誤,請核對後重新撥打!","SIG:441":"當前在線呼叫數已達網關服務上限,請稍後重試","SIG:4454":"通話不存在,請核對後重試","SIG:4455":"服務器未連接,請稍後重試","SIG:445":"UNKNOWN","SIG:1501":"shuttle獲取MA失敗","SIG:4458":"網絡異常,呼叫已斷開","SIG:1502":"shuttle獲取媒體資源失敗","SIG:4459":"號碼輸入有誤,請核對後重新撥打!","CHARGE:620":"無單位歸屬,不能呼叫H.323設備","CHARGE:741":"企業賬戶未開通公有云MCU級聯服務,不能發起呼叫","SIG:4452":"錄制失敗","CHARGE:621":"呼叫失敗,單位H.323方數不足","CHARGE:742":"會議已達最大支持人數,請聯繫管理員購買擴容。","SIG:440":"雲會議室密碼不正確,請重試","SIG:4453":"通話已存在,請稍後再試","SIG:4450":"不支持分享content","CHARGE:740":"企業賬戶餘額不足,不能使用公有云MCU級聯服務發起呼叫","SIG:4451":"帶寬不足,分享內容失敗","CHARGE:613":"UNKNOWN","CHARGE:734":"當前錄製並發數已達平臺上限,請稍後再試","CHARGE:614":"UNKNOWN","CHARGE:611":"UNKNOWN","CHARGE:732":"當前ippbx總並發數已達平臺上限,請稍後再試","REC:400":"信令服務與錄製服務內部錯誤。","CHARGE:612":"UNKNOWN","CHARGE:733":"呼叫失敗,您呼叫的終端不屬於您的呼叫範圍","REC:401":"錄制服務暫時不可用,請稍後再試","CHARGE:617":"UNKNOWN","REC:402":"錄制服務暫時不可用,請稍後再試","CHARGE:618":"UNKNOWN","REC:403":"錄制服務暫時不可用,請稍後再試","CHARGE:615":"UNKNOWN","REC:404":"录制不存在","CHARGE:616":"會議已被鎖定,無法加入,請聯系會議發起人解鎖後進入。","REC:405":"錄制服務暫時不可用,請稍後再試","CHARGE:619":"呼叫失敗。終端的雲服務端口已過期,請聯系管理員續費購買。","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content發送時會議尚未開始","SIG:431":"Content Server創建資源失敗","SIG:4466":"輸入密碼超時","REC:406":"錄制服務暫時不可用,請稍後再試","SIG:4460":"號碼輸入有誤,請核對後重新撥打!","CHARGE:730":"當前總並發數已達平臺上限,請稍後再試","CHARGE:610":"呼叫失敗,您的企業已禁止PSTN通話功能,請聯系您的企業管理員!","CHARGE:731":"當前h323總並發數已達平臺上限,請稍後再試","SIG:4461":"號碼輸入有誤,請核對後重新撥打!","SIG:1404":"UNKNOWN","SIG:469":"錄製正在進行,請勿重複發起錄製","CHARGE:441":"當前在線呼叫數已達網關服務上限,請稍後重試","SIG:461":"錄制時,本地空間即將耗盡","SIG:462":"錄制時,本地空間已耗盡","SIG:580":"pstn呼叫時,第三方服務器報錯","REC:465":"本地已開啟錄制,不能重復發起錄制","CHARGE:677":"呼叫失敗,您呼叫的終端不屬於您的呼叫範圍","REC:466":"錄制服務暫時不可用,請稍後再試!","REC:467":"已達最大錄制方數,不能發起錄制","REC:468":"錄制的存儲空間已滿,您無法開始錄制。\n請刪除已有的錄制視頻,\n或聯系企業管理員購買更多存儲空間。","REC:469":"UNKNOWN","REC:460":"沒有錄製權限","REC:463":"錄制的存儲空間已滿,您無法開始錄制。\n請刪除已有的錄制視頻,\n或聯系企業管理員購買更多存儲空間。","SIG:456":"呼叫失敗,請再試壹次","CHARGE:671":"會議未開始,請等待主持人開始會議後加入","CHARGE:672":"已被移出本次會議,無法入會","CHARGE:670":"您有一場會議正在進行,請先結束該會議","CHARGE:675":"沒有可用的視頻監控資源","SIG:450":"您的終端目前無法支持此類呼叫","CHARGE:676":"視頻監控服務併發超過限制","CCC:501":"數據庫操作失敗","CHARGE:673":"監控服務已經過期","CCC:500":"內部服務器錯誤","CHARGE:674":"視頻監控服務沒有企業歸屬","CCC:602":"输入超时","CHARGE:668":"會議未通過審批或未到預約開始時間","CCC:601":"呼叫超時","CHARGE:669":"管理員禁用點對點呼叫","CCC:604":"入會超時","CHARGE:666":"超過會議審批允許的最大成員數量,入會失敗","CCC:603":"评价结束","CHARGE:667":"超過會議審批允許的最大成員數量,邀請失敗","CHARGE:10000":"參會方信息有變,無法參會","SIG:487":"呼叫已取消","SIG:488":"終端試用期已過,無法繼續為您服務了","SIG:485":"已達最大呼叫時長,呼叫已斷開","SIG:486":"對方忙,請稍後再試","CHARGE:660":"對方企業帳戶餘額不足,不能發起SDK呼叫","CHARGE:661":"對方企業賬戶尚未開通小程序SDK呼叫服務","SIG:480":"呼叫失敗,請再試壹次","CHARGE:664":"PSTN呼叫已達部門允許呼入的上限","SIG:483":"撥打不支持國家的pstn號碼","CHARGE:665":"小魚易連服務已過期,請企業管理員更新服務許可證","SIG:484":"電話時長已用盡,無法轉呼手機號,請聯繫IT管理員及時充值","CHARGE:420":"號碼不正確","CHARGE:662":"對方企業帳戶餘額不足,不能發起小程序SDK呼叫","SIG:482":"邀請失敗,請重試","CHARGE:415":"小魚易連服務已過期,請企業管理員更新服務許可證","CHARGE:657":"企業帳戶餘額不足,不能發起小程序SDK呼叫","CHARGE:416":"當前在線呼叫數已達服務上限,請稍後再試","CHARGE:658":"web用戶端達到企業的呼叫方數限制","CHARGE:655":"企業帳戶餘額不足,不能發起SDK呼叫","CHARGE:414":"H.323接入服務已過期","CHARGE:656":"企業帳戶尚未開通小程序SDK呼叫服務","CHARGE:659":"對方企業帳戶尚未開通SDK呼叫服務","STATE:200":"成功","SIG:598":"呼叫失敗,請再試壹次","SIG:599":"信令訊息格式無效","SIG:479":"共享內容路數已達上限,無法發起更多的共享。請等待其他參會者停止共享后再重試。","CHARGE:650":"h.323方數已達雲會議室允許呼入的上限","CHARGE:653":"會議不支持更多小程序入會,請使用App入會或聯系會議管理員","CHARGE:654":"企業帳戶尚未開通SDK呼叫服務","CCC:600":"用戶已被其他座席服務","CHARGE:651":"h.323方數已達部門允許呼入的上限","CHARGE:652":"預約會議已經過期,無法主動加入","SIG:704":"呼叫失敗,請再試壹次","SIG:703":"呼叫失敗,請再試壹次","SIG:708":"沒有白板分享權限","SIG:709":"無法合併會議","SIG:706":"沒有內容標記權限\t","SIG:707":"沒有雙流分享權限","CHARGE:481":"終端不允許陌生人呼叫","CCC:415":"坐席名稱已存在","CCC:414":"坐席不存在","CCC:417":"IVR配置已存在","CCC:416":"無效的坐席ID","CCC:419":"無效的IVR配置ID","CCC:418":"IVR配置不存在","SIG:498":"當前網絡UDP被禁用,無法通話,\n請聯系網絡管理員或切換其他網絡","SIG:499":"網絡異常,呼叫已斷開","SIG:496":"媒體超時","SIG:497":"信令超時","CHARGE:473":"當前通話人數已滿。如需更多人通話,請使用雲會議室。手機端下載小魚易連app,註冊即可獲得。","SIG:490":"無應答","CHARGE:474":"當前會議人數已滿,請加入企業通訊錄,\n購買更多會議端口,詳情請咨詢本地經銷商。","SIG:491":"","CCC:420":"特服號暫時不可用,請稍後再試","CHARGE:471":"當前通話人數已滿。請使用終端或雲會議室召開多方視頻會議。","CHARGE:472":"呼叫無法接通,終端在家最多支持4方通話。","CHARGE:477":"您呼叫的會議已達到最大支持人數,請聯系管理員購買或使用超大型會議室。","CCC:421":"號码不存在","CHARGE:478":"您的服務可用分鐘數不足,無法呼叫。","CHARGE:475":"當前會議人數已滿,請聯系企業管理員%s%s,\n及時為企業帳戶充值,或購買更多會議端口。","CHARGE:476":"您呼叫的會議已達到最大支持人數,請聯系管理員購買或使用超大型會議室。","CCC:404":"特服號暫時不可用,請稍後再試","CCC:403":"特服號暫時不可用,請稍後再試","CCC:406":"參數非法","CCC:405":"特服號暫時不可用,請稍後再試","CHARGE:469":"服務資源使用已達最大值,請稍後重試!","REC:478":"錄制中斷,網絡連接中,請重新發起錄制","CCC:408":"企業不存在","REC:479":"錄製中斷,服務重啟中,請重新發起錄製","CCC:407":"企業已存在","CCC:409":"無效的企業ID","SIG:726":"該號碼異常已被限製使用","SIG:727":"呼叫失敗,請再試壹次","SIG:724":"您已被強制邀請加入新的會議","REC:470":"沒有可用的錄製伺服器,請稍後再試","SIG:725":"呼叫失敗,請再試壹次","SIG:722":"設備與配對終端連接斷開","SIG:723":"設備與指揮調度服務連接斷開","SIG:720":"請稍等,主持人稍後邀請您入會","SIG:721":"會議還未開始,請等待主持人入會","CCC:411":"特服號不存在","CCC:410":"特服號已存在","CHARGE:467":"已達最大錄制方數,不能發起錄制","CCC:413":"坐席已存在","CHARGE:464":"錄制失敗,尚未開通錄制服務或服務已過期,請聯系管理員購買。","CHARGE:20001":"當前會議室無許可權邀請此設備入會","CCC:412":"無效的特服號","CHARGE:20000":"無權限呼叫此設備","CHARGE:459":"企業帳戶余額不足,無法支持此呼叫。\n請聯系企業管理員%s%s,及時為企業帳戶充值。","CHARGE:457":"終端電話可用分鐘數不足,請充值;或聯系企業管理員,加入企業通訊錄。","CHARGE:458":"暫不支持呼叫國際電話。請聯系企業管理員加入企業通訊錄;或咨詢本地經銷商,為您開通企業帳戶。","SIG:716":"網絡異常,呼叫已斷開","REC:480":"錄製失敗,因為該會議室已啟用單路錄製模式","SIG:713":"Content Server創建資源失敗","REC:481":"錄制中斷,網絡連接中,請重新發起錄制","SIG:714":"Content Server創建資源失敗","SIG:719":"呼叫失敗,請再試壹次","SIG:717":"會議室已超出最高通話時長限制,轉為語音通話模式,可聯繫管理員處理","SIG:718":"語音模式限制已解除","SIG:711":"内容發送時會議尚未開始","SIG:712":"内容發送時會議尚未開始","CHARGE:451":"系統不支持此類型呼叫","CHARGE:452":"您的雲會議室不支持邀請電話入會,\n請聯系企業管理員加入企業通訊錄;\n或咨詢本地經銷商,為您的企業開通企業帳戶。","CHARGE:450":"您的終端目前無法支持此類呼叫","CCC:400":"特服號暫時不可用,請稍後再試","CHARGE:455":"暫不支持呼叫國際電話號碼。","CCC:402":"特服號暫時不可用,請稍後再試","CHARGE:453":"企業帳戶余額不足,無法支持此呼叫。\n請聯系企業管理員%s%s,及時為企業帳戶充值。","CCC:401":"特服號暫時不可用,請稍後再試","CHARGE:454":"終端電話可用分鐘數不足,無法呼叫。","CHARGE:602":"當前通話人數已達上限,您無法加入。","CHARGE:723":"已設置啟用戶呼叫隔離","CHARGE:603":"您呼叫的會議已達最大支持人數。\n設備加入企業通訊錄,可支持更多方會議。\n如需更多支持請呼叫客服終端號’288288’咨詢。","CHARGE:724":"当前总并发数已达平台上限,请稍后再试","CHARGE:721":"不允許互聯網鏈路呼入!","CHARGE:601":"企業會議容量使用現在達到上限,\n無法加入會議。請聯系管理員%s%s購買更多會議端口。","CHARGE:722":"已設置啟硬終端呼叫隔離","CHARGE:606":"當前會議人數已超限,30分鐘後將自動結束。\n請加入企業通訊錄,可支持更多方會議。","CHARGE:607":"您的服務可用分鐘數不足,無法呼叫。","CHARGE:604":"終端在家僅支持4方通話,當前通話人數已超限,30分鐘後將自動結束","CHARGE:725":"請稍等,主持人稍後邀請您入會","CHARGE:605":"UNKNOWN","CHARGE:726":"您呼叫的雲會議室不允許臨時用戶呼入,請聯系管理員","SIG:506":"錄製伺服器內部錯誤","CHARGE:608":"您呼叫的會議已達最大支持人數,請聯系企業IT管理員","CHARGE:729":"已達到部門錄製並發上限,請聯系企業管理員","SIG:504":"呼叫失敗,請再試壹次","CHARGE:609":"您呼叫的會議已達最大支持人數,請聯系企業IT管理員,購買超大型雲會議室。","SIG:505":"呼叫失敗,請再試壹次","SIG:502":"呼叫失敗,請再試壹次","SIG:4999":"分享內容失敗","SIG:503":"呼叫失敗,請再試壹次","CHARGE:720":"該賬號已使用","CHARGE:712":"該雲該雲會議室已被設置為禁止被監看會議室已被設置為禁止被監看","CHARGE:713":"該終端正在參會的雲會議室被設置為禁止被監看","CHARGE:710":"不支持pstn外呼","CHARGE:711":"呼叫失敗,您的企業已禁止PSTN通話功能,請聯系您的企業管理員!","CHARGE:716":"當前用戶不在線,無法參會","CHARGE:717":"當前用戶無權限入會","CHARGE:714":"監看權限校驗超時,請重試","REC:503":"錄制服務暫時不可用,請稍後再試","CHARGE:715":"該號碼異常已被限製使用","CHARGE:718":"對方終端不允許撥打","CHARGE:719":"該賬號已登錄其它終端入會","SURV:580":"監控調度呼叫時,第三方服務報錯","REC:505":"錄制服務暫時不可用,請稍後再試","REC:506":"直播服務暫時不可用,請稍後再試","REC:507":"錄制服務暫時不可用,請稍後再試","REC:509":"錄制服務暫時不可用,請稍後再試","CHARGE:701":"企業帳戶餘額不足,無法開啟錄製。請聯系管理員充值後再嘗試","CHARGE:702":"個人云會議室不可以用,請選擇其他會議室或聯繫管理員","CHARGE:700":"企業帳戶未開通多路錄製計費服務,無法開啟錄製。請聯系客戶諮詢開通事宜","CHARGE:705":"H323融合服務器容量不足","CHARGE:703":"呼叫所用的H323集群容量不足","CHARGE:704":"H323融合服務器容量不足","SIG:408":"對方沒應答,請稍後再試","SIG:405":"對方設備不在線,請稍後重試","SIG:409":"建立多點呼叫時的內部消息","SIG:400":"通訊失敗,請升級到最新版本","SIG:403":"遠端網絡異常,呼叫已斷開","SIG:404":"對方不在線","SIG:401":"加密算法不匹配","SIG:402":"該會議室不允許關閉攝像頭,請開啟攝像頭加入會議","SURV:483":"同步會議信息失敗,請重試","SURV:482":"邀請失敗,請重試"},en_US:{"CHARGE:646":"Cloud meeting has reached the upper limit of organization's allowed incoming calls","CHARGE:647":"Terminal has reached the upper limit of allowed incoming calls","CHARGE:644":"No authority","CHARGE:645":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:648":"Terminal has reached the upper limit of organization's allowed incoming calls","CHARGE:649":"The scheduled meeting is not reached and cannot be joined","PS:400":"Cross-cloud calls are not supported","SIG:421":"Far end does not accept calls by Xiaoyu ID. Please check.","SIG:422":"You are kicked out by chairman.","SIG:420":"Invalid Number.","SIG:789":"Recording has been stopped","SIG:423":"UNKNOWN","SIG:424":"The meeting has ended.","CHARGE:642":"The call failed, and the IPPBX number of the enterprise has reached the upper limit.","CHARGE:643":"Scheduling failed, the number of enterprises monitoring and dispatching reached the upper limit","CHARGE:640":"Cloud storage of department is full and can no longer record","CHARGE:641":"Cloud storage of organization is full and can no longer record","CHARGE:635":"Account balance exhausted, you cannot initiate PSTN calls, please contact the administrator to recharge and then try again.","CHARGE:636":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:633":"The number can not be dialed out. The endpoint is only authorized to call the number on the contact list","CHARGE:634":"Account balance Payment scope is not available for PSTN calls, please contact the administrator to open and then try again.","CHARGE:639":"Cloud storage of user is full and can no longer record","MC:504":"Failed to join the meeting due to limited cascade resources.","CHARGE:637":"Cloud meeting has reached the upper limit of department's allowed incoming calls","CHARGE:638":"Cloud meeting has reached the upper limit of organization's allowed incoming calls","SIG:419":"Far end has turned on office mode. Please slide to call.","SIG:416":"Current calls have reached the max limit, please try again later.","SIG:417":"Password entry timeout.","SIG:410":"Call is not connected. Please retry.","SIG:4445":"Cloud storage of user is full and can no longer record","SIG:411":"version is too old.","SIG:4446":"Cloud storage of department is full and can no longer record","SIG:4443":"UNKNOWN","SIG:4444":"UNKNOWN","SIG:414":"Password error number reached 3 times, please try again later.","SIG:4449":"The type of sharing content is invalid.","SIG:415":"Synchronization call information failed. Please try again later.","SIG:412":"version is too old.","SIG:4447":"Cloud storage of organization is full and can no longer record","SIG:413":"Far end is in Do Not Disturb mode.","SIG:4448":"Unknown error.","SIG:4441":"Record is time out. Please retry later.","CHARGE:631":"This meeting room is charged by the minutes of the attendees. While your account balance has been exhausted, you cannot initiate a meeting in this meeting room, please contact your administrator to recharge or select another cloud meeting room.","SIG:4442":"UNKNOWN","CHARGE:632":"The endpoint is not authorized to dial out by admin.","SIG:4440":"Sharing content is time out. Please retry later.","CHARGE:630":"The current meeting does not allow non-address book members to call in.","CHARGE:624":"Call failed. The port service of the terminal you called has expired.","CHARGE:625":"This conference port service has expired and cannot support multi-party calls.","CHARGE:622":"No monitoring permission","CHARGE:623":"Call failed. The port service of this terminal has expired, and you cannot use this terminal to join cloud meeting room or multiparty call.","REC:511":"Xiaoyu recording service is not available, please try again later","CHARGE:628":"The meeting ID you called does not allow anonymous users to call in, Please log in or register and call again.","REC:512":"Xiaoyu recording service is not available, please try again later","CHARGE:629":"Far end is in the meeting which does not allow non-address book members to call in,please retry later.","CHARGE:626":"This conference port service has expired, and no more people can be invited.","CHARGE:627":"The meeting ID you called does not allow non-address book members to call in, please contact the administrator of the meeting room.","SIG:1503":"Allocating resource for survelliance failed.","SIG:4456":"The network is disconnected, please try joining the meeting again.","SIG:4457":"Wrong number, please check it and retry.","SIG:441":"Current calls have reached the max limit of gateway, please try again later.","SIG:4454":"No related call, please check and retry later.","SIG:4455":"No connection with server, please retry later.","SIG:445":"UNKNOWN","SIG:1501":"shuttle Get MA failed","SIG:4458":"Network unstable, call disconnected.","SIG:1502":"shuttle Get media resource failed","SIG:4459":"Wrong number, please check it and retry.","SIG:4452":"Record failed.","CHARGE:620":"You don't belong to an organization,and you cannot call H.323 device","CHARGE:741":"The enterprise account does not enable the public cloud MCU cascading service,so you can't initiate calls.","SIG:440":"The password of conference is wrong. Please retry.","SIG:4453":"Call exists, please retry later.","CHARGE:621":"Call failed, insufficient H.323 port of your organization","CHARGE:742":"Current session is full,please contact the administrator to purchase capacity expansion.","SIG:4450":"Sharing content is unsupported.","SIG:4451":"Sharing content failed for no bandwidth.","CHARGE:740":"The enterprise account balance is insufficient,and the public cloud MCU cascading service cannot be used to initiate calls.","CHARGE:613":"UNKNOWN","CHARGE:734":"The current total number of recording has reached the platform limit, please try again later","CHARGE:614":"UNKNOWN","CHARGE:611":"UNKNOWN","CHARGE:732":"The current total number of ippbx has reached the platform limit, please try again later","REC:400":"Internal errors in signaling and recording services.","CHARGE:612":"UNKNOWN","CHARGE:733":"Call failed, The terminal you call does not belong to your call range.","REC:401":"Xiaoyu recording service is not available, please try again later","CHARGE:617":"UNKNOWN","REC:402":"Xiaoyu recording service is not available, please try again later","CHARGE:618":"UNKNOWN","REC:403":"Xiaoyu recording service is not available, please try again later","CHARGE:615":"UNKNOWN","REC:404":"Record is not found.","CHARGE:616":"The meeting is locked, failed to join. Please contact meeting originator to unlock and join.","REC:405":"Xiaoyu recording service is not available, please try again later","CHARGE:619":"Call failed. The video service of the terminal has expired, please contact IT Admin to renew.","SIG:432":"UNKNOWN","SIG:433":"UNKNOWN","SIG:430":"Content cannot be shared before meeting is started.","SIG:431":"Failed to allocated resources for content sharing.","SIG:4466":"Check password timeout","REC:406":"Xiaoyu recording service is not available, please try again later","SIG:4460":"Wrong number, please check it and retry.","CHARGE:730":"Cloud meeting has reached the upper limit of department's allowed incoming calls","CHARGE:610":"Call failed. PSTN call is disabled, please contact your enterprise admin!","CHARGE:731":"The current total number of h323 has reached the platform limit, please try again later","SIG:4461":"Wrong number, please check it and retry.","SIG:1404":"UNKNOWN","SIG:469":"Recording is in progress, do not repeat the recording","CHARGE:441":"Current calls have reached the max limit of gateway, please try again later.","SIG:461":"Local storage will be used up soon.","SIG:462":"Local storage is used up.","SIG:580":"Failed to make PSTN call.","REC:465":"Record is started. Not allow repeated record.","CHARGE:677":"The current total number of ipc has reached the platform limit, please try again later","REC:466":"Xiaoyu recording service is not available, please try again later.","REC:467":"The maximum number of recordings has been reached and you cannot start recording","REC:468":"Storage space not available, cannot .","REC:469":"UNKNOWN","REC:460":"You don't have recording permission.","REC:463":"Storage space not available, cannot .","SIG:456":"Call is not connected. Please retry.","CHARGE:671":"The meeting did not start,please wait for the host to start the meeting","CHARGE:672":"Has been removed from this meeting and cannot join","CHARGE:670":"You have a meeting in progress, please end the meeting first","SIG:450":"Your device does not support this type of call.","CHARGE:675":"No video surveillance service available","CHARGE:676":"Video surveillance service exceeds limit","CCC:501":"Database operate error","CHARGE:673":"The video surveillance service has expired","CCC:500":"Internal server error","CHARGE:674":"Video surveillance services lack enterprise ownership","CHARGE:668":"The meeting has not been approved or the scheduled start time is not reached and cannot be joined","CHARGE:669":"P2P call prohibited by administrator","CHARGE:666":"The maximum number of participants approved by the meeting has been exceeded\t","CHARGE:667":"The maximum number of participants approved by the meeting has been exceeded","CHARGE:10000":"Participant information has been changed, unable to join the meeting.","SIG:487":"Call is canceled.","SIG:488":"The trial has expired. Xiaoyu stops service.","SIG:485":"Reach max duration. Call ended","SIG:486":"Far end busy. Please retry later.","CHARGE:660":"The other enterprise account balance is insufficient to initiate SDK calls","SIG:480":"Call is not connected. Please retry.","CHARGE:661":"The other enterprise account has not yet enabled mini-program SDK call service","SIG:483":"PSTN call in this region is not supported.","CHARGE:664":"PSTN calling has reached the upper limit of department's allowed incoming calls","SIG:484":"Telephone minutes exhausted, you cannnot transfer your mobile phone number. Please contact the IT administrator to recharge in time","CHARGE:665":"Xiaoyu service is expired. Please update your license key.","CHARGE:420":"Incorrect Number.","CHARGE:662":"The other enterprise account balance is insufficient to initiate mini-program SDK calls","SIG:482":"The invitation failed, please try again","CHARGE:415":"Xiaoyu service is expired. Please update your license key.","CHARGE:657":"The enterprise account balance is insufficient to initiate mini-program SDK calls","CHARGE:416":"Current calls have reached the max limit, please try again later.","CHARGE:658":"Web client has reached the upper limit of organization's allowed incoming calls","CHARGE:655":"The enterprise account balance is insufficient to initiate SDK calls","CHARGE:414":"H.323 access service has expired","CHARGE:656":"The enterprise account has not yet enabled mini-program SDK call service","CHARGE:659":"The other enterprise account has not yet enabled SDK call service","STATE:200":"成功","SIG:598":"Call is not connected. Please retry.","SIG:599":"Signaling message format is not valid.","SIG:479":"The number of content share has exceeded the max limit, please retry after other participants stop the content share.","CHARGE:650":"The number of h.323 parties has reached the upper limit of the cloud conference room","CHARGE:653":"The meeting you are calling does not support the mini-program call-in service , please use app to join the meeting or contact the conference administrator","CHARGE:654":"The enterprise account has not yet enabled SDK call service","CHARGE:651":"The number of h.323 parties has reached the upper limit of department's allowed incoming calls","CHARGE:652":"The scheduled meeting has expired and cannot be joined","SIG:704":"Call is not connected. Please retry.","SIG:703":"Call is not connected. Please retry.","SIG:708":"You don't have whiteboard sharing permission.","SIG:709":"Meetings cannot be merged","SIG:706":"You don't have content labeling permission","SIG:707":"You don't have dual-stream sharing permissions","CHARGE:481":"You are not allowed to call this Xiaoyu.","CCC:415":"Same seat name is exist","CCC:414":"Seat is not exist","CCC:417":"IVR config is already exist","CCC:416":"Seat id is invalid","CCC:419":"IVR config id is invalid","CCC:418":"IVR config is not exist","SIG:498":"UDP is blocked by the network. Please call administrator or switch to another network.","SIG:499":"Network unstable, call disconnected.","SIG:496":"Media Timeout","SIG:497":"Signal Timeout","SIG:490":"Far end did not answer.MEDIA_TIMEOUT","CHARGE:473":"Current session is full. Please use cloud meeting room to have more people in the same conference. \nDownload XYLink App and register account to get free cloud meeting room.","SIG:491":"","CHARGE:474":"Current session is full. \nPlease purchase more cloud meeting ports.","CCC:420":"The service number is temporarily unavailable. Please try later.","CHARGE:471":"Current session is full. Please use Xiaoyu or cloud meeting room to have multi-party video conference.","CHARGE:472":"Call cannot be connected. Xiaoyu Home can only support 4 people in the same call.","CHARGE:477":"The meeting is full. Please contact the enterprise administrator to purchase or use the super large cloud conference room.","CCC:421":"The service number is not exist","CHARGE:478":"No sufficient available phone minutes to make calls.","CHARGE:475":"Current session is full. Please recharge for your enterprise account or purchase more cloud meeting ports.","CHARGE:476":"The meeting is full. Please contact the enterprise administrator to purchase or use the super large cloud conference room.","CCC:404":"The service number is temporarily unavailable. Please try later.","CCC:403":"The service number is temporarily unavailable. Please try later.","CCC:406":"Parameter is invalid","CCC:405":"The service number is temporarily unavailable. Please try later.","CHARGE:469":"The usage of service resources has reached the limit, please try again later! ","REC:478":"The recording is interrupted, the Network is connecting, please try again later","CCC:408":"Enterprise is not exist","REC:479":"The recording is interrupted, the service is restarting, please try again later","CCC:407":"Enterprise is already exist","CCC:409":"Enterprise Id is invalid","SIG:726":"This number is abnormal and has been restricted. ","SIG:727":"Call is not connected. Please retry.","SIG:724":"You have been forced to join a new meeting","SIG:725":"Call is not connected. Please retry.","REC:470":"No recording server available, please try again later","SIG:722":"Loss of connection between device and pairing terminal","SIG:723":"Loss of connection between device and dispatch service","SIG:720":"Please wait a moment, the chairman will invite you to join the conference later.","SIG:721":"The conference has not started. Please wait the chairman to join the conference.","CCC:411":"Service number is not exist","CCC:410":"Service number is exist","CHARGE:467":"The maximum number of recordings has been reached and you cannot start recording","CCC:413":"Seat is already exist","CHARGE:464":"License is needed to start recording, please contact IT administrator to purchase or renewal recording service.","CHARGE:20001":"The meeting room has no permission to invite this device to join","CCC:412":"Service number is invalid","CHARGE:20000":"No permission to call this device","CHARGE:459":"No sufficient balance in your enterprise account. \nPlease contact IT administrator %s%s to recharge.","CHARGE:457":"No sufficient phone minutes. Please recharge or contact IT administrator to enable enterprise account.","CHARGE:458":"phone calls are not supported. Please contact IT administrator to enable enterprise account and create enterprise contacts.","SIG:716":"Network unstable, call disconnected.","SIG:713":"Failed to allocated resources for content sharing.","REC:480":"Recording failed, because the cloud meeting room single recording mode is enabled","SIG:714":"Failed to allocated resources for content sharing.","REC:481":"The recording is interrupted, the Network is connecting, please try again later","SIG:719":"Call is not connected. Please retry.","SIG:717":"The conference has exceeded the maximum call duration limit and switched to voice call mode,could contact the admin to deal with","SIG:718":"Voice call mode restrictions have been lifted","SIG:711":"Content cannot be shared before meeting is started.","SIG:712":"Content cannot be shared before meeting is started.","CHARGE:451":"Your system does not support this type of call.","CHARGE:452":"Your cloud meeting room does not support inviting phone calls. \nPlease contact IT administrator to enable enterprise account \nand create enterprise contacts.","CHARGE:450":"Your device does not support this type of call.","CCC:400":"The service number is temporarily unavailable. Please try later.","CHARGE:455":"International phone calls are not supported.","CCC:402":"The service number is temporarily unavailable. Please try later.","CHARGE:453":"Insufficient.","CCC:401":"The service number is temporarily unavailable. Please try later.","CHARGE:454":"Insufficient.","CHARGE:602":"The current number of calls has reached the upper limit, and you cannot join","CHARGE:723":"The enterprise has set up user call isolation","CHARGE:603":"Current session is full. \nPlease contact IT administrator to enable enterprise account to support more participants. \nCall XiaoYu service 288288 for more information","CHARGE:724":"The current total number of concurrency has reached the platform limit, please try again later","CHARGE:721":"Incoming calls from Internet links are not allowed!","CHARGE:601":"Meeting capacity is over limit. \nPlease contact IT administrator %s%sto purchase more meeting resources.","CHARGE:722":"The enterprise has set up hardware terminal call isolation","CHARGE:606":"The current number of meetings has been overrun and will be automatically terminable in 30 minutes. \n please join the address book to support more party meetings.","CHARGE:607":"Your service is not available enough to call.","CHARGE:604":"The terminal supports only 4 Party calls at home. The number of calls is now out of line, and will automatically end in 30 minutes.","CHARGE:725":"Please wait a moment, the chairman will invite you to join the conference later.","CHARGE:605":"UNKNOWN","CHARGE:726":"The meeting ID you called does not allow temporary users to call in, please contact the administrator!","SIG:506":"Internal error on the recording server.","SIG:504":"Call is not connected. Please retry.","CHARGE:608":"Current session is full. \nPlease contact IT administrator","CHARGE:729":"The recording concurrency of the department has reached the limit, please contact the admin!","SIG:505":"Call is not connected. Please retry.","CHARGE:609":"Current session is full. \nPlease contact IT administrator to purchase super-large meeting service","SIG:502":"Call is not connected. Please retry.","SIG:4999":"Sharing content failed.","SIG:503":"Call is not connected. Please retry.","CHARGE:720":"This account has been used","CHARGE:712":"The cloud conference room has been set to prohibit monitoring","CHARGE:713":"The cloud conference room that the terminal is participating in is set to prohibit monitoring","CHARGE:710":"Don't support pstn outbound calls","CHARGE:711":"Call failed. PSTN call is disabled, please contact your enterprise admin!","CHARGE:716":"The user is offline, unable to join the meeting.","CHARGE:717":"The current user has no permission to join","CHARGE:714":"Monitoring permission verification timed out, please try again","REC:503":"Xiaoyu recording service is not available, please try again later","CHARGE:715":"This number is abnormal and has been restricted.","CHARGE:718":"Far end does not accept calls","CHARGE:719":"This account has been logged into other terminals to join","SURV:580":"Failed to make IPC call.","REC:505":"Xiaoyu recording service is not available, please try again later","REC:506":"Live service is not available, please try again later","REC:507":"Xiaoyu recording service is not available, please try again later","REC:509":"Xiaoyu recording service is not available, please try again later","CHARGE:701":"The account balance of your enterprise is insufficient,so you can't initiate a recording. Please contact your administrator to recharge and try again","CHARGE:702":"Personal cloud conference room is not available. Please choose another conference room or contact the administrato","CHARGE:700":"The enterprise account does enable multi-recording service charge,so you can't initiate a recording. Please contact customer service for opening","CHARGE:705":"Call failed, insufficient H.323 port of your organization","CHARGE:706":"Cloud meeting has reached the upper limit of allowed incoming calls","CHARGE:703":"Call failed, the capacity of the H323 cluster used by the call is insufficient.","CHARGE:704":"Call failed, insufficient H.323 port of your organization","SIG:408":"Far end no answer. Please retry later.","SIG:405":"Far end device is not online. Please call again later.","CHARGE:707":"Cloud storage of user is full and can no longer record","SIG:409":"Internal message.","SIG:400":"Failed to connect. Please upgrade to laster version.","SIG:403":"Far end network unstable. Call is disconnected.","SIG:404":"Far end is offline.","SIG:401":"Encryption match failed","SIG:402":"It is not allowed to turn off the camera in this meeting room. Please turn on camera to join the meeting","SURV:483":"Failed to synchronize meeting information. Please try again","SURV:482":"The invitation failed, please try again"}},ee="zh_CN",te=function(){var e=new Date;return"".concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds()," ").concat(e.getMilliseconds())},ne=function(){var e=new Date;return"".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds()," ").concat(e.getMilliseconds())},re=function(e,t){var n=t-e;return Math.floor(n/864e5)};var ie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{code:e,msg:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")||J[ee][e],detail:t}},oe=function(e,t,n){return t?{success:e,data:{code:t,msg:n||J[ee][t]}}:{success:e,data:{}}},ae={isNumber:function(e){return"number"==typeof e},isObject:function(e){return"[object object]"===Object.prototype.toString.call(e).toLocaleLowerCase()},isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isUndefined:function(e){return void 0===e},isLetter:function(e){return/^[a-zA-Z]+$/.test(e)},isChinese:function(e){return/^[\u4e00-\u9fa5]+$/.test(e)},isNumberText:function(e){return/^[0-9]+$/.test(e)},isSpecialChar:function(e){return/^[^\u4e00-\u9fa5a-zA-Z0-9]+$/.test(e)},isWhiteSpace:function(e){return/^\s+$/.test(e)}};function se(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(2772),n(1249),n(1058);var ce,ue,le,he,fe,de,pe,ve,ge,me=function(){var e=navigator.userAgent,t=e.toLocaleLowerCase(),n=navigator.platform.toUpperCase().indexOf("MAC")>=0||/macintosh|mac os x/i.test(e),r=navigator.platform.toUpperCase().indexOf("LINUX")>=0,i=/(?:win)/.test(e),o=/(?:Windows Phone)/.test(e),a=/(?:SymbianOS)/.test(e)||o,s=/(?:Android)/.test(e)||t.indexOf("harmony")>-1,c=/(?:Firefox)/.test(e),u=/(?:Chrome|CriOS)/.test(e)&&!(e.indexOf("Edg")>-1),l=e.indexOf("Edg")>-1,h=e.indexOf("Safari")>-1&&!(e.indexOf("Chrome")>-1),f=/iPad/i.test(e)||e.indexOf("MacIntel")>-1&&navigator.maxTouchPoints>1||e.indexOf("Macintosh")>-1&&navigator.maxTouchPoints>1,d=/(?:iPad|PlayBook)/.test(e)||s&&!/(?:Mobile)/.test(e)||c&&/(?:Tablet)/.test(e),p=/(?:iPhone)/.test(e)&&!d,v=!(p||s||a||f),g=e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1||e.indexOf("baiduboxapp")>-1,m=!!t.match(/firefox/)||e.indexOf("Firefox")>-1,y=!!t.match(/tencenttraveler/)||!!t.match(/qqbrowse/)||e.indexOf("QQ/")>-1||e.indexOf("MicroMessenger")>-1,b=e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,S=e.indexOf("HuaweiBrowser")>-1;return{isTablet:d,isPhone:p,isAndroid:s,isPc:v,isMac:n,isWindows:i,isIPad:f,isChrome:u,isLinux:r,isFirefox:m,isBaidu:g,isQQ:y,isOpera:b,isZhazha:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1||e.indexOf("360SE")>-1||e.indexOf("360EE")>-1||e.indexOf("LBBROWSER")>-1||e.indexOf("UC")>-1||e.indexOf("UBrowser")>-1||e.indexOf("UCWEB")>-1||e.indexOf("Quark")>-1||e.indexOf("MiuiBrowser")>-1||e.indexOf("AliApp(TB")>-1||e.indexOf("Weibo")>-1||e.indexOf("IqiyiApp")>-1||e.indexOf("HuaweiBrowser")>-1||e.indexOf("HUAWEI")>-1||e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1||e.indexOf("SE")>-1||e.indexOf("Maxthon")>-1||e.indexOf("The world")>-1||e.indexOf("MetaSr")>-1||e.indexOf("2345Explorer")>-1||e.indexOf("TencentTraveler")>-1||e.indexOf("Mb2345Browser")>-1,isEdge:l,isSafari:h,isHuaweiBrowser:S}},ye=!me().isPc,be=me(),Se=D.RS90,we=D.RS180,Ee=D.RS360,xe=D.RS720,Ce=D.RS1080,ke=B.COMMON,Oe=B.ADVANCED,Ie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(be.isFirefox)return{};var r={frameRate:e};if(t===Oe&&ae.isNumber(e)){r=n?{frameRate:{ideal:e,max:e}}:{frameRate:{min:e-5,exact:e,max:e}}}return r},Ae=Object.assign({width:640,height:360,resizeMode:"crop-and-scale"},Ie(15)),_e=Object.assign({cursor:"always",logicalSurface:!0},Ae),Te={channelCount:1,autoGainControl:!0,noiseSuppression:!0,echoCancellation:!0},Re=(se(le={},xe,(se(ce={},ke,{video:Object.assign(Object.assign(Object.assign({},Ae),Ie(15)),{width:1280,height:720}),audio:!0}),se(ce,Oe,{video:Object.assign(Object.assign(Object.assign({},Ae),Ie(15,Oe,!0)),{width:{ideal:1280,max:1280},height:{ideal:720,max:720}}),audio:!0}),ce)),se(le,Ce,(se(ue={},ke,{video:Object.assign(Object.assign(Object.assign({},Ae),Ie(15)),{width:1920,height:1080}),audio:!0}),se(ue,Oe,{video:Object.assign(Object.assign(Object.assign({},Ae),Ie(15,Oe,!0)),{width:{ideal:1920,max:1920},height:{ideal:1080,max:1080}}),audio:!0}),ue)),le),De=(se(ge={},Se,(se(he={},ke,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15)),{width:160,height:90}),audio:Te}),se(he,Oe,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15,Oe)),{width:{min:160,ideal:160,max:160},height:{min:90,ideal:90,max:90}}),audio:Te}),he)),se(ge,we,(se(fe={},ke,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15)),{width:320,height:180}),audio:Te}),se(fe,Oe,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15,Oe)),{width:{min:320,ideal:320,max:320},height:{min:180,ideal:180,max:180}}),audio:Te}),fe)),se(ge,Ee,(se(de={},ke,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15)),{width:640,height:360}),audio:Te}),se(de,Oe,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(15,Oe)),{width:{min:640,ideal:640,max:640},height:{min:360,ideal:360,max:360}}),audio:Te}),de)),se(ge,xe,(se(pe={},ke,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(30)),{width:1280,height:720}),audio:Te}),se(pe,Oe,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(30,Oe)),{width:{min:1280,ideal:1280,max:1280},height:{min:720,ideal:720,max:720}}),audio:Te}),pe)),se(ge,Ce,(se(ve={},ke,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(30)),{width:1920,height:1080}),audio:Te}),se(ve,Oe,{video:Object.assign(Object.assign(Object.assign({},_e),Ie(30,Oe)),{width:{min:1920,ideal:1920,max:1920},height:{min:1080,ideal:1080,max:1080}}),audio:Te}),ve)),ge),Ne={"90P":0,"180P":1,"360P":2,"720P":3,"1080P":4,"4K":5,Num:6},Le={180:0,360:0,720:0},Me="pc",Pe="mobile",je="sideBar",Be="professional",Ue=17,Ge=9999999999,Ke=13333,He=["XYSDK:950401","XYSDK:950402","XYSDK:950403","XYSDK:950404","XYSDK:950405","XYSDK:950406"],Fe=["XYSDK:950403","XYSDK:950405","XYSDK:950406"],Ve=_.FAILED,Ye=_.DISABLED,ze=_.NORMAL,We=_.UNKNOWN,Xe=[Ve,Ye],qe=[We,ze],$e=[ze],Ze=[R.REMOTE,R.CONTENT],Je=["CONFNO","HARD","TVBOX","BRUCE","DESK","SOFT","H323","GROUP"],Qe=[0,1,2],et=[0,1,2,3,4,5],tt={none:0,wifi:1,"3g":2,wired:3,"2g":4,"4g":5,wwan:6,"3g_china_mobile":7},nt={muteAudio:{type:"AUDIO_MUTE",enabled:!1,reportEventType:"audioMute"},muteVideo:{type:"VIDEO_MUTE",enabled:!1,reportEventType:"videoMute"},unmuteAudio:{type:"AUDIO_UN_MUTE",enabled:!0,reportEventType:"audioUnmute"},unmuteVideo:{type:"VIDEO_UN_MUTE",enabled:!0,reportEventType:"videoUnmute"}},rt={bundlePolicy:"max-bundle",iceCandidatePoolSize:0,iceServers:[],iceTransportPolicy:"all",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"},it={OK:"STATE:200",SERVER_INNER_ERROR:"SIG:4448",PEER_NET_DISCONNECT:"SIG:403",LOCAL_NET_DISCONNECT:"SIG:499"},ot={CLIENT_TYPE:"webrtc",INIT_INTERNALS:{bytesReceived:0,bytesReceivedSecond:0,bytesSent:0,bytesSentSecond:0,jitterSent:0,jitterReceived:0,audioSendJitter:0,roundTripTime:0,fractionLostSent:0,fractionLostReceived:0,mimeType:"video/H264",audioMimeType:"audio/opus",timestamp:0,receiver:{},sender:{},audioReceiver:{},audioSender:{}},RESOLUTION:1,ROSTER:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""},SELF_MOCK_PID:Ge,HOR_CONTAINER_RATIO:1.778,VER_CONTAINER_RATIO:.5625,RATIO_MAP:{0:0,1:90,2:180,3:270},MAP_RESOLUTION_INDEX:{90:0,180:1,360:2,720:3,1080:4},RESOLUTION_MAP:{0:90,1:180,2:360,3:720,4:1080},VIDE_BANDWIDTH_BIT:1e3,VIDE_FRAMERATE_BIT:15,LOGIN_INFO:{callUri:"",securityKey:"",access_token:"",refresh_token:"",id:0,displayName:""},LAYOUT:{position:[],resolution:0,rotate:0,quality:0,state:"NORMAL",roster:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""}},MAP_RESOLUTION_STRING:{90:{width:160,height:90},180:{width:320,height:180},360:{width:640,height:360},720:{width:1280,height:720},1080:{width:1920,height:1080}},CONF_INFO:{participantCount:0,totalEpCount:0,chairManUrl:"",contentUri:"",actSpkUri:"",mediaGroupInfo:[]},CLOUD_ROOOM_INFO:{meetingControlPassword:"",meetingNumber:"",password:""},CONFERENCE_INFO:{callNumber:"",callUrl:"",deviceId:"",deviceType:"",displayName:"",number:"",numberType:"",confAuxProperties:{watermarkContent:""},avatar:"",inviteInfo:{displayName:"",inEnterprise:!0,inviteAppUrl:"",inviteUrl:"",invokSchema:"",linkNumber:"",mobileWebrtcVisibleSetting:!0,number:"",password:"",pstnNumber:"",shareUrl:"",userAvatar:"",userName:"",userProfileId:"",voiceNumber:"",webrtcSetting:!0,webrtcUrl:""}},MAX_PEOPLE_RESOLUTION:D.RS720},at=["SPEAKER","GALLERY"],st=["MULTI_PIC_CONTENT_HIGH_PRIORITY","MULTI_PIC_ACTIVE_HIGH_PRIORITY","TWO_PIC_PIP","CONTENT_ONLY","TWO_PIC_SYMMETRIC"],ct="SPEAKER",ut="MULTI_PIC_CONTENT_HIGH_PRIORITY",lt="standardWebRtc",ht="thirdWebRtc",ft={muteAudio:"audioMute",unmuteAudio:"audioUnmute",muteVideo:"videoMute",unmuteVideo:"videoUnmute"},dt={0:"",1:"HIDE",2:"SDKMonitor+hide"},pt=["HIDE","SDKMonitor+hide"],vt=["Chinese","English"],gt={enableMeetingShout:!1,enableV2States:!0,enableCheckRecordPermission:!1,enableBandwidthSetting:!1,enableMeetingInvite:!1,enableMeetingOwner:!1,enableAutoResizeLayout:!0,enableLowResolution:!1,enableSpeakerInfo:!1,enableLayoutAvatar:!1,enableMobileNotAuth:!1,enableWatermarkContent:!0},mt={dbName:"XYRTC_LOG",tableName:"LOG",dbVersion:1,tableCount:1,tableIndex:1,schema:"++id,t,c",maxSize:2e5,detectTimer:3e5,deleteDBNames:[],isUpdateVersion:!1,enableClearTable:!0},yt=[k.FRONT,k.BACK],bt={clientConfigName:"RemoteSDKConfig",configName:"downLinkCeilingRate"},St={clientConfigName:"RemoteSDKConfig",configName:"upLinkCeilingRate"},wt={clientConfigName:"mediaConfig",configName:"pvrxResolution"},Et=(n(9714),n(9653),n(6977),"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)),xt=new Uint8Array(16);function Ct(){if(!Et)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Et(xt)}for(var kt=[],Ot=0;Ot<256;++Ot)kt[Ot]=(Ot+256).toString(16).substr(1);const It=function(e,t){var n=t||0,r=kt;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};const At=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||Ct)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||It(i)};var _t=n(3792),Tt=n.n(_t),Rt=n(1354),Dt=n.n(Rt),Nt=(n(7941),n(9669)),Lt=n.n(Nt),Mt="3.9.0 - build on 2023-07-18 17:08",Pt=window.location,jt=Pt.protocol,Bt=void 0===jt?"https:":jt;"localhost"===Pt.hostname&&(Bt="https:");var Ut={"https:":"wss:","http:":"ws:"},Gt={wssProtocol:Ut[Bt],protocol:Bt,host:"cloudapi.xylink.com",logHost:"log.xylink.com"},Kt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ht={errorCode:10002e3};const Ft=function(){function e(n){var r=this;c(this,e),this.assignOptions=function(e){return Object.assign({},r.commonOption,e,{params:Object.assign({},r.commonOption.params,e&&e.params)})},this.get=function(e,t){return r.axios.get(e,r.assignOptions(t)).catch((function(e){return e}))},this.put=function(e,t,n){return r.axios.put(e,t,r.assignOptions(n)).catch((function(e){return e}))},this.post=function(e,t,n){return r.axios.post(e,t,r.assignOptions(n)).catch((function(e){return e}))},this.delete=function(e,t){return r.axios.delete(e,r.assignOptions(t)).catch((function(e){return e}))},this.commonOption=n,this.tokenInfo=null,this.logger=null,this.baseUrl="",this.clientId="",this.clientSecret="",this.retryCount=0;var i="";try{i=(Mt.split("- build on")[0]||"").split("-")[0]}catch(e){}var o=Object.assign(Object.assign({},n),{headers:{"n-ua":"PL=webrtc-sdk&AV=1.0.0&DR=&RL=&MF=&MO=web&OS=web-sdk&XYClientVersion=".concat(i,"&API=&LCLO=&LCLA=&CK=")}});Lt().defaults.timeout=1e4,this.axios=Lt().create(o),this.axios.interceptors.request.use((function(e){var t=Math.ceil(1e4*Math.random());return e.url.includes("random=")||(e.url.includes("?")?e.url+="&random=".concat(t):e.url+="?random=".concat(t)),r.setHttpConfig(e),r.logger&&r.logger.log("[http] request:",e.url),e})),this.axios.interceptors.response.use((function(e){return r.logger&&r.logger.log("[http] response:",null==e?void 0:e.data),e}),(function(e){return Kt(r,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger&&this.logger.log("[http] response error:",e),!e.response){t.next=24;break}if(s=e.response||{},c=s.status,u=s.data,401!==c||(null==u?void 0:u.errorCode)!==Ht.errorCode){t.next=24;break}if(!(this.retryCount>=1)){t.next=7;break}return this.retryCount=0,t.abrupt("return",Promise.reject(Ht));case 7:return t.prev=7,t.next=10,this.refreshToken({baseURL:e.config.baseURL});case 10:if(!(l=t.sent)){t.next=18;break}return h=l.access_token,null===(r=this.logger)||void 0===r||r.log("[http] error.config pre:",e.config),(null===(i=e.config.params)||void 0===i?void 0:i.token)&&(e.config.params.token=h),(null===(o=e.config.data)||void 0===o?void 0:o.includes("token"))&&(f=JSON.parse(e.config.data),e.config.data=JSON.stringify(Object.assign(f,{token:h})),null===(a=this.logger)||void 0===a||a.log("[http] error.config new:",e.config)),this.axios.defaults.headers.post["Content-Type"]="application/json",t.abrupt("return",this.axios.request(e.config));case 18:t.next=24;break;case 20:return t.prev=20,t.t0=t.catch(7),this.retryCount=0,t.abrupt("return",Promise.reject(Ht));case 24:return t.abrupt("return",Promise.reject(e.response));case 25:case"end":return t.stop()}}),n,this,[[7,20]])})))}))}return f(e,[{key:"refreshToken",value:function(e){var n,r=e.baseURL,i=void 0===r?this.baseUrl:r,o=e.refresh_token,a=void 0===o?"":o;return Kt(this,void 0,void 0,t().mark((function e(){var r,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=a||(null===(n=this.tokenInfo)||void 0===n?void 0:n.refresh_token)){e.next=3;break}return e.abrupt("return",Promise.reject(Ht));case 3:return e.prev=3,e.next=6,Lt()({method:"post",baseURL:i,url:"admin/login/refresh_token",timeout:5e3,headers:{"x-xy-clientid":this.clientId},data:{refresh_token:a}});case 6:if(!(r=e.sent)||200!==r.status){e.next=13;break}return o=r.data.data,this.tokenInfo=o,e.abrupt("return",Promise.resolve(o));case 13:return e.abrupt("return",Promise.reject(Ht));case 14:e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(3),e.abrupt("return",Promise.reject(Ht));case 19:case"end":return e.stop()}}),e,this,[[3,16]])})))}},{key:"setLogger",value:function(e){this.logger=e}},{key:"setBaseUrl",value:function(e){var t=this;e!==this.baseUrl&&delete this.axios.defaults.headers.authorization,this.baseUrl=e,this.axios.interceptors.request.use((function(e){return e.baseURL=t.baseUrl,e}),(function(e){return Promise.reject(e)}))}},{key:"setClientInfo",value:function(e){var t=e.clientId,n=e.clientSecret;this.clientId=t,this.clientSecret=n}},{key:"setHttpConfig",value:function(e){if(1===e.sign){var t=e.method,n=void 0===t?"GET":t,r=e.data,i=e.url,o=void 0===i?"":i,a=e.params,s=e.clientId,c=void 0===s?this.clientId:s,u=e.clientSecret,l=void 0===u?this.clientSecret:u,h="";Object.keys(a).map((function(e){h&&(h+="&"),h+="".concat(e,"=").concat(encodeURIComponent(a[e]))}));var f=h?o+"&"+h:o,d=this.tokenInfo||{access_token:""},p=d.access_token,v=void 0===p?"":p,g=d.signSecret,m="string"==typeof r?r:JSON.stringify(r)||"",y={method:n.toLocaleUpperCase(),body:m,url:f,clienttype:ot.CLIENT_TYPE,clientId:c,clientSecret:l,token:v,signSecret:g};e.headers=Object.assign(Object.assign({},e.headers),this.getApiHeader(y))}}},{key:"getApiHeader",value:function(e){var t=e.method,n=e.url,r=e.body,i=void 0===r?"":r,o=e.clientId,a=void 0===o?"":o,s=e.clienttype,c=void 0===s?"":s,u=e.clientSecret,l=void 0===u?"":u,h=e.signSecret,f=void 0===h?"":h,d=e.token,p=void 0===d?"":d,v=Math.random(),g=(new Date).getTime(),m=Dt().MD5(i).toString(),y="x-xy-clientid=".concat(a,"&x-xy-nonce=").concat(v,"&x-xy-signtype=HMAC_SHA256&x-xy-timestamp=").concat(g),b=(f||l)+"&",S="".concat(t.toLocaleUpperCase(),"\n").concat(y,"\n").concat(n,"\n").concat(m,"\n").concat(b),w=Dt().HmacSHA256(S,b).toString().toLocaleUpperCase();return Object.assign({"x-xy-clientid":a,"x-xy-clienttype":c,"x-xy-nonce":v,"x-xy-timestamp":g,"x-xy-signtype":"HMAC_SHA256","x-xy-sign":w,"x-xy-signatureversion":"2.0"},p&&{Authorization:"Bearer ".concat(p||"")})}},{key:"setTokenInfo",value:function(e){this.tokenInfo=e}},{key:"getTokenInfo",value:function(){return this.tokenInfo}}]),e}();var Vt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Yt=function(){function e(){c(this,e),this.httpDefaultBaseUrl="".concat(Gt.protocol,"//").concat(Gt.host),this.logHttpDefaultBaseUrl="".concat(Gt.protocol,"//").concat(Gt.logHost),this.http=new Ft({baseURL:this.httpDefaultBaseUrl,timeout:2e4,sign:1}),this.logHttp=new Ft({baseURL:this.logHttpDefaultBaseUrl,timeout:2e4,sign:0}),this.meetingInfo={meetingId:"",callUri:"",vcNumber:""},this.seqId=0,this.statesTime={timeDiff:0},this.commonParams={securityKey:""},this.randomDeviceSN=At()}return f(e,[{key:"setBaseUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e&&this.http.setBaseUrl(e),t&&this.logHttp.setBaseUrl(t)}},{key:"setLogBaseUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e&&this.logHttp.setBaseUrl(e)}},{key:"setClientInfo",value:function(e){var t=e.clientId,n=e.clientSecret;this.http.setClientInfo({clientId:t,clientSecret:n})}},{key:"setLogger",value:function(e){this.http.setLogger(e),this.logHttp.setLogger(e)}},{key:"setMeetingInfo",value:function(e){this.meetingInfo=e||{}}},{key:"setTokenInfo",value:function(e){this.http.setTokenInfo(e)}},{key:"getTokenInfo",value:function(){return this.http.getTokenInfo()}},{key:"upload",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.logHttp.post("/api/rest/v1/log/standardLog",e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),n,this)})))}},{key:"login",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setTokenInfo(null),r=e.userName,i=e.password,o=e.extId,a="/api/rest/iauth/v5/en/login",o&&(a+="?extId=".concat(o)),t.next=6,this.http.put(a,{account:r,password:i,deviceType:Ue,deviceSn:this.randomDeviceSN});case 6:return(s=t.sent).data&&200===s.status&&(this.setCommonParams(s.data),this.http.setTokenInfo(s.data.token)),t.abrupt("return",s);case 9:case"end":return t.stop()}}),n,this)})))}},{key:"encryptLogin",value:function(e){var n;return Vt(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setTokenInfo(null),i=e.userName,o=e.password,t.next=4,this.getPublicKey(i);case 4:return a=t.sent,(s=new(Tt())).setPublicKey(a),c=s.encryptLong(Dt().SHA512(o).toString(Dt().enc.Hex)),u={account:i,password:c,deviceType:Ue,pubKey:a,deviceSn:this.randomDeviceSN},t.next=11,this.http.post("/api/rest/iauth/external/en/encrypt/custom/login/v1",u);case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:if(l=t.t0,1000005!==(null===(n=null==l?void 0:l.data)||void 0===n?void 0:n.errorCode)){t.next=19;break}return t.next=18,this.customLogin(Object.assign(Object.assign({},u),{password:s.encryptLong(o)}));case 18:l=t.sent;case 19:return 200===l.status&&l.data&&(this.setCommonParams(l.data),this.http.setTokenInfo(l.data.token)),t.abrupt("return",l);case 21:case"end":return t.stop()}}),r,this)})))}},{key:"getSdkUserInfo",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setTokenInfo(null),r=e.displayName,i=e.extId,o=e.extUserId,s={extId:i,displayName:r},(a=void 0===o?"":o)&&Object.assign(s,{externalUserId:a}),t.next=6,this.http.post("/api/rest/sdk/external/webrtc/user/v1?enterpriseId=".concat(i),s);case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0={};case 9:return t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),n,this)})))}},{key:"getUserInfo",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.get("/admin/current/userinfo/bytoken",{params:{token:e}});case 2:if(!(r=t.sent).data||0!==r.data.code){t.next=6;break}return this.setCommonParams(r.data.data),t.abrupt("return",r.data.data);case 6:return t.abrupt("return",r);case 7:case"end":return t.stop()}}),n,this)})))}},{key:"getCallUri",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/uss/v4/callUrlInfoV2",{params:Object.assign(Object.assign({},e),{securityKey:r,version:"v5"})});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"verifyPassword",value:function(e,n){return Vt(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,t.next=3,this.http.put("/api/rest/uss/v4/en/cloudmeeting/validation?securityKey=".concat(i),{number:e,passwd:n});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),r,this)})))}},{key:"hand",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.meetingInfo||{},i=r.meetingId,o=r.callUri,a=r.vcNumber,t.next=3,this.http.post("/page/api/rest/v2/".concat(e,"?meetingId=").concat(i,"&di=").concat(o,"&conferenceNo=").concat(a));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"getDefaultServerConfig",value:function(){return Vt(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.http.get("/api/rest/clientConfg/v3/getDefaultServerConfig?securityKey=".concat(this.commonParams.securityKey));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getServerConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Vt(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.post("/api/rest/clientConfg/external/serverConfig/default/v1",{excludeConfigNameList:[],includeConfigNameList:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),n,this)})))}},{key:"getCodeByJson",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,new Ft({baseURL:""}).get(e);case 4:(i=t.sent)&&200===i.status&&i.data&&(r=i.data),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(1);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),n,null,[[1,8]])})))}},{key:"getConference",value:function(e,n,r){return Vt(this,void 0,void 0,t().mark((function i(){var o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(r||{}).autoMute,a=void 0===o?0:o,t.abrupt("return",this.http.get("/api/rest/v1/meetingroom/hidden/soft/conference?userProfileId=".concat(e,"&securityKey=").concat(n,"&autoMute=").concat(a)));case 2:case"end":return t.stop()}}),i,this)})))}},{key:"setStates",value:function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Vt(this,void 0,void 0,t().mark((function o(){var a,s,c,u,l,h,f,d,p,v,g,m,y,b,S;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.meetingInfo,s=a.meetingId,c=void 0===s?"":s,u=a.callUri,l=String((new Date).getTime()),h=String((new Date).getTime()+this.statesTime.timeDiff),f=[{seqId:String(this.seqId),createTime:l,alignTime:h,category:e,eventName:n,version:"1.0",meetingId:c,eventValue:JSON.stringify(i)}],d={device:u,msgVer:"0.0.2",sendTime:String((new Date).getTime()),states:f},t.prev=5,p=(new Date).getTime(),t.next=9,this.http.post("/api/rest/v3/device/v2states",d);case 9:v=t.sent,this.seqId++,(null===(r=null==v?void 0:v.data)||void 0===r?void 0:r.currentTime)&&(g=v.data.currentTime,m=void 0===g?0:g,y=(new Date).getTime(),b=Math.round((y-p)/2),S=Number(m)+b-y,this.statesTime.timeDiff=S),t.next=16;break;case 14:t.prev=14,t.t0=t.catch(5);case 16:case"end":return t.stop()}}),o,this,[[5,14]])})))}},{key:"ignoreMeetingMonitor",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(1e3*Math.random()).toFixed(),i=this.commonParams.securityKey,o="/api/rest/uss/v1/cloudmeeting/monitor?securityKey=".concat(i,"&conferenceNumber=").concat(e,"&nonce=").concat(r),t.next=5,this.http.get(o);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),n,this)})))}},{key:"getAllocation",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Vt(this,void 0,void 0,t().mark((function i(){var o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="".concat(n,"/api/rest/allocator/v1/webrtc/allocation?key=").concat(e),a={},r&&(a={sign:0}),t.next=5,this.http.get(o,a);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),i,this)})))}},{key:"getWatermarkContent",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,i="/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/".concat(e,"?securityKey=").concat(r),t.next=4,this.http.get(i);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"getEnterpriseId",value:function(e){var n,r=e.extId,i=e.clientId,o=e.clientSecret,a=e.httpServer,s=void 0===a?this.httpDefaultBaseUrl:a;return Vt(this,void 0,void 0,t().mark((function e(){var a,c;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="/api/rest/v1/sdk/enterpriseToken/findByExtId?extId=".concat(r),e.next=3,this.http.get(a,{baseURL:s,sign:1,clientSecret:o,clientId:i});case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(200!==(c=e.t0).status){e.next=9;break}return e.abrupt("return",(null===(n=c.data)||void 0===n?void 0:n.enterpriseId)||"");case 9:return e.abrupt("return","");case 10:case"end":return e.stop()}}),e,this)})))}},{key:"locator",value:function(e){var n=e.extId,r=e.clientId,i=e.clientSecret,o=e.httpServer,a=void 0===o?this.httpDefaultBaseUrl:o;return Vt(this,void 0,void 0,t().mark((function e(){var o,s;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="/api/rest/v1/locator/".concat(n,"/node/config"),e.next=3,this.http.get(o,{baseURL:a,sign:1,clientSecret:i,clientId:r});case 3:if(200!==(s=e.sent).status){e.next=6;break}return e.abrupt("return",s.data||[]);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"monitorOperation",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/api/rest/avcloud/external/monitor/monitorOperation/v1",t.next=3,this.http.post("/api/rest/avcloud/external/monitor/monitorOperation/v1",e);case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0={};case 6:return r=t.t0,i=r.data,o=r.status,t.abrupt("return",[200!=+o,i]);case 10:case"end":return t.stop()}}),n,this)})))}},{key:"updateWebViewProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.monitorOperation({meetingId:e,action:"updateWebViewProp",operations:t})}},{key:"checkPermissionWithMeetingNumber",value:function(e,n){return Vt(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/api/rest/v3/en/recording/authorization",i=this.commonParams.securityKey,t.next=4,this.http.get("/api/rest/v3/en/recording/authorization",{params:{confNumber:e,meetingId:n,securityKey:i}});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),r,this)})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/v3/en/charge/storage?recordingUrl=".concat(e,"&securityKey=").concat(r));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"getEnterpriseMediaConfig",value:function(e,n){return Vt(this,void 0,void 0,t().mark((function r(){var i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,t.next=3,this.http.post("/api/rest/clientConfg/external/enterpriseConfig/v4",n,{params:{userId:e,securityKey:i,deviceType:Ue}});case 3:if(200!==(o=t.sent).status){t.next=6;break}return t.abrupt("return",o.data||{});case 6:return t.abrupt("return",{});case 7:case"end":return t.stop()}}),r,this)})))}},{key:"getEnterpriseConfig",value:function(e,n){return Vt(this,void 0,void 0,t().mark((function r(){var i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,o=(new Date).getMilliseconds(),"enterpriseConfig",t.next=5,this.http.get("/api/rest/css/v1/client/configs?securityKey=".concat(i,"&userId=").concat(e,"&enterpriseId=").concat(n,"&clientTimeMillis=").concat(o,"&configType=").concat("enterpriseConfig"));case 5:if(200!==(a=t.sent).status){t.next=8;break}return t.abrupt("return",a.data||{});case 8:return t.abrupt("return",{});case 9:case"end":return t.stop()}}),r,this)})))}},{key:"refreshToken",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.refreshToken({refresh_token:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),n,this)})))}},{key:"getMeetingInviteInfo",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,i=e.conferenceNumber,t.next=4,this.http.get("/page/client/shareConference/infomation?conferenceNumber=".concat(i,"&securityKey=").concat(r));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"getCloudMeetingRooms",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,t.next=3,this.http.get("/api/rest/v3/en/user/".concat(e,"/cloudMeetingRooms?securityKey=").concat(r));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"getInComingCallUrlInfo",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){var r,i,o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,i={avatar:""},t.prev=2,t.next=5,this.http.get("/api/rest/v4/en/incomingcallUrlInfo?securityKey=".concat(r,"&callUrl=").concat(e));case 5:200===(o=t.sent).status&&(i=o.data||{}),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(2);case 11:return t.abrupt("return",i);case 12:case"end":return t.stop()}}),n,this,[[2,9]])})))}},{key:"sendVideoControlResult",value:function(e,n){return Vt(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.commonParams.securityKey,o=this.meetingInfo,a=o.meetingId,s=void 0===a?"":a,c=o.callUri,u=o.vcNumber,t.next=4,this.http.post("/page/api/rest/v2/callback?securityKey=".concat(i,"&meetingId=").concat(s,"&deviceUri=").concat(c,"&conferenceNo=").concat(u,"&mpvc="),{type:e,value:n});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),r,this)})))}},{key:"loginWithAuthCode",value:function(e){var n=e.extId,r=e.extUserId,i=e.displayName,o=e.oauthCode,a=e.isTempUser,s=e.channelId;return Vt(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.http.post("/api/rest/v1/en/sdk/sec/loginWithAuthCode?extId=".concat(n,"&istempUser=").concat(a||!1),{deviceSn:this.randomDeviceSN,deviceType:Ue,authCode:o,externalUserId:r,channelId:s,displayName:i,countryCode:"+86"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"setCommonParams",value:function(e){var t=(e||{}).securityKey;this.commonParams.securityKey=t}},{key:"getPublicKey",value:function(e){var n;return Vt(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.get("/api/rest/iauth/v1/en/publicKey",{params:{account:e,deviceType:Ue}});case 2:if(200!==(i=t.sent).status){t.next=5;break}return t.abrupt("return",(null===(n=i.data)||void 0===n?void 0:n.pubkey)||"");case 5:return t.abrupt("return","");case 6:case"end":return t.stop()}}),r,this)})))}},{key:"customLogin",value:function(e){return Vt(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.http.post("/api/rest/iauth/external/en/custom/login/v1",e);case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0={};case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),n,this)})))}}]),e}();const zt=new Yt;var Wt=n(477),Xt=n.n(Wt);function qt(){return Xt()('(()=>{var e={9662:(e,t,n)=>{var r=n(614),i=n(6330),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not a function")}},9483:(e,t,n)=>{var r=n(4411),i=n(6330),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not a constructor")}},6077:(e,t,n)=>{var r=n(614),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw o("Can\'t set "+i(e)+" as a prototype")}},1223:(e,t,n)=>{var r=n(5112),i=n(30),o=n(3070).f,a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,n)=>{"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:(e,t,n)=>{var r=n(7976),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw i("Incorrect invocation")}},9670:(e,t,n)=>{var r=n(111),i=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not an object")}},8533:(e,t,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},1318:(e,t,n)=>{var r=n(5656),i=n(1400),o=n(6244),a=function(e){return function(t,n,a){var s,u=r(t),c=o(u),l=i(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,n)=>{var r=n(9974),i=n(1702),o=n(8361),a=n(7908),s=n(6244),u=n(5417),c=i([].push),l=function(e){var t=1==e,n=2==e,i=3==e,l=4==e,f=6==e,h=7==e,d=5==e||f;return function(p,y,v,m){for(var g,b,_=a(p),w=o(_),x=r(y,v),O=s(w),E=0,k=m||u,S=t?k(p,O):n||h?k(p,0):void 0;O>E;E++)if((d||E in w)&&(b=x(g=w[E],E,_),e))if(t)S[E]=b;else if(b)switch(e){case 3:return!0;case 5:return g;case 6:return E;case 2:c(S,g)}else switch(e){case 4:return!1;case 7:c(S,g)}return f?-1:i||l?l:S}};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)}},1194:(e,t,n)=>{var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,n)=>{"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},206:(e,t,n)=>{var r=n(1702);e.exports=r([].slice)},7475:(e,t,n)=>{var r=n(3157),i=n(4411),o=n(111),a=n(5112)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},5417:(e,t,n)=>{var r=n(7475);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},7072:(e,t,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:(e,t,n)=>{var r=n(1702),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},648:(e,t,n)=>{var r=n(1694),i=n(614),o=n(4326),a=n(5112)("toStringTag"),s=Object,u="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:u?o(t):"Object"==(r=o(t))&&i(t.callee)?"Arguments":r}},9920:(e,t,n)=>{var r=n(2597),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t,n){for(var s=i(t),u=a.f,c=o.f,l=0;l<s.length;l++){var f=s[l];r(e,f)||n&&r(n,f)||u(e,f,c(t,f))}}},8880:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},7045:(e,t,n)=>{var r=n(6339),i=n(3070);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},8052:(e,t,n)=>{var r=n(614),i=n(3070),o=n(6339),a=n(3072);e.exports=function(e,t,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:t;if(r(n)&&o(n,c,s),s.global)u?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},3072:(e,t,n)=>{var r=n(7854),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9781:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:e=>{var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:n}},317:(e,t,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},7207:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:e=>{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}},8509:(e,t,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},7871:(e,t,n)=>{var r=n(3823),i=n(5268);e.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},9363:e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},1528:(e,t,n)=>{var r=n(8113);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},6833:(e,t,n)=>{var r=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(e,t,n)=>{var r=n(4326);e.exports="undefined"!=typeof process&&"process"==r(process)},1036:(e,t,n)=>{var r=n(8113);e.exports=/web0s(?!.*chrome)/i.test(r)},8113:e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(e,t,n)=>{var r,i,o=n(7854),a=n(8113),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\\/(\\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\\/(\\d+)/))&&(i=+r[1]),e.exports=i},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(8052),s=n(3072),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,f,h,d,p=e.target,y=e.global,v=e.stat;if(n=y?r:v?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in t){if(h=t[l],f=e.dontCallGetSet?(d=i(n,l))&&d.value:n[l],!c(y?l:p+(v?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,n)=>{"use strict";n(4916);var r=n(1470),i=n(8052),o=n(2261),a=n(7293),s=n(5112),u=n(8880),c=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,f){var h=s(e),d=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||n){var y=r(/./[h]),v=t(h,""[e],(function(e,t,n,i,a){var s=r(e),u=t.exec;return u===o||u===l.exec?d&&!a?{done:!0,value:y(t,n,i)}:{done:!0,value:s(n,t,i)}:{done:!1}}));i(String.prototype,e,v[0]),i(l,h,v[1])}f&&u(l[h],"sham",!0)}},2104:(e,t,n)=>{var r=n(4374),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},9974:(e,t,n)=>{var r=n(1470),i=n(9662),o=n(4374),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},4374:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:(e,t,n)=>{"use strict";var r=n(1702),i=n(9662),o=n(111),a=n(2597),s=n(206),u=n(4374),c=Function,l=r([].concat),f=r([].join),h={};e.exports=u?c.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),u=function(){var n=l(r,s(arguments));return this instanceof u?function(e,t,n){if(!a(h,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";h[t]=c("C,a","return new C("+f(r,",")+")")}return h[t](e,n)}(t,n.length,n):t.apply(e,n)};return o(n)&&(u.prototype=n),u}},6916:(e,t,n)=>{var r=n(4374),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:(e,t,n)=>{var r=n(9781),i=n(2597),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},5668:(e,t,n)=>{var r=n(1702),i=n(9662);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1470:(e,t,n)=>{var r=n(4326),i=n(1702);e.exports=function(e){if("Function"===r(e))return i(e)}},1702:(e,t,n)=>{var r=n(4374),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);e.exports=r?a:function(e){return function(){return o.apply(e,arguments)}}},5005:(e,t,n)=>{var r=n(7854),i=n(614);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},1246:(e,t,n)=>{var r=n(648),i=n(8173),o=n(8554),a=n(7497),s=n(5112)("iterator");e.exports=function(e){if(!o(e))return i(e,s)||i(e,"@@iterator")||a[r(e)]}},4121:(e,t,n)=>{var r=n(6916),i=n(9662),o=n(9670),a=n(6330),s=n(1246),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return o(r(n,e));throw u(a(e)+" is not iterable")}},8173:(e,t,n)=>{var r=n(9662),i=n(8554);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:(e,t,n)=>{var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},3501:e=>{e.exports={}},842:e=>{e.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},490:(e,t,n)=>{var r=n(5005);e.exports=r("document","documentElement")},4664:(e,t,n)=>{var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(4326),a=Object,s=r("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?s(e,""):a(e)}:a},2788:(e,t,n)=>{var r=n(1702),i=n(614),o=n(5465),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},9909:(e,t,n)=>{var r,i,o,a=n(4811),s=n(7854),u=n(111),c=n(8880),l=n(2597),f=n(5465),h=n(6200),d=n(3501),p="Object already initialized",y=s.TypeError,v=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(e,t){if(m.has(e))throw y(p);return t.facade=e,m.set(e,t),t},i=function(e){return m.get(e)||{}},o=function(e){return m.has(e)}}else{var g=h("state");d[g]=!0,r=function(e,t){if(l(e,g))throw y(p);return t.facade=e,c(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return n}}}},7659:(e,t,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,n)=>{var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},614:(e,t,n)=>{var r=n(4154),i=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},4411:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(614),a=n(648),s=n(5005),u=n(2788),c=function(){},l=[],f=s("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,d=r(h.exec),p=!h.exec(c),y=function(e){if(!o(e))return!1;try{return f(c,l,e),!0}catch(e){return!1}},v=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,u(e))}catch(e){return!0}};v.sham=!0,e.exports=!f||i((function(){var e;return y(y.call)||!y(Object)||!y((function(){e=!0}))||e}))?v:y},4705:(e,t,n)=>{var r=n(7293),i=n(614),o=/#|\\.prototype\\./,a=function(e,t){var n=u[s(e)];return n==l||n!=c&&(i(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},8554:e=>{e.exports=function(e){return null==e}},111:(e,t,n)=>{var r=n(614),i=n(4154),o=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===o}:function(e){return"object"==typeof e?null!==e:r(e)}},1913:e=>{e.exports=!1},2190:(e,t,n)=>{var r=n(5005),i=n(614),o=n(7976),a=n(3307),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&o(t.prototype,s(e))}},408:(e,t,n)=>{var r=n(9974),i=n(6916),o=n(9670),a=n(6330),s=n(7659),u=n(6244),c=n(7976),l=n(4121),f=n(1246),h=n(9212),d=TypeError,p=function(e,t){this.stopped=e,this.result=t},y=p.prototype;e.exports=function(e,t,n){var v,m,g,b,_,w,x,O=n&&n.that,E=!(!n||!n.AS_ENTRIES),k=!(!n||!n.IS_RECORD),S=!(!n||!n.IS_ITERATOR),A=!(!n||!n.INTERRUPTED),T=r(t,O),I=function(e){return v&&h(v,"normal",e),new p(!0,e)},C=function(e){return E?(o(e),A?T(e[0],e[1],I):T(e[0],e[1])):A?T(e,I):T(e)};if(k)v=e.iterator;else if(S)v=e;else{if(!(m=f(e)))throw d(a(e)+" is not iterable");if(s(m)){for(g=0,b=u(e);b>g;g++)if((_=C(e[g]))&&c(y,_))return _;return new p(!1)}v=l(e,m)}for(w=k?e.next:v.next;!(x=i(w,v)).done;){try{_=C(x.value)}catch(e){h(v,"throw",e)}if("object"==typeof _&&_&&c(y,_))return _}return new p(!1)}},9212:(e,t,n)=>{var r=n(6916),i=n(9670),o=n(8173);e.exports=function(e,t,n){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return i(a),n}},7497:e=>{e.exports={}},6244:(e,t,n)=>{var r=n(7466);e.exports=function(e){return r(e.length)}},6339:(e,t,n)=>{var r=n(1702),i=n(7293),o=n(614),a=n(2597),s=n(9781),u=n(6530).CONFIGURABLE,c=n(2788),l=n(9909),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,y=r("".slice),v=r("".replace),m=r([].join),g=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===y(d(t),0,7)&&(t="["+v(d(t),/^Symbol\\(([^)]*)\\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(s?p(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&a(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=f(e);return a(r,"source")||(r.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return o(this)&&h(this).source||c(this)}),"toString")},4758:e=>{var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5948:(e,t,n)=>{var r,i,o,a,s,u=n(7854),c=n(9974),l=n(1236).f,f=n(261).set,h=n(8572),d=n(6833),p=n(1528),y=n(1036),v=n(5268),m=u.MutationObserver||u.WebKitMutationObserver,g=u.document,b=u.process,_=u.Promise,w=l(u,"queueMicrotask"),x=w&&w.value;if(!x){var O=new h,E=function(){var e,t;for(v&&(e=b.domain)&&e.exit();t=O.get();)try{t()}catch(e){throw O.head&&r(),e}e&&e.enter()};d||v||y||!m||!g?!p&&_&&_.resolve?((a=_.resolve(void 0)).constructor=_,s=c(a.then,a),r=function(){s(E)}):v?r=function(){b.nextTick(E)}:(f=c(f,u),r=function(){f(E)}):(i=!0,o=g.createTextNode(""),new m(E).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),x=function(e){O.head||r(),O.add(e)}}e.exports=x},8523:(e,t,n)=>{"use strict";var r=n(9662),i=TypeError,o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw i("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},3009:(e,t,n)=>{var r=n(7854),i=n(7293),o=n(1702),a=n(1340),s=n(3111).trim,u=n(1361),c=r.parseInt,l=r.Symbol,f=l&&l.iterator,h=/^[+-]?0x/i,d=o(h.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||f&&!i((function(){c(Object(f))}));e.exports=p?function(e,t){var n=s(a(e));return c(n,t>>>0||(d(h,n)?16:10))}:c},1574:(e,t,n)=>{"use strict";var r=n(9781),i=n(1702),o=n(6916),a=n(7293),s=n(1956),u=n(5181),c=n(5296),l=n(7908),f=n(8361),h=Object.assign,d=Object.defineProperty,p=i([].concat);e.exports=!h||a((function(){if(r&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=h({},e)[n]||s(h({},t)).join("")!=i}))?function(e,t){for(var n=l(e),i=arguments.length,a=1,h=u.f,d=c.f;i>a;)for(var y,v=f(arguments[a++]),m=h?p(s(v),h(v)):s(v),g=m.length,b=0;g>b;)y=m[b++],r&&!o(d,v,y)||(n[y]=v[y]);return n}:h},30:(e,t,n)=>{var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200),f="prototype",h="script",d=l("IE_PROTO"),p=function(){},y=function(e){return"<"+h+">"+e+"</"+h+">"},v=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;m="undefined"!=typeof document?document.domain&&r?v(r):(t=c("iframe"),n="java"+h+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(y("document.F=Object")),e.close(),e.F):v(r);for(var i=a.length;i--;)delete m[f][a[i]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[f]=i(e),n=new p,p[f]=null,n[d]=e):n=m(),void 0===t?n:o.f(n,t)}},6048:(e,t,n)=>{var r=n(9781),i=n(3353),o=n(3070),a=n(9670),s=n(5656),u=n(1956);t.f=r&&!i?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),i=u(t),c=i.length,l=0;c>l;)o.f(e,n=i[l++],r[n]);return e}},3070:(e,t,n)=>{var r=n(9781),i=n(4664),o=n(3353),a=n(9670),s=n(4948),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";t.f=r?o?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=l(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:(e,t,n)=>{var r=n(9781),i=n(6916),o=n(5296),a=n(9114),s=n(5656),u=n(4948),c=n(2597),l=n(4664),f=Object.getOwnPropertyDescriptor;t.f=r?f:function(e,t){if(e=s(e),t=u(t),l)try{return f(e,t)}catch(e){}if(c(e,t))return a(!i(o.f,e,t),e[t])}},8006:(e,t,n)=>{var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},7976:(e,t,n)=>{var r=n(1702);e.exports=r({}.isPrototypeOf)},6324:(e,t,n)=>{var r=n(1702),i=n(2597),o=n(5656),a=n(1318).indexOf,s=n(3501),u=r([].push);e.exports=function(e,t){var n,r=o(e),c=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&u(l,n);for(;t.length>c;)i(r,n=t[c++])&&(~a(l,n)||u(l,n));return l}},1956:(e,t,n)=>{var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:(e,t,n)=>{var r=n(5668),i=n(9670),o=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),o(r),t?e(n,r):n.__proto__=r,n}}():void 0)},288:(e,t,n)=>{"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(e,t,n)=>{var r=n(6916),i=n(614),o=n(111),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!o(s=r(n,e)))return s;if(i(n=e.valueOf)&&!o(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!o(s=r(n,e)))return s;throw a("Can\'t convert object to primitive value")}},3887:(e,t,n)=>{var r=n(5005),i=n(1702),o=n(8006),a=n(5181),s=n(9670),u=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?u(t,n(e)):t}},2534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:(e,t,n)=>{var r=n(7854),i=n(2492),o=n(614),a=n(4705),s=n(2788),u=n(5112),c=n(7871),l=n(3823),f=n(1913),h=n(7392),d=i&&i.prototype,p=u("species"),y=!1,v=o(r.PromiseRejectionEvent),m=a("Promise",(function(){var e=s(i),t=e!==String(i);if(!t&&66===h)return!0;if(f&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(e)){var n=new i((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(y=n.then((function(){}))instanceof r))return!0}return!t&&(c||l)&&!v}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:y}},2492:(e,t,n)=>{var r=n(7854);e.exports=r.Promise},9478:(e,t,n)=>{var r=n(9670),i=n(111),o=n(8523);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},612:(e,t,n)=>{var r=n(2492),i=n(7072),o=n(3702).CONSTRUCTOR;e.exports=o||!i((function(e){r.all(e).then(void 0,(function(){}))}))},8572:e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},7651:(e,t,n)=>{var r=n(6916),i=n(9670),o=n(614),a=n(4326),s=n(2261),u=TypeError;e.exports=function(e,t){var n=e.exec;if(o(n)){var c=r(n,e,t);return null!==c&&i(c),c}if("RegExp"===a(e))return r(s,e,t);throw u("RegExp#exec called on incompatible receiver")}},2261:(e,t,n)=>{"use strict";var r,i,o=n(6916),a=n(1702),s=n(1340),u=n(7066),c=n(2999),l=n(2309),f=n(30),h=n(9909).get,d=n(9441),p=n(7168),y=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,g=a("".charAt),b=a("".indexOf),_=a("".replace),w=a("".slice),x=(i=/b*/g,o(v,r=/a/,"a"),o(v,i,"a"),0!==r.lastIndex||0!==i.lastIndex),O=c.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(x||E||O||d||p)&&(m=function(e){var t,n,r,i,a,c,l,d=this,p=h(d),k=s(e),S=p.raw;if(S)return S.lastIndex=d.lastIndex,t=o(m,S,k),d.lastIndex=S.lastIndex,t;var A=p.groups,T=O&&d.sticky,I=o(u,d),C=d.source,N=0,j=k;if(T&&(I=_(I,"y",""),-1===b(I,"g")&&(I+="g"),j=w(k,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==g(k,d.lastIndex-1))&&(C="(?: "+C+")",j=" "+j,N++),n=new RegExp("^(?:"+C+")",I)),E&&(n=new RegExp("^"+C+"$(?!\\\\s)",I)),x&&(r=d.lastIndex),i=o(v,T?n:d,j),T?i?(i.input=w(i.input,N),i[0]=w(i[0],N),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:x&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),E&&i&&i.length>1&&o(y,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&A)for(i.groups=c=f(null),a=0;a<A.length;a++)c[(l=A[a])[0]]=i[l[1]];return i}),e.exports=m},7066:(e,t,n)=>{"use strict";var r=n(9670);e.exports=function(){var e=r(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}},2999:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp,o=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},9441:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\\n")&&"s"===e.flags)}))},7168:(e,t,n)=>{var r=n(7293),i=n(7854).RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,n)=>{var r=n(8554),i=TypeError;e.exports=function(e){if(r(e))throw i("Can\'t call method on "+e);return e}},7152:(e,t,n)=>{"use strict";var r,i=n(7854),o=n(2104),a=n(614),s=n(9363),u=n(8113),c=n(206),l=n(8053),f=i.Function,h=/MSIE .\\./.test(u)||s&&((r=i.Bun.version.split(".")).length<3||0==r[0]&&(r[1]<3||3==r[1]&&0==r[2]));e.exports=function(e,t){var n=t?2:1;return h?function(r,i){var s=l(arguments.length,1)>n,u=a(r)?r:f(r),h=s?c(arguments,n):[],d=s?function(){o(u,this,h)}:u;return t?e(d,i):e(d)}:e}},6340:(e,t,n)=>{"use strict";var r=n(5005),i=n(7045),o=n(5112),a=n(9781),s=o("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},8003:(e,t,n)=>{var r=n(3070).f,i=n(2597),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,o)&&r(e,o,{configurable:!0,value:t})}},6200:(e,t,n)=>{var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,n)=>{var r=n(7854),i=n(3072),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:(e,t,n)=>{var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(e,t,n)=>{var r=n(9670),i=n(9483),o=n(8554),a=n(5112)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||o(n=r(s)[a])?t:i(n)}},8710:(e,t,n)=>{var r=n(1702),i=n(9303),o=n(1340),a=n(4488),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,f=o(a(t)),h=i(n),d=f.length;return h<0||h>=d?e?"":void 0:(r=u(f,h))<55296||r>56319||h+1===d||(l=u(f,h+1))<56320||l>57343?e?s(f,h):r:e?c(f,h,h+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3111:(e,t,n)=>{var r=n(1702),i=n(4488),o=n(1340),a=n(1361),s=r("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var n=o(i(t));return 1&e&&(n=s(n,u,"")),2&e&&(n=s(n,c,"$1")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},6293:(e,t,n)=>{var r=n(7392),i=n(7293),o=n(7854).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},261:(e,t,n)=>{var r,i,o,a,s=n(7854),u=n(2104),c=n(9974),l=n(614),f=n(2597),h=n(7293),d=n(490),p=n(206),y=n(317),v=n(8053),m=n(6833),g=n(5268),b=s.setImmediate,_=s.clearImmediate,w=s.process,x=s.Dispatch,O=s.Function,E=s.MessageChannel,k=s.String,S=0,A={},T="onreadystatechange";h((function(){r=s.location}));var I=function(e){if(f(A,e)){var t=A[e];delete A[e],t()}},C=function(e){return function(){I(e)}},N=function(e){I(e.data)},j=function(e){s.postMessage(k(e),r.protocol+"//"+r.host)};b&&_||(b=function(e){v(arguments.length,1);var t=l(e)?e:O(e),n=p(arguments,1);return A[++S]=function(){u(t,void 0,n)},i(S),S},_=function(e){delete A[e]},g?i=function(e){w.nextTick(C(e))}:x&&x.now?i=function(e){x.now(C(e))}:E&&!m?(a=(o=new E).port2,o.port1.onmessage=N,i=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!h(j)?(i=j,s.addEventListener("message",N,!1)):i=T in y("script")?function(e){d.appendChild(y("script"))[T]=function(){d.removeChild(this),I(e)}}:function(e){setTimeout(C(e),0)}),e.exports={set:b,clear:_}},1400:(e,t,n)=>{var r=n(9303),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:(e,t,n)=>{var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9303:(e,t,n)=>{var r=n(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},7466:(e,t,n)=>{var r=n(9303),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:(e,t,n)=>{var r=n(4488),i=Object;e.exports=function(e){return i(r(e))}},7593:(e,t,n)=>{var r=n(6916),i=n(111),o=n(2190),a=n(8173),s=n(2140),u=n(5112),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var n,u=a(e,l);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!i(n)||o(n))return n;throw c("Can\'t convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},4948:(e,t,n)=>{var r=n(7593),i=n(2190);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},1694:(e,t,n)=>{var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},1340:(e,t,n)=>{var r=n(648),i=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},6330:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9711:(e,t,n)=>{var r=n(1702),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},3307:(e,t,n)=>{var r=n(6293);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(e,t,n)=>{var r=n(9781),i=n(7293);e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:e=>{var t=TypeError;e.exports=function(e,n){if(e<n)throw t("Not enough arguments");return e}},4811:(e,t,n)=>{var r=n(7854),i=n(614),o=r.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},5112:(e,t,n)=>{var r=n(7854),i=n(2309),o=n(2597),a=n(9711),s=n(6293),u=n(3307),c=r.Symbol,l=i("wks"),f=u?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return o(l,e)||(l[e]=s&&o(c,e)?c[e]:f("Symbol."+e)),l[e]}},1361:e=>{e.exports="\\t\\n\\v\\f\\r \\u2028\\u2029\\ufeff"},2222:(e,t,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),u=n(6244),c=n(7207),l=n(6135),f=n(5417),h=n(1194),d=n(5112),p=n(7392),y=d("isConcatSpreadable"),v=p>=51||!i((function(){var e=[];return e[y]=!1,e.concat()[0]!==e})),m=function(e){if(!a(e))return!1;var t=e[y];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,arity:1,forced:!v||!h("concat")},{concat:function(e){var t,n,r,i,o,a=s(this),h=f(a,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(m(o=-1===t?a:arguments[t]))for(i=u(o),c(d+i),n=0;n<i;n++,d++)n in o&&l(h,d,o[n]);else c(d+1),l(h,d++,o);return h.length=d,h}})},9826:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).find,o=n(1223),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9554:(e,t,n)=>{"use strict";var r=n(2109),i=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},2772:(e,t,n)=>{"use strict";var r=n(2109),i=n(1470),o=n(1318).indexOf,a=n(9341),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;r({target:"Array",proto:!0,forced:u||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?s(this,e,t)||0:o(this,e,t)}})},9753:(e,t,n)=>{n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},1249:(e,t,n)=>{"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},3710:(e,t,n)=>{var r=n(1702),i=n(8052),o=Date.prototype,a="Invalid Date",s="toString",u=r(o[s]),c=r(o.getTime);String(new Date(NaN))!=a&&i(o,s,(function(){var e=c(this);return e==e?u(this):a}))},4812:(e,t,n)=>{var r=n(2109),i=n(7065);r({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},8309:(e,t,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(1702),a=n(7045),s=Function.prototype,u=o(s.toString),c=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,l=o(c.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},9601:(e,t,n)=>{var r=n(2109),i=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},1539:(e,t,n)=>{var r=n(1694),i=n(8052),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},1058:(e,t,n)=>{var r=n(2109),i=n(3009);r({global:!0,forced:parseInt!=i},{parseInt:i})},821:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),a=n(8523),s=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(e){var t=this,n=a.f(t),r=n.resolve,c=n.reject,l=s((function(){var n=o(t.resolve),a=[],s=0,l=1;u(e,(function(e){var o=s++,u=!1;l++,i(n,t,e).then((function(e){u||(u=!0,a[o]=e,--l||r(a))}),c)})),--l||r(a)}));return l.error&&c(l.value),n.promise}})},4164:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3702).CONSTRUCTOR,a=n(2492),s=n(5005),u=n(614),c=n(8052),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&u(a)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},3401:(e,t,n)=>{"use strict";var r,i,o,a=n(2109),s=n(1913),u=n(5268),c=n(7854),l=n(6916),f=n(8052),h=n(7674),d=n(8003),p=n(6340),y=n(9662),v=n(614),m=n(111),g=n(5787),b=n(6707),_=n(261).set,w=n(5948),x=n(842),O=n(2534),E=n(8572),k=n(9909),S=n(2492),A=n(3702),T=n(8523),I="Promise",C=A.CONSTRUCTOR,N=A.REJECTION_EVENT,j=A.SUBCLASSING,R=k.getterFor(I),P=k.set,B=S&&S.prototype,D=S,L=B,F=c.TypeError,U=c.document,z=c.process,M=T.f,K=M,V=!!(U&&U.createEvent&&c.dispatchEvent),W="unhandledrejection",G=function(e){var t;return!(!m(e)||!v(t=e.then))&&t},q=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&J(t),t.rejection=1),!0===s?n=o:(f&&f.enter(),n=s(o),f&&(f.exit(),i=!0)),n===e.promise?c(F("Promise-chain cycle")):(r=G(n))?l(r,n,u,c):u(n)):c(o)}catch(e){f&&!i&&f.exit(),c(e)}},Z=function(e,t){e.notified||(e.notified=!0,w((function(){for(var n,r=e.reactions;n=r.get();)q(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},$=function(e,t,n){var r,i;V?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!N&&(i=c["on"+e])?i(r):e===W&&x("Unhandled promise rejection",n)},Y=function(e){l(_,c,(function(){var t,n=e.facade,r=e.value;if(H(e)&&(t=O((function(){u?z.emit("unhandledRejection",r,n):$(W,n,r)})),e.rejection=u||H(e)?2:1,t.error))throw t.value}))},H=function(e){return 1!==e.rejection&&!e.parent},J=function(e){l(_,c,(function(){var t=e.facade;u?z.emit("rejectionHandled",t):$("rejectionhandled",t,e.value)}))},X=function(e,t,n){return function(r){e(t,r,n)}},Q=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Z(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw F("Promise can\'t be resolved itself");var r=G(t);r?w((function(){var n={done:!1};try{l(r,t,X(ee,n,e),X(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,Z(e,!1))}catch(t){Q({done:!1},t,e)}}};if(C&&(L=(D=function(e){g(this,L),y(e),l(r,this);var t=R(this);try{e(X(ee,t),X(Q,t))}catch(e){Q(t,e)}}).prototype,(r=function(e){P(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=f(L,"then",(function(e,t){var n=R(this),r=M(b(this,D));return n.parent=!0,r.ok=!v(e)||e,r.fail=v(t)&&t,r.domain=u?z.domain:void 0,0==n.state?n.reactions.add(r):w((function(){q(r,n)})),r.promise})),i=function(){var e=new r,t=R(e);this.promise=e,this.resolve=X(ee,t),this.reject=X(Q,t)},T.f=M=function(e){return e===D||undefined===e?new i(e):K(e)},!s&&v(S)&&B!==Object.prototype)){o=B.then,j||f(B,"then",(function(e,t){var n=this;return new D((function(e,t){l(o,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete B.constructor}catch(e){}h&&h(B,L)}a({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:D}),d(D,I,!1,!0),p(I)},7727:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(2492),a=n(7293),s=n(5005),u=n(614),c=n(6707),l=n(9478),f=n(8052),h=o&&o.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){h.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),n=u(e);return this.then(n?function(n){return l(t,e()).then((function(){return n}))}:e,n?function(n){return l(t,e()).then((function(){throw n}))}:e)}}),!i&&u(o)){var d=s("Promise").prototype.finally;h.finally!==d&&f(h,"finally",d,{unsafe:!0})}},8674:(e,t,n)=>{n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),a=n(8523),s=n(2534),u=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(e){var t=this,n=a.f(t),r=n.reject,c=s((function(){var a=o(t.resolve);u(e,(function(e){i(a,t,e).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},683:(e,t,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return i(t.reject,void 0,e),t.promise}})},6294:(e,t,n)=>{"use strict";var r=n(2109),i=n(5005),o=n(1913),a=n(2492),s=n(3702).CONSTRUCTOR,u=n(9478),c=i("Promise"),l=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return u(l&&this===c?a:this,e)}})},4916:(e,t,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},4723:(e,t,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),a=n(8554),s=n(7466),u=n(1340),c=n(4488),l=n(8173),f=n(1530),h=n(7651);i("match",(function(e,t,n){return[function(t){var n=c(this),i=a(t)?void 0:l(t,e);return i?r(i,t,n):new RegExp(t)[e](u(n))},function(e){var r=o(this),i=u(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return h(r,i);var c=r.unicode;r.lastIndex=0;for(var l,d=[],p=0;null!==(l=h(r,i));){var y=u(l[0]);d[p]=y,""===y&&(r.lastIndex=f(i,s(r.lastIndex),c)),p++}return 0===p?null:d}]}))},4747:(e,t,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(8533),s=n(8880),u=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in i)i[c]&&u(r[c]&&r[c].prototype);u(o)},6815:(e,t,n)=>{var r=n(2109),i=n(7854),o=n(7152)(i.setInterval,!0);r({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},8417:(e,t,n)=>{var r=n(2109),i=n(7854),o=n(7152)(i.setTimeout,!0);r({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},2564:(e,t,n)=>{n(6815),n(8417)},5733:(e,t,n)=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module \'"+a+"\'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,a,s,u,c,l=[],f=0,h=e.length,d=h,p="string"!==r.getTypeOf(e);f<e.length;)d=h-f,i=p?(t=e[f++],n=f<h?e[f++]:0,f<h?e[f++]:0):(t=e.charCodeAt(f++),n=f<h?e.charCodeAt(f++):0,f<h?e.charCodeAt(f++):0),a=t>>2,s=(3&t)<<4|n>>4,u=1<d?(15&n)<<2|i>>6:64,c=2<d?63&i:64,l.push(o.charAt(a)+o.charAt(s)+o.charAt(u)+o.charAt(c));return l.join("")},n.decode=function(e){var t,n,r,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 h,d=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&d--,e.charAt(e.length-2)===o.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|d):new Array(0|d);c<e.length;)t=o.indexOf(e.charAt(c++))<<2|(a=o.indexOf(e.charAt(c++)))>>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,r=(3&s)<<6|(u=o.indexOf(e.charAt(c++))),h[l++]=t,64!==s&&(h[l++]=n),64!==u&&(h[l++]=r);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.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(r.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,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).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,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\\0\\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;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,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=r?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.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})}},n.compressWorker=function(e){return new u("Deflate",e)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,a,l){var f,h,d=e.file,p=e.compression,y=l!==s.utf8encode,v=o.transformTo("string",l(d.name)),m=o.transformTo("string",s.utf8encode(d.name)),g=d.comment,b=o.transformTo("string",l(g)),_=o.transformTo("string",s.utf8encode(g)),w=m.length!==d.name.length,x=_.length!==g.length,O="",E="",k="",S=d.dir,A=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var I=0;t&&(I|=8),y||!w&&!x||(I|=2048);var C=0,N=0;S&&(C|=16),"UNIX"===a?(N=798,C|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(d.unixPermissions,S)):(N=20,C|=function(e){return 63&(e||0)}(d.dosPermissions)),f=A.getUTCHours(),f<<=6,f|=A.getUTCMinutes(),f<<=5,f|=A.getUTCSeconds()/2,h=A.getUTCFullYear()-1980,h<<=4,h|=A.getUTCMonth()+1,h<<=5,h|=A.getUTCDate(),w&&(E=r(1,1)+r(u(v),4)+m,O+="up"+r(E.length,2)+E),x&&(k=r(1,1)+r(u(b),4)+_,O+="uc"+r(k.length,2)+k);var j="";return j+="\\n\\0",j+=r(I,2),j+=p.magic,j+=r(f,2),j+=r(h,2),j+=r(T.crc32,4),j+=r(T.compressedSize,4),j+=r(T.uncompressedSize,4),j+=r(v.length,2),j+=r(O.length,2),{fileRecord:c.LOCAL_FILE_HEADER+j+v+O,dirRecord:c.CENTRAL_FILE_HEADER+r(N,2)+j+r(b.length,2)+"\\0\\0\\0\\0"+r(C,4)+r(i,4)+v+O+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function l(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,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,n=this.entriesCount,r=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:n?(t+100*(n-r-1))/n: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 n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.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 n=this.bytesWritten-e,i=function(e,t,n,i,a){var s=o.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\\0\\0\\0\\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(s.length,2)+s}(this.dirRecords.length,n,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 n=0;n<t.length;n++)try{t[n].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,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new i(t.streamFiles,n,t.platform,t.encodeFileName),a=0;try{e.forEach((function(e,n){a++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},u=n.dir,c=n.date;n._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;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 r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=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,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var n=this;return t=r.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.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new a(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var o=0;o<r.length;o++)n.push(c(r[o]));return i.Promise.all(n)})).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=r.resolve(s.fileNameStr);n.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||(n.file(c).unsafeOriginalName=u)}return i.zipComment.length&&(n.comment=i.zipComment),n}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=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)}r.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,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error(\'The "data" argument must not be a number\');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=o.getTypeOf(t),s=o.extend(n||{},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=y(e)),s.createFolders&&(r=p(e))&&v.call(this,r,!0);var f="string"===i&&!1===s.binary&&!1===s.base64;n&&void 0!==n.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 m=null;m=t instanceof c||t instanceof a?t:h.isNode&&h.isStream(t)?new d(e,t):o.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var g=new l(e,m,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"),h=e("./nodejsUtils"),d=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):""},y=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t=void 0!==t?t:u.createFolders,e=y(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function m(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,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(m(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(m(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=v.call(this,t),r=this.clone();return r.root=n.name,r},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 n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=f.generateWorker(this,n,r)}catch(e){(t=new a("error")).error(e)}return new s(t,n.type||"string",n.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,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===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,n){"use strict";var r=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(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},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,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),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,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),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,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),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,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),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,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),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,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.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,n){"use strict";var r=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=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.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,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.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,n){"use strict";function r(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}r.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 n=0;n<this._listeners[e].length;n++)this._listeners[e][n].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)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,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=r},{}],29:[function(e,t,n){"use strict";var r=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(n,i){var o=[],s=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(u,function(e,t){var n,r=0,i=null,o=0;for(n=0;n<t.length;n++)o+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type \'"+e+"\'")}}(s,o),c);n(e)}catch(e){i(e)}o=[]})).resume()}))}function f(e,t,n){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=n,r.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 n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){r.delay(t,arguments,n)})),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.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,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=0===i.getBlob("application/zip").size}catch(e){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(e){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=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,n.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,r,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=a=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,u=new Array(2*a);for(t=n=0;t<a;)if((i=e[t++])<128)u[n++]=i;else if(4<(o=s[i]))u[n++]=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[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),r.applyFromCharCode(u)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,a),c.prototype.processChunk=function(e){var t=r.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 n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n: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:n.utf8decode(u),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function u(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),n.newBlob=function(e,t){n.checkSupport("blob");try{return new Blob([e],{type:t})}catch(n){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch(e){throw new Error("Bug : can\'t construct the Blob.")}}};var c={stringifyByChunk:function(e,t,n){var r=[],i=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,o)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,o)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function l(e){var t=65536,r=n.getTypeOf(e),i=!0;if("uint8array"===r?i=c.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return c.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function f(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=l;var h={};h.string={string:s,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return h.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},h.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)}},h.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))}},h.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)}},h.nodebuffer={string:l,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return h.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var r=n.getTypeOf(t);return h[r][e](t)},n.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":r.nodebuffer&&o.isBuffer(e)?"nodebuffer":r.uint8array&&e instanceof Uint8Array?"uint8array":r.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},n.delay=function(e,t,n){setImmediate((function(){e.apply(n||null,t||[])}))},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,o,s,c){return a.Promise.resolve(t).then((function(e){return r.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):e})).then((function(t){var l=n.getTypeOf(t);return l?("arraybuffer"===l?t=n.transformTo("uint8array",t):"string"===l&&(c?t=i.decode(t):o&&!0!==s&&(t=function(e){return u(e,r.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,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),a=e("./zipEntry"),s=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 n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},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",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},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,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},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 n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=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==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-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(Object.prototype.hasOwnProperty.call(u,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(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};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 n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;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=r(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=r(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,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!r&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&r&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,n,"")},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 n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(n,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++)r.prototype[c[f]]=l;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="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,n=function(){u.port2.postMessage(0)}}var c=[];function l(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";var r=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&&d(this,e)}function l(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function f(e,t,n){r((function(){var r;try{r=t(n)}catch(r){return o.reject(e,r)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var a=p((function(){t(i,r)}));"error"===a.status&&r(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},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 n=new this.constructor(i);return this.state!==u?f(n,this.state===s?e:t,this.outcome):this.queue.push(new l(n,e,t)),n},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 n=p(h,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)d(e,r);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 n=-1,r=e.queue.length;++n<r;)e.queue[n].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 n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,u=-1,c=new this(i);++u<n;)l(e[u],u);return c;function l(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==n||r||(r=!0,o.resolve(c,a))}),(function(e){r||(r=!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 n=e.length,r=!1;if(!n)return this.resolve([]);for(var a,s=-1,u=new this(i);++s<n;)a=e[s],t.resolve(a).then((function(e){r||(r=!0,o.resolve(u,e))}),(function(e){r||(r=!0,o.reject(u,e))}));return u}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=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,h=8;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({level:l,method:h,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 n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==c)throw new Error(a[n]);if(t.header&&r.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,(n=r.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[n]);this._dict_set=!0}}function p(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}d.prototype.push=function(e,t){var n,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!==(n=r.deflate(s,a))&&n!==c)return this.onEnd(n),!(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!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c):2!==a||(this.onEnd(c),!(s.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.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},n.Deflate=d,n.deflate=p,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},n.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,n){"use strict";var r=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&&0==(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 n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function h(e,t){var n=new f(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(e,t){var n,s,u,c,f,h,d=this.strm,p=this.options.chunkSize,y=this.options.dictionary,v=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(p),d.next_out=0,d.avail_out=p),(n=r.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&y&&(h="string"==typeof y?o.string2buf(y):"[object ArrayBuffer]"===l.call(y)?new Uint8Array(y):y,n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===v&&(n=a.Z_OK,v=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(d.output,d.next_out),c=d.next_out-u,f=o.buf2string(d.output,u),d.next_out=c,d.avail_out=p-c,c&&i.arraySet(d.output,d.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(v=!0)}while((0<d.avail_in||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(d.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},n.Inflate=f,n.inflate=h,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},n.ungzip=h},{"./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,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.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,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=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 r.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,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(u),o=a=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return u(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,o,s=t||e.length,c=new Array(2*s);for(n=r=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if(4<(o=a[i]))c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&n<s;)i=i<<6|63&e[n++],o--;1<o?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return u(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,n){"use strict";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,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),u=e("./messages"),c=0,l=4,f=0,h=-2,d=-1,p=4,y=2,v=8,m=9,g=286,b=30,_=19,w=2*g+1,x=15,O=3,E=258,k=E+O+1,S=42,A=113,T=1,I=2,C=3,N=4;function j(e,t){return e.msg=u[t],t}function R(e){return(e<<1)-(4<e?9:0)}function P(e){for(var t=e.length;0<=--t;)e[t]=0}function B(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,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,B(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function U(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-k?e.strstart-(e.w_size-k):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+E,d=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[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=E-(h-o),o=h-E,a<r){if(e.match_start=t,s<=(a=r))break;d=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function z(e){var t,n,r,o,u,c,l,f,h,d,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-k)){for(i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=n=e.hash_size;r=e.head[--t],e.head[t]=p<=r?r-p:0,--n;);for(t=n=p;r=e.prev[--t],e.prev[t]=p<=r?r-p:0,--n;);o+=p}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,f=e.strstart+e.lookahead,d=void 0,(h=o)<(d=c.avail_in)&&(d=h),n=0===d?0:(c.avail_in-=d,i.arraySet(l,c.input,c.next_in,d,f),1===c.state.wrap?c.adler=a(c.adler,l,d,f):2===c.state.wrap&&(c.adler=s(c.adler,l,d,f)),c.next_in+=d,c.total_in+=d,d),e.lookahead+=n,e.lookahead+e.insert>=O)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+O-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<O)););}while(e.lookahead<k&&0!==e.strm.avail_in)}function M(e,t){for(var n,r;;){if(e.lookahead<k){if(z(e),e.lookahead<k&&t===c)return T;if(0===e.lookahead)break}if(n=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-k&&(e.match_length=U(e,n)),e.match_length>=O)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-O),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=O){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,n=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 r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=e.strstart<O-1?e.strstart:O-1,t===l?(D(e,!0),0===e.strm.avail_out?C:N):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:I}function K(e,t){for(var n,r,i;;){if(e.lookahead<k){if(z(e),e.lookahead<k&&t===c)return T;if(0===e.lookahead)break}if(n=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,n=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=O-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-k&&(e.match_length=U(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===O&&4096<e.strstart-e.match_start)&&(e.match_length=O-1)),e.prev_length>=O&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-O,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-O),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+O-1])&e.hash_mask,n=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=O-1,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return T}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&D(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return T}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<O-1?e.strstart:O-1,t===l?(D(e,!0),0===e.strm.avail_out?C:N):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:I}function V(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function W(){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=v,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*w),this.dyn_dtree=new i.Buf16(2*(2*b+1)),this.bl_tree=new i.Buf16(2*(2*_+1)),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(x+1),this.heap=new i.Buf16(2*g+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*g+1),P(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 G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=y,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?S:A,e.adler=2===t.wrap?0:1,t.last_flush=c,o._tr_init(t),f):j(e,h)}function q(e){var t=G(e);return t===f&&function(e){e.window_size=2*e.w_size,P(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=O-1,e.match_available=0,e.ins_h=0}(e.state),t}function Z(e,t,n,r,o,a){if(!e)return h;var s=1;if(t===d&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),o<1||m<o||n!==v||r<8||15<r||t<0||9<t||a<0||p<a)return j(e,h);8===r&&(r=9);var u=new W;return(e.state=u).strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,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+O-1)/O),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=n,q(e)}r=[new V(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(z(e),0===e.lookahead&&t===c)return T;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,D(e,!1),0===e.strm.avail_out))return T;if(e.strstart-e.block_start>=e.w_size-k&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?C:N):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),T)})),new V(4,4,8,4,M),new V(4,5,16,8,M),new V(4,6,32,32,M),new V(4,4,16,16,K),new V(8,16,32,32,K),new V(8,16,128,128,K),new V(8,32,128,256,K),new V(32,128,258,1024,K),new V(32,258,258,4096,K)],n.deflateInit=function(e,t){return Z(e,t,v,15,8,0)},n.deflateInit2=Z,n.deflateReset=q,n.deflateResetKeep=G,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,f):h},n.deflate=function(e,t){var n,i,a,u;if(!e||!e.state||5<t||t<0)return e?j(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==l)return j(e,0===e.avail_out?-5:h);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===S)if(2===i.wrap)e.adler=0,L(i,31),L(i,139),L(i,8),i.gzhead?(L(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)),L(i,255&i.gzhead.time),L(i,i.gzhead.time>>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(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):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=A);else{var d=v+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=A,F(i,d),0!==i.strstart&&(F(i,e.adler>>>16),F(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)),B(e),a=i.pending,i.pending!==i.pending_buf_size));)L(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)),B(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,L(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)),B(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,L(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&&B(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=A)):i.status=A),0!==i.pending){if(B(e),0===e.avail_out)return i.last_flush=-1,f}else if(0===e.avail_in&&R(t)<=R(n)&&t!==l)return j(e,-5);if(666===i.status&&0!==e.avail_in)return j(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 n;;){if(0===e.lookahead&&(z(e),0===e.lookahead)){if(t===c)return T;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?C:N):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:I}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=E){if(z(e),e.lookahead<=E&&t===c)return T;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=O&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+E;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=E-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=O?(n=o._tr_tally(e,1,e.match_length-O),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===l?(D(e,!0),0===e.strm.avail_out?C:N):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:I}(i,t):r[i.level].func(i,t);if(p!==C&&p!==N||(i.status=666),p===T||p===C)return 0===e.avail_out&&(i.last_flush=-1),f;if(p===I&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(P(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),B(e),0===e.avail_out))return i.last_flush=-1,f}return t!==l?f:i.wrap<=0?1:(2===i.wrap?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),B(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?f:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==S&&69!==t&&73!==t&&91!==t&&103!==t&&t!==A&&666!==t?j(e,h):(e.state=null,t===A?j(e,-3):f):h},n.deflateSetDictionary=function(e,t){var n,r,o,s,u,c,l,d,p=t.length;if(!e||!e.state)return h;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==S||n.lookahead)return h;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new i.Buf8(n.w_size),i.arraySet(d,t,p-n.w_size,n.w_size,0),t=d,p=n.w_size),u=e.avail_in,c=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,z(n);n.lookahead>=O;){for(r=n.strstart,o=n.lookahead-(O-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+O-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--o;);n.strstart=r,n.lookahead=O-1,z(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=O-1,n.match_available=0,e.next_in=c,e.input=l,e.avail_in=u,n.wrap=s,f},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";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,n){"use strict";t.exports=function(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,y,v,m,g,b,_,w,x,O,E,k,S;n=e.state,r=e.next_in,k=e.input,i=r+(e.avail_in-5),o=e.next_out,S=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,y=n.lencode,v=n.distcode,m=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),b=y[d&m];t:for(;;){if(d>>>=_=b>>>24,p-=_,0==(_=b>>>16&255))S[o++]=65535&b;else{if(!(16&_)){if(0==(64&_)){b=y[(65535&b)+(d&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&b,(_&=15)&&(p<_&&(d+=k[r++]<<p,p+=8),w+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),b=v[d&g];n:for(;;){if(d>>>=_=b>>>24,p-=_,!(16&(_=b>>>16&255))){if(0==(64&_)){b=v[(65535&b)+(d&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&b,p<(_&=15)&&(d+=k[r++]<<p,(p+=8)<_&&(d+=k[r++]<<p,p+=8)),u<(x+=d&(1<<_)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=_,p-=_,(_=o-a)<x){if(l<(_=x-_)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=h,(O=0)===f){if(O+=c-_,_<w){for(w-=_;S[o++]=h[O++],--_;);O=o-x,E=S}}else if(f<_){if(O+=c+f-_,(_-=f)<w){for(w-=_;S[o++]=h[O++],--_;);if(O=0,f<w){for(w-=_=f;S[o++]=h[O++],--_;);O=o-x,E=S}}}else if(O+=f-_,_<w){for(w-=_;S[o++]=h[O++],--_;);O=o-x,E=S}for(;2<w;)S[o++]=E[O++],S[o++]=E[O++],S[o++]=E[O++],w-=3;w&&(S[o++]=E[O++],1<w&&(S[o++]=E[O++]))}else{for(O=o-x;S[o++]=S[O++],S[o++]=S[O++],S[o++]=S[O++],2<(w-=3););w&&(S[o++]=S[O++],1<w&&(S[o++]=S[O++]))}break}}break}}while(r<i&&o<s);r-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}},{}],49:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=1,c=2,l=0,f=-2,h=1,d=852,p=592;function y(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function v(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(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=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(d),t.distcode=t.distdyn=new r.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,m(e)):f}function b(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?f:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,g(e))):f}function _(e,t){var n,r;return e?(r=new v,(e.state=r).window=null,(n=b(e,t))!==l&&(e.state=null),n):f}var w,x,O=!0;function E(e){if(O){var t;for(w=new r.Buf32(512),x=new r.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,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,x,0,e.work,{bits:5}),O=!1}e.lencode=w,e.lenbits=9,e.distcode=x,e.distbits=5}function k(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-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}n.inflateReset=g,n.inflateReset2=b,n.inflateResetKeep=m,n.inflateInit=function(e){return _(e,15)},n.inflateInit2=_,n.inflate=function(e,t){var n,d,p,v,m,g,b,_,w,x,O,S,A,T,I,C,N,j,R,P,B,D,L,F,U=0,z=new r.Buf8(4),M=[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===(n=e.state).mode&&(n.mode=13),m=e.next_out,p=e.output,b=e.avail_out,v=e.next_in,d=e.input,g=e.avail_in,_=n.hold,w=n.bits,x=g,O=b,D=l;e:for(;;)switch(n.mode){case h:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(2&n.wrap&&35615===_){z[n.check=0]=255&_,z[1]=_>>>8&255,n.check=o(n.check,z,2,0),w=_=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&_)){e.msg="unknown compression method",n.mode=30;break}if(w-=4,B=8+(15&(_>>>=4)),0===n.wbits)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<B,e.adler=n.check=1,n.mode=512&_?10:12,w=_=0;break;case 2:for(;w<16;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(n.flags=_,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=_>>8&1),512&n.flags&&(z[0]=255&_,z[1]=_>>>8&255,n.check=o(n.check,z,2,0)),w=_=0,n.mode=3;case 3:for(;w<32;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.head&&(n.head.time=_),512&n.flags&&(z[0]=255&_,z[1]=_>>>8&255,z[2]=_>>>16&255,z[3]=_>>>24&255,n.check=o(n.check,z,4,0)),w=_=0,n.mode=4;case 4:for(;w<16;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.head&&(n.head.xflags=255&_,n.head.os=_>>8),512&n.flags&&(z[0]=255&_,z[1]=_>>>8&255,n.check=o(n.check,z,2,0)),w=_=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.length=_,n.head&&(n.head.extra_len=_),512&n.flags&&(z[0]=255&_,z[1]=_>>>8&255,n.check=o(n.check,z,2,0)),w=_=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(g<(S=n.length)&&(S=g),S&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,d,v,S,B)),512&n.flags&&(n.check=o(n.check,d,S,v)),g-=S,v+=S,n.length-=S),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;for(S=0;B=d[v+S++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B)),B&&S<g;);if(512&n.flags&&(n.check=o(n.check,d,S,v)),g-=S,v+=S,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===g)break e;for(S=0;B=d[v+S++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B)),B&&S<g;);if(512&n.flags&&(n.check=o(n.check,d,S,v)),g-=S,v+=S,B)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(_!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}w=_=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;w<32;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}e.adler=n.check=y(_),w=_=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=b,e.next_in=v,e.avail_in=g,n.hold=_,n.bits=w,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){_>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}switch(n.last=1&_,w-=1,3&(_>>>=1)){case 0:n.mode=14;break;case 1:if(E(n),n.mode=20,6!==t)break;_>>>=2,w-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}_>>>=2,w-=2;break;case 14:for(_>>>=7&w,w-=7&w;w<32;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&_,w=_=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(S=n.length){if(g<S&&(S=g),b<S&&(S=b),0===S)break e;r.arraySet(p,d,v,S,m),g-=S,v+=S,b-=S,m+=S,n.length-=S;break}n.mode=12;break;case 17:for(;w<14;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(n.nlen=257+(31&_),_>>>=5,w-=5,n.ndist=1+(31&_),_>>>=5,w-=5,n.ncode=4+(15&_),_>>>=4,w-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.lens[M[n.have++]]=7&_,_>>>=3,w-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,D){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;C=(U=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,N=65535&U,!((I=U>>>24)<=w);){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(N<16)_>>>=I,w-=I,n.lens[n.have++]=N;else{if(16===N){for(F=I+2;w<F;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(_>>>=I,w-=I,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}B=n.lens[n.have-1],S=3+(3&_),_>>>=2,w-=2}else if(17===N){for(F=I+3;w<F;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}w-=I,B=0,S=3+(7&(_>>>=I)),_>>>=3,w-=3}else{for(F=I+7;w<F;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}w-=I,B=0,S=11+(127&(_>>>=I)),_>>>=7,w-=7}if(n.have+S>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;S--;)n.lens[n.have++]=B}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},D=s(u,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,D){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},D=s(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,D){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=g&&258<=b){e.next_out=m,e.avail_out=b,e.next_in=v,e.avail_in=g,n.hold=_,n.bits=w,a(e,O),m=e.next_out,p=e.output,b=e.avail_out,v=e.next_in,d=e.input,g=e.avail_in,_=n.hold,w=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;C=(U=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,N=65535&U,!((I=U>>>24)<=w);){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(C&&0==(240&C)){for(j=I,R=C,P=N;C=(U=n.lencode[P+((_&(1<<j+R)-1)>>j)])>>>16&255,N=65535&U,!(j+(I=U>>>24)<=w);){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}_>>>=j,w-=j,n.back+=j}if(_>>>=I,w-=I,n.back+=I,n.length=N,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=12;break}if(64&C){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(F=n.extra;w<F;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.length+=_&(1<<n.extra)-1,_>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(U=n.distcode[_&(1<<n.distbits)-1])>>>16&255,N=65535&U,!((I=U>>>24)<=w);){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(0==(240&C)){for(j=I,R=C,P=N;C=(U=n.distcode[P+((_&(1<<j+R)-1)>>j)])>>>16&255,N=65535&U,!(j+(I=U>>>24)<=w);){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}_>>>=j,w-=j,n.back+=j}if(_>>>=I,w-=I,n.back+=I,64&C){e.msg="invalid distance code",n.mode=30;break}n.offset=N,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(F=n.extra;w<F;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}n.offset+=_&(1<<n.extra)-1,_>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===b)break e;if(S=O-b,n.offset>S){if((S=n.offset-S)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}A=S>n.wnext?(S-=n.wnext,n.wsize-S):n.wnext-S,S>n.length&&(S=n.length),T=n.window}else T=p,A=m-n.offset,S=n.length;for(b<S&&(S=b),b-=S,n.length-=S;p[m++]=T[A++],--S;);0===n.length&&(n.mode=21);break;case 26:if(0===b)break e;p[m++]=n.length,b--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===g)break e;g--,_|=d[v++]<<w,w+=8}if(O-=b,e.total_out+=O,n.total+=O,O&&(e.adler=n.check=n.flags?o(n.check,p,O,m-O):i(n.check,p,O,m-O)),O=b,(n.flags?_:y(_))!==n.check){e.msg="incorrect data check",n.mode=30;break}w=_=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===g)break e;g--,_+=d[v++]<<w,w+=8}if(_!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}w=_=0}n.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=m,e.avail_out=b,e.next_in=v,e.avail_in=g,n.hold=_,n.bits=w,(n.wsize||O!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&k(e,e.output,e.next_out,O-e.avail_out)?(n.mode=31,-4):(x-=e.avail_in,O-=e.avail_out,e.total_in+=x,e.total_out+=O,n.total+=O,n.wrap&&O&&(e.adler=n.check=n.flags?o(n.check,p,O,e.next_out-O):i(n.check,p,O,e.next_out-O)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==x&&0===O||4===t)&&D===l&&(D=-5),D)},n.inflateEnd=function(e){if(!e||!e.state)return f;var t=e.state;return t.window&&(t.window=null),e.state=null,l},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?f:((n.head=t).done=!1,l):f},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?f:11===n.mode&&i(1,t,r,0)!==n.check?-3:k(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,l):f},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=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,n,u,c,l,f,h){var d,p,y,v,m,g,b,_,w,x=h.bits,O=0,E=0,k=0,S=0,A=0,T=0,I=0,C=0,N=0,j=0,R=null,P=0,B=new r.Buf16(16),D=new r.Buf16(16),L=null,F=0;for(O=0;O<=15;O++)B[O]=0;for(E=0;E<u;E++)B[t[n+E]]++;for(A=x,S=15;1<=S&&0===B[S];S--);if(S<A&&(A=S),0===S)return c[l++]=20971520,c[l++]=20971520,h.bits=1,0;for(k=1;k<S&&0===B[k];k++);for(A<k&&(A=k),O=C=1;O<=15;O++)if(C<<=1,(C-=B[O])<0)return-1;if(0<C&&(0===e||1!==S))return-1;for(D[1]=0,O=1;O<15;O++)D[O+1]=D[O]+B[O];for(E=0;E<u;E++)0!==t[n+E]&&(f[D[t[n+E]]++]=E);if(g=0===e?(R=L=f,19):1===e?(R=i,P-=257,L=o,F-=257,256):(R=a,L=s,-1),O=k,m=l,I=E=j=0,y=-1,v=(N=1<<(T=A))-1,1===e&&852<N||2===e&&592<N)return 1;for(;;){for(b=O-I,w=f[E]<g?(_=0,f[E]):f[E]>g?(_=L[F+f[E]],R[P+f[E]]):(_=96,0),d=1<<O-I,k=p=1<<T;c[m+(j>>I)+(p-=d)]=b<<24|_<<16|w|0,0!==p;);for(d=1<<O-1;j&d;)d>>=1;if(0!==d?(j&=d-1,j+=d):j=0,E++,0==--B[O]){if(O===S)break;O=t[n+f[E]]}if(A<O&&(j&v)!==y){for(0===I&&(I=A),m+=k,C=1<<(T=O-I);T+I<S&&!((C-=B[T+I])<=0);)T++,C<<=1;if(N+=1<<T,1===e&&852<N||2===e&&592<N)return 1;c[y=j&v]=A<<24|T<<16|m-l|0}}return 0!==j&&(c[m+j]=O-I<<24|64<<16|0),h.bits=A,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";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,n){"use strict";var r=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,h=19,d=2*l+1,p=15,y=16,v=7,m=256,g=16,b=17,_=18,w=[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],x=[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],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=new Array(2*(l+2));a(k);var S=new Array(2*f);a(S);var A=new Array(512);a(A);var T=new Array(256);a(T);var I=new Array(u);a(I);var C,N,j,R=new Array(f);function P(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function B(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function D(e){return e<256?A[e]:A[256+(e>>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function F(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<<e.bi_valid&65535,L(e,e.bi_buf),e.bi_buf=t>>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function U(e,t,n){F(e,n[2*t],n[2*t+1])}function z(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function M(e,t,n){var r,i,o=new Array(p+1),a=0;for(r=1;r<=p;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=z(o[s]++,s))}}function K(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<h;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function V(e){8<e.bi_valid?L(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 W(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function G(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&W(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!W(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function q(e,t,n){var r,i,o,a,s=0;if(0!==e.last_lit)for(;r=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===r?U(e,i,t):(U(e,(o=T[i])+c+1,t),0!==(a=w[o])&&F(e,i-=I[o],a),U(e,o=D(--r),n),0!==(a=x[o])&&F(e,r-=R[o],a)),s<e.last_lit;);U(e,m,t)}function Z(e,t){var n,r,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=d,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+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,n=e.heap_len>>1;1<=n;n--)G(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,G(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,y=t.stat_desc.extra_base,v=t.stat_desc.max_length,m=0;for(o=0;o<=p;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<d;n++)v<(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)&&(o=v,m++),u[2*r+1]=o,c<r||(e.bl_count[o]++,a=0,y<=r&&(a=h[r-y]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==m){do{for(o=v-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[v]--,m-=2}while(0<m);for(o=v;0!==o;o--)for(r=e.bl_count[o];0!==r;)c<(i=e.heap[--n])||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),M(o,c,e.bl_count)}function $(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+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 Y(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)for(;U(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(U(e,i,e.bl_tree),s--),U(e,g,e.bl_tree),F(e,s-3,2)):s<=10?(U(e,b,e.bl_tree),F(e,s-3,3)):(U(e,_,e.bl_tree),F(e,s-11,7));o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}}a(R);var H=!1;function J(e,t,n,i){F(e,(s<<1)+(i?1:0),3),function(e,t,n,i){V(e),i&&(L(e,n),L(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){H||(function(){var e,t,n,r,i,o=new Array(p+1);for(r=n=0;r<u-1;r++)for(I[r]=n,e=0;e<1<<w[r];e++)T[n++]=r;for(T[n-1]=r,r=i=0;r<16;r++)for(R[r]=i,e=0;e<1<<x[r];e++)A[i++]=r;for(i>>=7;r<f;r++)for(R[r]=i<<7,e=0;e<1<<x[r]-7;e++)A[256+i++]=r;for(t=0;t<=p;t++)o[t]=0;for(e=0;e<=143;)k[2*e+1]=8,e++,o[8]++;for(;e<=255;)k[2*e+1]=9,e++,o[9]++;for(;e<=279;)k[2*e+1]=7,e++,o[7]++;for(;e<=287;)k[2*e+1]=8,e++,o[8]++;for(M(k,l+1,o),e=0;e<f;e++)S[2*e+1]=5,S[2*e]=z(e,5);C=new P(k,w,c+1,l,p),N=new P(S,x,0,f,p),j=new P(new Array(0),O,0,h,v)}(),H=!0),e.l_desc=new B(e.dyn_ltree,C),e.d_desc=new B(e.dyn_dtree,N),e.bl_desc=new B(e.bl_tree,j),e.bi_buf=0,e.bi_valid=0,K(e)},n._tr_stored_block=J,n._tr_flush_block=function(e,t,n,r){var a,s,u=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&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)),Z(e,e.l_desc),Z(e,e.d_desc),u=function(e){var t;for($(e,e.dyn_ltree,e.l_desc.max_code),$(e,e.dyn_dtree,e.d_desc.max_code),Z(e,e.bl_desc),t=h-1;3<=t&&0===e.bl_tree[2*E[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=n+5,n+4<=a&&-1!==t?J(e,t,n,r):4===e.strategy||s===a?(F(e,2+(r?1:0),3),q(e,k,S)):(F(e,4+(r?1:0),3),function(e,t,n,r){var i;for(F(e,t-257,5),F(e,n-1,5),F(e,r-4,4),i=0;i<r;i++)F(e,e.bl_tree[2*E[i]+1],3);Y(e,e.dyn_ltree,t-1),Y(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),q(e,e.dyn_ltree,e.dyn_dtree)),K(e),r&&V(e)},n._tr_tally=function(e,t,n){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&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(T[n]+c+1)]++,e.dyn_dtree[2*D(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){F(e,2,3),U(e,m,k),function(e){16===e.bi_valid?(L(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,n){"use strict";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){"use strict";if(!e.setImmediate){var n,r,i,o,a=1,s={},u=!1,c=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,n="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",d,!1):e.attachEvent("onmessage",d),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(h,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return s[a]=i,n(a),a++},l.clearImmediate=f}function f(e){delete s[e]}function h(e){if(u)setTimeout(h,0,e);else{var n=s[e];if(n){u=!0;try{!function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}}(n)}finally{f(e),u=!1}}}}function d(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},7061:(e,t,n)=>{var r=n(8698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new T(r||[]);return a(o,"_invoke",{value:E(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p={};function y(){}function v(){}function m(){}var g={};f(g,u,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(I([])));_&&_!==n&&o.call(_,u)&&(g=_);var w=m.prototype=y.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(i,a,s,u){var c=d(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){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a \'"+n+"\' method")),p;var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(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 A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return v.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:v,configurable:!0}),v.displayName=f(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(O.prototype),f(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new O(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),f(w,l,"Generator"),f(w,u,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(n){return e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:(e,t,n)=>{var r=n(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t)||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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){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){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l,f,h,d,p,y,v,m,g,b,_,w,x,O,E,k,S,A,T,I,C,N,j,R,P,B,D,L,F,U,z,M=n(4687),K=n.n(M);n(1539),n(8674),n(4812),n(2222),n(9601);function V(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.CONTENT="CONTENT",e.PIPE="PIPE",e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.VIDEO_AUDIO="VIDEO_AUDIO",e.VIDEO_AUDIO_PIPE="VIDEO_AUDIO_PIPE"}(u||(u={})),function(e){e.ENDED="ENDED",e.STARTING="STARTING",e.PENDING="PENDING"}(c||(c={})),function(e){e.MUTE_AUDIO="muteAudio",e.UNMUTE_AUDIO="unmuteAudio",e.MUTE_VIDEO="muteVideo",e.UNMUTE_VIDEO="unmuteVideo"}(l||(l={})),function(e){e.NONE="NONE",e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.BOTH="BOTH"}(f||(f={})),function(e){e.AUTO="AUTO",e.CUSTOM="CUSTOM"}(h||(h={})),function(e){e.RECORD_STATE_IDLE="RECORD_STATE_IDLE",e.RECORD_STATE_STARTING="RECORD_STATE_STARTING",e.RECORD_STATE_STARTED="RECORD_STATE_STARTED",e.RECORD_STATE_STOPING="RECORD_STATE_STOPING"}(d||(d={})),function(e){e[e.NONE=0]="NONE",e[e.LOCAL_START=1]="LOCAL_START",e[e.REMOTE_STAR=2]="REMOTE_STAR",e[e.REMOTE_PAUSED=3]="REMOTE_PAUSED"}(p||(p={})),function(e){e.FRONT="FRONT",e.BACK="BACK"}(y||(y={})),function(e){e[e.MuteByUser=0]="MuteByUser",e[e.MuteByBWLimit=1]="MuteByBWLimit",e[e.MuteByNoInput=2]="MuteByNoInput",e[e.MuteByConfMgmt=3]="MuteByConfMgmt",e[e.MuteByDeviceDetection=4]="MuteByDeviceDetection",e[e.MuteByPhoneCall=5]="MuteByPhoneCall"}(v||(v={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(m||(m={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(g||(g={})),function(e){e.NORMAL="NORMAL",e.FAILED="FAILED",e.DISABLED="DISABLED",e.UNKNOWN="UNKNOWN"}(b||(b={})),function(e){e.NORMAL="NORMAL",e.NORMAL_VIDEO="NORMAL_VIDEO",e.NORMAL_AUDIO="NORMAL_AUDIO",e.RECEIVE_ONLY="RECEIVE_ONLY",e.FAILED="FAILED",e.UNKNOWN="UNKNOWN"}(_||(_={})),function(e){e.CONTENT="CONTENT",e.PREVIEW="PREVIEW",e.PIPELINE="PIPELINE",e.REMOTE="REMOTE"}(w||(w={})),function(e){e[e.RS90=90]="RS90",e[e.RS180=180]="RS180",e[e.RS360=360]="RS360",e[e.RS720=720]="RS720",e[e.RS1080=1080]="RS1080"}(x||(x={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(O||(O={})),function(e){e[e.LEVEL90=0]="LEVEL90",e[e.LEVEL180=1]="LEVEL180",e[e.LEVEL360=2]="LEVEL360",e[e.LEVEL720=3]="LEVEL720",e[e.LEVEL1080=4]="LEVEL1080"}(E||(E={})),function(e){e[e.LOW=0]="LOW",e[e.NORMAL=1]="NORMAL",e[e.HIGH=2]="HIGH"}(k||(k={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.ALL="ALL"}(S||(S={})),function(e){e.SDK="SDK",e.CUSTOM="CUSTOM"}(A||(A={})),function(e){e.COMMON="COMMON",e.ADVANCED="ADVANCED",e.FAILED="FAILED"}(T||(T={})),function(e){e.MULTI_RES="MULTI_RESOLUTION",e.SCALE_RES="SCALE_RESOLUTION"}(I||(I={})),function(e){e.VERY_LOW="very-low",e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(C||(C={})),function(e){e.CAPTURE="CAPTURE",e.KEEP="KEEP",e.FAILED="FAILED"}(N||(N={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt",e.UNKNOWN="unknown",e.FAILED="failed"}(j||(j={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE"}(R||(R={})),function(e){e[e.NONE=-1]="NONE",e[e.TEXT=0]="TEXT",e[e.IMAGE=1]="IMAGE"}(P||(P={})),function(e){e[e.Bad=1]="Bad",e[e.Poor=2]="Poor",e[e.Good=3]="Good",e[e.Excellent=4]="Excellent"}(B||(B={})),function(e){e.STATS="STATS",e.INIT="INIT",e.DESTROY="DESTROY",e.STATS_VIDEO_RECEIVER="STATS_VIDEO_RECEIVER",e.STATS_AUDIO_RECEIVER="STATS_AUDIO_RECEIVER",e.STATS_SENDER="STATS_SENDER",e.INTERNALS="INTERNALS",e.REPORT_INTERNALS="REPORT_INTERNALS",e.REPORT_NETWORK_LEVEL="REPORT_NETWORK_LEVEL"}(D||(D={})),function(e){e.INACTIVE="inactive",e.RECVONLY="recvonly",e.SENDONLY="sendonly",e.SENDRECV="sendrecv"}(L||(L={})),function(e){e.LOG="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR"}(F||(F={})),function(e){e.LOGGER="LOGGER",e.INIT="INIT",e.DESTROY="DESTROY",e.DOWNLOAD="DOWNLOAD",e.UPLOAD="UPLOAD"}(U||(U={})),function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARNING="WARNING",e.ERROR="ERROR",e.NONE="NONE"}(z||(z={}));n(2564),n(3710),n(9554),n(4747),n(9753),n(4916),n(9826);var W,G,q,Z,$,Y,H,J,X,Q={isNumber:function(e){return"number"==typeof e},isObject:function(e){return"[object object]"===Object.prototype.toString.call(e).toLocaleLowerCase()},isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isUndefined:function(e){return void 0===e},isLetter:function(e){return/^[a-zA-Z]+$/.test(e)},isChinese:function(e){return/^[\\u4e00-\\u9fa5]+$/.test(e)},isNumberText:function(e){return/^[0-9]+$/.test(e)},isSpecialChar:function(e){return/^[^\\u4e00-\\u9fa5a-zA-Z0-9]+$/.test(e)},isWhiteSpace:function(e){return/^\\s+$/.test(e)}},ee=(n(2772),n(4723),n(1249),n(1058),function(){var e=navigator.userAgent,t=e.toLocaleLowerCase(),n=navigator.platform.toUpperCase().indexOf("MAC")>=0||/macintosh|mac os x/i.test(e),r=navigator.platform.toUpperCase().indexOf("LINUX")>=0,i=/(?:win)/.test(e),o=/(?:Windows Phone)/.test(e),a=/(?:SymbianOS)/.test(e)||o,s=/(?:Android)/.test(e)||t.indexOf("harmony")>-1,u=/(?:Firefox)/.test(e),c=/(?:Chrome|CriOS)/.test(e)&&!(e.indexOf("Edg")>-1),l=e.indexOf("Edg")>-1,f=e.indexOf("Safari")>-1&&!(e.indexOf("Chrome")>-1),h=/iPad/i.test(e)||e.indexOf("MacIntel")>-1&&navigator.maxTouchPoints>1||e.indexOf("Macintosh")>-1&&navigator.maxTouchPoints>1,d=/(?:iPad|PlayBook)/.test(e)||s&&!/(?:Mobile)/.test(e)||u&&/(?:Tablet)/.test(e),p=/(?:iPhone)/.test(e)&&!d,y=!(p||s||a||h),v=e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1||e.indexOf("baiduboxapp")>-1,m=!!t.match(/firefox/)||e.indexOf("Firefox")>-1,g=!!t.match(/tencenttraveler/)||!!t.match(/qqbrowse/)||e.indexOf("QQ/")>-1||e.indexOf("MicroMessenger")>-1,b=e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,_=e.indexOf("HuaweiBrowser")>-1;return{isTablet:d,isPhone:p,isAndroid:s,isPc:y,isMac:n,isWindows:i,isIPad:h,isChrome:c,isLinux:r,isFirefox:m,isBaidu:v,isQQ:g,isOpera:b,isZhazha:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1||e.indexOf("360SE")>-1||e.indexOf("360EE")>-1||e.indexOf("LBBROWSER")>-1||e.indexOf("UC")>-1||e.indexOf("UBrowser")>-1||e.indexOf("UCWEB")>-1||e.indexOf("Quark")>-1||e.indexOf("MiuiBrowser")>-1||e.indexOf("AliApp(TB")>-1||e.indexOf("Weibo")>-1||e.indexOf("IqiyiApp")>-1||e.indexOf("HuaweiBrowser")>-1||e.indexOf("HUAWEI")>-1||e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1||e.indexOf("SE")>-1||e.indexOf("Maxthon")>-1||e.indexOf("The world")>-1||e.indexOf("MetaSr")>-1||e.indexOf("2345Explorer")>-1||e.indexOf("TencentTraveler")>-1||e.indexOf("Mb2345Browser")>-1,isEdge:l,isSafari:f,isHuaweiBrowser:_}}),te=(ee().isPc,ee()),ne=x.RS90,re=x.RS180,ie=x.RS360,oe=x.RS720,ae=x.RS1080,se=T.COMMON,ue=T.ADVANCED,ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(te.isFirefox)return{};var r={frameRate:e};if(t===ue&&Q.isNumber(e)){r=n?{frameRate:{ideal:e,max:e}}:{frameRate:{min:e-5,exact:e,max:e}}}return r},le=Object.assign({width:640,height:360,resizeMode:"crop-and-scale"},ce(15)),fe=Object.assign({cursor:"always",logicalSurface:!0},le),he={channelCount:1,autoGainControl:!0,noiseSuppression:!0,echoCancellation:!0},de=(V(q={},oe,(V(W={},se,{video:Object.assign(Object.assign(Object.assign({},le),ce(15)),{width:1280,height:720}),audio:!0}),V(W,ue,{video:Object.assign(Object.assign(Object.assign({},le),ce(15,ue,!0)),{width:{ideal:1280,max:1280},height:{ideal:720,max:720}}),audio:!0}),W)),V(q,ae,(V(G={},se,{video:Object.assign(Object.assign(Object.assign({},le),ce(15)),{width:1920,height:1080}),audio:!0}),V(G,ue,{video:Object.assign(Object.assign(Object.assign({},le),ce(15,ue,!0)),{width:{ideal:1920,max:1920},height:{ideal:1080,max:1080}}),audio:!0}),G)),V(X={},ne,(V(Z={},se,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15)),{width:160,height:90}),audio:he}),V(Z,ue,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15,ue)),{width:{min:160,ideal:160,max:160},height:{min:90,ideal:90,max:90}}),audio:he}),Z)),V(X,re,(V($={},se,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15)),{width:320,height:180}),audio:he}),V($,ue,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15,ue)),{width:{min:320,ideal:320,max:320},height:{min:180,ideal:180,max:180}}),audio:he}),$)),V(X,ie,(V(Y={},se,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15)),{width:640,height:360}),audio:he}),V(Y,ue,{video:Object.assign(Object.assign(Object.assign({},fe),ce(15,ue)),{width:{min:640,ideal:640,max:640},height:{min:360,ideal:360,max:360}}),audio:he}),Y)),V(X,oe,(V(H={},se,{video:Object.assign(Object.assign(Object.assign({},fe),ce(30)),{width:1280,height:720}),audio:he}),V(H,ue,{video:Object.assign(Object.assign(Object.assign({},fe),ce(30,ue)),{width:{min:1280,ideal:1280,max:1280},height:{min:720,ideal:720,max:720}}),audio:he}),H)),V(X,ae,(V(J={},se,{video:Object.assign(Object.assign(Object.assign({},fe),ce(30)),{width:1920,height:1080}),audio:he}),V(J,ue,{video:Object.assign(Object.assign(Object.assign({},fe),ce(30,ue)),{width:{min:1920,ideal:1920,max:1920},height:{min:1080,ideal:1080,max:1080}}),audio:he}),J)),b.FAILED,b.DISABLED,b.NORMAL),pe=(b.UNKNOWN,w.REMOTE,w.CONTENT,x.RS720,["clientId","clientSecret","password","token","pwd","securityKey","access_token","refresh_token"]);y.FRONT,y.BACK,n(8309);const ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ve=Object.keys,me=Array.isArray;function ge(e,t){return"object"!=typeof t||ve(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||ye.Promise||(ye.Promise=Promise);const be=Object.getPrototypeOf,_e={}.hasOwnProperty;function we(e,t){return _e.call(e,t)}function xe(e,t){"function"==typeof t&&(t=t(be(e))),("undefined"==typeof Reflect?ve:Reflect.ownKeys)(t).forEach((n=>{Ee(e,n,t[n])}))}const Oe=Object.defineProperty;function Ee(e,t,n,r){Oe(e,t,ge(n&&we(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ke(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Ee(e.prototype,"constructor",e),{extend:xe.bind(null,e.prototype)}}}}const Se=Object.getOwnPropertyDescriptor;function Ae(e,t){let n;return Se(e,t)||(n=be(e))&&Ae(n,t)}const Te=[].slice;function Ie(e,t,n){return Te.call(e,t,n)}function Ce(e,t){return t(e)}function Ne(e){if(!e)throw new Error("Assertion Failed")}function je(e){ye.setImmediate?setImmediate(e):setTimeout(e,0)}function Re(e,t){return e.reduce(((e,n,r)=>{var i=t(n,r);return i&&(e[i[0]]=i[1]),e}),{})}function Pe(e,t){if(we(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,i=t.length;r<i;++r){var o=Pe(e,t[r]);n.push(o)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:Pe(s,t.substr(a+1))}}function Be(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Ne("string"!=typeof n&&"length"in n);for(var r=0,i=t.length;r<i;++r)Be(e,t[r],n[r])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===n?me(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&we(e,a)||(u=e[a]={}),Be(u,s,n)}}else void 0===n?me(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function De(e){var t={};for(var n in e)we(e,n)&&(t[n]=e[n]);return t}const Le=[].concat;function Fe(e){return Le.apply([],e)}const Ue="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Fe([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>ye[e])),ze=Ue.map((e=>ye[e]));Re(Ue,(e=>[e,!0]));let Me=null;function Ke(e){Me="undefined"!=typeof WeakMap&&new WeakMap;const t=Ve(e);return Me=null,t}function Ve(e){if(!e||"object"!=typeof e)return e;let t=Me&&Me.get(e);if(t)return t;if(me(e)){t=[],Me&&Me.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(Ve(e[n]))}else if(ze.indexOf(e.constructor)>=0)t=e;else{const n=be(e);for(var i in t=n===Object.prototype?{}:Object.create(n),Me&&Me.set(e,t),e)we(e,i)&&(t[i]=Ve(e[i]))}return t}const{toString:We}={};function Ge(e){return We.call(e).slice(8,-1)}const qe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ze="symbol"==typeof qe?function(e){var t;return null!=e&&(t=e[qe])&&t.apply(e)}:function(){return null},$e={};function Ye(e){var t,n,r,i;if(1===arguments.length){if(me(e))return e.slice();if(this===$e&&"string"==typeof e)return[e];if(i=Ze(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const He="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var Je="undefined"!=typeof location&&/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);function Xe(e,t){Je=e,Qe=t}var Qe=()=>!0;const et=!new Error("").stack;function tt(){if(et)try{throw tt.arguments,new Error}catch(e){return e}return new Error}function nt(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\\n").length),n.split("\\n").slice(t).filter(Qe).map((e=>"\\n"+e)).join("")):""}var rt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],it=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(rt),ot={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function at(e,t){this._e=tt(),this.name=e,this.message=t}function st(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\\n")}function ut(e,t,n,r){this._e=tt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=st(e,t)}function ct(e,t){this._e=tt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=st(e,t)}ke(at).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+nt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),ke(ut).from(at),ke(ct).from(at);var lt=it.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const ft=at;var ht=it.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=tt(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ot[t]||n,this.inner=null)}return ke(r).from(ft),e[t]=r,e}),{});ht.Syntax=SyntaxError,ht.Type=TypeError,ht.Range=RangeError;var dt=rt.reduce(((e,t)=>(e[t+"Error"]=ht[t],e)),{}),pt=it.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ht[t]),e)),{});function yt(){}function vt(e){return e}function mt(e,t){return null==e||e===vt?t:function(n){return t(e(n))}}function gt(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function bt(e,t){return e===yt?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?gt(r,this.onsuccess):r),i&&(this.onerror=this.onerror?gt(i,this.onerror):i),void 0!==o?o:n}}function _t(e,t){return e===yt?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?gt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?gt(r,this.onerror):r)}}function wt(e,t){return e===yt?t:function(n){var r=e.apply(this,arguments);ge(n,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?gt(i,this.onsuccess):i),o&&(this.onerror=this.onerror?gt(o,this.onerror):o),void 0===r?void 0===a?void 0:a:ge(r,a)}}function xt(e,t){return e===yt?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Ot(e,t){return e===yt?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then((function(){return t.apply(r,o)}))}return t.apply(this,arguments)}}pt.ModifyError=ut,pt.DexieError=at,pt.BulkError=ct;var Et={};const[kt,St,At]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,be(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,be(t),e]})(),Tt=St&&St.then,It=kt&&kt.constructor,Ct=!!At;var Nt=!1,jt=At?()=>{At.then(tn)}:ye.setImmediate?setImmediate.bind(null,tn):ye.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{tn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tn,0)},Rt=function(e,t){Kt.push([e,t]),Bt&&(jt(),Bt=!1)},Pt=!0,Bt=!0,Dt=[],Lt=[],Ft=null,Ut=vt,zt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Sn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Sn(e[0],e[1])}catch(e){}}))}},Mt=zt,Kt=[],Vt=0,Wt=[];function Gt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=yt,this._lib=!1;var t=this._PSD=Mt;if(Je&&(this._stackHolder=tt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Et)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Yt(this,this._value))}this._state=null,this._value=null,++t.ref,$t(this,e)}const qt={get:function(){var e=Mt,t=hn;function n(n,r){var i=!e.global&&(e!==Mt||t!==hn);const o=i&&!vn();var a=new Gt(((t,a)=>{Jt(this,new Zt(En(n,e,i,o),En(r,e,i,o),t,a,e))}));return Je&&en(a,this),a}return n.prototype=Et,n},set:function(e){Ee(this,"then",e&&e.prototype===Et?qt:{get:function(){return e},set:qt.set})}};function Zt(e,t,n,r,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=i}function $t(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&nn();t&&"function"==typeof t.then?$t(e,((e,n)=>{t instanceof Gt?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Ht(e)),n&&rn()}}),Yt.bind(null,e))}catch(t){Yt(e,t)}}function Yt(e,t){if(Lt.push(t),null===e._state){var n=e._lib&&nn();t=Ut(t),e._state=!1,e._value=t,Je&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=Ae(t,"stack");t._promise=e,Ee(t,"stack",{get:()=>Nt?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){Dt.some((t=>t._value===e._value))||Dt.push(e)}(e),Ht(e),n&&rn()}}function Ht(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)Jt(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),0===Vt&&(++Vt,Rt((()=>{0==--Vt&&on()}),[]))}function Jt(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Vt,Rt(Xt,[n,e,t])}else e._listeners.push(t)}function Xt(e,t,n){try{Ft=t;var r,i=t._value;t._state?r=e(i):(Lt.length&&(Lt=[]),r=e(i),-1===Lt.indexOf(i)&&function(e){for(var t=Dt.length;t;)if(Dt[--t]._value===e._value)return void Dt.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ft=null,0==--Vt&&on(),--n.psd.ref||n.psd.finalize()}}function Qt(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var i,o,a=e._value;null!=a?(i=a.name||"Error",o=a.message||a,r=nt(a,0)):(i=a,o=""),t.push(i+(o?": "+o:"")+r)}return Je&&((r=nt(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Qt(e._prev,t,n)),t}function en(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function tn(){nn()&&rn()}function nn(){var e=Pt;return Pt=!1,Bt=!1,e}function rn(){var e,t,n;do{for(;Kt.length>0;)for(e=Kt,Kt=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Kt.length>0);Pt=!0,Bt=!0}function on(){var e=Dt;Dt=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Wt.slice(0),n=t.length;n;)t[--n]()}function an(e){return new Gt(Et,!1,e)}function sn(e,t){var n=Mt;return function(){var r=nn(),i=Mt;try{return _n(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{_n(i,!1),r&&rn()}}}xe(Gt.prototype,{then:qt,_then:function(e,t){Jt(this,new Zt(null,null,e,t,Mt))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):an(e))):this.then(null,(e=>e&&e.name===t?n(e):an(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),an(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Nt=!0;var e=Qt(this,[],20).join("\\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Nt=!1}}},timeout:function(e,t){return e<1/0?new Gt(((n,r)=>{var i=setTimeout((()=>r(new ht.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Ee(Gt.prototype,Symbol.toStringTag,"Dexie.Promise"),zt.env=wn(),xe(Gt,{all:function(){var e=Ye.apply(null,arguments).map(mn);return new Gt((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((i,o)=>Gt.resolve(i).then((n=>{e[o]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Gt)return e;if(e&&"function"==typeof e.then)return new Gt(((t,n)=>{e.then(t,n)}));var t=new Gt(Et,!0,e);return en(t,Ft),t},reject:an,race:function(){var e=Ye.apply(null,arguments).map(mn);return new Gt(((t,n)=>{e.map((e=>Gt.resolve(e).then(t,n)))}))},PSD:{get:()=>Mt,set:e=>Mt=e},totalEchoes:{get:()=>hn},newPSD:pn,usePSD:xn,scheduler:{get:()=>Rt,set:e=>{Rt=e}},rejectionMapper:{get:()=>Ut,set:e=>{Ut=e}},follow:(e,t)=>new Gt(((n,r)=>pn(((t,n)=>{var r=Mt;r.unhandleds=[],r.onunhandled=n,r.finalize=gt((function(){!function(e){Wt.push((function t(){e(),Wt.splice(Wt.indexOf(t),1)})),++Vt,Rt((()=>{0==--Vt&&on()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),It&&(It.allSettled&&Ee(Gt,"allSettled",(function(){const e=Ye.apply(null,arguments).map(mn);return new Gt((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,i)=>Gt.resolve(e).then((e=>r[i]={status:"fulfilled",value:e}),(e=>r[i]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),It.any&&"undefined"!=typeof AggregateError&&Ee(Gt,"any",(function(){const e=Ye.apply(null,arguments).map(mn);return new Gt(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const i=new Array(r);e.forEach(((e,o)=>Gt.resolve(e).then((e=>t(e)),(e=>{i[o]=e,--r||n(new AggregateError(i))}))))}))})));const un={awaits:0,echoes:0,id:0};var cn=0,ln=[],fn=0,hn=0,dn=0;function pn(e,t,n,r){var i=Mt,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++dn;var a=zt.env;o.env=Ct?{Promise:Gt,PromiseProp:{value:Gt,configurable:!0,writable:!0},all:Gt.all,race:Gt.race,allSettled:Gt.allSettled,any:Gt.any,resolve:Gt.resolve,reject:Gt.reject,nthen:kn(a.nthen,o),gthen:kn(a.gthen,o)}:{},t&&ge(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=xn(o,e,n,r);return 0===o.ref&&o.finalize(),s}function yn(){return un.id||(un.id=++cn),++un.awaits,un.echoes+=100,un.id}function vn(){return!!un.awaits&&(0==--un.awaits&&(un.id=0),un.echoes=100*un.awaits,!0)}function mn(e){return un.echoes&&e&&e.constructor===It?(yn(),e.then((e=>(vn(),e)),(e=>(vn(),An(e))))):e}function gn(e){++hn,un.echoes&&0!=--un.echoes||(un.echoes=un.id=0),ln.push(Mt),_n(e,!0)}function bn(){var e=ln[ln.length-1];ln.pop(),_n(e,!1)}function _n(e,t){var n=Mt;if((t?!un.echoes||fn++&&e===Mt:!fn||--fn&&e===Mt)||On(t?gn.bind(null,e):bn),e!==Mt&&(Mt=e,n===zt&&(zt.env=wn()),Ct)){var r=zt.env.Promise,i=e.env;St.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(ye,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function wn(){var e=ye.Promise;return Ct?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(ye,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:St.then,gthen:e.prototype.then}:{}}function xn(e,t,n,r,i){var o=Mt;try{return _n(e,!0),t(n,r,i)}finally{_n(o,!1)}}function On(e){Tt.call(kt,e)}function En(e,t,n,r){return"function"!=typeof e?e:function(){var i=Mt;n&&yn(),_n(t,!0);try{return e.apply(this,arguments)}finally{_n(i,!1),r&&On(vn)}}}function kn(e,t){return function(n,r){return e.call(this,En(n,t),En(r,t))}}function Sn(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,i={promise:t,reason:e};if(ye.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),ge(r,i)):ye.CustomEvent&&ge(r=new CustomEvent("unhandledrejection",{detail:i}),i),r&&ye.dispatchEvent&&(dispatchEvent(r),!ye.PromiseRejectionEvent&&ye.onunhandledrejection))try{ye.onunhandledrejection(r)}catch(e){}Je&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Tt).indexOf("[native code]")&&(yn=vn=yt);var An=Gt.reject;function Tn(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Mt.letThrough||e._vip)){var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===lt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Tn(e,t,n,r)))):An(i)}return i._promise(t,((e,t)=>pn((()=>(Mt.trans=i,r(e,t,i)))))).then((e=>i._completion.then((()=>e))))}if(e._state.openComplete)return An(new ht.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return An(new ht.DatabaseClosed);e.open().catch(yt)}return e._state.dbReadyPromise.then((()=>Tn(e,t,n,r)))}const In=String.fromCharCode(65535),Cn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Nn=[],jn="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Rn=jn,Pn=jn,Bn=e=>!/(dexie\\.js|dexie\\.min\\.js)/.test(e);function Dn(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Ln={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Fn(e){return"string"!=typeof e||/\\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Ke(t))[e],t)}class Un{_trans(e,t,n){const r=this._tx||Mt.trans,i=this.name;function o(e,n,r){if(!r.schema[i])throw new ht.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)}const a=nn();try{return r&&r.db===this.db?r===Mt.trans?r._promise(e,o,n):pn((()=>r._promise(e,o,n)),{trans:r,transless:Mt.transless||Mt}):Tn(this.db,e,[this.name],o)}finally{a&&rn()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(me(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=ve(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==In)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&Je&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],i)=>{const a=r[i],s=e[i];return[t||a,t||!a?Dn(n,a&&a.multi?e=>{const t=Pe(e,i);return me(t)&&t.some((e=>o(s,e)))}:e=>o(s,Pe(e,i))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,me(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(we(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){ge(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let i=e;return r&&n&&(i=Fn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[i]}))).then((e=>e.numFailures?Gt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Be(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||me(e))return this.where(":id").equals(e).modify(t);{const n=Pe(e,this.schema.primKey.keyPath);if(void 0===n)return An(new ht.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?ve(t).forEach((n=>{Be(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let i=e;return r&&n&&(i=Fn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[i],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Gt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Be(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Gt.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Ln}))).then((e=>e.numFailures?Gt.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,i=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:o}=this.schema.primKey;if(o&&r)throw new ht.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ht.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=o&&n?e.map(Fn(o)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:i}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return i?t:n;throw new ct(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,i=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:o}=this.schema.primKey;if(o&&r)throw new ht.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ht.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=o&&n?e.map(Fn(o)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:i}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return i?t:n;throw new ct(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new ct(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function zn(e){var t={},n=function(n,r){if(r){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[n].subscribe.apply(null,o),e}if("string"==typeof n)return t[n]};n.addEventType=o;for(var r=1,i=arguments.length;r<i;++r)o(arguments[r]);return n;function o(e,r,i){if("object"==typeof e)return a(e);r||(r=xt),i||(i=yt);var o={subscribers:[],fire:i,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=r(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter((function(t){return t!==e})),o.fire=o.subscribers.reduce(r,i)}};return t[e]=n[e]=o,o}function a(e){ve(e).forEach((function(t){var n=e[t];if(me(n))o(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new ht.InvalidArgument("Invalid event config");var r=o(t,vt,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){je((function(){e.apply(null,t)}))}))}))}}))}}function Mn(e,t){return ke(t).from({prototype:e}),t}function Kn(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Vn(e,t){e.filter=Dn(e.filter,t)}function Wn(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Dn(r(),t()):t,e.justLimit=n&&!r}function Gn(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ht.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function qn(e,t,n){const r=Gn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Zn(e,t,n,r){const i=e.replayFilter?Dn(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},a=(e,n,r)=>{if(!i||i(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),we(o,s)||(o[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),$n(qn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return $n(qn(e,r,n),Dn(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function $n(e,t,n,r){var i=sn(r?(e,t,i)=>n(r(e),t,i):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=yt}),(t=>{e.fail(t),n=yt}))||i(e.value,e,(e=>n=e)),n()}))}))}function Yn(e,t){try{const n=Hn(e),r=Hn(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,i=n<r?n:r;for(let n=0;n<i;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Jn(e),Jn(t));case"Array":return function(e,t){const n=e.length,r=t.length,i=n<r?n:r;for(let n=0;n<i;++n){const r=Yn(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Hn(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Ge(e);return"ArrayBuffer"===n?"binary":n}function Jn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Xn{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,An.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,An.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Dn(t.algorithm,e)}_iterate(e,t){return Zn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&ge(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Zn(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Kn(t,!0))return n.count({trans:e,query:{index:Gn(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Zn(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],i=n.length-1;function o(e,t){return t?o(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=o(e,i),r=o(t,i);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Kn(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Gn(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Zn(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Kn(t)?Wn(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Wn(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Wn(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Vn(this._ctx,(function(n,r,i){return!e(n.value)||(r(i),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Vn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Dn(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Kn(t,!0)&&t.limit>0)return this._read((e=>{var n=Gn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Vn(this._ctx,(function(e){var t=e.primaryKey.toString(),r=we(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var i=ve(e),o=i.length;r=function(t){for(var n=!1,r=0;r<o;++r){var a=i[r],s=e[a];Pe(t,a)!==s&&(Be(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of ve(n))l.push(n[e])};return this.clone().primaryKeys().then((i=>{const o=l=>{const f=Math.min(c,i.length-l);return a.getMany({trans:n,keys:i.slice(l,l+f),cache:"immutable"}).then((h=>{const p=[],y=[],v=s?[]:null,m=[];for(let e=0;e<f;++e){const t=h[e],n={value:Ke(t),primKey:i[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?m.push(i[l+e]):s||0===Yn(u(t),u(n.value))?(y.push(n.value),s&&v.push(i[l+e])):(m.push(i[l+e]),p.push(n.value)))}const g=Kn(t)&&t.limit===1/0&&("function"!=typeof e||e===Qn)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(y.length>0||g&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:g,changeSpec:"function"!=typeof e&&e}).then((e=>d(y.length,e))))).then((()=>(m.length>0||g&&e===Qn)&&a.mutate({trans:n,type:"delete",keys:m,criteria:g}).then((e=>d(m.length,e))))).then((()=>i.length>l+f&&o(l+c)))}))};return o(0).then((()=>{if(l.length>0)throw new ut("Error modifying one or more objects",l,f,h);return i.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Kn(e)&&(e.isPrimKey&&!Pn||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,i=t;return e.table.core.count({trans:n,query:{index:r,range:i}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:i}).then((({failures:e,lastResult:n,results:r,numFailures:i})=>{if(i)throw new ut("Could not delete some values",Object.keys(e).map((t=>e[t])),t-i);return t-i}))))})):this.modify(Qn)}}const Qn=(e,t)=>t.value=null;function er(e,t){return e<t?-1:e===t?0:1}function tr(e,t){return e>t?-1:e===t?0:1}function nr(e,t,n){var r=e instanceof ur?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function rr(e){return new e.Collection(e,(()=>sr(""))).limit(0)}function ir(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return i(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):i(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[u],c)<0&&(s=u)}return a<r.length&&"next"===o?e+n.substr(e.length):a<e.length&&"prev"===o?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function or(e,t,n,r){var i,o,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return nr(e,"String expected.");function h(e){i=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),o=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?er:tr;var t=n.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var d=new e.Collection(e,(()=>ar(s[0],u[f-1]+r)));d._ondirectionchange=function(e){h(e)};var p=0;return d._addAlgorithm((function(e,n,r){var i=e.key;if("string"!=typeof i)return!1;var h=o(i);if(t(h,u,p))return!0;for(var d=null,y=p;y<f;++y){var v=ir(i,h,s[y],u[y],a,c);null===v&&null===d?p=y+1:(null===d||a(d,v)>0)&&(d=v)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function ar(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function sr(e){return{type:1,lower:e,upper:e}}class ur{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?rr(this):new this.Collection(this,(()=>ar(e,t,!n,!r)))}catch(e){return nr(this,Cn)}}equals(e){return null==e?nr(this,Cn):new this.Collection(this,(()=>sr(e)))}above(e){return null==e?nr(this,Cn):new this.Collection(this,(()=>ar(e,void 0,!0)))}aboveOrEqual(e){return null==e?nr(this,Cn):new this.Collection(this,(()=>ar(e,void 0,!1)))}below(e){return null==e?nr(this,Cn):new this.Collection(this,(()=>ar(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?nr(this,Cn):new this.Collection(this,(()=>ar(void 0,e)))}startsWith(e){return"string"!=typeof e?nr(this,"String expected."):this.between(e,e+In,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):or(this,((e,t)=>0===e.indexOf(t[0])),[e],In)}equalsIgnoreCase(e){return or(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Ye.apply($e,arguments);return 0===e.length?rr(this):or(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Ye.apply($e,arguments);return 0===e.length?rr(this):or(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,In)}anyOf(){const e=Ye.apply($e,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return nr(this,Cn)}if(0===e.length)return rr(this);const n=new this.Collection(this,(()=>ar(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,i,o)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return i(o),!1;return 0===t(a,e[r])||(i((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Ye.apply($e,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return nr(this,Cn)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,i=this._descending,o=this._min,a=this._max;if(0===e.length)return rr(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return nr(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ht.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,i=e.length;for(;r<i;++r){const i=e[r];if(n(t[0],i[1])<0&&n(t[1],i[0])>0){i[0]=o(i[0],t[0]),i[1]=a(i[1],t[1]);break}}return r===i&&e.push(t),e}),[]),c.sort(f)}catch(e){return nr(this,Cn)}let h=0;const d=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,p=s?e=>i(e,c[h][0])>0:e=>i(e,c[h][0])>=0;let y=d;const v=new this.Collection(this,(()=>ar(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=d,l=r):(y=p,l=i),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var i=e.key;y(i);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!d(e)&&!p(e)}(i)||(0===this._cmp(i,c[h][1])||0===this._cmp(i,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Ye.apply($e,arguments);return e.every((e=>"string"==typeof e))?0===e.length?rr(this):this.inAnyRange(e.map((e=>[e,e+In]))):nr(this,"startsWithAnyOf() only works with strings")}}function cr(e){return sn((function(t){return lr(t),e(t.target.error),!1}))}function lr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const fr=zn(null,"storagemutated");class hr{_lock(){return Ne(!Mt.global),++this._reculock,1!==this._reculock||Mt.global||(Mt.lockOwnerFor=this),this}_unlock(){if(Ne(!Mt.global),0==--this._reculock)for(Mt.global||(Mt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{xn(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Mt.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(Ne(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ht.DatabaseClosed(n);case"MissingAPIError":throw new ht.MissingAPI(n.message,n);default:throw new ht.OpenFailed(n)}if(!this.active)throw new ht.TransactionInactive;return Ne(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sn((t=>{lr(t),this._reject(e.error)})),e.onabort=sn((t=>{lr(t),this.active&&this._reject(new ht.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=sn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&fr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return An(new ht.ReadOnly("Transaction is readonly"));if(!this.active)return An(new ht.TransactionInactive);if(this._locked())return new Gt(((r,i)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,i)},Mt])}));if(n)return pn((()=>{var e=new Gt(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Gt(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Gt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new Gt(((e,r)=>{n.then((n=>t._waitingQueue.push(sn(e.bind(null,n)))),(e=>t._waitingQueue.push(sn(r.bind(null,e))))).finally((()=>{t._waitingFor===i&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ht.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(we(t,e))return t[e];const n=this.schema[e];if(!n)throw new ht.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function dr(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+pr(t)}}function pr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function yr(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Re(n,(e=>[e.name,e]))}}let vr=e=>{try{return e.only([[]]),vr=()=>[[]],[[]]}catch(e){return vr=()=>In,In}};function mr(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>Pe(t,e)}(e):t=>Pe(t,e)}function gr(e){return[].slice.call(e)}let br=0;function _r(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function wr(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:i,upperOpen:o}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!o):void 0===r?t.lowerBound(n,!!i):t.bound(n,r,!!i,!!o)}const{schema:i,hasGetAll:o}=function(e,t){const n=gr(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=me(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:mr(t)},indexes:gr(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:i}=e,a={name:t,compound:me(i),keyPath:i,unique:n,multiEntry:r,extractKey:mr(i)};return o[_r(i)]=a,a})),getIndexByKeyPath:e=>o[_r(e)]};return o[":id"]=a.primaryKey,null!=t&&(o[_r(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604)}}(e,n),a=i.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:i,values:o,range:a}){return new Promise(((s,u)=>{s=sn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=i||o||{length:1};if(i&&o&&i.length!==o.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const p=[],y=[];let v=0;const m=e=>{++v,lr(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(d=c.clear()):p.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[o,i]:[o,null]:[i,null];if(f)for(let r=0;r<h;++r)p.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=m;else for(let t=0;t<h;++t)p.push(d=c[n](e[t])),d.onerror=m}const g=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?i:p.map((e=>e.result)),lastResult:t})};d.onerror=e=>{m(e),g(e)},d.onsuccess=g}))},getMany:({trans:e,keys:n})=>new Promise(((r,i)=>{r=sn(r);const o=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=cr(i);for(let e=0;e<a;++e)null!=n[e]&&(u=o.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,i)=>{r=sn(r);const o=e.objectStore(t).get(n);o.onsuccess=e=>r(e.target.result),o.onerror=cr(i)})),query:function(e){return n=>new Promise(((i,o)=>{i=sn(i);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,d=a.objectStore(t),p=f.isPrimaryKey?d:d.index(f.name),y=r(h);if(0===u)return i({result:[]});if(e){const e=s?p.getAll(y,l):p.getAllKeys(y,l);e.onsuccess=e=>i({result:e.target.result}),e.onerror=cr(o)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const o=t.result;return o?(n.push(s?o.value:o.primaryKey),++e===u?i({result:n}):void o.continue()):i({result:n})},t.onerror=cr(o)}}))}(o),openCursor:function({trans:e,values:n,query:i,reverse:o,unique:a}){return new Promise(((s,u)=>{s=sn(s);const{index:c,range:l}=i,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),d=o?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in h)?h.openCursor(r(l),d):h.openKeyCursor(r(l),d);p.onerror=cr(u),p.onsuccess=sn((t=>{const n=p.result;if(!n)return void s(null);n.___id=++br,n.done=!1;const r=n.continue.bind(n);let i=n.continuePrimaryKey;i&&(i=i.bind(n));const o=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=sn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=sn(e),p.onerror=cr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=sn((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=i,n.advance=o,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:i,range:o}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=i.isPrimaryKey?s:s.index(i.name),c=r(o),l=c?u.count(c):u.count();l.onsuccess=sn((t=>e(t.target.result))),l.onerror=cr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table \'${e}\' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:vr(t),schema:i}}function xr({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},i){const o=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(wr(t,n,i),e.dbcore);return{dbcore:o}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Or({_novip:e},t,n,r){n.forEach((n=>{const i=r[n];t.forEach((t=>{const r=Ae(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?Ee(t,n,{get(){return this.table(n)},set(e){Oe(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,i))}))}))}function Er({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function kr(e,t){return e._cfg.version-t._cfg.version}function Sr(e,t,n,r){const i=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,i);o.create(n),o._completion.catch(r);const a=o._reject.bind(o),s=Mt.transless||Mt;pn((()=>{Mt.trans=o,Mt.transless=s,0===t?(ve(i).forEach((e=>{Tr(n,e,i[e].primKey,i[e].indexes)})),xr(e,n),Gt.follow((()=>e.on.populate.fire(o))).catch(a)):function({_novip:e},t,n,r){const i=[],o=e._versions;let a=e._dbSchema=Cr(e,e.idbdb,r),s=!1;return o.filter((e=>e._cfg.version>=t)).forEach((o=>{i.push((()=>{const i=a,u=o._cfg.dbschema;Nr(e,i,r),Nr(e,u,r),a=e._dbSchema=u;const c=Ar(i,u);c.add.forEach((e=>{Tr(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new ht.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>Ir(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Ir(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=o._cfg.contentUpgrade;if(l&&o._cfg.version>t){xr(e,r),n._memoizedTables={},s=!0;let t=De(u);c.del.forEach((e=>{t[e]=i[e]})),Er(e,[e.Transaction.prototype]),Or(e,[e.Transaction.prototype],ve(t),t),n.schema=t;const o=He(l);let a;o&&yn();const f=Gt.follow((()=>{if(a=l(n),a&&o){var e=vn.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Gt.resolve(a):f.then((()=>a))}})),i.push((t=>{s&&Rn||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(o._cfg.dbschema,t),Er(e,[e.Transaction.prototype]),Or(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return i.length?Gt.resolve(i.shift()(n.idbtrans)).then(e):Gt.resolve()}().then((()=>{var e,t;t=r,ve(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||Tr(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,o,n).catch(a)}))}function Ar(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const i=e[r],o=t[r];if(i){const e={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!jn)e.recreate=!0,n.change.push(e);else{const t=i.idxByName,r=o.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],i=r[a];n?n.src!==i.src&&e.change.push(i):e.add.push(i)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,o])}return n}function Tr(e,t,n,r){const i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>Ir(i,e))),i}function Ir(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Cr(e,t,n){const r={};return Ie(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let i=t.keyPath;const o=dr(pr(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);i=n.keyPath;var s=dr(n.name,i,!!n.unique,!!n.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(s)}r[e]=yr(e,o,a)})),r}function Nr({_novip:e},t,n){const r=n.db.objectStoreNames;for(let i=0;i<r.length;++i){const o=r[i],a=n.objectStore(o);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,i="string"==typeof r?r:"["+Ie(r).join("+")+"]";if(t[o]){const e=t[o].idxByName[i];e&&(e.name=n,delete t[o].idxByName[i],t[o].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&ye.WorkerGlobalScope&&ye instanceof ye.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604&&(e._hasGetAll=!1)}class jr{_parseStoresSpec(e,t){ve(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\\+\\+)/g,""),r=/^\\[/.test(n)?n.match(/^\\[(.*)\\]$/)[1].split("+"):n;return dr(n,r||null,/\\&/.test(e),/\\*/.test(e),/\\+\\+/.test(e),me(r),0===t)})),i=r.shift();if(i.multi)throw new ht.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new ht.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ht.Schema("Index must have a name and cannot be an empty string")})),t[n]=yr(n,i,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?ge(this._cfg.storesSource,e):e;const n=t._versions,r={};let i={};return n.forEach((e=>{ge(r,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(r,i)})),t._dbSchema=i,Er(t,[t._allTables,t,t.Transaction.prototype]),Or(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],ve(i),i),t._storeNames=ve(i),this}upgrade(e){return this._cfg.contentUpgrade=Ot(this._cfg.contentUpgrade||yt,e),this}}function Rr(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ei("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Pr(e){return e&&"function"==typeof e.databases}function Br(e){return pn((function(){return Mt.letThrough=!0,e()}))}function Dr(){var e;return!navigator.userAgentData&&/Safari\\//.test(navigator.userAgent)&&!/Chrom(e|ium)\\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Lr(e){var t=t=>e.next(t),n=i(t),r=i((t=>e.throw(t)));function i(e){return t=>{var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(n,r):me(o)?Promise.all(o).then(n,r):n(o)}}return i(t)()}function Fr(e,t,n){var r=arguments.length;if(r<2)throw new ht.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,Fe(i),n]}function Ur(e,t,n,r,i){return Gt.resolve().then((()=>{const o=Mt.transless||Mt,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:o};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===lt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Ur(e,t,n,null,i)))):An(r)}const u=He(i);let c;u&&yn();const l=Gt.follow((()=>{if(c=i.call(a,a),c)if(u){var e=vn.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Lr(c))}),s);return(c&&"function"==typeof c.then?Gt.resolve(c).then((e=>a.active?e:An(new ht.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),An(e))))}))}function zr(e,t,n){const r=me(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Mr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,i={},o=[];function a(e,t,n){const r=_r(e),s=i[r]=i[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:mr(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||o.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,i=n.keyTail,{type:1===r.type?2:r.type,lower:zr(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:zr(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}:t;var r,i}const c={...n,schema:{...r,primaryKey:s,indexes:o,getIndexByKeyPath:function(e){const t=i[_r(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:i,keyLength:o}=t.query.index;return i?n.openCursor(u(t)).then((n=>n&&function(n){const i=Object.create(n,{continue:{value:function(i){null!=i?n.continue(zr(i,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,i){n.continuePrimaryKey(zr(t,e.MAX_KEY,r),i)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===o?e[0]:e.slice(0,o)}},value:{get:()=>n.value}});return i}(n))):n.openCursor(t)}};return c}}}};function Kr(e,t,n,r){return n=n||{},r=r||"",ve(e).forEach((i=>{if(we(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){const e=Ge(o);e!==Ge(a)?n[r+i]=t[i]:"Object"===e?Kr(o,a,n,r+i+"."):o!==a&&(n[r+i]=t[i])}else o!==a&&(n[r+i]=t[i])}else n[r+i]=void 0})),ve(t).forEach((i=>{we(e,i)||(n[r+i]=t[i])})),n}const Vr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,i={...n,mutate(e){const i=Mt.trans,{deleting:o,creating:a,updating:s}=i.table(t).hook;switch(e.type){case"add":if(a.fire===yt)break;return i._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===yt&&s.fire===yt)break;return i._promise("readwrite",(()=>u(e)),!0);case"delete":if(o.fire===yt)break;return i._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(o.fire===yt)break;return i._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Mt.trans,i=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:i}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,i).then((u=>{const c=i.map(((n,i)=>{const c=u[i],l={onerror:null,onsuccess:null};if("delete"===e.type)o.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const o=a.fire.call(l,n,e.values[i],t);null==n&&null!=o&&(n=o,e.keys[i]=n,r.outbound||Be(e.values[i],r.keyPath,n))}else{const r=Kr(c,e.values[i]),o=s.fire.call(l,r,n,c,t);if(o){const t=e.values[i];Object.keys(o).forEach((e=>{we(t,e)?t[e]=o[e]:Be(t,e,o[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:o})=>{for(let r=0;r<i.length;++r){const o=n?n[r]:i[r],a=c[r];null==o?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:o)}return{failures:t,results:n,numFailures:r,lastResult:o}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},i)))))}}};return i}})};function Wr(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let i=0,o=0;i<t.keys.length&&o<e.length;++i)0===Yn(t.keys[i],e[o])&&(r.push(n?Ke(t.values[i]):t.values[i]),++o);return r.length===e.length?r:null}catch(e){return null}}const Gr={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Wr(e.keys,e.trans._cache,"clone"===e.cache);return t?Gt.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Ke(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function qr(e){return!("from"in e)}const Zr=function(e,t){if(!this){const t=new Zr;return e&&"d"in e&&ge(t,e),t}ge(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function $r(e,t,n){const r=Yn(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(qr(e))return ge(e,{from:t,to:n,d:1});const i=e.l,o=e.r;if(Yn(n,e.from)<0)return i?$r(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Jr(e);if(Yn(t,e.to)>0)return o?$r(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Jr(e);Yn(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),Yn(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;i&&!e.l&&Yr(e,i),o&&a&&Yr(e,o)}function Yr(e,t){qr(t)||function e(t,{from:n,to:r,l:i,r:o}){$r(t,n,r),i&&e(t,i),o&&e(t,o)}(e,t)}function Hr(e){let t=qr(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Yn(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Yn(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Jr(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){const t="r"===i?"l":"r",n={...e},r=e[i];e.from=r.from,e.to=r.to,e[i]=r[i],n[i]=r[t],e[t]=n,n.d=Xr(n)}e.d=Xr(e)}function Xr({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}xe(Zr.prototype,{add(e){return Yr(this,e),this},addKey(e){return $r(this,e,e),this},addKeys(e){return e.forEach((e=>$r(this,e,e))),this},[qe](){return Hr(this)}});const Qr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Zr(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const i=e.table(r),{schema:o}=i,{primaryKey:a}=o,{extractKey:s,outbound:u}=a,c={...i,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Zr)},c=u(""),l=u(":dels"),{type:f}=e;let[h,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return i.mutate(e).then((e=>{if(me(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Wr(h,p);t||"add"===f||l.addKeys(h),(t||d)&&function(e,t,n,r){t.indexes.forEach((function(t){const i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&me(e)?e.forEach((e=>i.addKey(e))):i.addKey(e);(n||r).forEach(((e,t)=>{const i=n&&o(n[t]),s=r&&o(r[t]);0!==Yn(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}(u,o,t,d)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),o.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,i;return[t,new Zr(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(i=n.upper)&&void 0!==i?i:e.MAX_KEY)]},f={get:e=>[a,new Zr(e.key)],getMany:e=>[a,(new Zr).addKeys(e.keys)],count:l,query:l,openCursor:l};return ve(f).forEach((e=>{c[e]=function(o){const{subscr:a}=Mt;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Zr)},l=c(""),h=c(":dels"),[d,p]=f[e](o);if(c(d.name||"").add(p),!d.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&o.values&&i.query({...o,values:!1});return i[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&o.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=o.values?n.result.map(s):n.result;o.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=o.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return i[e].apply(this,arguments)}})),c}}}};class ei{constructor(e,t){this._middlewares={},this.verno=0;const n=ei.dependencies;this._options=t={addons:ei.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:yt,dbReadyPromise:null,cancelOpen:yt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;i.dbReadyPromise=new Gt((e=>{i.dbReadyResolve=e})),i.openCanceller=new Gt(((e,t)=>{i.cancelOpen=t})),this._state=i,this.name=e,this.on=zn(this,"populate","blocked","versionchange","close",{ready:[Ot,yt]}),this.on.ready.subscribe=Ce(this.on.ready.subscribe,(e=>(t,n)=>{ei.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Gt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(o=this,Mn(Xn.prototype,(function(e,t){this.db=o;let n=Ln,r=null;if(t)try{n=t()}catch(e){r=e}const i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:i.or,valueMapper:s!==vt?s:null}}))),this.Table=function(e){return Mn(Un.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:zn(null,{creating:[bt,yt],reading:[mt,vt],updating:[wt,yt],deleting:[_t,yt]})}))}(this),this.Transaction=function(e){return Mn(hr.prototype,(function(t,n,r,i,o){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=zn(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Gt(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),An(e)}))}))}(this),this.Version=function(e){return Mn(jr.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Mn(ur.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const i=e._deps.indexedDB;if(!i)throw new ht.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=(e,t)=>i.cmp(t,e),this._max=(e,t)=>i.cmp(e,t)>0?e:t,this._min=(e,t)=>i.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database \'${this.name}\'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database \'${this.name}\'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete(\'${this.name}\') was blocked`):console.warn(`Upgrade \'${this.name}\' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=vr(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Nn.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Mr),this.use(Vr),this.use(Qr),this.use(Gr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ht.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ht.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(kr),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Mt.letThrough||this._vip)?e():new Gt(((e,t)=>{if(this._state.openComplete)return t(new ht.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ht.DatabaseClosed);this.open().catch(yt)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:t,level:null==n?10:n,name:r}),i.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?An(t.dbOpenError):e));Je&&(t.openCanceller._stackHolder=tt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function i(){if(t.openCanceller!==r)throw new ht.DatabaseClosed("db.open() was cancelled")}let o=t.dbReadyResolve,a=null,s=!1;return Gt.race([r,("undefined"==typeof navigator?Gt.resolve():Dr()).then((()=>new Gt(((r,o)=>{if(i(),!n)throw new ht.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new ht.MissingAPI;c.onerror=cr(o),c.onblocked=sn(e._fireOnBlocked),c.onupgradeneeded=sn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=lr,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=sn((()=>{o(new ht.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=cr(o);var i=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=i<1,e._novip.idbdb=c.result,Sr(e,i/10,a,o)}}),o),c.onsuccess=sn((()=>{a=null;const n=e._novip.idbdb=c.result,i=Ie(n.objectStoreNames);if(i.length>0)try{const r=n.transaction(1===(o=i).length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Cr(0,t,n);e._storeNames=Ie(t.objectStoreNames,0),Or(e,[e._allTables],ve(r),r)}(e,n,r):(Nr(e,e._dbSchema,r),function(e,t){const n=Ar(Cr(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),xr(e,r)}catch(e){}var o;Nn.push(e),n.onversionchange=sn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=sn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Pr(e)&&"__dbnames"!==n&&Rr(e,t).put({name:n}).catch(yt)}(e._deps,u),r()}),o)}))))]).then((()=>(i(),t.onReadyBeingFired=[],Gt.resolve(Br((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Ot,yt);return t.onReadyBeingFired=[],Gt.resolve(Br((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),An(n)})).finally((()=>{t.openComplete=!0,o()}))}(this)}_close(){const e=this._state,t=Nn.indexOf(this);if(t>=0&&Nn.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Gt((t=>{e.dbReadyResolve=t})),e.openCanceller=new Gt(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ht.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Gt(((n,r)=>{const i=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=sn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Pr(e)&&"__dbnames"!==n&&Rr(e,t).delete(n).catch(yt)}(this._deps,this.name),n()})),e.onerror=cr(r),e.onblocked=this._fireOnBlocked};if(e)throw new ht.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(i):i()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return ve(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Fr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Mt.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const i=-1!==e.indexOf("?");let o,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)o="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new ht.InvalidArgument("Invalid transaction mode: "+e);o="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===o){if(!i)throw new ht.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!i)throw new ht.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),i&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):An(e)}const s=Ur.bind(null,this,o,a,r,n);return r?r._promise(o,s,"lock"):Mt.trans?xn(Mt.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!we(this._allTables,e))throw new ht.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const ti="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class ni{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[ti](){return this}}function ri(e,t){return ve(t).forEach((n=>{Yr(e[n]||(e[n]=new Zr),t[n])})),e}let ii;try{ii={indexedDB:ye.indexedDB||ye.mozIndexedDB||ye.webkitIndexedDB||ye.msIndexedDB,IDBKeyRange:ye.IDBKeyRange||ye.webkitIDBKeyRange}}catch(ye){ii={indexedDB:null,IDBKeyRange:null}}const oi=ei;function ai(e){let t=si;try{si=!0,fr.storagemutated.fire(e)}finally{si=t}}xe(oi,{...pt,delete:e=>new oi(e,{addons:[]}).delete(),exists:e=>new oi(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Pr(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Rr(e,t).toCollection().primaryKeys()}(oi.dependencies).then(e)}catch(e){return An(new ht.MissingAPI)}},defineClass:()=>function(e){ge(this,e)},ignoreTransaction:e=>Mt.trans?xn(Mt.transless,e):e(),vip:Br,async:function(e){return function(){try{var t=Lr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Gt.resolve(t)}catch(e){return An(e)}}},spawn:function(e,t,n){try{var r=Lr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Gt.resolve(r)}catch(e){return An(e)}},currentTransaction:{get:()=>Mt.trans||null},waitFor:function(e,t){const n=Gt.resolve("function"==typeof e?oi.ignoreTransaction(e):e).timeout(t||6e4);return Mt.trans?Mt.trans.waitFor(n):n},Promise:Gt,debug:{get:()=>Je,set:e=>{Xe(e,"dexie"===e?()=>!0:Bn)}},derive:ke,extend:ge,props:xe,override:Ce,Events:zn,on:fr,liveQuery:function(e){return new ni((t=>{const n=He(e);let r=!1,i={},o={};const a={get closed(){return r},unsubscribe:()=>{r=!0,fr.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return ve(o).some((e=>i[e]&&function(e,t){const n=Hr(t);let r=n.next();if(r.done)return!1;let i=r.value;const o=Hr(e);let a=o.next(i.from),s=a.value;for(;!r.done&&!a.done;){if(Yn(s.from,i.to)<=0&&Yn(s.to,i.from)>=0)return!0;Yn(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}(i[e],o[e])))}const l=e=>{ri(i,e),c()&&f()},f=()=>{if(s||r)return;i={};const h={},d=function(t){n&&yn();const r=()=>pn(e,{subscr:t,trans:null}),i=Mt.trans?xn(Mt.transless,r):r();return n&&i.then(vn,vn),i}(h);u||(fr("storagemutated",l),u=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(c()?f():(i={},o=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:ri,getByKeyPath:Pe,setByKeyPath:Be,delByKeyPath:function(e,t){"string"==typeof t?Be(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Be(e,t,void 0)}))},shallowClone:De,deepClone:Ke,getObjectDiff:Kr,cmp:Yn,asap:je,minKey:-1/0,addons:[],connections:Nn,errnames:lt,dependencies:ii,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),oi.maxKey=vr(oi.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(fr("storagemutated",(e=>{if(!si){let t;jn?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),si=!0,dispatchEvent(t),si=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{si||ai(e)})));let si=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),fr("storagemutated",(t=>{si||e.postMessage(t)})),e.onmessage=e=>{e.data&&ai(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){fr("storagemutated",(e=>{try{si||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&ai(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&ai(e.changedParts)}))}function ui(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function ci(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function li(e){return[e.schema.primKey].concat(e.schema.indexes).map((function(e){return e.src})).join(",")}function fi(e,t){return new Promise((function(n,r){var i=new FileReader;i.onabort=function(e){return r(new Error("file read aborted"))},i.onerror=function(e){return r(e.target.error)},i.onload=function(e){return n(e.target.result)},"binary"===t?i.readAsArrayBuffer(e):i.readAsText(e)}))}function hi(e,t){if("undefined"==typeof FileReaderSync)throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var n=new FileReaderSync;return"binary"===t?n.readAsArrayBuffer(e):n.readAsText(e)}Gt.rejectionMapper=function(e,t){if(!e||e instanceof at||e instanceof TypeError||e instanceof SyntaxError||!e.name||!dt[e.name])return e;var n=new dt[e.name](t||e.message,e);return"stack"in e&&Ee(n,"stack",{get:function(){return this.inner.stack}}),n},Xe(Je,Bn);var di="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pi(e,t){return e(t={exports:{}},t.exports),t.exports}for(var yi=pi((function(e,t){e.exports=function(){function e(t){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(t)}function t(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function n(e){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=e.apply(n,r);function s(e){t(a,i,o,s,u,"next",e)}function u(e){t(a,i,o,s,u,"throw",e)}s(void 0)}))}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){return h(e)||p(e,t)||v()}function l(e){return f(e)||d(e)||y()}function f(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function h(e){if(Array.isArray(e))return e}function d(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function p(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var m=function e(t){r(this,e),this.p=new Promise(t)};m.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(m.prototype[Symbol.toStringTag]="TypesonPromise"),m.prototype.then=function(e,t){var n=this;return new m((function(r,i){n.p.then((function(t){r(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(r,i)}))},m.prototype.catch=function(e){return this.then(null,e)},m.resolve=function(e){return new m((function(t){t(e)}))},m.reject=function(e){return new m((function(t,n){n(e)}))},["all","race"].forEach((function(e){m[e]=function(t){return new m((function(n,r){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(n,r)}))}}));var g={}.toString,b={}.hasOwnProperty,_=Object.getPrototypeOf,w=b.toString;function x(e,t){return A(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function O(e){return g.call(e).slice(8,-1)}function E(t,n){if(!t||"object"!==e(t))return!1;var r=_(t);if(!r)return null===n;var i=b.call(r,"constructor")&&r.constructor;return"function"!=typeof i?null===n:n===i||null!==n&&w.call(i)===w.call(n)||"function"==typeof n&&"string"==typeof i.__typeson__type__&&i.__typeson__type__===n.__typeson__type__}function k(e){return!(!e||"Object"!==O(e))&&(!_(e)||E(e,Object))}function S(e){if(!e||"Object"!==O(e))return!1;var t=_(e);return!t||E(e,Object)||S(t)}function A(t){return t&&"object"===e(t)}function T(e){return e.replace(/~/g,"~0").replace(/\\./g,"~1")}function I(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function C(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[I(t.slice(0,n))];return void 0===r?void 0:C(r,t.slice(n+1))}return e[I(t)]}function N(e,t,n){if(""===t)return n;var r=t.indexOf(".");return r>-1?N(e[I(t.slice(0,r))],t.slice(r+1),n):(e[I(t)]=n,e)}function j(t){return null===t?"null":Array.isArray(t)?"array":e(t)}var R=Object.keys,P=Array.isArray,B={}.hasOwnProperty,D=["type","replaced","iterateIn","iterateUnsetNumeric"];function L(e,t){if(""===e.keypath)return-1;var n=e.keypath.match(/\\./g)||0,r=t.keypath.match(/\\./g)||0;return n&&(n=n.length),r&&(r=r.length),n>r?-1:n<r?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var F=function(){function t(e){r(this,t),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return o(t,[{key:"stringify",value:function(e,t,n,r){r=u({},this.options,{},r,{stringification:!0});var i=this.encapsulate(e,null,r);return P(i)?JSON.stringify(i[0],t,n):i.then((function(e){return JSON.stringify(e,t,n)}))}},{key:"stringifySync",value:function(e,t,n,r){return this.stringify(e,t,n,u({throwOnBadSyncType:!0},r,{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,n,r){return this.stringify(e,t,n,u({throwOnBadSyncType:!0},r,{sync:!1}))}},{key:"parse",value:function(e,t,n){return n=u({},this.options,{},n,{parse:!0}),this.revive(JSON.parse(e,t),n)}},{key:"parseSync",value:function(e,t,n){return this.parse(e,t,u({throwOnBadSyncType:!0},n,{sync:!0}))}},{key:"parseAsync",value:function(e,t,n){return this.parse(e,t,u({throwOnBadSyncType:!0},n,{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)}},{key:"rootTypeName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)}},{key:"encapsulate",value:function(r,i,o){var a=(o=u({sync:!0},this.options,{},o)).sync,s=this,f={},h=[],d=[],p=[],y=!("cyclic"in o)||o.cyclic,v=o.encapsulateObserver,g=O("",r,y,i||{},p);function b(e){var n=Object.values(f);if(o.iterateNone)return n.length?n[0]:t.getJSONType(e);if(n.length){if(o.returnTypeNames)return l(new Set(n));e&&k(e)&&!B.call(e,"$types")?e.$types=f:e={$:e,$types:{$:f}}}else A(e)&&B.call(e,"$types")&&(e={$:e,$types:!0});return!o.returnTypeNames&&e}function _(e,t){return w.apply(this,arguments)}function w(){return w=n(regeneratorRuntime.mark((function e(t,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(r.map((function(e){return e[1].p})));case 2:return i=e.sent,e.next=5,Promise.all(i.map(function(){var e=n(regeneratorRuntime.mark((function e(n){var i,o,a,s,u,l,f,h,d,p,y,v,g,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=[],o=r.splice(0,1),a=c(o,1),s=a[0],u=c(s,7),l=u[0],f=u[2],h=u[3],d=u[4],p=u[5],y=u[6],v=O(l,n,f,h,i,!0,y),g=E(v,m),!l||!g){e.next=11;break}return e.next=8,v.p;case 8:return b=e.sent,d[p]=b,e.abrupt("return",_(t,i));case 11:return l?d[p]=v:t=g?v.p:v,e.abrupt("return",_(t,i));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)}))),w.apply(this,arguments)}function x(e,t,n){Object.assign(e,t);var r=D.map((function(t){var n=e[t];return delete e[t],n}));n(),D.forEach((function(t,n){e[t]=r[n]}))}function O(n,r,i,a,u,c,l){var p,y={},g=e(r),b=v?function(e){var o=l||a.type||t.getJSONType(r);v(Object.assign(e||y,{keypath:n,value:r,cyclic:i,stateObj:a,promisesData:u,resolvingTypesonPromise:c,awaitingTypesonPromise:E(r,m)},{type:o}))}:null;if(["string","boolean","number","undefined"].includes(g))return void 0===r||"number"===g&&(isNaN(r)||r===-1/0||r===1/0)?(p=a.replaced?r:S(n,r,a,u,!1,c,b))!==r&&(y={replaced:p}):p=r,b&&b(),p;if(null===r)return b&&b(),r;if(i&&!a.iterateIn&&!a.iterateUnsetNumeric&&r&&"object"===e(r)){var _=h.indexOf(r);if(!(_<0))return f[n]="#",b&&b({cyclicKeypath:d[_]}),"#"+d[_];!0===i&&(h.push(r),d.push(n))}var w,A=k(r),I=P(r),C=(A||I)&&(!s.plainObjectReplacers.length||a.replaced)||a.iterateIn?r:S(n,r,a,u,A||I,null,b);if(C!==r?(p=C,y={replaced:C}):""===n&&E(r,m)?(u.push([n,r,i,a,void 0,void 0,a.type]),p=r):I&&"object"!==a.iterateIn||"array"===a.iterateIn?(w=new Array(r.length),y={clone:w}):(["function","symbol"].includes(e(r))||"toJSON"in r||E(r,m)||E(r,Promise)||E(r,ArrayBuffer))&&!A&&"object"!==a.iterateIn?p=r:(w={},a.addLength&&(w.length=r.length),y={clone:w}),b&&b(),o.iterateNone)return w||p;if(!w)return p;if(a.iterateIn){var N=function(e){var t={ownKeys:B.call(r,e)};x(a,t,(function(){var t=n+(n?".":"")+T(e),o=O(t,r[e],Boolean(i),a,u,c);E(o,m)?u.push([t,o,Boolean(i),a,w,e,a.type]):void 0!==o&&(w[e]=o)}))};for(var j in r)N(j);b&&b({endIterateIn:!0,end:!0})}else R(r).forEach((function(e){var t=n+(n?".":"")+T(e);x(a,{ownKeys:!0},(function(){var n=O(t,r[e],Boolean(i),a,u,c);E(n,m)?u.push([t,n,Boolean(i),a,w,e,a.type]):void 0!==n&&(w[e]=n)}))})),b&&b({endIterateOwn:!0,end:!0});if(a.iterateUnsetNumeric){for(var D=r.length,L=function(e){if(!(e in r)){var t=n+(n?".":"")+e;x(a,{ownKeys:!1},(function(){var n=O(t,void 0,Boolean(i),a,u,c);E(n,m)?u.push([t,n,Boolean(i),a,w,e,a.type]):void 0!==n&&(w[e]=n)}))}},F=0;F<D;F++)L(F);b&&b({endIterateUnsetNumeric:!0,end:!0})}return w}function S(e,t,n,r,i,o,u){for(var c=i?s.plainObjectReplacers:s.nonplainObjectReplacers,l=c.length;l--;){var h=c[l];if(h.test(t,n)){var d=h.type;if(s.revivers[d]){var p=f[e];f[e]=p?[d].concat(p):d}return Object.assign(n,{type:d,replaced:!0}),!a&&h.replaceAsync||h.replace?(u&&u({replacing:!0}),O(e,h[a||!h.replaceAsync?"replace":"replaceAsync"](t,n),y&&"readonly",n,r,o,d)):(u&&u({typeDetected:!0}),O(e,t,y&&"readonly",n,r,o,d))}}return t}return p.length?a&&o.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(_(g,p)).then(b):!a&&o.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():o.stringification&&a?[b(g)]:a?b(g):Promise.resolve(b(g))}},{key:"encapsulateSync",value:function(e,t,n){return this.encapsulate(e,t,u({throwOnBadSyncType:!0},n,{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,n){return this.encapsulate(e,t,u({throwOnBadSyncType:!0},n,{sync:!1}))}},{key:"revive",value:function(e,t){var n=e&&e.$types;if(!n)return e;if(!0===n)return e.$;var r=(t=u({sync:!0},this.options,{},t)).sync,i=[],o={},a=!0;n.$&&k(n.$)&&(e=e.$,n=n.$,a=!1);var s=this;function l(e,t){var n=c(s.revivers[e]||[],1)[0];if(!n)throw new Error("Unregistered type: "+e);return r&&!("revive"in n)?t:n[r&&n.revive?"revive":!r&&n.reviveAsync?"reviveAsync":"revive"](t,o)}function f(){var t=[];if(Object.entries(n).forEach((function(e){var r=c(e,2),i=r[0],o=r[1];"#"!==o&&[].concat(o).forEach((function(e){c(s.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:i,type:e}),delete n[i])}))})),t.length)return t.sort(L).reduce((function t(n,r){var i=r.keypath,o=r.type;if(x(n))return n.then((function(e){return t(e,{keypath:i,type:o})}));var a=C(e,i);if(E(a=l(o,a),m))return a.then((function(t){var n=N(e,i,t);n===t&&(e=n)}));var s=N(e,i,a);s===a&&(e=s)}),void 0)}var h=[];function d(e,t,r,o,s){if(!a||"$types"!==e){var u=n[e],f=P(t);if(f||k(t)){var p=f?new Array(t.length):{};for(R(t).forEach((function(n){var i=d(e+(e?".":"")+T(n),t[n],r||p,p,n),o=function(e){return E(e,U)?p[n]=void 0:void 0!==e&&(p[n]=e),e};E(i,m)?h.push(i.then((function(e){return o(e)}))):o(i)})),t=p;i.length;){var y=c(i[0],4),v=y[0],g=y[1],b=y[2],_=y[3],w=C(v,g);if(void 0===w)break;b[_]=w,i.splice(0,1)}}if(!u)return t;if("#"===u){var x=C(r,t.slice(1));return void 0===x&&i.push([r,t.slice(1),o,s]),x}return[].concat(u).reduce((function e(t,n){return E(t,m)?t.then((function(t){return e(t,n)})):l(n,t)}),t)}}function p(e){return E(e,U)?void 0:e}var y,v=f();return E(v,m)?y=v.then((function(){return e})):(y=d("",e,null),h.length&&(y=m.resolve(y).then((function(e){return m.all([e].concat(h))})).then((function(e){return c(e,1)[0]})))),x(y)?r&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():E(y,m)?y.p.then(p):y:!r&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r?p(y):Promise.resolve(p(y))}},{key:"reviveSync",value:function(e,t){return this.revive(e,u({throwOnBadSyncType:!0},t,{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,u({throwOnBadSyncType:!0},t,{sync:!1}))}},{key:"register",value:function(e,n){return n=n||{},[].concat(e).forEach((function e(r){var i=this;if(P(r))return r.map((function(t){return e.call(i,t)}));r&&R(r).forEach((function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(t.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var i=r[e],o=i&&i.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,a=o.filter((function(t){return t.type===e}));if(a.length&&(o.splice(o.indexOf(a[0]),1),delete this.revivers[e],delete this.types[e]),"function"==typeof i){var s=i;i={test:function(e){return e&&e.constructor===s},replace:function(e){return u({},e)},revive:function(e){return Object.assign(Object.create(s.prototype),e)}}}else if(P(i)){var l=c(i,3);i={test:l[0],replace:l[1],revive:l[2]}}if(i&&i.test){var f={type:e,test:i.test.bind(i)};i.replace&&(f.replace=i.replace.bind(i)),i.replaceAsync&&(f.replaceAsync=i.replaceAsync.bind(i));var h="number"==typeof n.fallback?n.fallback:n.fallback?0:1/0;if(i.testPlainObjects?this.plainObjectReplacers.splice(h,0,f):this.nonplainObjectReplacers.splice(h,0,f),i.revive||i.reviveAsync){var d={};i.revive&&(d.revive=i.revive.bind(i)),i.reviveAsync&&(d.reviveAsync=i.reviveAsync.bind(i)),this.revivers[e]=[d,{plain:i.testPlainObjects}]}this.types[e]=i}}),this)}),this),this}}]),t}(),U=function e(){r(this,e)};return U.__typeson__type__="TypesonUndefined",F.Undefined=U,F.Promise=m,F.isThenable=x,F.toStringTag=O,F.hasConstructorOf=E,F.isObject=A,F.isPlainObject=k,F.isUserObject=S,F.escapeKeyPathComponent=T,F.unescapeKeyPathComponent=I,F.getByKeyPath=C,F.getJSONType=j,F.JSON_TYPES=["null","boolean","number","string","array","object"],F}()})),vi=pi((function(e,t){e.exports=function(){function e(t){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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.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)?a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){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})(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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||y(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 p(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||y(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 y(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.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)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function e(t){u(this,e),this.p=new Promise(t)};m.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(m.prototype[Symbol.toStringTag]="TypesonPromise"),m.prototype.then=function(e,t){var n=this;return new m((function(r,i){n.p.then((function(t){r(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(r,i)}))},m.prototype.catch=function(e){return this.then(null,e)},m.resolve=function(e){return new m((function(t){t(e)}))},m.reject=function(e){return new m((function(t,n){n(e)}))},["all","race"].forEach((function(e){m[e]=function(t){return new m((function(n,r){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(n,r)}))}}));var g={}.toString,b={}.hasOwnProperty,_=Object.getPrototypeOf,w=b.toString;function x(e,t){return S(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function O(e){return g.call(e).slice(8,-1)}function E(e,t){if(!e||"object"!==s(e))return!1;var n=_(e);if(!n)return null===t;var r=b.call(n,"constructor")&&n.constructor;return"function"!=typeof r?null===t:t===r||null!==t&&w.call(r)===w.call(t)||"function"==typeof t&&"string"==typeof r.__typeson__type__&&r.__typeson__type__===t.__typeson__type__}function k(e){return!(!e||"Object"!==O(e))&&(!_(e)||E(e,Object))}function S(e){return e&&"object"===s(e)}function A(e){return e.replace(/~/g,"~0").replace(/\\./g,"~1")}function T(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function I(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[T(t.slice(0,n))];return void 0===r?void 0:I(r,t.slice(n+1))}return e[T(t)]}function C(e,t,n){if(""===t)return n;var r=t.indexOf(".");return r>-1?C(e[T(t.slice(0,r))],t.slice(r+1),n):(e[T(t)]=n,e)}function N(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var j=Object.keys,R=Array.isArray,P={}.hasOwnProperty,B=["type","replaced","iterateIn","iterateUnsetNumeric"];function D(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function L(e,t){if(""===e.keypath)return-1;var n=e.keypath.match(/\\./g)||0,r=t.keypath.match(/\\./g)||0;return n&&(n=n.length),r&&(r=r.length),n>r?-1:n<r?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var F=function(){function e(t){u(this,e),this.options=t,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(e,[{key:"stringify",value:function(e,t,n,r){r=h(h(h({},this.options),r),{},{stringification:!0});var i=this.encapsulate(e,null,r);return R(i)?JSON.stringify(i[0],t,n):i.then((function(e){return JSON.stringify(e,t,n)}))}},{key:"stringifySync",value:function(e,t,n,r){return this.stringify(e,t,n,h(h({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,n,r){return this.stringify(e,t,n,h(h({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"parse",value:function(e,t,n){return n=h(h(h({},this.options),n),{},{parse:!0}),this.revive(JSON.parse(e,t),n)}},{key:"parseSync",value:function(e,t,n){return this.parse(e,t,h(h({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,n){return this.parse(e,t,h(h({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)}},{key:"rootTypeName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)}},{key:"encapsulate",value:function(t,n,r){var i=D((function(e,t){return N(Promise.all(t.map((function(e){return e[1].p}))),(function(n){return N(Promise.all(n.map(D((function(n){var r=!1,o=[],a=d(t.splice(0,1),1),s=d(a[0],7),u=s[0],c=s[2],l=s[3],f=s[4],h=s[5],p=s[6],y=w(u,n,c,l,o,!0,p),v=E(y,m);return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(u&&v)return N(y.p,(function(t){return f[h]=t,r=!0,i(e,o)}))}),(function(t){return r?t:(u?f[h]=y:e=v?y.p:y,i(e,o))}))})))),(function(){return e}))}))})),o=(r=h(h({sync:!0},this.options),r)).sync,a=this,u={},c=[],l=[],f=[],y=!("cyclic"in r)||r.cyclic,v=r.encapsulateObserver,g=w("",t,y,n||{},f);function b(t){var n=Object.values(u);if(r.iterateNone)return n.length?n[0]:e.getJSONType(t);if(n.length){if(r.returnTypeNames)return p(new Set(n));t&&k(t)&&!P.call(t,"$types")?t.$types=u:t={$:t,$types:{$:u}}}else S(t)&&P.call(t,"$types")&&(t={$:t,$types:!0});return!r.returnTypeNames&&t}function _(e,t,n){Object.assign(e,t);var r=B.map((function(t){var n=e[t];return delete e[t],n}));n(),B.forEach((function(t,n){e[t]=r[n]}))}function w(t,n,i,o,f,h,d){var p,y={},g=s(n),b=v?function(r){var a=d||o.type||e.getJSONType(n);v(Object.assign(r||y,{keypath:t,value:n,cyclic:i,stateObj:o,promisesData:f,resolvingTypesonPromise:h,awaitingTypesonPromise:E(n,m)},{type:a}))}:null;if(["string","boolean","number","undefined"].includes(g))return void 0===n||Number.isNaN(n)||n===Number.NEGATIVE_INFINITY||n===Number.POSITIVE_INFINITY?(p=o.replaced?n:x(t,n,o,f,!1,h,b))!==n&&(y={replaced:p}):p=n,b&&b(),p;if(null===n)return b&&b(),n;if(i&&!o.iterateIn&&!o.iterateUnsetNumeric&&n&&"object"===s(n)){var O=c.indexOf(n);if(!(O<0))return u[t]="#",b&&b({cyclicKeypath:l[O]}),"#"+l[O];!0===i&&(c.push(n),l.push(t))}var S,T=k(n),I=R(n),C=(T||I)&&(!a.plainObjectReplacers.length||o.replaced)||o.iterateIn?n:x(t,n,o,f,T||I,null,b);if(C!==n?(p=C,y={replaced:C}):""===t&&E(n,m)?(f.push([t,n,i,o,void 0,void 0,o.type]),p=n):I&&"object"!==o.iterateIn||"array"===o.iterateIn?(S=new Array(n.length),y={clone:S}):(["function","symbol"].includes(s(n))||"toJSON"in n||E(n,m)||E(n,Promise)||E(n,ArrayBuffer))&&!T&&"object"!==o.iterateIn?p=n:(S={},o.addLength&&(S.length=n.length),y={clone:S}),b&&b(),r.iterateNone)return S||p;if(!S)return p;if(o.iterateIn){var N=function(e){var r={ownKeys:P.call(n,e)};_(o,r,(function(){var r=t+(t?".":"")+A(e),a=w(r,n[e],Boolean(i),o,f,h);E(a,m)?f.push([r,a,Boolean(i),o,S,e,o.type]):void 0!==a&&(S[e]=a)}))};for(var B in n)N(B);b&&b({endIterateIn:!0,end:!0})}else j(n).forEach((function(e){var r=t+(t?".":"")+A(e);_(o,{ownKeys:!0},(function(){var t=w(r,n[e],Boolean(i),o,f,h);E(t,m)?f.push([r,t,Boolean(i),o,S,e,o.type]):void 0!==t&&(S[e]=t)}))})),b&&b({endIterateOwn:!0,end:!0});if(o.iterateUnsetNumeric){for(var D=n.length,L=function(e){if(!(e in n)){var r=t+(t?".":"")+e;_(o,{ownKeys:!1},(function(){var t=w(r,void 0,Boolean(i),o,f,h);E(t,m)?f.push([r,t,Boolean(i),o,S,e,o.type]):void 0!==t&&(S[e]=t)}))}},F=0;F<D;F++)L(F);b&&b({endIterateUnsetNumeric:!0,end:!0})}return S}function x(e,t,n,r,i,s,c){for(var l=i?a.plainObjectReplacers:a.nonplainObjectReplacers,f=l.length;f--;){var h=l[f];if(h.test(t,n)){var d=h.type;if(a.revivers[d]){var p=u[e];u[e]=p?[d].concat(p):d}return Object.assign(n,{type:d,replaced:!0}),!o&&h.replaceAsync||h.replace?(c&&c({replacing:!0}),w(e,h[o||!h.replaceAsync?"replace":"replaceAsync"](t,n),y&&"readonly",n,r,s,d)):(c&&c({typeDetected:!0}),w(e,t,y&&"readonly",n,r,s,d))}}return t}return f.length?o&&r.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(i(g,f)).then(b):!o&&r.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r.stringification&&o?[b(g)]:o?b(g):Promise.resolve(b(g))}},{key:"encapsulateSync",value:function(e,t,n){return this.encapsulate(e,t,h(h({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,n){return this.encapsulate(e,t,h(h({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"revive",value:function(e,t){var n=e&&e.$types;if(!n)return e;if(!0===n)return e.$;var r=(t=h(h({sync:!0},this.options),t)).sync,i=[],o={},a=!0;n.$&&k(n.$)&&(e=e.$,n=n.$,a=!1);var s=this;function u(e,t){var n=d(s.revivers[e]||[],1)[0];if(!n)throw new Error("Unregistered type: "+e);return r&&!("revive"in n)?t:n[r&&n.revive?"revive":!r&&n.reviveAsync?"reviveAsync":"revive"](t,o)}var c=[];function l(e){return E(e,U)?void 0:e}var f,p=function(){var t=[];if(Object.entries(n).forEach((function(e){var r=d(e,2),i=r[0],o=r[1];"#"!==o&&[].concat(o).forEach((function(e){d(s.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:i,type:e}),delete n[i])}))})),t.length)return t.sort(L).reduce((function t(n,r){var i=r.keypath,o=r.type;if(x(n))return n.then((function(e){return t(e,{keypath:i,type:o})}));var a=I(e,i);if(E(a=u(o,a),m))return a.then((function(t){var n=C(e,i,t);n===t&&(e=n)}));var s=C(e,i,a);s===a&&(e=s)}),void 0)}();return E(p,m)?f=p.then((function(){return e})):(f=function e(t,r,o,s,l){if(!a||"$types"!==t){var f=n[t],h=R(r);if(h||k(r)){var p=h?new Array(r.length):{};for(j(r).forEach((function(n){var i=e(t+(t?".":"")+A(n),r[n],o||p,p,n),a=function(e){return E(e,U)?p[n]=void 0:void 0!==e&&(p[n]=e),e};E(i,m)?c.push(i.then((function(e){return a(e)}))):a(i)})),r=p;i.length;){var y=d(i[0],4),v=y[0],g=y[1],b=y[2],_=y[3],w=I(v,g);if(void 0===w)break;b[_]=w,i.splice(0,1)}}if(!f)return r;if("#"===f){var x=I(o,r.slice(1));return void 0===x&&i.push([o,r.slice(1),s,l]),x}return[].concat(f).reduce((function e(t,n){return E(t,m)?t.then((function(t){return e(t,n)})):u(n,t)}),r)}}("",e,null),c.length&&(f=m.resolve(f).then((function(e){return m.all([e].concat(c))})).then((function(e){return d(e,1)[0]})))),x(f)?r&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():E(f,m)?f.p.then(l):f:!r&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r?l(f):Promise.resolve(l(f))}},{key:"reviveSync",value:function(e,t){return this.revive(e,h(h({throwOnBadSyncType:!0},t),{},{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,h(h({throwOnBadSyncType:!0},t),{},{sync:!1}))}},{key:"register",value:function(t,n){return n=n||{},[].concat(t).forEach((function t(r){var i=this;if(R(r))return r.map((function(e){return t.call(i,e)}));r&&j(r).forEach((function(t){if("#"===t)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(e.JSON_TYPES.includes(t))throw new TypeError("Plain JSON object types are reserved as type names");var i=r[t],o=i&&i.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,a=o.filter((function(e){return e.type===t}));if(a.length&&(o.splice(o.indexOf(a[0]),1),delete this.revivers[t],delete this.types[t]),"function"==typeof i){var s=i;i={test:function(e){return e&&e.constructor===s},replace:function(e){return h({},e)},revive:function(e){return Object.assign(Object.create(s.prototype),e)}}}else if(R(i)){var u=d(i,3);i={test:u[0],replace:u[1],revive:u[2]}}if(i&&i.test){var c={type:t,test:i.test.bind(i)};i.replace&&(c.replace=i.replace.bind(i)),i.replaceAsync&&(c.replaceAsync=i.replaceAsync.bind(i));var l="number"==typeof n.fallback?n.fallback:n.fallback?0:Number.POSITIVE_INFINITY;if(i.testPlainObjects?this.plainObjectReplacers.splice(l,0,c):this.nonplainObjectReplacers.splice(l,0,c),i.revive||i.reviveAsync){var f={};i.revive&&(f.revive=i.revive.bind(i)),i.reviveAsync&&(f.reviveAsync=i.reviveAsync.bind(i)),this.revivers[t]=[f,{plain:i.testPlainObjects}]}this.types[t]=i}}),this)}),this),this}}]),e}(),U=function e(){u(this,e)};U.__typeson__type__="TypesonUndefined",F.Undefined=U,F.Promise=m,F.isThenable=x,F.toStringTag=O,F.hasConstructorOf=E,F.isObject=S,F.isPlainObject=k,F.isUserObject=function e(t){if(!t||"Object"!==O(t))return!1;var n=_(t);return!n||E(t,Object)||e(n)},F.escapeKeyPathComponent=A,F.unescapeKeyPathComponent=T,F.getByKeyPath=I,F.getJSONType=function(e){return null===e?"null":Array.isArray(e)?"array":s(e)},F.JSON_TYPES=["null","boolean","number","string","array","object"];for(var z={userObject:{test:function(e,t){return F.isUserObject(e)},replace:function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)},revive:function(e){return e}}},M=[{arrayNonindexKeys:{testPlainObjects:!0,test:function(e,t){return!!Array.isArray(e)&&(Object.keys(e).some((function(e){return String(Number.parseInt(e))!==e}))&&(t.iterateIn="object",t.addLength=!0),!0)},replace:function(e,t){return t.iterateUnsetNumeric=!0,e},revive:function(e){if(Array.isArray(e))return e;var t=[];return Object.keys(e).forEach((function(n){var r=e[n];t[n]=r})),t}}},{sparseUndefined:{test:function(e,t){return void 0===e&&!1===t.ownKeys},replace:function(e){return 0},revive:function(e){}}}],K={undef:{test:function(e,t){return void 0===e&&(t.ownKeys||!("ownKeys"in t))},replace:function(e){return 0},revive:function(e){return new F.Undefined}}},V={StringObject:{test:function(t){return"String"===F.toStringTag(t)&&"object"===e(t)},replace:function(e){return String(e)},revive:function(e){return new String(e)}},BooleanObject:{test:function(t){return"Boolean"===F.toStringTag(t)&&"object"===e(t)},replace:function(e){return Boolean(e)},revive:function(e){return new Boolean(e)}},NumberObject:{test:function(t){return"Number"===F.toStringTag(t)&&"object"===e(t)},replace:function(e){return Number(e)},revive:function(e){return new Number(e)}}},W=[{nan:{test:function(e){return Number.isNaN(e)},replace:function(e){return"NaN"},revive:function(e){return Number.NaN}}},{infinity:{test:function(e){return e===Number.POSITIVE_INFINITY},replace:function(e){return"Infinity"},revive:function(e){return Number.POSITIVE_INFINITY}}},{negativeInfinity:{test:function(e){return e===Number.NEGATIVE_INFINITY},replace:function(e){return"-Infinity"},revive:function(e){return Number.NEGATIVE_INFINITY}}}],G={date:{test:function(e){return"Date"===F.toStringTag(e)},replace:function(e){var t=e.getTime();return Number.isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(Number.NaN):new Date(e)}}},q={regexp:{test:function(e){return"RegExp"===F.toStringTag(e)},replace:function(e){return{source:e.source,flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")}},revive:function(e){var t=e.source,n=e.flags;return new RegExp(t,n)}}},Z={map:{test:function(e){return"Map"===F.toStringTag(e)},replace:function(e){return o(e.entries())},revive:function(e){return new Map(e)}}},$={set:{test:function(e){return"Set"===F.toStringTag(e)},replace:function(e){return o(e.values())},revive:function(e){return new Set(e)}}},Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=new Uint8Array(256),J=0;J<Y.length;J++)H[Y.charCodeAt(J)]=J;var X=function(e,t,n){null==n&&(n=e.byteLength);for(var r=new Uint8Array(e,t||0,n),i=r.length,o="",a=0;a<i;a+=3)o+=Y[r[a]>>2],o+=Y[(3&r[a])<<4|r[a+1]>>4],o+=Y[(15&r[a+1])<<2|r[a+2]>>6],o+=Y[63&r[a+2]];return i%3==2?o=o.slice(0,-1)+"=":i%3==1&&(o=o.slice(0,-2)+"=="),o},Q=function(e){var t,n,r,i,o=e.length,a=.75*e.length,s=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);for(var u=new ArrayBuffer(a),c=new Uint8Array(u),l=0;l<o;l+=4)t=H[e.charCodeAt(l)],n=H[e.charCodeAt(l+1)],r=H[e.charCodeAt(l+2)],i=H[e.charCodeAt(l+3)],c[s++]=t<<2|n>>4,c[s++]=(15&n)<<4|r>>2,c[s++]=(3&r)<<6|63&i;return u},ee={arraybuffer:{test:function(e){return"ArrayBuffer"===F.toStringTag(e)},replace:function(e,t){t.buffers||(t.buffers=[]);var n=t.buffers.indexOf(e);return n>-1?{index:n}:(t.buffers.push(e),X(e))},revive:function(t,n){if(n.buffers||(n.buffers=[]),"object"===e(t))return n.buffers[t.index];var r=Q(t);return n.buffers.push(r),r}}},te="undefined"==typeof self?di:self,ne={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,n=te[t];n&&(ne[e.toLowerCase()]={test:function(e){return F.toStringTag(e)===t},replace:function(e,t){var n=e.buffer,r=e.byteOffset,i=e.length;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,length:i}:(t.buffers.push(n),{encoded:X(n),byteOffset:r,length:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var r,i=e.byteOffset,o=e.length,a=e.encoded,s=e.index;return"index"in e?r=t.buffers[s]:(r=Q(a),t.buffers.push(r)),new n(r,i,o)}})}));var re={dataview:{test:function(e){return"DataView"===F.toStringTag(e)},replace:function(e,t){var n=e.buffer,r=e.byteOffset,i=e.byteLength;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,byteLength:i}:(t.buffers.push(n),{encoded:X(n),byteOffset:r,byteLength:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,r=e.byteOffset,i=e.byteLength,o=e.encoded,a=e.index;return"index"in e?n=t.buffers[a]:(n=Q(o),t.buffers.push(n)),new DataView(n,r,i)}}},ie={IntlCollator:{test:function(e){return F.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return F.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return F.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}};function oe(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}var ae={file:{test:function(e){return"File"===F.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad File access: "+t.status);return{type:e.type,stringContents:t.responseText,name:e.name,lastModified:e.lastModified}},revive:function(e){var t=e.name,n=e.type,r=e.stringContents,i=e.lastModified;return new File([oe(r)],t,{type:n,lastModified:i})},replaceAsync:function(e){return new F.Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result,name:e.name,lastModified:e.lastModified})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}},se={bigint:{test:function(e){return"bigint"==typeof e},replace:function(e){return String(e)},revive:function(e){return BigInt(e)}}},ue={bigintObject:{test:function(t){return"object"===e(t)&&F.hasConstructorOf(t,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},ce={cryptokey:{test:function(e){return"CryptoKey"===F.toStringTag(e)&&e.extractable},replaceAsync:function(e){return new F.Promise((function(t,n){crypto.subtle.exportKey("jwk",e).catch((function(e){n(e)})).then((function(n){t({jwk:n,algorithm:e.algorithm,usages:e.usages})}))}))},revive:function(e){var t=e.jwk,n=e.algorithm,r=e.usages;return crypto.subtle.importKey("jwk",t,n,!0,r)}}};return[z,K,M,V,W,G,q,{imagedata:{test:function(e){return"ImageData"===F.toStringTag(e)},replace:function(e){return{array:o(e.data),width:e.width,height:e.height}},revive:function(e){return new ImageData(new Uint8ClampedArray(e.array),e.width,e.height)}}},{imagebitmap:{test:function(e){return"ImageBitmap"===F.toStringTag(e)||e&&e.dataset&&"ImageBitmap"===e.dataset.toStringTag},replace:function(e){var t=document.createElement("canvas");return t.getContext("2d").drawImage(e,0,0),t.toDataURL()},revive:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.addEventListener("load",(function(){n.drawImage(r,0,0)})),r.src=e,t},reviveAsync:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.addEventListener("load",(function(){n.drawImage(r,0,0)})),r.src=e,createImageBitmap(t)}}},ae,{file:ae.file,filelist:{test:function(e){return"FileList"===F.toStringTag(e)},replace:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e.item(n);return t},revive:function(e){return new(function(){function e(){t(this,e),this._files=arguments[0],this.length=this._files.length}return function(e,t,r){t&&n(e.prototype,t),r&&n(e,r)}(e,[{key:"item",value:function(e){return this._files[e]}},{key:Symbol.toStringTag,get:function(){return"FileList"}}]),e}())(e)}}},{blob:{test:function(e){return"Blob"===F.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,n=e.stringContents;return new Blob([oe(n)],{type:t})},replaceAsync:function(e){return new F.Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}}].concat("function"==typeof Map?Z:[],"function"==typeof Set?$:[],"function"==typeof ArrayBuffer?ee:[],"function"==typeof Uint8Array?ne:[],"function"==typeof DataView?re:[],"undefined"!=typeof Intl?ie:[],"undefined"!=typeof crypto?ce:[],"undefined"!=typeof BigInt?[se,ue]:[])}()})),mi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gi=new Uint8Array(256),bi=0;bi<64;bi++)gi[mi.codePointAt(bi)]=bi;var _i=function(e,t,n){null==n&&(n=e.byteLength);for(var r=new Uint8Array(e,t||0,n),i=r.length,o="",a=0;a<i;a+=3)o+=mi[r[a]>>2],o+=mi[(3&r[a])<<4|r[a+1]>>4],o+=mi[(15&r[a+1])<<2|r[a+2]>>6],o+=mi[63&r[a+2]];return i%3==2?o=o.slice(0,-1)+"=":i%3==1&&(o=o.slice(0,-2)+"=="),o},wi=function(e){var t,n,r,i,o=e.length,a=.75*e.length,s=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);for(var u=new ArrayBuffer(a),c=new Uint8Array(u),l=0;l<o;l+=4)t=gi[e.codePointAt(l)],n=gi[e.codePointAt(l+1)],r=gi[e.codePointAt(l+2)],i=gi[e.codePointAt(l+3)],c[s++]=t<<2|n>>4,c[s++]=(15&n)<<4|r>>2,c[s++]=(3&r)<<6|63&i;return u},xi="undefined"==typeof self?global:self,Oi={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,n=xi[t];n&&(Oi[e.toLowerCase()+"2"]={test:function(e){return yi.toStringTag(e)===t},replace:function(e){return{buffer:e.buffer,byteOffset:e.byteOffset,length:e.length}},revive:function(e){var t=e.buffer,r=e.byteOffset,i=e.length;return new n(t,r,i)}})}));var Ei={arraybuffer:{test:function(e){return"ArrayBuffer"===yi.toStringTag(e)},replace:function(e){return _i(e,0,e.byteLength)},revive:function(e){return wi(e)}}},ki=(new yi).register(vi),Si="FileReaderSync"in self,Ai=[],Ti=0;ki.register([Ei,Oi,{blob2:{test:function(e){return"Blob"===yi.toStringTag(e)},replace:function(e){if(e.isClosed)throw new Error("The Blob is closed");if(Si){var t=hi(e,"binary"),n=_i(t,0,t.byteLength);return{type:e.type,data:n}}Ai.push(e);var r={type:e.type,data:{start:Ti,end:Ti+e.size}};return Ti+=e.size,r},finalize:function(e,t){e.data=_i(t,0,t.byteLength)},revive:function(e){var t=e.type,n=e.data;return new Blob([wi(n)],{type:t})}}}]),ki.mustFinalize=function(){return Ai.length>0},ki.finalize=function(e){return ui(void 0,void 0,void 0,(function(){var t,n,r,i,o,a,s,u,c,l;return ci(this,(function(f){switch(f.label){case 0:return[4,fi(new Blob(Ai),"binary")];case 1:if(t=f.sent(),e)for(n=0,r=e;n<r.length;n++)if((i=r[n]).$types)for(s in o=i.$types,(a=o.$)&&(o=o.$),o)u=o[s],(c=ki.types[u])&&c.finalize&&(l=ei.getByKeyPath(i,a?"$."+s:s),c.finalize(l,t.slice(l.start,l.end)));return Ai=[],[2]}}))}))};function Ii(e,t){return ui(this,void 0,void 0,(function(){function n(){return ui(this,void 0,void 0,(function(){var n,c,l,f,h,d,p,y,v;return ci(this,(function(m){switch(m.label){case 0:return[4,Promise.all(e.tables.map((function(e){return e.count()})))];case 1:(n=m.sent()).forEach((function(e,t){return i[t].rowCount=e})),u.totalRows=n.reduce((function(e,t){return e+t})),c=JSON.stringify(a,void 0,o?2:void 0),l=c.lastIndexOf("]"),f=c.substring(0,l),r.push(f),h=t.filter,d=function(n){var i,a,c,l,f,d,p,y,v,m,g;return ci(this,(function(b){switch(b.label){case 0:i=e.table(n),a=i.schema.primKey,c=!!a.keyPath,l=t.numRowsPerChunk||2e3,f=c?{tableName:i.name,inbound:!0,rows:[]}:{tableName:i.name,inbound:!1,rows:[]},d=JSON.stringify(f,void 0,o?2:void 0),o&&(d=d.split("\\n").join("\\n ")),p=d.lastIndexOf("]"),r.push(d.substring(0,p)),y=null,v=0,m=!0,g=function(){var e,t,f,d,p,g,b,_;return ci(this,(function(w){switch(w.label){case 0:return s&&ei.ignoreTransaction((function(){return s(u)})),[4,(e=null==y?i.limit(l):i.where(":id").above(y).limit(l)).toArray()];case 1:return 0===(t=w.sent()).length?[2,"break"]:(null!=y&&v>0&&(r.push(","),o&&r.push("\\n ")),m=t.length===l,c?(f=h?t.filter((function(e){return h(n,e)})):t,d=f.map((function(e){return ki.encapsulate(e)})),ki.mustFinalize()?[4,ei.waitFor(ki.finalize(d))]:[3,3]):[3,4]);case 2:w.sent(),w.label=3;case 3:return _=JSON.stringify(d,void 0,o?2:void 0),o&&(_=_.split("\\n").join("\\n ")),r.push(new Blob([_.substring(1,_.length-1)])),v=f.length,y=t.length>0?ei.getByKeyPath(t[t.length-1],a.keyPath):null,[3,8];case 4:return[4,e.primaryKeys()];case 5:return p=w.sent(),g=p.map((function(e,n){return[e,t[n]]})),h&&(g=g.filter((function(e){var t=e[0],r=e[1];return h(n,r,t)}))),b=g.map((function(e){return ki.encapsulate(e)})),ki.mustFinalize()?[4,ei.waitFor(ki.finalize(b))]:[3,7];case 6:w.sent(),w.label=7;case 7:_=JSON.stringify(b,void 0,o?2:void 0),o&&(_=_.split("\\n").join("\\n ")),r.push(new Blob([_.substring(1,_.length-1)])),v=g.length,y=p.length>0?p[p.length-1]:null,w.label=8;case 8:return u.completedRows+=t.length,[2]}}))},b.label=1;case 1:return m?[5,g()]:[3,3];case 2:return"break"===b.sent()?[3,3]:[3,1];case 3:return r.push(d.substr(p)),u.completedTables+=1,u.completedTables<u.totalTables&&r.push(","),[2]}}))},p=0,y=i,m.label=2;case 2:return p<y.length?(v=y[p].name,[5,d(v)]):[3,5];case 3:m.sent(),m.label=4;case 4:return p++,[3,2];case 5:return r.push(c.substr(l)),u.done=!0,s&&ei.ignoreTransaction((function(){return s(u)})),[2]}}))}))}var r,i,o,a,s,u;return ci(this,(function(c){switch(c.label){case 0:t=t||{},r=[],i=e.tables.map((function(e){return{name:e.name,schema:li(e),rowCount:0}})),o=t.prettyJson,a={formatName:"dexie",formatVersion:1,data:{databaseName:e.name,databaseVersion:e.verno,tables:i,data:[]}},s=t.progressCallback,u={done:!1,completedRows:0,completedTables:0,totalRows:NaN,totalTables:e.tables.length},c.label=1;case 1:return c.trys.push([1,,6,7]),t.noTransaction?[4,n()]:[3,3];case 2:return c.sent(),[3,5];case 3:return[4,e.transaction("r",e.tables,n)];case 4:c.sent(),c.label=5;case 5:return[3,7];case 6:return ki.finalize(),[7];case 7:return[2,new Blob(r,{type:"text/json"})]}}))}))}var Ci=1,Ni=function(){},ji=pi((function(e,t){!function(e){var t="object"==typeof process&&process.env?process.env:self;e.parser=function(e){return new l(e)},e.CParser=l,e.CStream=f,e.createStream=function(e){return new f(e)},e.MAX_BUFFER_LENGTH=10485760,e.DEBUG="debug"===t.CDEBUG,e.INFO="debug"===t.CDEBUG||"info"===t.CDEBUG,e.EVENTS=["value","string","key","openobject","closeobject","openarray","closearray","error","end","ready"];var n,r={textNode:void 0,numberNode:""},i=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e})),o=0;for(var a in e.STATE={BEGIN:o++,VALUE:o++,OPEN_OBJECT:o++,CLOSE_OBJECT:o++,OPEN_ARRAY:o++,CLOSE_ARRAY:o++,TEXT_ESCAPE:o++,STRING:o++,BACKSLASH:o++,END:o++,OPEN_KEY:o++,CLOSE_KEY:o++,TRUE:o++,TRUE2:o++,TRUE3:o++,FALSE:o++,FALSE2:o++,FALSE3:o++,FALSE4:o++,NULL:o++,NULL2:o++,NULL3:o++,NUMBER_DECIMAL_POINT:o++,NUMBER_DIGIT:o++},e.STATE)e.STATE[e.STATE[a]]=a;o=e.STATE;const s={tab:9,lineFeed:10,carriageReturn:13,space:32,doubleQuote:34,plus:43,comma:44,minus:45,period:46,_0:48,_9:57,colon:58,E:69,openBracket:91,backslash:92,closeBracket:93,a:97,b:98,e:101,f:102,l:108,n:110,r:114,s:115,t:116,u:117,openBrace:123,closeBrace:125};function u(e){for(var t in r)e[t]=r[t]}Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var c=/[\\\\"\\n]/g;function l(t){if(!(this instanceof l))return new l(t);var n=this;u(n),n.bufferCheckPosition=e.MAX_BUFFER_LENGTH,n.q=n.c=n.p="",n.opt=t||{},n.closed=n.closedRoot=n.sawRoot=!1,n.tag=n.error=null,n.state=o.BEGIN,n.stack=new Array,n.position=n.column=0,n.line=1,n.slashed=!1,n.unicodeI=0,n.unicodeS=null,n.depth=0,h(n,"onready")}l.prototype={end:function(){m(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return v(n,"Cannot write after close. Assign an onready handler.");if(null===t)return m(n);var i=0,a=t.charCodeAt(0),u=n.p;e.DEBUG&&console.log("write -> ["+t+"]");for(;a&&(u=a,n.c=a=t.charCodeAt(i++),u!==a?n.p=u:u=n.p,a);)switch(e.DEBUG&&console.log(i,a,e.STATE[n.state]),n.position++,a===s.lineFeed?(n.line++,n.column=0):n.column++,n.state){case o.BEGIN:a===s.openBrace?n.state=o.OPEN_OBJECT:a===s.openBracket?n.state=o.OPEN_ARRAY:g(a)||v(n,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(g(a))continue;if(n.state===o.OPEN_KEY)n.stack.push(o.CLOSE_KEY);else{if(a===s.closeBrace){h(n,"onopenobject"),this.depth++,h(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||o.VALUE;continue}n.stack.push(o.CLOSE_OBJECT)}a===s.doubleQuote?n.state=o.STRING:v(n,\'Malformed object key should start with "\');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(g(a))continue;n.state,o.CLOSE_KEY,a===s.colon?(n.state===o.CLOSE_OBJECT?(n.stack.push(o.CLOSE_OBJECT),p(n,"onopenobject"),this.depth++):p(n,"onkey"),n.state=o.VALUE):a===s.closeBrace?(d(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||o.VALUE):a===s.comma?(n.state===o.CLOSE_OBJECT&&n.stack.push(o.CLOSE_OBJECT),p(n),n.state=o.OPEN_KEY):v(n,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(g(a))continue;if(n.state===o.OPEN_ARRAY){if(h(n,"onopenarray"),this.depth++,n.state=o.VALUE,a===s.closeBracket){h(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||o.VALUE;continue}n.stack.push(o.CLOSE_ARRAY)}a===s.doubleQuote?n.state=o.STRING:a===s.openBrace?n.state=o.OPEN_OBJECT:a===s.openBracket?n.state=o.OPEN_ARRAY:a===s.t?n.state=o.TRUE:a===s.f?n.state=o.FALSE:a===s.n?n.state=o.NULL:a===s.minus?n.numberNode+="-":s._0<=a&&a<=s._9?(n.numberNode+=String.fromCharCode(a),n.state=o.NUMBER_DIGIT):v(n,"Bad value");continue;case o.CLOSE_ARRAY:if(a===s.comma)n.stack.push(o.CLOSE_ARRAY),p(n,"onvalue"),n.state=o.VALUE;else if(a===s.closeBracket)d(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||o.VALUE;else{if(g(a))continue;v(n,"Bad array")}continue;case o.STRING:void 0===n.textNode&&(n.textNode="");var l=i-1,f=n.slashed,b=n.unicodeI;e:for(;;){for(e.DEBUG&&console.log(i,a,e.STATE[n.state],f);b>0;)if(n.unicodeS+=String.fromCharCode(a),a=t.charCodeAt(i++),n.position++,4===b?(n.textNode+=String.fromCharCode(parseInt(n.unicodeS,16)),b=0,l=i-1):b++,!a)break e;if(a===s.doubleQuote&&!f){n.state=n.stack.pop()||o.VALUE,n.textNode+=t.substring(l,i-1),n.position+=i-1-l;break}if(a===s.backslash&&!f&&(f=!0,n.textNode+=t.substring(l,i-1),n.position+=i-1-l,a=t.charCodeAt(i++),n.position++,!a))break;if(f){if(f=!1,a===s.n?n.textNode+="\\n":a===s.r?n.textNode+="\\r":a===s.t?n.textNode+="\\t":a===s.f?n.textNode+="\\f":a===s.b?n.textNode+="\\b":a===s.u?(b=1,n.unicodeS=""):n.textNode+=String.fromCharCode(a),a=t.charCodeAt(i++),n.position++,l=i-1,a)continue;break}c.lastIndex=i;var _=c.exec(t);if(null===_){i=t.length+1,n.textNode+=t.substring(l,i-1),n.position+=i-1-l;break}if(i=_.index+1,!(a=t.charCodeAt(_.index))){n.textNode+=t.substring(l,i-1),n.position+=i-1-l;break}}n.slashed=f,n.unicodeI=b;continue;case o.TRUE:a===s.r?n.state=o.TRUE2:v(n,"Invalid true started with t"+a);continue;case o.TRUE2:a===s.u?n.state=o.TRUE3:v(n,"Invalid true started with tr"+a);continue;case o.TRUE3:a===s.e?(h(n,"onvalue",!0),n.state=n.stack.pop()||o.VALUE):v(n,"Invalid true started with tru"+a);continue;case o.FALSE:a===s.a?n.state=o.FALSE2:v(n,"Invalid false started with f"+a);continue;case o.FALSE2:a===s.l?n.state=o.FALSE3:v(n,"Invalid false started with fa"+a);continue;case o.FALSE3:a===s.s?n.state=o.FALSE4:v(n,"Invalid false started with fal"+a);continue;case o.FALSE4:a===s.e?(h(n,"onvalue",!1),n.state=n.stack.pop()||o.VALUE):v(n,"Invalid false started with fals"+a);continue;case o.NULL:a===s.u?n.state=o.NULL2:v(n,"Invalid null started with n"+a);continue;case o.NULL2:a===s.l?n.state=o.NULL3:v(n,"Invalid null started with nu"+a);continue;case o.NULL3:a===s.l?(h(n,"onvalue",null),n.state=n.stack.pop()||o.VALUE):v(n,"Invalid null started with nul"+a);continue;case o.NUMBER_DECIMAL_POINT:a===s.period?(n.numberNode+=".",n.state=o.NUMBER_DIGIT):v(n,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:s._0<=a&&a<=s._9?n.numberNode+=String.fromCharCode(a):a===s.period?(-1!==n.numberNode.indexOf(".")&&v(n,"Invalid number has two dots"),n.numberNode+="."):a===s.e||a===s.E?(-1===n.numberNode.indexOf("e")&&-1===n.numberNode.indexOf("E")||v(n,"Invalid number has two exponential"),n.numberNode+="e"):a===s.plus||a===s.minus?(u!==s.e&&u!==s.E&&v(n,"Invalid symbol in number"),n.numberNode+=String.fromCharCode(a)):(y(n),i--,n.state=n.stack.pop()||o.VALUE);continue;default:v(n,"Unknown state: "+n.state)}n.position>=n.bufferCheckPosition&&function(t){var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0;for(var o in r){var a=void 0===t[o]?0:t[o].length;a>n&&("text"===o?closeText(t):v(t,"Max buffer length exceeded: "+o)),i=Math.max(i,a)}t.bufferCheckPosition=e.MAX_BUFFER_LENGTH-i+t.position}(n);return n},resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{n=Ni}catch(e){n=function(){}}function f(e){if(!(this instanceof f))return new f(e);this._parser=new l(e),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var t=this;n.apply(t),this._parser.onend=function(){t.emit("end")},this._parser.onerror=function(e){t.emit("error",e),t._parser.error=null},i.forEach((function(e){Object.defineProperty(t,"on"+e,{get:function(){return t._parser["on"+e]},set:function(n){if(!n)return t.removeAllListeners(e),t._parser["on"+e]=n,n;t.on(e,n)},enumerable:!0,configurable:!1})}))}function h(t,n,r){e.INFO&&console.log("-- emit",n,r),t[n]&&t[n](r)}function d(e,t,n){p(e),h(e,t,n)}function p(e,t){e.textNode=function(e,t){if(void 0===t)return t;e.trim&&(t=t.trim());e.normalize&&(t=t.replace(/\\s+/g," "));return t}(e.opt,e.textNode),void 0!==e.textNode&&h(e,t||"onvalue",e.textNode),e.textNode=void 0}function y(e){e.numberNode&&h(e,"onvalue",parseFloat(e.numberNode)),e.numberNode=""}function v(e,t){return p(e),t+="\\nLine: "+e.line+"\\nColumn: "+e.column+"\\nChar: "+e.c,t=new Error(t),e.error=t,h(e,"onerror",t),e}function m(e){return e.state===o.VALUE&&0===e.depth||v(e,"Unexpected end"),p(e),e.c="",e.closed=!0,h(e,"onend"),l.call(e,e.opt),e}function g(e){return e===s.carriageReturn||e===s.lineFeed||e===s.space||e===s.tab}f.prototype=Object.create(n.prototype,{constructor:{value:f}}),f.prototype.write=function(e){e=new Buffer(e);for(var t=0;t<e.length;t++){var n=e[t];if(this.bytes_remaining>0){for(var r=0;r<this.bytes_remaining;r++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+r]=e[r];this.string=this.temp_buffs[this.bytes_in_sequence].toString(),this.bytes_in_sequence=this.bytes_remaining=0,t=t+r-1,this._parser.write(this.string),this.emit("data",this.string)}else if(0===this.bytes_remaining&&n>=128){if(n>=194&&n<=223&&(this.bytes_in_sequence=2),n>=224&&n<=239&&(this.bytes_in_sequence=3),n>=240&&n<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+t>e.length){for(var i=0;i<=e.length-1-t;i++)this.temp_buffs[this.bytes_in_sequence][i]=e[t+i];return this.bytes_remaining=t+this.bytes_in_sequence-e.length,!0}this.string=e.slice(t,t+this.bytes_in_sequence).toString(),t=t+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string)}else{for(var o=t;o<e.length&&!(e[o]>=128);o++);this.string=e.slice(t,o).toString(),this._parser.write(this.string),this.emit("data",this.string),t=o-1}}},f.prototype.end=function(e){return e&&e.length&&this._parser.write(e.toString()),this._parser.end(),!0},f.prototype.on=function(e,t){var r=this;return r._parser["on"+e]||-1===i.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),n.prototype.on.call(r,e,t)},f.prototype.destroy=function(){u(this._parser),this.emit("close")}}(t)}));function Ri(e){var t=0,n=function(e){var t,n,r,i=ji.parser(),o=0,a=[],s=!1,u=!1;return i.onopenobject=function(i){var s={incomplete:!0};t||(t=s),n&&(a.push([r,n,u]),e&&(u?n.push(s):n[r]=s)),n=s,r=i,u=!1,++o},i.onkey=function(e){return r=e},i.onvalue=function(e){return u?n.push(e):n[r]=e},i.oncloseobject=function(){var t;if(delete n.incomplete,r=null,0==--o)s=!0;else{var i=n;t=a.pop(),r=t[0],n=t[1],u=t[2],e||(u?n.push(i):n[r]=i)}},i.onopenarray=function(){var i=[];i.incomplete=!0,t||(t=i),n&&(a.push([r,n,u]),e&&(u?n.push(i):n[r]=i)),n=i,u=!0,r=null,++o},i.onclosearray=function(){var t;if(delete n.incomplete,r=null,0==--o)s=!0;else{var i=n;t=a.pop(),r=t[0],n=t[1],u=t[2],e||(u?n.push(i):n[r]=i)}},{write:function(e){return i.write(e),t},done:function(){return s}}}(!0),r={pullAsync:function(i){return ui(this,void 0,void 0,(function(){var o,a,s;return ci(this,(function(u){switch(u.label){case 0:return o=e.slice(t,t+i),t+=i,[4,fi(o,"text")];case 1:return a=u.sent(),s=n.write(a),r.result=s||{},[2,s]}}))}))},pullSync:function(i){var o=e.slice(t,t+i);t+=i;var a=hi(o,"text"),s=n.write(a);return r.result=s||{},s},done:function(){return n.done()},eof:function(){return t>=e.size},result:{}};return r}var Pi=1024;function Bi(e,t,n){return ui(this,void 0,void 0,(function(){function r(){return ui(this,void 0,void 0,(function(){var t,r,a,f;return ci(this,(function(h){switch(h.label){case 0:t=function(t){var r,i,o,a,s,f,h,d,p,y,v,m;return ci(this,(function(g){switch(g.label){case 0:if(!t.rows)return[2,"break"];if(!t.rows.incomplete&&0===t.rows.length)return[2,"continue"];if(c&&ei.ignoreTransaction((function(){return c(l)})),r=t.tableName,i=e.table(r),o=u.tables.filter((function(e){return e.name===r}))[0].schema,!i){if(n.acceptMissingTables)return[2,"continue"];throw new Error("Exported table ".concat(t.tableName," is missing in installed database"))}if(!n.acceptChangedPrimaryKey&&o.split(",")[0]!=i.schema.primKey.src)throw new Error("Primary key differs for table ".concat(t.tableName,". "));for(a=t.rows,s=[],f=0;f<a.length&&!(h=a[f]).incomplete;f++)s.push(ki.revive(h));return d=n.filter,p=d?t.inbound?s.filter((function(e){return d(r,e)})):s.filter((function(e){var t=e[0],n=e[1];return d(r,n,t)})):s,y=t.inbound?[void 0,p]:[p.map((function(e){return e[0]})),s.map((function(e){return e[1]}))],v=y[0],m=y[1],n.overwriteValues?[4,i.bulkPut(m,v)]:[3,2];case 1:return g.sent(),[3,4];case 2:return[4,i.bulkAdd(m,v)];case 3:g.sent(),g.label=4;case 4:return l.completedRows+=s.length,s.incomplete||(l.completedTables+=1),a.splice(0,s.length),[2]}}))},r=0,a=u.data,h.label=1;case 1:return r<a.length?(f=a[r],[5,t(f)]):[3,4];case 2:if("break"===h.sent())return[3,4];h.label=3;case 3:return r++,[3,1];case 4:for(;u.data.length>0&&u.data[0].rows&&!u.data[0].rows.incomplete;)u.data.splice(0,1);return o.done()||o.eof()?[3,8]:s?(o.pullSync(i),[3,7]):[3,5];case 5:return[4,ei.waitFor(o.pullAsync(i))];case 6:h.sent(),h.label=7;case 7:return[3,9];case 8:return[3,10];case 9:return[3,0];case 10:return[2]}}))}))}var i,o,a,s,u,c,l,f,h;return ci(this,(function(d){switch(d.label){case 0:return i=(n=n||{}).chunkSizeBytes||1024*Pi,[4,Di(t,i)];case 1:if(o=d.sent(),a=o.result,s="FileReaderSync"in self,u=a.data,!n.acceptNameDiff&&e.name!==u.databaseName)throw new Error("Name differs. Current database name is ".concat(e.name," but export is ").concat(u.databaseName));if(!n.acceptVersionDiff&&e.verno!==u.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(e.verno," but export is ").concat(u.databaseVersion));if(c=n.progressCallback,l={done:!1,completedRows:0,completedTables:0,totalRows:u.tables.reduce((function(e,t){return e+t.rowCount}),0),totalTables:u.tables.length},c&&ei.ignoreTransaction((function(){return c(l)})),!n.clearTablesBeforeImport)return[3,5];f=0,h=e.tables,d.label=2;case 2:return f<h.length?[4,h[f].clear()]:[3,5];case 3:d.sent(),d.label=4;case 4:return f++,[3,2];case 5:return n.noTransaction?[4,r()]:[3,7];case 6:return d.sent(),[3,9];case 7:return[4,e.transaction("rw",e.tables,r)];case 8:d.sent(),d.label=9;case 9:return l.done=!0,c&&ei.ignoreTransaction((function(){return c(l)})),[2]}}))}))}function Di(e,t){return ui(this,void 0,void 0,(function(){var n,r;return ci(this,(function(i){switch(i.label){case 0:n="slice"in e?Ri(e):e,i.label=1;case 1:return n.eof()?[3,3]:[4,n.pullAsync(t)];case 2:return i.sent(),n.result.data&&n.result.data.data?[3,3]:[3,1];case 3:if(!(r=n.result)||"dexie"!=r.formatName)throw new Error("Given file is not a dexie export");if(r.formatVersion>Ci)throw new Error("Format version ".concat(r.formatVersion," not supported"));if(!r.data)throw new Error("No data in export file");if(!r.data.databaseName)throw new Error("Missing databaseName in export file");if(!r.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!r.data.tables)throw new Error("Missing tables in export file");return[2,n]}}))}))}ei.prototype.export=function(e){return Ii(this,e)},ei.prototype.import=function(e,t){return Bi(this,e,t)},ei.import=function(e,t){return function(e,t){return ui(this,void 0,void 0,(function(){var n,r,i,o;return ci(this,(function(a){switch(a.label){case 0:return n=(t=t||{}).chunkSizeBytes||1024*Pi,[4,Di(e,n)];case 1:return r=a.sent(),i=r.result.data,(o=new ei(i.databaseName)).version(i.databaseVersion).stores(function(e){for(var t={},n=0,r=e.tables;n<r.length;n++){var i=r[n];t[i.name]=i.schema}return t}(i)),[4,Bi(o,r,t)];case 2:return a.sent(),[2,o]}}))}))}(e,t)};var Li=n(5733),Fi=n.n(Li),Ui=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},zi=function(){function e(t){r(this,e),this.config=t;var n=this.config.dbName;this.tableCountTimer=null,this.clearHistoryDB(),this.dbInstance=new ei(n)}return s(e,[{key:"setConfig",value:function(e){this.config=Object.assign(Object.assign({},this.config),e)}},{key:"init",value:function(){return Ui(this,void 0,void 0,K().mark((function e(){var t,n,r,i,o,a,s,u,c,l,f,h,d;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this.config,n=t.dbVersion,r=t.tableName,i=t.schema,o=void 0===i?"":i,a=t.tableCount,s=void 0===a?1:a,u=t.detectTimer,c=t.enableClearTable,l={},f=0;f<s;f++)h=f+1,d="".concat(r,"_").concat(h),l[d]=o;if(e.prev=3,this.isOpen()){e.next=8;break}return this.dbInstance.version(n).stores(l),e.next=8,this.dbInstance.open();case 8:if(!c){e.next=11;break}return e.next=11,this.clearTable();case 11:this.startDetectTimer(u),e.next=20;break;case 14:if(e.prev=14,e.t0=e.catch(3),"VersionError"!==e.t0.name){e.next=20;break}return this.clearHistoryDB(!0),e.next=20,this.init();case 20:case"end":return e.stop()}}),e,this,[[3,14]])})))}},{key:"startDetectTimer",value:function(e){var t=this;this.tableCountTimer&&this.closeTableCountTimer(),this.tableCountTimer=setInterval((function(){t.detectTableHealthy()}),e)}},{key:"add",value:function(e){return Ui(this,void 0,void 0,K().mark((function t(){var n,r,i,o,a;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.config,r=n.tableName,i=n.tableIndex,o="".concat(r,"_").concat(i),a=this.dbInstance[o],t.next=6,a.add(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("add db failed: ",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))}},{key:"clearHistoryDB",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.config,r=n.deleteDBNames,i=n.isUpdateVersion,o=n.dbName;(t||i)&&this.delete(o),!t&&r&&r.length&&r.forEach((function(t){e.delete(t)}))}},{key:"exportBlob",value:function(e){return Ui(this,void 0,void 0,K().mark((function t(){var n,r,i;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isOpen()){t.next=3;break}return t.next=3,this.dbInstance.open();case 3:return o=void 0,o=new Date,n="".concat(o.getMonth()+1,"-").concat(o.getDate()," ").concat(o.getHours(),":").concat(o.getMinutes(),":").concat(o.getSeconds()," ").concat(o.getMilliseconds()),t.next=6,Ii(this.dbInstance,{prettyJson:!0,progressCallback:this.progressCallback});case 6:return r=t.sent,t.next=9,this.generateZipBlobAsync(r,n,e);case 9:return i=t.sent,t.abrupt("return",i);case 11:case"end":return t.stop()}var o}),t,this)})))}},{key:"generateZipBlobAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Ui(this,void 0,void 0,K().mark((function r(){var i,o;return K().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new(Fi()),r.next=3,i.file("XY_WebSDK_LOG_".concat(n,"_").concat(t,".json"),e,{});case 3:return r.next=5,i.generateAsync({compressionOptions:{level:9},mimeType:"application/zip",compression:"DEFLATE",type:"blob"});case 5:return o=r.sent,r.abrupt("return",o);case 7:case"end":return r.stop()}}),r)})))}},{key:"progressCallback",value:function(e){e.totalRows,e.completedRows;return!0}},{key:"detectTableHealthy",value:function(){return Ui(this,void 0,void 0,K().mark((function e(){var t,n;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getTableLength();case 2:if(t=e.sent,!((n=this.config.maxSize)&&t&&t>n)){e.next=7;break}return e.next=7,this.clearTable();case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getTableLength",value:function(){return Ui(this,void 0,void 0,K().mark((function e(){var t,n,r,i,o;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.config,n=t.tableName,r=t.tableIndex,i="".concat(n,"_").concat(r),e.next=5,this.dbInstance[i].count();case 5:return o=e.sent,e.abrupt("return",o);case 9:e.prev=9,e.t0=e.catch(0),console.log("get table count failed: ",e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])})))}},{key:"clearTable",value:function(){return Ui(this,void 0,void 0,K().mark((function e(){var t,n,r,i;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.config,n=t.tableName,r=t.tableIndex,i="".concat(n,"_").concat(r),!this.isTableExists(i)){e.next=6;break}return e.next=6,this.dbInstance[i].clear();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("clear table data failed: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))}},{key:"isTableExists",value:function(e){try{return this.dbInstance.table(e),!0}catch(e){return!1}}},{key:"delete",value:function(e){ei.delete(e)}},{key:"open",value:function(){var e;return Ui(this,void 0,void 0,K().mark((function t(){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=this.dbInstance)||void 0===e?void 0:e.open();case 2:case"end":return t.stop()}}),t,this)})))}},{key:"close",value:function(){var e;this.closeTableCountTimer(),null===(e=this.dbInstance)||void 0===e||e.close()}},{key:"closeTableCountTimer",value:function(){this.tableCountTimer&&clearInterval(this.tableCountTimer),this.tableCountTimer=null}},{key:"isOpen",value:function(){var e;return null===(e=this.dbInstance)||void 0===e?void 0:e.isOpen()}}]),e}();const Mi=zi;n(7727);const Ki=function(){function e(){r(this,e),this.waitingQueue=[],this.isRunning=!1,this.taskCompletedCB=null}return s(e,[{key:"onTaskCompleted",value:function(e){this.taskCompletedCB=e}},{key:"addTask",value:function(e){var t=this;return new Promise((function(n,r){t.isRunning?t.waitingQueue.push({task:e,resolve:n,reject:r}):(t.isRunning=!0,t.execute(e,n,r))}))}},{key:"execute",value:function(e,t,n){var r=this;e().then((function(e){return t(e)})).catch((function(e){return n(e)})).finally((function(){if(r.waitingQueue.length){var e=r.waitingQueue.shift();e&&r.execute(e.task,e.resolve,e.reject)}else r.isRunning=!1,r.taskCompletedCB&&r.taskCompletedCB()}))}},{key:"taskLength",value:function(){return this.waitingQueue.length}},{key:"clear",value:function(){this.waitingQueue=[],this.isRunning=!1}}]),e}();var Vi,Wi=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Gi=self,qi=function(){function e(){r(this,e),this.taskQueue=null,this.dbManager=null,this.isProgress=!1,this.onTaskEnd=null,this.onTaskCompleted=this.onTaskCompleted.bind(this)}return s(e,[{key:"init",value:function(e){var t=this;this.isProgress=!0,this.taskQueue||(this.taskQueue=new Ki,this.taskQueue.onTaskCompleted(this.onTaskCompleted)),this.dbManager||(this.dbManager=new Mi(e)),this.dbManager.setConfig(e);try{this.taskQueue.addTask((function(){return t.dbManager.init()}))}catch(e){console.log("init dbManager error: ",e)}}},{key:"logger",value:function(e){var n=this,r=e.data,i=e.config,o=r.hourTime,a=r.fullTime,s=r.title,u=r.content,c=r.rest,l=i.isConsole,f=i.kind,h=u;Q.isString(u)&&(h=JSON.parse(u));var d,p=function(e,t){if("[object Object]"!==Object.prototype.toString.call(e))return e;if(Q.isString(t))return Object.assign(Object.assign({},e),V({},t,"******"));if(Q.isArray(t)){var n=Object.assign({},e);return t.forEach((function(e){void 0!==n[e]&&(n[e]="******")})),n}return e}(h,pe);l&&(d=console).log.apply(d,["[".concat(o,"][").concat(f,"]"),s,h].concat(t(c)));var y={t:"".concat(a,"[").concat(f,"] ").concat(s),c:JSON.stringify(p)};try{this.taskQueue&&this.taskQueue.addTask((function(){return n.dbManager.add(y)}))}catch(e){console.log("add data error: ",e)}}},{key:"destroy",value:function(e){var t;this.isProgress=!1,this.onTaskEnd=e,(null===(t=this.taskQueue)||void 0===t?void 0:t.taskLength())||this.onTaskCompleted()}},{key:"onTaskCompleted",value:function(){var e=U.DESTROY;this.isProgress||(this.dbManager.close(),this.dbManager=null,Gi.postMessage({type:e,data:{},config:{}}),this.onTaskEnd&&this.onTaskEnd())}},{key:"exportBlob",value:function(e){return Wi(this,void 0,void 0,K().mark((function t(){var n,r,i,o,a,s;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.data,r=e.config,i=e.type,o=n.fileName,a=n.key,t.next=4,this.dbManager.exportBlob(o);case 4:s=t.sent,Gi.postMessage({type:i,data:Object.assign({blob:s,key:a},n),config:r});case 6:case"end":return t.stop()}}),t,this)})))}}]),e}();Gi.onmessage=function(e){var t=U.LOGGER,n=U.INIT,r=U.DESTROY,i=U.DOWNLOAD,o=U.UPLOAD,a=e.data,s=a.type,u=a.config;switch(s){case n:Vi||(Vi=new qi),Vi.init(u);break;case t:null==Vi||Vi.logger(a);break;case r:null==Vi||Vi.destroy((function(){Vi=null,close()}));break;case i:case o:null==Vi||Vi.exportBlob(a)}}})()})();',"Worker",void 0,void 0)}n(7042),n(1038),n(8783),n(2526),n(1817),n(2165),n(6992),n(3948);function $t(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jt={storage:window.localStorage,set:function(e,t){if(t){var n=Qt(t)||"";this.storage.setItem(e,n)}},get:function(e){if(e){var t=this.storage.getItem(e),n=t||"";try{n=JSON.parse(n)}catch(e){n=t||""}return n}},remove:function(e){e&&this.storage.removeItem(e)},clear:function(){this.storage.clear()},removeList:function(e){var t,n=$t(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.storage.removeItem(r)}}catch(e){n.e(e)}finally{n.f()}}},Qt=function(e){if(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t?JSON.stringify(e):e}};const en=Jt;var tn=n(3729),nn=n.n(tn),rn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},on=q.INIT,an=q.DESTROY,sn=q.LOGGER,cn=q.DOWNLOAD,un=q.UPLOAD,ln=X.LOG,hn=X.ERROR,fn=X.WARN,dn=X.DEBUG,pn=function(){function e(n){var r=this;c(this,e),this.setLogLevel=function(e){r.currentLevel=e},this.setLogServer=function(e){zt.setLogBaseUrl(e)},this.downloadLog=function(e){return new Promise((function(n){return rn(r,void 0,void 0,t().mark((function r(){var i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isProgress){t.next=6;break}o=At(),null===(i=this.worker)||void 0===i||i.postMessage({type:cn,data:{fileName:e,key:o},config:{}}),this.taskPromiseMap[o]=n,t.next=12;break;case 6:return this.start(!1),t.next=9,this.downloadLog();case 9:a=t.sent,this.stop(!1),n(a);case 12:case"end":return t.stop()}}),r,this)})))}))},this.config=Object.assign(Object.assign({},mt),n),this.isArrowUpload=!0,this.currentLevel=$.NONE,this.worker=null,this.isProgress=!1,this.isUpdateVersion=!1,this.taskPromiseMap={},this.start(),this.onMessage=this.onMessage.bind(this)}return f(e,[{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isProgress)return"The log module is already enabled, please stop it first";this.updateTableIndex(!1),this.worker||(this.worker=new qt,this.worker.onerror=this.onErrorWorker,this.worker.onmessageerror=this.onMessageErrorWorker,this.worker.onmessage=this.onMessage.bind(this));var t=this.getTableIndex();return this.isProgress=!0,this.worker.postMessage({type:on,data:{},config:Object.assign(Object.assign({},this.config),{deleteDBNames:["webrtc","testDB"],tableIndex:t,enableClearTable:e,isUpdateVersion:this.isUpdateVersion})}),this.isUpdateVersion=!1,!0}},{key:"onMessage",value:function(e){var n;return rn(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u,l,h,f,d;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.data,o=i.type,a=i.data,s=i.config,o===an&&(null===(n=this.worker)||void 0===n||n.terminate(),this.worker=null),o===cn&&(c=a.blob,u=a.key,l=this.taskPromiseMap[u],nn()(c,"XY_WebSDK_LOG_".concat(te(),".zip"),"application/zip"),l&&l(!0)),o!==un){t.next=9;break}return h=a.blob,f=a.key,d=this.taskPromiseMap[f],t.next=8,this.uploadLogProcess(s,h);case 8:d&&d(!0);case 9:case"end":return t.stop()}}),r,this)})))}},{key:"stop",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];for(var n in this.isProgress=!1,null===(e=this.worker)||void 0===e||e.postMessage({type:an,data:{},config:{}}),this.updateTableIndex(t),this.taskPromiseMap){var r=this.taskPromiseMap[n];r&&r(!0)}this.taskPromiseMap={}}},{key:"onErrorWorker",value:function(e){console.log("worker error: ",{worker:this,event:e})}},{key:"onMessageErrorWorker",value:function(e){console.log("worker message error: ",{worker:this,event:e})}},{key:"updateTableIndex",value:function(e){var t=this.config,n=t.tableCount,r=t.dbName,i=t.dbVersion,o=t.tableIndex,a="XY-LOGGER-".concat(r),s=en.get(a)||{},c=s.index,u=void 0===c?o:c,l=s.version,h=void 0===l?i:l,f=s.count,d=u,p=h;e||n&&u&&u>n&&(d=1),e&&(d=n&&u&&u<n?u+1:1),h===i&&n===(void 0===f?n:f)||(this.isUpdateVersion=!0,p=i&&h&&h>=i?h+1:i,this.config.dbVersion=p),en.set(a,{version:p,index:d,count:n})}},{key:"getTableIndex",value:function(){var e=this.config.dbName,t="XY-LOGGER-".concat(e),n=(en.get(t)||{}).index,r=void 0===n?1:n,i=r;return r&&(i=r),i}},{key:"log",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$.INFO,r=[$.DEBUG,n].includes(this.currentLevel),i=te(),o=ne(),a=JSON.stringify(t),s=arguments.length,c=new Array(s>2?s-2:0),u=2;u<s;u++)c[u-2]=arguments[u];var l={type:sn,data:{hourTime:o,fullTime:i,title:e,content:a,rest:c},config:{kind:ln,isConsole:r}};this.sendLog(l)}},{key:"debug",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$.DEBUG,r=this.currentLevel===n&&"meeting-stats"!==e,i=te(),o=ne(),a=JSON.stringify(t),s=arguments.length,c=new Array(s>2?s-2:0),u=2;u<s;u++)c[u-2]=arguments[u];var l={type:sn,data:{hourTime:o,fullTime:i,title:e,content:a,rest:c},config:{kind:dn,isConsole:r}};this.sendLog(l)}},{key:"warn",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[$.INFO,$.DEBUG,$.WARNING].includes(this.currentLevel),r=te(),i=ne(),o=JSON.stringify(t),a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];var u={type:sn,data:{hourTime:i,fullTime:r,title:e,content:o,rest:s},config:{kind:fn,isConsole:n}};this.sendLog(u)}},{key:"error",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[$.INFO,$.DEBUG,$.WARNING,$.ERROR].includes(this.currentLevel),r=te(),i=ne(),o=JSON.stringify(t),a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];var u={type:sn,data:{hourTime:i,fullTime:r,title:e,content:o,rest:s},config:{kind:hn,isConsole:n}};this.sendLog(u)}},{key:"sendLog",value:function(e){var t,n;this.isProgress?null===(t=this.worker)||void 0===t||t.postMessage(e):(this.start(!1),null===(n=this.worker)||void 0===n||n.postMessage(e),this.stop(!1))}},{key:"uploadLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return rn(this,void 0,void 0,t().mark((function i(){var o=this;return t().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",new Promise((function(i,a){return rn(o,void 0,void 0,t().mark((function o(){var s,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isArrowUpload){t.next=2;break}return t.abrupt("return",a(!1));case 2:if(!this.isProgress){t.next=8;break}c=At(),null===(s=this.worker)||void 0===s||s.postMessage({type:un,data:{fileName:e,key:c},config:{name:e,account:n,comments:r}}),this.taskPromiseMap[c]=i,t.next=13;break;case 8:return this.start(!1),t.next=11,this.uploadLog(e,n,r);case 11:this.stop(!1),i(!0);case 13:case"end":return t.stop()}}),o,this)})))})));case 1:case"end":return i.stop()}}),i)})))}},{key:"uploadLogProcess",value:function(e,n){return rn(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u,l,h,f,d;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.name,o=void 0===i?"":i,a=e.account,s=void 0===a?"":a,c=e.comments,u=void 0===c?"":c,l=new FormData,h=Math.ceil(1e4*Math.random())+"",f=Date.now()+"",l.append("comments",u||o),l.append("sn",h),l.append("userId",h),l.append("deviceId",h),l.append("deviceType","WebrtcSDK"),l.append("userDisplayName",o),l.append("deviceDisplayName",navigator.userAgent),l.append("dataType","userSubmit"),l.append("account",s),l.append("number",""),l.append("softwareVersion",""),l.append("osVersion",""),l.append("deviceModel",""),l.append("crashType","UI"),l.append("crashTime",f),l.append("suffixName",".zip"),l.append("file",n,"WEBRTC_LOG.zip"),t.prev=21,t.next=24,zt.upload(l);case 24:return d=t.sent,t.abrupt("return",d&&(d.status>=200||d.status<300));case 28:return t.prev=28,t.t0=t.catch(21),t.abrupt("return",!1);case 31:case"end":return t.stop()}}),r,null,[[21,28]])})))}},{key:"enableLogUpload",value:function(){this.isArrowUpload=!0}},{key:"disableLogUpload",value:function(){this.isArrowUpload=!1}}]),e}();const vn=pn;var gn=function(){function e(){c(this,e),this.events={}}return f(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if("function"!=typeof t)throw new TypeError("The listener not a function");this.events||(this.events={}),this.events[e]||(this.events[e]=[]),this.events[e].push({total:n,listener:t})}},{key:"once",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.on(e,t,n)}},{key:"removeListener",value:function(e){this.events[e]&&(this.events[e].length=0)}},{key:"removeAllListener",value:function(){this.events={}}},{key:"emmit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.events[e]&&this.events[e].forEach((function(n,i){if((-1===n.total||n.total>=1||"function"==typeof n.listener)&&n.listener.apply(t,r),n.total>=1){var o=t.events[e][i].total-1;t.events[e][i].total=o,0===o&&(t.events[e][i].listener=function(){})}}))}}]),e}(),mn=n(738),yn=n.n(mn);function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}var Sn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wn={DEVICES:{audioInputList:[],audioOutputList:[],videoInList:[]},currentSelectedDevice:{deviceId:"",groupId:"",label:""}},En=function(e){v(r,e);var n=bn(r);function r(e){var t;return c(this,r),(t=n.call(this)).isNewLogger=!1,e?t.logger=e:(t.logger=new vn({dbName:"XYRTC_DEVICE_LOG",tableName:"LOG"}),t.isNewLogger=!0),t.navigator=navigator||window.navigator,t.currentDeviceList=wn.DEVICES,t.nextDeviceList=wn.DEVICES,t.currentUsedDevice={videoInput:wn.currentSelectedDevice,audioInput:wn.currentSelectedDevice,audioOutput:wn.currentSelectedDevice},t.currentPermission={microphone:H.UNKNOWN,camera:H.UNKNOWN},t.handlePermissionCameraStateChanged=t.handlePermissionCameraStateChanged.bind(d(t)),t.handlePermissionPhoneStateChanged=t.handlePermissionPhoneStateChanged.bind(d(t)),t.mediaDevicesChange=t.mediaDevicesChange.bind(d(t)),t.initDeviceEvent(),t}return f(r,[{key:"getDevicePermission",value:function(){return this.currentPermission}},{key:"getNextDeviceList",value:function(){return this.nextDeviceList}},{key:"setCurrentUsedDevice",value:function(e){return Sn(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[DM]current used device in first calling: ",e),this.emmit("currentDevice",e),this.currentUsedDevice=yn()(e),t.next=5,this.getPrivateDevices();case 5:r=t.sent,this.currentDeviceList=yn()(r),this.mediaDevicesChange();case 8:case"end":return t.stop()}}),n,this)})))}},{key:"setCurrentUsedDeviceByType",value:function(e,t){var n=A.VIDEO;if(e===A.AUDIO){var r=this.currentDeviceList.audioInputList.find((function(e){return e.deviceId===t}));r&&(this.currentUsedDevice=Object.assign(Object.assign({},this.currentUsedDevice),{audioInput:r}))}else if(e===n){var i=this.currentDeviceList.videoInList.find((function(e){return e.deviceId===t}));i&&(this.currentUsedDevice=Object.assign(Object.assign({},this.currentUsedDevice),{videoInput:i}))}this.logger.log("set current used device: ",this.currentUsedDevice),this.emmit("currentDevice",this.currentUsedDevice)}},{key:"setAudioOutputDevice",value:function(e,t){var n=this;e&&void 0!==e.sinkId?e.setSinkId(t).then((function(){n.logger.log("[DM]switch audio output device successfully: ".concat(t))})).catch((function(e){var t=e;"SecurityError"===e.name&&(t="You need to use HTTPS for selecting audio output device: ".concat(e)),n.logger.error(t)})):this.logger.warn("[DM]Browser does not support output device selection.")}},{key:"emmitDevices",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("emmit devices: permission and devices"),e.next=3,this.init();case 3:return e.next=5,this.emmitPermission();case 5:return e.next=7,this.mediaDevicesChange();case 7:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){var n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivateDevices();case 2:return n=e.sent,e.prev=3,e.next=6,this.getPermission();case 6:this.currentPermission=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),this.currentPermission={microphone:H.UNKNOWN,camera:H.UNKNOWN};case 12:this.currentDeviceList=this.nextDeviceList=n,this.logger.log("[DM]current device list: ",this.currentDeviceList),this.logger.log("[DM]current permission: ",this.currentPermission);case 15:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"destroy",value:function(){this.removeDeviceEvent(),this.permissionCameraStatus&&this.permissionCameraStatus.removeEventListener("change",this.handlePermissionCameraStateChanged),this.permissionPhoneStatus&&this.permissionPhoneStatus.removeEventListener("change",this.handlePermissionPhoneStateChanged),this.isNewLogger&&(this.logger.stop(),this.isNewLogger=!1)}},{key:"getPrivateDevices",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){var n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={audioInputList:[],audioOutputList:[],videoInList:[]},e.prev=1,e.next=4,this.getDevices();case 4:n=e.sent,this.logger.log("get system devices"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logger.log("[DM]get device failed: ",e.t0);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getDevices",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.navigator.mediaDevices.enumerateDevices();case 3:return n=e.sent,r=[],i=[],o=[],n.forEach((function(e){var t=s(e.kind.match(/(\w+)(input|output)/i),3),n=t[0],a=t[1],c=t[2];if(!e.label.match(/\(Virtual\)$/)&&e.deviceId){var u={deviceId:e.deviceId,kind:n,type:a,direction:c,label:e.label,groupId:e.groupId};"audioinput"===e.kind?r.push(u):"audiooutput"===e.kind?i.push(u):"videoinput"===e.kind&&o.push(u)}})),a={audioInputList:r,audioOutputList:i,videoInList:o},e.abrupt("return",a);case 12:return e.prev=12,e.t0=e.catch(0),e.abrupt("return",Promise.reject(ie("XYSDK:950409",e.t0)));case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))}},{key:"setPermission",value:function(e){var t=e.camera,n=e.microphone,r=this.currentPermission,i=r.camera,o=r.microphone;t===i&&n===o||(this.currentPermission=e,this.logger.log("update permission: ",e),this.emmit("permission",this.currentPermission))}},{key:"updateDevicePermission",value:function(e,t){this.logger.log("update device permission: ",{video:e,audio:t});var n=H.UNKNOWN,r=this.currentPermission,i=r.camera,o=r.microphone,a=e===n?i:e,s=t===n?o:t;this.logger.log("next calculate permission: ",{microPhonePermission:s,cameraPermission:a}),this.setPermission({camera:a,microphone:s})}},{key:"emmitPermission",value:function(){this.currentPermission.camera&&this.emmit("permission",this.currentPermission)}},{key:"query",value:function(e){return Sn(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.navigator.permissions.query({name:e});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",Promise.reject(ie("XYSDK:950408",t.t0)));case 10:case"end":return t.stop()}}),n,this,[[0,7]])})))}},{key:"handlePermissionCameraStateChanged",value:function(e){return Sn(this,void 0,void 0,t().mark((function n(){var r,i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]camera permission changed: ",e),r=e.target.state,i=this.currentPermission.camera,"granted"!==r||"granted"===i){t.next=10;break}return t.next=6,this.getPrivateDevices();case 6:o=t.sent,a={detail:o,nextDevice:{audioInput:void 0,audioOutput:void 0,videoInput:void 0}},this.logger.log("[DM]next used device when camera permission changed: ",a),this.emmit("device",a);case 10:"change"===e.type&&(this.currentPermission=Object.assign(Object.assign({},this.currentPermission),{camera:r})),this.emmit("permission",this.currentPermission);case 12:case"end":return t.stop()}}),n,this)})))}},{key:"handlePermissionPhoneStateChanged",value:function(e){return Sn(this,void 0,void 0,t().mark((function n(){var r,i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]microphone permission changed: ",e),r=e.target.state,i=this.currentPermission.microphone,"granted"!==r||"granted"===i){t.next=10;break}return t.next=6,this.getPrivateDevices();case 6:o=t.sent,a={detail:o,nextDevice:{audioInput:void 0,audioOutput:void 0,videoInput:void 0}},this.logger.log("[DM]next used device when microphone permission changed: ",a),this.emmit("device",a);case 10:"change"===e.type&&(this.currentPermission=Object.assign(Object.assign({},this.currentPermission),{microphone:r})),this.emmit("permission",this.currentPermission);case 12:case"end":return t.stop()}}),n,this)})))}},{key:"getPermission",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){var n,r,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.query("camera");case 3:return n=e.sent,e.next=6,this.query("microphone");case 6:return r=e.sent,i={camera:n.state,microphone:r.state},this.permissionCameraStatus||(this.permissionCameraStatus=n,this.permissionCameraStatus.addEventListener("change",this.handlePermissionCameraStateChanged)),this.permissionPhoneStatus||(this.permissionPhoneStatus=r,this.permissionPhoneStatus.addEventListener("change",this.handlePermissionPhoneStateChanged)),e.abrupt("return",i);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 16:case"end":return e.stop()}}),e,this,[[0,13]])})))}},{key:"getCameraDeviceByMode",value:function(e){var n;return Sn(this,void 0,void 0,t().mark((function r(){var i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[DM] getFrontCameraDevice type:",e),t.next=3,this.getDevices();case 3:if(t.t2=n=t.sent,t.t1=null===t.t2,t.t1){t.next=7;break}t.t1=void 0===n;case 7:if(!t.t1){t.next=11;break}t.t3=void 0,t.next=12;break;case 11:t.t3=n.videoInList;case 12:if(t.t0=t.t3,t.t0){t.next=15;break}t.t0=[];case 15:return i=t.t0,this.logger.log("cameraDeviceList :",i),o=i.length,a=i[0],e===k.BACK&&(a=(me().isPhone?i[1]:i[o-1])||i[0]),this.logger.log("getFrontCameraDevice result: ",a),t.abrupt("return",a);case 22:case"end":return t.stop()}}),r,this)})))}},{key:"diffAudioDevice",value:function(e,t){var n;if(e.length===t.length){var r=e[0]&&e[0].deviceId||"default",i=t[0]&&t[0].deviceId||"default",o=e[0]&&e[0].label||"",a=t[0]&&t[0].label||"";r===i&&o===a||(n=t[0])}else n=t.filter((function(t){return e.every((function(e){return e.deviceId!==t.deviceId}))}))[0],e.length>t.length&&(n=t[0]);return n}},{key:"diffVideoDevice",value:function(e,t){var n;return n=t.filter((function(t){return e.every((function(e){return e.deviceId!==t.deviceId}))}))[0],e.length>t.length&&(n=t[0]),n}},{key:"diffDevices",value:function(e,t){var n=e.audioInputList,r=e.audioOutputList,i=e.videoInList,o=t.audioInputList,a=t.audioOutputList,s=t.videoInList,c=this.diffAudioDevice(n,o),u=this.diffAudioDevice(r,a);return{audioInput:c,videoInput:this.diffVideoDevice(i,s),audioOutput:u}}},{key:"mediaDevicesChange",value:function(){return Sn(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivateDevices();case 2:n=e.sent,r=this.currentUsedDevice.videoInput,this.nextDeviceList=yn()(n),this.logger.log("[DM]nextDeviceList when mediaDevicesChange:",this.nextDeviceList),this.logger.log("[DM]currentDeviceList when mediaDevicesChange:",this.currentDeviceList),i=this.diffDevices(this.currentDeviceList,this.nextDeviceList),o=i.videoInput,a=i.audioInput,o&&o.deviceId!==(null==r?void 0:r.deviceId)?this.currentUsedDevice=Object.assign(Object.assign({},this.currentUsedDevice),{videoInput:o}):i.videoInput=void 0,this.currentUsedDevice=Object.assign(Object.assign({},this.currentUsedDevice),{audioInput:a}),this.currentDeviceList=yn()(n),s={detail:n,nextDevice:i},this.logger.log("[DM]next used device when mediaDevicesChange: ",s),this.emmit("device",s);case 15:case"end":return e.stop()}}),e,this)})))}},{key:"initDeviceEvent",value:function(){var e;null===(e=this.navigator.mediaDevices)||void 0===e||e.addEventListener("devicechange",this.mediaDevicesChange)}},{key:"removeDeviceEvent",value:function(){var e;null===(e=this.navigator.mediaDevices)||void 0===e||e.removeEventListener("devicechange",this.mediaDevicesChange)}}]),r}(gn);const xn=En;var Cn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},kn=me(),On={isMinBrowser:function(){var e=!1,t=kn.isChrome,n=kn.isEdge,r=(kn.isSafari,kn.isFirefox);if(t){var i=function(){var e=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);if(null!=e&&5==e.length)return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2],build:e[3],patch:e[4]}}();e=(null==i?void 0:i.major)>=72}else if(n){var o=function(){var e=navigator.userAgent.match(/Ed(?:g)\/([0-9]+)\.([0-9]+)\.([0-9]+)/);if(!(null==e||e.length<4))return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2],build:e[3]}}();e=(null==o?void 0:o.major)>=80}else if(r){var a=function(){var e=navigator.userAgent.match(/Firefox\/([0-9]+)\.([0-9]+)/);if(!(null==e||e.length<3))return{major:(e=e.map((function(e){return parseInt(e,10)})))[1],minor:e[2]}}();e=(null==a?void 0:a.major)>=80}return e},isMobile:function(){var e=!1,t=kn.isPhone,n=kn.isAndroid,r=kn.isIPad;if(n){var i=function(){var e=navigator.userAgent.toLowerCase().match(/android (.*?);/);if(e){var t=e[1].split(".");return{major:(t=t.map((function(e){return parseInt(e,10)})))[0],minor:t[1]}}}()||{major:0,minor:0},o=i.major;i.minor;e=o>=6}else if(t){var a=function(){var e=navigator.userAgent.toLowerCase().match(/cpu( iphone)? os (.*?) like mac os/);if(e){var t=e[2].split("_");return{major:(t=t.map((function(e){return parseInt(e,10)})))[0],minor:t[1]}}}()||{major:0,minor:0},s=a.major,c=a.minor;e=12===s?c>2:s>12}else r&&(e=!0);return e},isFirefox:function(){return kn.isFirefox},isSupportAspectRatio:function(){return!kn.isPhone},isSupportReauthorize:function(){var e=kn.isSafari,t=kn.isIPad,n=kn.isFirefox;return!(e||t||n||ye)},isSupportUserMedia:function(){var e;return!!(null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)},isSupportRTC:function(e){return Cn(void 0,void 0,void 0,t().mark((function n(){var r,i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={isSupportRTC:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1},i=["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection"],o=0;case 3:if(!(o<i.length)){t.next=11;break}if(!(i[o]in window)){t.next=8;break}return r.isSupportRTC=!0,t.abrupt("break",11);case 8:o++,t.next=3;break;case 11:if(!r.isSupportRTC){t.next=17;break}return t.next=14,On.isSupportPeerCB(e);case 14:a=t.sent,s=a.isSupportPeer,r=Object.assign(Object.assign({},a),{isSupportRTC:s});case 17:return t.abrupt("return",r);case 18:case"end":return t.stop()}}),n)})))},isSupportPeerCB:function(e){return Cn(void 0,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){setTimeout((function(){var n;if(RTCPeerConnection){var r,i,o,a=new RTCPeerConnection({iceServers:[]}),s=!1,c=!1,u=!1;if(r=!!(a.createAnswer&&a.createOffer&&a.addEventListener&&a.removeEventListener&&null===a.onnegotiationneeded),i=!!a.addTrack,o=!!(null==a?void 0:a.addTransceiver),e&&(null===(n=null==e?void 0:e.getVideoTracks())||void 0===n?void 0:n.length)&&o){var l=e.getVideoTracks()[0],h=a.addTransceiver(l);h&&(s=!!h.sender.replaceTrack,u=!!h.sender.setStreams),l&&(c=!!l.applyConstraints),h=null}a.close(),t({isSupportPeer:r,isSupportAddtrack:i,isSupportAddTransceiver:o,isSupportReplaceTrack:s,isApplyConstraints:c,isSupportSetStreams:u})}t({isSupportPeer:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1})}),100)})));case 1:case"end":return t.stop()}}),n)})))},isSupportWebsocket:function(){return!!window.WebSocket},isSupportMedia:function(){return!!navigator.mediaDevices},isSupportH264:function(){return Cn(void 0,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=kn.isFirefox,a=!1,!o){e.next=13;break}return e.prev=3,s=new RTCPeerConnection,e.next=7,s.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 7:c=e.sent,a=((null===(n=null==c?void 0:c.sdp)||void 0===n?void 0:n.toLowerCase().indexOf("h264"))||-1)>-1,e.next=13;break;case 11:e.prev=11,e.t0=e.catch(3);case 13:try{u=(null===(r=RTCRtpSender.getCapabilities("video"))||void 0===r?void 0:r.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],l=(null===(i=RTCRtpReceiver.getCapabilities("video"))||void 0===i?void 0:i.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],(null==u?void 0:u.length)>0&&l.length>0&&(a=!0)}catch(e){}return e.abrupt("return",a);case 15:case"end":return e.stop()}}),e,null,[[3,11]])})))},osVersion:function(){var e=kn.isMac,t=kn.isWindows,n=kn.isLinux,r=kn.isPhone,i=kn.isAndroid,o=kn.isIPad,a="unknown";return e?a="mac":t?a="windows":n?a="linux":r?a="ios":i?a="android":o&&(a="pad"),a},getNetWork:function(){var e=navigator.connection||{};return JSON.stringify(e)}},In=On.isFirefox();function An(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(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.")}()}n(1532),n(4553),n(5306),n(9254),n(7727);var _n={en_US:{default:"The call is abnormal, please try again later",OK:"Call ended",KickoutTipContent:"Your account is logged in at another location and you are forced to go offline",SHARE_CONTENT_FAILED:"Share content failed",LOCAL_NET_DISCONNECT:"The network is interrupted and the call is disconnected",TOKEN_INVALID:"Login has expired, please log in again","The device locked":"The account has been disabled."},zh_CN:{default:"呼叫异常,请稍后重试",OK:"通话已结束",KickoutTipContent:"您的账号在另一地点登录,您被迫下线",SHARE_CONTENT_FAILED:"分享屏幕失败",LOCAL_NET_DISCONNECT:"网络中断,呼叫已断开",TOKEN_INVALID:"登录已失效,请重新登录","The device locked":"账号异常"},zh_TW:{default:"呼叫異常,請稍後重試",OK:"通話已結束",KickoutTipContent:"您的賬號在另一地點登錄,您被迫下線",SHARE_CONTENT_FAILED:"分享屏幕失敗",LOCAL_NET_DISCONNECT:"網絡中斷,呼叫已斷開",TOKEN_INVALID:"登錄已失效,請重新登錄","The device locked":"賬號異常"}},Tn=[],Rn=function(){function e(t,n){var r=this;c(this,e),this.onOpenSocket=function(e){r.logger.log("open socket success"),r.isConnected=!0,r.lockReconnect=!1,r.reconnectCount=0,r.options.openHeatBeat&&r.sendHeartBeat(),r.emit("open",e)},this.onHandleMessage=function(e){r.options.openHeatBeat&&e.data===r.options.pangData?r.clearPangTimer():r.emit("message",e)},this.onCloseSocket=function(e){if(r.isConnected=!1,r.logger.log("close websocket success",e.code+","+e.reason+","+e.wasClean),r.logger.log("this.messageList: ",r.messageList),4e3===e.code)return r.isClose=!0,void r.emit("close",e);r.lockReconnect||(r.reconnectCount>=1?r.reconnectTimer||(r.reconnectTimer=setTimeout((function(){r.reConnect(),r.reconnectTimer=null}),r.reconnectOffset)):r.reConnect(),r.emit("error",e))},this.onErrorSocket=function(e){r.logger.log("error connection websocket"),r.isConnected=!1,r.lockReconnect||(r.reconnectCount>=1?r.reconnectTimer||(r.reconnectTimer=setTimeout((function(){r.reConnect(),r.reconnectTimer=null}),r.reconnectOffset)):r.reConnect(),r.emit("error",e))};this.logger=n.logger,this.client=n,this.options=Object.assign(Object.assign({},{protocols:[],pingData:"PING",pangData:"PONG",autoReConnect:!0,openHeatBeat:!0,params:{}}),t),this.heatBeatFrequency=15e3,this.timeOffset=1e4,this.reconnectCount=0,this.reconnectLimit=5,this.lockReconnect=!1,this.messageList={},this.headBeatTimer=null,this.isConnected=!1,this.isClose=!1,this.reconnectOffset=3e3,this.reconnectTimer=null,this.connect(!1),this.addEvent()}return f(e,[{key:"connect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,n=t.url,r=t.params,i=n+"?";if(window.WebSocket){var o=Object.keys(r),a=o.length;o.forEach((function(t,n){var o=n===a-1?"":"&";i+=e&&"start"===t?"".concat(t,"=",!1):"".concat(t,"=").concat(r[t]),i+=o})),this.logger.log("[wss]wss url:",i),this.socket=new WebSocket(i,this.options.protocols),Tn.push(this.socket),e&&(this.lockReconnect=!1)}else this.emit("error",ie("XYSDK:950116","Current browser cannot support Websocket, please use XyRTC sdk in chrome!"))}},{key:"addEvent",value:function(){this.socket.addEventListener("open",this.onOpenSocket),this.socket.addEventListener("message",this.onHandleMessage),this.socket.addEventListener("close",this.onCloseSocket),this.socket.addEventListener("error",this.onErrorSocket)}},{key:"removeEvent",value:function(){this.socket.removeEventListener("open",this.onOpenSocket),this.socket.removeEventListener("message",this.onHandleMessage),this.socket.removeEventListener("close",this.onCloseSocket),this.socket.removeEventListener("error",this.onErrorSocket)}},{key:"sendHeartBeat",value:function(){var e=this;this.headBeatTimer||(this.socket.send(this.options.pingData||"PING"),this.clearTimeout()),this.headBeatTimer=setInterval((function(){e.client.disconnected?e.clearBeatTimer():(e.socket.send(e.options.pingData||"PING"),e.clearTimeout())}),this.heatBeatFrequency)}},{key:"clearTimeout",value:function(){var e=this;this.pangTimer=setTimeout((function(){e.emit("timeout",""),e.options.autoReConnect&&e.reConnect()}),this.timeOffset)}},{key:"emit",value:function(e,t){this.messageList[e]&&this.messageList[e].forEach((function(e){e(t)}))}},{key:"clearPangTimer",value:function(){this.pangTimer&&clearTimeout(this.pangTimer)}},{key:"clearBeatTimer",value:function(){this.headBeatTimer&&clearInterval(this.headBeatTimer)}},{key:"clearReconnectTimer",value:function(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}},{key:"reset",value:function(){this.clearBeatTimer(),this.clearPangTimer(),this.clearReconnectTimer(),this.messageList={}}},{key:"on",value:function(e,t){this.messageList[e]?this.messageList[e].push(t):this.messageList[e]=[t]}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger.log("close socket"),this.socket&&this.socket.close(),Tn.map((function(e){e&&e.close()})),Tn=[],this.clearBeatTimer(),this.clearPangTimer(),this.clearReconnectTimer(),e||(this.messageList={}),this.removeEvent()}},{key:"send",value:function(e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&!("string"==typeof e)?JSON.stringify(e):e;t&&(this.logger.log("send wss message: ",e),this.isConnected||(this.logger.log("wss connected status: ",this.isConnected),this.logger.log("socket connection status: ",{0:"connection",1:"open",2:"closing",3:"closed"}[this.socket.readyState]||"unknown"))),this.isConnected?this.isClose?this.logger.log("send wss msg failed, because socket is close"):(1===this.socket.readyState&&(this.socket.send(n),t&&this.logger.log("msg sent successfully")),"STOP_CALL"===e.type&&this.stopCall()):t&&this.logger.log("send wss msg failed, because socket is closed")}},{key:"stopCall",value:function(){var e=this;this.isConnected=!1,setTimeout((function(){e.close()}),10)}},{key:"reConnect",value:function(){if(!this.client.disconnected&&!this.lockReconnect){if(this.reconnectCount>=this.reconnectLimit)return this.logger.log("reconnect count limited:",{reconnectCount:this.reconnectCount,reconnectLimit:this.reconnectLimit}),this.isClose=!0,void this.emit("close",null);this.lockReconnect=!0,this.reconnectCount+=1,this.logger.log("reconnect is trigger"),this.logger.log("reconnect count:",this.reconnectCount),this.close(!0),this.emit("reconnect",""),this.connect(!0),this.addEvent()}}}]),e}();const Dn=Rn;function Nn(){return Xt()('(()=>{var e={738:(e,t,r)=>{"use strict";const n=r(3341),o=r(6401),i=r(5299);function a(e,t){switch(o(e)){case"object":return function(e,t){if("function"==typeof t)return t(e);if(t||i(e)){const r=new e.constructor;for(let n in e)r[n]=a(e[n],t);return r}return e}(e,t);case"array":return function(e,t){const r=new e.constructor(e.length);for(let n=0;n<e.length;n++)r[n]=a(e[n],t);return r}(e,t);default:return n(e)}}e.exports=a},9662:(e,t,r)=>{var n=r(614),o=r(6330),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},6077:(e,t,r)=>{var n=r(614),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw i("Can\'t set "+o(e)+" as a prototype")}},1223:(e,t,r)=>{var n=r(5112),o=r(30),i=r(3070).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,r)=>{"use strict";var n=r(8710).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},9670:(e,t,r)=>{var n=r(111),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not an object")}},8533:(e,t,r)=>{"use strict";var n=r(2092).forEach,o=r(9341)("forEach");e.exports=o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},1318:(e,t,r)=>{var n=r(5656),o=r(1400),i=r(6244),a=function(e){return function(t,r,a){var s,c=n(t),u=i(c),f=o(a,u);if(e&&r!=r){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,r)=>{var n=r(9974),o=r(1702),i=r(8361),a=r(7908),s=r(6244),c=r(5417),u=o([].push),f=function(e){var t=1==e,r=2==e,o=3==e,f=4==e,d=6==e,l=7==e,p=5==e||d;return function(v,y,m,h){for(var S,O,g=a(v),b=i(g),E=n(y,m),x=s(b),I=0,R=h||c,T=t?R(v,x):r||l?R(v,0):void 0;x>I;I++)if((p||I in b)&&(O=E(S=b[I],I,g),e))if(t)T[I]=O;else if(O)switch(e){case 3:return!0;case 5:return S;case 6:return I;case 2:u(T,S)}else switch(e){case 4:return!1;case 7:u(T,S)}return d?-1:o||f?f:T}};e.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},1194:(e,t,r)=>{var n=r(7293),o=r(5112),i=r(7392),a=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,r)=>{"use strict";var n=r(7293);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},206:(e,t,r)=>{var n=r(1702);e.exports=n([].slice)},7475:(e,t,r)=>{var n=r(3157),o=r(4411),i=r(111),a=r(5112)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(o(t)&&(t===s||n(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},5417:(e,t,r)=>{var n=r(7475);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},4326:(e,t,r)=>{var n=r(1702),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},648:(e,t,r)=>{var n=r(1694),o=r(614),i=r(4326),a=r(5112)("toStringTag"),s=Object,c="Arguments"==i(function(){return arguments}());e.exports=n?i: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=s(e),a))?r:c?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},9920:(e,t,r)=>{var n=r(2597),o=r(3887),i=r(1236),a=r(3070);e.exports=function(e,t,r){for(var s=o(t),c=a.f,u=i.f,f=0;f<s.length;f++){var d=s[f];n(e,d)||r&&n(r,d)||c(e,d,u(t,d))}}},8880:(e,t,r)=>{var n=r(9781),o=r(3070),i=r(9114);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,r)=>{"use strict";var n=r(4948),o=r(3070),i=r(9114);e.exports=function(e,t,r){var a=n(t);a in e?o.f(e,a,i(0,r)):e[a]=r}},7045:(e,t,r)=>{var n=r(6339),o=r(3070);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),o.f(e,t,r)}},8052:(e,t,r)=>{var n=r(614),o=r(3070),i=r(6339),a=r(3072);e.exports=function(e,t,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(n(r)&&i(r,u,s),s.global)c?e[t]=r:a(t,r);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:o.f(e,t,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},3072:(e,t,r)=>{var n=r(7854),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9781:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:e=>{var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},317:(e,t,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},7207:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:e=>{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}},8509:(e,t,r)=>{var n=r(317)("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},9363:e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8113:e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(e,t,r)=>{var n,o,i=r(7854),a=r(8113),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\\/(\\d+)/))&&(o=+n[1]),e.exports=o},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(8052),s=r(3072),c=r(9920),u=r(4705);e.exports=function(e,t){var r,f,d,l,p,v=e.target,y=e.global,m=e.stat;if(r=y?n:m?n[v]||s(v,{}):(n[v]||{}).prototype)for(f in t){if(l=t[f],d=e.dontCallGetSet?(p=o(r,f))&&p.value:r[f],!u(y?f:v+(m?".":"#")+f,e.forced)&&void 0!==d){if(typeof l==typeof d)continue;c(l,d)}(e.sham||d&&d.sham)&&i(l,"sham",!0),a(r,f,l,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,r)=>{"use strict";r(4916);var n=r(1470),o=r(8052),i=r(2261),a=r(7293),s=r(5112),c=r(8880),u=s("species"),f=RegExp.prototype;e.exports=function(e,t,r,d){var l=s(e),p=!a((function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})),v=p&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[l]=/./[l]),r.exec=function(){return t=!0,null},r[l](""),!t}));if(!p||!v||r){var y=n(/./[l]),m=t(l,""[e],(function(e,t,r,o,a){var s=n(e),c=t.exec;return c===i||c===f.exec?p&&!a?{done:!0,value:y(t,r,o)}:{done:!0,value:s(r,t,o)}:{done:!1}}));o(String.prototype,e,m[0]),o(f,l,m[1])}d&&c(f[l],"sham",!0)}},2104:(e,t,r)=>{var n=r(4374),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:(e,t,r)=>{var n=r(1470),o=r(9662),i=r(4374),a=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4374:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},6916:(e,t,r)=>{var n=r(4374),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},6530:(e,t,r)=>{var n=r(9781),o=r(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},5668:(e,t,r)=>{var n=r(1702),o=r(9662);e.exports=function(e,t,r){try{return n(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},1470:(e,t,r)=>{var n=r(4326),o=r(1702);e.exports=function(e){if("Function"===n(e))return o(e)}},1702:(e,t,r)=>{var n=r(4374),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);e.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}},5005:(e,t,r)=>{var n=r(7854),o=r(614);e.exports=function(e,t){return arguments.length<2?(r=n[e],o(r)?r:void 0):n[e]&&n[e][t];var r}},8173:(e,t,r)=>{var n=r(9662),o=r(8554);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},7854:function(e,t,r){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||this||Function("return this")()},2597:(e,t,r)=>{var n=r(1702),o=r(7908),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3501:e=>{e.exports={}},490:(e,t,r)=>{var n=r(5005);e.exports=n("document","documentElement")},4664:(e,t,r)=>{var n=r(9781),o=r(7293),i=r(317);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(e,t,r)=>{var n=r(1702),o=r(7293),i=r(4326),a=Object,s=n("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?s(e,""):a(e)}:a},9587:(e,t,r)=>{var n=r(614),o=r(111),i=r(7674);e.exports=function(e,t,r){var a,s;return i&&n(a=t.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(e,s),e}},2788:(e,t,r)=>{var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},9909:(e,t,r)=>{var n,o,i,a=r(4811),s=r(7854),c=r(111),u=r(8880),f=r(2597),d=r(5465),l=r(6200),p=r(3501),v="Object already initialized",y=s.TypeError,m=s.WeakMap;if(a||d.state){var h=d.state||(d.state=new m);h.get=h.get,h.has=h.has,h.set=h.set,n=function(e,t){if(h.has(e))throw y(v);return t.facade=e,h.set(e,t),t},o=function(e){return h.get(e)||{}},i=function(e){return h.has(e)}}else{var S=l("state");p[S]=!0,n=function(e,t){if(f(e,S))throw y(v);return t.facade=e,u(e,S,t),t},o=function(e){return f(e,S)?e[S]:{}},i=function(e){return f(e,S)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},3157:(e,t,r)=>{var n=r(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},614:(e,t,r)=>{var n=r(4154),o=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},4411:(e,t,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(648),s=r(5005),c=r(2788),u=function(){},f=[],d=s("Reflect","construct"),l=/^\\s*(?:class|function)\\b/,p=n(l.exec),v=!l.exec(u),y=function(e){if(!i(e))return!1;try{return d(u,f,e),!0}catch(e){return!1}},m=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!p(l,c(e))}catch(e){return!0}};m.sham=!0,e.exports=!d||o((function(){var e;return y(y.call)||!y(Object)||!y((function(){e=!0}))||e}))?m:y},4705:(e,t,r)=>{var n=r(7293),o=r(614),i=/#|\\.prototype\\./,a=function(e,t){var r=c[s(e)];return r==f||r!=u&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},8554:e=>{e.exports=function(e){return null==e}},111:(e,t,r)=>{var n=r(614),o=r(4154),i=o.all;e.exports=o.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===i}:function(e){return"object"==typeof e?null!==e:n(e)}},1913:e=>{e.exports=!1},2190:(e,t,r)=>{var n=r(5005),o=r(614),i=r(7976),a=r(3307),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,s(e))}},6244:(e,t,r)=>{var n=r(7466);e.exports=function(e){return n(e.length)}},6339:(e,t,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(2597),s=r(9781),c=r(6530).CONFIGURABLE,u=r(2788),f=r(9909),d=f.enforce,l=f.get,p=String,v=Object.defineProperty,y=n("".slice),m=n("".replace),h=n([].join),S=s&&!o((function(){return 8!==v((function(){}),"length",{value:8}).length})),O=String(String).split("String"),g=e.exports=function(e,t,r){"Symbol("===y(p(t),0,7)&&(t="["+m(p(t),/^Symbol\\(([^)]*)\\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(s?v(e,"name",{value:t,configurable:!0}):e.name=t),S&&r&&a(r,"arity")&&e.length!==r.arity&&v(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&v(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=d(e);return a(n,"source")||(n.source=h(O,"string"==typeof t?t:"")),e};Function.prototype.toString=g((function(){return i(this)&&l(this).source||u(this)}),"toString")},4758:e=>{var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},3009:(e,t,r)=>{var n=r(7854),o=r(7293),i=r(1702),a=r(1340),s=r(3111).trim,c=r(1361),u=n.parseInt,f=n.Symbol,d=f&&f.iterator,l=/^[+-]?0x/i,p=i(l.exec),v=8!==u(c+"08")||22!==u(c+"0x16")||d&&!o((function(){u(Object(d))}));e.exports=v?function(e,t){var r=s(a(e));return u(r,t>>>0||(p(l,r)?16:10))}:u},1574:(e,t,r)=>{"use strict";var n=r(9781),o=r(1702),i=r(6916),a=r(7293),s=r(1956),c=r(5181),u=r(5296),f=r(7908),d=r(8361),l=Object.assign,p=Object.defineProperty,v=o([].concat);e.exports=!l||a((function(){if(n&&1!==l({b:1},l(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=l({},e)[r]||s(l({},t)).join("")!=o}))?function(e,t){for(var r=f(e),o=arguments.length,a=1,l=c.f,p=u.f;o>a;)for(var y,m=d(arguments[a++]),h=l?v(s(m),l(m)):s(m),S=h.length,O=0;S>O;)y=h[O++],n&&!i(p,m,y)||(r[y]=m[y]);return r}:l},30:(e,t,r)=>{var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),c=r(490),u=r(317),f=r(6200),d="prototype",l="script",p=f("IE_PROTO"),v=function(){},y=function(e){return"<"+l+">"+e+"</"+l+">"},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;h="undefined"!=typeof document?document.domain&&n?m(n):(t=u("iframe"),r="java"+l+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(y("document.F=Object")),e.close(),e.F):m(n);for(var o=a.length;o--;)delete h[d][a[o]];return h()};s[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(v[d]=o(e),r=new v,v[d]=null,r[p]=e):r=h(),void 0===t?r:i.f(r,t)}},6048:(e,t,r)=>{var n=r(9781),o=r(3353),i=r(3070),a=r(9670),s=r(5656),c=r(1956);t.f=n&&!o?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),o=c(t),u=o.length,f=0;u>f;)i.f(e,r=o[f++],n[r]);return e}},3070:(e,t,r)=>{var n=r(9781),o=r(4664),i=r(3353),a=r(9670),s=r(4948),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d="enumerable",l="configurable",p="writable";t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=f(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:l in r?r[l]:n[l],enumerable:d in r?r[d]:n[d],writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1236:(e,t,r)=>{var n=r(9781),o=r(6916),i=r(5296),a=r(9114),s=r(5656),c=r(4948),u=r(2597),f=r(4664),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=s(e),t=c(t),f)try{return d(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},8006:(e,t,r)=>{var n=r(6324),o=r(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},7976:(e,t,r)=>{var n=r(1702);e.exports=n({}.isPrototypeOf)},6324:(e,t,r)=>{var n=r(1702),o=r(2597),i=r(5656),a=r(1318).indexOf,s=r(3501),c=n([].push);e.exports=function(e,t){var r,n=i(e),u=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&c(f,r);for(;t.length>u;)o(n,r=t[u++])&&(~a(f,r)||c(f,r));return f}},1956:(e,t,r)=>{var n=r(6324),o=r(748);e.exports=Object.keys||function(e){return n(e,o)}},5296:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7674:(e,t,r)=>{var n=r(5668),o=r(9670),i=r(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return o(r),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},288:(e,t,r)=>{"use strict";var n=r(1694),o=r(648);e.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(e,t,r)=>{var n=r(6916),o=r(614),i=r(111),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw a("Can\'t convert object to primitive value")}},3887:(e,t,r)=>{var n=r(5005),o=r(1702),i=r(8006),a=r(5181),s=r(9670),c=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(s(e)),r=a.f;return r?c(t,r(e)):t}},857:(e,t,r)=>{var n=r(7854);e.exports=n},7651:(e,t,r)=>{var n=r(6916),o=r(9670),i=r(614),a=r(4326),s=r(2261),c=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var u=n(r,e,t);return null!==u&&o(u),u}if("RegExp"===a(e))return n(s,e,t);throw c("RegExp#exec called on incompatible receiver")}},2261:(e,t,r)=>{"use strict";var n,o,i=r(6916),a=r(1702),s=r(1340),c=r(7066),u=r(2999),f=r(2309),d=r(30),l=r(9909).get,p=r(9441),v=r(7168),y=f("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,h=m,S=a("".charAt),O=a("".indexOf),g=a("".replace),b=a("".slice),E=(o=/b*/g,i(m,n=/a/,"a"),i(m,o,"a"),0!==n.lastIndex||0!==o.lastIndex),x=u.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(E||I||x||p||v)&&(h=function(e){var t,r,n,o,a,u,f,p=this,v=l(p),R=s(e),T=v.raw;if(T)return T.lastIndex=p.lastIndex,t=i(h,T,R),p.lastIndex=T.lastIndex,t;var A=v.groups,N=x&&p.sticky,L=i(c,p),C=p.source,D=0,w=R;if(N&&(L=g(L,"y",""),-1===O(L,"g")&&(L+="g"),w=b(R,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\\n"!==S(R,p.lastIndex-1))&&(C="(?: "+C+")",w=" "+w,D++),r=new RegExp("^(?:"+C+")",L)),I&&(r=new RegExp("^"+C+"$(?!\\\\s)",L)),E&&(n=p.lastIndex),o=i(m,N?r:p,w),N?o?(o.input=b(o.input,D),o[0]=b(o[0],D),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:E&&o&&(p.lastIndex=p.global?o.index+o[0].length:n),I&&o&&o.length>1&&i(y,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&A)for(o.groups=u=d(null),a=0;a<A.length;a++)u[(f=A[a])[0]]=o[f[1]];return o}),e.exports=h},7066:(e,t,r)=>{"use strict";var n=r(9670);e.exports=function(){var e=n(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}},2999:(e,t,r)=>{var n=r(7293),o=r(7854).RegExp,i=n((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),s=i||n((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},9441:(e,t,r)=>{var n=r(7293),o=r(7854).RegExp;e.exports=n((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\\n")&&"s"===e.flags)}))},7168:(e,t,r)=>{var n=r(7293),o=r(7854).RegExp;e.exports=n((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,r)=>{var n=r(8554),o=TypeError;e.exports=function(e){if(n(e))throw o("Can\'t call method on "+e);return e}},7152:(e,t,r)=>{"use strict";var n,o=r(7854),i=r(2104),a=r(614),s=r(9363),c=r(8113),u=r(206),f=r(8053),d=o.Function,l=/MSIE .\\./.test(c)||s&&((n=o.Bun.version.split(".")).length<3||0==n[0]&&(n[1]<3||3==n[1]&&0==n[2]));e.exports=function(e,t){var r=t?2:1;return l?function(n,o){var s=f(arguments.length,1)>r,c=a(n)?n:d(n),l=s?u(arguments,r):[],p=s?function(){i(c,this,l)}:c;return t?e(p,o):e(p)}:e}},6200:(e,t,r)=>{var n=r(2309),o=r(9711),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5465:(e,t,r)=>{var n=r(7854),o=r(3072),i="__core-js_shared__",a=n[i]||o(i,{});e.exports=a},2309:(e,t,r)=>{var n=r(1913),o=r(5465);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},8710:(e,t,r)=>{var n=r(1702),o=r(9303),i=r(1340),a=r(4488),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),f=function(e){return function(t,r){var n,f,d=i(a(t)),l=o(r),p=d.length;return l<0||l>=p?e?"":void 0:(n=c(d,l))<55296||n>56319||l+1===p||(f=c(d,l+1))<56320||f>57343?e?s(d,l):n:e?u(d,l,l+2):f-56320+(n-55296<<10)+65536}};e.exports={codeAt:f(!1),charAt:f(!0)}},8415:(e,t,r)=>{"use strict";var n=r(9303),o=r(1340),i=r(4488),a=RangeError;e.exports=function(e){var t=o(i(this)),r="",s=n(e);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(r+=t);return r}},3111:(e,t,r)=>{var n=r(1702),o=r(4488),i=r(1340),a=r(1361),s=n("".replace),c=RegExp("^["+a+"]+"),u=RegExp("(^|[^"+a+"])["+a+"]+$"),f=function(e){return function(t){var r=i(o(t));return 1&e&&(r=s(r,c,"")),2&e&&(r=s(r,u,"$1")),r}};e.exports={start:f(1),end:f(2),trim:f(3)}},6293:(e,t,r)=>{var n=r(7392),o=r(7293),i=r(7854).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},863:(e,t,r)=>{var n=r(1702);e.exports=n(1..valueOf)},1400:(e,t,r)=>{var n=r(9303),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},5656:(e,t,r)=>{var n=r(8361),o=r(4488);e.exports=function(e){return n(o(e))}},9303:(e,t,r)=>{var n=r(4758);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},7466:(e,t,r)=>{var n=r(9303),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},7908:(e,t,r)=>{var n=r(4488),o=Object;e.exports=function(e){return o(n(e))}},7593:(e,t,r)=>{var n=r(6916),o=r(111),i=r(2190),a=r(8173),s=r(2140),c=r(5112),u=TypeError,f=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,c=a(e,f);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!o(r)||i(r))return r;throw u("Can\'t convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},4948:(e,t,r)=>{var n=r(7593),o=r(2190);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},1694:(e,t,r)=>{var n={};n[r(5112)("toStringTag")]="z",e.exports="[object z]"===String(n)},1340:(e,t,r)=>{var n=r(648),o=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9711:(e,t,r)=>{var n=r(1702),o=0,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},3307:(e,t,r)=>{var n=r(6293);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(e,t,r)=>{var n=r(9781),o=r(7293);e.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:e=>{var t=TypeError;e.exports=function(e,r){if(e<r)throw t("Not enough arguments");return e}},4811:(e,t,r)=>{var n=r(7854),o=r(614),i=n.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},5112:(e,t,r)=>{var n=r(7854),o=r(2309),i=r(2597),a=r(9711),s=r(6293),c=r(3307),u=n.Symbol,f=o("wks"),d=c?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return i(f,e)||(f[e]=s&&i(u,e)?u[e]:d("Symbol."+e)),f[e]}},1361:e=>{e.exports="\\t\\n\\v\\f\\r \\u2028\\u2029\\ufeff"},2222:(e,t,r)=>{"use strict";var n=r(2109),o=r(7293),i=r(3157),a=r(111),s=r(7908),c=r(6244),u=r(7207),f=r(6135),d=r(5417),l=r(1194),p=r(5112),v=r(7392),y=p("isConcatSpreadable"),m=v>=51||!o((function(){var e=[];return e[y]=!1,e.concat()[0]!==e})),h=function(e){if(!a(e))return!1;var t=e[y];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!l("concat")},{concat:function(e){var t,r,n,o,i,a=s(this),l=d(a,0),p=0;for(t=-1,n=arguments.length;t<n;t++)if(h(i=-1===t?a:arguments[t]))for(o=c(i),u(p+o),r=0;r<o;r++,p++)r in i&&f(l,p,i[r]);else u(p+1),f(l,p++,i);return l.length=p,l}})},9826:(e,t,r)=>{"use strict";var n=r(2109),o=r(2092).find,i=r(1223),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},9554:(e,t,r)=>{"use strict";var n=r(2109),o=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},2772:(e,t,r)=>{"use strict";var n=r(2109),o=r(1470),i=r(1318).indexOf,a=r(9341),s=o([].indexOf),c=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:c||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:i(this,e,t)}})},9753:(e,t,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},1249:(e,t,r)=>{"use strict";var n=r(2109),o=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},5212:(e,t,r)=>{"use strict";var n=r(2109),o=r(2092).some;n({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},3710:(e,t,r)=>{var n=r(1702),o=r(8052),i=Date.prototype,a="Invalid Date",s="toString",c=n(i[s]),u=n(i.getTime);String(new Date(NaN))!=a&&o(i,s,(function(){var e=u(this);return e==e?c(this):a}))},8309:(e,t,r)=>{var n=r(9781),o=r(6530).EXISTS,i=r(1702),a=r(7045),s=Function.prototype,c=i(s.toString),u=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,f=i(u.exec);n&&!o&&a(s,"name",{configurable:!0,get:function(){try{return f(u,c(this))[1]}catch(e){return""}}})},9653:(e,t,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(9781),a=r(7854),s=r(857),c=r(1702),u=r(4705),f=r(2597),d=r(9587),l=r(7976),p=r(2190),v=r(7593),y=r(7293),m=r(8006).f,h=r(1236).f,S=r(3070).f,O=r(863),g=r(3111).trim,b="Number",E=a[b],x=s[b],I=E.prototype,R=a.TypeError,T=c("".slice),A=c("".charCodeAt),N=function(e){var t,r,n,o,i,a,s,c,u=v(e,"number");if(p(u))throw R("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=g(u),43===(t=A(u,0))||45===t){if(88===(r=A(u,2))||120===r)return NaN}else if(48===t){switch(A(u,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(a=(i=T(u,2)).length,s=0;s<a;s++)if((c=A(i,s))<48||c>o)return NaN;return parseInt(i,n)}return+u},L=u(b,!E(" 0o1")||!E("0b1")||E("+0x1")),C=function(e){var t,r=arguments.length<1?0:E(function(e){var t=v(e,"number");return"bigint"==typeof t?t:N(t)}(e));return l(I,t=this)&&y((function(){O(t)}))?d(Object(r),this,C):r};C.prototype=I,L&&!o&&(I.constructor=C),n({global:!0,constructor:!0,wrap:!0,forced:L},{Number:C});var D=function(e,t){for(var r,n=i?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(","),o=0;n.length>o;o++)f(t,r=n[o])&&!f(e,r)&&S(e,r,h(t,r))};o&&x&&D(s[b],x),(L||o)&&D(s[b],E)},6977:(e,t,r)=>{"use strict";var n=r(2109),o=r(1702),i=r(9303),a=r(863),s=r(8415),c=r(7293),u=RangeError,f=String,d=Math.floor,l=o(s),p=o("".slice),v=o(1..toFixed),y=function(e,t,r){return 0===t?r:t%2==1?y(e,t-1,r*e):y(e*e,t/2,r)},m=function(e,t,r){for(var n=-1,o=r;++n<6;)o+=t*e[n],e[n]=o%1e7,o=d(o/1e7)},h=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=d(n/t),n=n%t*1e7},S=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=f(e[t]);r=""===r?n:r+l("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:c((function(){return"0.000"!==v(8e-5,3)||"1"!==v(.9,0)||"1.25"!==v(1.255,2)||"1000000000000000128"!==v(0xde0b6b3a7640080,0)}))||!c((function(){v({})}))},{toFixed:function(e){var t,r,n,o,s=a(this),c=i(e),d=[0,0,0,0,0,0],v="",O="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return f(s);if(s<0&&(v="-",s=-s),s>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(s*y(2,69,1))-69)<0?s*y(2,-t,1):s/y(2,t,1),r*=4503599627370496,(t=52-t)>0){for(m(d,0,r),n=c;n>=7;)m(d,1e7,0),n-=7;for(m(d,y(10,n,1),0),n=t-1;n>=23;)h(d,1<<23),n-=23;h(d,1<<n),m(d,1,1),h(d,2),O=S(d)}else m(d,0,r),m(d,1<<-t,0),O=S(d)+l("0",c);return O=c>0?v+((o=O.length)<=c?"0."+l("0",c-o)+O:p(O,0,o-c)+"."+p(O,o-c)):v+O}})},9601:(e,t,r)=>{var n=r(2109),o=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},1539:(e,t,r)=>{var n=r(1694),o=r(8052),i=r(288);n||o(Object.prototype,"toString",i,{unsafe:!0})},1058:(e,t,r)=>{var n=r(2109),o=r(3009);n({global:!0,forced:parseInt!=o},{parseInt:o})},4916:(e,t,r)=>{"use strict";var n=r(2109),o=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},4723:(e,t,r)=>{"use strict";var n=r(6916),o=r(7007),i=r(9670),a=r(8554),s=r(7466),c=r(1340),u=r(4488),f=r(8173),d=r(1530),l=r(7651);o("match",(function(e,t,r){return[function(t){var r=u(this),o=a(t)?void 0:f(t,e);return o?n(o,t,r):new RegExp(t)[e](c(r))},function(e){var n=i(this),o=c(e),a=r(t,n,o);if(a.done)return a.value;if(!n.global)return l(n,o);var u=n.unicode;n.lastIndex=0;for(var f,p=[],v=0;null!==(f=l(n,o));){var y=c(f[0]);p[v]=y,""===y&&(n.lastIndex=d(o,s(n.lastIndex),u)),v++}return 0===v?null:p}]}))},4747:(e,t,r)=>{var n=r(7854),o=r(8324),i=r(8509),a=r(8533),s=r(8880),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in o)o[u]&&c(n[u]&&n[u].prototype);c(i)},6815:(e,t,r)=>{var n=r(2109),o=r(7854),i=r(7152)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},8417:(e,t,r)=>{var n=r(2109),o=r(7854),i=r(7152)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},2564:(e,t,r)=>{r(6815),r(8417)},5299:(e,t,r)=>{"use strict";var n=r(7798);function o(e){return!0===n(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,r;return!1!==o(e)&&("function"==typeof(t=e.constructor)&&(!1!==o(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")))}},7798:e=>{"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},6401:e=>{var t=Object.prototype.toString;function r(e){return"function"==typeof e.constructor?e.constructor.name:null}e.exports=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var n=typeof e;if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return"GeneratorFunction"===r(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){if(e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(r(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(n=t.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return n.slice(8,-1).toLowerCase().replace(/\\s/g,"")}},3341:(e,t,r)=>{"use strict";const n=Symbol.prototype.valueOf,o=r(6401);e.exports=function(e,t){switch(o(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return function(e){const t=e.length,r=Buffer.allocUnsafe?Buffer.allocUnsafe(t):Buffer.from(t);return e.copy(r),r}(e);case"symbol":return function(e){return n?Object(n.call(e)):{}}(e);case"arraybuffer":return function(e){const t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}(e);case"regexp":return function(e){const t=void 0!==e.flags?e.flags:/\\w+$/.exec(e)||void 0,r=new e.constructor(e.source,t);return r.lastIndex=e.lastIndex,r}(e);case"error":return Object.create(e);default:return e}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,n,o,i,a,s,c,u,f,d,l,p,v,y,m,h,S,O,g,b,E,x,I,R,T,A,N,L,C,D,w,j;function M(e){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)}function _(e){var t=function(e,t){if("object"!==M(e)||null===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)}(e,"string");return"symbol"===M(t)?t:String(t)}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)}}!function(e){e.CONTENT="CONTENT",e.PIPE="PIPE",e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.VIDEO_AUDIO="VIDEO_AUDIO",e.VIDEO_AUDIO_PIPE="VIDEO_AUDIO_PIPE"}(e||(e={})),function(e){e.ENDED="ENDED",e.STARTING="STARTING",e.PENDING="PENDING"}(t||(t={})),function(e){e.MUTE_AUDIO="muteAudio",e.UNMUTE_AUDIO="unmuteAudio",e.MUTE_VIDEO="muteVideo",e.UNMUTE_VIDEO="unmuteVideo"}(n||(n={})),function(e){e.NONE="NONE",e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.BOTH="BOTH"}(o||(o={})),function(e){e.AUTO="AUTO",e.CUSTOM="CUSTOM"}(i||(i={})),function(e){e.RECORD_STATE_IDLE="RECORD_STATE_IDLE",e.RECORD_STATE_STARTING="RECORD_STATE_STARTING",e.RECORD_STATE_STARTED="RECORD_STATE_STARTED",e.RECORD_STATE_STOPING="RECORD_STATE_STOPING"}(a||(a={})),function(e){e[e.NONE=0]="NONE",e[e.LOCAL_START=1]="LOCAL_START",e[e.REMOTE_STAR=2]="REMOTE_STAR",e[e.REMOTE_PAUSED=3]="REMOTE_PAUSED"}(s||(s={})),function(e){e.FRONT="FRONT",e.BACK="BACK"}(c||(c={})),function(e){e[e.MuteByUser=0]="MuteByUser",e[e.MuteByBWLimit=1]="MuteByBWLimit",e[e.MuteByNoInput=2]="MuteByNoInput",e[e.MuteByConfMgmt=3]="MuteByConfMgmt",e[e.MuteByDeviceDetection=4]="MuteByDeviceDetection",e[e.MuteByPhoneCall=5]="MuteByPhoneCall"}(u||(u={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(f||(f={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(d||(d={})),function(e){e.NORMAL="NORMAL",e.FAILED="FAILED",e.DISABLED="DISABLED",e.UNKNOWN="UNKNOWN"}(l||(l={})),function(e){e.NORMAL="NORMAL",e.NORMAL_VIDEO="NORMAL_VIDEO",e.NORMAL_AUDIO="NORMAL_AUDIO",e.RECEIVE_ONLY="RECEIVE_ONLY",e.FAILED="FAILED",e.UNKNOWN="UNKNOWN"}(p||(p={})),function(e){e.CONTENT="CONTENT",e.PREVIEW="PREVIEW",e.PIPELINE="PIPELINE",e.REMOTE="REMOTE"}(v||(v={})),function(e){e[e.RS90=90]="RS90",e[e.RS180=180]="RS180",e[e.RS360=360]="RS360",e[e.RS720=720]="RS720",e[e.RS1080=1080]="RS1080"}(y||(y={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(m||(m={})),function(e){e[e.LEVEL90=0]="LEVEL90",e[e.LEVEL180=1]="LEVEL180",e[e.LEVEL360=2]="LEVEL360",e[e.LEVEL720=3]="LEVEL720",e[e.LEVEL1080=4]="LEVEL1080"}(h||(h={})),function(e){e[e.LOW=0]="LOW",e[e.NORMAL=1]="NORMAL",e[e.HIGH=2]="HIGH"}(S||(S={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.ALL="ALL"}(O||(O={})),function(e){e.SDK="SDK",e.CUSTOM="CUSTOM"}(g||(g={})),function(e){e.COMMON="COMMON",e.ADVANCED="ADVANCED",e.FAILED="FAILED"}(b||(b={})),function(e){e.MULTI_RES="MULTI_RESOLUTION",e.SCALE_RES="SCALE_RESOLUTION"}(E||(E={})),function(e){e.VERY_LOW="very-low",e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(x||(x={})),function(e){e.CAPTURE="CAPTURE",e.KEEP="KEEP",e.FAILED="FAILED"}(I||(I={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt",e.UNKNOWN="unknown",e.FAILED="failed"}(R||(R={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE"}(T||(T={})),function(e){e[e.NONE=-1]="NONE",e[e.TEXT=0]="TEXT",e[e.IMAGE=1]="IMAGE"}(A||(A={})),function(e){e[e.Bad=1]="Bad",e[e.Poor=2]="Poor",e[e.Good=3]="Good",e[e.Excellent=4]="Excellent"}(N||(N={})),function(e){e.STATS="STATS",e.INIT="INIT",e.DESTROY="DESTROY",e.STATS_VIDEO_RECEIVER="STATS_VIDEO_RECEIVER",e.STATS_AUDIO_RECEIVER="STATS_AUDIO_RECEIVER",e.STATS_SENDER="STATS_SENDER",e.INTERNALS="INTERNALS",e.REPORT_INTERNALS="REPORT_INTERNALS",e.REPORT_NETWORK_LEVEL="REPORT_NETWORK_LEVEL"}(L||(L={})),function(e){e.INACTIVE="inactive",e.RECVONLY="recvonly",e.SENDONLY="sendonly",e.SENDRECV="sendrecv"}(C||(C={})),function(e){e.LOG="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR"}(D||(D={})),function(e){e.LOGGER="LOGGER",e.INIT="INIT",e.DESTROY="DESTROY",e.DOWNLOAD="DOWNLOAD",e.UPLOAD="UPLOAD"}(w||(w={})),function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARNING="WARNING",e.ERROR="ERROR",e.NONE="NONE"}(j||(j={}));r(9601),r(9554),r(1539),r(4747),r(9653),r(6977),r(8309),r(5212);function k(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(2772),r(4916),r(4723),r(1249),r(1058);var U=function(){var e=navigator.userAgent,t=e.toLocaleLowerCase(),r=navigator.platform.toUpperCase().indexOf("MAC")>=0||/macintosh|mac os x/i.test(e),n=navigator.platform.toUpperCase().indexOf("LINUX")>=0,o=/(?:win)/.test(e),i=/(?:Windows Phone)/.test(e),a=/(?:SymbianOS)/.test(e)||i,s=/(?:Android)/.test(e)||t.indexOf("harmony")>-1,c=/(?:Firefox)/.test(e),u=/(?:Chrome|CriOS)/.test(e)&&!(e.indexOf("Edg")>-1),f=e.indexOf("Edg")>-1,d=e.indexOf("Safari")>-1&&!(e.indexOf("Chrome")>-1),l=/iPad/i.test(e)||e.indexOf("MacIntel")>-1&&navigator.maxTouchPoints>1||e.indexOf("Macintosh")>-1&&navigator.maxTouchPoints>1,p=/(?:iPad|PlayBook)/.test(e)||s&&!/(?:Mobile)/.test(e)||c&&/(?:Tablet)/.test(e),v=/(?:iPhone)/.test(e)&&!p,y=!(v||s||a||l),m=e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1||e.indexOf("baiduboxapp")>-1,h=!!t.match(/firefox/)||e.indexOf("Firefox")>-1,S=!!t.match(/tencenttraveler/)||!!t.match(/qqbrowse/)||e.indexOf("QQ/")>-1||e.indexOf("MicroMessenger")>-1,O=e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,g=e.indexOf("HuaweiBrowser")>-1;return{isTablet:p,isPhone:v,isAndroid:s,isPc:y,isMac:r,isWindows:o,isIPad:l,isChrome:u,isLinux:n,isFirefox:h,isBaidu:m,isQQ:S,isOpera:O,isZhazha:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1||e.indexOf("360SE")>-1||e.indexOf("360EE")>-1||e.indexOf("LBBROWSER")>-1||e.indexOf("UC")>-1||e.indexOf("UBrowser")>-1||e.indexOf("UCWEB")>-1||e.indexOf("Quark")>-1||e.indexOf("MiuiBrowser")>-1||e.indexOf("AliApp(TB")>-1||e.indexOf("Weibo")>-1||e.indexOf("IqiyiApp")>-1||e.indexOf("HuaweiBrowser")>-1||e.indexOf("HUAWEI")>-1||e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1||e.indexOf("SE")>-1||e.indexOf("Maxthon")>-1||e.indexOf("The world")>-1||e.indexOf("MetaSr")>-1||e.indexOf("2345Explorer")>-1||e.indexOf("TencentTraveler")>-1||e.indexOf("Mb2345Browser")>-1,isEdge:f,isSafari:d,isHuaweiBrowser:g}};U().isPc,r(2564),r(3710),r(2222),r(9753),r(9826);var F,B,V,W,G,H,K,Y,z,$={isNumber:function(e){return"number"==typeof e},isObject:function(e){return"[object object]"===Object.prototype.toString.call(e).toLocaleLowerCase()},isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isUndefined:function(e){return void 0===e},isLetter:function(e){return/^[a-zA-Z]+$/.test(e)},isChinese:function(e){return/^[\\u4e00-\\u9fa5]+$/.test(e)},isNumberText:function(e){return/^[0-9]+$/.test(e)},isSpecialChar:function(e){return/^[^\\u4e00-\\u9fa5a-zA-Z0-9]+$/.test(e)},isWhiteSpace:function(e){return/^\\s+$/.test(e)}},X=U(),q=y.RS90,Q=y.RS180,J=y.RS360,Z=y.RS720,ee=y.RS1080,te=b.COMMON,re=b.ADVANCED,ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(X.isFirefox)return{};var n={frameRate:e};if(t===re&&$.isNumber(e)){n=r?{frameRate:{ideal:e,max:e}}:{frameRate:{min:e-5,exact:e,max:e}}}return n},oe=Object.assign({width:640,height:360,resizeMode:"crop-and-scale"},ne(15)),ie=Object.assign({cursor:"always",logicalSurface:!0},oe),ae={channelCount:1,autoGainControl:!0,noiseSuppression:!0,echoCancellation:!0},se=(k(V={},Z,(k(F={},te,{video:Object.assign(Object.assign(Object.assign({},oe),ne(15)),{width:1280,height:720}),audio:!0}),k(F,re,{video:Object.assign(Object.assign(Object.assign({},oe),ne(15,re,!0)),{width:{ideal:1280,max:1280},height:{ideal:720,max:720}}),audio:!0}),F)),k(V,ee,(k(B={},te,{video:Object.assign(Object.assign(Object.assign({},oe),ne(15)),{width:1920,height:1080}),audio:!0}),k(B,re,{video:Object.assign(Object.assign(Object.assign({},oe),ne(15,re,!0)),{width:{ideal:1920,max:1920},height:{ideal:1080,max:1080}}),audio:!0}),B)),k(z={},q,(k(W={},te,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15)),{width:160,height:90}),audio:ae}),k(W,re,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15,re)),{width:{min:160,ideal:160,max:160},height:{min:90,ideal:90,max:90}}),audio:ae}),W)),k(z,Q,(k(G={},te,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15)),{width:320,height:180}),audio:ae}),k(G,re,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15,re)),{width:{min:320,ideal:320,max:320},height:{min:180,ideal:180,max:180}}),audio:ae}),G)),k(z,J,(k(H={},te,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15)),{width:640,height:360}),audio:ae}),k(H,re,{video:Object.assign(Object.assign(Object.assign({},ie),ne(15,re)),{width:{min:640,ideal:640,max:640},height:{min:360,ideal:360,max:360}}),audio:ae}),H)),k(z,Z,(k(K={},te,{video:Object.assign(Object.assign(Object.assign({},ie),ne(30)),{width:1280,height:720}),audio:ae}),k(K,re,{video:Object.assign(Object.assign(Object.assign({},ie),ne(30,re)),{width:{min:1280,ideal:1280,max:1280},height:{min:720,ideal:720,max:720}}),audio:ae}),K)),k(z,ee,(k(Y={},te,{video:Object.assign(Object.assign(Object.assign({},ie),ne(30)),{width:1920,height:1080}),audio:ae}),k(Y,re,{video:Object.assign(Object.assign(Object.assign({},ie),ne(30,re)),{width:{min:1920,ideal:1920,max:1920},height:{min:1080,ideal:1080,max:1080}}),audio:ae}),Y)),"video/H264"),ce="audio/opus",ue=(l.FAILED,l.DISABLED,l.NORMAL),fe=(l.UNKNOWN,v.REMOTE,v.CONTENT,{CLIENT_TYPE:"webrtc",INIT_INTERNALS:{bytesReceived:0,bytesReceivedSecond:0,bytesSent:0,bytesSentSecond:0,jitterSent:0,jitterReceived:0,audioSendJitter:0,roundTripTime:0,fractionLostSent:0,fractionLostReceived:0,mimeType:se,audioMimeType:ce,timestamp:0,receiver:{},sender:{},audioReceiver:{},audioSender:{}},RESOLUTION:1,ROSTER:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""},SELF_MOCK_PID:9999999999,HOR_CONTAINER_RATIO:1.778,VER_CONTAINER_RATIO:.5625,RATIO_MAP:{0:0,1:90,2:180,3:270},MAP_RESOLUTION_INDEX:{90:0,180:1,360:2,720:3,1080:4},RESOLUTION_MAP:{0:90,1:180,2:360,3:720,4:1080},VIDE_BANDWIDTH_BIT:1e3,VIDE_FRAMERATE_BIT:15,LOGIN_INFO:{callUri:"",securityKey:"",access_token:"",refresh_token:"",id:0,displayName:""},LAYOUT:{position:[],resolution:0,rotate:0,quality:0,state:"NORMAL",roster:{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,id:"",extUserId:""}},MAP_RESOLUTION_STRING:{90:{width:160,height:90},180:{width:320,height:180},360:{width:640,height:360},720:{width:1280,height:720},1080:{width:1920,height:1080}},CONF_INFO:{participantCount:0,totalEpCount:0,chairManUrl:"",contentUri:"",actSpkUri:"",mediaGroupInfo:[]},CLOUD_ROOOM_INFO:{meetingControlPassword:"",meetingNumber:"",password:""},CONFERENCE_INFO:{callNumber:"",callUrl:"",deviceId:"",deviceType:"",displayName:"",number:"",numberType:"",confAuxProperties:{watermarkContent:""},avatar:"",inviteInfo:{displayName:"",inEnterprise:!0,inviteAppUrl:"",inviteUrl:"",invokSchema:"",linkNumber:"",mobileWebrtcVisibleSetting:!0,number:"",password:"",pstnNumber:"",shareUrl:"",userAvatar:"",userName:"",userProfileId:"",voiceNumber:"",webrtcSetting:!0,webrtcUrl:""}},MAX_PEOPLE_RESOLUTION:y.RS720}),de=(c.FRONT,c.BACK,r(738)),le=r.n(de),pe=JSON.stringify(fe.INIT_INTERNALS),ve=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onMessage=t,this.config={logInterval:1,reportInterval:2},this.currentLogInterval=1,this.currentReportInterval=1,this.currentInternals=JSON.parse(pe),this.nextInternals=JSON.parse(pe),this.initInternals()}var t,r,n;return t=e,r=[{key:"setConfig",value:function(e){this.config=Object.assign(Object.assign({},this.config),e)}},{key:"initInternals",value:function(){this.nextInternals=JSON.parse(pe),this.bytesReceivedSecond=0,this.bytesSent=0,this.bytesReceived=0,this.bytesSentSecond=0,this.packetsSentSecondSum=0,this.packetsSentLostSecondSum=0,this.packetsReceivedSecondSum=0,this.packetsReceivedLostSecondSum=0,this.audioPacketsReceivedSecondSum=0,this.audioPacketsReceivedLostSecondSum=0,this.videoCodec=se,this.audioCodec=ce}},{key:"statsVideoReceiver",value:function(e){var t=this,r=e.timestamp,n=e.workerVideoReceiver;this.nextInternals.timestamp=r,n.forEach((function(e){var r=e.trackId,n=e.trackSetting,o=e.statsList,i=e.layoutItem;if(o&&r&&i){var a=t.getReceiverStatus(o,i,r),s=a.bytesReceived,c=void 0===s?0:s,u=a.bytesReceivedSecond,f=void 0===u?0:u,d=a.packetsReceivedSecond,l=void 0===d?0:d,p=a.packetsLostSecond,v=void 0===p?0:p,y=a.frameWidth;if(t.bytesReceived+=c||0,t.bytesReceivedSecond+=f||0,t.packetsReceivedSecondSum+=l||0,t.packetsReceivedLostSecondSum+=v||0,!y&&n){var m=n.width,h=void 0===m?0:m,S=n.height,O=void 0===S?0:S;a.frameWidth=h,a.frameHeight=O}t.nextInternals.receiver[r]=a}}))}},{key:"statsAudioReceiver",value:function(e){var t=this;e.forEach((function(e){var r=e.statsList,n=e.trackId,o=e.isContent;if(r&&n){var i=t.getReceiverAudioTrackStatus(r,n),a=i.packetsReceivedSecond,s=void 0===a?0:a,c=i.packetsLostSecond,u=void 0===c?0:c,f=i.bytesReceived,d=void 0===f?0:f,l=i.audioLevel,p=void 0===l?0:l,v=i.bytesReceivedSecond,y=void 0===v?0:v;t.bytesReceived+=d||0,t.bytesReceivedSecond+=y||0,t.audioPacketsReceivedSecondSum+=s,t.audioPacketsReceivedLostSecondSum+=u,(y>0||p>0)&&(i.isContent=o,t.nextInternals.audioReceiver[n]=i)}}))}},{key:"statsSender",value:function(e){var t=this,r=O.AUDIO,n=O.VIDEO,o=0,i=0,a=0,s=0;e.forEach((function(e){var c=e.statsList,u=e.trackId,f=e.streamConfig,d=e.isFirefox;if(c&&f&&u){var l=f.kind,p=l===r?"audioSender":"sender",v=t.getSenderStatus(c,f,u,d),y=v.bytesSent,m=v.bytesSentSecond,h=void 0===m?0:m,S=v.packetsSentSecond,O=void 0===S?0:S,g=v.packetsLostSecond,b=void 0===g?0:g,E=v.jitter,x=void 0===E?0:E,I=v.roundTripTime,R=void 0===I?0:I;t.bytesSent+=y,t.bytesSentSecond+=h,l===n&&(t.packetsSentSecondSum+=O,t.packetsSentLostSecondSum+=b,a=Math.max(a,1e3*x),s=Math.max(s,1e3*R)),l===r&&(o+=O,i+=b,t.nextInternals.audioSendJitter=Math.floor(1e3*x)),t.nextInternals[p][u]=v}})),this.nextInternals.jitterSent=Math.floor(a),this.nextInternals.roundTripTime=Math.floor(s),this.nextInternals.fractionLostSent=this.getLost(this.packetsSentSecondSum,this.packetsSentLostSecondSum),this.nextInternals.audioSendLost=this.getLost(o,i),this.nextInternals.fractionLostReceived=this.getLost(this.packetsReceivedSecondSum,this.packetsReceivedLostSecondSum),this.nextInternals.audioRecvLost=this.getLost(this.audioPacketsReceivedSecondSum,this.audioPacketsReceivedLostSecondSum),this.nextInternals.bytesSent=this.bytesSent||0,this.nextInternals.bytesReceived=this.bytesReceived||0,this.nextInternals.bytesSentSecond=this.bytesSentSecond||0,this.nextInternals.bytesReceivedSecond=this.bytesReceivedSecond||0,this.nextInternals.mimeType=this.videoCodec,this.nextInternals.audioMimeType=this.audioCodec,this.sendInternals()}},{key:"sendInternals",value:function(){var e=L.INTERNALS,t=this.config,r=t.logInterval,n=t.reportInterval;this.currentInternals=le()(this.nextInternals);var o=!1;this.currentLogInterval===r?(this.currentLogInterval=1,o=!0):this.currentLogInterval+=1,this.onMessage({type:e,data:this.currentInternals,config:{printLog:o}}),this.initInternals(),this.currentReportInterval===n?this.currentReportInterval=1:this.currentReportInterval+=1}},{key:"getLost",value:function(e,t){var r=Math.floor(t/(t+e)*100)||0,n=Math.max(r,0)||0;return 0===e?0:n}},{key:"getSenderStatus",value:function(e,t,r,n){var o=this,i=O.AUDIO,a=v.CONTENT,s=t.type,c=t.status,u=t.resolution,f=t.kind===i?"audioSender":"sender",d=this.currentInternals[f][r],l={};return l.isContent=s===a,l.type=s,l.status=c,l.resolution=u,l.expBandwidth=10,e.forEach((function(e){switch(e.type){case"outbound-rtp":var t=e.bytesSent,r=e.framesEncoded,n=e.packetsSent,i=e.keyFramesEncoded,a=void 0===i?"N/A":i,s=e.nackCount,c=e.ssrc,u=e.pliCount,f=void 0===u?0:u,p=e.firCount,v=void 0===p?0:p,y=e.framesSent,m=void 0===y?0:y,h=e.hugeFramesSent,S=void 0===h?0:h,O=e.timestamp,g=e.frameWidth,b=void 0===g?0:g,E=e.frameHeight,x=void 0===E?0:E,I=o.rateBytesCalculator(e,"framesSent","timestamp",1,1e3,d),R=o.rateBytesCalculator(e,"framesEncoded","timestamp",1,1e3,d),T=o.rateBytesCalculator(e,"bytesSent","timestamp",8,1,d),A=o.rateBytesCalculator(e,"packetsSent","timestamp",1,1e3,d);l.hugeFramesSent=S,l.framesSent=m,l.framesSentSecond=I,l.bytesSent=t,l.bytesSentSecond=T||0,l.framesEncoded=r,l.framesEncodedSecond=R,l.timestamp=O,l.packetsSent=n,l.packetsSentSecond=A,l.keyFramesEncoded=a,l.pliCount=f,l.firCount=v,l.nackCount=s,l.ssrc=c,l.frameWidth=b,l.frameHeight=x;break;case"codec":var N=e.mimeType;N!==o.videoCodec&&(o.videoCodec=N,l.mimeType=N);break;case"media-source":var L=e.audioLevel||0;l.audioLevel=Number((100*L).toFixed(0));break;case"remote-inbound-rtp":var C=e.jitter,D=void 0===C?0:C,w=e.packetsLost,j=void 0===w?0:w,M=e.roundTripTime,_=void 0===M?0:M,P=o.rateBytesCalculator(e,"packetsLost","timestamp",1,1e3,d);l.packetsLost=j,l.packetsLostSecond=P,l.jitter=D,l.roundTripTime=_}})),!l.framesSentSecond&&n&&(l.framesSentSecond=30),l}},{key:"getReceiverStatus",value:function(e,t,r){var n=this,o=this.currentInternals.receiver[r],i=t.roster,a=i.endpointId,s=i.participantId,c=i.displayName,u=i.isContent,f=i.ExpectHeight,d=void 0===f?0:f,l=i.ExpectWidth,p=void 0===l?0:l,v={endpointId:a,participantId:s},y=0;return v.ExpectHeight=d,v.ExpectWidth=p,v.isContent=u,v.name=c,v.status="active",v.type="video",v.expResolution=0,e.forEach((function(e){switch(e.type){case"inbound-rtp":var t=e.frameWidth,r=void 0===t?0:t,i=e.frameHeight,a=void 0===i?0:i,s=e.bytesReceived,c=e.framesDecoded,u=e.framesReceived,f=void 0===u?0:u,d=e.packetsReceived,l=e.packetsLost,p=e.keyFramesDecoded,m=void 0===p?"N/A":p,h=e.nackCount,S=e.pliCount,O=e.framesPerSecond,g=e.framesDropped,b=e.ssrc,E=e.timestamp,x=void 0===E?0:E,I=e.jitter,R=e.jitterBufferDelay,T=void 0===R?0:R,A=n.rateBytesCalculator(e,"framesDecoded","timestamp",1,1e3,o),N=n.rateBytesCalculator(e,"bytesReceived","timestamp",8,1,o),L=n.rateBytesCalculator(e,"packetsReceived","timestamp",1,1e3,o),C=n.rateBytesCalculator(e,"packetsLost","timestamp",1,1e3,o),D=n.rateBytesCalculator(e,"framesReceived","timestamp",1,1e3,o);I&&(y=Math.floor(Math.max(y,1e3*I))),v.timestamp=x,v.framesReceived=f,v.framesReceivedSecond=D,v.jitterBufferDelay=T,v.frameWidth=r,v.frameHeight=a,v.bytesReceived=s,v.bytesReceivedSecond=N,v.framesDecoded=c,v.framesDecodedSecond=A,v.packetsReceived=d,v.packetsReceivedSecond=L,v.packetsLost=l,v.packetsLostSecond=C,v.keyFramesDecoded=m,v.nackCount=h,v.pliCount=S,v.framesPerSecond=O,v.framesDropped=g,v.ssrc=b,v.jitter=I;break;case"codec":var w=e.mimeType;w!==n.videoCodec&&(n.videoCodec=w)}})),this.nextInternals.jitterReceived=y,v}},{key:"getReceiverAudioTrackStatus",value:function(e,t){var r=this,n=this.currentInternals.audioReceiver[t],o={type:"audio"};return e.forEach((function(e){switch(e.type){case"inbound-rtp":var t=e.bytesReceived,i=e.packetsReceived,a=e.packetsLost,s=e.ssrc,c=e.jitter,u=e.timestamp,f=e.insertedSamplesForDeceleration,d=void 0===f?0:f,l=e.totalSamplesReceived,p=void 0===l?0:l,v=e.removedSamplesForAcceleration,y=void 0===v?0:v,m=e.jitterBufferDelay,h=void 0===m?0:m,S=e.audioLevel,O=void 0===S?0:S,g=r.rateBytesCalculator(e,"bytesReceived","timestamp",8,1,n),b=r.rateBytesCalculator(e,"insertedSamplesForDeceleration","timestamp",1,1e3,n),E=r.rateBytesCalculator(e,"totalSamplesReceived","timestamp",1,1e3,n),x=r.rateBytesCalculator(e,"removedSamplesForAcceleration","timestamp",1,1e3,n),I=r.rateBytesCalculator(e,"packetsReceived","timestamp",1,1e3,n),R=r.rateBytesCalculator(e,"packetsLost","timestamp",1,1e3,n);o.jitterBufferDelay=h,o.bytesReceived=t,o.bytesReceivedSecond=g>0?g:0,o.packetsLost=a,o.packetsLostSecond=R,o.packetsReceived=i,o.packetsReceivedSecond=I,o.ssrc=s,o.jitter=c,o.insertedSamplesForDeceleration=d,o.insertedSamplesForDecelerationSecond=b,o.totalSamplesReceived=p,o.totalSamplesReceivedSecond=E,o.removedSamplesForAcceleration=y,o.removedSamplesForAccelerationSecond=x,o.timestamp=u,o.status="active",o.expResolution=0,o.audioLevel=r.calcAudioLevel(O);break;case"codec":var T=e.mimeType;T!==r.audioCodec&&(r.audioCodec=T)}})),o}},{key:"calcAudioLevel",value:function(e){if(e<316e-7||!e)return 0;var t=100*e;return t=(t=Number(t>=1?t.toFixed(0):t.toFixed(2)))>100?100:t}},{key:"rateBytesCalculator",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=(arguments.length>5?arguments[5]:void 0)||this.currentInternals,a=Number(i[t])||0,s=Number(e[t])||0,c=Number(i[r]),u=Number(e[r]);if([c,u,a,s].some((function(e){return"number"!=typeof e})))return 0;if(u===c)return 0;var f=n*(s-a),d=(u-c)/o;return Math.max(Math.floor(f/d),0)}}],r&&P(t.prototype,r),n&&P(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const ye=ve;var me,he=self,Se=function(e){he.postMessage(e)};he.onmessage=function(e){var t=L.STATS_VIDEO_RECEIVER,r=L.STATS_AUDIO_RECEIVER,n=L.STATS_SENDER,o=L.INIT,i=e.data,a=i.type,s=i.data,c=i.config;switch(a){case o:me||(me=new ye(Se)).setConfig(c);break;case t:me.statsVideoReceiver(s);break;case r:me.statsAudioReceiver(s);break;case n:me.statsSender(s)}}})()})();',"Worker",void 0,void 0)}function Ln(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jn=function(){function e(t,n){c(this,e);var r=t.logger,i=t.invite;this.client=t,this.peerStatus={peerConnectionStatus:"disconnected",iceConnectionState:"disconnected"},this.invite=i,this.logger=r,this.connectCount=0,this.stream=n,this.streamSenders=[],this.senderMap={},this.senderTimer=null,this.isRestartIceConnection=!1,this.isFirstConnected=!1,this.videoCodecs=[],this.audioCodecs=[],this.qualityWorker=null,this.onHandleNegotiationNeeded=this.onHandleNegotiationNeeded.bind(this),this.onHandleIceConnectionStateChange=this.onHandleIceConnectionStateChange.bind(this),this.onHandleConnectionStateChange=this.onHandleConnectionStateChange.bind(this),this.onHandleIcecandidateerror=this.onHandleIcecandidateerror.bind(this),this.onTrack=this.onTrack.bind(this),this.setSupportCodec(),this.init()}return f(e,[{key:"initQualityWorker",value:function(){this.qualityWorker||(this.qualityWorker=new Nn,this.qualityWorker.onmessage=this.onMeetingStats.bind(this))}},{key:"restart",value:function(){this.restartIceConnection()}},{key:"init",value:function(){this.initTimer(),this.peerConnection=new RTCPeerConnection(rt),this.peerConnection.onnegotiationneeded=this.onHandleNegotiationNeeded,this.peerConnection.oniceconnectionstatechange=this.onHandleIceConnectionStateChange,this.peerConnection.onconnectionstatechange=this.onHandleConnectionStateChange,this.peerConnection.onicecandidateerror=this.onHandleIcecandidateerror,null===this.peerConnection.ontrack?this.peerConnection.ontrack=this.onTrack:this.peerConnection.addEventListener("track",this.onTrack)}},{key:"sendEmmit",value:function(e,t,n,r){this.logger.log("send media status: ",{type:e,code:t,msg:n}),this.isRestartIceConnection&&"XYSDK:950517"!==t||("XYSDK:950518"===t&&this.client.setPeerConnectionStatus(!0),this.client.emmit(e,{code:t,msg:n,detail:r}))}},{key:"stopConnectTimer",value:function(){this.isRestartIceConnection=!1,this.connectTimer&&clearTimeout(this.connectTimer),this.connectTimer=null,this.connectCount=0}},{key:"initTimer",value:function(){var e=this;this.connectTimer=setTimeout((function(){var t=e.peerStatus,n=t.peerConnectionStatus,r=t.iceConnectionState,i=yn()(e.peerStatus);return e.connectCount>40?(e.sendEmmit("call-status","XYSDK:950517","呼叫失败","PEER_NET_DISCONNECT"),e.stopConnectTimer(),void e.logger.log("loop peer status after 40s: ",i)):"connected"!==n&&"unknown"!==n||"connected"!==r&&"completed"!==r?(20===e.connectCount&&(e.sendEmmit("call-status","XYSDK:950519","正在呼叫中,请等候","waiting"),e.logger.log("loop peer status after 20s: ",i)),e.connectCount+=.5,void e.initTimer()):(e.isFirstConnected=!0,e.sendEmmit("call-status","XYSDK:950518","入会成功","success"),e.stopConnectTimer(),void e.logger.log("loop peer status: ",i))}),250)}},{key:"onHandleNegotiationNeeded",value:function(){return Pn(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createBaseOfferConnection();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"createBaseOfferConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pn(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.peerConnection){t.next=14;break}return t.next=4,this.peerConnection.createOffer(e);case 4:return r=t.sent,i=null==(i=r.sdp||"")?void 0:i.replace("useinbandfec=1","useinbandfec=0"),r.sdp=i,t.next=10,this.peerConnection.setLocalDescription(r);case 10:this.logger.log("send offer"),this.sendSocketMessage("offer",{sdp:r.sdp}),this.client.sendPeopleCapability(),this.client.sendContentCapability();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),this.logger.error("create offer error: ",t.t0);case 19:case"end":return t.stop()}}),n,this,[[0,16]])})))}},{key:"sendSocketMessage",value:function(e,t){var n=this.invite,r=n.meetingId,i=n.callerUri,o=n.callIndex;this.client.sendSocketMessage({type:"PASS_THROUGH",callIndex:o,body:Object.assign({type:e,meetingId:r,endpointId:i},t)})}},{key:"handleCandidate",value:function(e){var n;return Pn(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("handle candidate: ",e),delete e.type,t.prev=2,t.next=5,null===(n=this.peerConnection)||void 0===n?void 0:n.addIceCandidate(new RTCIceCandidate(e));case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(2),this.logger.error("peer add ice candidate error: ",t.t0);case 10:case"end":return t.stop()}}),r,this,[[2,7]])})))}},{key:"handleAnswer",value:function(e){var n;return Pn(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.logger.log("set remote answer description"),t.next=4,null===(n=this.peerConnection)||void 0===n?void 0:n.setRemoteDescription(new RTCSessionDescription(e));case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),this.logger.log("handle answer error:",{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,code:null===t.t0||void 0===t.t0?void 0:t.t0.code,message:null===t.t0||void 0===t.t0?void 0:t.t0.message});case 9:case"end":return t.stop()}}),r,this,[[0,6]])})))}},{key:"setParameters",value:function(e){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bandwidth:ot.VIDE_BANDWIDTH_BIT,frameRate:ot.VIDE_FRAMERATE_BIT},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3?arguments[3]:void 0;return Pn(this,void 0,void 0,t().mark((function c(){var u,l,h,f,d,p,v=this;return t().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:u=Object.keys(this.senderMap),l=i.bandwidth,h=i.frameRate,f=Ln(u.entries()),c.prev=3,p=t().mark((function i(){var c,u,f,p,g,m,y,b;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=s(d.value,2),c[0],u=c[1],f=v.senderMap[u].sender,p=null===(n=null==f?void 0:f.track)||void 0===n?void 0:n.id,"video"!==(null===(r=null==f?void 0:f.track)||void 0===r?void 0:r.kind)||e!==p){t.next=20;break}return g=null,t.prev=6,m={encodings:[{maxBitrate:ot.VIDE_BANDWIDTH_BIT}]},g=f.getParameters()||m,y=o?1e3*l:l,b=(null==g?void 0:g.encodings)||[],g.encodings=b.map((function(e){return e?Object.assign(Object.assign({},e),{maxBitrate:y,maxFramerate:h}):{maxBitrate:y}})),t.next=14,f.setParameters(g);case 14:v.logger.log("sender set parameters successfully",{params:g,realBandwidth:y,trackId:p,streamId:null==a?void 0:a.id}),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(6),v.logger.error("sender set parameters failed",g,t.t0);case 20:case"end":return t.stop()}}),i,null,[[6,17]])})),f.s();case 6:if((d=f.n()).done){c.next=10;break}return c.delegateYield(p(),"t0",8);case 8:c.next=6;break;case 10:c.next=15;break;case 12:c.prev=12,c.t1=c.catch(3),f.e(c.t1);case 15:return c.prev=15,f.f(),c.finish(15);case 18:case"end":return c.stop()}}),c,this,[[3,12,15,18]])})))}},{key:"onHandleIceConnectionStateChange",value:function(e){var n,r;return Pn(this,void 0,void 0,t().mark((function i(){var o,a,s,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=this.peerStatus.peerConnectionStatus,a=this.peerConnection||{connectionState:"unknown"},s=a.connectionState,c=void 0===s?"unknown":s,this.logger.log("the peerConnection connectionState when ice change: ",null===(n=this.peerConnection)||void 0===n?void 0:n.connectionState),this.peerStatus={iceConnectionState:null===(r=null==e?void 0:e.target)||void 0===r?void 0:r.iceConnectionState,peerConnectionStatus:"connected"===o?o:c},In&&("unknown"!==this.peerStatus.peerConnectionStatus||"disconnected"!==this.peerStatus.iceConnectionState&&"failed"!==this.peerStatus.iceConnectionState&&"closed"!==this.peerStatus.iceConnectionState||(this.logger.log("[Firefox] ice state: ",this.peerStatus.iceConnectionState),this.client.shareContentStatus===b.STARTING&&this.client.sendContentCapability(),this.restart())),this.logger.log("ice change status: ",yn()(this.peerStatus));case 6:case"end":return t.stop()}}),i,this)})))}},{key:"onHandleConnectionStateChange",value:function(){var e;return Pn(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(null===(e=this.peerConnection)||void 0===e?void 0:e.connectionState)||"",this.logger.log("peerConnection status change: ",{currentStatus:r,previousStatus:this.peerStatus.peerConnectionStatus}),"connected"===this.peerStatus.peerConnectionStatus&&"connected"!==r&&"connecting"!==r?(this.client.shareContentStatus===b.STARTING&&this.client.sendContentCapability(),this.peerStatus=Object.assign(Object.assign({},this.peerStatus),{peerConnectionStatus:r}),this.logger.log("this.peerStatus before restart: ",this.peerStatus),this.restart()):(this.peerStatus=Object.assign(Object.assign({},this.peerStatus),{peerConnectionStatus:r}),this.logger.log("this.peerStatus: ",this.peerStatus));case 3:case"end":return t.stop()}}),n,this)})))}},{key:"onHandleIcecandidateerror",value:function(e){this.logger.log("ice candidate error:",e)}},{key:"restartIceConnection",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Pn(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("restart ice connection:",{isRestartIceConnection:this.isRestartIceConnection,isFirstConnected:this.isFirstConnected}),this.isRestartIceConnection=e&&this.isFirstConnected,this.initTimer(),t.next=5,this.createBaseOfferConnection({iceRestart:!0});case 5:case"end":return t.stop()}}),n,this)})))}},{key:"close",value:function(){var e,t;if(this.stopConnectTimer(),this.peerConnection){for(var n in this.senderMap){var r=this.senderMap[n];(null==r?void 0:r.sender)&&(null===(e=this.peerConnection)||void 0===e||e.removeTrack(r.sender))}this.peerConnection.onicecandidate=null,this.peerConnection.removeEventListener&&this.peerConnection.removeEventListener("track",this.onTrack),this.peerConnection.ontrack=null,this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicegatheringstatechange=null,this.peerConnection.onnegotiationneeded=null,this.peerConnection&&this.peerConnection.close&&this.peerConnection.close(),this.peerConnection=null}null===(t=this.qualityWorker)||void 0===t||t.terminate(),this.qualityWorker=null,this.senderTimer&&clearInterval(this.senderTimer),this.senderTimer=null,this.isFirstConnected=!1,this.isRestartIceConnection=!1}},{key:"setRestartIceConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isRestartIceConnection=e}},{key:"publish",value:function(e,t){this.logger.log("peer publish: ",t);var n=e.getMediaStreams(),r=n.streams,i=n.pipelineStreams,o=n.contentStreams,a=y.CONTENT,s=y.PIPE,c=y.VIDEO,u=y.AUDIO,l=y.VIDEO_AUDIO,h=y.VIDEO_AUDIO_PIPE,f=P.VIDEO,d=P.AUDIO,p=R.REMOTE,v=R.PIPELINE,g=R.CONTENT,m=_.NORMAL;if(t===c||t===l||t===h){var b=r.filter((function(e){var t=e.type,n=e.kind,r=e.status;return n===f&&t===p&&r===m}));this.streamConfigProcessor(b,W.SENDONLY)}if(t===u||t===l||t===h){var S=r.filter((function(e){var t=e.type,n=e.kind,r=e.status;return n===d&&t===p&&r===m}));this.streamConfigProcessor(S,W.SENDONLY)}if(t===s||t===h){var w=i.filter((function(e){var t=e.type,n=e.status;return t===v&&n===m}));this.streamConfigProcessor(w,W.RECVONLY)}if(t===a){var E=o.filter((function(e){var t=e.type,n=e.status;return t===g&&n===m}));this.streamConfigProcessor(E,W.SENDONLY)}this.initSenderStatus()}},{key:"initSenderStatus",value:function(){var e=this;this.senderTimer||(this.qualityProcess(!0),this.senderTimer=setInterval((function(){e.qualityProcess()}),2e3))}},{key:"qualityProcess",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Pn(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=z.INIT,n&&(this.initQualityWorker(),null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:i,config:{logInterval:5,reportInterval:2},data:{}})),t.next=4,this.sendVideoReceiverStats();case 4:return t.next=6,this.sendAudioReceiverStats();case 6:return t.next=8,this.sendSenderStats();case 8:case"end":return t.stop()}}),r,this)})))}},{key:"closeContentStream",value:function(){var e=this,t=Object.keys(this.senderMap),n=R.CONTENT,r=_.DISABLED;t.forEach((function(t){var i=e.senderMap[t],o=i.config,a=i.sender,s=o.type,c=o.status;s===n&&c!==r&&(a.replaceTrack(null),i.config.status=_.UNKNOWN)}))}},{key:"getPeerStatus",value:function(){var e=this.peerStatus.peerConnectionStatus;return this.logger.log("get peer status: ",this.peerStatus),"connected"===e}},{key:"onMeetingStats",value:function(e){var t=e.data,n=t.data,r=t.type,i=t.config,o=z.INTERNALS;z.REPORT_INTERNALS,z.REPORT_NETWORK_LEVEL;if(r===o){var a=n,s=i.printLog;this.client.debug&&this.client.sendInternals(a),this.client.reportQualityData(a),s&&this.logger.log("meeting-stats",a)}}},{key:"sendSenderStats",value:function(){var e;return Pn(this,void 0,void 0,t().mark((function n(){var r,i,o,a,c,u,l,h=this;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=z.STATS_SENDER,i=_.NORMAL,o=Object.keys(this.senderMap),a=[],n.prev=4,c=Ln(o.entries()),n.prev=6,l=t().mark((function e(){var n,r,o,c,l,f,d,p,v;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s(u.value,2),r=n[1],o={},c=h.senderMap[r],l=c.track,f=c.config,d=c.sender,!l||f.status!==i){e.next=15;break}return e.next=7,d.getStats();case 7:p=e.sent,v=[],p.forEach((function(e){v.push(e)})),o.statsList=v,o.trackId=l.id,o.streamConfig=Object.assign(Object.assign({},f),{stream:null}),o.isFirefox=In,a.push(o);case 15:case"end":return e.stop()}}),e)})),c.s();case 9:if((u=c.n()).done){n.next=13;break}return n.delegateYield(l(),"t0",11);case 11:n.next=9;break;case 13:n.next=18;break;case 15:n.prev=15,n.t1=n.catch(6),c.e(n.t1);case 18:return n.prev=18,c.f(),n.finish(18);case 21:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:a}),n.next=27;break;case 24:n.prev=24,n.t2=n.catch(4),this.logger.error("sendSenderStats error",n.t2);case 27:case"end":return n.stop()}}),n,this,[[4,24],[6,15,18,21]])})))}},{key:"sendAudioReceiverStats",value:function(){var e;return Pn(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u=this;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=z.STATS_AUDIO_RECEIVER,i=this.client.getAudioTrackList(),o=i.length,a=[],n.prev=4,s=t().mark((function e(){var n,r,s,l,h;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i[c],r=n.rest.track,s={},!r||"live"!==r.readyState){e.next=14;break}return e.next=6,u.peerConnection.getStats(r);case 6:l=e.sent,h=[],l.forEach((function(e){h.push(e)})),s.statsList=h,s.trackId=r.id,s.trackId=r.id,s.isContent=o===c+1,a.push(s);case 14:case"end":return e.stop()}}),e)})),c=0;case 7:if(!(c<i.length)){n.next=12;break}return n.delegateYield(s(),"t0",9);case 9:c++,n.next=7;break;case 12:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:a}),n.next=18;break;case 15:n.prev=15,n.t1=n.catch(4),this.logger.error("sendAudioReceiverStats error",n.t1);case 18:case"end":return n.stop()}}),n,this,[[4,15]])})))}},{key:"sendVideoReceiverStats",value:function(){var e;return Pn(this,void 0,void 0,t().mark((function n(){var r,i,o,a,c,u,l,h,f=this;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=z.STATS_VIDEO_RECEIVER,i=this.client.invite.callerUri,o=this.client.getLayoutMap(),a=(new Date).valueOf(),c=[],n.prev=5,u=Ln(o.entries()),n.prev=7,h=t().mark((function e(){var n,r,o,a,u,h,d,p,v,g,m,y,b;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s(l.value,2),r=n[1],o={},a=r.roster,u=a.endpointId,h=a.videoTxMute,d=a.id,u===i||h){e.next=21;break}if(!(p=f.client.getVideoManagers())||!p[d]){e.next=21;break}if(v=p[d],!(g=null==v?void 0:v.getVideoTracks())||!g[0]){e.next=21;break}return m=g[0],e.next=13,f.peerConnection.getStats(m);case 13:y=e.sent,b=[],y.forEach((function(e){b.push(e)})),o.layoutItem=r,o.statsList=b,o.trackSetting=m.getSettings(),o.trackId=m.id,c.push(o);case 21:case"end":return e.stop()}}),e)})),u.s();case 10:if((l=u.n()).done){n.next=14;break}return n.delegateYield(h(),"t0",12);case 12:n.next=10;break;case 14:n.next=19;break;case 16:n.prev=16,n.t1=n.catch(7),u.e(n.t1);case 19:return n.prev=19,u.f(),n.finish(19);case 22:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:{timestamp:a,workerVideoReceiver:c}}),n.next=28;break;case 25:n.prev=25,n.t2=n.catch(5),this.logger.error("sendAudioReceiverStats error",n.t2);case 28:case"end":return n.stop()}}),n,this,[[5,25],[7,16,19,22]])})))}},{key:"streamConfigProcessor",value:function(e,t){var n=this;this.logger.log("streamConfigProcessor: ",{streamConfigList:e,direction:t});var r=P.VIDEO,i=P.AUDIO,o=R.REMOTE,a=R.PIPELINE,s=R.CONTENT;e.forEach((function(e){var c=e.pipeStream,u=e.stream,l=e.type,h=e.kind,f=e.id,d=[];l!==o&&l!==s||(h===r?d=(null==u?void 0:u.getVideoTracks())||[]:h===i&&(d=(null==u?void 0:u.getAudioTracks())||[]),d.forEach((function(r){var i=f+h;!!n.senderMap[i]?(n.senderMap[i].config=e,n.replaceTrackProcessor(r,e)):n.addTrackProcessor(r,e,t)}))),l===a&&c.forEach((function(r){n.addTrackProcessor(r,e,t)}))})),this.logger.log("transceiver senders: ",this.senderMap)}},{key:"addTrackProcessor",value:function(e,t,n){var r=this.addTransceiver(e,n,t);this.setCodecPreferences(e,r),this.setSenderMap(e,t,r)}},{key:"setCodecPreferences",value:function(e,t){try{var n=e.kind;n===A.VIDEO&&this.videoCodecs.length?t.setCodecPreferences(this.videoCodecs):n===A.AUDIO&&this.audioCodecs.length&&t.setCodecPreferences(this.audioCodecs)}catch(e){}}},{key:"setSupportCodec",value:function(){return Pn(this,void 0,void 0,t().mark((function e(){var n,r,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n=RTCRtpSender.getCapabilities("video"),r=RTCRtpSender.getCapabilities("audio"),i=["video/rtx","video/h264"],(null==n?void 0:n.codecs.length)&&(this.videoCodecs=null==n?void 0:n.codecs.filter((function(e){var t=e.mimeType.toLowerCase();return i.includes(t)}))),(null==r?void 0:r.codecs.length)&&(this.audioCodecs=null==r?void 0:r.codecs.filter((function(e){return"audio/opus"===e.mimeType.toLowerCase()}))),this.logger.log("supported audioCodecs: ",this.audioCodecs),this.logger.log("supported videoCodecs: ",this.videoCodecs)}catch(e){}case 1:case"end":return e.stop()}}),e,this)})))}},{key:"replaceTrackProcessor",value:function(e,t){var n,r=t.id,i=t.stream,o=r+t.kind,a=this.senderMap[o],s=a.track,c=a.config;this.logger.log("replaceTrackProcessor: ",{track:e,streamConfig:t}),e.kind===(null==s?void 0:s.kind)&&(null==i?void 0:i.id)===(null===(n=null==c?void 0:c.stream)||void 0===n?void 0:n.id)?(a.sender.replaceTrack(e),a.track=e,this.logger.log("succeeded replace track")):this.logger.error("replaceTrackProcessor error, not match sender stream...")}},{key:"addTransceiver",value:function(e,t,n){var r,i={direction:t},o={},a=n.simulcastMode,s=n.resolution,c=n.priorityMode,u=e.kind,l=u;if(n.stream){if(i.streams=[n.stream],l=e,a===U.SCALE_RES&&"video"===u){var h=e.getSettings().height||0,f=1;h-s>0&&(f=+(h/s).toFixed(2),f=Math.max(f,1)),o.scaleResolutionDownBy=f,this.logger.log("set scale value: ",{scaleValue:f,trackHeight:h,resolution:s})}c&&(o.priority=c),i.sendEncodings=[o]}return this.logger.log("transceiver options: ",i),null===(r=this.peerConnection)||void 0===r?void 0:r.addTransceiver(l,i)}},{key:"setSenderMap",value:function(e,n,r){return Pn(this,void 0,void 0,t().mark((function i(){var o,a,s,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n.status,a=n.type,s=n.id,c=n.kind,u=$e.includes(o),l=s+c,Ze.includes(a)&&(this.senderMap[l]={config:n,track:u?e:null,sender:r.sender});case 4:case"end":return t.stop()}}),i,this)})))}},{key:"onTrack",value:function(e){this.client.emmit("track",e)}}]),e}(),Bn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Un=function(){function e(t){c(this,e),this.logger=t,this.loginInfo=ot.LOGIN_INFO}return f(e,[{key:"getLoginInfo",value:function(){return this.loginInfo||{}}},{key:"setLoginInfo",value:function(e){this.logger.log("[iauth] set login info:",e),this.loginInfo=e}},{key:"loginExternalAccount",value:function(e){return Bn(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f,d;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[iauth] loginExternalAccount:",e),r=e.displayName,i=e.extId,o=e.extUserId,a=/^[0-9a-zA-Z_-]{1,50}$/,r||i){t.next=5;break}return t.abrupt("return",ie("XYSDK:950101",e));case 5:if(!o){t.next=10;break}if(a.test(o)){t.next=10;break}return s="extUserId can only contain numbers, letters, _ and -, and the length cannot be greater than 50",this.logger.log("loginExternalAccount params error:",s),t.abrupt("return",ie("XYSDK:950101",e,s));case 10:return t.prev=10,t.next=13,zt.getSdkUserInfo(e);case 13:if(c=t.sent,u=c.status,l=c.data,{userName:"",password:""},200!==u){t.next=25;break}return f=l.userName,d=l.password,h={userName:f,password:d},t.next=22,this.login(h,e);case 22:return t.abrupt("return",t.sent);case 25:return t.abrupt("return",ie("XYSDK:950103",{status:u,data:l}));case 26:t.next=31;break;case 28:return t.prev=28,t.t0=t.catch(10),t.abrupt("return",ie("XYSDK:950103",t.t0));case 31:case"end":return t.stop()}}),n,this,[[10,28]])})))}},{key:"login",value:function(e,n){return Bn(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,S,w;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(i=n||{}).extId,a=i.extUserId,s=e.userName,c=e.password,this.logger.log("[iauth] login:",Object.assign(Object.assign({},e),n)),t.prev=3,this.logger.log("[iauth] encryptLogin"),t.next=7,zt.encryptLogin({userName:s,password:c,extId:o});case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0={};case 10:if(404!==(null==(u=t.t0)?void 0:u.status)&&10002e3!==(null==u?void 0:u.errorCode)){t.next=16;break}return this.logger.log("[iauth] unEncrypted login"),t.next=15,zt.login({userName:s,password:c,extId:o});case 15:u=t.sent;case 16:if(200!==(null==u?void 0:u.status)){t.next=23;break}return l=u.data,h=l.securityKey,f=l.callUri,d=l.token,p=d.access_token,v=d.refresh_token,g=l.userProfile,m=g.displayName,y=g.id,b=g.enterpriseId,this.loginInfo={securityKey:h,callUri:f,refresh_token:v,access_token:p,id:y,displayName:m,extUserId:a,enterpriseId:b},this.logger.log("[iauth] login data:",this.loginInfo),t.abrupt("return",ie("XYSDK:950120",{access_token:p}));case 23:return this.logger.error("[iauth]login error: ",u),S=(u||{}).data,w=Z[S.errorCode]||Z[0],t.abrupt("return",ie(w,S));case 27:t.next=33;break;case 29:return t.prev=29,t.t1=t.catch(3),this.logger.error("[iauth]catch login error:: ",t.t1),t.abrupt("return",ie("XYSDK:950102",t.t1));case 33:case"end":return t.stop()}}),r,this,[[3,29]])})))}},{key:"loginWithAuthCode",value:function(e){return Bn(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,S,w,E,x,C;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.logger.log("[invoke] loginWithAuthCode: ",e),r=e.extId,i=e.extUserId,o=e.oauthCode,a=e.channelId,s=/^[0-9a-zA-Z_-]{1,50}$/,c={extId:r,extUserId:i,oauthCode:o,channelId:a},u=0,l=Object.keys(c);case 5:if(!(u<l.length)){t.next=12;break}if(h=l[u],c[h]){t.next=9;break}return t.abrupt("return",ie("XYSDK:950101",h));case 9:u++,t.next=5;break;case 12:if(!i||s.test(i)){t.next=16;break}return f="extUserId can only contain numbers, letters, _ and -, and the length cannot be greater than 50",this.logger.log("loginExternalAccount params error:",f),t.abrupt("return",ie("XYSDK:950101",e,f));case 16:return t.prev=16,t.next=19,zt.loginWithAuthCode(e);case 19:if(200!==(null==(d=t.sent)?void 0:d.status)){t.next=27;break}return p=d.data,v=p.securityKey,g=p.callUri,m=p.token,y=m.access_token,b=m.refresh_token,S=p.userProfile,w=S.displayName,E=S.id,this.loginInfo={securityKey:v,callUri:g,refresh_token:b,access_token:y,id:E,displayName:w,extUserId:i},this.logger.log("[iauth] login data:",this.loginInfo),t.abrupt("return",ie("XYSDK:950120",{access_token:y}));case 27:return this.logger.error("[iauth]login error: ",d),x=(d||{}).data,C=Z[x.errorCode]||Z[0],t.abrupt("return",ie(C,x));case 31:t.next=37;break;case 33:return t.prev=33,t.t0=t.catch(16),this.logger.error("[iauth]catch login error:: ",t.t0),t.abrupt("return",ie("XYSDK:950102",t.t0));case 37:case"end":return t.stop()}}),n,this,[[16,33]])})))}}]),e}(),Gn="function"==typeof atob,Kn="function"==typeof btoa,Hn="function"==typeof Buffer,Fn="function"==typeof TextDecoder?new TextDecoder:void 0,Vn="function"==typeof TextEncoder?new TextEncoder:void 0,Yn=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),zn=(e=>{let t={};return e.forEach(((e,n)=>t[e]=n)),t})(Yn),Wn=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Xn=String.fromCharCode.bind(String),qn="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),$n=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),Zn=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Jn=e=>{let t,n,r,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,o+=Yn[t>>18&63]+Yn[t>>12&63]+Yn[t>>6&63]+Yn[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},Qn=Kn?e=>btoa(e):Hn?e=>Buffer.from(e,"binary").toString("base64"):Jn,er=Hn?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(Xn.apply(null,e.subarray(n,n+4096)));return Qn(t.join(""))},tr=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Xn(192|t>>>6)+Xn(128|63&t):Xn(224|t>>>12&15)+Xn(128|t>>>6&63)+Xn(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Xn(240|t>>>18&7)+Xn(128|t>>>12&63)+Xn(128|t>>>6&63)+Xn(128|63&t)},nr=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rr=e=>e.replace(nr,tr),ir=Hn?e=>Buffer.from(e,"utf8").toString("base64"):Vn?e=>er(Vn.encode(e)):e=>Qn(rr(e)),or=(e,t=!1)=>t?$n(ir(e)):ir(e),ar=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,sr=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Xn(55296+(t>>>10))+Xn(56320+(1023&t));case 3:return Xn((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Xn((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},cr=e=>e.replace(ar,sr),ur=e=>{if(e=e.replace(/\s+/g,""),!Wn.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,i="";for(let o=0;o<e.length;)t=zn[e.charAt(o++)]<<18|zn[e.charAt(o++)]<<12|(n=zn[e.charAt(o++)])<<6|(r=zn[e.charAt(o++)]),i+=64===n?Xn(t>>16&255):64===r?Xn(t>>16&255,t>>8&255):Xn(t>>16&255,t>>8&255,255&t);return i},lr=Gn?e=>atob(Zn(e)):Hn?e=>Buffer.from(e,"base64").toString("binary"):ur,hr=Hn?e=>qn(Buffer.from(e,"base64")):e=>qn(lr(e).split("").map((e=>e.charCodeAt(0)))),fr=Hn?e=>Buffer.from(e,"base64").toString("utf8"):Fn?e=>Fn.decode(hr(e)):e=>cr(lr(e)),dr=e=>Zn(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),pr=e=>fr(dr(e)),vr=or,gr=pr;n(561),n(3210);var mr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const yr=function(){function e(t,n){c(this,e),t&&(this.logger=t),this.key="",this.wrapEleId="",this.videoEle=null,this.stream=null,this.streamId="",this.state="",this.isContent=!!n,this.streamTimmerCountDown=500,this.loadStatus="LOAD_START",this.streamStatus="ENABLED",this.streamStatusTimmer=null,this.cb=function(){},this.onCanPlay=this.onCanPlay.bind(this),this.onUnmute=this.onUnmute.bind(this),this.onMute=this.onMute.bind(this),this.onEnded=this.onEnded.bind(this),this.onWaiting=this.onWaiting.bind(this)}return f(e,[{key:"initVideoStreamById",value:function(e,t){var n,r=(null==t?void 0:t.id)||"";this.logger.log("[vm]initVideoStreamById",{key:e,streamId:r}),this.key=e,r!==this.streamId&&(this.logger.log("previous streamId: ",this.streamId),this.stream&&this.removeStreamTrackEventListener(),t&&this.initStreamTrackEventListener(t),this.stream=t),this.logger.log("set next streamId: ",{streamId:(null===(n=this.stream)||void 0===n?void 0:n.id)||""}),this.setSrcObject(r),this.streamId=r}},{key:"getVideoTracks",value:function(){return this.stream?this.stream.getVideoTracks():[]}},{key:"updateLocalTrack",value:function(){this.removeStreamTrackEventListener(),this.initStreamTrackEventListener(this.stream),this.sendVideoStatus()}},{key:"initVideoSource",value:function(e){var t=document.getElementById(e);if(t){var n=t.querySelector("video");if(n)n.autoplay=!0,n.playsInline=!0,n.controls=!1,n.defaultMuted=!0,n.muted=!0;else{var r=document.createElement("video");r.autoplay=!0,r.playsInline=!0,r.controls=!1,r.defaultMuted=!0,r.muted=!0,t.appendChild(r),n=r}this.wrapEleId!==e||n!==this.videoEle?(this.videoEle&&this.videoEle!==n&&this.removeEventListener(this.videoEle),this.wrapEleId=e,this.videoEle=n,this.initEventListener(this.videoEle),this.logger.log("[VM]init video source: ",{key:this.key,wrapEleId:this.wrapEleId}),this.setSrcObject()):this.logger.log("[vm]update video ele",e)}else this.logger.log("Not found wrap video ele:",this.wrapEleId)}},{key:"setSrcObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return mr(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.stream){t.next=3;break}return this.logger.warn("[VM]setSrcObject: stream not exist",{streamId:e}),t.abrupt("return");case 3:if(!this.videoEle||this.isHaveSrcObject()&&this.streamId===e){t.next=15;break}if(this.videoEle.srcObject=this.stream,!this.videoEle.paused){t.next=14;break}return t.prev=6,t.next=9,this.videoEle.play();case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),"NotAllowedError"===(null===t.t0||void 0===t.t0?void 0:t.t0.name)&&(this.emmit(this.key,{status:"VIDEO_PLAY_FAILED",id:this.key,error:t.t0}),this.logger.warn("[VM] video play error: ",t.t0));case 14:this.logger.log("[VM]set video srcObject: ",{key:this.key,streamId:this.streamId});case 15:case"end":return t.stop()}}),n,this,[[6,11]])})))}},{key:"initEventListener",value:function(e){e.addEventListener("canplay",this.onCanPlay),e.addEventListener("waiting",this.onWaiting)}},{key:"removeEventListener",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.videoEle;null==e||e.removeEventListener("canplay",this.onCanPlay),null==e||e.removeEventListener("waiting",this.onWaiting)}},{key:"initStreamTrackEventListener",value:function(e){var t=null==e?void 0:e.getVideoTracks()[0];null==t||t.addEventListener("mute",this.onMute),null==t||t.addEventListener("unmute",this.onUnmute),null==t||t.addEventListener("ended",this.onEnded)}},{key:"removeStreamTrackEventListener",value:function(){var e;this.streamStatus="ENABLED";var t=null===(e=this.stream)||void 0===e?void 0:e.getVideoTracks()[0];null==t||t.removeEventListener("mute",this.onMute),null==t||t.removeEventListener("unmute",this.onUnmute),null==t||t.removeEventListener("ended",this.onEnded)}},{key:"isHaveSrcObject",value:function(){return this.videoEle&&this.videoEle.srcObject}},{key:"setSource",value:function(e,t){this.logger.log("[vm]set source",{key:e,wrapEleId:t}),this.key=e,this.initVideoSource(t)}},{key:"destroy",value:function(){this.clearTrackStatusTimmer(),this.removeEventListener(this.videoEle),this.stream&&this.removeStreamTrackEventListener(),this.videoEle&&(this.videoEle.srcObject=null),this.key="",this.wrapEleId="",this.videoEle=null,this.stream=null,this.streamId="",this.state=""}},{key:"setVideoStatusChange",value:function(e){this.cb=e}},{key:"onEnded",value:function(){this.streamStatus="ENDED",this.sendVideoStatus()}},{key:"onMute",value:function(){var e=this;this.streamStatus="MUTE",this.clearTrackStatusTimmer(),this.streamStatusTimmer=setTimeout((function(){"MUTE"===e.streamStatus&&e.sendVideoStatus()}),this.streamTimmerCountDown)}},{key:"onUnmute",value:function(){this.clearTrackStatusTimmer(),this.streamStatus="ENABLED",this.sendVideoStatus()}},{key:"onWaiting",value:function(){this.logger.log("video waiting",this.key),this.loadStatus="LOAD_START",this.sendVideoStatus()}},{key:"onCanPlay",value:function(){this.logger.log("video canplay",this.key),this.loadStatus="CANPLAY",this.sendVideoStatus()}},{key:"clearTrackStatusTimmer",value:function(){this.streamStatusTimmer&&(clearTimeout(this.streamStatusTimmer),this.streamStatusTimmer=null)}},{key:"sendVideoStatus",value:function(){"CANPLAY"===this.loadStatus&&"ENABLED"===this.streamStatus?("CANPLAY"!==this.state&&(this.streamTimmerCountDown=1e4),this.state="CANPLAY",this.emmit(this.key,{status:"CANPLAY",id:this.key})):"ENDED"===this.streamStatus?(this.state="ENDED",this.emmit(this.key,{status:"ENDED",id:this.key})):"LOAD_START"!==this.loadStatus&&"MUTE"!==this.streamStatus||this.isContent&&"CANPLAY"===this.loadStatus||(this.state="REQUEST",this.emmit(this.key,{status:"REQUEST",id:this.key}))}},{key:"emmit",value:function(e,t){this.cb&&this.cb(e,t)}}]),e}();n(4678);var br,Sr,wr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Er=function(e,t,n){var r=e.roster,i=r.videoRxMute,o=r.videoTxMute,a=r.deviceType,s=r.isContent,c=r.isLocal;return s?o?"AUDIO_CONTENT":t&&"REQUEST"!==n&&n?"NORMAL":"REQUEST":i&&o?"AUDIO_ONLY":o||"ENDED"===n?"MUTE":"tel"===a||"pstngw"===a?"AUDIO_TEL":t&&"REQUEST"!==n||c?"NORMAL":"REQUEST"},xr=function(e,t,n,r,i){var o=parseFloat((e/t).toFixed(3)),a=ot.RATIO_MAP[i],s=parseFloat((r/o).toFixed(3)),c=parseFloat((n*o).toFixed(3));return o<ot.HOR_CONTAINER_RATIO||s>n?(s=n,c=parseFloat((n*o).toFixed(3))):(s=parseFloat((r/o).toFixed(3)),c=r),{realWidth:c,realHeight:s,realRotate:a}},Cr=function(e,t,n){var r=e.width,i=void 0===r?16:r,o=e.height,a=void 0===o?9:o,s=e.rotation,c={};if(s>=0&&s<=3){var u=1===s||3===s,l=xr(u?a:i,u?i:a,n,t,s),h=l.realWidth,f=l.realHeight,d=l.realRotate;c={transform:"rotateZ(".concat(d,"deg)"),width:"".concat(u?f:h,"px"),height:"".concat(u?h:f,"px")}}return c},kr=function(){return new Promise((function(e,t){var n,r,i=["video/VP8","video/H264"],o=["audio/opus"];On.isFirefox()&&e({video:i,audio:o});try{o=(null===(n=RTCRtpSender.getCapabilities("audio"))||void 0===n?void 0:n.codecs.filter((function(e){return"audio/opus"===e.mimeType})).map((function(e){return e.mimeType})))||[],e({video:i=(i=(null===(r=RTCRtpSender.getCapabilities("video"))||void 0===r?void 0:r.codecs.filter((function(e){return"video/H264"===e.mimeType||"video/VP8"===e.mimeType})).map((function(e){return e.mimeType})))||[]).filter((function(e,t){return i.indexOf(e)===t})),audio:o})}catch(e){t(e)}}))},Or=function(e){var n=e.extId,r=e.clientId,i=e.clientSecret,o=e.httpServer;return wr(void 0,void 0,void 0,t().mark((function e(){var a,s,c,u;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n&&r&&i||Promise.reject(ie("XYSDK:950101")),a="",e.prev=2,e.next=5,zt.getEnterpriseId({extId:n,clientId:r,clientSecret:i,httpServer:o});case 5:if(!(s=e.sent)){e.next=21;break}return e.next=9,zt.locator({extId:s,clientId:r,clientSecret:i,httpServer:o});case 9:if(c=e.sent,!((u=c.filter((function(e){return"WebrtcSigGW"===e.serverName}))).length>0)){e.next=20;break}return e.prev=12,e.next=15,new Promise((function(e,n){var r=u.length;u.map((function(i){return wr(void 0,void 0,void 0,t().mark((function o(){var a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.innerIp.split(":")[0],t.prev=1,"https:",t.next=5,Lt().get("".concat("https:","//").concat(a),{timeout:2e3});case 5:e(i.innerIp),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),0===--r&&n("All promises were rejected");case 12:case"end":return t.stop()}}),o,null,[[1,8]])})))}))}));case 15:a=e.sent,e.next=20;break;case 18:e.prev=18,e.t0=e.catch(12);case 20:case 21:return e.abrupt("return",a);case 24:return e.prev=24,e.t1=e.catch(2),e.abrupt("return",Promise.reject(e.t1));case 27:case"end":return e.stop()}}),e,null,[[2,24],[12,18]])})))},Ir=.5625,Ar=[-30,-30,1,1],_r={"1-1":[{position:[0,0,1,1],resolution:{normal:3,low:2,high:4},type:F.LOCAL}],"2-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:F.LOCAL}],"3-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.75,.333,.25,.333],resolution:{normal:1,low:1}}],"4-1":[{position:[0,0,.75,1],resolution:{normal:3,low:2,high:4}},{position:[.75,0,.25,.333],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.75,.333,.25,.333],resolution:{normal:1,low:1}},{position:[.75,.666,.25,.333],resolution:{normal:1,low:1}}],"5-1":[{position:[.125,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}}],"6-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}}],"7-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.25,.25,.25],resolution:{normal:1,low:1}}],"8-1":[{position:[0,0,.75,.75],resolution:{normal:3,low:2,high:4}},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.25,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.5,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.75,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.5,.25,.25],resolution:{normal:1,low:1}},{position:[.75,.25,.25,.25],resolution:{normal:1,low:1}},{position:[.75,0,.25,.25],resolution:{normal:1,low:1}}]},Tr={"1-1":[{position:[0,0,1,1],resolution:{normal:3,low:2,high:4},type:F.LOCAL}],"2-1":[{position:[0,0,.5,1],resolution:{normal:3,low:2,high:4}},{position:[.5,0,.5,1],resolution:{normal:3,low:2,high:4},type:F.LOCAL}],"3-1":[{position:[.25,0,.5,.5],resolution:{normal:2,low:2}},{position:[0,.5,.5,.5],resolution:{normal:2,low:2},type:F.LOCAL},{position:[.5,.5,.5,.5],resolution:{normal:2,low:2}}],"4-1":[{position:[0,0,.5,.5],resolution:{normal:2,low:1}},{position:[0,.5,.5,.5],resolution:{normal:2,low:1},type:F.LOCAL},{position:[.5,0,.5,.5],resolution:{normal:2,low:1}},{position:[.5,.5,.5,.5],resolution:{normal:2,low:1}}],"5-1":[{position:[0,0,.333,.5],resolution:{normal:1,low:1}},{position:[0,.5,.333,.5],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.333,0,.333,.5],resolution:{normal:1,low:1}},{position:[.666,0,.333,.5],resolution:{normal:1,low:1}},{position:[.333,.5,.333,.5],resolution:{normal:1,low:1}}],"6-1":[{position:[0,0,.333,.5],resolution:{normal:1,low:1}},{position:[0,.5,.333,.5],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.333,0,.333,.5],resolution:{normal:1,low:1}},{position:[.666,0,.333,.5],resolution:{normal:1,low:1}},{position:[.333,.5,.333,.5],resolution:{normal:1,low:1}},{position:[.666,.5,.333,.5],resolution:{normal:1,low:1}}],"7-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}}],"8-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.666,.333,.333],resolution:{normal:1,low:1}}],"9-1":[{position:[0,0,.333,.333],resolution:{normal:1,low:1}},{position:[.333,0,.333,.333],resolution:{normal:1,low:1}},{position:[.666,0,.333,.333],resolution:{normal:1,low:1}},{position:[0,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.333,.333,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.333,.333,.333],resolution:{normal:1,low:1}},{position:[0,.666,.333,.333],resolution:{normal:1,low:1},type:F.LOCAL},{position:[.333,.666,.333,.333],resolution:{normal:1,low:1}},{position:[.666,.666,.333,.333],resolution:{normal:1,low:1}}]},Rr={SPEAKER:{length:8,temp:{0:_r["1-1"],1:_r["1-1"],2:_r["2-1"],3:_r["3-1"],4:_r["4-1"],5:_r["5-1"],6:_r["6-1"],7:_r["7-1"],8:_r["8-1"]},rate:{0:.5625,1:.5625,2:.4218,3:.4218,4:.4218,5:.5625,6:.5625,7:.5625,8:.5625}},GALLERY:{length:9,temp:{0:Tr["1-1"],1:Tr["1-1"],2:Tr["2-1"],3:Tr["3-1"],4:Tr["4-1"],5:Tr["5-1"],6:Tr["6-1"],7:Tr["7-1"],8:Tr["8-1"],9:Tr["9-1"]},rate:{0:.5625,1:.5625,2:.2812,3:.5625,4:.5625,5:.375,6:.375,7:.5625,8:.5625,9:.5625}}},Dr={MULTI_PIC_CONTENT_HIGH_PRIORITY:(br=Rr.SPEAKER,Sr=yn()(br),Object.keys(Sr.temp).forEach((function(e){var t=Sr.temp[e];t[0].resolution={normal:4,low:3},t[0].quality=2,t[0].type=F.CONTENT})),Sr),MULTI_PIC_ACTIVE_HIGH_PRIORITY:function(e){var t=yn()(e),n=M.LOW;return Object.keys(t.temp).forEach((function(e){var r=Number(e);if(r>0){var i=t.temp[e];r<=2&&(i[r-1].resolution={normal:3,low:3},i[r-1].type=F.CONTENT,i[r-1].quality=n),r>2&&(i[2].resolution={normal:3,low:3},i[2].type=F.CONTENT,i[2].quality=n)}})),t}(Rr.SPEAKER),TWO_PIC_PIP:{length:2,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:M.HIGH,type:F.CONTENT}],2:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:M.HIGH,type:F.CONTENT,zIndex:1},{position:[0,.75,.25,.25],resolution:{normal:1,low:1},zIndex:2}]},rate:{1:.5625,2:.5625}},CONTENT_ONLY:{length:1,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:M.HIGH,type:F.CONTENT}]},rate:{1:.5625}},TWO_PIC_SYMMETRIC:{length:2,temp:{1:[{position:[0,0,1,1],resolution:{normal:4,low:3},quality:M.HIGH,type:F.CONTENT}],2:[{position:[0,0,.5,1],resolution:{normal:4,low:3},quality:M.HIGH,type:F.CONTENT},{position:[.5,0,.5,1],resolution:{normal:3,low:2,high:4}}]},rate:{1:.5625,2:.2812}}},Nr=Object.assign(Object.assign({},Rr),Dr),Lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return"".concat("https://sdk-source.xylink.com/h5/webrtc/device/").concat(e,".png")},Mr={webrtc:Lr(),soft:Lr(),hard:Lr("nemo"),nemono:Lr("nemo"),virtualnemo:Lr("nemo"),nemo:Lr("nemo"),tvbox:Lr("tvbox"),h323:Lr("h323"),bruce:Lr("bruce"),desk:Lr(),tel:Lr("tel"),shtl:Lr("shtl"),default:Lr()},Pr=["hard","nemono","virtualnemo","nemo","tvbox","h323","bruce"],jr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Br=function(){function e(t){var n;c(this,e),this.client=t,this.logger=t.logger,this.customLayoutMap=new Map,this.layoutMap=new Map,this.videoManagers={},this.originOrderRosters=[],this.orderRosterList=[],this.selfRoster=Object.assign(Object.assign({},ot.ROSTER),{isLocal:!0}),this.newLayoutList=[],this.initLayout=[],this.templateMode=(null===(n=t.config)||void 0===n?void 0:n.templateMode)||"SPEAKER",this.templateRate={previous:Ir,next:0},this.content={previous:null,next:null},this.screenInfo={width:0,height:0,rateHeight:0,rateWidth:0},this.internalsLayout={},this.forceFullScreenId="",this.localContent=null,this.preConfInfo=null,this.confInfo=yn()(ot.CONF_INFO),this.pageInfo={pageSize:9,currentPage:0,totalPage:0},this.templateModeTemp=ut,this.isLocalShareContent=!1,this.calculateScreenInfo(),this.onVideoStatusChange=this.onVideoStatusChange.bind(this)}return f(e,[{key:"getNewLayout",value:function(){return this.newLayoutList}},{key:"getOrderRosterList",value:function(){return this.orderRosterList}},{key:"getOriginOrderRosters",value:function(){return this.originOrderRosters}},{key:"getLayoutMap",value:function(){return this.layoutMap}},{key:"getCustomLayoutMap",value:function(){return this.customLayoutMap}},{key:"getTemplateRate",value:function(){return this.templateRate}},{key:"getContentRosterItem",value:function(){return this.content.next}},{key:"getSelfRoster",value:function(){return this.selfRoster}},{key:"getScreenInfo",value:function(){return this.screenInfo}},{key:"getVideoManagers",value:function(){return this.videoManagers}},{key:"getForceFullScreenId",value:function(){return this.forceFullScreenId}},{key:"getTemplateMode",value:function(){return this.templateMode}},{key:"getConfInfo",value:function(){return this.confInfo}},{key:"getInternalsLayout",value:function(){return this.internalsLayout}},{key:"getLocalShareState",value:function(){return this.isLocalShareContent}},{key:"setOrderRosterList",value:function(e){this.orderRosterList=e}},{key:"setOriginOrderRosters",value:function(e){this.originOrderRosters=e}},{key:"setForceFullScreenId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.forceFullScreenId=e,this.client.emmit("force-full-screen",this.forceFullScreenId)}},{key:"setContentRosterItem",value:function(e){this.content={previous:e,next:e}}},{key:"setConfInfo",value:function(e){e.contentUri||(this.content.next=null),this.confInfo=e,this.logger.log("update confInfo: ",this.confInfo)}},{key:"setLocalShareContent",value:function(e){this.isLocalShareContent=e,this.resetTemplateMode(),this.calcPageInfo(),this.calcRequestNewLayout()}},{key:"calcTemplate",value:function(){var e,t=[],n=this.pageInfo,r=n.currentPage,i=n.pageSize;switch(this.templateMode){case"MULTI_PIC_ACTIVE_HIGH_PRIORITY":this.orderRosterList[0]=this.orderRosterList.splice(2,1,this.orderRosterList[0])[0],this.orderRosterList=this.orderRosterList.filter(Boolean);break;case"TWO_PIC_PIP":case"TWO_PIC_SYMMETRIC":this.orderRosterList.length>2&&(this.orderRosterList=this.orderRosterList.filter((function(e){return!e.isLocal})));break;case"CONTENT_ONLY":this.orderRosterList=this.orderRosterList.filter((function(e){return!e.isLocal}))}var o=this.orderRosterList.length;r>1&&!this.forceFullScreenId&&(o=i);var a=Nr[this.templateMode]||Nr.SPEAKER,s=a.temp,c=a.rate,u=a.length;if((t=s[o]||s[u],e=c[o]||c[u],1===this.pageInfo.currentPage&&9===o)&&this.orderRosterList.find((function(e){return e.isLocal}))){var l=[(t=yn()(t))[6],t[1]];t[1]=l[0],t[6]=l[1]}return{tempLayout:t,templateRate:e}}},{key:"initLayoutManager",value:function(){var e=this.templateRate.next,t=this.calcTemplate(),n=t.tempLayout,r=t.templateRate;e!==r&&(this.templateRate={next:r,previous:r},this.calculateScreenInfo()),this.initLayout=yn()(n),this.newLayoutList=this.calculateNewLayoutList()}},{key:"onVideoStatusChange",value:function(e,t){this.logger.log("[LM]on video status change: ",{key:e,data:t});var n,r=this.client.getAutoMode(),i=r?this.layoutMap:this.customLayoutMap,o=t.status,a=i.has(e),s=!1;if("VIDEO_PLAY_FAILED"===o&&this.client.emmit("play-failed",{type:"video",key:e,error:t.error}),a){var c=i.get(e),u=c.state,l=c.roster.isLocal;"NORMAL"!==u&&"REQUEST"!==u||"ENDED"!==o?"NORMAL"!==u||"REQUEST"!==o||l?("REQUEST"!==u&&"INVALID"!==u||"CANPLAY"!==o)&&("MUTE"!==u||"CANPLAY"!==o||l)||(n="NORMAL",s=!0):(n="REQUEST",s=!0):(n="INVALID",s=!0),s&&(i.set(e,Object.assign(Object.assign({},c),{state:n})),r?this.layoutMap=i:this.customLayoutMap=i,this.client.sendLayoutMessage())}}},{key:"setVideoRenderer",value:function(e,t){if(this.logger.log("[lm]set video renderer:",{key:e,wrapEleId:t}),!this.videoManagers[e]){this.logger.log("[lm]Not Match VM: ",e);var n="1"===e.charAt(e.length-1);this.videoManagers[e]=new yr(this.logger,n),this.videoManagers[e].setVideoStatusChange(this.onVideoStatusChange)}this.videoManagers[e].setSource(e,t)}},{key:"removeVideoRenderer",value:function(e,t){this.videoManagers[e]&&(this.logger.log("[lm]remove VM: ",e),delete this.videoManagers[e])}},{key:"playLocalVideo",value:function(){var e;return jr(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.selfRoster.id,i=null===(e=this.videoManagers[r])||void 0===e?void 0:e.videoEle,this.logger.log("[LM]play local video, video is paused:",null==i?void 0:i.paused),(null==i?void 0:i.paused)&&i.play();case 4:case"end":return t.stop()}}),n,this)})))}},{key:"playVideo",value:function(e){return jr(this,void 0,void 0,t().mark((function n(){var r,i,o,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,i=Object.keys(this.videoManagers);case 1:if(!(r<i.length)){t.next=12;break}if(o=i[r],!(e&&e.indexOf(o)>-1)&&e){t.next=9;break}if(!(null==(a=this.videoManagers[o].videoEle)?void 0:a.srcObject)){t.next=9;break}return t.next=8,a.play();case 8:this.logger.log("replay video successfully:",o);case 9:r++,t.next=1;break;case 12:case"end":return t.stop()}}),n,this)})))}},{key:"updateLocalTrack",value:function(){var e=this.selfRoster.id,t=this.videoManagers[e];this.logger.log("update local track, ",e),t&&t.updateLocalTrack()}},{key:"updateStreams",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.logger.log("[LM] invoke updateStreams");var n=this.client.getAutoMode(),r=n?this.layoutMap:this.customLayoutMap,i=this.client.getLayoutRosters(),o=i.total.length;r.forEach((function(t,n){var a=t.roster,s=a.isLocal,c=a.id,u=a.isContent,l=!1;e.videoManagers[c]||(e.videoManagers[c]=new yr(e.logger,u),e.videoManagers[c].setVideoStatusChange(e.onVideoStatusChange)),e.videoManagers[c].match=!0;var h=e.videoManagers[c].state;if(s){var f=e.client.getPreviewStreams().previewStreams,d=((void 0===f?[]:f)[0]||{stream:null}).stream;e.videoManagers[c].initVideoStreamById(c,d);var p=Er(t,d,h),v=r.get(n);v&&r.set(n,Object.assign(Object.assign({},v),{state:p}))}else{for(var g=0;g<o;g++){var m=i.total[g],y=m.participantId,b=m.mediagroupid,S=m.videoTrackId;if(t.roster.participantId+t.roster.mediagroupid===y+b){var w=e.getVideoStreamByTrackId(S).videoStream;l=!0,e.videoManagers[c].initVideoStreamById(c,w);var E=Er(t,w,h),x=r.get(n);x&&r.set(n,Object.assign(Object.assign({},x),{state:E}));break}}if(!l){e.videoManagers[c].initVideoStreamById(c,null);var C=Er(t,null,h),k=r.get(n);k&&r.set(n,Object.assign(Object.assign({},k),{state:C}))}}})),this.clearInvalidVideoManagers(),n?this.layoutMap=r:this.customLayoutMap=r,t&&this.client.sendLayoutMessage()}},{key:"clearInvalidVideoManagers",value:function(){var e=this;Object.keys(this.videoManagers).forEach((function(t){e.videoManagers[t].match?delete e.videoManagers[t].match:(e.videoManagers[t].destroy(),delete e.videoManagers[t])}))}},{key:"calcPageInfo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.confInfo,n=this.preConfInfo||{},r=n.contentUri,i=void 0===r?"":r,o=n.chairManUrl,a=void 0===o?"":o,s=t.participantCount,c=t.contentUri,u=t.chairManUrl,l=this.pageInfo,h=l.pageSize,f=l.currentPage,d=Math.min(112,s),p=Math.ceil(d/h);if(f=Math.min(f,p),this.pageInfo.totalPage=p,this.pageInfo.currentPage=f,f>0)this.templateMode="GALLERY";else if(c){var v=st.find((function(t){return t===e.templateModeTemp}));this.templateMode=v?this.templateModeTemp:ut}else this.templateMode=ct;var g=!1;!a&&u&&(g=!0),!i&&c&&(g=!0),i&&!c&&"GALLERY"!==this.templateMode&&(g=!0),g&&this.resetTemplateMode(),this.logger.log("[AUTO] calcPageInfo templateMode:",this.templateMode),this.preConfInfo=yn()(this.confInfo),this.logger.log("[AUTO] calcPageInfo pageInfo:",this.pageInfo),this.client.emmit("page-info",this.pageInfo)}},{key:"setPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.forceFullScreenId&&this.setForceFullScreenId(""),this.pageInfo.currentPage=e,this.calcPageInfo(),this.calcRequestNewLayout()}},{key:"calcForceFullScreenRequestLayout",value:function(){var e=this.pageInfo.pageSize,t=[],n=this.forceFullScreenId===this.selfRoster.id,r=this.layoutMap.get(this.forceFullScreenId);if(n)this.createAutoLayout([]);else{var i=(null==r?void 0:r.roster)||{},o=i.endpointId,a=void 0===o?"":o,s=i.mediagroupid,c=F.CONTENT,u=F.PEOPLE,l=M.NORMAL,h=function(e){var t=F.CONTENT,n=L.LEVEL1080,r=L.LEVEL720,i=M.NORMAL,o=M.HIGH,a=e===t?n:r;return{position:[0,0,1,1],resolution:{normal:a,low:a,high:n},quality:e===t?o:i,type:e}}(1===s?c:u),f=h.resolution,d=h.quality,p=void 0===d?l:d,v=this.convertResolutionLevel(f);t.push({calluri:a,mediagroupid:s,resolution:v,quality:p}),this.client.requestNewLayout(t,e,0)}}},{key:"calcRequestNewLayout",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageInfo;if(this.logger.log("calc request layout page info:",t),this.forceFullScreenId)this.calcForceFullScreenRequestLayout();else{var n=this.confInfo,r=n.participantCount,i=void 0===r?0:r,o=n.chairManUrl,a=void 0===o?"":o,s=n.contentUri,c=void 0===s?"":s,u=t.pageSize,l=t.currentPage,h=t.totalPage,f=this.client.getLocalHide(),d=0===l&&c?1:0,p=Math.min(112,i)+d-(f?1:0),v=p,g=this.client.getOnHold(),m=a&&a!==this.selfRoster.endpointId,y=[],b=M.NORMAL;if(i<=1&&!c)this.client.requestNewLayout([{mediagroupid:0,calluri:this.selfRoster.endpointId,resolution:3,quality:b}],u,0);else if(g)this.client.requestNewLayout(y,u,0);else{if(l===h&&l>0&&(v=p-(l-1)*u),m&&(v=d+(f?1:2),l=0),this.isLocalShareContent&&(v=Math.min(p,4)),(v=Math.min(v,u))>0){var S=Nr[this.templateMode],w=S.temp,E=S.length,x=w[v]||w[Math.max(1,E)],C=f||["TWO_PIC_PIP","TWO_PIC_SYMMETRIC"].includes(this.templateMode)||l>1,k=F.LOCAL,O=F.CONTENT;x.forEach((function(t){var n=t.resolution,r=t.type,i=t.quality,o=void 0===i?b:i,s="";(r!==k||C)&&(0!==l||e.isLocalShareContent||(s=r===O?c:a),y.push({mediagroupid:~~(r===O),calluri:s,resolution:e.convertResolutionLevel(n),quality:o}))}))}this.logger.log("request layout:",y),this.client.requestNewLayout(y,u,l,[],{uiShowLocalWhenPageMode:!f})}}}},{key:"createAutoLayout",value:function(e){var t=this;if(this.forceFullScreenId)if(this.forceFullScreenId===this.selfRoster.id)e=[];else{var n=e.find((function(e){return e.calluri+e.mediagroupid===t.forceFullScreenId}));if(!n||1===n.mediagroupid&&!this.confInfo.contentUri)return this.setForceFullScreenId(""),void this.calcRequestNewLayout()}this.createOrderRoster(e),this.createLayout()}},{key:"resetTemplateMode",value:function(){var e=this.confInfo.contentUri?ut:ct,t=0;this.isLocalShareContent&&(e="GALLERY",t=1),this.pageInfo.currentPage=t,this.templateMode=e}},{key:"createOrderRoster",value:function(e){this.logger.log("[LM] invoke createOrderRoster"),this.orderRosterList=[];var t=e.length,n=this.client.getLocalHide(),r=this.confInfo.chairManUrl;if(0!==t){for(var i=0;i<t;i++){var o,a,s=e[i],c=s.calluri,u=void 0===c?"":c,l=s.mediagroupid,h=s.isAudioMute,f=s.isVideoMute,d=s.remoteName,p=s.remoteType,v=s.MuteReason;a=u+l,o=Object.assign(Object.assign({},s),{id:a,isLocal:!1,isContent:1===l,displayName:d,endpointId:u,audioTxMute:h,videoTxMute:f,videoRxMute:!1,deviceType:p,audioRxMute:!1,videoMuteReason:v,isForceFullScreen:0===l&&u===r,isLastAdd:!1,onHold:!1,isPolling:!1}),1===l?(this.confInfo.contentUri&&(this.content=Object.assign(Object.assign({},this.content),{next:o})),this.orderRosterList.splice(0,0,o)):this.orderRosterList.push(o)}(!this.forceFullScreenId||this.forceFullScreenId&&this.forceFullScreenId===this.selfRoster.id)&&!n&&this.pageInfo.currentPage<=1&&this.orderRosterList.splice(1,0,this.selfRoster),this.logger.log("[LM] orderRosterList:",this.orderRosterList)}else this.orderRosterList=[this.selfRoster]}},{key:"createCustomLayout",value:function(e){var t=this,n=this.client.getLayoutAvatarType(),r=V.TEXT,i=V.IMAGE,o=M.LOW;this.createOrderRoster(e),this.orderRosterList.forEach((function(e,a){var s=e.id,c=e.deviceType,u=t.customLayoutMap.has(s),l=Mr[c]||Mr.default;if(u){var h=t.customLayoutMap.get(s);t.customLayoutMap.set(s,Object.assign(Object.assign(Object.assign({},h),{roster:e,resolution:0,quality:o,deal:!0,index:a}),n===r&&{textAvatar:t.getLayoutTextAvatar(e.displayName)}))}else t.customLayoutMap.set(s,Object.assign(Object.assign({roster:e,rotate:{},state:"NORMAL",resolution:0,quality:o,deal:!0,index:a},n===i&&{avatar:l}),n===r&&{textAvatar:t.getLayoutTextAvatar(e.displayName)}))})),this.clearInvalidLayout(),this.logger.log("[v2]custom layout map: ",this.customLayoutMap)}},{key:"requestLayout",value:function(e){var t=this,n=this.orderRosterList;e.forEach((function(e){var r=e.callUri,i=void 0===r?"":r,o=e.isContent,a=e.resolution,s=e.quality,c=i+Number(o),u=t.customLayoutMap.has(c),l=n.findIndex((function(e){return e.endpointId+Number(e.isContent)===c})),h=n[l],f=s>0?100*s:100;if(u){var d=t.customLayoutMap.get(c);t.customLayoutMap.set(c,Object.assign(Object.assign({},d),{roster:h,resolution:a,quality:f,deal:!0}))}else t.customLayoutMap.set(c,{roster:h,rotate:{},state:"NORMAL",resolution:a,quality:f,deal:!0})})),this.clearInvalidLayout();var r=this.customLayoutCalculator();this.client.sendCustomLayout(r),this.logger.log("custom layout list: ",this.customLayoutMap)}},{key:"calculatePosition",value:function(){var e=this,t={left:"0px",top:"0px",width:"0px",height:"0px"},n={width:0,height:0};this.layoutMap.forEach((function(r,i){var o=e.screenInfo,a=o.rateWidth,c=o.rateHeight,u=s(r.position,4),l=u[0],h=u[1],f=u[2],d=u[3],p=Math.round(a*l),v=Math.round(c*h),g=Math.round(a*f),m=Math.round(c*d);t={left:"".concat(p,"px"),top:"".concat(v,"px"),width:"".concat(g,"px"),height:"".concat(m,"px")},n={width:g,height:m},r.zIndex&&(t.zIndex=r.zIndex),e.layoutMap.set(i,Object.assign(Object.assign({},r),{positionStyle:t,positionInfo:n}))}))}},{key:"calculateRotate",value:function(){var e=this;this.client.getRotationInfo().forEach((function(t){var n=t.participantId,r=t.mediagroupid,i=e.getLayoutKeyByRotateInfo(n,r),o={};if(i){var a=e.layoutMap.get(i);if(a){var s=a.positionInfo||{width:0,height:0},c=s.width,u=s.height;o=Cr(t,c,u),e.layoutMap.set(i,Object.assign(Object.assign({},a),{rotate:o}))}}})),this.client.config.localMirror&&this.localMirrorRotate()}},{key:"getVideoStreamByTrackId",value:function(e){for(var t=this.client.getVideoTrackList(),n=t.length,r={videoStream:null,track:null},i=0;i<n;i++){var o=t[i].data,a=t[i].rest,s=o.streams[0].id;if((s=s.replace("-st","-tk-vd"))===e){r={videoStream:o.streams[0],track:a.track};break}}return r}},{key:"calculateNewLayoutList",value:function(){for(var e=this.orderRosterList.length,t=this.initLayout.length,n=[],r=this.client.getSpeakerInfo(),i=0;i<e;i++){var o=this.orderRosterList[i];if(Object.assign(o,{isActiveSpeaker:0===o.mediagroupid&&o.endpointId===r.endpointId}),!(i<t))break;var a=this.initLayout[i]||{},s=a.position,c=void 0===s?Ar:s,u=a.zIndex,l=void 0===u?0:u;n.push({roster:o,position:c,zIndex:l})}return n}},{key:"calculateScreenInfo",value:function(){var e=this.client.getAutoMode(),t=this.client.getClientConfig();if(!e)return{width:0,height:0,rateHeight:0,rateWidth:0};var n=t.container||{elementId:"",offset:[]},r=n.elementId,i=void 0===r?"":r,o=n.offset,a=void 0===o?[]:o,c=i?document.getElementById(i):null,u=s(a,4),l=u[0],h=void 0===l?0:l,f=u[1],d=void 0===f?0:f,p=u[2],v=void 0===p?0:p,g=u[3],m=void 0===g?0:g,y=Number(h)+Number(d),b=Number(v)+Number(m),S=(null==c?void 0:c.clientHeight)||document.body.clientHeight,w=(null==c?void 0:c.clientWidth)||document.body.clientWidth,E=S-y,x=w-b,C=E>0?E:S,k=x>0?x:w,O=Math.floor(k*this.templateRate.next),I=Math.floor(C/this.templateRate.next),A={rateHeight:0,rateWidth:0,width:k,height:C};A=C>O?{rateWidth:k,rateHeight:O,width:k,height:C}:{rateWidth:I,rateHeight:C,width:k,height:C},this.forceFullScreenId&&(A={rateWidth:k,rateHeight:C,width:k,height:C}),this.logger.log("client screen info: ",A),this.screenInfo=A,this.client.sendScreenInfoMessage(A)}},{key:"createLayout",value:function(){this.logger.log("[LM] invoke createLayout");var e,t,n=this.client.getPeerConnectionStatus();if(this.initLayoutManager(),this.createBaseLayout(),this.updateStreams(!1),this.calculatePosition(),this.calculateRotate(),this.client.sendLayoutMessage(),this.logger.log("create layout: ",(e=this.layoutMap,t={},e.forEach((function(e,n){t[n]=e})),t)),this.logger.log("current template mode:",this.templateMode),"GALLERY"!==this.templateMode&&(this.templateModeTemp=this.templateMode),this.client.sendTemplateMode(this.templateMode),n){var r=this.content,i=r.previous,o=r.next;(null==i?void 0:i.participantId)!==(null==o?void 0:o.participantId)&&this.client.sendContentRosterMessage(o)}}},{key:"calculateOrderRosterList",value:function(){var e=this.client.getOriginRosters(),t=this.client.getInviteInfo().callerUri,n=this.client.getContentSenderPid(),r=this.client.getSpeakerInfo(),i=this.client.getLocalHide(),o=e.length,a={content:[],chairmain:[],selfRoster:[],activeSpeaker:[],audioVideoUnmute:[],audioUnmute:[],videoUnmute:[],audioVideoMute:[]},s=[];this.localContent=null;for(var c=0;c<o;c++){var u=e[c],l=u.mediagroupid,h=u.endpointId;u.isActiveSpeaker=!1,u.isLocal=!1,u.id=h+l,u.endpointId===t&&u.isContent?this.localContent=u:"record"!==u.deviceType&&(u.isContent&&n>0&&u.participantId!==n||(u.isContent&&n>0&&u.participantId===n?a.content.push(u):u.isForceFullScreen?a.chairmain.push(u):u.endpointId===t&&i&&o>1||(u.endpointId!==t||u.isContent||i?r.endpointId&&r.endpointId===u.endpointId?(u.isActiveSpeaker=!0,a.activeSpeaker.push(u)):u.audioTxMute||u.videoTxMute?u.audioTxMute||!u.videoTxMute?!u.audioTxMute||u.videoTxMute?u.audioTxMute&&u.videoTxMute&&a.audioVideoMute.push(u):a.videoUnmute.push(u):a.audioUnmute.push(u):a.audioVideoUnmute.push(u):(u.isLocal=!0,this.selfRoster.participantId=u.participantId,a.selfRoster.push(u)))))}for(var f in this.localContent&&a.content&&(a.content=[]),a)s=s.concat(a[f]);return s}},{key:"switchLayout",value:function(e){this.forceFullScreenId&&this.setForceFullScreenId("");var t=this.confInfo.contentUri,n=t?st:at,r=e;if(r)n.findIndex((function(e){return e===r}))<0&&"GALLERY"!==r&&(r=t?ut:ct);else if("GALLERY"===this.templateMode)r=this.templateModeTemp;else{r=this.templateMode;var i=n.findIndex((function(e){return e===r})),o=i+1>=n.length?0:i+1;r=n[o]}return this.templateMode=r,this.pageInfo.currentPage="GALLERY"===this.templateMode?1:0,this.calcRequestNewLayout(),this.client.emmit("page-info",this.pageInfo),this.logger.log("switch layout Mode: ",r),r}},{key:"clearVideoManagersUseMonitorList",value:function(e){var t=this;e.forEach((function(e){t.videoManagers[e]&&(t.videoManagers[e].destroy(),delete t.videoManagers[e])}))}},{key:"setLocalStatus",value:function(e){if(this.logger.log("set local status: ",e),this.selfRoster=Object.assign(Object.assign({},this.selfRoster),e),!this.forceFullScreenId||this.forceFullScreenId===this.selfRoster.id){var t=this.selfRoster,n=t.endpointId,r=t.mediagroupid,i=n+r,o=this.client.getAutoMode()?this.layoutMap:this.customLayoutMap,a=o.get(i),s=this.orderRosterList.findIndex((function(e){return e.endpointId===n&&e.mediagroupid===r}));s>-1&&(this.orderRosterList[s]=this.selfRoster),a&&o.set(i,Object.assign(Object.assign({},a),{roster:this.selfRoster})),this.updateStreams()}}},{key:"clearInvalidLayout",value:function(){var e=this.client.getAutoMode()?this.layoutMap:this.customLayoutMap;e.forEach((function(t,n){t.deal?e.set(n,Object.assign(Object.assign({},t),{deal:!1})):e.delete(n)}))}},{key:"createBaseLayout",value:function(){var e=this,t=this.client.getLayoutAvatarType(),n=V.TEXT,r=V.IMAGE;this.newLayoutList.forEach((function(i){var o=i.roster,a=i.position,s=i.zIndex,c=i.resolution,u=o.endpointId,l=o.mediagroupid,h=(o.deviceType,u+l);if(e.layoutMap.has(h)){var f=e.layoutMap.get(h);e.layoutMap.set(h,Object.assign(Object.assign(Object.assign({},f),{roster:o,position:a,zIndex:s,resolution:c,deal:!0}),t===n&&{textAvatar:e.getLayoutTextAvatar(o.displayName)}))}else{var d=Mr[o.deviceType]||Mr.default;e.layoutMap.set(h,Object.assign(Object.assign({roster:o,position:a,zIndex:s,resolution:c,state:"NORMAL",rotate:{},positionStyle:{left:"",top:"",width:"",height:""},positionInfo:{width:0,height:0},deal:!0,quality:100},t===r&&{avatar:d}),t===n&&{textAvatar:e.getLayoutTextAvatar(o.displayName)}))}})),this.clearInvalidLayout()}},{key:"customLayoutCalculator",value:function(){var e=[],t={};return this.customLayoutMap.forEach((function(n){var r=n.roster||{},i=r.isContent,o=r.id,a=r.isLocal,s=r.participantId,c=n.resolution,u=void 0===c?1:c,l=n.quality,h=void 0===l?100:l,f=h>0?100*h:100;a||(e.push({pid:s,resolution:u,quality:f,mediagroupid:Number(i)}),t[o]={resolution:ot.RESOLUTION_MAP[u],quality:f})})),this.internalsLayout=t,e}},{key:"getLayoutKeyByRotateInfo",value:function(e,t){var n="";return this.layoutMap.forEach((function(r){var i=r.roster,o=i.isContent,a=i.endpointId,s=i.mediagroupid;i.participantId===e&&1===t===o&&(n=a+s)})),n}},{key:"localMirrorRotate",value:function(){var e=this.client.invite.callerUri+"0",t=this.layoutMap.has(e),n=this.client.getFacingMode()===k.FRONT?"rotateY(180deg)":"";if(t){var r=this.layoutMap.get(e);this.layoutMap.set(e,Object.assign(Object.assign({},r),{rotate:{transform:n}}))}}},{key:"getLayoutTextAvatar",value:function(e){var t=e.trim();if(0===t.length)return"";if(ae.isSpecialChar(t)||ae.isNumberText(t)||ae.isLetter(t))return t.charAt(0).toUpperCase();var n=t.replace(/[^a-zA-Z\u4e00-\u9fa5]/g,"");if(!n)return t.charAt(0);var r=n.match(/\b\w/g);if(r)return r[0].toUpperCase();var i=n.length;return i<=2?n:n.substr(i-2)}},{key:"convertResolutionLevel",value:function(e){var t=this.client.getFeatureConfig().enableLowResolution,n=this.client.getEnterpriseMediaConfig().isSupportHighResolution,r=void 0!==n&&n,i=e.normal,o=e.low,a=e.high;return t?o:r&&a||i}}],[{key:"getCustomLayoutItem",value:function(e,t,n){var r=(e.roster||{}).isContent;return{pid:e.roster.participantId,resolution:t,quality:n,mediagroupid:r?1:0}}}]),e}(),Ur=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Gr=function(){function e(t,n){var r=this;c(this,e),this.getUnAvatarList=function(e){var t=[];return e.forEach((function(e,n){var i=(r.layoutImageAvatarMap.get(n)||{}).url;(void 0===i?"":i)||t.push(e)})),t},this.client=t,this.logger=n,this.conferenceInfo=ot.CONFERENCE_INFO,this.mediaConfig={},this.rxBandwidth=0,this.recordPermission={authorize:!1,recordingUrl:""},this.cloudRoomInfo={meetingControlPassword:"",meetingNumber:"",password:""},this.confMgmtUrl=null,this.layoutImageAvatarMap=new Map,this.enterpriseConfig={}}return f(e,[{key:"getRecordPermission",value:function(){return this.recordPermission}},{key:"getLayoutImageAvatarMap",value:function(){return this.layoutImageAvatarMap}},{key:"getEnterpriseMediaConfig",value:function(){return this.mediaConfig}},{key:"getRxBandwidth",value:function(){return this.rxBandwidth}},{key:"getLayoutAvatarType",value:function(){return this.client.getFeatureConfig().enableLayoutAvatar?this.enterpriseConfig.userAvatarMode||V.TEXT:V.NONE}},{key:"handleUserInfo",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.client.getLoginInfo(),!this.client.getFeatureConfig().enableMeetingOwner){e.next=5;break}return e.next=5,this.getCloudMeetingRooms();case 5:r=Object.assign({},n,{cloudRoomInfo:this.cloudRoomInfo}),this.logger.log("[meeting]Emmit user info: ",r),this.client.emmit("user-info",r);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"handleConferenceInfo",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h,f,d;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[meeting]Handle conf info"),n=this.client.getInviteInfo(),r=n.vcNumber,i=void 0===r?"":r,o=n.meetingId,a=n.commonJson,s=void 0===a?"":a,c=this.client.getCallInfo(),u=c.meeting,l=c.confNumber,h=this.client.getFeatureConfig(),f=i||l,d=s&&JSON.parse(s)||{},this.conferenceInfo=Object.assign({},ot.CONFERENCE_INFO,u,{callNumber:f},{meetingId:o}),e.next=9,this.getVCConfInfo(i,l);case 9:if(!h.enableWatermarkContent){e.next=12;break}return e.next=12,this.getWatermarkContent(d.confAuxProperties);case 12:if(this.handleWaitingRoomInfo(d.waitingRoomProps),!h.enableMeetingInvite){e.next=16;break}return e.next=16,this.getMeetingInviteInfo();case 16:this.logger.log("[meeting]emmit conference info: ",this.conferenceInfo),this.client.emmit("conference-info",this.conferenceInfo);case 18:case"end":return e.stop()}}),e,this)})))}},{key:"getConfMgmtUrl",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,S,w;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[invoke] getConfMgmtUrl"),n=this.client.getInviteInfo(),n.callIndex){e.next=4;break}return e.abrupt("return",null);case 4:if(e.prev=4,this.confMgmtUrl){e.next=10;break}return e.next=8,zt.getServerConfig(["meetingControl","meetingControlMemebersUrl","sidebarMeetingControlUrl"]);case 8:(r=e.sent)&&200===r.status&&r.data&&(i=r.data,o=i.meetingControl,a=void 0===o?"":o,s=i.meetingControlMemebersUrl,c=void 0===s?"":s,u=i.sidebarMeetingControlUrl,l=void 0===u?"":u,this.confMgmtUrl={pc:a,member:c,side:l});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this.logger.log("getConfMgmtUrl error:",e.t0);case 15:return h=this.confMgmtUrl||{},f=h.pc,d=void 0===f?"":f,p=h.member,v=void 0===p?"":p,g=h.side,m=void 0===g?"":g,y=Pe,b=je,S=Be,w={pc:this.getMeetingControlUrl(d),member:this.getMeetingControlUrl(v),mobile:this.getMeetingControlUrl(d,y),side:this.getMeetingControlUrl(m,b),professional:this.getMeetingControlUrl(d,S)},this.logger.log("return ConfMgmtUrl:",w),e.abrupt("return",w);case 20:case"end":return e.stop()}}),e,this,[[4,12]])})))}},{key:"checkPermissionWithMeetingNumber",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.client.getInviteInfo(),r=n.meetingId,i=n.vcNumber,o=void 0===i?"":i,this.logger.log("[meeting]check record permission: ",{meetingId:r,vcNumber:o}),e.prev=2,e.next=5,zt.checkPermissionWithMeetingNumber(o,r);case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:a=e.t0,s=a.status,c=a.data,200===s&&(u=c.authorize,l=c.recordingUrl,this.recordPermission={authorize:u,recordingUrl:l}),e.next=17;break;case 14:e.prev=14,e.t1=e.catch(2),this.logger.log("[meeting]check permission err:",e.t1);case 17:return this.client.emmit("record-permission",this.recordPermission),e.abrupt("return",this.recordPermission);case 19:case"end":return e.stop()}}),e,this,[[2,14]])})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return Ur(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[meeting]check record storage space: ",e),t.prev=1,t.next=4,zt.checkStorageSpaceWithRecordingUrl(e);case 4:r=t.sent,i=r.status,o=r.data,400===i&&(a=o.developerMessage,s=o.errorCode,c=o.userMessage,Object.assign(this.recordPermission,{developerMessage:a,errorCode:s,userMessage:c})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),this.logger.log("check record storage space err:",t.t0);case 12:return this.client.emmit("record-permission",this.recordPermission),t.abrupt("return",this.recordPermission);case 14:case"end":return t.stop()}}),n,this,[[1,9]])})))}},{key:"getCloudMeetingRooms",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.client.getLoginInfo(),r=n.id,e.prev=1,e.next=4,zt.getCloudMeetingRooms(r);case 4:200===(i=e.sent).status?(o=i.data[0]||{},a=o.meetingControlPassword,s=void 0===a?"":a,c=o.meetingNumber,u=void 0===c?"":c,l=o.password,h=void 0===l?"":l,this.cloudRoomInfo={meetingControlPassword:s,meetingNumber:u,password:h}):this.logger.error("[iauth]get cloud meeting rooms error: ",i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logger.error("[iauth]get cloud meeting rooms err: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"setLayoutAvatar",value:function(e,t){var n=this.getLayoutAvatarType(),r=this.layoutImageAvatarMap.get(t),i=r||{},o=i.url,a=void 0===o?"":o,s=i.isCustom,c=void 0!==s&&s;n===V.IMAGE&&r?e.avatar=a:c&&(e.avatar=a,e.textAvatar="")}},{key:"handleLayoutAvatar",value:function(e){return Ur(this,void 0,void 0,t().mark((function n(){var r,i=this;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((r=this.getUnAvatarList(e)).length){n.next=3;break}return n.abrupt("return");case 3:Promise.all(r.map((function(e){return Ur(i,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.roster,i=r.id,o=r.deviceType,!i){t.next=13;break}return a=i.slice(0,i.length-1),s=Mr[o]||Mr.default,this.layoutImageAvatarMap.set(i,{url:s,isCustom:!1}),t.next=7,zt.getInComingCallUrlInfo(a);case 7:c=t.sent,u=(c||{}).avatar,(l=void 0===u?"":u)&&l.indexOf("images/deviceavatars")>-1&&(l=""),Pr.find((function(e){return e===o}))&&(l=l||s),l&&(this.layoutImageAvatarMap.set(i,{url:l,isCustom:!0}),this.client.sendLayoutMessage(!1));case 13:case"end":return t.stop()}}),n,this)})))})));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setEnterpriseConfig",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.log("[meeting] set enterprise config"),this.setEnterpriseMediaConfig(),this.setEnterpriseBuffetConfig();case 3:case"end":return e.stop()}}),e,this)})))}},{key:"convertReqList",value:function(e){this.logger.log("[meeting] convert request list:",e);var t=ot.MAP_RESOLUTION_INDEX[ot.MAX_PEOPLE_RESOLUTION];return this.mediaConfig.isSupportHighResolution||(e=e.map((function(e){return!e.isContent&&e.resolution>t&&(e.resolution=t),e}))),e}},{key:"getMeetingControlUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Me,n=this.client.getInviteInfo().vcNumber,r=this.client.getLoginInfo().securityKey,i=(Mt||"").split("- build on")[0].trim(),o=Be,a=Me,s=je;return e&&(e="".concat(e,"?conferenceNo=").concat(n,"&securityKey=").concat(r,"&locale=").concat(ee,"&platform=").concat(t===o?a:t,"&version=").concat(i,"&from=sdk"),t===s&&(e+="&fromSidebar=true&hideSwitchIco=true"),t===o&&(e+="#/professional")),e}},{key:"getVCConfInfo",value:function(e,n){return Ur(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c,u,l,h,f,d,p,v,g,m,y;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||n===e){t.next=13;break}return t.prev=1,t.next=4,zt.getCallUri({number:e,deviceType:Ue,country:"CN"});case 4:i=t.sent,o=i.data||{},a=o.displayName,s=void 0===a?"":a,c=o.numberType,u=void 0===c?"":c,l=o.callUrl,h=void 0===l?"":l,f=o.avatar,d=void 0===f?"":f,p=o.deviceType,v=void 0===p?"":p,g=o.deviceId,m=void 0===g?"":g,y=this.conferenceInfo,this.conferenceInfo=Object.assign(Object.assign({},y),{displayName:s,numberType:u,callUrl:h,avatar:d,deviceType:v,deviceId:m}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),this.logger.error("[meeting]Get calluri info err: ",t.t0);case 13:case"end":return t.stop()}}),r,this,[[1,10]])})))}},{key:"getWatermarkContent",value:function(e){return Ur(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={watermark:"",displayConfNo:"",inoutReminder:""},e&&(r=JSON.parse(e)||{}),"1"!==r.watermark||!this.conferenceInfo){t.next=14;break}return t.prev=3,t.next=6,zt.getWatermarkContent(this.conferenceInfo.callNumber);case 6:i=t.sent,o=i.data||{watermarkContent:""},a=o.watermarkContent,s=void 0===a?"":a,this.conferenceInfo.confAuxProperties={watermarkContent:s},t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),this.logger.error("[meeting]Get conf watermark content error: ",t.t0);case 14:case"end":return t.stop()}}),n,this,[[3,11]])})))}},{key:"getMeetingInviteInfo",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.client.getCallInfo(),r=n.confNumber,e.prev=1,e.next=4,zt.getMeetingInviteInfo({conferenceNumber:r});case 4:200===(i=e.sent).status?this.conferenceInfo.inviteInfo=i.data:this.logger.warn("[meeting]Get invite info err: ",i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logger.error("[meeting]Get meeting invite info error: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"setEnterpriseMediaConfig",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h,f,d,p,v,g,m,y;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=[],r=this.client.getFeatureConfig(),i=r.enableBandwidthSetting,o=bt,a=St,s=wt,i&&(n=[].concat(An(n),[o,a,s])),n.length){e.next=7;break}return e.abrupt("return");case 7:return c=this.client.getLoginInfo(),u=c.id,e.next=10,zt.getEnterpriseMediaConfig(u,n);case 10:l=e.sent,h=l.RemoteSDKConfig,f=l.mediaConfig,this.logger.log("enterprise config result:",{RemoteSDKConfig:h,mediaConfig:f}),h&&(this.rxBandwidth=1024*~~(h.downLinkCeilingRate||0)),f&&(d=ot.MAX_PEOPLE_RESOLUTION,p=f.pvrxResolution,g=!1,m=d,(v=void 0===p?"":p)&&(y=v.split(";"),m=~~y[0].split("_")[1]||d,g=m>d),this.mediaConfig=Object.assign(Object.assign({},f),{isSupportHighResolution:g,maxRequestResolution:m})),e.next=20;break;case 18:e.prev=18,e.t0=e.catch(0);case 20:case"end":return e.stop()}}),e,this,[[0,18]])})))}},{key:"setEnterpriseBuffetConfig",value:function(){return Ur(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.client.getFeatureConfig(),n.enableLayoutAvatar){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,r=this.client.getLoginInfo(),i=r.id,o=r.enterpriseId,a=void 0===o?"":o,e.next=7,zt.getEnterpriseConfig(i,a);case 7:s=e.sent,c=s.enterpriseConfig,u=void 0===c?{}:c,this.enterpriseConfig=u,e.next=15;break;case 13:e.prev=13,e.t0=e.catch(3);case 15:case"end":return e.stop()}}),e,this,[[3,13]])})))}},{key:"handleWaitingRoomInfo",value:function(e){if(e){var t=(e||{}).waitingState,n=!!(void 0===t?0:t);this.client.setOnHold(n),this.client.emmit("onhold",n)}}}]),e}();const Kr=Gr;n(5212);var Hr=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return!1;var t=!0;return e.some((function(e){var n=e||{},r=n.calluri,i=n.quality,o=n.resolution;("string"!=typeof r||Qe.indexOf(i)<0||et.indexOf(o)<0)&&(t=!1)})),t};n(3689),n(658),n(2479);const Fr=function(){function e(t){c(this,e),this.client=t,this.reportDataTime=0,this.previousInternals=null,this.internals=null,this.participantCount=1,this.meetingQualityData={callNumber:"",deviceId:"",meetingId:"",osVersion:navigator.userAgent,sockProto:"udpProto",swVersion:Mt,cdrVersion:10,deviceType:Ue},this.nqLevelTimer=null,this.isReportLocalNetworkLevel=!0,this.networkLevel=Y.Excellent}return f(e,[{key:"reportLocalNetworkLevel",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isReportLocalNetworkLevel=t,this.clearNqLevelTimer(),this.calcLocalNetworkLevel(!0),this.nqLevelTimer=setInterval((function(){e.calcLocalNetworkLevel()}),5e3)}},{key:"reportQualityData",value:function(e,t){if(!this.meetingQualityData.callNumber){var n=this.client.invite,r=n.meetingId,i=n.callerUri,o=n.remoteUri,a=n.vcNumber;this.meetingQualityData.callNumber=o||a+"@CONFNO",this.meetingQualityData.deviceId=i.split("@")[0],this.meetingQualityData.meetingId=r}var s=t||{},c=s.participantCount,u=void 0===c?1:c,l=s.contentUri,h=void 0===l?"":l;if(this.participantCount=u,this.reportDataTime+=1,this.reportDataTime%2==0){this.internals=e,this.calcQualityData(0);var f=this.client.getLocalShareContent();(h||f)&&this.calcQualityData(1),this.reportDataTime=0}this.previousInternals=e}},{key:"stopReportData",value:function(){this.client.off("meeting-stats"),this.calcQualityData(0,!0),this.clearNqLevelTimer(),this.reportDataTime=0,this.previousInternals=null,this.internals=null,this.participantCount=1,this.meetingQualityData={callNumber:"",deviceId:"",meetingId:"",osVersion:navigator.userAgent,sockProto:"udpProto",swVersion:Mt,cdrVersion:10,deviceType:Ue},this.isReportLocalNetworkLevel=!0,this.networkLevel=Y.Excellent}},{key:"clearNqLevelTimer",value:function(){this.nqLevelTimer&&(clearInterval(this.nqLevelTimer),this.nqLevelTimer=null)}},{key:"calcAudioLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(e/=100)<316e-7?-90:Math.trunc(20*Math.log10(e))}},{key:"calcQualityData",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.internals){var i,o=this.internals,a=o.receiver,s=o.sender,c=o.audioReceiver,u=o.audioSender,l=o.jitterReceived,h=o.jitterSent,f=o.fractionLostSent,d=o.fractionLostReceived,p=o.roundTripTime,v=o.audioSendJitter,g=o.audioSendLost,m=void 0===g?0:g,y=o.audioRecvLost,b=void 0===y?0:y,S=0,w=[],E=0,x=this.participantCount>1?0:200,C=0,k=-90,O=0,I=this.client.getSelfRoster()||{participantId:0,endpointId:""},A=[{callUri:I.endpointId,participantId:I.participantId,sessionId:0,audioStream:[],videoStream:[]}],_=[],T=new Map,R=[],D=0,N=0,L=0,M=0,P=0;if(Object.values(s).map((function(e){var t=e.bytesSentSecond,r=e.frameWidth,i=e.frameHeight,o=e.framesEncodedSecond,a=e.resolution,s=e.isContent,c=e.expBandwidth;!!n===s&&(C+=t,O+=c,A[0].videoStream.push({fr:o,height:i,width:r}),R.push({Height:i,Width:r,framerate:o,resNum:1,resolution:a&&Ne[(a+"").toUpperCase()]||1}))})),Object.values(a).map((function(e){var t=e.frameWidth,r=void 0===t?0:t,i=e.frameHeight,o=void 0===i?0:i,a=e.framesDecodedSecond,s=void 0===a?0:a,c=e.participantId,u=e.bytesReceivedSecond,l=void 0===u?0:u,h=e.jitter,f=void 0===h?0:h,d=e.isContent,p=e.framesReceivedSecond,v=void 0===p?0:p,g=e.ExpectWidth,m=void 0===g?0:g,y=e.ExpectHeight,b=void 0===y?0:y;if(!!n===d){x+=l,S=Math.ceil(Math.max(S,f)),D+=r*o*v,N+=m*b*v;var E=r+"*"+o,C=T.get(E);C?(C.resNum+=1,C.framerate+=v,T.set(E,C)):T.set(E,{Width:r,Height:o,framerate:v,resNum:1,resolution:Ne["".concat(o,"P")]||1}),w.push({participantId:c||0,videoStream:[{fr:s,height:r,width:o}]})}})),Object.values(u).map((function(e){var r=e||{},i=r.bytesSentSecond,o=r.audioLevel,a=void 0===o?0:o,s=r.expBandwidth,c=r.isContent;!!n===c&&(O+=s,k=t.calcAudioLevel(a),E+=i)})),this.previousInternals){var j=this.previousInternals.audioReceiver;Object.values(j).map((function(e){var t=e.insertedSamplesForDecelerationSecond,r=void 0===t?0:t,i=e.removedSamplesForAccelerationSecond,o=void 0===i?0:i,a=e.totalSamplesReceivedSecond,s=void 0===a?0:a,c=e.isContent;!!n===c&&(M+=r,M+=o,P+=s)}))}Object.values(c).map((function(e){var t=e.bytesReceivedSecond,r=e.audioLevel,i=void 0===r?0:r,o=e.insertedSamplesForDecelerationSecond,a=void 0===o?0:o,s=e.removedSamplesForAccelerationSecond,c=void 0===s?0:s,u=e.totalSamplesReceivedSecond,l=void 0===u?0:u,h=e.isContent;!!n===h&&(M+=a,M+=c,P+=l,L=Math.max(L,i),E+=t||0)})),T.forEach((function(e,t){var n=e.framerate,r=e.resNum;e.framerate=n/r,_.push(e)}));var B=(null===(e=navigator.connection)||void 0===e?void 0:e.type)||"none",U=N?Math.floor(D/N*100):-1,G=P?Math.floor(M/P*100):0;i=this.calcAudioLevel(L);var K={sessionName:n,networkType:tt[B]||0,timestampSec:1e3*parseInt((new Date).getTime()/1e3+""),audioCaptureEnergy:k,audioRenderEnergy:i,audioDownLinkBw:0,audioUpLinkBw:E,avrMissLipsync:0,videoUplinkBw:C,videoDownLinkBw:x,videoPxRatio:U,videoRecvDelay:0,videoSendDelay:0,videoRecvJitter:l,videoSendJitter:h,isLast:r,recvStreams:w,sendStreams:A,videoQuality:_,videoSendQuality:R,dbaDownLinkBw:x,dbaUplinkBw:C,videoSendRtt:p,audioSendRtt:p,audioSendJitter:v,videoRecvLost:d,videoSendLost:f,audioSendLost:m,audioRecvLost:b,upExpectedBw:O,downMaxExpectedBw:3e3,downMinExpectedBw:3e3,audioPlcPct:G},H={content:Object.assign({},this.meetingQualityData,K)};this.client.sendSocketMessage({type:"PASS_THROUGH",body:{type:"dataReport",data:H}},!1,!1)}}},{key:"calcLocalNetworkLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.client.getOnHold()){var t=Y.Good,n=this.client.getWsReConnectCount(),r=this.previousInternals;if(r){var i=r.fractionLostReceived,o=r.fractionLostSent,a=r.roundTripTime,s=this.calcNetQualityLevel(o,a,n),c=this.calcNetQualityLevel(i,a,n);t=Math.min(s,c);var u=Object.values(r.sender||{}).some((function(e){return e.type===R.CONTENT}));if(this.isReportLocalNetworkLevel||u){var l=this.client.getInviteInfo(),h=l.callerUri,f=l.meetingId;this.client.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:f,endpointId:h,type:"networkParameter",networkLevel:t}})}(this.networkLevel!==t||e)&&(this.networkLevel=t,this.client.emmit("networkLevel",t))}}}},{key:"calcNetQualityLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Y.Excellent,i=Y.Good,o=Y.Poor,a=Y.Bad,s=r;return e>30||t>300||n>3?s=a:e>20&&e<30||t>200&&t<300||3===n?s=o:(e>10&&e<20||t>100&&t<200||2===n)&&(s=i),s}}]),e}();const Vr=function(){function e(){c(this,e),this.waitingQueue=[],this.isRunning=!1,this.taskCompletedCB=null}return f(e,[{key:"onTaskCompleted",value:function(e){this.taskCompletedCB=e}},{key:"addTask",value:function(e){var t=this;return new Promise((function(n,r){t.isRunning?t.waitingQueue.push({task:e,resolve:n,reject:r}):(t.isRunning=!0,t.execute(e,n,r))}))}},{key:"execute",value:function(e,t,n){var r=this;e().then((function(e){return t(e)})).catch((function(e){return n(e)})).finally((function(){if(r.waitingQueue.length){var e=r.waitingQueue.shift();e&&r.execute(e.task,e.resolve,e.reject)}else r.isRunning=!1,r.taskCompletedCB&&r.taskCompletedCB()}))}},{key:"taskLength",value:function(){return this.waitingQueue.length}},{key:"clear",value:function(){this.waitingQueue=[],this.isRunning=!1}}]),e}();var Yr={version:"3.7.30",zh_CN:{"MMS:unmute.video.timeout":"{dn}已拒绝开启摄像头","MMS:voice.mode":"{dn}已拒绝开启摄像头","MMS:no.camera.permission":"{dn}已拒绝开启摄像头","MMS:called":"您正在被主会场点名","MMS:supervised":"正在接受主会场督导","MMS:driving.mode":"{dn}已拒绝开启摄像头","MMS:device.bt.limit":"当前终端受带宽限制,不支持开启摄像头","MMS:test":"测试","MMS:callroll":"主会场正在点名","MMS:reject.unmute.video":"{dn}已拒绝开启摄像头"},zh_TW:{"MMS:unmute.video.timeout":"{dn}已拒絕開啟攝像頭","MMS:voice.mode":"{dn}已拒絕開啟攝像頭","MMS:no.camera.permission":"{dn}已拒絕開啟攝像頭","MMS:called":"您正在被主會場點名","MMS:supervised":"正在接受主會場督導","MMS:driving.mode":"{dn}已拒絕開啟攝像頭","MMS:device.bt.limit":"當前終端受帶寬限製,不支持開啟攝像頭","MMS:test":"测试","MMS:callroll":"主會場正在點名","MMS:reject.unmute.video":"{dn}已拒絕開啟攝像頭"},en_US:{"MMS:voice.mode":"{dn} refused to turn on the camera","MMS:no.camera.permission":"{dn} refused to turn on the camera","MMS:nmute.video.timeout":"{dn} refused to turn on the camera","MMS:called":"You are being called by host","MMS:supervised":"Meeting supervision is on-going by host","MMS:driving.mode":"{dn} refused to turn on the camera","MMS:device.bt.limit":"The terminal does not support enabling the camera currently due to bandwidth limitation.","MMS:test":"test","MMS:callroll":"Calling roll at the main place","MMS:reject.unmute.video":"{dn} refused to turn on the camera"}};function zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}var Wr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Xr=function(e){v(r,e);var n=zr(r);function r(e,t){var i,o;c(this,r),(i=n.call(this)).logger=t,i.logger.start(),zt.setLogger(i.logger),i.clientErrorState="NONE",i.callInfo={token:"",confNumber:""},i.onhold=!1,i.logger.log("Version: ",Mt),i.logger.log("System info: ",navigator.userAgent),i.logger.log("Location: ",window.location),i.logger.log("Init config: ",e),i.config=e,i.config.clientId||i.logger.warn("The clientId is required!!"),i.config.clientSecret||i.logger.warn("The clientSecret is required!!"),i.setActionInfo(),e.layout&&(i.config.layout=e.layout.toUpperCase()),i.iauth=new Un(i.logger),i.autoMode=(null===(o=e.layout)||void 0===o?void 0:o.toUpperCase())===E.AUTO,i.debug=!!e.debug,i.localHide=!!e.localHide;var a,s,u,l,h,f=r.getHideId(e);return i.hideId=f,i.config.__hideId=f,i.featureConfig=gt,i.disconnected=!1,i.clientStatus=!0,i.peerConnectionStatus=!1,i.isAutoBandwidth=!0,i.seq=0,i.token="",i.speakerInfo={endpointId:"",pid:0},i.stream=null,i.rosters=[],i.videoTrackList=[],i.audioTrackList=[],i.layoutManager=new Br(d(i)),i.meeting=new Kr(d(i),i.logger),i.layoutRosters={content:[],people:[],total:[]},i.pushType="ALL",i.cacheMeetingControlMessage=null,i.rotationInfo={people:[],content:[],total:[]},i.customLayoutSeq=0,i.contentSenderPid=0,i.invite={callerUri:"",callIndex:0,automute:"",meetingId:""},i.shareContentTimer=null,i.shareContentStatus=b.ENDED,i.streamChangeList={content:[],people:[]},i.autoSwitchDevice=!0,i.audioManagers={},i.customLayoutCacheList=null,i.contentOnholdInfo={is:!1,audioTrackId:"",contentUrl:""},i.deviceManager=null,i.isPermissionDenied={camera:!1,microphone:!1},i.contentMode=w.VIDEO,i.isSubscribeBulkRoster=!1,i.isSubscribeTranslation=!1,i.recordState="",i.cacheSpeakersInfo=[],i.speakersInfo=[],i.errorcode=en.get("xy-error-code")||Q,i.i18nCode=en.get("xy-i18n-code")||Yr,i.onScreenChangeEvent=i.onScreenChangeEvent.bind(d(i)),i.onDocumentChange=(a=i.onScreenChangeEvent,s=15,u=30,h=null,function(){var e=+new Date,t=this,n=arguments;h&&clearTimeout(h),l||(l=e),e-l>=u?(a.apply(t,n),l=e):h=setTimeout((function(){a.apply(t,n)}),s)}),i.deviceManager=new xn(i.logger),i.initDeviceManagerEvent(),i.qualityManager=new Fr(d(i)),i.isShareContent=!1,i.handStatus=!1,i.facingMode=k.FRONT,i.wsReConnectCount=0,i.operateQueue=new Vr,i.localSpeakerTimer=null,i.logger.log("Merged config: ",i.config),i}return f(r,[{key:"getLoginInfo",value:function(){return this.iauth.getLoginInfo()}},{key:"getFeatureConfig",value:function(){return this.featureConfig}},{key:"getCallInfo",value:function(){return this.callInfo}},{key:"getClientConfig",value:function(){return this.config}},{key:"getAutoMode",value:function(){return this.autoMode}},{key:"getVideoManagers",value:function(){var e;return null===(e=this.layoutManager)||void 0===e?void 0:e.getVideoManagers()}},{key:"getPreviewStreams",value:function(){var e;return(null===(e=this.stream)||void 0===e?void 0:e.getMediaStreams())||{previewStreams:[]}}},{key:"getVideoTrackList",value:function(){return this.videoTrackList}},{key:"getLayoutRosters",value:function(){return this.layoutRosters}},{key:"getOriginRosters",value:function(){return this.rosters}},{key:"getInviteInfo",value:function(){return this.invite}},{key:"getContentSenderPid",value:function(){return this.contentSenderPid}},{key:"getSpeakerInfo",value:function(){return this.speakerInfo}},{key:"getLocalHide",value:function(){return this.localHide}},{key:"getRotationInfo",value:function(){return this.rotationInfo.total}},{key:"getPeerConnectionStatus",value:function(){return this.peerConnectionStatus}},{key:"getOnHold",value:function(){return this.onhold}},{key:"getAudioTrackList",value:function(){return this.audioTrackList||[]}},{key:"getLayoutMap",value:function(){var e,t;return this.layoutManager?this.autoMode?null===(e=this.layoutManager)||void 0===e?void 0:e.getLayoutMap():null===(t=this.layoutManager)||void 0===t?void 0:t.getCustomLayoutMap():new Map}},{key:"getSelfRoster",value:function(){var e;return null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster()}},{key:"getLocalShareContent",value:function(){return this.isShareContent}},{key:"getFacingMode",value:function(){return this.facingMode}},{key:"getWsReConnectCount",value:function(){return this.wsReConnectCount}},{key:"getLayoutAvatarType",value:function(){return this.meeting.getLayoutAvatarType()}},{key:"getEnterpriseMediaConfig",value:function(){return this.meeting.getEnterpriseMediaConfig()}},{key:"setOnHold",value:function(e){this.onhold=e}},{key:"loginXYlinkAccount",value:function(e,n){return Wr(this,void 0,void 0,t().mark((function r(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] login xylink account:",{userName:e,password:n}),t.prev=1,t.next=4,this.verifyParameter();case 4:t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(1),t.abrupt("return",t.t0);case 9:return t.next=11,this.iauth.login({userName:e,password:n});case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),r,this,[[1,6]])})))}},{key:"loginExternalAccount",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] login external account:",e),t.prev=1,t.next=4,this.verifyParameter();case 4:t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(1),t.abrupt("return",t.t0);case 9:return t.next=11,this.iauth.loginExternalAccount(e);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),n,this,[[1,6]])})))}},{key:"loginWithAuthCode",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] login width auth code:",e),t.next=3,this.iauth.loginWithAuthCode(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),n,this)})))}},{key:"resetInitParameter",value:function(){this.debug=!1,this.localHide=!!this.config.localHide,this.hideId=this.config.__hideId,this.isPermissionDenied={camera:!1,microphone:!1},this.isSubscribeBulkRoster=!1,this.isSubscribeTranslation=!1}},{key:"setContentMode",value:function(e){this.contentMode=e}},{key:"setFeatureConfig",value:function(e){if(this.logger.log("[client]set feature config: ",e),!ae.isObject(e))return this.logger.warn("[client]rejected because params error"),ie("XYSDK:950101");this.featureConfig=Object.assign(Object.assign(Object.assign({},gt),this.featureConfig),e),this.logger.log("merged feat config: ",this.featureConfig),this.featureConfig.enableAutoResizeLayout&&this.autoMode&&this.initWindowResizeEvent()}},{key:"getConfMgmtUrl",value:function(){return this.logger.log("[client] getConfMgmtUrl"),this.meeting.getConfMgmtUrl()}},{key:"toggleLocal",value:function(){var e=this;return this.logger.log("[client] toggleLocal:",this.autoMode),new Promise((function(t,n){var r;e.autoMode?(e.localHide=!e.localHide,null===(r=e.layoutManager)||void 0===r||r.calcRequestNewLayout(),e.sendsOriginOrderRosterMessage(),t({status:e.localHide})):(e.localHide=!e.localHide,t({status:e.localHide}))}))}},{key:"toggleHideId",value:function(){var e=this;return this.logger.log("[client] toggleHideId:",this.hideId),new Promise((function(t,n){e.hideId=e.hideId?"":e.config.__hideId,e.sendSocketMessage({type:"UPDATE_HIDEID",hideId:e.hideId}),t(!!e.hideId)}))}},{key:"setVideoRenderer",value:function(e,t){var n;this.logger.log("[client] setVideoRenderer:",{key:e,wrapEleId:t}),null===(n=this.layoutManager)||void 0===n||n.setVideoRenderer(e,t)}},{key:"removeVideoRender",value:function(e,t){var n;this.logger.log("[client] removeVideoRender:",{key:e,wrapEleId:t}),null===(n=this.layoutManager)||void 0===n||n.removeVideoRenderer(e,t)}},{key:"playVideo",value:function(e){var t=this;return this.logger.log("[client] playVideo:",e),new Promise((function(n,r){var i;try{null===(i=t.layoutManager)||void 0===i||i.playVideo(e),n(!0)}catch(e){t.logger.log("video replay failed:",e),r(!1)}}))}},{key:"playAudio",value:function(){var e=this;return this.logger.log("[client] playAudio:"),new Promise((function(n,r){return Wr(e,void 0,void 0,t().mark((function e(){var i,o,a,s;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,i=0,o=Object.keys(this.audioManagers);case 2:if(!(i<o.length)){e.next=19;break}if(!(a=o[i])){e.next=16;break}if(!(null==(s=this.audioManagers[a].ele)?void 0:s.srcObject)){e.next=16;break}return e.prev=7,e.next=10,s.play();case 10:this.logger.log("audio replay success..."),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),this.logger.log("audio replay failed:",e.t0);case 16:i++,e.next=2;break;case 19:n(!0),e.next=26;break;case 22:e.prev=22,e.t1=e.catch(0),this.logger.log("audio replay failed:",e.t1),r(!1);case 26:case"end":return e.stop()}}),e,this,[[0,22],[7,13]])})))}))}},{key:"switchCamera",value:function(e){var n,r,i;return Wr(this,void 0,void 0,t().mark((function o(){var a,s,c,u,l,h=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]invoke switchCamera: ",e),a=this.getSelfRoster(),s=(a||{videoTxMute:!1}).videoTxMute,!e||yt.includes(e)){t.next=6;break}return this.logger.log("only support:",yt),t.abrupt("return",Promise.reject(ie("XYSDK:950101")));case 6:if(!s&&this.facingMode!==e){t.next=8;break}return t.abrupt("return",this.facingMode);case 8:return e||(c=yt.findIndex((function(e){return e===h.facingMode})),u=c+1>=yt.length?0:c+1,e=yt[u]),this.logger.log("switch camera final facing mode: ",e),t.next=12,null===(n=this.deviceManager)||void 0===n?void 0:n.getCameraDeviceByMode(e);case 12:if(!(null==(l=t.sent)?void 0:l.deviceId)||!this.stream){t.next=20;break}return t.next=16,this.stream.switchDevice(A.VIDEO,l.deviceId);case 16:return this.facingMode=e,null===(r=this.layoutManager)||void 0===r||r.playLocalVideo(),this.autoMode&&(null===(i=this.layoutManager)||void 0===i||i.createLayout()),t.abrupt("return",this.facingMode);case 20:return t.abrupt("return",this.facingMode);case 21:case"end":return t.stop()}}),o,this)})))}},{key:"setAudioRenderer",value:function(e,n){var r,i;return Wr(this,void 0,void 0,t().mark((function o(){var a,s,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]setAudioRenderer:",e),this.audioManagers[e]||(this.audioManagers[e]={ele:n}),!(a=this.audioManagers[e])||!a.ele||a.ele.srcObject){t.next=20;break}if(!((s=this.audioTrackList.findIndex((function(t){return t.rest.streamId===e})))>=0)){t.next=20;break}return c=this.audioTrackList[s].data.streams[0],a.ele.srcObject=c,t.prev=8,t.next=11,a.ele.play();case 11:u=null===(r=this.stream)||void 0===r?void 0:r.initConfig.devices,this.stream&&u&&u.audioOutputValue&&"default"!==u.audioOutputValue&&(null===(i=this.deviceManager)||void 0===i||i.setAudioOutputDevice(a.ele,u.audioOutputValue)),this.logger.log("audio play success: ",c.id),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(8),this.emmit("play-failed",{type:"audio",key:e,error:t.t0}),this.logger.warn("audio play error: ",t.t0);case 20:case"end":return t.stop()}}),o,this,[[8,16]])})))}},{key:"switchAutoDevice",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.logger.log("[client] switchAutoDevice",t),new Promise((function(n){e.autoSwitchDevice=!!t,n(e.autoSwitchDevice)}))}},{key:"setActionInfo",value:function(){var e=this.config,t=e.server,n=void 0===t?"":t,r=e.httpServer,i=e.wssServer,o=e.logServer,a=e.clientId,s=e.clientSecret,c=void 0===s?"":s,u=e.checkSSL,l=Gt.protocol,h=Gt.wssProtocol;(void 0===u||u)&&(h=Ut[l="https:"]),this.config.httpServer=r||"".concat(l,"//").concat(n),this.config.wssServer=i||"".concat(h,"//").concat(n);var f=o||en.get("xy-log-server");zt.setBaseUrl(this.config.httpServer,f),zt.setClientInfo({clientId:a,clientSecret:c})}},{key:"sendV2States",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.featureConfig.enableV2States&&zt.setStates(e,t,n)}},{key:"switchLayout",value:function(e){var t=this;return this.logger.log("[client] switchLayout: ",e),new Promise((function(n,r){var i;t.autoMode?(e=(null===(i=t.layoutManager)||void 0===i?void 0:i.switchLayout(e))||"SPEAKER",t.sendV2States("oper-confOperation","layout"),n(e)):r(ie("XYSDK:950601"))}))}},{key:"setPageInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.logger.log("[client] setPageInfo: ",t),!this.autoMode)return Promise.reject(ie("XYSDK:950603"));null===(e=this.layoutManager)||void 0===e||e.setPageInfo(t)}},{key:"checkPermissionWithMeetingNumber",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.meeting.checkPermissionWithMeetingNumber();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.meeting.checkStorageSpaceWithRecordingUrl(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),n,this)})))}},{key:"handleSocketMessage",value:function(e,t){if(!this.disconnected)switch(e.type){case"CALL_INDEX":this.onCallIndexMessage(e);break;case"CONNECTED":t(this.clientStatus&&!this.disconnected),this.onConnectedMessage(e);break;case"confMgmtReport":this.logger.log("Get meeting control confMgmtReport message: ",e),this.onMeetingControlMessage(e);break;case"SUB_TITLE":this.logger.log("Get meeting control SUB_TITLE message: ",e),this.onSubTitle(e);break;case"CANCEL_HANGUP":this.logger.log("Get CANCEL_HANGUP message: ",e),this.emmit("cancel-handup",!0);break;case"WAITING_STATE":this.logger.log("Get WAITING_STATE message:",e),this.handleWaitingState(e);break;case"PASS_THROUGH":this.onPassThroughMessage(e);break;case"mediaNotifyInfo":this.logger.log("Get mediaNotifyInfo message: ",e);break;case"MEDIA_CHANGED":this.logger.log("Get MEDIA_CHANGED message: ",e),this.onMediaChangedMessage();break;case"DIS_CONNECTED":this.logger.log("Get disconnected message: ",e),this.onDisConnectedMessage(e);break;case"CALL_EXCEPTION_REPORT":this.logger.log("Get exception message: ",e),this.onCallExceptionMessage(e);break;case"DualStreamReport":this.logger.log("Get share stream message: ",e),this.onDualStreamMessage(e);break;case"MONITOR_STATE_REPORT":this.logger.log("Get monitor state report: ",e),this.onMonitorReportMessage(e);break;case"RecordingStateChanged":this.logger.log("Get recording state changed:",e),this.onRecordingStateChangedMessage(e);break;case"RecordStatusNotification":this.logger.log("Get record status notification:",e),this.onRecordStatusNotfiMessage(e);break;case"EPMESSAGE":this.logger.log("Get EPMESSAGE message:",e),this.onEPMessage(e);break;default:this.logger.log("接收到其他ws消息",e)}}},{key:"onEPMessage",value:function(e){var t=JSON.parse(e.body),n=t.value;if("toast"===t.key){var r=n.dn,i=void 0===r?"":r,o=n.message,a=void 0===o?"":o,s=a,c=this.i18nCode[ee][a];c&&(s=c.replace("{dn}",i)),n.message=s}this.emmit("meeting-control-video",t)}},{key:"sendVideoControlResult",value:function(e,n){return Wr(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]invoke sendVideoControlResult: ",{type:e,data:n}),ae.isObject(n)){t.next=4;break}return this.logger.log("[client]invoke params error"),t.abrupt("return",Promise.reject(ie("XYSDK:950101",n)));case 4:return i=JSON.stringify(n),t.next=7,zt.sendVideoControlResult(e,i);case 7:return t.abrupt("return",Promise.resolve(ie("XYSDK:950120",{},"success")));case 8:case"end":return t.stop()}}),r,this)})))}},{key:"onRecordStatusNotfiMessage",value:function(e){var t,n=e.callUri;e.isLocal=n===(null===(t=this.getSelfRoster())||void 0===t?void 0:t.endpointId),this.emmit("record-status-notification",e)}},{key:"onRecordingStateChangedMessage",value:function(e){var t=e.reason,n=e.state;this.recordState=n;var r=this.errorcode[ee][t];"CHARGE:641"===t&&(r=this.meeting.getRecordPermission().developerMessage+r);e.reasonText=r,this.emmit("recording-state-changed",e)}},{key:"onDualStreamMessage",value:function(e){var t,n,r,i,o,a=this,s=e.state,c=function(){a.shareContentTimer&&clearTimeout(a.shareContentTimer),a.shareContentTimer=null};if("SENDING"===s)this.shareContentStatus=b.STARTING,null===(t=this.stream)||void 0===t||t.emmit("start-share-content",{}),null===(n=this.layoutManager)||void 0===n||n.setLocalShareContent(!0),this.sendV2States("oper-confOperation","content",{contentType:"desk"}),c();else if("IDLE"===s){var u=_n[ee].SHARE_CONTENT_FAILED;"STATE:200"===e.code?null===(r=this.stream)||void 0===r||r.emmit("stop-share-content",{}):(e.code&&this.errorcode&&this.errorcode[ee]&&(u=this.errorcode[ee][e.code]),null===(i=this.stream)||void 0===i||i.emmit("stop-share-content",ie("XYSDK:950512",{message:u}))),null===(o=this.layoutManager)||void 0===o||o.setLocalShareContent(!1),this.shareContentStatus=b.ENDED,c()}}},{key:"onCallExceptionMessage",value:function(e){var t=_n[ee][e.exception];e.code&&this.errorcode&&(t=this.errorcode[ee][e.code]),t=t||_n[ee].default,this.disconnected=!0,this.emmit("disconnected",ie("XYSDK:950230",{message:t})),this.close("SERVER_INNER_ERROR")}},{key:"onDisConnectedMessage",value:function(e){var t=e.detail,n=void 0===t?"default":t,r=e.code,i=void 0===r?"STATE:200":r,o=e.reason,a=void 0===o?"":o,s=_n[ee][n];"KickoutTipContent"!==n&&"The device locked"!==n&&"OK"!==n&&i&&this.errorcode&&(s=this.errorcode[ee][e.code]),s=s||_n[ee].default,this.disconnected=!0;var c={message:s,code:i,detail:n,reason:a};this.logger.log("emmit disconnected msg:",c),this.emmit("disconnected",ie("XYSDK:950230",c)),this.clientStatus=!1,this.stream&&this.stream.close(),this.close("SERVER_INNER_ERROR")}},{key:"onMediaChangedMessage",value:function(){var e;this.peer&&this.stream&&(this.peer.close(),this.peer=new jn(this,this.stream),this.peer.setRestartIceConnection(!0),this.peer.publish(this.stream,y.VIDEO_AUDIO_PIPE),this.isShareContent&&(null===(e=this.peer)||void 0===e||e.publish(this.stream,y.CONTENT))),this.sendConfParam(),this.isSubscribeBulkRoster&&this.subscribeBulkRoster(),this.sendWebRxBandwidth(),this.isSubscribeTranslation&&this.startTranslation(),this.videoTrackList=[],this.audioTrackList=[],this.emmit("media_changed_migrate",!0)}},{key:"onCallIndexMessage",value:function(e){var t;if(this.invite=Object.assign(Object.assign({},this.invite),e),this.logger.log("Get callIndex message: ",this.invite),this.autoMode){var n=null===(t=this.layoutManager)||void 0===t?void 0:t.getScreenInfo();n&&this.sendScreenInfoMessage(n)}}},{key:"onConnectedMessage",value:function(e){var t=S.UNMUTE_AUDIO,n=S.MUTE_AUDIO;this.invite=Object.assign(Object.assign({},this.invite),e),this.logger.log("Get connected message: ",this.invite),this.setLocalRosterStatus(),this.emitAudioStatus(this.config.muteAudio?n:t),this.meeting.handleConferenceInfo(),this.featureConfig.enableCheckRecordPermission&&this.meeting.checkPermissionWithMeetingNumber(),this.meeting.handleUserInfo();var r=this.invite,i=r.meetingId,o=r.callerUri,a=r.vcNumber,s=void 0===a?"":a;zt.setMeetingInfo({meetingId:i,callUri:o,vcNumber:s}),this.meeting.setEnterpriseConfig(),this.sendV2States("sta-confStatus","callIn",{callType:"initiativeJoin",appName:this.config.isThird?ht:lt,audioMute:this.config.muteAudio,videoMute:this.config.muteVideo})}},{key:"setLocalRosterStatus",value:function(){var e,t=this.iauth.getLoginInfo().extUserId;null===(e=this.layoutManager)||void 0===e||e.setLocalStatus({endpointId:this.invite.callerUri,participantId:Ge,id:this.invite.callerUri+0,audioTxMute:this.config.muteAudio,videoTxMute:this.config.muteVideo,extUserId:t})}},{key:"onMonitorReportMessage",value:function(e){var t=e.code,n=e.monitorInfo,r=n.failUriList,i=this.errorcode[ee],o=JSON.parse(JSON.stringify(r));if(o=o.map((function(e){var t="未知错误",n=e.status;return"SIG:412"===n||"SIG:4464"===n?t="终端暂不支持":i&&(t=i[n]),Object.assign(Object.assign({},e),{message:t})})),"STATE:200"===t)this.emmit("start-monitor-report",{monitorInfo:Object.assign(Object.assign({},n),{failUriList:o})});else{var a="";t&&i&&(a=i[t]),this.emmit("stop-monitor-report",ie("XYSDK:950312",{message:a}))}}},{key:"makeCall",value:function(e){var n,r,i;return Wr(this,void 0,void 0,t().mark((function o(){var a,s,c,u,l,h,f=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] makeCall params: ",e),a=window.location,s=a.protocol,c=a.hostname,u=e.token,l=e.confNumber,"https:"===s||"localhost"===c||!this.config.checkSSL){t.next=5;break}return t.abrupt("return",Promise.reject(ie("XYSDK:950130")));case 5:if("[object Object]"===Object.prototype.toString.call(e)){t.next=7;break}return t.abrupt("return",Promise.reject(ie("XYSDK:950101",e)));case 7:if(u&&l){t.next=9;break}return t.abrupt("return",Promise.reject(ie("XYSDK:950101",e)));case 9:if(this.clientStatus){t.next=11;break}return t.abrupt("return",Promise.reject(ie("XYSDK:950201")));case 11:return null===(n=this.layoutManager)||void 0===n||n.setLocalStatus({displayName:e.displayName||""}),t.next=14,null===(r=this.deviceManager)||void 0===r?void 0:r.emmitDevices();case 14:return t.prev=14,t.next=17,this.getBasicInfo(e);case 17:if(!this.config.isVerifyMeetingId){t.next=23;break}return t.next=20,this.verifyMeeting(e);case 20:if(!(h=t.sent)||h.success){t.next=23;break}return t.abrupt("return",Promise.reject(h.data));case 23:t.next=30;break;case 25:return t.prev=25,t.t0=t.catch(14),this.logger.log("make call error:",t.t0),this.close(),t.abrupt("return",Promise.reject(ie(Z[null===(i=null===t.t0||void 0===t.t0?void 0:t.t0.data)||void 0===i?void 0:i.errorCode]||"XYSDK:950106",t.t0)));case 30:return t.abrupt("return",new Promise((function(e,t){f.initWss(e,t)})));case 31:case"end":return t.stop()}}),o,this,[[14,25]])})))}},{key:"startCall",value:function(){var e=this.callInfo,t=e.confNumber,n=e.displayName,r=void 0===n?"":n,i=e.password,o=void 0===i?"":i,a=e.meeting,s=this.config,c=s.__hideId,u=void 0===c?"":c,l=s.__monitorMode,h=void 0===l?"":l,f=s.muteAudio,d=s.muteVideo,p=(a||{callUrl:t+"@CONFNO"}).callUrl,v=void 0===p?"":p,g=this.iauth.getLoginInfo().cellPhone;this.invite.callIndex||this.sendSocketMessage({type:"START_CALL",calleeNumber:v,displayName:r,pwd:o,callMode:"AUDIO_VIDEO",mediaAppend:{audioEncCapList:[99],videoEncCapList:[106]},hideId:u,monitorMode:h,callerNumber:g,muteAudio:f,muteVideo:d})}},{key:"stopCall",value:function(e){if(this.invite.callIndex){var t=this.invite.callIndex;this.disconnected?e="SERVER_INNER_ERROR":"PUBLISH_ERROR"===this.clientErrorState?e="PEER_NET_DISCONNECT":"WS_CLOSE"!==this.clientErrorState&&"WS_ERROR"!==this.clientErrorState||(e="LOCAL_NET_DISCONNECT"),this.sendSocketMessage({type:"STOP_CALL",reason:e,code:it[e],callIndex:t},!1)}}},{key:"publish",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isShareContent:!1,isShareFile:!1,isShareWhiteBoard:!1,isSharePeople:!1};if(this.logger.log("[client] publish:",r),this.logger.log("get network when publish:",On.getNetWork()),this.clientStatus&&!this.disconnected)if(this.isShareContent=!!r.isShareContent,r.isSharePeople)try{this.stream=e,this.peer=new jn(this,e),e.setClientObj(this),this.peer.publish(e,y.VIDEO_AUDIO_PIPE),this.autoMode||null===(t=this.layoutManager)||void 0===t||t.initLayoutManager(),this.initTrackEvent()}catch(e){this.logger.error("publish error: ",e),this.clientErrorState="PUBLISH_ERROR",this.emmit("call-status",ie("XYSDK:950517",e))}else r.isShareContent&&(null===(n=this.peer)||void 0===n||n.publish(e,y.CONTENT))}},{key:"sendContentCapability",value:function(){if(this.isShareContent){var e=this.invite,t=e.callIndex,n=e.callerUri,r=void 0===n?"":n,i=e.meetingId,o=P.VIDEO,a=P.AUDIO,s=_.NORMAL,c=[],u=[];if(this.stream)this.stream.getMediaStreams().contentStreams.filter((function(e){return e.status===s})).forEach((function(e){var t=e.stream,n=e.resolution,r=e.kind,i={streamId:(null==t?void 0:t.id)||"",resolution:ot.MAP_RESOLUTION_INDEX[n]};r===o?c.push(i):r===a&&u.push(i)})),this.logger.log("content capability streams: ",{videoStreamCapability:c,audioStreamCapability:u}),this.sendSocketMessage({type:"PASS_THROUGH",callIndex:t,body:{type:"contentCapability",meetingId:i,version:2,endpointId:r,streams:c,audioStreams:u}})}}},{key:"applyShareContent",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n,r,i=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=b.PENDING,r=b.ENDED,this.shareContentStatus=n,this.sendSocketMessage({type:"START_CONTENT",mode:this.contentMode,enableAnnotation:!1}),this.shareContentTimer=setTimeout((function(){var e;i.shareContentStatus===n&&(i.shareContentStatus=r,null===(e=i.stream)||void 0===e||e.emmit("stop-share-content",{}),i.shareContentTimer&&(clearTimeout(i.shareContentTimer),i.shareContentTimer=null))}),1e4);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"stopShareContent",value:function(){var e=this;this.logger.log("[client] stopShareContent");var t=b.STARTING,n=b.PENDING,r=b.ENDED;return this.isShareContent=!1,new Promise((function(i,o){try{e.shareContentStatus!==t&&e.shareContentStatus!==n||e.sendSocketMessage({type:"STOP_CONTENT",mode:e.contentMode}),e.peer&&e.peer.closeContentStream(),e.stream&&e.stream.closeContentStream(),e.shareContentStatus=r,e.streamChangeList.content=[],i(!0)}catch(e){o(ie("XYSDK:950513",e))}}))}},{key:"initTrackEvent",value:function(){var e=this;this.on("track",(function(t){var n=t.track,r=n.id,i=n.kind,o=t.streams[0]||{};e.logger.log("client onTrack event: ",{track:{id:r,kind:i},stream:null==o?void 0:o.id}),t&&t.track.kind&&e.mergeTrackList(t)}))}},{key:"handleContentOnholdAudio",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.contentOnholdInfo,n=e.streamId,r=e.track,i=t.audioTrackId,o=t.contentUrl;n===i&&(r.enabled=!!o,this.logger.log("content audio track when content onhold,",n))}},{key:"mergeTrackList",value:function(e){var t,n=e.track,r=n.kind,i=n.id,o={streamId:e.streams[0].id,track:n,trackId:i},a={status:"remote",data:e,rest:o};"video"===r?(this.videoTrackList.push(a),null===(t=this.layoutManager)||void 0===t||t.updateStreams(),this.emmit("video-track",this.videoTrackList)):"audio"===r&&(this.handleContentOnholdAudio(o),this.audioTrackList.push(a),this.emmit("audio-track",this.audioTrackList))}},{key:"destroy",value:function(){var e=this;return this.logger.log("[client] destroy"),new Promise((function(t,n){var r;try{null===(r=e.stream)||void 0===r||r.close(),e.close(),t(!0)}catch(e){n(ie("XYSDK:950204",e))}}))}},{key:"close",value:function(){var e,t,n,r=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"OK";this.logger.log("[client] close:",i),null===(e=this.qualityManager)||void 0===e||e.stopReportData(),this.operateQueue.clear(),this.resetInitParameter(),this.contentOnholdInfo={is:!1,audioTrackId:"",contentUrl:""},this.clientStatus&&(this.clientStatus=!1,this.stopShareContent(),this.stopCall(i),this.peer&&this.peer.close(),this.removeWindowResizeEvent(),this.removeAllListener(),this.clearSpeakerTimer(),null===(t=this.layoutManager)||void 0===t||t.clearInvalidVideoManagers(),null===(n=this.layoutManager)||void 0===n||n.setForceFullScreenId(),this.socketTask&&this.socketTask.close(),this.deviceManager&&this.deviceManager.destroy(),this.customLayoutSeq=0,this.audioManagers={},this.layoutManager=null,this.deviceManager=null,this.handStatus=!1,this.facingMode=k.FRONT,this.wsReConnectCount=0,this.logger.log("client closed successfully"),setTimeout((function(){var e;null===(e=r.logger)||void 0===e||e.stop()}),5))}},{key:"getConference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{autoMute:0};return Wr(this,void 0,void 0,t().mark((function o(){var a,s,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] getConference:",{id:e,sk:n,token:r,params:i}),a=this.iauth.getLoginInfo(),s=n||(null==a?void 0:a.securityKey),c=e||(null==a?void 0:a.id),t.prev=4,zt.setTokenInfo(r),t.next=8,zt.getConference(c,s,i);case 8:if(200!==(null==(u=t.sent)?void 0:u.status)){t.next=13;break}return t.abrupt("return",u.data);case 13:return t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:{}}));case 14:t.next=19;break;case 16:return t.prev=16,t.t0=t.catch(4),t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:t.t0}));case 19:case"end":return t.stop()}}),o,this,[[4,16]])})))}},{key:"getServerConfig",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h,f,d,p,v;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=en.get("xy-error-code"),r=en.get("xy-i18n-code"),i=en.get("xy-timestamp"),o=(new Date).valueOf(),a=re(Number(i),Number(o)),s=["logServer"],c=!1,n&&r&&a<1||(s=["i18n","errorcode","logServer"],c=!0),e.next=11,zt.getServerConfig(s);case 11:if(!(u=e.sent)||200!==u.status||!u.data){e.next=22;break}if(l=u.data,h=l.errorcode,f=l.i18n,d=void 0===f?"{}":f,p=l.logServer,v=void 0===p?"":p,en.set("xy-log-server",v),this.config.logServer=v,zt.setLogBaseUrl(this.config.logServer),!c){e.next=22;break}return e.next=20,this.getCodeByJson("errorcode",h,n);case 20:return e.next=22,this.getCodeByJson("i18n",d,r);case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),this.logger.log("getServerConfig error:",e.t0);case 27:case"end":return e.stop()}}),e,this,[[0,24]])})))}},{key:"getCodeByJson",value:function(e,n,r){return Wr(this,void 0,void 0,t().mark((function i(){var o,a,s,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=null==r?void 0:r.version,n="string"==typeof n?JSON.parse(n):n,s=(a=n).link,c=a.version,u=(new Date).valueOf(),c!==o){t.next=6;break}return t.abrupt("return");case 6:if(t.t0=s,!t.t0){t.next=11;break}return t.next=10,zt.getCodeByJson(s);case 10:t.t0=t.sent;case 11:(l=t.t0)&&("errorcode"===e?(this.errorcode=l,en.set("xy-error-code",this.errorcode)):"i18n"===e&&(this.i18nCode=l,en.set("xy-i18n-code",this.i18nCode)),en.set("xy-timestamp",u));case 13:case"end":return t.stop()}}),i,this)})))}},{key:"operateVideoAudio",value:function(e){var n=this;return new Promise((function(r,i){return Wr(n,void 0,void 0,t().mark((function n(){var o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,w,E,x,C;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("video or audio operate: ",e),!this.stream){t.next=46;break}if(d=S.MUTE_AUDIO,p=S.MUTE_VIDEO,v=S.UNMUTE_AUDIO,g=S.UNMUTE_VIDEO,m=[d,p,v,g],b=(y=nt[e]).type,w=y.enabled,E=y.reportEventType,m.includes(e)){t.next=8;break}return this.logger.log("Params invalid"),t.abrupt("return",i(ie("XYSDK:950101")));case 8:if(this.peer){t.next=11;break}return this.logger.log("Send peer channel not found"),t.abrupt("return",i(ie("XYSDK:950202")));case 11:if(t.prev=11,e!==v){t.next=20;break}return t.next=15,this.operateStreamStatus(e);case 15:this.sendSocketMessage({type:b}),null===(o=this.layoutManager)||void 0===o||o.setLocalStatus({audioTxMute:!w}),this.emitAudioStatus(e),this.onSpeakerInfoMessage(),null===(a=this.stream)||void 0===a||a.updateDeviceByLocalStream();case 20:if(e!==g){t.next=30;break}return t.next=23,this.operateStreamStatus(e);case 23:null===(s=this.layoutManager)||void 0===s||s.setLocalStatus({videoTxMute:!w}),null===(c=this.layoutManager)||void 0===c||c.updateLocalTrack(),null===(u=this.layoutManager)||void 0===u||u.playLocalVideo(),this.isAutoBandwidth&&this.streamChange&&(x=this.streamChange,C=this.peer,this.stream.handleChangeStream(x,C,x.mediagroupid||0)),this.emitVideoStatus(e),this.sendSocketMessage({type:b}),null===(l=this.stream)||void 0===l||l.updateDeviceByLocalStream();case 30:if(e===p&&(null===(h=this.layoutManager)||void 0===h||h.setLocalStatus({videoTxMute:!w}),this.emitVideoStatus(e)),e===d&&(null===(f=this.layoutManager)||void 0===f||f.setLocalStatus({audioTxMute:!w}),this.emitAudioStatus(e)),e!==p&&e!==d){t.next=36;break}return this.sendSocketMessage({type:b}),t.next=36,this.operateStreamStatus(e);case 36:r(e),this.sendV2States("oper-confOperation",E),t.next=44;break;case 40:return t.prev=40,t.t0=t.catch(11),this.logger.error("[client]operateVideoAudio error: ",t.t0),t.abrupt("return",i(t.t0));case 44:t.next=48;break;case 46:this.logger.log("Operate error, not found stream lib"),i(ie("XYSDK:950203"));case 48:case"end":return t.stop()}}),n,this,[[11,40]])})))}))}},{key:"operateStreamStatus",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){var r,i,o=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]operateStreamStatus: ",e),!this.stream){t.next=4;break}return t.next=4,this.stream.operateVideoOrAudio(e);case 4:r=S.MUTE_AUDIO,i=S.UNMUTE_AUDIO,e===r&&(this.clearSpeakerTimer(),this.onSpeakerInfoMessage()),e===i&&(this.localSpeakerTimer||(this.localSpeakerTimer=setInterval((function(){o.onSpeakerInfoMessage()}),1500)));case 7:case"end":return t.stop()}}),n,this)})))}},{key:"clearSpeakerTimer",value:function(){this.localSpeakerTimer&&(clearTimeout(this.localSpeakerTimer),this.localSpeakerTimer=null)}},{key:"peerPublish",value:function(e){this.logger.log("[client]invoke peerPublish: ",e),this.stream&&this.peer.publish(this.stream,e)}},{key:"muteAudio",value:function(){var e=this;return this.logger.log("[client] muteAudio"),this.operateQueue.addTask((function(){return e.operateVideoAudio(S.MUTE_AUDIO)}))}},{key:"muteVideo",value:function(){var e=this;return this.logger.log("[client] muteVideo"),this.operateQueue.addTask((function(){return e.operateVideoAudio(S.MUTE_VIDEO)}))}},{key:"unmuteAudio",value:function(){var e=this;return this.logger.log("[client] unmuteAudio"),this.operateQueue.addTask((function(){return e.operateVideoAudio(S.UNMUTE_AUDIO)}))}},{key:"unmuteVideo",value:function(){var e=this;return this.logger.log("[client] unmuteVideo"),this.operateQueue.addTask((function(){return e.operateVideoAudio(S.UNMUTE_VIDEO)}))}},{key:"setPollingAudioStatus",value:function(e,n){return Wr(this,void 0,void 0,t().mark((function r(){var i,o,a,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] setPollingAudioStatus: ",{type:e,callUriList:n}),i="string"==typeof n?[n]:Array.isArray(n)?n:[],n&&i.length){t.next=5;break}return this.logger.warn("callUriList should be string or string array."),t.abrupt("return");case 5:if(o=this.invite.meetingId,"mute"!==e&&"unmute"!==e){t.next=24;break}return t.prev=7,t.next=10,zt.updateWebViewProp(o,i.map((function(t){return{callUri:t,params:'{"audioEnable": '.concat("mute"===e?'"false"':'"true"',"}")}})));case 10:if(a=t.sent,c=s(a,2),u=c[0],l=c[1],u){t.next=18;break}return t.abrupt("return",l);case 18:return t.abrupt("return",ie("XYSDK:950111",l));case 19:t.next=24;break;case 21:return t.prev=21,t.t0=t.catch(7),t.abrupt("return",ie("XYSDK:950111",t.t0));case 24:case"end":return t.stop()}}),r,this,[[7,21]])})))}},{key:"onHandUp",value:function(){return this.logger.log("[client] onHandUp"),this.onHand("handup",!0)}},{key:"onHandDown",value:function(){return this.logger.log("[client] onHandDown"),this.onHand("handdown",!1)}},{key:"onMute",value:function(){return this.logger.log("[client] onMute"),this.onHand("mute",!1)}},{key:"onHand",value:function(e,n){var r=this;return this.logger.log("onHand type:",e),this.handStatus=n,new Promise((function(i,o){return Wr(r,void 0,void 0,t().mark((function r(){var a,s,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,zt.hand(e);case 3:200===(a=t.sent).status&&0===a.data.code?i(n):(s=(null==a?void 0:a.data)||{},c=s.errorCode,o(ie(Z[c]||"XYSDK:950111",a.data))),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),this.logger.log("onHand err:",t.t0),o(ie(Z[null===t.t0||void 0===t.t0?void 0:t.t0.errorCode]||"XYSDK:950111",t.t0));case 11:case"end":return t.stop()}}),r,this,[[0,7]])})))}))}},{key:"sendConfParam",value:function(){var e=this.invite,t=e.meetingId,n=e.callerUri;this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"ConfParam",inoutReminder:"true"===this.invite.inoutReminder,uiNeedSpeakers:this.featureConfig.enableSpeakerInfo,meetingId:t,endpointId:n}})}},{key:"getSendSupportedCodec",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] getSendSupportedCodec"),e.prev=1,e.next=4,kr();case 4:return n=e.sent,this.logger.log("get capabilities:",n),e.abrupt("return",n);case 9:return e.prev=9,e.t0=e.catch(1),this.logger.error("get capabilities error: ",e.t0),e.abrupt("return",Promise.reject(ie("XYSDK:950515",e.t0)));case 13:case"end":return e.stop()}}),e,this,[[1,9]])})))}},{key:"setPeerConnectionStatus",value:function(e){var t,n,r,i,o;if(this.logger.log("setPeerConnectionStatus:",e),this.peerConnectionStatus=e,this.sendConfParam(),e){this.invite.automute&&(this.logger.log("setPeerConnectionStatus setAudioStream:",this.invite.automute),this.handleAutoMute(this.invite.automute)),this.cacheMeetingControlMessage&&this.cacheMeetingControlMessage.type&&this.onMeetingControlMessage(this.cacheMeetingControlMessage);var a=(null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo())||{},s=a.totalEpCount,c=void 0===s?0:s,u=a.contentUri;c<=0&&!u&&(this.autoMode?null===(n=this.layoutManager)||void 0===n||n.createAutoLayout([]):null===(r=this.layoutManager)||void 0===r||r.createCustomLayout([]));var l=null===(i=this.layoutManager)||void 0===i?void 0:i.getContentRosterItem();l&&this.sendContentRosterMessage(l),null===(o=this.stream)||void 0===o||o.sendStreamStatus(),this.sendWebRxBandwidth(),this.qualityManager.reportLocalNetworkLevel(!this.config.muteVideo)}}},{key:"sendWebRxBandwidth",value:function(){var e=this.invite,t=e.meetingId,n=e.callerUri,r=this.meeting.getRxBandwidth();r&&this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"setWebRxBandwidth",meetingId:t,endpointId:n,rxBandwidth:r}})}},{key:"handleAutoMute",value:function(e){this.logger.log("handle automute:",e);var t=S.MUTE_AUDIO,n=S.UNMUTE_AUDIO,r=t;"mute"===e||"forcemute"===e?r=t:"unmute"===e&&(r=n),this.stream&&(r===t&&this.muteAudio(),r===n&&this.unmuteAudio())}},{key:"onMeetingControlMessage",value:function(e){var n,r,i,o,a;return Wr(this,void 0,void 0,t().mark((function s(){var c,u,l,h,f,d,p,v,g,m,y,b,w,E,x,C,k,O,I,A,_;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=e.muteOperation,u=e.disableMute,l=e.chairmanUri,h=void 0===l?"":l,f=e.contentIsDisabled,d=void 0!==f&&f,p=e.commonJson,v=void 0===p?"":p,g=e.isMuteSpeaker,m=e.recordIsDisabled,y=e.groupInfoList,b=S.UNMUTE_AUDIO,w=S.MUTE_AUDIO,E="",x=!1,null===(n=this.layoutManager)||void 0===n||n.setLocalStatus({isForceFullScreen:h===this.invite.callerUri}),!this.peerConnectionStatus){t.next=29;break}if(u&&(x=!0),!c){t.next=24;break}if(E=(C="mute"===c)?w:b,!this.stream){t.next=20;break}if(t.prev=11,k=this.stream.getMediaStreams(),!k.previewStreams.length){t.next=16;break}return t.next=16,this.operateStreamStatus(E);case 16:t.next=20;break;case 18:t.prev=18,t.t0=t.catch(11);case 20:x=C,null===(r=this.layoutManager)||void 0===r||r.setLocalStatus({audioTxMute:x}),this.emitAudioStatus(E),this.sendV2States("sta-msgCallback",ft[E]);case 24:v&&(O=JSON.parse(v),I=O.rename&&JSON.parse(O.rename),(A=(I||{tmpName:""}).tmpName)&&(null===(i=this.layoutManager)||void 0===i||i.setLocalStatus({displayName:gr(A)}))),!h||h===(null===(o=this.cacheMeetingControlMessage)||void 0===o?void 0:o.chairmanUri)&&"on"!==g&&"off"!==g||null===(a=this.layoutManager)||void 0===a||a.setForceFullScreenId(),_={chairmanUri:h,disableMute:u,muteOperation:E,contentIsDisabled:d,isMuteSpeaker:g,recordIsDisabled:m,groupInfoList:y},this.logger.log("emmit meeting-control: ",_),this.emmit("meeting-control",_);case 29:this.cacheMeetingControlMessage=e;case 30:case"end":return t.stop()}}),s,this,[[11,18]])})))}},{key:"onSubTitle",value:function(e){var t=e.content,n=t&&JSON.parse(t);this.i18nCode&&this.i18nCode[ee]&&(n.content=this.i18nCode[ee][n.i18nKey||""]||n.content),this.emmit("sub-title",n),this.sendV2States("sta-msgCallback","subtitle")}},{key:"sendCustomMessage",value:function(e){if(e&&e.data&&"string"!=typeof e.data)return this.logger.warn("send custom message params error: ",u(e.data)),ie("XYSDK:950101",e);var t=e.data,n=vr(t),r=t.length;if(r>1846666)return this.logger.log("send custom message size limited: ",{oriLen:r,base64Len:n.length}),ie("XYSDK:950010",e);var i=t.length<=Ke,o=e.data.substring(Ke,0),a=Object.assign(Object.assign({},e),{type:"userCustomizedBizMsg",data:n});return this.logger.log("send custom message",Object.assign(Object.assign({},e),{data:"".concat(o,"..."),oriLen:t.length,base64Len:n.length})),this.sendSocketMessage({type:"PASS_THROUGH",body:a},!0,i),ie("XYSDK:950120")}},{key:"onPassThroughMessage",value:function(e){var t,n,r,i=this;switch(e.body.type){case"roster":this.logger.log("roster message: ",e);var o=e.body,a=o.contentSenderPid,s=void 0===a?0:a,c=o.rosterInfo;if(0===c.length)return;this.contentSenderPid=s,this.rosters=c,this.sendsOriginOrderRosterMessage();break;case"participantsNum":this.logger.log("participant message: ",e);break;case"speakersInfo":this.logger.log("speakers info message: ",e);var u=e.body.speaker;this.speakerInfo=u,this.emmit("speaker-info",{speakerInfo:u});break;case"speakerInfo":this.logger.log("speaker info message v2: ",e),this.cacheSpeakersInfo=e.body.speakerInfos,this.onSpeakerInfoMessage();break;case"layoutResult":var l=e.body.layout;0===e.body.mediagroupid?this.layoutRosters.people=l:1===e.body.mediagroupid&&(this.layoutRosters.content=l),this.layoutRosters.total=[].concat(An(this.layoutRosters.people),An(this.layoutRosters.content)),this.logger.log("layout result message: ",this.layoutRosters.total),this.customLayoutSeq===e.body.rSeq&&(null===(t=this.layoutManager)||void 0===t||t.updateStreams());break;case"streamChange":this.logger.log("stream change message: ",e),this.streamChange=e.body;var h=e.body,f=h.mediagroupid,d=h.streamChangeInfo;void 0===f&&0===d.length?(this.streamChangeList.people=[],this.streamChangeList.content=[]):this.streamChangeList[0===f?"people":"content"]=d,this.logger.log("stream change list: ",yn()(this.streamChangeList)),this.stream&&this.isAutoBandwidth&&this.stream.handleChangeStream(this.streamChange,this.peer,e.body.mediagroupid||0);break;case"rotationChange":this.logger.log("layout rotation message: ",e),this.updateRotationInfo(e),this.logger.log("rotation info: ",this.rotationInfo),this.autoMode&&(null===(n=this.layoutManager)||void 0===n||n.calculateRotate(),this.sendLayoutMessage()),this.emmit("rotation-change",this.rotationInfo.total);break;case"candidate":this.logger.log("receive candidate:",e),this.peer.handleCandidate(e.body);break;case"answer":this.logger.log("receive answer:",e),this.peer.handleAnswer(e.body);break;case"mediaOnhold":this.logger.log("media onhold message: ",e);break;case"confChangeInfo":this.logger.log("[receive]conf change info message: ",e);var p=e.body,v=p.chairManUrl,g=void 0===v?"":v,m=p.contentUri,y=void 0===m?"":m,b=p.actSpkUri,S=void 0===b?"":b,w=p.totalEpCount,E=void 0===w?0:w,x=p.displayableEpCount,C=void 0===x?0:x,k=p.mediaGroupInfo,O=void 0===k?[]:k,I=C,A=this.contentOnholdInfo.is&&!this.contentOnholdInfo.contentUrl;this.logger.log("content onhold:",A),this.autoMode&&(I=this.hideId?C+1:C);var _={participantCount:I,totalEpCount:E,chairManUrl:g,contentUri:A?"":y,actSpkUri:S,mediaGroupInfo:O},T=null===(r=this.layoutManager)||void 0===r?void 0:r.getConfInfo();(null==T?void 0:T.totalEpCount)!==E&&this.emmit("participants-count",{participantsNum:E}),this.layoutManager&&(this.layoutManager.setConfInfo(_),this.autoMode?(this.layoutManager.calcPageInfo(),this.layoutManager.calcRequestNewLayout()):1!==E||y||this.layoutManager.createCustomLayout([])),this.logger.log("emmit conf change info message: ",_),this.emmit("conf-change-info",_);break;case"layoutResultEx":this.logger.log("[receive][v2]layout result message: ",e),this.layoutRosters.total=e.body.layout||[],this.logger.log("[v2]layout result: ",this.layoutRosters.total),this.layoutManager&&(this.autoMode?this.layoutManager.createAutoLayout(this.layoutRosters.total):(this.layoutManager.createCustomLayout(this.layoutRosters.total),this.layoutManager.updateStreams()));break;case"inoutnotify":this.logger.log("[receive]inoutnotify message: ",e);var R=e.body.info||[],D=[];R.map((function(e){if(e.e!==i.invite.callerUri){var t=e.a,n=t.split(":");n.length>1&&(t=n[1]),D.push({displayName:e.c,action:e.t,userId:t})}})),this.emmit("in-out-reminder",D);break;case"bulkRoster":this.logger.log("bulk roster message: ",e);var N=e.body,L=N.bulkRosterType,M=void 0===L?0:L,P=N.addRosterInfo,j=void 0===P?[]:P,B=N.changeRosterInfo,U=void 0===B?[]:B,G=N.deleteRosterInfo,K=void 0===G?[]:G;this.emmit("bulkRoster",{bulkRosterType:M,addRosterInfo:j,changeRosterInfo:U,deleteRosterInfo:K});break;case"confproperties":if(0===e.mg&&(this.contentOnholdInfo.is=!0),1===e.mg){this.logger.log("conf properties message: ",e);var H=e.body.confpropertiesInfo;(void 0===H?[]:H).forEach((function(e){"contentOnhold"===e.type&&i.handleContentOnhold(e)}))}break;case"multiGroupInfo":this.logger.log("receive multi group info",e);var F=e.body.mediagrps,V=void 0===F?[]:F,Y=e.endpointId;this.emmit("multi-group-info",{endpointId:Y,mediagrps:V});break;case"translationContent":if(this.logger.log("receive translationContent:",e),!this.onhold){var z=e.body;this.logger.log("emmit translationContent:",e),this.emmit("translation-content",z)}break;case"userCustomizedBizMsg":var W=e.body.data;W.length>Ke?this.logger.log("SDK get userCustomizedBizMsg max message: ",Object.assign({},e.body,{length:W.length,data:""})):this.logger.log("SDK get userCustomizedBizMsg message: ",e);var X=gr(W),q=Object.assign(Object.assign({},e.body),{data:X});this.emmit("custom-message-recv",q);break;case"networkParameter":this.emmit("networkParameter",e.body);break;default:this.logger.log("get pass though default message: ",e)}}},{key:"onSpeakerInfoMessage",value:function(){var e,t=this;if(this.featureConfig.enableSpeakerInfo)if(this.cacheSpeakersInfo.length>=3){var n=yn()(this.cacheSpeakersInfo);this.emitSpeakersInfo(n)}else{var r=yn()(this.cacheSpeakersInfo),i=null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster();if(i&&!i.audioTxMute){var o=i||{},a=o.endpointId,s=o.displayName,c=o.participantId;if(this.stream)return void this.stream.getAudioLevel().then((function(e){e>2&&r.push({alias:a,name:s,pid:c})})).finally((function(){t.emitSpeakersInfo(r)})).catch((function(e){t.logger.log("getAudioLevel err:",e)}))}this.emitSpeakersInfo(r)}}},{key:"emitSpeakersInfo",value:function(e){JSON.stringify(this.speakersInfo)!==JSON.stringify(e)&&(this.emmit("speakers-info",{speakersInfo:e}),this.speakersInfo=e)}},{key:"handleContentOnhold",value:function(e){var t,n,r,i,o,a,s=this,c=e.audioTrackId,u=void 0===c?"":c,l=e.contentUrl,h=void 0===l?"":l,f=null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo(),d=null===(n=this.layoutManager)||void 0===n?void 0:n.getSelfRoster(),p=null===(r=this.layoutManager)||void 0===r?void 0:r.getLocalShareState();if(this.contentOnholdInfo.is){(h===(null==d?void 0:d.endpointId)||p)&&(h="");var v={audioTrackId:u,contentUrl:h,is:!0};h&&h===this.contentOnholdInfo.contentUrl||!f||(f.contentUri=h,this.autoMode&&(null===(i=this.layoutManager)||void 0===i||i.calcPageInfo(f),null===(o=this.layoutManager)||void 0===o||o.calcRequestNewLayout()),this.audioTrackList.map((function(e){s.handleContentOnholdAudio(e.rest,v)})),null===(a=this.layoutManager)||void 0===a||a.setConfInfo(f),this.emmit("conf-change-info",f)),this.contentOnholdInfo=v}}},{key:"handleWaitingState",value:function(e){var t=e.waitingState,n=void 0===t?0:t,r=e.automute,i=void 0===r?"":r;this.onhold=!!n,this.onhold&&this.handStatus&&(this.handStatus=!1,this.emmit("cancel-handup",!0)),!this.onhold&&i&&this.handleAutoMute(i),this.emmit("onhold",this.onhold)}},{key:"switchAutoBandwidth",value:function(){this.logger.log("[client] switchAutoBandwidth");var e=!this.isAutoBandwidth;return this.isAutoBandwidth=e,e}},{key:"disconnectInWssError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{code:1e3};if(this.logger.log("disconnected wss error",e),!this.disconnected&&this.clientStatus){this.clientErrorState="XYSDK:950114"===e?"WS_CLOSE":"WS_ERROR";var n=4e3===(null==t?void 0:t.code)?"TOKEN_INVALID":"LOCAL_NET_DISCONNECT";this.emmit("disconnected",ie(e,{message:_n[ee][n],key:n,detail:n},"[internal] disconnected meeting"))}}},{key:"switchDebug",value:function(e){var t=this;return this.logger.log("[client] switchDebug"),new Promise((function(n,r){"boolean"!=typeof e&&r(ie("XYSDK:950101"));try{t.debug=e,t.peer&&t.peer.initSenderStatus(),n(t.debug)}catch(e){r(ie("XYSDK:950210"))}}))}},{key:"requestLayout",value:function(e){var t=this;return new Promise((function(n,r){var i,o;t.logger.log("[client] requestLayout: ",e);var a=e.length>9?9:e.length;e.length=a,null===(i=t.layoutManager)||void 0===i||i.requestLayout(e),null===(o=t.layoutManager)||void 0===o||o.updateStreams(),n("successfully")}))}},{key:"requestNewLayout",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0;return new Promise((function(a,s){if(r.logger.log("new layout request list: ",{reqList:e,extReqList:i,maxViewCountPerPage:t,pageIndex:n}),!Hr(e))return s(ie("XYSDK:950101",{reqList:e}));if(!Hr(i))return s(ie("XYSDK:950101",{extReqList:i}));~~t>9&&(t=9),r.config.layout===E.CUSTOM&&(e=r.meeting.convertReqList(e),i=r.meeting.convertReqList(i)),r.logger.log("reqList:",e),r.logger.log("extReqList:",i),n=Math.max(0,n);var c=r.invite,u=c.callerUri,l=void 0===u?"":u,h=c.meetingId;r.sendSocketMessage({type:"PASS_THROUGH",body:Object.assign({type:"customLayoutEx",conferenceId:h,endpointId:l,layoutMode:0,pageIndex:n,maxViewCountPerPage:t,streams:e,extStreams:i},o)}),a(!0)}))}},{key:"requestAutoPollingLayout",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(i,o){t.autoMode&&o("Auto mode not support request layout");var a=t.invite,s=a.callerUri,c=a.meetingId;t.logger.log("send request auto polling layout data: ",{command:e,interval:n,reqList:r}),t.sendSocketMessage({type:"PASS_THROUGH",body:{type:"customLayoutEx",conferenceId:c,endpointId:s,layoutMode:1,pageIndex:0,PollingCommand:e,pollingInterval:Number(n)||0,streams:r}}),i(!0)}))}},{key:"emitAudioStatus",value:function(e){this.logger.log("emmit audio-status: ",e),this.emmit("audio-status",{status:e})}},{key:"emitVideoStatus",value:function(e){this.logger.log("emit video-status: ",e),this.emmit("video-status",{status:e}),this.qualityManager.reportLocalNetworkLevel(e!==S.MUTE_VIDEO)}},{key:"sendLayoutMessage",value:function(){var e,t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.getLayoutMap();if(this.autoMode||0!==(null===(e=this.customLayoutCacheList)||void 0===e?void 0:e.length)||0!==(null==r?void 0:r.size)){var i=[];r.forEach((function(e,n){t.meeting.setLayoutAvatar(e,n);var r=e.index,o=void 0===r?-1:r;o>-1?(delete e[o],i[o]=e):i.push(e)}));var o=i.filter((function(e){return!!e}));this.autoMode?(this.logger.log("emmit layout",o),this.emmit("layout",o)):(this.customLayoutCacheList=o,this.logger.log("emmit custom layout",o),this.emmit("custom-layout",o)),n&&this.meeting.handleLayoutAvatar(r)}}},{key:"sendOriginOrderedRosterMessage",value:function(){var e,t=null===(e=this.layoutManager)||void 0===e?void 0:e.getOriginOrderRosters();this.emmit("roster",{rosters:t})}},{key:"sendsOriginOrderRosterMessage",value:function(){var e,t,n=(null===(e=this.layoutManager)||void 0===e?void 0:e.calculateOrderRosterList())||[];null===(t=this.layoutManager)||void 0===t||t.setOriginOrderRosters(n),this.emmit("roster",{rosters:n})}},{key:"sendScreenInfoMessage",value:function(e){this.emmit("screen-info",yn()(e))}},{key:"sendContentRosterMessage",value:function(e){var t;null===(t=this.layoutManager)||void 0===t||t.setContentRosterItem(e),this.emmit("content",{data:e})}},{key:"sendTemplateMode",value:function(e){this.emmit("template-mode",e)}},{key:"updateRotationInfo",value:function(e){var t=this,n=e.body.rosterInfo||[],r=0===e.body.mediagroupid?"people":"content";this.rotationInfo[r]=n,this.rotationInfo.total=[];var i=this.rotationInfo,o=i.people,a=i.content,s=function(e,n){e.forEach((function(e){t.rotationInfo.total.push(Object.assign(Object.assign({},e),{mediagroupid:n,id:e.participantId+""+n}))}))};s(o,0),s(a,1)}},{key:"sendCustomLayout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.invite,n=t.callerUri,r=void 0===n?"":n,i=t.meetingId;this.customLayoutSeq=this.customLayoutSeq+1,this.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:i,endpointId:r,type:"customLayout",streams:e,rSeq:this.customLayoutSeq}})}},{key:"reportQualityData",value:function(e){var t,n=null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo();e=this.getNewInternals(e),this.qualityManager.reportQualityData(e,n)}},{key:"getNewInternals",value:function(e){var t,n=(null===(t=this.layoutManager)||void 0===t?void 0:t.getInternalsLayout())||{pid:{resolution:0,quality:0}};Object.keys(e.receiver).forEach((function(t){var r=e.receiver[t],i=r.isContent,o=r.type+Number(i);n[o]&&(e.receiver[t].expResolution=n[o].resolution)}));for(var r=Object.keys(e.sender),i=r.length,o=0;o<i;o++){var a=e.sender[r[o]],s=this.streamChangeList.content.length,c=this.streamChangeList.people.length;if(a.type===R.REMOTE&&(e.sender[r[o]].expBandwidth=Le[a.resolution]),c)for(var u=0;u<c;u++){var l=this.streamChangeList.people[u];if(ot.RESOLUTION_MAP[l.resolution]===Number(a.resolution)&&a.type===R.REMOTE){e.sender[r[o]].expBandwidth=l.bandwidth;break}}if(s)for(var h=0;h<s;h++){var f=this.streamChangeList.content[h];if(ot.RESOLUTION_MAP[f.resolution]===Number(a.resolution)&&a.type===R.CONTENT){e.sender[r[o]].expBandwidth=f.bandwidth;break}}}return e}},{key:"sendInternals",value:function(e){this.emmit("meeting-stats",this.getNewInternals(e))}},{key:"off",value:function(e){this.logger.log("[client] off:",e),this.removeListener(e)}},{key:"onScreenChangeEvent",value:function(){this.autoMode&&this.layoutManager&&(this.layoutManager.calculateScreenInfo(),this.layoutManager.calculatePosition(),this.layoutManager.calculateRotate(),this.sendLayoutMessage())}},{key:"initWindowResizeEvent",value:function(){window.addEventListener("resize",this.onDocumentChange)}},{key:"removeWindowResizeEvent",value:function(){window.removeEventListener("resize",this.onDocumentChange)}},{key:"sendPeopleCapability",value:function(){this.logger.log("[client]invoke sendPeopleCapability");var e=this.invite,t=e.callIndex,n=e.callerUri,r=void 0===n?"":n,i=e.meetingId,o=P.VIDEO,a=P.AUDIO,s=_.NORMAL;if(this.stream){var c=this.stream.streams,u=[],l=[];c.filter((function(e){return e.status===s})).forEach((function(e){var t=e.stream,n=e.resolution,r=e.kind,i={streamId:(null==t?void 0:t.id)||"",resolution:ot.MAP_RESOLUTION_INDEX[n]};r===o?u.push(i):r===a&&l.push(i)})),this.logger.log("people capability streams: ",{videoStreamCapability:u,audioStreamCapability:l}),this.sendSocketMessage({type:"PASS_THROUGH",callIndex:t,body:{type:"peopleCapability",meetingId:i,version:2,endpointId:r,streams:u,audioStreams:l}})}}},{key:"forceFullScreen",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.logger.log("[client] force full screen:",t),new Promise((function(n,r){if(!e.autoMode)return r(ie("XYSDK:950602"));if(t&&"string"!=typeof t)return r(ie("XYSDK:950101"));if(e.layoutManager){var i=e.layoutManager.getLayoutMap(),o=e.layoutManager.getForceFullScreenId();if(t){if(!(null==i?void 0:i.get(t)))return r(ie("XYSDK:950101"));if(t===o)return n(t)}try{e.layoutManager.setForceFullScreenId(t),e.layoutManager.calcRequestNewLayout(),n(t)}catch(e){r(ie("XYSDK:950530"))}}}))}},{key:"sendSocketMessage",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.invite,i=r.callIndex,o=r.callerUri,a=void 0===o?"":o,s={callIndex:i,meetingId:r.meetingId,endpointId:a,callUri:a},c=Object.assign(Object.assign({},e),s);if(t){var u=this.seq+"";this.socketTask&&this.socketTask.send(Object.assign(Object.assign({},c),{seq:u}),!0,n),this.seq++}else this.socketTask&&this.socketTask.send(c,!0,n)}},{key:"getBasicInfo",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.token,this.callInfo=e,this.token=r,i=this.iauth.getLoginInfo(),t.prev=4,o=r||i.access_token,i.securityKey){t.next=13;break}return t.next=9,zt.getUserInfo(o);case 9:a=t.sent,c=(s=a||{}).securityKey,u=s.userProfile,h=(l=(void 0===u?{}:u)||{}).id,f=l.enterpriseId,this.iauth.setLoginInfo(Object.assign(Object.assign({},i),{id:h||i.id,enterpriseId:f||i.enterpriseId,securityKey:c}));case 13:this.getServerConfig(),t.next=19;break;case 16:return t.prev=16,t.t0=t.catch(4),t.abrupt("return",Promise.reject(t.t0));case 19:case"end":return t.stop()}}),n,this,[[4,16]])})))}},{key:"verifyMeeting",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,S,w,E,x,C,k,O,I,A,_,T,R,D;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.token,i=e.confNumber,o=e.password,a=void 0===o?"":o,this.callInfo=e,this.token=r,s={success:!1,data:{}},t.prev=4,t.next=7,zt.getCallUri({number:i,deviceType:Ue,country:"CN"});case 7:if(c=t.sent,u=c.data,l=u.avatar,h=void 0===l?"":l,f=u.callNumber,d=void 0===f?"":f,p=u.callUrl,v=void 0===p?"":p,g=u.deviceId,m=void 0===g?"":g,y=u.deviceType,b=void 0===y?"":y,S=u.displayName,w=void 0===S?"":S,E=u.number,x=void 0===E?"":E,C=u.numberType,k=void 0===C?"":C,O=u.enablePwd,I=void 0!==O&&O,A={avatar:h,callNumber:d,callUrl:v,deviceId:m,deviceType:b,displayName:w,number:x||i,numberType:k},!(Je.findIndex((function(e){return e===b}))>-1)){t.next=44;break}if(this.callInfo=Object.assign(this.callInfo,{meeting:A}),s=oe(!0),!I||!pt.includes(this.hideId)){t.next=31;break}return s=oe(!1,"XYSDK:950110"),t.prev=17,t.next=20,zt.ignoreMeetingMonitor(i);case 20:if(t.t0=t.sent,t.t0){t.next=23;break}t.t0={};case 23:_=t.t0,200===_.status&&(s=oe(!0)),t.next=30;break;case 28:t.prev=28,t.t1=t.catch(17);case 30:return t.abrupt("return",s);case 31:if(!I){t.next=43;break}if(s=oe(!1,"XYSDK:950107"),!a){t.next=43;break}return t.next=36,zt.verifyPassword(i,a);case 36:if(t.t2=t.sent,t.t2){t.next=39;break}t.t2={};case 39:T=t.t2,R=T.status,s=oe(!0),200!==R&&204!==R&&(s=oe(!1,"XYSDK:950108"));case 43:return t.abrupt("return",s);case 44:if(!k){t.next=46;break}return t.abrupt("return",oe(!1,"XYSDK:950109"));case 46:if(!(null==u?void 0:u.errorCode)){t.next=50;break}if(1001!==(D=u.errorCode)&&2036!==D){t.next=50;break}return t.abrupt("return",oe(!1,"XYSDK:950105"));case 50:return t.abrupt("return",Promise.reject(c));case 53:return t.prev=53,t.t3=t.catch(4),t.abrupt("return",Promise.reject(t.t3));case 56:case"end":return t.stop()}}),n,this,[[4,53],[17,28]])})))}},{key:"refreshToken",value:function(e){return zt.refreshToken(e)}},{key:"setAudioOutputDevice",value:function(e){var t=this;this.logger.log("[client] setAudioOutputDevice: ",e),Object.keys(this.audioManagers).forEach((function(n){var r,i=t.audioManagers[n];i.ele&&(null===(r=t.deviceManager)||void 0===r||r.setAudioOutputDevice(i.ele,e))}))}},{key:"removeAudioRender",value:function(e){this.logger.log("[client] removeAudioRender:",e),this.audioManagers[e]&&(this.logger.log("remove audio render: ",e),delete this.audioManagers[e])}},{key:"startMonitor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.logger.log("[monitor]start monitor:",e),this.invite.callIndex&&this.sendSocketMessage({type:"START_MONITOR",uriList:e})}},{key:"stopMonitor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.logger.log("[monitor]stop monitor:",e),this.invite.callIndex&&(this.layoutManager&&this.layoutManager.clearVideoManagersUseMonitorList(e),this.sendSocketMessage({type:"STOP_MONITOR",uriList:e}))}},{key:"subscribeBulkRoster",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){if(n.invite.callIndex){var r=n.invite,i=r.callerUri,o=r.meetingId;n.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeBulkRoster"}}),n.isSubscribeBulkRoster=!0,e(!0)}else t(ie("XYSDK:950517"))})));case 1:case"end":return e.stop()}}),e)})))}},{key:"startTranslation",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] startTranslation"),e.abrupt("return",new Promise((function(e,t){if(n.invite.callIndex){var r=n.invite,i=r.callerUri,o=r.meetingId;n.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeTranslation",operation:1}}),n.isSubscribeTranslation=!0,e(!0)}else t(ie("XYSDK:950301"))})));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"stopTranslation",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n=this;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] startTranslation"),e.abrupt("return",new Promise((function(e,t){if(n.invite.callIndex){var r=n.invite,i=r.callerUri,o=r.meetingId;n.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:o,endpointId:i,type:"subscribeTranslation",operation:2}}),n.isSubscribeTranslation=!1,e(!0)}else t(ie("XYSDK:950301"))})));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"setTranslationLanguage",value:function(e){return Wr(this,void 0,void 0,t().mark((function n(){var r=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] setTranslationLanguage:",e),t.abrupt("return",new Promise((function(t,n){if(r.invite.callIndex){var i=r.invite,o=i.callerUri,a=i.meetingId;e=vt.includes(e)?e:"English",r.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:a,endpointId:o,language:e,type:"setTranslationLanguage"}}),t(!0)}else n(ie("XYSDK:950301"))})));case 2:case"end":return t.stop()}}),n,this)})))}},{key:"startCloudRecord",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n,r,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.meeting.getRecordPermission(),this.logger.log("[client]Start cloud record:",n),r=n.authorize,i=this.invite.remoteUri,r){e.next=6;break}return e.abrupt("return",Promise.reject(ie("XYSDK:953902")));case 6:this.sendSocketMessage({type:"START_RECORD",remoteUri:i});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"stopCloudRecord",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[client] stop record:",this.recordState),n=this.invite.remoteUri,this.recordState===x.RECORD_STATE_STARTED){e.next=4;break}return e.abrupt("return",Promise.reject(ie("XYSDK:953905")));case 4:this.sendSocketMessage({type:"STOP_RECORD",remoteUri:n});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"updateLayoutSize",value:function(){this.onDocumentChange()}},{key:"bindTrackGroup",value:function(e,t){var n;if(this.logger.log("[client]bind track group: ",{trackType:e,mediagroupId:t}),!ae.isString(e)||!ae.isNumber(t))return this.logger.warn("params type error"),ie("XYSDK:950101",{trackType:e,mediagroupId:t});var r=this.invite,i=r.callerUri,o=r.meetingId,a={grpId:t,mediaStreamId:""};if(this.stream){var s=this.stream.getNormalStream(P.AUDIO);s&&(a.mediaStreamId=(null===(n=s.stream)||void 0===n?void 0:n.id)||"")}return this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"bindAudioTrack",conferenceId:o,endpointId:i,bindinfo:a}}),!0}},{key:"startMonitorGroup",value:function(e){return this.setMonitorGroup("start",e)}},{key:"stopMonitorGroup",value:function(e){return this.setMonitorGroup("stop",e)}},{key:"setMonitorGroup",value:function(e,t){if(this.logger.log("[monitor]".concat(e," monitor group"),t),!this.invite.callIndex)return ie("XYSDK:950517");if(!t||!t.length)return!0;var n=this.invite,r=n.callerUri,i=n.meetingId;return this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"start"===e?"startMediaGrp":"stopMediaGrp",conferenceId:i,endpointId:r,mediagrps:t.map((function(e){return{id:e}}))}}),!0}},{key:"verifyParameter",value:function(){return Wr(this,void 0,void 0,t().mark((function e(){var n,r,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.config,r=n.clientId,i=n.clientSecret,r){e.next=3;break}return e.abrupt("return",Promise.reject(ie("XYSDK:950101",{},"The clientId is required,Please set this value in createClient function")));case 3:if(i){e.next=5;break}return e.abrupt("return",Promise.reject(ie("XYSDK:950101",{},"The clientSecret is required,Please set this value in createClient function")));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"initDeviceManagerEvent",value:function(){var e,t,n,r=this;null===(e=this.deviceManager)||void 0===e||e.on("permission",(function(e){r.logger.log("deviceManager permission changed: ",e),"denied"===e.camera&&(r.isPermissionDenied.camera=!0),"denied"===e.microphone&&(r.isPermissionDenied.microphone=!0),r.emmit("permission",e)})),null===(t=this.deviceManager)||void 0===t||t.on("currentDevice",(function(e){r.emmit("currentDevice",e)})),null===(n=this.deviceManager)||void 0===n||n.on("device",(function(e){var t=e.nextDevice,n=t.audioInput,i=t.videoInput,o=t.audioOutput;try{r.autoSwitchDevice&&(n&&r.stream&&r.stream.switchDevice(A.AUDIO,n.deviceId),i&&r.stream&&r.stream.switchDevice(A.VIDEO,i.deviceId),o&&r.setAudioOutputDevice(o.deviceId)),r.emmit("device",e)}catch(e){r.logger.log("auto switch device failed:",e)}}))}},{key:"getWssUrl",value:function(){var e;return Wr(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s,c,u,l,h,f,d;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.config,i=r.isSupportHybridCloud,o=r.wssServer,a=void 0===o?"":o,s="",c="",t.prev=3,this.logger.log("[wss] isSupportHybridCloud:",i),i&&(u=a.split("//")[1].split("/")[0],s="".concat(Gt.protocol,"//").concat(u)),this.logger.log("[wss] getAllocation server in HybridCloud:",s),l=this.iauth.getLoginInfo(),h=l.id,t.next=10,zt.getAllocation(h,s,i);case 10:f=t.sent,c=(null===(e=null==f?void 0:f.data)||void 0===e?void 0:e.serverId)||"",t.next=16;break;case 14:t.prev=14,t.t0=t.catch(3);case 16:return d="".concat(a,"/websocket/webrtc").concat(c?"/".concat(c):""),t.abrupt("return",d);case 18:case"end":return t.stop()}}),n,this,[[3,14]])})))}},{key:"initWss",value:function(e,n){var r;return Wr(this,void 0,void 0,t().mark((function n(){var i,o=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[wss] init wss"),this.socketTask&&this.socketTask.close(),t.next=4,this.getWssUrl();case 4:i=t.sent,this.token=(null===(r=zt.getTokenInfo())||void 0===r?void 0:r.access_token)||this.token,this.socketTask=new Dn({url:i,params:{token:this.token,start:!0,cap:"".concat(vr("3"))}},this),this.socketTask.on("open",(function(e){o.logger.log("websocket is connected:",i),o.wsReConnectCount=0,o.invite.callIndex&&o.peer&&o.peer.restart(),o.startCall(),o.emmit("socket-open",e)})),this.socketTask.on("message",(function(t){var n=t.data;if(n){var r=JSON.parse(n);o.handleSocketMessage(r,e),o.emmit("socket-message",r)}})),this.socketTask.on("close",(function(e){o.logger.log("连接已关闭"),o.disconnectInWssError("XYSDK:950114",{code:null==e?void 0:e.code}),o.emmit("socket-close",ie("XYSDK:950114",{code:null==e?void 0:e.code})),o.close("LOCAL_NET_DISCONNECT")})),this.socketTask.on("timeout",(function(){o.logger.log("websocket connect timeout"),o.emmit("socket-timeout",ie("XYSDK:950112"))})),this.socketTask.on("error",(function(e){o.logger.log("Websocket connect is error",e),o.emmit("socket-error",ie("XYSDK:950115",e))})),this.socketTask.on("reconnect",(function(e){o.logger.log("Websocket reconnect: ","Websocket connected is close, reconnect..."),o.wsReConnectCount++,o.emmit("socket-reconnect",ie("XYSDK:950113",e))}));case 13:case"end":return t.stop()}}),n,this)})))}}],[{key:"getClientInstance",value:function(e,t){return this.instance||(this.instance=new r(e,t)),this.instance}},{key:"getCustomLayoutItem",value:function(e,t,n){var r=e.roster.isContent;return{pid:e.roster.participantId,resolution:t,quality:n,mediagroupid:r?1:0}}},{key:"getHideId",value:function(e){var t="",n=e.__hideId,r=void 0===n?"":n;return r&&("HIDE"===r?t="HIDE":ae.isNumber(r)?t=dt[r]||"":ae.isString(r)&&(t=r)),t}}]),r}(gn),qr=(n(9575),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),function(){function e(t){c(this,e),this.level=0,this.stream=t}return f(e,[{key:"getAudioLevel",value:function(){if(this.analyser){this.analyser.getByteTimeDomainData(this.timeDomainData);var e=0,t=0,n=this.timeDomainData.length;for(t=0;t<n;t++)e=Math.max(e,Math.abs(this.timeDomainData[t]-128));this.level=e}var r=Math.min(100,100*Number((this.level/64).toFixed(2)));return parseInt(r+"")}},{key:"init",value:function(){var e=window.AudioContext||window.webkitAudioContext;e?(this.audioContext=new e,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.sourceNode=this.audioContext.createMediaStreamSource(this.stream),this.timeDomainData=new Uint8Array(this.analyser.frequencyBinCount),this.sourceNode.connect(this.analyser)):console.log("init audio content failed: ",e)}}]),e}());function $r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Zr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}var Qr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},ei=function(e){v(r,e);var n=Jr(r);function r(e){var t;c(this,r),t=n.call(this);var i=e.logger,o=e.client,a=void 0===o?null:o;return t.streams=[],t.pipelineStreams=[],t.contentStreams=[],t.previewStreams=[],t.logger=i,t.client=a,t.isShareContent=!1,t.streamStatus=!0,t.initConfig={devices:{}},t.initParams={},t.enabledCapture={video:K.KEEP,audio:K.KEEP},t.currentMode={type:T.UNKNOWN,detail:"Init state"},t.audioDeviceId="",t.audioOutputDeviceId="",t.videoDeviceId="",t.isFirefox=On.isFirefox(),t.screenAudio=!1,t}return f(r,[{key:"getLocalStream",value:function(){return this.previewStreams}},{key:"getIndexFromStreamChange",value:function(e,t){var n=e.id;return t.findIndex((function(e){return e.streamId===n}))}},{key:"off",value:function(e){this.removeListener(e)}},{key:"handleChangeStream",value:function(e,n,r){return Qr(this,void 0,void 0,t().mark((function i(){var o,a,s,c,u,l,h,f,d,p,v,g,m,y,b,S,w,E,x,C;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.streamChangeInfo,a=0===r?this.streams:this.contentStreams,s=a.length,c=_.NORMAL,u=P.VIDEO,!ye||"hidden"!==document.visibilityState||0!==o.length){t.next=8;break}return this.logger.log("not set bandWidth when document is hidden in mobile"),t.abrupt("return");case 8:this.logger.log("change bandwidth"),l=0;case 10:if(!(l<s)){t.next=49;break}if(h=a[l],f=h.status,d=h.stream,h.resolution,p=h.kind,f!==c||p!==u){t.next=46;break}v=(null==d?void 0:d.getVideoTracks())||[],g=v.length,m=d?this.getIndexFromStreamChange(d,o):-1,y=0;case 17:if(!(y<g)){t.next=46;break}if(!(b=v[y])){t.next=43;break}if(-1===m){t.next=34;break}return S=o[m],w=S.bandwidth,E=S.frameRate,x={bandwidth:Math.max(w,100),frameRate:E},t.prev=24,t.next=27,n.setParameters(b.id,x,!0,d);case 27:t.next=32;break;case 29:t.prev=29,t.t0=t.catch(24),this.logger.log("[stream]set band width failed:",t.t0);case 32:t.next=43;break;case 34:return t.prev=34,C={bandwidth:0,frameRate:0},t.next=38,n.setParameters(b.id,C,!0,d);case 38:t.next=43;break;case 40:t.prev=40,t.t1=t.catch(34),this.logger.log("[stream]reduce band width failed:",t.t1);case 43:y++,t.next=17;break;case 46:l++,t.next=10;break;case 49:case"end":return t.stop()}}),i,this,[[24,29],[34,40]])})))}},{key:"setAudioOutput",value:function(e){var t=this;return this.logger.log("set audio output device: ".concat(e)),ae.isString(e)?new Promise((function(n,r){var i;try{t.audioOutputDeviceId=e,null===(i=t.client)||void 0===i||i.setAudioOutputDevice(e),n({deviceId:e})}catch(e){r(ie("XYSDK:950407",e))}})):(this.logger.log("Parameter must be a string"),Promise.reject(ie("XYSDK:950101")))}},{key:"switchDevice",value:function(e,n){var r,i,o;return Qr(this,void 0,void 0,t().mark((function a(){var s,c,u,l,h,f,d,p,v,g,m,y;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("switch device: ",{deviceId:n,type:e}),s=A.VIDEO,c=A.AUDIO,u=S.UNMUTE_VIDEO,l=S.UNMUTE_AUDIO,h=S.MUTE_AUDIO,f=S.MUTE_VIDEO,d=[c,s],p=e,ae.isString(e)&&ae.isString(n)&&d.includes(p)){t.next=8;break}return this.logger.error("params error, please check"),t.abrupt("return",Promise.reject(ie("XYSDK:950101")));case 8:if(v=null===(r=this.client)||void 0===r?void 0:r.getSelfRoster(),m=(g=v||{videoTxMute:!0,audioTxMute:!0}).videoTxMute,y=g.audioTxMute,t.prev=10,p!==c||!n){t.next=17;break}if(this.audioDeviceId=n,this.setStreamStatus(h,!0),y){t.next=17;break}return t.next=17,this.operateVideoOrAudio(l);case 17:if(p!==s||!n){t.next=23;break}if(this.videoDeviceId=n,m){t.next=23;break}return this.setStreamStatus(f),t.next=23,this.operateVideoOrAudio(u);case 23:return null===(o=null===(i=this.client)||void 0===i?void 0:i.deviceManager)||void 0===o||o.setCurrentUsedDeviceByType(p,n),this.logger.log("switch device succeeded: ",{audioDeviceId:this.audioDeviceId,videoDeviceId:this.videoDeviceId}),t.abrupt("return",!0);case 28:return t.prev=28,t.t0=t.catch(10),t.abrupt("return",Promise.reject(ie("XYSDK:950410",t.t0)));case 31:case"end":return t.stop()}}),a,this,[[10,28]])})))}},{key:"resetStreamConfigStatus",value:function(e){var t=_.UNKNOWN,n=[_.DISABLED,_.NORMAL];this.streams=this.streams.map((function(r){var i=r.kind,o=r.status;return i!==e||n.includes(o)||(r.status=t),r})),this.logger.log("reset stream config status: ",this.streams)}},{key:"sendStreamStatus",value:function(){this.emmit("stream-status",this.currentMode)}},{key:"operateVideoOrAudio",value:function(e){var n,r,i,o;return Qr(this,void 0,void 0,t().mark((function a(){var s,c,u,l,h,f,d,p,v,g,m,b,w,E,x,C;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]invoke operate video or audio: ",e),s=S.MUTE_VIDEO,c=S.MUTE_AUDIO,u=S.UNMUTE_AUDIO,l=S.UNMUTE_VIDEO,h=K.CAPTURE,f=K.KEEP,d=P.AUDIO,p=P.VIDEO,v=_.NORMAL,t.prev=5,e!==u){t.next=21;break}if(g=this.streams.some((function(e){var t=e.stream,n=e.status,r=e.kind;return!(!t||n!==v||r!==d)&&t.getAudioTracks().length})),this.resetStreamConfigStatus(d),!g){t.next=13;break}this.setStreamStatus(e),t.next=21;break;case 13:return this.enabledCapture={video:f,audio:h},t.next=16,this.createUserMediaStream();case 16:return m=t.sent,t.next=19,this.setRemoteStreams(m,d);case 19:null===(n=this.client)||void 0===n||n.peerPublish(y.AUDIO),this.clearAudioLevel();case 21:if(e!==l){t.next=32;break}return this.enabledCapture={video:h,audio:f},this.resetStreamConfigStatus(p),t.next=26,this.createUserMediaStream();case 26:return b=t.sent,t.next=29,this.setPreviewStream(b);case 29:return t.next=31,this.setRemoteStreams(b,p);case 31:null===(r=this.client)||void 0===r||r.peerPublish(y.VIDEO);case 32:e===c&&(w=H.DENIED,E=(null===(o=null===(i=this.client)||void 0===i?void 0:i.deviceManager)||void 0===o?void 0:o.getDevicePermission())||{},x=E.microphone,C=x===w,this.setStreamStatus(e,C)),e===s&&this.setStreamStatus(e),t.next=40;break;case 36:return t.prev=36,t.t0=t.catch(5),this.logger.error("operate video or audio error: ",t.t0),t.abrupt("return",Promise.reject(t.t0));case 40:case"end":return t.stop()}}),a,this,[[5,36]])})))}},{key:"setStreamStatus",value:function(e,t){var n=this;this.logger.log("setStreamStatus type:",e),this.previewStreams.forEach((function(r){r.stream&&n.setStreamTracksStatus(r.stream,e,t)})),this.streams.forEach((function(r){var i=r.status,o=r.stream;i!==_.DISABLED&&o&&n.setStreamTracksStatus(o,e,t)}))}},{key:"getEndedTrack",value:function(e){return e.find((function(e){return"ended"===e.readyState}))||e[0]}},{key:"setStreamTracksStatus",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.logger.log("set track status: ",{type:t,stopAudioTrack:r});var i=S.MUTE_AUDIO,o=S.MUTE_VIDEO,a=[i,S.UNMUTE_AUDIO],s=nt[t].enabled;null==e||e.getTracks().forEach((function(i){var c=i.kind;"audio"===c&&a.includes(t)&&(r?(i.stop(),e.removeTrack(i),n.logger.log("audio track ended")):(i.enabled=s,n.logger.log("audio track enabled: ",s))),"video"===c&&t===o&&(i.stop(),e.removeTrack(i),n.logger.log("video track ended"))}))}},{key:"close",value:function(){this.streamStatus=!1;var e=0;this.clearAudioLevel(),this.streams&&(e+=this.closeStreams(this.streams)),this.pipelineStreams&&(e+=this.closeStreams(this.pipelineStreams)),this.previewStreams&&(e+=this.closeStreams(this.previewStreams)),this.isShareContent&&this.closeContentStream(),this.isShareContent=!1,this.streams=[],this.pipelineStreams=[],this.contentStreams=[],this.previewStreams=[],this.logger.log("stream closed successfully: ",e)}},{key:"closeStreams",value:function(e){var t=0;return e.forEach((function(e){var n=e.stream;null==n||n.getTracks().forEach((function(e){e.stop(),t+=1}))})),t}},{key:"getMediaStreams",value:function(){return{previewStreams:this.previewStreams,streams:this.streams,pipelineStreams:this.pipelineStreams,contentStreams:this.contentStreams}}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{devices:{}},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Qr(this,void 0,void 0,t().mark((function r(){var i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("stream init config:",{config:e,params:n}),i=(null==e?void 0:e.devices)||{},o=i.audioInputValue,a=i.videoInValue,s=i.audioOutputValue,o&&(this.audioDeviceId=o),a&&(this.videoDeviceId=a),s&&(this.audioOutputDeviceId=s),this.initConfig=e,this.initParams=Object.assign(Object.assign({},this.initParams),n),t.next=9,this.createStream();case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),r,this)})))}},{key:"createStream",value:function(){return Qr(this,void 0,void 0,t().mark((function e(){var n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("invoke createStream"),this.streamStatus){e.next=4;break}return this.logger.warn("stream rejected"),e.abrupt("return",Promise.reject(ie("XYSDK:950205")));case 4:return this.mergeCaptureConfig(),this.initStreamsConfig(),e.prev=6,e.next=9,this.createUserMediaStream();case 9:return n=e.sent,e.next=12,this.setStreams(n);case 12:return this.streamStatus||this.close(),this.logger.log("stream created successfully: ",{previewStreams:this.previewStreams,streams:this.streams,pipelineStreams:this.pipelineStreams}),this.logger.log("current stream mode: ",this.currentMode),this.emmit("local-stream",this.previewStreams),e.abrupt("return",ie("XYSDK:950206",{}));case 19:return e.prev=19,e.t0=e.catch(6),this.logger.log("create base stream error: ",e.t0),this.logger.log("switch receive only mode:",this.currentMode),e.next=25,this.setStreams(null);case 25:return e.abrupt("return",e.t0);case 26:case"end":return e.stop()}}),e,this,[[6,19]])})))}},{key:"mergeCaptureConfig",value:function(){var e;this.logger.log("invoke mergeCaptureConfig");var t=null===(e=this.client)||void 0===e?void 0:e.getClientConfig(),n=this.initParams,r=n.muteVideo,i=n.muteAudio,o=!(null!=r?r:null==t?void 0:t.muteVideo),a=!(null!=i?i:null==t?void 0:t.muteAudio),s=K.KEEP,c=K.CAPTURE;this.enabledCapture={video:o?c:s,audio:a?c:s},this.logger.log("enabled capture config: ",this.enabledCapture)}},{key:"initStreamsConfig",value:function(){this.logger.log("invoke initStreamsConfig"),this.initPreviewStreamConfig(),this.initRemoteStreamsConfig(),this.initPipelineStreamsConfig()}},{key:"initPreviewStreamConfig",value:function(){this.previewStreams=[{type:R.PREVIEW,stream:null,pipeStream:[],kind:P.VIDEO,status:_.UNKNOWN,resolution:D.RS720,frameRate:N.FR30,origin:j.SDK,id:"PREVIEW_0"}],this.logger.log("init previewStreams config: ",this.previewStreams)}},{key:"initRemoteStreamsConfig",value:function(){var e,t=this,n=((null===(e=this.client)||void 0===e?void 0:e.getFeatureConfig())||{}).enableLowResolution,r=void 0!==n&&n,i=[],o=_.UNKNOWN,a=_.DISABLED,s=R.REMOTE,c=N.FR30,u=j.SDK,l=B.ADVANCED,h=B.COMMON,f=U.SCALE_RES,d=U.MULTI_RES,p=D.RS720,v=D.RS360,g=D.RS180,m=D.RS90,y=P.VIDEO,b=P.AUDIO,S=G.HIGH,w=G.LOW,E=G.MEDIUM;[{kind:y,resolution:p,priorityMode:S,status:r?a:o},{kind:y,resolution:v,priorityMode:E,status:o},{kind:y,resolution:g,priorityMode:w,status:o},{kind:b,resolution:m,priorityMode:w,status:o}].forEach((function(e,n){var r=e.kind,o=e.resolution,a=e.status,p=e.priorityMode,g=t.isFirefox&&o<=v?h:l,m=new MediaStream;i.push({type:s,stream:m,pipeStream:[],kind:r,status:a,resolution:o,frameRate:c,origin:u,constraintMode:g,priorityMode:p,simulcastMode:t.isFirefox?f:d,id:"REMOTE_".concat(n),enableAspectRatio:On.isSupportAspectRatio()})})),this.streams=i,this.logger.log("init streams config: ",this.streams)}},{key:"initPipelineStreamsConfig",value:function(){for(var e=[],t={kind:"audio"},n={type:R.PIPELINE,stream:null,pipeStream:[{kind:"video"},t],kind:P.ALL,status:_.NORMAL,resolution:D.RS90,origin:j.SDK,id:""},r=0;r<11;r++)e.push(Object.assign(Object.assign({},n),{id:"PIPELINE_".concat(r)}));for(var i=0;i<3;i++){var o=i+11+1;e.push(Object.assign(Object.assign({},n),{pipeStream:[t],id:"PIPELINE_".concat(o)}))}this.pipelineStreams=e,this.logger.log("pipelineStreams config: ",this.pipelineStreams)}},{key:"createUserMediaStream",value:function(){return Qr(this,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h,f,d;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("invoke createBaseStream"),n=K.CAPTURE,r=K.FAILED,i=K.KEEP,o=this.enabledCapture,a=o.video,s=o.audio,c=this.getEnableStreamConfig(a,s)){e.next=8;break}return this.logger.log("Not match enableStreamConfig: ",c),this.updateCurrentMode(),e.abrupt("return",Promise.reject(ie("XYSDK:950211",{enableStreamConfig:c})));case 8:return u=this.getUserMediaConstraints(a,s,c),e.prev=9,e.next=12,this.getUserMedia(u);case 12:return l=e.sent,this.updateCurrentMode(),this.updateDevicePermission(),e.abrupt("return",l);case 18:if(e.prev=18,e.t0=e.catch(9),this.logger.log("create baseStream error: ",e.t0),h=e.t0.code,f=c.status,d=c.constraintMode,a!==n||!Fe.includes(h)||!qe.includes(f)){e.next=29;break}return d===B.ADVANCED&&(c.constraintMode=B.FAILED,c.status=_.FAILED,this.logger.log("Capture current resolution failed: ",c)),this.logger.log("Reduce resolution, retry next config"),e.next=28,this.createUserMediaStream();case 28:return e.abrupt("return",e.sent);case 29:if(a!==n||s!==n||!He.includes(h)){e.next=49;break}return e.prev=30,e.next=33,this.recreateVideoStream(c);case 33:return e.abrupt("return",e.sent);case 36:e.prev=36,e.t1=e.catch(30),this.logger.error("recreate video stream error");case 39:return e.prev=39,e.next=42,this.recreateAudioStream();case 42:return e.abrupt("return",e.sent);case 45:return e.prev=45,e.t2=e.catch(39),this.logger.error("recreate audio stream error"),e.abrupt("return",Promise.reject(e.t2));case 49:if(a!==n||s===n){e.next=51;break}return e.abrupt("return",this.handleCaptureStreamException(c,e.t0,{type:P.VIDEO,videoCapture:r,audioCapture:i}));case 51:if(s!==n||a===n){e.next=53;break}return e.abrupt("return",this.handleCaptureStreamException(c,e.t0,{type:P.AUDIO,videoCapture:i,audioCapture:r}));case 53:return e.abrupt("return",Promise.reject(ie("XYSDK:950208",e.t0)));case 54:case"end":return e.stop()}}),e,this,[[9,18],[30,36],[39,45]])})))}},{key:"getUserMediaConstraints",value:function(e,t,n){var r=this.audioDeviceId,i=this.videoDeviceId;return this.getInitConstraints(e,t,i,r,n)}},{key:"updateDevicePermission",value:function(){var e,t;this.logger.log("[stream]update device permission");var n=this.enabledCapture,r=n.video,i=n.audio,o=H.UNKNOWN,a=H.GRANTED,s=K.CAPTURE,c=o,u=o;r===s&&(c=a),i===s&&(u=a),this.logger.log("[stream]update permission: ",{videoPermission:c,audioPermission:u}),null===(t=null===(e=this.client)||void 0===e?void 0:e.deviceManager)||void 0===t||t.updateDevicePermission(c,u)}},{key:"updateCurrentMode",value:function(){var e=this.currentMode.type,t=this.currentMode,n=this.enabledCapture,r=n.video,i=n.audio,o=K.CAPTURE,a=K.KEEP,s=K.FAILED,c=T.NORMAL,u=T.NORMAL_AUDIO,l=T.NORMAL_VIDEO,h=T.UNKNOWN,f=T.RECEIVE_ONLY,d=[f,h,T.FAILED],p=i===o,v=r===o,g=i===s,m=r===s,y=i===a,b=r===a,S=e===u,w=e===l,E=e===c;this.logger.log("[stream]invoke updateCurrentMode: ",{video:r,audio:i,type:e}),p&&v||p&&b&&w||y&&v&&S?t={type:c,detail:"Normal stream mode"}:p&&b&&d.includes(e)||p&&m||y&&m&&E||y&&m&&S?t={type:u,detail:"Normal audio mode"}:v&&y&&d.includes(e)||v&&g||b&&g&&E?t={type:l,detail:"Normal video mode"}:(g&&b&&(S||d.includes(e))||g&&m||y&&m&&w||e===h&&y&&b)&&(t={type:f,detail:"Receive only mode"}),this.currentMode=t,this.logger.log("update current mode: ",this.currentMode)}},{key:"recreateAudioStream",value:function(){var e,n;return Qr(this,void 0,void 0,t().mark((function r(){var i,o,a,s,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=H.GRANTED,o=H.UNKNOWN,a=K.CAPTURE,s=K.KEEP,this.enabledCapture={video:s,audio:a},t.prev=3,this.logger.log("recreate audio stream"),t.next=7,this.createUserMediaStream();case 7:return c=t.sent,null===(n=null===(e=this.client)||void 0===e?void 0:e.deviceManager)||void 0===n||n.updateDevicePermission(o,i),t.abrupt("return",c);case 12:return t.prev=12,t.t0=t.catch(3),this.logger.log("recreate audio stream failed:",t.t0),t.abrupt("return",Promise.reject(t.t0));case 16:case"end":return t.stop()}}),r,this,[[3,12]])})))}},{key:"recreateVideoStream",value:function(e){var n,r;return Qr(this,void 0,void 0,t().mark((function i(){var o,a,s,c,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=H.GRANTED,a=H.UNKNOWN,s=K.CAPTURE,c=K.KEEP,this.enabledCapture={video:s,audio:c},e.status=_.NORMAL,t.prev=4,this.logger.log("recreate video stream"),t.next=8,this.createUserMediaStream();case 8:return u=t.sent,null===(r=null===(n=this.client)||void 0===n?void 0:n.deviceManager)||void 0===r||r.updateDevicePermission(o,a),t.abrupt("return",u);case 13:return t.prev=13,t.t0=t.catch(4),this.logger.log("recreate video stream failed:",t.t0),t.abrupt("return",Promise.reject(t.t0));case 17:case"end":return t.stop()}}),i,this,[[4,13]])})))}},{key:"handleCaptureStreamException",value:function(e,t,n){var r,i;this.logger.log("handle capture stream exception:",{type:n.type,error:t});var o=n.type,a=n.videoCapture,s=n.audioCapture,c=t.code,u=H.DENIED,l=H.UNKNOWN,h=P.AUDIO,f=P.VIDEO,d="XYSDK:950404",p=c===d?u:l,v=o===f?p:l,g=o===h?p:l;this.enabledCapture={video:a,audio:s},this.updateCurrentMode(),e.status=_.FAILED,null===(i=null===(r=this.client)||void 0===r?void 0:r.deviceManager)||void 0===i||i.updateDevicePermission(v,g);var m=c||"XYSDK:950208";return o===f&&c===d?m="XYSDK:950411":o===h&&c===d&&(m="XYSDK:950412"),Promise.reject(ie(m,t.detail))}},{key:"getEnableStreamConfig",value:function(e,t){this.logger.log("invoke getEnableStreamConfig");var n,r=K.CAPTURE,i=e===r,o=t===r,a=0,s=this.streams;if(i){var c,u=$r(s);try{for(u.s();!(c=u.n()).done;){var l=c.value,h=l.resolution,f=l.status;l.kind===P.VIDEO&&h>a&&qe.includes(f)&&(a=h)}}catch(e){u.e(e)}finally{u.f()}n=s.find((function(e){return e.resolution===a}))}else if(o){var d,p=$r(s);try{for(p.s();!(d=p.n()).done;){var v=d.value,g=v.status;if(v.kind===P.AUDIO&&qe.includes(g)){n=v;break}}}catch(e){p.e(e)}finally{p.f()}}return this.logger.log("get enableStreamConfig: ",n),n}},{key:"getEnableContentStreamConfig",value:function(){var e,t,n=P.VIDEO,r=this.contentStreams,i=0,o=$r(r);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.resolution,c=a.status;a.kind===n&&s>i&&qe.includes(c)&&(i=s)}}catch(e){o.e(e)}finally{o.f()}return e=r.find((function(e){return e.resolution===i})),this.logger.log("enable content stream config: ",e),e}},{key:"getInitConstraints",value:function(e,t,n,i,o){this.logger.log("get init constraints config:",{video:e,audio:t,videoDeviceId:n,audioDeviceId:i});var a,s,c=o.constraintMode,u=o.resolution,l={};o.type===R.REMOTE&&c&&c!==B.FAILED&&(l=De[u][c]),l.video&&o&&(l.video=Object.assign(Object.assign({},l.video),(a=o.enableAspectRatio,s=void 0===a||a,Object.assign({},s&&{aspectRatio:1.7777777778}))));var h=r.getBaseConstraints(e,t,l);if(i&&"default"!==i){this.audioDeviceId=i;var f={deviceId:{exact:i}};h.audio&&Object.assign(h.audio,f)}if(n){this.videoDeviceId=n;var d={deviceId:{exact:n}};h.video&&Object.assign(h.video,d)}return this.logger.log("get init constraints: ",h),h}},{key:"getInitContentConstraints",value:function(e){this.logger.log("get init constraints config:",e);var t=e.constraintMode,n=e.resolution,r={};return t&&t!==B.FAILED&&(r=Re[n][t]),r.audio=this.screenAudio,this.logger.log("get init constraints: ",r),r}},{key:"setStreams",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("invoke setStreams"),t.next=3,this.setRemoteStreams(e,P.ALL);case 3:return t.next=5,this.setPreviewStream(e);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"setPreviewStream",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){var r,i,o,a,s=this;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("invoke setPreviewStream"),r=P.AUDIO,i=P.VIDEO,o=0,e&&(o=e.getVideoTracks().length),e&&o>0){a=e.clone();try{this.removeTracks([a],r),this.previewStreams=this.previewStreams.map((function(e){var t=e.stream,n=e.stream;if(n){s.removeTracks([n],i);var r=a.getVideoTracks()[0];n.addTrack(r)}else t=a;return Object.assign(Object.assign({},e),{stream:t,status:_.NORMAL})})),this.logger.log("preview streams config: ",this.previewStreams)}catch(e){this.logger.error("init preview stream constraints failed: ",e)}}else this.logger.log("set preview stream to null"),this.previewStreams=this.previewStreams.map((function(e){return Object.assign(Object.assign({},e),{stream:null,status:_.UNKNOWN})})),this.logger.log("preview streams config of not stream: ",this.previewStreams);case 5:case"end":return t.stop()}}),n,this)})))}},{key:"setRemoteStreams",value:function(e,n){var r;return Qr(this,void 0,void 0,t().mark((function i(){var o,a,c,u,l,h,f,d,p,v,g,m,y,b,S,w,E,x,C,k,O,I,A,T,R,D;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("invoke setRemoteStreams"),o=P.VIDEO,a=P.AUDIO,c=P.ALL,u=B.FAILED,l=[c,o],h=[c,a],!e){t.next=56;break}f=e.getVideoTracks(),d=e.getAudioTracks(),p=f.length>0,v=d.length>0,g=this.streams.entries(),m=!0,y=$r(g),t.prev=13,y.s();case 15:if((b=y.n()).done){t.next=45;break}if(S=s(b.value,2),S[0],w=S[1],E=w.status,x=w.resolution,C=w.simulcastMode,k=w.kind,O=w.stream,I=w.constraintMode,Xe.includes(E)){t.next=43;break}if(this.logger.log("set remote stream: ",w),k!==o||!p||!l.includes(n)){t.next=42;break}if(A=f[0],m?m=!1:A=f[0].clone(),O&&(this.removeTracks([O],o),O.addTrack(A)),w.status=_.NORMAL,C!==U.SCALE_RES){t.next=28;break}return this.logger.log("use scale resolution mode in rtpSender"),t.abrupt("continue",43);case 28:if(t.prev=28,!I||I===u){t.next=34;break}return T=null===(r=De[x])||void 0===r?void 0:r[I].video,t.next=33,A.applyConstraints(T);case 33:this.logger.log("success apply constraints: ",{constraint:T,setting:A.getSettings()});case 34:t.next=42;break;case 36:t.prev=36,t.t0=t.catch(28),this.logger.error("init remote track constraints failed: ",t.t0),w.status=_.FAILED,A.stop(),this.logger.log("next stream config: ",w);case 42:k===a&&v&&h.includes(n)&&(O&&(this.removeTracks([O],a),O.addTrack(d[0])),this.logger.log("set audio media tracks"),w.status=_.NORMAL);case 43:t.next=15;break;case 45:t.next=50;break;case 47:t.prev=47,t.t1=t.catch(13),y.e(t.t1);case 50:return t.prev=50,y.f(),t.finish(50);case 53:this.logger.log("remote streams config: ",this.streams),t.next=59;break;case 56:R=_.UNKNOWN,D=_.DISABLED,this.streams=this.streams.map((function(e){var t=e.kind;return e.status!==D&&(n&&n===t||!n)&&(e.status=R),e})),this.logger.log("Not remote stream, reset status to UNKNOWN: ",this.streams);case 59:case"end":return t.stop()}}),i,this,[[13,47,50,53],[28,36]])})))}},{key:"removeTracks",value:function(e,t){var n=P.VIDEO,r=P.AUDIO;e.forEach((function(e){var i=[];t===r&&(i=e.getAudioTracks()),t===n&&(i=e.getVideoTracks()),i.forEach((function(t){t.stop(),e.removeTrack(t)}))}))}},{key:"setClientObj",value:function(e){this.client=e,this.updateDeviceByLocalStream()}},{key:"getNormalStream",value:function(e){var t=_.NORMAL;return this.streams.find((function(n){var r=n.kind,i=n.status;return r===e&&i===t}))}},{key:"updateDeviceByLocalStream",value:function(){var e,t,n=T.NORMAL,r=T.NORMAL_VIDEO,i=T.NORMAL_AUDIO,o=this.currentMode.type,a=P.VIDEO,s=P.AUDIO;if(o===n||o===r||o===i){var c=this.getNormalStream(s),u=this.getNormalStream(a),l={audioInput:{deviceId:this.audioDeviceId,groupId:"",label:""},videoInput:{deviceId:this.videoDeviceId,groupId:"",label:""},audioOutput:{deviceId:this.audioOutputDeviceId,groupId:"",label:""}};if(c&&c.stream){var h=c.stream.getAudioTracks()[0];if(h){var f=null==h?void 0:h.getSettings(),d=f.deviceId,p=void 0===d?"":d,v=f.groupId,g={deviceId:p,groupId:void 0===v?"":v,label:null==h?void 0:h.label};l.audioInput=g}}if(u&&u.stream){var m=u.stream.getVideoTracks()[0];if(m){var y=null==m?void 0:m.getSettings(),b=y.deviceId,S=void 0===b?"":b,w=y.groupId,E={deviceId:S,groupId:void 0===w?"":w,label:null==m?void 0:m.label};l.videoInput=E}}this.logger.log("Cache preview stream device info by tracks: ",l),null===(t=null===(e=this.client)||void 0===e?void 0:e.deviceManager)||void 0===t||t.setCurrentUsedDevice(l)}}},{key:"getAudioLevel",value:function(e){var t=this;return new Promise((function(n,r){var i,o;if(e)o=e;else if(t.streams.length){var a=P.AUDIO,s=_.NORMAL;o=null===(i=t.streams.find((function(e){var t=e.kind,n=e.status;return t===a&&n===s})))||void 0===i?void 0:i.stream}if(o&&!t.audioLevel)t.audioLevel=new qr(o),t.audioLevel.init(),n(t.audioLevel.getAudioLevel());else if(t.audioLevel){n(t.audioLevel.getAudioLevel())}else t.logger.warn("GetAudio level must need have local stream!"),r(ie("XYSDK:950514"))}))}},{key:"clearAudioLevel",value:function(){this.audioLevel=null}},{key:"closeContentStream",value:function(){if(this.logger.log("close content stream"),this.isShareContent){this.off("start-share-content"),this.off("stop-share-content");var e=_.DISABLED,t=_.UNKNOWN;this.contentStreams.forEach((function(n){var r=n.status,i=n.stream;r!==e&&(i&&i.getTracks().forEach((function(e){e.stop(),e.onended=null,i.removeTrack(e)})),n.status=t)})),this.isShareContent=!1,this.logger.log("content stream closed successfully")}}},{key:"createContentStream",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Qr(this,void 0,void 0,t().mark((function r(){var i,o,a,s;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]invoke createContentStream"),!this.isShareContent){t.next=4;break}return this.logger.warn("Already share content!"),t.abrupt("return",Promise.reject(ie("XYSDK:950509")));case 4:return i={screenAudio:!1},o=Object.assign(Object.assign({},i),n),(a=o.screenAudio)&&(null===(e=this.client)||void 0===e||e.setContentMode(w.BOTH)),this.screenAudio=a,this.isShareContent=!0,this.initContentStreamsConfig(),t.prev=11,t.next=14,this.createContentBaseStream();case 14:return s=t.sent,t.next=17,this.setContentStreams(s);case 17:return this.contentStreamProcessor(),this.logger.log("Capturing content stream succeeded"),t.abrupt("return",this.contentStreams);case 22:return t.prev=22,t.t0=t.catch(11),this.logger.error("capture content stream failed: ",t.t0),this.isShareContent=!1,t.abrupt("return",Promise.reject(t.t0));case 27:case"end":return t.stop()}}),r,this,[[11,22]])})))}},{key:"createContentBaseStream",value:function(){return Qr(this,void 0,void 0,t().mark((function e(){var n,r,i,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[stream]invoke createContentBaseStream"),!(n=this.getEnableContentStreamConfig())){e.next=20;break}return r=this.getInitContentConstraints(n),e.prev=4,i=this.getDisplayMedia(r),e.abrupt("return",i);case 9:if(e.prev=9,e.t0=e.catch(4),o=n.status,!qe.includes(o)){e.next=19;break}return n.constraintMode=B.FAILED,n.status=_.FAILED,this.logger.log("Reduce resolution, retry next content config"),e.next=18,this.createContentBaseStream();case 18:return e.abrupt("return",e.sent);case 19:return e.abrupt("return",Promise.reject(e.t0));case 20:return e.abrupt("return",Promise.reject(ie("XYSDK:950512")));case 21:case"end":return e.stop()}}),e,this,[[4,9]])})))}},{key:"createElectronBaseStream",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,minWidth:1920,maxWidth:1920,minHeight:1080,maxHeight:1080}}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),this.logger.log("capture electron err: ",t.t0),i=this.handleCreateContentStreamError(t.t0),t.abrupt("return",Promise.reject(i));case 12:case"end":return t.stop()}}),n,this,[[0,7]])})))}},{key:"getElectronContentSources",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["window","screen"];return Qr(this,void 0,void 0,t().mark((function r(){var i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getSources({types:n});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),r,null,[[0,7]])})))}},{key:"createElectronContentStream",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]invoke createElectronContentStream"),!this.isShareContent){t.next=4;break}return this.logger.warn("Already share content!"),t.abrupt("return",Promise.reject(ie("XYSDK:950509")));case 4:if(e){t.next=7;break}return this.logger.warn("No selected sourceId!"),t.abrupt("return",Promise.reject(ie("XYSDK:950510")));case 7:return this.isShareContent=!0,this.initContentStreamsConfig(),t.prev=9,t.next=12,this.createElectronBaseStream(e);case 12:return r=t.sent,t.next=15,this.setContentStreams(r);case 15:return this.contentStreamProcessor(),this.logger.log("capture electron content stream succeeded"),t.abrupt("return",this.contentStreams);case 20:return t.prev=20,t.t0=t.catch(9),this.logger.error("capture electron content stream failed: ",t.t0),this.isShareContent=!1,t.abrupt("return",Promise.reject(t.t0));case 25:case"end":return t.stop()}}),n,this,[[9,20]])})))}},{key:"getPreviewStream",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{video:{},audio:{}};return Qr(this,void 0,void 0,t().mark((function i(){var o,a,s,c,u,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o=r.video,a=void 0===o?{}:o,s=r.audio,c=void 0===s?{}:s,u={},e&&(u.video=Object.assign({},Ae,a)),n&&(u.audio=Object.assign({},c)),this.logger.log("get preview stream constraints:",u),t.next=8,this.getUserMedia(u);case 8:return l=t.sent,t.abrupt("return",l);case 12:return t.prev=12,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 15:case"end":return t.stop()}}),i,this,[[0,12]])})))}},{key:"getUserMedia",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.logger.log("Get media constraints:",e),t.next=4,navigator.mediaDevices.getUserMedia(e);case 4:return r=t.sent,this.logger.log("Get media successfully:",{id:r.id,active:r.active}),t.abrupt("return",r);case 9:return t.prev=9,t.t0=t.catch(0),this.logger.error("Get media error: ",t.t0),i=this.handleCreateStreamError(t.t0),t.abrupt("return",Promise.reject(i));case 14:case"end":return t.stop()}}),n,this,[[0,9]])})))}},{key:"getDisplayMedia",value:function(e){return Qr(this,void 0,void 0,t().mark((function n(){var r,i;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.logger.log("Get display media constraints:",e),t.next=4,navigator.mediaDevices.getDisplayMedia(e);case 4:return r=t.sent,this.logger.log("Get display media succeeded:",{id:r.id,active:r.active}),t.abrupt("return",r);case 9:return t.prev=9,t.t0=t.catch(0),this.logger.error("Get display media error: ",t.t0),i=this.handleCreateContentStreamError(t.t0),t.abrupt("return",Promise.reject(i));case 14:case"end":return t.stop()}}),n,this,[[0,9]])})))}},{key:"handleCloseContentEvent",value:function(){var e=this,t=_.NORMAL,n=P.VIDEO,r=this.contentStreams.filter((function(e){var r=e.status,i=e.kind,o=e.stream;return r===t&&i===n&&o})).map((function(e){var t=e.stream;return null==t?void 0:t.getVideoTracks()[0]})),i=r.length,o=0,a=function(){o+=1,e.logger.log("content track ended: ",{endedCount:o,enableTracksLength:i}),o===i&&e.emmit("stop-share-content",{})};r.forEach((function(t){e.logger.log("bind content track ended event: ",{kind:null==t?void 0:t.kind,id:null==t?void 0:t.id}),t&&(t.onended=a)}))}},{key:"setContentStreams",value:function(e){var n;return Qr(this,void 0,void 0,t().mark((function r(){var i,o,a,c,u,l,h,f,d,p,v,g,m,y,b,S,w,E,x,C,k,O;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]setContentStreams"),!e){t.next=48;break}i=!0,o=P.VIDEO,a=P.AUDIO,c=B.COMMON,u=B.FAILED,l=e.getVideoTracks()[0],h=e.getAudioTracks()[0],f=this.contentStreams.entries(),d=$r(f),t.prev=9,d.s();case 11:if((p=d.n()).done){t.next=37;break}if(v=s(p.value,2),v[0],g=v[1],m=g.status,y=g.resolution,b=g.kind,S=g.constraintMode,w=void 0===S?c:S,E=g.stream,Xe.includes(m)){t.next=35;break}if(b!==o){t.next=34;break}if(g.status=_.NORMAL,x=l,i?i=!1:x=l.clone(),null==E||E.addTrack(x),t.prev=20,!w||w===u){t.next=26;break}return C=null===(n=Re[y])||void 0===n?void 0:n[w].video,t.next=25,x.applyConstraints(C);case 25:this.logger.log("success apply constraints: ",{constraint:C,setting:x.getSettings()});case 26:t.next=34;break;case 28:t.prev=28,t.t0=t.catch(20),this.logger.error("content track constraints failed: ",t.t0),g.status=_.FAILED,x.stop(),null==E||E.removeTrack(x);case 34:b===a&&(h?(g.status=_.NORMAL,null==E||E.addTrack(h)):g.status=_.UNKNOWN);case 35:t.next=11;break;case 37:t.next=42;break;case 39:t.prev=39,t.t1=t.catch(9),d.e(t.t1);case 42:return t.prev=42,d.f(),t.finish(42);case 45:this.logger.log("content streams config: ",this.contentStreams),t.next=51;break;case 48:k=_.UNKNOWN,O=_.DISABLED,this.streams=this.contentStreams.map((function(e){return e.status!==O&&(e.status=k),e})),this.logger.log("Not remote stream, reset status to UNKNOWN: ",this.contentStreams);case 51:case"end":return t.stop()}}),r,this,[[9,39,42,45],[20,28]])})))}},{key:"contentStreamProcessor",value:function(){var e;this.handleCloseContentEvent(),null===(e=this.client)||void 0===e||e.applyShareContent(),this.logger.log("create share content stream: ",this.contentStreams)}},{key:"initContentStreamsConfig",value:function(){var e,t=this;if(!this.contentStreams.length){var n=((null===(e=this.client)||void 0===e?void 0:e.getFeatureConfig())||{}).enableLowResolution,r=void 0!==n&&n,i=[],o=_.UNKNOWN,a=_.DISABLED,s=R.CONTENT,c=N.FR15,u=j.SDK,l=B.ADVANCED,h=B.COMMON,f=U.MULTI_RES,d=P.VIDEO,p=P.AUDIO,v=D.RS1080,g=D.RS720,m=D.RS90,y=G.HIGH,b=G.LOW;[{kind:d,resolution:v,priorityMode:y,status:r?a:o},{kind:d,resolution:g,priorityMode:G.MEDIUM,status:o},{kind:p,resolution:m,priorityMode:b,status:o}].forEach((function(e,n){var r=e.kind,o=e.resolution,a=e.status,d=e.priorityMode,p=t.isFirefox?h:l,v=f,g=new MediaStream;i.push({type:s,stream:g,pipeStream:[],kind:r,status:a,resolution:o,frameRate:c,origin:u,constraintMode:p,simulcastMode:v,priorityMode:d,id:"CONTENT_".concat(n)})})),this.contentStreams=i,this.logger.log("init content streams config: ",this.contentStreams)}}},{key:"handleCreateContentStreamError",value:function(e){var t=e.name,n=e.message,r={name:t,message:n};return ie("NotAllowedError"===t?"Permission denied by system"===n?"XYSDK:950508":"Permission denied"===n?"XYSDK:950501":"XYSDK:950511":"InvalidStateError"===t?"XYSDK:950502":"AbortError"===t?"XYSDK:950503":"NotFoundError"===t?"XYSDK:950504":"NotReadableError"===t?"XYSDK:950505":"OverconstrainedError"===t?"XYSDK:950506":"TypeError"===t?"XYSDK:950507":"XYSDK:950503",r)}},{key:"handleCreateStreamError",value:function(e){var t={code:"",msg:"",detail:""},n=e||{},r=n.name,i=n.code,o=n.message,a=void 0===o?"":o,s=n.constraint,c=void 0===s?"":s,u={name:r,message:a,code:i};return t="NotFoundError"==r||"DevicesNotFoundError"==r?ie("XYSDK:950401",u):"NotReadableError"==r||"TrackStartError"==r?ie("XYSDK:950402",u):"OverconstrainedError"==r||"ConstraintNotSatisfiedError"==r?ie("XYSDK:950403",Object.assign(Object.assign({},u),{constraint:c})):"NotAllowedError"==r||"PermissionDeniedError"==r||a.includes("NotAllowedError")?ie("XYSDK:950404",u):ie("TypeError"==r||"TypeError"==r?"XYSDK:950405":"XYSDK:950406",u),this.logger.error("handle create stream error: ",t),t}}],[{key:"getStreamInstance",value:function(e){return this.instance||(this.instance=new r(e)),this.instance}},{key:"getBaseConstraints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getSupportConstraints(),o=n.video,a=n.audio;return{video:r.getCompatibleConstraints(e,i,o),audio:r.getCompatibleConstraints(t,i,a)}}},{key:"getCompatibleConstraints",value:function(e,t,n){var r={};return e===K.CAPTURE?ae.isBoolean(n)?r=!!n:Object.keys(n).forEach((function(e){t[e]&&(r[e]=n[e])})):r=!1,r}},{key:"getSupportConstraints",value:function(){var e={channelCount:!0,frameRate:!0,aspectRatio:!0,width:!0,height:!0};return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&(e=navigator.mediaDevices.getSupportedConstraints()),e}}]),r}(gn),ti="color: #3876ff;",ni="*********************************************************",ri={server:Gt.host,layout:"AUTO",debug:!1,muteAudio:!1,muteVideo:!1,localHide:!1,localMirror:!0,isThird:!0,isVerifyMeetingId:!0,clientId:"",clientSecret:"",container:{},isSupportHybridCloud:!1,__hideId:0,__monitorMode:"",checkSSL:!0},ii="%c".concat(ni," \n\t\n* 欢迎使用 XYLink WebRTC SDK - 小鱼易连Web云视频 \n\t\n* 版本:").concat(Mt," \n\t\n* 文档地址:https://openapi.xylink.com/common/meeting/doc/description?platform=web \n\t\n* 体验地址:https://cdn.xylink.com/webrtc/web/index.html \n\t\n* 问题反馈:https://github.com/xylink-com/xylink-rtc-demo/issues \n\t\n* 联系方式:luojinghui(luojinghui424@gmail.com) \n\n").concat(ni),oi="%c[INFO] XYLink Agent:"+navigator.userAgent+"\n",ai=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},si={version:Mt,client:null,logger:new vn({dbName:"XYRTC_LOG",tableName:"LOG",dbVersion:10,tableCount:3}),createClient:function(e,t){var n=Object.assign(Object.assign({},ri),e),r=new Xr(n,t||si.logger);return si.client=r,r},createStream:function(){var e=arguments.length>1?arguments[1]:void 0;return new ei({client:si.client,logger:e||si.logger})},setConfig:function(e){var t=e||{},n=t.client_id,r=t.client_secret;zt.setTokenInfo(e),n&&zt.setClientInfo({clientId:n,clientSecret:r})},setLocale:function(e){!function(e){ee=["en_US","zh_CN","zh_TW"].find((function(t){return t.toUpperCase()===e.toUpperCase()}))||"zh_CN"}(e)},checkSupportWebRTC:function(){return ai(void 0,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c,u,l,h;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,On.isSupportRTC();case 2:return n=e.sent,e.next=5,On.isSupportUserMedia();case 5:return r=e.sent,i=On.isSupportWebsocket(),o=On.isMobile(),a=On.isMinBrowser(),e.next=11,On.isSupportH264();case 11:return s=e.sent,c=n.isSupportRTC,u=n.isSupportAddTransceiver,l=n.isSupportAddtrack,h={result:(a||o)&&c&&i&&s,detail:{isSupportRTC:c,isSupportWebsocket:i,isSupportBrowser:a,isSupportMobileBrowser:o,isSupportH264:s,isSupportAddTransceiver:u,isSupportAddtrack:l,isSupportUserMedia:r}},si.logger.debug("desktop support result: ",h),e.abrupt("return",h);case 17:case"end":return e.stop()}}),e)})))},checkSupportMobileWebRTC:function(){return ai(void 0,void 0,void 0,t().mark((function e(){var n,r,i,o,a,s,c;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=On.isMobile(),e.next=3,si.checkSupportWebRTC();case 3:return r=e.sent,i=r.detail,o=i.isSupportRTC,a=i.isSupportWebsocket,s=i.isSupportH264,c={result:n&&o&&a&&s,detail:Object.assign({},r.detail)},si.logger.debug("mobile support result: ",c),e.abrupt("return",c);case 9:case"end":return e.stop()}}),e)})))},checkSupportShareContent:function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)},closePreviewStream:function(e){return i(void 0,void 0,void 0,t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&e.getTracks().forEach((function(e){e.enabled=!1,e.stop()}));case 1:case"end":return t.stop()}}),n)})))},setOutputAudioDevice:function(e,t){e&&void 0!==e.sinkId?e.setSinkId(t).then((function(){})).catch((function(e){var t=e;"SecurityError"===(null==e?void 0:e.name)&&(t="You need to use HTTPS for selecting audio output device: ".concat(e)),console.error(t)})):console.warn("Browser does not support output device selection.")},render:(console.group("小鱼易连 WebRTC SDK"),console.info(ii,ti),console.info(oi,ti),void console.groupEnd())};const ci=si;window.xyRTC={logger:si.logger,version:Mt}})(),r})()));
|