@xylink/xy-rtc-sdk 4.0.1 → 4.0.2

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.
Files changed (168) hide show
  1. package/{README.MD → README.md} +1 -1
  2. package/action/ability.d.ts +151 -0
  3. package/action/api.d.ts +252 -0
  4. package/action/auth.d.ts +134 -0
  5. package/action/base.d.ts +13 -0
  6. package/action/config.d.ts +63 -0
  7. package/action/control.d.ts +101 -0
  8. package/action/enterprise.d.ts +66 -0
  9. package/{lib/tools/httpClient.d.ts → action/http.d.ts} +19 -11
  10. package/action/index.d.ts +92 -0
  11. package/action/index.type.d.ts +30 -0
  12. package/action/log.d.ts +17 -0
  13. package/action/meeting.d.ts +107 -0
  14. package/{lib/enum → enum}/client.d.ts +1 -6
  15. package/{lib/enum → enum}/constraints.d.ts +1 -6
  16. package/{lib/enum → enum}/device.d.ts +6 -0
  17. package/{lib/enum/errorCode.d.ts → enum/errorCode/common.d.ts} +1 -22
  18. package/enum/errorCode/index.d.ts +6 -0
  19. package/enum/errorCode/server.d.ts +10 -0
  20. package/enum/errorCode/signal.d.ts +15 -0
  21. package/{lib/enum → enum}/index.d.ts +11 -8
  22. package/enum/meeting.d.ts +15 -0
  23. package/{lib/enum → enum}/polling.d.ts +1 -0
  24. package/feature/artboard/index.d.ts +139 -0
  25. package/feature/artboard/index.type.d.ts +264 -0
  26. package/{lib/feature → feature}/customMessage/index.d.ts +3 -8
  27. package/{lib/feature → feature}/edu/index.d.ts +2 -1
  28. package/{lib/feature → feature}/edu/index.type.d.ts +1 -0
  29. package/feature/im/index.d.ts +89 -0
  30. package/feature/im/index.type.d.ts +30 -0
  31. package/feature/index.d.ts +29 -0
  32. package/feature/query/index.d.ts +36 -0
  33. package/feature/query/index.type.d.ts +61 -0
  34. package/{lib/feature → feature}/speaker/index.d.ts +5 -10
  35. package/{lib/feature → feature}/speaker/index.type.d.ts +1 -0
  36. package/{lib/index.d.ts → index.d.ts} +19 -21
  37. package/{lib/interface → interface}/clientInterface.type.d.ts +24 -11
  38. package/{lib/interface → interface}/contentTrackInterface.type.d.ts +1 -6
  39. package/{lib/interface → interface}/event.type.d.ts +60 -1
  40. package/{lib/interface → interface}/videoAudioTrackInterface.type.d.ts +2 -7
  41. package/{lib/main → main}/ability/const.d.ts +1 -0
  42. package/{lib/main → main}/ability/index.d.ts +5 -10
  43. package/main/auth/index.d.ts +160 -0
  44. package/main/auth/index.type.d.ts +63 -0
  45. package/main/client/clientBase.d.ts +60 -0
  46. package/main/client/clientState.d.ts +36 -0
  47. package/{lib/main/client.d.ts → main/client/index.d.ts} +253 -79
  48. package/main/client/index.type.d.ts +42 -0
  49. package/{lib/main → main}/device/index.d.ts +5 -15
  50. package/{lib/tools → main/helper}/i18n.d.ts +2 -1
  51. package/{lib/main → main}/helper/index.d.ts +9 -7
  52. package/{lib/main → main}/layout/index.d.ts +7 -16
  53. package/{lib/main → main}/layout/index.type.d.ts +10 -9
  54. package/{lib/main → main}/layout/polling.d.ts +3 -11
  55. package/{lib/main → main}/layout/state.d.ts +4 -10
  56. package/{lib/tools → main/layout}/template/index.d.ts +25 -7
  57. package/{lib/main/layout/template.d.ts → main/layout/template/manager.d.ts} +2 -1
  58. package/main/layout/template/mobile.d.ts +4 -0
  59. package/main/layout/template/polling.d.ts +3 -0
  60. package/{lib/main → main}/media/index.d.ts +13 -11
  61. package/{lib/main → main}/media/index.type.d.ts +1 -0
  62. package/{lib/main → main}/meeting/control.d.ts +20 -1
  63. package/{lib/main → main}/meeting/control.type.d.ts +1 -0
  64. package/{lib/main → main}/meeting/index.d.ts +39 -32
  65. package/main/meeting/index.type.d.ts +43 -0
  66. package/{lib/main → main}/meeting/verify.d.ts +2 -7
  67. package/{lib/main/peer.d.ts → main/peer/index.d.ts} +30 -25
  68. package/main/peer/index.type.d.ts +10 -0
  69. package/{lib/main → main}/plugin/index.d.ts +2 -7
  70. package/{lib/main → main}/quality/index.d.ts +1 -6
  71. package/{lib/main → main}/quality/quality.worker.d.ts +1 -4
  72. package/{lib/main → main}/quality/report.d.ts +2 -1
  73. package/{lib/main → main}/render/index.d.ts +4 -9
  74. package/{lib/main → main}/render/index.type.d.ts +2 -7
  75. package/{lib/main → main}/render/videoManager.d.ts +2 -7
  76. package/{lib/main → main}/roster/index.d.ts +9 -9
  77. package/{lib/main → main}/server/index.d.ts +73 -4
  78. package/main/server/index.type.d.ts +53 -0
  79. package/{lib/main → main}/signal/index.d.ts +2 -1
  80. package/{lib/main → main}/socket/index.d.ts +6 -12
  81. package/{lib/main → main}/stream/index.d.ts +17 -21
  82. package/{lib/main → main}/track/baseTrack.d.ts +6 -14
  83. package/{lib/main → main}/track/contentTrack.d.ts +4 -12
  84. package/main/track/customContentTrack.d.ts +10 -0
  85. package/main/track/customVideoAudioTrack.d.ts +10 -0
  86. package/{lib/main → main}/track/helper.d.ts +1 -1
  87. package/{lib/main → main}/track/videoAudioCapture.d.ts +2 -10
  88. package/{lib/main → main}/track/videoAudioTrack.d.ts +13 -15
  89. package/{lib/main → main}/vom/index.d.ts +2 -7
  90. package/package.json +27 -112
  91. package/{lib/tools/analyser.d.ts → tools/analyser/index.d.ts} +2 -9
  92. package/{lib/tools/analyserManager.d.ts → tools/analyser/manager.d.ts} +4 -13
  93. package/{lib/tools → tools}/config.d.ts +3 -10
  94. package/tools/data/list.d.ts +87 -0
  95. package/tools/data/map.d.ts +17 -0
  96. package/{lib/tools/detectBrowser/index.d.ts → tools/detector/browser.d.ts} +3 -3
  97. package/{lib/tools/detectTool → tools/detector}/index.d.ts +3 -7
  98. package/{lib/tools/detectStream/index.d.ts → tools/detector/stream.d.ts} +2 -9
  99. package/{lib/tools → tools}/emitter.d.ts +9 -3
  100. package/tools/frame/index.d.ts +36 -0
  101. package/tools/frame/index.type.d.ts +1 -0
  102. package/tools/index.d.ts +72 -0
  103. package/{lib/tools/dbManager.d.ts → tools/log/db.d.ts} +8 -14
  104. package/{lib/tools → tools}/log/logger.d.ts +6 -9
  105. package/tools/log/logger.worker.d.ts +10 -0
  106. package/{lib/tools → tools}/log/loggerManager.d.ts +3 -3
  107. package/tools/log/utils.d.ts +6 -0
  108. package/{lib/tools → tools}/pressure/index.d.ts +2 -9
  109. package/{lib/tools/promiseQueue.d.ts → tools/queue/async.d.ts} +3 -9
  110. package/tools/queue/queue.type.d.ts +10 -0
  111. package/{lib/tools/queue.d.ts → tools/queue/sync.d.ts} +3 -9
  112. package/{lib/tools → tools}/resize.d.ts +3 -4
  113. package/{lib/tools/snapshot.d.ts → tools/snapshot/index.d.ts} +3 -11
  114. package/tools/snapshot/index.type.d.ts +38 -0
  115. package/{lib/tools → tools/socket}/socket.d.ts +6 -10
  116. package/tools/socket/socketManager.d.ts +32 -0
  117. package/tools/store.d.ts +47 -0
  118. package/tools/utils.d.ts +162 -0
  119. package/{lib/tools → tools}/verify.d.ts +1 -1
  120. package/tools/window.d.ts +31 -0
  121. package/{lib/type → type}/ability.d.ts +3 -1
  122. package/{lib/type → type}/analyser.d.ts +1 -8
  123. package/{lib/type → type}/auth.d.ts +34 -0
  124. package/{lib/type → type}/base.d.ts +43 -11
  125. package/{lib/type → type}/capture.d.ts +1 -0
  126. package/{lib/type → type}/client.d.ts +65 -70
  127. package/{lib/type → type}/index.d.ts +5 -3
  128. package/{lib/type → type}/layout.d.ts +15 -1
  129. package/{lib/type → type}/logger.d.ts +1 -6
  130. package/{lib/type → type}/meeting.d.ts +105 -15
  131. package/{lib/type → type}/quality.d.ts +2 -7
  132. package/{lib/type → type}/stream.d.ts +4 -5
  133. package/{lib/type → type}/track.d.ts +1 -9
  134. package/xyrtc.js +23212 -0
  135. package/lib/action/index.d.ts +0 -415
  136. package/lib/enum/meeting.d.ts +0 -4
  137. package/lib/feature/index.d.ts +0 -3
  138. package/lib/main/auth/index.d.ts +0 -101
  139. package/lib/main/clientBase.d.ts +0 -40
  140. package/lib/main/clientState.d.ts +0 -56
  141. package/lib/main/server/index.type.d.ts +0 -21
  142. package/lib/main/track/customContentTrack.d.ts +0 -18
  143. package/lib/main/track/customVideoAudioTrack.d.ts +0 -18
  144. package/lib/tools/enum.d.ts +0 -6
  145. package/lib/tools/index.d.ts +0 -8
  146. package/lib/tools/log/logger.worker.d.ts +0 -13
  147. package/lib/tools/regex.d.ts +0 -4
  148. package/lib/tools/store.d.ts +0 -15
  149. package/lib/tools/template/mobile.d.ts +0 -9
  150. package/lib/tools/template/polling.d.ts +0 -8
  151. package/lib/tools/utils.d.ts +0 -97
  152. package/lib/xyrtc.cjs.js +0 -1
  153. package/lib/xyrtc.umd.js +0 -1
  154. /package/{lib/enum → enum}/analyser.d.ts +0 -0
  155. /package/{lib/enum → enum}/i18n.d.ts +0 -0
  156. /package/{lib/interface → interface}/baseModule.type.d.ts +0 -0
  157. /package/{lib/main → main}/device/index.type.d.ts +0 -0
  158. /package/{lib/main → main}/helper/index.type.d.ts +0 -0
  159. /package/{lib/main → main}/meeting/verify.type.d.ts +0 -0
  160. /package/{lib/main → main}/render/videoManager.type.d.ts +0 -0
  161. /package/{lib/main → main}/vom/index.type.d.ts +0 -0
  162. /package/{lib/tools/detectTool → tools/detector}/index.type.d.ts +0 -0
  163. /package/{lib/tools/detectStream/index.type.d.ts → tools/detector/stream.type.d.ts} +0 -0
  164. /package/{lib/tools → tools}/pressure/index.type.d.ts +0 -0
  165. /package/{lib/type → type}/action.d.ts +0 -0
  166. /package/{lib/type → type}/peer.d.ts +0 -0
  167. /package/{lib/type → type}/polling.d.ts +0 -0
  168. /package/{lib/type → type}/socket.d.ts +0 -0
package/lib/xyrtc.cjs.js DELETED
@@ -1 +0,0 @@
1
- (()=>{var e={2362:(e,t,r)=>{e.exports=r(2639)},4617:(e,t,r)=>{"use strict";var n=r(7534),i=r(5622),o=r(1870),a=r(6529),s=r(3697),u=r(3768),c=r(7561),l=r(9732),h=r(9980),f=r(9560);e.exports=function(e){return new Promise((function(t,r){var d,p=e.data,v=e.headers,g=e.responseType;function m(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}n.isFormData(p)&&delete v["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+S)}var w=s(e.baseURL,e.url);function E(){if(y){var n="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y};i((function(e){t(e),m()}),(function(e){r(e),m()}),o),y=null}}if(y.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(r(l("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){r(l("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||h.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},n.isStandardBrowserEnv()){var k=(e.withCredentials||c(w))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;k&&(v[e.xsrfHeaderName]=k)}"setRequestHeader"in y&&n.forEach(v,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete v[t]:y.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){y&&(r(!e||e&&e.type?new f("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),p||(p=null),y.send(p)}))}},2639:(e,t,r)=>{"use strict";var n=r(7534),i=r(2695),o=r(5416),a=r(1545);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(9980));s.Axios=o,s.Cancel=r(9560),s.CancelToken=r(9142),s.isCancel=r(7844),s.VERSION=r(5138).version,s.all=function(e){return Promise.all(e)},s.spread=r(6847),s.isAxiosError=r(1052),e.exports=s,e.exports.default=s},9560: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},9142:(e,t,r)=>{"use strict";var n=r(9560);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;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},7844:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},5416:(e,t,r)=>{"use strict";var n=r(7534),i=r(6529),o=r(7334),a=r(7395),s=r(1545),u=r(4527),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e,t){if("string"==typeof e?(t=t||{}).url=e:t=e||{},!t.url)throw new Error("Provided config url is not valid");(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&u.assertOptions(r,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var h=[a,void 0];for(Array.prototype.unshift.apply(h,n),h=h.concat(l),o=Promise.resolve(t);h.length;)o=o.then(h.shift(),h.shift());return o}for(var f=t;n.length;){var d=n.shift(),p=n.shift();try{f=d(f)}catch(e){p(e);break}}try{o=a(f)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},l.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},7334:(e,t,r)=>{"use strict";var n=r(7534);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),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},3697:(e,t,r)=>{"use strict";var n=r(7652),i=r(348);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},9732:(e,t,r)=>{"use strict";var n=r(5028);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},7395:(e,t,r)=>{"use strict";var n=r(7534),i=r(5735),o=r(7844),a=r(9980),s=r(9560);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,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||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5028: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,status:this.response&&this.response.status?this.response.status:null}},e}},1545:(e,t,r)=>{"use strict";var n=r(7534);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},5622:(e,t,r)=>{"use strict";var n=r(9732);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},5735:(e,t,r)=>{"use strict";var n=r(7534),i=r(9980);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},9980:(e,t,r)=>{"use strict";var n=r(7534),i=r(5651),o=r(5028),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(4617)),u),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)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},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(a)})),e.exports=c},5138:e=>{e.exports={version:"0.25.0"}},2695: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)}}},6529:(e,t,r)=>{"use strict";var n=r(7534);function i(e){return encodeURIComponent(e).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 a=[];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)),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}},348:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},1870:(e,t,r)=>{"use strict";var n=r(7534);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.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(){}}},7652:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},1052:(e,t,r)=>{"use strict";var n=r(7534);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},7561:(e,t,r)=>{"use strict";var n=r(7534);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}},5651:(e,t,r)=>{"use strict";var n=r(7534);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},3768:(e,t,r)=>{"use strict";var n=r(7534),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,a={};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(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},6847:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4527:(e,t,r)=>{"use strict";var n=r(5138).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},7534:(e,t,r)=>{"use strict";var n=r(2695),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function h(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:s,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"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,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:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:h,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):o(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)h(arguments[n],r);return t},extend:function(e,t,r){return h(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),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),a=r(4097),s=r(4109),u=r(3464),c=r(5061);e.exports=function(e){return new Promise((function(t,l){var h=e.data,f=e.headers;n.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 r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};i(t,l,n),d=null}},d.onabort=function(){d&&(l(c("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(c(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var m=r(4372),y=(e.withCredentials||u(g))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&n.forEach(f,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)})),n.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,r)=>{"use strict";var n=r(4867),i=r(1849),o=r(321),a=r(7185);function s(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 u=s(r(5655));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(5263),u.CancelToken=r(4972),u.isCancel=r(6502),u.all=function(e){return Promise.all(e)},u.spread=r(8713),e.exports=u,e.exports.default=u},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),a=r(3572),s=r(7185);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.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],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},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,i){return this.request(n.merge(i||{},{method:e,url:t,data:r}))}})),e.exports=u},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 a=new Error(e);return n(a,t,r,i,o)}},3572:(e,t,r)=>{"use strict";var n=r(4867),i=r(8527),o=r(6502),a=r(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=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||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,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"],a=["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(a,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=i.concat(o).concat(a),u=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(u,(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 a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=r(5448)),s),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)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.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}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(o)})),e.exports=u},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 a=[];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)),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,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.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)}},3464:(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,a={};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(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},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 a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(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&&!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:u,isStream:function(e){return s(e)&&u(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:c,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++)c(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++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=r(7771),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,s),l=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return o(t,1+h(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},738:(e,t,r)=>{"use strict";const n=r(3341),i=r(1185),o=r(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 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},1185: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,"")}},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=[],a=[],s=[],u=[],c=[],l=[],h=[],f=[],d=[];!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;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,u[r]=y<<8|y>>>24,c[r]=y,y=16843009*m^65537*g^257*v^16843008*r,l[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,f[p]=y<<8|y>>>24,d[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=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],u=0;u<n;u++){if(a=n-u,u%4)var c=o[a];else c=o[a-4];s[u]=u<4||a<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],h=e[t+2]^r[2],f=e[t+3]^r[3],d=4,p=1;p<u;p++){var v=n[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&f]^r[d++],g=n[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&c]^r[d++],m=n[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^a[255&l]^r[d++],y=n[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&h]^r[d++];c=v,l=g,h=m,f=y}v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&f])^r[d++],g=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[f>>>8&255]<<8|s[255&c])^r[d++],m=(s[h>>>24]<<24|s[f>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[d++],y=(s[f>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],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,a=r.BufferedBlockAlgorithm,s=t.enc,u=(s.Utf8,s.Base64),c=t.algo.EvpKDF,l=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b: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={}),f=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}}),d=h.CBC=function(){var t=f.extend();function r(t,r,n){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<n;a++)t[r+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(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,a=[],s=0;s<n;s+=4)a.push(i);var u=o.create(a,n);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},v=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,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(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:t})}},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),a=i.cfg;return v.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=c.create({keySize:t+r}).compute(e,n),a=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,v.create({key:i,iv:a,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),!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}}(),a={},s=a.lib={},u=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)}},c=s.WordArray=u.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 a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>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=u.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 c.init(t,e)}}),l=a.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 c.init(r,t/2)}},f=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 c.init(r,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=u.extend({reset:function(){this._data=new c.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 r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var h=0;h<u;h+=a)this._doProcessBlock(i,h);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=u.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(s.Hasher=p.extend({cfg:u.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){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)}}}),a.algo={});return a}(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,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return 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 a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,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 a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)},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 a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}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,a,s,u,c,l;e.exports=(l=r(8249),r(2783),r(9824),i=(n=l).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,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=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.length<u;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(var l=1;l<c;l++)r=i.finalize(r),i.reset();o.concat(r)}return o.sigBytes=4*u,o}}),n.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)},l.EvpKDF)},2209:function(e,t,r){var n,i,o,a;e.exports=(a=r(8249),r(5109),i=(n=a).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})}},a.format.Hex)},9824:function(e,t,r){var n,i,o,a;e.exports=(n=r(8249),o=(i=n).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 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(),s=i.words,u=o.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=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(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(531),r(2807),r(1077),r(6475),r(6991),r(2209),r(452),r(7957),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,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],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],k=e[t+12],I=e[t+13],x=e[t+14],C=e[t+15],O=o[0],T=o[1],_=o[2],A=o[3];O=c(O,T,_,A,a,7,s[0]),A=c(A,O,T,_,u,12,s[1]),_=c(_,A,O,T,d,17,s[2]),T=c(T,_,A,O,p,22,s[3]),O=c(O,T,_,A,v,7,s[4]),A=c(A,O,T,_,g,12,s[5]),_=c(_,A,O,T,m,17,s[6]),T=c(T,_,A,O,y,22,s[7]),O=c(O,T,_,A,b,7,s[8]),A=c(A,O,T,_,S,12,s[9]),_=c(_,A,O,T,w,17,s[10]),T=c(T,_,A,O,E,22,s[11]),O=c(O,T,_,A,k,7,s[12]),A=c(A,O,T,_,I,12,s[13]),_=c(_,A,O,T,x,17,s[14]),O=l(O,T=c(T,_,A,O,C,22,s[15]),_,A,u,5,s[16]),A=l(A,O,T,_,m,9,s[17]),_=l(_,A,O,T,E,14,s[18]),T=l(T,_,A,O,a,20,s[19]),O=l(O,T,_,A,g,5,s[20]),A=l(A,O,T,_,w,9,s[21]),_=l(_,A,O,T,C,14,s[22]),T=l(T,_,A,O,v,20,s[23]),O=l(O,T,_,A,S,5,s[24]),A=l(A,O,T,_,x,9,s[25]),_=l(_,A,O,T,p,14,s[26]),T=l(T,_,A,O,b,20,s[27]),O=l(O,T,_,A,I,5,s[28]),A=l(A,O,T,_,d,9,s[29]),_=l(_,A,O,T,y,14,s[30]),O=h(O,T=l(T,_,A,O,k,20,s[31]),_,A,g,4,s[32]),A=h(A,O,T,_,b,11,s[33]),_=h(_,A,O,T,E,16,s[34]),T=h(T,_,A,O,x,23,s[35]),O=h(O,T,_,A,u,4,s[36]),A=h(A,O,T,_,v,11,s[37]),_=h(_,A,O,T,y,16,s[38]),T=h(T,_,A,O,w,23,s[39]),O=h(O,T,_,A,I,4,s[40]),A=h(A,O,T,_,a,11,s[41]),_=h(_,A,O,T,p,16,s[42]),T=h(T,_,A,O,m,23,s[43]),O=h(O,T,_,A,S,4,s[44]),A=h(A,O,T,_,k,11,s[45]),_=h(_,A,O,T,C,16,s[46]),O=f(O,T=h(T,_,A,O,d,23,s[47]),_,A,a,6,s[48]),A=f(A,O,T,_,y,10,s[49]),_=f(_,A,O,T,x,15,s[50]),T=f(T,_,A,O,g,21,s[51]),O=f(O,T,_,A,k,6,s[52]),A=f(A,O,T,_,p,10,s[53]),_=f(_,A,O,T,w,15,s[54]),T=f(T,_,A,O,u,21,s[55]),O=f(O,T,_,A,b,6,s[56]),A=f(A,O,T,_,C,10,s[57]),_=f(_,A,O,T,m,15,s[58]),T=f(T,_,A,O,I,21,s[59]),O=f(O,T,_,A,v,6,s[60]),A=f(A,O,T,_,E,10,s[61]),_=f(_,A,O,T,d,15,s[62]),T=f(T,_,A,O,S,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+T|0,o[2]=o[2]+_|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(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 a=0;a<r;a++)e[t+a]^=i[a]}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,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),r(a);var s=a.slice(0);n.encryptBlock(s,0);for(var u=0;u<i;u++)e[t+u]^=s[u]}});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 a=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=a[s]}}),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 a=0;a<n;a++)e[t+a]^=o[a]}}),n.Decryptor=i,n),o.mode.OFB)},531: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,a,s,u,c,l,h;e.exports=(h=r(8249),r(2783),r(9824),i=(n=h).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.SHA1,c=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=c.create(r.hasher,e),i=a.create(),o=a.create([1]),s=i.words,u=o.words,l=r.keySize,h=r.iterations;s.length<l;){var f=n.update(t).finalize(o);n.reset();for(var d=f.words,p=d.length,v=f,g=1;g<h;g++){v=n.finalize(v),n.reset();for(var m=v.words,y=0;y<p;y++)d[y]^=m[y]}i.concat(f),u[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=[],a=[],s=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++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&l,f=l<<16|65535&c;for(n[0]^=c,n[1]^=h,n[2]^=l,n[3]^=f,n[4]^=c,n[5]^=h,n[6]^=l,n[7]^=f,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),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=[],a=[],s=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++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&l,f=l<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=l,i[3]^=f,i[4]^=c,i[5]^=h,i[6]^=l,i[7]^=f,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),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 a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=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(a)}(),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,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]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),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 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,a,d,S,w,E,k,I,x,C,O,T=this._hash.words,_=h.words,A=f.words,R=s.words,N=u.words,D=c.words,L=l.words;for(E=o=T[0],k=a=T[1],I=d=T[2],x=S=T[3],C=w=T[4],r=0;r<80;r+=1)O=o+e[t+R[r]]|0,O+=r<16?p(a,d,S)+_[0]:r<32?v(a,d,S)+_[1]:r<48?g(a,d,S)+_[2]:r<64?m(a,d,S)+_[3]:y(a,d,S)+_[4],O=(O=b(O|=0,D[r]))+w|0,o=w,w=S,S=b(d,10),d=a,a=O,O=E+e[t+N[r]]|0,O+=r<16?y(k,I,x)+A[0]:r<32?m(k,I,x)+A[1]:r<48?g(k,I,x)+A[2]:r<64?v(k,I,x)+A[3]:p(k,I,x)+A[4],O=(O=b(O|=0,L[r]))+C|0,E=C,C=x,x=b(I,10),I=k,k=O;O=T[1]+d+x|0,T[1]=T[2]+S+C|0,T[2]=T[3]+w+E|0,T[3]=T[4]+o+k|0,T[4]=T[0]+a+I|0,T[0]=O},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=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(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),n.RIPEMD160)},2783:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(8249),i=(n=l).lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],c=s.SHA1=a.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],a=r[3],s=r[4],c=0;c<80;c++){if(c<16)u[c]=0|e[t+c];else{var l=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=l<<1|l>>>31}var h=(n<<5|n>>>27)+s+u[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=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]+a|0,r[4]=r[4]+s|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=a.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),l.SHA1)},7792:function(e,t,r){var n,i,o,a,s,u;e.exports=(u=r(8249),r(2153),i=(n=u).lib.WordArray,o=n.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}}),n.SHA224=a._createHelper(s),n.HmacSHA224=a._createHmacHelper(s),u.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,a=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],h=r[6],f=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[d-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=v+c[d-7]+m+c[d-16]}var y=n&i^n&o^i&o,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),S=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&h)+u[d]+c[d];f=h,h=l,l=s,s=a+S|0,a=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]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+h|0,r[7]=r[7]+f|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,a=t.x64.Word,s=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,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 r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=r[i]).high^=a,T.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^=(T=r[f+5*v]).high,p^=T.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++)(T=r[f+5*v]).high^=d,T.low^=p}for(var w=1;w<25;w++){var E=(T=r[w]).high,k=T.low,I=u[w];I<32?(d=E<<I|k>>>32-I,p=k<<I|E>>>32-I):(d=k<<I-32|E>>>64-I,p=E<<I-32|k>>>64-I);var x=h[c[w]];x.high=d,x.low=p}var C=h[0],O=r[0];for(C.high=O.high,C.low=O.low,f=0;f<5;f++)for(v=0;v<5;v++){var T=r[w=f+5*v],_=h[w],A=h[(f+1)%5+5*v],R=h[(f+2)%5+5*v];T.high=_.high^~A.high&R.high,T.low=_.low^~A.low&R.low}T=r[0];var N=l[s];T.high^=N.high,T.low^=N.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 a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;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),c.push(d),c.push(f)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(f),t.HmacSHA3=o._createHmacHelper(f)}(Math),n.SHA3)},7460:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(8249),r(4938),r(34),i=(n=l).x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,c=s.SHA384=u.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=u._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),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,a=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=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],a=r[3],s=r[4],l=r[5],h=r[6],f=r[7],d=n.high,p=n.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,k=l.high,I=l.low,x=h.high,C=h.low,O=f.high,T=f.low,_=d,A=p,R=v,N=g,D=m,L=y,P=b,M=S,U=w,j=E,B=k,F=I,G=x,K=C,V=O,H=T,z=0;z<80;z++){var Y,W,X=c[z];if(z<16)W=X.high=0|e[t+2*z],Y=X.low=0|e[t+2*z+1];else{var q=c[z-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=c[z-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[z-7],ae=oe.high,se=oe.low,ue=c[z-16],ce=ue.high,le=ue.low;W=(W=(W=J+ae+((Y=Q+se)>>>0<Q>>>0?1:0))+ne+((Y+=ie)>>>0<ie>>>0?1:0))+ce+((Y+=le)>>>0<le>>>0?1:0),X.high=W,X.low=Y}var he,fe=U&B^~U&G,de=j&F^~j&K,pe=_&R^_&D^R&D,ve=A&N^A&L^N&L,ge=(_>>>28|A<<4)^(_<<30|A>>>2)^(_<<25|A>>>7),me=(A>>>28|_<<4)^(A<<30|_>>>2)^(A<<25|_>>>7),ye=(U>>>14|j<<18)^(U>>>18|j<<14)^(U<<23|j>>>9),be=(j>>>14|U<<18)^(j>>>18|U<<14)^(j<<23|U>>>9),Se=u[z],we=Se.high,Ee=Se.low,ke=V+ye+((he=H+be)>>>0<H>>>0?1:0),Ie=me+ve;V=G,H=K,G=B,K=F,B=U,F=j,U=P+(ke=(ke=(ke=ke+fe+((he+=de)>>>0<de>>>0?1:0))+we+((he+=Ee)>>>0<Ee>>>0?1:0))+W+((he+=Y)>>>0<Y>>>0?1:0))+((j=M+he|0)>>>0<M>>>0?1:0)|0,P=D,M=L,D=R,L=N,R=_,N=A,_=ke+(ge+pe+(Ie>>>0<me>>>0?1:0))+((A=he+Ie|0)>>>0<he>>>0?1:0)|0}p=n.low=p+A,n.high=d+_+(p>>>0<A>>>0?1:0),g=i.low=g+N,i.high=v+R+(g>>>0<N>>>0?1:0),y=o.low=y+L,o.high=m+D+(y>>>0<L>>>0?1:0),S=a.low=S+M,a.high=b+P+(S>>>0<M>>>0?1:0),E=s.low=E+j,s.high=w+U+(E>>>0<j>>>0?1:0),I=l.low=I+F,l.high=k+B+(I>>>0<F>>>0?1:0),C=h.low=C+K,h.high=x+G+(C>>>0<K>>>0?1:0),T=f.low=T+H,f.high=O+V+(T>>>0<H>>>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)},7957: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,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var 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],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 n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&l[u])>>>0];this._lBlock=a,this._rBlock=o^s}var 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 r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function d(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,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),n)},7484:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",u="week",c="month",l="quarter",h="year",f="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},m=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+m(n,2,"0")+":"+m(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,c),o=r-i<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:u,d:s,D:f,h:a,m:o,s:i,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",S={};S[b]=g;var w="$isDayjsObject",E=function(e){return e instanceof C||!(!e||!e[w])},k=function e(t,r,n){var i;if(!t)return b;if("string"==typeof t){var o=t.toLowerCase();S[o]&&(i=o),r&&(S[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;S[s]=t,i=s}return!n&&i&&(b=i),i||!n&&b},I=function(e,t){if(E(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new C(r)},x=y;x.l=k,x.i=E,x.w=function(e,t){return I(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function g(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return x},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(e,t){var r=I(e);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(e,t){return I(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<I(e)},m.$g=function(e,t,r){return x.u(e)?this[t]:this.set(r,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var r=this,n=!!x.u(t)||t,l=x.p(e),d=function(e,t){var i=x.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(s)},p=function(e,t){return x.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},v=this.$W,g=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case h:return n?d(1,0):d(31,11);case c:return n?d(1,g):d(0,g+1);case u:var b=this.$locale().weekStart||0,S=(v<b?v+7:v)-b;return d(n?m-S:m+(6-S),g);case s:case f:return p(y+"Hours",0);case a:return p(y+"Minutes",1);case o:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var r,u=x.p(e),l="set"+(this.$u?"UTC":""),d=(r={},r[s]=l+"Date",r[f]=l+"Date",r[c]=l+"Month",r[h]=l+"FullYear",r[a]=l+"Hours",r[o]=l+"Minutes",r[i]=l+"Seconds",r[n]=l+"Milliseconds",r)[u],p=u===s?this.$D+(t-this.$W):t;if(u===c||u===h){var v=this.clone().set(f,1);v.$d[d](p),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[x.p(e)]()},m.add=function(n,l){var f,d=this;n=Number(n);var p=x.p(l),v=function(e){var t=I(d);return x.w(t.date(t.date()+Math.round(e*n)),d)};if(p===c)return this.set(c,this.$M+n);if(p===h)return this.set(h,this.$y+n);if(p===s)return v(1);if(p===u)return v(7);var g=(f={},f[o]=t,f[a]=r,f[i]=e,f)[p]||1,m=this.$d.getTime()+n*g;return x.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=x.z(this),o=this.$H,a=this.$m,s=this.$M,u=r.weekdays,c=r.months,l=r.meridiem,h=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},f=function(e){return x.s(o%12||12,e,"0")},p=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(v,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return x.s(t.$y,4,"0");case"M":return s+1;case"MM":return x.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,c,3);case"MMMM":return h(c,s);case"D":return t.$D;case"DD":return x.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,u,2);case"ddd":return h(r.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(o);case"HH":return x.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return p(o,a,!0);case"A":return p(o,a,!1);case"m":return String(a);case"mm":return x.s(a,2,"0");case"s":return String(t.$s);case"ss":return x.s(t.$s,2,"0");case"SSS":return x.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,f,d){var p,v=this,g=x.p(f),m=I(n),y=(m.utcOffset()-this.utcOffset())*t,b=this-m,S=function(){return x.m(v,m)};switch(g){case h:p=S()/12;break;case c:p=S();break;case l:p=S()/3;break;case u:p=(b-y)/6048e5;break;case s:p=(b-y)/864e5;break;case a:p=b/r;break;case o:p=b/t;break;case i:p=b/e;break;default:p=b}return d?p:x.a(p)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return S[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=k(e,t,!0);return n&&(r.$L=n),r},m.clone=function(){return x.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),O=C.prototype;return I.prototype=O,[["$ms",n],["$s",i],["$m",o],["$H",a],["$W",s],["$M",c],["$y",h],["$D",f]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),I.extend=function(e,t){return e.$i||(e(t,C,I),e.$i=!0),I},I.locale=k,I.isDayjs=E,I.unix=function(e){return I(1e3*e)},I.en=S[b],I.Ls=S,I.p={},I}()},2296:(e,t,r)=>{"use strict";var n=r(1044)(),i=r(210),o=n&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(e){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),u=r(7296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],h=!!u&&u(e,t);if(o)o(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===n&&h?h.enumerable:!n,value:r,writable:null===i&&h?h.writable:!i});else{if(!l&&(n||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},3729:function(e,t){var r,n,i;n=[],r=function(){return function e(t,r,n){var i,o,a=window,s="application/octet-stream",u=n||s,c=t,l=!r&&!n&&c,h=document.createElement("a"),f=function(e){return String(e)},d=a.Blob||a.MozBlob||a.WebKitBlob||f,p=r||"download";if(d=d.call?d.bind(a):Blob,"true"===String(this)&&(u=(c=[c,u])[0],c=c[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(c)){if(!(c.length>2096103.424&&d!==f))return navigator.msSaveBlob?navigator.msSaveBlob(b(c),p):S(c);u=(c=b(c)).type||s}else if(/([\x80-\xff])/.test(c)){for(var g=0,m=new Uint8Array(c.length),y=m.length;g<y;++g)m[g]=c.charCodeAt(g);c=new d([m],{type:u})}function b(e){for(var t=e.split(/[:;,]/),r=t[1],n=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),i=n.length,o=0,a=new Uint8Array(i);o<i;++o)a[o]=n.charCodeAt(o);return new d([a],{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(){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 r=document.createElement("iframe");document.body.appendChild(r),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),r.src=e,setTimeout((function(){document.body.removeChild(r)}),333)}if(i=c instanceof d?c:new d([c],{type:u}),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:"+u+";base64,"+a.btoa(i))}catch(e){return S("data:"+u+","+encodeURIComponent(i))}(o=new FileReader).onload=function(e){S(this.result)},o.readAsDataURL(i)}return!0}},void 0===(i="function"==typeof r?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 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 u(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var c="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+=c.charAt(r>>6)+c.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=c.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=c.charAt(r>>2)+c.charAt((3&r)<<4));(3&n.length)>0;)n+=l;return n}function f(e){var t,n="",i=0,o=0;for(t=0;t<e.length&&e.charAt(t)!=l;++t){var a=c.indexOf(e.charAt(t));a<0||(0==i?(n+=r(a>>2),o=3&a,i=1):1==i?(n+=r(o<<2|a>>4),o=15&a,i=2):2==i?(n+=r(o),n+=r(a>>2),o=3&a,i=3):(n+=r(o<<2|a>>4),n+=r(15&a),i=0))}return 1==i&&(n+=r(o<<2)),n}var d,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===d){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(d={},t=0;t<16;++t)d[r.charAt(t)]=t;for(r=r.toLowerCase(),t=10;t<16;++t)d[r.charAt(t)]=t;for(t=0;t<n.length;++t)d[n.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 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,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 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="…",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)?)?$/,k=/^(\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 I(e,t){return e.length>t&&(e=e.substring(0,t)+w),e}var x,C=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?E:k).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,a="";n==o&&++e<t;)n=this.get(e);if(0==(r=t-e))return i?-1:0;if(r>4){for(a=n,r<<=3;0==(128&(+a^o));)a=+a<<1,--r;a="("+r+" bit)\n"}i&&(n-=256);for(var s=new S(n),u=e+1;u<t;++u)s.mulAdd(256,this.get(u));return a+s.toString()},e.prototype.parseBitString=function(e,t,r){for(var n=this.get(e),i="("+((t-e-1<<3)-n)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),u=a==t-1?n:0,c=7;c>=u;--c)o+=s>>c&1?"1":"0";if(o.length>r)return i+I(o,r)}return i+o},e.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return I(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,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===n)if((i=i.simplify())instanceof S)i.sub(80),n="2."+i.toString();else{var u=i<80?i<40?0:1:2;n=u+"."+(i-40*u)}else n+="."+i.toString();if(n.length>r)return I(n,r);i=new S,o=0}}return o>0&&(n+=".incomplete"),n},e}(),O=function(){function e(e,t,r,n,i){if(!(n instanceof T))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 I(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return I(this.stream.parseStringISO(t,t+r),e);case 30:return I(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 C?t:new C(t,0);var n=new C(r),i=new T(r),o=e.decodeLength(r),a=r.pos,s=a-n.pos,u=null,c=function(){var t=[];if(null!==o){for(var n=a+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 "+a)}else try{for(;;){var i=e.decode(r);if(i.tag.isEOC())break;t[t.length]=i}o=a-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)u=c();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.");u=c();for(var l=0;l<u.length;++l)if(u[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){u=null}if(null===u){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(o)}return new e(n,s,o,i,u)},e}(),T=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}(),_=!0,A=[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)/A[A.length-1],N=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,a="",s=this.t,u=this.DB-s*this.DB%t;if(s-- >0)for(u<this.DB&&(n=this[s]>>u)>0&&(o=!0,a=r(n));s>=0;)u<t?(n=(this[s]&(1<<u)-1)<<t-u,n|=this[--s]>>(u+=this.DB-t)):(n=this[s]>>(u-=t)&i,u<=0&&(u+=this.DB,--s)),n>0&&(o=!0),o&&(a+=r(n));return o?a:"0"},e.prototype.negate=function(){var t=U();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)+X(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=U();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=U();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=U();return this.bitwiseTo(e,n,t),t},e.prototype.or=function(e){var t=U();return this.bitwiseTo(e,i,t),t},e.prototype.xor=function(e){var t=U();return this.bitwiseTo(e,o,t),t},e.prototype.andNot=function(e){var t=U();return this.bitwiseTo(e,a,t),t},e.prototype.not=function(){for(var e=U(),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=U();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=U();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,r=0;r<this.t;++r)e+=u(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,a)},e.prototype.flipBit=function(e){return this.changeBit(e,o)},e.prototype.add=function(e){var t=U();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=U();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=U();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=U();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=U();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=U(),r=U();return this.divRemTo(e,t,r),[t,r]},e.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=W(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 a=[],s=3,u=r-1,c=(1<<r)-1;if(a[1]=n.convert(this),r>1){var l=U();for(n.sqrTo(a[1],l);s<=c;)a[s]=U(),n.mulTo(l,a[s-2],a[s]),s+=2}var h,f,d=e.t-1,p=!0,v=U();for(i=X(e[d])-1;d>=0;){for(i>=u?h=e[d]>>i-u&c:(h=(e[d]&(1<<i+1)-1)<<u-i,d>0&&(h|=e[d-1]>>this.DB+i-u)),s=r;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;)n.sqrTo(o,v),n.sqrTo(v,o),s-=2;s>0?n.sqrTo(o,v):(f=o,o=v,v=f),n.mulTo(v,a[h],o)}for(;d>=0&&0==(e[d]&1<<i);)n.sqrTo(o,v),f=o,o=v,v=f,--i<0&&(i=this.DB-1,--d)}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=W(1),a=W(0),s=W(0),u=W(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(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),r?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(s,o),a.subTo(u,a)):(i.subTo(n,i),r&&s.subTo(o,s),u.subTo(a,u))}return 0!=i.compareTo(e.ONE)?e.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},e.prototype.pow=function(e){return this.exp(e,new D)},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]<=A[A.length-1]){for(t=0;t<A.length;++t)if(r[0]==A[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<A.length;){for(var n=A[t],i=t+1;i<A.length&&n<R;)n*=A[i++];for(n=r.modInt(n);t<i;)if(n%A[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,a=0;--i>=0;){var s=8==n?255&+t[i]:Y(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>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+=n)>=this.DB&&(a-=this.DB))}8==n&&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 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),a=this.s<<r&this.DM,s=this.t-1;s>=0;--s)t[s+o+1]=this[s]>>n|a,a=(this[s]&i)<<r;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 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 a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>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=U());var a=U(),s=this.s,u=t.s,c=this.DB-X(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,n)):(i.copyTo(a),o.copyTo(n));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=n.t,m=g-l,y=null==r?U():r;for(a.dlShiftTo(m,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),e.ONE.dlShiftTo(l,y),y.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--m>=0;){var b=n[--g]==h?this.DM:Math.floor(n[g]*d+(n[g-1]+v)*p);if((n[g]+=a.am(0,b,n,m,0,l))<b)for(a.dlShiftTo(m,y),n.subTo(y,n);n[g]<--b;)n.subTo(y,n)}null!=r&&(n.drShiftTo(l,r),s!=u&&e.ZERO.subTo(r,r)),n.t=l,n.clamp(),c>0&&n.rShiftTo(c,n),s<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=U(),i=U(),o=r.convert(this),a=X(t)-1;for(o.copyTo(n);--a>=0;)if(r.sqrTo(n,i),(t&1<<a)>0)r.mulTo(i,o,n);else{var s=n;n=i,i=s}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=W(r),i=U(),o=U(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},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,a=0,s=0,u=0;u<t.length;++u){var c=Y(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(s=r*s+c,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(s,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=[],a=7&t;o.length=1+(t>>3),r.nextBytes(o),a>0?o[0]&=(1<<a)-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)>A.length&&(t=A.length);for(var o=U(),a=0;a<t;++a){o.fromInt(A[Math.floor(Math.random()*A.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(r)){for(var u=1;u++<n&&0!=s.compareTo(r);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(r))return!1}}return!0},e.prototype.square=function(){var e=U();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(),a=n.getLowestSetBit();if(a<0)t(r);else{o<a&&(a=o),a>0&&(r.rShiftTo(a,r),n.rShiftTo(a,n));var s=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(s,0):(a>0&&n.lShiftTo(a,n),setTimeout((function(){t(n)}),0))};setTimeout(s,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 a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>t&&a.subTo(e.ONE.shiftLeft(t-1),a),a.isProbablePrime(r)?setTimeout((function(){o()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var u=[],c=7&t;u.length=1+(t>>3),r.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},e}(),D=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=U();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(N.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=U();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=U(),this.q3=U(),N.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=U();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 U(){return new N(null)}function j(e,t){return new N(e,t)}function B(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i}function F(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;i=((u=a*u+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),r[n++]=1073741823&u}return i}function G(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;i=((u=a*u+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+s*c,r[n++]=268435455&u}return i}_&&"Microsoft Internet Explorer"==navigator.appName?(N.prototype.am=F,x=30):_&&"Netscape"!=navigator.appName?(N.prototype.am=B,x=26):(N.prototype.am=G,x=28),N.prototype.DB=x,N.prototype.DM=(1<<x)-1,N.prototype.DV=1<<x;var K=52;N.prototype.FV=Math.pow(2,K),N.prototype.F1=K-x,N.prototype.F2=2*x-K;var V,H,z=[];for(V="0".charCodeAt(0),H=0;H<=9;++H)z[V++]=H;for(V="a".charCodeAt(0),H=10;H<36;++H)z[V++]=H;for(V="A".charCodeAt(0),H=10;H<36;++H)z[V++]=H;function Y(e,t){var r=z[e.charCodeAt(t)];return null==r?-1:r}function W(e){var t=U();return t.fromInt(e),t}function X(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}N.ZERO=W(0),N.ONE=W(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 ae(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 se(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,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);r[--t]=a[0]}return r[--t]=2,r[--t]=0,new N(r)}var ue=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=se(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=f(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,a,s){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(a,16),this.coeff=j(s,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 N(t,16);;){for(;this.p=new N(e-n,1,r),0!=this.p.subtract(N.ONE).gcd(i).compareTo(N.ONE)||!this.p.isProbablePrime(10););for(;this.q=new N(n,1,r),0!=this.q.subtract(N.ONE).gcd(i).compareTo(N.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(N.ONE),s=this.q.subtract(N.ONE),u=a.multiply(s);if(0==u.gcd(i).compareTo(N.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),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=j(e,16),r=this.doPrivate(t);return null==r?null:ce(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 N(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(N.ONE),n=a.q.subtract(N.ONE),i=t.multiply(n);0==i.gcd(o).compareTo(N.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(n),a.coeff=a.q.modInverse(a.p),setTimeout((function(){r()}),0)):setTimeout(s,0)},u=function(){a.q=U(),a.q.fromNumberAsync(i,1,n,(function(){a.q.subtract(N.ONE).gcda(o,(function(e){0==e.compareTo(N.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(u,0)}))}))},c=function(){a.p=U(),a.p.fromNumberAsync(e-i,1,n,(function(){a.p.subtract(N.ONE).gcda(o,(function(e){0==e.compareTo(N.ONE)&&a.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,r){var n=ae(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:fe(i.toString(16).replace(/^1f+00/,""))==r(e).toString()},e}();function ce(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 fe(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 de={};de.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(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(e,t){for(i=0;i<a.length;i+=1){var r=a[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 N(n,16).xor(e).add(N.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,a=t.DERNull,s=t.DERObjectIdentifier,u=t.DEREnumerated,c=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 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 a(e[w]);if("oid"==w)return new s(e[w]);if("enum"==w)return new u(e[w]);if("utf8str"==w)return new c(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],k=[],I=0;I<E.length;I++){var x=b(E[I]);k.push(x)}return new g({array:k})}if("set"==w){for(E=e[w],k=[],I=0;I<E.length;I++)x=b(E[I]),k.push(x);return new m({array:k})}if("tag"==w){var C=e[w];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var O=b(C[2]);return new y({tag:C[0],explicit:C[1],obj:O})}var T={};if(void 0!==C.explicit&&(T.explicit=C.explicit),void 0!==C.tag&&(T.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return T.obj=b(C.obj),new y(T)}},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 N(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 N(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(n=o+n,a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,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 a=0;a<i.length;a++)n+=r(i[a]);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))},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,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=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 s=i.getMilliseconds();if(0!=s){var u=n(String(s),3);a=a+"."+(u=u.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,r,n,i,o){var a=new Date(Date.UTC(e,t-1,r,n,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 N(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 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))},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},r=function(e){var r="",n=new N(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(n=o+n,a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,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 a=0;a<i.length;a++)n+=r(i[a]);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))},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 N(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 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)},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,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)))},de.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=O.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 a=i.sub[4].getHexStringValue();this.p=j(a,16);var s=i.sub[5].getHexStringValue();this.q=j(s,16);var u=i.sub[6].getHexStringValue();this.dmp1=j(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=j(c,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}(ue),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)||"",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,f(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)},7648:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,a=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r}(arguments,1),s=r(0,i.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(o=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=i.apply(this,n(a,arguments));return Object(t)===t?t:this}return i.apply(e,n(a,arguments))})),i.prototype){var l=function(){};l.prototype=i.prototype,o.prototype=new l,l.prototype=null}return o}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,h=r(1405)(),f=r(8185)(),d=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},v="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&d?d(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":v,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var y=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&d&&(r=d(i.prototype))}return g[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=r(8612),w=r(8824),E=S.call(Function.call,Array.prototype.concat),k=S.call(Function.apply,Array.prototype.splice),I=S.call(Function.call,String.prototype.replace),x=S.call(Function.call,String.prototype.slice),C=S.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,_=function(e,t){var r,n=e;if(w(b,n)&&(n="%"+(r=b[n])[0]+"%"),w(g,n)){var o=g[n];if(o===p&&(o=y(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,O,(function(e,t,r,i){n[n.length]=r?I(i,T,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=_("%"+n+"%",t),s=o.name,c=o.value,l=!1,h=o.alias;h&&(n=h[0],k(r,E([0,1],h)));for(var f=1,d=!0;f<r.length;f+=1){var p=r[f],v=x(p,0,1),m=x(p,-1);if(('"'===v||"'"===v||"`"===v||'"'===m||"'"===m||"`"===m)&&v!==m)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(l=!0),w(g,s="%"+(n+="."+p)+"%"))c=g[s];else if(null!=c){if(!(p in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&f+1>=r.length){var y=u(c,p);c=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else d=w(c,p),c=c[p];d&&!l&&(g[s]=c)}}return c}},7296:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1044:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},8824:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(8612);e.exports=o.call(n,i)},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)}},3434:(e,t,r)=>{var n;!function(){"use strict";var t="input is invalid type",i="object"==typeof window,o=i?window:{};o.JS_SHA512_NO_WINDOW&&(i=!1);var a=!i&&"object"==typeof self;!o.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?o=r.g:a&&(o=self);var s=!o.JS_SHA512_NO_COMMON_JS&&e.exports,u=r.amdO,c=!o.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],f=[24,16,8,0],d=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],p=["hex","array","digest","arrayBuffer"],v=[];!o.JS_SHA512_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!c||!o.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var g=function(e,t){return function(r){return new S(t,!0).update(r)[e]()}},m=function(e){var t=g("hex",e);t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<p.length;++r){var n=p[r];t[n]=g(n,e)}return t},y=function(e,t){return function(r,n){return new w(r,t,!0).update(n)[e]()}},b=function(e){var t=y("hex",e);t.create=function(t){return new w(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<p.length;++r){var n=p[r];t[n]=y(n,e)}return t};function S(e,t){t?(v[0]=v[1]=v[2]=v[3]=v[4]=v[5]=v[6]=v[7]=v[8]=v[9]=v[10]=v[11]=v[12]=v[13]=v[14]=v[15]=v[16]=v[17]=v[18]=v[19]=v[20]=v[21]=v[22]=v[23]=v[24]=v[25]=v[26]=v[27]=v[28]=v[29]=v[30]=v[31]=v[32]=0,this.blocks=v):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],384==e?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):256==e?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):224==e?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=e,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}function w(e,r,n){var i,o=typeof e;if("string"!==o){if("object"!==o)throw new Error(t);if(null===e)throw new Error(t);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(t);i=!0}var a=e.length;if(!i){for(var s,u=[],l=(a=e.length,0),h=0;h<a;++h)(s=e.charCodeAt(h))<128?u[l++]=s:s<2048?(u[l++]=192|s>>6,u[l++]=128|63&s):s<55296||s>=57344?(u[l++]=224|s>>12,u[l++]=128|s>>6&63,u[l++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++h)),u[l++]=240|s>>18,u[l++]=128|s>>12&63,u[l++]=128|s>>6&63,u[l++]=128|63&s);e=u}e.length>128&&(e=new S(r,!0).update(e).array());var f=[],d=[];for(h=0;h<128;++h){var p=e[h]||0;f[h]=92^p,d[h]=54^p}S.call(this,r,n),this.update(d),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}S.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var i,o,a=0,s=e.length,u=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=u[16]=u[17]=u[18]=u[19]=u[20]=u[21]=u[22]=u[23]=u[24]=u[25]=u[26]=u[27]=u[28]=u[29]=u[30]=u[31]=u[32]=0),r)for(o=this.start;a<s&&o<128;++a)u[o>>2]|=e[a]<<f[3&o++];else for(o=this.start;a<s&&o<128;++a)(i=e.charCodeAt(a))<128?u[o>>2]|=i<<f[3&o++]:i<2048?(u[o>>2]|=(192|i>>6)<<f[3&o++],u[o>>2]|=(128|63&i)<<f[3&o++]):i<55296||i>=57344?(u[o>>2]|=(224|i>>12)<<f[3&o++],u[o>>2]|=(128|i>>6&63)<<f[3&o++],u[o>>2]|=(128|63&i)<<f[3&o++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),u[o>>2]|=(240|i>>18)<<f[3&o++],u[o>>2]|=(128|i>>12&63)<<f[3&o++],u[o>>2]|=(128|i>>6&63)<<f[3&o++],u[o>>2]|=(128|63&i)<<f[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=128?(this.block=u[32],this.start=o-128,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=h[3&t],this.block=e[32],t>=112&&(this.hashed||this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e,t,r,n,i,o,a,s,u,c,l,h,f,p,v,g,m,y,b,S,w,E,k,I,x,C=this.h0h,O=this.h0l,T=this.h1h,_=this.h1l,A=this.h2h,R=this.h2l,N=this.h3h,D=this.h3l,L=this.h4h,P=this.h4l,M=this.h5h,U=this.h5l,j=this.h6h,B=this.h6l,F=this.h7h,G=this.h7l,K=this.blocks;for(e=32;e<160;e+=2)t=((S=K[e-30])>>>1|(w=K[e-29])<<31)^(S>>>8|w<<24)^S>>>7,r=(w>>>1|S<<31)^(w>>>8|S<<24)^(w>>>7|S<<25),n=((S=K[e-4])>>>19|(w=K[e-3])<<13)^(w>>>29|S<<3)^S>>>6,i=(w>>>19|S<<13)^(S>>>29|w<<3)^(w>>>6|S<<26),S=K[e-32],w=K[e-31],u=((E=K[e-14])>>>16)+(S>>>16)+(t>>>16)+(n>>>16)+((s=(65535&E)+(65535&S)+(65535&t)+(65535&n)+((a=((k=K[e-13])>>>16)+(w>>>16)+(r>>>16)+(i>>>16)+((o=(65535&k)+(65535&w)+(65535&r)+(65535&i))>>>16))>>>16))>>>16),K[e]=u<<16|65535&s,K[e+1]=a<<16|65535&o;var V=C,H=O,z=T,Y=_,W=A,X=R,q=N,$=D,Z=L,J=P,Q=M,ee=U,te=j,re=B,ne=F,ie=G;for(g=z&W,m=Y&X,e=0;e<160;e+=8)t=(V>>>28|H<<4)^(H>>>2|V<<30)^(H>>>7|V<<25),r=(H>>>28|V<<4)^(V>>>2|H<<30)^(V>>>7|H<<25),n=(Z>>>14|J<<18)^(Z>>>18|J<<14)^(J>>>9|Z<<23),i=(J>>>14|Z<<18)^(J>>>18|Z<<14)^(Z>>>9|J<<23),y=(c=V&z)^V&W^g,b=(l=H&Y)^H&X^m,I=Z&Q^~Z&te,x=J&ee^~J&re,S=K[e],w=K[e+1],S=(u=((E=d[e])>>>16)+(S>>>16)+(I>>>16)+(n>>>16)+(ne>>>16)+((s=(65535&E)+(65535&S)+(65535&I)+(65535&n)+(65535&ne)+((a=((k=d[e+1])>>>16)+(w>>>16)+(x>>>16)+(i>>>16)+(ie>>>16)+((o=(65535&k)+(65535&w)+(65535&x)+(65535&i)+(65535&ie))>>>16))>>>16))>>>16))<<16|65535&s,w=a<<16|65535&o,E=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((a=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&s,k=a<<16|65535&o,ne=(u=(q>>>16)+(S>>>16)+((s=(65535&q)+(65535&S)+((a=($>>>16)+(w>>>16)+((o=(65535&$)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s,ie=a<<16|65535&o,t=((q=(u=(E>>>16)+(S>>>16)+((s=(65535&E)+(65535&S)+((a=(k>>>16)+(w>>>16)+((o=(65535&k)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|($=a<<16|65535&o)<<4)^($>>>2|q<<30)^($>>>7|q<<25),r=($>>>28|q<<4)^(q>>>2|$<<30)^(q>>>7|$<<25),n=(ne>>>14|ie<<18)^(ne>>>18|ie<<14)^(ie>>>9|ne<<23),i=(ie>>>14|ne<<18)^(ie>>>18|ne<<14)^(ne>>>9|ie<<23),y=(h=q&V)^q&z^c,b=(f=$&H)^$&Y^l,I=ne&Z^~ne&Q,x=ie&J^~ie&ee,S=K[e+2],w=K[e+3],S=(u=((E=d[e+2])>>>16)+(S>>>16)+(I>>>16)+(n>>>16)+(te>>>16)+((s=(65535&E)+(65535&S)+(65535&I)+(65535&n)+(65535&te)+((a=((k=d[e+3])>>>16)+(w>>>16)+(x>>>16)+(i>>>16)+(re>>>16)+((o=(65535&k)+(65535&w)+(65535&x)+(65535&i)+(65535&re))>>>16))>>>16))>>>16))<<16|65535&s,w=a<<16|65535&o,E=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((a=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&s,k=a<<16|65535&o,te=(u=(W>>>16)+(S>>>16)+((s=(65535&W)+(65535&S)+((a=(X>>>16)+(w>>>16)+((o=(65535&X)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s,re=a<<16|65535&o,t=((W=(u=(E>>>16)+(S>>>16)+((s=(65535&E)+(65535&S)+((a=(k>>>16)+(w>>>16)+((o=(65535&k)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(X=a<<16|65535&o)<<4)^(X>>>2|W<<30)^(X>>>7|W<<25),r=(X>>>28|W<<4)^(W>>>2|X<<30)^(W>>>7|X<<25),n=(te>>>14|re<<18)^(te>>>18|re<<14)^(re>>>9|te<<23),i=(re>>>14|te<<18)^(re>>>18|te<<14)^(te>>>9|re<<23),y=(p=W&q)^W&V^h,b=(v=X&$)^X&H^f,I=te&ne^~te&Z,x=re&ie^~re&J,S=K[e+4],w=K[e+5],S=(u=((E=d[e+4])>>>16)+(S>>>16)+(I>>>16)+(n>>>16)+(Q>>>16)+((s=(65535&E)+(65535&S)+(65535&I)+(65535&n)+(65535&Q)+((a=((k=d[e+5])>>>16)+(w>>>16)+(x>>>16)+(i>>>16)+(ee>>>16)+((o=(65535&k)+(65535&w)+(65535&x)+(65535&i)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&s,w=a<<16|65535&o,E=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((a=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&s,k=a<<16|65535&o,Q=(u=(z>>>16)+(S>>>16)+((s=(65535&z)+(65535&S)+((a=(Y>>>16)+(w>>>16)+((o=(65535&Y)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s,ee=a<<16|65535&o,t=((z=(u=(E>>>16)+(S>>>16)+((s=(65535&E)+(65535&S)+((a=(k>>>16)+(w>>>16)+((o=(65535&k)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(Y=a<<16|65535&o)<<4)^(Y>>>2|z<<30)^(Y>>>7|z<<25),r=(Y>>>28|z<<4)^(z>>>2|Y<<30)^(z>>>7|Y<<25),n=(Q>>>14|ee<<18)^(Q>>>18|ee<<14)^(ee>>>9|Q<<23),i=(ee>>>14|Q<<18)^(ee>>>18|Q<<14)^(Q>>>9|ee<<23),y=(g=z&W)^z&q^p,b=(m=Y&X)^Y&$^v,I=Q&te^~Q&ne,x=ee&re^~ee&ie,S=K[e+6],w=K[e+7],S=(u=((E=d[e+6])>>>16)+(S>>>16)+(I>>>16)+(n>>>16)+(Z>>>16)+((s=(65535&E)+(65535&S)+(65535&I)+(65535&n)+(65535&Z)+((a=((k=d[e+7])>>>16)+(w>>>16)+(x>>>16)+(i>>>16)+(J>>>16)+((o=(65535&k)+(65535&w)+(65535&x)+(65535&i)+(65535&J))>>>16))>>>16))>>>16))<<16|65535&s,w=a<<16|65535&o,E=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((a=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&s,k=a<<16|65535&o,Z=(u=(V>>>16)+(S>>>16)+((s=(65535&V)+(65535&S)+((a=(H>>>16)+(w>>>16)+((o=(65535&H)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s,J=a<<16|65535&o,V=(u=(E>>>16)+(S>>>16)+((s=(65535&E)+(65535&S)+((a=(k>>>16)+(w>>>16)+((o=(65535&k)+(65535&w))>>>16))>>>16))>>>16))<<16|65535&s,H=a<<16|65535&o;u=(C>>>16)+(V>>>16)+((s=(65535&C)+(65535&V)+((a=(O>>>16)+(H>>>16)+((o=(65535&O)+(65535&H))>>>16))>>>16))>>>16),this.h0h=u<<16|65535&s,this.h0l=a<<16|65535&o,u=(T>>>16)+(z>>>16)+((s=(65535&T)+(65535&z)+((a=(_>>>16)+(Y>>>16)+((o=(65535&_)+(65535&Y))>>>16))>>>16))>>>16),this.h1h=u<<16|65535&s,this.h1l=a<<16|65535&o,u=(A>>>16)+(W>>>16)+((s=(65535&A)+(65535&W)+((a=(R>>>16)+(X>>>16)+((o=(65535&R)+(65535&X))>>>16))>>>16))>>>16),this.h2h=u<<16|65535&s,this.h2l=a<<16|65535&o,u=(N>>>16)+(q>>>16)+((s=(65535&N)+(65535&q)+((a=(D>>>16)+($>>>16)+((o=(65535&D)+(65535&$))>>>16))>>>16))>>>16),this.h3h=u<<16|65535&s,this.h3l=a<<16|65535&o,u=(L>>>16)+(Z>>>16)+((s=(65535&L)+(65535&Z)+((a=(P>>>16)+(J>>>16)+((o=(65535&P)+(65535&J))>>>16))>>>16))>>>16),this.h4h=u<<16|65535&s,this.h4l=a<<16|65535&o,u=(M>>>16)+(Q>>>16)+((s=(65535&M)+(65535&Q)+((a=(U>>>16)+(ee>>>16)+((o=(65535&U)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=u<<16|65535&s,this.h5l=a<<16|65535&o,u=(j>>>16)+(te>>>16)+((s=(65535&j)+(65535&te)+((a=(B>>>16)+(re>>>16)+((o=(65535&B)+(65535&re))>>>16))>>>16))>>>16),this.h6h=u<<16|65535&s,this.h6l=a<<16|65535&o,u=(F>>>16)+(ne>>>16)+((s=(65535&F)+(65535&ne)+((a=(G>>>16)+(ie>>>16)+((o=(65535&G)+(65535&ie))>>>16))>>>16))>>>16),this.h7h=u<<16|65535&s,this.h7l=a<<16|65535&o},S.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,a=this.h3h,s=this.h3l,u=this.h4h,c=this.h4l,h=this.h5h,f=this.h5l,d=this.h6h,p=this.h6l,v=this.h7h,g=this.h7l,m=this.bits,y=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a];return m>=256&&(y+=l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s]),m>=384&&(y+=l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]),512==m&&(y+=l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]+l[v>>28&15]+l[v>>24&15]+l[v>>20&15]+l[v>>16&15]+l[v>>12&15]+l[v>>8&15]+l[v>>4&15]+l[15&v]+l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[15&g]),y},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,a=this.h3h,s=this.h3l,u=this.h4h,c=this.h4l,l=this.h5h,h=this.h5l,f=this.h6h,d=this.h6l,p=this.h7h,v=this.h7l,g=this.bits,m=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,a>>24&255,a>>16&255,a>>8&255,255&a];return g>=256&&m.push(s>>24&255,s>>16&255,s>>8&255,255&s),g>=384&&m.push(u>>24&255,u>>16&255,u>>8&255,255&u,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h),512==g&&m.push(f>>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,v>>24&255,v>>16&255,v>>8&255,255&v),m},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),r=new DataView(t);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),e>=256&&r.setUint32(28,this.h3l),e>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==e&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.setUint32(60,this.h7l)),t},S.prototype.clone=function(){var e=new S(this.bits,!1);return this.copyTo(e),e},S.prototype.copyTo=function(e){var t=0,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t<r.length;++t)e[r[t]]=this[r[t]];for(t=0;t<this.blocks.length;++t)e.blocks[t]=this.blocks[t]},w.prototype=new S,w.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}},w.prototype.clone=function(){var e=new w([],this.bits,!1);this.copyTo(e),e.inner=this.inner;for(var t=0;t<this.oKeyPad.length;++t)e.oKeyPad[t]=this.oKeyPad[t];return e};var E=m(512);E.sha512=E,E.sha384=m(384),E.sha512_256=m(256),E.sha512_224=m(224),E.sha512.hmac=b(512),E.sha384.hmac=b(384),E.sha512_256.hmac=b(256),E.sha512_224.hmac=b(224),s?e.exports=E:(o.sha512=E.sha512,o.sha384=E.sha384,o.sha512_256=E.sha512_256,o.sha512_224=E.sha512_224,u&&(void 0===(n=function(){return E}.call(E,r,E,e))||(e.exports=n)))}()},5733:(e,t,r)=>{e.exports=function e(t,r,n){function i(a,s){if(!r[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=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o=void 0,a=0;a<n.length;a++)i(n[a]);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,a,s,u,c,l=[],h=0,f=e.length,d=f,p="string"!==n.getTypeOf(e);h<e.length;)d=f-h,i=p?(t=e[h++],r=h<f?e[h++]:0,h<f?e[h++]:0):(t=e.charCodeAt(h++),r=h<f?e.charCodeAt(h++):0,h<f?e.charCodeAt(h++):0),a=t>>2,s=(3&t)<<4|r>>4,u=1<d?(15&r)<<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("")},r.decode=function(e){var t,r,n,a,s,u,c=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 f,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(f=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,r=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,n=(3&s)<<6|(u=o.indexOf(e.charAt(c++))),f[l++]=t,64!==s&&(f[l++]=r),64!==u&&(f[l++]=n);return f}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"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,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var o=i,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"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"),a=e("./stream/GenericWorker"),s=n?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new u("Deflate",e)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"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,a,l){var h,f,d=e.file,p=e.compression,v=l!==s.utf8encode,g=o.transformTo("string",l(d.name)),m=o.transformTo("string",s.utf8encode(d.name)),y=d.comment,b=o.transformTo("string",l(y)),S=o.transformTo("string",s.utf8encode(y)),w=m.length!==d.name.length,E=S.length!==y.length,k="",I="",x="",C=d.dir,O=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var _=0;t&&(_|=8),v||!w&&!E||(_|=2048);var A=0,R=0;C&&(A|=16),"UNIX"===a?(R=798,A|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(d.unixPermissions,C)):(R=20,A|=function(e){return 63&(e||0)}(d.dosPermissions)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,f=O.getUTCFullYear()-1980,f<<=4,f|=O.getUTCMonth()+1,f<<=5,f|=O.getUTCDate(),w&&(I=n(1,1)+n(u(g),4)+m,k+="up"+n(I.length,2)+I),E&&(x=n(1,1)+n(u(b),4)+S,k+="uc"+n(x.length,2)+x);var N="";return N+="\n\0",N+=n(_,2),N+=p.magic,N+=n(h,2),N+=n(f,2),N+=n(T.crc32,4),N+=n(T.compressedSize,4),N+=n(T.uncompressedSize,4),N+=n(g.length,2),N+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+N+g+k,dirRecord:c.CENTRAL_FILE_HEADER+n(R,2)+N+n(b.length,2)+"\0\0\0\0"+n(A,4)+n(i,4)+g+k+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function l(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,a),l.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,a){var s=o.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"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),a=0;try{e.forEach((function(e,r){a++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),s=r.options.compressionOptions||t.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"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"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function c(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new s);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new a(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,a=0;a<o.length;a++){var s=o[a],u=s.fileNameStr,c=n.resolve(s.fileNameStr);r.file(c,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(r.file(c).unsafeOriginalName=u)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"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),s=o.extend(r||{},u);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=v(e)),s.createFolders&&(n=p(e))&&g.call(this,n,!0);var h="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!h),(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:f.isNode&&f.isStream(t)?new d(e,t):o.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var y=new l(e,m,s);this.files[e]=y}var i=e("./utf8"),o=e("./utils"),a=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),u=e("./defaults"),c=e("./compressedObject"),l=e("./zipObject"),h=e("./generate"),f=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):""},v=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:u.createFolders,e=v(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function 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 a("error")).error(e)}return new s(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=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"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"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"),a=e("../base64"),s=e("../support"),u=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,t){return new u.Promise((function(r,i){var o=[],s=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,r){o.push(e),t&&t(r)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return a.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,o),c);r(e)}catch(e){i(e)}o=[]})).resume()}))}function h(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=r,n.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}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 c(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"),a=e("./stream/GenericWorker"),s=new Array(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,o,a=e.length,u=new Array(2*a);for(t=r=0;t<a;)if((i=e[t++])<128)u[r++]=i;else if(4<(o=s[i]))u[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<a;)i=i<<6|63&e[t++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(c,a),c.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(t),u=t;a!==t.length&&(i.uint8array?(u=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(u=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(u),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function u(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],i=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function l(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function h(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=l;var f={};f.string={string:s,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},f.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)}},f.arraybuffer={string:function(e){return l(new Uint8Array(e))},array:function(e){return h(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))}},f.uint8array={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return o.newBufferFrom(e)}},f.nodebuffer={string:l,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:s},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return f[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,s,c){return a.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var l=r.getTypeOf(t);return l?("arraybuffer"===l?t=r.transformTo("uint8array",t):"string"===l&&(c?t=i.decode(t):o&&!0!==s&&(t=function(e){return u(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=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 r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),u=e("./compressions"),c=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(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 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=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=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"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"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)n.prototype[c[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,a=new i(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var u=new e.MessageChannel;u.port1.onmessage=l,r=function(){u.port2.postMessage(0)}}var c=[];function l(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,void 0!==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={},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,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 f(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 r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var a=p((function(){t(i,n)}));"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(i);return this.state!==u?h(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){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(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,u=-1,c=new this(i);++u<r;)l(e[u],u);return c;function l(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==r||n||(n=!0,o.resolve(c,a))}),(function(e){n||(n=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a,s=-1,u=new this(i);++s<r;)a=e[s],t.resolve(a).then((function(e){n||(n=!0,o.resolve(u,e))}),(function(e){n||(n=!0,o.reject(u,e))}));return u}},{immediate:36}],38:[function(e,t,r){"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"),a=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,c=0,l=-1,h=0,f=8;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({level:l,method:f,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 s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==c)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[r]);this._dict_set=!0}}function p(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(l),s.next_out=0,s.avail_out=l),1!==(r=n.deflate(s,a))&&r!==c)return this.onEnd(r),!(this.ended=!0);0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c):2!==a||(this.onEnd(c),!(s.avail_out=0))},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},r.Deflate=d,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"),a=e("./zlib/constants"),s=e("./zlib/messages"),u=e("./zlib/zstream"),c=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 u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function f(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}h.prototype.push=function(e,t){var r,s,u,c,h,f,d=this.strm,p=this.options.chunkSize,v=this.options.dictionary,g=!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),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&v&&(f="string"==typeof v?o.string2buf(v):"[object ArrayBuffer]"===l.call(v)?new Uint8Array(v):v,r=n.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===g&&(r=a.Z_OK,g=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==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,h=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(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(g=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=h,r.inflate=f,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},r.ungzip=f},{"./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,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(e,t,r){"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 a=new n.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,r.string2buf=function(e){var t,r,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,s=t||e.length,c=new Array(2*s);for(r=n=0;r<s;)if((i=e[r++])<128)c[n++]=i;else if(4<(o=a[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<s;)i=i<<6|63&e[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|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,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),u=e("./messages"),c=0,l=4,h=0,f=-2,d=-1,p=4,v=2,g=8,m=9,y=286,b=30,S=19,w=2*y+1,E=15,k=3,I=258,x=I+k+1,C=42,O=113,T=1,_=2,A=3,R=4;function N(e,t){return e.msg=u[t],t}function D(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 U(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 B(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-x?e.strstart-(e.w_size-x):0,c=e.window,l=e.w_mask,h=e.prev,f=e.strstart+I,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[(r=t)+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<f);if(n=I-(f-o),o=f-I,a<n){if(e.match_start=t,s<=(a=n))break;d=c[o+a-1],p=c[o+a]}}}while((t=h[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function F(e){var t,r,n,o,u,c,l,h,f,d,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-x)){for(i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;n=e.head[--t],e.head[t]=p<=n?n-p:0,--r;);for(t=r=p;n=e.prev[--t],e.prev[t]=p<=n?n-p:0,--r;);o+=p}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,h=e.strstart+e.lookahead,d=void 0,(f=o)<(d=c.avail_in)&&(d=f),r=0===d?0:(c.avail_in-=d,i.arraySet(l,c.input,c.next_in,d,h),1===c.state.wrap?c.adler=a(c.adler,l,d,h):2===c.state.wrap&&(c.adler=s(c.adler,l,d,h)),c.next_in+=d,c.total_in+=d,d),e.lookahead+=r,e.lookahead+e.insert>=k)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+k-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<k)););}while(e.lookahead<x&&0!==e.strm.avail_in)}function G(e,t){for(var r,n;;){if(e.lookahead<x){if(F(e),e.lookahead<x&&t===c)return T;if(0===e.lookahead)break}if(r=0,e.lookahead>=k&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-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-x&&(e.match_length=B(e,r)),e.match_length>=k)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-k),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=k){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-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 T}return e.insert=e.strstart<k-1?e.strstart:k-1,t===l?(M(e,!0),0===e.strm.avail_out?A:R):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:_}function K(e,t){for(var r,n,i;;){if(e.lookahead<x){if(F(e),e.lookahead<x&&t===c)return T;if(0===e.lookahead)break}if(r=0,e.lookahead>=k&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-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=k-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-x&&(e.match_length=B(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===k&&4096<e.strstart-e.match_start)&&(e.match_length=k-1)),e.prev_length>=k&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-k,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-k),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+k-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=k-1,e.strstart++,n&&(M(e,!1),0===e.strm.avail_out))return T}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 T}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<k-1?e.strstart:k-1,t===l?(M(e,!0),0===e.strm.avail_out?A:R):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:_}function V(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 H(){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(E+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 z(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?C:O,e.adler=2===t.wrap?0:1,t.last_flush=c,o._tr_init(t),h):N(e,f)}function Y(e){var t=z(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=k-1,e.match_available=0,e.ins_h=0}(e.state),t}function W(e,t,r,n,o,a){if(!e)return f;var s=1;if(t===d&&(t=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),o<1||m<o||r!==g||n<8||15<n||t<0||9<t||a<0||p<a)return N(e,f);8===n&&(n=9);var u=new H;return(e.state=u).strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+k-1)/k),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=r,Y(e)}n=[new V(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(F(e),0===e.lookahead&&t===c)return T;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 T;if(e.strstart-e.block_start>=e.w_size-x&&(M(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?A:R):(e.strstart>e.block_start&&(M(e,!1),e.strm.avail_out),T)})),new V(4,4,8,4,G),new V(4,5,16,8,G),new V(4,6,32,32,G),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)],r.deflateInit=function(e,t){return W(e,t,g,15,8,0)},r.deflateInit2=W,r.deflateReset=Y,r.deflateResetKeep=z,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?f:(e.state.gzhead=t,h):f},r.deflate=function(e,t){var r,i,a,u;if(!e||!e.state||5<t||t<0)return e?N(e,f):f;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==l)return N(e,0===e.avail_out?-5:f);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===C)if(2===i.wrap)e.adler=0,U(i,31),U(i,139),U(i,8),i.gzhead?(U(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)),U(i,255&i.gzhead.time),U(i,i.gzhead.time>>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(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):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=O);else{var d=g+(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=O,j(i,d),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(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)),P(e),a=i.pending,i.pending!==i.pending_buf_size));)U(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)),P(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,U(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)),P(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,U(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&&P(e),i.pending+2<=i.pending_buf_size&&(U(i,255&e.adler),U(i,e.adler>>8&255),e.adler=0,i.status=O)):i.status=O),0!==i.pending){if(P(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&D(t)<=D(r)&&t!==l)return N(e,-5);if(666===i.status&&0!==e.avail_in)return N(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===c)return T;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 T}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?A:R):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:_}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=I){if(F(e),e.lookahead<=I&&t===c)return T;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=k&&0<e.strstart&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+I;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=I-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=k?(r=o._tr_tally(e,1,e.match_length-k),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 T}return e.insert=0,t===l?(M(e,!0),0===e.strm.avail_out?A:R):e.last_lit&&(M(e,!1),0===e.strm.avail_out)?T:_}(i,t):n[i.level].func(i,t);if(p!==A&&p!==R||(i.status=666),p===T||p===A)return 0===e.avail_out&&(i.last_flush=-1),h;if(p===_&&(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?(U(i,255&e.adler),U(i,e.adler>>8&255),U(i,e.adler>>16&255),U(i,e.adler>>24&255),U(i,255&e.total_in),U(i,e.total_in>>8&255),U(i,e.total_in>>16&255),U(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)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==O&&666!==t?N(e,f):(e.state=null,t===O?N(e,-3):h):f},r.deflateSetDictionary=function(e,t){var r,n,o,s,u,c,l,d,p=t.length;if(!e||!e.state)return f;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==C||r.lookahead)return f;for(1===s&&(e.adler=a(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(L(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),u=e.avail_in,c=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,F(r);r.lookahead>=k;){for(n=r.strstart,o=r.lookahead-(k-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+k-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=k-1,F(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=k-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=u,r.wrap=s,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,a,s,u,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=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&&(d+=x[n++]<<p,p+=8,d+=x[n++]<<p,p+=8),b=v[d&m];t:for(;;){if(d>>>=S=b>>>24,p-=S,0==(S=b>>>16&255))C[o++]=65535&b;else{if(!(16&S)){if(0==(64&S)){b=v[(65535&b)+(d&(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&&(d+=x[n++]<<p,p+=8),w+=d&(1<<S)-1,d>>>=S,p-=S),p<15&&(d+=x[n++]<<p,p+=8,d+=x[n++]<<p,p+=8),b=g[d&y];r:for(;;){if(d>>>=S=b>>>24,p-=S,!(16&(S=b>>>16&255))){if(0==(64&S)){b=g[(65535&b)+(d&(1<<S)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&b,p<(S&=15)&&(d+=x[n++]<<p,(p+=8)<S&&(d+=x[n++]<<p,p+=8)),u<(E+=d&(1<<S)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=S,p-=S,(S=o-a)<E){if(l<(S=E-S)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(I=f,(k=0)===h){if(k+=c-S,S<w){for(w-=S;C[o++]=f[k++],--S;);k=o-E,I=C}}else if(h<S){if(k+=c+h-S,(S-=h)<w){for(w-=S;C[o++]=f[k++],--S;);if(k=0,h<w){for(w-=S=h;C[o++]=f[k++],--S;);k=o-E,I=C}}}else if(k+=h-S,S<w){for(w-=S;C[o++]=f[k++],--S;);k=o-E,I=C}for(;2<w;)C[o++]=I[k++],C[o++]=I[k++],C[o++]=I[k++],w-=3;w&&(C[o++]=I[k++],1<w&&(C[o++]=I[k++]))}else{for(k=o-E;C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],2<(w-=3););w&&(C[o++]=C[k++],1<w&&(C[o++]=C[k++]))}break}}break}}while(n<i&&o<s);n-=w=p>>3,d&=(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<s?s-o+257:257-(o-s),r.hold=d,r.bits=p}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=1,c=2,l=0,h=-2,f=1,d=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=f,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(d),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,E,k=!0;function I(e){if(k){var t;for(w=new n.Buf32(512),E=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,E,0,e.work,{bits:5}),k=!1}e.lencode=w,e.lenbits=9,e.distcode=E,e.distbits=5}function x(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}r.inflateReset=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,d,p,g,m,y,b,S,w,E,k,C,O,T,_,A,R,N,D,L,P,M,U,j,B=0,F=new n.Buf8(4),G=[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,d=e.input,y=e.avail_in,S=r.hold,w=r.bits,E=y,k=b,M=l;e:for(;;)switch(r.mode){case f:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}if(2&r.wrap&&35615===S){F[r.check=0]=255&S,F[1]=S>>>8&255,r.check=o(r.check,F,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+=d[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&&(F[0]=255&S,F[1]=S>>>8&255,r.check=o(r.check,F,2,0)),w=S=0,r.mode=3;case 3:for(;w<32;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}r.head&&(r.head.time=S),512&r.flags&&(F[0]=255&S,F[1]=S>>>8&255,F[2]=S>>>16&255,F[3]=S>>>24&255,r.check=o(r.check,F,4,0)),w=S=0,r.mode=4;case 4:for(;w<16;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}r.head&&(r.head.xflags=255&S,r.head.os=S>>8),512&r.flags&&(F[0]=255&S,F[1]=S>>>8&255,r.check=o(r.check,F,2,0)),w=S=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}r.length=S,r.head&&(r.head.extra_len=S),512&r.flags&&(F[0]=255&S,F[1]=S>>>8&255,r.check=o(r.check,F,2,0)),w=S=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(y<(C=r.length)&&(C=y),C&&(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,d,g,C,P)),512&r.flags&&(r.check=o(r.check,d,C,g)),y-=C,g+=C,r.length-=C),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break e;for(C=0;P=d[g+C++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P)),P&&C<y;);if(512&r.flags&&(r.check=o(r.check,d,C,g)),y-=C,g+=C,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(C=0;P=d[g+C++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P)),P&&C<y;);if(512&r.flags&&(r.check=o(r.check,d,C,g)),y-=C,g+=C,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+=d[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+=d[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+=d[g++]<<w,w+=8}switch(r.last=1&S,w-=1,3&(S>>>=1)){case 0:r.mode=14;break;case 1:if(I(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+=d[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(C=r.length){if(y<C&&(C=y),b<C&&(C=b),0===C)break e;n.arraySet(p,d,g,C,m),y-=C,g+=C,b-=C,m+=C,r.length-=C;break}r.mode=12;break;case 17:for(;w<14;){if(0===y)break e;y--,S+=d[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+=d[g++]<<w,w+=8}r.lens[G[r.have++]]=7&S,S>>>=3,w-=3}for(;r.have<19;)r.lens[G[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,U={bits:r.lenbits},M=s(0,r.lens,0,19,r.lencode,0,r.work,U),r.lenbits=U.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(;A=(B=r.lencode[S&(1<<r.lenbits)-1])>>>16&255,R=65535&B,!((_=B>>>24)<=w);){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}if(R<16)S>>>=_,w-=_,r.lens[r.have++]=R;else{if(16===R){for(j=_+2;w<j;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}if(S>>>=_,w-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}P=r.lens[r.have-1],C=3+(3&S),S>>>=2,w-=2}else if(17===R){for(j=_+3;w<j;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}w-=_,P=0,C=3+(7&(S>>>=_)),S>>>=3,w-=3}else{for(j=_+7;w<j;){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}w-=_,P=0,C=11+(127&(S>>>=_)),S>>>=7,w-=7}if(r.have+C>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;C--;)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,U={bits:r.lenbits},M=s(u,r.lens,0,r.nlen,r.lencode,0,r.work,U),r.lenbits=U.bits,M){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,U={bits:r.distbits},M=s(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,U),r.distbits=U.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,a(e,k),m=e.next_out,p=e.output,b=e.avail_out,g=e.next_in,d=e.input,y=e.avail_in,S=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;A=(B=r.lencode[S&(1<<r.lenbits)-1])>>>16&255,R=65535&B,!((_=B>>>24)<=w);){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}if(A&&0==(240&A)){for(N=_,D=A,L=R;A=(B=r.lencode[L+((S&(1<<N+D)-1)>>N)])>>>16&255,R=65535&B,!(N+(_=B>>>24)<=w);){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}S>>>=N,w-=N,r.back+=N}if(S>>>=_,w-=_,r.back+=_,r.length=R,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=12;break}if(64&A){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,S+=d[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(;A=(B=r.distcode[S&(1<<r.distbits)-1])>>>16&255,R=65535&B,!((_=B>>>24)<=w);){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}if(0==(240&A)){for(N=_,D=A,L=R;A=(B=r.distcode[L+((S&(1<<N+D)-1)>>N)])>>>16&255,R=65535&B,!(N+(_=B>>>24)<=w);){if(0===y)break e;y--,S+=d[g++]<<w,w+=8}S>>>=N,w-=N,r.back+=N}if(S>>>=_,w-=_,r.back+=_,64&A){e.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,S+=d[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=k-b,r.offset>C){if((C=r.offset-C)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}O=C>r.wnext?(C-=r.wnext,r.wsize-C):r.wnext-C,C>r.length&&(C=r.length),T=r.window}else T=p,O=m-r.offset,C=r.length;for(b<C&&(C=b),b-=C,r.length-=C;p[m++]=T[O++],--C;);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|=d[g++]<<w,w+=8}if(k-=b,e.total_out+=k,r.total+=k,k&&(e.adler=r.check=r.flags?o(r.check,p,k,m-k):i(r.check,p,k,m-k)),k=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+=d[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||k!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&x(e,e.output,e.next_out,k-e.avail_out)?(r.mode=31,-4):(E-=e.avail_in,k-=e.avail_out,e.total_in+=E,e.total_out+=k,r.total+=k,r.wrap&&k&&(e.adler=r.check=r.flags?o(r.check,p,k,e.next_out-k):i(r.check,p,k,e.next_out-k)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==E&&0===k||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:x(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],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,c,l,h,f){var d,p,v,g,m,y,b,S,w,E=f.bits,k=0,I=0,x=0,C=0,O=0,T=0,_=0,A=0,R=0,N=0,D=null,L=0,P=new n.Buf16(16),M=new n.Buf16(16),U=null,j=0;for(k=0;k<=15;k++)P[k]=0;for(I=0;I<u;I++)P[t[r+I]]++;for(O=E,C=15;1<=C&&0===P[C];C--);if(C<O&&(O=C),0===C)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(x=1;x<C&&0===P[x];x++);for(O<x&&(O=x),k=A=1;k<=15;k++)if(A<<=1,(A-=P[k])<0)return-1;if(0<A&&(0===e||1!==C))return-1;for(M[1]=0,k=1;k<15;k++)M[k+1]=M[k]+P[k];for(I=0;I<u;I++)0!==t[r+I]&&(h[M[t[r+I]]++]=I);if(y=0===e?(D=U=h,19):1===e?(D=i,L-=257,U=o,j-=257,256):(D=a,U=s,-1),k=x,m=l,_=I=N=0,v=-1,g=(R=1<<(T=O))-1,1===e&&852<R||2===e&&592<R)return 1;for(;;){for(b=k-_,w=h[I]<y?(S=0,h[I]):h[I]>y?(S=U[j+h[I]],D[L+h[I]]):(S=96,0),d=1<<k-_,x=p=1<<T;c[m+(N>>_)+(p-=d)]=b<<24|S<<16|w|0,0!==p;);for(d=1<<k-1;N&d;)d>>=1;if(0!==d?(N&=d-1,N+=d):N=0,I++,0==--P[k]){if(k===C)break;k=t[r+h[I]]}if(O<k&&(N&g)!==v){for(0===_&&(_=O),m+=x,A=1<<(T=k-_);T+_<C&&!((A-=P[T+_])<=0);)T++,A<<=1;if(R+=1<<T,1===e&&852<R||2===e&&592<R)return 1;c[v=N&g]=O<<24|T<<16|m-l|0}}return 0!==N&&(c[m+N]=k-_<<24|64<<16|0),f.bits=O,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 a(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,u=29,c=256,l=c+1+u,h=30,f=19,d=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],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],x=new Array(2*(l+2));a(x);var C=new Array(2*h);a(C);var O=new Array(512);a(O);var T=new Array(256);a(T);var _=new Array(u);a(_);var A,R,N,D=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?O[e]:O[256+(e>>>7)]}function U(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,U(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 B(e,t,r){j(e,r[2*t],r[2*t+1])}function F(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function G(e,t,r){var n,i,o=new Array(p+1),a=0;for(n=1;n<=p;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=F(o[s]++,s))}}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<f;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?U(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 H(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 z(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&H(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function Y(e,t,r){var n,i,o,a,s=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===n?B(e,i,t):(B(e,(o=T[i])+c+1,t),0!==(a=w[o])&&j(e,i-=_[o],a),B(e,o=M(--n),r),0!==(a=E[o])&&j(e,n-=D[o],a)),s<e.last_lit;);B(e,m,t)}function W(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=d,r=0;r<u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)z(e,o,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],z(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++,z(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=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(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<d;r++)g<(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)&&(o=g,m++),u[2*n+1]=o,c<n||(e.bl_count[o]++,a=0,v<=n&&(a=f[n-v]),s=u[2*n],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(l[2*n+1]+a)));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;)c<(i=e.heap[--r])||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),G(o,c,e.bl_count)}function X(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*y]++):s<=10?e.bl_tree[2*b]++:e.bl_tree[2*S]++,o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))}function q(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s<u&&i===a)){if(s<c)for(;B(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(B(e,i,e.bl_tree),s--),B(e,y,e.bl_tree),j(e,s-3,2)):s<=10?(B(e,b,e.bl_tree),j(e,s-3,3)):(B(e,S,e.bl_tree),j(e,s-11,7));o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}}a(D);var $=!1;function Z(e,t,r,i){j(e,(s<<1)+(i?1:0),3),function(e,t,r,i){V(e),i&&(U(e,r),U(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<u-1;n++)for(_[n]=r,e=0;e<1<<w[n];e++)T[r++]=n;for(T[r-1]=n,n=i=0;n<16;n++)for(D[n]=i,e=0;e<1<<E[n];e++)O[i++]=n;for(i>>=7;n<h;n++)for(D[n]=i<<7,e=0;e<1<<E[n]-7;e++)O[256+i++]=n;for(t=0;t<=p;t++)o[t]=0;for(e=0;e<=143;)x[2*e+1]=8,e++,o[8]++;for(;e<=255;)x[2*e+1]=9,e++,o[9]++;for(;e<=279;)x[2*e+1]=7,e++,o[7]++;for(;e<=287;)x[2*e+1]=8,e++,o[8]++;for(G(x,l+1,o),e=0;e<h;e++)C[2*e+1]=5,C[2*e]=F(e,5);A=new L(x,w,c+1,l,p),R=new L(C,E,0,h,p),N=new L(new Array(0),k,0,f,g)}(),$=!0),e.l_desc=new P(e.dyn_ltree,A),e.d_desc=new P(e.dyn_dtree,R),e.bl_desc=new P(e.bl_tree,N),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 a,s,u=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return o;return i}(e)),W(e,e.l_desc),W(e,e.d_desc),u=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),W(e,e.bl_desc),t=f-1;3<=t&&0===e.bl_tree[2*I[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=r+5,r+4<=a&&-1!==t?Z(e,t,r,n):4===e.strategy||s===a?(j(e,2+(n?1:0),3),Y(e,x,C)):(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*I[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,u+1),Y(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&V(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*(T[r]+c+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){j(e,2,3),B(e,m,x),function(e){16===e.bi_valid?(U(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,a=1,s={},u=!1,c=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){f(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",d,!1):e.attachEvent("onmessage",d),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(f,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return s[a]=i,r(a),a++},l.clearImmediate=h}function h(e){delete s[e]}function f(e){if(u)setTimeout(f,0,e);else{var r=s[e];if(r){u=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{h(e),u=!1}}}}function d(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+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)},631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,I=Array.prototype.join,x=Array.prototype.slice,C=Math.floor,O="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-C(-e):C(e);if(n!==e){var i=String(n),o=y.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var P=r(4654),M=P.custom,U=K(M)?M:null;function j(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function B(e){return b.call(String(e),/"/g,"&quot;")}function F(e){return!("[object Array]"!==z(e)||R&&"object"==typeof e&&R in e)}function G(e){return!("[object RegExp]"!==z(e)||R&&"object"==typeof e&&R in e)}function K(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,s){var u=n||{};if(H(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!H(u,"customInspect")||u.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var S=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return W(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return S?L(t,E):E}if("bigint"==typeof t){var C=String(t)+"n";return S?L(t,C):C}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var M=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=I.call(Array(e.indent+1)," ")}return{base:r,prev:I.call(Array(t+1),r)}}(u,i);if(void 0===s)s=[];else if(Y(s,t)>=0)return"[Circular]";function V(t,r,n){if(r&&(s=x.call(s)).push(r),n){var o={depth:u.depth};return H(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),e(t,o,i+1,s)}return e(t,u,i+1,s)}if("function"==typeof t&&!G(t)){var X=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Q(t,V);return"[Function"+(X?": "+X:" (anonymous)")+"]"+(ee.length>0?" { "+I.call(ee,", ")+" }":"")}if(K(t)){var te=A?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(t);return"object"!=typeof t||A?te:q(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var re="<"+w.call(String(t.nodeName)),ne=t.attributes||[],ie=0;ie<ne.length;ie++)re+=" "+ne[ie].name+"="+j(B(ne[ie].value),"double",u);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+="</"+w.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var oe=Q(t,V);return M&&!function(e){for(var t=0;t<e.length;t++)if(Y(e[t],"\n")>=0)return!1;return!0}(oe)?"["+J(oe,M)+"]":"[ "+I.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||R&&"object"==typeof e&&R in e)}(t)){var ae=Q(t,V);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+I.call(ae,", ")+" }":"{ ["+String(t)+"] "+I.call(k.call("[cause]: "+V(t.cause),ae),", ")+" }"}if("object"==typeof t&&v){if(U&&"function"==typeof t[U]&&P)return P(t,{depth:T-i});if("symbol"!==v&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,r){se.push(V(r,t,!0)+" => "+V(e,t))})),Z("Map",o.call(t),se,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return l&&l.call(t,(function(e){ue.push(V(e,t))})),Z("Set",c.call(t),ue,M)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if(function(e){return!("[object Number]"!==z(e)||R&&"object"==typeof e&&R in e)}(t))return q(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}(t))return q(V(O.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||R&&"object"==typeof e&&R in e)}(t))return q(p.call(t));if(function(e){return!("[object String]"!==z(e)||R&&"object"==typeof e&&R in e)}(t))return q(V(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==z(e)||R&&"object"==typeof e&&R in e)}(t)&&!G(t)){var ce=Q(t,V),le=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",fe=!le&&R&&Object(t)===t&&R in t?y.call(z(t),8,-1):he?"Object":"",de=(le||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||he?"["+I.call(k.call([],fe||[],he||[]),": ")+"] ":"");return 0===ce.length?de+"{}":M?de+"{"+J(ce,M)+"}":de+"{ "+I.call(ce,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function z(e){return v.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function W(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return W(y.call(e,0,t.maxStringLength),t)+n}return j(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",t)}function X(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+S.call(t.toString(16))}function q(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?J(r,n):I.call(r,", "))+"}"}function J(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+I.call(e,","+r)+"\n"+t.prev}function Q(e,t){var r=F(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=H(e,i)?t(e[i],e):""}var o,a="function"==typeof T?T(e):[];if(A){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)H(e,u)&&(r&&String(Number(u))===u&&u<e.length||A&&o["$"+u]instanceof Symbol||(E.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof T)for(var c=0;c<a.length;c++)N.call(e,a[c])&&n.push("["+t(a[c])+"]: "+t(e[a[c]],e));return n}},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},129:(e,t,r)=>{"use strict";var n=r(8261),i=r(5235),o=r(5798);e.exports={formats:o,parse:i,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var h=0;r.depth>0&&null!==(s=a.exec(o))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var i=n?t:u(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,f=l.split(t.delimiter,h),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?p="utf-8":"utf8=%26%2310003%3B"===f[r]&&(p="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var v,g,m=f[r],y=m.indexOf("]="),b=-1===y?m.indexOf("="):y+1;-1===b?(v=t.decoder(m,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(v=t.decoder(m.slice(0,b),a.decoder,p,"key"),g=n.maybeMap(u(m.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),m.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,v)?c[v]=n.combine(c[v],g):c[v]=g}return c}(e,r):e,h=r.plainObjects?Object.create(null):{},f=Object.keys(l),d=0;d<f.length;++d){var p=f[d],v=c(p,l[p],r,"string"==typeof e);h=n.merge(h,v,r)}return!0===r.allowSparse?h:n.compact(h)}},8261:(e,t,r)=>{"use strict";var n=r(7478),i=r(2769),o=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(e,t){l.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},v={},g=function e(t,r,o,a,s,l,f,d,g,m,y,b,S,w,E,k){for(var I,x=t,C=k,O=0,T=!1;void 0!==(C=C.get(v))&&!T;){var _=C.get(t);if(O+=1,void 0!==_){if(_===O)throw new RangeError("Cyclic object value");T=!0}void 0===C.get(v)&&(O=0)}if("function"==typeof d?x=d(r,x):x instanceof Date?x=y(x):"comma"===o&&u(x)&&(x=i.maybeMap(x,(function(e){return e instanceof Date?y(e):e}))),null===x){if(s)return f&&!w?f(r,p.encoder,E,"key",b):r;x=""}if("string"==typeof(I=x)||"number"==typeof I||"boolean"==typeof I||"symbol"==typeof I||"bigint"==typeof I||i.isBuffer(x)){if(f){var A=w?r:f(r,p.encoder,E,"key",b);if("comma"===o&&w){for(var R=c.call(String(x),","),N="",D=0;D<R.length;++D)N+=(0===D?"":",")+S(f(R[D],p.encoder,E,"value",b));return[S(A)+(a&&u(x)&&1===R.length?"[]":"")+"="+N]}return[S(A)+"="+S(f(x,p.encoder,E,"value",b))]}return[S(r)+"="+S(String(x))]}var L,P=[];if(void 0===x)return P;if("comma"===o&&u(x))L=[{value:x.length>0?x.join(",")||null:void 0}];else if(u(d))L=d;else{var M=Object.keys(x);L=g?M.sort(g):M}for(var U=a&&u(x)&&1===x.length?r+"[]":r,j=0;j<L.length;++j){var B=L[j],F="object"==typeof B&&void 0!==B.value?B.value:x[B];if(!l||null!==F){var G=u(x)?"function"==typeof o?o(U,B):U:U+(m?"."+B:"["+B+"]");k.set(t,O);var K=n();K.set(v,k),h(P,e(F,G,o,a,s,l,f,d,g,m,y,b,S,w,E,K))}}return P};e.exports=function(e,t){var r,i=e,c=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],i=p.filter;return("function"==typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(r=c.filter);var l,f=[];if("object"!=typeof i||null===i)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=s[l];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(i)),c.sort&&r.sort(c.sort);for(var m=n(),y=0;y<r.length;++y){var b=r[y];c.skipNulls&&null===i[b]||h(f,g(i[b],b,d,v,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var S=f.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),S.length>0?w+S:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return o(t)&&!o(r)&&(a=s(t,n)),o(t)&&o(r)?(r.forEach((function(r,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return i.call(t,o)?t[o]=e(t[o],a,n):t[o]=a,t}),a)}}},3332:e=>{"use strict";var t=1,r=2,n=3,i=4,o=5,a=6,s=7,u=8,c=9,l=10;function h(e,t,r){this.__id__=e,r.objects[e]=this,this.__objectSignals__={},this.__propertyCache__={};var n=this;function i(e,t){var i=e[0],o=e[1];n[i]={connect:function(e){"function"==typeof e?(n.__objectSignals__[o]=n.__objectSignals__[o]||[],n.__objectSignals__[o].push(e),t||"destroyed"!==i&&"destroyed()"!==i&&"destroyed(QObject*)"!==i&&1==n.__objectSignals__[o].length&&r.exec({type:s,object:n.__id__,signal:o})):console.error("Bad callback given to connect to signal "+i)},disconnect:function(e){"function"==typeof e?(n.__objectSignals__[o]=(n.__objectSignals__[o]||[]).filter((function(t){return t!=e})),t||0!==n.__objectSignals__[o].length||r.exec({type:u,object:n.__id__,signal:o})):console.error("Bad callback given to disconnect from signal "+i)}}}function o(e,t){var r=n.__objectSignals__[e];r&&r.forEach((function(e){e.apply(e,t)}))}this.unwrapQObject=function(e){if(e instanceof Array)return e.map((e=>n.unwrapQObject(e)));if(!(e instanceof Object))return e;if(!e["__QObject*__"]||void 0===e.id){var t={};for(const r of Object.keys(e))t[r]=n.unwrapQObject(e[r]);return t}var i=e.id;if(r.objects[i])return r.objects[i];if(e.data){var o=new h(i,e.data,r);return o.destroyed.connect((function(){r.objects[i]===o&&(delete r.objects[i],Object.keys(o).forEach((e=>delete o[e])))})),o.unwrapProperties(),o}console.error("Cannot unwrap unknown QObject "+i+" without data.")},this.unwrapProperties=function(){for(const e of Object.keys(n.__propertyCache__))n.__propertyCache__[e]=n.unwrapQObject(n.__propertyCache__[e])},this.propertyUpdate=function(e,t){for(const e of Object.keys(t)){var r=t[e];n.__propertyCache__[e]=this.unwrapQObject(r)}for(const t of Object.keys(e))o(t,e[t])},this.signalEmitted=function(e,t){o(e,this.unwrapQObject(t))},t.methods.forEach((function(e){var t=e[0],i=e[1],o=")"===t[t.length-1]?i:t;n[t]=function(){for(var e,t,i,s=[],u=0;u<arguments.length;++u){var c=arguments[u];"function"==typeof c?e=c:s.push(c)}return e||"function"!=typeof Promise||(i=new Promise((function(r,n){e=r,t=n}))),r.exec({type:a,object:n.__id__,method:o,args:s},(function(r){if(void 0!==r){var i=n.unwrapQObject(r);e&&e(i)}else t&&t()})),i}})),t.properties.forEach((function(e){var t=e[0],o=e[1],a=e[2];n.__propertyCache__[t]=e[3],a&&(1===a[0]&&(a[0]=o+"Changed"),i(a,!0)),Object.defineProperty(n,o,{configurable:!0,get:function(){var e=n.__propertyCache__[t];return void 0===e&&console.warn('Undefined value in property cache for property "'+o+'" in object '+n.__id__),e},set:function(e){if(void 0!==e){n.__propertyCache__[t]=e;var i=e;r.exec({type:c,object:n.__id__,property:t,value:i})}else console.warn("Property setter for "+o+" called with undefined value!")}})})),t.signals.forEach((function(e){i(e,!1)})),Object.assign(n,t.enums)}h.prototype.toJSON=function(){return void 0===this.__id__?{}:{id:this.__id__,"__QObject*__":!0}},e.exports={QWebChannel:function(e,a){if("object"==typeof e&&"function"==typeof e.send){var s=this;this.transport=e,this.send=function(e){"string"!=typeof e&&(e=JSON.stringify(e)),s.transport.send(e)},this.transport.onmessage=function(e){var n=e.data;switch("string"==typeof n&&(n=JSON.parse(n)),n.type){case t:s.handleSignal(n);break;case l:s.handleResponse(n);break;case r:s.handlePropertyUpdate(n);break;default:console.error("invalid message received:",e.data)}},this.execCallbacks={},this.execId=0,this.exec=function(e,t){t?(s.execId===Number.MAX_VALUE&&(s.execId=Number.MIN_VALUE),e.hasOwnProperty("id")?console.error("Cannot exec message with property id: "+JSON.stringify(e)):(e.id=s.execId++,s.execCallbacks[e.id]=t,s.send(e))):s.send(e)},this.objects={},this.handleSignal=function(e){var t=s.objects[e.object];t?t.signalEmitted(e.signal,e.args):console.warn("Unhandled signal: "+e.object+"::"+e.signal)},this.handleResponse=function(e){e.hasOwnProperty("id")?(s.execCallbacks[e.id](e.data),delete s.execCallbacks[e.id]):console.error("Invalid response message received: ",JSON.stringify(e))},this.handlePropertyUpdate=function(e){e.data.forEach((e=>{var t=s.objects[e.object];t?t.propertyUpdate(e.signals,e.properties):console.warn("Unhandled property update: "+e.object+"::"+e.signal)})),s.exec({type:i})},this.debug=function(e){s.send({type:o,data:e})},s.exec({type:n},(function(e){for(const t of Object.keys(e))new h(t,e[t],s);for(const e of Object.keys(s.objects))s.objects[e].unwrapProperties();a&&a(s),s.exec({type:i})}))}else console.error("The QWebChannel expects a transport object with a send function and onmessage callback property. Given is: transport: "+typeof e+", transport.send: "+typeof e.send)}}},7771:(e,t,r)=>{"use strict";var n=r(210),i=r(2296),o=r(1044)(),a=r(7296),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},3341:(e,t,r)=>{"use strict";const n=Symbol.prototype.valueOf,i=r(9401);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}}},9401: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,"")}},7478:(e,t,r)=>{"use strict";var n=r(210),i=r(1924),o=r(631),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),f=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),v=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+o(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return f(t,n)}else if(r)return function(e,t){var r=v(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return h(e,n)}else if(u){if(t)return p(t,n)}else if(r)return function(e,t){return!!v(e,t)}(r,n);return!1},set:function(n,i){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),l(e,n,i)):u?(t||(t=new u),d(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=v(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}},2511:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,c=1,l=26,h=38,f=700,d=72,p=128,v="-",g=/^xn--/,m=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=u-c,w=Math.floor,E=String.fromCharCode;function k(e){throw new RangeError(b[e])}function I(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+I((e=e.replace(y,".")).split("."),t).join(".")}function C(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function O(e){return I(e,(function(e){var t="";return e>65535&&(t+=E((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=E(e)})).join("")}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?w(e/f):e>>1,e+=w(e/t);e>S*l>>1;n+=u)e=w(e/S);return w(n+(S+1)*e/(e+h))}function A(e){var t,r,n,i,o,a,h,f,g,m,y,b=[],S=e.length,E=0,I=p,x=d;for((r=e.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&k("not-basic"),b.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<S;){for(o=E,a=1,h=u;i>=S&&k("invalid-input"),((f=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||f>w((s-E)/a))&&k("overflow"),E+=f*a,!(f<(g=h<=x?c:h>=x+l?l:h-x));h+=u)a>w(s/(m=u-g))&&k("overflow"),a*=m;x=_(E-o,t=b.length+1,0==o),w(E/t)>s-I&&k("overflow"),I+=w(E/t),E%=t,b.splice(E++,0,I)}return O(b)}function R(e){var t,r,n,i,o,a,h,f,g,m,y,b,S,I,x,O=[];for(b=(e=C(e)).length,t=p,r=0,o=d,a=0;a<b;++a)(y=e[a])<128&&O.push(E(y));for(n=i=O.length,i&&O.push(v);n<b;){for(h=s,a=0;a<b;++a)(y=e[a])>=t&&y<h&&(h=y);for(h-t>w((s-r)/(S=n+1))&&k("overflow"),r+=(h-t)*S,t=h,a=0;a<b;++a)if((y=e[a])<t&&++r>s&&k("overflow"),y==t){for(f=r,g=u;!(f<(m=g<=o?c:g>=o+l?l:g-o));g+=u)x=f-m,I=u-m,O.push(E(T(m+x%I,0))),f=w(x/I);O.push(E(T(f,0))),o=_(r,S,n==i),r=0,++n}++r,++t}return O.join("")}a={version:"1.4.1",ucs2:{decode:C,encode:O},decode:A,encode:R,toASCII:function(e){return x(e,(function(e){return m.test(e)?"xn--"+R(e):e}))},toUnicode:function(e){return x(e,(function(e){return g.test(e)?A(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},9532:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},7007:(e,t,r)=>{"use strict";var n=r(4730),i=r(7325),o=r(9532);e.exports={formats:o,parse:i,stringify:n}},7325:(e,t,r)=>{"use strict";var n=r(9368),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var h=0;r.depth>0&&null!==(s=a.exec(o))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var i=n?t:u(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,c={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,f=l.split(t.delimiter,h),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?p="utf-8":"utf8=%26%2310003%3B"===f[r]&&(p="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var v,g,m=f[r],y=m.indexOf("]="),b=-1===y?m.indexOf("="):y+1;-1===b?(v=t.decoder(m,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(v=t.decoder(m.slice(0,b),a.decoder,p,"key"),g=n.maybeMap(u(m.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),m.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,v)?c[v]=n.combine(c[v],g):c[v]=g}return c}(e,r):e,h=r.plainObjects?Object.create(null):{},f=Object.keys(l),d=0;d<f.length;++d){var p=f[d],v=c(p,l[p],r,"string"==typeof e);h=n.merge(h,v,r)}return!0===r.allowSparse?h:n.compact(h)}},4730:(e,t,r)=>{"use strict";var n=r(7478),i=r(9368),o=r(9532),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},h=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},p={},v=function e(t,r,o,a,s,c,h,f,v,g,m,y,b,S,w,E){for(var k,I=t,x=E,C=0,O=!1;void 0!==(x=x.get(p))&&!O;){var T=x.get(t);if(C+=1,void 0!==T){if(T===C)throw new RangeError("Cyclic object value");O=!0}void 0===x.get(p)&&(C=0)}if("function"==typeof f?I=f(r,I):I instanceof Date?I=m(I):"comma"===o&&u(I)&&(I=i.maybeMap(I,(function(e){return e instanceof Date?m(e):e}))),null===I){if(s)return h&&!S?h(r,d.encoder,w,"key",y):r;I=""}if("string"==typeof(k=I)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||i.isBuffer(I))return h?[b(S?r:h(r,d.encoder,w,"key",y))+"="+b(h(I,d.encoder,w,"value",y))]:[b(r)+"="+b(String(I))];var _,A=[];if(void 0===I)return A;if("comma"===o&&u(I))S&&h&&(I=i.maybeMap(I,h)),_=[{value:I.length>0?I.join(",")||null:void 0}];else if(u(f))_=f;else{var R=Object.keys(I);_=v?R.sort(v):R}for(var N=a&&u(I)&&1===I.length?r+"[]":r,D=0;D<_.length;++D){var L=_[D],P="object"==typeof L&&void 0!==L.value?L.value:I[L];if(!c||null!==P){var M=u(I)?"function"==typeof o?o(N,L):N:N+(g?"."+L:"["+L+"]");E.set(t,C);var U=n();U.set(p,E),l(A,e(P,M,o,a,s,c,"comma"===o&&S&&u(I)?null:h,f,v,g,m,y,b,S,w,U))}}return A};e.exports=function(e,t){var r,i=e,c=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],i=d.filter;return("function"==typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(r=c.filter);var h,f=[];if("object"!=typeof i||null===i)return"";h=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=s[h];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===p&&t&&t.commaRoundTrip;r||(r=Object.keys(i)),c.sort&&r.sort(c.sort);for(var m=n(),y=0;y<r.length;++y){var b=r[y];c.skipNulls&&null===i[b]||l(f,v(i[b],b,p,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var S=f.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),S.length>0?w+S:""}},9368:(e,t,r)=>{"use strict";var n=r(9532),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return o(t)&&!o(r)&&(a=s(t,n)),o(t)&&o(r)?(r.forEach((function(r,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return i.call(t,o)?t[o]=e(t[o],a,n):t[o]=a,t}),a)}}},8575:(e,t,r)=>{"use strict";var n=r(2511);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(7007);function y(e,t,r){if(e&&"object"==typeof e&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var y=e=u.join(a);if(y=y.trim(),!r&&1===e.split("#").length){var b=s.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=o.exec(y);if(S){var w=(S=S[0]).toLowerCase();this.protocol=w,y=y.substr(S.length)}if(r||S||y.match(/^\/\/[^@/]+@[^@/]+/)){var E="//"===y.substr(0,2);!E||S&&v[S]||(y=y.substr(2),this.slashes=!0)}if(!v[S]&&(E||S&&!g[S])){for(var k,I,x=-1,C=0;C<h.length;C++){-1!==(O=y.indexOf(h[C]))&&(-1===x||O<x)&&(x=O)}-1!==(I=-1===x?y.lastIndexOf("@"):y.lastIndexOf("@",x))&&(k=y.slice(0,I),y=y.slice(I+1),this.auth=decodeURIComponent(k)),x=-1;for(C=0;C<l.length;C++){var O;-1!==(O=y.indexOf(l[C]))&&(-1===x||O<x)&&(x=O)}-1===x&&(x=y.length),this.host=y.slice(0,x),y=y.slice(x),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var _=this.hostname.split(/\./),A=(C=0,_.length);C<A;C++){var R=_[C];if(R&&!R.match(f)){for(var N="",D=0,L=R.length;D<L;D++)R.charCodeAt(D)>127?N+="x":N+=R[D];if(!N.match(f)){var P=_.slice(0,C),M=_.slice(C+1),U=R.match(d);U&&(P.push(U[1]),M.unshift(U[2])),M.length&&(y="/"+M.join(".")+y),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+j,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!p[w])for(C=0,A=c.length;C<A;C++){var F=c[C];if(-1!==y.indexOf(F)){var G=encodeURIComponent(F);G===F&&(G=escape(F)),y=y.split(F).join(G)}}var K=y.indexOf("#");-1!==K&&(this.hash=y.substr(K),y=y.slice(0,K));var V=y.indexOf("?");if(-1!==V?(this.search=y.substr(V),this.query=y.substr(V+1),t&&(this.query=m.parse(this.query)),y=y.slice(0,V)):t&&(this.search="",this.query={}),y&&(this.pathname=y),g[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var H=this.search||"";this.path=j+H}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if("string"==typeof e){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),o=0;o<n.length;o++){var a=n[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=e[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var l=Object.keys(e),h=0;h<l.length;h++){var f=l[h];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||v[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",m=r.search||"";r.path=p+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=b||y||r.host&&e.pathname,w=S,E=r.pathname&&r.pathname.split("/")||[],k=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(k&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),S=S&&(""===d[0]||""===E[0])),b)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(k)r.host=E.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=E.slice(-1)[0],x=(r.host||e.host||E.length>1)&&("."===I||".."===I)||""===I,C=0,O=E.length;O>=0;O--)"."===(I=E[O])?E.splice(O,1):".."===I?(E.splice(O,1),C++):C&&(E.splice(O,1),C--);if(!S&&!w)for(;C--;C)E.unshift("..");!S||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),x&&"/"!==E.join("/").substr(-1)&&E.push("");var T,_=""===E[0]||E[0]&&"/"===E[0].charAt(0);k&&(r.hostname=_?"":E.length?E.shift():"",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname));return(S=S||r.host&&E.length)&&!_&&E.unshift(""),E.length>0?r.pathname=E.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=y(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i},477:e=>{"use strict";e.exports=function(e,t,r,n){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),u=new i[t](s,r);return a.revokeObjectURL(s),u}catch(n){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new i[t](n,r)}}},2480:()=>{},4654:()=>{},7061:(e,t,r)=>{var n=r(8698).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof S?t:S,o=Object.create(i.prototype),a=new D(n||[]);return s(o,"_invoke",{value:_(e,r,a)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",g="suspendedYield",m="executing",y="completed",b={};function S(){}function w(){}function E(){}var k={};f(k,c,(function(){return this}));var I=Object.getPrototypeOf,x=I&&I(I(L([])));x&&x!==o&&a.call(x,c)&&(k=x);var C=E.prototype=S.prototype=Object.create(k);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(i,o,s,u){var c=p(e[i],e,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==n(h)&&a.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value: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 _(e,r,n){var i=v;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=A(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?y:g,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function R(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(a.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=E,s(C,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,h,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,h,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},O(T.prototype),f(T.prototype,l,(function(){return this})),r.AsyncIterator=T,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new T(d(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(C),f(C,h,"Generator"),f(C,c,(function(){return this})),f(C,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},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 r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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&&a.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 o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),N(r),b}},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;N(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}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)}},509:(e,t,r)=>{"use strict";var n=r(9985),i=r(3691),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},2655:(e,t,r)=>{"use strict";var n=r(9429),i=r(3691),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},3550:(e,t,r)=>{"use strict";var n=r(9985),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},7370:(e,t,r)=>{"use strict";var n=r(4201),i=r(5391),o=r(2560).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1514:(e,t,r)=>{"use strict";var n=r(730).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},767:(e,t,r)=>{"use strict";var n=r(3622),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},5027:(e,t,r)=>{"use strict";var n=r(8999),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},7075:e=>{"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},1655:(e,t,r)=>{"use strict";var n=r(3689);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},4872:(e,t,r)=>{"use strict";var n,i,o,a=r(7075),s=r(7697),u=r(9037),c=r(9985),l=r(8999),h=r(6812),f=r(926),d=r(3691),p=r(5773),v=r(1880),g=r(2148),m=r(3622),y=r(1868),b=r(9385),S=r(4201),w=r(4630),E=r(618),k=E.enforce,I=E.get,x=u.Int8Array,C=x&&x.prototype,O=u.Uint8ClampedArray,T=O&&O.prototype,_=x&&y(x),A=C&&y(C),R=Object.prototype,N=u.TypeError,D=S("toStringTag"),L=w("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",M=a&&!!b&&"Opera"!==f(u.opera),U=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},F=function(e){var t=y(e);if(l(t)){var r=I(t);return r&&h(r,P)?r[P]:F(t)}},G=function(e){if(!l(e))return!1;var t=f(e);return h(j,t)||h(B,t)};for(n in j)(o=(i=u[n])&&i.prototype)?k(o)[P]=i:M=!1;for(n in B)(o=(i=u[n])&&i.prototype)&&(k(o)[P]=i);if((!M||!c(_)||_===Function.prototype)&&(_=function(){throw new N("Incorrect invocation")},M))for(n in j)u[n]&&b(u[n],_);if((!M||!A||A===R)&&(A=_.prototype,M))for(n in j)u[n]&&b(u[n].prototype,A);if(M&&y(T)!==A&&b(T,A),s&&!h(A,D))for(n in U=!0,g(A,D,{configurable:!0,get:function(){return l(this)?this[L]:void 0}}),j)u[n]&&p(u[n],L,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:U&&L,aTypedArray:function(e){if(G(e))return e;throw new N("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||m(_,e)))return e;throw new N(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var i in j){var o=u[i];if(o&&h(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}A[e]&&!r||v(A,e,r?t:M&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(s){if(b){if(r)for(n in j)if((i=u[n])&&h(i,e))try{delete i[e]}catch(e){}if(_[e]&&!r)return;try{return v(_,e,r?t:M&&_[e]||t)}catch(e){}}for(n in j)!(i=u[n])||i[e]&&!r||v(i,e,t)}},getTypedArrayConstructor:F,isView:function(e){if(!l(e))return!1;var t=f(e);return"DataView"===t||h(j,t)||h(B,t)},isTypedArray:G,TypedArray:_,TypedArrayPrototype:A}},3999:(e,t,r)=>{"use strict";var n=r(9037),i=r(8844),o=r(7697),a=r(7075),s=r(1236),u=r(5773),c=r(2148),l=r(6045),h=r(3689),f=r(767),d=r(8700),p=r(3126),v=r(9842),g=r(7788),m=r(5477),y=r(1868),b=r(9385),S=r(2741).f,w=r(2872),E=r(9015),k=r(5997),I=r(618),x=s.PROPER,C=s.CONFIGURABLE,O="ArrayBuffer",T="DataView",_="prototype",A="Wrong index",R=I.getterFor(O),N=I.getterFor(T),D=I.set,L=n[O],P=L,M=P&&P[_],U=n[T],j=U&&U[_],B=Object.prototype,F=n.Array,G=n.RangeError,K=i(w),V=i([].reverse),H=m.pack,z=m.unpack,Y=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},X=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return H(g(e),23,4)},Z=function(e){return H(e,52,8)},J=function(e,t,r){c(e[_],t,{configurable:!0,get:function(){return r(this)[t]}})},Q=function(e,t,r,n){var i=N(e),o=v(r),a=!!n;if(o+t>i.byteLength)throw new G(A);var s=i.bytes,u=o+i.byteOffset,c=E(s,u,u+t);return a?c:V(c)},ee=function(e,t,r,n,i,o){var a=N(e),s=v(r),u=n(+i),c=!!o;if(s+t>a.byteLength)throw new G(A);for(var l=a.bytes,h=s+a.byteOffset,f=0;f<t;f++)l[h+f]=u[c?f:t-f-1]};if(a){var te=x&&L.name!==O;if(h((function(){L(1)}))&&h((function(){new L(-1)}))&&!h((function(){return new L,new L(1.5),new L(NaN),1!==L.length||te&&!C})))te&&C&&u(L,"name",O);else{(P=function(e){return f(this,M),new L(v(e))})[_]=M;for(var re,ne=S(L),ie=0;ne.length>ie;)(re=ne[ie++])in P||u(P,re,L[re]);M.constructor=P}b&&y(j)!==B&&b(j,B);var oe=new U(new P(2)),ae=i(j.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||l(j,{setInt8:function(e,t){ae(this,e,t<<24>>24)},setUint8:function(e,t){ae(this,e,t<<24>>24)}},{unsafe:!0})}else M=(P=function(e){f(this,M);var t=v(e);D(this,{type:O,bytes:K(F(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[_],j=(U=function(e,t,r){f(this,j),f(e,M);var n=R(e),i=n.byteLength,a=d(t);if(a<0||a>i)throw new G("Wrong offset");if(a+(r=void 0===r?i-a:p(r))>i)throw new G("Wrong length");D(this,{type:T,buffer:e,byteLength:r,byteOffset:a,bytes:n.bytes}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=a)})[_],o&&(J(P,"byteLength",R),J(U,"buffer",N),J(U,"byteLength",N),J(U,"byteOffset",N)),l(j,{getInt8:function(e){return Q(this,1,e)[0]<<24>>24},getUint8:function(e){return Q(this,1,e)[0]},getInt16:function(e){var t=Q(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Q(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return q(Q(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return q(Q(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(Q(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(Q(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){ee(this,1,e,Y,t)},setUint8:function(e,t){ee(this,1,e,Y,t)},setInt16:function(e,t){ee(this,2,e,W,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){ee(this,2,e,W,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){ee(this,4,e,X,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){ee(this,4,e,X,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){ee(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){ee(this,8,e,Z,t,arguments.length>2&&arguments[2])}});k(P,O),k(U,T),e.exports={ArrayBuffer:P,DataView:U}},357:(e,t,r)=>{"use strict";var n=r(690),i=r(7578),o=r(6310),a=r(8494),s=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),u=o(r),c=i(e,u),l=i(t,u),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?u:i(h,u))-l,u-c),d=1;for(l<c&&c<l+f&&(d=-1,l+=f-1,c+=f-1);f-- >0;)l in r?r[c]=r[l]:a(r,c),c+=d,l+=d;return r}},2872:(e,t,r)=>{"use strict";var n=r(690),i=r(7578),o=r(6310);e.exports=function(e){for(var t=n(this),r=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,r),u=a>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>s;)t[s++]=e;return t}},7612:(e,t,r)=>{"use strict";var n=r(2960).forEach,i=r(6834)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},9976:(e,t,r)=>{"use strict";var n=r(6310);e.exports=function(e,t){for(var r=0,i=n(t),o=new e(i);i>r;)o[r]=t[r++];return o}},1055:(e,t,r)=>{"use strict";var n=r(4071),i=r(2615),o=r(690),a=r(1228),s=r(3292),u=r(9429),c=r(6310),l=r(6522),h=r(5185),f=r(1664),d=Array;e.exports=function(e){var t=o(e),r=u(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,E,k=f(t),I=0;if(!k||this===d&&s(k))for(m=c(t),y=r?new this(m):d(m);m>I;I++)E=g?v(t[I],I):t[I],l(y,I,E);else for(w=(S=h(t,k)).next,y=r?new this:[];!(b=i(w,S)).done;I++)E=g?a(S,v,[b.value,I],!0):b.value,l(y,I,E);return y.length=I,y}},4328:(e,t,r)=>{"use strict";var n=r(5290),i=r(7578),o=r(6310),a=function(e){return function(t,r,a){var s,u=n(t),c=o(u),l=i(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2960:(e,t,r)=>{"use strict";var n=r(4071),i=r(8844),o=r(4413),a=r(690),s=r(6310),u=r(7120),c=i([].push),l=function(e){var t=1===e,r=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=n(v,g),k=s(w),I=0,x=m||u,C=t?x(p,k):r||f?x(p,0):void 0;k>I;I++)if((d||I in w)&&(b=E(y=w[I],I,S),e))if(t)C[I]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}return h?-1:i||l?l:C}};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)}},953:(e,t,r)=>{"use strict";var n=r(1735),i=r(5290),o=r(8700),a=r(6310),s=r(6834),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;e.exports=f?function(e){if(l)return n(c,this,arguments)||0;var t=i(this),r=a(t),s=r-1;for(arguments.length>1&&(s=u(s,o(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:c},9042:(e,t,r)=>{"use strict";var n=r(3689),i=r(4201),o=r(3615),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},6834:(e,t,r)=>{"use strict";var n=r(3689);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},8820:(e,t,r)=>{"use strict";var n=r(509),i=r(690),o=r(4413),a=r(6310),s=TypeError,u=function(e){return function(t,r,u,c){n(r);var l=i(t),h=o(l),f=a(l),d=e?f-1:0,p=e?-1:1;if(u<2)for(;;){if(d in h){c=h[d],d+=p;break}if(d+=p,e?d<0:f<=d)throw new s("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=p)d in h&&(c=r(c,h[d],d,l));return c}};e.exports={left:u(!1),right:u(!0)}},5649:(e,t,r)=>{"use strict";var n=r(7697),i=r(2297),o=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!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 new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9015:(e,t,r)=>{"use strict";var n=r(7578),i=r(6310),o=r(6522),a=Array,s=Math.max;e.exports=function(e,t,r){for(var u=i(e),c=n(t,u),l=n(void 0===r?u:r,u),h=a(s(l-c,0)),f=0;c<l;c++,f++)o(h,f,e[c]);return h.length=f,h}},6004:(e,t,r)=>{"use strict";var n=r(8844);e.exports=n([].slice)},382:(e,t,r)=>{"use strict";var n=r(9015),i=Math.floor,o=function(e,t){var r=e.length,u=i(r/2);return r<8?a(e,t):s(e,o(n(e,0,u),t),o(n(e,u),t),t)},a=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},s=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e};e.exports=o},5271:(e,t,r)=>{"use strict";var n=r(2297),i=r(9429),o=r(8999),a=r(4201)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===s||n(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},7120:(e,t,r)=>{"use strict";var n=r(5271);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1228:(e,t,r)=>{"use strict";var n=r(5027),i=r(2125);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},6431:(e,t,r)=>{"use strict";var n=r(4201)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},6648:(e,t,r)=>{"use strict";var n=r(8844),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},926:(e,t,r)=>{"use strict";var n=r(3043),i=r(9985),o=r(6648),a=r(4201)("toStringTag"),s=Object,u="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=s(e),a))?r:u?o(t):"Object"===(n=o(t))&&i(t.callee)?"Arguments":n}},800:(e,t,r)=>{"use strict";var n=r(5391),i=r(2148),o=r(6045),a=r(4071),s=r(767),u=r(981),c=r(8734),l=r(1934),h=r(7807),f=r(4241),d=r(7697),p=r(5375).fastKey,v=r(618),g=v.set,m=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,i){s(e,f),g(e,{type:t,index:n(null),first:void 0,last:void 0,size:0}),d||(e.size=0),u(i)||c(i,e[l],{that:e,AS_ENTRIES:r})})),f=h.prototype,v=m(t),y=function(e,t,r){var n,i,o=v(e),a=b(e,t);return a?a.value=r:(o.last=a={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),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(f,{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,d?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),d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=a(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(f,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)}}),d&&i(f,"size",{configurable:!0,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),f(t)}}},319:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8844),a=r(5266),s=r(1880),u=r(5375),c=r(8734),l=r(767),h=r(9985),f=r(981),d=r(8999),p=r(3689),v=r(6431),g=r(5997),m=r(3457);e.exports=function(e,t,r){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),S=y?"set":"add",w=i[e],E=w&&w.prototype,k=w,I={},x=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,r){return t(this,0===e?0:e,r),this})};if(a(e,!h(w)||!(b||E.forEach&&!p((function(){(new w).entries().next()})))))k=r.getConstructor(t,e,y,S),u.enable();else if(a(e,!0)){var C=new k,O=C[S](b?{}:-0,1)!==C,T=p((function(){C.has(1)})),_=v((function(e){new w(e)})),A=!b&&p((function(){for(var e=new w,t=5;t--;)e[S](t,t);return!e.has(-0)}));_||((k=t((function(e,t){l(e,E);var r=m(new w,e,k);return f(t)||c(t,r[S],{that:r,AS_ENTRIES:y}),r}))).prototype=E,E.constructor=k),(T||A)&&(x("delete"),x("has"),y&&x("get")),(A||O)&&x(S),b&&E.clear&&delete E.clear}return I[e]=k,n({global:!0,constructor:!0,forced:k!==w},I),g(k,e),b||r.setStrong(k,e,y),k}},8758:(e,t,r)=>{"use strict";var n=r(6812),i=r(9152),o=r(2474),a=r(2560);e.exports=function(e,t,r){for(var s=i(t),u=a.f,c=o.f,l=0;l<s.length;l++){var h=s[l];n(e,h)||r&&n(r,h)||u(e,h,c(t,h))}}},7413:(e,t,r)=>{"use strict";var n=r(4201)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},1748:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},1568:(e,t,r)=>{"use strict";var n=r(8844),i=r(4684),o=r(4327),a=/"/g,s=n("".replace);e.exports=function(e,t,r,n){var u=o(i(e)),c="<"+t;return""!==r&&(c+=" "+r+'="'+s(o(n),a,"&quot;")+'"'),c+">"+u+"</"+t+">"}},7807:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5773:(e,t,r)=>{"use strict";var n=r(7697),i=r(2560),o=r(5684);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},5684:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6522:(e,t,r)=>{"use strict";var n=r(8360),i=r(2560),o=r(5684);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},2148:(e,t,r)=>{"use strict";var n=r(8702),i=r(2560);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},1880:(e,t,r)=>{"use strict";var n=r(9985),i=r(2560),o=r(8702),a=r(5014);e.exports=function(e,t,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:t;if(n(r)&&o(r,c,s),s.global)u?e[t]=r:a(t,r);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6045:(e,t,r)=>{"use strict";var n=r(1880);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},5014:(e,t,r)=>{"use strict";var n=r(9037),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}},8494:(e,t,r)=>{"use strict";var n=r(3691),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+n(t)+" of "+n(e))}},7697:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2659:e=>{"use strict";var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},6420:(e,t,r)=>{"use strict";var n=r(9037),i=r(8999),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},5565:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6338:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3265:(e,t,r)=>{"use strict";var n=r(6420)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},7365:(e,t,r)=>{"use strict";var n=r(71).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},2532:(e,t,r)=>{"use strict";var n=r(8563),i=r(806);e.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},3127:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8563:e=>{"use strict";e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7298:(e,t,r)=>{"use strict";var n=r(71);e.exports=/MSIE|Trident/.test(n)},3221:(e,t,r)=>{"use strict";var n=r(71);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4764:(e,t,r)=>{"use strict";var n=r(71);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},806:(e,t,r)=>{"use strict";var n=r(9037),i=r(6648);e.exports="process"===i(n.process)},7486:(e,t,r)=>{"use strict";var n=r(71);e.exports=/web0s(?!.*chrome)/i.test(n)},71:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:(e,t,r)=>{"use strict";var n,i,o=r(9037),a=r(71),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},7922:(e,t,r)=>{"use strict";var n=r(71).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},2739:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:(e,t,r)=>{"use strict";var n=r(9037),i=r(2474).f,o=r(5773),a=r(1880),s=r(5014),u=r(8758),c=r(5266);e.exports=function(e,t){var r,l,h,f,d,p=e.target,v=e.global,g=e.stat;if(r=v?n:g?n[p]||s(p,{}):(n[p]||{}).prototype)for(l in t){if(f=t[l],h=e.dontCallGetSet?(d=i(r,l))&&d.value:r[l],!c(v?l:p+(g?".":"#")+l,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;u(f,h)}(e.sham||h&&h.sham)&&o(f,"sham",!0),a(r,l,f,e)}}},3689:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8678:(e,t,r)=>{"use strict";r(4043);var n=r(6576),i=r(1880),o=r(6308),a=r(3689),s=r(4201),u=r(5773),c=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,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,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return t=!0,null},r[f](""),!t}));if(!d||!p||r){var v=n(/./[f]),g=t(f,""[e],(function(e,t,r,i,a){var s=n(e),u=t.exec;return u===o||u===l.exec?d&&!a?{done:!0,value:v(t,r,i)}:{done:!0,value:s(r,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(l,f,g[1])}h&&u(l[f],"sham",!0)}},1594:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1735:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},4071:(e,t,r)=>{"use strict";var n=r(6576),i=r(509),o=r(7215),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},7215:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},6761:(e,t,r)=>{"use strict";var n=r(8844),i=r(509),o=r(8999),a=r(6812),s=r(6004),u=r(7215),c=Function,l=n([].concat),h=n([].join),f={};e.exports=u?c.bind:function(e){var t=i(this),r=t.prototype,n=s(arguments,1),u=function(){var r=l(n,s(arguments));return this instanceof u?function(e,t,r){if(!a(f,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";f[t]=c("C,a","return new C("+h(n,",")+")")}return f[t](e,r)}(t,r.length,r):t.apply(e,r)};return o(r)&&(u.prototype=r),u}},2615:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},1236:(e,t,r)=>{"use strict";var n=r(7697),i=r(6812),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},2743:(e,t,r)=>{"use strict";var n=r(8844),i=r(509);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},6576:(e,t,r)=>{"use strict";var n=r(6648),i=r(8844);e.exports=function(e){if("Function"===n(e))return i(e)}},8844:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);e.exports=n?a:function(e){return function(){return o.apply(e,arguments)}}},6058:(e,t,r)=>{"use strict";var n=r(9037),i=r(9985);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1664:(e,t,r)=>{"use strict";var n=r(926),i=r(4849),o=r(981),a=r(9478),s=r(4201)("iterator");e.exports=function(e){if(!o(e))return i(e,s)||i(e,"@@iterator")||a[n(e)]}},5185:(e,t,r)=>{"use strict";var n=r(2615),i=r(509),o=r(5027),a=r(3691),s=r(1664),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?s(e):t;if(i(r))return o(n(r,e));throw new u(a(e)+" is not iterable")}},2643:(e,t,r)=>{"use strict";var n=r(8844),i=r(2297),o=r(9985),a=r(6648),s=r(4327),u=n([].push);e.exports=function(e){if(o(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;n<t;n++){var c=e[n];"string"==typeof c?u(r,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(r,s(c))}var l=r.length,h=!0;return function(e,t){if(h)return h=!1,t;if(i(this))return t;for(var n=0;n<l;n++)if(r[n]===e)return t}}}},4849:(e,t,r)=>{"use strict";var n=r(509),i=r(981);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},7017:(e,t,r)=>{"use strict";var n=r(8844),i=r(690),o=Math.floor,a=n("".charAt),s=n("".replace),u=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,h,f){var d=r+e.length,p=n.length,v=l;return void 0!==h&&(h=i(h),v=c),s(f,v,(function(i,s){var c;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,r);case"'":return u(t,d);case"<":c=h[u(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===n[f-1]?a(s,1):n[f-1]+a(s,1):i}c=n[l-1]}return void 0===c?"":c}))}},9037:function(e,t,r){"use strict";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)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:(e,t,r)=>{"use strict";var n=r(8844),i=r(690),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},7248:e=>{"use strict";e.exports={}},920:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},2688:(e,t,r)=>{"use strict";var n=r(6058);e.exports=n("document","documentElement")},8506:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689),o=r(6420);e.exports=!n&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5477:e=>{"use strict";var t=Array,r=Math.abs,n=Math.pow,i=Math.floor,o=Math.log,a=Math.LN2;e.exports={pack:function(e,s,u){var c,l,h,f=t(u),d=8*u-s-1,p=(1<<d)-1,v=p>>1,g=23===s?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,c=p):(c=i(o(e)/a),e*(h=n(2,-c))<1&&(c--,h*=2),(e+=c+v>=1?g/h:g*n(2,1-v))*h>=2&&(c++,h/=2),c+v>=p?(l=0,c=p):c+v>=1?(l=(e*h-1)*n(2,s),c+=v):(l=e*n(2,v-1)*n(2,s),c=0));s>=8;)f[y++]=255&l,l/=256,s-=8;for(c=c<<s|l,d+=s;d>0;)f[y++]=255&c,c/=256,d-=8;return f[--y]|=128*m,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<<o)-1,s=a>>1,u=o-7,c=i-1,l=e[c--],h=127&l;for(l>>=7;u>0;)h=256*h+e[c--],u-=8;for(r=h&(1<<-u)-1,h>>=-u,u+=t;u>0;)r=256*r+e[c--],u-=8;if(0===h)h=1-s;else{if(h===a)return r?NaN:l?-1/0:1/0;r+=n(2,t),h-=s}return(l?-1:1)*r*n(2,h-t)}}},4413:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(6648),a=Object,s=n("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?s(e,""):a(e)}:a},3457:(e,t,r)=>{"use strict";var n=r(9985),i=r(8999),o=r(9385);e.exports=function(e,t,r){var a,s;return o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(e,s),e}},6738:(e,t,r)=>{"use strict";var n=r(8844),i=r(9985),o=r(4091),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},5375:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(7248),a=r(8999),s=r(6812),u=r(2560).f,c=r(2741),l=r(6062),h=r(7049),f=r(4630),d=r(1594),p=!1,v=f("meta"),g=0,m=function(e){u(e,v,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},p=!0;var e=c.f,t=i([].splice),r={};r[v]=1,e(r).length&&(c.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(!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},618:(e,t,r)=>{"use strict";var n,i,o,a=r(9834),s=r(9037),u=r(8999),c=r(5773),l=r(6812),h=r(4091),f=r(2713),d=r(7248),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,n=function(e,t){if(m.has(e))throw new 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,n=function(e,t){if(l(e,y))throw new v(p);return t.facade=e,c(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(!u(t)||(r=i(t)).type!==e)throw new v("Incompatible receiver, "+e+" required");return r}}}},3292:(e,t,r)=>{"use strict";var n=r(4201),i=r(9478),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},2297:(e,t,r)=>{"use strict";var n=r(6648);e.exports=Array.isArray||function(e){return"Array"===n(e)}},8296:(e,t,r)=>{"use strict";var n=r(926);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},9985:(e,t,r)=>{"use strict";var n=r(2659),i=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},9429:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(9985),a=r(926),s=r(6058),u=r(6738),c=function(){},l=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.test(c),v=function(e){if(!o(e))return!1;try{return h(c,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,u(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},5266:(e,t,r)=>{"use strict";var n=r(3689),i=r(9985),o=/#|\.prototype\./,a=function(e,t){var r=u[s(e)];return r===l||r!==c&&(i(t)?n(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},1973:(e,t,r)=>{"use strict";var n=r(8999),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},981:e=>{"use strict";e.exports=function(e){return null==e}},8999:(e,t,r)=>{"use strict";var n=r(9985),i=r(2659),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)}},3931:e=>{"use strict";e.exports=!1},1245:(e,t,r)=>{"use strict";var n=r(8999),i=r(6648),o=r(4201)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},734:(e,t,r)=>{"use strict";var n=r(6058),i=r(9985),o=r(3622),a=r(9525),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,s(e))}},8734:(e,t,r)=>{"use strict";var n=r(4071),i=r(2615),o=r(5027),a=r(3691),s=r(3292),u=r(6310),c=r(3622),l=r(5185),h=r(1664),f=r(2125),d=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,E,k=r&&r.that,I=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),T=n(t,k),_=function(e){return g&&f(g,"normal",e),new p(!0,e)},A=function(e){return I?(o(e),O?T(e[0],e[1],_):T(e[0],e[1])):O?T(e,_):T(e)};if(x)g=e.iterator;else if(C)g=e;else{if(!(m=h(e)))throw new d(a(e)+" is not iterable");if(s(m)){for(y=0,b=u(e);b>y;y++)if((S=A(e[y]))&&c(v,S))return S;return new p(!1)}g=l(e,m)}for(w=x?e.next:g.next;!(E=i(w,g)).done;){try{S=A(E.value)}catch(e){f(g,"throw",e)}if("object"==typeof S&&S&&c(v,S))return S}return new p(!1)}},2125:(e,t,r)=>{"use strict";var n=r(2615),i=r(5027),o=r(4849);e.exports=function(e,t,r){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return i(a),r}},974:(e,t,r)=>{"use strict";var n=r(2013).IteratorPrototype,i=r(5391),o=r(5684),a=r(5997),s=r(9478),u=function(){return this};e.exports=function(e,t,r,c){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!c,r)}),a(e,l,!1,!0),s[l]=u,e}},1934:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(3931),a=r(1236),s=r(9985),u=r(974),c=r(1868),l=r(9385),h=r(5997),f=r(5773),d=r(1880),p=r(4201),v=r(9478),g=r(2013),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,S=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),E="keys",k="values",I="entries",x=function(){return this};e.exports=function(e,t,r,a,p,g,C){u(r,t,a);var O,T,_,A=function(e){if(e===p&&P)return P;if(!S&&e&&e in D)return D[e];switch(e){case E:case k:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},R=t+" Iterator",N=!1,D=e.prototype,L=D[w]||D["@@iterator"]||p&&D[p],P=!S&&L||A(p),M="Array"===t&&D.entries||L;if(M&&(O=c(M.call(new e)))!==Object.prototype&&O.next&&(o||c(O)===b||(l?l(O,b):s(O[w])||d(O,w,x)),h(O,R,!0,!0),o&&(v[R]=x)),m&&p===k&&L&&L.name!==k&&(!o&&y?f(D,"name",k):(N=!0,P=function(){return i(L,this)})),p)if(T={values:A(k),keys:g?P:A(E),entries:A(I)},C)for(_ in T)(S||N||!(_ in D))&&d(D,_,T[_]);else n({target:t,proto:!0,forced:S||N},T);return o&&!C||D[w]===P||d(D,w,P,{name:p}),v[t]=P,T}},2013:(e,t,r)=>{"use strict";var n,i,o,a=r(3689),s=r(9985),u=r(8999),c=r(5391),l=r(1868),h=r(1880),f=r(4201),d=r(3931),p=f("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!u(n)||a((function(){var e={};return n[p].call(e)!==e}))?n={}:d&&(n=c(n)),s(n[p])||h(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},9478:e=>{"use strict";e.exports={}},6310:(e,t,r)=>{"use strict";var n=r(3126);e.exports=function(e){return n(e.length)}},8702:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(9985),a=r(6812),s=r(7697),u=r(1236).CONFIGURABLE,c=r(6738),l=r(618),h=l.enforce,f=l.get,d=String,p=Object.defineProperty,v=n("".slice),g=n("".replace),m=n([].join),y=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),S=e.exports=function(e,t,r){"Symbol("===v(d(t),0,7)&&(t="["+g(d(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(s?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&a(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=h(e);return a(n,"source")||(n.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=S((function(){return o(this)&&f(this).source||c(this)}),"toString")},134:(e,t,r)=>{"use strict";var n=r(5680),i=Math.abs,o=2220446049250313e-31,a=1/o;e.exports=function(e,t,r,s){var u=+e,c=i(u),l=n(u);if(c<s)return l*function(e){return e+a-a}(c/s/t)*s*t;var h=(1+t/o)*c,f=h-(h-c);return f>r||f!=f?l*(1/0):l*f}},7788:(e,t,r)=>{"use strict";var n=r(134);e.exports=Math.fround||function(e){return n(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},4736:e=>{"use strict";var t=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*r}},5680:e=>{"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},8828:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},231:(e,t,r)=>{"use strict";var n,i,o,a,s,u=r(9037),c=r(4071),l=r(2474).f,h=r(9886).set,f=r(4410),d=r(4764),p=r(3221),v=r(7486),g=r(806),m=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,S=u.Promise,w=l(u,"queueMicrotask"),E=w&&w.value;if(!E){var k=new f,I=function(){var e,t;for(g&&(e=b.domain)&&e.exit();t=k.get();)try{t()}catch(e){throw k.head&&n(),e}e&&e.enter()};d||g||v||!m||!y?!p&&S&&S.resolve?((a=S.resolve(void 0)).constructor=S,s=c(a.then,a),n=function(){s(I)}):g?n=function(){b.nextTick(I)}:(h=c(h,u),n=function(){h(I)}):(i=!0,o=y.createTextNode(""),new m(I).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),E=function(e){k.head||n(),k.add(e)}}e.exports=E},8742:(e,t,r)=>{"use strict";var n=r(509),i=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new i("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},2124:(e,t,r)=>{"use strict";var n=r(1245),i=TypeError;e.exports=function(e){if(n(e))throw new i("The method doesn't accept regular expressions");return e}},4818:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),o=r(8844),a=r(4327),s=r(1435).trim,u=r(6350),c=o("".charAt),l=n.parseFloat,h=n.Symbol,f=h&&h.iterator,d=1/l(u+"-0")!=-1/0||f&&!i((function(){l(Object(f))}));e.exports=d?function(e){var t=s(a(e)),r=l(t);return 0===r&&"-"===c(t,0)?-0:r}:l},7897:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),o=r(8844),a=r(4327),s=r(1435).trim,u=r(6350),c=n.parseInt,l=n.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=o(f.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||h&&!i((function(){c(Object(h))}));e.exports=p?function(e,t){var r=s(a(e));return c(r,t>>>0||(d(f,r)?16:10))}:c},5394:(e,t,r)=>{"use strict";var n=r(7697),i=r(8844),o=r(2615),a=r(3689),s=r(300),u=r(7518),c=r(9556),l=r(690),h=r(4413),f=Object.assign,d=Object.defineProperty,p=i([].concat);e.exports=!f||a((function(){if(n&&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={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!==f({},e)[r]||s(f({},t)).join("")!==i}))?function(e,t){for(var r=l(e),i=arguments.length,a=1,f=u.f,d=c.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++],n&&!o(d,g,v)||(r[v]=g[v]);return r}:f},5391:(e,t,r)=>{"use strict";var n,i=r(5027),o=r(8920),a=r(2739),s=r(7248),u=r(2688),c=r(6420),l=r(2713),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{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m="undefined"!=typeof document?document.domain&&n?g(n):(t=c("iframe"),r="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):g(n);for(var i=a.length;i--;)delete m[h][a[i]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[h]=i(e),r=new p,p[h]=null,r[d]=e):r=m(),void 0===t?r:o.f(r,t)}},8920:(e,t,r)=>{"use strict";var n=r(7697),i=r(5648),o=r(2560),a=r(5027),s=r(5290),u=r(300);t.f=n&&!i?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),i=u(t),c=i.length,l=0;c>l;)o.f(e,r=i[l++],n[r]);return e}},2560:(e,t,r)=>{"use strict";var n=r(7697),i=r(8506),o=r(5648),a=r(5027),s=r(8360),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";t.f=n?o?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var n=l(e,t);n&&n[d]&&(e[t]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(a(e),t=s(t),a(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},2474:(e,t,r)=>{"use strict";var n=r(7697),i=r(2615),o=r(9556),a=r(5684),s=r(5290),u=r(8360),c=r(6812),l=r(8506),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=s(e),t=u(t),l)try{return h(e,t)}catch(e){}if(c(e,t))return a(!i(o.f,e,t),e[t])}},6062:(e,t,r)=>{"use strict";var n=r(6648),i=r(5290),o=r(2741).f,a=r(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===n(e)?function(e){try{return o(e)}catch(e){return a(s)}}(e):o(i(e))}},2741:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},7518:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},1868:(e,t,r)=>{"use strict";var n=r(6812),i=r(9985),o=r(690),a=r(2713),s=r(1748),u=a("IE_PROTO"),c=Object,l=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof c?l:null}},7049:(e,t,r)=>{"use strict";var n=r(3689),i=r(8999),o=r(6648),a=r(1655),s=Object.isExtensible,u=n((function(){s(1)}));e.exports=u||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!==o(e))&&(!s||s(e)))}:s},3622:(e,t,r)=>{"use strict";var n=r(8844);e.exports=n({}.isPrototypeOf)},4948:(e,t,r)=>{"use strict";var n=r(8844),i=r(6812),o=r(5290),a=r(4328).indexOf,s=r(7248),u=n([].push);e.exports=function(e,t){var r,n=o(e),c=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&u(l,r);for(;t.length>c;)i(n,r=t[c++])&&(~a(l,r)||u(l,r));return l}},300:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739);e.exports=Object.keys||function(e){return n(e,i)}},9556:(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},9385:(e,t,r)=>{"use strict";var n=r(2743),i=r(5027),o=r(3550);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 i(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},9419:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689),o=r(8844),a=r(1868),s=r(300),u=r(5290),c=o(r(9556).f),l=o([].push),h=n&&i((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),f=function(e){return function(t){for(var r,i=u(t),o=s(i),f=h&&null===a(i),d=o.length,p=0,v=[];d>p;)r=o[p++],n&&!(f?r in i:c(i,r))||l(v,e?[r,i[r]]:i[r]);return v}};e.exports={entries:f(!0),values:f(!1)}},5073:(e,t,r)=>{"use strict";var n=r(3043),i=r(926);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},5899:(e,t,r)=>{"use strict";var n=r(2615),i=r(9985),o=r(8999),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&i(r=e.toString)&&!o(s=n(r,e)))return s;if(i(r=e.valueOf)&&!o(s=n(r,e)))return s;if("string"!==t&&i(r=e.toString)&&!o(s=n(r,e)))return s;throw new a("Can't convert object to primitive value")}},9152:(e,t,r)=>{"use strict";var n=r(6058),i=r(8844),o=r(2741),a=r(7518),s=r(5027),u=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=a.f;return r?u(t,r(e)):t}},496:(e,t,r)=>{"use strict";var n=r(9037);e.exports=n},9302:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},7073:(e,t,r)=>{"use strict";var n=r(9037),i=r(7919),o=r(9985),a=r(5266),s=r(6738),u=r(4201),c=r(2532),l=r(8563),h=r(3931),f=r(3615),d=i&&i.prototype,p=u("species"),v=!1,g=o(n.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 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&&(c||l)&&!g}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:v}},7919:(e,t,r)=>{"use strict";var n=r(9037);e.exports=n.Promise},2945:(e,t,r)=>{"use strict";var n=r(5027),i=r(8999),o=r(8742);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}},562:(e,t,r)=>{"use strict";var n=r(7919),i=r(6431),o=r(7073).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},4410:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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},6100:(e,t,r)=>{"use strict";var n=r(2615),i=r(5027),o=r(9985),a=r(6648),s=r(6308),u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var c=n(r,e,t);return null!==c&&i(c),c}if("RegExp"===a(e))return n(s,e,t);throw new u("RegExp#exec called on incompatible receiver")}},6308:(e,t,r)=>{"use strict";var n,i,o=r(2615),a=r(8844),s=r(4327),u=r(9633),c=r(7901),l=r(3430),h=r(5391),f=r(618).get,d=r(2100),p=r(6422),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,n=/a/,"a"),o(g,i,"a"),0!==n.lastIndex||0!==i.lastIndex),k=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(E||I||k||d||p)&&(m=function(e){var t,r,n,i,a,c,l,d=this,p=f(d),x=s(e),C=p.raw;if(C)return C.lastIndex=d.lastIndex,t=o(m,C,x),d.lastIndex=C.lastIndex,t;var O=p.groups,T=k&&d.sticky,_=o(u,d),A=d.source,R=0,N=x;if(T&&(_=S(_,"y",""),-1===b(_,"g")&&(_+="g"),N=w(x,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(x,d.lastIndex-1))&&(A="(?: "+A+")",N=" "+N,R++),r=new RegExp("^(?:"+A+")",_)),I&&(r=new RegExp("^"+A+"$(?!\\s)",_)),E&&(n=d.lastIndex),i=o(g,T?r:d,N),T?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:n),I&&i&&i.length>1&&o(v,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&O)for(i.groups=c=h(null),a=0;a<O.length;a++)c[(l=O[a])[0]]=i[l[1]];return i}),e.exports=m},9633:(e,t,r)=>{"use strict";var n=r(5027);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}},3477:(e,t,r)=>{"use strict";var n=r(2615),i=r(6812),o=r(3622),a=r(9633),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:n(a,e)}},7901:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),a=o||n((function(){return!i("a","y").sticky})),s=o||n((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}},2100:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},6422:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4684:(e,t,r)=>{"use strict";var n=r(981),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},8552:(e,t,r)=>{"use strict";var n,i=r(9037),o=r(1735),a=r(9985),s=r(3127),u=r(71),c=r(6004),l=r(1500),h=i.Function,f=/MSIE .\./.test(u)||s&&((n=i.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 f?function(n,i){var s=l(arguments.length,1)>r,u=a(n)?n:h(n),f=s?c(arguments,r):[],d=s?function(){o(u,this,f)}:u;return t?e(d,i):e(d)}:e}},4241:(e,t,r)=>{"use strict";var n=r(6058),i=r(2148),o=r(4201),a=r(7697),s=o("species");e.exports=function(e){var t=n(e);a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},5997:(e,t,r)=>{"use strict";var n=r(2560).f,i=r(6812),o=r(4201)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},2713:(e,t,r)=>{"use strict";var n=r(3430),i=r(4630),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},4091:(e,t,r)=>{"use strict";var n=r(9037),i=r(5014),o="__core-js_shared__",a=n[o]||i(o,{});e.exports=a},3430:(e,t,r)=>{"use strict";var n=r(3931),i=r(4091);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.3",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:(e,t,r)=>{"use strict";var n=r(5027),i=r(2655),o=r(981),a=r(4201)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||o(r=n(s)[a])?t:i(r)}},4580:(e,t,r)=>{"use strict";var n=r(3689);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},730:(e,t,r)=>{"use strict";var n=r(8844),i=r(8700),o=r(4327),a=r(4684),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,r){var n,l,h=o(a(t)),f=i(r),d=h.length;return f<0||f>=d?e?"":void 0:(n=u(h,f))<55296||n>56319||f+1===d||(l=u(h,f+1))<56320||l>57343?e?s(h,f):n:e?c(h,f,f+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},534:(e,t,r)=>{"use strict";var n=r(8700),i=r(4327),o=r(4684),a=RangeError;e.exports=function(e){var t=i(o(this)),r="",s=n(e);if(s<0||s===1/0)throw new a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(r+=t);return r}},5984:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(3689),o=r(6350);e.exports=function(e){return i((function(){return!!o[e]()||"​…᠎"!=="​…᠎"[e]()||n&&o[e].name!==e}))}},1435:(e,t,r)=>{"use strict";var n=r(8844),i=r(4684),o=r(4327),a=r(6350),s=n("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var r=o(i(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,c,"$1")),r}};e.exports={start:l(1),end:l(2),trim:l(3)}},146:(e,t,r)=>{"use strict";var n=r(3615),i=r(3689),o=r(9037).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3032:(e,t,r)=>{"use strict";var n=r(2615),i=r(6058),o=r(4201),a=r(1880);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return n(r,this)}),{arity:1})}},6549:(e,t,r)=>{"use strict";var n=r(146);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},9886:(e,t,r)=>{"use strict";var n,i,o,a,s=r(9037),u=r(1735),c=r(4071),l=r(9985),h=r(6812),f=r(3689),d=r(2688),p=r(6004),v=r(6420),g=r(1500),m=r(4764),y=r(806),b=s.setImmediate,S=s.clearImmediate,w=s.process,E=s.Dispatch,k=s.Function,I=s.MessageChannel,x=s.String,C=0,O={},T="onreadystatechange";f((function(){n=s.location}));var _=function(e){if(h(O,e)){var t=O[e];delete O[e],t()}},A=function(e){return function(){_(e)}},R=function(e){_(e.data)},N=function(e){s.postMessage(x(e),n.protocol+"//"+n.host)};b&&S||(b=function(e){g(arguments.length,1);var t=l(e)?e:k(e),r=p(arguments,1);return O[++C]=function(){u(t,void 0,r)},i(C),C},S=function(e){delete O[e]},y?i=function(e){w.nextTick(A(e))}:E&&E.now?i=function(e){E.now(A(e))}:I&&!m?(a=(o=new I).port2,o.port1.onmessage=R,i=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(N)?(i=N,s.addEventListener("message",R,!1)):i=T in v("script")?function(e){d.appendChild(v("script"))[T]=function(){d.removeChild(this),_(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:b,clear:S}},3648:(e,t,r)=>{"use strict";var n=r(8844);e.exports=n(1..valueOf)},7578:(e,t,r)=>{"use strict";var n=r(8700),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)}},1530:(e,t,r)=>{"use strict";var n=r(8732),i=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}},9842:(e,t,r)=>{"use strict";var n=r(8700),i=r(3126),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=i(t);if(t!==r)throw new o("Wrong length or index");return r}},5290:(e,t,r)=>{"use strict";var n=r(4413),i=r(4684);e.exports=function(e){return n(i(e))}},8700:(e,t,r)=>{"use strict";var n=r(8828);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3126:(e,t,r)=>{"use strict";var n=r(8700),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},690:(e,t,r)=>{"use strict";var n=r(4684),i=Object;e.exports=function(e){return i(n(e))}},3250:(e,t,r)=>{"use strict";var n=r(5904),i=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw new i("Wrong offset");return r}},5904:(e,t,r)=>{"use strict";var n=r(8700),i=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw new i("The argument can't be less than 0");return t}},8732:(e,t,r)=>{"use strict";var n=r(2615),i=r(8999),o=r(734),a=r(4849),s=r(5899),u=r(4201),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,u=a(e,l);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},8360:(e,t,r)=>{"use strict";var n=r(8732),i=r(734);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},3043:(e,t,r)=>{"use strict";var n={};n[r(4201)("toStringTag")]="z",e.exports="[object z]"===String(n)},4327:(e,t,r)=>{"use strict";var n=r(926),i=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},7191:e=>{"use strict";var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:255&r}},3691:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},1158:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(2615),a=r(7697),s=r(9800),u=r(4872),c=r(3999),l=r(767),h=r(5684),f=r(5773),d=r(1973),p=r(3126),v=r(9842),g=r(3250),m=r(7191),y=r(8360),b=r(6812),S=r(926),w=r(8999),E=r(734),k=r(5391),I=r(3622),x=r(9385),C=r(2741).f,O=r(1304),T=r(2960).forEach,_=r(4241),A=r(2148),R=r(2560),N=r(2474),D=r(618),L=r(3457),P=D.get,M=D.set,U=D.enforce,j=R.f,B=N.f,F=i.RangeError,G=c.ArrayBuffer,K=G.prototype,V=c.DataView,H=u.NATIVE_ARRAY_BUFFER_VIEWS,z=u.TYPED_ARRAY_TAG,Y=u.TypedArray,W=u.TypedArrayPrototype,X=u.aTypedArrayConstructor,q=u.isTypedArray,$="BYTES_PER_ELEMENT",Z="Wrong length",J=function(e,t){X(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},Q=function(e,t){A(e,t,{configurable:!0,get:function(){return P(this)[t]}})},ee=function(e){var t;return I(K,e)||"ArrayBuffer"===(t=S(e))||"SharedArrayBuffer"===t},te=function(e,t){return q(e)&&!E(t)&&t in e&&d(+t)&&t>=0},re=function(e,t){return t=y(t),te(e,t)?h(2,e[t]):B(e,t)},ne=function(e,t,r){return t=y(t),!(te(e,t)&&w(r)&&b(r,"value"))||b(r,"get")||b(r,"set")||r.configurable||b(r,"writable")&&!r.writable||b(r,"enumerable")&&!r.enumerable?j(e,t,r):(e[t]=r.value,e)};a?(H||(N.f=re,R.f=ne,Q(W,"buffer"),Q(W,"byteOffset"),Q(W,"byteLength"),Q(W,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:re,defineProperty:ne}),e.exports=function(e,t,r){var a=e.match(/\d+/)[0]/8,u=e+(r?"Clamped":"")+"Array",c="get"+e,h="set"+e,d=i[u],y=d,b=y&&y.prototype,S={},E=function(e,t){j(e,t,{get:function(){return function(e,t){var r=P(e);return r.view[c](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=P(e);i.view[h](t*a+i.byteOffset,r?m(n):n,!0)}(this,t,e)},enumerable:!0})};H?s&&(y=t((function(e,t,r,n){return l(e,b),L(w(t)?ee(t)?void 0!==n?new d(t,g(r,a),n):void 0!==r?new d(t,g(r,a)):new d(t):q(t)?J(y,t):o(O,y,t):new d(v(t)),e,y)})),x&&x(y,Y),T(C(d),(function(e){e in y||f(y,e,d[e])})),y.prototype=b):(y=t((function(e,t,r,n){l(e,b);var i,s,u,c=0,h=0;if(w(t)){if(!ee(t))return q(t)?J(y,t):o(O,y,t);i=t,h=g(r,a);var f=t.byteLength;if(void 0===n){if(f%a)throw new F(Z);if((s=f-h)<0)throw new F(Z)}else if((s=p(n)*a)+h>f)throw new F(Z);u=s/a}else u=v(t),i=new G(s=u*a);for(M(e,{buffer:i,byteOffset:h,byteLength:s,length:u,view:new V(i)});c<u;)E(e,c++)})),x&&x(y,Y),b=y.prototype=k(W)),b.constructor!==y&&f(b,"constructor",y),U(b).TypedArrayConstructor=y,z&&f(b,z,u);var I=y!==d;S[u]=y,n({global:!0,constructor:!0,forced:I,sham:!H},S),$ in y||f(y,$,a),$ in b||f(b,$,a),_(u)}):e.exports=function(){}},9800:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),o=r(6431),a=r(4872).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,u=n.Int8Array;e.exports=!a||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},716:(e,t,r)=>{"use strict";var n=r(9976),i=r(7338);e.exports=function(e,t){return n(i(e),t)}},1304:(e,t,r)=>{"use strict";var n=r(4071),i=r(2615),o=r(2655),a=r(690),s=r(6310),u=r(5185),c=r(1664),l=r(3292),h=r(8296),f=r(4872).aTypedArrayConstructor,d=r(1530);e.exports=function(e){var t,r,p,v,g,m,y,b,S=o(this),w=a(e),E=arguments.length,k=E>1?arguments[1]:void 0,I=void 0!==k,x=c(w);if(x&&!l(x))for(b=(y=u(w,x)).next,w=[];!(m=i(b,y)).done;)w.push(m.value);for(I&&E>2&&(k=n(k,arguments[2])),r=s(w),p=new(f(S))(r),v=h(p),t=0;r>t;t++)g=I?k(w[t],t):w[t],p[t]=v?d(g):+g;return p}},7338:(e,t,r)=>{"use strict";var n=r(4872),i=r(6373),o=n.aTypedArrayConstructor,a=n.getTypedArrayConstructor;e.exports=function(e){return o(i(e,a(e)))}},4630:(e,t,r)=>{"use strict";var n=r(8844),i=0,o=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},6837:(e,t,r)=>{"use strict";var n=r(3689),i=r(4201),o=r(7697),a=r(3931),s=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),a&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(a||!o)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},9525:(e,t,r)=>{"use strict";var n=r(146);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689);e.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:e=>{"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}},9834:(e,t,r)=>{"use strict";var n=r(9037),i=r(9985),o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},5405:(e,t,r)=>{"use strict";var n=r(496),i=r(6812),o=r(6145),a=r(2560).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},6145:(e,t,r)=>{"use strict";var n=r(4201);t.f=n},4201:(e,t,r)=>{"use strict";var n=r(9037),i=r(3430),o=r(6812),a=r(4630),s=r(146),u=r(9525),c=n.Symbol,l=i("wks"),h=u?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return o(l,e)||(l[e]=s&&o(c,e)?c[e]:h("Symbol."+e)),l[e]}},6350:e=>{"use strict";e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},9211:(e,t,r)=>{"use strict";var n=r(9989),i=r(6576),o=r(3689),a=r(3999),s=r(5027),u=r(7578),c=r(3126),l=r(6373),h=a.ArrayBuffer,f=a.DataView,d=f.prototype,p=i(h.prototype.slice),v=i(d.getUint8),g=i(d.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(s(this),e);for(var r=s(this).byteLength,n=u(e,r),i=u(void 0===t?r:t,r),o=new(l(this,h))(c(i-n)),a=new f(this),d=new f(o),m=0;n<i;)g(d,m++,v(a,n++));return o}})},4338:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),o=r(2297),a=r(8999),s=r(690),u=r(6310),c=r(5565),l=r(6522),h=r(7120),f=r(9042),d=r(4201),p=r(3615),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)};n({target:"Array",proto:!0,arity:1,forced:!g||!f("concat")},{concat:function(e){var t,r,n,i,o,a=s(this),f=h(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(m(o=-1===t?a:arguments[t]))for(i=u(o),c(d+i),r=0;r<i;r++,d++)r in o&&l(f,d,o[r]);else c(d+1),l(f,d++,o);return f.length=d,f}})},8077:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).filter;n({target:"Array",proto:!0,forced:!r(9042)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},9772:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).findIndex,o=r(7370),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},5728:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).find,o=r(7370),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9693:(e,t,r)=>{"use strict";var n=r(9989),i=r(7612);n({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},7722:(e,t,r)=>{"use strict";var n=r(9989),i=r(1055);n({target:"Array",stat:!0,forced:!r(6431)((function(e){Array.from(e)}))},{from:i})},6801:(e,t,r)=>{"use strict";var n=r(9989),i=r(4328).includes,o=r(3689),a=r(7370);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)}}),a("includes")},7195:(e,t,r)=>{"use strict";var n=r(9989),i=r(6576),o=r(4328).indexOf,a=r(6834),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({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)}})},4253:(e,t,r)=>{"use strict";r(9989)({target:"Array",stat:!0},{isArray:r(2297)})},752:(e,t,r)=>{"use strict";var n=r(5290),i=r(7370),o=r(9478),a=r(618),s=r(2560).f,u=r(1934),c=r(7807),l=r(3931),h=r(7697),f="Array Iterator",d=a.set,p=a.getterFor(f);e.exports=u(Array,"Array",(function(e,t){d(this,{type:f,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([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){}},886:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).map;n({target:"Array",proto:!0,forced:!r(9042)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},278:(e,t,r)=>{"use strict";var n=r(9989),i=r(8820).left,o=r(6834),a=r(3615);n({target:"Array",proto:!0,forced:!r(806)&&a>79&&a<83||!o("reduce")},{reduce:function(e){var t=arguments.length;return i(this,e,t,t>1?arguments[1]:void 0)}})},9730:(e,t,r)=>{"use strict";var n=r(9989),i=r(2297),o=r(9429),a=r(8999),s=r(7578),u=r(6310),c=r(5290),l=r(6522),h=r(4201),f=r(9042),d=r(6004),p=f("slice"),v=h("species"),g=Array,m=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var r,n,h,f=c(this),p=u(f),y=s(e,p),b=s(void 0===t?p:t,p);if(i(f)&&(r=f.constructor,(o(r)&&(r===g||i(r.prototype))||a(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return d(f,y,b);for(n=new(void 0===r?g:r)(m(b-y,0)),h=0;y<b;y++,h++)y in f&&l(n,h,f[y]);return n.length=h,n}})},7550:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).some;n({target:"Array",proto:!0,forced:!r(6834)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5137:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(509),a=r(690),s=r(6310),u=r(8494),c=r(4327),l=r(3689),h=r(382),f=r(6834),d=r(7365),p=r(7298),v=r(3615),g=r(7922),m=[],y=i(m.sort),b=i(m.push),S=l((function(){m.sort(void 0)})),w=l((function(){m.sort(null)})),E=f("sort"),k=!l((function(){if(v)return v<70;if(!(d&&d>3)){if(p)return!0;if(g)return g<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)m.push({k:t+n,v:r})}for(m.sort((function(e,t){return t.v-e.v})),n=0;n<m.length;n++)t=m[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:S||!w||!E||!k},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(k)return void 0===e?y(t):y(t,e);var r,n,i=[],l=s(t);for(n=0;n<l;n++)n in t&&b(i,t[n]);for(h(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:c(t)>c(r)?1:-1}}(e)),r=s(i),n=0;n<r;)t[n]=i[n++];for(;n<l;)u(t,n++);return t}})},2506:(e,t,r)=>{"use strict";var n=r(9989),i=r(690),o=r(7578),a=r(8700),s=r(6310),u=r(5649),c=r(5565),l=r(7120),h=r(6522),f=r(8494),d=r(9042)("splice"),p=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var r,n,d,g,m,y,b=i(this),S=s(b),w=o(e,S),E=arguments.length;for(0===E?r=n=0:1===E?(r=0,n=S-w):(r=E-2,n=v(p(a(t),0),S-w)),c(S+r-n),d=l(b,n),g=0;g<n;g++)(m=w+g)in b&&h(d,g,b[m]);if(d.length=n,r<n){for(g=w;g<S-n;g++)y=g+r,(m=g+n)in b?b[y]=b[m]:f(b,y);for(g=S;g>S-n+r;g--)f(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]:f(b,y);for(g=0;g<r;g++)b[g+w]=arguments[g+2];return u(b,S-n+r),d}})},2227:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=Date,a=i(o.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new o)}})},24:(e,t,r)=>{"use strict";var n=r(8844),i=r(1880),o=Date.prototype,a="Invalid Date",s="toString",u=n(o[s]),c=n(o.getTime);String(new Date(NaN))!==a&&i(o,s,(function(){var e=c(this);return e==e?u(this):a}))},1517:(e,t,r)=>{"use strict";var n=r(9989),i=r(6761);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},4284:(e,t,r)=>{"use strict";var n=r(7697),i=r(1236).EXISTS,o=r(8844),a=r(2148),s=Function.prototype,u=o(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(c.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},5398:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},8324:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(1735),a=r(2615),s=r(8844),u=r(3689),c=r(9985),l=r(734),h=r(6004),f=r(2643),d=r(146),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]$/,k=/^[\uDC00-\uDFFF]$/,I=!d||u((function(){var e=i("Symbol")("stringify detection");return"[null]"!==v([e])||"{}"!==v({a:e})||"{}"!==v(Object(e))})),x=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),C=function(e,t){var r=h(arguments),n=f(t);if(c(n)||void 0!==e&&!l(e))return r[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},o(v,null,r)},O=function(e,t,r){var n=m(r,t-1),i=m(r,t+1);return g(E,e)&&!g(k,i)||g(k,e)&&!g(E,n)?"\\u"+S(y(e,0),16):e};v&&n({target:"JSON",stat:!0,arity:3,forced:I||x},{stringify:function(e,t,r){var n=h(arguments),i=o(I?C:v,null,n);return x&&"string"==typeof i?b(i,w,O):i}})},9322:(e,t,r)=>{"use strict";r(319)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(800))},6646:(e,t,r)=>{"use strict";r(9322)},5239:(e,t,r)=>{"use strict";r(9989)({target:"Math",stat:!0},{log10:r(4736)})},1416:(e,t,r)=>{"use strict";r(9989)({target:"Math",stat:!0},{trunc:r(8828)})},9288:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),o=r(7697),a=r(9037),s=r(496),u=r(8844),c=r(5266),l=r(6812),h=r(3457),f=r(3622),d=r(734),p=r(8732),v=r(3689),g=r(2741).f,m=r(2474).f,y=r(2560).f,b=r(3648),S=r(1435).trim,w="Number",E=a[w],k=s[w],I=E.prototype,x=a.TypeError,C=u("".slice),O=u("".charCodeAt),T=function(e){var t,r,n,i,o,a,s,u,c=p(e,"number");if(d(c))throw new x("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=S(c),43===(t=O(c,0))||45===t){if(88===(r=O(c,2))||120===r)return NaN}else if(48===t){switch(O(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(a=(o=C(c,2)).length,s=0;s<a;s++)if((u=O(o,s))<48||u>i)return NaN;return parseInt(o,n)}return+c},_=c(w,!E(" 0o1")||!E("0b1")||E("+0x1")),A=function(e){var t,r=arguments.length<1?0:E(function(e){var t=p(e,"number");return"bigint"==typeof t?t:T(t)}(e));return f(I,t=this)&&v((function(){b(t)}))?h(Object(r),this,A):r};A.prototype=I,_&&!i&&(I.constructor=A),n({global:!0,constructor:!0,wrap:!0,forced:_},{Number:A});var R=function(e,t){for(var r,n=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;n.length>i;i++)l(t,r=n[i])&&!l(e,r)&&y(e,r,m(t,r))};i&&k&&R(s[w],k),(_||i)&&R(s[w],E)},7389:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(8700),a=r(3648),s=r(534),u=r(3689),c=RangeError,l=String,h=Math.floor,f=i(s),d=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+f("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!u((function(){p({})}))},{toFixed:function(e){var t,r,n,i,s=a(this),u=o(e),h=[0,0,0,0,0,0],p="",b="0";if(u<0||u>20)throw new c("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(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*v(2,69,1))-69)<0?s*v(2,-t,1):s/v(2,t,1),r*=4503599627370496,(t=52-t)>0){for(g(h,0,r),n=u;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)+f("0",u);return b=u>0?p+((i=b.length)<=u?"0."+f("0",u-i)+b:d(b,0,i-u)+"."+d(b,i-u)):p+b}})},429:(e,t,r)=>{"use strict";var n=r(9989),i=r(5394);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9434:(e,t,r)=>{"use strict";var n=r(9989),i=r(146),o=r(3689),a=r(7518),s=r(690);n({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},9358:(e,t,r)=>{"use strict";var n=r(9989),i=r(690),o=r(300);n({target:"Object",stat:!0,forced:r(3689)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},228:(e,t,r)=>{"use strict";var n=r(3043),i=r(1880),o=r(5073);n||i(Object.prototype,"toString",o,{unsafe:!0})},6466:(e,t,r)=>{"use strict";var n=r(9989),i=r(9419).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},939:(e,t,r)=>{"use strict";var n=r(9989),i=r(4818);n({global:!0,forced:parseFloat!==i},{parseFloat:i})},2320:(e,t,r)=>{"use strict";var n=r(9989),i=r(7897);n({global:!0,forced:parseInt!==i},{parseInt:i})},1692:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(509),a=r(8742),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{all:function(e){var t=this,r=a.f(t),n=r.resolve,c=r.reject,l=s((function(){var r=o(t.resolve),a=[],s=0,l=1;u(e,(function(e){var o=s++,u=!1;l++,i(r,t,e).then((function(e){u||(u=!0,a[o]=e,--l||n(a))}),c)})),--l||n(a)}));return l.error&&c(l.value),r.promise}})},5089:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),o=r(7073).CONSTRUCTOR,a=r(7919),s=r(6058),u=r(9985),c=r(1880),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&u(a)){var h=s("Promise").prototype.catch;l.catch!==h&&c(l,"catch",h,{unsafe:!0})}},6697:(e,t,r)=>{"use strict";var n,i,o,a=r(9989),s=r(3931),u=r(806),c=r(9037),l=r(2615),h=r(1880),f=r(9385),d=r(5997),p=r(4241),v=r(509),g=r(9985),m=r(8999),y=r(767),b=r(6373),S=r(9886).set,w=r(231),E=r(920),k=r(9302),I=r(4410),x=r(618),C=r(7919),O=r(7073),T=r(8742),_="Promise",A=O.CONSTRUCTOR,R=O.REJECTION_EVENT,N=O.SUBCLASSING,D=x.getterFor(_),L=x.set,P=C&&C.prototype,M=C,U=P,j=c.TypeError,B=c.document,F=c.process,G=T.f,K=G,V=!!(B&&B.createEvent&&c.dispatchEvent),H="unhandledrejection",z=function(e){var t;return!(!m(e)||!g(t=e.then))&&t},Y=function(e,t){var r,n,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,h=e.domain;try{s?(a||(2===t.rejection&&Z(t),t.rejection=1),!0===s?r=o:(h&&h.enter(),r=s(o),h&&(h.exit(),i=!0)),r===e.promise?c(new j("Promise-chain cycle")):(n=z(r))?l(n,r,u,c):u(r)):c(o)}catch(e){h&&!i&&h.exit(),c(e)}},W=function(e,t){e.notified||(e.notified=!0,w((function(){for(var r,n=e.reactions;r=n.get();)Y(r,e);e.notified=!1,t&&!e.rejection&&q(e)})))},X=function(e,t,r){var n,i;V?((n=B.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!R&&(i=c["on"+e])?i(n):e===H&&E("Unhandled promise rejection",r)},q=function(e){l(S,c,(function(){var t,r=e.facade,n=e.value;if($(e)&&(t=k((function(){u?F.emit("unhandledRejection",n,r):X(H,r,n)})),e.rejection=u||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){l(S,c,(function(){var t=e.facade;u?F.emit("rejectionHandled",t):X("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,W(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new j("Promise can't be resolved itself");var n=z(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,W(e,!1))}catch(t){Q({done:!1},t,e)}}};if(A&&(U=(M=function(e){y(this,U),v(e),l(n,this);var t=D(this);try{e(J(ee,t),J(Q,t))}catch(e){Q(t,e)}}).prototype,(n=function(e){L(this,{type:_,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=h(U,"then",(function(e,t){var r=D(this),n=G(b(this,M));return r.parent=!0,n.ok=!g(e)||e,n.fail=g(t)&&t,n.domain=u?F.domain:void 0,0===r.state?r.reactions.add(n):w((function(){Y(n,r)})),n.promise})),i=function(){var e=new n,t=D(e);this.promise=e,this.resolve=J(ee,t),this.reject=J(Q,t)},T.f=G=function(e){return e===M||undefined===e?new i(e):K(e)},!s&&g(C)&&P!==Object.prototype)){o=P.then,N||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){}f&&f(P,U)}a({global:!0,constructor:!0,wrap:!0,forced:A},{Promise:M}),d(M,_,!1,!0),p(_)},6409:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),o=r(7919),a=r(3689),s=r(6058),u=r(9985),c=r(6373),l=r(2945),h=r(1880),f=o&&o.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),r=u(e);return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),!i&&u(o)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},3964:(e,t,r)=>{"use strict";r(6697),r(1692),r(5089),r(8829),r(2092),r(7905)},8829:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(509),a=r(8742),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{race:function(e){var t=this,r=a.f(t),n=r.reject,c=s((function(){var a=o(t.resolve);u(e,(function(e){i(a,t,e).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},2092:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(8742);n({target:"Promise",stat:!0,forced:r(7073).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return i(t.reject,void 0,e),t.promise}})},7905:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(3931),a=r(7919),s=r(7073).CONSTRUCTOR,u=r(2945),c=i("Promise"),l=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return u(l&&this===c?a:this,e)}})},50:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(1735),a=r(6761),s=r(2655),u=r(5027),c=r(8999),l=r(5391),h=r(3689),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;n({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(e,t){s(e),u(t);var r=arguments.length<3?e:s(arguments[2]);if(g&&!v)return f(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(a,e,n))}var i=r.prototype,h=l(c(i)?i:d),m=o(e,h,t);return c(m)?m:h}})},4043:(e,t,r)=>{"use strict";var n=r(9989),i=r(6308);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2826:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(1880),o=r(5027),a=r(4327),s=r(3689),u=r(3477),c="toString",l=RegExp.prototype[c],h=s((function(){return"/a/b"!==l.call({source:"a",flags:"b"})})),f=n&&l.name!==c;(h||f)&&i(RegExp.prototype,c,(function(){var e=o(this);return"/"+a(e.source)+"/"+a(u(e))}),{unsafe:!0})},7985:(e,t,r)=>{"use strict";r(319)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(800))},9649:(e,t,r)=>{"use strict";r(7985)},3843:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(2124),a=r(4684),s=r(4327),u=r(7413),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},1694:(e,t,r)=>{"use strict";var n=r(730).charAt,i=r(4327),o=r(618),a=r(1934),s=r(7807),u="String Iterator",c=o.set,l=o.getterFor(u);a(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function(){var e,t=l(this),r=t.string,i=t.index;return i>=r.length?s(void 0,!0):(e=n(r,i),t.index+=e.length,s(e,!1))}))},7960:(e,t,r)=>{"use strict";var n=r(9989),i=r(1568);n({target:"String",proto:!0,forced:r(4580)("link")},{link:function(e){return i(this,"a","href",e)}})},2462:(e,t,r)=>{"use strict";var n=r(2615),i=r(8678),o=r(5027),a=r(981),s=r(3126),u=r(4327),c=r(4684),l=r(4849),h=r(1514),f=r(6100);i("match",(function(e,t,r){return[function(t){var r=c(this),i=a(t)?void 0:l(t,e);return i?n(i,t,r):new RegExp(t)[e](u(r))},function(e){var n=o(this),i=u(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var l,d=[],p=0;null!==(l=f(n,i));){var v=u(l[0]);d[p]=v,""===v&&(n.lastIndex=h(i,s(n.lastIndex),c)),p++}return 0===p?null:d}]}))},7267:(e,t,r)=>{"use strict";var n=r(1735),i=r(2615),o=r(8844),a=r(8678),s=r(3689),u=r(5027),c=r(9985),l=r(981),h=r(8700),f=r(3126),d=r(4327),p=r(4684),v=r(1514),g=r(4849),m=r(7017),y=r(6100),b=r(4201)("replace"),S=Math.max,w=Math.min,E=o([].concat),k=o([].push),I=o("".indexOf),x=o("".slice),C="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(e,t,r){var o=O?"$":"$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,d(n),e,r)},function(e,i){var a=u(this),s=d(e);if("string"==typeof i&&-1===I(i,o)&&-1===I(i,"$<")){var l=r(t,a,s,i);if(l.done)return l.value}var p=c(i);p||(i=d(i));var g,b=a.global;b&&(g=a.unicode,a.lastIndex=0);for(var C,O=[];null!==(C=y(a,s))&&(k(O,C),b);){""===d(C[0])&&(a.lastIndex=v(s,f(a.lastIndex),g))}for(var T,_="",A=0,R=0;R<O.length;R++){for(var N,D=d((C=O[R])[0]),L=S(w(h(C.index),s.length),0),P=[],M=1;M<C.length;M++)k(P,void 0===(T=C[M])?T:String(T));var U=C.groups;if(p){var j=E([D],P,L,s);void 0!==U&&k(j,U),N=d(n(i,void 0,j))}else N=m(D,s,L,P,U,i);L>=A&&(_+=x(s,A,L)+N,A=L+D.length)}return _+x(s,A)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!C||O)},9873:(e,t,r)=>{"use strict";var n=r(1735),i=r(2615),o=r(8844),a=r(8678),s=r(5027),u=r(981),c=r(1245),l=r(4684),h=r(6373),f=r(1514),d=r(3126),p=r(4327),v=r(4849),g=r(9015),m=r(6100),y=r(6308),b=r(7901),S=r(3689),w=b.UNSUPPORTED_Y,E=4294967295,k=Math.min,I=[].push,x=o(/./.exec),C=o(I),O=o("".slice);a("split",(function(e,t,r){var o;return o="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var o=p(l(this)),a=void 0===r?E:r>>>0;if(0===a)return[];if(void 0===e)return[o];if(!c(e))return i(t,o,e,a);for(var s,u,h,f=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,m=new RegExp(e.source,d+"g");(s=i(y,m,o))&&!((u=m.lastIndex)>v&&(C(f,O(o,v,s.index)),s.length>1&&s.index<o.length&&n(I,f,g(s,1)),h=s[0].length,v=u,f.length>=a));)m.lastIndex===s.index&&m.lastIndex++;return v===o.length?!h&&x(m,"")||C(f,""):C(f,O(o,v)),f.length>a?g(f,0,a):f}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:i(t,this,e,r)}:t,[function(t,r){var n=l(this),a=u(t)?void 0:v(t,e);return a?i(a,t,n,r):i(o,p(n),t,r)},function(e,n){var i=s(this),a=p(e),u=r(o,i,a,n,o!==t);if(u.done)return u.value;var c=h(i,RegExp),l=i.unicode,v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(w?"g":"y"),g=new c(w?"^(?:"+i.source+")":i,v),y=void 0===n?E:n>>>0;if(0===y)return[];if(0===a.length)return null===m(g,a)?[a]:[];for(var b=0,S=0,I=[];S<a.length;){g.lastIndex=w?0:S;var x,T=m(g,w?O(a,S):a);if(null===T||(x=k(d(g.lastIndex+(w?S:0)),a.length))===b)S=f(a,S,l);else{if(C(I,O(a,b,S)),I.length===y)return I;for(var _=1;_<=T.length-1;_++)if(C(I,T[_]),I.length===y)return I;S=b=x}}return C(I,O(a,b)),I}]}),!!S((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),w)},8436:(e,t,r)=>{"use strict";var n=r(9989),i=r(1435).trim;n({target:"String",proto:!0,forced:r(5984)("trim")},{trim:function(){return i(this)}})},7855:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(2615),a=r(8844),s=r(3931),u=r(7697),c=r(146),l=r(3689),h=r(6812),f=r(3622),d=r(5027),p=r(5290),v=r(8360),g=r(4327),m=r(5684),y=r(5391),b=r(300),S=r(2741),w=r(6062),E=r(7518),k=r(2474),I=r(2560),x=r(8920),C=r(9556),O=r(1880),T=r(2148),_=r(3430),A=r(2713),R=r(7248),N=r(4630),D=r(4201),L=r(6145),P=r(5405),M=r(3032),U=r(5997),j=r(618),B=r(2960).forEach,F=A("hidden"),G="Symbol",K="prototype",V=j.set,H=j.getterFor(G),z=Object[K],Y=i.Symbol,W=Y&&Y[K],X=i.RangeError,q=i.TypeError,$=i.QObject,Z=k.f,J=I.f,Q=w.f,ee=C.f,te=a([].push),re=_("symbols"),ne=_("op-symbols"),ie=_("wks"),oe=!$||!$[K]||!$[K].findChild,ae=function(e,t,r){var n=Z(z,t);n&&delete z[t],J(e,t,r),n&&e!==z&&J(z,t,n)},se=u&&l((function(){return 7!==y(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?ae:J,ue=function(e,t){var r=re[e]=y(W);return V(r,{type:G,tag:e,description:t}),u||(r.description=t),r},ce=function(e,t,r){e===z&&ce(ne,t,r),d(e);var n=v(t);return d(r),h(re,n)?(r.enumerable?(h(e,F)&&e[F][n]&&(e[F][n]=!1),r=y(r,{enumerable:m(0,!1)})):(h(e,F)||J(e,F,m(1,{})),e[F][n]=!0),se(e,n,r)):J(e,n,r)},le=function(e,t){d(e);var r=p(t),n=b(r).concat(pe(r));return B(n,(function(t){u&&!o(he,r,t)||ce(e,t,r[t])})),e},he=function(e){var t=v(e),r=o(ee,this,t);return!(this===z&&h(re,t)&&!h(ne,t))&&(!(r||!h(this,t)||!h(re,t)||h(this,F)&&this[F][t])||r)},fe=function(e,t){var r=p(e),n=v(t);if(r!==z||!h(re,n)||h(ne,n)){var i=Z(r,n);return!i||!h(re,n)||h(r,F)&&r[F][n]||(i.enumerable=!0),i}},de=function(e){var t=Q(p(e)),r=[];return B(t,(function(e){h(re,e)||h(R,e)||te(r,e)})),r},pe=function(e){var t=e===z,r=Q(t?ne:p(e)),n=[];return B(r,(function(e){!h(re,e)||t&&!h(z,e)||te(n,re[e])})),n};c||(O(W=(Y=function(){if(f(W,this))throw new q("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=N(e),r=function(e){var n=void 0===this?i:this;n===z&&o(r,ne,e),h(n,F)&&h(n[F],t)&&(n[F][t]=!1);var a=m(1,e);try{se(n,t,a)}catch(e){if(!(e instanceof X))throw e;ae(n,t,a)}};return u&&oe&&se(z,t,{configurable:!0,set:r}),ue(t,e)})[K],"toString",(function(){return H(this).tag})),O(Y,"withoutSetter",(function(e){return ue(N(e),e)})),C.f=he,I.f=ce,x.f=le,k.f=fe,S.f=w.f=de,E.f=pe,L.f=function(e){return ue(D(e),e)},u&&(T(W,"description",{configurable:!0,get:function(){return H(this).description}}),s||O(z,"propertyIsEnumerable",he,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:Y}),B(b(ie),(function(e){P(e)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?y(e):le(y(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:fe}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),M(),U(Y,G),R[F]=!0},6544:(e,t,r)=>{"use strict";var n=r(9989),i=r(7697),o=r(9037),a=r(8844),s=r(6812),u=r(9985),c=r(3622),l=r(4327),h=r(2148),f=r(8758),d=o.Symbol,p=d&&d.prototype;if(i&&u(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=c(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(description detection)"===String(d("description detection")),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),r=m?E(t,7,-1):w(t,S,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:g})}},3975:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(6812),a=r(4327),s=r(3430),u=r(6549),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=a(e);if(o(c,t))return c[t];var r=i("Symbol")(t);return c[t]=r,l[r]=t,r}})},4254:(e,t,r)=>{"use strict";r(5405)("iterator")},9749:(e,t,r)=>{"use strict";r(7855),r(3975),r(1445),r(8324),r(9434)},1445:(e,t,r)=>{"use strict";var n=r(9989),i=r(6812),o=r(734),a=r(3691),s=r(3430),u=r(6549),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!o(e))throw new TypeError(a(e)+" is not a symbol");if(i(c,e))return c[e]}})},6664:(e,t,r)=>{"use strict";var n=r(8844),i=r(4872),o=n(r(357)),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},5980:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},9943:(e,t,r)=>{"use strict";var n=r(4872),i=r(2872),o=r(1530),a=r(926),s=r(2615),u=r(8844),c=r(3689),l=n.aTypedArray,h=n.exportTypedArrayMethod,f=u("".slice);h("fill",(function(e){var t=arguments.length;l(this);var r="Big"===f(a(this),0,3)?o(e):+e;return s(i,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},6089:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).filter,o=r(716),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},8690:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},8539:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},5385:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},5552:(e,t,r)=>{"use strict";var n=r(4872),i=r(4328).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},1803:(e,t,r)=>{"use strict";var n=r(4872),i=r(4328).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},1565:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),o=r(8844),a=r(4872),s=r(752),u=r(4201)("iterator"),c=n.Uint8Array,l=o(s.values),h=o(s.keys),f=o(s.entries),d=a.aTypedArray,p=a.exportTypedArrayMethod,v=c&&c.prototype,g=!i((function(){v[u].call([1])})),m=!!v&&v.values&&v[u]===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(u,y,g||!m,{name:"values"})},7987:(e,t,r)=>{"use strict";var n=r(4872),i=r(8844),o=n.aTypedArray,a=n.exportTypedArrayMethod,s=i([].join);a("join",(function(e){return s(o(this),e)}))},9365:(e,t,r)=>{"use strict";var n=r(4872),i=r(1735),o=r(953),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,a(this),t>1?[e,arguments[1]]:[e])}))},677:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).map,o=r(7338),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},1165:(e,t,r)=>{"use strict";var n=r(4872),i=r(8820).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)}))},8118:(e,t,r)=>{"use strict";var n=r(4872),i=r(8820).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)}))},1522:(e,t,r)=>{"use strict";var n=r(4872),i=n.aTypedArray,o=n.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=a(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},1638:(e,t,r)=>{"use strict";var n=r(9037),i=r(2615),o=r(4872),a=r(6310),s=r(3250),u=r(690),c=r(3689),l=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,p=o.aTypedArray,v=o.exportTypedArrayMethod,g=!c((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&&c((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),r=u(e);if(g)return i(d,this,r,t);var n=this.length,o=a(r),c=0;if(o+t>n)throw new l("Wrong length");for(;c<o;)this[t+c]=r[c++]}),!g||m)},4797:(e,t,r)=>{"use strict";var n=r(4872),i=r(7338),o=r(3689),a=r(6004),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(s(this),e,t),n=i(this),o=0,u=r.length,c=new n(u);u>o;)c[o]=r[o++];return c}),o((function(){new Int8Array(1).slice()})))},7300:(e,t,r)=>{"use strict";var n=r(4872),i=r(2960).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3356:(e,t,r)=>{"use strict";var n=r(9037),i=r(6576),o=r(3689),a=r(509),s=r(382),u=r(4872),c=r(7365),l=r(7298),h=r(3615),f=r(7922),d=u.aTypedArray,p=u.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(c)return c<67;if(l)return!0;if(f)return f<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&&a(e),y?g(this,e):s(d(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)},2533:(e,t,r)=>{"use strict";var n=r(4872),i=r(3126),o=r(7578),a=r(7338),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,u=o(e,n);return new(a(r))(r.buffer,r.byteOffset+u*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-u))}))},9724:(e,t,r)=>{"use strict";var n=r(9037),i=r(1735),o=r(4872),a=r(3689),s=r(6004),u=n.Int8Array,c=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,f=!!u&&a((function(){h.call(new u(1))}));l("toLocaleString",(function(){return i(h,f?s(c(this)):c(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!a((function(){u.prototype.toLocaleString.call([1,2])})))},9901:(e,t,r)=>{"use strict";var n=r(4872).exportTypedArrayMethod,i=r(3689),o=r(9037),a=r(8844),s=o.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=a([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var h=u.toString!==c;n("toString",c,h)},8607:(e,t,r)=>{"use strict";r(1158)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},8832:(e,t,r)=>{"use strict";r(5398)},7522:(e,t,r)=>{"use strict";var n=r(9037),i=r(6338),o=r(3265),a=r(7612),s=r(5773),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(n[c]&&n[c].prototype);u(o)},6265:(e,t,r)=>{"use strict";var n=r(9037),i=r(6338),o=r(3265),a=r(752),s=r(5773),u=r(4201),c=u("iterator"),l=u("toStringTag"),h=a.values,f=function(e,t){if(e){if(e[c]!==h)try{s(e,c,h)}catch(t){e[c]=h}if(e[l]||s(e,l,t),i[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var d in i)f(n[d]&&n[d].prototype,d);f(o,"DOMTokenList")},209:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8552)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},3509:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8552)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},6869:(e,t,r)=>{"use strict";r(209),r(3509)},2625:(e,t,r)=>{"use strict";r(752);var n=r(9989),i=r(9037),o=r(2615),a=r(8844),s=r(7697),u=r(6837),c=r(1880),l=r(2148),h=r(6045),f=r(5997),d=r(974),p=r(618),v=r(767),g=r(9985),m=r(6812),y=r(4071),b=r(926),S=r(5027),w=r(8999),E=r(4327),k=r(5391),I=r(5684),x=r(5185),C=r(1664),O=r(7807),T=r(1500),_=r(4201),A=r(382),R=_("iterator"),N="URLSearchParams",D=N+"Iterator",L=p.set,P=p.getterFor(N),M=p.getterFor(D),U=Object.getOwnPropertyDescriptor,j=function(e){if(!s)return i[e];var t=U(i,e);return t&&t.value},B=j("fetch"),F=j("Request"),G=j("Headers"),K=F&&F.prototype,V=G&&G.prototype,H=i.RegExp,z=i.TypeError,Y=i.decodeURIComponent,W=i.encodeURIComponent,X=a("".charAt),q=a([].join),$=a([].push),Z=a("".replace),J=a([].shift),Q=a([].splice),ee=a("".split),te=a("".slice),re=/\+/g,ne=Array(4),ie=function(e){return ne[e-1]||(ne[e-1]=H("((?:%[\\da-f]{2}){"+e+"})","gi"))},oe=function(e){try{return Y(e)}catch(t){return e}},ae=function(e){var t=Z(e,re," "),r=4;try{return Y(t)}catch(e){for(;r;)t=Z(t,ie(r--),oe);return t}},se=/[!'()~]|%20/g,ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ce=function(e){return ue[e]},le=function(e){return Z(W(e),se,ce)},he=d((function(e,t){L(this,{type:D,target:P(e).entries,index:0,kind:t})}),N,(function(){var e=M(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,O(void 0,!0);var n=t[r];switch(e.kind){case"keys":return O(n.key,!1);case"values":return O(n.value,!1)}return O([n.key,n.value],!1)}),!0),fe=function(e){this.entries=[],this.url=null,void 0!==e&&(w(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===X(e,0)?te(e,1):e:E(e)))};fe.prototype={type:N,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,s,u,c=this.entries,l=C(e);if(l)for(r=(t=x(e,l)).next;!(n=o(r,t)).done;){if(a=(i=x(S(n.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new z("Expected sequence with length 2");$(c,{key:E(s.value),value:E(u.value)})}else for(var h in e)m(e,h)&&$(c,{key:h,value:E(e[h])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=ee(e,"&"),o=0;o<i.length;)(t=i[o++]).length&&(r=ee(t,"="),$(n,{key:ae(J(r)),value:ae(q(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],$(r,le(e.key)+"="+le(e.value));return q(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var de=function(){v(this,pe);var e=L(this,new fe(arguments.length>0?arguments[0]:void 0));s||(this.size=e.entries.length)},pe=de.prototype;if(h(pe,{append:function(e,t){var r=P(this);T(arguments.length,2),$(r.entries,{key:E(e),value:E(t)}),s||this.length++,r.updateURL()},delete:function(e){for(var t=P(this),r=T(arguments.length,1),n=t.entries,i=E(e),o=r<2?void 0:arguments[1],a=void 0===o?o:E(o),u=0;u<n.length;){var c=n[u];if(c.key!==i||void 0!==a&&c.value!==a)u++;else if(Q(n,u,1),void 0!==a)break}s||(this.size=n.length),t.updateURL()},get:function(e){var t=P(this).entries;T(arguments.length,1);for(var r=E(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=P(this).entries;T(arguments.length,1);for(var r=E(e),n=[],i=0;i<t.length;i++)t[i].key===r&&$(n,t[i].value);return n},has:function(e){for(var t=P(this).entries,r=T(arguments.length,1),n=E(e),i=r<2?void 0:arguments[1],o=void 0===i?i:E(i),a=0;a<t.length;){var s=t[a++];if(s.key===n&&(void 0===o||s.value===o))return!0}return!1},set:function(e,t){var r=P(this);T(arguments.length,1);for(var n,i=r.entries,o=!1,a=E(e),u=E(t),c=0;c<i.length;c++)(n=i[c]).key===a&&(o?Q(i,c--,1):(o=!0,n.value=u));o||$(i,{key:a,value:u}),s||(this.size=i.length),r.updateURL()},sort:function(){var e=P(this);A(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=P(this).entries,n=y(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new he(this,"keys")},values:function(){return new he(this,"values")},entries:function(){return new he(this,"entries")}},{enumerable:!0}),c(pe,R,pe.entries,{name:"entries"}),c(pe,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),s&&l(pe,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),f(de,N),n({global:!0,constructor:!0,forced:!u},{URLSearchParams:de}),!u&&g(G)){var ve=a(V.has),ge=a(V.set),me=function(e){if(w(e)){var t,r=e.body;if(b(r)===N)return t=e.headers?new G(e.headers):new G,ve(t,"content-type")||ge(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k(e,{body:I(0,E(r)),headers:I(0,t)})}return e};if(g(B)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return B(e,arguments.length>1?me(arguments[1]):{})}}),g(F)){var ye=function(e){return v(this,K),new F(e,arguments.length>1?me(arguments[1]):{})};K.constructor=ye,ye.prototype=K,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ye})}}e.exports={URLSearchParams:de,getState:P}},9307:(e,t,r)=>{"use strict";r(2625)},4147:e=>{"use strict";e.exports={i8:"4.0.1"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},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})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r.r(n),r.d(n,{AbilityKey:()=>ve,AnalyserState:()=>pe,AudioAnalyser:()=>Ea,AutoMute:()=>Fe,AutoPollingDataEntry:()=>xe,AutoState:()=>Ie,CaptureStatus:()=>G,ChairManReason:()=>ne,CoChair:()=>q,ConferenceMode:()=>I,ConstraintMode:()=>j,ContentMode:()=>y,ContentTemplateMode:()=>Q,ContentTrack:()=>Sa,CustomizedMode:()=>we,CustomizedType:()=>Ee,DEVICE_KIND:()=>De,DEVICE_TYPE:()=>T,DetectStreamType:()=>Be,DualStreamState:()=>K,ERROR_CODE:()=>ut,EVENT_TYPE:()=>Y,EnableRename:()=>Z,FacingMode:()=>k,FocusViewAction:()=>x,FocusViewKind:()=>re,Host:()=>$,ICEState:()=>ue,LayoutAvatarType:()=>Ae,LayoutMode:()=>S,LayoutOrientationType:()=>te,LogLevel:()=>de,LogManager:()=>Fo,LogOperateType:()=>fe,Logger:()=>Mo,LoginType:()=>Se,MEETING_DIRECTION:()=>z,MeetingState:()=>b,MessageKind:()=>he,MuteReason:()=>Re,NetworkQualityLevel:()=>ie,OperateType:()=>m,PROCESS_TYPE:()=>X,PeerCallState:()=>ce,PeerState:()=>se,PermissionType:()=>Ne,PluginType:()=>be,PollingState:()=>ke,PriorityMode:()=>F,PushType:()=>v,QualityOperateType:()=>oe,RTCDirection:()=>ae,ReconnectEntry:()=>le,RecordStatus:()=>E,RecordingState:()=>w,STORAGE:()=>p,ShareContentStatus:()=>g,SimulcastMode:()=>B,SocketMessage:()=>Ce,SpecifiedState:()=>Le,StateCategory:()=>C,StateEventName:()=>O,StreamCurrentType:()=>A,StreamFrameRate:()=>D,StreamKind:()=>M,StreamOrigin:()=>U,StreamResolution:()=>N,StreamResolutionLevel:()=>L,StreamStatus:()=>_,StreamType:()=>R,TemplateMode:()=>J,TemplateType:()=>ee,TrackLibType:()=>ye,VOTE_TYPE:()=>W,VideoAudioTrack:()=>ga,VideoQuality:()=>P,WatermarkRange:()=>V,WatermarkStatus:()=>H,XYClientEventKey:()=>Pe,XYDetector:()=>it,XYDeviceEventKey:()=>Ue,XYDisplaySurface:()=>ge,XYDisplaySwitch:()=>me,XYLayoutState:()=>_e,XYRTCClient:()=>cc,XYSocketEventKey:()=>je,XYStreamDetector:()=>tt,XYTrackEventKey:()=>Me,XYTrackState:()=>Te,XYVideoState:()=>Oe,default:()=>gc,getDeviceUniKey:()=>oa,getLayoutId:()=>Qo,getLayoutIdInfo:()=>ta,getLayoutRotateInfo:()=>Zo,getReallyTrackId:()=>sa,getRosterId:()=>ea,getSendSupportedCodec:()=>Jo,getSlaveId:()=>ia,getTextAvatar:()=>aa,getUniquePid:()=>ra,getUniquePidInfo:()=>na,getVideoInfoByRotation:()=>$o,resize:()=>Ve,setOutputAudioDevice:()=>ua});var s=r(4687),u=r.n(s);r(228),r(3964),r(429),r(50);function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function f(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var p,v,g,m,y,b,S,w,E,k,I,x,C,O,T,_,A,R,N,D,L,P,M,U,j,B,F,G,K,V,H,z,Y,W,X,q,$,Z,J,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,le,he,fe,de,pe,ve,ge,me,ye,be,Se,we,Ee,ke,Ie,xe,Ce,Oe,Te,_e,Ae,Re,Ne,De,Le,Pe,Me,Ue,je,Be,Fe;r(1517),r(752),r(6646),r(1694),r(6265),r(6466),r(7195),r(24),r(9288),r(6801),r(3843);!function(e){e.XY_ABILITY="XY-ABILITY",e.XY_LOG_SERVER="xy-log-server",e.XY_ERROR_CODE="xy-error-code",e.XY_I18N_CODE="xy-i18n-code",e.XY_TIMESTAMP="xy-timestamp"}(p||(p={})),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"}(v||(v={})),function(e){e.INIT="INIT",e.CAPTURE="CAPTURE",e.PENDING="PENDING",e.STARTING="STARTING",e.SWITCHING="SWITCHING",e.PAUSE="PAUSE",e.ENDED="ENDED"}(g||(g={})),function(e){e.MUTE_AUDIO="muteAudio",e.UNMUTE_AUDIO="unmuteAudio",e.MUTE_VIDEO="muteVideo",e.UNMUTE_VIDEO="unmuteVideo"}(m||(m={})),function(e){e.NONE="NONE",e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.BOTH="BOTH"}(y||(y={})),function(e){e.UNKNOWN="UNKNOWN",e.CONNECTING="CONNECTING",e.ENDED="ENDED",e.CONNECTED="CONNECTED"}(b||(b={})),function(e){e.AUTO="AUTO",e.CUSTOM="CUSTOM"}(S||(S={})),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"}(w||(w={})),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"}(E||(E={})),function(e){e.FRONT="FRONT",e.BACK="BACK"}(k||(k={})),function(e){e.DIALOG="dialog",e.NORMAL="normal"}(I||(I={})),function(e){e.START="start",e.STOP="stop"}(x||(x={})),function(e){e.STA_CONFSTATUS="sta-confStatus",e.OPER_CONFOPERATION="oper-confOperation",e.STA_MSGCALLBACK="sta-msgCallback",e.OPER_SETTING="oper-setting"}(C||(C={})),function(e){e.CALL_IN="callIn",e.LAYOUT="layout",e.CONTENT="content",e.AUDIO_MUTE="audioMute",e.AUDIO_UNMUTE="audioUnmute",e.VIDEO_MUTE="videoMute",e.VIDEO_UNMUTE="videoUnmute",e.SUBTITLE="subtitle",e.COMPLEX_CAPABILITIES="complexCapabilities",e.MMS_CAPABILITIES="mmsCapabilities"}(O||(O={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(T||(T={})),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"}(A||(A={})),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"}(N||(N={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(D||(D={})),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"}(P||(P={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.ALL="ALL"}(M||(M={})),function(e){e.SDK="SDK",e.CUSTOM="CUSTOM"}(U||(U={})),function(e){e.COMMON="COMMON",e.ADVANCED="ADVANCED",e.FAILED="FAILED"}(j||(j={})),function(e){e.MULTI_RES="MULTI_RESOLUTION",e.SCALE_RES="SCALE_RESOLUTION"}(B||(B={})),function(e){e.VERY_LOW="very-low",e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(F||(F={})),function(e){e.CAPTURE="CAPTURE",e.KEEP="KEEP",e.FAILED="FAILED"}(G||(G={})),function(e){e.ACQUIRING="ACQUIRING",e.SENDING="SENDING",e.IDLE="IDLE"}(K||(K={})),function(e){e.CONTENT="0",e.ALL="1"}(V||(V={})),function(e){e.NONE="0",e.WITH="1"}(H||(H={})),function(e){e.DOWNLINK="DOWNLINK",e.UPLINK="UPLINK",e.ALL="ALL",e.PEOPLE_DOWNLINK="PEOPLE_DOWNLINK",e.PEOPLE_UPLINK="PEOPLE_UPLINK",e.CONTENT_DOWNLINK="CONTENT_DOWNLINK",e.CONTENT_UPLINK="CONTENT_UPLINK"}(z||(z={})),function(e){e.VOTE_SIGNATURE_START="VOTE_SIGNATURE_START",e.VOTE_SIGNATURE_STOP="VOTE_SIGNATURE_STOP"}(Y||(Y={})),function(e){e[e.SIGN_IN=2]="SIGN_IN"}(W||(W={})),function(e){e.CHECK_IN="CHECK_IN"}(X||(X={})),function(e){e.NONE="none",e.ON="on",e.OFF="off"}(q||(q={})),function(e){e.NONE="none",e.ON="on",e.OFF="off"}($||($={})),function(e){e.ON="on",e.OFF="off"}(Z||(Z={})),function(e){e.SPEAKER="SPEAKER",e.GALLERY="GALLERY"}(J||(J={})),function(e){e.MULTI_PIC_CONTENT_HIGH_PRIORITY="MULTI_PIC_CONTENT_HIGH_PRIORITY",e.MULTI_PIC_ACTIVE_HIGH_PRIORITY="MULTI_PIC_ACTIVE_HIGH_PRIORITY",e.TWO_PIC_PIP="TWO_PIC_PIP",e.CONTENT_ONLY="CONTENT_ONLY",e.TWO_PIC_SYMMETRIC="TWO_PIC_SYMMETRIC"}(Q||(Q={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE",e.CHAIRMAN="CHAIRMAN",e.NONE="NONE"}(ee||(ee={})),function(e){e[e.NONE=-1]="NONE",e[e.MOBILE_HORIZONTAL=0]="MOBILE_HORIZONTAL",e[e.MOBILE_VERTICAL=1]="MOBILE_VERTICAL"}(te||(te={})),function(e){e[e.NONE=0]="NONE",e[e.USER=1]="USER",e[e.MEETING=2]="MEETING"}(re||(re={})),function(e){e.NONE="",e.MAIN_VENUE="mainVenue",e.FOCUS_MODE="focusMode"}(ne||(ne={})),function(e){e[e.Bad=1]="Bad",e[e.Poor=2]="Poor",e[e.Good=3]="Good",e[e.Excellent=4]="Excellent"}(ie||(ie={})),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"}(oe||(oe={})),function(e){e.INACTIVE="inactive",e.RECVONLY="recvonly",e.SENDONLY="sendonly",e.SENDRECV="sendrecv"}(ae||(ae={})),function(e){e.new="new",e.connecting="connecting",e.connected="connected",e.disconnected="disconnected",e.failed="failed",e.closed="closed",e.unknown="unknown"}(se||(se={})),function(e){e.new="new",e.checking="checking",e.connected="connected",e.disconnected="disconnected",e.completed="completed",e.failed="failed",e.closed="closed",e.unknown="unknown"}(ue||(ue={})),function(e){e.INIT="INIT",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING",e.SOCKET_CONNECTING="SOCKET_CONNECTING",e.DISCONNECTED="DISCONNECTED",e.RESTART="RESTART",e.RECONNECTED="RECONNECTED",e.FAILED="FAILED"}(ce||(ce={})),function(e){e.MEDIA="MEDIA",e.PEER="PEER",e.INIT="INIT"}(le||(le={})),function(e){e.LOG="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR",e.FATAL="FATAL"}(he||(he={})),function(e){e.LOGGER="LOGGER",e.INIT="INIT",e.DESTROY="DESTROY",e.DOWNLOAD="DOWNLOAD",e.UPLOAD="UPLOAD",e.GET_DATA="GET_DATA"}(fe||(fe={})),function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARNING="WARNING",e.ERROR="ERROR",e.NONE="NONE"}(de||(de={})),function(e){e.RUNNING="RUNNING",e.ENDED="ENDED"}(pe||(pe={})),function(e){e.USE_SEC_API="use_sec_api",e.MEETING_SHARE_NEW_PAGE_API="meeting_share_new_page_api"}(ve||(ve={})),function(e){e.BROWSER="browser",e.MONITOR="monitor",e.WINDOW="window"}(ge||(ge={})),function(e){e.EXCLUDE="exclude",e.INCLUDE="include"}(me||(me={})),function(e){e.PEOPLE="PEOPLE",e.CONTENT="CONTENT"}(ye||(ye={})),function(e){e.VIDEO_INPUT="VIDEO_INPUT",e.AUDIO_INPUT="AUDIO_INPUT"}(be||(be={})),function(e){e[e.XYAccount=0]="XYAccount",e[e.ExtUserId=1]="ExtUserId",e[e.ExtToken=2]="ExtToken"}(Se||(Se={})),function(e){e["1x1"]="1x1",e["2x1"]="2x1",e["3x1"]="3x1",e["4x1"]="4x1",e["4x2"]="4x2",e["5x1"]="5x1",e["6x1"]="6x1",e["6x2"]="6x2",e["8x1"]="8x1",e["9x1"]="9x1"}(we||(we={})),function(e){e.SPEAKER="speaker",e.SPECIFIED="specified",e.AUTO="auto"}(Ee||(Ee={})),function(e){e.INIT="INIT",e.READY="READY",e.PAUSE_MEETING="PAUSE_MEETING",e.PAUSE_SDK="PAUSE_SDK",e.POLLING="POLLING"}(ke||(ke={})),function(e){e.NORMAL="NORMAL",e.NO_JOINED="NO_JOINED",e.VIDEO_MUTE="VIDEO_MUTE",e.NOT_FOUND="NOT_FOUND",e.NULL="NULL"}(Ie||(Ie={})),function(e){e[e.FULL_ROSTER=0]="FULL_ROSTER",e[e.SPECIFIED=1]="SPECIFIED"}(xe||(xe={})),function(e){e.PING="PING",e.PONG="PONG"}(Ce||(Ce={})),function(e){e.CANPLAY="CANPLAY",e.ENDED="ENDED",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN",e.LOAD_START="LOAD_START",e.ERROR="ERROR"}(Oe||(Oe={})),function(e){e.ENABLED="ENABLED",e.MUTE="MUTE",e.ENDED="ENDED"}(Te||(Te={})),function(e){e.MUTE="MUTE",e.REQUEST="REQUEST",e.NORMAL="NORMAL",e.AUDIO_TEL="AUDIO_TEL",e.AUDIO_ONLY="AUDIO_ONLY",e.AUDIO_CONTENT="AUDIO_CONTENT",e.ANSWER_PHONE="ANSWER_PHONE"}(_e||(_e={})),function(e){e[e.NONE=-1]="NONE",e[e.TEXT=0]="TEXT",e[e.IMAGE=1]="IMAGE"}(Ae||(Ae={})),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"}(Re||(Re={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt",e.UNKNOWN="unknown",e.FAILED="failed"}(Ne||(Ne={})),function(e){e.AUDIOINPUT="audioInput",e.AUDIOOUTPUT="audioOutput",e.VIDEOINPUT="videoInput"}(De||(De={})),function(e){e.INIT="INIT",e.UNKNOWN="UNKNOWN",e.NORMAL="NORMAL",e.FAILED="FAILED",e.LOST="LOST"}(Le||(Le={})),function(e){e.CANCEL_HANDUP="cancel-handup",e.FOCUS_VIEW="focus-view",e.INTERACTIVE_TOOL_INFO="interactiveToolInfo",e.MEETING_CONTROL="meeting-control",e.MEETING_CONTROL_VIDEO="meeting-control-video",e.NOTIFICATION="notification",e.ONHOLD="onhold",e.SUB_TITLE="sub-title",e.AUDIO_STATUS="audio-status",e.CALL_STATUS="call-status",e.CONFERENCE_INFO="conference-info",e.DISCONNECTED="disconnected",e.ENTERPRISE_CONFIG="enterprise-config",e.LAYOUT_STATE="layout-state",e.MEDIA_CHANGED_MIGRATE="media-changed-migrate",e.USER_INFO="user-info",e.VIDEO_STATUS="video-status",e.CONF_CHANGE_INFO="conf-change-info",e.CONTENT="content",e.CONTAINER_RESIZE="container-resize",e.FORCE_FULL_SCREEN="force-full-screen",e.LAYOUT="layout",e.PAGE_INFO="page-info",e.ROTATION_CHANGE="rotation-change",e.SCREEN_INFO="screen-info",e.TEMPLATE_MODE="template-mode",e.AUDIO_TRACK="audio-track",e.BULK_ROSTER="bulkRoster",e.IN_OUT_REMINDER="in-out-reminder",e.NETWORK_LEVEL="networkLevel",e.NETWORK_PARAMETER="networkParameter",e.PARTICIPANTS_COUNT="participants-count",e.ROSTER="roster",e.SPEAKER_INFO="speaker-info",e.SPEAKERS_INFO="speakers-info",e.TRANSLATION_CONTENT="translation-content",e.VIDEO_TRACK="video-track",e.MULTI_GROUP_INFO="multi-group-info",e.START_MONITOR_REPORT="start-monitor-report",e.STOP_MONITOR_REPORT="stop-monitor-report",e.RECORDING_STATE_CHANGED="recording-state-changed",e.RECORD_STATUS_NOTIFICATION="record-status-notification",e.RECORD_PERMISSION="record-permission",e.CUSTOM_MESSAGE_RECV="custom-message-recv",e.ERROR="error",e.MEETING_STATS="meeting-stats",e.PLAY_FAILED="play-failed",e.SOCKET_CLOSE="socket-close",e.SOCKET_ERROR="socket-error",e.SOCKET_MESSAGE="socket-message",e.SOCKET_OPEN="socket-open",e.SOCKET_RECONNECT="socket-reconnect",e.SOCKET_TIMEOUT="socket-timeout"}(Pe||(Pe={})),function(e){e.DEVICE="device",e.PERMISSION="permission",e.START_SHARE_CONTENT="start-share-content",e.STOP_SHARE_CONTENT="stop-share-content",e.TRACK_ERROR="track-error"}(Me||(Me={})),function(e){e.DEVICE="device",e.PERMISSION="permission"}(Ue||(Ue={})),function(e){e.CLOSE="close",e.ERROR="error",e.MESSAGE="message",e.OPEN="open",e.RECONNECT="reconnect",e.TIMEOUT="timeout",e.TOKEN_INVALID="TOKEN_INVALID"}(je||(je={})),function(e){e[e.ALL=0]="ALL",e[e.VIDEO=1]="VIDEO",e[e.AUDIO=2]="AUDIO",e[e.CONTENT=3]="CONTENT"}(Be||(Be={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(Fe||(Fe={}));var Ge;r(6869);!function(e){e[e.RESIZE=0]="RESIZE",e[e.OBSERVER=1]="OBSERVER",e[e.UNKNOWN=2]="UNKNOWN"}(Ge||(Ge={}));var Ke=function(){function t(){e(this,t),this.eleId="",this.element=null,this.resizeObserver=null,this.resizeMode=Ge.UNKNOWN,this.detectCount=0,this.maxDetectCount=20,this.detectTimer=null,this.onResize=function(){},this.handleResize=this.handleResize.bind(this)}return a(t,[{key:"handleResize",value:function(){var e,t=(null===(e=this.element)||void 0===e?void 0:e.getBoundingClientRect())||{},r=t.width,n=void 0===r?0:r,i=t.height,o=void 0===i?0:i;this.onResize({width:n,height:o,element:this.element})}},{key:"init",value:function(e,t){e?(this.eleId=e,this.onResize=t,this.element=document.getElementById(this.eleId),this.element?this.startObserverResize():(this.startListenerResize(),this.startDetectTimer())):this.startListenerResize()}},{key:"startDetectTimer",value:function(){var e=this;this.detectTimer=setTimeout((function(){if(e.detectCount>e.maxDetectCount)e.clearDetectTimer();else{if(e.element=document.getElementById(e.eleId),e.element)return e.clearDetectTimer(),e.startObserverResize(),void e.removeResizeListener();e.detectCount+=1,e.startDetectTimer()}}),500)}},{key:"clearDetectTimer",value:function(){this.detectTimer&&(clearTimeout(this.detectTimer),this.detectTimer=null),this.detectCount=0}},{key:"startListenerResize",value:function(){window.addEventListener("resize",this.handleResize),this.resizeMode=Ge.RESIZE}},{key:"startObserverResize",value:function(){var e=this;this.element&&(this.resizeObserver=new ResizeObserver((function(t){e.handleResize()})),this.resizeObserver.observe(this.element),this.resizeMode=Ge.OBSERVER)}},{key:"destroy",value:function(){this.clearDetectTimer(),this.removeResizeListener(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.eleId="",this.element=null}},{key:"removeResizeListener",value:function(){this.resizeMode===Ge.RESIZE&&window.removeEventListener("resize",this.handleResize)}}]),t}(),Ve=new Ke,He=r(738),ze=r.n(He);function Ye(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 We(e,t){if(e){if("string"==typeof e)return Ye(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)?Ye(e,t):void 0}}function Xe(e){return function(e){if(Array.isArray(e))return Ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||We(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.")}()}r(8077),r(9649),r(9693),r(7522),r(4338),r(8832),r(4043),r(2462),r(886),r(2320);var qe=function(){function t(){e(this,t)}return a(t,null,[{key:"getPlatform",value:function(){var e=navigator.userAgent.toLowerCase(),t=navigator.platform.toLowerCase(),r=/macintosh|mac os x/.test(e)||/mac/.test(t),n=/linux/.test(t),i=/win|windows|win32|win64/i.test(e),o=/windows phone/.test(e),a=/symbianos/.test(e)||o,s=/android|harmony/.test(e),u=/arkweb/.test(e)&&/harmony/.test(e),c=/firefox/.test(e),l=/chrome|crios/.test(e)&&!/edg/.test(e),h=/edg/.test(e),f=/safari/.test(e)&&!l&&!h,d=/ipad/.test(e)||/macintel/.test(e)&&navigator.maxTouchPoints>1||/macintosh/.test(e)&&navigator.maxTouchPoints>1,p=/ipad|playbook/.test(e)||s&&!/mobile/.test(e)||c&&/tablet/.test(e),v=/iphone/.test(e)&&!p,g=v||d,m=v||s||u||d||a,y=!m,b=/baidu|bidubrowser|baiduboxapp/.test(e),S=/tencenttraveler|qqbrowse|qq\/|micromessenger/.test(e),w=/opera|opr/.test(e),E=/huaweibrowser/.test(e),k=/Trident/.test(e);return{isTablet:p,isPhone:v,isAndroid:s,isPc:y,isMac:r,isWindows:i,isIPad:d,isChrome:l,isLinux:n,isFirefox:c,isBaidu:b,isQQ:S,isOpera:w,isZhazha:/qihuubrowser|qhbrowser|360se|360ee|lbbrowser|uc|ubrowser|ucweb|quark|miuibrowser|aliapp\(tb|weibo|iqiyiapp|huaweibrowser|huawei|metasr|sogou|se|maxthon|the world|metasr|2345explorer|tencenttraveler|mb2345browser/.test(e),isEdge:h,isSafari:f,isHuaweiBrowser:E,isWeixin:/micromessenger/.test(e)&&!/wxwork|windowswechat/.test(e),isWxwork:/wxwork/.test(e)&&/micromessenger/.test(e),isHarmony:u,isMiniProgram:/miniprogram/.test(e),isWindowsWxWechat:/micromessenger.*wxwork.*windowswechat/.test(e)&&!/macintosh/.test(e),isWindowsWechat:/micromessenger.*windowswechat/.test(e)&&!/wxwork|macintosh/i.test(e),isTrident:k,isIOS:g,isDingDing:/dingtalk/.test(e),isMobile:m}}},{key:"getOperationSystem",value:function(){var e=t.getPlatform(),r=e.isIPad,n=e.isMac,i=e.isWindowsWechat,o=e.isWindowsWxWechat,a=e.isWindows,s=e.isPhone,u=e.isAndroid,c=e.isLinux,l=e.isMiniProgram,h=e.isHarmony;return o?"Windows WXWechat":i?"Windows Wechat":a?"Windows":s?"iOS":u?"Android":r?"iPad":n?"Mac":c?"Linux":l?"MiniProgram":h?"Harmony":""}},{key:"getChromeVersion",value: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]}}},{key:"getEdgeVersion",value: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]}}},{key:"getSafariVersion",value:function(){var e=navigator.userAgent.match(/Version\/([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]}}},{key:"getFirefoxVersion",value: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]}}},{key:"getAndroidVersion",value: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]}}}},{key:"getIOSVersion",value: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]}}}},{key:"getWeixinVersion",value:function(){if(t.getPlatform().isWeixin)return(navigator.userAgent.match(/MicroMessenger\/([\d.]+)/i)||["",""])[1]}},{key:"getWXWeixinVersion",value:function(){if(t.getPlatform().isWxwork)return(navigator.userAgent.match(/wxwork\/([\d.]+)/i)||["",""])[1]}},{key:"compareVersion",value:function(e,t){for(var r=e.split("."),n=t.split("."),i=Math.max(r.length,n.length);r.length<i;)r.push("0");for(;n.length<i;)n.push("0");for(var o=0;o<i;o++){var a=parseInt(r[o]),s=parseInt(n[o]);if(a>s)return 1;if(a<s)return-1}return 0}}]),t}();qe.getBrowserName=function(){var e=qe.getPlatform(),t=e.isFirefox,r=e.isChrome,n=e.isSafari,i=e.isWindowsWechat,o=e.isWindowsWxWechat,a=e.isZhazha,s=e.isEdge,u=e.isWeixin,c=e.isWxwork,l=e.isQQ,h=e.isHuaweiBrowser,f=e.isOpera,d=e.isTrident,p=e.isHarmony;return t?"Firefox":r?"Chrome":n?"Safari":s?"Edge":f?"Opera":d?"Internet Explorer":i?"WindowsWechat":o?"WindowsWxWechat":u?"Weixin":c?"WXWeixin":u?"Weixin":l?"Tencent":h?"Huawei":a?"Other":p?"Harmony":"Unknown"};r(9730),r(2826),r(7722),r(9749),r(6544),r(4254),r(4253),r(4284);function $e(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 Ze(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 Ze(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Ze(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 Je=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Qe=[{width:640,height:360},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160},{width:5760,height:3240}],et={audioInputList:[],audioOutputList:[],videoInputList:[]},tt=function(){function t(){e(this,t),this.deviceList=et,this.maxResolutionMap=new Map}return a(t,[{key:"destroy",value:function(){this.deviceList=et,this.maxResolutionMap=new Map}},{key:"captureStream",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Je(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Be.VIDEO,i=Be.ALL,o=Be.AUDIO,a={},e===n?a.video=t:e===o?a.audio=t:e===i&&(a=t),r.prev=3,r.next=6,navigator.mediaDevices.getUserMedia(a);case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(3),s=this.handleCaptureStreamError(r.t0),r.abrupt("return",Promise.reject(s));case 13:case"end":return r.stop()}}),r,this,[[3,9]])})))}},{key:"captureContentStream",value:function(e){var t;return Je(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,n=window.screen.width,i=window.screen.height,o=window.devicePixelRatio,a=n*o,s=i*o,c=e||{video:{cursor:"always",logicalSurface:!0,displaySurface:"monitor",width:a,height:s}},r.next=9,null===(t=navigator.mediaDevices)||void 0===t?void 0:t.getDisplayMedia(c);case 9:return l=r.sent,r.abrupt("return",l);case 13:return r.prev=13,r.t0=r.catch(0),h=this.handleCreateContentStreamError(r.t0),r.abrupt("return",Promise.reject(h));case 17:case"end":return r.stop()}}),r,this,[[0,13]])})))}},{key:"checkAllowCamera",value:function(){return Je(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.prev=1,e.next=4,this.captureStream(Be.VIDEO);case 4:return r=e.sent,t=!0,r&&this.closeStream([r]),e.abrupt("return",{allow:t,msg:""});case 10:return e.prev=10,e.t0=e.catch(1),n=e.t0.msg||"采集视频流失败",e.abrupt("return",{allow:t,msg:n});case 14:case"end":return e.stop()}}),e,this,[[1,10]])})))}},{key:"checkAllowMicroPhone",value:function(){return Je(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.prev=1,e.next=4,this.captureStream(Be.AUDIO);case 4:return r=e.sent,t=!0,r&&this.closeStream([r]),e.abrupt("return",{allow:t,msg:""});case 10:return e.prev=10,e.t0=e.catch(1),n=e.t0.msg||"采集音频流失败",e.abrupt("return",{allow:t,msg:n});case 14:case"end":return e.stop()}}),e,this,[[1,10]])})))}},{key:"getMaxResolution",value:function(){return Je(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.deviceList.videoInputList).length){e.next=21;break}r=$e(t),e.prev=3,r.s();case 5:if((n=r.n()).done){e.next=13;break}return i=n.value,e.next=9,this.calculateMaxResolution(i);case 9:o=e.sent,this.maxResolutionMap.set(i.deviceId,o);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return e.abrupt("return",this.maxResolutionMap);case 22:case"end":return e.stop()}}),e,this,[[3,15,18,21]])})))}},{key:"calculateMaxResolution",value:function(e){var t=e.deviceId;return Je(this,void 0,void 0,u().mark((function e(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Qe.length,n=Qe[0].width,i=Qe[0].height,o={width:n,height:i},a=0;case 5:if(!(a<r)){e.next=29;break}return s=Qe[a],c=Object.assign(Object.assign({},s),{deviceId:t,frameRate:15}),l=!1,e.prev=9,e.next=12,this.captureStream(Be.VIDEO,c);case 12:if(h=e.sent,f=h.getVideoTracks()[0],d=f.getSettings(),p=d.width,v=void 0===p?0:p,g=d.height,m=void 0===g?0:g,y=d.deviceId,b=void 0===y?"":y,s.width!==v&&s.height!==m||!(o.width<=v||o.height<=m)||t!==b?l=!0:o=s,this.closeStream([h]),!l){e.next=20;break}return e.abrupt("break",29);case 20:e.next=26;break;case 22:return e.prev=22,e.t0=e.catch(9),console.warn("get max resolution err: ",e.t0),e.abrupt("break",29);case 26:a++,e.next=5;break;case 29:return e.abrupt("return",o);case 30:case"end":return e.stop()}}),e,this,[[9,22]])})))}},{key:"getDeviceList",value:function(){return Je(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.mediaDevices.enumerateDevices();case 3:return t=e.sent,r=[],n=[],i=[],o=function(e){return e.filter((function(e){var t=e.label,r=e.deviceId;return!(t.match(/\(Virtual\)$/)||"communications"===r)}))},t.forEach((function(e){var t=e.deviceId,o=e.label,a=e.kind,s={deviceId:t,label:o,kind:a,groupId:e.groupId};t&&a&&("audioinput"===a?r.push(s):"audiooutput"===a?n.push(s):"videoinput"===a&&i.push(s))})),this.deviceList={audioInputList:o(r),audioOutputList:o(n),videoInputList:o(i)},e.abrupt("return",this.deviceList);case 13:return e.prev=13,e.t0=e.catch(0),this.deviceList={audioInputList:[],audioOutputList:[],videoInputList:[]},e.abrupt("return",this.deviceList);case 17:case"end":return e.stop()}}),e,this,[[0,13]])})))}},{key:"closeStream",value:function(e){e.forEach((function(e){e.getTracks().forEach((function(e){e.stop()}))}))}},{key:"getSupportedConstraints",value:function(){var e,t=[];try{var r=null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getSupportedConstraints();if(r)for(var n in r)t.push(n);return t}catch(e){return t}}},{key:"handleCaptureStreamError",value:function(e){return"NotFoundError"===e.name||"DevicesNotFoundError"===e.name?{code:20400,msg:"缺失摄像头或麦克风设备"}:"NotReadableError"===e.name||"TrackStartError"===e.name?{code:20401,msg:"摄像头或麦克风设备无法访问"}:"OverconstrainedError"===e.name||"ConstraintNotSatisfiedError"===e.name?{code:20402,msg:"约束设置无法被满足"}:"NotAllowedError"===e.name||"PermissionDeniedError"===e.name||e.message.includes("NotAllowedError")?{code:20403,msg:"麦克风或摄像头使用权限被拒绝"}:"TypeError"===e.name||"TypeError"===e.name?{code:20404,msg:"采集流约束设置为空"}:{code:20405,msg:"创建媒体流失败"}}},{key:"handleCreateContentStreamError",value:function(e){var t=e.name,r=e.message;return"NotAllowedError"===t?"Permission denied by system"===r?{code:950508,msg:"屏幕分享失败,请在系统设置中授权屏幕录制权限"}:"Permission denied"===r?{code:950501,msg:"取消分享屏幕"}:{code:950511,msg:"用户取消分享屏幕"}:"InvalidStateError"===t?{code:950502,msg:"操作异常-采集屏幕失败"}:"AbortError"===t?{code:950503,msg:"采集屏幕失败"}:"NotFoundError"===t?{code:950504,msg:"没有屏幕视频源可用于捕获"}:"NotReadableError"===t?{code:950505,msg:"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器"}:"OverconstrainedError"===t?{code:950506,msg:"采集屏幕流失败"}:"TypeError"===t?{code:950507,msg:"采集屏幕流不支持"}:{code:950503,msg:"采集屏幕失败"}}}],[{key:"getInstance",value:function(){return this.instance?this.instance:new t}}]),t}(),rt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},nt=qe.getPlatform(),it=function(){function t(){e(this,t)}return a(t,null,[{key:"isSupportDesktopBrowser",value:function(){var e=!1,t=nt.isChrome,r=nt.isEdge,n=nt.isFirefox;if(t){var i=qe.getChromeVersion();e=(null==i?void 0:i.major)>=72}else if(r){var o=qe.getEdgeVersion();e=(null==o?void 0:o.major)>=80}else if(n){var a=qe.getFirefoxVersion();e=(null==a?void 0:a.major)>=80}return e}},{key:"isSupportMobileBrowser",value:function(){var e=!1,t=nt.isPhone,r=nt.isAndroid,n=nt.isIPad;if(r)e=(qe.getAndroidVersion()||{major:0,minor:0}).major>=6;else if(t){var i=qe.getIOSVersion()||{major:0,minor:0},o=i.major,a=i.minor;e=12===o?a>2:o>12}else n&&(e=!0);return e}},{key:"isSupportAspectRatio",value:function(){return!nt.isPhone}},{key:"isSupportUserMedia",value:function(){var e;return!!(null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)}},{key:"checkCanvasCapture",value:function(){var e=document.createElement("canvas");e.setAttribute("style","display: none"),e.id=t.CANVAS_TEST_ID,document.getElementsByTagName("body")[0].appendChild(e);var r=!!e.captureStream,n=null;return r&&(n=e.captureStream()),{canvasStream:n,isSupportCanvasCapture:r}}},{key:"checkVideoCapture",value:function(e){var r=document.createElement("video");r.setAttribute("style","display: none"),r.src=e,r.muted=!0,r.id=t.VIDEO_TEST_ID,r.crossOrigin="anonymous",document.getElementsByTagName("body")[0].appendChild(r);var n=!!r.captureStream||!1;return this.removeDetectElement(t.VIDEO_TEST_ID),{isSupportVideoCapture:n}}},{key:"removeDetectElement",value:function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.CANVAS_TEST_ID,n=document.getElementById(r);n&&(null===(e=n.parentNode)||void 0===e||e.removeChild(n))}},{key:"isSupportRTC",value:function(e){return rt(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.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)){r.next=11;break}if(!(i[o]in window)){r.next=8;break}return n.isSupportRTC=!0,r.abrupt("break",11);case 8:o++,r.next=3;break;case 11:if(!n.isSupportRTC){r.next=17;break}return r.next=14,t.isSupportPeerCB(e);case 14:a=r.sent,s=a.isSupportPeer,n=Object.assign(Object.assign({},a),{isSupportRTC:s});case 17:return r.abrupt("return",n);case 18:case"end":return r.stop()}}),r)})))}},{key:"isSupportPeerCB",value:function(e){return rt(this,void 0,void 0,u().mark((function t(){return u().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,a=new RTCPeerConnection({iceServers:[]}),s=!1,u=!1,c=!1;if(n=!(!a.createAnswer||!a.createOffer),i=!!a.addTrack,o=!!(null==a?void 0:a.addTransceiver),e&&(null===(r=null==e?void 0:e.getVideoTracks())||void 0===r?void 0:r.length)&&o){var l=e.getVideoTracks()[0],h=a.addTransceiver(l);h&&(s=!!h.sender.replaceTrack,c=!!h.sender.setStreams),l&&(u=!!l.applyConstraints),h=null}return a.close(),t({isSupportPeer:n,isSupportAddtrack:i,isSupportAddTransceiver:o,isSupportReplaceTrack:s,isApplyConstraints:u,isSupportSetStreams:c})}return t({isSupportPeer:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1})}),100)})));case 1:case"end":return t.stop()}}),t)})))}},{key:"isSupportWebsocket",value:function(){return!!window.WebSocket}},{key:"isSupportVideoCapture",value:function(e){var t=!!e.captureStream,r=null;return t&&(r=null==e?void 0:e.captureStream()),{videoCaptureStream:r,captureVideoVisible:t}}},{key:"isSupportIndexDB",value:function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.indexedDB)||void 0===e?void 0:e.open)}},{key:"isSupportDevicePermission",value:function(){return rt(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.permissions.query({name:"microphone"});case 3:return e.next=5,navigator.permissions.query({name:"camera"});case 5:return e.abrupt("return",!0);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))}},{key:"isSupportAudioContext",value:function(){return!(!(null===window||void 0===window?void 0:window.AudioContext)&&!(null===window||void 0===window?void 0:window.webkitAudioContext))}},{key:"isSupportMediaDevices",value:function(){return!!navigator.mediaDevices}},{key:"isSupportMediaRecorder",value:function(){return!!window.MediaRecorder}},{key:"isSupportWebWorker",value:function(){return!!window.Worker}},{key:"isSupportTransformStream",value:function(){return!!window.TransformStream}},{key:"isSupportH264",value:function(){var e,t,r;return rt(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=nt.isFirefox,o=!1,!i){n.next=13;break}return n.prev=3,a=new RTCPeerConnection,n.next=7,a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 7:s=n.sent,o=((null===(e=null==s?void 0:s.sdp)||void 0===e?void 0:e.toLowerCase().indexOf("h264"))||-1)>-1,n.next=13;break;case 11:n.prev=11,n.t0=n.catch(3);case 13:try{c=(null===(t=RTCRtpSender.getCapabilities("video"))||void 0===t?void 0:t.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],l=(null===(r=RTCRtpReceiver.getCapabilities("video"))||void 0===r?void 0:r.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],(null==c?void 0:c.length)>0&&l.length>0&&(o=!0)}catch(e){}return n.abrupt("return",o);case 15:case"end":return n.stop()}}),n,null,[[3,11]])})))}},{key:"getNetWork",value:function(){var e=navigator.connection||{};return JSON.stringify(e)}},{key:"getCPUCount",value:function(){return window.navigator.hardwareConcurrency||0}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"getAudioCodec",value:function(e){return rt(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[];try{n=(null==e?void 0:e.getCapabilities("audio"))||{},i=(null==n?void 0:n.codecs)||[],o=new Set,i.forEach((function(e){"audio/opus"===e.mimeType&&o.add("Opus")})),r=Xe(o)}catch(e){nt.isFirefox&&(r=["Opus"])}return t.abrupt("return",r);case 3:case"end":return t.stop()}}),t)})))}},{key:"getVideoCodec",value:function(e){return rt(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[];try{n=(null==e?void 0:e.getCapabilities("video"))||{},i=(null==n?void 0:n.codecs)||[],o=new Set,i.forEach((function(e){"video/H264"!==e.mimeType&&"video/VP8"!==e.mimeType&&"video/VP9"!==e.mimeType||o.add(e.mimeType.split("video/")[1])})),r=Xe(o)}catch(e){nt.isFirefox&&(r=["VP8","H264"])}return t.abrupt("return",r);case 3:case"end":return t.stop()}}),t)})))}},{key:"getSupportedCodec",value:function(){return rt(this,void 0,void 0,u().mark((function e(){var r,n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.getAudioCodec(RTCRtpSender);case 3:return r=e.sent,e.next=6,t.getVideoCodec(RTCRtpSender);case 6:return n=e.sent,e.next=9,t.getAudioCodec(RTCRtpReceiver);case 9:return i=e.sent,e.next=12,t.getVideoCodec(RTCRtpReceiver);case 12:return o=e.sent,a={audioSenderCodecList:r,videoSenderCodecList:n,audioReceiverCodecList:i,videoReceiverCodecList:o},e.abrupt("return",a);case 17:return e.prev=17,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}},{key:"getWidowResolution",value:function(){var e=window.screen.width,t=window.screen.height,r=window.devicePixelRatio,n=t*r;return{maxWidth:e*r,maxHeight:t*r,width:e,height:t,dpr:r,maxScreenResolution:"".concat(e*r,"*").concat(n)}}},{key:"isSupportShareContent",value:function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)}},{key:"isSupportSetCaptureHandleConfig",value:function(){return!!navigator.mediaDevices.setCaptureHandleConfig}},{key:"isSupportDevicePressure",value:function(){var e=!1;return"PressureObserver"in globalThis&&(e=!0),e}},{key:"checkSupportWebRTC",value:function(){return rt(this,void 0,void 0,u().mark((function e(){var r,n,i,o,a,s,c,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.isSupportRTC();case 2:return r=e.sent,e.next=5,t.isSupportUserMedia();case 5:return n=e.sent,i=t.isSupportWebsocket(),e.next=9,t.isSupportH264();case 9:return o=e.sent,a=r.isSupportRTC,s=r.isSupportAddTransceiver,c=r.isSupportAddtrack,l={result:a&&i&&o,detail:{isSupportRTC:a,isSupportWebsocket:i,isSupportH264:o,isSupportAddTransceiver:s,isSupportAddtrack:c,isSupportUserMedia:n}},e.abrupt("return",l);case 14:case"end":return e.stop()}}),e)})))}}]),t}();function ot(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}it.CANVAS_TEST_ID="XY_DETECT_CANVAS_ID",it.VIDEO_TEST_ID="XY_DETECT_VIDEO_ID",it.browser=qe,it.stream=tt.getInstance();r(7550),r(9358),r(8436);var at={500:"XYSDK:950111",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",1001:"XYSDK:950101",40440:"XYSDK:950140",5001035:"XYSDK:950135",9000019:"XYSDK:950119",9000018:"XYSDK:950118",9000020:"XYSDK:950192",40060049:"XYSDK:950149",6:"XYSDK:950121",29:"XYSDK:950122",26:"XYSDK:950124",10006e3:"XYSDK:950160",90005:"XYSDK:950161",42997:"XYSDK:950150",4002:"XYSDK:950151",400151:"XYSDK:950152",4004:"XYSDK:950153",4034:"XYSDK:950153",40032:"XYSDK:950154",400101:"XYSDK:950155",4008:"XYSDK:950158"},st={4004:"XYSDK:950157",4008:"XYSDK:950158",40039:"XYSDK:950101",40811:"XYSDK:950159",42997:"XYSDK:950150"},ut={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:950117":"Pipeline not setting destination function","XYSDK:950131":"Not register plugin","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:950231":"Please rejoin meeting by network error","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:950604":"Conversation mode does not support this operation","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":"Media negotiation connection failed, please check","XYSDK:950518":"Successful call","XYSDK:950519":"Connecting to media service, please wait","XYSDK:950522":"Media negotiation ICE Candidate failed, please check","XYSDK:950523":"Media negotiation response Answer failed. Please check","XYSDK:950524":"Media negotiation failed to create Offer. Please check","XYSDK:950525":"Media connection failed. Please check the signaling and media service connection status.","XYSDK:950526":"The media did not push track data, please check the service","XYSDK:950527":"The media service connection is abnormal, please check the UDP port","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":"Audio and video collection configuration is invalid","XYSDK:950404":"Mic or camera access denied","XYSDK:950405":"Media stream collection is not supported","XYSDK:950411":"Camera permission denied","XYSDK:950412":"Microphone permission denied","XYSDK:950413":"Source is created","XYSDK:950414":"Camera and Microphone create stream failed","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 stream failed","XYSDK:950507":"Capturing screen streams is not supported","XYSDK:950508":"Screen sharing failed. Please re-grant screen recording permissions","XYSDK:950509":"Already sharing screen","XYSDK:950510":"Not selected SourceId","XYSDK:950511":"User unshare 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:950701":"Sharing has not started","XYSDK:950702":"Sharing operation failed","XYSDK:950703":"Please reopen sharing","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:950212":"Please log in before proceeding","XYSDK:950156":"Only supports setting users","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!","XYSDK:950140":"externalUserId is invalid","XYSDK:950135":"authCode is invalid","XYSDK:950119":"authCode has expired","XYSDK:950118":"authCode already in use","XYSDK:950192":"Unknown login type","XYSDK:950149":"displayName is invalid","XYSDK:950121":"Incorrect password, 5 consecutive incorrect passwords will lock the account","XYSDK:950122":"The user is locked and cannot host the meeting","XYSDK:950123":"Sign in failed","XYSDK:950124":"Not the owner of the meeting room","XYSDK:950160":"Login failed, please use your company account and password to log in!","XYSDK:950161":"The device type is restricted, please contact your enterprise administrator.","XYSDK:950150":"The current operation is too frequent, please try again later.","XYSDK:950151":"Login has expired, please log in again","XYSDK:950152":"The organization has not turned on focus screen mode","XYSDK:950153":"Only moderators support this operation","XYSDK:950154":"Please turn off the main venue mode first","XYSDK:950155":"User is not in the meeting","XYSDK:950157":"No permission","XYSDK:950158":"Operation Unsupported","XYSDK:950159":"Time out"},zh_CN:{"XYSDK:950010":"自定义消息长度超过限制,请检查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket连接超时","XYSDK:950113":"WebSocket连接已关闭,正在重连...","XYSDK:950114":"WebSocket连接已关闭","XYSDK:950115":"WebSocket连接错误","XYSDK:950116":"当前浏览器不支持Websocket,请使用Chrome浏览器","XYSDK:950117":"管道未设置结尾函数","XYSDK:950131":"未注册插件","XYSDK:950201":"Client已关闭,禁止加入会议","XYSDK:950202":"需要创建Peer才可操作","XYSDK:950203":"需要创建Stream才可操作","XYSDK:950223":"音视频开启关闭操作失败","XYSDK:950224":"没有麦克风权限","XYSDK:950225":"没有摄像头权限","XYSDK:950230":"挂断会议","XYSDK:950231":"网络异常,请重新入会","XYSDK:950102":"登录失败","XYSDK:950101":"参数有误,请检查","XYSDK:950103":"获取用户信息失败","XYSDK:950104":"账号或密码错误","XYSDK:950141":"该账号密码已过期,请修改密码后重新登录","XYSDK:950142":'登录手机号冲突,请使用"+国家码-手机号"的模式输入',"XYSDK:950143":"您登录失败过于频繁,请30分钟后重试","XYSDK:950144":"登录已失效,请重新登录","XYSDK:950601":"自定义布局模式不支持切换布局","XYSDK:950602":"自定义布局模式不支持全屏请流","XYSDK:950603":"自定义布局模式不支持分页","XYSDK:950604":"对话模式不支持此操作","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:950522":"媒体协商ICE Candidate失败,请检查媒体网关服务","XYSDK:950523":"媒体协商响应Answer失败,请检查媒体网关服务","XYSDK:950524":"媒体协商创建Offer失败,请检查","XYSDK:950525":"媒体连接失败,请检查信令和媒体服务连接状态","XYSDK:950526":"媒体未推送轨道(Track)数据,请检查媒体网关服务","XYSDK:950527":"媒体服务连接异常,请检查UDP端口状态","XYSDK:950530":"全屏请流失败","XYSDK:950401":"缺失摄像头或麦克风设备","XYSDK:950402":"摄像头或麦克风设备无法访问","XYSDK:950403":"音视频采集配置无效","XYSDK:950404":"麦克风或摄像头使用权限被拒绝","XYSDK:950411":"摄像头使用权限被拒绝","XYSDK:950412":"麦克风使用权限被拒绝","XYSDK:950413":"资源已创建","XYSDK:950414":"摄像头和麦克风采集失败","XYSDK:950405":"媒体流采集不支持","XYSDK:950406":"创建媒体流失败","XYSDK:950407":"切换扬声器失败","XYSDK:950501":"取消分享屏幕","XYSDK:950502":"操作异常-采集屏幕失败","XYSDK:950503":"采集屏幕失败","XYSDK:950504":"没有屏幕视频源可用于捕获","XYSDK:950505":"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器","XYSDK:950506":"采集屏幕流失败","XYSDK:950507":"采集屏幕流不支持","XYSDK:950508":"屏幕分享失败,请在系统设置中授权屏幕录制权限","XYSDK:950509":"已经在分享屏幕","XYSDK:950510":"没有 selectedSourceId\t","XYSDK:950511":"用户取消分享屏幕","XYSDK:950512":"分享内容失败","XYSDK:950513":"结束分享失败\t","XYSDK:950515":"获取发送端支持的编解码格式 失败\t","XYSDK:950701":"未开始分享","XYSDK:950702":"分享操作失败","XYSDK:950703":"请重新开启分享","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:950212":"请登录后再进行操作","XYSDK:950156":"仅支持设置用户","XYSDK:953901":"录制参数错误","XYSDK:953902":"没有录制权限","XYSDK:953903":"云会议室不属于任何企业,无法录制","XYSDK:953904":"录制空间不足","XYSDK:953905":"录制未开始","XYSDK:950146":"账号异常被限制登录","XYSDK:950147":"账号已停用,如需恢复请联系管理员!","XYSDK:950140":"externalUserId不合法","XYSDK:950135":"authCode不合法","XYSDK:950119":"authCode已过期","XYSDK:950118":"authCode已被使用","XYSDK:950192":"未知的登录方式","XYSDK:950149":"用户名称不合法","XYSDK:950121":"密码错误,连续5次错误将锁定账号","XYSDK:950122":"账号已经锁定,不能主持该会议","XYSDK:950123":"签到失败","XYSDK:950124":"不是会议室主人","XYSDK:950160":"登录失败,请使用本企业账号密码登录!","XYSDK:950161":"该设备类型登录受限,请与您所在企业管理员联系","XYSDK:950150":"当前操作太频繁,请稍后再试","XYSDK:950151":"登录已失效,请重新登录","XYSDK:950152":"企业未开启焦点画面模式","XYSDK:950153":"仅主持人支持该操作","XYSDK:950154":"请先关闭主会场模式","XYSDK:950155":"用户不在会中","XYSDK:950157":"无权限","XYSDK:950158":"不支持此操作","XYSDK:950159":"请求超时"},zh_TW:{"XYSDK:950010":"自定義消息長度超過限製,請檢查","XYSDK:950120":"成功","XYSDK:950112":"WebSocket連接超時","XYSDK:950113":"WebSocket連接已關閉,正在重連...","XYSDK:950114":"WebSocket連接已關閉","XYSDK:950115":"WebSocket連接錯誤","XYSDK:950116":"當前瀏覽器不支持Websocket,請使用Chrome瀏覽器","XYSDK:950117":"管道未设置结尾函数","XYSDK:950131":"未注册插件","XYSDK:950201":"Client已關閉,禁止加入會議","XYSDK:950202":"需要創建Peer才可操作","XYSDK:950203":"需要創建Stream才可操作","XYSDK:950223":"音視頻開啟關閉操作失敗","XYSDK:950224":"沒有麥克風權限","XYSDK:950225":"沒有攝像頭權限","XYSDK:950230":"掛斷會議","XYSDK:950231":"網絡異常,請重新入會","XYSDK:950102":"登錄失敗","XYSDK:950101":"參數有誤,請檢查","XYSDK:950103":"獲取用戶信息失敗","XYSDK:950104":"賬號或密碼錯誤","XYSDK:950141":"該賬號密碼已過期,請修改密碼後重新登錄","XYSDK:950142":'登錄手機號衝突,請使用"+國家碼-手機號"的模式輸入',"XYSDK:950143":"您登錄失敗過於頻繁,請30分鐘後重試","XYSDK:950144":"登錄已失效,請重新登錄","XYSDK:950601":"自定義佈局模式不支持切換佈局","XYSDK:950602":"自定義佈局模式不支持全屏請流","XYSDK:950603":"自定義佈局模式不支持分頁","XYSDK:950604":"對話模式不支持此操作","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:950522":"媒體協商ICE Candidate失敗,請檢查媒体网关服务","XYSDK:950523":"媒體協商響應Answer失敗,請檢查媒体网关服务","XYSDK:950524":"媒體協商創建Offer失敗,請檢查","XYSDK:950525":"媒體連接失敗,請檢查信令和媒體服務連接狀態","XYSDK:950526":"媒體未推送軌道(Track)數據,請檢查媒体网关服務","XYSDK:950527":"媒體服務連接異常,請檢查UDP端口","XYSDK:950530":"全屏請流失敗","XYSDK:950401":"缺失攝像頭或麥克風設備","XYSDK:950402":"攝像頭或麥克風設備無法訪問","XYSDK:950403":"音視頻采集配置無效","XYSDK:950404":"麥克風或攝像頭使用權限被拒絕","XYSDK:950411":"攝像頭使用權限被拒絕","XYSDK:950412":"麥克風使用權限被拒絕","XYSDK:950413":"资源已创建","XYSDK:950414":"摄像头和麦克风采集失败","XYSDK:950405":"媒體流采集不支持","XYSDK:950406":"創建媒體流失敗","XYSDK:950407":"切換揚聲器失敗","XYSDK:950501":"取消分享屏幕","XYSDK:950502":"操作異常採集屏幕失敗","XYSDK:950503":"採集屏幕失敗","XYSDK:950504":"沒有屏幕視頻源可用於捕獲","XYSDK:950505":"屏幕分享失敗,請在系統設置中重新授權屏幕錄製權限,並重啟瀏覽器","XYSDK:950506":"采集屏幕流失敗","XYSDK:950507":"采集屏幕流不支持","XYSDK:950508":"屏幕分享失敗,請在系統設置中授權屏幕錄製權限","XYSDK:950509":"已經在分享屏幕","XYSDK:950510":"沒有 selectedSourceId\t","XYSDK:950511":"用戶取消分享屏幕","XYSDK:950512":"分享Content失敗","XYSDK:950513":"結束分享失敗\t","XYSDK:950515":"獲取發送端支持的編解碼格式 失敗\t","XYSDK:950701":"未開始分享","XYSDK:950702":"分享操作失敗","XYSDK:950703":"請重新開啟分享","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:950212":"請登錄後再進行操作","XYSDK:950156":"僅支持設置用戶","XYSDK:953901":"錄製參數錯誤","XYSDK:953902":"沒有錄製權限","XYSDK:953903":"雲會議室不屬於任何企業,無法錄製","XYSDK:953904":"錄製空間不足","XYSDK:953905":"錄製未開始","XYSDK:950146":"賬號異常被限制登錄","XYSDK:950147":"賬號已停用,如需恢復請聯系管理員!","XYSDK:950140":"externalUserId不合法","XYSDK:950135":"authCode不合法","XYSDK:950119":"authCode已過期","XYSDK:950118":"authCode已被使用","XYSDK:950192":"未知的登錄方式","XYSDK:950149":"用戶名稱不合法","XYSDK:950121":"密碼錯誤,連續5次錯誤將鎖定帳號","XYSDK:950122":"帳號已經鎖定,不能主持該會議","XYSDK:950123":"簽到失敗","XYSDK:950124":"不是會議室主人","XYSDK:950160":"登錄失敗,請使用本企業賬號密碼登錄!","XYSDK:950161":"該設備類型登錄受限,請與您所在企業管理員聯繫","XYSDK:950150":"當前操作太頻繁,請稍後再試","XYSDK:950151":"登錄已失效,請重新登錄","XYSDK:950152":"企業未開啓焦點畫面模式","XYSDK:950153":"僅主持人支持該操作","XYSDK:950154":"請先關閉主會場模式","XYSDK:950155":"用戶不在會中","XYSDK:950157":"無權限","XYSDK:950158":"不支持此操作","XYSDK:950159":"請求超時"}},ct={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"}},lt=(r(5728),"zh_CN"),ht=function(e,t){var r=null,n=t||200;return function(){var t=this,i=arguments;r&&clearTimeout(r),r=setTimeout((function(){e.apply(t,i)}),n)}},ft=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())},dt=function(){var e=new Date;return"".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds()," ").concat(e.getMilliseconds())},pt=function(e,t){var r=t-e;return Math.round(r/864e5*10)/10};function vt(e){var t={};return e.forEach((function(e,r){t[r]=e})),t}var gt=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]:"")||ut[lt][e],detail:t}},mt={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},isFunction:function(e){return"function"==typeof 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)}},yt=function(e){try{return mt.isObject(e)?e:mt.isString(e)?JSON.parse(e):{}}catch(e){return{}}},bt=function(e){try{return JSON.stringify(e)}catch(e){return JSON.stringify("")}},St={"(":")","(":")","[":"]","{":"}","<":">"},wt=new Set(Object.keys(St)),Et=it.browser.getPlatform(),kt=N.RS90,It=N.RS180,xt=N.RS360,Ct=N.RS720,Ot=N.RS1080,Tt=j.COMMON,_t=j.ADVANCED,At=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tt,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Et.isFirefox)return{};var n={frameRate:e};if(t===_t&&mt.isNumber(e)){n=r?{frameRate:{ideal:e,max:e}}:{frameRate:{exact:e,max:e}}}return n},Rt=Object.assign({width:640,height:360,resizeMode:"crop-and-scale",aspectRatio:1.7777777778},At(15)),Nt={cursor:"always",logicalSurface:!0},Dt={channelCount:1,autoGainControl:!0,noiseSuppression:!0,echoCancellation:!0},Lt=function(e,t,r){return ot(ot(ot(ot(ot({},kt,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Rt),At(15)),{width:160,height:90}),audio:Dt}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(15,_t)),{width:{min:160,ideal:160,max:160},height:{min:90,ideal:90,max:90}}),audio:Dt})),It,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Rt),At(15)),{width:320,height:180}),audio:Dt}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(15,_t)),{width:{min:320,ideal:320,max:320},height:{min:180,ideal:180,max:180}}),audio:Dt})),xt,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t)),{width:640,height:360}),audio:Dt}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t,_t)),{width:{min:640,ideal:640,max:640},height:{min:360,ideal:360,max:360}}),audio:Dt})),Ct,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t)),{width:1280,height:720}),audio:Dt}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t,_t)),{width:{min:1280,ideal:1280,max:1280},height:{min:720,ideal:720,max:720}}),audio:Dt})),Ot,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t)),{width:1920,height:1080}),audio:Dt}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t,_t)),{width:{min:1920,ideal:1920,max:1920},height:{min:1080,ideal:1080,max:1080}}),audio:Dt}))[e][r]},Pt={"90P":0,"180P":1,"360P":2,"720P":3,"1080P":4,"4K":5,Num:6},Mt={180:0,360:0,720:0},Ut=256,jt=512,Bt=17,Ft=9999999999,Gt=13333,Kt=["XYSDK:950403","XYSDK:950405","XYSDK:950406"],Vt=_.FAILED,Ht=_.DISABLED,zt=_.NORMAL,Yt=_.UNKNOWN,Wt=[Vt,Ht],Xt=[Yt,zt],qt=[zt],$t=[R.REMOTE,R.CONTENT],Zt=["CONFNO","HARD","TVBOX","BRUCE","DESK","SOFT","H323","GROUP"],Jt=[0,1,2],Qt=[0,1,2,3,4,5],er={none:0,wifi:1,"3g":2,wired:3,"2g":4,"4g":5,wwan:6,"3g_china_mobile":7},tr={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"}},rr={bundlePolicy:"max-bundle",iceCandidatePoolSize:0,iceServers:[],iceTransportPolicy:"all",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"},nr={OK:"STATE:200",SERVER_INNER_ERROR:"SIG:4448",PEER_NET_DISCONNECT:"SIG:403",LOCAL_NET_DISCONNECT:"SIG:499"},ir={deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isFocusScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,key:"",extUserId:""},or={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:ze()(ir),SELF_MOCK_PID:Ft,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:"",id:0,displayName:"",token:{access_token:"",signSecret:""}},LAYOUT:{position:[],resolution:0,rotate:null,quality:0,state:_e.NORMAL,roster:ir,rotationInfo:null,id:"",avatar:null},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,chairManReason:ne.NONE,chairManUrl:"",contentUri:"",actSpkUri:"",mediaGroupInfo:[]},CLOUD_ROOOM_INFO:{meetingControlPassword:"",meetingNumber:"",password:""},CONFERENCE_INFO:{callNumber:"",callUrl:"",deviceId:"",deviceType:"",displayName:"",number:"",numberType:"",confAuxProperties:{watermarkContent:"",watermarkRange:V.CONTENT},avatar:"",inviteInfo:{displayName:"",inEnterprise:!0,inviteAppUrl:"",inviteUrl:"",invokSchema:"",linkNumber:"",mobileWebrtcVisibleSetting:!0,number:"",password:"",pstnNumber:"",shareUrl:"",userAvatar:"",userName:"",userProfileId:"",voiceNumber:"",webrtcSetting:!0,webrtcUrl:""}}},ar=Object.values(J),sr=Object.values(Q),ur=J.SPEAKER,cr=Q.MULTI_PIC_CONTENT_HIGH_PRIORITY,lr="standardWebRtc",hr="thirdWebRtc",fr={muteAudio:"audioMute",unmuteAudio:"audioUnmute",muteVideo:"videoMute",unmuteVideo:"videoUnmute"},dr={0:"",1:"HIDE",2:"SDKMonitor+hide"},pr=["HIDE","SDKMonitor+hide"],vr=["Chinese","English"],gr={enableMeetingShout:!1,enableV2States:!0,enableCheckRecordPermission:!1,enableBandwidthSetting:!1,enableMeetingInvite:!1,enableMeetingOwner:!1,enableAutoResizeLayout:!0,enableLowResolution:!1,enableSpeakerInfo:!1,enableLayoutAvatar:!1,enableMobileNotAuth:!1,enableWatermarkContent:!0,enableHideLocalView:!1},mr={dbName:"XYRTC_LOG",tableName:"LOG",dbVersion:1,tableCount:1,tableIndex:1,schema:"++id,t,c",maxSize:it.browser.getPlatform().isPc?8e4:5e4,detectTimer:3e5,deleteDBNames:[],isUpdateVersion:!1,enableClearTable:!0,clearOffset:1e3,clearLimit:11e3},yr=[k.FRONT,k.BACK],br={clientConfigName:"RemoteSDKConfig",configName:"downLinkCeilingRate"},Sr={clientConfigName:"RemoteSDKConfig",configName:"upLinkCeilingRate"},wr={clientConfigName:"mediaConfig",configName:"pvrxResolution"},Er={clientConfigName:"mediaConfig",configName:"pvtxResolution"},kr="pc",Ir="app",xr="sideBar",Cr="professional",Or={isForceSharedLayout:!0,localSharedMaxViewCount:4},Tr=["1x1","2x1","3x1","4x1","4x2","5x1","6x1","6x2","8x1","9x1"],_r=(N.RS180,N.RS360),Ar=N.RS720,Rr=N.RS1080,Nr=D.FR30,Dr=Rr,Lr={peopleRecResolution:_r,peopleSendResolution:_r,contentRecResolution:Ar,contentSendResolution:Ar},Pr={peopleRecResolution:Ar,peopleSendResolution:Ar,contentRecResolution:Rr,contentSendResolution:Rr},Mr={peopleRecResolution:Pr.peopleRecResolution,peopleSendResolution:Pr.peopleSendResolution,peopleRecFrameRate:Nr,peopleSendFrameRate:Nr,contentRecResolution:Pr.contentRecResolution,contentSendResolution:Pr.contentSendResolution,rxBandwidth:0,pTxBandwidth:0,cTxBandwidth:0},Ur={confNumber:"",password:"",displayName:"",muteAudio:!1,muteVideo:!1,__hideId:"",__monitorMode:""},jr={audioInputId:"",audioOutputId:"",videoInputId:""},Br=me.INCLUDE,Fr=me.EXCLUDE,Gr={screenAudio:!0,displaySurface:ge.MONITOR,preferCurrentTab:!1,monitorTypeSurfaces:Br,selfBrowserSurface:Fr,surfaceSwitching:Br,systemAudio:Br,controller:null,handleConfig:null},Kr={channelCount:!0,frameRate:!0,aspectRatio:!0,width:!0,height:!0},Vr={allowSpecifiedId:!0,isDefault:!1},Hr={videoInput:"Camera",audioInput:"Microphone",audioOutput:"Speaker"},zr={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","New soft device logging":"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:"您的账号在另一地点登录,您被迫下线","New soft device logging":"您的账号在另一地点登录,您被迫下线",SHARE_CONTENT_FAILED:"分享屏幕失败",LOCAL_NET_DISCONNECT:"网络中断,呼叫已断开",TOKEN_INVALID:"登录已失效,请重新登录","The device locked":"账号异常"},zh_TW:{default:"呼叫異常,請稍後重試",OK:"通話已結束",KickoutTipContent:"您的賬號在另一地點登錄,您被迫下線","New soft device logging":"您的賬號在另一地點登錄,您被迫下線",SHARE_CONTENT_FAILED:"分享屏幕失敗",LOCAL_NET_DISCONNECT:"網絡中斷,呼叫已斷開",TOKEN_INVALID:"登錄已失效,請重新登錄","The device locked":"賬號異常"}};function Yr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||We(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.")}()}r(7267),r(7389);var Wr=r(477),Xr=r.n(Wr);function qr(){return Xr()('(()=>{var t={738:(t,e,r)=>{"use strict";const n=r(3341),o=r(1185),i=r(5299);function a(t,e){switch(o(t)){case"object":return function(t,e){if("function"==typeof e)return e(t);if(e||i(t)){const r=new t.constructor;for(let n in t)r[n]=a(t[n],e);return r}return t}(t,e);case"array":return function(t,e){const r=new t.constructor(t.length);for(let n=0;n<t.length;n++)r[n]=a(t[n],e);return r}(t,e);default:return n(t)}}t.exports=a},1185:t=>{var e=Object.prototype.toString;function r(t){return"function"==typeof t.constructor?t.constructor.name:null}t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var n=typeof t;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(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(r(t)){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(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(n=e.call(t)){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,"")}},5299:(t,e,r)=>{"use strict";var n=r(7798);function o(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,r;return!1!==o(t)&&("function"==typeof(e=t.constructor)&&(!1!==o(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")))}},7798:t=>{"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},3341:(t,e,r)=>{"use strict";const n=Symbol.prototype.valueOf,o=r(9401);t.exports=function(t,e){switch(o(t)){case"array":return t.slice();case"object":return Object.assign({},t);case"date":return new t.constructor(Number(t));case"map":return new Map(t);case"set":return new Set(t);case"buffer":return function(t){const e=t.length,r=Buffer.allocUnsafe?Buffer.allocUnsafe(e):Buffer.from(e);return t.copy(r),r}(t);case"symbol":return function(t){return n?Object(n.call(t)):{}}(t);case"arraybuffer":return function(t){const e=new t.constructor(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}(t);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(t,e){return new t.constructor(t.buffer,t.byteOffset,t.length)}(t);case"regexp":return function(t){const e=void 0!==t.flags?t.flags:/\\w+$/.exec(t)||void 0,r=new t.constructor(t.source,e);return r.lastIndex=t.lastIndex,r}(t);case"error":return Object.create(t);default:return t}}},9401:t=>{var e=Object.prototype.toString;function r(t){return"function"==typeof t.constructor?t.constructor.name:null}t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var n=typeof t;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(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(r(t)){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(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(n=e.call(t)){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,"")}},7061:(t,e,r)=>{var n=r(8698).default;function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof S?e:S,i=Object.create(o.prototype),a=new D(n||[]);return s(i,"_invoke",{value:w(t,r,a)}),i}function v(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var h="suspendedStart",m="suspendedYield",y="executing",E="completed",g={};function S(){}function O(){}function T(){}var I={};p(I,c,(function(){return this}));var b=Object.getPrototypeOf,N=b&&b(b(k([])));N&&N!==i&&a.call(N,c)&&(I=N);var R=T.prototype=S.prototype=Object.create(I);function x(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,s,u){var c=v(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==n(l)&&a.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(l).then((function(t){f.value=t,s(f)}),(function(t){return r("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function w(t,r,n){var o=h;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===E){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=C(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=E,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=v(t,r,n);if("normal"===c.type){if(o=n.done?E:m,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=E,n.method="throw",n.arg=c.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a \'"+n+"\' method")),g;var i=v(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return O.prototype=T,s(R,"constructor",{value:T,configurable:!0}),s(T,"constructor",{value:O,configurable:!0}),O.displayName=p(T,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===O||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,T):(t.__proto__=T,p(t,l,"GeneratorFunction")),t.prototype=Object.create(R),t},r.awrap=function(t){return{__await:t}},x(A.prototype),p(A.prototype,f,(function(){return this})),r.AsyncIterator=A,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new A(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(R),p(R,l,"Generator"),p(R,c,(function(){return this})),p(R,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=k,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){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(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},8698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4687:(t,e,r)=>{var n=r(7061)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},509:(t,e,r)=>{"use strict";var n=r(9985),o=r(3691),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},2655:(t,e,r)=>{"use strict";var n=r(9429),o=r(3691),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a constructor")}},3550:(t,e,r)=>{"use strict";var n=r(9985),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw new i("Can\'t set "+o(t)+" as a prototype")}},7370:(t,e,r)=>{"use strict";var n=r(4201),o=r(5391),i=r(2560).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},1514:(t,e,r)=>{"use strict";var n=r(730).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},767:(t,e,r)=>{"use strict";var n=r(3622),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new o("Incorrect invocation")}},5027:(t,e,r)=>{"use strict";var n=r(8999),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},1655:(t,e,r)=>{"use strict";var n=r(3689);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},7612:(t,e,r)=>{"use strict";var n=r(2960).forEach,o=r(6834)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},1055:(t,e,r)=>{"use strict";var n=r(4071),o=r(2615),i=r(690),a=r(1228),s=r(3292),u=r(9429),c=r(6310),f=r(6522),l=r(5185),p=r(1664),d=Array;t.exports=function(t){var e=i(t),r=u(this),v=arguments.length,h=v>1?arguments[1]:void 0,m=void 0!==h;m&&(h=n(h,v>2?arguments[2]:void 0));var y,E,g,S,O,T,I=p(e),b=0;if(!I||this===d&&s(I))for(y=c(e),E=r?new this(y):d(y);y>b;b++)T=m?h(e[b],b):e[b],f(E,b,T);else for(O=(S=l(e,I)).next,E=r?new this:[];!(g=o(O,S)).done;b++)T=m?a(S,h,[g.value,b],!0):g.value,f(E,b,T);return E.length=b,E}},4328:(t,e,r)=>{"use strict";var n=r(5290),o=r(7578),i=r(6310),a=function(t){return function(e,r,a){var s,u=n(e),c=i(u),f=o(a,c);if(t&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2960:(t,e,r)=>{"use strict";var n=r(4071),o=r(8844),i=r(4413),a=r(690),s=r(6310),u=r(7120),c=o([].push),f=function(t){var e=1===t,r=2===t,o=3===t,f=4===t,l=6===t,p=7===t,d=5===t||l;return function(v,h,m,y){for(var E,g,S=a(v),O=i(S),T=n(h,m),I=s(O),b=0,N=y||u,R=e?N(v,I):r||p?N(v,0):void 0;I>b;b++)if((d||b in O)&&(g=T(E=O[b],b,S),t))if(e)R[b]=g;else if(g)switch(t){case 3:return!0;case 5:return E;case 6:return b;case 2:c(R,E)}else switch(t){case 4:return!1;case 7:c(R,E)}return l?-1:o||f?f:R}};t.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)}},9042:(t,e,r)=>{"use strict";var n=r(3689),o=r(4201),i=r(3615),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},6834:(t,e,r)=>{"use strict";var n=r(3689);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},9015:(t,e,r)=>{"use strict";var n=r(7578),o=r(6310),i=r(6522),a=Array,s=Math.max;t.exports=function(t,e,r){for(var u=o(t),c=n(e,u),f=n(void 0===r?u:r,u),l=a(s(f-c,0)),p=0;c<f;c++,p++)i(l,p,t[c]);return l.length=p,l}},6004:(t,e,r)=>{"use strict";var n=r(8844);t.exports=n([].slice)},5271:(t,e,r)=>{"use strict";var n=r(2297),o=r(9429),i=r(8999),a=r(4201)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===s||n(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},7120:(t,e,r)=>{"use strict";var n=r(5271);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},1228:(t,e,r)=>{"use strict";var n=r(5027),o=r(2125);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},6431:(t,e,r)=>{"use strict";var n=r(4201)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(t){return!1}var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},6648:(t,e,r)=>{"use strict";var n=r(8844),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},926:(t,e,r)=>{"use strict";var n=r(3043),o=r(9985),i=r(6648),a=r(4201)("toStringTag"),s=Object,u="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:u?i(e):"Object"===(n=i(e))&&o(e.callee)?"Arguments":n}},800:(t,e,r)=>{"use strict";var n=r(5391),o=r(4985),i=r(6045),a=r(4071),s=r(767),u=r(981),c=r(8734),f=r(1934),l=r(7807),p=r(4241),d=r(7697),v=r(5375).fastKey,h=r(618),m=h.set,y=h.getterFor;t.exports={getConstructor:function(t,e,r,f){var l=t((function(t,o){s(t,p),m(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(o)||c(o,t[f],{that:t,AS_ENTRIES:r})})),p=l.prototype,h=y(e),E=function(t,e,r){var n,o,i=h(t),a=g(t,e);return a?a.value=r:(i.last=a={index:o=v(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),d?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},g=function(t,e){var r,n=h(t),o=v(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return i(p,{clear:function(){for(var t=h(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,r=h(e),n=g(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=h(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),i(p,r?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return E(this,0===t?0:t,e)}}:{add:function(t){return E(this,t=0===t?0:t,t)}}),d&&o(p,"size",{configurable:!0,get:function(){return h(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=y(e),i=y(n);f(t,e,(function(t,e){m(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?l("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,l(void 0,!0))}),r?"entries":"values",!r,!0),p(e)}}},319:(t,e,r)=>{"use strict";var n=r(9989),o=r(9037),i=r(8844),a=r(5266),s=r(1880),u=r(5375),c=r(8734),f=r(767),l=r(9985),p=r(981),d=r(8999),v=r(3689),h=r(6431),m=r(5997),y=r(3457);t.exports=function(t,e,r){var E=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),S=E?"set":"add",O=o[t],T=O&&O.prototype,I=O,b={},N=function(t){var e=i(T[t]);s(T,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(g&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return g&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(g&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!l(O)||!(g||T.forEach&&!v((function(){(new O).entries().next()})))))I=r.getConstructor(e,t,E,S),u.enable();else if(a(t,!0)){var R=new I,x=R[S](g?{}:-0,1)!==R,A=v((function(){R.has(1)})),w=h((function(t){new O(t)})),C=!g&&v((function(){for(var t=new O,e=5;e--;)t[S](e,e);return!t.has(-0)}));w||((I=e((function(t,e){f(t,T);var r=y(new O,t,I);return p(e)||c(e,r[S],{that:r,AS_ENTRIES:E}),r}))).prototype=T,T.constructor=I),(A||C)&&(N("delete"),N("has"),E&&N("get")),(C||x)&&N(S),g&&T.clear&&delete T.clear}return b[t]=I,n({global:!0,constructor:!0,forced:I!==O},b),m(I,t),g||r.setStrong(I,t,E),I}},8758:(t,e,r)=>{"use strict";var n=r(6812),o=r(9152),i=r(2474),a=r(2560);t.exports=function(t,e,r){for(var s=o(e),u=a.f,c=i.f,f=0;f<s.length;f++){var l=s[f];n(t,l)||r&&n(r,l)||u(t,l,c(e,l))}}},7413:(t,e,r)=>{"use strict";var n=r(4201)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},1748:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},7807:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},5773:(t,e,r)=>{"use strict";var n=r(7697),o=r(2560),i=r(5684);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},5684:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6522:(t,e,r)=>{"use strict";var n=r(8360),o=r(2560),i=r(5684);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},4985:(t,e,r)=>{"use strict";var n=r(8702),o=r(2560);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},1880:(t,e,r)=>{"use strict";var n=r(9985),o=r(2560),i=r(8702),a=r(5014);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&i(r,c,s),s.global)u?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6045:(t,e,r)=>{"use strict";var n=r(1880);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},5014:(t,e,r)=>{"use strict";var n=r(9037),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},7697:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2659:t=>{"use strict";var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},6420:(t,e,r)=>{"use strict";var n=r(9037),o=r(8999),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},5565:t=>{"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6338:t=>{"use strict";t.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}},3265:(t,e,r)=>{"use strict";var n=r(6420)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},2532:(t,e,r)=>{"use strict";var n=r(8563),o=r(806);t.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},3127:t=>{"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8563:t=>{"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},3221:(t,e,r)=>{"use strict";var n=r(71);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4764:(t,e,r)=>{"use strict";var n=r(71);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},806:(t,e,r)=>{"use strict";var n=r(9037),o=r(6648);t.exports="process"===o(n.process)},7486:(t,e,r)=>{"use strict";var n=r(71);t.exports=/web0s(?!.*chrome)/i.test(n)},71:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:(t,e,r)=>{"use strict";var n,o,i=r(9037),a=r(71),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,f=c&&c.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]),t.exports=o},2739:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:(t,e,r)=>{"use strict";var n=r(9037),o=r(2474).f,i=r(5773),a=r(1880),s=r(5014),u=r(8758),c=r(5266);t.exports=function(t,e){var r,f,l,p,d,v=t.target,h=t.global,m=t.stat;if(r=h?n:m?n[v]||s(v,{}):(n[v]||{}).prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!c(h?f:v+(m?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(r,f,p,t)}}},3689:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8678:(t,e,r)=>{"use strict";r(4043);var n=r(6576),o=r(1880),i=r(6308),a=r(3689),s=r(4201),u=r(5773),c=s("species"),f=RegExp.prototype;t.exports=function(t,e,r,l){var p=s(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!==""[t](e)})),v=d&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!d||!v||r){var h=n(/./[p]),m=e(p,""[t],(function(t,e,r,o,a){var s=n(t),u=e.exec;return u===i||u===f.exec?d&&!a?{done:!0,value:h(e,r,o)}:{done:!0,value:s(r,e,o)}:{done:!1}}));o(String.prototype,t,m[0]),o(f,p,m[1])}l&&u(f[p],"sham",!0)}},1594:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1735:(t,e,r)=>{"use strict";var n=r(7215),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},4071:(t,e,r)=>{"use strict";var n=r(6576),o=r(509),i=r(7215),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},7215:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6761:(t,e,r)=>{"use strict";var n=r(8844),o=r(509),i=r(8999),a=r(6812),s=r(6004),u=r(7215),c=Function,f=n([].concat),l=n([].join),p={};t.exports=u?c.bind:function(t){var e=o(this),r=e.prototype,n=s(arguments,1),u=function(){var r=f(n,s(arguments));return this instanceof u?function(t,e,r){if(!a(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=c("C,a","return new C("+l(n,",")+")")}return p[e](t,r)}(e,r.length,r):e.apply(t,r)};return i(r)&&(u.prototype=r),u}},2615:(t,e,r)=>{"use strict";var n=r(7215),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},1236:(t,e,r)=>{"use strict";var n=r(7697),o=r(6812),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},2743:(t,e,r)=>{"use strict";var n=r(8844),o=r(509);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},6576:(t,e,r)=>{"use strict";var n=r(6648),o=r(8844);t.exports=function(t){if("Function"===n(t))return o(t)}},8844:(t,e,r)=>{"use strict";var n=r(7215),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},6058:(t,e,r)=>{"use strict";var n=r(9037),o=r(9985);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},1664:(t,e,r)=>{"use strict";var n=r(926),o=r(4849),i=r(981),a=r(9478),s=r(4201)("iterator");t.exports=function(t){if(!i(t))return o(t,s)||o(t,"@@iterator")||a[n(t)]}},5185:(t,e,r)=>{"use strict";var n=r(2615),o=r(509),i=r(5027),a=r(3691),s=r(1664),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(o(r))return i(n(r,t));throw new u(a(t)+" is not iterable")}},2643:(t,e,r)=>{"use strict";var n=r(8844),o=r(2297),i=r(9985),a=r(6648),s=r(4327),u=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var e=t.length,r=[],n=0;n<e;n++){var c=t[n];"string"==typeof c?u(r,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(r,s(c))}var f=r.length,l=!0;return function(t,e){if(l)return l=!1,e;if(o(this))return e;for(var n=0;n<f;n++)if(r[n]===t)return e}}}},4849:(t,e,r)=>{"use strict";var n=r(509),o=r(981);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},9037:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:(t,e,r)=>{"use strict";var n=r(8844),o=r(690),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},7248:t=>{"use strict";t.exports={}},920:t=>{"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},2688:(t,e,r)=>{"use strict";var n=r(6058);t.exports=n("document","documentElement")},8506:(t,e,r)=>{"use strict";var n=r(7697),o=r(3689),i=r(6420);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},4413:(t,e,r)=>{"use strict";var n=r(8844),o=r(3689),i=r(6648),a=Object,s=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):a(t)}:a},3457:(t,e,r)=>{"use strict";var n=r(9985),o=r(8999),i=r(9385);t.exports=function(t,e,r){var a,s;return i&&n(a=e.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(t,s),t}},6738:(t,e,r)=>{"use strict";var n=r(8844),o=r(9985),i=r(4091),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},5375:(t,e,r)=>{"use strict";var n=r(9989),o=r(8844),i=r(7248),a=r(8999),s=r(6812),u=r(2560).f,c=r(2741),f=r(6062),l=r(7049),p=r(4630),d=r(1594),v=!1,h=p("meta"),m=0,y=function(t){u(t,h,{value:{objectID:"O"+m++,weakData:{}}})},E=t.exports={enable:function(){E.enable=function(){},v=!0;var t=c.f,e=o([].splice),r={};r[h]=1,t(r).length&&(c.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===h){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,h)){if(!l(t))return"F";if(!e)return"E";y(t)}return t[h].objectID},getWeakData:function(t,e){if(!s(t,h)){if(!l(t))return!0;if(!e)return!1;y(t)}return t[h].weakData},onFreeze:function(t){return d&&v&&l(t)&&!s(t,h)&&y(t),t}};i[h]=!0},618:(t,e,r)=>{"use strict";var n,o,i,a=r(9834),s=r(9037),u=r(8999),c=r(5773),f=r(6812),l=r(4091),p=r(2713),d=r(7248),v="Object already initialized",h=s.TypeError,m=s.WeakMap;if(a||l.state){var y=l.state||(l.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw new h(v);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var E=p("state");d[E]=!0,n=function(t,e){if(f(t,E))throw new h(v);return e.facade=t,c(t,E,e),e},o=function(t){return f(t,E)?t[E]:{}},i=function(t){return f(t,E)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw new h("Incompatible receiver, "+t+" required");return r}}}},3292:(t,e,r)=>{"use strict";var n=r(4201),o=r(9478),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},2297:(t,e,r)=>{"use strict";var n=r(6648);t.exports=Array.isArray||function(t){return"Array"===n(t)}},9985:(t,e,r)=>{"use strict";var n=r(2659),o=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},9429:(t,e,r)=>{"use strict";var n=r(8844),o=r(3689),i=r(9985),a=r(926),s=r(6058),u=r(6738),c=function(){},f=[],l=s("Reflect","construct"),p=/^\\s*(?:class|function)\\b/,d=n(p.exec),v=!p.test(c),h=function(t){if(!i(t))return!1;try{return l(c,f,t),!0}catch(t){return!1}},m=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!d(p,u(t))}catch(t){return!0}};m.sham=!0,t.exports=!l||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?m:h},5266:(t,e,r)=>{"use strict";var n=r(3689),o=r(9985),i=/#|\\.prototype\\./,a=function(t,e){var r=u[s(t)];return r===f||r!==c&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},981:t=>{"use strict";t.exports=function(t){return null==t}},8999:(t,e,r)=>{"use strict";var n=r(9985),o=r(2659),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===i}:function(t){return"object"==typeof t?null!==t:n(t)}},3931:t=>{"use strict";t.exports=!1},1245:(t,e,r)=>{"use strict";var n=r(8999),o=r(6648),i=r(4201)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"===o(t))}},734:(t,e,r)=>{"use strict";var n=r(6058),o=r(9985),i=r(3622),a=r(9525),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},8734:(t,e,r)=>{"use strict";var n=r(4071),o=r(2615),i=r(5027),a=r(3691),s=r(3292),u=r(6310),c=r(3622),f=r(5185),l=r(1664),p=r(2125),d=TypeError,v=function(t,e){this.stopped=t,this.result=e},h=v.prototype;t.exports=function(t,e,r){var m,y,E,g,S,O,T,I=r&&r.that,b=!(!r||!r.AS_ENTRIES),N=!(!r||!r.IS_RECORD),R=!(!r||!r.IS_ITERATOR),x=!(!r||!r.INTERRUPTED),A=n(e,I),w=function(t){return m&&p(m,"normal",t),new v(!0,t)},C=function(t){return b?(i(t),x?A(t[0],t[1],w):A(t[0],t[1])):x?A(t,w):A(t)};if(N)m=t.iterator;else if(R)m=t;else{if(!(y=l(t)))throw new d(a(t)+" is not iterable");if(s(y)){for(E=0,g=u(t);g>E;E++)if((S=C(t[E]))&&c(h,S))return S;return new v(!1)}m=f(t,y)}for(O=N?t.next:m.next;!(T=o(O,m)).done;){try{S=C(T.value)}catch(t){p(m,"throw",t)}if("object"==typeof S&&S&&c(h,S))return S}return new v(!1)}},2125:(t,e,r)=>{"use strict";var n=r(2615),o=r(5027),i=r(4849);t.exports=function(t,e,r){var a,s;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return o(a),r}},974:(t,e,r)=>{"use strict";var n=r(2013).IteratorPrototype,o=r(5391),i=r(5684),a=r(5997),s=r(9478),u=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,f,!1,!0),s[f]=u,t}},1934:(t,e,r)=>{"use strict";var n=r(9989),o=r(2615),i=r(3931),a=r(1236),s=r(9985),u=r(974),c=r(1868),f=r(9385),l=r(5997),p=r(5773),d=r(1880),v=r(4201),h=r(9478),m=r(2013),y=a.PROPER,E=a.CONFIGURABLE,g=m.IteratorPrototype,S=m.BUGGY_SAFARI_ITERATORS,O=v("iterator"),T="keys",I="values",b="entries",N=function(){return this};t.exports=function(t,e,r,a,v,m,R){u(r,e,a);var x,A,w,C=function(t){if(t===v&&P)return P;if(!S&&t&&t in D)return D[t];switch(t){case T:case I:case b:return function(){return new r(this,t)}}return function(){return new r(this)}},L=e+" Iterator",_=!1,D=t.prototype,k=D[O]||D["@@iterator"]||v&&D[v],P=!S&&k||C(v),M="Array"===e&&D.entries||k;if(M&&(x=c(M.call(new t)))!==Object.prototype&&x.next&&(i||c(x)===g||(f?f(x,g):s(x[O])||d(x,O,N)),l(x,L,!0,!0),i&&(h[L]=N)),y&&v===I&&k&&k.name!==I&&(!i&&E?p(D,"name",I):(_=!0,P=function(){return o(k,this)})),v)if(A={values:C(I),keys:m?P:C(T),entries:C(b)},R)for(w in A)(S||_||!(w in D))&&d(D,w,A[w]);else n({target:e,proto:!0,forced:S||_},A);return i&&!R||D[O]===P||d(D,O,P,{name:v}),h[e]=P,A}},2013:(t,e,r)=>{"use strict";var n,o,i,a=r(3689),s=r(9985),u=r(8999),c=r(5391),f=r(1868),l=r(1880),p=r(4201),d=r(3931),v=p("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):h=!0),!u(n)||a((function(){var t={};return n[v].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[v])||l(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},9478:t=>{"use strict";t.exports={}},6310:(t,e,r)=>{"use strict";var n=r(3126);t.exports=function(t){return n(t.length)}},8702:(t,e,r)=>{"use strict";var n=r(8844),o=r(3689),i=r(9985),a=r(6812),s=r(7697),u=r(1236).CONFIGURABLE,c=r(6738),f=r(618),l=f.enforce,p=f.get,d=String,v=Object.defineProperty,h=n("".slice),m=n("".replace),y=n([].join),E=s&&!o((function(){return 8!==v((function(){}),"length",{value:8}).length})),g=String(String).split("String"),S=t.exports=function(t,e,r){"Symbol("===h(d(e),0,7)&&(e="["+m(d(e),/^Symbol\\(([^)]*)\\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),E&&r&&a(r,"arity")&&t.length!==r.arity&&v(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return a(n,"source")||(n.source=y(g,"string"==typeof e?e:"")),t};Function.prototype.toString=S((function(){return i(this)&&p(this).source||c(this)}),"toString")},8828:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},231:(t,e,r)=>{"use strict";var n,o,i,a,s,u=r(9037),c=r(4071),f=r(2474).f,l=r(9886).set,p=r(4410),d=r(4764),v=r(3221),h=r(7486),m=r(806),y=u.MutationObserver||u.WebKitMutationObserver,E=u.document,g=u.process,S=u.Promise,O=f(u,"queueMicrotask"),T=O&&O.value;if(!T){var I=new p,b=function(){var t,e;for(m&&(t=g.domain)&&t.exit();e=I.get();)try{e()}catch(t){throw I.head&&n(),t}t&&t.enter()};d||m||h||!y||!E?!v&&S&&S.resolve?((a=S.resolve(void 0)).constructor=S,s=c(a.then,a),n=function(){s(b)}):m?n=function(){g.nextTick(b)}:(l=c(l,u),n=function(){l(b)}):(o=!0,i=E.createTextNode(""),new y(b).observe(i,{characterData:!0}),n=function(){i.data=o=!o}),T=function(t){I.head||n(),I.add(t)}}t.exports=T},2582:(t,e,r)=>{"use strict";var n=r(509),o=TypeError,i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new o("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},2124:(t,e,r)=>{"use strict";var n=r(1245),o=TypeError;t.exports=function(t){if(n(t))throw new o("The method doesn\'t accept regular expressions");return t}},7897:(t,e,r)=>{"use strict";var n=r(9037),o=r(3689),i=r(8844),a=r(4327),s=r(1435).trim,u=r(6350),c=n.parseInt,f=n.Symbol,l=f&&f.iterator,p=/^[+-]?0x/i,d=i(p.exec),v=8!==c(u+"08")||22!==c(u+"0x16")||l&&!o((function(){c(Object(l))}));t.exports=v?function(t,e){var r=s(a(t));return c(r,e>>>0||(d(p,r)?16:10))}:c},5394:(t,e,r)=>{"use strict";var n=r(7697),o=r(8844),i=r(2615),a=r(3689),s=r(300),u=r(7518),c=r(9556),f=r(690),l=r(4413),p=Object.assign,d=Object.defineProperty,v=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!==p({},t)[r]||s(p({},e)).join("")!==o}))?function(t,e){for(var r=f(t),o=arguments.length,a=1,p=u.f,d=c.f;o>a;)for(var h,m=l(arguments[a++]),y=p?v(s(m),p(m)):s(m),E=y.length,g=0;E>g;)h=y[g++],n&&!i(d,m,h)||(r[h]=m[h]);return r}:p},5391:(t,e,r)=>{"use strict";var n,o=r(5027),i=r(8920),a=r(2739),s=r(7248),u=r(2688),c=r(6420),f=r(2713),l="prototype",p="script",d=f("IE_PROTO"),v=function(){},h=function(t){return"<"+p+">"+t+"</"+p+">"},m=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;y="undefined"!=typeof document?document.domain&&n?m(n):(e=c("iframe"),r="java"+p+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):m(n);for(var o=a.length;o--;)delete y[l][a[o]];return y()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[l]=o(t),r=new v,v[l]=null,r[d]=t):r=y(),void 0===e?r:i.f(r,e)}},8920:(t,e,r)=>{"use strict";var n=r(7697),o=r(5648),i=r(2560),a=r(5027),s=r(5290),u=r(300);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),o=u(e),c=o.length,f=0;c>f;)i.f(t,r=o[f++],n[r]);return t}},2560:(t,e,r)=>{"use strict";var n=r(7697),o=r(8506),i=r(5648),a=r(5027),s=r(8360),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=f(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},2474:(t,e,r)=>{"use strict";var n=r(7697),o=r(2615),i=r(9556),a=r(5684),s=r(5290),u=r(8360),c=r(6812),f=r(8506),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=u(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return a(!o(i.f,t,e),t[e])}},6062:(t,e,r)=>{"use strict";var n=r(6648),o=r(5290),i=r(2741).f,a=r(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return i(t)}catch(t){return a(s)}}(t):i(o(t))}},2741:(t,e,r)=>{"use strict";var n=r(4948),o=r(2739).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},7518:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},1868:(t,e,r)=>{"use strict";var n=r(6812),o=r(9985),i=r(690),a=r(2713),s=r(1748),u=a("IE_PROTO"),c=Object,f=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=i(t);if(n(e,u))return e[u];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},7049:(t,e,r)=>{"use strict";var n=r(3689),o=r(8999),i=r(6648),a=r(1655),s=Object.isExtensible,u=n((function(){s(1)}));t.exports=u||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!==i(t))&&(!s||s(t)))}:s},3622:(t,e,r)=>{"use strict";var n=r(8844);t.exports=n({}.isPrototypeOf)},4948:(t,e,r)=>{"use strict";var n=r(8844),o=r(6812),i=r(5290),a=r(4328).indexOf,s=r(7248),u=n([].push);t.exports=function(t,e){var r,n=i(t),c=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&u(f,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(f,r)||u(f,r));return f}},300:(t,e,r)=>{"use strict";var n=r(4948),o=r(2739);t.exports=Object.keys||function(t){return n(t,o)}},9556:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},9385:(t,e,r)=>{"use strict";var n=r(2743),o=r(5027),i=r(3550);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},9419:(t,e,r)=>{"use strict";var n=r(7697),o=r(3689),i=r(8844),a=r(1868),s=r(300),u=r(5290),c=i(r(9556).f),f=i([].push),l=n&&o((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),p=function(t){return function(e){for(var r,o=u(e),i=s(o),p=l&&null===a(o),d=i.length,v=0,h=[];d>v;)r=i[v++],n&&!(p?r in o:c(o,r))||f(h,t?[r,o[r]]:o[r]);return h}};t.exports={entries:p(!0),values:p(!1)}},5073:(t,e,r)=>{"use strict";var n=r(3043),o=r(926);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},5899:(t,e,r)=>{"use strict";var n=r(2615),o=r(9985),i=r(8999),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw new a("Can\'t convert object to primitive value")}},9152:(t,e,r)=>{"use strict";var n=r(6058),o=r(8844),i=r(2741),a=r(7518),s=r(5027),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=a.f;return r?u(e,r(t)):e}},496:(t,e,r)=>{"use strict";var n=r(9037);t.exports=n},9302:t=>{"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},7073:(t,e,r)=>{"use strict";var n=r(9037),o=r(7919),i=r(9985),a=r(5266),s=r(6738),u=r(4201),c=r(2532),f=r(8563),l=r(3931),p=r(3615),d=o&&o.prototype,v=u("species"),h=!1,m=i(n.PromiseRejectionEvent),y=a("Promise",(function(){var t=s(o),e=t!==String(o);if(!e&&66===p)return!0;if(l&&(!d.catch||!d.finally))return!0;if(!p||p<51||!/native code/.test(t)){var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[v]=n,!(h=r.then((function(){}))instanceof n))return!0}return!e&&(c||f)&&!m}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:m,SUBCLASSING:h}},7919:(t,e,r)=>{"use strict";var n=r(9037);t.exports=n.Promise},2945:(t,e,r)=>{"use strict";var n=r(5027),o=r(8999),i=r(2582);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},562:(t,e,r)=>{"use strict";var n=r(7919),o=r(6431),i=r(7073).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},4410:t=>{"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6100:(t,e,r)=>{"use strict";var n=r(2615),o=r(5027),i=r(9985),a=r(6648),s=r(6308),u=TypeError;t.exports=function(t,e){var r=t.exec;if(i(r)){var c=n(r,t,e);return null!==c&&o(c),c}if("RegExp"===a(t))return n(s,t,e);throw new u("RegExp#exec called on incompatible receiver")}},6308:(t,e,r)=>{"use strict";var n,o,i=r(2615),a=r(8844),s=r(4327),u=r(9633),c=r(7901),f=r(3430),l=r(5391),p=r(618).get,d=r(2100),v=r(6422),h=f("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,y=m,E=a("".charAt),g=a("".indexOf),S=a("".replace),O=a("".slice),T=(o=/b*/g,i(m,n=/a/,"a"),i(m,o,"a"),0!==n.lastIndex||0!==o.lastIndex),I=c.BROKEN_CARET,b=void 0!==/()??/.exec("")[1];(T||b||I||d||v)&&(y=function(t){var e,r,n,o,a,c,f,d=this,v=p(d),N=s(t),R=v.raw;if(R)return R.lastIndex=d.lastIndex,e=i(y,R,N),d.lastIndex=R.lastIndex,e;var x=v.groups,A=I&&d.sticky,w=i(u,d),C=d.source,L=0,_=N;if(A&&(w=S(w,"y",""),-1===g(w,"g")&&(w+="g"),_=O(N,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==E(N,d.lastIndex-1))&&(C="(?: "+C+")",_=" "+_,L++),r=new RegExp("^(?:"+C+")",w)),b&&(r=new RegExp("^"+C+"$(?!\\\\s)",w)),T&&(n=d.lastIndex),o=i(m,A?r:d,_),A?o?(o.input=O(o.input,L),o[0]=O(o[0],L),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:T&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),b&&o&&o.length>1&&i(h,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&x)for(o.groups=c=l(null),a=0;a<x.length;a++)c[(f=x[a])[0]]=o[f[1]];return o}),t.exports=y},9633:(t,e,r)=>{"use strict";var n=r(5027);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3477:(t,e,r)=>{"use strict";var n=r(2615),o=r(6812),i=r(3622),a=r(9633),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||o(t,"flags")||!i(s,t)?e:n(a,t)}},7901:(t,e,r)=>{"use strict";var n=r(3689),o=r(9037).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),s=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},2100:(t,e,r)=>{"use strict";var n=r(3689),o=r(9037).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.test("\\n")&&"s"===t.flags)}))},6422:(t,e,r)=>{"use strict";var n=r(3689),o=r(9037).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4684:(t,e,r)=>{"use strict";var n=r(981),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can\'t call method on "+t);return t}},8552:(t,e,r)=>{"use strict";var n,o=r(9037),i=r(1735),a=r(9985),s=r(3127),u=r(71),c=r(6004),f=r(1500),l=o.Function,p=/MSIE .\\./.test(u)||s&&((n=o.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return p?function(n,o){var s=f(arguments.length,1)>r,u=a(n)?n:l(n),p=s?c(arguments,r):[],d=s?function(){i(u,this,p)}:u;return e?t(d,o):t(d)}:t}},4241:(t,e,r)=>{"use strict";var n=r(6058),o=r(4985),i=r(4201),a=r(7697),s=i("species");t.exports=function(t){var e=n(t);a&&e&&!e[s]&&o(e,s,{configurable:!0,get:function(){return this}})}},5997:(t,e,r)=>{"use strict";var n=r(2560).f,o=r(6812),i=r(4201)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},2713:(t,e,r)=>{"use strict";var n=r(3430),o=r(4630),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4091:(t,e,r)=>{"use strict";var n=r(9037),o=r(5014),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},3430:(t,e,r)=>{"use strict";var n=r(3931),o=r(4091);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.3",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:(t,e,r)=>{"use strict";var n=r(5027),o=r(2655),i=r(981),a=r(4201)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||i(r=n(s)[a])?e:o(r)}},730:(t,e,r)=>{"use strict";var n=r(8844),o=r(8700),i=r(4327),a=r(4684),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,l=i(a(e)),p=o(r),d=l.length;return p<0||p>=d?t?"":void 0:(n=u(l,p))<55296||n>56319||p+1===d||(f=u(l,p+1))<56320||f>57343?t?s(l,p):n:t?c(l,p,p+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},534:(t,e,r)=>{"use strict";var n=r(8700),o=r(4327),i=r(4684),a=RangeError;t.exports=function(t){var e=o(i(this)),r="",s=n(t);if(s<0||s===1/0)throw new a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},5984:(t,e,r)=>{"use strict";var n=r(1236).PROPER,o=r(3689),i=r(6350);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},1435:(t,e,r)=>{"use strict";var n=r(8844),o=r(4684),i=r(4327),a=r(6350),s=n("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},146:(t,e,r)=>{"use strict";var n=r(3615),o=r(3689),i=r(9037).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3032:(t,e,r)=>{"use strict";var n=r(2615),o=r(6058),i=r(4201),a=r(1880);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=i("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return n(r,this)}),{arity:1})}},6549:(t,e,r)=>{"use strict";var n=r(146);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},9886:(t,e,r)=>{"use strict";var n,o,i,a,s=r(9037),u=r(1735),c=r(4071),f=r(9985),l=r(6812),p=r(3689),d=r(2688),v=r(6004),h=r(6420),m=r(1500),y=r(4764),E=r(806),g=s.setImmediate,S=s.clearImmediate,O=s.process,T=s.Dispatch,I=s.Function,b=s.MessageChannel,N=s.String,R=0,x={},A="onreadystatechange";p((function(){n=s.location}));var w=function(t){if(l(x,t)){var e=x[t];delete x[t],e()}},C=function(t){return function(){w(t)}},L=function(t){w(t.data)},_=function(t){s.postMessage(N(t),n.protocol+"//"+n.host)};g&&S||(g=function(t){m(arguments.length,1);var e=f(t)?t:I(t),r=v(arguments,1);return x[++R]=function(){u(e,void 0,r)},o(R),R},S=function(t){delete x[t]},E?o=function(t){O.nextTick(C(t))}:T&&T.now?o=function(t){T.now(C(t))}:b&&!y?(a=(i=new b).port2,i.port1.onmessage=L,o=c(a.postMessage,a)):s.addEventListener&&f(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!p(_)?(o=_,s.addEventListener("message",L,!1)):o=A in h("script")?function(t){d.appendChild(h("script"))[A]=function(){d.removeChild(this),w(t)}}:function(t){setTimeout(C(t),0)}),t.exports={set:g,clear:S}},3648:(t,e,r)=>{"use strict";var n=r(8844);t.exports=n(1..valueOf)},7578:(t,e,r)=>{"use strict";var n=r(8700),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5290:(t,e,r)=>{"use strict";var n=r(4413),o=r(4684);t.exports=function(t){return n(o(t))}},8700:(t,e,r)=>{"use strict";var n=r(8828);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},3126:(t,e,r)=>{"use strict";var n=r(8700),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},690:(t,e,r)=>{"use strict";var n=r(4684),o=Object;t.exports=function(t){return o(n(t))}},8732:(t,e,r)=>{"use strict";var n=r(2615),o=r(8999),i=r(734),a=r(4849),s=r(5899),u=r(4201),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,u=a(t,f);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!o(r)||i(r))return r;throw new c("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},8360:(t,e,r)=>{"use strict";var n=r(8732),o=r(734);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},3043:(t,e,r)=>{"use strict";var n={};n[r(4201)("toStringTag")]="z",t.exports="[object z]"===String(n)},4327:(t,e,r)=>{"use strict";var n=r(926),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},3691:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},4630:(t,e,r)=>{"use strict";var n=r(8844),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},9525:(t,e,r)=>{"use strict";var n=r(146);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:(t,e,r)=>{"use strict";var n=r(7697),o=r(3689);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:t=>{"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},9834:(t,e,r)=>{"use strict";var n=r(9037),o=r(9985),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},5405:(t,e,r)=>{"use strict";var n=r(496),o=r(6812),i=r(6145),a=r(2560).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},6145:(t,e,r)=>{"use strict";var n=r(4201);e.f=n},4201:(t,e,r)=>{"use strict";var n=r(9037),o=r(3430),i=r(6812),a=r(4630),s=r(146),u=r(9525),c=n.Symbol,f=o("wks"),l=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(c,t)?c[t]:l("Symbol."+t)),f[t]}},6350:t=>{"use strict";t.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},4338:(t,e,r)=>{"use strict";var n=r(9989),o=r(3689),i=r(2297),a=r(8999),s=r(690),u=r(6310),c=r(5565),f=r(6522),l=r(7120),p=r(9042),d=r(4201),v=r(3615),h=d("isConcatSpreadable"),m=v>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),y=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)};n({target:"Array",proto:!0,arity:1,forced:!m||!p("concat")},{concat:function(t){var e,r,n,o,i,a=s(this),p=l(a,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(y(i=-1===e?a:arguments[e]))for(o=u(i),c(d+o),r=0;r<o;r++,d++)r in i&&f(p,d,i[r]);else c(d+1),f(p,d++,i);return p.length=d,p}})},8077:(t,e,r)=>{"use strict";var n=r(9989),o=r(2960).filter;n({target:"Array",proto:!0,forced:!r(9042)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5728:(t,e,r)=>{"use strict";var n=r(9989),o=r(2960).find,i=r(7370),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},9693:(t,e,r)=>{"use strict";var n=r(9989),o=r(7612);n({target:"Array",proto:!0,forced:[].forEach!==o},{forEach:o})},7722:(t,e,r)=>{"use strict";var n=r(9989),o=r(1055);n({target:"Array",stat:!0,forced:!r(6431)((function(t){Array.from(t)}))},{from:o})},6801:(t,e,r)=>{"use strict";var n=r(9989),o=r(4328).includes,i=r(3689),a=r(7370);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},7195:(t,e,r)=>{"use strict";var n=r(9989),o=r(6576),i=r(4328).indexOf,a=r(6834),s=o([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!a("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:i(this,t,e)}})},4253:(t,e,r)=>{"use strict";r(9989)({target:"Array",stat:!0},{isArray:r(2297)})},752:(t,e,r)=>{"use strict";var n=r(5290),o=r(7370),i=r(9478),a=r(618),s=r(2560).f,u=r(1934),c=r(7807),f=r(3931),l=r(7697),p="Array Iterator",d=a.set,v=a.getterFor(p);t.exports=u(Array,"Array",(function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(t){}},886:(t,e,r)=>{"use strict";var n=r(9989),o=r(2960).map;n({target:"Array",proto:!0,forced:!r(9042)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},9730:(t,e,r)=>{"use strict";var n=r(9989),o=r(2297),i=r(9429),a=r(8999),s=r(7578),u=r(6310),c=r(5290),f=r(6522),l=r(4201),p=r(9042),d=r(6004),v=p("slice"),h=l("species"),m=Array,y=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(t,e){var r,n,l,p=c(this),v=u(p),E=s(t,v),g=s(void 0===e?v:e,v);if(o(p)&&(r=p.constructor,(i(r)&&(r===m||o(r.prototype))||a(r)&&null===(r=r[h]))&&(r=void 0),r===m||void 0===r))return d(p,E,g);for(n=new(void 0===r?m:r)(y(g-E,0)),l=0;E<g;E++,l++)E in p&&f(n,l,p[E]);return n.length=l,n}})},8742:(t,e,r)=>{"use strict";var n=r(9989),o=r(2960).some;n({target:"Array",proto:!0,forced:!r(6834)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},24:(t,e,r)=>{"use strict";var n=r(8844),o=r(1880),i=Date.prototype,a="Invalid Date",s="toString",u=n(i[s]),c=n(i.getTime);String(new Date(NaN))!==a&&o(i,s,(function(){var t=c(this);return t==t?u(this):a}))},1517:(t,e,r)=>{"use strict";var n=r(9989),o=r(6761);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},4284:(t,e,r)=>{"use strict";var n=r(7697),o=r(1236).EXISTS,i=r(8844),a=r(4985),s=Function.prototype,u=i(s.toString),c=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,f=i(c.exec);n&&!o&&a(s,"name",{configurable:!0,get:function(){try{return f(c,u(this))[1]}catch(t){return""}}})},5398:(t,e,r)=>{"use strict";var n=r(9989),o=r(9037);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},8324:(t,e,r)=>{"use strict";var n=r(9989),o=r(6058),i=r(1735),a=r(2615),s=r(8844),u=r(3689),c=r(9985),f=r(734),l=r(6004),p=r(2643),d=r(146),v=String,h=o("JSON","stringify"),m=s(/./.exec),y=s("".charAt),E=s("".charCodeAt),g=s("".replace),S=s(1..toString),O=/[\\uD800-\\uDFFF]/g,T=/^[\\uD800-\\uDBFF]$/,I=/^[\\uDC00-\\uDFFF]$/,b=!d||u((function(){var t=o("Symbol")("stringify detection");return"[null]"!==h([t])||"{}"!==h({a:t})||"{}"!==h(Object(t))})),N=u((function(){return\'"\\\\udf06\\\\ud834"\'!==h("\\udf06\\ud834")||\'"\\\\udead"\'!==h("\\udead")})),R=function(t,e){var r=l(arguments),n=p(e);if(c(n)||void 0!==t&&!f(t))return r[1]=function(t,e){if(c(n)&&(e=a(n,this,v(t),e)),!f(e))return e},i(h,null,r)},x=function(t,e,r){var n=y(r,e-1),o=y(r,e+1);return m(T,t)&&!m(I,o)||m(I,t)&&!m(T,n)?"\\\\u"+S(E(t,0),16):t};h&&n({target:"JSON",stat:!0,arity:3,forced:b||N},{stringify:function(t,e,r){var n=l(arguments),o=i(b?R:h,null,n);return N&&"string"==typeof o?g(o,O,x):o}})},9322:(t,e,r)=>{"use strict";r(319)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(800))},6646:(t,e,r)=>{"use strict";r(9322)},9288:(t,e,r)=>{"use strict";var n=r(9989),o=r(3931),i=r(7697),a=r(9037),s=r(496),u=r(8844),c=r(5266),f=r(6812),l=r(3457),p=r(3622),d=r(734),v=r(8732),h=r(3689),m=r(2741).f,y=r(2474).f,E=r(2560).f,g=r(3648),S=r(1435).trim,O="Number",T=a[O],I=s[O],b=T.prototype,N=a.TypeError,R=u("".slice),x=u("".charCodeAt),A=function(t){var e,r,n,o,i,a,s,u,c=v(t,"number");if(d(c))throw new N("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=S(c),43===(e=x(c,0))||45===e){if(88===(r=x(c,2))||120===r)return NaN}else if(48===e){switch(x(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=R(c,2)).length,s=0;s<a;s++)if((u=x(i,s))<48||u>o)return NaN;return parseInt(i,n)}return+c},w=c(O,!T(" 0o1")||!T("0b1")||T("+0x1")),C=function(t){var e,r=arguments.length<1?0:T(function(t){var e=v(t,"number");return"bigint"==typeof e?e:A(e)}(t));return p(b,e=this)&&h((function(){g(e)}))?l(Object(r),this,C):r};C.prototype=b,w&&!o&&(b.constructor=C),n({global:!0,constructor:!0,wrap:!0,forced:w},{Number:C});var L=function(t,e){for(var r,n=i?m(e):"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(e,r=n[o])&&!f(t,r)&&E(t,r,y(e,r))};o&&I&&L(s[O],I),(w||o)&&L(s[O],T)},7389:(t,e,r)=>{"use strict";var n=r(9989),o=r(8844),i=r(8700),a=r(3648),s=r(534),u=r(3689),c=RangeError,f=String,l=Math.floor,p=o(s),d=o("".slice),v=o(1..toFixed),h=function(t,e,r){return 0===e?r:e%2==1?h(t,e-1,r*t):h(t*t,e/2,r)},m=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=l(o/1e7)},y=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=l(n/e),n=n%e*1e7},E=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=f(t[e]);r=""===r?n:r+p("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==v(8e-5,3)||"1"!==v(.9,0)||"1.25"!==v(1.255,2)||"1000000000000000128"!==v(0xde0b6b3a7640080,0)}))||!u((function(){v({})}))},{toFixed:function(t){var e,r,n,o,s=a(this),u=i(t),l=[0,0,0,0,0,0],v="",g="0";if(u<0||u>20)throw new c("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=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(s*h(2,69,1))-69)<0?s*h(2,-e,1):s/h(2,e,1),r*=4503599627370496,(e=52-e)>0){for(m(l,0,r),n=u;n>=7;)m(l,1e7,0),n-=7;for(m(l,h(10,n,1),0),n=e-1;n>=23;)y(l,1<<23),n-=23;y(l,1<<n),m(l,1,1),y(l,2),g=E(l)}else m(l,0,r),m(l,1<<-e,0),g=E(l)+p("0",u);return g=u>0?v+((o=g.length)<=u?"0."+p("0",u-o)+g:d(g,0,o-u)+"."+d(g,o-u)):v+g}})},429:(t,e,r)=>{"use strict";var n=r(9989),o=r(5394);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9434:(t,e,r)=>{"use strict";var n=r(9989),o=r(146),i=r(3689),a=r(7518),s=r(690);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},9358:(t,e,r)=>{"use strict";var n=r(9989),o=r(690),i=r(300);n({target:"Object",stat:!0,forced:r(3689)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},228:(t,e,r)=>{"use strict";var n=r(3043),o=r(1880),i=r(5073);n||o(Object.prototype,"toString",i,{unsafe:!0})},6466:(t,e,r)=>{"use strict";var n=r(9989),o=r(9419).values;n({target:"Object",stat:!0},{values:function(t){return o(t)}})},2320:(t,e,r)=>{"use strict";var n=r(9989),o=r(7897);n({global:!0,forced:parseInt!==o},{parseInt:o})},1692:(t,e,r)=>{"use strict";var n=r(9989),o=r(2615),i=r(509),a=r(2582),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{all:function(t){var e=this,r=a.f(e),n=r.resolve,c=r.reject,f=s((function(){var r=i(e.resolve),a=[],s=0,f=1;u(t,(function(t){var i=s++,u=!1;f++,o(r,e,t).then((function(t){u||(u=!0,a[i]=t,--f||n(a))}),c)})),--f||n(a)}));return f.error&&c(f.value),r.promise}})},5089:(t,e,r)=>{"use strict";var n=r(9989),o=r(3931),i=r(7073).CONSTRUCTOR,a=r(7919),s=r(6058),u=r(9985),c=r(1880),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&u(a)){var l=s("Promise").prototype.catch;f.catch!==l&&c(f,"catch",l,{unsafe:!0})}},6697:(t,e,r)=>{"use strict";var n,o,i,a=r(9989),s=r(3931),u=r(806),c=r(9037),f=r(2615),l=r(1880),p=r(9385),d=r(5997),v=r(4241),h=r(509),m=r(9985),y=r(8999),E=r(767),g=r(6373),S=r(9886).set,O=r(231),T=r(920),I=r(9302),b=r(4410),N=r(618),R=r(7919),x=r(7073),A=r(2582),w="Promise",C=x.CONSTRUCTOR,L=x.REJECTION_EVENT,_=x.SUBCLASSING,D=N.getterFor(w),k=N.set,P=R&&R.prototype,M=R,U=P,j=c.TypeError,F=c.document,V=c.process,W=A.f,G=W,B=!!(F&&F.createEvent&&c.dispatchEvent),H="unhandledrejection",K=function(t){var e;return!(!y(t)||!m(e=t.then))&&e},z=function(t,e){var r,n,o,i=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,l=t.domain;try{s?(a||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=i:(l&&l.enter(),r=s(i),l&&(l.exit(),o=!0)),r===t.promise?c(new j("Promise-chain cycle")):(n=K(r))?f(n,r,u,c):u(r)):c(i)}catch(t){l&&!o&&l.exit(),c(t)}},Y=function(t,e){t.notified||(t.notified=!0,O((function(){for(var r,n=t.reactions;r=n.get();)z(r,t);t.notified=!1,e&&!t.rejection&&$(t)})))},X=function(t,e,r){var n,o;B?((n=F.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!L&&(o=c["on"+t])?o(n):t===H&&T("Unhandled promise rejection",r)},$=function(t){f(S,c,(function(){var e,r=t.facade,n=t.value;if(q(t)&&(e=I((function(){u?V.emit("unhandledRejection",n,r):X(H,r,n)})),t.rejection=u||q(t)?2:1,e.error))throw e.value}))},q=function(t){return 1!==t.rejection&&!t.parent},J=function(t){f(S,c,(function(){var e=t.facade;u?V.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},Q=function(t,e,r){return function(n){t(e,n,r)}},Z=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Y(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new j("Promise can\'t be resolved itself");var n=K(e);n?O((function(){var r={done:!1};try{f(n,e,Q(tt,r,t),Q(Z,r,t))}catch(e){Z(r,e,t)}})):(t.value=e,t.state=1,Y(t,!1))}catch(e){Z({done:!1},e,t)}}};if(C&&(U=(M=function(t){E(this,U),h(t),f(n,this);var e=D(this);try{t(Q(tt,e),Q(Z,e))}catch(t){Z(e,t)}}).prototype,(n=function(t){k(this,{type:w,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:0,value:void 0})}).prototype=l(U,"then",(function(t,e){var r=D(this),n=W(g(this,M));return r.parent=!0,n.ok=!m(t)||t,n.fail=m(e)&&e,n.domain=u?V.domain:void 0,0===r.state?r.reactions.add(n):O((function(){z(n,r)})),n.promise})),o=function(){var t=new n,e=D(t);this.promise=t,this.resolve=Q(tt,e),this.reject=Q(Z,e)},A.f=W=function(t){return t===M||undefined===t?new o(t):G(t)},!s&&m(R)&&P!==Object.prototype)){i=P.then,_||l(P,"then",(function(t,e){var r=this;return new M((function(t,e){f(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete P.constructor}catch(t){}p&&p(P,U)}a({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:M}),d(M,w,!1,!0),v(w)},3964:(t,e,r)=>{"use strict";r(6697),r(1692),r(5089),r(8829),r(2092),r(7905)},8829:(t,e,r)=>{"use strict";var n=r(9989),o=r(2615),i=r(509),a=r(2582),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{race:function(t){var e=this,r=a.f(e),n=r.reject,c=s((function(){var a=i(e.resolve);u(t,(function(t){o(a,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},2092:(t,e,r)=>{"use strict";var n=r(9989),o=r(2615),i=r(2582);n({target:"Promise",stat:!0,forced:r(7073).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},7905:(t,e,r)=>{"use strict";var n=r(9989),o=r(6058),i=r(3931),a=r(7919),s=r(7073).CONSTRUCTOR,u=r(2945),c=o("Promise"),f=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(t){return u(f&&this===c?a:this,t)}})},4043:(t,e,r)=>{"use strict";var n=r(9989),o=r(6308);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},2826:(t,e,r)=>{"use strict";var n=r(1236).PROPER,o=r(1880),i=r(5027),a=r(4327),s=r(3689),u=r(3477),c="toString",f=RegExp.prototype[c],l=s((function(){return"/a/b"!==f.call({source:"a",flags:"b"})})),p=n&&f.name!==c;(l||p)&&o(RegExp.prototype,c,(function(){var t=i(this);return"/"+a(t.source)+"/"+a(u(t))}),{unsafe:!0})},7985:(t,e,r)=>{"use strict";r(319)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(800))},9649:(t,e,r)=>{"use strict";r(7985)},3843:(t,e,r)=>{"use strict";var n=r(9989),o=r(8844),i=r(2124),a=r(4684),s=r(4327),u=r(7413),c=o("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(a(this)),s(i(t)),arguments.length>1?arguments[1]:void 0)}})},1694:(t,e,r)=>{"use strict";var n=r(730).charAt,o=r(4327),i=r(618),a=r(1934),s=r(7807),u="String Iterator",c=i.set,f=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=f(this),r=e.string,o=e.index;return o>=r.length?s(void 0,!0):(t=n(r,o),e.index+=t.length,s(t,!1))}))},2462:(t,e,r)=>{"use strict";var n=r(2615),o=r(8678),i=r(5027),a=r(981),s=r(3126),u=r(4327),c=r(4684),f=r(4849),l=r(1514),p=r(6100);o("match",(function(t,e,r){return[function(e){var r=c(this),o=a(e)?void 0:f(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),a=r(e,n,o);if(a.done)return a.value;if(!n.global)return p(n,o);var c=n.unicode;n.lastIndex=0;for(var f,d=[],v=0;null!==(f=p(n,o));){var h=u(f[0]);d[v]=h,""===h&&(n.lastIndex=l(o,s(n.lastIndex),c)),v++}return 0===v?null:d}]}))},8436:(t,e,r)=>{"use strict";var n=r(9989),o=r(1435).trim;n({target:"String",proto:!0,forced:r(5984)("trim")},{trim:function(){return o(this)}})},7855:(t,e,r)=>{"use strict";var n=r(9989),o=r(9037),i=r(2615),a=r(8844),s=r(3931),u=r(7697),c=r(146),f=r(3689),l=r(6812),p=r(3622),d=r(5027),v=r(5290),h=r(8360),m=r(4327),y=r(5684),E=r(5391),g=r(300),S=r(2741),O=r(6062),T=r(7518),I=r(2474),b=r(2560),N=r(8920),R=r(9556),x=r(1880),A=r(4985),w=r(3430),C=r(2713),L=r(7248),_=r(4630),D=r(4201),k=r(6145),P=r(5405),M=r(3032),U=r(5997),j=r(618),F=r(2960).forEach,V=C("hidden"),W="Symbol",G="prototype",B=j.set,H=j.getterFor(W),K=Object[G],z=o.Symbol,Y=z&&z[G],X=o.RangeError,$=o.TypeError,q=o.QObject,J=I.f,Q=b.f,Z=O.f,tt=R.f,et=a([].push),rt=w("symbols"),nt=w("op-symbols"),ot=w("wks"),it=!q||!q[G]||!q[G].findChild,at=function(t,e,r){var n=J(K,e);n&&delete K[e],Q(t,e,r),n&&t!==K&&Q(K,e,n)},st=u&&f((function(){return 7!==E(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?at:Q,ut=function(t,e){var r=rt[t]=E(Y);return B(r,{type:W,tag:t,description:e}),u||(r.description=e),r},ct=function(t,e,r){t===K&&ct(nt,e,r),d(t);var n=h(e);return d(r),l(rt,n)?(r.enumerable?(l(t,V)&&t[V][n]&&(t[V][n]=!1),r=E(r,{enumerable:y(0,!1)})):(l(t,V)||Q(t,V,y(1,{})),t[V][n]=!0),st(t,n,r)):Q(t,n,r)},ft=function(t,e){d(t);var r=v(e),n=g(r).concat(vt(r));return F(n,(function(e){u&&!i(lt,r,e)||ct(t,e,r[e])})),t},lt=function(t){var e=h(t),r=i(tt,this,e);return!(this===K&&l(rt,e)&&!l(nt,e))&&(!(r||!l(this,e)||!l(rt,e)||l(this,V)&&this[V][e])||r)},pt=function(t,e){var r=v(t),n=h(e);if(r!==K||!l(rt,n)||l(nt,n)){var o=J(r,n);return!o||!l(rt,n)||l(r,V)&&r[V][n]||(o.enumerable=!0),o}},dt=function(t){var e=Z(v(t)),r=[];return F(e,(function(t){l(rt,t)||l(L,t)||et(r,t)})),r},vt=function(t){var e=t===K,r=Z(e?nt:v(t)),n=[];return F(r,(function(t){!l(rt,t)||e&&!l(K,t)||et(n,rt[t])})),n};c||(x(Y=(z=function(){if(p(Y,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=_(t),r=function(t){var n=void 0===this?o:this;n===K&&i(r,nt,t),l(n,V)&&l(n[V],e)&&(n[V][e]=!1);var a=y(1,t);try{st(n,e,a)}catch(t){if(!(t instanceof X))throw t;at(n,e,a)}};return u&&it&&st(K,e,{configurable:!0,set:r}),ut(e,t)})[G],"toString",(function(){return H(this).tag})),x(z,"withoutSetter",(function(t){return ut(_(t),t)})),R.f=lt,b.f=ct,N.f=ft,I.f=pt,S.f=O.f=dt,T.f=vt,k.f=function(t){return ut(D(t),t)},u&&(A(Y,"description",{configurable:!0,get:function(){return H(this).description}}),s||x(K,"propertyIsEnumerable",lt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),F(g(ot),(function(t){P(t)})),n({target:W,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?E(t):ft(E(t),e)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:pt}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),M(),U(z,W),L[V]=!0},6544:(t,e,r)=>{"use strict";var n=r(9989),o=r(7697),i=r(9037),a=r(8844),s=r(6812),u=r(9985),c=r(3622),f=r(4327),l=r(4985),p=r(8758),d=i.Symbol,v=d&&d.prototype;if(o&&u(d)&&(!("description"in v)||void 0!==d().description)){var h={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=c(v,this)?new d(t):void 0===t?d():d(t);return""===t&&(h[e]=!0),e};p(m,d),m.prototype=v,v.constructor=m;var y="Symbol(description detection)"===String(d("description detection")),E=a(v.valueOf),g=a(v.toString),S=/^Symbol\\((.*)\\)[^)]+$/,O=a("".replace),T=a("".slice);l(v,"description",{configurable:!0,get:function(){var t=E(this);if(s(h,t))return"";var e=g(t),r=y?T(e,7,-1):O(e,S,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},3975:(t,e,r)=>{"use strict";var n=r(9989),o=r(6058),i=r(6812),a=r(4327),s=r(3430),u=r(6549),c=s("string-to-symbol-registry"),f=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(i(c,e))return c[e];var r=o("Symbol")(e);return c[e]=r,f[r]=e,r}})},4254:(t,e,r)=>{"use strict";r(5405)("iterator")},9749:(t,e,r)=>{"use strict";r(7855),r(3975),r(1445),r(8324),r(9434)},1445:(t,e,r)=>{"use strict";var n=r(9989),o=r(6812),i=r(734),a=r(3691),s=r(3430),u=r(6549),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!i(t))throw new TypeError(a(t)+" is not a symbol");if(o(c,t))return c[t]}})},8832:(t,e,r)=>{"use strict";r(5398)},7522:(t,e,r)=>{"use strict";var n=r(9037),o=r(6338),i=r(3265),a=r(7612),s=r(5773),u=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var c in o)o[c]&&u(n[c]&&n[c].prototype);u(i)},6265:(t,e,r)=>{"use strict";var n=r(9037),o=r(6338),i=r(3265),a=r(752),s=r(5773),u=r(4201),c=u("iterator"),f=u("toStringTag"),l=a.values,p=function(t,e){if(t){if(t[c]!==l)try{s(t,c,l)}catch(e){t[c]=l}if(t[f]||s(t,f,e),o[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},209:(t,e,r)=>{"use strict";var n=r(9989),o=r(9037),i=r(8552)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},3509:(t,e,r)=>{"use strict";var n=r(9989),o=r(9037),i=r(8552)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},6869:(t,e,r)=>{"use strict";r(209),r(3509)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t,e,n,o,i,a,s,u,c,f,l,p,d,v,h,m,y,E,g,S,O,T,I,b,N,R,x,A,w,C,L,_,D,k,P,M,U,j,F,V,W,G,B,H,K,z,Y,X,$,q,J,Q,Z,tt,et,rt,nt,ot,it,at,st,ut,ct,ft,lt,pt,dt,vt,ht,mt,yt,Et,gt,St,Ot,Tt,It,bt,Nt,Rt,xt;function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function Ct(t){var e=function(t,e){if("object"!==wt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===wt(e)?e:String(e)}function Lt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function _t(t,e,r){return e&&Lt(t.prototype,e),r&&Lt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}!function(t){t.XY_ABILITY="XY-ABILITY",t.XY_LOG_SERVER="xy-log-server",t.XY_ERROR_CODE="xy-error-code",t.XY_I18N_CODE="xy-i18n-code",t.XY_TIMESTAMP="xy-timestamp"}(t||(t={})),function(t){t.CONTENT="CONTENT",t.PIPE="PIPE",t.VIDEO="VIDEO",t.AUDIO="AUDIO",t.VIDEO_AUDIO="VIDEO_AUDIO",t.VIDEO_AUDIO_PIPE="VIDEO_AUDIO_PIPE"}(e||(e={})),function(t){t.INIT="INIT",t.CAPTURE="CAPTURE",t.PENDING="PENDING",t.STARTING="STARTING",t.SWITCHING="SWITCHING",t.PAUSE="PAUSE",t.ENDED="ENDED"}(n||(n={})),function(t){t.MUTE_AUDIO="muteAudio",t.UNMUTE_AUDIO="unmuteAudio",t.MUTE_VIDEO="muteVideo",t.UNMUTE_VIDEO="unmuteVideo"}(o||(o={})),function(t){t.NONE="NONE",t.AUDIO="AUDIO",t.VIDEO="VIDEO",t.BOTH="BOTH"}(i||(i={})),function(t){t.UNKNOWN="UNKNOWN",t.CONNECTING="CONNECTING",t.ENDED="ENDED",t.CONNECTED="CONNECTED"}(a||(a={})),function(t){t.AUTO="AUTO",t.CUSTOM="CUSTOM"}(s||(s={})),function(t){t.RECORD_STATE_IDLE="RECORD_STATE_IDLE",t.RECORD_STATE_STARTING="RECORD_STATE_STARTING",t.RECORD_STATE_STARTED="RECORD_STATE_STARTED",t.RECORD_STATE_STOPING="RECORD_STATE_STOPING"}(u||(u={})),function(t){t[t.NONE=0]="NONE",t[t.LOCAL_START=1]="LOCAL_START",t[t.REMOTE_STAR=2]="REMOTE_STAR",t[t.REMOTE_PAUSED=3]="REMOTE_PAUSED"}(c||(c={})),function(t){t.FRONT="FRONT",t.BACK="BACK"}(f||(f={})),function(t){t.DIALOG="dialog",t.NORMAL="normal"}(l||(l={})),function(t){t.START="start",t.STOP="stop"}(p||(p={})),function(t){t.STA_CONFSTATUS="sta-confStatus",t.OPER_CONFOPERATION="oper-confOperation",t.STA_MSGCALLBACK="sta-msgCallback",t.OPER_SETTING="oper-setting"}(d||(d={})),function(t){t.CALL_IN="callIn",t.LAYOUT="layout",t.CONTENT="content",t.AUDIO_MUTE="audioMute",t.AUDIO_UNMUTE="audioUnmute",t.VIDEO_MUTE="videoMute",t.VIDEO_UNMUTE="videoUnmute",t.SUBTITLE="subtitle",t.COMPLEX_CAPABILITIES="complexCapabilities",t.MMS_CAPABILITIES="mmsCapabilities"}(v||(v={})),function(t){t.VIDEO="video",t.AUDIO="audio"}(h||(h={})),function(t){t.NORMAL="NORMAL",t.FAILED="FAILED",t.DISABLED="DISABLED",t.UNKNOWN="UNKNOWN"}(m||(m={})),function(t){t.NORMAL="NORMAL",t.NORMAL_VIDEO="NORMAL_VIDEO",t.NORMAL_AUDIO="NORMAL_AUDIO",t.RECEIVE_ONLY="RECEIVE_ONLY",t.FAILED="FAILED",t.UNKNOWN="UNKNOWN"}(y||(y={})),function(t){t.CONTENT="CONTENT",t.PREVIEW="PREVIEW",t.PIPELINE="PIPELINE",t.REMOTE="REMOTE"}(E||(E={})),function(t){t[t.RS90=90]="RS90",t[t.RS180=180]="RS180",t[t.RS360=360]="RS360",t[t.RS720=720]="RS720",t[t.RS1080=1080]="RS1080"}(g||(g={})),function(t){t[t.FR30=30]="FR30",t[t.FR15=15]="FR15",t[t.FR8=8]="FR8"}(S||(S={})),function(t){t[t.LEVEL90=0]="LEVEL90",t[t.LEVEL180=1]="LEVEL180",t[t.LEVEL360=2]="LEVEL360",t[t.LEVEL720=3]="LEVEL720",t[t.LEVEL1080=4]="LEVEL1080"}(O||(O={})),function(t){t[t.LOW=0]="LOW",t[t.NORMAL=1]="NORMAL",t[t.HIGH=2]="HIGH"}(T||(T={})),function(t){t.VIDEO="VIDEO",t.AUDIO="AUDIO",t.ALL="ALL"}(I||(I={})),function(t){t.SDK="SDK",t.CUSTOM="CUSTOM"}(b||(b={})),function(t){t.COMMON="COMMON",t.ADVANCED="ADVANCED",t.FAILED="FAILED"}(N||(N={})),function(t){t.MULTI_RES="MULTI_RESOLUTION",t.SCALE_RES="SCALE_RESOLUTION"}(R||(R={})),function(t){t.VERY_LOW="very-low",t.LOW="low",t.MEDIUM="medium",t.HIGH="high"}(x||(x={})),function(t){t.CAPTURE="CAPTURE",t.KEEP="KEEP",t.FAILED="FAILED"}(A||(A={})),function(t){t.ACQUIRING="ACQUIRING",t.SENDING="SENDING",t.IDLE="IDLE"}(w||(w={})),function(t){t.CONTENT="0",t.ALL="1"}(C||(C={})),function(t){t.NONE="0",t.WITH="1"}(L||(L={})),function(t){t.DOWNLINK="DOWNLINK",t.UPLINK="UPLINK",t.ALL="ALL",t.PEOPLE_DOWNLINK="PEOPLE_DOWNLINK",t.PEOPLE_UPLINK="PEOPLE_UPLINK",t.CONTENT_DOWNLINK="CONTENT_DOWNLINK",t.CONTENT_UPLINK="CONTENT_UPLINK"}(_||(_={})),function(t){t.VOTE_SIGNATURE_START="VOTE_SIGNATURE_START",t.VOTE_SIGNATURE_STOP="VOTE_SIGNATURE_STOP"}(D||(D={})),function(t){t[t.SIGN_IN=2]="SIGN_IN"}(k||(k={})),function(t){t.CHECK_IN="CHECK_IN"}(P||(P={})),function(t){t.NONE="none",t.ON="on",t.OFF="off"}(M||(M={})),function(t){t.NONE="none",t.ON="on",t.OFF="off"}(U||(U={})),function(t){t.ON="on",t.OFF="off"}(j||(j={})),function(t){t.SPEAKER="SPEAKER",t.GALLERY="GALLERY"}(F||(F={})),function(t){t.MULTI_PIC_CONTENT_HIGH_PRIORITY="MULTI_PIC_CONTENT_HIGH_PRIORITY",t.MULTI_PIC_ACTIVE_HIGH_PRIORITY="MULTI_PIC_ACTIVE_HIGH_PRIORITY",t.TWO_PIC_PIP="TWO_PIC_PIP",t.CONTENT_ONLY="CONTENT_ONLY",t.TWO_PIC_SYMMETRIC="TWO_PIC_SYMMETRIC"}(V||(V={})),function(t){t.LOCAL="LOCAL",t.CONTENT="CONTENT",t.PEOPLE="PEOPLE",t.CHAIRMAN="CHAIRMAN",t.NONE="NONE"}(W||(W={})),function(t){t[t.NONE=-1]="NONE",t[t.MOBILE_HORIZONTAL=0]="MOBILE_HORIZONTAL",t[t.MOBILE_VERTICAL=1]="MOBILE_VERTICAL"}(G||(G={})),function(t){t[t.NONE=0]="NONE",t[t.USER=1]="USER",t[t.MEETING=2]="MEETING"}(B||(B={})),function(t){t.NONE="",t.MAIN_VENUE="mainVenue",t.FOCUS_MODE="focusMode"}(H||(H={})),function(t){t[t.Bad=1]="Bad",t[t.Poor=2]="Poor",t[t.Good=3]="Good",t[t.Excellent=4]="Excellent"}(K||(K={})),function(t){t.STATS="STATS",t.INIT="INIT",t.DESTROY="DESTROY",t.STATS_VIDEO_RECEIVER="STATS_VIDEO_RECEIVER",t.STATS_AUDIO_RECEIVER="STATS_AUDIO_RECEIVER",t.STATS_SENDER="STATS_SENDER",t.INTERNALS="INTERNALS",t.REPORT_INTERNALS="REPORT_INTERNALS",t.REPORT_NETWORK_LEVEL="REPORT_NETWORK_LEVEL"}(z||(z={})),function(t){t.INACTIVE="inactive",t.RECVONLY="recvonly",t.SENDONLY="sendonly",t.SENDRECV="sendrecv"}(Y||(Y={})),function(t){t.new="new",t.connecting="connecting",t.connected="connected",t.disconnected="disconnected",t.failed="failed",t.closed="closed",t.unknown="unknown"}(X||(X={})),function(t){t.new="new",t.checking="checking",t.connected="connected",t.disconnected="disconnected",t.completed="completed",t.failed="failed",t.closed="closed",t.unknown="unknown"}($||($={})),function(t){t.INIT="INIT",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING",t.SOCKET_CONNECTING="SOCKET_CONNECTING",t.DISCONNECTED="DISCONNECTED",t.RESTART="RESTART",t.RECONNECTED="RECONNECTED",t.FAILED="FAILED"}(q||(q={})),function(t){t.MEDIA="MEDIA",t.PEER="PEER",t.INIT="INIT"}(J||(J={})),function(t){t.LOG="INFO",t.DEBUG="DEBUG",t.WARN="WARN",t.ERROR="ERROR",t.FATAL="FATAL"}(Q||(Q={})),function(t){t.LOGGER="LOGGER",t.INIT="INIT",t.DESTROY="DESTROY",t.DOWNLOAD="DOWNLOAD",t.UPLOAD="UPLOAD",t.GET_DATA="GET_DATA"}(Z||(Z={})),function(t){t.INFO="INFO",t.DEBUG="DEBUG",t.WARNING="WARNING",t.ERROR="ERROR",t.NONE="NONE"}(tt||(tt={})),function(t){t.RUNNING="RUNNING",t.ENDED="ENDED"}(et||(et={})),function(t){t.USE_SEC_API="use_sec_api",t.MEETING_SHARE_NEW_PAGE_API="meeting_share_new_page_api"}(rt||(rt={})),function(t){t.BROWSER="browser",t.MONITOR="monitor",t.WINDOW="window"}(nt||(nt={})),function(t){t.EXCLUDE="exclude",t.INCLUDE="include"}(ot||(ot={})),function(t){t.PEOPLE="PEOPLE",t.CONTENT="CONTENT"}(it||(it={})),function(t){t.VIDEO_INPUT="VIDEO_INPUT",t.AUDIO_INPUT="AUDIO_INPUT"}(at||(at={})),function(t){t[t.XYAccount=0]="XYAccount",t[t.ExtUserId=1]="ExtUserId",t[t.ExtToken=2]="ExtToken"}(st||(st={})),function(t){t["1x1"]="1x1",t["2x1"]="2x1",t["3x1"]="3x1",t["4x1"]="4x1",t["4x2"]="4x2",t["5x1"]="5x1",t["6x1"]="6x1",t["6x2"]="6x2",t["8x1"]="8x1",t["9x1"]="9x1"}(ut||(ut={})),function(t){t.SPEAKER="speaker",t.SPECIFIED="specified",t.AUTO="auto"}(ct||(ct={})),function(t){t.INIT="INIT",t.READY="READY",t.PAUSE_MEETING="PAUSE_MEETING",t.PAUSE_SDK="PAUSE_SDK",t.POLLING="POLLING"}(ft||(ft={})),function(t){t.NORMAL="NORMAL",t.NO_JOINED="NO_JOINED",t.VIDEO_MUTE="VIDEO_MUTE",t.NOT_FOUND="NOT_FOUND",t.NULL="NULL"}(lt||(lt={})),function(t){t[t.FULL_ROSTER=0]="FULL_ROSTER",t[t.SPECIFIED=1]="SPECIFIED"}(pt||(pt={})),function(t){t.PING="PING",t.PONG="PONG"}(dt||(dt={})),function(t){t.CANPLAY="CANPLAY",t.ENDED="ENDED",t.REQUEST="REQUEST",t.UNKNOWN="UNKNOWN",t.LOAD_START="LOAD_START",t.ERROR="ERROR"}(vt||(vt={})),function(t){t.ENABLED="ENABLED",t.MUTE="MUTE",t.ENDED="ENDED"}(ht||(ht={})),function(t){t.MUTE="MUTE",t.REQUEST="REQUEST",t.NORMAL="NORMAL",t.AUDIO_TEL="AUDIO_TEL",t.AUDIO_ONLY="AUDIO_ONLY",t.AUDIO_CONTENT="AUDIO_CONTENT",t.ANSWER_PHONE="ANSWER_PHONE"}(mt||(mt={})),function(t){t[t.NONE=-1]="NONE",t[t.TEXT=0]="TEXT",t[t.IMAGE=1]="IMAGE"}(yt||(yt={})),function(t){t[t.MuteByUser=0]="MuteByUser",t[t.MuteByBWLimit=1]="MuteByBWLimit",t[t.MuteByNoInput=2]="MuteByNoInput",t[t.MuteByConfMgmt=3]="MuteByConfMgmt",t[t.MuteByDeviceDetection=4]="MuteByDeviceDetection",t[t.MuteByPhoneCall=5]="MuteByPhoneCall"}(Et||(Et={})),function(t){t.GRANTED="granted",t.DENIED="denied",t.PROMPT="prompt",t.UNKNOWN="unknown",t.FAILED="failed"}(gt||(gt={})),function(t){t.AUDIOINPUT="audioInput",t.AUDIOOUTPUT="audioOutput",t.VIDEOINPUT="videoInput"}(St||(St={})),function(t){t.INIT="INIT",t.UNKNOWN="UNKNOWN",t.NORMAL="NORMAL",t.FAILED="FAILED",t.LOST="LOST"}(Ot||(Ot={})),function(t){t.CANCEL_HANDUP="cancel-handup",t.FOCUS_VIEW="focus-view",t.INTERACTIVE_TOOL_INFO="interactiveToolInfo",t.MEETING_CONTROL="meeting-control",t.MEETING_CONTROL_VIDEO="meeting-control-video",t.NOTIFICATION="notification",t.ONHOLD="onhold",t.SUB_TITLE="sub-title",t.AUDIO_STATUS="audio-status",t.CALL_STATUS="call-status",t.CONFERENCE_INFO="conference-info",t.DISCONNECTED="disconnected",t.ENTERPRISE_CONFIG="enterprise-config",t.LAYOUT_STATE="layout-state",t.MEDIA_CHANGED_MIGRATE="media-changed-migrate",t.USER_INFO="user-info",t.VIDEO_STATUS="video-status",t.CONF_CHANGE_INFO="conf-change-info",t.CONTENT="content",t.CONTAINER_RESIZE="container-resize",t.FORCE_FULL_SCREEN="force-full-screen",t.LAYOUT="layout",t.PAGE_INFO="page-info",t.ROTATION_CHANGE="rotation-change",t.SCREEN_INFO="screen-info",t.TEMPLATE_MODE="template-mode",t.AUDIO_TRACK="audio-track",t.BULK_ROSTER="bulkRoster",t.IN_OUT_REMINDER="in-out-reminder",t.NETWORK_LEVEL="networkLevel",t.NETWORK_PARAMETER="networkParameter",t.PARTICIPANTS_COUNT="participants-count",t.ROSTER="roster",t.SPEAKER_INFO="speaker-info",t.SPEAKERS_INFO="speakers-info",t.TRANSLATION_CONTENT="translation-content",t.VIDEO_TRACK="video-track",t.MULTI_GROUP_INFO="multi-group-info",t.START_MONITOR_REPORT="start-monitor-report",t.STOP_MONITOR_REPORT="stop-monitor-report",t.RECORDING_STATE_CHANGED="recording-state-changed",t.RECORD_STATUS_NOTIFICATION="record-status-notification",t.RECORD_PERMISSION="record-permission",t.CUSTOM_MESSAGE_RECV="custom-message-recv",t.ERROR="error",t.MEETING_STATS="meeting-stats",t.PLAY_FAILED="play-failed",t.SOCKET_CLOSE="socket-close",t.SOCKET_ERROR="socket-error",t.SOCKET_MESSAGE="socket-message",t.SOCKET_OPEN="socket-open",t.SOCKET_RECONNECT="socket-reconnect",t.SOCKET_TIMEOUT="socket-timeout"}(Tt||(Tt={})),function(t){t.DEVICE="device",t.PERMISSION="permission",t.START_SHARE_CONTENT="start-share-content",t.STOP_SHARE_CONTENT="stop-share-content",t.TRACK_ERROR="track-error"}(It||(It={})),function(t){t.DEVICE="device",t.PERMISSION="permission"}(bt||(bt={})),function(t){t.CLOSE="close",t.ERROR="error",t.MESSAGE="message",t.OPEN="open",t.RECONNECT="reconnect",t.TIMEOUT="timeout",t.TOKEN_INVALID="TOKEN_INVALID"}(Nt||(Nt={})),function(t){t[t.ALL=0]="ALL",t[t.VIDEO=1]="VIDEO",t[t.AUDIO=2]="AUDIO",t[t.CONTENT=3]="CONTENT"}(Rt||(Rt={})),function(t){t[t.SMART=0]="SMART",t[t.ALL=1]="ALL",t[t.NOT=2]="NOT",t[t.FORCE=3]="FORCE"}(xt||(xt={}));var Dt;r(1517),r(6869);!function(t){t[t.RESIZE=0]="RESIZE",t[t.OBSERVER=1]="OBSERVER",t[t.UNKNOWN=2]="UNKNOWN"}(Dt||(Dt={}));new(function(){function t(){At(this,t),this.eleId="",this.element=null,this.resizeObserver=null,this.resizeMode=Dt.UNKNOWN,this.detectCount=0,this.maxDetectCount=20,this.detectTimer=null,this.onResize=function(){},this.handleResize=this.handleResize.bind(this)}return _t(t,[{key:"handleResize",value:function(){var t,e=(null===(t=this.element)||void 0===t?void 0:t.getBoundingClientRect())||{},r=e.width,n=void 0===r?0:r,o=e.height,i=void 0===o?0:o;this.onResize({width:n,height:i,element:this.element})}},{key:"init",value:function(t,e){t?(this.eleId=t,this.onResize=e,this.element=document.getElementById(this.eleId),this.element?this.startObserverResize():(this.startListenerResize(),this.startDetectTimer())):this.startListenerResize()}},{key:"startDetectTimer",value:function(){var t=this;this.detectTimer=setTimeout((function(){if(t.detectCount>t.maxDetectCount)t.clearDetectTimer();else{if(t.element=document.getElementById(t.eleId),t.element)return t.clearDetectTimer(),t.startObserverResize(),void t.removeResizeListener();t.detectCount+=1,t.startDetectTimer()}}),500)}},{key:"clearDetectTimer",value:function(){this.detectTimer&&(clearTimeout(this.detectTimer),this.detectTimer=null),this.detectCount=0}},{key:"startListenerResize",value:function(){window.addEventListener("resize",this.handleResize),this.resizeMode=Dt.RESIZE}},{key:"startObserverResize",value:function(){var t=this;this.element&&(this.resizeObserver=new ResizeObserver((function(e){t.handleResize()})),this.resizeObserver.observe(this.element),this.resizeMode=Dt.OBSERVER)}},{key:"destroy",value:function(){this.clearDetectTimer(),this.removeResizeListener(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.eleId="",this.element=null}},{key:"removeResizeListener",value:function(){this.resizeMode===Dt.RESIZE&&window.removeEventListener("resize",this.handleResize)}}]),t}()),r(9358),r(429),r(9693),r(228),r(7522),r(4284),r(9288),r(7389),r(8742),r(6466);var kt=r(738),Pt=r.n(kt);function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ut(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Mt(t,e);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)?Mt(t,e):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.")}()}var jt=r(4687),Ft=r.n(jt),Vt=(r(3964),r(7195),r(8077),r(752),r(9649),r(1694),r(6265),r(4338),r(8832),r(4043),r(2462),r(886),r(2320),function(){function t(){At(this,t)}return _t(t,null,[{key:"getPlatform",value:function(){var t=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),r=/macintosh|mac os x/.test(t)||/mac/.test(e),n=/linux/.test(e),o=/win|windows|win32|win64/i.test(t),i=/windows phone/.test(t),a=/symbianos/.test(t)||i,s=/android|harmony/.test(t),u=/arkweb/.test(t)&&/harmony/.test(t),c=/firefox/.test(t),f=/chrome|crios/.test(t)&&!/edg/.test(t),l=/edg/.test(t),p=/safari/.test(t)&&!f&&!l,d=/ipad/.test(t)||/macintel/.test(t)&&navigator.maxTouchPoints>1||/macintosh/.test(t)&&navigator.maxTouchPoints>1,v=/ipad|playbook/.test(t)||s&&!/mobile/.test(t)||c&&/tablet/.test(t),h=/iphone/.test(t)&&!v,m=h||d,y=h||s||u||d||a,E=!y,g=/baidu|bidubrowser|baiduboxapp/.test(t),S=/tencenttraveler|qqbrowse|qq\\/|micromessenger/.test(t),O=/opera|opr/.test(t),T=/huaweibrowser/.test(t),I=/Trident/.test(t);return{isTablet:v,isPhone:h,isAndroid:s,isPc:E,isMac:r,isWindows:o,isIPad:d,isChrome:f,isLinux:n,isFirefox:c,isBaidu:g,isQQ:S,isOpera:O,isZhazha:/qihuubrowser|qhbrowser|360se|360ee|lbbrowser|uc|ubrowser|ucweb|quark|miuibrowser|aliapp\\(tb|weibo|iqiyiapp|huaweibrowser|huawei|metasr|sogou|se|maxthon|the world|metasr|2345explorer|tencenttraveler|mb2345browser/.test(t),isEdge:l,isSafari:p,isHuaweiBrowser:T,isWeixin:/micromessenger/.test(t)&&!/wxwork|windowswechat/.test(t),isWxwork:/wxwork/.test(t)&&/micromessenger/.test(t),isHarmony:u,isMiniProgram:/miniprogram/.test(t),isWindowsWxWechat:/micromessenger.*wxwork.*windowswechat/.test(t)&&!/macintosh/.test(t),isWindowsWechat:/micromessenger.*windowswechat/.test(t)&&!/wxwork|macintosh/i.test(t),isTrident:I,isIOS:m,isDingDing:/dingtalk/.test(t),isMobile:y}}},{key:"getOperationSystem",value:function(){var e=t.getPlatform(),r=e.isIPad,n=e.isMac,o=e.isWindowsWechat,i=e.isWindowsWxWechat,a=e.isWindows,s=e.isPhone,u=e.isAndroid,c=e.isLinux,f=e.isMiniProgram,l=e.isHarmony;return i?"Windows WXWechat":o?"Windows Wechat":a?"Windows":s?"iOS":u?"Android":r?"iPad":n?"Mac":c?"Linux":f?"MiniProgram":l?"Harmony":""}},{key:"getChromeVersion",value:function(){var t=navigator.userAgent.match(/Chrom(?:e|ium)\\/([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)/);if(null!=t&&5==t.length)return{major:(t=t.map((function(t){return parseInt(t,10)})))[1],minor:t[2],build:t[3],patch:t[4]}}},{key:"getEdgeVersion",value:function(){var t=navigator.userAgent.match(/Ed(?:g)\\/([0-9]+)\\.([0-9]+)\\.([0-9]+)/);if(!(null==t||t.length<4))return{major:(t=t.map((function(t){return parseInt(t,10)})))[1],minor:t[2],build:t[3]}}},{key:"getSafariVersion",value:function(){var t=navigator.userAgent.match(/Version\\/([0-9]+)\\.([0-9]+)/);if(!(null==t||t.length<3))return{major:(t=t.map((function(t){return parseInt(t,10)})))[1],minor:t[2]}}},{key:"getFirefoxVersion",value:function(){var t=navigator.userAgent.match(/Firefox\\/([0-9]+)\\.([0-9]+)/);if(!(null==t||t.length<3))return{major:(t=t.map((function(t){return parseInt(t,10)})))[1],minor:t[2]}}},{key:"getAndroidVersion",value:function(){var t=navigator.userAgent.toLowerCase().match(/android (.*?);/);if(t){var e=t[1].split(".");return{major:(e=e.map((function(t){return parseInt(t,10)})))[0],minor:e[1]}}}},{key:"getIOSVersion",value:function(){var t=navigator.userAgent.toLowerCase().match(/cpu( iphone)? os (.*?) like mac os/);if(t){var e=t[2].split("_");return{major:(e=e.map((function(t){return parseInt(t,10)})))[0],minor:e[1]}}}},{key:"getWeixinVersion",value:function(){if(t.getPlatform().isWeixin)return(navigator.userAgent.match(/MicroMessenger\\/([\\d.]+)/i)||["",""])[1]}},{key:"getWXWeixinVersion",value:function(){if(t.getPlatform().isWxwork)return(navigator.userAgent.match(/wxwork\\/([\\d.]+)/i)||["",""])[1]}},{key:"compareVersion",value:function(t,e){for(var r=t.split("."),n=e.split("."),o=Math.max(r.length,n.length);r.length<o;)r.push("0");for(;n.length<o;)n.push("0");for(var i=0;i<o;i++){var a=parseInt(r[i]),s=parseInt(n[i]);if(a>s)return 1;if(a<s)return-1}return 0}}]),t}());Vt.getBrowserName=function(){var t=Vt.getPlatform(),e=t.isFirefox,r=t.isChrome,n=t.isSafari,o=t.isWindowsWechat,i=t.isWindowsWxWechat,a=t.isZhazha,s=t.isEdge,u=t.isWeixin,c=t.isWxwork,f=t.isQQ,l=t.isHuaweiBrowser,p=t.isOpera,d=t.isTrident,v=t.isHarmony;return e?"Firefox":r?"Chrome":n?"Safari":s?"Edge":p?"Opera":d?"Internet Explorer":o?"WindowsWechat":i?"WindowsWxWechat":u?"Weixin":c?"WXWeixin":u?"Weixin":f?"Tencent":l?"Huawei":a?"Other":v?"Harmony":"Unknown"};r(9730),r(24),r(2826),r(7722),r(9749),r(6544),r(4254),r(4253),r(6646),r(6801),r(3843);function Wt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Bt=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ht=[{width:640,height:360},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160},{width:5760,height:3240}],Kt={audioInputList:[],audioOutputList:[],videoInputList:[]},zt=function(){function t(){At(this,t),this.deviceList=Kt,this.maxResolutionMap=new Map}return _t(t,[{key:"destroy",value:function(){this.deviceList=Kt,this.maxResolutionMap=new Map}},{key:"captureStream",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Bt(this,void 0,void 0,Ft().mark((function r(){var n,o,i,a,s;return Ft().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Rt.VIDEO,o=Rt.ALL,i=Rt.AUDIO,a={},t===n?a.video=e:t===i?a.audio=e:t===o&&(a=e),r.prev=3,r.next=6,navigator.mediaDevices.getUserMedia(a);case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(3),s=this.handleCaptureStreamError(r.t0),r.abrupt("return",Promise.reject(s));case 13:case"end":return r.stop()}}),r,this,[[3,9]])})))}},{key:"captureContentStream",value:function(t){var e;return Bt(this,void 0,void 0,Ft().mark((function r(){var n,o,i,a,s,u,c,f;return Ft().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,n=window.screen.width,o=window.screen.height,i=window.devicePixelRatio,a=n*i,s=o*i,u=t||{video:{cursor:"always",logicalSurface:!0,displaySurface:"monitor",width:a,height:s}},r.next=9,null===(e=navigator.mediaDevices)||void 0===e?void 0:e.getDisplayMedia(u);case 9:return c=r.sent,r.abrupt("return",c);case 13:return r.prev=13,r.t0=r.catch(0),f=this.handleCreateContentStreamError(r.t0),r.abrupt("return",Promise.reject(f));case 17:case"end":return r.stop()}}),r,this,[[0,13]])})))}},{key:"checkAllowCamera",value:function(){return Bt(this,void 0,void 0,Ft().mark((function t(){var e,r,n;return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=!1,t.prev=1,t.next=4,this.captureStream(Rt.VIDEO);case 4:return r=t.sent,e=!0,r&&this.closeStream([r]),t.abrupt("return",{allow:e,msg:""});case 10:return t.prev=10,t.t0=t.catch(1),n=t.t0.msg||"采集视频流失败",t.abrupt("return",{allow:e,msg:n});case 14:case"end":return t.stop()}}),t,this,[[1,10]])})))}},{key:"checkAllowMicroPhone",value:function(){return Bt(this,void 0,void 0,Ft().mark((function t(){var e,r,n;return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=!1,t.prev=1,t.next=4,this.captureStream(Rt.AUDIO);case 4:return r=t.sent,e=!0,r&&this.closeStream([r]),t.abrupt("return",{allow:e,msg:""});case 10:return t.prev=10,t.t0=t.catch(1),n=t.t0.msg||"采集音频流失败",t.abrupt("return",{allow:e,msg:n});case 14:case"end":return t.stop()}}),t,this,[[1,10]])})))}},{key:"getMaxResolution",value:function(){return Bt(this,void 0,void 0,Ft().mark((function t(){var e,r,n,o,i;return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.deviceList.videoInputList).length){t.next=21;break}r=Wt(e),t.prev=3,r.s();case 5:if((n=r.n()).done){t.next=13;break}return o=n.value,t.next=9,this.calculateMaxResolution(o);case 9:i=t.sent,this.maxResolutionMap.set(o.deviceId,i);case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),r.e(t.t0);case 18:return t.prev=18,r.f(),t.finish(18);case 21:return t.abrupt("return",this.maxResolutionMap);case 22:case"end":return t.stop()}}),t,this,[[3,15,18,21]])})))}},{key:"calculateMaxResolution",value:function(t){var e=t.deviceId;return Bt(this,void 0,void 0,Ft().mark((function t(){var r,n,o,i,a,s,u,c,f,l,p,d,v,h,m,y,E;return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Ht.length,n=Ht[0].width,o=Ht[0].height,i={width:n,height:o},a=0;case 5:if(!(a<r)){t.next=29;break}return s=Ht[a],u=Object.assign(Object.assign({},s),{deviceId:e,frameRate:15}),c=!1,t.prev=9,t.next=12,this.captureStream(Rt.VIDEO,u);case 12:if(f=t.sent,l=f.getVideoTracks()[0],p=l.getSettings(),d=p.width,v=void 0===d?0:d,h=p.height,m=void 0===h?0:h,y=p.deviceId,E=void 0===y?"":y,s.width!==v&&s.height!==m||!(i.width<=v||i.height<=m)||e!==E?c=!0:i=s,this.closeStream([f]),!c){t.next=20;break}return t.abrupt("break",29);case 20:t.next=26;break;case 22:return t.prev=22,t.t0=t.catch(9),console.warn("get max resolution err: ",t.t0),t.abrupt("break",29);case 26:a++,t.next=5;break;case 29:return t.abrupt("return",i);case 30:case"end":return t.stop()}}),t,this,[[9,22]])})))}},{key:"getDeviceList",value:function(){return Bt(this,void 0,void 0,Ft().mark((function t(){var e,r,n,o,i;return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.mediaDevices.enumerateDevices();case 3:return e=t.sent,r=[],n=[],o=[],i=function(t){return t.filter((function(t){var e=t.label,r=t.deviceId;return!(e.match(/\\(Virtual\\)$/)||"communications"===r)}))},e.forEach((function(t){var e=t.deviceId,i=t.label,a=t.kind,s={deviceId:e,label:i,kind:a,groupId:t.groupId};e&&a&&("audioinput"===a?r.push(s):"audiooutput"===a?n.push(s):"videoinput"===a&&o.push(s))})),this.deviceList={audioInputList:i(r),audioOutputList:i(n),videoInputList:i(o)},t.abrupt("return",this.deviceList);case 13:return t.prev=13,t.t0=t.catch(0),this.deviceList={audioInputList:[],audioOutputList:[],videoInputList:[]},t.abrupt("return",this.deviceList);case 17:case"end":return t.stop()}}),t,this,[[0,13]])})))}},{key:"closeStream",value:function(t){t.forEach((function(t){t.getTracks().forEach((function(t){t.stop()}))}))}},{key:"getSupportedConstraints",value:function(){var t,e=[];try{var r=null===(t=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===t?void 0:t.getSupportedConstraints();if(r)for(var n in r)e.push(n);return e}catch(t){return e}}},{key:"handleCaptureStreamError",value:function(t){return"NotFoundError"===t.name||"DevicesNotFoundError"===t.name?{code:20400,msg:"缺失摄像头或麦克风设备"}:"NotReadableError"===t.name||"TrackStartError"===t.name?{code:20401,msg:"摄像头或麦克风设备无法访问"}:"OverconstrainedError"===t.name||"ConstraintNotSatisfiedError"===t.name?{code:20402,msg:"约束设置无法被满足"}:"NotAllowedError"===t.name||"PermissionDeniedError"===t.name||t.message.includes("NotAllowedError")?{code:20403,msg:"麦克风或摄像头使用权限被拒绝"}:"TypeError"===t.name||"TypeError"===t.name?{code:20404,msg:"采集流约束设置为空"}:{code:20405,msg:"创建媒体流失败"}}},{key:"handleCreateContentStreamError",value:function(t){var e=t.name,r=t.message;return"NotAllowedError"===e?"Permission denied by system"===r?{code:950508,msg:"屏幕分享失败,请在系统设置中授权屏幕录制权限"}:"Permission denied"===r?{code:950501,msg:"取消分享屏幕"}:{code:950511,msg:"用户取消分享屏幕"}:"InvalidStateError"===e?{code:950502,msg:"操作异常-采集屏幕失败"}:"AbortError"===e?{code:950503,msg:"采集屏幕失败"}:"NotFoundError"===e?{code:950504,msg:"没有屏幕视频源可用于捕获"}:"NotReadableError"===e?{code:950505,msg:"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器"}:"OverconstrainedError"===e?{code:950506,msg:"采集屏幕流失败"}:"TypeError"===e?{code:950507,msg:"采集屏幕流不支持"}:{code:950503,msg:"采集屏幕失败"}}}],[{key:"getInstance",value:function(){return this.instance?this.instance:new t}}]),t}(),Yt=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Xt=Vt.getPlatform(),$t=function(){function t(){At(this,t)}return _t(t,null,[{key:"isSupportDesktopBrowser",value:function(){var t=!1,e=Xt.isChrome,r=Xt.isEdge,n=Xt.isFirefox;if(e){var o=Vt.getChromeVersion();t=(null==o?void 0:o.major)>=72}else if(r){var i=Vt.getEdgeVersion();t=(null==i?void 0:i.major)>=80}else if(n){var a=Vt.getFirefoxVersion();t=(null==a?void 0:a.major)>=80}return t}},{key:"isSupportMobileBrowser",value:function(){var t=!1,e=Xt.isPhone,r=Xt.isAndroid,n=Xt.isIPad;if(r)t=(Vt.getAndroidVersion()||{major:0,minor:0}).major>=6;else if(e){var o=Vt.getIOSVersion()||{major:0,minor:0},i=o.major,a=o.minor;t=12===i?a>2:i>12}else n&&(t=!0);return t}},{key:"isSupportAspectRatio",value:function(){return!Xt.isPhone}},{key:"isSupportUserMedia",value:function(){var t;return!!(null===(t=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===t?void 0:t.getUserMedia)}},{key:"checkCanvasCapture",value:function(){var e=document.createElement("canvas");e.setAttribute("style","display: none"),e.id=t.CANVAS_TEST_ID,document.getElementsByTagName("body")[0].appendChild(e);var r=!!e.captureStream,n=null;return r&&(n=e.captureStream()),{canvasStream:n,isSupportCanvasCapture:r}}},{key:"checkVideoCapture",value:function(e){var r=document.createElement("video");r.setAttribute("style","display: none"),r.src=e,r.muted=!0,r.id=t.VIDEO_TEST_ID,r.crossOrigin="anonymous",document.getElementsByTagName("body")[0].appendChild(r);var n=!!r.captureStream||!1;return this.removeDetectElement(t.VIDEO_TEST_ID),{isSupportVideoCapture:n}}},{key:"removeDetectElement",value:function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.CANVAS_TEST_ID,n=document.getElementById(r);n&&(null===(e=n.parentNode)||void 0===e||e.removeChild(n))}},{key:"isSupportRTC",value:function(e){return Yt(this,void 0,void 0,Ft().mark((function r(){var n,o,i,a,s;return Ft().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n={isSupportRTC:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1},o=["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection"],i=0;case 3:if(!(i<o.length)){r.next=11;break}if(!(o[i]in window)){r.next=8;break}return n.isSupportRTC=!0,r.abrupt("break",11);case 8:i++,r.next=3;break;case 11:if(!n.isSupportRTC){r.next=17;break}return r.next=14,t.isSupportPeerCB(e);case 14:a=r.sent,s=a.isSupportPeer,n=Object.assign(Object.assign({},a),{isSupportRTC:s});case 17:return r.abrupt("return",n);case 18:case"end":return r.stop()}}),r)})))}},{key:"isSupportPeerCB",value:function(t){return Yt(this,void 0,void 0,Ft().mark((function e(){return Ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){setTimeout((function(){var r;if(RTCPeerConnection){var n,o,i,a=new RTCPeerConnection({iceServers:[]}),s=!1,u=!1,c=!1;if(n=!(!a.createAnswer||!a.createOffer),o=!!a.addTrack,i=!!(null==a?void 0:a.addTransceiver),t&&(null===(r=null==t?void 0:t.getVideoTracks())||void 0===r?void 0:r.length)&&i){var f=t.getVideoTracks()[0],l=a.addTransceiver(f);l&&(s=!!l.sender.replaceTrack,c=!!l.sender.setStreams),f&&(u=!!f.applyConstraints),l=null}return a.close(),e({isSupportPeer:n,isSupportAddtrack:o,isSupportAddTransceiver:i,isSupportReplaceTrack:s,isApplyConstraints:u,isSupportSetStreams:c})}return e({isSupportPeer:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1})}),100)})));case 1:case"end":return e.stop()}}),e)})))}},{key:"isSupportWebsocket",value:function(){return!!window.WebSocket}},{key:"isSupportVideoCapture",value:function(t){var e=!!t.captureStream,r=null;return e&&(r=null==t?void 0:t.captureStream()),{videoCaptureStream:r,captureVideoVisible:e}}},{key:"isSupportIndexDB",value:function(){var t;return!!(null===(t=null===window||void 0===window?void 0:window.indexedDB)||void 0===t?void 0:t.open)}},{key:"isSupportDevicePermission",value:function(){return Yt(this,void 0,void 0,Ft().mark((function t(){return Ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.permissions.query({name:"microphone"});case 3:return t.next=5,navigator.permissions.query({name:"camera"});case 5:return t.abrupt("return",!0);case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))}},{key:"isSupportAudioContext",value:function(){return!(!(null===window||void 0===window?void 0:window.AudioContext)&&!(null===window||void 0===window?void 0:window.webkitAudioContext))}},{key:"isSupportMediaDevices",value:function(){return!!navigator.mediaDevices}},{key:"isSupportMediaRecorder",value:function(){return!!window.MediaRecorder}},{key:"isSupportWebWorker",value:function(){return!!window.Worker}},{key:"isSupportTransformStream",value:function(){return!!window.TransformStream}},{key:"isSupportH264",value:function(){var t,e,r;return Yt(this,void 0,void 0,Ft().mark((function n(){var o,i,a,s,u,c;return Ft().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=Xt.isFirefox,i=!1,!o){n.next=13;break}return n.prev=3,a=new RTCPeerConnection,n.next=7,a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 7:s=n.sent,i=((null===(t=null==s?void 0:s.sdp)||void 0===t?void 0:t.toLowerCase().indexOf("h264"))||-1)>-1,n.next=13;break;case 11:n.prev=11,n.t0=n.catch(3);case 13:try{u=(null===(e=RTCRtpSender.getCapabilities("video"))||void 0===e?void 0:e.codecs.filter((function(t){return t.mimeType.toLowerCase().indexOf("h264")>0})))||[],c=(null===(r=RTCRtpReceiver.getCapabilities("video"))||void 0===r?void 0:r.codecs.filter((function(t){return t.mimeType.toLowerCase().indexOf("h264")>0})))||[],(null==u?void 0:u.length)>0&&c.length>0&&(i=!0)}catch(t){}return n.abrupt("return",i);case 15:case"end":return n.stop()}}),n,null,[[3,11]])})))}},{key:"getNetWork",value:function(){var t=navigator.connection||{};return JSON.stringify(t)}},{key:"getCPUCount",value:function(){return window.navigator.hardwareConcurrency||0}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"getAudioCodec",value:function(t){return Yt(this,void 0,void 0,Ft().mark((function e(){var r,n,o,i;return Ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[];try{n=(null==t?void 0:t.getCapabilities("audio"))||{},o=(null==n?void 0:n.codecs)||[],i=new Set,o.forEach((function(t){"audio/opus"===t.mimeType&&i.add("Opus")})),r=Ut(i)}catch(t){Xt.isFirefox&&(r=["Opus"])}return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})))}},{key:"getVideoCodec",value:function(t){return Yt(this,void 0,void 0,Ft().mark((function e(){var r,n,o,i;return Ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[];try{n=(null==t?void 0:t.getCapabilities("video"))||{},o=(null==n?void 0:n.codecs)||[],i=new Set,o.forEach((function(t){"video/H264"!==t.mimeType&&"video/VP8"!==t.mimeType&&"video/VP9"!==t.mimeType||i.add(t.mimeType.split("video/")[1])})),r=Ut(i)}catch(t){Xt.isFirefox&&(r=["VP8","H264"])}return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})))}},{key:"getSupportedCodec",value:function(){return Yt(this,void 0,void 0,Ft().mark((function e(){var r,n,o,i,a;return Ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.getAudioCodec(RTCRtpSender);case 3:return r=e.sent,e.next=6,t.getVideoCodec(RTCRtpSender);case 6:return n=e.sent,e.next=9,t.getAudioCodec(RTCRtpReceiver);case 9:return o=e.sent,e.next=12,t.getVideoCodec(RTCRtpReceiver);case 12:return i=e.sent,a={audioSenderCodecList:r,videoSenderCodecList:n,audioReceiverCodecList:o,videoReceiverCodecList:i},e.abrupt("return",a);case 17:return e.prev=17,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}},{key:"getWidowResolution",value:function(){var t=window.screen.width,e=window.screen.height,r=window.devicePixelRatio,n=e*r;return{maxWidth:t*r,maxHeight:e*r,width:t,height:e,dpr:r,maxScreenResolution:"".concat(t*r,"*").concat(n)}}},{key:"isSupportShareContent",value:function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)}},{key:"isSupportSetCaptureHandleConfig",value:function(){return!!navigator.mediaDevices.setCaptureHandleConfig}},{key:"isSupportDevicePressure",value:function(){var t=!1;return"PressureObserver"in globalThis&&(t=!0),t}},{key:"checkSupportWebRTC",value:function(){return Yt(this,void 0,void 0,Ft().mark((function e(){var r,n,o,i,a,s,u,c;return Ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.isSupportRTC();case 2:return r=e.sent,e.next=5,t.isSupportUserMedia();case 5:return n=e.sent,o=t.isSupportWebsocket(),e.next=9,t.isSupportH264();case 9:return i=e.sent,a=r.isSupportRTC,s=r.isSupportAddTransceiver,u=r.isSupportAddtrack,c={result:a&&o&&i,detail:{isSupportRTC:a,isSupportWebsocket:o,isSupportH264:i,isSupportAddTransceiver:s,isSupportAddtrack:u,isSupportUserMedia:n}},e.abrupt("return",c);case 14:case"end":return e.stop()}}),e)})))}}]),t}();$t.CANVAS_TEST_ID="XY_DETECT_CANVAS_ID",$t.VIDEO_TEST_ID="XY_DETECT_VIDEO_ID",$t.browser=Vt,$t.stream=zt.getInstance();r(8436),r(5728);var qt={isNumber:function(t){return"number"==typeof t},isObject:function(t){return"[object object]"===Object.prototype.toString.call(t).toLocaleLowerCase()},isArray:function(t){return Array.isArray(t)},isString:function(t){return"string"==typeof t},isBoolean:function(t){return"boolean"==typeof t},isUndefined:function(t){return void 0===t},isFunction:function(t){return"function"==typeof t},isLetter:function(t){return/^[a-zA-Z]+$/.test(t)},isChinese:function(t){return/^[\\u4e00-\\u9fa5]+$/.test(t)},isNumberText:function(t){return/^[0-9]+$/.test(t)},isSpecialChar:function(t){return/^[^\\u4e00-\\u9fa5a-zA-Z0-9]+$/.test(t)},isWhiteSpace:function(t){return/^\\s+$/.test(t)}},Jt={"(":")","(":")","[":"]","{":"}","<":">"},Qt=(new Set(Object.keys(Jt)),$t.browser.getPlatform()),Zt=(g.RS90,g.RS180,g.RS360,g.RS720,g.RS1080,N.COMMON),te=N.ADVANCED,ee=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zt,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Qt.isFirefox)return{};var n={frameRate:t};if(e===te&&qt.isNumber(t)){n=r?{frameRate:{ideal:t,max:t}}:{frameRate:{exact:t,max:t}}}return n},re=(Object.assign({width:640,height:360,resizeMode:"crop-and-scale",aspectRatio:1.7777777778},ee(15)),"video/H264"),ne="audio/opus",oe=(m.FAILED,m.DISABLED,m.NORMAL),ie=(m.UNKNOWN,E.REMOTE,E.CONTENT,{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isFocusScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,key:"",extUserId:""}),ae={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:re,audioMimeType:ne,timestamp:0,receiver:{},sender:{},audioReceiver:{},audioSender:{}},RESOLUTION:1,ROSTER:Pt()(ie),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:"",id:0,displayName:"",token:{access_token:"",signSecret:""}},LAYOUT:{position:[],resolution:0,rotate:null,quality:0,state:mt.NORMAL,roster:ie,rotationInfo:null,id:"",avatar:null},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,chairManReason:H.NONE,chairManUrl:"",contentUri:"",actSpkUri:"",mediaGroupInfo:[]},CLOUD_ROOOM_INFO:{meetingControlPassword:"",meetingNumber:"",password:""},CONFERENCE_INFO:{callNumber:"",callUrl:"",deviceId:"",deviceType:"",displayName:"",number:"",numberType:"",confAuxProperties:{watermarkContent:"",watermarkRange:C.CONTENT},avatar:"",inviteInfo:{displayName:"",inEnterprise:!0,inviteAppUrl:"",inviteUrl:"",invokSchema:"",linkNumber:"",mobileWebrtcVisibleSetting:!0,number:"",password:"",pstnNumber:"",shareUrl:"",userAvatar:"",userName:"",userProfileId:"",voiceNumber:"",webrtcSetting:!0,webrtcUrl:""}}},se=(Object.values(F),Object.values(V),F.SPEAKER,V.MULTI_PIC_CONTENT_HIGH_PRIORITY,$t.browser.getPlatform().isPc,f.FRONT,f.BACK,g.RS180,g.RS360,g.RS720,g.RS1080,S.FR30,ot.INCLUDE,ot.EXCLUDE,nt.MONITOR,JSON.stringify(ae.INIT_INTERNALS)),ue=function(){function t(e){At(this,t),this.onMessage=e,this.config={logInterval:1,reportInterval:2},this.currentLogInterval=1,this.currentReportInterval=1,this.currentInternals=JSON.parse(se),this.nextInternals=JSON.parse(se),this.initInternals()}return _t(t,[{key:"setConfig",value:function(t){this.config=Object.assign(Object.assign({},this.config),t)}},{key:"initInternals",value:function(){this.nextInternals=JSON.parse(se),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=re,this.audioCodec=ne}},{key:"statsVideoReceiver",value:function(t){var e=this,r=t.timestamp,n=t.workerVideoReceiver;this.nextInternals.timestamp=r,n.forEach((function(t){var r=t.trackId,n=t.trackSetting,o=t.statsList,i=t.layoutItem;if(o&&r&&i){var a=e.getReceiverStatus(o,i,r),s=a.bytesReceived,u=void 0===s?0:s,c=a.bytesReceivedSecond,f=void 0===c?0:c,l=a.packetsReceivedSecond,p=void 0===l?0:l,d=a.packetsLostSecond,v=void 0===d?0:d,h=a.frameWidth;if(e.bytesReceived+=u||0,e.bytesReceivedSecond+=f||0,e.packetsReceivedSecondSum+=p||0,e.packetsReceivedLostSecondSum+=v||0,!h&&n){var m=n.width,y=void 0===m?0:m,E=n.height,g=void 0===E?0:E;a.frameWidth=y,a.frameHeight=g}e.nextInternals.receiver[r]=a}}))}},{key:"statsAudioReceiver",value:function(t){var e=this;t.forEach((function(t){var r=t.statsList,n=t.trackId,o=t.isContent,i=t.audioSpeaker;if(r&&n){var a=e.getReceiverAudioTrackStatus(r,n),s=a.packetsReceivedSecond,u=void 0===s?0:s,c=a.packetsLostSecond,f=void 0===c?0:c,l=a.bytesReceived,p=void 0===l?0:l,d=a.audioLevel,v=void 0===d?0:d,h=a.bytesReceivedSecond,m=void 0===h?0:h;if(i){var y=i.name,E=i.endpointId;a.name=y,a.endpointId=E}e.bytesReceived+=p||0,e.bytesReceivedSecond+=m||0,e.audioPacketsReceivedSecondSum+=u,e.audioPacketsReceivedLostSecondSum+=f,(m>0||v>0)&&(a.isContent=o,e.nextInternals.audioReceiver[n]=a)}}))}},{key:"statsSender",value:function(t){var e=this,r=I.AUDIO,n=I.VIDEO,o=0,i=0,a=0,s=0;t.forEach((function(t){var u=t.statsList,c=t.trackId,f=t.streamConfig,l=t.isFirefox;if(u&&f&&c){var p=f.kind,d=p===r?"audioSender":"sender",v=e.getSenderStatus(u,f,c,l),h=v.bytesSent,m=v.bytesSentSecond,y=void 0===m?0:m,E=v.packetsSentSecond,g=void 0===E?0:E,S=v.packetsLostSecond,O=void 0===S?0:S,T=v.jitter,I=void 0===T?0:T,b=v.roundTripTime,N=void 0===b?0:b;e.bytesSent+=h,e.bytesSentSecond+=y,p===n&&(e.packetsSentSecondSum+=g,e.packetsSentLostSecondSum+=O,a=Math.max(a,I),s=Math.max(s,1e3*N)),p===r&&(o+=g,i+=O,e.nextInternals.audioSendJitter=I),e.nextInternals[d][c]=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 t=z.INTERNALS,e=this.config,r=e.logInterval,n=e.reportInterval;this.currentInternals=Pt()(this.nextInternals);var o=!1;this.currentLogInterval===r?(this.currentLogInterval=1,o=!0):this.currentLogInterval+=1,this.onMessage({type:t,data:this.currentInternals,config:{printLog:o}}),this.initInternals(),this.currentReportInterval===n?this.currentReportInterval=1:this.currentReportInterval+=1}},{key:"getLost",value:function(t,e){var r=Math.floor(e/(e+t)*100)||0,n=Math.max(r,0)||0;return 0===t?0:n}},{key:"getSenderStatus",value:function(t,e,r,n){var o=this,i=I.AUDIO,a=I.VIDEO,s=E.CONTENT,u=e.type,c=e.status,f=e.resolution,l=e.kind,p=l===i?"audioSender":"sender",d=this.currentInternals[p][r],v={};return v.isContent=u===s,v.type=u,v.status=c,v.resolution=f,v.expBandwidth=10,t.forEach((function(t){switch(t.type){case"outbound-rtp":var e=t.bytesSent,r=t.framesEncoded,n=t.packetsSent,s=t.keyFramesEncoded,u=void 0===s?"N/A":s,c=t.nackCount,f=t.ssrc,p=t.pliCount,h=void 0===p?0:p,m=t.firCount,y=void 0===m?0:m,E=t.framesSent,g=void 0===E?0:E,S=t.hugeFramesSent,O=void 0===S?0:S,T=t.timestamp,I=t.frameWidth,b=void 0===I?0:I,N=t.frameHeight,R=void 0===N?0:N,x=o.rateBytesCalculator(t,"framesSent","timestamp",1,1e3,d),A=o.rateBytesCalculator(t,"framesEncoded","timestamp",1,1e3,d),w=o.rateBytesCalculator(t,"bytesSent","timestamp",8,1,d),C=o.rateBytesCalculator(t,"packetsSent","timestamp",1,1e3,d);v.hugeFramesSent=O,v.framesSent=g,v.framesSentSecond=x,v.bytesSent=e,v.bytesSentSecond=w||0,v.framesEncoded=r,v.framesEncodedSecond=A,v.timestamp=T,v.packetsSent=n,v.packetsSentSecond=C,v.keyFramesEncoded=u,v.pliCount=h,v.firCount=y,v.nackCount=c,v.ssrc=f,v.frameWidth=b,v.frameHeight=R;break;case"codec":var L=t.mimeType;L!==o.videoCodec&&l===a&&(o.videoCodec=L,v.mimeType=L),L!==o.audioCodec&&l===i&&(o.audioCodec=L);break;case"media-source":var _=t.audioLevel||0;v.audioLevel=Number((100*_).toFixed(0));break;case"remote-inbound-rtp":var D=t.jitter,k=void 0===D?0:D,P=t.packetsLost,M=void 0===P?0:P,U=t.roundTripTime,j=void 0===U?0:U,F=o.rateBytesCalculator(t,"packetsLost","timestamp",1,1e3,d);v.packetsLost=M,v.packetsLostSecond=F,v.jitter=Math.floor(1e3*k),v.roundTripTime=j}})),!v.framesSentSecond&&n&&(v.framesSentSecond=30),v}},{key:"getReceiverStatus",value:function(t,e,r){var n=this,o=this.currentInternals.receiver[r],i=e.roster||{},a=i.endpointId,s=i.participantId,u=i.displayName,c=i.isContent,f=i.ExpectHeight,l=void 0===f?0:f,p=i.ExpectWidth,d=void 0===p?0:p,v={endpointId:a,participantId:s},h=0;return v.ExpectHeight=l,v.ExpectWidth=d,v.isContent=c,v.name=u,v.status="active",v.type="video",v.expResolution=0,t.forEach((function(t){switch(t.type){case"inbound-rtp":var e=t.frameWidth,r=void 0===e?0:e,i=t.frameHeight,a=void 0===i?0:i,s=t.bytesReceived,u=t.framesDecoded,c=t.framesReceived,f=void 0===c?0:c,l=t.packetsReceived,p=t.packetsLost,d=t.keyFramesDecoded,m=void 0===d?"N/A":d,y=t.nackCount,E=t.pliCount,g=t.framesPerSecond,S=t.framesDropped,O=t.ssrc,T=t.timestamp,I=void 0===T?0:T,b=t.jitter,N=void 0===b?0:b,R=t.jitterBufferDelay,x=void 0===R?0:R,A=n.rateBytesCalculator(t,"framesDecoded","timestamp",1,1e3,o),w=n.rateBytesCalculator(t,"bytesReceived","timestamp",8,1,o),C=n.rateBytesCalculator(t,"packetsReceived","timestamp",1,1e3,o),L=n.rateBytesCalculator(t,"packetsLost","timestamp",1,1e3,o),_=n.rateBytesCalculator(t,"framesReceived","timestamp",1,1e3,o);N&&(h=Math.floor(Math.max(h,Math.floor(1e3*N)))),v.timestamp=I,v.framesReceived=f,v.framesReceivedSecond=_,v.jitterBufferDelay=x,v.frameWidth=r,v.frameHeight=a,v.bytesReceived=s,v.bytesReceivedSecond=w,v.framesDecoded=u,v.framesDecodedSecond=A,v.packetsReceived=l,v.packetsReceivedSecond=C,v.packetsLost=p,v.packetsLostSecond=L,v.keyFramesDecoded=m,v.nackCount=y,v.pliCount=E,v.framesPerSecond=g,v.framesDropped=S,v.ssrc=O,v.jitter=Math.floor(1e3*N);break;case"codec":var D=t.mimeType;D!==n.videoCodec&&(n.videoCodec=D)}})),this.nextInternals.jitterReceived=h,v}},{key:"getReceiverAudioTrackStatus",value:function(t,e){var r=this,n=this.currentInternals.audioReceiver[e],o={type:"audio"};return t.forEach((function(t){switch(t.type){case"inbound-rtp":var e=t.bytesReceived,i=t.packetsReceived,a=t.packetsLost,s=t.ssrc,u=t.jitter,c=void 0===u?0:u,f=t.timestamp,l=t.insertedSamplesForDeceleration,p=void 0===l?0:l,d=t.totalSamplesReceived,v=void 0===d?0:d,h=t.removedSamplesForAcceleration,m=void 0===h?0:h,y=t.jitterBufferDelay,E=void 0===y?0:y,g=t.audioLevel,S=void 0===g?0:g,O=r.rateBytesCalculator(t,"bytesReceived","timestamp",8,1,n),T=r.rateBytesCalculator(t,"insertedSamplesForDeceleration","timestamp",1,1e3,n),I=r.rateBytesCalculator(t,"totalSamplesReceived","timestamp",1,1e3,n),b=r.rateBytesCalculator(t,"removedSamplesForAcceleration","timestamp",1,1e3,n),N=r.rateBytesCalculator(t,"packetsReceived","timestamp",1,1e3,n),R=r.rateBytesCalculator(t,"packetsLost","timestamp",1,1e3,n);o.jitterBufferDelay=E,o.bytesReceived=e,o.bytesReceivedSecond=O>0?O:0,o.packetsLost=a,o.packetsLostSecond=R,o.packetsReceived=i,o.packetsReceivedSecond=N,o.ssrc=s,o.jitter=Math.floor(1e3*c),o.insertedSamplesForDeceleration=p,o.insertedSamplesForDecelerationSecond=T,o.totalSamplesReceived=v,o.totalSamplesReceivedSecond=I,o.removedSamplesForAcceleration=m,o.removedSamplesForAccelerationSecond=b,o.timestamp=f,o.status="active",o.expResolution=0,o.audioLevel=r.calcAudioLevel(S);break;case"codec":var x=t.mimeType;x!==r.audioCodec&&(r.audioCodec=x)}})),o}},{key:"calcAudioLevel",value:function(t){if(t<316e-7||!t)return 0;var e=100*t;return e=(e=Number(e>=1?e.toFixed(0):e.toFixed(2)))>100?100:e}},{key:"rateBytesCalculator",value:function(t,e,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[e])||0,s=Number(t[e])||0,u=Number(i[r]),c=Number(t[r]);if([u,c,a,s].some((function(t){return"number"!=typeof t})))return 0;if(c===u)return 0;var f=n*(s-a),l=(c-u)/o;return Math.max(Math.floor(f/l),0)}}]),t}();const ce=ue;var fe,le=self,pe=function(t){le.postMessage(t)};le.onmessage=function(t){var e=z.STATS_VIDEO_RECEIVER,r=z.STATS_AUDIO_RECEIVER,n=z.STATS_SENDER,o=z.INIT,i=t.data,a=i.type,s=i.data,u=i.config;switch(a){case o:fe||(fe=new ce(pe)).setConfig(u);break;case e:fe.statsVideoReceiver(s);break;case r:fe.statsAudioReceiver(s);break;case n:fe.statsSender(s)}}})()})();',"Worker",void 0,void 0)}function $r(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 Zr(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 Zr(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Zr(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 Jr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Qr=it.browser.getPlatform().isFirefox,en=it.browser.getBrowserName(),tn=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e(this,t),this.connectCount=0,this.streamSenders=[],this.senderMap={},this.senderTimer=null,this.videoCodecs=[],this.audioCodecs=[],this.qualityWorker=null,this.localIPAddress="",this.peerLibStatus=!0,this.peerCallState=ce.INIT,this.isReceivedTrackMsg=!1,this.isCreatedOffer=!1,this.isReceivedAnswer=!1,this.contentTrackSize={width:0,height:0,area:0},this.detectTrackMsgTimer=null,this.candidateList=[];var i=r.logger,o=ce.RESTART,a=ce.INIT;this.client=r,this.connectState={peer:se.disconnected,ice:ue.disconnected},this.logger=i,this.firstCallState=n?o:a,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.onHandleIcecandidate=this.onHandleIcecandidate.bind(this),this.onTrack=this.onTrack.bind(this),this.setSupportCodec(),this.init()}return a(t,[{key:"initQualityWorker",value:function(){this.qualityWorker||(this.qualityWorker=new qr,this.qualityWorker.onmessage=this.onMeetingStats.bind(this))}},{key:"init",value:function(){this.initTimer(),this.peerConnection=new RTCPeerConnection(rr),this.peerConnection.onnegotiationneeded=this.onHandleNegotiationNeeded,this.peerConnection.oniceconnectionstatechange=this.onHandleIceConnectionStateChange,this.peerConnection.onconnectionstatechange=this.onHandleConnectionStateChange,this.peerConnection.onicecandidateerror=this.onHandleIcecandidateerror,this.peerConnection.onicecandidate=this.onHandleIcecandidate,null===this.peerConnection.ontrack?this.peerConnection.ontrack=this.onTrack:this.peerConnection.addEventListener("track",this.onTrack)}},{key:"sendEmmit",value:function(e,t){var r=this.firstCallState;this.logger.log("send peer connect status: ",{type:e,code:t,firstCallState:r});var n=ce.CONNECTED,i=ce.RECONNECTED;if("XYSDK:950518"===t&&this.firstCallState===n&&this.client.setPeerConnectionStatus(!0),"XYSDK:950518"!==t||this.firstCallState!==i){var o=gt(t);this.logger.log("[Peer]send call status msg:",{type:e,status:o}),this.client.emitMessage(e,o)}}},{key:"getPeerConnectionStatus",value:function(){var e=ce.CONNECTED;return this.firstCallState===e||this.peerCallState===e}},{key:"stopConnectTimer",value:function(){this.connectTimer&&clearTimeout(this.connectTimer),this.connectTimer=null,this.connectCount=0,this.isCreatedOffer=!1,this.isReceivedAnswer=!1,this.candidateList=[]}},{key:"startDetectTrackMsgTimer",value:function(){var e=this;this.detectTrackMsgTimer=setTimeout((function(){!e.isReceivedTrackMsg&&e.peerLibStatus&&e.handlePeerConnectError("XYSDK:950526")}),5e3)}},{key:"stopDetectTrackMsgTimer",value:function(){this.detectTrackMsgTimer&&clearTimeout(this.detectTrackMsgTimer),this.detectTrackMsgTimer=null}},{key:"initTimer",value:function(){var e=this;this.connectTimer=setTimeout((function(){var t=ue.connected,r=ue.completed,n=se.connected,i=se.unknown,o=ce.FAILED,a=ce.CONNECTED,s=ce.INIT,u=ce.CONNECTING,c=ce.RECONNECTED,l=[n,i],h=[t,r],f=e.connectState,d=f.peer,p=f.ice,v=ze()(e.connectState);if(e.connectCount>400)return e.logger.log("loop peer status after 40s: ",v),e.peerCallState=o,e.sendEmmit(Pe.CALL_STATUS,"XYSDK:950517"),void e.stopConnectTimer();if(l.includes(d)&&h.includes(p))return e.logger.log("loop peer status: ",v),e.firstCallState=e.firstCallState===s?a:c,e.peerCallState=a,e.sendEmmit(Pe.CALL_STATUS,"XYSDK:950518"),e.stopConnectTimer(),void e.startDetectTrackMsgTimer();if(200===e.connectCount){if(e.logger.log("loop peer status after 20s: ",v),e.isCreatedOffer&&!e.isReceivedAnswer)return e.logger.fatal("[Peer]create offer but not receive answer, please check media uaa service"),void e.handlePeerConnectError("XYSDK:950525");if(e.candidateList.length&&e.peerCallState!==a)return e.logger.fatal("[Peer]received ice protocol but not negotiation failed, please check media uaa service: ",{candidateList:e.candidateList}),void e.handlePeerConnectError("XYSDK:950527");e.peerCallState=u,e.sendEmmit(Pe.CALL_STATUS,"XYSDK:950519")}e.connectCount+=1,e.initTimer()}),100)}},{key:"handlePeerConnectError",value:function(e){this.stopConnectTimer(),this.sendEmmit(Pe.CALL_STATUS,e)}},{key:"onHandleNegotiationNeeded",value:function(){return Jr(this,void 0,void 0,u().mark((function e(){return u().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:"appendExtmap",value:function(e){return Jr(this,void 0,void 0,u().mark((function t(){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n","a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01","a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid\r\n",r="a=extmap:4",48,10,t.abrupt("return",e.replace(/a\=extmap\:3\ urn:ietf:params:rtp\-hdrext:sdes:mid/g,(function(e,t,n){var i=t+48+10+1;return n.substring(t+48,i).includes(r)?e:"".concat(e,"\r\n").concat("a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n").concat("a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01")})));case 7:case"end":return t.stop()}}),t)})))}},{key:"createBaseOfferConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Jr(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.peerConnection){t.next=19;break}return t.next=4,this.peerConnection.createOffer(e);case 4:if(r=t.sent,n=null==(n=r.sdp||"")?void 0:n.replace("useinbandfec=1","useinbandfec=0"),!Qr){t.next=11;break}return t.next=10,this.appendExtmap(n);case 10:n=t.sent;case 11:return r.sdp=n,this.isCreatedOffer=!0,t.next=15,this.peerConnection.setLocalDescription(r);case 15:this.logger.log("send offer"),this.sendSocketMessage("offer",{sdp:r.sdp,browser:en}),this.client.getMediaManager().sendPeopleCapability(),this.client.getMediaManager().sendContentCapability();case 19:t.next=26;break;case 21:t.prev=21,t.t0=t.catch(0),i=t.t0.name,o=void 0===i?"":i,a=t.t0.code,s=void 0===a?0:a,c=t.t0.message,l=void 0===c?"":c,this.logger.fatal("[Peer]create offer error: ",{name:o,code:s,message:l}),this.handlePeerConnectError("XYSDK:950524");case 26:case"end":return t.stop()}}),t,this,[[0,21]])})))}},{key:"sendSocketMessage",value:function(e,t){var r=this.client.getInviteInfo(),n=r.meetingId,i=r.callerUri,o=r.callIndex;this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",callIndex:o,body:Object.assign({type:e,meetingId:n,endpointId:i},t)})}},{key:"handleCandidate",value:function(e){var t;return Jr(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("handle candidate: ",e),this.cacheCandidateData(e.candidate||""),delete e.type,r.prev=3,r.next=6,null===(t=this.peerConnection)||void 0===t?void 0:t.addIceCandidate(new RTCIceCandidate(e));case 6:r.next=13;break;case 8:r.prev=8,r.t0=r.catch(3),n=r.t0.name,i=void 0===n?"":n,o=r.t0.code,a=void 0===o?0:o,s=r.t0.message,c=void 0===s?"":s,this.logger.fatal("peer add ice candidate error: ",{name:i,code:a,message:c,candidateList:this.candidateList}),this.handlePeerConnectError("XYSDK:950522");case 13:case"end":return r.stop()}}),r,this,[[3,8]])})))}},{key:"cacheCandidateData",value:function(e){var t=null==e?void 0:e.split(" "),r=t[4]||"",n=t[5]||"";if(r||n){var i={host:r,port:n};this.logger.log("[Peer]parse candidate ip",{host:r,port:n}),this.candidateList.push(i)}}},{key:"handleAnswer",value:function(e){var t;return Jr(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,this.isReceivedAnswer=!0,this.logger.log("set remote answer description"),r.next=5,null===(t=this.peerConnection)||void 0===t?void 0:t.setRemoteDescription(new RTCSessionDescription(e));case 5:r.next=12;break;case 7:r.prev=7,r.t0=r.catch(0),n=r.t0.name,i=void 0===n?"":n,o=r.t0.code,a=void 0===o?0:o,s=r.t0.message,c=void 0===s?"":s,this.logger.fatal("[Peer]handle answer error:",{name:i,code:a,message:c}),this.handlePeerConnectError("XYSDK:950523");case 12:case"end":return r.stop()}}),r,this,[[0,7]])})))}},{key:"setParameters",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bandwidth:or.VIDE_BANDWIDTH_BIT,frameRate:or.VIDE_FRAMERATE_BIT},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;return Jr(this,void 0,void 0,u().mark((function a(){var s,c,l,h,f,d,p=this;return u().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:s=Object.keys(this.senderMap),c=n.bandwidth,l=n.frameRate,h=$r(s.entries()),a.prev=3,d=u().mark((function n(){var a,s,h,d,v,g,m,y;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=Yr(f.value,2),s=a[1],h=p.senderMap[s].sender,d=null===(t=null==h?void 0:h.track)||void 0===t?void 0:t.id,"video"!==(null===(r=null==h?void 0:h.track)||void 0===r?void 0:r.kind)||e!==d){n.next=20;break}return v=null,n.prev=6,g={encodings:[{maxBitrate:or.VIDE_BANDWIDTH_BIT}]},v=h.getParameters()||g,m=i?1e3*c:c,y=(null==v?void 0:v.encodings)||[],v.encodings=y.map((function(e){return e?Object.assign(Object.assign({},e),{maxBitrate:m,maxFramerate:l,active:0!==c}):{maxBitrate:m}})),n.next=14,h.setParameters(v);case 14:p.logger.log("sender set parameters successfully",{params:v,realBandwidth:m,trackId:d,streamId:null==o?void 0:o.id}),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(6),p.logger.error("sender set parameters failed",v,n.t0);case 20:case"end":return n.stop()}}),n,null,[[6,17]])})),h.s();case 6:if((f=h.n()).done){a.next=10;break}return a.delegateYield(d(),"t0",8);case 8:a.next=6;break;case 10:a.next=15;break;case 12:a.prev=12,a.t1=a.catch(3),h.e(a.t1);case 15:return a.prev=15,h.f(),a.finish(15);case 18:case"end":return a.stop()}}),a,this,[[3,12,15,18]])})))}},{key:"onHandleIceConnectionStateChange",value:function(){return Jr(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.log("handle ice connection state change"),this.peerStateChange(),this.logger.log("ice state change: ",this.connectState);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"onHandleConnectionStateChange",value:function(e){return Jr(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.log("handle peer connection state change"),this.peerStateChange(),this.logger.log("peer connection state change: ",this.connectState);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"peerStateChange",value:function(){if(this.peerConnection){this.logger.log("current state: ",{ice:this.peerConnection.iceConnectionState,peer:this.peerConnection.connectionState,sign:this.peerConnection.signalingState});var e=ue.unknown,t=ue.connected,r=ue.checking,n=se.unknown,i=se.connected,o=se.connecting,a=this.peerConnection.iceConnectionState||e,s=this.peerConnection.connectionState||n,u=[i,o],c=[t,r],l=this.connectState,h=l.peer,f=l.ice;this.connectState={ice:a,peer:s};var d=h===i&&!u.includes(s),p=Qr&&f===t&&!c.includes(a);(d||p)&&this.restartIceConnection("peer")}}},{key:"onHandleIcecandidateerror",value:function(e){this.logger.fatal("[Peer][Event]handle ice candidate error:",{event:e,candidateList:this.candidateList}),this.handlePeerConnectError("XYSDK:950522")}},{key:"onHandleIcecandidate",value:function(e){if(e&&e.candidate&&e.candidate.candidate){var t=e.candidate.candidate.split("\n")[0].split(" ")[4];this.localIPAddress=t,this.logger.log("localIPAddress: ",this.localIPAddress),this.peerConnection&&(this.peerConnection.onicecandidate=null)}}},{key:"isPeerConnected",get:function(){var e=!1;if(this.peerConnection){var t=ue.connected,r=se.unknown,n=se.connected,i=this.connectState,o=i.peer,a=i.ice;e=a===t&&o===n||Qr&&a===t&&o===r}return this.logger.log("is peer connected: ",e),e}},{key:"restartIceConnection",value:function(e){return Jr(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=ce.CONNECTING,n=ce.SOCKET_CONNECTING,this.logger.log("restart ice connection: ",e),this.logger.log("peer call state: ",this.peerCallState),this.logger.log("connect state: ",this.connectState),!this.isPeerConnected){t.next=8;break}return this.logger.log("Peer is connected, not need restart"),t.abrupt("return");case 8:if(this.peerCallState!==n){t.next=11;break}return this.logger.log("Socket is connecting, not need restart"),t.abrupt("return");case 11:if("socket"!==e){t.next=21;break}return this.connectState={peer:se.unknown,ice:ue.unknown},this.logger.log("reset connect state: ",this.connectState),this.peerCallState=n,this.stopConnectTimer(),this.initTimer(),t.next=19,this.createBaseOfferConnection({iceRestart:!0});case 19:t.next=31;break;case 21:if(this.peerCallState===r||"peer"!==e){t.next=30;break}return this.connectState={peer:se.unknown,ice:ue.unknown},this.logger.log("reset connect state: ",this.connectState),this.peerCallState=r,this.initTimer(),t.next=28,this.createBaseOfferConnection({iceRestart:!0});case 28:t.next=31;break;case 30:this.logger.log("Not need restart ice connection");case 31:case"end":return t.stop()}}),t,this)})))}},{key:"destroy",value:function(){var e,t;if(this.peerLibStatus=!1,this.stopConnectTimer(),this.stopDetectTrackMsgTimer(),this.resetContentTrackSize(),this.senderTimer&&clearInterval(this.senderTimer),this.senderTimer=null,this.peerConnection){for(var r in this.senderMap){var n=this.senderMap[r];(null==n?void 0:n.sender)&&(null===(e=this.peerConnection)||void 0===e||e.removeTrack(n.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;var i=ce.INIT;this.firstCallState=i,this.peerCallState=i,this.streamSenders=[],this.candidateList=[],this.senderMap={},this.isCreatedOffer=!1,this.isReceivedAnswer=!1,this.isReceivedTrackMsg=!1}},{key:"publish",value:function(e,t){if(this.peerLibStatus){this.logger.log("peer publish: ",t);var r=e.getMediaStreams(),n=r.streams,i=r.pipelineStreams,o=r.contentStreams,a=v.CONTENT,s=v.PIPE,u=v.VIDEO,c=v.AUDIO,l=v.VIDEO_AUDIO,h=v.VIDEO_AUDIO_PIPE,f=M.VIDEO,d=M.AUDIO,p=R.REMOTE,g=R.PIPELINE,m=R.CONTENT,y=_.NORMAL;if(t===u||t===l||t===h){var b=n.filter((function(e){var t=e.type,r=e.kind,n=e.status;return r===f&&t===p&&n===y}));this.streamConfigProcessor(b,ae.SENDONLY)}if(t===c||t===l||t===h){var S=n.filter((function(e){var t=e.type,r=e.kind,n=e.status;return r===d&&t===p&&n===y}));this.streamConfigProcessor(S,ae.SENDONLY)}if(t===s||t===h){var w=i.filter((function(e){var t=e.type,r=e.status;return t===g&&r===y}));this.streamConfigProcessor(w,ae.RECVONLY)}if(t===a){var E=o.filter((function(e){var t=e.type,r=e.status;return t===m&&r===y}));this.streamConfigProcessor(E,ae.SENDONLY)}this.initSenderStatus()}else this.logger.warn("publish rejected, meeting is ended")}},{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,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Jr(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=oe.INIT,t&&(this.initQualityWorker(),null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:n,config:{logInterval:5,reportInterval:2},data:{}})),!this.peerLibStatus){r.next=9;break}return r.next=5,this.sendVideoReceiverStats();case 5:return r.next=7,this.sendAudioReceiverStats();case 7:return r.next=9,this.sendSenderStats();case 9:case"end":return r.stop()}}),r,this)})))}},{key:"closeContentStream",value:function(){var e=this,t=Object.keys(this.senderMap),r=R.CONTENT,n=_.DISABLED;t.forEach((function(t){var i=e.senderMap[t],o=i.config,a=i.sender,s=o.type,u=o.status;s===r&&u!==n&&(a.replaceTrack(null),i.config.status=_.UNKNOWN)}))}},{key:"getPeerStatus",value:function(){return this.logger.log("get peer status: ",this.connectState),this.connectState.peer===se.connected}},{key:"onMeetingStats",value:function(e){var t=e.data,r=t.data,n=t.type,i=t.config,o=oe.INTERNALS;oe.REPORT_INTERNALS,oe.REPORT_NETWORK_LEVEL;if(n===o){var a=r,s=i.printLog;this.client.debug&&this.client.sendInternals(a),this.client.reportQualityData(a),s&&this.logger.debug("meeting-stats",a)}}},{key:"sendSenderStats",value:function(){var e;return Jr(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=oe.STATS_SENDER,n=_.NORMAL,i=Object.keys(this.senderMap),o=[],t.prev=4,a=$r(i.entries()),t.prev=6,c=u().mark((function e(){var t,r,i,a,c,h,f,d,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Yr(s.value,2),r=t[1],i={},a=l.senderMap[r],c=a.track,h=a.config,f=a.sender,!c||h.status!==n){e.next=15;break}return e.next=7,f.getStats();case 7:d=e.sent,p=[],d.forEach((function(e){p.push(e)})),i.statsList=p,i.trackId=c.id,i.streamConfig=Object.assign(Object.assign({},h),{stream:null}),i.isFirefox=Qr,o.push(i);case 15:case"end":return e.stop()}}),e)})),a.s();case 9:if((s=a.n()).done){t.next=13;break}return t.delegateYield(c(),"t0",11);case 11:t.next=9;break;case 13:t.next=18;break;case 15:t.prev=15,t.t1=t.catch(6),a.e(t.t1);case 18:return t.prev=18,a.f(),t.finish(18);case 21:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:o}),t.next=27;break;case 24:t.prev=24,t.t2=t.catch(4),this.logger.error("sendSenderStats error",t.t2);case 27:case"end":return t.stop()}}),t,this,[[4,24],[6,15,18,21]])})))}},{key:"sendAudioReceiverStats",value:function(){var e;return Jr(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=oe.STATS_AUDIO_RECEIVER,n=this.client.getMediaManager().getAudioTrackList(),i=n.length,o=[],a=this.client.getRemoteSpeakerMap(),t.prev=5,s=u().mark((function e(){var t,r,s,h,f,d,p,v,g,m,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n[c],r=t.rest.track,s=t.rest.streamId,h={},f=a[s]||{name:"",endpointId:"",trackId:""},d=f.name,p=void 0===d?"":d,v=f.endpointId,g={name:p,endpointId:void 0===v?"":v,trackId:s},!r||"live"!==r.readyState){e.next=19;break}return e.next=10,l.peerConnection.getStats(r);case 10:m=e.sent,y=[],m.forEach((function(e){y.push(e)})),h.statsList=y,h.trackId=r.id,h.trackSetting=r.getSettings()||{},h.audioSpeaker=g,h.isContent=i===c+1,o.push(h);case 19:case"end":return e.stop()}}),e)})),c=0;case 8:if(!(c<n.length)){t.next=13;break}return t.delegateYield(s(),"t0",10);case 10:c++,t.next=8;break;case 13:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:o}),t.next=19;break;case 16:t.prev=16,t.t1=t.catch(5),this.logger.error("sendAudioReceiverStats error",t.t1);case 19:case"end":return t.stop()}}),t,this,[[5,16]])})))}},{key:"sendVideoReceiverStats",value:function(){var e;return Jr(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=oe.STATS_VIDEO_RECEIVER,n=this.client.getLayoutMap(),i=(new Date).valueOf(),o=[],t.prev=4,a=$r(n.entries()),t.prev=6,c=u().mark((function e(){var t,r,n,i,a,c,l,f,d,p,v,g,m,y,b,S;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Yr(s.value,2),r=t[1],n={},i=r[0].roster||{},a=i.endpointId,c=void 0===a?"":a,l=i.videoTxMute,f=i.key,d=i.isLocal,p=r[0].id,c){e.next=6;break}return e.abrupt("return",{v:void 0});case 6:if(d||l||!f){e.next=24;break}if(v=h.client.getVideoManagerMap(),!v.has(p)){e.next=24;break}if(g=v.get(p),!(m=null==g?void 0:g.getVideoTracks())||!m[0]){e.next=24;break}return y=m[0],e.next=16,h.peerConnection.getStats(y);case 16:b=e.sent,S=[],b.forEach((function(e){S.push(e)})),n.layoutItem=r[0],n.statsList=S,n.trackSetting=y.getSettings(),n.trackId=y.id,o.push(n);case 24:case"end":return e.stop()}}),e)})),a.s();case 9:if((s=a.n()).done){t.next=16;break}return t.delegateYield(c(),"t0",11);case 11:if(!(l=t.t0)){t.next=14;break}return t.abrupt("return",l.v);case 14:t.next=9;break;case 16:t.next=21;break;case 18:t.prev=18,t.t1=t.catch(6),a.e(t.t1);case 21:return t.prev=21,a.f(),t.finish(21);case 24:null===(e=this.qualityWorker)||void 0===e||e.postMessage({type:r,config:{},data:{timestamp:i,workerVideoReceiver:o}}),t.next=30;break;case 27:t.prev=27,t.t2=t.catch(4),this.logger.error("sendVideoReceiverStats error",t.t2);case 30:case"end":return t.stop()}}),t,this,[[4,27],[6,18,21,24]])})))}},{key:"streamConfigProcessor",value:function(e,t){var r=this;this.logger.log("streamConfigProcessor: ",{streamConfigList:e,direction:t});var n=M.VIDEO,i=M.AUDIO,o=R.REMOTE,a=R.PIPELINE,s=R.CONTENT;this.calculateContentTrackSize(e),e.forEach((function(e){var u=e.pipeStream,c=e.stream,l=e.type,h=e.kind,f=e.id,d=[];l!==o&&l!==s||(h===n?d=(null==c?void 0:c.getVideoTracks())||[]:h===i&&(d=(null==c?void 0:c.getAudioTracks())||[]),d.forEach((function(n){var i=f+h,o=!!r.senderMap[i];r.logger.log("isHasSender: ",o),o?(r.senderMap[i].config=e,r.replaceTrackProcessor(n,e)):r.addTrackProcessor(n,e,t)}))),l===a&&u.forEach((function(n){r.addTrackProcessor(n,e,t)}))})),this.logger.log("transceiver senders: ",this.senderMap)}},{key:"calculateContentTrackSize",value:function(e){var t=this,r=!1;e.forEach((function(e){var n;if(e.type===R.CONTENT){var i=null===(n=e.stream)||void 0===n?void 0:n.getVideoTracks();i&&i.forEach((function(e){var r=e.getSettings(),n=r.width,i=void 0===n?0:n,o=r.height,a=void 0===o?0:o,s=i*a;(0===t.contentTrackSize.area||s>0&&s<t.contentTrackSize.area)&&(t.contentTrackSize={width:i,height:a,area:s})})),r=!0}})),r&&this.logger.log("content track really settings:",this.contentTrackSize)}},{key:"resetContentTrackSize",value:function(){this.contentTrackSize={width:0,height:0,area:0},this.logger.log("[Peer]reset ct size: ",this.contentTrackSize)}},{key:"addTrackProcessor",value:function(e,t,r){var n=this.addTransceiver(e,r,t);this.setCodecPreferences(e,n),this.setSenderMap(e,t,n)}},{key:"setCodecPreferences",value:function(e,t){try{var r=e.kind;r===T.VIDEO&&this.videoCodecs.length?t.setCodecPreferences(this.videoCodecs):r===T.AUDIO&&this.audioCodecs.length&&t.setCodecPreferences(this.audioCodecs)}catch(e){}}},{key:"setSupportCodec",value:function(){return Jr(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t=RTCRtpSender.getCapabilities("video"),r=RTCRtpSender.getCapabilities("audio"),n=["video/rtx","video/h264"],(null==t?void 0:t.codecs.length)&&(this.videoCodecs=null==t?void 0:t.codecs.filter((function(e){var t=e.mimeType.toLowerCase();return n.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 all codecs: ",{video:t,audio:r}),this.logger.log("supported audioCodecs: ",this.audioCodecs),this.logger.log("supported videoCodecs: ",this.videoCodecs)}catch(e){this.logger.warn("get browser support codecs error: ",e)}case 1:case"end":return e.stop()}}),e,this)})))}},{key:"replaceTrackProcessor",value:function(e,t){var r,n=t.id,i=t.stream,o=n+t.kind,a=this.senderMap[o],s=a.track,u=a.config;this.logger.log("replace track stream config: ",t),this.logger.log("replace track setting: ",e.getSettings()),e.kind===(null==s?void 0:s.kind)&&(null==i?void 0:i.id)===(null===(r=null==u?void 0:u.stream)||void 0===r?void 0:r.id)?(a.sender.replaceTrack(e),a.track=e,this.resetEncodingsScale(e,a.sender,t),this.logger.log("succeeded replace track")):this.logger.error("replaceTrackProcessor error, not match sender stream...")}},{key:"resetEncodingsScale",value:function(e,t,r){return Jr(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=r.simulcastMode,o=e.kind,i!==B.SCALE_RES||"video"!==o){n.next=16;break}return a=t.getParameters(),s=a.encodings,this.logger.log("previous sender parameters: ",a),s.forEach((function(t){var n=c.calculateScaleValue(e,r);c.logger.log("reset scale: ",n),t.scaleResolutionDownBy=n})),this.logger.log("next sender parameters: ",a),n.prev=8,n.next=11,t.setParameters(a);case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(8),this.logger.warn("reset sender scale error: ",n.t0);case 16:case"end":return n.stop()}}),n,this,[[8,13]])})))}},{key:"addTransceiver",value:function(e,t,r){var n,i={direction:t},o={},a=r.simulcastMode,s=r.priorityMode,u=e.kind,c=u;if(r.stream){if(i.streams=[r.stream],c=e,a===B.SCALE_RES&&"video"===u){var l=this.calculateScaleValue(e,r);o.scaleResolutionDownBy=l}s&&(o.priority=s,o.networkPriority=s),i.sendEncodings=[o]}return this.logger.log("transceiver options: ",i),null===(n=this.peerConnection)||void 0===n?void 0:n.addTransceiver(c,i)}},{key:"calculateScaleValue",value:function(e,t){var r=t.resolution,n=t.type;this.logger.log("origin stream config: ",t);var i=R.CONTENT,o=or.MAP_RESOLUTION_STRING[r],a=o.width,s=o.height,u=1;if(n!==i){var c=e.getSettings(),l=c.width,h=void 0===l?0:l,f=c.height,d=void 0===f?0:f,p=+(h/d).toFixed(6),v=d-s,g=h-a;this.logger.log("remote track area: ",{width:h,height:d,trackRatio:p}),p>or.HOR_CONTAINER_RATIO?g>0&&(u=+(h/a).toFixed(3)):(v>0&&(u=+(d/s).toFixed(3)),this.logger.log("remote scale: ",u))}else{var m=this.contentTrackSize,y=m.width,b=void 0===y?0:y,S=m.height,w=void 0===S?0:S,E=+(b/w).toFixed(6),k=b*w,I=a*s;if(this.logger.log("content track area: ",{sTrack:k,sBaseRes:I,width:b,height:w,trackRatio:E}),k>I){var x=Math.ceil(Math.sqrt(I/E));this.logger.log("sH: ",x);var C=Math.ceil(x*E);this.logger.log("sW: ",C),u=E>or.HOR_CONTAINER_RATIO?+(w/x).toFixed(2):+(b/C).toFixed(2),this.logger.log("content scale: ",u)}}return u=Math.max(u,1),this.logger.log("set scale value: ",{scaleValue:u,resolution:r}),u}},{key:"setSenderMap",value:function(e,t,r){return Jr(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=t.status,o=t.type,a=t.id,s=t.kind,c=qt.includes(i),l=a+s,$t.includes(o)&&(this.senderMap[l]={config:t,track:c?e:null,sender:r.sender});case 4:case"end":return n.stop()}}),n,this)})))}},{key:"onTrack",value:function(e){this.isReceivedTrackMsg||(this.isReceivedTrackMsg=!0),this.client.getMediaManager().handleTrackEvent(e)}}]),t}(),rn=(r(9772),r(9873),function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}),nn="LOCAL_PREFIX_",on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={};mt.isBoolean(t)?r=!!t:Object.keys(t).forEach((function(n){e[n]&&(r[n]=t[n])}));return r},an=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(e=Kr,navigator&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&(e=navigator.mediaDevices.getSupportedConstraints()),e),n=t.video,i=t.audio;return{video:on(r,n),audio:on(r,i)}},sn=function(e){return new Promise((function(t){return setTimeout(t,e)}))},un=function(e){return rn(void 0,void 0,void 0,u().mark((function t(){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0;case 1:if(!r){t.next=7;break}return t.next=4,sn(e);case 4:r=!1,t.next=1;break;case 7:case"end":return t.stop()}}),t)})))},cn=function(e){var t=e.name,r=e.message,n={name:t,message:r};return gt("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",n)};function ln(){return ln="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},ln.apply(this,arguments)}var hn=function(){function t(){e(this,t),this.eventMap=new Map}return a(t,[{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.eventMap.has(e)||this.eventMap.set(e,[]);var n=this.eventMap.get(e);n.push({total:r,listener:t}),this.eventMap.set(e,n)}},{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.eventMap.has(e)&&this.eventMap.delete(e)}},{key:"removeAllListener",value:function(){this.eventMap.clear()}},{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];if(this.eventMap.has(e)){var o=this.eventMap.get(e);o.forEach((function(r,i){(-1===r.total||r.total>=1||"function"==typeof r.listener)&&r.listener.apply(t,n),r.total>=1&&(r.total=r.total-1,0===r.total&&(r.listener=function(){}),o[i]=r,t.eventMap.set(e,o))}))}}}]),t}();function fn(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 dn(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 dn(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function dn(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 pn(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var vn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},gn=it.browser.getPlatform().isFirefox,mn=function(t){h(n,t);var r=pn(n);function n(t){var i;return e(this,n),(i=r.call(this)).streamInstance=t,i.logger=t.logger,i.streams=[],i.previewStreams=[],i.pipelineStreams=[],i.contentStreams=[],i}return a(n,[{key:"getMediaStreams",value:function(){return{previewStreams:this.previewStreams,streams:this.streams,pipelineStreams:this.pipelineStreams,contentStreams:this.contentStreams}}},{key:"getEnableStreamConfig",value:function(e,t){this.logger.log("invoke getEnableStreamConfig");var r,n,i=G.CAPTURE,o=t===i;e===i&&(r=this.getEnableVideoStreamConfig()),o&&(n=this.getEnableAudioStreamConfig());var a={videoConfig:r,audioConfig:n};return this.logger.log("get enable stream config: ",a),a}},{key:"setStreams",value:function(e){return vn(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[bTrack]invoke setStreams"),t.next=3,this.setRemoteStreams(e,M.ALL);case 3:return t.next=5,this.setPreviewStream(e);case 5:this.logger.log("[bTrack]streams created: ",{streams:this.streams,previewStreams:this.previewStreams,pipelineStreams:this.pipelineStreams});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"setRemoteStreams",value:function(e,t){var r;return vn(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C,O,T,A,R,N;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.logger.log("invoke setRemoteStreams"),i=M.VIDEO,o=M.AUDIO,a=M.ALL,s=j.FAILED,c=[a,i],l=[a,o],!e){n.next=55;break}h=e.getVideoTracks(),f=e.getAudioTracks(),d=h.length>0,p=f.length>0,v=this.streams.entries(),g=fn(v),n.prev=12,g.s();case 14:if((m=g.n()).done){n.next=44;break}if(y=Yr(m.value,2),b=y[1],S=b.status,w=b.resolution,E=b.simulcastMode,k=b.kind,I=b.stream,x=b.constraintMode,C=b.frameRate,Wt.includes(S)){n.next=42;break}if(this.logger.log("set remote stream: ",b),k!==i||!d||!c.includes(t)){n.next=41;break}if(O=h[0].clone(),I&&(this.removeTracks([I],i),this.logger.log("append video track: ",null==O?void 0:O.id),I.addTrack(O)),b.status=_.NORMAL,E!==B.SCALE_RES){n.next=26;break}return this.logger.log("use scale resolution mode in rtpSender"),n.abrupt("continue",42);case 26:if(n.prev=26,!x||x===s){n.next=33;break}return T=Lt(w,C,x),A=T.video,n.next=32,O.applyConstraints(A);case 32:this.logger.log("success apply constraints: ",{constraint:A,setting:O.getSettings()});case 33:n.next=41;break;case 35:n.prev=35,n.t0=n.catch(26),this.logger.error("init remote track constraints failed: ",n.t0),b.status=_.FAILED,O.stop(),this.logger.log("next stream config: ",b);case 41:k===o&&p&&l.includes(t)&&(I&&(this.removeTracks([I],o),this.logger.log("append audio track: ",null===(r=f[0])||void 0===r?void 0:r.id),I.addTrack(f[0])),this.logger.log("set audio media tracks"),b.status=_.NORMAL);case 42:n.next=14;break;case 44:n.next=49;break;case 46:n.prev=46,n.t1=n.catch(12),g.e(n.t1);case 49:return n.prev=49,g.f(),n.finish(49);case 52:this.logger.log("remote streams config: ",this.streams),n.next=58;break;case 55:R=_.UNKNOWN,N=_.DISABLED,this.streams=this.streams.map((function(e){var r=e.kind;return e.status!==N&&(t&&t===r||!t)&&(e.status=R),e})),this.logger.log("Not remote stream, reset status to UNKNOWN: ",this.streams);case 58:case"end":return n.stop()}}),n,this,[[12,46,49,52],[26,35]])})))}},{key:"setPreviewStream",value:function(e){return vn(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("invoke setPreviewStream"),r=M.VIDEO,n=(null==e?void 0:e.getVideoTracks())||[],i=n.length,e&&i>0){o=n[0].clone();try{this.previewStreams=this.previewStreams.map((function(e){var t=e.stream;return t&&(a.removeTracks([t],r),a.logger.log("append preview video track: ",o.id),t.addTrack(o)),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),{status:_.UNKNOWN})})),this.logger.log("preview streams config of not stream: ",this.previewStreams);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"setContentStreams",value:function(e){return vn(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]setContentStreams"),e){r=!0,n=M.VIDEO,i=M.AUDIO,o=e.getVideoTracks()[0],a=e.getAudioTracks()[0],s=this.contentStreams.entries(),c=fn(s);try{for(c.s();!(l=c.n()).done;)h=Yr(l.value,2),f=h[1],d=f.status,p=f.kind,v=f.stream,Wt.includes(d)||(p===n&&(f.status=_.NORMAL,g=o,r?r=!1:(m=o.clone(),g=m),null==v||v.addTrack(g)),p===i&&(a?(f.status=_.NORMAL,null==v||v.addTrack(a)):f.status=_.UNKNOWN))}catch(e){c.e(e)}finally{c.f()}this.logger.log("content streams config: ",this.contentStreams)}else y=_.UNKNOWN,b=_.DISABLED,this.streams=this.contentStreams.map((function(e){return e.status!==b&&(e.status=y),e})),this.logger.log("Not remote stream, reset status to UNKNOWN: ",this.contentStreams);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"removeTracks",value:function(e,t){this.logger.log("invoke removeTracks: ",t);var r=M.VIDEO,n=M.AUDIO,i=M.ALL;e.forEach((function(e){var o=[];t===n&&(o=e.getAudioTracks()),t===r&&(o=e.getVideoTracks()),t===i&&(o=e.getTracks()),o.forEach((function(t){t.stop(),e.removeTrack(t)}))}))}},{key:"getEnableVideoStreamConfig",value:function(){var e,t=this.streams,r=0,n=fn(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=i.resolution,a=i.status;i.kind===M.VIDEO&&Xt.includes(a)&&o>r&&(r=o)}}catch(e){n.e(e)}finally{n.f()}return t.find((function(e){return e.resolution===r}))}},{key:"getEnableAudioStreamConfig",value:function(){return this.streams.find((function(e){var t=e.status;return e.kind===M.AUDIO&&Xt.includes(t)}))}},{key:"getEnableContentStreamConfig",value:function(){var e,t,r=M.VIDEO,n=this.contentStreams,i=0,o=fn(n);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.resolution,u=a.status;a.kind===r&&Xt.includes(u)&&s>i&&(i=s)}}catch(e){o.e(e)}finally{o.f()}return e=n.find((function(e){return e.resolution===i})),this.logger.log("enable content stream config: ",e),e}},{key:"initStreamsConfig",value:function(){this.logger.log("invoke initStreamsConfig"),this.initPreviewStreamConfig(),this.initRemoteStreamsConfig(),this.initPipelineStreamsConfig()}},{key:"initPreviewStreamConfig",value:function(){var e=new MediaStream;this.previewStreams=[{type:R.PREVIEW,stream:e,streamId:e.id,pipeStream:[],kind:M.VIDEO,status:_.UNKNOWN,resolution:N.RS720,frameRate:D.FR30,origin:U.SDK,id:"PREVIEW_0"}],this.logger.log("init previewStreams config: ",this.previewStreams)}},{key:"initRemoteStreamsConfig",value:function(){var e=this.streamInstance.getClient(),t=[],r=_.UNKNOWN,n=_.DISABLED,i=R.REMOTE,o=D.FR30,a=U.SDK,s=j.ADVANCED,u=j.COMMON,c=B.SCALE_RES,l=B.MULTI_RES,h=N.RS720,f=N.RS360,d=N.RS180,p=N.RS90,v=M.VIDEO,g=M.AUDIO,m=F.HIGH,y=F.LOW,b=F.MEDIUM,S=(null==e?void 0:e.getEnterpriseMediaConfig())||{},w=S.peopleSendResolution,E=void 0===w?h:w,k=S.peopleSendFrameRate,I=void 0===k?o:k,x=this.streamInstance.getPlugin().videoPlugin.length;[{kind:v,resolution:h,priorityMode:m,status:E>=h?r:n},{kind:v,resolution:f,priorityMode:b,status:E>=f?r:n},{kind:v,resolution:d,priorityMode:y,status:r},{kind:g,resolution:p,priorityMode:m,status:r}].forEach((function(e,r){var n=e.kind,o=e.resolution,h=e.status,d=e.priorityMode,p=o<=f?u:s,v=new MediaStream;t.push({type:i,stream:v,streamId:v.id,pipeStream:[],kind:n,status:h,resolution:o,frameRate:I,origin:a,constraintMode:p,priorityMode:d,simulcastMode:gn||x?c:l,id:"REMOTE_".concat(r),enableAspectRatio:it.isSupportAspectRatio()})})),this.streams=t,this.logger.log("init streams config: ",this.streams)}},{key:"initPipelineStreamsConfig",value:function(){for(var e=[],t={kind:"audio"},r={type:R.PIPELINE,stream:null,pipeStream:[{kind:"video"},t],kind:M.ALL,status:_.NORMAL,resolution:N.RS90,frameRate:D.FR15,origin:U.SDK,id:""},n=0;n<11;n++)e.push(Object.assign(Object.assign({},r),{id:"PIPELINE_".concat(n)}));for(var i=0;i<3;i++){var o=i+11+1;e.push(Object.assign(Object.assign({},r),{pipeStream:[t],id:"PIPELINE_".concat(o)}))}this.pipelineStreams=e,this.logger.log("pipelineStreams config: ",this.pipelineStreams)}},{key:"initContentStreamsConfig",value:function(){var e=this;if(!this.contentStreams.length){var t=[],r=_.UNKNOWN,n=_.DISABLED,i=R.CONTENT,o=D.FR30,a=U.SDK,s=j.ADVANCED,u=j.COMMON,c=B.SCALE_RES,l=M.VIDEO,h=M.AUDIO,f=N.RS1080,d=N.RS720,p=N.RS90,v=F.HIGH,g=F.LOW,m=F.MEDIUM,y=this.streamInstance.getClient(),b=((null==y?void 0:y.getEnterpriseMediaConfig())||{}).contentSendResolution;[{kind:l,resolution:f,priorityMode:v,status:(void 0===b?f:b)>=f?r:n},{kind:l,resolution:d,priorityMode:m,status:r},{kind:h,resolution:p,priorityMode:g,status:r}].forEach((function(r,n){var l=r.kind,h=r.resolution,f=r.status,d=r.priorityMode,p=gn?u:s,v=c,g=e.streamInstance.getInitContentStream()[h];t.push({type:i,stream:g,streamId:g.id,pipeStream:[],kind:l,status:f,resolution:h,frameRate:o,origin:a,constraintMode:p,simulcastMode:v,priorityMode:d,id:"CONTENT_".concat(n)})})),this.contentStreams=t,this.logger.log("init content streams config: ",this.contentStreams)}}},{key:"getIndexFromStreamChange",value:function(e,t){var r=e.id;return t.findIndex((function(e){return e.streamId===r}))}},{key:"resetStreamsConfigStatus",value:function(e){var t=_.UNKNOWN,r=_.DISABLED,n=_.NORMAL,i=j.ADVANCED,o=j.COMMON,a=N.RS360,s=[r,n];this.streams=this.streams.map((function(r){var n=r.kind,u=r.status,c=r.resolution<=a?o:i;return n!==e||s.includes(u)||(r.status=t,r.constraintMode=c),r})),this.logger.log("reset stream config status: ",this.streams)}},{key:"setStreamParameters",value:function(e,t,r){return vn(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=e.streamChangeInfo,o=r.length,a=_.NORMAL,s=M.VIDEO,c=it.browser.getPlatform(),c.isPc||"hidden"!==document.visibilityState||0!==i.length){n.next=8;break}return this.logger.log("not set bandWidth when document is hidden in mobile"),n.abrupt("return");case 8:this.logger.log("change bandwidth"),l=0;case 10:if(!(l<o)){n.next=49;break}if(h=r[l],f=h.status,d=h.stream,p=h.kind,f!==a||p!==s){n.next=46;break}v=(null==d?void 0:d.getVideoTracks())||[],g=v.length,m=d?this.getIndexFromStreamChange(d,i):-1,y=0;case 17:if(!(y<g)){n.next=46;break}if(!(b=v[y])){n.next=43;break}if(-1===m){n.next=34;break}return S=i[m],w=S.bandwidth,E=S.frameRate,k={bandwidth:Math.max(w,100),frameRate:E},n.prev=24,n.next=27,t.setParameters(b.id,k,!0,d);case 27:n.next=32;break;case 29:n.prev=29,n.t0=n.catch(24),this.logger.log("[stream]set band width failed:",n.t0);case 32:n.next=43;break;case 34:return n.prev=34,I={bandwidth:0,frameRate:0},n.next=38,t.setParameters(b.id,I,!0,d);case 38:n.next=43;break;case 40:n.prev=40,n.t1=n.catch(34),this.logger.log("[stream]reduce band width failed:",n.t1);case 43:y++,n.next=17;break;case 46:l++,n.next=10;break;case 49:case"end":return n.stop()}}),n,this,[[24,29],[34,40]])})))}},{key:"closeStreams",value:function(e){var t=0;return e.forEach((function(e){var r=e.stream;null==r||r.getTracks().forEach((function(e){e.stop(),t+=1}))})),t}},{key:"closeBaseTrack",value:function(){var e=0;this.streams&&(e+=this.closeStreams(this.streams)),this.pipelineStreams&&(e+=this.closeStreams(this.pipelineStreams)),this.previewStreams&&(e+=this.closeStreams(this.previewStreams)),this.contentStreams&&(e+=this.closeStreams(this.contentStreams)),this.streams=[],this.pipelineStreams=[],this.previewStreams=[],this.contentStreams=[],this.logger.log("streams close base track: ",e)}},{key:"stopContentTracks",value:function(){var e=this;this.logger.log("[baseTrack]stop content tracks"),this.contentStreams.forEach((function(t){var r=t.stream;e.stopStreamTracks(r)}))}},{key:"stopStreamTracks",value:function(e){var t=this,r=null==e?void 0:e.getTracks();r&&r.forEach((function(r){r.onended=null,r.stop(),null==e||e.removeTrack(r),t.logger.log("[baseTrack]stop track success")}))}},{key:"emitError",value:function(e){this.logger.warn("emit track error: ",e),this.emitMessage(Me.TRACK_ERROR,e)}},{key:"emitMessage",value:function(e){for(var t,r,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(t=this.logger).log.apply(t,["[trackBase]track emit ".concat(e,":")].concat(o)),(r=ln(d(n.prototype),"emmit",this)).call.apply(r,[this,e].concat(o))}},{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ln(d(n.prototype),"on",this).call(this,e,t,r)}},{key:"off",value:function(e){ln(d(n.prototype),"removeListener",this).call(this,e)}}]),n}(hn);const yn=mn;var bn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Sn=function(){function t(r){e(this,t);var n=G.KEEP,i=A.UNKNOWN;this.track=r,this.logger=r.logger,this.enabledCapture={video:n,audio:n},this.currentMode={type:i,detail:"Init"}}return a(t,[{key:"getEnableCapture",value:function(){return this.enabledCapture}},{key:"getCurrentMode",value:function(){return this.currentMode}},{key:"setEnableCapture",value:function(e){this.enabledCapture=e}},{key:"initCaptureConfig",value:function(e,t){this.logger.log("invoke initCaptureConfig");var r=!t,n=!e,i=G.KEEP,o=G.CAPTURE;this.enabledCapture={video:r?o:i,audio:n?o:i},this.logger.log("enabled capture config: ",this.enabledCapture)}},{key:"createUserMediaStream",value:function(){return bn(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getEnableCapture(),r=t.video,n=t.audio,i=this.track.getEnableStreamConfig(r,n),o=i.videoConfig,a=i.audioConfig,o||a){e.next=9;break}return this.logger.log("Not match enable stream config: ",i),e.next=7,this.track.updateDeviceIdByStream(null);case 7:return this.updateCurrentMode(),e.abrupt("return",null);case 9:if(e.prev=9,!o||!a){e.next=16;break}return e.next=13,this.createVideoAudioStream(i,r,n);case 13:case 19:case 24:return e.abrupt("return",e.sent);case 16:if(!o){e.next=22;break}return e.next=19,this.createVideoMediaStream(i,r,n);case 22:return e.next=24,this.createAudioStream(i,r,n);case 25:e.next=31;break;case 27:return e.prev=27,e.t0=e.catch(9),this.logger.log("create user media stream error: ",{err:e.t0,enableStreamConfig:i}),e.abrupt("return",Promise.reject(e.t0));case 31:case"end":return e.stop()}}),e,this,[[9,27]])})))}},{key:"createAudioStream",value:function(e,t,r){return bn(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.log("create audio stream: ",{video:t,audio:r}),n.prev=1,i=this.getUserMediaConstraints(e),n.next=5,this.getUserMediaStream(i);case 5:return o=n.sent,n.next=8,this.track.updateDeviceIdByStream(o);case 8:return this.track.updateDevicePermission(t,r),this.updateCurrentMode(),o.getTracks().forEach((function(e){g.logger.log("origin audio tracks setting: ",e.getSettings())})),n.abrupt("return",o);case 14:if(n.prev=14,n.t0=n.catch(1),this.logger.log("create audio stream error: ",n.t0),a=De.AUDIOINPUT,s=Le.FAILED,c=n.t0.code,l=n.t0.detail,h=!1,!Kt.includes(c)){n.next=35;break}if("XYSDK:950403"===c&&"deviceId"===(null==l?void 0:l.constraint)&&(this.logger.log("audio deviceId capture failed, retry next use default device"),this.track.deviceManager.setSpecifiedDeviceState([{kind:a,state:s}]),h=!0),!h){n.next=34;break}return n.prev=24,n.next=27,this.createUserMediaStream();case 27:return f=n.sent,n.abrupt("return",f);case 31:n.prev=31,n.t1=n.catch(24),this.logger.log("retry create audio stream failed: ",n.t1);case 34:this.logger.log("stop retry create audio stream");case 35:return d=G.KEEP,p=G.FAILED,n.next=38,this.handleCaptureStreamException(e,n.t0,{type:M.AUDIO,videoCapture:d,audioCapture:p});case 38:return v=n.sent,n.abrupt("return",Promise.reject(v));case 40:case"end":return n.stop()}}),n,this,[[1,14],[24,31]])})))}},{key:"createVideoMediaStream",value:function(e,t,r){return bn(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.log("create video stream: ",{video:t,audio:r}),n.prev=1,i=this.getUserMediaConstraints(e),n.next=5,this.getUserMediaStream(i);case 5:return o=n.sent,n.next=8,this.track.updateDeviceIdByStream(o);case 8:return this.track.updateDevicePermission(t,r),this.updateCurrentMode(),o.getTracks().forEach((function(e){E.logger.log("origin video tracks setting: ",e.getSettings())})),n.abrupt("return",o);case 14:if(n.prev=14,n.t0=n.catch(1),a=n.t0,this.logger.log("create video stream error: ",n.t0),s=j.ADVANCED,c=j.FAILED,l=_.FAILED,h=De.VIDEOINPUT,f=Le.FAILED,d=Le.UNKNOWN,p=n.t0.code,v=n.t0.detail,g=e.videoConfig,m=g.constraintMode,y=!1,!Kt.includes(p)){n.next=39;break}if("XYSDK:950403"===p&&"deviceId"===(null==v?void 0:v.constraint)?(this.logger.log("video deviceId capture failed, retry next use default device"),this.track.deviceManager.setSpecifiedDeviceState([{kind:h,state:f}]),y=!0):m===s&&g&&(this.logger.log("Reduce resolution, retry next config"),this.track.deviceManager.setSpecifiedDeviceState([{kind:h,state:d}]),g.constraintMode=c,g.status=l,y=!0),!y){n.next=39;break}return n.prev=29,n.next=32,this.createUserMediaStream();case 32:return n.abrupt("return",n.sent);case 35:n.prev=35,n.t1=n.catch(29),a=n.t1,this.logger.log("retry create video stream failed: ",n.t1);case 39:return this.logger.log("stop retry create video stream"),b=G.KEEP,S=G.FAILED,n.next=43,this.handleCaptureStreamException(e,a,{type:M.VIDEO,videoCapture:S,audioCapture:b});case 43:return w=n.sent,n.abrupt("return",Promise.reject(w));case 45:case"end":return n.stop()}}),n,this,[[1,14],[29,35]])})))}},{key:"createVideoAudioStream",value:function(e,t,r){return bn(this,void 0,void 0,u().mark((function n(){var i,o,a=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.log("create video and audio stream: ",{video:t,audio:r}),n.prev=1,i=this.getUserMediaConstraints(e),n.next=5,this.getUserMediaStream(i);case 5:return o=n.sent,n.next=8,this.track.updateDeviceIdByStream(o);case 8:return this.track.updateDevicePermission(t,r),this.updateCurrentMode(),o.getTracks().forEach((function(e){a.logger.log("origin all tracks setting: ",e.getSettings())})),n.abrupt("return",o);case 14:return n.prev=14,n.t0=n.catch(1),this.logger.warn("create video audio stream error: ",n.t0),n.prev=17,n.next=20,this.handleCreateVideoAudioStreamError(e);case 20:return n.abrupt("return",n.sent);case 23:return n.prev=23,n.t1=n.catch(17),n.abrupt("return",Promise.reject(n.t1));case 26:case"end":return n.stop()}}),n,this,[[1,14],[17,23]])})))}},{key:"handleCaptureStreamException",value:function(e,t,r){return bn(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.log("handle capture stream exception:",{type:r.type,error:t}),i=r.type,o=r.videoCapture,a=r.audioCapture,s=t.code,c=e.videoConfig,l=e.audioConfig,h=Ne.DENIED,f=Ne.UNKNOWN,d=M.AUDIO,p=M.VIDEO,g=s===(v="XYSDK:950404")?h:f,m=i===p?g:f,y=i===d?g:f,this.setEnableCapture({video:o,audio:a}),n.next=13,this.track.updateDeviceIdByStream(null);case 13:return this.updateCurrentMode(),c&&(c.status=_.FAILED),l&&(l.status=_.FAILED),this.track.deviceManager.updateDevicePermission(m,y),b=s||"XYSDK:950208",i===p&&s===v?b="XYSDK:950411":i===d&&s===v&&(b="XYSDK:950412"),S=gt(b,t.detail),this.logger.log("handle capture deal result: ",S),n.abrupt("return",S);case 22:case"end":return n.stop()}}),n,this)})))}},{key:"handleCreateVideoAudioStreamError",value:function(e){return bn(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,n=null,i=null,o=null,this.logger.log("Create separate audio and video streams"),t.prev=5,t.next=8,this.recreateVideoMediaStream(e);case 8:r=t.sent,t.next=15;break;case 11:t.prev=11,t.t0=t.catch(5),this.logger.warn("recreate video stream error: ",t.t0),i=t.t0;case 15:return t.prev=15,t.next=18,this.recreateAudioMediaStream(e);case 18:n=t.sent,t.next=25;break;case 21:t.prev=21,t.t1=t.catch(15),this.logger.warn("recreate audio stream error: ",t.t1),o=t.t1;case 25:if(!r||!n){t.next=36;break}return this.logger.log("recreate video and audio stream success"),a=n.getAudioTracks()[0],s=r.getVideoTracks()[0],c=a.clone(),l=s.clone(),h=new MediaStream([c,l]),this.closeStream([r,n]),t.abrupt("return",h);case 36:if(!r){t.next=41;break}return this.logger.log("recreate video stream success"),t.abrupt("return",r);case 41:if(!n){t.next=46;break}return this.logger.log("recreate audio stream success"),t.abrupt("return",n);case 46:return f={videoError:i,audioError:o},this.logger.log("recreate video and audio stream failed: ",f),t.abrupt("return",Promise.reject(gt("XYSDK:950414",f)));case 49:case"end":return t.stop()}}),t,this,[[5,11],[15,21]])})))}},{key:"recreateAudioMediaStream",value:function(e){return bn(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=G.CAPTURE,n=G.KEEP,i=e.audioConfig,this.setEnableCapture({video:n,audio:r}),i.status=_.NORMAL,t.prev=4,this.logger.log("recreate audio stream"),t.next=8,this.createUserMediaStream();case 8:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(4),this.logger.log("recreate audio stream failed:",t.t0),t.abrupt("return",Promise.reject(t.t0));case 15:case"end":return t.stop()}}),t,this,[[4,11]])})))}},{key:"recreateVideoMediaStream",value:function(e){return bn(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=G.CAPTURE,n=G.KEEP,i=e.videoConfig,this.setEnableCapture({video:r,audio:n}),i.status=_.NORMAL,t.prev=4,this.logger.log("recreate video stream"),t.next=8,this.createUserMediaStream();case 8:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(4),this.logger.log("recreate video stream failed:",t.t0),t.abrupt("return",Promise.reject(t.t0));case 15:case"end":return t.stop()}}),t,this,[[4,11]])})))}},{key:"getUserMediaStream",value:function(e){return bn(this,void 0,void 0,u().mark((function t(){var r,n;return u().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=t.t0,o=void 0,a=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,a=(o=i||{}).name,s=o.code,u=o.message,c=void 0===u?"":u,l=o.constraint,h=void 0===l?"":l,f={name:a,message:c,code:s},n="NotFoundError"==a||"DevicesNotFoundError"==a?gt("XYSDK:950401",f):"NotReadableError"==a||"TrackStartError"==a?gt("XYSDK:950402",f):"OverconstrainedError"==a||"ConstraintNotSatisfiedError"==a?gt("XYSDK:950403",Object.assign(Object.assign({},f),{constraint:h})):"NotAllowedError"==a||"PermissionDeniedError"==a||c.includes("NotAllowedError")?gt("XYSDK:950404",f):gt("TypeError"==a||"TypeError"==a?"XYSDK:950405":"XYSDK:950406",f),this.logger.log("handle error: ",n),t.abrupt("return",Promise.reject(n));case 15:case"end":return t.stop()}var i,o,a,s,u,c,l,h,f}),t,this,[[0,9]])})))}},{key:"getUserMediaConstraints",value:function(e){this.logger.log("invoke getUserMediaConstraints");var t=e.videoConfig,r=e.audioConfig,n=R.REMOTE,i=j.FAILED,o={video:!1,audio:!1};if(t){var a=t.constraintMode,s=t.resolution,u=t.type,c=t.frameRate,l=t.enableAspectRatio;if(u===n&&a&&a!==i){var h=Lt(s,c,a);o.video=h.video,l||delete o.video.aspectRatio}}if(r){var f=r.constraintMode,d=r.resolution,p=r.type,v=r.frameRate;if(p===n&&f&&f!==i){var g=Lt(d,v,f);o.audio=g.audio}}this.logger.log("base constraints: ",o);var m=an(o);this.logger.log("compatible constraints: ",m);var y=this.appendDeviceConstraints(m);return this.logger.log("finish constraints: ",y),y}},{key:"appendDeviceConstraints",value:function(e){var t=this.track.deviceManager.getCaptureDeviceId()||{},r=t.audioInput,n=t.videoInput;return e.video&&n&&Object.assign(e.video,{deviceId:{exact:n}}),e.audio&&r&&Object.assign(e.audio,{deviceId:{exact:r}}),e}},{key:"updateCurrentMode",value:function(){var e=this.currentMode.type,t=this.currentMode,r=this.enabledCapture,n=r.video,i=r.audio,o=G.CAPTURE,a=G.KEEP,s=G.FAILED,u=A.NORMAL,c=A.NORMAL_AUDIO,l=A.NORMAL_VIDEO,h=A.UNKNOWN,f=A.RECEIVE_ONLY,d=[f,h,A.FAILED],p=i===o,v=n===o,g=i===s,m=n===s,y=i===a,b=n===a,S=e===c,w=e===l,E=e===u;p&&v||p&&b&&w||y&&v&&S?t={type:u,detail:"Normal stream mode"}:p&&b&&d.includes(e)||p&&m||y&&m&&E||y&&m&&S?t={type:c,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("updated current mode: ",this.currentMode)}},{key:"closeStream",value:function(e){this.logger.log("[VACap]close all track"),e.forEach((function(e){e.getTracks().forEach((function(e){e.stop()}))}))}}]),t}();const wn=Sn;var En=r(5733),kn=r.n(En),In=r(3729),xn=r.n(In);function Cn(){return Xr()('(()=>{var e={738:(e,t,r)=>{"use strict";const n=r(3341),i=r(1185),o=r(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 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},1185: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,"")}},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(a,s){if(!r[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=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o=void 0,a=0;a<n.length;a++)i(n[a]);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,a,s,u,c,l=[],f=0,h=e.length,d=h,p="string"!==n.getTypeOf(e);f<e.length;)d=h-f,i=p?(t=e[f++],r=f<h?e[f++]:0,f<h?e[f++]:0):(t=e.charCodeAt(f++),r=f<h?e.charCodeAt(f++):0,f<h?e.charCodeAt(f++):0),a=t>>2,s=(3&t)<<4|r>>4,u=1<d?(15&r)<<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("")},r.decode=function(e){var t,r,n,a,s,u,c=0,l=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var 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,r=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,n=(3&s)<<6|(u=o.indexOf(e.charAt(c++))),h[l++]=t,64!==s&&(h[l++]=r),64!==u&&(h[l++]=n);return h}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"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,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var o=i,a=n+r;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"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"),a=e("./stream/GenericWorker"),s=n?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\\b\\0",o.inherits(u,a),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new u("Deflate",e)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"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,a,l){var f,h,d=e.file,p=e.compression,v=l!==s.utf8encode,y=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,E=_.length!==g.length,O="",x="",S="",k=d.dir,T=d.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var I=0;t&&(I|=8),v||!w&&!E||(I|=2048);var N=0,C=0;k&&(N|=16),"UNIX"===a?(C=798,N|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(d.unixPermissions,k)):(C=20,N|=function(e){return 63&(e||0)}(d.dosPermissions)),f=T.getUTCHours(),f<<=6,f|=T.getUTCMinutes(),f<<=5,f|=T.getUTCSeconds()/2,h=T.getUTCFullYear()-1980,h<<=4,h|=T.getUTCMonth()+1,h<<=5,h|=T.getUTCDate(),w&&(x=n(1,1)+n(u(y),4)+m,O+="up"+n(x.length,2)+x),E&&(S=n(1,1)+n(u(b),4)+_,O+="uc"+n(S.length,2)+S);var R="";return R+="\\n\\0",R+=n(I,2),R+=p.magic,R+=n(f,2),R+=n(h,2),R+=n(A.crc32,4),R+=n(A.compressedSize,4),R+=n(A.uncompressedSize,4),R+=n(y.length,2),R+=n(O.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+y+O,dirRecord:c.CENTRAL_FILE_HEADER+n(C,2)+R+n(b.length,2)+"\\0\\0\\0\\0"+n(N,4)+n(i,4)+y+O+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function l(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,a),l.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,a){var s=o.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\\0\\0\\0\\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"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),a=0;try{e.forEach((function(e,r){a++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),s=r.options.compressionOptions||t.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"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"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function c(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new s);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can\'t accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new a(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,a=0;a<o.length;a++){var s=o[a],u=s.fileNameStr,c=n.resolve(s.fileNameStr);r.file(c,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(r.file(c).unsafeOriginalName=u)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"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),s=o.extend(r||{},u);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=v(e)),s.createFolders&&(n=p(e))&&y.call(this,n,!0);var f="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!f),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var 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):""},v=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},y=function(e,t){return t=void 0!==t?t:u.createFolders,e=v(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function 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,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=y.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=f.generateWorker(this,r,n)}catch(e){(t=new a("error")).error(e)}return new s(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=g},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){"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"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"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"),a=e("../base64"),s=e("../support"),u=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,t){return new u.Promise((function(r,i){var o=[],s=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,r){o.push(e),t&&t(r)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return a.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type \'"+e+"\'")}}(s,o),c);r(e)}catch(e){i(e)}o=[]})).resume()}))}function f(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=r,n.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"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"),a=e("./stream/GenericWorker"),s=new Array(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,o,a=e.length,u=new Array(2*a);for(t=r=0;t<a;)if((i=e[t++])<128)u[r++]=i;else if(4<(o=s[i]))u[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<a;)i=i<<6|63&e[t++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(c,a),c.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(t),u=t;a!==t.length&&(i.uint8array?(u=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(u=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(u),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function u(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can\'t construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],i=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function l(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=l;var 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},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return h[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,s,c){return a.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var l=r.getTypeOf(t);return l?("arraybuffer"===l?t=r.transformTo("uint8array",t):"string"===l&&(c?t=i.decode(t):o&&!0!==s&&(t=function(e){return u(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can\'t read the data of \'"+e+"\'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=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 r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can\'t find end of central directory"):new Error("Can\'t find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can\'t find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can\'t find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),u=e("./compressions"),c=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(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 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=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=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"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"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<c.length;f++)n.prototype[c[f]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var u=new e.MessageChannel;u.port1.onmessage=l,r=function(){u.port2.postMessage(0)}}var c=[];function l(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,void 0!==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={},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,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(e,t,r){n((function(){var n;try{n=t(r)}catch(n){return o.reject(e,n)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function 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 r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var a=p((function(){t(i,n)}));"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(i);return this.state!==u?f(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(h,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,u=-1,c=new this(i);++u<r;)l(e[u],u);return c;function l(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==r||n||(n=!0,o.resolve(c,a))}),(function(e){n||(n=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a,s=-1,u=new this(i);++s<r;)a=e[s],t.resolve(a).then((function(e){n||(n=!0,o.resolve(u,e))}),(function(e){n||(n=!0,o.reject(u,e))}));return u}},{immediate:36}],38:[function(e,t,r){"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"),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 r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==c)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[r]);this._dict_set=!0}}function p(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(l),s.next_out=0,s.avail_out=l),1!==(r=n.deflate(s,a))&&r!==c)return this.onEnd(r),!(this.ended=!0);0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c):2!==a||(this.onEnd(c),!(s.avail_out=0))},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},r.Deflate=d,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"),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 r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function h(e,t){var r=new f(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}f.prototype.push=function(e,t){var r,s,u,c,f,h,d=this.strm,p=this.options.chunkSize,v=this.options.dictionary,y=!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),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&v&&(h="string"==typeof v?o.string2buf(v):"[object ArrayBuffer]"===l.call(v)?new Uint8Array(v):v,r=n.inflateSetDictionary(this.strm,h)),r===a.Z_BUF_ERROR&&!0===y&&(r=a.Z_OK,y=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==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&&(y=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(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},r.Inflate=f,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.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,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,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(e,t,r){"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 a=new n.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,r.string2buf=function(e){var t,r,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),o=a=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,s=t||e.length,c=new Array(2*s);for(r=n=0;r<s;)if((i=e[r++])<128)c[n++]=i;else if(4<(o=a[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<s;)i=i<<6|63&e[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|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,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,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,v=2,y=8,m=9,g=286,b=30,_=19,w=2*g+1,E=15,O=3,x=258,S=x+O+1,k=42,T=113,A=1,I=2,N=3,C=4;function R(e,t){return e.msg=u[t],t}function P(e){return(e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0}function L(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 j(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,L(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function U(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function F(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-S?e.strstart-(e.w_size-S):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+x,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[(r=t)+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<h);if(n=x-(h-o),o=h-x,a<n){if(e.match_start=t,s<=(a=n))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 M(e){var t,r,n,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-S)){for(i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;n=e.head[--t],e.head[t]=p<=n?n-p:0,--r;);for(t=r=p;n=e.prev[--t],e.prev[t]=p<=n?n-p:0,--r;);o+=p}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,f=e.strstart+e.lookahead,d=void 0,(h=o)<(d=c.avail_in)&&(d=h),r=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+=r,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<S&&0!==e.strm.avail_in)}function z(e,t){for(var r,n;;){if(e.lookahead<S){if(M(e),e.lookahead<S&&t===c)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-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-S&&(e.match_length=F(e,r)),e.match_length>=O)if(n=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,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&&(j(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<O-1?e.strstart:O-1,t===l?(j(e,!0),0===e.strm.avail_out?N:C):e.last_lit&&(j(e,!1),0===e.strm.avail_out)?A:I}function K(e,t){for(var r,n,i;;){if(e.lookahead<S){if(M(e),e.lookahead<S&&t===c)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-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=O-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-S&&(e.match_length=F(e,r),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,n=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,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=O-1,e.strstart++,n&&(j(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]))&&j(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<O-1?e.strstart:O-1,t===l?(j(e,!0),0===e.strm.avail_out?N:C):e.last_lit&&(j(e,!1),0===e.strm.avail_out)?A:I}function W(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=y,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)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(E+1),this.heap=new i.Buf16(2*g+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*g+1),D(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=v,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?k:T,e.adler=2===t.wrap?0:1,t.last_flush=c,o._tr_init(t),f):R(e,h)}function H(e){var t=G(e);return t===f&&function(e){e.window_size=2*e.w_size,D(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=O-1,e.match_available=0,e.ins_h=0}(e.state),t}function Y(e,t,r,n,o,a){if(!e)return h;var s=1;if(t===d&&(t=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),o<1||m<o||r!==y||n<8||15<n||t<0||9<t||a<0||p<a)return R(e,h);8===n&&(n=9);var u=new V;return(e.state=u).strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+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=r,H(e)}n=[new W(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(M(e),0===e.lookahead&&t===c)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,j(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-S&&(j(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(j(e,!0),0===e.strm.avail_out?N:C):(e.strstart>e.block_start&&(j(e,!1),e.strm.avail_out),A)})),new W(4,4,8,4,z),new W(4,5,16,8,z),new W(4,6,32,32,z),new W(4,4,16,16,K),new W(8,16,32,32,K),new W(8,16,128,128,K),new W(8,32,128,256,K),new W(32,128,258,1024,K),new W(32,258,258,4096,K)],r.deflateInit=function(e,t){return Y(e,t,y,15,8,0)},r.deflateInit2=Y,r.deflateReset=H,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,f):h},r.deflate=function(e,t){var r,i,a,u;if(!e||!e.state||5<t||t<0)return e?R(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==l)return R(e,0===e.avail_out?-5:h);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===k)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=s(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=T);else{var d=y+(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=T,U(i,d),0!==i.strstart&&(U(i,e.adler>>>16),U(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),L(e),a=i.pending,i.pending!==i.pending_buf_size));)B(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)),L(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,B(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)),L(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,B(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&&L(e),i.pending+2<=i.pending_buf_size&&(B(i,255&e.adler),B(i,e.adler>>8&255),e.adler=0,i.status=T)):i.status=T),0!==i.pending){if(L(e),0===e.avail_out)return i.last_flush=-1,f}else if(0===e.avail_in&&P(t)<=P(r)&&t!==l)return R(e,-5);if(666===i.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(M(e),0===e.lookahead)){if(t===c)return A;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(j(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(j(e,!0),0===e.strm.avail_out?N:C):e.last_lit&&(j(e,!1),0===e.strm.avail_out)?A:I}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=x){if(M(e),e.lookahead<=x&&t===c)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=O&&0<e.strstart&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+x;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=x-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=O?(r=o._tr_tally(e,1,e.match_length-O),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&&(j(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(j(e,!0),0===e.strm.avail_out?N:C):e.last_lit&&(j(e,!1),0===e.strm.avail_out)?A:I}(i,t):n[i.level].func(i,t);if(p!==N&&p!==C||(i.status=666),p===A||p===N)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&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),L(e),0===e.avail_out))return i.last_flush=-1,f}return t!==l?f: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)):(U(i,e.adler>>>16),U(i,65535&e.adler)),L(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?f:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==k&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?R(e,h):(e.state=null,t===T?R(e,-3):f):h},r.deflateSetDictionary=function(e,t){var r,n,o,s,u,c,l,d,p=t.length;if(!e||!e.state)return h;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==k||r.lookahead)return h;for(1===s&&(e.adler=a(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),u=e.avail_in,c=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,M(r);r.lookahead>=O;){for(n=r.strstart,o=r.lookahead-(O-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+O-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=O-1,M(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=O-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=u,r.wrap=s,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"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,a,s,u,c,l,f,h,d,p,v,y,m,g,b,_,w,E,O,x,S,k;r=e.state,n=e.next_in,S=e.input,i=n+(e.avail_in-5),o=e.next_out,k=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,v=r.lencode,y=r.distcode,m=(1<<r.lenbits)-1,g=(1<<r.distbits)-1;e:do{p<15&&(d+=S[n++]<<p,p+=8,d+=S[n++]<<p,p+=8),b=v[d&m];t:for(;;){if(d>>>=_=b>>>24,p-=_,0==(_=b>>>16&255))k[o++]=65535&b;else{if(!(16&_)){if(0==(64&_)){b=v[(65535&b)+(d&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&b,(_&=15)&&(p<_&&(d+=S[n++]<<p,p+=8),w+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=S[n++]<<p,p+=8,d+=S[n++]<<p,p+=8),b=y[d&g];r:for(;;){if(d>>>=_=b>>>24,p-=_,!(16&(_=b>>>16&255))){if(0==(64&_)){b=y[(65535&b)+(d&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&b,p<(_&=15)&&(d+=S[n++]<<p,(p+=8)<_&&(d+=S[n++]<<p,p+=8)),u<(E+=d&(1<<_)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=_,p-=_,(_=o-a)<E){if(l<(_=E-_)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=h,(O=0)===f){if(O+=c-_,_<w){for(w-=_;k[o++]=h[O++],--_;);O=o-E,x=k}}else if(f<_){if(O+=c+f-_,(_-=f)<w){for(w-=_;k[o++]=h[O++],--_;);if(O=0,f<w){for(w-=_=f;k[o++]=h[O++],--_;);O=o-E,x=k}}}else if(O+=f-_,_<w){for(w-=_;k[o++]=h[O++],--_;);O=o-E,x=k}for(;2<w;)k[o++]=x[O++],k[o++]=x[O++],k[o++]=x[O++],w-=3;w&&(k[o++]=x[O++],1<w&&(k[o++]=x[O++]))}else{for(O=o-E;k[o++]=k[O++],k[o++]=k[O++],k[o++]=k[O++],2<(w-=3););w&&(k[o++]=k[O++],1<w&&(k[o++]=k[O++]))}break}}break}}while(n<i&&o<s);n-=w=p>>3,d&=(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<s?s-o+257:257-(o-s),r.hold=d,r.bits=p}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=1,c=2,l=0,f=-2,h=1,d=852,p=592;function v(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function y(){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=h,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(d),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,l):f}function g(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,m(e)):f}function b(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,g(e))):f}function _(e,t){var r,n;return e?(n=new y,(e.state=n).window=null,(r=b(e,t))!==l&&(e.state=null),r):f}var w,E,O=!0;function x(e){if(O){var t;for(w=new n.Buf32(512),E=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,E,0,e.work,{bits:5}),O=!1}e.lencode=w,e.lenbits=9,e.distcode=E,e.distbits=5}function S(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}r.inflateReset=g,r.inflateReset2=b,r.inflateResetKeep=m,r.inflateInit=function(e){return _(e,15)},r.inflateInit2=_,r.inflate=function(e,t){var r,d,p,y,m,g,b,_,w,E,O,k,T,A,I,N,C,R,P,D,L,j,B,U,F=0,M=new n.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return f;12===(r=e.state).mode&&(r.mode=13),m=e.next_out,p=e.output,b=e.avail_out,y=e.next_in,d=e.input,g=e.avail_in,_=r.hold,w=r.bits,E=g,O=b,j=l;e:for(;;)switch(r.mode){case h:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(2&r.wrap&&35615===_){M[r.check=0]=255&_,M[1]=_>>>8&255,r.check=o(r.check,M,2,0),w=_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&_)){e.msg="unknown compression method",r.mode=30;break}if(w-=4,L=8+(15&(_>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<L,e.adler=r.check=1,r.mode=512&_?10:12,w=_=0;break;case 2:for(;w<16;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(r.flags=_,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(M[0]=255&_,M[1]=_>>>8&255,r.check=o(r.check,M,2,0)),w=_=0,r.mode=3;case 3:for(;w<32;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}r.head&&(r.head.time=_),512&r.flags&&(M[0]=255&_,M[1]=_>>>8&255,M[2]=_>>>16&255,M[3]=_>>>24&255,r.check=o(r.check,M,4,0)),w=_=0,r.mode=4;case 4:for(;w<16;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(M[0]=255&_,M[1]=_>>>8&255,r.check=o(r.check,M,2,0)),w=_=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(M[0]=255&_,M[1]=_>>>8&255,r.check=o(r.check,M,2,0)),w=_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(k=r.length)&&(k=g),k&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,y,k,L)),512&r.flags&&(r.check=o(r.check,d,k,y)),g-=k,y+=k,r.length-=k),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(k=0;L=d[y+k++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&k<g;);if(512&r.flags&&(r.check=o(r.check,d,k,y)),g-=k,y+=k,L)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(k=0;L=d[y+k++],r.head&&L&&r.length<65536&&(r.head.comment+=String.fromCharCode(L)),L&&k<g;);if(512&r.flags&&(r.check=o(r.check,d,k,y)),g-=k,y+=k,L)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;w<16;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(_!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}w=_=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===g)break e;g--,_+=d[y++]<<w,w+=8}e.adler=r.check=v(_),w=_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=b,e.next_in=y,e.avail_in=g,r.hold=_,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){_>>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}switch(r.last=1&_,w-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6!==t)break;_>>>=2,w-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}_>>>=2,w-=2;break;case 14:for(_>>>=7&w,w-=7&w;w<32;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&_,w=_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(k=r.length){if(g<k&&(k=g),b<k&&(k=b),0===k)break e;n.arraySet(p,d,y,k,m),g-=k,y+=k,b-=k,m+=k,r.length-=k;break}r.mode=12;break;case 17:for(;w<14;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(r.nlen=257+(31&_),_>>>=5,w-=5,r.ndist=1+(31&_),_>>>=5,w-=5,r.ncode=4+(15&_),_>>>=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===g)break e;g--,_+=d[y++]<<w,w+=8}r.lens[z[r.have++]]=7&_,_>>>=3,w-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},j=s(0,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,j){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(;N=(F=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,C=65535&F,!((I=F>>>24)<=w);){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(C<16)_>>>=I,w-=I,r.lens[r.have++]=C;else{if(16===C){for(U=I+2;w<U;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(_>>>=I,w-=I,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],k=3+(3&_),_>>>=2,w-=2}else if(17===C){for(U=I+3;w<U;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}w-=I,L=0,k=3+(7&(_>>>=I)),_>>>=3,w-=3}else{for(U=I+7;w<U;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}w-=I,L=0,k=11+(127&(_>>>=I)),_>>>=7,w-=7}if(r.have+k>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;k--;)r.lens[r.have++]=L}}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},j=s(u,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,j){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},j=s(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,j){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=b){e.next_out=m,e.avail_out=b,e.next_in=y,e.avail_in=g,r.hold=_,r.bits=w,a(e,O),m=e.next_out,p=e.output,b=e.avail_out,y=e.next_in,d=e.input,g=e.avail_in,_=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;N=(F=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,C=65535&F,!((I=F>>>24)<=w);){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(N&&0==(240&N)){for(R=I,P=N,D=C;N=(F=r.lencode[D+((_&(1<<R+P)-1)>>R)])>>>16&255,C=65535&F,!(R+(I=F>>>24)<=w);){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}_>>>=R,w-=R,r.back+=R}if(_>>>=I,w-=I,r.back+=I,r.length=C,0===N){r.mode=26;break}if(32&N){r.back=-1,r.mode=12;break}if(64&N){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&N,r.mode=22;case 22:if(r.extra){for(U=r.extra;w<U;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;N=(F=r.distcode[_&(1<<r.distbits)-1])>>>16&255,C=65535&F,!((I=F>>>24)<=w);){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(0==(240&N)){for(R=I,P=N,D=C;N=(F=r.distcode[D+((_&(1<<R+P)-1)>>R)])>>>16&255,C=65535&F,!(R+(I=F>>>24)<=w);){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}_>>>=R,w-=R,r.back+=R}if(_>>>=I,w-=I,r.back+=I,64&N){e.msg="invalid distance code",r.mode=30;break}r.offset=C,r.extra=15&N,r.mode=24;case 24:if(r.extra){for(U=r.extra;w<U;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}r.offset+=_&(1<<r.extra)-1,_>>>=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(k=O-b,r.offset>k){if((k=r.offset-k)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}T=k>r.wnext?(k-=r.wnext,r.wsize-k):r.wnext-k,k>r.length&&(k=r.length),A=r.window}else A=p,T=m-r.offset,k=r.length;for(b<k&&(k=b),b-=k,r.length-=k;p[m++]=A[T++],--k;);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===g)break e;g--,_|=d[y++]<<w,w+=8}if(O-=b,e.total_out+=O,r.total+=O,O&&(e.adler=r.check=r.flags?o(r.check,p,O,m-O):i(r.check,p,O,m-O)),O=b,(r.flags?_:v(_))!==r.check){e.msg="incorrect data check",r.mode=30;break}w=_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;w<32;){if(0===g)break e;g--,_+=d[y++]<<w,w+=8}if(_!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}w=_=0}r.mode=29;case 29:j=1;break e;case 30:j=-3;break e;case 31:return-4;default:return f}return e.next_out=m,e.avail_out=b,e.next_in=y,e.avail_in=g,r.hold=_,r.bits=w,(r.wsize||O!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&S(e,e.output,e.next_out,O-e.avail_out)?(r.mode=31,-4):(E-=e.avail_in,O-=e.avail_out,e.total_in+=E,e.total_out+=O,r.total+=O,r.wrap&&O&&(e.adler=r.check=r.flags?o(r.check,p,O,e.next_out-O):i(r.check,p,O,e.next_out-O)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==E&&0===O||4===t)&&j===l&&(j=-5),j)},r.inflateEnd=function(e){if(!e||!e.state)return f;var t=e.state;return t.window&&(t.window=null),e.state=null,l},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?f:((r.head=t).done=!1,l):f},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?f:11===r.mode&&i(1,t,n,0)!==r.check?-3:S(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,l):f},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"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],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,c,l,f,h){var d,p,v,y,m,g,b,_,w,E=h.bits,O=0,x=0,S=0,k=0,T=0,A=0,I=0,N=0,C=0,R=0,P=null,D=0,L=new n.Buf16(16),j=new n.Buf16(16),B=null,U=0;for(O=0;O<=15;O++)L[O]=0;for(x=0;x<u;x++)L[t[r+x]]++;for(T=E,k=15;1<=k&&0===L[k];k--);if(k<T&&(T=k),0===k)return c[l++]=20971520,c[l++]=20971520,h.bits=1,0;for(S=1;S<k&&0===L[S];S++);for(T<S&&(T=S),O=N=1;O<=15;O++)if(N<<=1,(N-=L[O])<0)return-1;if(0<N&&(0===e||1!==k))return-1;for(j[1]=0,O=1;O<15;O++)j[O+1]=j[O]+L[O];for(x=0;x<u;x++)0!==t[r+x]&&(f[j[t[r+x]]++]=x);if(g=0===e?(P=B=f,19):1===e?(P=i,D-=257,B=o,U-=257,256):(P=a,B=s,-1),O=S,m=l,I=x=R=0,v=-1,y=(C=1<<(A=T))-1,1===e&&852<C||2===e&&592<C)return 1;for(;;){for(b=O-I,w=f[x]<g?(_=0,f[x]):f[x]>g?(_=B[U+f[x]],P[D+f[x]]):(_=96,0),d=1<<O-I,S=p=1<<A;c[m+(R>>I)+(p-=d)]=b<<24|_<<16|w|0,0!==p;);for(d=1<<O-1;R&d;)d>>=1;if(0!==d?(R&=d-1,R+=d):R=0,x++,0==--L[O]){if(O===k)break;O=t[r+f[x]]}if(T<O&&(R&y)!==v){for(0===I&&(I=T),m+=S,N=1<<(A=O-I);A+I<k&&!((N-=L[A+I])<=0);)A++,N<<=1;if(C+=1<<A,1===e&&852<C||2===e&&592<C)return 1;c[v=R&y]=T<<24|A<<16|m-l|0}}return 0!==R&&(c[m+R]=O-I<<24|64<<16|0),h.bits=T,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 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,v=16,y=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],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[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],S=new Array(2*(l+2));a(S);var k=new Array(2*f);a(k);var T=new Array(512);a(T);var A=new Array(256);a(A);var I=new Array(u);a(I);var N,C,R,P=new Array(f);function D(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 L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function j(e){return e<256?T[e]:T[256+(e>>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function U(e,t,r){e.bi_valid>v-r?(e.bi_buf|=t<<e.bi_valid&65535,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 F(e,t,r){U(e,r[2*t],r[2*t+1])}function M(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function z(e,t,r){var n,i,o=new Array(p+1),a=0;for(n=1;n<=p;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=M(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 W(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 G(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 H(e,t,r){var n,i,o,a,s=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===n?F(e,i,t):(F(e,(o=A[i])+c+1,t),0!==(a=w[o])&&U(e,i-=I[o],a),F(e,o=j(--n),r),0!==(a=E[o])&&U(e,n-=P[o],a)),s<e.last_lit;);F(e,m,t)}function Y(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=d,r=0;r<u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)G(e,o,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(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++,G(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,v=t.stat_desc.extra_base,y=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,r=e.heap_max+1;r<d;r++)y<(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)&&(o=y,m++),u[2*n+1]=o,c<n||(e.bl_count[o]++,a=0,v<=n&&(a=h[n-v]),s=u[2*n],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*n+1]+a)));if(0!==m){do{for(o=y-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[y]--,m-=2}while(0<m);for(o=y;0!==o;o--)for(n=e.bl_count[o];0!==n;)c<(i=e.heap[--r])||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),z(o,c,e.bl_count)}function q(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*g]++):s<=10?e.bl_tree[2*b]++:e.bl_tree[2*_]++,o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))}function Z(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s<u&&i===a)){if(s<c)for(;F(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(F(e,i,e.bl_tree),s--),F(e,g,e.bl_tree),U(e,s-3,2)):s<=10?(F(e,b,e.bl_tree),U(e,s-3,3)):(F(e,_,e.bl_tree),U(e,s-11,7));o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}}a(P);var $=!1;function J(e,t,r,i){U(e,(s<<1)+(i?1:0),3),function(e,t,r,i){W(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<u-1;n++)for(I[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(P[n]=i,e=0;e<1<<E[n];e++)T[i++]=n;for(i>>=7;n<f;n++)for(P[n]=i<<7,e=0;e<1<<E[n]-7;e++)T[256+i++]=n;for(t=0;t<=p;t++)o[t]=0;for(e=0;e<=143;)S[2*e+1]=8,e++,o[8]++;for(;e<=255;)S[2*e+1]=9,e++,o[9]++;for(;e<=279;)S[2*e+1]=7,e++,o[7]++;for(;e<=287;)S[2*e+1]=8,e++,o[8]++;for(z(S,l+1,o),e=0;e<f;e++)k[2*e+1]=5,k[2*e]=M(e,5);N=new D(S,w,c+1,l,p),C=new D(k,E,0,f,p),R=new D(new Array(0),O,0,h,y)}(),$=!0),e.l_desc=new L(e.dyn_ltree,N),e.d_desc=new L(e.dyn_dtree,C),e.bl_desc=new L(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,K(e)},r._tr_stored_block=J,r._tr_flush_block=function(e,t,r,n){var a,s,u=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return o;return i}(e)),Y(e,e.l_desc),Y(e,e.d_desc),u=function(e){var t;for(q(e,e.dyn_ltree,e.l_desc.max_code),q(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=h-1;3<=t&&0===e.bl_tree[2*x[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=r+5,r+4<=a&&-1!==t?J(e,t,r,n):4===e.strategy||s===a?(U(e,2+(n?1:0),3),H(e,S,k)):(U(e,4+(n?1:0),3),function(e,t,r,n){var i;for(U(e,t-257,5),U(e,r-1,5),U(e,n-4,4),i=0;i<n;i++)U(e,e.bl_tree[2*x[i]+1],3);Z(e,e.dyn_ltree,t-1),Z(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),H(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&W(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]+c+1)]++,e.dyn_dtree[2*j(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){U(e,2,3),F(e,m,S),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,a=1,s={},u=!1,c=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){h(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",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")?(n=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.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),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return s[a]=i,r(a),a++},l.clearImmediate=f}function f(e){delete s[e]}function h(e){if(u)setTimeout(h,0,e);else{var r=s[e];if(r){u=!0;try{!function(e){var r=e.callback,n=e.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(t,n)}}(r)}finally{f(e),u=!1}}}}function 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!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},3341:(e,t,r)=>{"use strict";const n=Symbol.prototype.valueOf,i=r(9401);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}}},9401: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,"")}},7061:(e,t,r)=>{var n=r(8698).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),a=new P(n||[]);return s(o,"_invoke",{value:I(e,r,a)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",m="executing",g="completed",b={};function _(){}function w(){}function E(){}var O={};h(O,c,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(D([])));S&&S!==o&&a.call(S,c)&&(O=S);var k=E.prototype=_.prototype=Object.create(O);function T(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function r(i,o,s,u){var c=p(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value: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 I(e,r,n){var i=v;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=N(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function N(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a \'"+n+"\' method")),b;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(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 R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(a.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=E,s(k,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:w,configurable:!0}),w.displayName=h(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,h(e,f,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},T(A.prototype),h(A.prototype,l,(function(){return this})),r.AsyncIterator=A,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new A(d(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(k),h(k,f,"Generator"),h(k,c,(function(){return this})),h(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=D,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},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 r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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&&a.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 o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),R(r),b}},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;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}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)}},509:(e,t,r)=>{"use strict";var n=r(9985),i=r(3691),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},2655:(e,t,r)=>{"use strict";var n=r(9429),i=r(3691),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},3550:(e,t,r)=>{"use strict";var n=r(9985),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw new o("Can\'t set "+i(e)+" as a prototype")}},7370:(e,t,r)=>{"use strict";var n=r(4201),i=r(5391),o=r(2560).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1514:(e,t,r)=>{"use strict";var n=r(730).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},767:(e,t,r)=>{"use strict";var n=r(3622),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},5027:(e,t,r)=>{"use strict";var n=r(8999),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},1655:(e,t,r)=>{"use strict";var n=r(3689);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},7612:(e,t,r)=>{"use strict";var n=r(2960).forEach,i=r(6834)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},1055:(e,t,r)=>{"use strict";var n=r(4071),i=r(2615),o=r(690),a=r(1228),s=r(3292),u=r(9429),c=r(6310),l=r(6522),f=r(5185),h=r(1664),d=Array;e.exports=function(e){var t=o(e),r=u(this),p=arguments.length,v=p>1?arguments[1]:void 0,y=void 0!==v;y&&(v=n(v,p>2?arguments[2]:void 0));var m,g,b,_,w,E,O=h(t),x=0;if(!O||this===d&&s(O))for(m=c(t),g=r?new this(m):d(m);m>x;x++)E=y?v(t[x],x):t[x],l(g,x,E);else for(w=(_=f(t,O)).next,g=r?new this:[];!(b=i(w,_)).done;x++)E=y?a(_,v,[b.value,x],!0):b.value,l(g,x,E);return g.length=x,g}},4328:(e,t,r)=>{"use strict";var n=r(5290),i=r(7578),o=r(6310),a=function(e){return function(t,r,a){var s,u=n(t),c=o(u),l=i(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2960:(e,t,r)=>{"use strict";var n=r(4071),i=r(8844),o=r(4413),a=r(690),s=r(6310),u=r(7120),c=i([].push),l=function(e){var t=1===e,r=2===e,i=3===e,l=4===e,f=6===e,h=7===e,d=5===e||f;return function(p,v,y,m){for(var g,b,_=a(p),w=o(_),E=n(v,y),O=s(w),x=0,S=m||u,k=t?S(p,O):r||h?S(p,0):void 0;O>x;x++)if((d||x in w)&&(b=E(g=w[x],x,_),e))if(t)k[x]=b;else if(b)switch(e){case 3:return!0;case 5:return g;case 6:return x;case 2:c(k,g)}else switch(e){case 4:return!1;case 7:c(k,g)}return f?-1:i||l?l:k}};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)}},9042:(e,t,r)=>{"use strict";var n=r(3689),i=r(4201),o=r(3615),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},6834:(e,t,r)=>{"use strict";var n=r(3689);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},9015:(e,t,r)=>{"use strict";var n=r(7578),i=r(6310),o=r(6522),a=Array,s=Math.max;e.exports=function(e,t,r){for(var u=i(e),c=n(t,u),l=n(void 0===r?u:r,u),f=a(s(l-c,0)),h=0;c<l;c++,h++)o(f,h,e[c]);return f.length=h,f}},6004:(e,t,r)=>{"use strict";var n=r(8844);e.exports=n([].slice)},5271:(e,t,r)=>{"use strict";var n=r(2297),i=r(9429),o=r(8999),a=r(4201)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===s||n(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},7120:(e,t,r)=>{"use strict";var n=r(5271);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1228:(e,t,r)=>{"use strict";var n=r(5027),i=r(2125);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},6431:(e,t,r)=>{"use strict";var n=r(4201)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},6648:(e,t,r)=>{"use strict";var n=r(8844),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},926:(e,t,r)=>{"use strict";var n=r(3043),i=r(9985),o=r(6648),a=r(4201)("toStringTag"),s=Object,u="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=s(e),a))?r:u?o(t):"Object"===(n=o(t))&&i(t.callee)?"Arguments":n}},800:(e,t,r)=>{"use strict";var n=r(5391),i=r(2148),o=r(6045),a=r(4071),s=r(767),u=r(981),c=r(8734),l=r(1934),f=r(7807),h=r(4241),d=r(7697),p=r(5375).fastKey,v=r(618),y=v.set,m=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var f=e((function(e,i){s(e,h),y(e,{type:t,index:n(null),first:void 0,last:void 0,size:0}),d||(e.size=0),u(i)||c(i,e[l],{that:e,AS_ENTRIES:r})})),h=f.prototype,v=m(t),g=function(e,t,r){var n,i,o=v(e),a=b(e,t);return a?a.value=r:(o.last=a={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),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(h,{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,d?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),d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=a(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(h,r?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&i(h,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(e,t,r){var n=t+" Iterator",i=m(t),o=m(n);l(e,t,(function(e,t){y(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)?f("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=void 0,f(void 0,!0))}),r?"entries":"values",!r,!0),h(t)}}},319:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8844),a=r(5266),s=r(1880),u=r(5375),c=r(8734),l=r(767),f=r(9985),h=r(981),d=r(8999),p=r(3689),v=r(6431),y=r(5997),m=r(3457);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),_=g?"set":"add",w=i[e],E=w&&w.prototype,O=w,x={},S=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,r){return t(this,0===e?0:e,r),this})};if(a(e,!f(w)||!(b||E.forEach&&!p((function(){(new w).entries().next()})))))O=r.getConstructor(t,e,g,_),u.enable();else if(a(e,!0)){var k=new O,T=k[_](b?{}:-0,1)!==k,A=p((function(){k.has(1)})),I=v((function(e){new w(e)})),N=!b&&p((function(){for(var e=new w,t=5;t--;)e[_](t,t);return!e.has(-0)}));I||((O=t((function(e,t){l(e,E);var r=m(new w,e,O);return h(t)||c(t,r[_],{that:r,AS_ENTRIES:g}),r}))).prototype=E,E.constructor=O),(A||N)&&(S("delete"),S("has"),g&&S("get")),(N||T)&&S(_),b&&E.clear&&delete E.clear}return x[e]=O,n({global:!0,constructor:!0,forced:O!==w},x),y(O,e),b||r.setStrong(O,e,g),O}},8758:(e,t,r)=>{"use strict";var n=r(6812),i=r(9152),o=r(2474),a=r(2560);e.exports=function(e,t,r){for(var s=i(t),u=a.f,c=o.f,l=0;l<s.length;l++){var f=s[l];n(e,f)||r&&n(r,f)||u(e,f,c(t,f))}}},7413:(e,t,r)=>{"use strict";var n=r(4201)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},1748:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7807:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5773:(e,t,r)=>{"use strict";var n=r(7697),i=r(2560),o=r(5684);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},5684:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6522:(e,t,r)=>{"use strict";var n=r(8360),i=r(2560),o=r(5684);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},2148:(e,t,r)=>{"use strict";var n=r(8702),i=r(2560);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},1880:(e,t,r)=>{"use strict";var n=r(9985),i=r(2560),o=r(8702),a=r(5014);e.exports=function(e,t,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:t;if(n(r)&&o(r,c,s),s.global)u?e[t]=r:a(t,r);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6045:(e,t,r)=>{"use strict";var n=r(1880);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},5014:(e,t,r)=>{"use strict";var n=r(9037),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}},7697:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2659:e=>{"use strict";var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},6420:(e,t,r)=>{"use strict";var n=r(9037),i=r(8999),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},5565:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6338:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3265:(e,t,r)=>{"use strict";var n=r(6420)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},2532:(e,t,r)=>{"use strict";var n=r(8563),i=r(806);e.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},3127:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8563:e=>{"use strict";e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},3221:(e,t,r)=>{"use strict";var n=r(71);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4764:(e,t,r)=>{"use strict";var n=r(71);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},806:(e,t,r)=>{"use strict";var n=r(9037),i=r(6648);e.exports="process"===i(n.process)},7486:(e,t,r)=>{"use strict";var n=r(71);e.exports=/web0s(?!.*chrome)/i.test(n)},71:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:(e,t,r)=>{"use strict";var n,i,o=r(9037),a=r(71),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),e.exports=i},2739:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:(e,t,r)=>{"use strict";var n=r(9037),i=r(2474).f,o=r(5773),a=r(1880),s=r(5014),u=r(8758),c=r(5266);e.exports=function(e,t){var r,l,f,h,d,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(l in t){if(h=t[l],f=e.dontCallGetSet?(d=i(r,l))&&d.value:r[l],!c(v?l:p+(y?".":"#")+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(r,l,h,e)}}},3689:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8678:(e,t,r)=>{"use strict";r(4043);var n=r(6576),i=r(1880),o=r(6308),a=r(3689),s=r(4201),u=r(5773),c=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,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,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return t=!0,null},r[h](""),!t}));if(!d||!p||r){var v=n(/./[h]),y=t(h,""[e],(function(e,t,r,i,a){var s=n(e),u=t.exec;return u===o||u===l.exec?d&&!a?{done:!0,value:v(t,r,i)}:{done:!0,value:s(r,t,i)}:{done:!1}}));i(String.prototype,e,y[0]),i(l,h,y[1])}f&&u(l[h],"sham",!0)}},1594:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1735:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},4071:(e,t,r)=>{"use strict";var n=r(6576),i=r(509),o=r(7215),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},7215:(e,t,r)=>{"use strict";var n=r(3689);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},6761:(e,t,r)=>{"use strict";var n=r(8844),i=r(509),o=r(8999),a=r(6812),s=r(6004),u=r(7215),c=Function,l=n([].concat),f=n([].join),h={};e.exports=u?c.bind:function(e){var t=i(this),r=t.prototype,n=s(arguments,1),u=function(){var r=l(n,s(arguments));return this instanceof u?function(e,t,r){if(!a(h,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";h[t]=c("C,a","return new C("+f(n,",")+")")}return h[t](e,r)}(t,r.length,r):t.apply(e,r)};return o(r)&&(u.prototype=r),u}},2615:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},1236:(e,t,r)=>{"use strict";var n=r(7697),i=r(6812),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},2743:(e,t,r)=>{"use strict";var n=r(8844),i=r(509);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},6576:(e,t,r)=>{"use strict";var n=r(6648),i=r(8844);e.exports=function(e){if("Function"===n(e))return i(e)}},8844:(e,t,r)=>{"use strict";var n=r(7215),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);e.exports=n?a:function(e){return function(){return o.apply(e,arguments)}}},6058:(e,t,r)=>{"use strict";var n=r(9037),i=r(9985);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1664:(e,t,r)=>{"use strict";var n=r(926),i=r(4849),o=r(981),a=r(9478),s=r(4201)("iterator");e.exports=function(e){if(!o(e))return i(e,s)||i(e,"@@iterator")||a[n(e)]}},5185:(e,t,r)=>{"use strict";var n=r(2615),i=r(509),o=r(5027),a=r(3691),s=r(1664),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?s(e):t;if(i(r))return o(n(r,e));throw new u(a(e)+" is not iterable")}},2643:(e,t,r)=>{"use strict";var n=r(8844),i=r(2297),o=r(9985),a=r(6648),s=r(4327),u=n([].push);e.exports=function(e){if(o(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;n<t;n++){var c=e[n];"string"==typeof c?u(r,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(r,s(c))}var l=r.length,f=!0;return function(e,t){if(f)return f=!1,t;if(i(this))return t;for(var n=0;n<l;n++)if(r[n]===e)return t}}}},4849:(e,t,r)=>{"use strict";var n=r(509),i=r(981);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},9037:function(e,t,r){"use strict";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)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:(e,t,r)=>{"use strict";var n=r(8844),i=r(690),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},7248:e=>{"use strict";e.exports={}},920:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},2688:(e,t,r)=>{"use strict";var n=r(6058);e.exports=n("document","documentElement")},8506:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689),o=r(6420);e.exports=!n&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4413:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(6648),a=Object,s=n("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?s(e,""):a(e)}:a},3457:(e,t,r)=>{"use strict";var n=r(9985),i=r(8999),o=r(9385);e.exports=function(e,t,r){var a,s;return o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(e,s),e}},6738:(e,t,r)=>{"use strict";var n=r(8844),i=r(9985),o=r(4091),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},5375:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(7248),a=r(8999),s=r(6812),u=r(2560).f,c=r(2741),l=r(6062),f=r(7049),h=r(4630),d=r(1594),p=!1,v=h("meta"),y=0,m=function(e){u(e,v,{value:{objectID:"O"+y++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=c.f,t=i([].splice),r={};r[v]=1,e(r).length&&(c.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(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,v)){if(!f(e))return"F";if(!t)return"E";m(e)}return e[v].objectID},getWeakData:function(e,t){if(!s(e,v)){if(!f(e))return!0;if(!t)return!1;m(e)}return e[v].weakData},onFreeze:function(e){return d&&p&&f(e)&&!s(e,v)&&m(e),e}};o[v]=!0},618:(e,t,r)=>{"use strict";var n,i,o,a=r(9834),s=r(9037),u=r(8999),c=r(5773),l=r(6812),f=r(4091),h=r(2713),d=r(7248),p="Object already initialized",v=s.TypeError,y=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new y);m.get=m.get,m.has=m.has,m.set=m.set,n=function(e,t){if(m.has(e))throw new 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 g=h("state");d[g]=!0,n=function(e,t){if(l(e,g))throw new v(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:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw new v("Incompatible receiver, "+e+" required");return r}}}},3292:(e,t,r)=>{"use strict";var n=r(4201),i=r(9478),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},2297:(e,t,r)=>{"use strict";var n=r(6648);e.exports=Array.isArray||function(e){return"Array"===n(e)}},9985:(e,t,r)=>{"use strict";var n=r(2659),i=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},9429:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(9985),a=r(926),s=r(6058),u=r(6738),c=function(){},l=[],f=s("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,d=n(h.exec),p=!h.test(c),v=function(e){if(!o(e))return!1;try{return f(c,l,e),!0}catch(e){return!1}},y=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}};y.sham=!0,e.exports=!f||i((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?y:v},5266:(e,t,r)=>{"use strict";var n=r(3689),i=r(9985),o=/#|\\.prototype\\./,a=function(e,t){var r=u[s(e)];return r===l||r!==c&&(i(t)?n(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},981:e=>{"use strict";e.exports=function(e){return null==e}},8999:(e,t,r)=>{"use strict";var n=r(9985),i=r(2659),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)}},3931:e=>{"use strict";e.exports=!1},1245:(e,t,r)=>{"use strict";var n=r(8999),i=r(6648),o=r(4201)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},734:(e,t,r)=>{"use strict";var n=r(6058),i=r(9985),o=r(3622),a=r(9525),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,s(e))}},8734:(e,t,r)=>{"use strict";var n=r(4071),i=r(2615),o=r(5027),a=r(3691),s=r(3292),u=r(6310),c=r(3622),l=r(5185),f=r(1664),h=r(2125),d=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,r){var y,m,g,b,_,w,E,O=r&&r.that,x=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),k=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),A=n(t,O),I=function(e){return y&&h(y,"normal",e),new p(!0,e)},N=function(e){return x?(o(e),T?A(e[0],e[1],I):A(e[0],e[1])):T?A(e,I):A(e)};if(S)y=e.iterator;else if(k)y=e;else{if(!(m=f(e)))throw new d(a(e)+" is not iterable");if(s(m)){for(g=0,b=u(e);b>g;g++)if((_=N(e[g]))&&c(v,_))return _;return new p(!1)}y=l(e,m)}for(w=S?e.next:y.next;!(E=i(w,y)).done;){try{_=N(E.value)}catch(e){h(y,"throw",e)}if("object"==typeof _&&_&&c(v,_))return _}return new p(!1)}},2125:(e,t,r)=>{"use strict";var n=r(2615),i=r(5027),o=r(4849);e.exports=function(e,t,r){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return i(a),r}},974:(e,t,r)=>{"use strict";var n=r(2013).IteratorPrototype,i=r(5391),o=r(5684),a=r(5997),s=r(9478),u=function(){return this};e.exports=function(e,t,r,c){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!c,r)}),a(e,l,!1,!0),s[l]=u,e}},1934:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(3931),a=r(1236),s=r(9985),u=r(974),c=r(1868),l=r(9385),f=r(5997),h=r(5773),d=r(1880),p=r(4201),v=r(9478),y=r(2013),m=a.PROPER,g=a.CONFIGURABLE,b=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,w=p("iterator"),E="keys",O="values",x="entries",S=function(){return this};e.exports=function(e,t,r,a,p,y,k){u(r,t,a);var T,A,I,N=function(e){if(e===p&&L)return L;if(!_&&e&&e in P)return P[e];switch(e){case E:case O:case x:return function(){return new r(this,e)}}return function(){return new r(this)}},C=t+" Iterator",R=!1,P=e.prototype,D=P[w]||P["@@iterator"]||p&&P[p],L=!_&&D||N(p),j="Array"===t&&P.entries||D;if(j&&(T=c(j.call(new e)))!==Object.prototype&&T.next&&(o||c(T)===b||(l?l(T,b):s(T[w])||d(T,w,S)),f(T,C,!0,!0),o&&(v[C]=S)),m&&p===O&&D&&D.name!==O&&(!o&&g?h(P,"name",O):(R=!0,L=function(){return i(D,this)})),p)if(A={values:N(O),keys:y?L:N(E),entries:N(x)},k)for(I in A)(_||R||!(I in P))&&d(P,I,A[I]);else n({target:t,proto:!0,forced:_||R},A);return o&&!k||P[w]===L||d(P,w,L,{name:p}),v[t]=L,A}},2013:(e,t,r)=>{"use strict";var n,i,o,a=r(3689),s=r(9985),u=r(8999),c=r(5391),l=r(1868),f=r(1880),h=r(4201),d=r(3931),p=h("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!u(n)||a((function(){var e={};return n[p].call(e)!==e}))?n={}:d&&(n=c(n)),s(n[p])||f(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},9478:e=>{"use strict";e.exports={}},6310:(e,t,r)=>{"use strict";var n=r(3126);e.exports=function(e){return n(e.length)}},8702:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),o=r(9985),a=r(6812),s=r(7697),u=r(1236).CONFIGURABLE,c=r(6738),l=r(618),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,v=n("".slice),y=n("".replace),m=n([].join),g=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,r){"Symbol("===v(d(t),0,7)&&(t="["+y(d(t),/^Symbol\\(([^)]*)\\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(s?p(e,"name",{value:t,configurable:!0}):e.name=t),g&&r&&a(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=f(e);return a(n,"source")||(n.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return o(this)&&h(this).source||c(this)}),"toString")},8828:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},231:(e,t,r)=>{"use strict";var n,i,o,a,s,u=r(9037),c=r(4071),l=r(2474).f,f=r(9886).set,h=r(4410),d=r(4764),p=r(3221),v=r(7486),y=r(806),m=u.MutationObserver||u.WebKitMutationObserver,g=u.document,b=u.process,_=u.Promise,w=l(u,"queueMicrotask"),E=w&&w.value;if(!E){var O=new h,x=function(){var e,t;for(y&&(e=b.domain)&&e.exit();t=O.get();)try{t()}catch(e){throw O.head&&n(),e}e&&e.enter()};d||y||v||!m||!g?!p&&_&&_.resolve?((a=_.resolve(void 0)).constructor=_,s=c(a.then,a),n=function(){s(x)}):y?n=function(){b.nextTick(x)}:(f=c(f,u),n=function(){f(x)}):(i=!0,o=g.createTextNode(""),new m(x).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),E=function(e){O.head||n(),O.add(e)}}e.exports=E},8742:(e,t,r)=>{"use strict";var n=r(509),i=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new i("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},2124:(e,t,r)=>{"use strict";var n=r(1245),i=TypeError;e.exports=function(e){if(n(e))throw new i("The method doesn\'t accept regular expressions");return e}},7897:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),o=r(8844),a=r(4327),s=r(1435).trim,u=r(6350),c=n.parseInt,l=n.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 r=s(a(e));return c(r,t>>>0||(d(h,r)?16:10))}:c},5394:(e,t,r)=>{"use strict";var n=r(7697),i=r(8844),o=r(2615),a=r(3689),s=r(300),u=r(7518),c=r(9556),l=r(690),f=r(4413),h=Object.assign,d=Object.defineProperty,p=i([].concat);e.exports=!h||a((function(){if(n&&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={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!==h({},e)[r]||s(h({},t)).join("")!==i}))?function(e,t){for(var r=l(e),i=arguments.length,a=1,h=u.f,d=c.f;i>a;)for(var v,y=f(arguments[a++]),m=h?p(s(y),h(y)):s(y),g=m.length,b=0;g>b;)v=m[b++],n&&!o(d,y,v)||(r[v]=y[v]);return r}:h},5391:(e,t,r)=>{"use strict";var n,i=r(5027),o=r(8920),a=r(2739),s=r(7248),u=r(2688),c=r(6420),l=r(2713),f="prototype",h="script",d=l("IE_PROTO"),p=function(){},v=function(e){return"<"+h+">"+e+"</"+h+">"},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m="undefined"!=typeof document?document.domain&&n?y(n):(t=c("iframe"),r="java"+h+":",t.style.display="none",u.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):y(n);for(var i=a.length;i--;)delete m[f][a[i]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[f]=i(e),r=new p,p[f]=null,r[d]=e):r=m(),void 0===t?r:o.f(r,t)}},8920:(e,t,r)=>{"use strict";var n=r(7697),i=r(5648),o=r(2560),a=r(5027),s=r(5290),u=r(300);t.f=n&&!i?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),i=u(t),c=i.length,l=0;c>l;)o.f(e,r=i[l++],n[r]);return e}},2560:(e,t,r)=>{"use strict";var n=r(7697),i=r(8506),o=r(5648),a=r(5027),s=r(8360),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";t.f=n?o?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var n=l(e,t);n&&n[d]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(a(e),t=s(t),a(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},2474:(e,t,r)=>{"use strict";var n=r(7697),i=r(2615),o=r(9556),a=r(5684),s=r(5290),u=r(8360),c=r(6812),l=r(8506),f=Object.getOwnPropertyDescriptor;t.f=n?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])}},6062:(e,t,r)=>{"use strict";var n=r(6648),i=r(5290),o=r(2741).f,a=r(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===n(e)?function(e){try{return o(e)}catch(e){return a(s)}}(e):o(i(e))}},2741:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},7518:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},1868:(e,t,r)=>{"use strict";var n=r(6812),i=r(9985),o=r(690),a=r(2713),s=r(1748),u=a("IE_PROTO"),c=Object,l=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof c?l:null}},7049:(e,t,r)=>{"use strict";var n=r(3689),i=r(8999),o=r(6648),a=r(1655),s=Object.isExtensible,u=n((function(){s(1)}));e.exports=u||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!==o(e))&&(!s||s(e)))}:s},3622:(e,t,r)=>{"use strict";var n=r(8844);e.exports=n({}.isPrototypeOf)},4948:(e,t,r)=>{"use strict";var n=r(8844),i=r(6812),o=r(5290),a=r(4328).indexOf,s=r(7248),u=n([].push);e.exports=function(e,t){var r,n=o(e),c=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&u(l,r);for(;t.length>c;)i(n,r=t[c++])&&(~a(l,r)||u(l,r));return l}},300:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739);e.exports=Object.keys||function(e){return n(e,i)}},9556:(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},9385:(e,t,r)=>{"use strict";var n=r(2743),i=r(5027),o=r(3550);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 i(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},9419:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689),o=r(8844),a=r(1868),s=r(300),u=r(5290),c=o(r(9556).f),l=o([].push),f=n&&i((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),h=function(e){return function(t){for(var r,i=u(t),o=s(i),h=f&&null===a(i),d=o.length,p=0,v=[];d>p;)r=o[p++],n&&!(h?r in i:c(i,r))||l(v,e?[r,i[r]]:i[r]);return v}};e.exports={entries:h(!0),values:h(!1)}},5073:(e,t,r)=>{"use strict";var n=r(3043),i=r(926);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},5899:(e,t,r)=>{"use strict";var n=r(2615),i=r(9985),o=r(8999),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&i(r=e.toString)&&!o(s=n(r,e)))return s;if(i(r=e.valueOf)&&!o(s=n(r,e)))return s;if("string"!==t&&i(r=e.toString)&&!o(s=n(r,e)))return s;throw new a("Can\'t convert object to primitive value")}},9152:(e,t,r)=>{"use strict";var n=r(6058),i=r(8844),o=r(2741),a=r(7518),s=r(5027),u=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=a.f;return r?u(t,r(e)):t}},496:(e,t,r)=>{"use strict";var n=r(9037);e.exports=n},9302:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},7073:(e,t,r)=>{"use strict";var n=r(9037),i=r(7919),o=r(9985),a=r(5266),s=r(6738),u=r(4201),c=r(2532),l=r(8563),f=r(3931),h=r(3615),d=i&&i.prototype,p=u("species"),v=!1,y=o(n.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 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&&(c||l)&&!y}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:y,SUBCLASSING:v}},7919:(e,t,r)=>{"use strict";var n=r(9037);e.exports=n.Promise},2945:(e,t,r)=>{"use strict";var n=r(5027),i=r(8999),o=r(8742);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}},562:(e,t,r)=>{"use strict";var n=r(7919),i=r(6431),o=r(7073).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},4410:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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},6100:(e,t,r)=>{"use strict";var n=r(2615),i=r(5027),o=r(9985),a=r(6648),s=r(6308),u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var c=n(r,e,t);return null!==c&&i(c),c}if("RegExp"===a(e))return n(s,e,t);throw new u("RegExp#exec called on incompatible receiver")}},6308:(e,t,r)=>{"use strict";var n,i,o=r(2615),a=r(8844),s=r(4327),u=r(9633),c=r(7901),l=r(3430),f=r(5391),h=r(618).get,d=r(2100),p=r(6422),v=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,m=y,g=a("".charAt),b=a("".indexOf),_=a("".replace),w=a("".slice),E=(i=/b*/g,o(y,n=/a/,"a"),o(y,i,"a"),0!==n.lastIndex||0!==i.lastIndex),O=c.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(E||x||O||d||p)&&(m=function(e){var t,r,n,i,a,c,l,d=this,p=h(d),S=s(e),k=p.raw;if(k)return k.lastIndex=d.lastIndex,t=o(m,k,S),d.lastIndex=k.lastIndex,t;var T=p.groups,A=O&&d.sticky,I=o(u,d),N=d.source,C=0,R=S;if(A&&(I=_(I,"y",""),-1===b(I,"g")&&(I+="g"),R=w(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==g(S,d.lastIndex-1))&&(N="(?: "+N+")",R=" "+R,C++),r=new RegExp("^(?:"+N+")",I)),x&&(r=new RegExp("^"+N+"$(?!\\\\s)",I)),E&&(n=d.lastIndex),i=o(y,A?r:d,R),A?i?(i.input=w(i.input,C),i[0]=w(i[0],C),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:E&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),x&&i&&i.length>1&&o(v,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&T)for(i.groups=c=f(null),a=0;a<T.length;a++)c[(l=T[a])[0]]=i[l[1]];return i}),e.exports=m},9633:(e,t,r)=>{"use strict";var n=r(5027);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}},3477:(e,t,r)=>{"use strict";var n=r(2615),i=r(6812),o=r(3622),a=r(9633),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:n(a,e)}},7901:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),a=o||n((function(){return!i("a","y").sticky})),s=o||n((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}},2100:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.test("\\n")&&"s"===e.flags)}))},6422:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4684:(e,t,r)=>{"use strict";var n=r(981),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can\'t call method on "+e);return e}},8552:(e,t,r)=>{"use strict";var n,i=r(9037),o=r(1735),a=r(9985),s=r(3127),u=r(71),c=r(6004),l=r(1500),f=i.Function,h=/MSIE .\\./.test(u)||s&&((n=i.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 h?function(n,i){var s=l(arguments.length,1)>r,u=a(n)?n:f(n),h=s?c(arguments,r):[],d=s?function(){o(u,this,h)}:u;return t?e(d,i):e(d)}:e}},4241:(e,t,r)=>{"use strict";var n=r(6058),i=r(2148),o=r(4201),a=r(7697),s=o("species");e.exports=function(e){var t=n(e);a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},5997:(e,t,r)=>{"use strict";var n=r(2560).f,i=r(6812),o=r(4201)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},2713:(e,t,r)=>{"use strict";var n=r(3430),i=r(4630),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},4091:(e,t,r)=>{"use strict";var n=r(9037),i=r(5014),o="__core-js_shared__",a=n[o]||i(o,{});e.exports=a},3430:(e,t,r)=>{"use strict";var n=r(3931),i=r(4091);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.3",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:(e,t,r)=>{"use strict";var n=r(5027),i=r(2655),o=r(981),a=r(4201)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||o(r=n(s)[a])?t:i(r)}},730:(e,t,r)=>{"use strict";var n=r(8844),i=r(8700),o=r(4327),a=r(4684),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,r){var n,l,f=o(a(t)),h=i(r),d=f.length;return h<0||h>=d?e?"":void 0:(n=u(f,h))<55296||n>56319||h+1===d||(l=u(f,h+1))<56320||l>57343?e?s(f,h):n:e?c(f,h,h+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},5984:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(3689),o=r(6350);e.exports=function(e){return i((function(){return!!o[e]()||"​…᠎"!=="​…᠎"[e]()||n&&o[e].name!==e}))}},1435:(e,t,r)=>{"use strict";var n=r(8844),i=r(4684),o=r(4327),a=r(6350),s=n("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(e){return function(t){var r=o(i(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,c,"$1")),r}};e.exports={start:l(1),end:l(2),trim:l(3)}},146:(e,t,r)=>{"use strict";var n=r(3615),i=r(3689),o=r(9037).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3032:(e,t,r)=>{"use strict";var n=r(2615),i=r(6058),o=r(4201),a=r(1880);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return n(r,this)}),{arity:1})}},6549:(e,t,r)=>{"use strict";var n=r(146);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},9886:(e,t,r)=>{"use strict";var n,i,o,a,s=r(9037),u=r(1735),c=r(4071),l=r(9985),f=r(6812),h=r(3689),d=r(2688),p=r(6004),v=r(6420),y=r(1500),m=r(4764),g=r(806),b=s.setImmediate,_=s.clearImmediate,w=s.process,E=s.Dispatch,O=s.Function,x=s.MessageChannel,S=s.String,k=0,T={},A="onreadystatechange";h((function(){n=s.location}));var I=function(e){if(f(T,e)){var t=T[e];delete T[e],t()}},N=function(e){return function(){I(e)}},C=function(e){I(e.data)},R=function(e){s.postMessage(S(e),n.protocol+"//"+n.host)};b&&_||(b=function(e){y(arguments.length,1);var t=l(e)?e:O(e),r=p(arguments,1);return T[++k]=function(){u(t,void 0,r)},i(k),k},_=function(e){delete T[e]},g?i=function(e){w.nextTick(N(e))}:E&&E.now?i=function(e){E.now(N(e))}:x&&!m?(a=(o=new x).port2,o.port1.onmessage=C,i=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!h(R)?(i=R,s.addEventListener("message",C,!1)):i=A in v("script")?function(e){d.appendChild(v("script"))[A]=function(){d.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:b,clear:_}},7578:(e,t,r)=>{"use strict";var n=r(8700),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)}},5290:(e,t,r)=>{"use strict";var n=r(4413),i=r(4684);e.exports=function(e){return n(i(e))}},8700:(e,t,r)=>{"use strict";var n=r(8828);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3126:(e,t,r)=>{"use strict";var n=r(8700),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},690:(e,t,r)=>{"use strict";var n=r(4684),i=Object;e.exports=function(e){return i(n(e))}},8732:(e,t,r)=>{"use strict";var n=r(2615),i=r(8999),o=r(734),a=r(4849),s=r(5899),u=r(4201),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,u=a(e,l);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!i(r)||o(r))return r;throw new c("Can\'t convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},8360:(e,t,r)=>{"use strict";var n=r(8732),i=r(734);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},3043:(e,t,r)=>{"use strict";var n={};n[r(4201)("toStringTag")]="z",e.exports="[object z]"===String(n)},4327:(e,t,r)=>{"use strict";var n=r(926),i=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},3691:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4630:(e,t,r)=>{"use strict";var n=r(8844),i=0,o=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},9525:(e,t,r)=>{"use strict";var n=r(146);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689);e.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:e=>{"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}},9834:(e,t,r)=>{"use strict";var n=r(9037),i=r(9985),o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},5405:(e,t,r)=>{"use strict";var n=r(496),i=r(6812),o=r(6145),a=r(2560).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},6145:(e,t,r)=>{"use strict";var n=r(4201);t.f=n},4201:(e,t,r)=>{"use strict";var n=r(9037),i=r(3430),o=r(6812),a=r(4630),s=r(146),u=r(9525),c=n.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]}},6350:e=>{"use strict";e.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},4338:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),o=r(2297),a=r(8999),s=r(690),u=r(6310),c=r(5565),l=r(6522),f=r(7120),h=r(9042),d=r(4201),p=r(3615),v=d("isConcatSpreadable"),y=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)};n({target:"Array",proto:!0,arity:1,forced:!y||!h("concat")},{concat:function(e){var t,r,n,i,o,a=s(this),h=f(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(m(o=-1===t?a:arguments[t]))for(i=u(o),c(d+i),r=0;r<i;r++,d++)r in o&&l(h,d,o[r]);else c(d+1),l(h,d++,o);return h.length=d,h}})},8077:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).filter;n({target:"Array",proto:!0,forced:!r(9042)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5728:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).find,o=r(7370),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9693:(e,t,r)=>{"use strict";var n=r(9989),i=r(7612);n({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},7722:(e,t,r)=>{"use strict";var n=r(9989),i=r(1055);n({target:"Array",stat:!0,forced:!r(6431)((function(e){Array.from(e)}))},{from:i})},6801:(e,t,r)=>{"use strict";var n=r(9989),i=r(4328).includes,o=r(3689),a=r(7370);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)}}),a("includes")},7195:(e,t,r)=>{"use strict";var n=r(9989),i=r(6576),o=r(4328).indexOf,a=r(6834),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({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)}})},3975:(e,t,r)=>{"use strict";r(9989)({target:"Array",stat:!0},{isArray:r(2297)})},752:(e,t,r)=>{"use strict";var n=r(5290),i=r(7370),o=r(9478),a=r(618),s=r(2560).f,u=r(1934),c=r(7807),l=r(3931),f=r(7697),h="Array Iterator",d=a.set,p=a.getterFor(h);e.exports=u(Array,"Array",(function(e,t){d(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&f&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(e){}},886:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).map;n({target:"Array",proto:!0,forced:!r(9042)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},9730:(e,t,r)=>{"use strict";var n=r(9989),i=r(2297),o=r(9429),a=r(8999),s=r(7578),u=r(6310),c=r(5290),l=r(6522),f=r(4201),h=r(9042),d=r(6004),p=h("slice"),v=f("species"),y=Array,m=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var r,n,f,h=c(this),p=u(h),g=s(e,p),b=s(void 0===t?p:t,p);if(i(h)&&(r=h.constructor,(o(r)&&(r===y||i(r.prototype))||a(r)&&null===(r=r[v]))&&(r=void 0),r===y||void 0===r))return d(h,g,b);for(n=new(void 0===r?y:r)(m(b-g,0)),f=0;g<b;g++,f++)g in h&&l(n,f,h[g]);return n.length=f,n}})},7550:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).some;n({target:"Array",proto:!0,forced:!r(6834)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},24:(e,t,r)=>{"use strict";var n=r(8844),i=r(1880),o=Date.prototype,a="Invalid Date",s="toString",u=n(o[s]),c=n(o.getTime);String(new Date(NaN))!==a&&i(o,s,(function(){var e=c(this);return e==e?u(this):a}))},1517:(e,t,r)=>{"use strict";var n=r(9989),i=r(6761);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},4284:(e,t,r)=>{"use strict";var n=r(7697),i=r(1236).EXISTS,o=r(8844),a=r(2148),s=Function.prototype,u=o(s.toString),c=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,l=o(c.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},5398:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},8324:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(1735),a=r(2615),s=r(8844),u=r(3689),c=r(9985),l=r(734),f=r(6004),h=r(2643),d=r(146),p=String,v=i("JSON","stringify"),y=s(/./.exec),m=s("".charAt),g=s("".charCodeAt),b=s("".replace),_=s(1..toString),w=/[\\uD800-\\uDFFF]/g,E=/^[\\uD800-\\uDBFF]$/,O=/^[\\uDC00-\\uDFFF]$/,x=!d||u((function(){var e=i("Symbol")("stringify detection");return"[null]"!==v([e])||"{}"!==v({a:e})||"{}"!==v(Object(e))})),S=u((function(){return\'"\\\\udf06\\\\ud834"\'!==v("\\udf06\\ud834")||\'"\\\\udead"\'!==v("\\udead")})),k=function(e,t){var r=f(arguments),n=h(t);if(c(n)||void 0!==e&&!l(e))return r[1]=function(e,t){if(c(n)&&(t=a(n,this,p(e),t)),!l(t))return t},o(v,null,r)},T=function(e,t,r){var n=m(r,t-1),i=m(r,t+1);return y(E,e)&&!y(O,i)||y(O,e)&&!y(E,n)?"\\\\u"+_(g(e,0),16):e};v&&n({target:"JSON",stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var n=f(arguments),i=o(x?k:v,null,n);return S&&"string"==typeof i?b(i,w,T):i}})},9322:(e,t,r)=>{"use strict";r(319)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(800))},6646:(e,t,r)=>{"use strict";r(9322)},429:(e,t,r)=>{"use strict";var n=r(9989),i=r(5394);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9434:(e,t,r)=>{"use strict";var n=r(9989),i=r(146),o=r(3689),a=r(7518),s=r(690);n({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},9358:(e,t,r)=>{"use strict";var n=r(9989),i=r(690),o=r(300);n({target:"Object",stat:!0,forced:r(3689)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},228:(e,t,r)=>{"use strict";var n=r(3043),i=r(1880),o=r(5073);n||i(Object.prototype,"toString",o,{unsafe:!0})},6466:(e,t,r)=>{"use strict";var n=r(9989),i=r(9419).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},2320:(e,t,r)=>{"use strict";var n=r(9989),i=r(7897);n({global:!0,forced:parseInt!==i},{parseInt:i})},1692:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(509),a=r(8742),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{all:function(e){var t=this,r=a.f(t),n=r.resolve,c=r.reject,l=s((function(){var r=o(t.resolve),a=[],s=0,l=1;u(e,(function(e){var o=s++,u=!1;l++,i(r,t,e).then((function(e){u||(u=!0,a[o]=e,--l||n(a))}),c)})),--l||n(a)}));return l.error&&c(l.value),r.promise}})},5089:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),o=r(7073).CONSTRUCTOR,a=r(7919),s=r(6058),u=r(9985),c=r(1880),l=a&&a.prototype;if(n({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})}},6697:(e,t,r)=>{"use strict";var n,i,o,a=r(9989),s=r(3931),u=r(806),c=r(9037),l=r(2615),f=r(1880),h=r(9385),d=r(5997),p=r(4241),v=r(509),y=r(9985),m=r(8999),g=r(767),b=r(6373),_=r(9886).set,w=r(231),E=r(920),O=r(9302),x=r(4410),S=r(618),k=r(7919),T=r(7073),A=r(8742),I="Promise",N=T.CONSTRUCTOR,C=T.REJECTION_EVENT,R=T.SUBCLASSING,P=S.getterFor(I),D=S.set,L=k&&k.prototype,j=k,B=L,U=c.TypeError,F=c.document,M=c.process,z=A.f,K=z,W=!!(F&&F.createEvent&&c.dispatchEvent),V="unhandledrejection",G=function(e){var t;return!(!m(e)||!y(t=e.then))&&t},H=function(e,t){var r,n,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&J(t),t.rejection=1),!0===s?r=o:(f&&f.enter(),r=s(o),f&&(f.exit(),i=!0)),r===e.promise?c(new U("Promise-chain cycle")):(n=G(r))?l(n,r,u,c):u(r)):c(o)}catch(e){f&&!i&&f.exit(),c(e)}},Y=function(e,t){e.notified||(e.notified=!0,w((function(){for(var r,n=e.reactions;r=n.get();)H(r,e);e.notified=!1,t&&!e.rejection&&Z(e)})))},q=function(e,t,r){var n,i;W?((n=F.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!C&&(i=c["on"+e])?i(n):e===V&&E("Unhandled promise rejection",r)},Z=function(e){l(_,c,(function(){var t,r=e.facade,n=e.value;if($(e)&&(t=O((function(){u?M.emit("unhandledRejection",n,r):q(V,r,n)})),e.rejection=u||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},J=function(e){l(_,c,(function(){var t=e.facade;u?M.emit("rejectionHandled",t):q("rejectionhandled",t,e.value)}))},X=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,Y(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new U("Promise can\'t be resolved itself");var n=G(t);n?w((function(){var r={done:!1};try{l(n,t,X(ee,r,e),X(Q,r,e))}catch(t){Q(r,t,e)}})):(e.value=t,e.state=1,Y(e,!1))}catch(t){Q({done:!1},t,e)}}};if(N&&(B=(j=function(e){g(this,B),v(e),l(n,this);var t=P(this);try{e(X(ee,t),X(Q,t))}catch(e){Q(t,e)}}).prototype,(n=function(e){D(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:void 0})}).prototype=f(B,"then",(function(e,t){var r=P(this),n=z(b(this,j));return r.parent=!0,n.ok=!y(e)||e,n.fail=y(t)&&t,n.domain=u?M.domain:void 0,0===r.state?r.reactions.add(n):w((function(){H(n,r)})),n.promise})),i=function(){var e=new n,t=P(e);this.promise=e,this.resolve=X(ee,t),this.reject=X(Q,t)},A.f=z=function(e){return e===j||undefined===e?new i(e):K(e)},!s&&y(k)&&L!==Object.prototype)){o=L.then,R||f(L,"then",(function(e,t){var r=this;return new j((function(e,t){l(o,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete L.constructor}catch(e){}h&&h(L,B)}a({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:j}),d(j,I,!1,!0),p(I)},6409:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),o=r(7919),a=r(3689),s=r(6058),u=r(9985),c=r(6373),l=r(2945),f=r(1880),h=o&&o.prototype;if(n({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")),r=u(e);return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),!i&&u(o)){var d=s("Promise").prototype.finally;h.finally!==d&&f(h,"finally",d,{unsafe:!0})}},3964:(e,t,r)=>{"use strict";r(6697),r(1692),r(5089),r(8829),r(2092),r(7905)},8829:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(509),a=r(8742),s=r(9302),u=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{race:function(e){var t=this,r=a.f(t),n=r.reject,c=s((function(){var a=o(t.resolve);u(e,(function(e){i(a,t,e).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},2092:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),o=r(8742);n({target:"Promise",stat:!0,forced:r(7073).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return i(t.reject,void 0,e),t.promise}})},7905:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(3931),a=r(7919),s=r(7073).CONSTRUCTOR,u=r(2945),c=i("Promise"),l=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return u(l&&this===c?a:this,e)}})},4043:(e,t,r)=>{"use strict";var n=r(9989),i=r(6308);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2826:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(1880),o=r(5027),a=r(4327),s=r(3689),u=r(3477),c="toString",l=RegExp.prototype[c],f=s((function(){return"/a/b"!==l.call({source:"a",flags:"b"})})),h=n&&l.name!==c;(f||h)&&i(RegExp.prototype,c,(function(){var e=o(this);return"/"+a(e.source)+"/"+a(u(e))}),{unsafe:!0})},7985:(e,t,r)=>{"use strict";r(319)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(800))},9649:(e,t,r)=>{"use strict";r(7985)},3843:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),o=r(2124),a=r(4684),s=r(4327),u=r(7413),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},1694:(e,t,r)=>{"use strict";var n=r(730).charAt,i=r(4327),o=r(618),a=r(1934),s=r(7807),u="String Iterator",c=o.set,l=o.getterFor(u);a(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function(){var e,t=l(this),r=t.string,i=t.index;return i>=r.length?s(void 0,!0):(e=n(r,i),t.index+=e.length,s(e,!1))}))},2462:(e,t,r)=>{"use strict";var n=r(2615),i=r(8678),o=r(5027),a=r(981),s=r(3126),u=r(4327),c=r(4684),l=r(4849),f=r(1514),h=r(6100);i("match",(function(e,t,r){return[function(t){var r=c(this),i=a(t)?void 0:l(t,e);return i?n(i,t,r):new RegExp(t)[e](u(r))},function(e){var n=o(this),i=u(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return h(n,i);var c=n.unicode;n.lastIndex=0;for(var l,d=[],p=0;null!==(l=h(n,i));){var v=u(l[0]);d[p]=v,""===v&&(n.lastIndex=f(i,s(n.lastIndex),c)),p++}return 0===p?null:d}]}))},8436:(e,t,r)=>{"use strict";var n=r(9989),i=r(1435).trim;n({target:"String",proto:!0,forced:r(5984)("trim")},{trim:function(){return i(this)}})},7855:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(2615),a=r(8844),s=r(3931),u=r(7697),c=r(146),l=r(3689),f=r(6812),h=r(3622),d=r(5027),p=r(5290),v=r(8360),y=r(4327),m=r(5684),g=r(5391),b=r(300),_=r(2741),w=r(6062),E=r(7518),O=r(2474),x=r(2560),S=r(8920),k=r(9556),T=r(1880),A=r(2148),I=r(3430),N=r(2713),C=r(7248),R=r(4630),P=r(4201),D=r(6145),L=r(5405),j=r(3032),B=r(5997),U=r(618),F=r(2960).forEach,M=N("hidden"),z="Symbol",K="prototype",W=U.set,V=U.getterFor(z),G=Object[K],H=i.Symbol,Y=H&&H[K],q=i.RangeError,Z=i.TypeError,$=i.QObject,J=O.f,X=x.f,Q=w.f,ee=k.f,te=a([].push),re=I("symbols"),ne=I("op-symbols"),ie=I("wks"),oe=!$||!$[K]||!$[K].findChild,ae=function(e,t,r){var n=J(G,t);n&&delete G[t],X(e,t,r),n&&e!==G&&X(G,t,n)},se=u&&l((function(){return 7!==g(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?ae:X,ue=function(e,t){var r=re[e]=g(Y);return W(r,{type:z,tag:e,description:t}),u||(r.description=t),r},ce=function(e,t,r){e===G&&ce(ne,t,r),d(e);var n=v(t);return d(r),f(re,n)?(r.enumerable?(f(e,M)&&e[M][n]&&(e[M][n]=!1),r=g(r,{enumerable:m(0,!1)})):(f(e,M)||X(e,M,m(1,{})),e[M][n]=!0),se(e,n,r)):X(e,n,r)},le=function(e,t){d(e);var r=p(t),n=b(r).concat(pe(r));return F(n,(function(t){u&&!o(fe,r,t)||ce(e,t,r[t])})),e},fe=function(e){var t=v(e),r=o(ee,this,t);return!(this===G&&f(re,t)&&!f(ne,t))&&(!(r||!f(this,t)||!f(re,t)||f(this,M)&&this[M][t])||r)},he=function(e,t){var r=p(e),n=v(t);if(r!==G||!f(re,n)||f(ne,n)){var i=J(r,n);return!i||!f(re,n)||f(r,M)&&r[M][n]||(i.enumerable=!0),i}},de=function(e){var t=Q(p(e)),r=[];return F(t,(function(e){f(re,e)||f(C,e)||te(r,e)})),r},pe=function(e){var t=e===G,r=Q(t?ne:p(e)),n=[];return F(r,(function(e){!f(re,e)||t&&!f(G,e)||te(n,re[e])})),n};c||(T(Y=(H=function(){if(h(Y,this))throw new Z("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=R(e),r=function(e){var n=void 0===this?i:this;n===G&&o(r,ne,e),f(n,M)&&f(n[M],t)&&(n[M][t]=!1);var a=m(1,e);try{se(n,t,a)}catch(e){if(!(e instanceof q))throw e;ae(n,t,a)}};return u&&oe&&se(G,t,{configurable:!0,set:r}),ue(t,e)})[K],"toString",(function(){return V(this).tag})),T(H,"withoutSetter",(function(e){return ue(R(e),e)})),k.f=fe,x.f=ce,S.f=le,O.f=he,_.f=w.f=de,E.f=pe,D.f=function(e){return ue(P(e),e)},u&&(A(Y,"description",{configurable:!0,get:function(){return V(this).description}}),s||T(G,"propertyIsEnumerable",fe,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:H}),F(b(ie),(function(e){L(e)})),n({target:z,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?g(e):le(g(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:de}),j(),B(H,z),C[M]=!0},6544:(e,t,r)=>{"use strict";var n=r(9989),i=r(7697),o=r(9037),a=r(8844),s=r(6812),u=r(9985),c=r(3622),l=r(4327),f=r(2148),h=r(8758),d=o.Symbol,p=d&&d.prototype;if(i&&u(d)&&(!("description"in p)||void 0!==d().description)){var v={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(p,this)?new d(e):void 0===e?d():d(e);return""===e&&(v[t]=!0),t};h(y,d),y.prototype=p,p.constructor=y;var m="Symbol(description detection)"===String(d("description detection")),g=a(p.valueOf),b=a(p.toString),_=/^Symbol\\((.*)\\)[^)]+$/,w=a("".replace),E=a("".slice);f(p,"description",{configurable:!0,get:function(){var e=g(this);if(s(v,e))return"";var t=b(e),r=m?E(t,7,-1):w(t,_,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:y})}},8074:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),o=r(6812),a=r(4327),s=r(3430),u=r(6549),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=a(e);if(o(c,t))return c[t];var r=i("Symbol")(t);return c[t]=r,l[r]=t,r}})},4254:(e,t,r)=>{"use strict";r(5405)("iterator")},9749:(e,t,r)=>{"use strict";r(7855),r(8074),r(1445),r(8324),r(9434)},1445:(e,t,r)=>{"use strict";var n=r(9989),i=r(6812),o=r(734),a=r(3691),s=r(3430),u=r(6549),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!o(e))throw new TypeError(a(e)+" is not a symbol");if(i(c,e))return c[e]}})},8832:(e,t,r)=>{"use strict";r(5398)},7522:(e,t,r)=>{"use strict";var n=r(9037),i=r(6338),o=r(3265),a=r(7612),s=r(5773),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(n[c]&&n[c].prototype);u(o)},6265:(e,t,r)=>{"use strict";var n=r(9037),i=r(6338),o=r(3265),a=r(752),s=r(5773),u=r(4201),c=u("iterator"),l=u("toStringTag"),f=a.values,h=function(e,t){if(e){if(e[c]!==f)try{s(e,c,f)}catch(t){e[c]=f}if(e[l]||s(e,l,t),i[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var d in i)h(n[d]&&n[d].prototype,d);h(o,"DOMTokenList")},209:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8552)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},3509:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),o=r(8552)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},6869:(e,t,r)=>{"use strict";r(209),r(3509)}},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),(()=>{"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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,r){if(t){if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):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 n(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 r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l,f,h,d,p,v,y,m,g,b,_,w,E,O,x,S,k,T,A,I,N,C,R,P,D,L,j,B,U,F,M,z,K,W,V,G,H,Y,q,Z,$,J,X,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,le,fe,he,de,pe,ve,ye,me,ge,be,_e,we,Ee,Oe,xe,Se,ke,Te,Ae,Ie,Ne,Ce,Re,Pe,De,Le,je=r(4687),Be=r.n(je);r(228),r(3964),r(1517),r(9358),r(4338),r(6869),r(429);!function(e){e.XY_ABILITY="XY-ABILITY",e.XY_LOG_SERVER="xy-log-server",e.XY_ERROR_CODE="xy-error-code",e.XY_I18N_CODE="xy-i18n-code",e.XY_TIMESTAMP="xy-timestamp"}(u||(u={})),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"}(c||(c={})),function(e){e.INIT="INIT",e.CAPTURE="CAPTURE",e.PENDING="PENDING",e.STARTING="STARTING",e.SWITCHING="SWITCHING",e.PAUSE="PAUSE",e.ENDED="ENDED"}(l||(l={})),function(e){e.MUTE_AUDIO="muteAudio",e.UNMUTE_AUDIO="unmuteAudio",e.MUTE_VIDEO="muteVideo",e.UNMUTE_VIDEO="unmuteVideo"}(f||(f={})),function(e){e.NONE="NONE",e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.BOTH="BOTH"}(h||(h={})),function(e){e.UNKNOWN="UNKNOWN",e.CONNECTING="CONNECTING",e.ENDED="ENDED",e.CONNECTED="CONNECTED"}(d||(d={})),function(e){e.AUTO="AUTO",e.CUSTOM="CUSTOM"}(p||(p={})),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"}(v||(v={})),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"}(y||(y={})),function(e){e.FRONT="FRONT",e.BACK="BACK"}(m||(m={})),function(e){e.DIALOG="dialog",e.NORMAL="normal"}(g||(g={})),function(e){e.START="start",e.STOP="stop"}(b||(b={})),function(e){e.STA_CONFSTATUS="sta-confStatus",e.OPER_CONFOPERATION="oper-confOperation",e.STA_MSGCALLBACK="sta-msgCallback",e.OPER_SETTING="oper-setting"}(_||(_={})),function(e){e.CALL_IN="callIn",e.LAYOUT="layout",e.CONTENT="content",e.AUDIO_MUTE="audioMute",e.AUDIO_UNMUTE="audioUnmute",e.VIDEO_MUTE="videoMute",e.VIDEO_UNMUTE="videoUnmute",e.SUBTITLE="subtitle",e.COMPLEX_CAPABILITIES="complexCapabilities",e.MMS_CAPABILITIES="mmsCapabilities"}(w||(w={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(E||(E={})),function(e){e.NORMAL="NORMAL",e.FAILED="FAILED",e.DISABLED="DISABLED",e.UNKNOWN="UNKNOWN"}(O||(O={})),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"}(x||(x={})),function(e){e.CONTENT="CONTENT",e.PREVIEW="PREVIEW",e.PIPELINE="PIPELINE",e.REMOTE="REMOTE"}(S||(S={})),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"}(k||(k={})),function(e){e[e.FR30=30]="FR30",e[e.FR15=15]="FR15",e[e.FR8=8]="FR8"}(T||(T={})),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"}(A||(A={})),function(e){e[e.LOW=0]="LOW",e[e.NORMAL=1]="NORMAL",e[e.HIGH=2]="HIGH"}(I||(I={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.ALL="ALL"}(N||(N={})),function(e){e.SDK="SDK",e.CUSTOM="CUSTOM"}(C||(C={})),function(e){e.COMMON="COMMON",e.ADVANCED="ADVANCED",e.FAILED="FAILED"}(R||(R={})),function(e){e.MULTI_RES="MULTI_RESOLUTION",e.SCALE_RES="SCALE_RESOLUTION"}(P||(P={})),function(e){e.VERY_LOW="very-low",e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(D||(D={})),function(e){e.CAPTURE="CAPTURE",e.KEEP="KEEP",e.FAILED="FAILED"}(L||(L={})),function(e){e.ACQUIRING="ACQUIRING",e.SENDING="SENDING",e.IDLE="IDLE"}(j||(j={})),function(e){e.CONTENT="0",e.ALL="1"}(B||(B={})),function(e){e.NONE="0",e.WITH="1"}(U||(U={})),function(e){e.DOWNLINK="DOWNLINK",e.UPLINK="UPLINK",e.ALL="ALL",e.PEOPLE_DOWNLINK="PEOPLE_DOWNLINK",e.PEOPLE_UPLINK="PEOPLE_UPLINK",e.CONTENT_DOWNLINK="CONTENT_DOWNLINK",e.CONTENT_UPLINK="CONTENT_UPLINK"}(F||(F={})),function(e){e.VOTE_SIGNATURE_START="VOTE_SIGNATURE_START",e.VOTE_SIGNATURE_STOP="VOTE_SIGNATURE_STOP"}(M||(M={})),function(e){e[e.SIGN_IN=2]="SIGN_IN"}(z||(z={})),function(e){e.CHECK_IN="CHECK_IN"}(K||(K={})),function(e){e.NONE="none",e.ON="on",e.OFF="off"}(W||(W={})),function(e){e.NONE="none",e.ON="on",e.OFF="off"}(V||(V={})),function(e){e.ON="on",e.OFF="off"}(G||(G={})),function(e){e.SPEAKER="SPEAKER",e.GALLERY="GALLERY"}(H||(H={})),function(e){e.MULTI_PIC_CONTENT_HIGH_PRIORITY="MULTI_PIC_CONTENT_HIGH_PRIORITY",e.MULTI_PIC_ACTIVE_HIGH_PRIORITY="MULTI_PIC_ACTIVE_HIGH_PRIORITY",e.TWO_PIC_PIP="TWO_PIC_PIP",e.CONTENT_ONLY="CONTENT_ONLY",e.TWO_PIC_SYMMETRIC="TWO_PIC_SYMMETRIC"}(Y||(Y={})),function(e){e.LOCAL="LOCAL",e.CONTENT="CONTENT",e.PEOPLE="PEOPLE",e.CHAIRMAN="CHAIRMAN",e.NONE="NONE"}(q||(q={})),function(e){e[e.NONE=-1]="NONE",e[e.MOBILE_HORIZONTAL=0]="MOBILE_HORIZONTAL",e[e.MOBILE_VERTICAL=1]="MOBILE_VERTICAL"}(Z||(Z={})),function(e){e[e.NONE=0]="NONE",e[e.USER=1]="USER",e[e.MEETING=2]="MEETING"}($||($={})),function(e){e.NONE="",e.MAIN_VENUE="mainVenue",e.FOCUS_MODE="focusMode"}(J||(J={})),function(e){e[e.Bad=1]="Bad",e[e.Poor=2]="Poor",e[e.Good=3]="Good",e[e.Excellent=4]="Excellent"}(X||(X={})),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"}(Q||(Q={})),function(e){e.INACTIVE="inactive",e.RECVONLY="recvonly",e.SENDONLY="sendonly",e.SENDRECV="sendrecv"}(ee||(ee={})),function(e){e.new="new",e.connecting="connecting",e.connected="connected",e.disconnected="disconnected",e.failed="failed",e.closed="closed",e.unknown="unknown"}(te||(te={})),function(e){e.new="new",e.checking="checking",e.connected="connected",e.disconnected="disconnected",e.completed="completed",e.failed="failed",e.closed="closed",e.unknown="unknown"}(re||(re={})),function(e){e.INIT="INIT",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING",e.SOCKET_CONNECTING="SOCKET_CONNECTING",e.DISCONNECTED="DISCONNECTED",e.RESTART="RESTART",e.RECONNECTED="RECONNECTED",e.FAILED="FAILED"}(ne||(ne={})),function(e){e.MEDIA="MEDIA",e.PEER="PEER",e.INIT="INIT"}(ie||(ie={})),function(e){e.LOG="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR",e.FATAL="FATAL"}(oe||(oe={})),function(e){e.LOGGER="LOGGER",e.INIT="INIT",e.DESTROY="DESTROY",e.DOWNLOAD="DOWNLOAD",e.UPLOAD="UPLOAD",e.GET_DATA="GET_DATA"}(ae||(ae={})),function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARNING="WARNING",e.ERROR="ERROR",e.NONE="NONE"}(se||(se={})),function(e){e.RUNNING="RUNNING",e.ENDED="ENDED"}(ue||(ue={})),function(e){e.USE_SEC_API="use_sec_api",e.MEETING_SHARE_NEW_PAGE_API="meeting_share_new_page_api"}(ce||(ce={})),function(e){e.BROWSER="browser",e.MONITOR="monitor",e.WINDOW="window"}(le||(le={})),function(e){e.EXCLUDE="exclude",e.INCLUDE="include"}(fe||(fe={})),function(e){e.PEOPLE="PEOPLE",e.CONTENT="CONTENT"}(he||(he={})),function(e){e.VIDEO_INPUT="VIDEO_INPUT",e.AUDIO_INPUT="AUDIO_INPUT"}(de||(de={})),function(e){e[e.XYAccount=0]="XYAccount",e[e.ExtUserId=1]="ExtUserId",e[e.ExtToken=2]="ExtToken"}(pe||(pe={})),function(e){e["1x1"]="1x1",e["2x1"]="2x1",e["3x1"]="3x1",e["4x1"]="4x1",e["4x2"]="4x2",e["5x1"]="5x1",e["6x1"]="6x1",e["6x2"]="6x2",e["8x1"]="8x1",e["9x1"]="9x1"}(ve||(ve={})),function(e){e.SPEAKER="speaker",e.SPECIFIED="specified",e.AUTO="auto"}(ye||(ye={})),function(e){e.INIT="INIT",e.READY="READY",e.PAUSE_MEETING="PAUSE_MEETING",e.PAUSE_SDK="PAUSE_SDK",e.POLLING="POLLING"}(me||(me={})),function(e){e.NORMAL="NORMAL",e.NO_JOINED="NO_JOINED",e.VIDEO_MUTE="VIDEO_MUTE",e.NOT_FOUND="NOT_FOUND",e.NULL="NULL"}(ge||(ge={})),function(e){e[e.FULL_ROSTER=0]="FULL_ROSTER",e[e.SPECIFIED=1]="SPECIFIED"}(be||(be={})),function(e){e.PING="PING",e.PONG="PONG"}(_e||(_e={})),function(e){e.CANPLAY="CANPLAY",e.ENDED="ENDED",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN",e.LOAD_START="LOAD_START",e.ERROR="ERROR"}(we||(we={})),function(e){e.ENABLED="ENABLED",e.MUTE="MUTE",e.ENDED="ENDED"}(Ee||(Ee={})),function(e){e.MUTE="MUTE",e.REQUEST="REQUEST",e.NORMAL="NORMAL",e.AUDIO_TEL="AUDIO_TEL",e.AUDIO_ONLY="AUDIO_ONLY",e.AUDIO_CONTENT="AUDIO_CONTENT",e.ANSWER_PHONE="ANSWER_PHONE"}(Oe||(Oe={})),function(e){e[e.NONE=-1]="NONE",e[e.TEXT=0]="TEXT",e[e.IMAGE=1]="IMAGE"}(xe||(xe={})),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"}(Se||(Se={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt",e.UNKNOWN="unknown",e.FAILED="failed"}(ke||(ke={})),function(e){e.AUDIOINPUT="audioInput",e.AUDIOOUTPUT="audioOutput",e.VIDEOINPUT="videoInput"}(Te||(Te={})),function(e){e.INIT="INIT",e.UNKNOWN="UNKNOWN",e.NORMAL="NORMAL",e.FAILED="FAILED",e.LOST="LOST"}(Ae||(Ae={})),function(e){e.CANCEL_HANDUP="cancel-handup",e.FOCUS_VIEW="focus-view",e.INTERACTIVE_TOOL_INFO="interactiveToolInfo",e.MEETING_CONTROL="meeting-control",e.MEETING_CONTROL_VIDEO="meeting-control-video",e.NOTIFICATION="notification",e.ONHOLD="onhold",e.SUB_TITLE="sub-title",e.AUDIO_STATUS="audio-status",e.CALL_STATUS="call-status",e.CONFERENCE_INFO="conference-info",e.DISCONNECTED="disconnected",e.ENTERPRISE_CONFIG="enterprise-config",e.LAYOUT_STATE="layout-state",e.MEDIA_CHANGED_MIGRATE="media-changed-migrate",e.USER_INFO="user-info",e.VIDEO_STATUS="video-status",e.CONF_CHANGE_INFO="conf-change-info",e.CONTENT="content",e.CONTAINER_RESIZE="container-resize",e.FORCE_FULL_SCREEN="force-full-screen",e.LAYOUT="layout",e.PAGE_INFO="page-info",e.ROTATION_CHANGE="rotation-change",e.SCREEN_INFO="screen-info",e.TEMPLATE_MODE="template-mode",e.AUDIO_TRACK="audio-track",e.BULK_ROSTER="bulkRoster",e.IN_OUT_REMINDER="in-out-reminder",e.NETWORK_LEVEL="networkLevel",e.NETWORK_PARAMETER="networkParameter",e.PARTICIPANTS_COUNT="participants-count",e.ROSTER="roster",e.SPEAKER_INFO="speaker-info",e.SPEAKERS_INFO="speakers-info",e.TRANSLATION_CONTENT="translation-content",e.VIDEO_TRACK="video-track",e.MULTI_GROUP_INFO="multi-group-info",e.START_MONITOR_REPORT="start-monitor-report",e.STOP_MONITOR_REPORT="stop-monitor-report",e.RECORDING_STATE_CHANGED="recording-state-changed",e.RECORD_STATUS_NOTIFICATION="record-status-notification",e.RECORD_PERMISSION="record-permission",e.CUSTOM_MESSAGE_RECV="custom-message-recv",e.ERROR="error",e.MEETING_STATS="meeting-stats",e.PLAY_FAILED="play-failed",e.SOCKET_CLOSE="socket-close",e.SOCKET_ERROR="socket-error",e.SOCKET_MESSAGE="socket-message",e.SOCKET_OPEN="socket-open",e.SOCKET_RECONNECT="socket-reconnect",e.SOCKET_TIMEOUT="socket-timeout"}(Ie||(Ie={})),function(e){e.DEVICE="device",e.PERMISSION="permission",e.START_SHARE_CONTENT="start-share-content",e.STOP_SHARE_CONTENT="stop-share-content",e.TRACK_ERROR="track-error"}(Ne||(Ne={})),function(e){e.DEVICE="device",e.PERMISSION="permission"}(Ce||(Ce={})),function(e){e.CLOSE="close",e.ERROR="error",e.MESSAGE="message",e.OPEN="open",e.RECONNECT="reconnect",e.TIMEOUT="timeout",e.TOKEN_INVALID="TOKEN_INVALID"}(Re||(Re={})),function(e){e[e.ALL=0]="ALL",e[e.VIDEO=1]="VIDEO",e[e.AUDIO=2]="AUDIO",e[e.CONTENT=3]="CONTENT"}(Pe||(Pe={})),function(e){e[e.SMART=0]="SMART",e[e.ALL=1]="ALL",e[e.NOT=2]="NOT",e[e.FORCE=3]="FORCE"}(De||(De={})),function(e){e[e.RESIZE=0]="RESIZE",e[e.OBSERVER=1]="OBSERVER",e[e.UNKNOWN=2]="UNKNOWN"}(Le||(Le={}));new(function(){function e(){n(this,e),this.eleId="",this.element=null,this.resizeObserver=null,this.resizeMode=Le.UNKNOWN,this.detectCount=0,this.maxDetectCount=20,this.detectTimer=null,this.onResize=function(){},this.handleResize=this.handleResize.bind(this)}return s(e,[{key:"handleResize",value:function(){var e,t=(null===(e=this.element)||void 0===e?void 0:e.getBoundingClientRect())||{},r=t.width,n=void 0===r?0:r,i=t.height,o=void 0===i?0:i;this.onResize({width:n,height:o,element:this.element})}},{key:"init",value:function(e,t){e?(this.eleId=e,this.onResize=t,this.element=document.getElementById(this.eleId),this.element?this.startObserverResize():(this.startListenerResize(),this.startDetectTimer())):this.startListenerResize()}},{key:"startDetectTimer",value:function(){var e=this;this.detectTimer=setTimeout((function(){if(e.detectCount>e.maxDetectCount)e.clearDetectTimer();else{if(e.element=document.getElementById(e.eleId),e.element)return e.clearDetectTimer(),e.startObserverResize(),void e.removeResizeListener();e.detectCount+=1,e.startDetectTimer()}}),500)}},{key:"clearDetectTimer",value:function(){this.detectTimer&&(clearTimeout(this.detectTimer),this.detectTimer=null),this.detectCount=0}},{key:"startListenerResize",value:function(){window.addEventListener("resize",this.handleResize),this.resizeMode=Le.RESIZE}},{key:"startObserverResize",value:function(){var e=this;this.element&&(this.resizeObserver=new ResizeObserver((function(t){e.handleResize()})),this.resizeObserver.observe(this.element),this.resizeMode=Le.OBSERVER)}},{key:"destroy",value:function(){this.clearDetectTimer(),this.removeResizeListener(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.eleId="",this.element=null}},{key:"removeResizeListener",value:function(){this.resizeMode===Le.RESIZE&&window.removeEventListener("resize",this.handleResize)}}]),e}()),r(24),r(9693),r(7522),r(7550),r(2826),r(3975),r(4043),r(752),r(9649),r(1694),r(6265),r(8436),r(5728);var Ue={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},isFunction:function(e){return"function"==typeof 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)}},Fe={"(":")","(":")","[":"]","{":"}","<":">"},Me=(new Set(Object.keys(Fe)),r(6466),r(738)),ze=r.n(Me),Ke=(r(7195),r(8077),r(8832),r(2462),r(886),r(2320),function(){function e(){n(this,e)}return s(e,null,[{key:"getPlatform",value:function(){var e=navigator.userAgent.toLowerCase(),t=navigator.platform.toLowerCase(),r=/macintosh|mac os x/.test(e)||/mac/.test(t),n=/linux/.test(t),i=/win|windows|win32|win64/i.test(e),o=/windows phone/.test(e),a=/symbianos/.test(e)||o,s=/android|harmony/.test(e),u=/arkweb/.test(e)&&/harmony/.test(e),c=/firefox/.test(e),l=/chrome|crios/.test(e)&&!/edg/.test(e),f=/edg/.test(e),h=/safari/.test(e)&&!l&&!f,d=/ipad/.test(e)||/macintel/.test(e)&&navigator.maxTouchPoints>1||/macintosh/.test(e)&&navigator.maxTouchPoints>1,p=/ipad|playbook/.test(e)||s&&!/mobile/.test(e)||c&&/tablet/.test(e),v=/iphone/.test(e)&&!p,y=v||d,m=v||s||u||d||a,g=!m,b=/baidu|bidubrowser|baiduboxapp/.test(e),_=/tencenttraveler|qqbrowse|qq\\/|micromessenger/.test(e),w=/opera|opr/.test(e),E=/huaweibrowser/.test(e),O=/Trident/.test(e);return{isTablet:p,isPhone:v,isAndroid:s,isPc:g,isMac:r,isWindows:i,isIPad:d,isChrome:l,isLinux:n,isFirefox:c,isBaidu:b,isQQ:_,isOpera:w,isZhazha:/qihuubrowser|qhbrowser|360se|360ee|lbbrowser|uc|ubrowser|ucweb|quark|miuibrowser|aliapp\\(tb|weibo|iqiyiapp|huaweibrowser|huawei|metasr|sogou|se|maxthon|the world|metasr|2345explorer|tencenttraveler|mb2345browser/.test(e),isEdge:f,isSafari:h,isHuaweiBrowser:E,isWeixin:/micromessenger/.test(e)&&!/wxwork|windowswechat/.test(e),isWxwork:/wxwork/.test(e)&&/micromessenger/.test(e),isHarmony:u,isMiniProgram:/miniprogram/.test(e),isWindowsWxWechat:/micromessenger.*wxwork.*windowswechat/.test(e)&&!/macintosh/.test(e),isWindowsWechat:/micromessenger.*windowswechat/.test(e)&&!/wxwork|macintosh/i.test(e),isTrident:O,isIOS:y,isDingDing:/dingtalk/.test(e),isMobile:m}}},{key:"getOperationSystem",value:function(){var t=e.getPlatform(),r=t.isIPad,n=t.isMac,i=t.isWindowsWechat,o=t.isWindowsWxWechat,a=t.isWindows,s=t.isPhone,u=t.isAndroid,c=t.isLinux,l=t.isMiniProgram,f=t.isHarmony;return o?"Windows WXWechat":i?"Windows Wechat":a?"Windows":s?"iOS":u?"Android":r?"iPad":n?"Mac":c?"Linux":l?"MiniProgram":f?"Harmony":""}},{key:"getChromeVersion",value: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]}}},{key:"getEdgeVersion",value: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]}}},{key:"getSafariVersion",value:function(){var e=navigator.userAgent.match(/Version\\/([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]}}},{key:"getFirefoxVersion",value: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]}}},{key:"getAndroidVersion",value: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]}}}},{key:"getIOSVersion",value: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]}}}},{key:"getWeixinVersion",value:function(){if(e.getPlatform().isWeixin)return(navigator.userAgent.match(/MicroMessenger\\/([\\d.]+)/i)||["",""])[1]}},{key:"getWXWeixinVersion",value:function(){if(e.getPlatform().isWxwork)return(navigator.userAgent.match(/wxwork\\/([\\d.]+)/i)||["",""])[1]}},{key:"compareVersion",value:function(e,t){for(var r=e.split("."),n=t.split("."),i=Math.max(r.length,n.length);r.length<i;)r.push("0");for(;n.length<i;)n.push("0");for(var o=0;o<i;o++){var a=parseInt(r[o]),s=parseInt(n[o]);if(a>s)return 1;if(a<s)return-1}return 0}}]),e}());Ke.getBrowserName=function(){var e=Ke.getPlatform(),t=e.isFirefox,r=e.isChrome,n=e.isSafari,i=e.isWindowsWechat,o=e.isWindowsWxWechat,a=e.isZhazha,s=e.isEdge,u=e.isWeixin,c=e.isWxwork,l=e.isQQ,f=e.isHuaweiBrowser,h=e.isOpera,d=e.isTrident,p=e.isHarmony;return t?"Firefox":r?"Chrome":n?"Safari":s?"Edge":h?"Opera":d?"Internet Explorer":i?"WindowsWechat":o?"WindowsWxWechat":u?"Weixin":c?"WXWeixin":u?"Weixin":l?"Tencent":f?"Huawei":a?"Other":p?"Harmony":"Unknown"};r(9730),r(7722),r(9749),r(6544),r(4254),r(6646),r(4284),r(6801),r(3843);function We(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 Ve(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 Ve(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Ve(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 Ge=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},He=[{width:640,height:360},{width:1280,height:720},{width:1920,height:1080},{width:2560,height:1440},{width:3840,height:2160},{width:5760,height:3240}],Ye={audioInputList:[],audioOutputList:[],videoInputList:[]},qe=function(){function e(){n(this,e),this.deviceList=Ye,this.maxResolutionMap=new Map}return s(e,[{key:"destroy",value:function(){this.deviceList=Ye,this.maxResolutionMap=new Map}},{key:"captureStream",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ge(this,void 0,void 0,Be().mark((function r(){var n,i,o,a,s;return Be().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Pe.VIDEO,i=Pe.ALL,o=Pe.AUDIO,a={},e===n?a.video=t:e===o?a.audio=t:e===i&&(a=t),r.prev=3,r.next=6,navigator.mediaDevices.getUserMedia(a);case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(3),s=this.handleCaptureStreamError(r.t0),r.abrupt("return",Promise.reject(s));case 13:case"end":return r.stop()}}),r,this,[[3,9]])})))}},{key:"captureContentStream",value:function(e){var t;return Ge(this,void 0,void 0,Be().mark((function r(){var n,i,o,a,s,u,c,l;return Be().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,n=window.screen.width,i=window.screen.height,o=window.devicePixelRatio,a=n*o,s=i*o,u=e||{video:{cursor:"always",logicalSurface:!0,displaySurface:"monitor",width:a,height:s}},r.next=9,null===(t=navigator.mediaDevices)||void 0===t?void 0:t.getDisplayMedia(u);case 9:return c=r.sent,r.abrupt("return",c);case 13:return r.prev=13,r.t0=r.catch(0),l=this.handleCreateContentStreamError(r.t0),r.abrupt("return",Promise.reject(l));case 17:case"end":return r.stop()}}),r,this,[[0,13]])})))}},{key:"checkAllowCamera",value:function(){return Ge(this,void 0,void 0,Be().mark((function e(){var t,r,n;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.prev=1,e.next=4,this.captureStream(Pe.VIDEO);case 4:return r=e.sent,t=!0,r&&this.closeStream([r]),e.abrupt("return",{allow:t,msg:""});case 10:return e.prev=10,e.t0=e.catch(1),n=e.t0.msg||"采集视频流失败",e.abrupt("return",{allow:t,msg:n});case 14:case"end":return e.stop()}}),e,this,[[1,10]])})))}},{key:"checkAllowMicroPhone",value:function(){return Ge(this,void 0,void 0,Be().mark((function e(){var t,r,n;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.prev=1,e.next=4,this.captureStream(Pe.AUDIO);case 4:return r=e.sent,t=!0,r&&this.closeStream([r]),e.abrupt("return",{allow:t,msg:""});case 10:return e.prev=10,e.t0=e.catch(1),n=e.t0.msg||"采集音频流失败",e.abrupt("return",{allow:t,msg:n});case 14:case"end":return e.stop()}}),e,this,[[1,10]])})))}},{key:"getMaxResolution",value:function(){return Ge(this,void 0,void 0,Be().mark((function e(){var t,r,n,i,o;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.deviceList.videoInputList).length){e.next=21;break}r=We(t),e.prev=3,r.s();case 5:if((n=r.n()).done){e.next=13;break}return i=n.value,e.next=9,this.calculateMaxResolution(i);case 9:o=e.sent,this.maxResolutionMap.set(i.deviceId,o);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return e.abrupt("return",this.maxResolutionMap);case 22:case"end":return e.stop()}}),e,this,[[3,15,18,21]])})))}},{key:"calculateMaxResolution",value:function(e){var t=e.deviceId;return Ge(this,void 0,void 0,Be().mark((function e(){var r,n,i,o,a,s,u,c,l,f,h,d,p,v,y,m,g;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=He.length,n=He[0].width,i=He[0].height,o={width:n,height:i},a=0;case 5:if(!(a<r)){e.next=29;break}return s=He[a],u=Object.assign(Object.assign({},s),{deviceId:t,frameRate:15}),c=!1,e.prev=9,e.next=12,this.captureStream(Pe.VIDEO,u);case 12:if(l=e.sent,f=l.getVideoTracks()[0],h=f.getSettings(),d=h.width,p=void 0===d?0:d,v=h.height,y=void 0===v?0:v,m=h.deviceId,g=void 0===m?"":m,s.width!==p&&s.height!==y||!(o.width<=p||o.height<=y)||t!==g?c=!0:o=s,this.closeStream([l]),!c){e.next=20;break}return e.abrupt("break",29);case 20:e.next=26;break;case 22:return e.prev=22,e.t0=e.catch(9),console.warn("get max resolution err: ",e.t0),e.abrupt("break",29);case 26:a++,e.next=5;break;case 29:return e.abrupt("return",o);case 30:case"end":return e.stop()}}),e,this,[[9,22]])})))}},{key:"getDeviceList",value:function(){return Ge(this,void 0,void 0,Be().mark((function e(){var t,r,n,i,o;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.mediaDevices.enumerateDevices();case 3:return t=e.sent,r=[],n=[],i=[],o=function(e){return e.filter((function(e){var t=e.label,r=e.deviceId;return!(t.match(/\\(Virtual\\)$/)||"communications"===r)}))},t.forEach((function(e){var t=e.deviceId,o=e.label,a=e.kind,s={deviceId:t,label:o,kind:a,groupId:e.groupId};t&&a&&("audioinput"===a?r.push(s):"audiooutput"===a?n.push(s):"videoinput"===a&&i.push(s))})),this.deviceList={audioInputList:o(r),audioOutputList:o(n),videoInputList:o(i)},e.abrupt("return",this.deviceList);case 13:return e.prev=13,e.t0=e.catch(0),this.deviceList={audioInputList:[],audioOutputList:[],videoInputList:[]},e.abrupt("return",this.deviceList);case 17:case"end":return e.stop()}}),e,this,[[0,13]])})))}},{key:"closeStream",value:function(e){e.forEach((function(e){e.getTracks().forEach((function(e){e.stop()}))}))}},{key:"getSupportedConstraints",value:function(){var e,t=[];try{var r=null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getSupportedConstraints();if(r)for(var n in r)t.push(n);return t}catch(e){return t}}},{key:"handleCaptureStreamError",value:function(e){return"NotFoundError"===e.name||"DevicesNotFoundError"===e.name?{code:20400,msg:"缺失摄像头或麦克风设备"}:"NotReadableError"===e.name||"TrackStartError"===e.name?{code:20401,msg:"摄像头或麦克风设备无法访问"}:"OverconstrainedError"===e.name||"ConstraintNotSatisfiedError"===e.name?{code:20402,msg:"约束设置无法被满足"}:"NotAllowedError"===e.name||"PermissionDeniedError"===e.name||e.message.includes("NotAllowedError")?{code:20403,msg:"麦克风或摄像头使用权限被拒绝"}:"TypeError"===e.name||"TypeError"===e.name?{code:20404,msg:"采集流约束设置为空"}:{code:20405,msg:"创建媒体流失败"}}},{key:"handleCreateContentStreamError",value:function(e){var t=e.name,r=e.message;return"NotAllowedError"===t?"Permission denied by system"===r?{code:950508,msg:"屏幕分享失败,请在系统设置中授权屏幕录制权限"}:"Permission denied"===r?{code:950501,msg:"取消分享屏幕"}:{code:950511,msg:"用户取消分享屏幕"}:"InvalidStateError"===t?{code:950502,msg:"操作异常-采集屏幕失败"}:"AbortError"===t?{code:950503,msg:"采集屏幕失败"}:"NotFoundError"===t?{code:950504,msg:"没有屏幕视频源可用于捕获"}:"NotReadableError"===t?{code:950505,msg:"屏幕分享失败,请在系统设置中重新授权屏幕录制权限,并重启浏览器"}:"OverconstrainedError"===t?{code:950506,msg:"采集屏幕流失败"}:"TypeError"===t?{code:950507,msg:"采集屏幕流不支持"}:{code:950503,msg:"采集屏幕失败"}}}],[{key:"getInstance",value:function(){return this.instance?this.instance:new e}}]),e}(),Ze=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},$e=Ke.getPlatform(),Je=function(){function e(){n(this,e)}return s(e,null,[{key:"isSupportDesktopBrowser",value:function(){var e=!1,t=$e.isChrome,r=$e.isEdge,n=$e.isFirefox;if(t){var i=Ke.getChromeVersion();e=(null==i?void 0:i.major)>=72}else if(r){var o=Ke.getEdgeVersion();e=(null==o?void 0:o.major)>=80}else if(n){var a=Ke.getFirefoxVersion();e=(null==a?void 0:a.major)>=80}return e}},{key:"isSupportMobileBrowser",value:function(){var e=!1,t=$e.isPhone,r=$e.isAndroid,n=$e.isIPad;if(r)e=(Ke.getAndroidVersion()||{major:0,minor:0}).major>=6;else if(t){var i=Ke.getIOSVersion()||{major:0,minor:0},o=i.major,a=i.minor;e=12===o?a>2:o>12}else n&&(e=!0);return e}},{key:"isSupportAspectRatio",value:function(){return!$e.isPhone}},{key:"isSupportUserMedia",value:function(){var e;return!!(null===(e=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)}},{key:"checkCanvasCapture",value:function(){var t=document.createElement("canvas");t.setAttribute("style","display: none"),t.id=e.CANVAS_TEST_ID,document.getElementsByTagName("body")[0].appendChild(t);var r=!!t.captureStream,n=null;return r&&(n=t.captureStream()),{canvasStream:n,isSupportCanvasCapture:r}}},{key:"checkVideoCapture",value:function(t){var r=document.createElement("video");r.setAttribute("style","display: none"),r.src=t,r.muted=!0,r.id=e.VIDEO_TEST_ID,r.crossOrigin="anonymous",document.getElementsByTagName("body")[0].appendChild(r);var n=!!r.captureStream||!1;return this.removeDetectElement(e.VIDEO_TEST_ID),{isSupportVideoCapture:n}}},{key:"removeDetectElement",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.CANVAS_TEST_ID,n=document.getElementById(r);n&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n))}},{key:"isSupportRTC",value:function(t){return Ze(this,void 0,void 0,Be().mark((function r(){var n,i,o,a,s;return Be().wrap((function(r){for(;;)switch(r.prev=r.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)){r.next=11;break}if(!(i[o]in window)){r.next=8;break}return n.isSupportRTC=!0,r.abrupt("break",11);case 8:o++,r.next=3;break;case 11:if(!n.isSupportRTC){r.next=17;break}return r.next=14,e.isSupportPeerCB(t);case 14:a=r.sent,s=a.isSupportPeer,n=Object.assign(Object.assign({},a),{isSupportRTC:s});case 17:return r.abrupt("return",n);case 18:case"end":return r.stop()}}),r)})))}},{key:"isSupportPeerCB",value:function(e){return Ze(this,void 0,void 0,Be().mark((function t(){return Be().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,a=new RTCPeerConnection({iceServers:[]}),s=!1,u=!1,c=!1;if(n=!(!a.createAnswer||!a.createOffer),i=!!a.addTrack,o=!!(null==a?void 0:a.addTransceiver),e&&(null===(r=null==e?void 0:e.getVideoTracks())||void 0===r?void 0:r.length)&&o){var l=e.getVideoTracks()[0],f=a.addTransceiver(l);f&&(s=!!f.sender.replaceTrack,c=!!f.sender.setStreams),l&&(u=!!l.applyConstraints),f=null}return a.close(),t({isSupportPeer:n,isSupportAddtrack:i,isSupportAddTransceiver:o,isSupportReplaceTrack:s,isApplyConstraints:u,isSupportSetStreams:c})}return t({isSupportPeer:!1,isSupportAddtrack:!1,isSupportAddTransceiver:!1,isSupportReplaceTrack:!1,isApplyConstraints:!1,isSupportSetStreams:!1})}),100)})));case 1:case"end":return t.stop()}}),t)})))}},{key:"isSupportWebsocket",value:function(){return!!window.WebSocket}},{key:"isSupportVideoCapture",value:function(e){var t=!!e.captureStream,r=null;return t&&(r=null==e?void 0:e.captureStream()),{videoCaptureStream:r,captureVideoVisible:t}}},{key:"isSupportIndexDB",value:function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.indexedDB)||void 0===e?void 0:e.open)}},{key:"isSupportDevicePermission",value:function(){return Ze(this,void 0,void 0,Be().mark((function e(){return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.permissions.query({name:"microphone"});case 3:return e.next=5,navigator.permissions.query({name:"camera"});case 5:return e.abrupt("return",!0);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))}},{key:"isSupportAudioContext",value:function(){return!(!(null===window||void 0===window?void 0:window.AudioContext)&&!(null===window||void 0===window?void 0:window.webkitAudioContext))}},{key:"isSupportMediaDevices",value:function(){return!!navigator.mediaDevices}},{key:"isSupportMediaRecorder",value:function(){return!!window.MediaRecorder}},{key:"isSupportWebWorker",value:function(){return!!window.Worker}},{key:"isSupportTransformStream",value:function(){return!!window.TransformStream}},{key:"isSupportH264",value:function(){var e,t,r;return Ze(this,void 0,void 0,Be().mark((function n(){var i,o,a,s,u,c;return Be().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=$e.isFirefox,o=!1,!i){n.next=13;break}return n.prev=3,a=new RTCPeerConnection,n.next=7,a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 7:s=n.sent,o=((null===(e=null==s?void 0:s.sdp)||void 0===e?void 0:e.toLowerCase().indexOf("h264"))||-1)>-1,n.next=13;break;case 11:n.prev=11,n.t0=n.catch(3);case 13:try{u=(null===(t=RTCRtpSender.getCapabilities("video"))||void 0===t?void 0:t.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],c=(null===(r=RTCRtpReceiver.getCapabilities("video"))||void 0===r?void 0:r.codecs.filter((function(e){return e.mimeType.toLowerCase().indexOf("h264")>0})))||[],(null==u?void 0:u.length)>0&&c.length>0&&(o=!0)}catch(e){}return n.abrupt("return",o);case 15:case"end":return n.stop()}}),n,null,[[3,11]])})))}},{key:"getNetWork",value:function(){var e=navigator.connection||{};return JSON.stringify(e)}},{key:"getCPUCount",value:function(){return window.navigator.hardwareConcurrency||0}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"getAudioCodec",value:function(e){return Ze(this,void 0,void 0,Be().mark((function r(){var n,i,o,a;return Be().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=[];try{i=(null==e?void 0:e.getCapabilities("audio"))||{},o=(null==i?void 0:i.codecs)||[],a=new Set,o.forEach((function(e){"audio/opus"===e.mimeType&&a.add("Opus")})),n=t(a)}catch(e){$e.isFirefox&&(n=["Opus"])}return r.abrupt("return",n);case 3:case"end":return r.stop()}}),r)})))}},{key:"getVideoCodec",value:function(e){return Ze(this,void 0,void 0,Be().mark((function r(){var n,i,o,a;return Be().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=[];try{i=(null==e?void 0:e.getCapabilities("video"))||{},o=(null==i?void 0:i.codecs)||[],a=new Set,o.forEach((function(e){"video/H264"!==e.mimeType&&"video/VP8"!==e.mimeType&&"video/VP9"!==e.mimeType||a.add(e.mimeType.split("video/")[1])})),n=t(a)}catch(e){$e.isFirefox&&(n=["VP8","H264"])}return r.abrupt("return",n);case 3:case"end":return r.stop()}}),r)})))}},{key:"getSupportedCodec",value:function(){return Ze(this,void 0,void 0,Be().mark((function t(){var r,n,i,o,a;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getAudioCodec(RTCRtpSender);case 3:return r=t.sent,t.next=6,e.getVideoCodec(RTCRtpSender);case 6:return n=t.sent,t.next=9,e.getAudioCodec(RTCRtpReceiver);case 9:return i=t.sent,t.next=12,e.getVideoCodec(RTCRtpReceiver);case 12:return o=t.sent,a={audioSenderCodecList:r,videoSenderCodecList:n,audioReceiverCodecList:i,videoReceiverCodecList:o},t.abrupt("return",a);case 17:return t.prev=17,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 20:case"end":return t.stop()}}),t,null,[[0,17]])})))}},{key:"getWidowResolution",value:function(){var e=window.screen.width,t=window.screen.height,r=window.devicePixelRatio,n=t*r;return{maxWidth:e*r,maxHeight:t*r,width:e,height:t,dpr:r,maxScreenResolution:"".concat(e*r,"*").concat(n)}}},{key:"isSupportShareContent",value:function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)}},{key:"isSupportSetCaptureHandleConfig",value:function(){return!!navigator.mediaDevices.setCaptureHandleConfig}},{key:"isSupportDevicePressure",value:function(){var e=!1;return"PressureObserver"in globalThis&&(e=!0),e}},{key:"checkSupportWebRTC",value:function(){return Ze(this,void 0,void 0,Be().mark((function t(){var r,n,i,o,a,s,u,c;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.isSupportRTC();case 2:return r=t.sent,t.next=5,e.isSupportUserMedia();case 5:return n=t.sent,i=e.isSupportWebsocket(),t.next=9,e.isSupportH264();case 9:return o=t.sent,a=r.isSupportRTC,s=r.isSupportAddTransceiver,u=r.isSupportAddtrack,c={result:a&&i&&o,detail:{isSupportRTC:a,isSupportWebsocket:i,isSupportH264:o,isSupportAddTransceiver:s,isSupportAddtrack:u,isSupportUserMedia:n}},t.abrupt("return",c);case 14:case"end":return t.stop()}}),t)})))}}]),e}();Je.CANVAS_TEST_ID="XY_DETECT_CANVAS_ID",Je.VIDEO_TEST_ID="XY_DETECT_VIDEO_ID",Je.browser=Ke,Je.stream=qe.getInstance();var Xe=Je.browser.getPlatform(),Qe=(k.RS90,k.RS180,k.RS360,k.RS720,k.RS1080,R.COMMON),et=R.ADVANCED,tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qe,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Xe.isFirefox)return{};var n={frameRate:e};if(t===et&&Ue.isNumber(e)){n=r?{frameRate:{ideal:e,max:e}}:{frameRate:{exact:e,max:e}}}return n},rt=(Object.assign({width:640,height:360,resizeMode:"crop-and-scale",aspectRatio:1.7777777778},tt(15)),O.FAILED,O.DISABLED,O.NORMAL),nt=(O.UNKNOWN,S.REMOTE,S.CONTENT,{deviceType:"webrtc",endpointId:"",displayName:"",mediagroupid:0,participantId:0,audioTxMute:!1,videoTxMute:!1,audioRxMute:!1,videoRxMute:!1,videoMuteReason:0,isForceFullScreen:!1,isFocusScreen:!1,isLastAdd:!1,onHold:!1,isPolling:!1,isContent:!1,isActiveSpeaker:!1,key:"",extUserId:""}),it=(ze()(nt),Oe.NORMAL,J.NONE,B.CONTENT,Object.values(H),Object.values(Y),H.SPEAKER,Y.MULTI_PIC_CONTENT_HIGH_PRIORITY,["clientId","clientSecret","password","token","pwd","securityKey","access_token","refresh_token","x-xy-clientid","x-xy-sign","Authorization"]);Je.browser.getPlatform().isPc,m.FRONT,m.BACK,k.RS180,k.RS360,k.RS720,k.RS1080,T.FR30,fe.INCLUDE,fe.EXCLUDE,le.MONITOR;const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,at=Object.keys,st=Array.isArray;function ut(e,t){return"object"!=typeof t||at(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||ot.Promise||(ot.Promise=Promise);const ct=Object.getPrototypeOf,lt={}.hasOwnProperty;function ft(e,t){return lt.call(e,t)}function ht(e,t){"function"==typeof t&&(t=t(ct(e))),("undefined"==typeof Reflect?at:Reflect.ownKeys)(t).forEach((r=>{pt(e,r,t[r])}))}const dt=Object.defineProperty;function pt(e,t,r,n){dt(e,t,ut(r&&ft(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function vt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),pt(e.prototype,"constructor",e),{extend:ht.bind(null,e.prototype)}}}}const yt=Object.getOwnPropertyDescriptor;function mt(e,t){let r;return yt(e,t)||(r=ct(e))&&mt(r,t)}const gt=[].slice;function bt(e,t,r){return gt.call(e,t,r)}function _t(e,t){return t(e)}function wt(e){if(!e)throw new Error("Assertion Failed")}function Et(e){ot.setImmediate?setImmediate(e):setTimeout(e,0)}function Ot(e,t){return e.reduce(((e,r,n)=>{var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function xt(e,t){if(ft(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=xt(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:xt(s,t.substr(a+1))}}function St(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){wt("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)St(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?st(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var u=e[a];u&&ft(e,a)||(u=e[a]={}),St(u,s,r)}}else void 0===r?st(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function kt(e){var t={};for(var r in e)ft(e,r)&&(t[r]=e[r]);return t}const Tt=[].concat;function At(e){return Tt.apply([],e)}const It="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(At([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>ot[e])),Nt=It.map((e=>ot[e]));Ot(It,(e=>[e,!0]));let Ct=null;function Rt(e){Ct="undefined"!=typeof WeakMap&&new WeakMap;const t=Pt(e);return Ct=null,t}function Pt(e){if(!e||"object"!=typeof e)return e;let t=Ct&&Ct.get(e);if(t)return t;if(st(e)){t=[],Ct&&Ct.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(Pt(e[r]))}else if(Nt.indexOf(e.constructor)>=0)t=e;else{const r=ct(e);for(var i in t=r===Object.prototype?{}:Object.create(r),Ct&&Ct.set(e,t),e)ft(e,i)&&(t[i]=Pt(e[i]))}return t}const{toString:Dt}={};function Lt(e){return Dt.call(e).slice(8,-1)}const jt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Bt="symbol"==typeof jt?function(e){var t;return null!=e&&(t=e[jt])&&t.apply(e)}:function(){return null},Ut={};function Ft(e){var t,r,n,i;if(1===arguments.length){if(st(e))return e.slice();if(this===Ut&&"string"==typeof e)return[e];if(i=Bt(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 Mt="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var zt="undefined"!=typeof location&&/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);function Kt(e,t){zt=e,Wt=t}var Wt=()=>!0;const Vt=!new Error("").stack;function Gt(){if(Vt)try{throw Gt.arguments,new Error}catch(e){return e}return new Error}function Ht(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(Wt).map((e=>"\\n"+e)).join("")):""}var Yt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],qt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Yt),Zt={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 $t(e,t){this._e=Gt(),this.name=e,this.message=t}function Jt(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,r)=>r.indexOf(e)===t)).join("\\n")}function Xt(e,t,r,n){this._e=Gt(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=Jt(e,t)}function Qt(e,t){this._e=Gt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Jt(e,t)}vt($t).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ht(this._e,2))}},toString:function(){return this.name+": "+this.message}}),vt(Xt).from($t),vt(Qt).from($t);var er=qt.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const tr=$t;var rr=qt.reduce(((e,t)=>{var r=t+"Error";function n(e,n){this._e=Gt(),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=Zt[t]||r,this.inner=null)}return vt(n).from(tr),e[t]=n,e}),{});rr.Syntax=SyntaxError,rr.Type=TypeError,rr.Range=RangeError;var nr=Yt.reduce(((e,t)=>(e[t+"Error"]=rr[t],e)),{}),ir=qt.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=rr[t]),e)),{});function or(){}function ar(e){return e}function sr(e,t){return null==e||e===ar?t:function(r){return t(e(r))}}function ur(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function cr(e,t){return e===or?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?ur(n,this.onsuccess):n),i&&(this.onerror=this.onerror?ur(i,this.onerror):i),void 0!==o?o:r}}function lr(e,t){return e===or?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?ur(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ur(n,this.onerror):n)}}function fr(e,t){return e===or?t:function(r){var n=e.apply(this,arguments);ut(r,n);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?ur(i,this.onsuccess):i),o&&(this.onerror=this.onerror?ur(o,this.onerror):o),void 0===n?void 0===a?void 0:a:ut(n,a)}}function hr(e,t){return e===or?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function dr(e,t){return e===or?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)}}ir.ModifyError=Xt,ir.DexieError=$t,ir.BulkError=Qt;var pr={};const vr=100,[yr,mr,gr]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ct(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ct(t),e]})(),br=mr&&mr.then,_r=yr&&yr.constructor,wr=!!gr;var Er=!1,Or=gr?()=>{gr.then(Hr)}:ot.setImmediate?setImmediate.bind(null,Hr):ot.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Hr(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Hr,0)},xr=function(e,t){Pr.push([e,t]),kr&&(Or(),kr=!1)},Sr=!0,kr=!0,Tr=[],Ar=[],Ir=null,Nr=ar,Cr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:gn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{gn(e[0],e[1])}catch(e){}}))}},Rr=Cr,Pr=[],Dr=0,Lr=[];function jr(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=or,this._lib=!1;var t=this._PSD=Rr;if(zt&&(this._stackHolder=Gt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==pr)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Mr(this,this._value))}this._state=null,this._value=null,++t.ref,Fr(this,e)}const Br={get:function(){var e=Rr,t=rn;function r(r,n){var i=!e.global&&(e!==Rr||t!==rn);const o=i&&!sn();var a=new jr(((t,a)=>{Kr(this,new Ur(vn(r,e,i,o),vn(n,e,i,o),t,a,e))}));return zt&&Gr(a,this),a}return r.prototype=pr,r},set:function(e){pt(this,"then",e&&e.prototype===pr?Br:{get:function(){return e},set:Br.set})}};function Ur(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 Fr(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&&Yr();t&&"function"==typeof t.then?Fr(e,((e,r)=>{t instanceof jr?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,zr(e)),r&&qr()}}),Mr.bind(null,e))}catch(t){Mr(e,t)}}function Mr(e,t){if(Ar.push(t),null===e._state){var r=e._lib&&Yr();t=Nr(t),e._state=!1,e._value=t,zt&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,void 0)}catch(e){}}((()=>{var r=mt(t,"stack");t._promise=e,pt(t,"stack",{get:()=>Er?r&&(r.get?r.get.apply(t):r.value):e.stack})})),function(e){Tr.some((t=>t._value===e._value))||Tr.push(e)}(e),zr(e),r&&qr()}}function zr(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)Kr(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===Dr&&(++Dr,xr((()=>{0==--Dr&&Zr()}),[]))}function Kr(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,++Dr,xr(Wr,[r,e,t])}else e._listeners.push(t)}function Wr(e,t,r){try{Ir=t;var n,i=t._value;t._state?n=e(i):(Ar.length&&(Ar=[]),n=e(i),-1===Ar.indexOf(i)&&function(e){for(var t=Tr.length;t;)if(Tr[--t]._value===e._value)return void Tr.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{Ir=null,0==--Dr&&Zr(),--r.psd.ref||r.psd.finalize()}}function Vr(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var i,o,a=e._value;null!=a?(i=a.name||"Error",o=a.message||a,n=Ht(a,0)):(i=a,o=""),t.push(i+(o?": "+o:"")+n)}return zt&&((n=Ht(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&Vr(e._prev,t,r)),t}function Gr(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Hr(){Yr()&&qr()}function Yr(){var e=Sr;return Sr=!1,kr=!1,e}function qr(){var e,t,r;do{for(;Pr.length>0;)for(e=Pr,Pr=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(Pr.length>0);Sr=!0,kr=!0}function Zr(){var e=Tr;Tr=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Lr.slice(0),r=t.length;r;)t[--r]()}function $r(e){return new jr(pr,!1,e)}function Jr(e,t){var r=Rr;return function(){var n=Yr(),i=Rr;try{return fn(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{fn(i,!1),n&&qr()}}}ht(jr.prototype,{then:Br,_then:function(e,t){Kr(this,new Ur(null,null,e,t,Rr))},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):$r(e))):this.then(null,(e=>e&&e.name===t?r(e):$r(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),$r(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Er=!0;var e=Vr(this,[],20).join("\\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Er=!1}}},timeout:function(e,t){return e<1/0?new jr(((r,n)=>{var i=setTimeout((()=>n(new rr.Timeout(t))),e);this.then(r,n).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&pt(jr.prototype,Symbol.toStringTag,"Dexie.Promise"),Cr.env=hn(),ht(jr,{all:function(){var e=Ft.apply(null,arguments).map(un);return new jr((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach(((i,o)=>jr.resolve(i).then((r=>{e[o]=r,--n||t(e)}),r)))}))},resolve:e=>{if(e instanceof jr)return e;if(e&&"function"==typeof e.then)return new jr(((t,r)=>{e.then(t,r)}));var t=new jr(pr,!0,e);return Gr(t,Ir),t},reject:$r,race:function(){var e=Ft.apply(null,arguments).map(un);return new jr(((t,r)=>{e.map((e=>jr.resolve(e).then(t,r)))}))},PSD:{get:()=>Rr,set:e=>Rr=e},totalEchoes:{get:()=>rn},newPSD:on,usePSD:dn,scheduler:{get:()=>xr,set:e=>{xr=e}},rejectionMapper:{get:()=>Nr,set:e=>{Nr=e}},follow:(e,t)=>new jr(((r,n)=>on(((t,r)=>{var n=Rr;n.unhandleds=[],n.onunhandled=r,n.finalize=ur((function(){!function(e){Lr.push((function t(){e(),Lr.splice(Lr.indexOf(t),1)})),++Dr,xr((()=>{0==--Dr&&Zr()}),[])}((()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])}))}),n.finalize),e()}),t,r,n)))}),_r&&(_r.allSettled&&pt(jr,"allSettled",(function(){const e=Ft.apply(null,arguments).map(un);return new jr((t=>{0===e.length&&t([]);let r=e.length;const n=new Array(r);e.forEach(((e,i)=>jr.resolve(e).then((e=>n[i]={status:"fulfilled",value:e}),(e=>n[i]={status:"rejected",reason:e})).then((()=>--r||t(n)))))}))})),_r.any&&"undefined"!=typeof AggregateError&&pt(jr,"any",(function(){const e=Ft.apply(null,arguments).map(un);return new jr(((t,r)=>{0===e.length&&r(new AggregateError([]));let n=e.length;const i=new Array(n);e.forEach(((e,o)=>jr.resolve(e).then((e=>t(e)),(e=>{i[o]=e,--n||r(new AggregateError(i))}))))}))})));const Xr={awaits:0,echoes:0,id:0};var Qr=0,en=[],tn=0,rn=0,nn=0;function on(e,t,r,n){var i=Rr,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++nn;var a=Cr.env;o.env=wr?{Promise:jr,PromiseProp:{value:jr,configurable:!0,writable:!0},all:jr.all,race:jr.race,allSettled:jr.allSettled,any:jr.any,resolve:jr.resolve,reject:jr.reject,nthen:yn(a.nthen,o),gthen:yn(a.gthen,o)}:{},t&&ut(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=dn(o,e,r,n);return 0===o.ref&&o.finalize(),s}function an(){return Xr.id||(Xr.id=++Qr),++Xr.awaits,Xr.echoes+=vr,Xr.id}function sn(){return!!Xr.awaits&&(0==--Xr.awaits&&(Xr.id=0),Xr.echoes=Xr.awaits*vr,!0)}function un(e){return Xr.echoes&&e&&e.constructor===_r?(an(),e.then((e=>(sn(),e)),(e=>(sn(),bn(e))))):e}function cn(e){++rn,Xr.echoes&&0!=--Xr.echoes||(Xr.echoes=Xr.id=0),en.push(Rr),fn(e,!0)}function ln(){var e=en[en.length-1];en.pop(),fn(e,!1)}function fn(e,t){var r=Rr;if((t?!Xr.echoes||tn++&&e===Rr:!tn||--tn&&e===Rr)||pn(t?cn.bind(null,e):ln),e!==Rr&&(Rr=e,r===Cr&&(Cr.env=hn()),wr)){var n=Cr.env.Promise,i=e.env;mr.then=i.nthen,n.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(ot,"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 hn(){var e=ot.Promise;return wr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(ot,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:mr.then,gthen:e.prototype.then}:{}}function dn(e,t,r,n,i){var o=Rr;try{return fn(e,!0),t(r,n,i)}finally{fn(o,!1)}}function pn(e){br.call(yr,e)}function vn(e,t,r,n){return"function"!=typeof e?e:function(){var i=Rr;r&&an(),fn(t,!0);try{return e.apply(this,arguments)}finally{fn(i,!1),n&&pn(sn)}}}function yn(e,t){return function(r,n){return e.call(this,vn(r,t),vn(n,t))}}-1===(""+br).indexOf("[native code]")&&(an=sn=or);const mn="unhandledrejection";function gn(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,i={promise:t,reason:e};if(ot.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(mn,!0,!0),ut(n,i)):ot.CustomEvent&&ut(n=new CustomEvent(mn,{detail:i}),i),n&&ot.dispatchEvent&&(dispatchEvent(n),!ot.PromiseRejectionEvent&&ot.onunhandledrejection))try{ot.onunhandledrejection(n)}catch(e){}zt&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var bn=jr.reject;function _n(e,t,r,n){if(e.idbdb&&(e._state.openComplete||Rr.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>_n(e,t,r,n)))):bn(i)}return i._promise(t,((e,t)=>on((()=>(Rr.trans=i,n(e,t,i)))))).then((e=>i._completion.then((()=>e))))}if(e._state.openComplete)return bn(new rr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return bn(new rr.DatabaseClosed);e.open().catch(or)}return e._state.dbReadyPromise.then((()=>_n(e,t,r,n)))}const wn="3.2.4",En=String.fromCharCode(65535),On=-1/0,xn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Sn="String expected.",kn=[],Tn="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),An=Tn,In=Tn,Nn=e=>!/(dexie\\.js|dexie\\.min\\.js)/.test(e),Cn="__dbnames",Rn="readonly",Pn="readwrite";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 jn(e){return"string"!=typeof e||/\\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Rt(t))[e],t)}class Bn{_trans(e,t,r){const n=this._tx||Rr.trans,i=this.name;function o(e,r,n){if(!n.schema[i])throw new rr.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}const a=Yr();try{return n&&n.db===this.db?n===Rr.trans?n._promise(e,o,r):on((()=>n._promise(e,o,r)),{trans:n,transless:Rr.transless||Rr}):_n(this.db,e,[this.name],o)}finally{a&&qr()}}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(st(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=at(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!==En)return this.where(r.name).equals(r.keyPath.map((t=>e[t])));!r&&zt&&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[a,s]=t.reduce((([t,r],i)=>{const a=n[i],s=e[i];return[t||a,t||!a?Dn(r,a&&a.multi?e=>{const t=xt(e,i);return st(t)&&t.some((e=>o(s,e)))}:e=>o(s,xt(e,i))):r]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?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,st(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(ft(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){ut(this,e)}))}add(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let i=e;return n&&r&&(i=jn(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[i]}))).then((e=>e.numFailures?jr.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{St(e,n,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||st(e))return this.where(":id").equals(e).modify(t);{const r=xt(e,this.schema.primKey.keyPath);if(void 0===r)return bn(new rr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?at(t).forEach((r=>{St(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=jn(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[i],keys:null!=t?[t]:null}))).then((e=>e.numFailures?jr.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{St(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?jr.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?jr.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 rr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new rr.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=o&&r?e.map(jn(o)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:i}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new Qt(`${this.name}.bulkAdd(): ${e} of ${a} 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 rr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new rr.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=o&&r?e.map(jn(o)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:i}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return i?t:r;throw new Qt(`${this.name}.bulkPut(): ${e} of ${a} 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 Qt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)}))}}function Un(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){var a;n||(n=hr),i||(i=or);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}at(a=e).forEach((function(e){var t=a[e];if(st(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new rr.InvalidArgument("Invalid event config");var r=o(e,ar,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Et((function(){e.apply(null,t)}))}))}))}}))}}function Fn(e,t){return vt(t).from({prototype:e}),t}function Mn(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function zn(e,t){e.filter=Dn(e.filter,t)}function Kn(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>Dn(n(),t()):t,e.justLimit=r&&!n}function Wn(e,t){if(e.isPrimKey)return t.primaryKey;const r=t.getIndexByKeyPath(e.index);if(!r)throw new rr.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Vn(e,t,r){const n=Wn(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 Gn(e,t,r,n){const i=e.replayFilter?Dn(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},a=(e,r,n)=>{if(!i||i(r,n,(e=>r.stop(e)),(e=>r.fail(e)))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),ft(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),Hn(Vn(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Hn(Vn(e,n,r),Dn(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function Hn(e,t,r,n){var i=Jr(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=or}),(t=>{e.fail(t),r=or}))||i(e.value,e,(e=>r=e)),r()}))}))}function Yn(e,t){try{const r=qn(e),n=qn(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}(Zn(e),Zn(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=Yn(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function qn(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const r=Lt(e);return"ArrayBuffer"===r?"binary":r}function Zn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class $n{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,bn.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,bn.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 Gn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&ut(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((r=>Gn(t,e,r,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,r=t.table.core;if(Mn(t,!0))return r.count({trans:e,query:{index:Wn(t,r.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var n=0;return Gn(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 a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?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&&Mn(t,!0)&&t.limit>0){const{valueMapper:r}=t,n=Wn(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 Gn(t,(e=>r.push(e)),e,t.table.core).then((()=>r))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Mn(t)?Kn(t,(()=>{var t=e;return(e,r)=>0===t||(1===t?(--t,!1):(r((()=>{e.advance(t),t=0})),!1))})):Kn(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Kn(this._ctx,(()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this}until(e,t){return zn(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 zn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,r=e,t.isMatch=Dn(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&&Mn(t,!0)&&t.limit>0)return this._read((e=>{var r=Wn(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 zn(this._ctx,(function(e){var t=e.primaryKey.toString(),n=ft(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=at(e),o=i.length;n=function(t){for(var r=!1,n=0;n<o;++n){var a=i[n],s=e[a];xt(t,a)!==s&&(St(t,a,s),r=!0)}return r}}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:r,numFailures:n}=t;f+=e-n;for(let e of at(r))l.push(r[e])};return this.clone().primaryKeys().then((i=>{const o=l=>{const f=Math.min(c,i.length-l);return a.getMany({trans:r,keys:i.slice(l,l+f),cache:"immutable"}).then((h=>{const p=[],v=[],y=s?[]:null,m=[];for(let e=0;e<f;++e){const t=h[e],r={value:Rt(t),primKey:i[l+e]};!1!==n.call(r,r.value,r)&&(null==r.value?m.push(i[l+e]):s||0===Yn(u(t),u(r.value))?(v.push(r.value),s&&y.push(i[l+e])):(m.push(i[l+e]),p.push(r.value)))}const g=Mn(t)&&t.limit===1/0&&("function"!=typeof e||e===Jn)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(v.length>0||g&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:v,criteria:g,changeSpec:"function"!=typeof e&&e}).then((e=>d(v.length,e))))).then((()=>(m.length>0||g&&e===Jn)&&a.mutate({trans:r,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 Xt("Error modifying one or more objects",l,f,h);return i.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Mn(e)&&(e.isPrimKey&&!In||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 Xt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-i);return t-i}))))})):this.modify(Jn)}}const Jn=(e,t)=>t.value=null;function Xn(e,t){return e<t?-1:e===t?0:1}function Qn(e,t){return e>t?-1:e===t?0:1}function ei(e,t,r){var n=e instanceof ai?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function ti(e){return new e.Collection(e,(()=>oi(""))).limit(0)}function ri(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==n[u])return i(e[u],r[u])<0?e.substr(0,u)+r[u]+r.substr(u+1):i(e[u],n[u])<0?e.substr(0,u)+n[u]+r.substr(u+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[u],c)<0&&(s=u)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function ni(e,t,r,n){var i,o,a,s,u,c,l,f=r.length;if(!r.every((e=>"string"==typeof e)))return ei(e,Sn);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?Xn:Qn;var t=r.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?"":n}h("next");var d=new e.Collection(e,(()=>ii(s[0],u[f-1]+n)));d._ondirectionchange=function(e){h(e)};var p=0;return d._addAlgorithm((function(e,r,n){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,v=p;v<f;++v){var y=ri(i,h,s[v],u[v],a,c);null===y&&null===d?p=v+1:(null===d||a(d,y)>0)&&(d=y)}return r(null!==d?function(){e.continue(d+l)}:n),!1})),d}function ii(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function oi(e){return{type:1,lower:e,upper:e}}class ai{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)?ti(this):new this.Collection(this,(()=>ii(e,t,!r,!n)))}catch(e){return ei(this,xn)}}equals(e){return null==e?ei(this,xn):new this.Collection(this,(()=>oi(e)))}above(e){return null==e?ei(this,xn):new this.Collection(this,(()=>ii(e,void 0,!0)))}aboveOrEqual(e){return null==e?ei(this,xn):new this.Collection(this,(()=>ii(e,void 0,!1)))}below(e){return null==e?ei(this,xn):new this.Collection(this,(()=>ii(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?ei(this,xn):new this.Collection(this,(()=>ii(void 0,e)))}startsWith(e){return"string"!=typeof e?ei(this,Sn):this.between(e,e+En,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):ni(this,((e,t)=>0===e.indexOf(t[0])),[e],En)}equalsIgnoreCase(e){return ni(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Ft.apply(Ut,arguments);return 0===e.length?ti(this):ni(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Ft.apply(Ut,arguments);return 0===e.length?ti(this):ni(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,En)}anyOf(){const e=Ft.apply(Ut,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return ei(this,xn)}if(0===e.length)return ti(this);const r=new this.Collection(this,(()=>ii(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 a=r.key;for(;t(a,e[n])>0;)if(++n,n===e.length)return i(o),!1;return 0===t(a,e[n])||(i((()=>{r.continue(e[n])})),!1)})),r}notEqual(e){return this.inAnyRange([[On,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Ft.apply(Ut,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return ei(this,xn)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[On,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,a=this._max;if(0===e.length)return ti(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&n(e[0],e[1])<=0)))return ei(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",rr.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=n;function f(e,t){return l(e[0],t[0])}try{c=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]=a(i[1],t[1]);break}}return n===i&&e.push(t),e}),[]),c.sort(f)}catch(e){return ei(this,xn)}let h=0;const d=u?e=>n(e,c[h][1])>0:e=>n(e,c[h][1])>=0,p=s?e=>i(e,c[h][0])>0:e=>i(e,c[h][0])>=0;let v=d;const y=new this.Collection(this,(()=>ii(c[0][0],c[c.length-1][1],!s,!u)));return y._ondirectionchange=e=>{"next"===e?(v=d,l=n):(v=p,l=i),c.sort(f)},y._addAlgorithm(((e,t,r)=>{for(var i=e.key;v(i);)if(++h,h===c.length)return t(r),!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===n?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),y}startsWithAnyOf(){const e=Ft.apply(Ut,arguments);return e.every((e=>"string"==typeof e))?0===e.length?ti(this):this.inAnyRange(e.map((e=>[e,e+En]))):ei(this,"startsWithAnyOf() only works with strings")}}function si(e){return Jr((function(t){return ui(t),e(t.target.error),!1}))}function ui(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const ci="storagemutated",li="x-storagemutated-1",fi=Un(null,ci);class hi{_lock(){return wt(!Rr.global),++this._reculock,1!==this._reculock||Rr.global||(Rr.lockOwnerFor=this),this}_unlock(){if(wt(!Rr.global),0==--this._reculock)for(Rr.global||(Rr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{dn(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Rr.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,r=this.db._state.dbOpenError;if(wt(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new rr.DatabaseClosed(r);case"MissingAPIError":throw new rr.MissingAPI(r.message,r);default:throw new rr.OpenFailed(r)}if(!this.active)throw new rr.TransactionInactive;return wt(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=Jr((t=>{ui(t),this._reject(e.error)})),e.onabort=Jr((t=>{ui(t),this.active&&this._reject(new rr.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Jr((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&fi.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return bn(new rr.ReadOnly("Transaction is readonly"));if(!this.active)return bn(new rr.TransactionInactive);if(this._locked())return new jr(((n,i)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,i)},Rr])}));if(r)return on((()=>{var e=new jr(((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 jr(((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=jr.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 jr(((e,n)=>{r.then((r=>t._waitingQueue.push(Jr(e.bind(null,r)))),(e=>t._waitingQueue.push(Jr(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 rr.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(ft(t,e))return t[e];const r=this.schema[e];if(!r)throw new rr.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 di(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+pi(t)}}function pi(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function vi(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:Ot(r,(e=>[e.name,e]))}}let yi=e=>{try{return e.only([[]]),yi=()=>[[]],[[]]}catch(e){return yi=()=>En,En}};function mi(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>xt(t,e)}(e):t=>xt(t,e)}function gi(e){return[].slice.call(e)}let bi=0;function _i(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function wi(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=gi(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:r}=e,n=st(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:mi(t)},indexes:gi(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:r,multiEntry:n,keyPath:i}=e,a={name:t,compound:st(i),keyPath:i,unique:r,multiEntry:n,extractKey:mi(i)};return o[_i(i)]=a,a})),getIndexByKeyPath:e=>o[_i(e)]};return o[":id"]=a.primaryKey,null!=t&&(o[_i(t)]=a.primaryKey),a}))},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),a=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:a}){return new Promise(((s,u)=>{s=Jr(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw new Error("Invalid operation type: "+r);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=[],v=[];let y=0;const m=e=>{++y,ui(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:v,results:[],lastResult:void 0});3===a.type?p.push(d=c.clear()):p.push(d=c.delete(n(a)))}else{const[e,t]=f?l?[o,i]:[o,null]:[i,null];if(f)for(let n=0;n<h;++n)p.push(d=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),d.onerror=m;else for(let t=0;t<h;++t)p.push(d=c[r](e[t])),d.onerror=m}const g=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),s({numFailures:y,failures:v,results:"delete"===r?i:p.map((e=>e.result)),lastResult:t})};d.onerror=e=>{m(e),g(e)},d.onsuccess=g}))},getMany:({trans:e,keys:r})=>new Promise(((n,i)=>{n=Jr(n);const o=e.objectStore(t),a=r.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&&n(s)},h=si(i);for(let e=0;e<a;++e)null!=r[e]&&(u=o.get(r[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&n(s)})),get:({trans:e,key:r})=>new Promise(((n,i)=>{n=Jr(n);const o=e.objectStore(t).get(r);o.onsuccess=e=>n(e.target.result),o.onerror=si(i)})),query:function(e){return r=>new Promise(((i,o)=>{i=Jr(i);const{trans:a,values:s,limit:u,query:c}=r,l=u===1/0?void 0:u,{index:f,range:h}=c,d=a.objectStore(t),p=f.isPrimaryKey?d:d.index(f.name),v=n(h);if(0===u)return i({result:[]});if(e){const e=s?p.getAll(v,l):p.getAllKeys(v,l);e.onsuccess=e=>i({result:e.target.result}),e.onerror=si(o)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(v):p.openKeyCursor(v),r=[];t.onsuccess=n=>{const o=t.result;return o?(r.push(s?o.value:o.primaryKey),++e===u?i({result:r}):void o.continue()):i({result:r})},t.onerror=si(o)}}))}(o),openCursor:function({trans:e,values:r,query:i,reverse:o,unique:a}){return new Promise(((s,u)=>{s=Jr(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=r||!("openKeyCursor"in h)?h.openCursor(n(l),d):h.openKeyCursor(n(l),d);p.onerror=si(u),p.onsuccess=Jr((t=>{const r=p.result;if(!r)return void s(null);r.___id=++bi,r.done=!1;const n=r.continue.bind(r);let i=r.continuePrimaryKey;i&&(i=i.bind(r));const o=r.advance.bind(r),a=()=>{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=Jr(u),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=Jr(e),p.onerror=si(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}})),s=()=>{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=Jr((e=>{p.onsuccess=s,s()})),r.continue=n,r.continuePrimaryKey=i,r.advance=o,s(),t},s(r)}),u)}))},count({query:e,trans:r}){const{index:i,range:o}=e;return new Promise(((e,a)=>{const s=r.objectStore(t),u=i.isPrimaryKey?s:s.index(i.name),c=n(o),l=c?u.count(c):u.count();l.onsuccess=Jr((t=>e(t.target.result))),l.onerror=si(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:yi(t),schema:i}}function Ei({_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)}(wi(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 Oi({_novip:e},t,r,n){r.forEach((r=>{const i=n[r];t.forEach((t=>{const n=mt(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?pt(t,r,{get(){return this.table(r)},set(e){dt(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function xi({_novip:e},t){t.forEach((t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]}))}function Si(e,t){return e._cfg.version-t._cfg.version}function ki(e,t,r,n){const i=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);const a=o._reject.bind(o),s=Rr.transless||Rr;on((()=>{Rr.trans=o,Rr.transless=s,0===t?(at(i).forEach((e=>{Ai(r,e,i[e].primKey,i[e].indexes)})),Ei(e,r),jr.follow((()=>e.on.populate.fire(o))).catch(a)):function({_novip:e},t,r,n){const i=[],o=e._versions;let a=e._dbSchema=Ni(e,e.idbdb,n),s=!1;const u=o.filter((e=>e._cfg.version>=t));return u.forEach((o=>{i.push((()=>{const i=a,u=o._cfg.dbschema;Ci(e,i,n),Ci(e,u,n),a=e._dbSchema=u;const c=Ti(i,u);c.add.forEach((e=>{Ai(n,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new rr.Upgrade("Not yet support for changing primary key");{const t=n.objectStore(e.name);e.add.forEach((e=>Ii(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Ii(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=o._cfg.contentUpgrade;if(l&&o._cfg.version>t){Ei(e,n),r._memoizedTables={},s=!0;let t=kt(u);c.del.forEach((e=>{t[e]=i[e]})),xi(e,[e.Transaction.prototype]),Oi(e,[e.Transaction.prototype],at(t),t),r.schema=t;const o=Mt(l);let a;o&&an();const f=jr.follow((()=>{if(a=l(r),a&&o){var e=sn.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?jr.resolve(a):f.then((()=>a))}})),i.push((t=>{s&&An||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((r=>null==e[r]&&t.db.deleteObjectStore(r)))}(o._cfg.dbschema,t),xi(e,[e.Transaction.prototype]),Oi(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema}))})),function e(){return i.length?jr.resolve(i.shift()(r.idbtrans)).then(e):jr.resolve()}().then((()=>{var e,t;t=n,at(e=a).forEach((r=>{t.db.objectStoreNames.contains(r)||Ai(t,r,e[r].primKey,e[r].indexes)}))}))}(e,t,o,r).catch(a)}))}function Ti(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&&!Tn)e.recreate=!0,r.change.push(e);else{const t=i.idxByName,n=o.idxByName;let a;for(a in t)n[a]||e.del.push(a);for(a in n){const r=t[a],i=n[a];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 Ai(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=>Ii(i,e))),i}function Ii(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Ni(e,t,r){const n={};return bt(t.objectStoreNames,0).forEach((e=>{const t=r.objectStore(e);let i=t.keyPath;const o=di(pi(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const r=t.index(t.indexNames[e]);i=r.keyPath;var s=di(r.name,i,!!r.unique,!!r.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(s)}n[e]=vi(e,o,a)})),n}function Ci({_novip:e},t,r){const n=r.db.objectStoreNames;for(let i=0;i<n.length;++i){const o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const r=a.indexNames[e],n=a.index(r).keyPath,i="string"==typeof n?n:"["+bt(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)&&ot.WorkerGlobalScope&&ot instanceof ot.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604&&(e._hasGetAll=!1)}class Ri{_parseStoresSpec(e,t){at(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 di(r,n||null,/\\&/.test(e),/\\*/.test(e),/\\+\\+/.test(e),st(n),0===t)})),i=n.shift();if(i.multi)throw new rr.Schema("Primary key cannot be multi-valued");n.forEach((e=>{if(e.auto)throw new rr.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new rr.Schema("Index must have a name and cannot be an empty string")})),t[r]=vi(r,i,n)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?ut(this._cfg.storesSource,e):e;const r=t._versions,n={};let i={};return r.forEach((e=>{ut(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,xi(t,[t._allTables,t,t.Transaction.prototype]),Oi(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],at(i),i),t._storeNames=at(i),this}upgrade(e){return this._cfg.contentUpgrade=dr(this._cfg.contentUpgrade||or,e),this}}function Pi(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new eo(Cn,{addons:[],indexedDB:e,IDBKeyRange:t}),r.version(1).stores({dbnames:"name"})),r.table("dbnames")}function Di(e){return e&&"function"==typeof e.databases}function Li(e){return on((function(){return Rr.letThrough=!0,e()}))}function ji(){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 Bi(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):st(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function Ui(e,t,r){var n=arguments.length;if(n<2)throw new rr.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,At(i),r]}function Fi(e,t,r,n,i){return jr.resolve().then((()=>{const o=Rr.transless||Rr,a=e._createTransaction(t,r,e._dbSchema,n),s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(n){return n.name===er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Fi(e,t,r,null,i)))):bn(n)}const u=Mt(i);let c;u&&an();const l=jr.follow((()=>{if(c=i.call(a,a),c)if(u){var e=sn.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Bi(c))}),s);return(c&&"function"==typeof c.then?jr.resolve(c).then((e=>a.active?e:bn(new rr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(n&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),bn(e))))}))}function Mi(e,t,r){const n=st(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}const zi={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const r=e.table(t),{schema:n}=r,i={},o=[];function a(e,t,r){const n=_i(e),s=i[n]=i[n]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...r,isVirtual:c,keyTail:t,keyLength:u,extractKey:mi(e),unique:!c&&r.unique};return s.push(l),l.isPrimaryKey||o.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(const e of n.indexes)a(e.keyPath,0,e);function u(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:Mi(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:Mi(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}:t;var n,i}const c={...r,schema:{...n,primaryKey:s,indexes:o,getIndexByKeyPath:function(e){const t=i[_i(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){const{keyTail:n,isVirtual:i,keyLength:o}=t.query.index;return i?r.openCursor(u(t)).then((r=>r&&function(r){const i=Object.create(r,{continue:{value:function(i){null!=i?r.continue(Mi(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(Mi(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 c}}}};function Ki(e,t,r,n){return r=r||{},n=n||"",at(e).forEach((i=>{if(ft(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){const e=Lt(o);e!==Lt(a)?r[n+i]=t[i]:"Object"===e?Ki(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),at(t).forEach((i=>{ft(e,i)||(r[n+i]=t[i])})),r}const Wi={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=Rr.trans,{deleting:o,creating:a,updating:s}=i.table(t).hook;switch(e.type){case"add":if(a.fire===or)break;return i._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===or&&s.fire===or)break;return i._promise("readwrite",(()=>u(e)),!0);case"delete":if(o.fire===or)break;return i._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(o.fire===or)break;return i._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return r.mutate(e);function u(e){const t=Rr.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((u=>{const c=i.map(((r,i)=>{const c=u[i],l={onerror:null,onsuccess:null};if("delete"===e.type)o.fire.call(l,r,c,t);else if("add"===e.type||void 0===c){const o=a.fire.call(l,r,e.values[i],t);null==r&&null!=o&&(r=o,e.keys[i]=r,n.outbound||St(e.values[i],n.keyPath,r))}else{const n=Ki(c,e.values[i]),o=s.fire.call(l,n,r,c,t);if(o){const t=e.values[i];Object.keys(o).forEach((e=>{ft(t,e)?t[e]=o[e]:St(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],a=c[n];null==o?a.onerror&&a.onerror(t[n]):a.onsuccess&&a.onsuccess("put"===e.type&&u[n]?e.values[n]:o)}return{failures:t,results:r,numFailures:n,lastResult:o}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((({result:r})=>u({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}:c(e,{...t,lower:r[r.length-1],lowerOpen:!0},i)))))}}};return i}})};function Vi(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===Yn(t.keys[i],e[o])&&(n.push(r?Rt(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}const Gi={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=Vi(e.keys,e.trans._cache,"clone"===e.cache);return t?jr.resolve(t):r.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Rt(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function Hi(e){return!("from"in e)}const Yi=function(e,t){if(!this){const t=new Yi;return e&&"d"in e&&ut(t,e),t}ut(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function qi(e,t,r){const n=Yn(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(Hi(e))return ut(e,{from:t,to:r,d:1});const i=e.l,o=e.r;if(Yn(r,e.from)<0)return i?qi(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},Ji(e);if(Yn(t,e.to)>0)return o?qi(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},Ji(e);Yn(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),Yn(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;i&&!e.l&&Zi(e,i),o&&a&&Zi(e,o)}function Zi(e,t){Hi(t)||function e(t,{from:r,to:n,l:i,r:o}){qi(t,r,n),i&&e(t,i),o&&e(t,o)}(e,t)}function $i(e){let t=Hi(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&&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,!r||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 Ji(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=Xi(r)}e.d=Xi(e)}function Xi({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}ht(Yi.prototype,{add(e){return Zi(this,e),this},addKey(e){return qi(this,e,e),this},addKeys(e){return e.forEach((e=>qi(this,e,e))),this},[jt](){return $i(this)}});const Qi={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,r=new Yi(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{const i=e.table(n),{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 r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new Yi)},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(st(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Vi(h,p);t||"add"===f||l.addKeys(h),(t||d)&&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 a=e=>t.multiEntry&&st(e)?e.forEach((e=>i.addKey(e))):i.addKey(e);(r||n).forEach(((e,t)=>{const i=r&&o(r[t]),s=n&&o(n[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(r),l.add(r),o.indexes.forEach((e=>u(e.name).add(r)));return e}))}},l=({query:{index:t,range:r}})=>{var n,i;return[t,new Yi(null!==(n=r.lower)&&void 0!==n?n:e.MIN_KEY,null!==(i=r.upper)&&void 0!==i?i:e.MAX_KEY)]},f={get:e=>[a,new Yi(e.key)],getMany:e=>[a,(new Yi).addKeys(e.keys)],count:l,query:l,openCursor:l};return at(f).forEach((e=>{c[e]=function(o){const{subscr:a}=Rr;if(a){const c=e=>{const r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new Yi)},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((r=>{if("query"===e){if(u&&o.values)return t.then((({result:e})=>(l.addKeys(e),r)));const e=o.values?r.result.map(s):r.result;o.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=r,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 r}))}h.add(r)}}return i[e].apply(this,arguments)}})),c}}}};class eo{constructor(e,t){this._middlewares={},this.verno=0;const r=eo.dependencies;this._options=t={addons:eo.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:or,dbReadyPromise:null,cancelOpen:or,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;i.dbReadyPromise=new jr((e=>{i.dbReadyResolve=e})),i.openCanceller=new jr(((e,t)=>{i.cancelOpen=t})),this._state=i,this.name=e,this.on=Un(this,"populate","blocked","versionchange","close",{ready:[dr,or]}),this.on.ready.subscribe=_t(this.on.ready.subscribe,(e=>(t,r)=>{eo.vip((()=>{const n=this._state;if(n.openComplete)n.dbOpenError||jr.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,Fn($n.prototype,(function(e,t){this.db=o;let r=Ln,n=null;if(t)try{r=t()}catch(e){n=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: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:s!==ar?s:null}}))),this.Table=function(e){return Fn(Bn.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:Un(null,{creating:[cr,or],reading:[sr,ar],updating:[fr,or],deleting:[lr,or]})}))}(this),this.Transaction=function(e){return Fn(hi.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=Un(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 jr(((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(),bn(e)}))}))}(this),this.Version=function(e){return Fn(Ri.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Fn(ai.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 rr.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=yi(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),kn.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(zi),this.use(Wi),this.use(Qi),this.use(Gi),this.vip=Object.create(this,{_vip:{value:!0}}),n.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new rr.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new rr.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(Si),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Rr.letThrough||this._vip)?e():new jr(((e,t)=>{if(this._state.openComplete)return t(new rr.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new rr.DatabaseClosed);this.open().catch(or)}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?bn(t.dbOpenError):e));zt&&(t.openCanceller._stackHolder=Gt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const n=t.openCanceller;function i(){if(t.openCanceller!==n)throw new rr.DatabaseClosed("db.open() was cancelled")}let o=t.dbReadyResolve,a=null,s=!1;return jr.race([n,("undefined"==typeof navigator?jr.resolve():ji()).then((()=>new jr(((n,o)=>{if(i(),!r)throw new rr.MissingAPI;const u=e.name,c=t.autoSchema?r.open(u):r.open(u,Math.round(10*e.verno));if(!c)throw new rr.MissingAPI;c.onerror=si(o),c.onblocked=Jr(e._fireOnBlocked),c.onupgradeneeded=Jr((n=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=ui,a.abort(),c.result.close();const e=r.deleteDatabase(u);e.onsuccess=e.onerror=Jr((()=>{o(new rr.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=si(o);var i=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;s=i<1,e._novip.idbdb=c.result,ki(e,i/10,a,o)}}),o),c.onsuccess=Jr((()=>{a=null;const r=e._novip.idbdb=c.result,i=bt(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=Ni(0,t,r);e._storeNames=bt(t.objectStoreNames,0),Oi(e,[e._allTables],at(n),n)}(e,r,n):(Ci(e,e._dbSchema,n),function(e,t){const r=Ti(Ni(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.")),Ei(e,n)}catch(e){}var o;kn.push(e),r.onversionchange=Jr((r=>{t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=Jr((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},r){!Di(e)&&r!==Cn&&Pi(e,t).put({name:r}).catch(or)}(e._deps,u),n()}),o)}))))]).then((()=>(i(),t.onReadyBeingFired=[],jr.resolve(Li((()=>e.on.ready.fire(e.vip)))).then((function r(){if(t.onReadyBeingFired.length>0){let n=t.onReadyBeingFired.reduce(dr,or);return t.onReadyBeingFired=[],jr.resolve(Li((()=>n(e.vip)))).then(r)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((r=>{t.dbOpenError=r;try{a&&a.abort()}catch(e){}return n===t.openCanceller&&e._close(),bn(r)})).finally((()=>{t.openComplete=!0,o()}))}(this)}_close(){const e=this._state,t=kn.indexOf(this);if(t>=0&&kn.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new jr((t=>{e.dbReadyResolve=t})),e.openCanceller=new jr(((t,r)=>{e.cancelOpen=r}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new rr.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new jr(((r,n)=>{const i=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Jr((()=>{!function({indexedDB:e,IDBKeyRange:t},r){!Di(e)&&r!==Cn&&Pi(e,t).delete(r).catch(or)}(this._deps,this.name),r()})),e.onerror=si(n),e.onblocked=this._fireOnBlocked};if(e)throw new rr.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 at(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Ui.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n=Rr.trans;n&&n.db===this&&-1===e.indexOf("!")||(n=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||e===Rn)o=Rn;else{if("rw"!=e&&e!=Pn)throw new rr.InvalidArgument("Invalid transaction mode: "+e);o=Pn}if(n){if(n.mode===Rn&&o===Pn){if(!i)throw new rr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");n=null}n&&a.forEach((e=>{if(n&&-1===n.storeNames.indexOf(e)){if(!i)throw new rr.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)})):bn(e)}const s=Fi.bind(null,this,o,a,n,r);return n?n._promise(o,s,"lock"):Rr.trans?dn(Rr.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!ft(this._allTables,e))throw new rr.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const to="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class ro{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[to](){return this}}function no(e,t){return at(t).forEach((r=>{Zi(e[r]||(e[r]=new Yi),t[r])})),e}let io;try{io={indexedDB:ot.indexedDB||ot.mozIndexedDB||ot.webkitIndexedDB||ot.msIndexedDB,IDBKeyRange:ot.IDBKeyRange||ot.webkitIDBKeyRange}}catch(ot){io={indexedDB:null,IDBKeyRange:null}}const oo=eo;function ao(e){let t=so;try{so=!0,fi.storagemutated.fire(e)}finally{so=t}}ht(oo,{...ir,delete:e=>new oo(e,{addons:[]}).delete(),exists:e=>new oo(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Di(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>e!==Cn)))):Pi(e,t).toCollection().primaryKeys()}(oo.dependencies).then(e)}catch(e){return bn(new rr.MissingAPI)}},defineClass:()=>function(e){ut(this,e)},ignoreTransaction:e=>Rr.trans?dn(Rr.transless,e):e(),vip:Li,async:function(e){return function(){try{var t=Bi(e.apply(this,arguments));return t&&"function"==typeof t.then?t:jr.resolve(t)}catch(e){return bn(e)}}},spawn:function(e,t,r){try{var n=Bi(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:jr.resolve(n)}catch(e){return bn(e)}},currentTransaction:{get:()=>Rr.trans||null},waitFor:function(e,t){const r=jr.resolve("function"==typeof e?oo.ignoreTransaction(e):e).timeout(t||6e4);return Rr.trans?Rr.trans.waitFor(r):r},Promise:jr,debug:{get:()=>zt,set:e=>{Kt(e,"dexie"===e?()=>!0:Nn)}},derive:vt,extend:ut,props:ht,override:_t,Events:Un,on:fi,liveQuery:function(e){let t,r=!1;const n=new ro((n=>{const i=Mt(e);let o=!1,a={},s={};const u={get closed(){return o},unsubscribe:()=>{o=!0,fi.storagemutated.unsubscribe(h)}};n.start&&n.start(u);let c=!1,l=!1;function f(){return at(s).some((e=>a[e]&&function(e,t){const r=$i(t);let n=r.next();if(n.done)return!1;let i=n.value;const o=$i(e);let a=o.next(i.from),s=a.value;for(;!n.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=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}(a[e],s[e])))}const h=e=>{no(a,e),f()&&d()},d=()=>{if(c||o)return;a={};const p={},v=function(t){i&&an();const r=()=>on(e,{subscr:t,trans:null}),n=Rr.trans?dn(Rr.transless,r):r();return i&&n.then(sn,sn),n}(p);l||(fi(ci,h),l=!0),c=!0,Promise.resolve(v).then((e=>{r=!0,t=e,c=!1,o||(f()?d():(a={},s=p,n.next&&n.next(e)))}),(e=>{c=!1,r=!1,n.error&&n.error(e),u.unsubscribe()}))};return d(),u}));return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:no,getByKeyPath:xt,setByKeyPath:St,delByKeyPath:function(e,t){"string"==typeof t?St(e,t,void 0):"length"in t&&[].map.call(t,(function(t){St(e,t,void 0)}))},shallowClone:kt,deepClone:Rt,getObjectDiff:Ki,cmp:Yn,asap:Et,minKey:On,addons:[],connections:kn,errnames:er,dependencies:io,semVer:wn,version:wn.split(".").map((e=>parseInt(e))).reduce(((e,t,r)=>e+t/Math.pow(10,2*r)))}),oo.maxKey=yi(oo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(fi(ci,(e=>{if(!so){let t;Tn?(t=document.createEvent("CustomEvent"),t.initCustomEvent(li,!0,!0,e)):t=new CustomEvent(li,{detail:e}),so=!0,dispatchEvent(t),so=!1}})),addEventListener(li,(({detail:e})=>{so||ao(e)})));let so=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel(li);"function"==typeof e.unref&&e.unref(),fi(ci,(t=>{so||e.postMessage(t)})),e.onmessage=e=>{e.data&&ao(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){fi(ci,(e=>{try{so||("undefined"!=typeof localStorage&&localStorage.setItem(li,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:li,changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if(e.key===li){const t=JSON.parse(e.newValue);t&&ao(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&e.type===li&&ao(e.changedParts)}))}function uo(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function co(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=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],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function lo(e){return[e.schema.primKey].concat(e.schema.indexes).map((function(e){return e.src})).join(",")}function fo(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 ho(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)}jr.rejectionMapper=function(e,t){if(!e||e instanceof $t||e instanceof TypeError||e instanceof SyntaxError||!e.name||!nr[e.name])return e;var r=new nr[e.name](t||e.message,e);return"stack"in e&&pt(r,"stack",{get:function(){return this.inner.stack}}),r},Kt(zt,Nn);var po="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vo(e,t){return e(t={exports:{}},t.exports),t.exports}for(var yo=vo((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,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);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 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 a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){return h(e)||p(e,t)||y()}function l(e){return f(e)||d(e)||v()}function f(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 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 r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function y(){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 g={}.toString,b={}.hasOwnProperty,_=Object.getPrototypeOf,w=b.toString;function E(e,t){return T(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function O(e){return g.call(e).slice(8,-1)}function x(t,r){if(!t||"object"!==e(t))return!1;var n=_(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 S(e){return!(!e||"Object"!==O(e))&&(!_(e)||x(e,Object))}function k(e){if(!e||"Object"!==O(e))return!1;var t=_(e);return!t||x(e,Object)||k(t)}function T(t){return t&&"object"===e(t)}function A(e){return e.replace(/~/g,"~0").replace(/\\./g,"~1")}function I(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function N(e,t){if(""===t)return e;var r=t.indexOf(".");if(r>-1){var n=e[I(t.slice(0,r))];return void 0===n?void 0:N(n,t.slice(r+1))}return e[I(t)]}function C(e,t,r){if(""===t)return r;var n=t.indexOf(".");return n>-1?C(e[I(t.slice(0,n))],t.slice(n+1),r):(e[I(t)]=r,e)}function R(t){return null===t?"null":Array.isArray(t)?"array":e(t)}var P=Object.keys,D=Array.isArray,L={}.hasOwnProperty,j=["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 U=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=u({},this.options,{},n,{stringification:!0});var i=this.encapsulate(e,null,n);return D(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,u({throwOnBadSyncType:!0},n,{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,r,n){return this.stringify(e,t,r,u({throwOnBadSyncType:!0},n,{sync:!1}))}},{key:"parse",value:function(e,t,r){return r=u({},this.options,{},r,{parse:!0}),this.revive(JSON.parse(e,t),r)}},{key:"parseSync",value:function(e,t,r){return this.parse(e,t,u({throwOnBadSyncType:!0},r,{sync:!0}))}},{key:"parseAsync",value:function(e,t,r){return this.parse(e,t,u({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 a=(o=u({sync:!0},this.options,{},o)).sync,s=this,f={},h=[],d=[],p=[],v=!("cyclic"in o)||o.cyclic,y=o.encapsulateObserver,g=O("",n,v,i||{},p);function b(e){var r=Object.values(f);if(o.iterateNone)return r.length?r[0]:t.getJSONType(e);if(r.length){if(o.returnTypeNames)return l(new Set(r));e&&S(e)&&!L.call(e,"$types")?e.$types=f:e={$:e,$types:{$:f}}}else T(e)&&L.call(e,"$types")&&(e={$:e,$types:!0});return!o.returnTypeNames&&e}function _(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,a,s,u,l,f,h,d,p,v,y,g,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=[],o=n.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],v=u[6],y=O(l,r,f,h,i,!0,v),g=x(y,m),!l||!g){e.next=11;break}return e.next=8,y.p;case 8:return b=e.sent,d[p]=b,e.abrupt("return",_(t,i));case 11:return l?d[p]=y:t=g?y.p:y,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 E(e,t,r){Object.assign(e,t);var n=j.map((function(t){var r=e[t];return delete e[t],r}));r(),j.forEach((function(t,r){e[t]=n[r]}))}function O(r,n,i,a,u,c,l){var p,v={},g=e(n),b=y?function(e){var o=l||a.type||t.getJSONType(n);y(Object.assign(e||v,{keypath:r,value:n,cyclic:i,stateObj:a,promisesData:u,resolvingTypesonPromise:c,awaitingTypesonPromise:x(n,m)},{type:o}))}:null;if(["string","boolean","number","undefined"].includes(g))return void 0===n||"number"===g&&(isNaN(n)||n===-1/0||n===1/0)?(p=a.replaced?n:k(r,n,a,u,!1,c,b))!==n&&(v={replaced:p}):p=n,b&&b(),p;if(null===n)return b&&b(),n;if(i&&!a.iterateIn&&!a.iterateUnsetNumeric&&n&&"object"===e(n)){var _=h.indexOf(n);if(!(_<0))return f[r]="#",b&&b({cyclicKeypath:d[_]}),"#"+d[_];!0===i&&(h.push(n),d.push(r))}var w,T=S(n),I=D(n),N=(T||I)&&(!s.plainObjectReplacers.length||a.replaced)||a.iterateIn?n:k(r,n,a,u,T||I,null,b);if(N!==n?(p=N,v={replaced:N}):""===r&&x(n,m)?(u.push([r,n,i,a,void 0,void 0,a.type]),p=n):I&&"object"!==a.iterateIn||"array"===a.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))&&!T&&"object"!==a.iterateIn?p=n:(w={},a.addLength&&(w.length=n.length),v={clone:w}),b&&b(),o.iterateNone)return w||p;if(!w)return p;if(a.iterateIn){var C=function(e){var t={ownKeys:L.call(n,e)};E(a,t,(function(){var t=r+(r?".":"")+A(e),o=O(t,n[e],Boolean(i),a,u,c);x(o,m)?u.push([t,o,Boolean(i),a,w,e,a.type]):void 0!==o&&(w[e]=o)}))};for(var R in n)C(R);b&&b({endIterateIn:!0,end:!0})}else P(n).forEach((function(e){var t=r+(r?".":"")+A(e);E(a,{ownKeys:!0},(function(){var r=O(t,n[e],Boolean(i),a,u,c);x(r,m)?u.push([t,r,Boolean(i),a,w,e,a.type]):void 0!==r&&(w[e]=r)}))})),b&&b({endIterateOwn:!0,end:!0});if(a.iterateUnsetNumeric){for(var j=n.length,B=function(e){if(!(e in n)){var t=r+(r?".":"")+e;E(a,{ownKeys:!1},(function(){var r=O(t,void 0,Boolean(i),a,u,c);x(r,m)?u.push([t,r,Boolean(i),a,w,e,a.type]):void 0!==r&&(w[e]=r)}))}},U=0;U<j;U++)B(U);b&&b({endIterateUnsetNumeric:!0,end:!0})}return w}function k(e,t,r,n,i,o,u){for(var c=i?s.plainObjectReplacers:s.nonplainObjectReplacers,l=c.length;l--;){var h=c[l];if(h.test(t,r)){var d=h.type;if(s.revivers[d]){var p=f[e];f[e]=p?[d].concat(p):d}return Object.assign(r,{type:d,replaced:!0}),!a&&h.replaceAsync||h.replace?(u&&u({replacing:!0}),O(e,h[a||!h.replaceAsync?"replace":"replaceAsync"](t,r),v&&"readonly",r,n,o,d)):(u&&u({typeDetected:!0}),O(e,t,v&&"readonly",r,n,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,r){return this.encapsulate(e,t,u({throwOnBadSyncType:!0},r,{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,r){return this.encapsulate(e,t,u({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=u({sync:!0},this.options,{},t)).sync,i=[],o={},a=!0;r.$&&S(r.$)&&(e=e.$,r=r.$,a=!1);var s=this;function l(e,t){var r=c(s.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 f(){var t=[];if(Object.entries(r).forEach((function(e){var n=c(e,2),i=n[0],o=n[1];"#"!==o&&[].concat(o).forEach((function(e){c(s.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(E(r))return r.then((function(e){return t(e,{keypath:i,type:o})}));var a=N(e,i);if(x(a=l(o,a),m))return a.then((function(t){var r=C(e,i,t);r===t&&(e=r)}));var s=C(e,i,a);s===a&&(e=s)}),void 0)}var h=[];function d(e,t,n,o,s){if(!a||"$types"!==e){var u=r[e],f=D(t);if(f||S(t)){var p=f?new Array(t.length):{};for(P(t).forEach((function(r){var i=d(e+(e?".":"")+A(r),t[r],n||p,p,r),o=function(e){return x(e,F)?p[r]=void 0:void 0!==e&&(p[r]=e),e};x(i,m)?h.push(i.then((function(e){return o(e)}))):o(i)})),t=p;i.length;){var v=c(i[0],4),y=v[0],g=v[1],b=v[2],_=v[3],w=N(y,g);if(void 0===w)break;b[_]=w,i.splice(0,1)}}if(!u)return t;if("#"===u){var E=N(n,t.slice(1));return void 0===E&&i.push([n,t.slice(1),o,s]),E}return[].concat(u).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,F)?void 0:e}var v,y=f();return x(y,m)?v=y.then((function(){return e})):(v=d("",e,null),h.length&&(v=m.resolve(v).then((function(e){return m.all([e].concat(h))})).then((function(e){return c(e,1)[0]})))),E(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,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,r){return r=r||{},[].concat(e).forEach((function e(n){var i=this;if(D(n))return n.map((function(t){return e.call(i,t)}));n&&P(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,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(D(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 r.fallback?r.fallback:r.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}(),F=function e(){n(this,e)};return F.__typeson__type__="TypesonUndefined",U.Undefined=F,U.Promise=m,U.isThenable=E,U.toStringTag=O,U.hasConstructorOf=x,U.isObject=T,U.isPlainObject=S,U.isUserObject=k,U.escapeKeyPathComponent=A,U.unescapeKeyPathComponent=I,U.getByKeyPath=N,U.getJSONType=R,U.JSON_TYPES=["null","boolean","number","string","array","object"],U}()})),mo=vo((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 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 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)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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 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 f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function 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 r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.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 y(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 y(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)?y(e,t):void 0}}function y(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){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 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 g={}.toString,b={}.hasOwnProperty,_=Object.getPrototypeOf,w=b.toString;function E(e,t){return k(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function O(e){return g.call(e).slice(8,-1)}function x(e,t){if(!e||"object"!==s(e))return!1;var r=_(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 S(e){return!(!e||"Object"!==O(e))&&(!_(e)||x(e,Object))}function k(e){return e&&"object"===s(e)}function T(e){return e.replace(/~/g,"~0").replace(/\\./g,"~1")}function A(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function I(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:I(n,t.slice(r+1))}return e[A(t)]}function N(e,t,r){if(""===t)return r;var n=t.indexOf(".");return n>-1?N(e[A(t.slice(0,n))],t.slice(n+1),r):(e[A(t)]=r,e)}function C(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var R=Object.keys,P=Array.isArray,D={}.hasOwnProperty,L=["type","replaced","iterateIn","iterateUnsetNumeric"];function j(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 U=function(){function e(t){u(this,e),this.options=t,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return function(e,t,r){t&&c(e.prototype,t),r&&c(e,r)}(e,[{key:"stringify",value:function(e,t,r,n){n=h(h(h({},this.options),n),{},{stringification:!0});var i=this.encapsulate(e,null,n);return P(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,h(h({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,r,n){return this.stringify(e,t,r,h(h({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"parse",value:function(e,t,r){return r=h(h(h({},this.options),r),{},{parse:!0}),this.revive(JSON.parse(e,t),r)}},{key:"parseSync",value:function(e,t,r){return this.parse(e,t,h(h({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,r){return this.parse(e,t,h(h({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=j((function(e,t){return C(Promise.all(t.map((function(e){return e[1].p}))),(function(r){return C(Promise.all(r.map(j((function(r){var n=!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],v=w(u,r,c,l,o,!0,p),y=x(v,m);return function(e,t){var r=e();return r&&r.then?r.then(t):t(r)}((function(){if(u&&y)return C(v.p,(function(t){return f[h]=t,n=!0,i(e,o)}))}),(function(t){return n?t:(u?f[h]=v:e=y?v.p:v,i(e,o))}))})))),(function(){return e}))}))})),o=(n=h(h({sync:!0},this.options),n)).sync,a=this,u={},c=[],l=[],f=[],v=!("cyclic"in n)||n.cyclic,y=n.encapsulateObserver,g=w("",t,v,r||{},f);function b(t){var r=Object.values(u);if(n.iterateNone)return r.length?r[0]:e.getJSONType(t);if(r.length){if(n.returnTypeNames)return p(new Set(r));t&&S(t)&&!D.call(t,"$types")?t.$types=u:t={$:t,$types:{$:u}}}else k(t)&&D.call(t,"$types")&&(t={$:t,$types:!0});return!n.returnTypeNames&&t}function _(e,t,r){Object.assign(e,t);var n=L.map((function(t){var r=e[t];return delete e[t],r}));r(),L.forEach((function(t,r){e[t]=n[r]}))}function w(t,r,i,o,f,h,d){var p,v={},g=s(r),b=y?function(n){var a=d||o.type||e.getJSONType(r);y(Object.assign(n||v,{keypath:t,value:r,cyclic:i,stateObj:o,promisesData:f,resolvingTypesonPromise:h,awaitingTypesonPromise:x(r,m)},{type:a}))}:null;if(["string","boolean","number","undefined"].includes(g))return void 0===r||Number.isNaN(r)||r===Number.NEGATIVE_INFINITY||r===Number.POSITIVE_INFINITY?(p=o.replaced?r:E(t,r,o,f,!1,h,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"===s(r)){var O=c.indexOf(r);if(!(O<0))return u[t]="#",b&&b({cyclicKeypath:l[O]}),"#"+l[O];!0===i&&(c.push(r),l.push(t))}var k,A=S(r),I=P(r),N=(A||I)&&(!a.plainObjectReplacers.length||o.replaced)||o.iterateIn?r:E(t,r,o,f,A||I,null,b);if(N!==r?(p=N,v={replaced:N}):""===t&&x(r,m)?(f.push([t,r,i,o,void 0,void 0,o.type]),p=r):I&&"object"!==o.iterateIn||"array"===o.iterateIn?(k=new Array(r.length),v={clone:k}):(["function","symbol"].includes(s(r))||"toJSON"in r||x(r,m)||x(r,Promise)||x(r,ArrayBuffer))&&!A&&"object"!==o.iterateIn?p=r:(k={},o.addLength&&(k.length=r.length),v={clone:k}),b&&b(),n.iterateNone)return k||p;if(!k)return p;if(o.iterateIn){var C=function(e){var n={ownKeys:D.call(r,e)};_(o,n,(function(){var n=t+(t?".":"")+T(e),a=w(n,r[e],Boolean(i),o,f,h);x(a,m)?f.push([n,a,Boolean(i),o,k,e,o.type]):void 0!==a&&(k[e]=a)}))};for(var L in r)C(L);b&&b({endIterateIn:!0,end:!0})}else R(r).forEach((function(e){var n=t+(t?".":"")+T(e);_(o,{ownKeys:!0},(function(){var t=w(n,r[e],Boolean(i),o,f,h);x(t,m)?f.push([n,t,Boolean(i),o,k,e,o.type]):void 0!==t&&(k[e]=t)}))})),b&&b({endIterateOwn:!0,end:!0});if(o.iterateUnsetNumeric){for(var j=r.length,B=function(e){if(!(e in r)){var n=t+(t?".":"")+e;_(o,{ownKeys:!1},(function(){var t=w(n,void 0,Boolean(i),o,f,h);x(t,m)?f.push([n,t,Boolean(i),o,k,e,o.type]):void 0!==t&&(k[e]=t)}))}},U=0;U<j;U++)B(U);b&&b({endIterateUnsetNumeric:!0,end:!0})}return k}function E(e,t,r,n,i,s,c){for(var l=i?a.plainObjectReplacers:a.nonplainObjectReplacers,f=l.length;f--;){var h=l[f];if(h.test(t,r)){var d=h.type;if(a.revivers[d]){var p=u[e];u[e]=p?[d].concat(p):d}return Object.assign(r,{type:d,replaced:!0}),!o&&h.replaceAsync||h.replace?(c&&c({replacing:!0}),w(e,h[o||!h.replaceAsync?"replace":"replaceAsync"](t,r),v&&"readonly",r,n,s,d)):(c&&c({typeDetected:!0}),w(e,t,v&&"readonly",r,n,s,d))}}return t}return f.length?o&&n.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(i(g,f)).then(b):!o&&n.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n.stringification&&o?[b(g)]:o?b(g):Promise.resolve(b(g))}},{key:"encapsulateSync",value:function(e,t,r){return this.encapsulate(e,t,h(h({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,r){return this.encapsulate(e,t,h(h({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=h(h({sync:!0},this.options),t)).sync,i=[],o={},a=!0;r.$&&S(r.$)&&(e=e.$,r=r.$,a=!1);var s=this;function u(e,t){var r=d(s.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 c=[];function l(e){return x(e,F)?void 0:e}var f,p=function(){var t=[];if(Object.entries(r).forEach((function(e){var n=d(e,2),i=n[0],o=n[1];"#"!==o&&[].concat(o).forEach((function(e){d(s.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(E(r))return r.then((function(e){return t(e,{keypath:i,type:o})}));var a=I(e,i);if(x(a=u(o,a),m))return a.then((function(t){var r=N(e,i,t);r===t&&(e=r)}));var s=N(e,i,a);s===a&&(e=s)}),void 0)}();return x(p,m)?f=p.then((function(){return e})):(f=function e(t,n,o,s,l){if(!a||"$types"!==t){var f=r[t],h=P(n);if(h||S(n)){var p=h?new Array(n.length):{};for(R(n).forEach((function(r){var i=e(t+(t?".":"")+T(r),n[r],o||p,p,r),a=function(e){return x(e,F)?p[r]=void 0:void 0!==e&&(p[r]=e),e};x(i,m)?c.push(i.then((function(e){return a(e)}))):a(i)})),n=p;i.length;){var v=d(i[0],4),y=v[0],g=v[1],b=v[2],_=v[3],w=I(y,g);if(void 0===w)break;b[_]=w,i.splice(0,1)}}if(!f)return n;if("#"===f){var E=I(o,n.slice(1));return void 0===E&&i.push([o,n.slice(1),s,l]),E}return[].concat(f).reduce((function e(t,r){return x(t,m)?t.then((function(t){return e(t,r)})):u(r,t)}),n)}}("",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]})))),E(f)?n&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():x(f,m)?f.p.then(l):f:!n&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():n?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,r){return r=r||{},[].concat(t).forEach((function t(n){var i=this;if(P(n))return n.map((function(e){return t.call(i,e)}));n&&R(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,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(P(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 r.fallback?r.fallback:r.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}(),F=function e(){u(this,e)};F.__typeson__type__="TypesonUndefined",U.Undefined=F,U.Promise=m,U.isThenable=E,U.toStringTag=O,U.hasConstructorOf=x,U.isObject=k,U.isPlainObject=S,U.isUserObject=function e(t){if(!t||"Object"!==O(t))return!1;var r=_(t);return!r||x(t,Object)||e(r)},U.escapeKeyPathComponent=T,U.unescapeKeyPathComponent=A,U.getByKeyPath=I,U.getJSONType=function(e){return null===e?"null":Array.isArray(e)?"array":s(e)},U.JSON_TYPES=["null","boolean","number","string","array","object"];for(var M={userObject:{test:function(e,t){return U.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}}},z=[{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 U.Undefined}}},W={StringObject:{test:function(t){return"String"===U.toStringTag(t)&&"object"===e(t)},replace:function(e){return String(e)},revive:function(e){return new String(e)}},BooleanObject:{test:function(t){return"Boolean"===U.toStringTag(t)&&"object"===e(t)},replace:function(e){return Boolean(e)},revive:function(e){return new Boolean(e)}},NumberObject:{test:function(t){return"Number"===U.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}}}],G={date:{test:function(e){return"Date"===U.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)}}},H={regexp:{test:function(e){return"RegExp"===U.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)}}},Y={map:{test:function(e){return"Map"===U.toStringTag(e)},replace:function(e){return o(e.entries())},revive:function(e){return new Map(e)}}},q={set:{test:function(e){return"Set"===U.toStringTag(e)},replace:function(e){return o(e.values())},revive:function(e){return new Set(e)}}},Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=new Uint8Array(256),J=0;J<Z.length;J++)$[Z.charCodeAt(J)]=J;var X=function(e,t,r){null==r&&(r=e.byteLength);for(var n=new Uint8Array(e,t||0,r),i=n.length,o="",a=0;a<i;a+=3)o+=Z[n[a]>>2],o+=Z[(3&n[a])<<4|n[a+1]>>4],o+=Z[(15&n[a+1])<<2|n[a+2]>>6],o+=Z[63&n[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,r,n,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=$[e.charCodeAt(l)],r=$[e.charCodeAt(l+1)],n=$[e.charCodeAt(l+2)],i=$[e.charCodeAt(l+3)],c[s++]=t<<2|r>>4,c[s++]=(15&r)<<4|n>>2,c[s++]=(3&n)<<6|63&i;return u},ee={arraybuffer:{test:function(e){return"ArrayBuffer"===U.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),X(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?po: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 U.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:X(r),byteOffset:n,length:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,i=e.byteOffset,o=e.length,a=e.encoded,s=e.index;return"index"in e?n=t.buffers[s]:(n=Q(a),t.buffers.push(n)),new r(n,i,o)}})}));var ne={dataview:{test:function(e){return"DataView"===U.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:X(r),byteOffset:n,byteLength:i})},revive:function(e,t){t.buffers||(t.buffers=[]);var r,n=e.byteOffset,i=e.byteLength,o=e.encoded,a=e.index;return"index"in e?r=t.buffers[a]:(r=Q(o),t.buffers.push(r)),new DataView(r,n,i)}}},ie={IntlCollator:{test:function(e){return U.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 U.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 U.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 ae={file:{test:function(e){return"File"===U.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 U.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)}))}}},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)&&U.hasConstructorOf(t,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},ce={cryptokey:{test:function(e){return"CryptoKey"===U.toStringTag(e)&&e.extractable},replaceAsync:function(e){return new U.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[M,K,z,W,V,G,H,{imagedata:{test:function(e){return"ImageData"===U.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"===U.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)}}},ae,{file:ae.file,filelist:{test:function(e){return"FileList"===U.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"===U.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 U.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?Y:[],"function"==typeof Set?q:[],"function"==typeof ArrayBuffer?ee:[],"function"==typeof Uint8Array?re:[],"function"==typeof DataView?ne:[],"undefined"!=typeof Intl?ie:[],"undefined"!=typeof crypto?ce:[],"undefined"!=typeof BigInt?[se,ue]:[])}()})),go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=new Uint8Array(256),_o=0;_o<64;_o++)bo[go.codePointAt(_o)]=_o;var wo=function(e,t,r){null==r&&(r=e.byteLength);for(var n=new Uint8Array(e,t||0,r),i=n.length,o="",a=0;a<i;a+=3)o+=go[n[a]>>2],o+=go[(3&n[a])<<4|n[a+1]>>4],o+=go[(15&n[a+1])<<2|n[a+2]>>6],o+=go[63&n[a+2]];return i%3==2?o=o.slice(0,-1)+"=":i%3==1&&(o=o.slice(0,-2)+"=="),o},Eo=function(e){var t,r,n,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=bo[e.codePointAt(l)],r=bo[e.codePointAt(l+1)],n=bo[e.codePointAt(l+2)],i=bo[e.codePointAt(l+3)],c[s++]=t<<2|r>>4,c[s++]=(15&r)<<4|n>>2,c[s++]=(3&n)<<6|63&i;return u},Oo="undefined"==typeof self?global:self,xo={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(e){var t=e,r=Oo[t];r&&(xo[e.toLowerCase()+"2"]={test:function(e){return yo.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 So={arraybuffer:{test:function(e){return"ArrayBuffer"===yo.toStringTag(e)},replace:function(e){return wo(e,0,e.byteLength)},revive:function(e){return Eo(e)}}},ko=(new yo).register(mo),To="FileReaderSync"in self,Ao=[],Io=0;ko.register([So,xo,{blob2:{test:function(e){return"Blob"===yo.toStringTag(e)},replace:function(e){if(e.isClosed)throw new Error("The Blob is closed");if(To){var t=ho(e,"binary"),r=wo(t,0,t.byteLength);return{type:e.type,data:r}}Ao.push(e);var n={type:e.type,data:{start:Io,end:Io+e.size}};return Io+=e.size,n},finalize:function(e,t){e.data=wo(t,0,t.byteLength)},revive:function(e){var t=e.type,r=e.data;return new Blob([Eo(r)],{type:t})}}}]),ko.mustFinalize=function(){return Ao.length>0},ko.finalize=function(e){return uo(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,u,c,l;return co(this,(function(f){switch(f.label){case 0:return[4,fo(new Blob(Ao),"binary")];case 1:if(t=f.sent(),e)for(r=0,n=e;r<n.length;r++)if((i=n[r]).$types)for(s in o=i.$types,(a=o.$)&&(o=o.$),o)u=o[s],(c=ko.types[u])&&c.finalize&&(l=eo.getByKeyPath(i,a?"$."+s:s),c.finalize(l,t.slice(l.start,l.end)));return Ao=[],[2]}}))}))};function No(e,t){return uo(this,void 0,void 0,(function(){function r(){return uo(this,void 0,void 0,(function(){var r,c,l,f,h,d,p,v,y;return co(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})),u.totalRows=r.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),n.push(f),h=t.filter,d=function(r){var i,a,c,l,f,d,p,v,y,m,g;return co(this,(function(b){switch(b.label){case 0:i=e.table(r),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("]"),n.push(d.substring(0,p)),v=null,y=0,m=!0,g=function(){var e,t,f,d,p,g,b,_;return co(this,(function(w){switch(w.label){case 0:return s&&eo.ignoreTransaction((function(){return s(u)})),[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&&y>0&&(n.push(","),o&&n.push("\\n ")),m=t.length===l,c?(f=h?t.filter((function(e){return h(r,e)})):t,d=f.map((function(e){return ko.encapsulate(e)})),ko.mustFinalize()?[4,eo.waitFor(ko.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 ")),n.push(new Blob([_.substring(1,_.length-1)])),y=f.length,v=t.length>0?eo.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,r){return[e,t[r]]})),h&&(g=g.filter((function(e){var t=e[0],n=e[1];return h(r,n,t)}))),b=g.map((function(e){return ko.encapsulate(e)})),ko.mustFinalize()?[4,eo.waitFor(ko.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 ")),n.push(new Blob([_.substring(1,_.length-1)])),y=g.length,v=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 n.push(d.substr(p)),u.completedTables+=1,u.completedTables<u.totalTables&&n.push(","),[2]}}))},p=0,v=i,m.label=2;case 2:return p<v.length?(y=v[p].name,[5,d(y)]):[3,5];case 3:m.sent(),m.label=4;case 4:return p++,[3,2];case 5:return n.push(c.substr(l)),u.done=!0,s&&eo.ignoreTransaction((function(){return s(u)})),[2]}}))}))}var n,i,o,a,s,u;return co(this,(function(c){switch(c.label){case 0:t=t||{},n=[],i=e.tables.map((function(e){return{name:e.name,schema:lo(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,r()]:[3,3];case 2:return c.sent(),[3,5];case 3:return[4,e.transaction("r",e.tables,r)];case 4:c.sent(),c.label=5;case 5:return[3,7];case 6:return ko.finalize(),[7];case 7:return[2,new Blob(n,{type:"text/json"})]}}))}))}var Co=1,Ro=function(){},Po=vo((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 r,n={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 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 c=/[\\\\"\\n]/g;function l(t){if(!(this instanceof l))return new l(t);var r=this;u(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,h(r,"onready")}l.prototype={end:function(){m(this)},write:function(t){var r=this;if(this.error)throw this.error;if(r.closed)return y(r,"Cannot write after close. Assign an onready handler.");if(null===t)return m(r);var i=0,a=t.charCodeAt(0),u=r.p;e.DEBUG&&console.log("write -> ["+t+"]");for(;a&&(u=a,r.c=a=t.charCodeAt(i++),u!==a?r.p=u:u=r.p,a);)switch(e.DEBUG&&console.log(i,a,e.STATE[r.state]),r.position++,a===s.lineFeed?(r.line++,r.column=0):r.column++,r.state){case o.BEGIN:a===s.openBrace?r.state=o.OPEN_OBJECT:a===s.openBracket?r.state=o.OPEN_ARRAY:g(a)||y(r,"Non-whitespace before {[.");continue;case o.OPEN_KEY:case o.OPEN_OBJECT:if(g(a))continue;if(r.state===o.OPEN_KEY)r.stack.push(o.CLOSE_KEY);else{if(a===s.closeBrace){h(r,"onopenobject"),this.depth++,h(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}r.stack.push(o.CLOSE_OBJECT)}a===s.doubleQuote?r.state=o.STRING:y(r,\'Malformed object key should start with "\');continue;case o.CLOSE_KEY:case o.CLOSE_OBJECT:if(g(a))continue;r.state,o.CLOSE_KEY,a===s.colon?(r.state===o.CLOSE_OBJECT?(r.stack.push(o.CLOSE_OBJECT),p(r,"onopenobject"),this.depth++):p(r,"onkey"),r.state=o.VALUE):a===s.closeBrace?(d(r,"oncloseobject"),this.depth--,r.state=r.stack.pop()||o.VALUE):a===s.comma?(r.state===o.CLOSE_OBJECT&&r.stack.push(o.CLOSE_OBJECT),p(r),r.state=o.OPEN_KEY):y(r,"Bad object");continue;case o.OPEN_ARRAY:case o.VALUE:if(g(a))continue;if(r.state===o.OPEN_ARRAY){if(h(r,"onopenarray"),this.depth++,r.state=o.VALUE,a===s.closeBracket){h(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;continue}r.stack.push(o.CLOSE_ARRAY)}a===s.doubleQuote?r.state=o.STRING:a===s.openBrace?r.state=o.OPEN_OBJECT:a===s.openBracket?r.state=o.OPEN_ARRAY:a===s.t?r.state=o.TRUE:a===s.f?r.state=o.FALSE:a===s.n?r.state=o.NULL:a===s.minus?r.numberNode+="-":s._0<=a&&a<=s._9?(r.numberNode+=String.fromCharCode(a),r.state=o.NUMBER_DIGIT):y(r,"Bad value");continue;case o.CLOSE_ARRAY:if(a===s.comma)r.stack.push(o.CLOSE_ARRAY),p(r,"onvalue"),r.state=o.VALUE;else if(a===s.closeBracket)d(r,"onclosearray"),this.depth--,r.state=r.stack.pop()||o.VALUE;else{if(g(a))continue;y(r,"Bad array")}continue;case o.STRING:void 0===r.textNode&&(r.textNode="");var l=i-1,f=r.slashed,b=r.unicodeI;e:for(;;){for(e.DEBUG&&console.log(i,a,e.STATE[r.state],f);b>0;)if(r.unicodeS+=String.fromCharCode(a),a=t.charCodeAt(i++),r.position++,4===b?(r.textNode+=String.fromCharCode(parseInt(r.unicodeS,16)),b=0,l=i-1):b++,!a)break e;if(a===s.doubleQuote&&!f){r.state=r.stack.pop()||o.VALUE,r.textNode+=t.substring(l,i-1),r.position+=i-1-l;break}if(a===s.backslash&&!f&&(f=!0,r.textNode+=t.substring(l,i-1),r.position+=i-1-l,a=t.charCodeAt(i++),r.position++,!a))break;if(f){if(f=!1,a===s.n?r.textNode+="\\n":a===s.r?r.textNode+="\\r":a===s.t?r.textNode+="\\t":a===s.f?r.textNode+="\\f":a===s.b?r.textNode+="\\b":a===s.u?(b=1,r.unicodeS=""):r.textNode+=String.fromCharCode(a),a=t.charCodeAt(i++),r.position++,l=i-1,a)continue;break}c.lastIndex=i;var _=c.exec(t);if(null===_){i=t.length+1,r.textNode+=t.substring(l,i-1),r.position+=i-1-l;break}if(i=_.index+1,!(a=t.charCodeAt(_.index))){r.textNode+=t.substring(l,i-1),r.position+=i-1-l;break}}r.slashed=f,r.unicodeI=b;continue;case o.TRUE:a===s.r?r.state=o.TRUE2:y(r,"Invalid true started with t"+a);continue;case o.TRUE2:a===s.u?r.state=o.TRUE3:y(r,"Invalid true started with tr"+a);continue;case o.TRUE3:a===s.e?(h(r,"onvalue",!0),r.state=r.stack.pop()||o.VALUE):y(r,"Invalid true started with tru"+a);continue;case o.FALSE:a===s.a?r.state=o.FALSE2:y(r,"Invalid false started with f"+a);continue;case o.FALSE2:a===s.l?r.state=o.FALSE3:y(r,"Invalid false started with fa"+a);continue;case o.FALSE3:a===s.s?r.state=o.FALSE4:y(r,"Invalid false started with fal"+a);continue;case o.FALSE4:a===s.e?(h(r,"onvalue",!1),r.state=r.stack.pop()||o.VALUE):y(r,"Invalid false started with fals"+a);continue;case o.NULL:a===s.u?r.state=o.NULL2:y(r,"Invalid null started with n"+a);continue;case o.NULL2:a===s.l?r.state=o.NULL3:y(r,"Invalid null started with nu"+a);continue;case o.NULL3:a===s.l?(h(r,"onvalue",null),r.state=r.stack.pop()||o.VALUE):y(r,"Invalid null started with nul"+a);continue;case o.NUMBER_DECIMAL_POINT:a===s.period?(r.numberNode+=".",r.state=o.NUMBER_DIGIT):y(r,"Leading zero not followed by .");continue;case o.NUMBER_DIGIT:s._0<=a&&a<=s._9?r.numberNode+=String.fromCharCode(a):a===s.period?(-1!==r.numberNode.indexOf(".")&&y(r,"Invalid number has two dots"),r.numberNode+="."):a===s.e||a===s.E?(-1===r.numberNode.indexOf("e")&&-1===r.numberNode.indexOf("E")||y(r,"Invalid number has two exponential"),r.numberNode+="e"):a===s.plus||a===s.minus?(u!==s.e&&u!==s.E&&y(r,"Invalid symbol in number"),r.numberNode+=String.fromCharCode(a)):(v(r),i--,r.state=r.stack.pop()||o.VALUE);continue;default:y(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 a=void 0===t[o]?0:t[o].length;a>r&&("text"===o?closeText(t):y(t,"Max buffer length exceeded: "+o)),i=Math.max(i,a)}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=Ro}catch(e){r=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;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 h(t,r,n){e.INFO&&console.log("-- emit",r,n),t[r]&&t[r](n)}function d(e,t,r){p(e),h(e,t,r)}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 v(e){e.numberNode&&h(e,"onvalue",parseFloat(e.numberNode)),e.numberNode=""}function y(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||y(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(r.prototype,{constructor:{value:f}}),f.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}}},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 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)},f.prototype.destroy=function(){u(this._parser),this.emit("close")}}(t)}));function Do(e){var t=0,r=function(e){var t,r,n,i=Po.parser(),o=0,a=[],s=!1,u=!1;return i.onopenobject=function(i){var s={incomplete:!0};t||(t=s),r&&(a.push([n,r,u]),e&&(u?r.push(s):r[n]=s)),r=s,n=i,u=!1,++o},i.onkey=function(e){return n=e},i.onvalue=function(e){return u?r.push(e):r[n]=e},i.oncloseobject=function(){var t;if(delete r.incomplete,n=null,0==--o)s=!0;else{var i=r;t=a.pop(),n=t[0],r=t[1],u=t[2],e||(u?r.push(i):r[n]=i)}},i.onopenarray=function(){var i=[];i.incomplete=!0,t||(t=i),r&&(a.push([n,r,u]),e&&(u?r.push(i):r[n]=i)),r=i,u=!0,n=null,++o},i.onclosearray=function(){var t;if(delete r.incomplete,n=null,0==--o)s=!0;else{var i=r;t=a.pop(),n=t[0],r=t[1],u=t[2],e||(u?r.push(i):r[n]=i)}},{write:function(e){return i.write(e),t},done:function(){return s}}}(!0),n={pullAsync:function(i){return uo(this,void 0,void 0,(function(){var o,a,s;return co(this,(function(u){switch(u.label){case 0:return o=e.slice(t,t+i),t+=i,[4,fo(o,"text")];case 1:return a=u.sent(),s=r.write(a),n.result=s||{},[2,s]}}))}))},pullSync:function(i){var o=e.slice(t,t+i);t+=i;var a=ho(o,"text"),s=r.write(a);return n.result=s||{},s},done:function(){return r.done()},eof:function(){return t>=e.size},result:{}};return n}var Lo=1024;function jo(e,t,r){return uo(this,void 0,void 0,(function(){function n(){return uo(this,void 0,void 0,(function(){var t,n,a,f;return co(this,(function(h){switch(h.label){case 0:t=function(t){var n,i,o,a,s,f,h,d,p,v,y,m;return co(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&&eo.ignoreTransaction((function(){return c(l)})),n=t.tableName,i=e.table(n),o=u.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(a=t.rows,s=[],f=0;f<a.length&&!(h=a[f]).incomplete;f++)s.push(ko.revive(h));return d=r.filter,p=d?t.inbound?s.filter((function(e){return d(n,e)})):s.filter((function(e){var t=e[0],r=e[1];return d(n,r,t)})):s,v=t.inbound?[void 0,p]:[p.map((function(e){return e[0]})),s.map((function(e){return e[1]}))],y=v[0],m=v[1],r.overwriteValues?[4,i.bulkPut(m,y)]:[3,2];case 1:return g.sent(),[3,4];case 2:return[4,i.bulkAdd(m,y)];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]}}))},n=0,a=u.data,h.label=1;case 1:return n<a.length?(f=a[n],[5,t(f)]):[3,4];case 2:if("break"===h.sent())return[3,4];h.label=3;case 3:return n++,[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,eo.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 co(this,(function(d){switch(d.label){case 0:return i=(r=r||{}).chunkSizeBytes||1024*Lo,[4,Bo(t,i)];case 1:if(o=d.sent(),a=o.result,s="FileReaderSync"in self,u=a.data,!r.acceptNameDiff&&e.name!==u.databaseName)throw new Error("Name differs. Current database name is ".concat(e.name," but export is ").concat(u.databaseName));if(!r.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=r.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&&eo.ignoreTransaction((function(){return c(l)})),!r.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 r.noTransaction?[4,n()]:[3,7];case 6:return d.sent(),[3,9];case 7:return[4,e.transaction("rw",e.tables,n)];case 8:d.sent(),d.label=9;case 9:return l.done=!0,c&&eo.ignoreTransaction((function(){return c(l)})),[2]}}))}))}function Bo(e,t){return uo(this,void 0,void 0,(function(){var r,n;return co(this,(function(i){switch(i.label){case 0:r="slice"in e?Do(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>Co)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]}}))}))}eo.prototype.export=function(e){return No(this,e)},eo.prototype.import=function(e,t){return jo(this,e,t)},eo.import=function(e,t){return function(e,t){return uo(this,void 0,void 0,(function(){var r,n,i,o;return co(this,(function(a){switch(a.label){case 0:return r=(t=t||{}).chunkSizeBytes||1024*Lo,[4,Bo(e,r)];case 1:return n=a.sent(),i=n.result.data,(o=new eo(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,jo(o,n,t)];case 2:return a.sent(),[2,o]}}))}))}(e,t)};var Uo=r(5733),Fo=r.n(Uo),Mo=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},zo=function(){function e(t){n(this,e),this.config=t;var r=this.config.dbName;this.tableCountTimer=null,this.tableInstance=null,this.clearHistoryDB(),this.dbInstance=new eo(r)}return s(e,[{key:"setConfig",value:function(e){this.config=Object.assign(Object.assign({},this.config),e)}},{key:"init",value:function(){return Mo(this,void 0,void 0,Be().mark((function e(){var t,r,n,i,o,a,s,u,c,l,f,h,d,p,v;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this.config,r=t.dbVersion,n=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=t.tableIndex,f="".concat(n,"_").concat(l),h={},d=0;d<s;d++)p=d+1,v="".concat(n,"_").concat(p),h[v]=o;if(e.prev=4,this.isOpen()){e.next=9;break}return this.dbInstance.version(r).stores(h),e.next=9,this.dbInstance.open();case 9:if(!c){e.next=12;break}return e.next=12,this.clearTable();case 12:this.startDetectTimer(u),this.tableInstance=this.dbInstance[f],this.detectTableHealthy(),e.next=23;break;case 17:if(e.prev=17,e.t0=e.catch(4),"VersionError"!==e.t0.name){e.next=23;break}return this.clearHistoryDB(!0),e.next=23,this.init();case 23:case"end":return e.stop()}}),e,this,[[4,17]])})))}},{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 Mo(this,void 0,void 0,Be().mark((function t(){return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.tableInstance.add(e);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),console.log("add db failed: ",t.t0);case 8:case"end":return t.stop()}}),t,this,[[0,5]])})))}},{key:"bulkAdd",value:function(e){return Mo(this,void 0,void 0,Be().mark((function t(){return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.tableInstance.bulkAdd(e);case 3:t.next=15;break;case 5:if(t.prev=5,t.t0=t.catch(0),console.log("bulk add db failed: ",t.t0),"DatabaseClosedError"!==t.t0.name){t.next=15;break}return console.log("reopen db, try again"),t.next=12,this.dbInstance.open();case 12:return t.next=14,this.bulkAdd(e);case 14:this.close();case 15:case"end":return t.stop()}}),t,this,[[0,5]])})))}},{key:"clearHistoryDB",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.config,n=r.deleteDBNames,i=r.isUpdateVersion,o=r.dbName;(t||i)&&this.delete(o),!t&&n&&n.length&&n.forEach((function(t){e.delete(t)}))}},{key:"exportBlob",value:function(e){return Mo(this,void 0,void 0,Be().mark((function t(){var r,n,i;return Be().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,r="".concat(o.getMonth()+1,"-").concat(o.getDate()," ").concat(o.getHours(),":").concat(o.getMinutes(),":").concat(o.getSeconds()," ").concat(o.getMilliseconds()),t.next=6,No(this.dbInstance,{prettyJson:!0,progressCallback:this.progressCallback});case 6:return n=t.sent,t.next=9,this.generateZipBlobAsync(n,r,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]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Mo(this,void 0,void 0,Be().mark((function n(){var i,o;return Be().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=new(Fo()),n.next=3,i.file("XY_WebSDK_LOG_".concat(r,"_").concat(t,".json"),e,{});case 3:return n.next=5,i.generateAsync({compressionOptions:{level:9},mimeType:"application/zip",compression:"DEFLATE",type:"blob"});case 5:return o=n.sent,n.abrupt("return",o);case 7:case"end":return n.stop()}}),n)})))}},{key:"progressCallback",value:function(e){e.totalRows,e.completedRows;return!0}},{key:"detectTableHealthy",value:function(){return Mo(this,void 0,void 0,Be().mark((function e(){var t,r;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getTableLength();case 2:if(t=e.sent,!((r=this.config.maxSize)&&t&&t>r)){e.next=7;break}return e.next=7,this.clearTable();case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getTableLength",value:function(){return Mo(this,void 0,void 0,Be().mark((function e(){var t,r,n,i,o,a;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.config,r=t.tableName,n=t.tableIndex,i="".concat(r,"_").concat(n),e.next=5,this.dbInstance[i].count();case 5:return o=e.sent,e.abrupt("return",o);case 9:if(e.prev=9,e.t0=e.catch(0),console.log("get table count failed: ",e.t0),a=0,"DatabaseClosedError"!==e.t0.name){e.next=21;break}return console.log("reopen db, try again"),e.next=17,this.dbInstance.open();case 17:return e.next=19,this.getTableLength();case 19:a=e.sent,this.close();case 21:if(!a){e.next=23;break}return e.abrupt("return",a);case 23:return e.abrupt("return",Promise.reject(e.t0));case 24:case"end":return e.stop()}}),e,this,[[0,9]])})))}},{key:"clearLimitTable",value:function(){return Mo(this,void 0,void 0,Be().mark((function e(){var t,r,n,i=this;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.config,r=t.clearLimit,n=t.clearOffset;try{this.tableInstance.orderBy("id").offset(n).limit(r).primaryKeys().then((function(e){i.tableInstance.bulkDelete(e)}))}catch(e){console.log("bulk delete error: ",e)}case 2:case"end":return e.stop()}}),e,this)})))}},{key:"clearTable",value:function(){return Mo(this,void 0,void 0,Be().mark((function e(){var t,r,n,i;return Be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.config,r=t.tableName,n=t.tableIndex,i="".concat(r,"_").concat(n),!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){eo.delete(e)}},{key:"open",value:function(){var e;return Mo(this,void 0,void 0,Be().mark((function t(){return Be().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 Ko=zo;r(6409);const Wo=function(){function e(){n(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(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){return 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,n.taskCompletedCB&&n.taskCompletedCB()}))}},{key:"isTaskEnded",value:function(){return!(this.waitingQueue.length||this.isRunning)}},{key:"taskLength",value:function(){return this.waitingQueue.length}},{key:"clear",value:function(){this.waitingQueue=[],this.isRunning=!1}}]),e}();var Vo,Go=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ho=self,Yo=function(){function e(){n(this,e),this.taskQueue=null,this.dbManager=null,this.isProgress=!1,this.onTaskEnd=null,this.cacheLogData=[],this.detectCacheDataTimer=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 Wo,this.taskQueue.onTaskCompleted(this.onTaskCompleted)),this.dbManager||(this.dbManager=new Ko(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 r=e.data,n=e.config,i=r.hourTime,o=r.fullTime,a=r.title,s=r.content,u=r.rest,c=n.isConsole,l=n.kind,f=n.scope,h=s;Ue.isString(s)&&(h=JSON.parse(s));var d,p=function(e,t){if(!Ue.isObject(e))return e;var r=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object.assign({},t);if(r.forEach((function(e){void 0!==i[e]&&null!==i[e]&&""!==i[e]&&(i[e]="******")})),n)for(var o in i)Ue.isObject(i[o])&&(i[o]=e(i[o],r));return i};if(Ue.isString(t))return r(e,[t]);var n=["response","headers"].some((function(t){return e[t]&&Ue.isObject(e[t])}));return Ue.isArray(t)?r(e,t,n):e}(h,it),v=f?"[".concat(f,"]"):"";c&&(d=console).log.apply(d,["[".concat(i,"]").concat(v,"[").concat(l,"]"),a,h].concat(t(u)));var y={t:"".concat(o).concat(v,"[").concat(l,"] ").concat(a),c:JSON.stringify(p)};this.cacheLogData.push(y),this.processorLog(25)}},{key:"processorLog",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=ze()(this.cacheLogData);if(r.length>=t||0===t)try{this.taskQueue&&(this.taskQueue.addTask((function(){return e.dbManager.bulkAdd(r)})),this.cacheLogData=[])}catch(e){console.log("add data error: ",e)}else this.detectCacheDataTimer||(this.detectCacheDataTimer=setTimeout((function(){e.processorLog(),e.clearCacheDataTimer()}),200))}},{key:"clearCacheDataTimer",value:function(){clearTimeout(this.detectCacheDataTimer),this.detectCacheDataTimer=null}},{key:"destroy",value:function(e){var t;this.cacheLogData.length&&this.processorLog(),this.clearCacheDataTimer(),this.isProgress=!1,this.onTaskEnd=e,(null===(t=this.taskQueue)||void 0===t?void 0:t.isTaskEnded())&&this.onTaskCompleted()}},{key:"onTaskCompleted",value:function(){var e=ae.DESTROY;this.isProgress||(this.dbManager.close(),this.dbManager=null,this.cacheLogData=[],Ho.postMessage({type:e,data:{},config:{}}),this.onTaskEnd&&this.onTaskEnd())}},{key:"exportBlob",value:function(e){return Go(this,void 0,void 0,Be().mark((function t(){var r,n,i,o,a,s;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.data,n=e.config,i=e.type,o=r.fileName,a=r.key,t.next=4,this.dbManager.exportBlob(o);case 4:s=t.sent,Ho.postMessage({type:i,data:Object.assign({blob:s,key:a},r),config:n});case 6:case"end":return t.stop()}}),t,this)})))}}]),e}();Ho.onmessage=function(e){var t=ae.LOGGER,r=ae.INIT,n=ae.DESTROY,i=ae.DOWNLOAD,o=ae.UPLOAD,a=ae.GET_DATA,s=e.data,u=s.type,c=s.config;switch(u){case r:Vo||(Vo=new Yo),Vo.init(c);break;case t:null==Vo||Vo.logger(s);break;case n:null==Vo||Vo.destroy((function(){Vo=null,close()}));break;case a:case i:case o:null==Vo||Vo.exportBlob(s)}}})()})();',"Worker",void 0,void 0)}function On(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 Tn(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 Tn(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Tn(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 _n={storage:window.localStorage,set:function(e,t){if(t){var r=An(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=On(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()}}},An=function(e){if(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t?JSON.stringify(e):e}};const Rn=_n;var Nn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Dn=new Uint8Array(16);function Ln(){if(!Nn)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nn(Dn)}for(var Pn=[],Mn=0;Mn<256;++Mn)Pn[Mn]=(Mn+256).toString(16).substr(1);const Un=function(e,t){var r=t||0,n=Pn;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 jn=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||Ln)();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||Un(i)};r(2227);var Bn=r(3792),Fn=r.n(Bn),Gn=r(3434),Kn=r(9669),Vn=r.n(Kn),Hn={version:r(4147).i8,createTime:"2024-09-02 10:53"},zn="".concat(Hn.version," - build on ").concat(Hn.createTime),Yn=window.location,Wn=Yn.protocol,Xn=void 0===Wn?"":Wn,qn=Yn.hostname,$n={wssProtocol:{"https:":"wss:","http:":"ws:"}[Xn=Xn.includes("http:")&&"localhost"!==qn?"http:":"https:"],protocol:Xn,host:"cloudapi.xylink.com",logHost:"log.xylink.com"};function Zn(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Jn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Zn(o,n,i,a,s,"next",e)}function s(e){Zn(o,n,i,a,s,"throw",e)}a(void 0)}))}}var Qn,ei,ti,ri=r(3332),ni=r.n(ri),ii=r(129),oi=r.n(ii),ai=r(7484),si=r.n(ai),ui=r(1354),ci=r.n(ui),li=r(2362),hi=r.n(li),fi=r(8575),di="/api/rest/uaa/external/sysinfo",pi="XY_GATEWAY_TIME_OFFSET",vi=function(){return e=Date.now(),si()(e).format("YYYY-MM-DD HH:mm:ss SSS");var e},gi=function(){function t(r){e(this,t),ot(this,"banner",""),ot(this,"debug",!1),this.banner=r||"[xy-api-gateway]"}return a(t,[{key:"updateDebugStatus",value:function(e){this.debug=null!=e?e:this.debug,e&&this.bigWarn("🐞 已开启网关SDK的debug模式,将会打印详细日志,请记得在prd上线前关闭debug模式")}},{key:"print",value:function(e){if(this.debug){for(var t,r=vi(),n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(t=console).log.apply(t,["%c[".concat(r,"]").concat(this.banner),"color: ".concat(e)].concat(i))}}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.print.apply(this,["blue"].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.print.apply(this,["orange"].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.print.apply(this,["red"].concat(t))}},{key:"bigWarn",value:function(e){}}]),t}(),mi=new gi,yi=function(e){Object.entries(e).forEach((function(t){var r=Yr(t,2),n=r[0];null===r[1]&&delete e[n]}))},bi=function(e){return oi().stringify(e,{arrayFormat:"brackets",format:"RFC1738",encoder:function(e){return function(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("").map((function(e){return"'"===e?"%27":/\s/.test(e)?"+":/[0-9a-z!$*@():_.,[\]]/i.test(e)?e:encodeURIComponent(e)})).join("")}(e)}})},Si=function(e){return new Promise((function(t){setTimeout(t,e)}))},wi=(ei=Jn(u().mark((function e(t){var r,n,i,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:0,n=o.length>2&&void 0!==o[2]?o[2]:500,e.prev=2,e.next=5,t();case 5:return i=e.sent,e.abrupt("return",i);case 9:if(e.prev=9,e.t0=e.catch(2),!(r<=0)){e.next=13;break}throw e.t0;case 13:return e.next=15,Si(n);case 15:return mi.log("autoRetry promiseFn ====>",r),e.abrupt("return",wi(t,r-1,n));case 17:case"end":return e.stop()}}),e,null,[[2,9]])}))),function(e){return ei.apply(this,arguments)});function Ei(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(ti=Qn||(Qn={})).MAC="mac",ti.ANDROID="android",ti.IOS="ios",ti.WINQT="winqt",ti.WINPC="winpc",ti.UNKNOW="unknow";var ki=function(){var e=navigator.userAgent,t=Qn.UNKNOW,r=e.includes("XYLINK"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0||/macintosh|mac os x/i.test(e),i=e.includes("Android")&&r,o=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)&&r,a=e.includes("QtWebEngine"),s=e.includes("Window");return n?t=Qn.MAC:i?t=Qn.ANDROID:o?t=Qn.IOS:a?t=Qn.WINQT:s&&(t=Qn.WINPC),{isMac:n,isIos:o,isAndroid:i,isQt:a,isWinPc:s,platformType:t,ua:e}}(),Ii=new Map,xi=new Map,Ci=(function(){var e=Jn(u().mark((function e(t,r,n){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ii.get(r)){e.next=2;break}return e.abrupt("return",n(Ii.get(r)));case 2:if((i=xi.get(r))?xi.set(r,[].concat(Xe(i),[n])):xi.set(r,[n]),!(xi.get(r).length>=2)){e.next=6;break}return e.abrupt("return",!1);case 6:t().then((function(e){xi.get(r).forEach((function(t){t(e)})),Ii.set(r,e),xi.set(r,null)}));case 7:case"end":return e.stop()}}),e)})))}(),ci().enc.Utf8.parse("666412341234122".substring(0,10)+Date.now().toString().substring(0,6))),Oi=ci().enc.Utf8.parse(ci().MD5(navigator.userAgent).toString().substring(0,16)),Ti=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sessionStorage",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"XY_GATEWAY_SDK_CACHE",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];switch(e(this,t),ot(this,"key",Ci),ot(this,"iv",Oi),this.prefix=n,this.useEncrypt=i,r){case"localStorage":this.storage=window.localStorage;break;case"sessionStorage":this.storage=window.sessionStorage;break;default:this.storage=new Map}}return a(t,[{key:"getKey",value:function(e){return this.prefix?"".concat(this.prefix,":").concat(e):e}},{key:"encrypt",value:function(e){return this.useEncrypt?this.encryptFn(e):e}},{key:"decrypt",value:function(e){return this.useEncrypt?this.decryptFn(e):e}},{key:"setItem",value:function(e,t){var r=this.getKey(e),n=this.storage,i=this.encrypt(JSON.stringify(t));this.isStorage()?n.setItem(r,i):n.set(r,i)}},{key:"getItem",value:function(e){try{var t=this.getKey(e),r=this.storage;if(this.isStorage()){var n=r.getItem(t);return n?JSON.parse(this.decrypt(n)):null}var i=r.get(t);return i?JSON.parse(this.decrypt(i)):null}catch(e){mi.error("getItem error:",e)}return null}},{key:"removeItem",value:function(e){var t=this.getKey(e),r=this.storage;this.isStorage()?r.removeItem(t):r.delete(t)}},{key:"isStorage",value:function(){return this.storage instanceof Storage}},{key:"encryptFn",value:function(e){var t=ci().enc.Utf8.parse(e);return ci().AES.encrypt(t,this.key,{iv:this.iv,mode:ci().mode.CBC,padding:ci().pad.Pkcs7}).ciphertext.toString()}},{key:"decryptFn",value:function(e){var t=ci().enc.Hex.parse(e),r=ci().enc.Base64.stringify(t);return ci().AES.decrypt(r,this.key,{iv:this.iv,mode:ci().mode.CBC,padding:ci().pad.Pkcs7}).toString(ci().enc.Utf8).toString()}}]),t}(),_i=(new Ti("memory",void 0,!0),new Ti("sessionStorage",void 0,!0));new Ti("localStorage",void 0,!0);function Ai(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 Ri(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ai(Object(r),!0).forEach((function(t){ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ai(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ni=window,Di=[],Li=[],Pi=Ei((function(){return mi.error("不支持获取网关参数的终端类型 ====>",ki.platformType,ki.ua)})),Mi=function(){Di.forEach((function(e){e()})),Di.length=0},Ui=function(){var e=Jn(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ni.qtBridge){e.next=3;break}return t(),e.abrupt("return");case 3:if(Di.push(t),!(Di.length>=2)){e.next=6;break}return e.abrupt("return");case 6:if(!Ni.qt||!Ni.qt.webChannelTransport){e.next=11;break}if(!Ni.qtHasInit){e.next=9;break}return e.abrupt("return",setTimeout((function(){Mi()}),200));case 9:Ni.qtHasInit=!0,new(ni().QWebChannel)(Ni.qt.webChannelTransport,(function(e){Ni.qtBridge=e.objects.qtBridge,Mi(),Ni.qtInitSuccess&&Ni.qtInitSuccess(),document.dispatchEvent(new Event("onQtInitSuccess"))}));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ji=function(){function t(){e(this,t)}return a(t,[{key:"invokeNative",value:function(e){var t=Array.prototype.slice.call(arguments);t.shift();try{var r;if(ki.isAndroid)return(r=xylink)[e].apply(r,Xe(t));if(ki.isIos)return Ni.webkit.messageHandlers[e].postMessage(Xe(t));throw new Error("unknown native")}catch(t){throw new Error("H5 call native:key:".concat(e," Error:").concat(t))}}},{key:"getApiGatewayParams",value:function(){var e=this,t=new Promise((function(t){try{var r;if(ki.isAndroid){var n=e.invokeNative("getApiGatewayParams");t(e.parseNativeApiGatewayStr(n))}else if(ki.isIos)Li.length<=0&&e.invokeNative("getApiGatewayParams"),Li.push((function(r){t(e.parseNativeApiGatewayStr(r))})),Ni.setApiGatewayParams=function(e){Li.forEach((function(t){t(e)})),Li.length=0};else if(ki.isQt)Ui((function(){var r,n=null===(r=Ni.qtBridge)||void 0===r?void 0:r.getApiGatewayParams;n&&n().then((function(r){t(e.parseNativeApiGatewayStr(r))}))}));else if(ki.isWinPc&&null!=Ni&&null!==(r=Ni.external)&&void 0!==r&&r.getApiGatewayParams){var i,o=null==Ni||null===(i=Ni.external)||void 0===i?void 0:i.getApiGatewayParams();t(e.parseNativeApiGatewayStr(o))}else Pi(),t(null)}catch(e){t(null)}})),r=new Promise((function(e){setTimeout((function(){e(null)}),500)}));return Promise.race([t,r])}},{key:"parseNativeApiGatewayStr",value:function(e){var t;if(!e)throw new Error("native下发的参数为空");if(!function(e){if(!e)return!1;try{return JSON.parse(e),!0}catch(e){return!1}}(window.atob(e)))throw new Error("native下发的JSON参数解析异常");var r=JSON.parse(window.atob(e));if(!r.clientId||!r.access_token)throw new Error("native下发的参数字段缺失");var n=r.ua,i=r.access_token;return delete r.ua,delete r.access_token,Ri(Ri({},r),{},{signSecret:null===(t=r.signSecret)||void 0===t?void 0:t.replace(/&$/,""),"n-ua":n||"",token:i})}}]),t}(),Bi=new ji;"undefined"!=typeof jest&&(hi().defaults.adapter=r(4617));var Fi=hi().create({baseURL:window.location.origin,timeout:3e3,headers:{"Content-Type":"application/json"}});Fi.interceptors.request.use((function(e){return e}),(function(e){return Promise.reject(e)})),Fi.interceptors.response.use((function(e){return 200!==e.status?{error:e,status:e.status,data:e.data}:{data:e.data}}),(function(e){return"ECONNABORTED"===e.code||e.response&&e.response.status,Promise.reject(e)}));var Gi=function(e){return e.then((function(e){return{error:null,data:e.data}})).catch((function(e){return{error:e,data:null==e?void 0:e.response}}))},Ki=Fi,Vi=window,Hi=[],zi=function(e){Vi[pi]=e-Date.now()},Yi=function(){var e=Jn(u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.length>0&&void 0!==d[0]?d[0]:"",n=d.length>1?d[1]:void 0,i=d.length>2?d[2]:void 0,Hi.push(i),!(Hi.length>=2)){e.next=6;break}return e.abrupt("return",!1);case 6:return o=r.replace(/\/$/,"").trim(),a=n.trim()||di,s=wi((function(){return Ki.get("".concat(o).concat(a),{params:{t:Date.now(),sdkVersion:"0.4.9-lite.3"},timeout:5e3})}),2),e.next=12,Gi(s);case 12:if(c=e.sent,l=c.error,h=c.data,!l){e.next=21;break}return window.localStorage.setItem("XY_API_TIME_ERROR",JSON.stringify(l.response)),Hi.forEach((function(e){e(Date.now())})),Hi.length=0,e.abrupt("return",!1);case 21:"number"==typeof(f=null==h||null===(t=h.data)||void 0===t?void 0:t.serverTimestamp)&&f>0?(zi(f),Hi.forEach((function(e){e(f)}))):Hi.forEach((function(e){e(0)})),Hi.length=0;case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Wi=function(){var e=Jn(u().mark((function e(t,r,n){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0,o=Vi[pi],!(i=!!o&&Date.now()+Number(o))||n){e.next=3;break}return e.abrupt("return",i);case 3:return e.abrupt("return",new Promise((function(e){Yi(t,r,(function(t){e(t)}))})));case 4:case"end":return e.stop()}var o}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Xi=ci().enc.Utf8.parse("6664123412341222"),qi=ci().enc.Utf8.parse("1234123412341233"),$i="xAsfDdfgg3dssdth",Zi={encrypt:function(e){var t=ci().enc.Utf8.parse(e);return ci().AES.encrypt(t,Xi,{iv:qi,mode:ci().mode.CBC,padding:ci().pad.Pkcs7}).ciphertext.toString()},decrypt:function(e){var t=ci().enc.Hex.parse(e),r=ci().enc.Base64.stringify(t);return ci().AES.decrypt(r,Xi,{iv:qi,mode:ci().mode.CBC,padding:ci().pad.Pkcs7}).toString(ci().enc.Utf8).toString()},decryptCs:function(e){if(0===e.indexOf($i)){var t=e.replace($i,"");return Zi.decrypt(t).trim()}return e}};function Ji(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 Qi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ji(Object(r),!0).forEach((function(t){ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ji(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var eo=Ei((function(){return mi.warn("检测到你在项目中明文使用clientS字段,如已混淆过,请忽略此条警告")})),to=function(){var e=Jn(u().mark((function e(t,r,n,i){var o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C,O,T,_,A,R,N,D,L;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.method,a=n.url,s=n.params,c=n.body,l=void 0===c?"":c,h=n.clientId,f=void 0===h?"":h,d=n.clientType,p=void 0===d?"":d,v=n.clientSecret,g=void 0===v?"":v,m=n.signSecret,y=void 0===m?"":m,b=n.token,S=void 0===b?"":b,t||mi.warn("请检查SDK初始化配置:host字段配置异常,当前值为:",t),e.next=5,Wi(t,r,i);case 5:if(0!==(w=e.sent)){e.next=8;break}return e.abrupt("return",{error:"ERROR_TIME"});case 8:return E=a,oi().stringify(s)&&(yi(s),k=E.includes("?")?"&":"?",I=bi(s),E+="".concat(k).concat(I)),x=l,l&&"get"===(null==o?void 0:o.toLowerCase())&&(mi.warn("【API网关SDK】如果是GET请求,请求的body体应为空字符串,请排查接口:",a),x=""),x||(x=""),x="string"==typeof x?x:JSON.stringify(x),C=ci().MD5(x).toString(),O=Math.random(),T="x-xy-clientid=".concat(f,"&x-xy-nonce=").concat(O,"&x-xy-signtype=HMAC_SHA256&x-xy-timestamp=").concat(w),32===g.trim().length&&eo(),_=Zi.decryptCs(g),A=(y||_)+"&",R="".concat(o.toLocaleUpperCase(),"\n").concat(T,"\n").concat(E,"\n").concat(C,"\n").concat(A),mi.log("组装后的签名串,如发生签名错误请复制下面内容给到网关同学协助排查:\n",R),N=ci().HmacSHA256(R,A).toString().toLocaleUpperCase(),u=n["n-ua"],D=u.toLocaleLowerCase().includes("xyclientversion")?u:"".concat("PL","=BROWSER&").concat("XYClientVersion","=").concat(u),L=Qi(Qi({"x-xy-clientid":f,"x-xy-clienttype":p,"x-xy-nonce":O,"x-xy-timestamp":w,"x-xy-signtype":"HMAC_SHA256","x-xy-sign":N,"x-xy-signatureversion":"3.0"},S&&{Authorization:"Bearer ".concat(S||"")}),{"n-ua":D}),e.abrupt("return",L);case 27:case"end":return e.stop()}var u}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),ro=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=function(){var e=(new Date).getTime();return"xyxxxxxyxxxxyxxxyxxxxxxxxyxxxxxy".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}();return"".concat(e,"_").concat(t)},no=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,r=ro(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"");return(t+=e.includes("?")?"&":"?")+"tid=".concat(r)};function io(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 oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?io(Object(r),!0).forEach((function(t){ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):io(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ao=function(){var e=Jn(u().mark((function e(t,r,n,i){var o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C,O,T;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.baseURL,s=void 0===a?"":a,c=r.url,l=void 0===c?"":c,h=r.method,f=void 0===h?"GET":h,d=r.params,p=t.host,v=t.timeApiPath,g=t.useNativeToken,m=t.h5ClientIdConfig,y={},b=null,!g){e.next=11;break}return e.next=8,Bi.getApiGatewayParams();case 8:b=e.sent,(null===(S=b)||void 0===S?void 0:S.token)&&Object.assign(y,b);case 11:if(null!==(o=b)&&void 0!==o&&o.token||!m||Object.assign(y,m),w={},t.addTid&&(E=ro(y.clientType),w=oo(oo({},d),{},{tid:E}),r.params=w),null==n||!n.some((function(e){return l.match(new RegExp(e))}))){e.next=16;break}return e.abrupt("return",{});case 16:if(y.clientId){e.next=18;break}return e.abrupt("return",{});case 18:return k=s.startsWith("//")?"https:"+s:s,I=s?fi.parse(k).path:"",(x=fi.parse(l).path||"").startsWith("/")||(x="/"+x),C=(I+x).replace(/\/\//g,"/"),O=r.data,T=(null==r?void 0:r.headers)&&(null==r?void 0:r.headers["Content-Type"]),String(T).indexOf("x-www-form-urlencoded")>=0&&"string"!=typeof O&&(O=oi().stringify(r.data)),e.next=28,to(p,v,oo(oo({},y),{},{method:f,url:C,params:w,body:O}),i);case 28:return e.abrupt("return",e.sent);case 29:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}();function so(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 uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?so(Object(r),!0).forEach((function(t){ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var co=function(){var e=Jn(u().mark((function e(t,r,n,i,o){var a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r,e.prev=1,e.next=4,ao(t,a,n,o);case 4:(s=e.sent).error?mi.error("autoGetApiHeader catch error:",s.error):a.headers=uo(uo({},a.headers),s),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),mi.error("injectHeaderByAxiosInterceptor autoGetApiHeader catch error:",e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r,n,i,o){return e.apply(this,arguments)}}(),lo=function(){function t(r){e(this,t),ot(this,"config",{host:"",useNativeToken:!1,h5ClientIdConfig:null,timeApiPath:di,secConfig:{isEncryptLogin:!1,isEncryptBiz:!1},addTid:!0,debug:!1}),r.debug&&(_i.setItem("debug",!0),mi.updateDebugStatus(r.debug)),r.host=r.host.replace(/\/$/,"").trim(),Object.assign(this.config,r)}var r,n,i;return a(t,[{key:"createApiHeader",value:(i=Jn(u().mark((function e(t,r){var n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.config,i=n.host,o=n.timeApiPath,e.abrupt("return",to(i,o,t,r));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateH5ClientIdConfig",value:function(e){var t,r;null!==(t=this.config)&&void 0!==t&&t.h5ClientIdConfig&&Object.assign(null===(r=this.config)||void 0===r?void 0:r.h5ClientIdConfig,e)}},{key:"autoGetApiHeader",value:(n=Jn(u().mark((function e(t,r,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ao(this.config,t,r,n));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"injectHeaderByAxios",value:(r=Jn(u().mark((function e(t,r,n,i){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",co(this.config,t,r,n,i));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n,i){return r.apply(this,arguments)})}]),t}(),ho=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},fo={token_expired:10002e3,gateway_timestamp_expired:10002015},po=function(){function t(r){var n=this;e(this,t),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.tokenInfo=null,this.logger=null,this.clientId=this.commonOption.clientId||"",this.clientSecret=this.commonOption.clientSecret||"",this.retryCount=0,this.xyApiGatewaySDK=null;var i=Hn.version;this.nua=this.getNuaInfo(i),this.commonOption=Object.assign({timeout:1e4,headers:{"n-ua":this.nua}},r),this.axios=Vn().create(this.commonOption),this.axios.interceptors.request.use((function(e){return ho(n,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.url,n=void 0===r?"":r,e.url=no(n,or.CLIENT_TYPE),1!==this.commonOption.sign){t.next=5;break}return t.next=5,this.setSignHeader(e);case 5:return this.logger&&this.logger.log("[http] request:",e),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t,this)})))})),this.axios.interceptors.response.use((function(e){var t=e||{},r=t.config,i=t.data,o=(r||{}).url,a=void 0===o?"":o;return n.logger&&n.logger.log("[http] response:",{url:a,response:i}),e}),(function(e){return ho(n,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g,m;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(r=e||{}).response,i=r.name,o=r.message,a=r.config,s=(a||{}).url,c=void 0===s?"":s,this.logger&&this.logger.log("[http] response error:",{url:c,response:n,name:i,message:o}),!n){t.next=26;break}if(h=(l=n||{}).status,f=l.data,d=(f||{}).errorCode,p=fo.token_expired,v=fo.gateway_timestamp_expired,400!==h||d!==v){t.next=14;break}return this.logger&&this.logger.log("[http] response error gateway timestamp expired"),t.next=11,this.handleGatewayTimestampExpired(e);case 11:if(!(g=t.sent)){t.next=14;break}return t.abrupt("return",this.axios.request(g));case 14:if(401!==h||d!==p){t.next=26;break}return t.prev=15,this.logger&&this.logger.log("[http] response error token expired"),t.next=19,this.handleTokenExpired(e);case 19:return m=t.sent,t.abrupt("return",this.axios.request(m));case 23:return t.prev=23,t.t0=t.catch(15),t.abrupt("return",Promise.reject(t.t0.response));case 26:return t.abrupt("return",Promise.reject(e.response));case 27:case"end":return t.stop()}}),t,this,[[15,23]])})))}))}return a(t,[{key:"getNuaInfo",value:function(e){var t=e.split("-"),r=t[0],n=t[1]||"",i=window.screen.width,o=window.screen.height,a="".concat(i,"*").concat(o),s=it.browser.getBrowserName(),u=it.browser.getOperationSystem(),c=s;return"PL=webrtc-sdk&AV=".concat(r,"&DR=").concat(n,"&RL=").concat(a,"&MF=").concat(s,"&MO=web&DE=").concat(c,"&OS=").concat(u,"&XYClientVersion=").concat(e,"&API=&LCLO=&LCLA=&CK=")}},{key:"getTokenInfo",value:function(){return this.tokenInfo}},{key:"setTokenInfo",value:function(e){this.tokenInfo=e}},{key:"setLogger",value:function(e){this.logger=e}},{key:"setBaseUrl",value:function(e){var t=this;e!==this.commonOption.baseURL&&delete this.axios.defaults.headers.authorization,this.commonOption.baseURL=e,this.axios.interceptors.request.use((function(e){return e.baseURL=t.commonOption.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,this.xyApiGatewaySDK=this.initXyApiGatewaySDK()}},{key:"initXyApiGatewaySDK",value:function(){return new lo({host:this.commonOption.baseURL||"",useNativeToken:!1,h5ClientIdConfig:{clientType:or.CLIENT_TYPE,clientId:this.clientId,clientSecret:this.clientSecret,"n-ua":this.nua}})}},{key:"setSignHeader",value:function(e){var t,r;return ho(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.method,o=void 0===i?"GET":i,a=e.data,s=e.url,c=void 0===s?"":s,l=e.params,h=e.clientId,f=void 0===h?this.clientId:h,d=e.clientSecret,p=void 0===d?this.clientSecret:d,v="",Object.keys(l).map((function(e){v&&(v+="&");var t=l[e];v+="".concat(e,"=").concat(String(t).indexOf("*")>-1?encodeURIComponent(t):t)})),g=v?c+"&"+v:c,m=this.tokenInfo||{access_token:""},y=m.access_token,b=void 0===y?"":y,S=m.signSecret,w=mt.isString(a)?a:JSON.stringify(a)||"",this.xyApiGatewaySDK||(this.xyApiGatewaySDK=this.initXyApiGatewaySDK()),E=Object.assign(Object.assign({method:o.toLocaleUpperCase(),url:g,body:w,clientType:or.CLIENT_TYPE,clientId:f,clientSecret:p},b&&{signSecret:S,token:b}),{"n-ua":this.nua}),n.next=10,null===(t=this.xyApiGatewaySDK)||void 0===t?void 0:t.createApiHeader(E);case 10:if(n.t0=n.sent,n.t0){n.next=13;break}n.t0={};case 13:return(k=n.t0).error&&(null===(r=this.logger)||void 0===r||r.log("[http] createApiHeader error:",k.error)),e.headers=Object.assign(Object.assign({},e.headers),k),n.abrupt("return",e);case 17:case"end":return n.stop()}}),n,this)})))}},{key:"refreshToken",value:function(e){var t,r,n,i=e.baseURL,o=void 0===i?this.commonOption.baseURL:i,a=e.refresh_token,s=void 0===a?"":a;return ho(this,void 0,void 0,u().mark((function e(){var i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=s||(null===(t=this.tokenInfo)||void 0===t?void 0:t.refresh_token)){e.next=4;break}return null===(r=this.logger)||void 0===r||r.log("[http] refresh_token is null"),e.abrupt("return",Promise.reject(fo));case 4:return e.prev=4,e.next=7,Vn()({method:"post",baseURL:o,url:"admin/login/refresh_token",timeout:5e3,headers:{"x-xy-clientid":this.clientId},data:{refresh_token:s}});case 7:if(!(i=e.sent)||200!==i.status){e.next=15;break}return a=i.data.data,this.tokenInfo=a,null===(n=this.xyApiGatewaySDK)||void 0===n||n.updateH5ClientIdConfig({token:a}),e.abrupt("return",Promise.resolve(a));case 15:return e.abrupt("return",Promise.reject(fo));case 16:e.next=21;break;case 18:return e.prev=18,e.t0=e.catch(4),e.abrupt("return",Promise.reject(fo));case 21:case"end":return e.stop()}}),e,this,[[4,18]])})))}},{key:"handleGatewayTimestampExpired",value:function(e){var t;return ho(this,void 0,void 0,u().mark((function r(){var n,i;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger&&this.logger.log("[http] Gateway timestamp expired:",e.response),!(n=window).retryGetTime){r.next=4;break}return r.abrupt("return",null);case 4:return n[XY_GATEWAY_TIME_OFFSET]=null,(i=e.config).url&&(i.url=i.url.replace(/^https?:\/\/[^/]+/,"")),r.next=9,null===(t=this.xyApiGatewaySDK)||void 0===t?void 0:t.injectHeaderByAxios(i,[],{},!0);case 9:return n.retryGetTime=1,r.abrupt("return",i);case 11:case"end":return r.stop()}}),r,this)})))}},{key:"handleTokenExpired",value:function(e){var t,r,n,i;return ho(this,void 0,void 0,u().mark((function o(){var a,s,c;return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(this.logger&&this.logger.log("[http] token expired:",e.response),!(this.retryCount>=1)){o.next=4;break}return this.retryCount=0,o.abrupt("return",Promise.reject(e));case 4:return o.prev=4,o.next=7,this.refreshToken({baseURL:e.config.baseURL});case 7:if(!(a=o.sent)){o.next=15;break}return s=a.access_token,null===(t=this.logger)||void 0===t||t.log("[http] error.config pre:",e.config),(null===(r=e.config.params)||void 0===r?void 0:r.token)&&(e.config.params.token=s),(null===(n=e.config.data)||void 0===n?void 0:n.includes("token"))&&(c=JSON.parse(e.config.data),e.config.data=JSON.stringify(Object.assign(c,{token:s})),null===(i=this.logger)||void 0===i||i.log("[http] error.config new:",e.config)),this.axios.defaults.headers.post["Content-Type"]="application/json",o.abrupt("return",e.config);case 15:return o.abrupt("return",Promise.reject(e));case 18:return o.prev=18,o.t0=o.catch(4),this.retryCount=0,o.abrupt("return",Promise.reject(e));case 22:case"end":return o.stop()}}),o,this,[[4,18]])})))}}]),t}();const vo=po;r(278);var go=function(e){return Math.pow(2,e)},mo=ot(ot({},ve.USE_SEC_API,{value:go(30),offset:0}),ve.MEETING_SHARE_NEW_PAGE_API,{value:go(0),offset:1}),yo=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const bo=function(){function t(r){e(this,t),this.logger=r.logger,this.action=r.getAction(),this.abilityResult={}}return a(t,[{key:"getAbilityResult",value:function(){return this.abilityResult}},{key:"destroy",value:function(){t.instance=null}},{key:"fetchAbilityInfo",value:function(){return yo(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=p.XY_ABILITY,r=Rn.get(t)||{},n=r.value,i=r.timestamp,o=Date.now(),a=pt(Number(i),Number(o)),this.logger.log("get ability from storage: ",n,a),n&&a<.5){e.next=13;break}return s=Object.values(mo),c=s.reduce((function(e,t){var r=t.offset||0;return e[r]=e[r]|t.value,e}),[]),e.next=10,this.action.getAbility(c);case 10:n=e.sent,this.logger.log("get ability from server: ",n),Rn.set(t,{value:n,timestamp:o});case 13:return this.abilityResult=this.calculateAbilities(n),this.logger.log("get abilityResult: ",this.abilityResult),e.abrupt("return",this.abilityResult);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"calculateAbilities",value:function(e){var t=Object.keys(mo),r={};return t.forEach((function(t){var n=mo[t],i=n.value,o=n.offset,a=e[o];r[t]=0!=(a&i)})),r}}],[{key:"createInstance",value:function(e){return t.instance||(t.instance=new t(e),t.instance.fetchAbilityInfo()),t.instance}}]),t}();var So=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},wo=function(){function t(r){e(this,t),this.logger=r||null,this.httpDefaultBaseUrl="".concat($n.protocol,"//").concat($n.host),this.logHttpDefaultBaseUrl="".concat($n.protocol,"//").concat($n.logHost),this.http=new vo({baseURL:this.httpDefaultBaseUrl,sign:1}),this.logHttp=new vo({baseURL:this.logHttpDefaultBaseUrl,sign:0}),r&&(this.http.setLogger(r),this.logHttp.setLogger(r)),this.meetingInfo={meetingId:"",callUri:"",vcNumber:"",remoteUri:""},this.seqId=0,this.statesTime={timeDiff:0},this.commonParams={securityKey:""},this.randomDeviceSN=jn()}return a(t,[{key:"getTokenInfo",value:function(){return this.http.getTokenInfo()||{}}},{key:"setBaseUrl",value:function(e){var t=e.baseUrl,r=e.logUrl;t&&this.http.setBaseUrl(t),r&&this.logHttp.setBaseUrl(r)}},{key:"setClientInfo",value:function(e){var t=e.clientId,r=e.clientSecret;this.http.setClientInfo({clientId:t,clientSecret:r})}},{key:"setMeetingInfo",value:function(e){this.meetingInfo=e||{}}},{key:"setTokenInfo",value:function(e){this.http.setTokenInfo(e)}},{key:"uploadLog",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.name,n=void 0===r?"":r,i=e.account,o=void 0===i?"":i,a=e.comments,s=void 0===a?"":a,c=e.blob,l=new FormData,h=Math.ceil(1e4*Math.random())+"",f=Date.now()+"",l.append("comments",s||n),l.append("sn",h),l.append("userId",h),l.append("deviceId",h),l.append("deviceType","WebrtcSDK"),l.append("userDisplayName",n),l.append("deviceDisplayName",navigator.userAgent),l.append("dataType","userSubmit"),l.append("account",o),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",c,"WEBRTC_LOG.zip"),t.next=23,this.logHttp.post("/api/rest/v1/log/standardLog",l);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"login",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setTokenInfo(null),r=e.userName,n=e.password,i=e.extId,o="/api/rest/iauth/v5/en/login",i&&(o+="?extId=".concat(i)),t.next=6,this.http.put(o,{account:r,password:n,deviceType:Bt,deviceSn:this.randomDeviceSN});case 6:return a=t.sent,t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"encryptLogin",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.http.setTokenInfo(null),n=e.userName,i=e.password,r.next=4,this.getPublicKey(n);case 4:return o=r.sent,(new(Fn())).setPublicKey(o),a=this.getEncryptPwd(o,i),s={account:n,password:a,deviceType:Bt,pubKey:o,deviceSn:this.randomDeviceSN},r.next=11,this.http.post("/api/rest/iauth/external/en/encrypt/custom/login/v1",s);case 11:if(r.t0=r.sent,r.t0){r.next=14;break}r.t0={};case 14:if(c=r.t0,1000005!==(null===(t=null==c?void 0:c.data)||void 0===t?void 0:t.errorCode)){r.next=19;break}return r.next=18,this.customLogin(Object.assign(Object.assign({},s),{password:this.getEncryptPwd(o,i,!1)}));case 18:c=r.sent;case 19:return r.abrupt("return",c);case 20:case"end":return r.stop()}}),r,this)})))}},{key:"getSdkUserInfo",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.http.setTokenInfo(null),r=e.displayName,n=e.extId,i=e.extUserId,o=void 0===i?"":i,a=e.tempUser,s=void 0!==a&&a,c={extId:n,displayName:r},o&&Object.assign(c,{externalUserId:o}),t.next=6,this.http.post("/api/rest/sdk/external/webrtc/user/v1?enterpriseId=".concat(n,"&istempUser=").concat(s),c);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()}}),t,this)})))}},{key:"getUserInfo",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r;return u().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)||!r.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()}}),t,this)})))}},{key:"getCallUri",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=this.commonParams.securityKey,!((null===(t=bo.instance)||void 0===t?void 0:t.getAbilityResult())||{})[ve.USE_SEC_API]){r.next=8;break}return r.next=5,this.http.post("/api/rest/uss/external/sec/callUrlInfo/v1",{},{params:Object.assign(Object.assign({},e),{securityKey:n,deviceType:Bt})});case 5:case 10:return r.abrupt("return",r.sent);case 8:return r.next=10,this.http.get("/api/rest/uss/v4/callUrlInfoV2",{params:Object.assign(Object.assign({},e),{securityKey:n,deviceType:Bt,version:"v5"})});case 11:case"end":return r.stop()}}),r,this)})))}},{key:"verifyPassword",value:function(e,t){var r;return So(this,void 0,void 0,u().mark((function n(){var i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=this.commonParams.securityKey,!((null===(r=bo.instance)||void 0===r?void 0:r.getAbilityResult())||{})[ve.USE_SEC_API]){n.next=8;break}return n.next=5,this.http.post("/api/rest/uss/external/sec/validation/v1?securityKey=".concat(i,"&deviceType=").concat(Bt),{number:e,passwd:t,validationType:"passwd"});case 5:case 10:return n.abrupt("return",n.sent);case 8:return n.next=10,this.http.put("/api/rest/uss/v4/en/cloudmeeting/validation?securityKey=".concat(i),{number:e,passwd:t});case 11:case"end":return n.stop()}}),n,this)})))}},{key:"hand",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,n=this.meetingInfo||{},i=n.meetingId,o=n.callUri,a=n.vcNumber,t.next=4,this.http.post("/page/api/rest/v2/".concat(e,"?meetingId=").concat(i,"&di=").concat(o,"&conferenceNo=").concat(a,"&securityKey=").concat(r));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getDefaultServerConfig",value:function(){return So(this,void 0,void 0,u().mark((function e(){return u().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 So(this,void 0,void 0,u().mark((function t(){return u().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()}}),t,this)})))}},{key:"getCodeByJson",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,new vo({baseURL:""}).get(e);case 4:(n=t.sent)&&200===n.status&&n.data&&(r=n.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()}}),t,null,[[1,8]])})))}},{key:"getConference",value:function(e,t,r){return So(this,void 0,void 0,u().mark((function n(){var i,o;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=(r||{}).autoMute,o=void 0===i?0:i,n.abrupt("return",this.http.get("/api/rest/v1/meetingroom/hidden/soft/conference?userProfileId=".concat(e,"&securityKey=").concat(t,"&autoMute=").concat(o)));case 2:case"end":return n.stop()}}),n,this)})))}},{key:"setStates",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w=this;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams,i=n.callUri,o=n.securityKey,a=this.meetingInfo.meetingId,s=void 0===a?"":a,c=String((new Date).getTime()),l=String((new Date).getTime()+this.statesTime.timeDiff),h=[],[],mt.isArray(e)?h=e:h.push(e),f=h.map((function(e){var t=e.category,r=e.eventName,n=e.params,i=mt.isObject(n)?JSON.stringify(n):"",o={seqId:String(w.seqId),createTime:c,alignTime:l,category:t,eventName:r,version:"1.0",meetingId:s,eventValue:i};return w.seqId++,o})),d={securityKey:o,device:i,msgVer:"0.0.2",sendTime:String((new Date).getTime()),states:f},r.prev=9,p=(new Date).getTime(),r.next=13,this.http.post("/api/rest/v3/device/v2states",d);case 13:v=r.sent,(null===(t=null==v?void 0:v.data)||void 0===t?void 0:t.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),r.next=19;break;case 17:r.prev=17,r.t0=r.catch(9);case 19:case"end":return r.stop()}}),r,this,[[9,17]])})))}},{key:"ignoreMeetingMonitor",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(1e3*Math.random()).toFixed(),n=this.commonParams.securityKey,i="/api/rest/uss/v1/cloudmeeting/monitor?securityKey=".concat(n,"&conferenceNumber=").concat(e,"&nonce=").concat(r),t.next=5,this.http.get(i);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getAllocation",value:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return So(this,void 0,void 0,u().mark((function i(){var o,a;return u().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o="".concat(t,"/api/rest/allocator/v1/webrtc/allocation?key=").concat(e,"&enterpriseId=").concat(r),a={},n||(a={sign:0}),i.next=5,this.http.get(o,a);case 5:return i.abrupt("return",i.sent);case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getWatermarkContent",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=(null===(t=bo.instance)||void 0===t?void 0:t.getAbilityResult())||{},o=i[ve.USE_SEC_API]?"/api/rest/cloudmeetingroom/external/sec/watermarkContent/v1?securityKey=".concat(n,"&number=").concat(e):"/api/rest/v1/meetingroom/conferenceNumber/watermarkContent/".concat(e,"?securityKey=").concat(n),r.next=5,this.http.get(o);case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"getEnterpriseId",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return","");case 2:return n="/api/rest/v1/sdk/enterpriseToken/findByExtId?extId=".concat(e),r.next=5,this.http.get(n,{sign:1});case 5:if(r.t0=r.sent,r.t0){r.next=8;break}r.t0={};case 8:if(200!==(i=r.t0).status){r.next=11;break}return r.abrupt("return",(null===(t=i.data)||void 0===t?void 0:t.enterpriseId)||"");case 11:return r.abrupt("return","");case 12:case"end":return r.stop()}}),r,this)})))}},{key:"locator",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="/api/rest/v1/locator/".concat(e,"/node/config"),n=[],t.prev=2,t.next=5,this.http.get(r);case 5:200===(i=t.sent).status&&(n=i.data||[]),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(2);case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this,[[2,9]])})))}},{key:"monitorOperation",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().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,n=r.data,i=r.status,t.abrupt("return",[200!=+i,n]);case 10:case"end":return t.stop()}}),t,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,t){return So(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return"/api/rest/v3/en/recording/authorization",n=this.commonParams.securityKey,r.next=4,this.http.get("/api/rest/v3/en/recording/authorization",{params:{confNumber:e,meetingId:t,securityKey:n}});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"checkStorageSpaceWithRecordingUrl",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r;return u().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()}}),t,this)})))}},{key:"getEnterpriseMediaConfig",value:function(e,t){return So(this,void 0,void 0,u().mark((function r(){var n,i;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,r.next=3,this.http.post("/api/rest/clientConfg/external/enterpriseConfig/v4",t,{params:{userId:e,securityKey:n,deviceType:Bt}});case 3:if(200!==(i=r.sent).status){r.next=6;break}return r.abrupt("return",i.data||{});case 6:return r.abrupt("return",{});case 7:case"end":return r.stop()}}),r,this)})))}},{key:"getEnterpriseConfig",value:function(e,t){return So(this,void 0,void 0,u().mark((function r(){var n,i,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=(new Date).getMilliseconds(),"enterpriseConfig",r.next=5,this.http.get("/api/rest/css/v1/client/configs?securityKey=".concat(n,"&userId=").concat(e,"&enterpriseId=").concat(t,"&clientTimeMillis=").concat(i,"&configType=").concat("enterpriseConfig"));case 5:if(200!==(o=r.sent).status){r.next=8;break}return r.abrupt("return",o.data||{});case 8:return r.abrupt("return",{});case 9:case"end":return r.stop()}}),r,this)})))}},{key:"refreshToken",value:function(e){return So(this,void 0,void 0,u().mark((function t(){return u().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()}}),t,this)})))}},{key:"getMeetingInviteInfo",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=e.conferenceNumber,o=e.meetingId,a=(null===(t=bo.instance)||void 0===t?void 0:t.getAbilityResult())||{},s=a[ve.MEETING_SHARE_NEW_PAGE_API]?"/page/client/shareConference/newInfo":"/page/client/shareConference/infomation",r.next=6,this.http.get(s,{params:{conferenceNumber:i,securityKey:n,meetingId:o}});case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"getCloudMeetingRooms",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=(null===(t=bo.instance)||void 0===t?void 0:t.getAbilityResult())||{},o=i[ve.USE_SEC_API]?"/api/rest/cloudmeetingroom/external/sec/byUserId/v1":"/api/rest/v3/en/user/".concat(e,"/cloudMeetingRooms"),r.next=5,this.http.get(o,{params:{securityKey:n,userId:e}});case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"getInComingCallUrlInfo",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i={avatar:""},o=(null===(t=bo.instance)||void 0===t?void 0:t.getAbilityResult())||{},a=o[ve.USE_SEC_API]?"/api/rest/uss/external/sec/incomingcallUrlInfo/v1?securityKey=".concat(n,"&deviceType=").concat(Bt,"&callUrl=").concat(e):"/api/rest/v4/en/incomingcallUrlInfo?securityKey=".concat(n,"&callUrl=").concat(e),r.prev=4,r.next=7,this.http.get(a);case 7:200===(s=r.sent).status&&(i=s.data||{}),r.next=13;break;case 11:r.prev=11,r.t0=r.catch(4);case 13:return r.abrupt("return",i);case 14:case"end":return r.stop()}}),r,this,[[4,11]])})))}},{key:"sendVideoControlResult",value:function(e,t){return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=this.meetingInfo,o=i.meetingId,a=void 0===o?"":o,s=i.callUri,c=i.vcNumber,r.next=4,this.http.post("/page/api/rest/v2/callback?securityKey=".concat(n,"&meetingId=").concat(a,"&deviceUri=").concat(s,"&conferenceNo=").concat(c,"&mpvc="),{type:e,value:t});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"signIn",value:function(e){var t=e.deviceId,r=e.questionnaireId;return So(this,void 0,void 0,u().mark((function e(){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.commonParams.securityKey,e.next=3,this.http.post("/api/rest/v2/en/vote/sign?SK=".concat(n),{deviceId:t,questionnaireId:r,deviceType:Bt});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"verifyControlPassword",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,n=this.meetingInfo,i=n.meetingId,o=void 0===i?"":i,a=n.callUri,s=void 0===a?"":a,c=n.vcNumber,l=void 0===c?"":c,t.next=4,this.http.post("/page/api/rest/v2/authentication",{pwd:e},{params:{securityKey:r,deviceUri:s,meetingId:o,conferenceNo:l}});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getSignInText",value:function(e){var t=e.type,r=e.environment,n=e.businessType;return So(this,void 0,void 0,u().mark((function e(){var i,o,a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.commonParams.securityKey,o=null,e.prev=2,e.next=5,this.http.get("/api/rest/vote/v2/business/dataCallback",{params:{securityKey:i,deviceType:Bt,version:"2.0.0",businessType:n,action:t,environment:r}});case 5:a=e.sent,s=a.data,200===a.status&&(o=s),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(2);case 13:return e.abrupt("return",o);case 14:case"end":return e.stop()}}),e,this,[[2,11]])})))}},{key:"loginWithAuthCode",value:function(e){var t=e.extId,r=e.extUserId,n=e.displayName,i=e.oauthCode,o=e.isTempUser,a=e.channelId;return So(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.http.setTokenInfo(null),e.next=3,this.http.post("/api/rest/v1/en/sdk/sec/loginWithAuthCode?extId=".concat(t,"&istempUser=").concat(o),{deviceSn:this.randomDeviceSN,deviceType:Bt,authCode:i,externalUserId:r,channelId:a,displayName:n,countryCode:"+86"});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"loginWithUnified",value:function(e,t){return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t.extId,i=t.extUserId,o=t.tempUser,a=t.account,s=void 0===a?"":a,c=t.password,l=void 0===c?"":c,h=t.authCode,f=t.displayName,d=void 0===f?"":f,p=t.countryCode,this.http.setTokenInfo(null),v=Se.XYAccount,g=Se.ExtUserId,m={deviceSn:this.randomDeviceSN,deviceType:Bt},y="/api/rest/sdkserver/external/client/sdk/login/v1?userFlag=webRtc&extId=".concat(n),e!==v){r.next=13;break}return r.next=8,this.getPublicKey(s);case 8:b=r.sent,S=this.getEncryptPwd(b,l),m=Object.assign(Object.assign({},m),{countryCode:p,account:s,password:S,pubKey:b}),r.next=14;break;case 13:e===g?(m=Object.assign(Object.assign({},m),{authCode:h,displayName:d}),y+="&externalUserId=".concat(i,"&tempUser=").concat(o)):m=Object.assign(Object.assign({},m),{authCode:h});case 14:return r.next=16,this.http.post(y,m);case 16:return w=r.sent,r.abrupt("return",w);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"setMeetingFocusView",value:function(e,t){return So(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=this.commonParams.securityKey,i=this.meetingInfo,o=i.meetingId,a=void 0===o?"":o,s=i.vcNumber,r.next=4,this.http.post("/page/api/rest/v2/focus_layout",{},{headers:{"Content-Type":"application/json"},params:{securityKey:n,meetingId:a,conferenceNo:s,deviceUri:e,action:t}});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"rename",value:function(e){return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.commonParams.securityKey,n=this.meetingInfo,i=n.meetingId,o=void 0===i?"":i,a=n.vcNumber,s=n.callUri,t.next=4,this.http.post("/page/api/rest/v2/device_name",{name:e},{headers:{"Content-Type":"application/json"},params:{deviceUri:s,meetingId:o,securityKey:r,conferenceNo:a}});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"fetchMeetingControlInfo",value:function(){return So(this,void 0,void 0,u().mark((function e(){var t,r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.commonParams.securityKey,r=this.meetingInfo,n=r.vcNumber,i=r.meetingId,"/api/rest/css/v1/host/client/meeting/control",e.next=5,this.http.get("/api/rest/css/v1/host/client/meeting/control",{params:{securityKey:t,conferenceNo:n,scheduledMeetingId:i}});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getAbility",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return So(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.prev=1,t.next=4,this.http.post("/api/rest/clientConfg/external/unsafe/ability/v1",e);case 4:n=t.sent,i=n.status,o=n.data,200===i&&(r=o),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(1);case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this,[[1,9]])})))}},{key:"endAllMeeting",value:function(){return So(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.commonParams.securityKey,r=this.meetingInfo||{},n=r.meetingId,i=r.remoteUri,o=r.vcNumber,e.next=4,this.http.post("/page/api/rest/v2/endMeeting",{headers:{"content-type":"application/x-www-form-urlencoded"}},{params:{securityKey:t,conferenceNo:o,callUri:i,meetingId:n}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"setCommonParams",value:function(e){var t=e||{},r=t.securityKey,n=t.callUri,i=t.userProfile,o=((void 0===i?{}:i)||{}).id,a=or.CLIENT_TYPE.toUpperCase();n=n||"".concat(o,"@").concat(a),this.commonParams.securityKey=r,this.commonParams.callUri=n}},{key:"getPublicKey",value:function(e){var t;return So(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.http.get("/api/rest/iauth/v1/en/publicKey",{params:{account:e,deviceType:Bt}});case 2:if(200!==(n=r.sent).status){r.next=5;break}return r.abrupt("return",(null===(t=n.data)||void 0===t?void 0:t.pubkey)||"");case 5:return r.abrupt("return","");case 6:case"end":return r.stop()}}),r,this)})))}},{key:"customLogin",value:function(e){return So(this,void 0,void 0,u().mark((function t(){return u().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()}}),t,this)})))}},{key:"encryptPassword",value:function(e,t){var r,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=new(Fn());i.setPublicKey(e);var o="";return o=n?i.encryptLong((0,Gn.sha512)(t)):i.encryptLong(t),null===(r=this.logger)||void 0===r||r.log("encrypt password string length:",o.length),o}},{key:"getEncryptPwd",value:function(e,t){var r,n,i,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.encryptPassword(e,t,o);try{var s=atob(a).length;if(null===(r=this.logger)||void 0===r||r.log("encrypt password base64 array length:",s),s%128!=0)return null===(n=this.logger)||void 0===n||n.log("retry encrypt password"),this.encryptPassword(e,t,o)}catch(r){return null===(i=this.logger)||void 0===i||i.log("retry encrypt password:",r),this.encryptPassword(e,t,o)}return a}}]),t}();const Eo=wo;var ko=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Io=fe.INIT,xo=fe.DESTROY,Co=fe.LOGGER,Oo=fe.DOWNLOAD,To=fe.UPLOAD,_o=fe.GET_DATA,Ao=he.LOG,Ro=he.ERROR,No=he.WARN,Do=he.DEBUG,Lo=he.FATAL,Po=function(){function t(r){var n=this;e(this,t),this.setLogLevel=function(e){n.currentLevel=e},this.setLogServer=function(e){n.action.setBaseUrl({logUrl:e})},this.downloadLog=function(e){return new Promise((function(t){return ko(n,void 0,void 0,u().mark((function r(){var n,i,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.isProgress){r.next=6;break}i=jn(),null===(n=this.worker)||void 0===n||n.postMessage({type:Oo,data:{fileName:e,key:i},config:{}}),this.taskPromiseMap[i]=t,r.next=13;break;case 6:return this.start(!1),r.next=9,this.downloadLog();case 9:return o=r.sent,r.next=12,this.stopWithoutUpdateIndex();case 12:t(o);case 13:case"end":return r.stop()}}),r,this)})))}))},this.config=Object.assign(Object.assign({},mr),r),this.action=new Eo,this.isArrowUpload=!0,this.currentLevel=de.NONE,this.worker=null,this.isProgress=!1,this.isUpdateVersion=!1,this.taskPromiseMap={},this.stopTaskKey="STOP_LOGGER_TASK_KEY",this.start(),this.onMessage=this.onMessage.bind(this)}return a(t,[{key:"getConfig",value:function(){return this.config}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.enableClearTable;if(this.isProgress)return"The log module is already enabled, please stop it first";this.updateTableIndex(!1),this.worker||(this.worker=new Cn,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:Io,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 t;return ko(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=e.data,i=n.type,o=n.data,a=n.config,s=o.blob,c=o.key,l=this.taskPromiseMap[c],r.t0=i,r.next=r.t0===xo?6:r.t0===Oo?10:r.t0===To?13:r.t0===_o?18:20;break;case 6:return null===(t=this.worker)||void 0===t||t.terminate(),this.worker=null,this.destroyPromiseTask(),r.abrupt("break",21);case 10:return xn()(s,"XY_WebSDK_LOG_".concat(ft(),".zip"),"application/zip"),l&&l(!0),r.abrupt("break",21);case 13:return r.next=15,this.uploadLogProcess(a,s);case 15:return h=r.sent,l&&l(h),r.abrupt("break",21);case 18:return l&&l(o),r.abrupt("break",21);case 20:return r.abrupt("break",21);case 21:case"end":return r.stop()}}),r,this)})))}},{key:"destroyPromiseTask",value:function(){return ko(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t in this.taskPromiseMap)(r=this.taskPromiseMap[t])&&(t===this.stopTaskKey&&this.updateTableIndex(!0),r(!0),delete this.taskPromiseMap[t]);this.taskPromiseMap={};case 2:case"end":return e.stop()}}),e,this)})))}},{key:"stop",value:function(){return ko(this,void 0,void 0,u().mark((function e(){var t=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var r;t.isProgress=!1;var n=t.stopTaskKey;null===(r=t.worker)||void 0===r||r.postMessage({type:xo,data:{},config:{}}),t.taskPromiseMap[n]?(console.log("duplicate invoke stop logger"),t.destroyPromiseTask(),e(!0)):t.taskPromiseMap[n]=e})));case 1:case"end":return e.stop()}}),e)})))}},{key:"stopWithoutUpdateIndex",value:function(){return ko(this,void 0,void 0,u().mark((function e(){var t=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var r;t.isProgress=!1,null===(r=t.worker)||void 0===r||r.postMessage({type:xo,data:{},config:{}}),e(!0)})));case 1:case"end":return e.stop()}}),e)})))}},{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,r=t.tableCount,n=t.dbName,i=t.dbVersion,o=t.tableIndex,a="XY-LOGGER-".concat(n),s=Rn.get(a)||{},u=s.index,c=void 0===u?o:u,l=s.version,h=void 0===l?i:l,f=s.count,d=void 0===f?r:f,p=c,v=h,g=d;e||r&&c&&c>r&&(p=1),e&&(p=r&&c&&c<r?c+1:1);var m=r&&d&&r!==d;(i&&h&&i>h||m)&&(this.isUpdateVersion=!0,v=i,this.config.dbVersion=v),m&&(g=r,this.config.tableCount=g);var y={version:v,index:p,count:g};Rn.set(a,y)}},{key:"getTableIndex",value:function(){var e=this.config.dbName,t="XY-LOGGER-".concat(e),r=(Rn.get(t)||{}).index,n=void 0===r?1:r,i=n;return n&&(i=n),i}},{key:"log",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=de.INFO,n=[de.DEBUG,r].includes(this.currentLevel),i=ft(),o=dt(),a=bt(t),s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];var l=u.length?bt(u):"",h=this.config.scope||"",f={type:Co,data:{hourTime:o,fullTime:i,title:e,content:a,rest:l},config:{kind:Ao,isConsole:n,scope:h}};this.sendLog(f)}},{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]:"",r=de.DEBUG,n=this.currentLevel===r&&"meeting-stats"!==e,i=ft(),o=dt(),a=bt(t),s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];var l=u.length?bt(u):"",h=this.config.scope||"",f={type:Co,data:{hourTime:o,fullTime:i,title:e,content:a,rest:l},config:{kind:Do,isConsole:n,scope:h}};this.sendLog(f)}},{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]:"",r=[de.INFO,de.DEBUG,de.WARNING].includes(this.currentLevel),n=ft(),i=dt(),o=bt(t),a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];var c=s.length?bt(s):"",l=this.config.scope||"",h={type:Co,data:{hourTime:i,fullTime:n,title:e,content:o,rest:c},config:{kind:No,isConsole:r,scope:l}};this.sendLog(h)}},{key:"error",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=[de.INFO,de.DEBUG,de.WARNING,de.ERROR].includes(this.currentLevel),n=ft(),i=dt(),o=bt(t),a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];var c=s.length?bt(s):"",l=this.config.scope||"",h={type:Co,data:{hourTime:i,fullTime:n,title:e,content:o,rest:c},config:{kind:Ro,isConsole:r,scope:l}};this.sendLog(h)}},{key:"fatal",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=[de.INFO,de.DEBUG,de.WARNING,de.ERROR].includes(this.currentLevel),n=ft(),i=dt(),o=bt(t),a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];var c=s.length?bt(s):"",l=this.config.scope||"",h={type:Co,data:{hourTime:i,fullTime:n,title:e,content:o,rest:c},config:{kind:Lo,isConsole:r,scope:l}};this.sendLog(h)}},{key:"sendLog",value:function(e){var t,r;this.isProgress?null===(t=this.worker)||void 0===t||t.postMessage(e):(this.start(!1),null===(r=this.worker)||void 0===r||r.postMessage(e),this.stopWithoutUpdateIndex())}},{key:"uploadLog",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]:"";return ko(this,void 0,void 0,u().mark((function n(){var i=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise((function(n,o){return ko(i,void 0,void 0,u().mark((function i(){var a,s,c;return u().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(this.isArrowUpload){i.next=2;break}return i.abrupt("return",o(!1));case 2:if(!this.isProgress){i.next=8;break}s=jn(),null===(a=this.worker)||void 0===a||a.postMessage({type:To,data:{fileName:e,key:s},config:{name:e,account:t,comments:r}}),this.taskPromiseMap[s]=n,i.next=15;break;case 8:return this.start(!1),i.next=11,this.uploadLog(e,t,r);case 11:return c=i.sent,i.next=14,this.stopWithoutUpdateIndex();case 14:n(c);case 15:case"end":return i.stop()}}),i,this)})))})));case 1:case"end":return n.stop()}}),n)})))}},{key:"uploadLogProcess",value:function(e,t){return ko(this,void 0,void 0,u().mark((function r(){var n,i;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.action.uploadLog(Object.assign(Object.assign({},e),{blob:t}));case 3:return n=r.sent,i=(n||{}).status,r.abrupt("return",i>=200||i<300);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",!1);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}},{key:"enableLogUpload",value:function(){this.isArrowUpload=!0}},{key:"disableLogUpload",value:function(){this.isArrowUpload=!1}},{key:"getLogData",value:function(){var e=this;return new Promise((function(t){return ko(e,void 0,void 0,u().mark((function e(){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isProgress){e.next=6;break}n=jn(),null===(r=this.worker)||void 0===r||r.postMessage({type:_o,data:{key:n},config:{}}),this.taskPromiseMap[n]=t,e.next=13;break;case 6:return this.start(!1),e.next=9,this.getLogData();case 9:return i=e.sent,e.next=12,this.stopWithoutUpdateIndex();case 12:t(i);case 13:case"end":return e.stop()}}),e,this)})))}))}}]),t}();const Mo=Po;var Uo=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},jo=function(){function t(){e(this,t),this.logMap=new Map,this.action=new Eo,this.createLogger=this.createLogger.bind(this)}return a(t,[{key:"getLogger",value:function(e){return this.logMap.get(e)}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.stop(e),e?this.logMap.delete(e):this.logMap.clear()}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e){var t=this.logMap.get(e);t&&t.stop()}else this.logMap.forEach((function(e){e.stop()}))}},{key:"createLogger",value:function(e){var t=e.dbName,r=Object.assign(Object.assign({},mr),e),n=this.logMap.get(t);return n||(n=new Mo(r),this.logMap.set(t,n)),n}},{key:"setLogServer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(this.action.setBaseUrl({logUrl:e}),t){var r=this.logMap.get(t);r&&r.setLogServer(e)}else this.logMap.forEach((function(t){t.setLogServer(e)}))}},{key:"downloadLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Uo(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!e){t.next=11;break}if(!(n=this.logMap.get(e))){t.next=9;break}return t.next=6,n.getLogData();case 6:i=t.sent,o=i.blob,r=o;case 9:t.next=14;break;case 11:return t.next=13,this.exportAllBlob();case 13:r=t.sent;case 14:return xn()(r,"XY_WebSDK_LOG_".concat(ft(),".zip"),"application/zip"),t.abrupt("return",!0);case 18:return t.prev=18,t.t0=t.catch(0),t.abrupt("return",!1);case 21:case"end":return t.stop()}}),t,this,[[0,18]])})))}},{key:"uploadLog",value:function(e){var t=e.name,r=e.account,n=e.comments,i=e.dbName;return Uo(this,void 0,void 0,u().mark((function e(){var o,a,s,c,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!i){e.next=10;break}if(!(a=this.logMap.get(i))){e.next=8;break}return e.next=6,a.getLogData();case 6:s=e.sent,o=s.blob;case 8:e.next=13;break;case 10:return e.next=12,this.exportAllBlob();case 12:o=e.sent;case 13:if(!o){e.next=19;break}return e.next=16,this.action.uploadLog({name:t,account:r,comments:n,blob:o});case 16:return c=e.sent,l=(c||{}).status,e.abrupt("return",l>=200||l<300);case 19:return e.abrupt("return",!1);case 22:return e.prev=22,e.t0=e.catch(0),e.abrupt("return",!1);case 25:case"end":return e.stop()}}),e,this,[[0,22]])})))}},{key:"exportAllBlob",value:function(){return Uo(this,void 0,void 0,u().mark((function e(){var t,r,n,i=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new(kn()),r=Array.from(this.logMap,(function(e){var r=Yr(e,2),n=r[0],o=r[1];return Uo(i,void 0,void 0,u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getLogData();case 2:return r=e.sent,i=r.blob,e.next=6,t.file("XY_WebSDK_LOG_".concat(n,".zip"),i,{});case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})))})),e.next=4,Promise.all(r);case 4:return e.next=6,t.generateAsync({compressionOptions:{level:9},mimeType:"application/zip",compression:"DEFLATE",type:"blob"});case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})))}}],[{key:"getInstance",value:function(){return t.instance||(t.instance=new t),t.instance}}]),t}();jo.instance=null;var Bo=jo.getInstance();const Fo=jo;var Go=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")},Ko={webrtc:Go(),soft:Go(),hard:Go("nemo"),nemono:Go("nemo"),virtualnemo:Go("nemo"),nemo:Go("nemo"),tvbox:Go("tvbox"),h323:Go("h323"),bruce:Go("bruce"),desk:Go(),tel:Go("tel"),shtl:Go("shtl"),default:Go()},Vo=["hard","nemono","virtualnemo","nemo","tvbox","h323","bruce"],Ho={audioInputList:[],audioOutputList:[],videoInputList:[]},zo={audioInput:"",audioOutput:"",videoInput:""},Yo="default",Wo={deviceId:"",label:"",groupId:""},Xo=(r(939),function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}),qo="__",$o=function(e,t,r,n,i){var o=parseFloat((e/t).toFixed(3)),a=or.RATIO_MAP[i],s=parseFloat((n/o).toFixed(3)),u=parseFloat((r*o).toFixed(3));return o<or.HOR_CONTAINER_RATIO||s>r?s=r:u=n,u>n&&(s=parseFloat((n/o).toFixed(3)),u=n),{realWidth:u,realHeight:s,realRotate:a}},Zo=function(e,t,r){var n=e.width,i=void 0===n?16:n,o=e.height,a=void 0===o?9:o,s=e.rotation,u=void 0===s?0:s,c={transform:"rotateZ(0deg)",width:"",height:""};if(u>=0&&u<=3){var l=1===u||3===u,h=$o(l?a:i,l?i:a,r,t,u),f=h.realWidth,d=h.realHeight,p=h.realRotate;c={transform:"rotateZ(".concat(p,"deg)"),width:"".concat(l?d:f,"px"),height:"".concat(l?f:d,"px")}}return c},Jo=function(){return new Promise((function(e,t){var r,n,i=it.browser.getPlatform().isFirefox,o=["video/VP8","video/H264"],a=["audio/opus"];i&&e({video:o,audio:a});try{a=(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:o=(o=(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 o.indexOf(e)===t})),audio:a})}catch(e){t(e)}}))},Qo=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").concat(qo).concat(e).concat(qo).concat(t)},ea=function(){return Qo(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")},ta=function(e){if(!e)return{endpointId:"",mediagroupId:0,customId:"",rosterId:"",isContent:!1};var t=Yr(e.split(qo),3),r=t[0],n=void 0===r?"":r,i=t[1],o=void 0===i?0:i,a=t[2];return{endpointId:n,mediagroupId:o,customId:void 0===a?"":a,rosterId:ea(n,o),isContent:1===Number(o)}},ra=function(e,t){return"".concat(e,"__").concat(t)},na=function(e){var t={participantId:"",mediagroupId:""};if(!e)return t;var r=e.split("__");return r.length&&(t.participantId=r[0],t.mediagroupId=r[1]),t},ia=function(e){return"SLAVE__".concat(e)},oa=function(e,t,r){return t?"DEFAULT__".concat(r,"__").concat(e):"SPECIFIED__".concat(r,"__").concat(e)},aa=function(e){if(!mt.isString(e))return"";var t=e.trim();if(!t.length)return"";if(mt.isSpecialChar(t)||mt.isNumberText(t)||mt.isLetter(t))return t.charAt(0).toUpperCase();var r=t.replace(/[^a-zA-Z\u4e00-\u9fa5]/g,"");if(!r)return t.charAt(0);var n=r.match(/\b\w/g);if(n)return n[0].toUpperCase();var i=r.length;return i<=2?r:r.substr(i-2)},sa=function(e){return e.replace("-tk-ad","-st")},ua=function(e,t){return Xo(void 0,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||mt.isUndefined(null==e?void 0:e.sinkId)){r.next=11;break}return r.prev=1,r.next=4,e.setSinkId(t);case 4:r.next=11;break;case 6:r.prev=6,r.t0=r.catch(1),n=r.t0,"SecurityError"===r.t0.name&&(n="You need to use https(ssl) in page: ".concat(r.t0)),console.warn("switch audio output err1: ",n);case 11:case"end":return r.stop()}}),r,null,[[1,6]])})))};function ca(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var la=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},ha=function(t){h(n,t);var r=ca(n);function n(t){var i;e(this,n),(i=r.call(this)).isNewLogger=!1,t?i.logger=t:(i.logger=Bo.createLogger({dbName:"XYRTC_DEVICE_LOG",tableName:"LOG"}),i.isNewLogger=!0),i.navigator=navigator||window.navigator,i.deviceLabelMap={},i.previousDeviceList=Ho,i.currentDeviceList=Ho,i.fullDeviceList=Ho,i.systemDefaultDevice={audioInput:null,audioOutput:null,videoInput:null};var o=Le.INIT;i.specifiedDevice={audioInput:{isDefault:!0,deviceId:"",state:o},audioOutput:{isDefault:!0,deviceId:"",state:o},videoInput:{isDefault:!1,deviceId:"",state:o}},i.usedDeviceId=ze()(zo),i.cacheUsedDeviceId=ze()(zo),i.systemDefaultDeviceId=ze()(zo),i.specifiedDefaultDeviceId=ze()(zo);var a=Ne.UNKNOWN;return i.currentPermission={microphone:a,camera:a},i.handlePermissionCameraStateChanged=i.handlePermissionCameraStateChanged.bind(c(i)),i.handlePermissionPhoneStateChanged=i.handlePermissionPhoneStateChanged.bind(c(i)),i.onDeviceChange=i.onDeviceChange.bind(c(i)),i.onDeviceChangeEvent=ht(i.onDeviceChange,50),i.onUpdateFullDeviceList=ht(i.updateFullDeviceList,100),i.initDeviceEvent(),i}return a(n,[{key:"getDevicePermission",value:function(){return this.currentPermission}},{key:"initDeviceAndPermission",value:function(){return la(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("emmit devices: permission and devices"),e.next=3,this.bindDevicePermissionEvent();case 3:case"end":return e.stop()}}),e,this)})))}},{key:"calculateDefaultDevice",value:function(e){var t=De.AUDIOINPUT,r=De.AUDIOOUTPUT,n=De.VIDEOINPUT,i=Le.LOST,o=this.getDefaultDeviceId(),a=o.audioInput,s=o.audioOutput,u=o.videoInput;if(e===t){var c=this.getDefaultDeviceImpl({specifiedDevice:this.specifiedDevice.audioInput,sysDefaultDevice:this.systemDefaultDevice.audioInput,curList:this.currentDeviceList.audioInputList,preList:this.previousDeviceList.audioInputList}),l=c.specifiedDefaultDeviceId,h=c.systemDefaultDeviceId;this.logger.log("get microphone default device: ",{specifiedDefaultDeviceId:l,systemDefaultDeviceId:h}),this.specifiedDefaultDeviceId.audioInput=l||"",this.systemDefaultDeviceId.audioInput=h||"",this.cacheUsedDeviceId.audioInput||this.specifiedDevice.audioInput.state===i||(this.cacheUsedDeviceId.audioInput=a)}else if(e===r){var f=this.getDefaultDeviceImpl({specifiedDevice:this.specifiedDevice.audioOutput,sysDefaultDevice:this.systemDefaultDevice.audioOutput,curList:this.currentDeviceList.audioOutputList,preList:this.previousDeviceList.audioOutputList}),d=f.specifiedDefaultDeviceId,p=f.systemDefaultDeviceId;this.logger.log("get speaker default device: ",{specifiedDefaultDeviceId:d,systemDefaultDeviceId:p}),this.specifiedDefaultDeviceId.audioOutput=d||"",this.systemDefaultDeviceId.audioOutput=p||"",this.cacheUsedDeviceId.audioOutput||this.specifiedDevice.audioOutput.state===i||(this.cacheUsedDeviceId.audioOutput=s)}else if(e===n){var v=this.getDefaultDeviceImpl({specifiedDevice:this.specifiedDevice.videoInput,sysDefaultDevice:this.systemDefaultDevice.videoInput,curList:this.currentDeviceList.videoInputList,preList:this.previousDeviceList.videoInputList}),g=v.specifiedDefaultDeviceId,m=v.systemDefaultDeviceId;this.logger.log("get camera default device: ",{specifiedDefaultDeviceId:g,systemDefaultDeviceId:m}),this.specifiedDefaultDeviceId.videoInput=g||"",this.systemDefaultDeviceId.videoInput=m||"",this.cacheUsedDeviceId.videoInput||this.specifiedDevice.audioOutput.state===i||(this.cacheUsedDeviceId.videoInput=u)}}},{key:"getDefaultDeviceImpl",value:function(e){var t=e.specifiedDevice,r=e.sysDefaultDevice,n=e.curList,i=e.preList,o="",a="";return(o=[Le.UNKNOWN,Le.NORMAL].includes(t.state)?t.deviceId:"")||(o=this.diffDefaultDevice(n,i)),!o&&(null==r?void 0:r.deviceId)&&(o=r.deviceId),!o&&n.length&&(o=n[0].deviceId),!a&&(null==r?void 0:r.deviceId)&&(a=r.deviceId),!a&&n.length&&(a=this.diffDefaultDevice(n,i)),!a&&n.length&&(a=n[0].deviceId),{systemDefaultDeviceId:a,specifiedDefaultDeviceId:o}}},{key:"diffDefaultDevice",value:function(e,t){var r,n="",i=e.length,o=t.length;if(i&&o&&i>=o){var a=e.filter((function(e){return!t.some((function(t){return t.deviceId===e.deviceId}))}));n=(null===(r=a[0])||void 0===r?void 0:r.deviceId)||""}return n}},{key:"getDefaultDeviceId",value:function(){var e=this.systemDefaultDeviceId,t=e.audioInput,r=e.audioOutput,n=e.videoInput,i=this.specifiedDefaultDeviceId,o=i.audioInput,a=i.audioOutput,s=i.videoInput,u=this.specifiedDevice,c=u.audioInput,l=u.audioOutput,h=u.videoInput,f={audioInput:c.isDefault?t:o,audioOutput:l.isDefault?r:a,videoInput:h.deviceId?s:n};return this.logger.log("get default device: ",f),f}},{key:"getCaptureDeviceId",value:function(){var e=this.specifiedDevice,t=e.audioInput,r=e.audioOutput,n=e.videoInput,i=[Le.UNKNOWN,Le.NORMAL],o={audioInput:i.includes(t.state)?t.deviceId:"",audioOutput:i.includes(r.state)?r.deviceId:"",videoInput:i.includes(n.state)?n.deviceId:""};return this.logger.log("get capture device: ",o),o}},{key:"setSpecifiedDeviceId",value:function(e){var t=this;if(e.length){var r=De.AUDIOINPUT,n=De.AUDIOOUTPUT,i=De.VIDEOINPUT,o=Le.UNKNOWN,a=Le.INIT;e.forEach((function(e){var s=e.kind,u=e.deviceId,c=void 0===u?"":u,l=e.isDefault,h=void 0!==l&&l;s===r?(t.specifiedDevice.audioInput={isDefault:h,deviceId:h?"":c,state:h||!h&&!c?a:o},t.usedDeviceId.audioInput=""):s===n?(t.specifiedDevice.audioOutput={isDefault:h,deviceId:h?"":c,state:h||!h&&!c?a:o},t.usedDeviceId.audioOutput=""):s===i&&(t.specifiedDevice.videoInput={isDefault:h,deviceId:c,state:c?o:a},t.usedDeviceId.videoInput="")})),this.logger.log("set specified device: ",this.specifiedDevice),this.updateDefaultDeviceId()}else this.logger.log("no specified device")}},{key:"setSpecifiedDeviceState",value:function(e){this.logger.log("set specified device state: ",e);var t=De.AUDIOINPUT,r=De.VIDEOINPUT,n=De.AUDIOOUTPUT,i=this.specifiedDevice.audioInput,o=this.specifiedDevice.audioOutput,a=this.specifiedDevice.videoInput;e.forEach((function(e){var s=e.kind,u=e.state;s===t&&i.deviceId&&(i.state=u),s===n&&o.deviceId&&(o.state=u),s===r&&a.deviceId&&(a.state=u)})),this.logger.log("specified device state: ",this.specifiedDevice)}},{key:"updateUsedDeviceId",value:function(e){return la(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]update used device id by stream: ",e),r=this.currentDeviceList,n=r.audioInputList,i=r.audioOutputList,o=r.videoInputList,n.length&&o.length&&i.length){t.next=10;break}return this.logger.log("[DM]Not history device list, create device list"),t.next=6,this.createBaseDeviceList();case 6:this.updateDefaultDeviceId(),n=this.currentDeviceList.audioInputList,i=this.currentDeviceList.audioOutputList,o=this.currentDeviceList.videoInputList;case 10:return a=De.AUDIOINPUT,s=De.AUDIOOUTPUT,c=De.VIDEOINPUT,l=Le.NORMAL,h=this.getDefaultDeviceId(),f=h.audioInput,d=h.audioOutput,p=this.specifiedDevice,v=p.audioInput,g=p.audioOutput,m=p.videoInput,e.forEach((function(e){var t=e.kind,r=e.deviceId;if(t===a){var o=y.getReallyDeviceIdById(n,r,f);v.deviceId&&v.deviceId===r&&!v.isDefault&&(v.state=l),y.usedDeviceId.audioInput=o,y.cacheUsedDeviceId.audioInput=o}else if(t===s){var u=y.getReallyDeviceIdById(i,r,d);g.deviceId&&g.deviceId===r&&!g.isDefault&&(g.state=l),y.usedDeviceId.audioOutput=u,y.cacheUsedDeviceId.audioOutput=u}else t===c&&(m.deviceId&&m.deviceId===r&&(m.state=l),y.usedDeviceId.videoInput=r,y.cacheUsedDeviceId.videoInput=r)})),this.logger.log("[DM]update specified device state: ",this.specifiedDevice),this.logger.log("[DM]update used device id: ",this.usedDeviceId),t.next=19,this.updateFullDeviceList();case 19:case"end":return t.stop()}}),t,this)})))}},{key:"getReallyDeviceIdById",value:function(e,t,r){var n=r;if(t===Yo)n=r;else{var i=e.find((function(e){return e.deviceId===t}));i&&(n=i.deviceId)}return this.logger.log("get really device id: ",{deviceId:t,defaultId:r,reallyId:n}),n}},{key:"getReallyDeviceId",value:function(e,t){var r=De.AUDIOINPUT,n=De.AUDIOOUTPUT,i=De.VIDEOINPUT,o="",a=this.fullDeviceList,s=a.audioInputList,u=a.audioOutputList,c=a.videoInputList,l=this.getDefaultDeviceId(),h=l.audioInput,f=l.audioOutput,d=l.videoInput;return e===r?o=this.getReallyDeviceIdById(s,t,h):e===n?o=this.getReallyDeviceIdById(u,t,f):e===i&&(o=this.getReallyDeviceIdById(c,t,d)),this.logger.log("really device id: ",{kind:e,deviceId:t,reallyDeviceId:o}),o}},{key:"updateFullDeviceList",value:function(){return la(this,void 0,void 0,u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[DM]update full device list"),e.next=3,this.createFullDeviceList();case 3:t={nextDevice:{},detail:this.fullDeviceList},this.logger.log("update emit device: ",t),this.emmit(Ue.DEVICE,t);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"setAudioOutputDevice",value:function(e,t){return la(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||mt.isUndefined(e.sinkId)){r.next=13;break}return r.prev=1,r.next=4,e.setSinkId(t);case 4:r.next=11;break;case 6:r.prev=6,r.t0=r.catch(1),n=r.t0,"SecurityError"===r.t0.name&&(n="You need to use https(ssl) in page: ".concat(r.t0)),this.logger.warn("switch audio output err: ",n);case 11:r.next=14;break;case 13:this.logger.warn("[DM]Browser does not support output device selection");case 14:case"end":return r.stop()}}),r,this,[[1,6]])})))}},{key:"resetSpecifiedDeviceState",value:function(e){var t=e.audioInputList,r=e.audioOutputList,n=e.videoInputList,i=this.specifiedDevice,o=i.audioInput,a=i.audioOutput,s=i.videoInput,u=Le.LOST,c=Le.UNKNOWN,l=Le.NORMAL;if(t.length&&o.deviceId){var h=t.find((function(e){return e.deviceId===o.deviceId}));h&&o.state===u?o.state=c:h||o.state===u||(o.state=u,this.usedDeviceId.audioInput="")}if(r.length&&a.deviceId){var f=r.find((function(e){return e.deviceId===a.deviceId}));f&&a.state===u?a.state=l:f||a.state===u||(a.state=u,this.usedDeviceId.audioOutput="")}if(n.length&&s.deviceId){var d=n.find((function(e){return e.deviceId===s.deviceId}));d&&s.state===u?s.state=c:d||s.state===u||(s.state=u,this.usedDeviceId.videoInput="")}this.logger.log("[DM]reset specified device state:",this.specifiedDevice)}},{key:"createBaseDeviceList",value:function(){return la(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getOriginDeviceList();case 2:return t=e.sent,r=this.filterInvalidDevice(t),n=this.filterDefaultDevice(r),this.resetSpecifiedDeviceState(n),this.previousDeviceList=ze()(this.currentDeviceList),this.currentDeviceList=ze()(n),this.logger.log("[DM]previous devices:",this.previousDeviceList),this.logger.log("[DM]current devices:",this.currentDeviceList),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"getOriginDeviceList",value:function(){return la(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=De.AUDIOINPUT,r=De.AUDIOOUTPUT,n=De.VIDEOINPUT,i=t.toLowerCase(),o=r.toLowerCase(),a=n.toLowerCase(),s=[],c=[],l=[],e.prev=7,e.next=10,this.navigator.mediaDevices.enumerateDevices();case 10:h=e.sent,this.logger.log("browser default devices: ",h),h.forEach((function(e){var u=e.deviceId,h=e.label,f=e.kind,p={deviceId:u,label:h,kind:f,groupId:e.groupId};if(u&&f){var v=d.deviceLabelMap[u]||"",g=h||v;f===i?s.push(Object.assign(Object.assign({},p),{kind:t,label:g})):f===o?c.push(Object.assign(Object.assign({},p),{kind:r,label:g})):f===a&&l.push(Object.assign(Object.assign({},p),{kind:n,label:g}))}})),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(7),this.logger.error("get origin device list err: ",e.t0);case 18:return f={audioInputList:s,audioOutputList:c,videoInputList:l},this.logger.log("get origin device list: ",f),e.abrupt("return",f);case 21:case"end":return e.stop()}}),e,this,[[7,15]])})))}},{key:"filterInvalidDevice",value:function(e){var t=e.audioInputList,r=e.audioOutputList,n=e.videoInputList,i=function(e){return e.filter((function(e){var t=e.label,r=e.deviceId;return!(t.match(/\(Virtual\)$/)||"communications"===r)}))};return{audioInputList:i(t),audioOutputList:i(r),videoInputList:i(n)}}},{key:"filterDefaultDevice",value:function(e){var t=e.audioInputList,r=e.audioOutputList,n=e.videoInputList,i={audioInputList:this.filterDevice(t),audioOutputList:this.filterDevice(r),videoInputList:this.filterDevice(n)};return this.logger.log("update system default device: ",this.systemDefaultDevice),i}},{key:"filterDevice",value:function(e){var t=this,r=De.AUDIOINPUT,n=De.AUDIOOUTPUT,i=De.VIDEOINPUT,o=ot(ot(ot({},r,0),n,0),i,0),a=null,s=e.filter((function(e){var t=e.deviceId===Yo;return t&&(a=e),!t})).map((function(e){var r=e.label,n=e.kind,i=e.deviceId,a=r;return a&&!a.includes("ch")&&(a=function(e){for(var t=e.length,r=[],n="",i=0;i<t;i++){var o=e[i].trim();if(wt.has(o))r.push(o);else if(r.length){var a=r[r.length-1];St[a]===o&&r.pop()}else n+=o}return n}(a)),a&&!t.deviceLabelMap[i]&&(t.deviceLabelMap[i]=a),a||(a="".concat(Hr[n],"_").concat(++o[n])),Object.assign(Object.assign({},e),{label:a})}));return a&&this.setDefaultDevice(a,s),s}},{key:"appendSystemDefaultDevice",value:function(){var e=De.AUDIOINPUT,t=De.AUDIOOUTPUT,r=ze()(this.currentDeviceList);return r.audioInputList.length&&r.audioInputList.unshift(Object.assign(Object.assign({},Wo),{kind:e,isDefault:!0})),r.audioOutputList.length&&r.audioOutputList.unshift(Object.assign(Object.assign({},Wo),{kind:t,isDefault:!0})),this.logger.log("append system default device list: ",r),this.fullDeviceList=r,r}},{key:"setDefaultDevice",value:function(e,t){var r=De.AUDIOINPUT,n=De.AUDIOOUTPUT,i=De.VIDEOINPUT,o=e.kind,a=e.groupId,s=t.filter((function(e){var t=e.deviceId,r=e.groupId;return t!==Yo&&r===a}))[0]||null;o===r?this.systemDefaultDevice.audioInput=s:o===n?this.systemDefaultDevice.audioOutput=s:o===i&&(this.systemDefaultDevice.videoInput=s)}},{key:"updateFullDeviceListStatus",value:function(){var e=this.getDefaultDeviceId(),t=e.audioInput,r=e.audioOutput,n=e.videoInput;return this.logger.log("current used device: ",this.usedDeviceId),{audioInputList:this.updateDevice(this.fullDeviceList.audioInputList,this.specifiedDevice.audioInput,this.usedDeviceId.audioInput,t,this.systemDefaultDeviceId.audioInput),audioOutputList:this.updateDevice(this.fullDeviceList.audioOutputList,this.specifiedDevice.audioOutput,this.usedDeviceId.audioOutput,r,this.systemDefaultDeviceId.audioOutput),videoInputList:this.updateDevice(this.fullDeviceList.videoInputList,this.specifiedDevice.videoInput,this.usedDeviceId.videoInput,n,this.systemDefaultDeviceId.videoInput)}}},{key:"updateDevice",value:function(e,t,r,n,i){var o=this;return e.map((function(a){var s=a.deviceId,u=a.isDefault,c=void 0!==u&&u,l=a.kind,h=t.isDefault,f=c?i:r||n,d=c?h:!h&&s===f,p=oa(s,c,l),v=Object.assign(Object.assign({},a),{isSelected:d,isDefault:c,key:p});if(c){var g=o.getDeviceByDeviceId(e,f);if(g){var m=g.deviceId,y=g.label;v.deviceId=m,v.label=y,v.key=oa(m,c,l)}}return v}))}},{key:"getDeviceByDeviceId",value:function(e,t){return e.find((function(e){return e.deviceId===t}))||null}},{key:"createNextDevice",value:function(){var e=this.fullDeviceList,t=e.audioInputList,r=e.audioOutputList,n=e.videoInputList,i=this.getDefaultDeviceId(),o=i.audioInput,a=i.audioOutput,s=i.videoInput,u={audioInput:null,audioOutput:null,videoInput:null},c=this.getDeviceByDeviceId(t,o),l=this.getDeviceByDeviceId(r,a),h=this.getDeviceByDeviceId(n,s);this.logger.log("current specifiedDevice",this.specifiedDevice),this.logger.log("current cacheUsedDeviceId",this.cacheUsedDeviceId),this.logger.log("next devices: ",{nextAudioInput:c,nextAudioOutput:l,nextVideoInput:h});var f=this.cacheUsedDeviceId,d=f.audioInput,p=f.audioOutput,v=f.videoInput;return o!==d&&(u.audioInput=c),a!==p&&(u.audioOutput=l),s!==v&&(u.videoInput=h),this.cacheUsedDeviceId={audioInput:o,audioOutput:a,videoInput:s},this.logger.log("cacheUsedDeviceId",this.cacheUsedDeviceId),u}},{key:"updateDefaultDeviceId",value:function(){this.logger.log("[DM]update default device info");var e=De.AUDIOINPUT,t=De.AUDIOOUTPUT,r=De.VIDEOINPUT;this.calculateDefaultDevice(e),this.calculateDefaultDevice(t),this.calculateDefaultDevice(r)}},{key:"createFullDeviceList",value:function(){return la(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[DM]create full device list"),e.next=3,this.createBaseDeviceList();case 3:this.updateDefaultDeviceId(),this.appendSystemDefaultDevice(),this.fullDeviceList=this.updateFullDeviceListStatus(),this.logger.log("[DM]full device list:",this.fullDeviceList);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"onDeviceChange",value:function(){return la(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[DM]on device change"),e.next=3,this.createFullDeviceList();case 3:t=this.createNextDevice(),r={nextDevice:t,detail:this.fullDeviceList},this.logger.log("emit device: ",r),this.emmit(Ue.DEVICE,r);case 7: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.onDeviceChangeEvent)}},{key:"removeDeviceEvent",value:function(){var e;null===(e=this.navigator.mediaDevices)||void 0===e||e.removeEventListener("devicechange",this.onDeviceChangeEvent)}},{key:"getCameraDeviceByMode",value:function(e){return la(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM] getFrontCameraDevice type:",e),this.currentDeviceList.videoInputList.length){t.next=4;break}return t.next=4,this.createBaseDeviceList();case 4:return r=this.currentDeviceList.videoInputList||[],this.logger.log("current video input list :",r),n=r.length,i=r[0],o=i,e===k.BACK&&(a=n-1,s=it.browser.getPlatform(),c=s.isPhone,o=(c?r[1]:r[a])||i),this.logger.log("get front camera device: ",o),t.abrupt("return",o);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"setDevicePermission",value:function(e){var t=e.camera,r=e.microphone,n=this.currentPermission,i=n.camera,o=n.microphone;t===i&&r===o||(this.currentPermission=e,this.logger.log("updated permission: ",e),this.emmit(Ue.PERMISSION,this.currentPermission))}},{key:"updateDevicePermission",value:function(e,t){this.logger.log("update device permission: ",{video:e,audio:t});var r=Ne.UNKNOWN,n=this.currentPermission,i=n.camera,o=n.microphone,a=e===r?i:e,s=t===r?o:t;this.logger.log("merge device permission: ",{microPhonePermission:s,cameraPermission:a}),this.setDevicePermission({camera:a,microphone:s})}},{key:"query",value:function(e){return la(this,void 0,void 0,u().mark((function t(){return u().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 t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",Promise.reject(gt("XYSDK:950408",t.t0)));case 9:case"end":return t.stop()}}),t,this,[[0,6]])})))}},{key:"handlePermissionCameraStateChanged",value:function(e){return la(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]camera permission changed: ",e),r=e.target.state,n=this.currentPermission.camera,"granted"!==r||"granted"===n){t.next=6;break}return t.next=6,this.onUpdateFullDeviceList();case 6:"change"===e.type&&(this.currentPermission=Object.assign(Object.assign({},this.currentPermission),{camera:r})),this.emmit(Ue.PERMISSION,this.currentPermission);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"handlePermissionPhoneStateChanged",value:function(e){return la(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[DM]microphone permission changed: ",e),r=e.target.state,n=this.currentPermission.microphone,"granted"!==r||"granted"===n){t.next=6;break}return t.next=6,this.onUpdateFullDeviceList();case 6:"change"===e.type&&(this.currentPermission=Object.assign(Object.assign({},this.currentPermission),{microphone:r})),this.emmit(Ue.PERMISSION,this.currentPermission);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"bindDevicePermissionEvent",value:function(){return la(this,void 0,void 0,u().mark((function e(){var t,r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Ne.UNKNOWN,r={microphone:t,camera:t},e.prev=2,e.next=5,this.query("camera");case 5:return n=e.sent,e.next=8,this.query("microphone");case 8:i=e.sent,r.camera=n.state,r.microphone=i.state,this.permissionCameraStatus||(this.permissionCameraStatus=n,this.permissionCameraStatus.addEventListener("change",this.handlePermissionCameraStateChanged)),this.permissionPhoneStatus||(this.permissionPhoneStatus=i,this.permissionPhoneStatus.addEventListener("change",this.handlePermissionPhoneStateChanged)),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),this.logger.warn("bind device permission event error: ",e.t0);case 18:this.currentPermission=r,this.logger.log("[DM]current permission: ",this.currentPermission),this.emmit(Ue.PERMISSION,this.currentPermission);case 21:case"end":return e.stop()}}),e,this,[[2,15]])})))}},{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),this.deviceLabelMap={}}}]),n}(hn);const fa=ha;function da(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var pa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},va=function(t){h(n,t);var r=da(n);function n(t){var i;return e(this,n),(i=r.call(this,t)).baseTrackConfig=jr,i.audioMediaStream=null,i.facingMode=k.FRONT,i.trackType=ye.PEOPLE,i.processorList=[],i.processorCount=0,i.mediaStream=null,i.analyserNode=null,i.retryPublishStream=!1,i.meetingState=b.UNKNOWN,i.deviceManager=new fa(i.logger),i.initDeviceManagerEvent(),i.captureStream=new wn(c(i)),i.processorDestination=i.processorDestination.bind(c(i)),i}return a(n,[{key:"getLocalStream",value:function(){return this.previewStreams}},{key:"getTrackType",value:function(){return this.trackType}},{key:"getStreamInstance",value:function(){return this.streamInstance}},{key:"getDeviceManager",value:function(){return this.deviceManager}},{key:"getLocalAudioAnalyser",value:function(){return this.analyserNode}},{key:"getEnableCapture",value:function(){return this.captureStream.getEnableCapture()}},{key:"capture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return pa(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[vaTrack]capture config: ",e),r=this.streamInstance.getClient(),n=(null==r?void 0:r.getMakeCallParams())||Ur,i=n.muteAudio,o=n.muteVideo,a=mt.isUndefined(e.muteAudio)?i:e.muteAudio,s=mt.isUndefined(e.muteVideo)?o:e.muteVideo,this.baseTrackConfig=Object.assign(Object.assign(Object.assign({},this.baseTrackConfig),e),{muteAudio:a,muteVideo:s}),this.logger.log("[vaTrack]capture merge config: ",this.baseTrackConfig),this.setSpecifiedDeviceId(),c=this.baseTrackConfig,l=c.muteAudio,h=c.muteVideo,this.captureStream.initCaptureConfig(l,h),this.initStreamsConfig(),t.prev=11,t.next=14,this.createStreamWrap();case 14:return t.abrupt("return",t.sent);case 17:return t.prev=17,t.t0=t.catch(11),this.logger.log("[vaTrack]current stream mode:",this.captureStream.getCurrentMode()),this.logger.warn("[vaTrack]capture error: ",t.t0),t.abrupt("return",t.t0);case 22:case"end":return t.stop()}}),t,this,[[11,17]])})))}},{key:"createStreamWrap",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=b.ENDED,e.next=4,this.createUserMediaStream();case 4:if(r=e.sent,this.meetingState!==t||!r){e.next=10;break}return this.logger.log("meeting is ended, stop all streams"),r.getTracks().forEach((function(e){return e.stop()})),this.close(),e.abrupt("return");case 10:return e.next=12,this.setStreams(r);case 12:return this.bindAudioMediaStream(),e.abrupt("return",gt("XYSDK:950206",{mediaStream:r}));case 16:return e.prev=16,e.t0=e.catch(0),this.logger.log("[vaTrack]create stream wrap error: ",e.t0),this.emitError(e.t0),e.next=22,this.setStreams(null);case 22:return e.abrupt("return",Promise.reject(e.t0));case 23:case"end":return e.stop()}}),e,this,[[0,16]])})))}},{key:"connect",value:function(e){var t=this;return this.processorList.push(e),this.processorCount=this.processorList.length,mt.isFunction(e)&&this.mediaStream&&(this.logger.log("start connect processor"),this.mediaStream&&(this.retryPublishStream=!0),this.executeProcessor().catch((function(e){t.logger.log("connect processor error: ",e)}))),this}},{key:"popProcessor",value:function(){var e=this.processorList.length-this.processorCount,t=this.processorList[e];return this.processorCount-=1,t}},{key:"isProcessorEnd",value:function(){return 0===this.processorCount}},{key:"executeProcessor",value:function(e){var t;return pa(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d,p;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=this.streamInstance.getPlugin(),i=n.videoPlugin,!!i.length){r.next=5;break}return this.logger.warn("rejected execute processor, plugin not register!"),r.abrupt("return",Promise.reject(gt("XYSDK:950131")));case 5:if(!(o=this.popProcessor())){r.next=24;break}if(e||(s=(null===(t=this.mediaStream)||void 0===t?void 0:t.getVideoTracks())||[],c=s[0]||null,l=(null==c?void 0:c.getSettings())||{},h=l.width,f=void 0===h?0:h,d=l.height,e={track:c,width:f,height:void 0===d?0:d}),!(p=this.isProcessorEnd())||!mt.isFunction(o)){r.next=12;break}return this.processorCount=this.processorList.length,r.abrupt("return",o(e));case 12:if(r.prev=12,p){r.next=18;break}return a=o.process(e),r.next=17,this.executeProcessor(a);case 17:return r.abrupt("return",r.sent);case 18:r.next=24;break;case 20:return r.prev=20,r.t0=r.catch(12),this.logger.warn("execute processor error: ",r.t0),r.abrupt("return",Promise.reject(r.t0));case 24:return this.logger.warn("processor not set destination function!"),r.abrupt("return",Promise.reject(gt("XYSDK:950117")));case 26:case"end":return r.stop()}}),r,this,[[12,20]])})))}},{key:"processorDestination",value:function(e){var t;return pa(this,void 0,void 0,u().mark((function r(){var n,i,o,a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("processor destination process track: ",e),n=e.track,i=null===(t=this.mediaStream)||void 0===t?void 0:t.getAudioTracks(),o=new MediaStream,n&&o.addTrack(n),null==i||i.forEach((function(e){o.addTrack(e.clone())})),!this.retryPublishStream){r.next=13;break}return this.logger.log("retry publish process stream"),a=this.streamInstance.getClient(),r.next=11,this.setStreams(o);case 11:null==a||a.peerPublish(this,v.VIDEO_AUDIO),this.retryPublishStream=!1;case 13:return r.abrupt("return",o);case 14:case"end":return r.stop()}}),r,this)})))}},{key:"createUserMediaStream",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("invoke createUserMediaStream"),e.prev=1,e.next=4,this.captureStream.createUserMediaStream();case 4:if(t=e.sent){e.next=7;break}return e.abrupt("return",null);case 7:if(r=t.getVideoTracks(),n=t,!r.length){e.next=22;break}if(this.mediaStream=t,!this.processorList.length){e.next=22;break}return e.prev=12,this.logger.log("process mediaStream"),e.next=16,this.executeProcessor();case 16:n=e.sent,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(12),this.logger.log("process mediaStream error: ",e.t0);case 22:return e.abrupt("return",n);case 25:return e.prev=25,e.t1=e.catch(1),e.abrupt("return",Promise.reject(e.t1));case 28:case"end":return e.stop()}}),e,this,[[1,25],[12,19]])})))}},{key:"getAudioStreamConfig",value:function(){return this.streams.find((function(e){var t=e.status,r=e.kind;return t===_.NORMAL&&r===M.AUDIO}))}},{key:"handleChangeStream",value:function(e,t){return pa(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("handle change stream people: ",e),n=this.streams,r.next=4,this.setStreamParameters(e,t,n);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"switchDevice",value:function(e,t,r){return pa(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=Object.assign({},Vr,r),o=De.AUDIOINPUT,a=De.VIDEOINPUT,s=De.AUDIOOUTPUT,c=[o,s,a],this.logger.log("[vaTrack]switch device: ",{deviceId:t,type:e,config:i}),mt.isString(e)&&mt.isString(t)&&c.includes(e)){n.next=7;break}return this.logger.error("params error, please check"),n.abrupt("return",Promise.reject(gt("XYSDK:950101")));case 7:if(n.prev=7,e!==o||!t){n.next=13;break}return n.next=11,this.switchAudioInputDevice(t,i);case 11:n.next=23;break;case 13:if(e!==a||!t){n.next=20;break}return n.next=16,this.switchVideoInputDevice(t,i);case 16:null==(l=this.streamInstance.getClient())||l.playLocalVideo(),n.next=23;break;case 20:if(e!==s||!t){n.next=23;break}return n.next=23,this.switchAudioOutputDevice(t,i);case 23:return this.logger.log("switch device success"),n.abrupt("return",gt("XYSDK:950120",!0));case 27:return n.prev=27,n.t0=n.catch(7),this.logger.warn("switch device error: ",n.t0),n.abrupt("return",Promise.reject(n.t0));case 31:case"end":return n.stop()}}),n,this,[[7,27]])})))}},{key:"switchAudioInputDevice",value:function(e,t){return pa(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("switchAudioInputDevice"),n=t.allowSpecifiedId,i=t.isDefault,o=De.AUDIOINPUT,a=this.streamInstance.getSelfRoster()||{audioTxMute:!1},s=a.audioTxMute,n&&this.deviceManager.setSpecifiedDeviceId([{kind:o,deviceId:e,isDefault:!!i}]),this.muteAudioProcess(!0),r.prev=7,s){r.next=13;break}return r.next=11,this.unmuteAudioProcess();case 11:r.next=15;break;case 13:return r.next=15,this.deviceManager.updateFullDeviceList();case 15:r.next=20;break;case 17:return r.prev=17,r.t0=r.catch(7),r.abrupt("return",Promise.reject(r.t0));case 20:return r.abrupt("return",gt("XYSDK:950120"));case 21:case"end":return r.stop()}}),r,this,[[7,17]])})))}},{key:"switchVideoInputDevice",value:function(e,t){var r;return pa(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=t.allowSpecifiedId,o=t.isDefault,a=De.VIDEOINPUT,s=this.streamInstance.getSelfRoster()||{videoTxMute:!0},c=s.videoTxMute,i&&this.deviceManager.setSpecifiedDeviceId([{kind:a,deviceId:e,isDefault:!!o}]),n.prev=5,c){n.next=14;break}return this.muteVideoProcess(),n.next=10,this.unmuteVideoProcess();case 10:l=this.streamInstance.getClient(),null===(r=null==l?void 0:l.getLayoutManager())||void 0===r||r.updateLocalTrack(),n.next=16;break;case 14:return n.next=16,this.deviceManager.updateFullDeviceList();case 16:n.next=21;break;case 18:return n.prev=18,n.t0=n.catch(5),n.abrupt("return",Promise.reject(n.t0));case 21:return n.abrupt("return",gt("XYSDK:950120"));case 22:case"end":return n.stop()}}),n,this,[[5,18]])})))}},{key:"switchAudioOutputDevice",value:function(e,t){return pa(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d=this;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[vaTrack]setAudioOutputDevice: ",{deviceId:e,config:t}),i=(n=t||{}).allowSpecifiedId,o=void 0===i||i,a=n.isDefault,s=void 0!==a&&a,c=this.streamInstance.getClient(),l=null==c?void 0:c.getAudioManagers()){r.next=6;break}return r.abrupt("return");case 6:return h=Object.keys(l),f=De.AUDIOOUTPUT,r.prev=8,o&&this.deviceManager.setSpecifiedDeviceId([{kind:f,deviceId:e,isDefault:s}]),h.forEach((function(t){var r=l[t];r.ele&&d.deviceManager.setAudioOutputDevice(r.ele,e)})),r.next=13,this.deviceManager.updateUsedDeviceId([{kind:f,deviceId:e}]);case 13:r.next=19;break;case 15:return r.prev=15,r.t0=r.catch(8),this.logger.warn("switch audio output device error: ",r.t0),r.abrupt("return",Promise.reject(r.t0));case 19:return r.abrupt("return",Promise.resolve(gt("XYSDK:950120")));case 20:case"end":return r.stop()}}),r,this,[[8,15]])})))}},{key:"videoAudioProcess",value:function(e){return pa(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[vaTrack]invoke operate video or audio: ",e),t.prev=1,r=m.MUTE_VIDEO,n=m.MUTE_AUDIO,i=m.UNMUTE_AUDIO,o=m.UNMUTE_VIDEO,e!==i){t.next=6;break}return t.next=6,this.unmuteAudioProcess();case 6:if(e!==o){t.next=9;break}return t.next=9,this.unmuteVideoProcess();case 9:return e===n&&this.muteAudioProcess(),e===r&&this.muteVideoProcess(),t.abrupt("return",gt("XYSDK:950120",!0));case 14:return t.prev=14,t.t0=t.catch(1),this.logger.error("operate video or audio error: ",t.t0),t.abrupt("return",Promise.reject(t.t0));case 18:case"end":return t.stop()}}),t,this,[[1,14]])})))}},{key:"muteVideoProcess",value:function(){this.logger.log("mute video process");var e=m.MUTE_VIDEO;this.setStreamStatus(e),this.closeBaseMediaStream()}},{key:"closeBaseMediaStream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.logger.log("close base media stream: ",e),this.mediaStream)&&((e?this.mediaStream.getTracks():this.mediaStream.getVideoTracks()).forEach((function(e){e.stop()})),this.mediaStream=null)}},{key:"muteAudioProcess",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger.log("mute audio process");var t=Ne.DENIED,r=m.MUTE_AUDIO,n=(this.deviceManager.getDevicePermission()||{}).microphone===t||e;this.setStreamStatus(r,n),this.clearAudioLevel()}},{key:"unmuteVideoProcess",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("unmute video process"),t=G.CAPTURE,r=G.KEEP,n=M.VIDEO,this.mediaStream&&this.closeBaseMediaStream(),this.captureStream.setEnableCapture({video:t,audio:r}),this.resetStreamsConfigStatus(n),e.prev=6,e.next=9,this.createUserMediaStream();case 9:return i=e.sent,e.next=12,this.setStreams(i);case 12:null==(o=this.streamInstance.getClient())||o.peerPublish(this,v.VIDEO),e.next=21;break;case 16:return e.prev=16,e.t0=e.catch(6),this.logger.log("unmute video process error: ",e.t0),this.emitError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 21:return e.abrupt("return",gt("XYSDK:950120"));case 22:case"end":return e.stop()}}),e,this,[[6,16]])})))}},{key:"unmuteAudioProcess",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("unmute audio process"),t=m.UNMUTE_AUDIO,r=M.AUDIO,n=_.NORMAL,i=G.CAPTURE,o=G.KEEP,a=this.streams.some((function(e){var t=e.stream,i=e.status,o=e.kind;return!(!t||i!==n||o!==r)&&t.getAudioTracks().length})),this.resetStreamsConfigStatus(r),!a){e.next=12;break}this.setStreamStatus(t),this.bindAudioMediaStream(),e.next=29;break;case 12:return this.captureStream.setEnableCapture({video:o,audio:i}),e.prev=13,e.next=16,this.createUserMediaStream();case 16:return s=e.sent,e.next=19,this.setRemoteStreams(s,r);case 19:null==(c=this.streamInstance.getClient())||c.peerPublish(this,v.AUDIO),this.bindAudioMediaStream(),e.next=29;break;case 24:return e.prev=24,e.t0=e.catch(13),this.logger.log("unmute audio process error: ",e.t0),this.emitError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 29:return e.abrupt("return",Promise.resolve(gt("XYSDK:950120")));case 30:case"end":return e.stop()}}),e,this,[[13,24]])})))}},{key:"setStreamStatus",value:function(e,t){var r=this;this.logger.log("setStreamStatus type:",{type:e,stopAudioTrack:t});var n=function(n){n.forEach((function(n){var i=n.stream;i&&r.setStreamTracksStatus(i,e,t)}))};n(this.previewStreams),n(this.streams)}},{key:"setStreamTracksStatus",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.logger.log("set track status: ",{type:t,stopAudioTrack:n});var i=m.MUTE_AUDIO,o=m.MUTE_VIDEO,a=[i,m.UNMUTE_AUDIO],s=tr[t].enabled;null==e||e.getTracks().forEach((function(i){var u=i.kind;"audio"===u&&a.includes(t)&&(n?(i.stop(),e.removeTrack(i),r.logger.log("audio track ended")):(i.enabled=s,r.logger.log("audio track enabled: ",s))),"video"===u&&t===o&&(i.stop(),e.removeTrack(i),r.logger.log("video track ended"))}))}},{key:"getNormalStreamConfig",value:function(e){var t=_.NORMAL;return this.streams.find((function(r){var n=r.kind,i=r.status;return n===e&&i===t}))}},{key:"switchCamera",value:function(e){return pa(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]invoke switchCamera: ",e),r=this.streamInstance.getSelfRoster(),n=(r||{videoTxMute:!1}).videoTxMute,!e||yr.includes(e)){t.next=6;break}return this.logger.log("only support:",yr),t.abrupt("return",Promise.reject(gt("XYSDK:950101")));case 6:if(!n&&this.facingMode!==e){t.next=8;break}return t.abrupt("return",this.facingMode);case 8:return e||(i=yr.findIndex((function(e){return e===s.facingMode})),o=i+1>=yr.length?0:i+1,e=yr[o]),this.logger.log("switch camera final facing mode: ",e),t.next=12,this.deviceManager.getCameraDeviceByMode(e);case 12:if(!(null==(a=t.sent)?void 0:a.deviceId)){t.next=18;break}return t.next=16,this.switchDevice(De.VIDEOINPUT,a.deviceId,{allowSpecifiedId:!0,isDefault:!1});case 16:return this.facingMode=e,t.abrupt("return",this.facingMode);case 18:return t.abrupt("return",this.facingMode);case 19:case"end":return t.stop()}}),t,this)})))}},{key:"bindAudioMediaStream",value:function(){this.logger.log("bind audio stream for analyser");var e=this.getAudioStreamConfig();if(e){this.audioMediaStream=e.stream;var t=this.streamInstance.getClient(),r=null==t?void 0:t.getAnalyserManager();r&&this.analyserNode&&r.updateStream(this.analyserNode,this.audioMediaStream)}}},{key:"getAudioLevel",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,this.audioMediaStream&&((r=this.audioMediaStream.getAudioTracks()).length&&this.analyserNode&&this.analyserNode.state===pe.RUNNING?t=this.analyserNode.analyser.getAudioLevel():!this.analyserNode&&r.length&&(n=this.streamInstance.getClient(),(i=null==n?void 0:n.getAnalyserManager())&&(o=i.createAnalyser(this.audioMediaStream,{fftSize:jt,prefix:nn}),this.analyserNode=o,t=this.analyserNode.analyser.getAudioLevel()))),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"clearAudioLevel",value:function(){this.logger.log("clear audio level");var e=this.streamInstance.getClient(),t=null==e?void 0:e.getAnalyserManager();if(t&&this.analyserNode){t.pauseAnalyser(this.analyserNode.streamId);var r=this.analyserNode.streamId.split(nn)[1]||"";r&&t.pauseAnalyser(r)}this.audioMediaStream=null}},{key:"processLowPerformance",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=R.REMOTE,r=R.CONTENT,this.processStreamsLowPerformance(t),e.next=4,this.processPeopleLowPerformance();case 4:this.processStreamsLowPerformance(r);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"processStreamsLowPerformance",value:function(e){return pa(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=_.DISABLED,n=_.UNKNOWN,i=R.CONTENT,o=this.streamInstance.getClient(),a=o.getEnterpriseMediaConfig(),s=a.peopleRecResolution,c=a.contentRecResolution,l=this.streams,h=s,e===i&&(l=this.contentStreams,h=c),l.forEach((function(e){var t=e.status,i=e.resolution;i>h&&t!==r?e.status=r:i<=h&&t===r&&(e.status=n)}));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"processPeopleLowPerformance",value:function(){return pa(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.streamInstance.getSelfRoster(),t.videoTxMute){e.next=7;break}return r=m.MUTE_VIDEO,this.setStreamStatus(r),e.next=7,this.unmuteVideoProcess();case 7:case"end":return e.stop()}}),e,this)})))}},{key:"updateDevicePermission",value:function(e,t){var r;this.logger.log("[stream]update device permission:",{video:e,audio:t});var n=Ne.UNKNOWN,i=Ne.GRANTED,o=G.CAPTURE,a=n,s=n;e===o&&(a=i),t===o&&(s=i),this.logger.log("[stream]updated permission: ",{videoPermission:a,audioPermission:s}),null===(r=this.deviceManager)||void 0===r||r.updateDevicePermission(a,s)}},{key:"updateDeviceIdByStream",value:function(e){return pa(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("update device by stream: ",null==e?void 0:e.id),r=De.AUDIOINPUT,n=De.VIDEOINPUT,i=[],o="",a="",e&&(s=e.getVideoTracks()[0],c=e.getAudioTracks()[0],o=(l=function(e){var t="";if(e){var r=e.getSettings();h.logger.log("track setting: ",r),t=(null==r?void 0:r.deviceId)||""}return t})(c),a=l(s)),o&&i.push({kind:r,deviceId:o}),a&&i.push({kind:n,deviceId:a}),t.next=10,this.deviceManager.updateUsedDeviceId(i);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"initDeviceManagerEvent",value:function(){var e,t,r=this;null===(e=this.deviceManager)||void 0===e||e.on(Ue.PERMISSION,(function(e){r.logger.log("[vaTrack]device permission change: ",e),r.emitMessage(Me.PERMISSION,e)})),null===(t=this.deviceManager)||void 0===t||t.on(Ue.DEVICE,(function(e){r.logger.log("[vaTrack]device change: ",e);var t=e.nextDevice,n=t.audioInput,i=t.videoInput,o=t.audioOutput,a=De.AUDIOINPUT,s=De.VIDEOINPUT,u=De.AUDIOOUTPUT;try{n&&r.switchDevice(a,n.deviceId,{allowSpecifiedId:!1}),i&&r.switchDevice(s,i.deviceId,{allowSpecifiedId:!1}),o&&r.switchDevice(u,o.deviceId,{allowSpecifiedId:!1}),r.emitMessage(Me.DEVICE,e)}catch(e){r.logger.log("auto switch device failed:",e)}}))}},{key:"setSpecifiedDeviceId",value:function(){var e=De.AUDIOINPUT,t=De.AUDIOOUTPUT,r=De.VIDEOINPUT,n=this.baseTrackConfig,i=n.audioInputId,o=n.audioOutputId,a=n.videoInputId,s=[];i&&s.push({kind:e,deviceId:i,isDefault:!1}),a&&s.push({kind:r,deviceId:a,isDefault:!1}),o&&s.push({kind:t,deviceId:o,isDefault:!1}),this.deviceManager.setSpecifiedDeviceId(s)}},{key:"close",value:function(){this.meetingState=b.ENDED,this.deviceManager&&this.deviceManager.destroy(),this.clearAudioLevel(),this.closeBaseMediaStream(!0),this.closeBaseTrack()}}]),n}(yn);const ga=va;function ma(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var ya=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},ba=function(t){h(n,t);var r=ma(n);function n(t){var i;return e(this,n),(i=r.call(this,t)).trackType=ye.CONTENT,i.baseTrackConfig=Gr,i.shareContentTimer=null,i.shareContentStatus=g.INIT,i.clearShareContentTimer=function(){i.shareContentTimer&&clearTimeout(i.shareContentTimer),i.shareContentTimer=null},i}return a(n,[{key:"getTrackType",value:function(){return this.trackType}},{key:"isSharingContent",get:function(){return[g.CAPTURE,g.PENDING,g.STARTING].includes(this.shareContentStatus)}},{key:"isShareContentPaused",get:function(){var e=g.PAUSE;return this.shareContentStatus===e}},{key:"capture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ya(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[contentTrack]capture config: ",e),r=g.STARTING,n=g.PAUSE,this.baseTrackConfig=Object.assign(Object.assign({},this.baseTrackConfig),e),this.logger.log("[contentTrack]capture merged config: ",this.baseTrackConfig),![r,n].includes(this.shareContentStatus)){t.next=15;break}return t.prev=5,t.next=8,this.reselectStartCapture();case 8:case 18:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(5),this.logger.error("reselect share capture error: ",t.t0),t.abrupt("return",Promise.reject(t.t0));case 15:return t.prev=15,t.next=18,this.startCapture();case 21:return t.prev=21,t.t1=t.catch(15),this.logger.error("start share capture error: ",t.t1),t.abrupt("return",Promise.reject(t.t1));case 25:case"end":return t.stop()}}),t,this,[[5,11],[15,21]])})))}},{key:"reselectStartCapture",value:function(){return ya(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("reselect content capture"),t=g.SWITCHING,r=this.streamInstance.getClient(),n=this.shareContentStatus,!this.isShareContentPaused){e.next=13;break}return e.prev=5,e.next=8,this.resume();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),this.logger.log("reselect share content, resume share failed: ",e.t0);case 13:return this.shareContentStatus=t,e.prev=14,e.next=17,this.createContentMediaStream();case 17:if(i=e.sent,this.shareContentStatus!==t){e.next=28;break}return this.updateContentMode(),this.stopContentTracks(),e.next=23,this.setContentStreams(i);case 23:return r.sendStopShareContentMsg(),r.applyShareContent(),this.handleCloseContentEvent(i),i.getTracks().forEach((function(e){o.logger.log("origin content tracks setting: ",e.getSettings())})),e.abrupt("return",gt("XYSDK:950206",{mediaStream:i}));case 28:return this.stopStreamTracks(i),this.logger.warn("reselect share failed, origin share is ended"),this.emitError(gt("XYSDK:950703")),e.abrupt("return",Promise.reject(gt("XYSDK:950703")));case 34:return e.prev=34,e.t1=e.catch(14),this.logger.error("reselect capture content failed: ",e.t1),this.shareContentStatus=n,e.abrupt("return",Promise.reject(e.t1));case 39:case"end":return e.stop()}}),e,this,[[5,10],[14,34]])})))}},{key:"startCapture",value:function(){return ya(this,void 0,void 0,u().mark((function e(){var t,r,n,i=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("start content capture"),t=g.CAPTURE,r=g.ENDED,this.shareContentStatus=t,e.prev=3,this.updateContentMode(),this.initContentStreamsConfig(),e.next=8,this.createContentMediaStream();case 8:return n=e.sent,e.next=11,this.setContentStreams(n);case 11:return this.contentStreamProcessor(),this.handleCloseContentEvent(n),this.logger.log("Capturing content stream succeeded"),n.getTracks().forEach((function(e){i.logger.log("origin content tracks setting: ",e.getSettings())})),e.abrupt("return",gt("XYSDK:950206",{mediaStream:n}));case 18:return e.prev=18,e.t0=e.catch(3),this.logger.error("capture content stream failed: ",e.t0),this.shareContentStatus=r,e.abrupt("return",Promise.reject(e.t0));case 23:case"end":return e.stop()}}),e,this,[[3,18]])})))}},{key:"updateContentMode",value:function(){var e=this.streamInstance.getClient(),t=this.baseTrackConfig.screenAudio?y.BOTH:y.VIDEO;null==e||e.setContentMode(t)}},{key:"pause",value:function(){return ya(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[contentTrack] pause content"),t=g.STARTING,r=g.PAUSE,n=g.INIT,i=g.ENDED,this.shareContentStatus!==r){e.next=5;break}return this.logger.log("[contentTrack] already pause content"),e.abrupt("return",gt("XYSDK:950120"));case 5:if(e.prev=5,this.shareContentStatus!==t){e.next=14;break}return o=this.streamInstance.getClient(),a=null==o?void 0:o.getVOM(),e.next=11,null==a?void 0:a.disableContentStreamChange();case 11:return this.shareContentStatus=r,this.logger.log("[contentTrack] pause content success"),e.abrupt("return",gt("XYSDK:950120"));case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),this.logger.error("[contentTrack] pause content failed: ",e.t0);case 19:if(![n,i].includes(this.shareContentStatus)){e.next=22;break}return this.logger.log("[contentTrack]not start capture content"),e.abrupt("return",Promise.reject(gt("XYSDK:950701")));case 22:return this.logger.log("[contentTrack] reject pause content"),e.abrupt("return",Promise.reject(gt("XYSDK:950702")));case 24:case"end":return e.stop()}}),e,this,[[5,16]])})))}},{key:"resume",value:function(){return ya(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[contentTrack] resume content"),e.prev=1,!this.isShareContentPaused){e.next=15;break}if(t=g.STARTING,r=this.streamInstance.getClient(),n=null==r?void 0:r.getPeer(),!(i=null==r?void 0:r.getVOM())||!n){e.next=15;break}return o=i.getStreamChangeList().content,a={type:"streamChange",mediagroupid:1,streamChangeInfo:o},e.next=12,this.setStreamParameters(a,n,this.contentStreams);case 12:return this.shareContentStatus=t,this.logger.log("[contentTrack]resume content success"),e.abrupt("return",gt("XYSDK:950120"));case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),this.logger.error("[contentTrack]resume content failed: ",e.t0);case 20:return this.logger.log("[contentTrack] reject resume content"),e.abrupt("return",Promise.reject(gt("XYSDK:950702")));case 22:case"end":return e.stop()}}),e,this,[[1,17]])})))}},{key:"createContentMediaStream",value:function(){return ya(this,void 0,void 0,u().mark((function e(){var t,r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[stream]invoke createContentBaseStream"),!(t=this.getEnableContentStreamConfig())){e.next=18;break}return e.prev=3,r=this.getContentConstraints(t),e.next=7,this.getDisplayMediaStream(r);case 7:return n=e.sent,e.next=10,un(500);case 10:return e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(3),this.logger.log("[stream]capture content stream failed: ",e.t0),this.emitError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 18:return i=gt("XYSDK:950512"),this.emitError(i),e.abrupt("return",Promise.reject(i));case 21:case"end":return e.stop()}}),e,this,[[3,13]])})))}},{key:"createElectronBaseStream",value:function(e){return ya(this,void 0,void 0,u().mark((function t(){var r,n;return u().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),n=cn(t.t0),t.abrupt("return",Promise.reject(n));case 12:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"getElectronContentSources",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["window","screen"];return ya(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e.getSources({types:t});case 3:return n=r.sent,r.abrupt("return",n);case 7:return r.prev=7,r.t0=r.catch(0),r.abrupt("return",r.t0);case 10:case"end":return r.stop()}}),r,null,[[0,7]])})))}},{key:"createElectronContentStream",value:function(e){return ya(this,void 0,void 0,u().mark((function t(){var r,n=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[stream]invoke createElectronContentStream"),e){t.next=4;break}return this.logger.warn("No selected sourceId!"),t.abrupt("return",Promise.reject(gt("XYSDK:950510")));case 4:return this.shareContentStatus=g.CAPTURE,this.initContentStreamsConfig(),t.prev=6,t.next=9,this.createElectronBaseStream(e);case 9:return r=t.sent,t.next=12,this.setContentStreams(r);case 12:return this.contentStreamProcessor(),this.logger.log("capture electron content stream succeeded"),r.getTracks().forEach((function(e){n.logger.log("origin content tracks setting: ",e.getSettings())})),t.abrupt("return",gt("XYSDK:950206",{mediaStream:r}));case 18:return t.prev=18,t.t0=t.catch(6),this.logger.error("capture electron content stream failed: ",t.t0),this.shareContentStatus=g.ENDED,t.abrupt("return",Promise.reject(t.t0));case 23:case"end":return t.stop()}}),t,this,[[6,18]])})))}},{key:"getDisplayMediaStream",value:function(e){return ya(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,(r=this.baseTrackConfig.handleConfig)&&it.isSupportSetCaptureHandleConfig()&&(navigator.mediaDevices.setCaptureHandleConfig(r),this.logger.log("Set capture handle config succeeded:",r)),t.next=5,navigator.mediaDevices.getDisplayMedia(e);case 5:return n=t.sent,this.logger.log("Get display media succeeded:",{id:n.id,constraints:e}),t.abrupt("return",n);case 10:return t.prev=10,t.t0=t.catch(0),this.logger.error("Get display media error: ",t.t0),i=cn(t.t0),t.abrupt("return",Promise.reject(i));case 15:case"end":return t.stop()}}),t,this,[[0,10]])})))}},{key:"handleCloseContentEvent",value:function(e){var t=e.getTracks();this.onListenerStreamEnded(t)}},{key:"onListenerStreamEnded",value:function(e){var t=this,r=e.length,n=0,i=function(){n+=1,t.logger.log("content track ended: ",{endedCount:n,enableTracksLength:r}),n===r&&(t.logger.log("ended all content track"),t.emitMessage(Me.STOP_SHARE_CONTENT,{}))};e.forEach((function(e){t.logger.log("bind content track ended event: ",{kind:null==e?void 0:e.kind,id:null==e?void 0:e.id}),e&&(e.onended=i)}))}},{key:"contentStreamProcessor",value:function(){var e=this,t=g.PENDING,r=g.ENDED;this.shareContentStatus=t;var n=this.streamInstance.getClient();null==n||n.applyShareContent(),this.shareContentTimer=setTimeout((function(){e.shareContentStatus===t&&(e.logger.log("[client] share content timeout"),e.shareContentStatus=r,e.emitMessage(Me.STOP_SHARE_CONTENT,{}),e.clearShareContentTimer())}),1e4)}},{key:"emitStartShareContent",value:function(){this.shareContentStatus=g.STARTING,this.emitMessage(Me.START_SHARE_CONTENT,{}),this.clearShareContentTimer()}},{key:"emitStopShareContent",value:function(e){this.logger.log("current shareContentStatus: ",this.shareContentStatus);var t=g.ENDED,r=g.SWITCHING;this.shareContentStatus!==r&&(this.shareContentStatus=t,this.emitMessage(Me.STOP_SHARE_CONTENT,gt("XYSDK:950512",e)),this.clearShareContentTimer())}},{key:"stopShareContent",value:function(){this.logger.log("[client]stop share content"),this.shareContentStatus=g.ENDED;var e=this.streamInstance.getClient();null==e||e.applyStopShareContent()}},{key:"close",value:function(){this.logger.log("[contentTrack]start close share content"),this.stopContentTracks(),this.closeBaseTrack(),this.stopShareContent(),this.off(Me.START_SHARE_CONTENT),this.off(Me.STOP_SHARE_CONTENT);var e=g.ENDED;this.streamInstance.clearContentTrack(),this.shareContentStatus=e,this.logger.log("content streams closed")}},{key:"getContentConstraints",value:function(e){this.logger.log("get init constraints config:",e);var t=me.EXCLUDE,r=this.baseTrackConfig,n=r.screenAudio,i=r.displaySurface,o=r.preferCurrentTab,a=r.monitorTypeSurfaces,s=r.selfBrowserSurface,u=r.surfaceSwitching,c=r.systemAudio,l=r.controller,h=e.constraintMode,f=e.resolution,d=e.frameRate,p={};return h&&h!==j.FAILED&&(p=function(e,t,r){return ot(ot(ot({},kt,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Nt),At(t)),{width:160,height:90}),audio:!0}),_t,{video:Object.assign(Object.assign(Object.assign({},Rt),At(t,_t,!0)),{width:{min:160,ideal:160,max:160},height:{min:90,ideal:90,max:90}}),audio:!0})),Ct,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Nt),At(t)),{width:1280,height:720}),audio:!0}),_t,{video:Object.assign(Object.assign(Object.assign({},Nt),At(t,_t,!0)),{width:{ideal:1280,max:1280},height:{ideal:720,max:720}}),audio:!0})),Ot,ot(ot({},Tt,{video:Object.assign(Object.assign(Object.assign({},Nt),At(t)),{width:1920,height:1080}),audio:!0}),_t,{video:Object.assign(Object.assign(Object.assign({},Nt),At(t,_t,!0)),{width:{ideal:1920,max:1920},height:{ideal:1080,max:1080}}),audio:!0}))[e][r]}(f,d,h)),c!==t&&n?(p.systemAudio=c,p.audio=n):(p.audio=!1,p.systemAudio=t),p.video&&a!==t&&(p.video.displaySurface=i),o||(p.selfBrowserSurface=s),p.preferCurrentTab=o,p.monitorTypeSurfaces=a,p.surfaceSwitching=u,l&&(p.controller=l),delete p.video.width,delete p.video.height,this.logger.log("get content constraints: ",p),p}},{key:"handleChangeStream",value:function(e,t){return ya(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("handle change stream content: ",e),this.isShareContentPaused){r.next=5;break}return n=this.contentStreams,r.next=5,this.setStreamParameters(e,t,n);case 5:case"end":return r.stop()}}),r,this)})))}}]),n}(yn);const Sa=ba;r(9211),r(8607),r(6664),r(5980),r(9943),r(6089),r(8539),r(8690),r(5385),r(5552),r(1803),r(1565),r(7987),r(9365),r(677),r(8118),r(1165),r(1522),r(1638),r(4797),r(7300),r(3356),r(2533),r(9724),r(9901);var wa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ea=function(){function t(r,n){e(this,t),this.fftSize=(null==n?void 0:n.fftSize)||Ut,this.cardinalNumber=(null==n?void 0:n.cardinalNumber)||32,this.level=0,this.init(r)}return a(t,[{key:"getBaseInfo",value:function(){return{cardinalNumber:this.cardinalNumber,fftSize:this.fftSize,level:this.level}}},{key:"init",value:function(e){try{this.audioContext=new AudioContext,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=this.fftSize,this.sourceNode=this.audioContext.createMediaStreamSource(e),this.timeDomainData=new Uint8Array(this.analyser.frequencyBinCount),this.sourceNode.connect(this.analyser)}catch(e){console.log("init audio analyser error:",e)}}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return wa(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e||this.sourceNodeDisconnect(),t.prev=1,this.analyser&&this.analyser.disconnect(),!this.audioContext){t.next=6;break}return t.next=6,this.audioContext.close();case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(1);case 10:this.timeDomainData=null,this.sourceNode=null,this.analyser=null,this.audioContext=null,this.cardinalNumber=0,this.level=0;case 16:case"end":return t.stop()}}),t,this,[[1,8]])})))}},{key:"updateStream",value:function(e){this.sourceNode&&this.analyser&&this.audioContext&&(this.sourceNode=this.audioContext.createMediaStreamSource(e),this.sourceNode.connect(this.analyser))}},{key:"sourceNodeDisconnect",value:function(){if(this.sourceNode&&this.analyser)try{this.sourceNode.disconnect(this.analyser)}catch(e){console.warn("source node disconnect error:",e)}}},{key:"getAudioLevel",value:function(){if(this.analyser&&this.timeDomainData){this.analyser.getByteTimeDomainData(this.timeDomainData);for(var e=this.timeDomainData.length,t=0,r=0;r<e;r++)t=Math.max(t,Math.abs(this.timeDomainData[r]-128));this.level=t}var n=Math.min(100,100*Number((this.level/this.cardinalNumber).toFixed(2)));return parseInt(n+"")}}]),t}();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 Ia(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 Ia(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Ia(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 xa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Ca=function(){function t(r){e(this,t),this.logger=r.logger,this.analyserMap=new Map}return a(t,[{key:"getAnalyserNode",value:function(){return this.analyserMap}},{key:"createAnalyser",value:function(e,t){this.logger.log("[anaMg]create analyser");var r=pe.RUNNING,n=e.id,i=((null==t?void 0:t.prefix)||"")+n;if(this.analyserMap.has(i)){var o=this.analyserMap.get(i);return o.state!==r&&(this.updateStream(o,e),this.logger.log("[anaMg]update already exist analyser node: ",this.printAnalyserMap())),o}var a=this.getEndedAnalyser();if(a){var s=a.streamId;return this.analyserMap.delete(s),this.updateStream(a,e),this.analyserMap.set(i,a),this.logger.log("[anaMg]replace other analyser node: ",s),a}var u=new Ea(e,t),c={streamId:e.id,analyser:u,state:r};return this.analyserMap.set(i,c),this.logger.log("[anaMg]create new analyser node",this.printAnalyserMap()),c}},{key:"printAnalyserMap",value:function(){var e,t={},r=ka(this.analyserMap);try{for(r.s();!(e=r.n()).done;){var n=Yr(e.value,2),i=n[0],o=n[1],a=o.analyser,s=o.state,u=o.streamId;t[i]={state:s,streamId:u,analyser:a.getBaseInfo()}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"updateStream",value:function(e,t){return e.analyser.updateStream(t),e.state=pe.RUNNING,e.streamId=t.id,this.logger.log("[anaMg]update stream: ",this.printAnalyserMap()),e}},{key:"pauseAnalyser",value:function(e){var t=this.analyserMap.get(e);t&&t.state!==pe.ENDED&&(t.analyser.sourceNodeDisconnect(),t.state=pe.ENDED),this.logger.log("[anaMg]pause analyser: ",{analyserMap:this.printAnalyserMap(),streamId:e})}},{key:"destroy",value:function(){return xa(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.log("[anaMg]destroy analyser"),t=pe.ENDED,r=ka(this.analyserMap),e.prev=3,r.s();case 5:if((n=r.n()).done){e.next=14;break}return i=Yr(n.value,2),o=i[0],a=i[1],s=a.state===t,e.next=10,a.analyser.destroy(s);case 10:a.state=t,this.analyserMap.delete(o);case 12:e.next=5;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(3),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,this,[[3,16,19,22]])})))}},{key:"getEndedAnalyser",value:function(){var e,t=pe.ENDED,r=null,n=ka(this.analyserMap);try{for(n.s();!(e=n.n()).done;){var i=Yr(e.value,2)[1];if(i.state===t){r=i;break}}}catch(e){n.e(e)}finally{n.f()}return r}}]),t}();var Oa=function(){function t(r){e(this,t),this.canvas=r||document.createElement("canvas"),this.ctx=this.canvas.getContext("2d")}return a(t,[{key:"getCanvas",value:function(){return this.canvas}},{key:"getVideoImage",value:function(e,t){this.drawFrame(e,t);var r=t||{},n=r.imageType,i=void 0===n?"image/png":n,o=r.compressLevel,a=void 0===o?.92:o,s=this.canvas.toDataURL(i,a),u=this.canvas;return{dataURL:s,width:u.width,height:u.height}}},{key:"drawFrame",value:function(e,t){if(!this.ctx||!e)return this;var r=t||{},n=r.isMirror,i=void 0!==n&&n,o=r.rotate,a=void 0===o?0:o,s=1===a||3===a,u=this.canvas,c=u.width,l=u.height;this.ctx.clearRect(0,0,c,l);var h=e.videoWidth,f=e.videoHeight;this.canvas.width=h,this.canvas.height=f;var d=-this.canvas.width/2,p=-this.canvas.height/2;s&&(this.canvas.width=f,this.canvas.height=h,d=-h/2,p=-f/2);var v=this.canvas.width/2,g=this.canvas.height/2,m=Math.PI/2*a;return this.ctx.save(),this.ctx.translate(v,g),m&&this.ctx.rotate(m),i&&this.ctx.scale(-1,1),this.ctx.drawImage(e,d,p),this.ctx.restore(),this}}]),t}();const Ta=Oa;var _a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Aa=function(){function t(r){e(this,t);var n=N.RS90,i=N.RS180,o=N.RS360,a=N.RS720,s=N.RS1080;this.clientInstance=r,this.logger=r.logger,this.videoAudioTrack=null,this.contentTrack=null,this.analyserManager=null,this.analyserMap={},this.initContentStream=ot(ot(ot(ot(ot({},n,new MediaStream),i,new MediaStream),o,new MediaStream),a,new MediaStream),s,new MediaStream)}return a(t,[{key:"getLocalStream",value:function(){var e;return null===(e=this.videoAudioTrack)||void 0===e?void 0:e.getLocalStream()}},{key:"getClient",value:function(){return this.clientInstance}},{key:"getDeviceManager",value:function(){var e;return null===(e=this.videoAudioTrack)||void 0===e?void 0:e.getDeviceManager()}},{key:"getLayoutManager",value:function(){return this.clientInstance.getLayoutManager()}},{key:"getSelfRoster",value:function(){return this.clientInstance.getSelfRoster()}},{key:"getVideoAudioTrack",value:function(){return this.videoAudioTrack}},{key:"getContentTrack",value:function(){return this.contentTrack}},{key:"getInitContentStream",value:function(){return this.initContentStream}},{key:"getAudioStreamConfig",value:function(){return this.videoAudioTrack.getAudioStreamConfig()}},{key:"getNormalStreamConfig",value:function(e){return this.videoAudioTrack.getNormalStreamConfig(e)}},{key:"destroy",value:function(){return _a(this,void 0,void 0,u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t in this.closeVideoAudioStream(),this.closeContentStream(),this.analyserMap)delete this.analyserMap[t];if(!this.analyserManager){e.next=7;break}return this.logger.log("analyser manager destroy"),e.next=7,this.analyserManager.destroy();case 7:this.analyserManager=null,this.analyserMap={},this.logger.log("stream close ended");case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getPlugin",value:function(){var e=this.clientInstance.getPlugin()||[],t=be.VIDEO_INPUT,r=be.AUDIO_INPUT;return{videoPlugin:e.filter((function(e){return e.getPluginType()===t})),audioPlugin:e.filter((function(e){return e.getPluginType()===r}))}}},{key:"getAudioAnalyserManager",value:function(){return this.analyserManager||(this.analyserManager=new Ca(this.clientInstance)),this.analyserManager}},{key:"getMediaStreams",value:function(){var e={streams:[],previewStreams:[],pipelineStreams:[],contentStreams:[]};if(this.videoAudioTrack){var t=this.videoAudioTrack.getMediaStreams(),r=t.streams,n=t.previewStreams,i=t.pipelineStreams;e.streams=r,e.previewStreams=n,e.pipelineStreams=i}if(this.contentTrack){var o=this.contentTrack.getMediaStreams().contentStreams;e.contentStreams=o}return e}},{key:"createVideoAudioTrack",value:function(){return _a(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[stream]createVideoAudioTrack"),this.videoAudioTrack){e.next=6;break}return this.videoAudioTrack=new ga(this),e.abrupt("return",this.videoAudioTrack);case 6:return this.logger.warn("video audio track already created"),e.abrupt("return",Promise.reject(gt("XYSDK:950413")));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"createContentTrack",value:function(){return _a(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[stream]createContentTrack"),this.contentTrack){e.next=6;break}return this.contentTrack=new Sa(this),e.abrupt("return",this.contentTrack);case 6:return this.logger.warn("content track already created"),e.abrupt("return",Promise.reject(gt("XYSDK:950509")));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"handleChangeStream",value:function(e,t,r){var n,i;return _a(this,void 0,void 0,u().mark((function o(){return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(0!==r){o.next=5;break}return o.next=3,null===(n=this.videoAudioTrack)||void 0===n?void 0:n.handleChangeStream(e,t);case 3:o.next=8;break;case 5:if(1!==r){o.next=8;break}return o.next=8,null===(i=this.contentTrack)||void 0===i?void 0:i.handleChangeStream(e,t);case 8:case"end":return o.stop()}}),o,this)})))}},{key:"videoAudioProcess",value:function(e){var t;return _a(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[stream]invoke operate video or audio: ",e),r.prev=1,r.abrupt("return",null===(t=this.videoAudioTrack)||void 0===t?void 0:t.videoAudioProcess(e));case 5:return r.prev=5,r.t0=r.catch(1),r.abrupt("return",Promise.reject(r.t0));case 8:case"end":return r.stop()}}),r,this,[[1,5]])})))}},{key:"closeVideoAudioStream",value:function(){var e;null===(e=this.videoAudioTrack)||void 0===e||e.close(),this.videoAudioTrack=null}},{key:"closeContentStream",value:function(){var e;null===(e=this.contentTrack)||void 0===e||e.close(),this.contentTrack=null}},{key:"clearContentTrack",value:function(){this.contentTrack=null}},{key:"processLowPerformance",value:function(){var e;return _a(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=this.videoAudioTrack)||void 0===e?void 0:e.processLowPerformance();case 2:case"end":return t.stop()}}),t,this)})))}},{key:"handleDualStreamMessage",value:function(e){var t=e.state,r=this.getContentTrack(),n=this.clientInstance.getLayoutManager();if("SENDING"===t)this.logger.log("sig can sending share content"),null==r||r.emitStartShareContent(),null==n||n.setLocalShareContent(!0),this.clientInstance.sendV2States({category:C.OPER_CONFOPERATION,eventName:O.CONTENT,params:{contentType:"desk"}});else if("IDLE"===t){this.logger.log("sig idle share content");var i=zr[lt].SHARE_CONTENT_FAILED,o=this.clientInstance.getErrorCode(),a={};"STATE:200"!==e.code&&(a={message:i},e.code&&o&&o[lt]&&(a={message:o[lt][e.code]})),null==r||r.emitStopShareContent(a),null==n||n.setLocalShareContent(!1)}}},{key:"getVideoStream",value:function(e){var t=this.clientInstance.getSelfRoster(),r=null==t?void 0:t.key;if(!e||e===r){var n=this.clientInstance.getPreviewStreams();if(n&&n.previewStreams.length)return this.logger.log("successfully get local video stream"),n.previewStreams[0].stream}if(e&&e!==r){var i=this.clientInstance.getMediaManager().getLayoutRosters().total,o="";if(i.some((function(t){var r=t.videoTrackId,n=t.calluri,i=t.mediagroupid;return ea(n,i)===e&&(o=r,!0)})),o){var a=this.clientInstance.getMediaManager().getVideoTrackList(),s=o.replace("-tk-vd","-st");return this.getMediaStreamByTrackId(s,a)}}return null}},{key:"getAudioStream",value:function(e){var t=this.clientInstance.getSelfRoster(),r=null==t?void 0:t.key;if(!e||e===r){var n=this.clientInstance.getAudioStreamConfig();if(n&&n.stream)return this.logger.log("successfully get local audio stream"),n.stream}if(e&&e!==r){var i=this.clientInstance.getRemoteSpeakerList(),o=this.clientInstance.getMediaManager().getAudioTrackList(),a=i.find((function(t){return t.id===e})),s=((null==a?void 0:a.trackId)||"").replace("-tk-ad","-st");return this.getMediaStreamByTrackId(s,o)}return null}},{key:"getMediaStreamByTrackId",value:function(e,t){var r=null;return e&&(t.some((function(t){var n=t.data;return(null==n?void 0:n.streams[0].id)===e&&(r=n.streams[0],!0)})),this.logger.log("successfully get remote stream")),r}},{key:"getAudioAnalyser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.clientInstance.getSelfRoster(),n=(null==r?void 0:r.key)||"",i=ta(e||n).rosterId,o=this.getAudioStream(i),a=null==o?void 0:o.getAudioTracks();if(o&&(null==a?void 0:a.length)){var s=this.getAudioAnalyserManager();if(s){var u=s.createAnalyser(o,t);return this.analyserMap[i]=u,u.analyser}}return null}},{key:"removeAudioAnalyser",value:function(e){var t=this.clientInstance.getSelfRoster(),r=(null==t?void 0:t.key)||"",n=ta(e||r).rosterId,i=this.analyserMap[n],o=this.getAudioAnalyserManager();i&&(o.pauseAnalyser(i.streamId),delete this.analyserMap[n])}},{key:"getSnapshot",value:function(e){return _a(this,void 0,void 0,u().mark((function t(){var r=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[invoke] getSnapshot params:",e),t.abrupt("return",new Promise((function(t,n){return _a(r,void 0,void 0,u().mark((function r(){var i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:mt.isObject(e)||n(gt("XYSDK:950101",e)),o=(i=e||{}).id,a=i.compressLevel,s=i.imageType,c=this.clientInstance.getLayoutMap(),l=c.get(o),h=this.clientInstance.getVideoManagerMap(),f=h.get(o),d=(null==f?void 0:f.videoEle)||null,p={dataURL:"",width:0,height:0},d&&l&&"NORMAL"===l[0].state&&(v=l[0],g=v.isMirror,m=void 0!==g&&g,y=v.rotationInfo,b=(y||{}).rotation,S=new Ta,w=S.getVideoImage(d,{rotate:b,isMirror:m,compressLevel:a,imageType:s}),E=w.dataURL,k=w.width,I=w.height,p={dataURL:E,width:k,height:I}),t(p);case 10:case"end":return r.stop()}}),r,this)})))})));case 2:case"end":return t.stop()}}),t,this)})))}}]),t}(),Ra=(r(2506),L.LEVEL720),Na=L.LEVEL360,Da=L.LEVEL180,La=ee.PEOPLE,Pa=ee.LOCAL,Ma=ee.CONTENT,Ua=P.NORMAL,ja=P.LOW,Ba={"1-1":[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Pa}],"2-1":[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:La,config:{zIndex:1}},{position:[0,0,.192,.3413],resolution:{normal:Da,low:Da},quality:Ua,type:Pa,config:{zIndex:2,isRotate:!0,isPIP:!0,id:"MOBILE_SPEAKER_TEMPLATE_2_2",customStyle:{top:"8px",right:"8px",left:"auto"}}}],"3-1":[{position:[0,0,1,.6667],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[0,.6667,.5,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,.6667,.5,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"4-1":[{position:[0,0,1,.5],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[0,.5,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,.5,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.75,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"5-1":[{position:[0,0,1,.5],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[0,.5,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,.5,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.75,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.75,.5,.25],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"6-1":[{position:[0,0,1,.4],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[0,.4,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,.4,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.6,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.6,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.8,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"7-1":[{position:[0,0,1,.4],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[0,.4,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,.4,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.6,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.6,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.8,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.8,.5,.2],resolution:{normal:Da,low:Da},quality:Ua,type:La}]},Fa={"1-1":[{position:[0,0,1,1],resolution:{normal:Na,low:Na},quality:ja,type:Pa}],"2-1":[{position:[0,0,1,.5],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[0,.5,1,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"3-1":[{position:[0,0,1,.333],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[0,.333,1,.333],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[0,.666,1,.333],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"4-1":[{position:[0,0,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[.5,0,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[0,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[.5,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"5-1":[{position:[0,0,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,0,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.333,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.333,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.666,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"6-1":[{position:[0,0,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.5,0,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.333,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.333,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.666,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.5,.666,.5,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La}]},Ga={"1-1":[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Pa}],"2-1":[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[.75,0,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa}],"3-1":[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[.75,0,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.75,.333,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"4-1":[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:La},{position:[.75,0,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.75,.333,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.75,.666,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La}]},Ka={"1-1":[{position:[0,0,1,1],resolution:{normal:Na,low:Na},quality:ja,type:Pa}],"2-1":[{position:[0,0,.5,1],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[.5,0,.5,1],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"3-1":[{position:[.25,0,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[0,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[.5,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"4-1":[{position:[0,0,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:Pa},{position:[.5,0,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[0,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La},{position:[.5,.5,.5,.5],resolution:{normal:Na,low:Na},quality:Ua,type:La}],"5-1":[{position:[0,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.333,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.666,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.5,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.333,.5,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La}],"6-1":[{position:[0,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.333,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.666,0,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[0,.5,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.333,.5,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.666,.5,.333,.5],resolution:{normal:Da,low:Da},quality:Ua,type:La}]},Va={SPEAKER:{temp:{1:Ba["1-1"],2:Ba["2-1"],3:Ba["3-1"],4:Ba["4-1"],5:Ba["5-1"],6:Ba["6-1"],7:Ba["7-1"]},rate:{1:1,2:1,3:.8437,4:1.125,5:1.125,6:1.40625,7:1.40625}},GALLERY:{temp:{0:Fa["1-1"],1:Fa["1-1"],2:Fa["2-1"],3:Fa["3-1"],4:Fa["4-1"],5:Fa["5-1"],6:Fa["6-1"]},rate:{0:1,1:1,2:1.125,3:1.6875,4:.5603,5:.8437,6:.8437}},MULTI_PIC_CONTENT_HIGH_PRIORITY:{temp:{0:[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma}],1:[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma}],2:[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma,config:{zIndex:1}},{position:[0,0,.192,.3413],resolution:{normal:Da,low:Da},quality:Ua,type:La,config:{zIndex:2,isRotate:!0,isPIP:!0,id:"MULTI_PIC_CONTENT_HIGH_PRIORITY_2_2",customStyle:{top:"8px",right:"8px",left:"auto"}}}]},rate:{1:1,2:1}}},Ha={SPEAKER:{temp:{0:Ga["1-1"],1:Ga["1-1"],2:Ga["2-1"],3:Ga["3-1"],4:Ga["4-1"]},rate:{0:.5625,1:.5625,2:.4218,3:.4218,4:.4218}},GALLERY:{temp:{0:Ka["1-1"],1:Ka["1-1"],2:Ka["2-1"],3:Ka["3-1"],4:Ka["4-1"],5:Ka["5-1"],6:Ka["6-1"]},rate:{0:1,1:1,2:.28125,3:.5625,4:.5603,5:.375,6:.375}},MULTI_PIC_CONTENT_HIGH_PRIORITY:{temp:{0:[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma}],1:[{position:[0,0,1,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma}],2:[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma},{position:[.75,0,.25,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa}],3:[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma},{position:[.75,0,.25,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.75,.3333,.25,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:La}],4:[{position:[0,0,.75,1],resolution:{normal:Ra,low:Ra},quality:ja,type:Ma},{position:[.75,0,.25,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:Pa},{position:[.75,.3333,.25,.3333],resolution:{normal:Da,low:Da},quality:Ua,type:La},{position:[.75,.666,.25,.333],resolution:{normal:Da,low:Da},quality:Ua,type:La}]},rate:{0:.5625,1:.5625,2:.4218,3:.4218,4:.4218}}},za=L.LEVEL1080,Ya=L.LEVEL720,Wa=L.LEVEL360,Xa=L.LEVEL180,qa=ee.PEOPLE,$a=ee.LOCAL,Za=ee.CONTENT,Ja=P.NORMAL,Qa=P.HIGH,es=.5625,ts=[-30,-30,1,1],rs={"1-1":[{position:[0,0,1,1],resolution:{normal:Ya,low:Wa,high:za},type:$a,quality:Ja}],"2-1":[{position:[0,0,.75,1],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[.75,0,.25,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja}],"3-1":[{position:[0,0,.75,1],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[.75,0,.25,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.75,.333,.25,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"4-1":[{position:[0,0,.75,1],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[.75,0,.25,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.75,.333,.25,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.666,.25,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"5-1":[{position:[.125,0,.75,.75],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[0,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.25,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.5,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"6-1":[{position:[0,0,.75,.75],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[0,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.25,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.5,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.5,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"7-1":[{position:[0,0,.75,.75],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[0,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.25,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.5,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.5,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.25,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"8-1":[{position:[0,0,.75,.75],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[0,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.25,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.5,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.75,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.5,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,.25,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.75,0,.25,.25],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}]},ns={"1-1":[{position:[0,0,1,1],resolution:{normal:Ya,low:Wa,high:za},type:$a,quality:Ja}],"2-1":[{position:[0,0,.5,1],resolution:{normal:Ya,low:Wa,high:za},type:qa,quality:Ja},{position:[.5,0,.5,1],resolution:{normal:Ya,low:Wa,high:za},type:$a,quality:Ja}],"3-1":[{position:[.25,0,.5,.5],resolution:{normal:Wa,low:Wa},type:qa,quality:Ja},{position:[0,.5,.5,.5],resolution:{normal:Wa,low:Wa},type:$a,quality:Ja},{position:[.5,.5,.5,.5],resolution:{normal:Wa,low:Wa},type:qa,quality:Ja}],"4-1":[{position:[0,0,.5,.5],resolution:{normal:Wa,low:Xa},type:qa,quality:Ja},{position:[.5,0,.5,.5],resolution:{normal:Wa,low:Xa},type:qa,quality:Ja},{position:[0,.5,.5,.5],resolution:{normal:Wa,low:Xa},type:$a,quality:Ja},{position:[.5,.5,.5,.5],resolution:{normal:Wa,low:Xa},type:qa,quality:Ja}],"5-1":[{position:[0,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.5,.333,.5],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.333,.5,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"6-1":[{position:[0,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,0,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.5,.333,.5],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.333,.5,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,.5,.333,.5],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"7-1":[{position:[0,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.333,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"8-1":[{position:[0,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.333,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}],"9-1":[{position:[0,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,0,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.333,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,.333,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[0,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:$a,quality:Ja},{position:[.333,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja},{position:[.666,.666,.333,.333],resolution:{normal:Xa,low:Xa},type:qa,quality:Ja}]},is={SPEAKER:{temp:{0:rs["1-1"],1:rs["1-1"],2:rs["2-1"],3:rs["3-1"],4:rs["4-1"],5:rs["5-1"],6:rs["6-1"],7:rs["7-1"],8:rs["8-1"]},rate:{0:.5625,1:.5625,2:.4218,3:.4218,4:.4218,5:.5625,6:.5625,7:.5625,8:.5625}},GALLERY:{temp:{0:ns["1-1"],1:ns["1-1"],2:ns["2-1"],3:ns["3-1"],4:ns["4-1"],5:ns["5-1"],6:ns["6-1"],7:ns["7-1"],8:ns["8-1"],9:ns["9-1"]},rate:{0:.5625,1:.5625,2:.2812,3:.5625,4:.5625,5:.375,6:.375,7:.5625,8:.5625,9:.5625}}},os={MULTI_PIC_CONTENT_HIGH_PRIORITY:is[J.SPEAKER],MULTI_PIC_ACTIVE_HIGH_PRIORITY:is[J.SPEAKER],TWO_PIC_PIP:{temp:{1:[{position:[0,0,1,1],resolution:{normal:za,low:L.LEVEL720},quality:Qa,type:Za}],2:[{position:[0,0,1,1],resolution:{normal:za,low:Ya},quality:Qa,type:Za,config:{zIndex:1}},{position:[0,.75,.25,.25],resolution:{normal:Xa,low:Xa},quality:Ja,type:qa,config:{zIndex:2}}]},rate:{1:.5625,2:.5625}},CONTENT_ONLY:{temp:{1:[{position:[0,0,1,1],resolution:{normal:za,low:Ya},quality:Qa,type:Za}]},rate:{1:.5625}},TWO_PIC_SYMMETRIC:{temp:{1:[{position:[0,0,1,1],resolution:{normal:za,low:Ya},quality:Qa,type:Za}],2:[{position:[0,0,.5,1],resolution:{normal:za,low:Ya},quality:Qa,type:Za},{position:[.5,0,.5,1],resolution:{normal:Ya,low:Wa,high:za},quality:Ja,type:qa}]},rate:{1:.5625,2:.2812}}},as={temp:{1:[{position:[0,0,1,1],resolution:{normal:Ya,low:Ya},quality:Qa,type:qa}]},rate:{1:1}},ss=function(){function t(){e(this,t),this.commonTemplates=is,this.contentTemplates=this.getContentTemplates(),this.templates=Object.assign(Object.assign({},this.commonTemplates),this.contentTemplates)}return a(t,[{key:"getTemplate",value:function(e){var t=e.modeType,r=void 0===t?J.SPEAKER:t,n=e.templateCount,i=void 0===n?1:n,o=e.participantCount,a=void 0===o?1:o,s=e.isEnableHideLocalView,u=void 0!==s&&s,c=e.isChairmanMode,l=void 0!==c&&c,h=e.templateType,f=void 0===h?ee.NONE:h,d=e.orientation,p=void 0===d?te.NONE:d,v=e.focusViewConfig,g=e.isInDialogMode,m=void 0!==g&&g,y=ee.PEOPLE,b=ee.LOCAL,S=ee.CHAIRMAN,w=ee.NONE,E=J.SPEAKER,k=J.GALLERY;if(f!==w)return this.getFullLayoutTemplate(f);var I=this.getAllTemplates(p),x=I[r]||I[E]||{},C=x.temp,O=void 0===C?{}:C,T=x.rate,_=void 0===T?{}:T,A=Math.max.apply(Math,Xe(Object.keys(O).map(Number))),R=O[i]||O[A],N=_[i]||_[A],D=R.length,L=0,P=R.map((function(e,t){var r=e.resolution,n=e.type,i=void 0===n?y:n;return e.type===b&&u&&(i=y),a<=1&&D<=2&&i==y&&(i=b),l&&0===L&&i===y&&(i=S,L++),Object.assign(Object.assign({},e),{resolution:r,type:i})}));return m&&(P=this.handleDialogLayout(P,l)),v&&v.isFocusMode&&r!==k&&(P=this.handleForceView(P,v)),{template:P,rate:N}}},{key:"handleForceView",value:function(e,t){var r=ee.LOCAL,n=ee.CONTENT,i=t.roster,o=t.type,a=e[0],s=a.type,u=a.resolution,c=e.findIndex((function(e){return e.type===o}));if(c>-1){var l=e[c].type,h=(i||{}).key,f=void 0===h?"":h;e[0].type=l,l!==r&&(e[0].calluri=ta(f).endpointId),e[c].type=s,s===n&&(e[c].resolution=u)}return e}},{key:"handleDialogLayout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=ee.LOCAL,n=ee.CHAIRMAN,i=e.findIndex((function(e){return e.type===r})),o=t?1:0;if(e[o]||(o=0),-1!==i){var a=[e[i].type,e[o].type];e[o].type=a[0],e[i].type=a[1]}return t&&(e[0].type=n),e}},{key:"getAllTemplates",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te.NONE,t=te.NONE,r=te.MOBILE_VERTICAL;return e!==t?this.getMobileTemplates(e===r):this.templates}},{key:"getContentTemplates",value:function(){var e=J.SPEAKER;return os.MULTI_PIC_CONTENT_HIGH_PRIORITY=this.getMultiPicContentHighPriority(is[e]),os.MULTI_PIC_ACTIVE_HIGH_PRIORITY=this.getMultiPicActiveHighPriority(is[e]),os}},{key:"getMobileTemplates",value:function(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?Va:Ha}},{key:"getFullLayoutTemplate",value:function(e){var t=ee.CONTENT,r=L.LEVEL1080,n=L.LEVEL720,i=P.NORMAL,o=P.HIGH,a=e===t?r:n,s=e===t?o:i,u=as.temp,c=as.rate;return{template:[Object.assign(Object.assign({},u[1]),{position:[0,0,1,1],resolution:{normal:a,low:a,high:r},quality:s,type:e})],rate:c[1]}}},{key:"getMultiPicContentHighPriority",value:function(e){var t=ze()(e),r=L.LEVEL1080,n=L.LEVEL720,i=P.HIGH,o=ee.CONTENT;return Object.keys(t.temp).forEach((function(e){var a=t.temp[e];a[0].resolution={normal:r,low:n},a[0].quality=i,a[0].type=o})),t}},{key:"getMultiPicActiveHighPriority",value:function(e){var t=ze()(e),r=P.LOW,n=L.LEVEL720,i=ee.CONTENT;return Object.keys(t.temp).forEach((function(e){var o=Number(e);if(o>0){var a=t.temp[e];o<=2&&(a[o-1].resolution={normal:n,low:n},a[o-1].type=i,a[o-1].quality=r),o>2&&(a[2].resolution={normal:n,low:n},a[2].type=i,a[2].quality=r)}})),t}}]),t}();const us=ss;var cs=is.SPEAKER,ls=is.GALLERY,hs=L.LEVEL720,fs=L.LEVEL360,ds=L.LEVEL180,ps=ee.PEOPLE,vs=P.NORMAL,gs=ot(ot(ot(ot(ot(ot(ot(ot(ot(ot({},we["1x1"],{rate:null==cs?void 0:cs.rate[1],temp:(null==cs?void 0:cs.temp[1])||[]}),we["2x1"],{rate:null==ls?void 0:ls.rate[2],temp:null==ls?void 0:ls.temp[2]}),we["3x1"],{rate:null==ls?void 0:ls.rate[3],temp:null==ls?void 0:ls.temp[3]}),we["4x1"],{rate:null==ls?void 0:ls.rate[4],temp:null==ls?void 0:ls.temp[4]}),we["4x2"],{rate:null==cs?void 0:cs.rate[4],temp:null==cs?void 0:cs.temp[4]}),we["5x1"],{rate:null==cs?void 0:cs.rate[5],temp:null==cs?void 0:cs.temp[5]}),we["6x1"],{rate:null==ls?void 0:ls.rate[6],temp:null==ls?void 0:ls.temp[6]}),we["6x2"],{rate:null==cs?void 0:cs.rate[6],temp:[{position:[0,0,.666,.666],resolution:{normal:hs,low:fs},type:ps,quality:vs},{position:[.666,0,.333,.333],resolution:{normal:ds,low:ds},type:vs,quality:vs},{position:[.666,.333,.333,.333],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[0,.666,.333,.333],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.333,.666,.333,.333],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.666,.666,.333,.333],resolution:{normal:ds,low:ds},type:ps,quality:vs}]}),we["8x1"],{rate:null==cs?void 0:cs.rate[8],temp:[{position:[0,0,.75,.75],resolution:{normal:hs,low:fs},type:ps,quality:vs},{position:[.75,0,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.75,.25,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.75,.5,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[0,.75,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.25,.75,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.5,.75,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs},{position:[.75,.75,.25,.25],resolution:{normal:ds,low:ds},type:ps,quality:vs}]}),we["9x1"],{rate:null==ls?void 0:ls.rate[9],temp:null==ls?void 0:ls.temp[9]}),ms={id:"",roster:null,state:_e.NORMAL,rotate:{},rotationInfo:null,avatar:null,positionStyle:{left:"",top:"",width:"",height:""},isMirror:!1,templateConfig:{},position:[0,0,0,0],positionInfo:{width:0,height:0},index:0,pollingState:Ie.NORMAL,pollingName:"",resolution:0,quality:1,deal:!0};const ys="function"==typeof Buffer,bs="function"==typeof TextDecoder?new TextDecoder:void 0,Ss="function"==typeof TextEncoder?new TextEncoder:void 0,ws=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Es=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(ws),ks=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Is=String.fromCharCode.bind(String),xs="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Cs=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),Os=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Ts=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=ws[t>>18&63]+ws[t>>12&63]+ws[t>>6&63]+ws[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},_s="function"==typeof btoa?e=>btoa(e):ys?e=>Buffer.from(e,"binary").toString("base64"):Ts,As=ys?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(Is.apply(null,e.subarray(r,r+4096)));return _s(t.join(""))},Rs=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Is(192|t>>>6)+Is(128|63&t):Is(224|t>>>12&15)+Is(128|t>>>6&63)+Is(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Is(240|t>>>18&7)+Is(128|t>>>12&63)+Is(128|t>>>6&63)+Is(128|63&t)},Ns=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ds=e=>e.replace(Ns,Rs),Ls=ys?e=>Buffer.from(e,"utf8").toString("base64"):Ss?e=>As(Ss.encode(e)):e=>_s(Ds(e)),Ps=(e,t=!1)=>t?Cs(Ls(e)):Ls(e),Ms=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Us=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 Is(55296+(t>>>10))+Is(56320+(1023&t));case 3:return Is((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Is((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},js=e=>e.replace(Ms,Us),Bs=e=>{if(e=e.replace(/\s+/g,""),!ks.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=Es[e.charAt(o++)]<<18|Es[e.charAt(o++)]<<12|(r=Es[e.charAt(o++)])<<6|(n=Es[e.charAt(o++)]),i+=64===r?Is(t>>16&255):64===n?Is(t>>16&255,t>>8&255):Is(t>>16&255,t>>8&255,255&t);return i},Fs="function"==typeof atob?e=>atob(Os(e)):ys?e=>Buffer.from(e,"base64").toString("binary"):Bs,Gs=ys?e=>xs(Buffer.from(e,"base64")):e=>xs(Fs(e).split("").map((e=>e.charCodeAt(0)))),Ks=ys?e=>Buffer.from(e,"base64").toString("utf8"):bs?e=>bs.decode(Gs(e)):e=>js(Fs(e)),Vs=e=>Os(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),Hs=e=>Ks(Vs(e)),zs=Ps,Ys=Hs;function Ws(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 Xs(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 Xs(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Xs(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 qs=function(){function t(r,n){e(this,t),this.pollingMessage=null,this.pollingIntervalTimer=null,this.pollingInterval=0,this.pollingState=ke.INIT,this.skipMuteVideo=!1,this.skipUnjoined=!1,this.specifiedMap=new Map,this.speakerItem=null,this.pollingLayout=[],this.autoSpecified=[],this.customizedList=[],this.isForceUpdateMode=!1,this.cacheIsPolling=!1,this.client=r,this.logger=r.logger,this.layoutManager=n,this.isHasSpeaker=!1,this.pollingMode={pre:null,next:null},this.customizedList=[],this.pollingLayout=[],this.skipMuteVideo=!1,this.skipUnjoined=!1,this.cachePollingPause=!0,this.isPollingConfigChange=!0,this.autoPollingMap={pageSize:0,totalPage:0,currentPage:0,pollingList:[]}}return a(t,[{key:"getOrderRoster",value:function(){var e;return null===(e=this.client.getLayoutManager())||void 0===e?void 0:e.getSortedRosterList()}},{key:"getPollingState",value:function(){return this.pollingState}},{key:"getPollingLayout",value:function(){return this.pollingLayout}},{key:"handleCustomizedLayout",value:function(e){var t,r;if(e){var n=this.client.getAutoMode(),i=JSON.parse(e),o=i.stop,a=void 0!==o&&o,s=i.mix,u=void 0!==s&&s,c=i.polling,l=void 0!==c&&c,h=i.mode,f=void 0===h?"":h;if(this.logger.log("get customized layout msg: ",i),a&&(this.logger.log("stop polling layout"),this.destroy()),l&&u&&f)this.getPollingState()===ke.INIT&&(null===(t=this.layoutManager)||void 0===t||t.exitFullScreen()),this.handlePollingMessage(i);n&&(null===(r=this.layoutManager)||void 0===r||r.calcPageAndRequestLayout())}}},{key:"handlePollingMessage",value:function(e){var t=ke.INIT,r=ke.READY,n=ke.POLLING,i=e.detail,o=e.autoSpecified,a=e.mode,s=e.skipMuteVideo,u=e.skipUnjoined,c=i[0],l=c.pollingPause,h=c.pollingInterval,f=this.pollingMode.next,d=this.isPollingConfigChange;if(this.pollingState=this.pollingState===t?r:this.pollingState,!d){var p=this.checkPollingConfigChange(e).isChange;this.isPollingConfigChange=p}this.logger.log("polling config change: ",this.isPollingConfigChange),this.cachePollingPause=l,this.autoSpecified=o,this.customizedList=i,this.pollingInterval=1e3*h,this.pollingMode={pre:f,next:a},this.skipMuteVideo=s,this.skipUnjoined=u,this.isPollingConfigChange&&this.pollingState===n&&(this.clearPollingTimer(),this.startPollingInterval()),l&&this.pollingState!==ke.PAUSE_MEETING&&this.pausePolling(ke.PAUSE_MEETING)}},{key:"operatePollingLayout",value:function(){this.cachePollingPause?this.handlePausePollingLayout():this.handleStartPollingLayout(),this.isPollingConfigChange=!1}},{key:"handleStartPollingLayout",value:function(){var e=ke.READY,t=ke.POLLING,r=[ke.PAUSE_MEETING,ke.PAUSE_SDK];this.logger.log("start polling layout"),this.pollingState===e?(this.logger.log("polling first layout"),this.startPolling(),this.createPolling(),this.startPollingInterval()):r.includes(this.pollingState)?(this.logger.log("resume polling layout"),this.isForceUpdateMode=!0,this.startPolling(),this.createPolling(),this.startPollingInterval()):this.pollingState===t&&this.isPollingConfigChange&&(this.logger.log("polling config change, reset polling config"),this.emitPollingState(),this.resetPollingConfig(),this.createPolling())}},{key:"handlePausePollingLayout",value:function(){var e=ke.READY,t=ke.POLLING,r=ke.PAUSE_MEETING,n=this.pollingState;this.isForceUpdateMode=!0,n===e?(this.logger.log("pause first polling layout"),this.createPolling(),this.pausePolling(r)):n===t?(this.logger.log("pause polling layout"),this.pausePolling(r)):n===r&&this.createPolling()}},{key:"resetPollingConfig",value:function(){this.specifiedMap=new Map,this.autoPollingMap={pageSize:0,totalPage:0,currentPage:0,pollingList:[]},this.speakerItem=null}},{key:"checkPollingConfigChange",value:function(e){var t=e.detail,r=e.autoSpecified,n=e.mode,i=e.skipMuteVideo,o=e.skipUnjoined,a=t[0].pollingInterval,s=!1,u=!1;return this.skipMuteVideo!==i?(this.logger.log("polling change: skipMuteVideo",i),s=!0):this.skipUnjoined!==o?(this.logger.log("polling change: skipUnjoined: ",o),s=!0):this.pollingMode.next!==n?(this.logger.log("polling change: mode =>",{pre:this.pollingMode.next,cur:n}),s=!0):this.pollingInterval!==1e3*a?(this.logger.log("polling change: pollingInterval",a),u=!0,s=!0):JSON.stringify(this.autoSpecified)!==JSON.stringify(r)?(this.logger.log("polling change: autoSpecified"),s=!0):(s=this.customizedList.some((function(e,r){var n=JSON.stringify(e.items),i=JSON.stringify(t[r].items||[]),o=e.type,a=t[r].type;return n!==i||o!==a})),this.logger.log("polling change: items")),{isChange:s,isPollingIntervalChange:u}}},{key:"updateMode",value:function(e,t){var r;if(e!==t&&e||arguments.length>2&&void 0!==arguments[2]&&arguments[2]){var n=gs[e].rate;n&&(null===(r=this.layoutManager)||void 0===r||r.updateTemplateRate({next:n,previous:n}))}}},{key:"createPolling",value:function(){this.logger.log("[invoke]create polling"),this.calculateSpecifiedMap(),this.calculateAutoPollingMap(),this.calculateSpeaker(),this.createPollingLayout(),this.createRequestNewLayout()}},{key:"createPollingLayout",value:function(){var e=this,t=this.pollingMode.next||we["1x1"],r=gs[t].temp||[],n=Ee.SPEAKER,i=Ee.SPECIFIED,o=Ee.AUTO,a=[],s=Ie.NOT_FOUND,u=0;this.customizedList.forEach((function(t,c){var l=t.type,h=void 0===l?i:l,f=t.items.length,d=ze()(ms);if(d.position=r[c].position,h===o){var p=e.getCurrentPagePollingList()[u],v="AUTO-".concat(c,"-").concat(u);e.setPollingLayoutItem(p,d,v),e.setPollingLayoutTemplate(r,d,c),u+=1}else if(h===i){var g="SPECIFIED-".concat(c),m=c+"",y=e.specifiedMap.get(m);if(y){var b=y.index,S=y.pollingList,w=S.length,E=S[b];f&&w?e.setPollingLayoutItem(E,d,g):f&&!w?e.setPollingLayoutItem({endpointId:"",mediaGroupId:0,state:s},d,g):f||e.setPollingLayoutItem(null,d,g)}e.setPollingLayoutTemplate(r,d,c)}else if(h===n){var k="SPEAKER-".concat(c),I=e.speakerItem;e.setPollingLayoutItem(I,d,k),e.setPollingLayoutTemplate(r,d,c)}a.push(d)})),this.logger.log("create polling layout: ",a),this.pollingLayout=a}},{key:"setPollingLayoutTemplate",value:function(e,t,r){e&&(t.resolution=e[r].resolution.normal,t.quality=e[r].quality)}},{key:"getBulkRosterMap",value:function(){return this.client.getRosterManager().getBulkRosterMap()}},{key:"setPollingLayoutItem",value:function(e,t,r){var n,i=Ie.NULL,o=Qo("","",r);if(e){var a=e.endpointId,s=void 0===a?"":a,u=e.state,c=e.deviceName,l=void 0===c?"":c,h=e.mediaGroupId,f=void 0===h?0:h,d=Qo(s,f,r),p=ea(s,f),v=this.getBulkRosterMap().get(p);if(v)t.id=d,t.roster=v;else{var g=null===(n=this.layoutManager)||void 0===n?void 0:n.getSelfRoster();g&&p===g.key?(t.roster=g,t.id=d):t.id=o}t.pollingState=u,t.pollingName=l}else t.id=o,t.pollingState=i,t.pollingName=""}},{key:"createRequestNewLayout",value:function(){var e=[],t={};for(var r in this.pollingLayout.forEach((function(e){var r=e.roster,n=e.resolution,i=void 0===n?L.LEVEL180:n;if(r){var o=r.endpointId,a=r.mediagroupid,s=r.isLocal,u=ea(o,a);if(s)return;if(t[u])(t[u].resolution||0)<i&&(t[u]=e);else t[u]=e}})),t){var n=t[r],i=n.roster,o=n.resolution,a=void 0===o?L.LEVEL180:o,s=n.quality,u=void 0===s?1:s;if(i){var c={calluri:i.endpointId,resolution:a,quality:u,mediagroupid:i.mediagroupid};e.push(c)}}this.logger.log("polling request layout: ",{reqList:e,maxViewCountPerPage:9,pageIndex:0}),this.client.requestNewLayout(e,9,0,[],{})}},{key:"getCurrentPagePollingList",value:function(){var e=this.autoPollingMap,t=e.pageSize,r=e.currentPage*t,n=r+t;return e.pollingList.slice(r,n)}},{key:"calculateSpecifiedMap",value:function(){var e=this,t=new Map,r=Ee.SPECIFIED,n=Ee.SPEAKER,i=Ee.AUTO,o=0;this.customizedList.forEach((function(a){var s=a.type,u=void 0===s?r:s,c=a.items,l=a.sequence;if(u===r){var h=e.getPollingListAndFilter(c),f=h.length,d=l+"",p=e.specifiedMap.get(d),v=0;p&&(v=p.index+1>f?f-1:p.index),t.set(d,{index:v,pollingList:h})}u===n&&(e.isHasSpeaker=!0),u===i&&(o+=1)})),this.autoPollingMap.pageSize=o,this.specifiedMap=t,this.logger.log("get specified map: ",vt(this.specifiedMap))}},{key:"getPollingListAndFilter",value:function(e){var t=this,r=Ie.NORMAL,n=Ie.NO_JOINED,i=Ie.VIDEO_MUTE,o=[],a=this.getBulkRosterMap();return e.forEach((function(e){var s=e.di,u=e.dn,c=ea(s,0);if(a.has(c)){var l=a.get(c),h=l.endpointId,f=l.mediagroupid,d=l.videoTxMute,p=l.displayName,v=d?i:r;t.appendDataToPollingList(o,{endpointId:h,deviceName:p,mediaGroupId:f,state:v})}else t.appendDataToPollingList(o,{endpointId:s,deviceName:Ys(u),mediaGroupId:0,state:n})})),o}},{key:"appendDataToPollingList",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Ie.NO_JOINED,i=Ie.VIDEO_MUTE,o=this.skipMuteVideo&&t.state===i,a=this.skipUnjoined&&t.state===n;o||a?this.logger.log("ignore append data: ",t):r?e.unshift(t):e.push(t)}},{key:"calculateAutoPollingMap",value:function(){var e,t=this,r=Ie.NORMAL,n=Ie.NO_JOINED,i=Ie.VIDEO_MUTE,o=[],a=this.getBulkRosterMap();if(this.autoSpecified.length)this.autoSpecified.forEach((function(e){var s=e.di,u=e.dn,c=ea(s,0);if(a.has(c)){var l=a.get(c),h=l.endpointId,f=l.mediagroupid,d=l.videoTxMute,p=l.displayName,v=d?i:r;t.appendDataToPollingList(o,{endpointId:h,deviceName:p,mediaGroupId:f,state:v})}else t.appendDataToPollingList(o,{endpointId:s,deviceName:Ys(u),mediaGroupId:0,state:n})}));else{var s,u=null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster(),c=!1,l=Ws(a);try{for(l.s();!(s=l.n()).done;){var h=Yr(s.value,2)[1],f=h.endpointId,d=h.mediagroupid,p=h.videoTxMute,v=h.displayName,g=this.isIncludeSpecifiedMap(f);if(ea(f,d)!==(null==u?void 0:u.key)){if(!g){var m=p?i:r;this.appendDataToPollingList(o,{endpointId:f,deviceName:v,mediaGroupId:d,state:m})}}else c=g}}catch(e){l.e(e)}finally{l.f()}if(u&&!c){var y=u.endpointId,b=u.mediagroupid,S=u.videoTxMute,w=u.displayName,E=S?i:r;this.appendDataToPollingList(o,{endpointId:y,mediaGroupId:b,state:E,deviceName:w},!0)}}this.calculateAutoPollingPageInfo(o),this.autoPollingMap.pollingList=o,this.logger.log("get auto polling map: ",this.autoPollingMap)}},{key:"calculateAutoPollingPageInfo",value:function(e){var t=this.autoPollingMap,r=t.pageSize,n=t.currentPage,i=t.totalPage,o=void 0===i?0:i;r&&(o=Math.ceil(e.length/r)),n+1>o&&(n=o-1,this.autoPollingMap.currentPage=n),this.autoPollingMap.totalPage=o}},{key:"calculateSpeaker",value:function(){var e=this.getBulkRosterMap();if(this.isHasSpeaker){var t=this.client.getMediaManager().getActiveSpeaker().endpointId,r=Ie.NORMAL,n=Ie.NOT_FOUND,i=null;if(t){var o=ea(t,0),a=(e.get(o)||{}).displayName;i={endpointId:t,deviceName:void 0===a?"":a,mediaGroupId:0,state:r}}if(!i){var s=this.findNextSpeaker();if(s)i={endpointId:s.endpointId,mediaGroupId:s.mediagroupid,state:r,deviceName:s.displayName};else i={endpointId:"",mediaGroupId:0,state:n,deviceName:""}}this.speakerItem=i,this.logger.log("get speaker item: ",this.speakerItem)}}},{key:"isIncludeSpecifiedMap",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1,i=Ws(this.specifiedMap);try{for(i.s();!(t=i.n()).done;){var o=Yr(t.value,2)[1],a=o.index,s=o.pollingList;if(r){var u=s[a];u&&(n=u.endpointId===e)}else n=!!s.find((function(t){return t.endpointId===e}));if(n)break}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"findNextSpeaker",value:function(){var e,t=null===(e=this.layoutManager)||void 0===e?void 0:e.getSortedRosterList();return null==t?void 0:t.find((function(e){return!0}))}},{key:"startPollingInterval",value:function(){var e=this,t=ke.POLLING;this.pollingIntervalTimer||(this.pollingIntervalTimer=setTimeout((function(){e.pollingState===t?(e.pollingIntervalTimer=null,e.nextPage(),e.startPollingInterval()):e.clearPollingTimer()}),this.pollingInterval))}},{key:"startPolling",value:function(){this.pollingState=ke.POLLING,this.emitPollingState()}},{key:"pausePolling",value:function(e){this.logger.log("invoke pause polling: ",e);var t=ke.PAUSE_MEETING;this.pollingState!==t&&(this.pollingState=e),this.logger.log("current polling state: ",this.pollingState),this.clearPollingTimer(),this.emitPollingState()}},{key:"emitPollingState",value:function(){var e=ke.POLLING,t=ke.PAUSE_MEETING,r=this.pollingState===e,n=this.pollingState===t,i=r||n;if(this.cacheIsPolling!==i){this.cacheIsPolling=i;var o={isPolling:i};this.client.emitMessage(Pe.LAYOUT_STATE,o)}}},{key:"clearPollingTimer",value:function(){this.logger.log("clear polling timer"),this.pollingIntervalTimer&&(clearTimeout(this.pollingIntervalTimer),this.pollingIntervalTimer=null)}},{key:"handleSpeakersInfo",value:function(){this.pollingState===ke.POLLING&&this.isHasSpeaker&&this.createPolling()}},{key:"setOrderRoster",value:function(){}},{key:"handleRosterWithPolling",value:function(){this.layoutManager.getLayoutState().getIsAutoLayout()||this.createPolling()}},{key:"handleLayoutResult",value:function(){var e=this.pollingMode,t=e.next,r=e.pre,n=this.isForceUpdateMode;t&&this.updateMode(t,r,n),n&&(this.isForceUpdateMode=!1)}},{key:"nextPage",value:function(){this.logger.log("polling next page"),this.specifiedMap.forEach((function(e){var t=e.index+1;t>=e.pollingList.length&&(t=0),e.index=t}));var e=this.autoPollingMap,t=e.currentPage+1,r=t>=e.totalPage?0:t;this.autoPollingMap.currentPage=r,this.calculateSpeaker(),this.createPollingLayout(),this.createRequestNewLayout()}},{key:"destroy",value:function(){this.logger.log("polling destroy"),this.pollingState=ke.INIT,this.emitPollingState(),this.specifiedMap=new Map,this.autoPollingMap={pageSize:0,totalPage:0,currentPage:0,pollingList:[]},this.speakerItem=null,this.isHasSpeaker=!1,this.pollingMode={pre:null,next:null},this.customizedList=[],this.pollingLayout=[],this.skipMuteVideo=!1,this.skipUnjoined=!1,this.pollingInterval=0,this.cachePollingPause=!0,this.isPollingConfigChange=!0,this.clearPollingTimer()}}]),t}(),$s=function(){function t(r,n){e(this,t),this.isLocalShareContent=!1,this.isContentMode=!1,this.isChairmanMode=!1,this.isInDialogMode=!1,this.isEnableHideLocalView=!1,this.forceFullScreenId="",this.layoutConfig=Or,this.templateMode=J.SPEAKER,this.cacheTemplateMode=ur,this.client=r,this.logger=r.logger,this.layoutManager=n}return a(t,[{key:"getLayoutConfig",value:function(){return this.layoutConfig}},{key:"setLayoutConfig",value:function(e){return this.layoutConfig=e,this.updateIsContentMode(),this.layoutConfig}},{key:"getIsContentMode",value:function(){return this.isContentMode}},{key:"getIsChairmanMode",value:function(){return this.isChairmanMode}},{key:"updateIsChairmanMode",value:function(){var e=(this.client.getMeetingControlInfo()||{}).chairmanUri,t=this.layoutManager.getConfInfo(),r=t.chairManUrl,n=t.chairManReason,i=this.layoutManager.getSelfRoster();return this.isChairmanMode=!(!e||n&&n!==ne.MAIN_VENUE||!r||r===i.endpointId),this.isChairmanMode}},{key:"getIsEnableHideLocalView",value:function(){return this.isEnableHideLocalView}},{key:"updateIsEnableHideLocalView",value:function(){var e=this.layoutManager.getConfInfo().totalEpCount,t=this.layoutManager.getFocusViewConfig(),r=t.isFocusMode,n=t.roster,i=this.layoutManager.getTemplateMode();return e<=1||this.isInDialogMode||r&&(null==n?void 0:n.isLocal)&&i===J.SPEAKER?this.isEnableHideLocalView=!1:this.isEnableHideLocalView=!!this.client.getLocalHide(),this.isEnableHideLocalView}},{key:"getIsInDialogMode",value:function(){return this.isInDialogMode}},{key:"updateIsInDialogMode",value:function(){var e=(this.client.getMeetingControlInfo()||{}).conferenceMode;return this.isInDialogMode=!this.isContentMode&&e===I.DIALOG,this.layoutManager.updatePollingState(),this.isInDialogMode}},{key:"updateIsContentMode",value:function(){var e=this.layoutManager.getConfInfo().contentUri,t=this.layoutConfig.isForceSharedLayout,r=void 0===t||t;return this.isContentMode=!!e||this.isLocalShareContent&&r,this.layoutManager.updatePollingState(),this.logger.log("updateIsContentMode",this.isContentMode),this.isContentMode}},{key:"getIsLocalShareContent",value:function(){return this.isLocalShareContent}},{key:"setIsLocalShareContent",value:function(e){return this.isLocalShareContent=e,this.updateIsContentMode(),this.isLocalShareContent}},{key:"getTemplateMode",value:function(){return this.templateMode}},{key:"setTemplateMode",value:function(e){return this.templateMode=e,this.templateMode}},{key:"getCacheTemplateMode",value:function(){return this.cacheTemplateMode}},{key:"setCacheTemplateMode",value:function(e){return this.cacheTemplateMode=e,this.cacheTemplateMode}},{key:"getForceFullScreenId",value:function(){return this.forceFullScreenId}},{key:"setForceFullScreenId",value:function(e){return this.forceFullScreenId=e,this.layoutManager.updatePollingState(),this.forceFullScreenId}},{key:"getIsAutoLayout",value:function(){var e=this.getCurrentState(),t=e.isPolling,r=e.isSwitchAutoLayout,n=!t||r;return this.logger.log("is auto layout: ",n),n}},{key:"getCurrentState",value:function(){var e=ke.INIT,t=this.layoutManager.getPolling().getPollingState(),r=!!this.forceFullScreenId,n=this.isInDialogMode,i=this.isContentMode,o=t!==e,a={isForceLayout:r,isInDialogMode:n,isContentMode:i,isPolling:o,isSwitchAutoLayout:o&&(r||n||i)};return this.logger.log("current layout state: ",a),a}},{key:"destroy",value:function(){}}]),t}();function Zs(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 Js(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 Js(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Js(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 Qs=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},eu=function(){function t(r){e(this,t),this.layoutMap=new Map,this.sortedRosterList=[],this.layoutSortedRosterList=[],this.selfRoster=Object.assign(Object.assign({},or.ROSTER),{isLocal:!0}),this.newLayoutList=[],this.initLayout=[],this.templateRate={previous:es,next:0},this.content={previous:null,next:null},this.screenInfo={width:0,height:0,rateHeight:0,rateWidth:0},this.internalsLayout={},this.localContent=null,this.preConfInfo=null,this.confInfo=Object.assign({},or.CONF_INFO),this.pageInfo={pageSize:9,currentPage:0,totalPage:0},this.layoutOrientation=te.NONE,this.localMirror=!0,this.customLayoutCacheList=null,this.client=r,this.logger=r.logger,this.focusViewConfig={isFocusMode:!1,roster:null,type:ee.PEOPLE,kind:re.NONE},this.layoutState=new $s(r,this),this.mediaManager=r.getMediaManager(),this.templateManager=new us,this.polling=new qs(r,this),this.calculateScreenInfo()}return a(t,[{key:"getNewLayout",value:function(){return this.newLayoutList}},{key:"getLayoutSortedRosterList",value:function(){return this.layoutSortedRosterList}},{key:"getSortedRosterList",value:function(){return this.sortedRosterList}},{key:"getLayoutMap",value:function(){return this.layoutMap}},{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:"getForceFullScreenId",value:function(){return this.layoutState.getForceFullScreenId()}},{key:"getTemplateMode",value:function(){return this.layoutState.getTemplateMode()}},{key:"getConfInfo",value:function(){return this.confInfo}},{key:"getInternalsLayout",value:function(){return this.internalsLayout}},{key:"getLocalShareState",value:function(){return this.layoutState.getIsLocalShareContent()}},{key:"getFocusRoster",value:function(){return this.focusViewConfig.roster}},{key:"getLayoutState",value:function(){return this.layoutState}},{key:"getFocusViewConfig",value:function(){return this.focusViewConfig}},{key:"getFocusViewId",value:function(){var e=this.focusViewConfig,t=e.isFocusMode,r=e.roster,n=e.kind,i=(r||{}).key,o=void 0===i?"":i;return t&&n===re.MEETING?o:""}},{key:"getLayoutOrientation",value:function(){return this.layoutOrientation}},{key:"getPolling",value:function(){return this.polling}},{key:"getPollingState",value:function(){var e;return null===(e=this.polling)||void 0===e?void 0:e.getPollingState()}},{key:"setSortedRosterList",value:function(e){this.sortedRosterList=e}},{key:"startForceFullScreen",value:function(e){return Qs(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.client.getAutoMode()){t.next=3;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950602")));case 3:if(!e||mt.isString(e)){t.next=5;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950101",e)));case 5:if(r=ta(e),n=r.rosterId,i=this.getLayoutMap(),o=this.getForceFullScreenId(),!n){t.next=15;break}if(i.has(n)){t.next=13;break}return this.logger.warn("Not match layout item: ",n),t.abrupt("return",Promise.reject(gt("XYSDK:950101")));case 13:if(n!==o){t.next=15;break}return t.abrupt("return",n);case 15:return t.prev=15,this.setForceFullScreenId(n),this.calcPageAndRequestLayout(),t.abrupt("return",n);case 21:return t.prev=21,t.t0=t.catch(15),t.abrupt("return",Promise.reject(gt("XYSDK:950530")));case 24:case"end":return t.stop()}}),t,this,[[15,21]])})))}},{key:"setLocalStatus",value:function(e){var t=this;this.logger.log("set local status: ",e),this.selfRoster=Object.assign(Object.assign({},this.selfRoster),e);var r=this.layoutState.getForceFullScreenId();if(!r||r===this.selfRoster.key){var n=this.selfRoster,i=n.endpointId,o=n.mediagroupid,a=ea(i,o),s=this.layoutMap.get(a),u=this.layoutSortedRosterList.findIndex((function(e){return e.endpointId===i&&e.mediagroupid===o}));if(u>-1&&(this.layoutSortedRosterList[u]=this.selfRoster),s){var c=[];s.forEach((function(e){c.push(Object.assign(Object.assign({},e),{roster:t.selfRoster}))})),this.layoutMap.set(a,c)}this.updateStreams()}}},{key:"setForceFullScreenId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.logger.log("set force full screen id: ",e),this.layoutState.setForceFullScreenId(e),this.client.emitMessage(Pe.FORCE_FULL_SCREEN,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,this.layoutState.updateIsContentMode(),this.layoutState.updateIsChairmanMode(),this.layoutState.updateIsEnableHideLocalView(),this.setFocusRoster(),this.logger.log("update confInfo: ",this.confInfo)}},{key:"setPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.logger.log("[layout] set page info:",e),this.exitFullScreen(),this.pageInfo.currentPage=e,this.calcPageAndRequestLayout()}},{key:"setLocalShareContent",value:function(e){this.layoutState.setIsLocalShareContent(e),this.setTemplateMode(!0),this.calcPageAndRequestLayout()}},{key:"onVideoStatusChange",value:function(e){var t=this.getLayoutMap(),r=ta(e).rosterId,n=t.has(r),i=this.client.getRender();if(n){var o=t.get(r),a=!1;o=o.map((function(t){var r=t.roster,n=t.id;if(n===e){var o=(r||{}).isContent,s=void 0!==o&&o,u=i.getVideoManagerById(n,s).calculateLayoutState(t),c=u.state,l=u.isChange;return a=l,Object.assign(Object.assign({},t),{state:c})}return t})),a&&(t.set(r,o),this.layoutMap=t,this.sendLayoutMessage())}}},{key:"setLayoutOrientation",value:function(e){this.layoutOrientation!==e&&(this.layoutOrientation=e,this.createLayout(),this.calcRequestNewLayout())}},{key:"switchLayout",value:function(e){this.logger.log("[layout] switch layout:",e),this.exitFullScreen();var t=J.GALLERY,r=this.confInfo.contentUri?sr:ar,n=e,i=this.layoutState.getTemplateMode(),o=this.layoutState.getCacheTemplateMode();if(!n)if(i===t)n=o;else{n=i;var a=r.findIndex((function(e){return e===n})),s=a+1>=r.length?0:a+1;n=r[s]}return i=this.layoutState.setTemplateMode(n),this.layoutState.updateIsEnableHideLocalView(),this.pageInfo.currentPage=i===t?1:0,this.calcRequestNewLayout(),this.client.emitMessage(Pe.PAGE_INFO,this.pageInfo),this.logger.log("switch layout Mode: ",n),n}},{key:"setFocusView",value:function(e){var t=ta(e),r=t.rosterId;if(!t.endpointId)return this.logger.warn("[LM]set invalid focus view id: ",e),e;var n=this.getFocusViewId();return this.layoutState.getTemplateMode()===J.GALLERY||n?n:(this.handleFocusView(r),this.getFocusViewId())}},{key:"setLocalViewParams",value:function(e){return Qs(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.logger.log("[layout] set local view params:",e),r=e.isMirror,n=void 0===r||r,this.localMirror!==n&&(this.localMirror=n,this.selfRoster.videoTxMute||this.createLayout());case 3:case"end":return t.stop()}}),t,this)})))}},{key:"updateLocalTrack",value:function(){var e=this.selfRoster.key,t=this.layoutMap.get(e),r=this.client.getRender();null==t||t.forEach((function(e){var t=e.id;r.updateLocalTrack(t)}))}},{key:"updatePollingState",value:function(){this.layoutState.getCurrentState().isSwitchAutoLayout&&this.polling.pausePolling(ke.PAUSE_SDK),this.layoutState.getIsAutoLayout()||this.polling.operatePollingLayout()}},{key:"calcPageAndRequestLayout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.confInfo;this.layoutState.getIsAutoLayout()?(this.calcPageInfo(e),this.calcRequestNewLayout()):this.polling.operatePollingLayout()}},{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.isChairmanMode,o=void 0!==i&&i,a=this.layoutState.getIsEnableHideLocalView(),s=e.participantCount,u=e.contentUri;s-=a?1:0;var c=Math.min(112,s),l=this.pageInfo,h=l.pageSize,f=l.currentPage,d=l.totalPage;h=this.layoutOrientation!==te.NONE?6:9,d=Math.ceil(c/h),f=Math.min(f,d);var p=this.focusViewConfig,v=p.isFocusMode,g=p.kind,m=this.layoutState.getIsContentMode(),y=this.layoutState.getForceFullScreenId();this.pageInfo=Object.assign(Object.assign({},this.pageInfo),{pageSize:h,totalPage:d,currentPage:f}),g===re.MEETING&&this.updateFocusViewConfig({isFocusMode:!m&&!y&&!!this.focusViewConfig.roster});var b=!1,S=this.layoutState.getIsChairmanMode();!o&&S&&(this.exitFullScreen(),b=!0),!v&&this.focusViewConfig.isFocusMode&&(b=!0),this.layoutState.getIsInDialogMode()&&(b=!1);var w=this.layoutState.getTemplateMode();(!n&&u||n&&!u&&w!==J.GALLERY)&&(this.logger.log("calcPageInfo contentUri:",u),this.exitFullScreen(),b=!0),this.setTemplateMode(b),this.preConfInfo=Object.assign(Object.assign({},this.confInfo),{isChairmanMode:S}),w=this.layoutState.getTemplateMode(),this.logger.log("[AUTO] calcPageInfo templateMode:",w),this.logger.log("[AUTO] calcPageInfo pageInfo:",this.pageInfo),this.client.emitMessage(Pe.PAGE_INFO,this.pageInfo)}},{key:"calcRequestNewLayout",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageInfo;this.logger.log("calc request layout page info:",t);var r=this.confInfo,n=r.participantCount,i=void 0===n?0:n,o=r.chairManUrl,a=void 0===o?"":o,s=r.contentUri,u=void 0===s?"":s;if(this.layoutState.getForceFullScreenId())this.calcForceFullScreenRequestLayout();else if(this.layoutState.getIsInDialogMode())this.calcRequestNewLayoutByRoster();else{var c=t.pageSize,l=t.currentPage,h=t.totalPage,f=this.layoutState.getIsEnableHideLocalView(),d=0===l&&u?1:0,p=Math.min(112,i)+d-(f?1:0),v=p,g=this.client.getMeetingControl().getOnHold(),m=this.layoutState.getLayoutConfig(),y=m.isForceSharedLayout,b=void 0===y||y,S=m.localSharedMaxViewCount,w=void 0===S?4:S,E=[];if(i<=1&&!u||g)return this.client.requestNewLayout(E,c,0),void this.createAutoLayout([]);l===h&&l>0&&(v=p-(l-1)*c);var k=this.layoutState.getIsChairmanMode(),I=this.layoutState.getIsLocalShareContent();if(k&&(v=d+1+(f&&i<=2?0:1),l=0),(I&&b||!k&&I&&!b)&&(v=Math.min(p,w)),l>0&&(v=Math.min(v,c)),v>0){var x=this.calcTemplate(v).template,C=ee.LOCAL,O=ee.CONTENT,T=ee.CHAIRMAN,_=P.NORMAL;x.forEach((function(t){var r=t.resolution,n=t.type,i=t.quality,o=void 0===i?_:i,s=t.calluri,c=void 0===s?"":s;n!==C&&(n===O&&(c=u),n===T&&(c=a),E.push({mediagroupid:~~(n===O),calluri:c,resolution:e.convertResolutionLevel(r),quality:o}))}))}this.logger.log("request layout:",E),this.client.requestNewLayout(E,c,l,[],{uiShowLocalWhenPageMode:!f})}}},{key:"setTemplateMode",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])this.resetTemplateMode();else{if(this.layoutState.getIsInDialogMode())return this.pageInfo.currentPage=0,void this.layoutState.setTemplateMode(J.GALLERY);var e=this.pageInfo.currentPage,t=this.confInfo.contentUri,r=J.GALLERY,n=this.layoutState.getTemplateMode();if(e>0&&n!==r&&this.layoutState.setTemplateMode(r),0===e)if(t){var i=this.layoutState.getCacheTemplateMode(),o=sr.find((function(e){return e===i}));this.layoutState.setTemplateMode(o?i:cr)}else this.layoutState.setTemplateMode(ur)}}},{key:"resetTemplateMode",value:function(){var e=this.confInfo.contentUri,t=this.layoutState.getLayoutConfig().isForceSharedLayout,r=this.layoutState.getIsLocalShareContent(),n=e?cr:ur,i=0;r&&t&&(n=J.GALLERY,i=1),this.pageInfo.currentPage=i,this.layoutState.setTemplateMode(n)}},{key:"createLayoutSortedRosterList",value:function(e){this.logger.log("[LM]create layout sorted roster list:",e),this.layoutSortedRosterList=[];var t=e.length,r=this.layoutState.getIsEnableHideLocalView(),n=(this.client.getMeetingControlInfo()||{}).chairmanUri,i=this.mediaManager.getActiveSpeaker(),o=(this.focusViewConfig||{}).kind,a=(this.focusViewConfig.roster||{}).key,s=this.selfRoster.key;if(o===re.USER&&(a=""),this.selfRoster.isFocusScreen=s===a,0===t)return this.layoutSortedRosterList=[this.selfRoster],void this.logger.log("[LM]layout sorted roster list only local:",this.layoutSortedRosterList);for(var u=0;u<t;u++){var c,l,h=e[u],f=h.calluri,d=void 0===f?"":f,p=h.mediagroupid,v=h.isAudioMute,g=h.isVideoMute,m=h.remoteName,y=h.remoteType,b=h.MuteReason,S=1===p,w=0===p;l=ea(d,p),c=Object.assign(Object.assign({},h),{key:l,isLocal:!1,isContent:S,displayName:m,endpointId:d,audioTxMute:v,videoTxMute:g,videoRxMute:!1,deviceType:y,audioRxMute:!1,videoMuteReason:b,isForceFullScreen:w&&d===n,isFocusScreen:l===a,isActiveSpeaker:w&&d===i.endpointId,isLastAdd:!1,onHold:!1,isPolling:!1}),S?(this.confInfo.contentUri&&(this.content=Object.assign(Object.assign({},this.content),{next:c})),this.layoutSortedRosterList.splice(0,0,c)):this.layoutSortedRosterList.push(c)}var E=this.layoutState.getForceFullScreenId();(!E||E&&E===s)&&!r&&this.pageInfo.currentPage<=1&&this.layoutSortedRosterList.splice(1,0,this.selfRoster),this.logger.log("[LM]layout sorted roster list:",this.layoutSortedRosterList)}},{key:"createCustomLayout",value:function(e){this.createLayoutSortedRosterList(e),this.initCustomLayoutMap(),this.clearInvalidLayout(),this.updateStreams()}},{key:"initCustomLayoutMap",value:function(){var e=this,t=P.LOW;this.layoutSortedRosterList.forEach((function(r,n){var i=r.isLocal,o=r.key,a=r.endpointId,s=r.mediagroupid,u=e.layoutMap.has(o),c=e.client.getLayoutAvatarType();if(u){var l=e.layoutMap.get(o);l&&l.length&&(l=l.map((function(i){var o=i.avatar;return c===Ae.TEXT&&(o=e.getLayoutAvatar(r,c)),Object.assign(Object.assign({},i),{roster:r,resolution:0,quality:t,deal:!0,index:n,avatar:o})})),e.layoutMap.set(o,l))}else{var h=e.getLayoutAvatar(r,c),f=[{roster:r,id:Qo(a,s),rotate:{},rotationInfo:null,state:_e.NORMAL,resolution:0,quality:t,deal:!0,index:n,avatar:h,isMirror:i&&e.localMirror}];e.layoutMap.set(o,f)}}))}},{key:"createAutoLayout",value:function(e){if(this.layoutState.getIsAutoLayout()){var t=this.layoutState.getForceFullScreenId();if(t)if(t===this.selfRoster.key)e=[];else{var r=this.findRosterById(t,e);if(!r||1===r.mediagroupid&&!this.confInfo.contentUri)return this.exitFullScreen(),void this.calcRequestNewLayout()}this.createLayoutSortedRosterList(e),this.createLayout()}else this.polling.handleLayoutResult(),this.createAutoPollingLayout()}},{key:"createAutoPollingLayout",value:function(){var e,t=null===(e=this.polling)||void 0===e?void 0:e.getPollingLayout();t&&(this.createBaseLayout(t),this.updateStreams(!1),this.calculatePosition(),this.calculateRotate(),this.sendLayoutMessage()),this.client.sendTemplateMode(J.SPEAKER),this.logger.log("current template mode:",J.SPEAKER),this.sendContentRosterMessage()}},{key:"createLayout",value:function(){this.logger.log("[LM] invoke createLayout"),this.initLayoutManager(),this.createBaseLayout(this.newLayoutList),this.updateStreams(!1),this.calculatePosition(),this.calculateRotate(),this.sendLayoutMessage(),this.logger.log("create layout: ",vt(this.layoutMap));var e=this.layoutState.getTemplateMode();this.logger.log("current template mode:",e),e!==J.GALLERY&&this.layoutState.setCacheTemplateMode(e),this.client.sendTemplateMode(e),this.sendContentRosterMessage()}},{key:"sendContentRosterMessage",value:function(){if(this.client.getPeerConnectionStatus()){var e=this.content,t=e.previous,r=e.next;(null==t?void 0:t.participantId)!==(null==r?void 0:r.participantId)&&this.client.sendContentRosterMessage(r)}}},{key:"calculateSortedRosterList",value:function(){var e=this.mediaManager.getOriginRosters(),t=this.client.getInviteInfo().callerUri,r=this.mediaManager.getContentSenderPid(),n=this.mediaManager.getActiveSpeaker(),i=e.length,o={content:[],chairman:[],selfRoster:[],activeSpeaker:[],audioVideoUnmute:[],audioUnmute:[],videoUnmute:[],audioVideoMute:[]},a=[];this.localContent=null;for(var s=0;s<i;s++){var u=e[s],c=u.mediagroupid,l=u.endpointId,h=u.isContent,f=u.participantId,d=u.deviceType,p=u.isForceFullScreen,v=u.audioTxMute,g=u.videoTxMute;u.isActiveSpeaker=!1,u.isLocal=l===t&&!h,u.key=ea(l,c),l===t&&h?this.localContent=u:"record"!==d&&(h&&r>0&&f!==r||(h&&r>0&&f===r?o.content.push(u):l!==t||h?p?o.chairman.push(u):n.endpointId&&n.endpointId===l?(u.isActiveSpeaker=!0,o.activeSpeaker.push(u)):v||g?v||!g?!v||g?v&&g&&o.audioVideoMute.push(u):o.videoUnmute.push(u):o.audioUnmute.push(u):o.audioVideoUnmute.push(u):(u.isLocal=!0,this.selfRoster.participantId=f,o.selfRoster.push(u))))}for(var m in this.localContent&&o.content&&(o.content=[]),o)a=a.concat(o[m]);return a}},{key:"setFocusRoster",value:function(){var e=this.confInfo,t=e.chairManUrl,r=e.chairManReason,n=this.focusViewConfig||{},i=n.roster,o=n.isFocusMode,a=n.kind,s=(i||{}).key,u=void 0===s?"":s,c=ne.FOCUS_MODE,l=re.USER,h=re.MEETING,f=r===c?ea(t,0):"",d=this.client.getAutoMode();(this.logger.log("setFocusRoster kind:",{kind:a,isFocusMode:o}),a===l&&o)&&(this.layoutSortedRosterList.find((function(e){return e.key===u}))||this.updateFocusViewConfig({isFocusMode:!1,roster:null}));if(this.logger.log("setFocusRoster newRosterId:",{preRosterId:u,newRosterId:f}),u!==f){var p=this.sortedRosterList.find((function(e){return e.key===f}));this.logger.log("find focusRoster:",p),this.client.emitFocusView(p||null),d&&this.handleFocusView(f,h,p)}}},{key:"handleFocusView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re.USER,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.logger.log("[layout] handle focus view config :",e);var n=ee.PEOPLE,i=ee.CHAIRMAN,o=ee.CONTENT,a=ee.LOCAL,s=n,u=r;if(e){u=r||this.sortedRosterList.find((function(t){return t.key===e}))||null;var c=(this.client.getMeetingControlInfo()||{}).chairmanUri;if(u){var l=u.endpointId;u.isLocal?s=a:u.isContent?s=o:l===c&&(s=i)}else e=""}t===re.USER&&e?this.updateFocusViewConfig({type:s,roster:u,kind:t,isFocusMode:!0}):this.updateFocusViewConfig({type:s,roster:u,kind:t}),this.calcPageAndRequestLayout()}},{key:"updateFocusViewConfig",value:function(e){this.logger.log("[layout] update focus view config:",e),this.focusViewConfig=Object.assign(Object.assign({},this.focusViewConfig),e),this.layoutState.updateIsEnableHideLocalView()}},{key:"updateTemplateRate",value:function(e){this.logger.log("update template rate: ",e),this.templateRate=e,this.calculateScreenInfo()}},{key:"initLayoutManager",value:function(){this.logger.log("[layout] init layout manager");var e=this.calcTemplate(),t=e.template,r=e.rate;this.templateRate.next!==r&&this.updateTemplateRate({next:r,previous:r}),this.initLayout=ze()(t),this.logger.log("[layout] init layout:",this.initLayout),this.newLayoutList=this.calculateNewLayoutList(),this.logger.log("[layout] new layout list:",this.newLayoutList)}},{key:"calcTemplate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.layoutSortedRosterList.length,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee.NONE,r=this.pageInfo,n=r.currentPage,i=r.pageSize,o=this.confInfo.participantCount,a=this.layoutState.getForceFullScreenId(),s=e,u=this.layoutState.getIsEnableHideLocalView();n>1&&!a&&(s=i,u=!0),t=ta(a).rosterId===this.selfRoster.key?ee.LOCAL:t;var c=this.templateManager.getTemplate({modeType:this.layoutState.getTemplateMode(),templateCount:s,participantCount:o,isEnableHideLocalView:u,isChairmanMode:this.layoutState.getIsChairmanMode(),templateType:t,orientation:this.layoutOrientation,focusViewConfig:this.focusViewConfig,isInDialogMode:this.layoutState.getIsInDialogMode()});return e<s&&(c.template=c.template.slice(0,e)),this.logger.log("[layout] calc template info:",c),c}},{key:"calculateNewLayoutList",value:function(){for(var e=this.initLayout.length,t=[],r=this.layoutSortedRosterList.find((function(e){return e.isLocal})),n=this.layoutSortedRosterList.find((function(e){return e.isContent})),i=this.layoutSortedRosterList.filter((function(e){return!e.isLocal&&!e.isContent})),o=this.client.getRender(),a=0,s=0;s<e;s++){var u=this.initLayout[s],c=u.position,l=void 0===c?ts:c,h=u.type,f=u.config,d=void 0===f?{}:f,p=i[a]||{},v=0===s,g=null;h===ee.LOCAL&&r?g=r:h===ee.CONTENT&&n?g=n:(g=p,a++);var m=g,y=m.endpointId,b=m.mediagroupid,S=1===b,w=Qo(y,b),E={id:w,roster:g,state:o.getVideoManagerById(w,S).getLayoutState(),rotate:null,rotationInfo:null,avatar:null,templateConfig:Object.assign(Object.assign({},d),{isMain:v}),position:l};t.push(E)}return this.logger.log("calc new layout:",t),t}},{key:"calculateScreenInfo",value:function(){var e=this.templateRate.next,t=this.getTemplateScreenInfo(e);return this.logger.log("client screen info: ",t),this.screenInfo=t,this.client.sendScreenInfoMessage(t),this}},{key:"getTemplateScreenInfo",value:function(e){var t=this.client.getAutoMode(),r=this.client.getClientConfig();if(!t)return{width:0,height:0,rateHeight:0,rateWidth:0};var n=r.container||{elementId:"",offset:[]},i=n.elementId,o=void 0===i?"":i,a=n.offset,s=void 0===a?[]:a,u=o?document.getElementById(o):null,c=Yr(s,4),l=c[0],h=void 0===l?0:l,f=c[1],d=void 0===f?0:f,p=c[2],v=void 0===p?0:p,g=c[3],m=void 0===g?0:g,y=Number(h)+Number(d),b=Number(v)+Number(m),S=(null==u?void 0:u.clientHeight)||document.body.clientHeight,w=(null==u?void 0:u.clientWidth)||document.body.clientWidth,E=S-y,k=w-b,I=E>0?E:S,x=k>0?k:w,C=Math.floor(x*e),O=Math.floor(I/e),T={rateHeight:0,rateWidth:0,width:x,height:I};return T=I>C?{rateWidth:x,rateHeight:C,width:x,height:I}:{rateWidth:O,rateHeight:I,width:x,height:I},1===e&&(T={rateWidth:x,rateHeight:I,width:x,height:I}),T}},{key:"createBaseLayout",value:function(e){var t=this,r=this.client.getLayoutAvatarType();e.forEach((function(e){var n=e.id,i=e.roster,o=e.state,a=e.position,s=e.templateConfig,u=e.pollingState,c=e.pollingName,l=void 0===c?"":c,h=i||{},f=h.key,d=void 0===f?"":f,p=h.isLocal,v=t.layoutMap.has(d),g=t.getLayoutAvatar(i,r),m={id:n,roster:i,state:o,rotate:{},rotationInfo:null,avatar:g,positionStyle:{left:"",top:"",width:"",height:""},isMirror:p&&t.localMirror,templateConfig:s,position:a,positionInfo:{width:0,height:0},deal:!0,pollingState:u,pollingName:l};if(v){var y,b=t.layoutMap.get(d),S=!1,w=Zs(b);try{for(w.s();!(y=w.n()).done;){var E=y.value;if(!E.deal){E.roster=i,E.position=a,E.templateConfig=s,E.id=n,E.pollingName=l,E.pollingState=u,E.deal=!0,E.avatar=g,S=!0;break}}}catch(e){w.e(e)}finally{w.f()}S||b.push(Object.assign({},m))}else{var k=[],I=d||n;k.push(Object.assign({},m)),t.layoutMap.set(I,k)}})),this.clearInvalidLayout(),this.logger.log("create layout map : ",vt(this.layoutMap))}},{key:"getLayoutAvatar",value:function(e,t){if(!e)return null;var r=e||{},n=r.displayName,i=void 0===n?"":n,o=r.deviceType,a=void 0===o?"":o,s=Ae.TEXT,u=Ae.IMAGE,c="";return t===Ae.NONE?null:(t===s?c=aa(i):t===u&&(c=Ko[a]||Ko.default),{type:t,value:c})}},{key:"clearInvalidLayout",value:function(){var e=this.getLayoutMap();e.forEach((function(t,r){if(t.some((function(e){return e.deal}))){var n=t.filter((function(e){return e.deal})).map((function(e){return Object.assign(Object.assign({},e),{deal:!1})}));e.set(r,n)}else e.delete(r)}))}},{key:"updateStreams",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.logger.log("[LM] invoke updateStreams: ",t);var r=this.getLayoutMap(),n=this.mediaManager.getLayoutRosters(),i=n.total.length,o=this.client.getRender();r.forEach((function(t){t.forEach((function(t){var r=t.roster,a=t.id,s=ta(a),u=s.endpointId,c=s.isContent;if(u){var l=r||{},h=l.isLocal,f=l.key,d=void 0===f?"":f,p=o.getVideoManagerById(a,c),v=!1;if(p.setIsMatch(!0),h){var g=e.client.getPreviewStreams().previewStreams,m=((void 0===g?[]:g)[0]||{stream:null}).stream;p.setVideoMediaStream(a,m);var y=p.calculateLayoutState(t).state;t.state=y}else{for(var b=0;b<i;b++){var S=n.total[b],w=S.mediagroupid,E=S.videoTrackId,k=S.calluri;if(d===ea(k,w)){v=!0;var I=e.getVideoStreamByTrackId(E).videoStream;p.setVideoMediaStream(a,I);var x=p.calculateLayoutState(t).state;t.state=x;break}}if(!v){p.setVideoMediaStream(a,null);var C=p.calculateLayoutState(t).state;t.state=C}}}}))})),o.clearInvalidVideoManagers(),this.layoutMap=r,this.logger.log("[LM]layout update streams: ",vt(this.layoutMap)),t&&this.sendLayoutMessage()}},{key:"getVideoStreamByTrackId",value:function(e){for(var t=this.mediaManager.getVideoTrackList(),r=t.length,n={videoStream:null,track:null},i=0;i<r;i++){var o=t[i].data,a=t[i].rest;if(o.streams[0].id.replace("-st","-tk-vd")===e){n={videoStream:o.streams[0],track:a.track};break}}return n}},{key:"calculatePosition",value:function(){var e=this;return this.layoutMap.forEach((function(t){t.forEach((function(t){var r=e.getTemplatePosition(t),n=r.positionStyle,i=r.positionInfo;t.positionStyle=n,t.positionInfo=i}))})),this}},{key:"getTemplatePosition",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.screenInfo,n={left:"0px",top:"0px",width:"0px",height:"0px"},i=r.rateWidth,o=r.rateHeight,a=e.position,s=void 0===a?[]:a,u=e.templateConfig,c=void 0===u?{}:u,l=Yr(s,4),h=l[0],f=l[1],d=l[2],p=l[3],v=c.zIndex,g=c.isRotate,m=c.customStyle,y=void 0===m?{}:m,b=mt.isNumber(h)?Math.round(i*h):h,S=mt.isNumber(f)?Math.round(o*f):f,w=mt.isNumber(d)?Math.round(i*d):d,E=mt.isNumber(p)?Math.round(o*p):p;return g&&(E=mt.isNumber(p)?Math.round(~~w/es):p),n={left:"".concat(b,"px"),top:"".concat(S,"px"),width:"".concat(w,"px"),height:"".concat(E,"px")},t={width:~~w,height:~~E},v&&(n.zIndex=v),y&&mt.isObject(y)&&(n=Object.assign(Object.assign({},n),y)),{positionStyle:n,positionInfo:t}}},{key:"calculateRotate",value:function(){var e=this;return this.mediaManager.getRotationInfo().forEach((function(t){var r=t.participantId,n=t.mediagroupid,i=t.rotation,o=t.width,a=t.height,s=e.getLayoutKeyByRotateInfo(r,n),u=null;if(s&&e.layoutMap.has(s)){var c=e.layoutMap.get(s);if(c){var l,h=Zs(c);try{for(h.s();!(l=h.n()).done;){var f=l.value,d=f.roster,p=f.positionInfo,v=f.positionStyle,g=f.templateConfig,m=void 0===g?{}:g,y=v||{width:"",height:""},b=y.width,S=void 0===b?"":b,w=y.height,E=void 0===w?"":w,k=d||{},I=k.videoTxMute,x=k.deviceType,C=p||{width:0,height:0},O=C.width,T=C.height,_=m.isRotate,A=!1;if(_&&(A=o>a&&(0===i||2===i),I&&(A="soft"!==x)),A){var R=[T,O];O=R[0],T=R[1],f.positionInfo=Object.assign(Object.assign({},p),{width:O,height:T}),f.positionStyle=Object.assign(Object.assign({},f.positionStyle),{width:E||"",height:S||""})}u=Zo(t,O,T),f.rotate=u,f.rotationInfo=t}}catch(e){h.e(e)}finally{h.f()}}}})),this.localMirrorRotate(),this}},{key:"calculateCustomLayoutRotate",value:function(){var e=this;this.mediaManager.getRotationInfo().forEach((function(t){var r=t.id,n=e.getLayoutByRotationId(r);n&&(n.rotationInfo=t)}))}},{key:"getLayoutByRotationId",value:function(e){for(var t=this.getLayoutMap(),r=t.values(),n=t.size,i=0;i<n;i++){var o=r.next().value,a=o.roster||{},s=a.participantId,u=void 0===s?"":s,c=a.mediagroupid;if(e===ra(u,void 0===c?0:c))return o}return null}},{key:"calcRequestNewLayoutByRoster",value:function(){var e=this;this.layoutState.setTemplateMode(J.GALLERY);var t=this.confInfo.chairManUrl,r=this.sortedRosterList.filter((function(e){return e.endpointId===t||!e.audioTxMute&&!e.isContent&&!e.isLocal})),n=r.length+1;if(n>0){var i=[],o=ee.LOCAL,a=ee.CONTENT,s=P.NORMAL,u=this.calcTemplate(n).template,c=0;u.forEach((function(t){var n=t.resolution,u=t.type,l=t.quality,h=void 0===l?s:l;if(u!==o){var f=(r[c]||{}).endpointId,d=void 0===f?"":f;i.push({mediagroupid:~~(u===a),calluri:d,resolution:e.convertResolutionLevel(n),quality:h}),c++}}));var l=this.pageInfo,h=l.pageSize,f=l.currentPage;this.client.requestNewLayout(i,h,f,[],{uiShowLocalWhenPageMode:!0})}}},{key:"getLayoutKeyByRotateInfo",value:function(e,t){var r,n="",i=Zs(this.layoutMap);try{for(i.s();!(r=i.n()).done;){var o=Yr(r.value,2)[1][0].roster||{},a=o.isContent,s=o.endpointId,u=o.mediagroupid;o.participantId===e&&1===t===a&&(n=ea(s,u))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"convertResolutionLevel",value:function(e){var t=this.client.getFeatureConfig().enableLowResolution,r=this.client.getEnterpriseMediaConfig().peopleRecResolution>=Dr,n=e.normal,i=e.low,o=e.high,a=n;return t?a=i:r&&(a=o||n),a}},{key:"localMirrorRotate",value:function(){var e=this.selfRoster.key,t=this.layoutMap.get(e),r=this.client.getFacingMode()===k.BACK,n=this.localMirror&&!r?"scaleX(-1)":"";null==t||t.forEach((function(e){e.rotate={transform:n}}))}},{key:"calcForceFullScreenRequestLayout",value:function(){var e=this.pageInfo.pageSize,t=[],r=this.layoutState.getForceFullScreenId(),n=r===this.selfRoster.key,i=this.layoutMap.get(r);if(n)this.createAutoLayout([]);else if(i){var o=i[0].roster||{},a=o.endpointId,s=void 0===a?"":a,u=o.mediagroupid,c=ee.CONTENT,l=ee.PEOPLE,h=P.NORMAL,f=this.calcTemplate(1,1===u?c:l).template[0],d=f.resolution,p=f.quality,v=void 0===p?h:p,g=this.convertResolutionLevel(d);t.push({mediagroupid:u,quality:v,calluri:s,resolution:g}),this.client.requestNewLayout(t,e,0)}}},{key:"exitFullScreen",value:function(){this.layoutState.getForceFullScreenId()&&this.setForceFullScreenId("")}},{key:"setLayoutConfig",value:function(e){var t=e.localSharedMaxViewCount,r=void 0===t?4:t;r=Math.min(r,9),e=Object.assign(Object.assign({},e),{localSharedMaxViewCount:r}),this.logger.log("[layout] set layout config final: ",e),this.layoutState.setLayoutConfig(e)}},{key:"sendLayoutMessage",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.getLayoutMap();if((this.client.getAutoMode()||0!==(null===(e=this.customLayoutCacheList)||void 0===e?void 0:e.length)||0!==(null==r?void 0:r.size))&&r){var n=[],i=this.client.getMeeting();r.forEach((function(e){var t=e[0].roster,r=(null==t?void 0:t.key)||"";e.forEach((function(e){r&&i.setLayoutAvatar(e,r);var t=e.index,o=void 0===t?-1:t;o>-1?n[o]=e:n.push(e)}))}));var o=n.filter((function(e){return!!e}));this.customLayoutCacheList=o,this.client.emitMessage(Pe.LAYOUT,o),t&&i.handleLayoutAvatar(r)}}},{key:"findRosterById",value:function(e,t){return t.find((function(t){var r=t.calluri,n=t.mediagroupid;return ea(r,n)===e}))}},{key:"destroy",value:function(){this.layoutState.destroy(),this.polling.destroy(),this.exitFullScreen()}}],[{key:"getCustomLayoutItem",value:function(e,t,r){var n=e.roster||{},i=n.isContent;return{pid:n.participantId,resolution:t,quality:r,mediagroupid:i?1:0}}}]),t}(),tu=/[^\u0041-\u005A\u0061-\u007A\u0030-\u0039\u4E00-\u9FA5\u002e\u002d\u005F\u00e4\u00d6\u00f6\u00dc\u00fc\u1e9e\u00df\u00d1\u00f1\u2014\s]/g,ru=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},nu=function(){function t(r){var n=this;e(this,t),this.getUnAvatarList=function(e){var t=[];return e.forEach((function(e){var r,i=(null===(r=e[0].roster)||void 0===r?void 0:r.key)||"";if(i){var o=(n.layoutImageAvatarMap.get(i)||{}).url;(void 0===o?"":o)||t.push(e[0])}})),t},this.client=r,this.logger=r.logger,this.action=r.getAction(),this.conferenceInfo=or.CONFERENCE_INFO,this.mediaConfig=Mr,this.recordPermission={authorize:!1,recordingUrl:""},this.cloudRoomInfo={meetingControlPassword:"",meetingNumber:"",password:""},this.confMgmtUrl=null,this.layoutImageAvatarMap=new Map,this.enterpriseConfig={},this.userInfo=null,this.meetingControlInfo=null}return a(t,[{key:"getRecordPermission",value:function(){return this.recordPermission}},{key:"getLayoutImageAvatarMap",value:function(){return this.layoutImageAvatarMap}},{key:"getEnterpriseMediaConfig",value:function(){return this.mediaConfig}},{key:"getUserInfo",value:function(){return this.userInfo}},{key:"getConferenceInfo",value:function(){return this.conferenceInfo}},{key:"getLayoutAvatarType",value:function(){var e=this.client.getFeatureConfig().enableLayoutAvatar,t=(this.enterpriseConfig||{}).userAvatarMode;return e?t||Ae.TEXT:Ae.NONE}},{key:"getMeetingControlInfo",value:function(){return this.meetingControlInfo}},{key:"setMeetingControlInfo",value:function(e){var t=e.conferenceMode,r=(this.meetingControlInfo||{}).conferenceMode,n=this.client.getAutoMode(),i=this.client.getLayoutManager();this.meetingControlInfo=e,i.getLayoutState().updateIsChairmanMode(),i.getLayoutState().updateIsInDialogMode(),i&&n&&t&&t!==r&&i.calcPageAndRequestLayout()}},{key:"handleUserInfo",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.client.getLoginInfo(),!this.client.getFeatureConfig().enableMeetingOwner){e.next=5;break}return e.next=5,this.getCloudMeetingRooms();case 5:r=Object.assign({},t,{cloudRoomInfo:this.cloudRoomInfo}),this.userInfo=r,this.client.emitMessage(Pe.USER_INFO,r);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"handleConferenceInfo",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[meeting]Handle conf info"),t=this.client.getCallInfo(),r=t.meeting,n=t.confNumber,i=this.client.getFeatureConfig(),o=this.client.getInviteInfo(),a=o.vcNumber,s=void 0===a?"":a,c=o.meetingId,l=o.commonJson,h=void 0===l?"":l,f=s||n,p=(d=r||{}).config,v=void 0===p?"":p,g=d.displayConfig,m=void 0===g?"":g,y=yt(h),b=y.displayNum,S=void 0===b?f:b,w=y.confAuxProperties,E=y.waitingRoomProps,k=y.mpvc,I=void 0===k?"":k,S=S||f,this.conferenceInfo=Object.assign({},or.CONFERENCE_INFO,r,{callNumber:f,displayNum:S,meetingId:c,config:yt(v),displayConfig:yt(m),mpvc:I}),e.next=12,this.getVCConfInfo(S,n);case 12:if(!i.enableWatermarkContent){e.next=15;break}return e.next=15,this.getWatermarkContent(w);case 15:return e.next=17,this.handleMeetingControlInfo();case 17:if(this.handleWaitingRoomInfo(E),!i.enableMeetingInvite){e.next=21;break}return e.next=21,this.getMeetingInviteInfo();case 21:this.updateConferenceInfo();case 22:case"end":return e.stop()}}),e,this)})))}},{key:"updateConferenceInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};mt.isObject(e)&&(this.conferenceInfo=Object.assign(Object.assign({},this.conferenceInfo),e)),this.client.emitMessage(Pe.CONFERENCE_INFO,this.conferenceInfo)}},{key:"getConfMgmtUrl",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[invoke] getConfMgmtUrl"),t=this.client.getInviteInfo(),t.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,this.action.getServerConfig(["meetingControl","meetingControlMemebersUrl","sidebarMeetingControlUrl"]);case 8:(r=e.sent)&&200===r.status&&r.data&&(n=r.data,i=n.meetingControl,o=void 0===i?"":i,a=n.meetingControlMemebersUrl,s=void 0===a?"":a,c=n.sidebarMeetingControlUrl,l=void 0===c?"":c,this.confMgmtUrl={pc:o,member:s,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=Ir,b=xr,S=Cr,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 ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.client.getInviteInfo(),r=t.meetingId,n=t.vcNumber,i=void 0===n?"":n,this.logger.log("[meeting]check record permission: ",{meetingId:r,vcNumber:i}),e.prev=2,e.next=5,this.action.checkPermissionWithMeetingNumber(i,r);case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:o=e.t0,a=o.status,s=o.data,200===a&&(c=s.authorize,l=s.recordingUrl,this.recordPermission={authorize:c,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.emitMessage(Pe.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 ru(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s;return u().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,this.action.checkStorageSpaceWithRecordingUrl(e);case 4:r=t.sent,n=r.status,i=r.data,400===n&&(o=i.developerMessage,a=i.errorCode,s=i.userMessage,Object.assign(this.recordPermission,{developerMessage:o,errorCode:a,userMessage:s})),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.emitMessage(Pe.RECORD_PERMISSION,this.recordPermission),t.abrupt("return",this.recordPermission);case 14:case"end":return t.stop()}}),t,this,[[1,9]])})))}},{key:"getCloudMeetingRooms",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d,p,v;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.client.getLoginInfo(),r=t.id,n=this.client.getMakeCallParams()||{},i=n.confNumber,o=void 0===i?"":i,e.prev=2,e.next=5,this.action.getCloudMeetingRooms(r);case 5:200===(a=e.sent).status?(s=a.data[0]||{},c=s.meetingControlPassword,l=void 0===c?"":c,h=s.meetingNumber,f=void 0===h?"":h,d=s.password,p=void 0===d?"":d,v=f===o,this.cloudRoomInfo={meetingControlPassword:l,meetingNumber:f,password:p,isMeetingOwner:v}):this.logger.error("get cloud meeting rooms error: ",a),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this.logger.error("get cloud meeting rooms err: ",e.t0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])})))}},{key:"handleMeetingControlInfo",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.action.fetchMeetingControlInfo();case 3:t=e.sent,n=(r=t||{}).status,i=r.data,200===n&&i?(this.conferenceInfo.meetingControl=Object.assign({},i),this.logger.log("get meeting control info:",i)):this.logger.error("get meeting control info error: ",t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this.logger.error("get meeting control info err: ",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))}},{key:"setLayoutAvatar",value:function(e,t){var r=this.getLayoutAvatarType(),n=this.layoutImageAvatarMap.get(t),i=n||{},o=i.url,a=void 0===o?"":o,s=i.isCustom,u=void 0!==s&&s,c=Ae.IMAGE,l=Ae.NONE;(r===c&&n||r!==l&&u)&&(e.avatar={type:c,value:a})}},{key:"handleLayoutAvatar",value:function(e){return ru(this,void 0,void 0,u().mark((function t(){var r,n=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.getLayoutAvatarType()!==Ae.NONE){t.next=3;break}return t.abrupt("return");case 3:if((r=this.getUnAvatarList(e)).length){t.next=6;break}return t.abrupt("return");case 6:Promise.all(r.map((function(e){return ru(n,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.roster,i=(n=r||{}).key,o=n.deviceType,a=void 0===o?"":o,s=n.endpointId,c=void 0===s?"":s,!i){t.next=13;break}return l=Ko[a]||Ko.default,this.layoutImageAvatarMap.set(i,{url:l,isCustom:!1}),t.next=7,this.action.getInComingCallUrlInfo(c);case 7:h=t.sent,f=(h||{}).avatar,(d=void 0===f?"":f)&&d.indexOf("images/deviceavatars")>-1&&(d=""),Vo.find((function(e){return e===a}))&&(d=d||l),d&&(this.layoutImageAvatarMap.set(i,{url:d,isCustom:!0}),this.client.getLayoutManager().sendLayoutMessage(!1));case 13:case"end":return t.stop()}}),t,this)})))})));case 7:case"end":return t.stop()}}),t,this)})))}},{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]:kr,r=this.client.getInviteInfo().vcNumber,n=this.client.getLoginInfo().securityKey,i=Hn.version,o=Cr,a=kr,s=xr,u=(new Date).getTime(),c=this.conferenceInfo.mpvc,l=void 0===c?"":c;return e&&(e="".concat(e,"?conferenceNo=").concat(r,"&securityKey=").concat(n,"&locale=").concat(lt,"&platform=").concat(t===o?a:t,"&version=").concat(i,"&from=sdk&t=").concat(u),l&&(e+="&mpvc=".concat(l)),t===s&&(e+="&fromSidebar=true&hideSwitchIco=true"),t===o&&(e+="#/professional")),e}},{key:"getVCConfInfo",value:function(e,t){return ru(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d,p,v,g,m,y;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||t===e){r.next=13;break}return r.prev=1,r.next=4,this.action.getCallUri({number:e,country:"CN"});case 4:n=r.sent,i=n.data||{},o=i.displayName,a=void 0===o?"":o,s=i.numberType,c=void 0===s?"":s,l=i.callUrl,h=void 0===l?"":l,f=i.avatar,d=void 0===f?"":f,p=i.deviceType,v=void 0===p?"":p,g=i.deviceId,m=void 0===g?"":g,y=this.conferenceInfo,this.conferenceInfo=Object.assign(Object.assign({},y),{displayName:a,numberType:c,callUrl:h,avatar:d,deviceType:v,deviceId:m}),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(1),this.logger.error("[meeting]Get calluri info err: ",r.t0);case 13:case"end":return r.stop()}}),r,this,[[1,10]])})))}},{key:"getWatermarkContent",value:function(e){return ru(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=H.NONE,n=H.WITH,i=V.CONTENT,o={watermark:r,watermarkRange:i,displayConfNo:"",inoutReminder:""},e&&(o=yt(e)),s=(a=o).watermark,c=a.watermarkRange,l=void 0===c?i:c,s!==n||!this.conferenceInfo){t.next=17;break}return t.prev=6,t.next=9,this.action.getWatermarkContent(this.conferenceInfo.callNumber);case 9:h=t.sent,f=h.data||{watermarkContent:""},d=f.watermarkContent,p=void 0===d?"":d,this.conferenceInfo.confAuxProperties={watermarkContent:p,watermarkRange:l||i},t.next=17;break;case 14:t.prev=14,t.t0=t.catch(6),this.logger.error("[meeting]Get conf watermark content error: ",t.t0);case 17:case"end":return t.stop()}}),t,this,[[6,14]])})))}},{key:"getMeetingInviteInfo",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[meeting] get meeting invite info"),t=this.conferenceInfo,r=t.meetingId,n=void 0===r?"":r,i=t.inviteInfo,o=t.callNumber,a=void 0===o?"":o,!(null==i?void 0:i.shareUrl)){e.next=4;break}return e.abrupt("return",i);case 4:return e.prev=4,e.next=7,this.action.getMeetingInviteInfo({conferenceNumber:a,meetingId:n});case 7:200===(s=e.sent).status?this.conferenceInfo.inviteInfo=s.data:this.logger.warn("[meeting]Get invite info err: ",s),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),this.logger.error("[meeting]Get meeting invite info error: ",e.t0);case 14:return e.abrupt("return",this.conferenceInfo.inviteInfo);case 15:case"end":return e.stop()}}),e,this,[[4,11]])})))}},{key:"setMeetingFocusView",value:function(e,t){return ru(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[meeting] set meeting focus view :",{id:e,action:t}),this.client.getInviteInfo().callIndex){r.next=4;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950301")));case 4:if(n=ta(e),i=n.endpointId,"0"===n.mediagroupId){r.next=7;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950156")));case 7:return r.next=9,this.action.setMeetingFocusView(i,t);case 9:if(o=r.sent,200!==(a=(o||{}).status)){r.next=15;break}return r.abrupt("return",gt("XYSDK:950120"));case 15:return this.logger.error("[meeting]set meeting focus view failed: ",o),s=(o||{}).data,c=+(a+""+s.code),l=at[c]||at[500],r.abrupt("return",Promise.reject(gt(l,s)));case 20:case"end":return r.stop()}}),r,this)})))}},{key:"rename",value:function(e,t){return ru(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=String(e).trim(),this.logger.log("[meeting] rename:",e),!(e.length<2||e.length>40||tu.test(e))){r.next=6;break}return n="The new name does not support emoticons and special symbols, and supports a maximum of 2-40 characters.",this.logger.log("verifyExtUserId error:",n),r.abrupt("return",Promise.reject(gt("XYSDK:950101",e,n)));case 6:if(i=this.client.getSelfRoster()||{},o=i.displayName,e!==(void 0===o?"":o)){r.next=9;break}return r.abrupt("return");case 9:return r.next=11,this.action.rename(e);case 11:if(a=r.sent,200!==(s=(a||{}).status)){r.next=17;break}t&&t(),r.next=22;break;case 17:return this.logger.error("[meeting]update roster new name failed: ",a),c=(a||{}).data,l=+(s+""+c.code),h=st[l]||at[500],r.abrupt("return",Promise.reject(gt(h,c)));case 22:return r.abrupt("return",gt("XYSDK:950120"));case 23:case"end":return r.stop()}}),r,this)})))}},{key:"setEnterpriseMediaConfig",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C,O,T,_,A,R,D;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.client.getFeatureConfig(),t.enableBandwidthSetting){e.next=3;break}return e.abrupt("return");case 3:if(this.logger.log("[meeting] get enterprise media config"),e.prev=4,r=[],n=this.client.getFeatureConfig(),i=n.enableBandwidthSetting,o=n.enableLowResolution,a=br,s=Sr,c=wr,l=Er,o?r=[a,s]:i&&(r=[a,s,c,l]),r.length){e.next=11;break}return e.abrupt("return");case 11:return h=this.client.getLoginInfo(),f=h.id,e.next=14,this.action.getEnterpriseMediaConfig(f,r);case 14:d=e.sent,this.logger.log("enterprise media config result:",d),p=d.RemoteSDKConfig,v=d.mediaConfig,g=N.RS1080,m=N.RS720,y=N.RS360,b=N.RS180,S=Pr.peopleRecResolution,w=Pr.peopleSendResolution,E=[g,m,y,b],k=this.mediaConfig.peopleRecResolution,I=this.mediaConfig.peopleSendResolution,x=0,C=0,mt.isObject(p)&&(x=1024*~~(p.downLinkCeilingRate||0),C=1024*~~(p.upLinkCeilingRate||0)),mt.isObject(v)&&(O=v.pvrxResolution,T=void 0===O?"":O,_=v.pvtxResolution,A=void 0===_?"":_,T&&(R=~~T.split("_")[1],k=E.includes(R)?R:S),A&&(D=~~A.split("_")[1],I=E.includes(D)?D:w)),this.mediaConfig=Object.assign(Object.assign({},this.mediaConfig),{peopleRecResolution:k,peopleSendResolution:I,rxBandwidth:x,pTxBandwidth:C,cTxBandwidth:C}),this.logger.log("merged enterprise media config:",this.mediaConfig),e.next=33;break;case 30:e.prev=30,e.t0=e.catch(4),this.logger.error("setEnterpriseMediaConfig error: ",e.t0);case 33:case"end":return e.stop()}}),e,this,[[4,30]])})))}},{key:"processMediaConfig",value:function(e){this.logger.log("[meeting] processMediaConfig: ",e);var t=z.ALL,r=z.DOWNLINK,n=z.UPLINK,i=this.client.getFeatureConfig().enableLowResolution,o=Lr.peopleRecResolution,a=Lr.peopleSendResolution,s=Lr.contentRecResolution,u=Lr.contentSendResolution,c=Pr.peopleRecResolution,l=Pr.peopleSendResolution,h=Pr.contentRecResolution,f=Pr.contentSendResolution;e!==r&&e!==t||(this.mediaConfig.peopleRecResolution=i?o:c,this.mediaConfig.contentRecResolution=i?s:h),e!==n&&e!==t||(this.mediaConfig.peopleSendResolution=i?a:l,this.mediaConfig.contentSendResolution=i?u:f),this.logger.log("merged media config:",this.mediaConfig)}},{key:"processVideoProfileConfig",value:function(e,t){var r=z.PEOPLE_UPLINK,n=z.PEOPLE_DOWNLINK,i=z.ALL,o=z.CONTENT_DOWNLINK,a=z.CONTENT_UPLINK,s=z.DOWNLINK,u=Object.assign({},this.mediaConfig),c=t.maxFrameRate,l=t.maxResolution;e!==r&&e!==i||(u.peopleSendResolution=l,u.peopleSendFrameRate=c),e!==n&&e!==i&&e!==s||(u.peopleRecResolution=l,u.peopleRecFrameRate=c),e!==a&&e!==i||(u.contentSendResolution=l),e!==o&&e!==i||(u.contentRecResolution=l),this.logger.log("this.mediaConfig: ",u),this.mediaConfig=u}},{key:"setEnterpriseBuffetConfig",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[meeting] set enterprise buffet config"),e.prev=1,t=this.client.getLoginInfo(),r=t.id,n=t.enterpriseId,i=void 0===n?"":n,e.next=5,this.action.getEnterpriseConfig(r,i);case 5:o=e.sent,a=o.enterpriseConfig,(s=void 0===a?{}:a)&&(this.enterpriseConfig=s),this.client.emitMessage(Pe.ENTERPRISE_CONFIG,this.enterpriseConfig),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(1);case 14:case"end":return e.stop()}}),e,this,[[1,12]])})))}},{key:"endAllMeeting",value:function(){return ru(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.userInfo||{},r=t.cloudRoomInfo,n=(r||{}).isMeetingOwner,this.logger.log("endAllMeeting isMeetingOwner: ",n),n){e.next=5;break}return e.abrupt("return",gt("XYSDK:950124"));case 5:return e.prev=5,e.next=8,this.action.endAllMeeting();case 8:if(i=e.sent,o=i.status,a=i.data,c=((s=void 0===a?{}:a)||{}).code,200!==o||0!==s.code){e.next=13;break}return e.abrupt("return",gt("XYSDK:950120",s));case 13:return e.abrupt("return",gt(at[c]||at[500],s));case 16:return e.prev=16,e.t0=e.catch(5),e.abrupt("return",gt(at[500]));case 19:case"end":return e.stop()}}),e,this,[[5,16]])})))}},{key:"handleWaitingRoomInfo",value:function(e){if(e){var t=(e||{}).waitingState,r=!!(void 0===t?0:t);this.client.getMeetingControl().setOnHold(r),this.client.emitMessage(Pe.ONHOLD,r)}}},{key:"convertReqList",value:function(e){this.logger.log("[meeting] convert request list:",e);var t=or.MAP_RESOLUTION_INDEX,r=this.mediaConfig,n=r.peopleRecResolution,i=r.contentRecResolution,o=t[n],a=t[i];return e=e.map((function(e){var t=e.resolution,r=e.isContent;return!r&&t>o&&(e.resolution=o),r&&t>a&&(e.resolution=a),e}))}},{key:"handleConferencePropertiesMessage",value:function(e){var t=e.body,r=t.enableContentLive,n=t.enableContentLiveOnHold;delete e.body.type;var i=Object.assign(Object.assign({},e.body),{enableContentLive:"true"===r,enableContentLiveOnHold:"true"===n});this.updateConferenceInfo(i)}}]),t}();const iu=nu;var ou=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.quality,o=r.resolution;("string"!=typeof n||Jt.indexOf(i)<0||Qt.indexOf(o)<0)&&(t=!1)})),t},au=function(e){if(mt.isObject(e))for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if(!e[n])return gt("XYSDK:950101",n)}else if(!e)return gt("XYSDK:950101",e);return null},su=(r(1416),r(5239),function(){function t(r){e(this,t),this.client=r,this.reportDataTime=0,this.previousInternals=null,this.internals=null,this.participantCount=1,this.meetingQualityData={callNumber:"",deviceId:"",meetingId:"",osVersion:navigator.userAgent,sockProto:"udpProto",swVersion:zn,cdrVersion:10,deviceType:Bt},this.nqLevelTimer=null,this.isReportLocalNetworkLevel=!0,this.networkLevel=ie.Excellent}return a(t,[{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 r=this.client.invite,n=r.meetingId,i=r.callerUri,o=r.remoteUri,a=r.vcNumber;this.meetingQualityData.callNumber=o||a+"@CONFNO",this.meetingQualityData.deviceId=i.split("@")[0],this.meetingQualityData.meetingId=n}var s=t||{},u=s.participantCount,c=void 0===u?1:u,l=s.contentUri,h=void 0===l?"":l;if(this.participantCount=c,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:"destroy",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:zn,cdrVersion:10,deviceType:Bt},this.isReportLocalNetworkLevel=!0,this.networkLevel=ie.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,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.internals){var i,o=this.internals,a=o.receiver,s=o.sender,u=o.audioReceiver,c=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,k=this.participantCount>1?0:200,I=0,x=-90,C=0,O=this.client.getSelfRoster()||{participantId:0,endpointId:""},T=[{callUri:O.endpointId,participantId:O.participantId,sessionId:0,audioStream:[],videoStream:[]}],_=[],A=new Map,R=[],N=0,D=0,L=0,P=0,M=0;if(Object.values(s).map((function(e){var t=e.bytesSentSecond,n=e.frameWidth,i=e.frameHeight,o=e.framesEncodedSecond,a=e.resolution,s=e.isContent,u=e.expBandwidth;!!r===s&&(I+=t,C+=u,T[0].videoStream.push({fr:o,height:i,width:n}),R.push({Height:i,Width:n,framerate:o,resNum:1,resolution:a&&Pt[(a+"").toUpperCase()]||1}))})),Object.values(a).map((function(e){var t=e.frameWidth,n=void 0===t?0:t,i=e.frameHeight,o=void 0===i?0:i,a=e.framesDecodedSecond,s=void 0===a?0:a,u=e.participantId,c=e.bytesReceivedSecond,l=void 0===c?0:c,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(!!r===d){k+=l,S=Math.ceil(Math.max(S,f)),N+=n*o*v,D+=m*b*v;var E=n+"*"+o,I=A.get(E);I?(I.resNum+=1,I.framerate+=v,A.set(E,I)):A.set(E,{Width:n,Height:o,framerate:v,resNum:1,resolution:Pt["".concat(o,"P")]||1}),w.push({participantId:u||0,videoStream:[{fr:s,height:n,width:o}]})}})),Object.values(c).map((function(e){var n=e||{},i=n.bytesSentSecond,o=n.audioLevel,a=void 0===o?0:o,s=n.expBandwidth,u=n.isContent;!!r===u&&(C+=s,x=t.calcAudioLevel(a),E+=i)})),this.previousInternals){var U=this.previousInternals.audioReceiver;Object.values(U).map((function(e){var t=e.insertedSamplesForDecelerationSecond,n=void 0===t?0:t,i=e.removedSamplesForAccelerationSecond,o=void 0===i?0:i,a=e.totalSamplesReceivedSecond,s=void 0===a?0:a,u=e.isContent;!!r===u&&(P+=n,P+=o,M+=s)}))}Object.values(u).map((function(e){var t=e.bytesReceivedSecond,n=e.audioLevel,i=void 0===n?0:n,o=e.insertedSamplesForDecelerationSecond,a=void 0===o?0:o,s=e.removedSamplesForAccelerationSecond,u=void 0===s?0:s,c=e.totalSamplesReceivedSecond,l=void 0===c?0:c,h=e.isContent;!!r===h&&(P+=a,P+=u,M+=l,L=Math.max(L,i),E+=t||0)})),A.forEach((function(e,t){var r=e.framerate,n=e.resNum;e.framerate=r/n,_.push(e)}));var j=(null===(e=navigator.connection)||void 0===e?void 0:e.type)||"none",B=D?Math.floor(N/D*100):-1,F=M?Math.floor(P/M*100):0;i=this.calcAudioLevel(L);var G=Math.round(l/10),K=Math.round(h/10),V=Math.round(p/10),H=Math.round(v/10),z={sessionName:r,networkType:er[j]||0,timestampSec:1e3*parseInt((new Date).getTime()/1e3+""),audioCaptureEnergy:x,audioRenderEnergy:i,audioDownLinkBw:0,audioUpLinkBw:E,avrMissLipsync:0,videoUplinkBw:I,videoDownLinkBw:k,videoPxRatio:B,videoRecvDelay:0,videoSendDelay:0,videoRecvJitter:G,videoSendJitter:K,isLast:n,recvStreams:w,sendStreams:T,videoQuality:_,videoSendQuality:R,dbaDownLinkBw:k,dbaUplinkBw:I,videoSendRtt:V,audioSendRtt:V,audioSendJitter:H,videoRecvLost:d,videoSendLost:f,audioSendLost:m,audioRecvLost:b,upExpectedBw:C,downMaxExpectedBw:3e3,downMinExpectedBw:3e3,audioPlcPct:F},Y={content:Object.assign({},this.meetingQualityData,z)};this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{type:"dataReport",data:Y}},!1,!1)}}},{key:"calcLocalNetworkLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.client.getMeetingControl().getOnHold()){var t=ie.Good,r=this.client.getWsReConnectCount(),n=this.previousInternals;if(n){var i=n.fractionLostReceived,o=n.fractionLostSent,a=n.roundTripTime,s=this.calcNetQualityLevel(o,a,r),u=this.calcNetQualityLevel(i,a,r);t=Math.min(s,u);var c=Object.values(n.sender||{}).some((function(e){return e.type===R.CONTENT}));if(this.isReportLocalNetworkLevel||c){var l=this.client.getInviteInfo(),h=l.callerUri,f=l.meetingId;this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:f,endpointId:h,type:"networkParameter",networkLevel:t}})}(this.networkLevel!==t||e)&&(this.networkLevel=t,this.client.emitMessage(Pe.NETWORK_LEVEL,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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=ie.Excellent,i=ie.Good,o=ie.Poor,a=ie.Bad,s=n;return e>30||t>300||r>3?s=a:e>20&&e<30||t>200&&t<300||3===r?s=o:(e>10&&e<20||t>100&&t<200||2===r)&&(s=i),s}},{key:"getNewInternals",value:function(e){var t=this.client.getLayoutManager(),r=this.client.getVOM().getStreamChangeList(),n=(null==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 i=Object.keys(e.sender),o=i.length,a=0;a<o;a++){var s=e.sender[i[a]],u=r.content.length,c=r.people.length;if(s.type===R.REMOTE&&(e.sender[i[a]].expBandwidth=Mt[s.resolution]),c)for(var l=0;l<c;l++){var h=r.people[l];if(or.RESOLUTION_MAP[h.resolution]===Number(s.resolution)&&s.type===R.REMOTE){e.sender[i[a]].expBandwidth=h.bandwidth;break}}if(u)for(var f=0;f<u;f++){var d=r.content[f];if(or.RESOLUTION_MAP[d.resolution]===Number(s.resolution)&&s.type===R.CONTENT){e.sender[i[a]].expBandwidth=d.bandwidth;break}}}return e}}]),t}());const uu=su;r(6409);const cu=function(){function t(){e(this,t),this.waitingQueue=[],this.isRunning=!1,this.taskCompletedCB=null}return a(t,[{key:"onTaskCompleted",value:function(e){this.taskCompletedCB=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){return 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,n.taskCompletedCB&&n.taskCompletedCB()}))}},{key:"isTaskEnded",value:function(){return!(this.waitingQueue.length||this.isRunning)}},{key:"taskLength",value:function(){return this.waitingQueue.length}},{key:"clear",value:function(){this.waitingQueue=[],this.isRunning=!1}}]),t}();var lu=function(e){var t="";return e&&("HIDE"===e?t="HIDE":mt.isNumber(e)?t=dr[e]||"":mt.isString(e)&&(t=e)),t},hu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const fu=function(){function t(r){var n=this;e(this,t),this.handleLoginResult=function(e,t){var r=(t||{}).extUserId;if(200===(null==e?void 0:e.status)){var i=e.data||{},o=i.securityKey,a=i.callUri,s=i.token,u=i.userProfile,c=u.displayName,l=u.id,h=u.enterpriseId;n.action.setCommonParams(e.data),n.action.setTokenInfo(s);var f=s.access_token;return n.loginInfo={token:s,securityKey:o,callUri:a,id:l,displayName:c,extUserId:r,enterpriseId:h},n.logger.log("[AUTH] login data:",n.loginInfo),n.isLoggedIn=!0,gt("XYSDK:950120",{access_token:f})}n.logger.error("[AUTH]login error: ",e);var d=(e||{}).data,p=at[d.errorCode]||at[0];return Promise.reject(gt(p,d))},this.logger=r.logger,this.action=r.getAction(),this.extId=r.getClientConfig().extId||"",this.loginInfo=or.LOGIN_INFO,this.isLoggedIn=!1}return a(t,[{key:"getIsLoggedIn",value:function(){return this.isLoggedIn}},{key:"getLoginInfo",value:function(){var e=this.action.getTokenInfo();return e&&(this.loginInfo.token=e),this.loginInfo||or.LOGIN_INFO}},{key:"setLoginInfo",value:function(e){this.logger.log("[AUTH] set login info:",e),this.loginInfo=e}},{key:"destroy",value:function(){this.loginInfo=or.LOGIN_INFO,this.isLoggedIn=!1}},{key:"preLoginTasks",value:function(){this.isLoggedIn=!1}},{key:"loginExternalAccount",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[AUTH] loginExternalAccount:",e),this.preLoginTasks(),r=e.displayName,n=e.extUserId,!(i=au({displayName:r}))){t.next=7;break}return this.logger.warn("verifyRequiredResult: ",i),t.abrupt("return",Promise.reject(i));case 7:if(!n){t.next=12;break}if(!(o=this.verifyExtUserId(n))){t.next=12;break}return this.logger.warn("verifyResult: ",o),t.abrupt("return",Promise.reject(o));case 12:return e.extId||(e.extId=this.extId),t.prev=13,t.next=16,this.action.getSdkUserInfo(e);case 16:if(a=t.sent,s=a.status,c=a.data,{userName:"",password:""},200!==s){t.next=28;break}return h=c.userName,f=c.password,l={userName:h,password:f},t.next=25,this.login(l,e);case 25:return t.abrupt("return",t.sent);case 28:return this.logger.warn("login external account status is failed: ",{status:s,data:c}),t.abrupt("return",Promise.reject(gt("XYSDK:950103",{status:s,data:c})));case 30:t.next=36;break;case 32:return t.prev=32,t.t0=t.catch(13),this.logger.warn("login external account failed: ",t.t0),t.abrupt("return",Promise.reject(gt("XYSDK:950103",t.t0)));case 36:case"end":return t.stop()}}),t,this,[[13,32]])})))}},{key:"loginWithAuthCode",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[AUTH] loginWithAuthCode: ",e),this.preLoginTasks(),n=(r=e||{}).extId,i=r.extUserId,o=r.oauthCode,a=r.channelId,!(s=au({extId:n,extUserId:i,oauthCode:o,channelId:a}))){t.next=8;break}return this.logger.warn("verifyRequiredResult: ",s),t.abrupt("return",Promise.reject(s));case 8:if(!(c=this.verifyExtUserId(i))){t.next=12;break}return this.logger.warn("verifyResult: ",c),t.abrupt("return",Promise.reject(c));case 12:return t.prev=12,t.next=15,this.action.loginWithAuthCode(e);case 15:return l=t.sent,t.next=18,this.handleLoginResult(l,e);case 18:return t.abrupt("return",t.sent);case 21:return t.prev=21,t.t0=t.catch(12),this.logger.error("[AUTH]catch login error:: ",t.t0),h=t.t0.msg,f=void 0===h?"":h,t.abrupt("return",Promise.reject(gt("XYSDK:950102",t.t0,f)));case 26:case"end":return t.stop()}}),t,this,[[12,21]])})))}},{key:"login",value:function(e,t){return hu(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=(t||{}).extId,i=e.userName,o=e.password,this.preLoginTasks(),this.logger.log("[AUTH] login:",Object.assign(Object.assign({},e),t)),r.prev=4,this.logger.log("[AUTH] encryptLogin"),r.next=8,this.action.encryptLogin({userName:i,password:o,extId:n});case 8:if(r.t0=r.sent,r.t0){r.next=11;break}r.t0={};case 11:if(404!==(null==(a=r.t0)?void 0:a.status)&&10002e3!==(null==a?void 0:a.errorCode)){r.next=17;break}return this.logger.log("[AUTH] unEncrypted login"),r.next=16,this.action.login({userName:i,password:o,extId:n});case 16:a=r.sent;case 17:return r.next=19,this.handleLoginResult(a,t);case 19:return r.abrupt("return",r.sent);case 22:return r.prev=22,r.t1=r.catch(4),this.logger.error("[AUTH]catch login error:: ",r.t1),s=r.t1.msg,c=void 0===s?"":s,r.abrupt("return",Promise.reject(gt("XYSDK:950102",r.t1,c)));case 27:case"end":return r.stop()}}),r,this,[[4,22]])})))}},{key:"loginXYAccount",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[AUTH] loginXYAccount:",e),this.preLoginTasks(),n=(r=e||{}).extId,i=void 0===n?this.extId:n,o=r.account,a=r.password,s=r.countryCode,c=void 0===s?"+86":s,!(l=au({extId:i,account:o,password:a}))){t.next=7;break}return this.logger.warn("verifyRequiredResult: ",l),t.abrupt("return",Promise.reject(l));case 7:return h=o.split("-"),c=h.length>1?h[0]:c,o=h[h.length-1],t.prev=10,t.next=13,this.action.loginWithUnified(Se.XYAccount,{extId:i,account:o,password:a,countryCode:c});case 13:return f=t.sent,t.next=16,this.handleLoginResult(f);case 16:return t.abrupt("return",t.sent);case 19:return t.prev=19,t.t0=t.catch(10),this.logger.error("[AUTH]catch loginXYAccount error:: ",t.t0),d=t.t0.msg,p=void 0===d?"":d,t.abrupt("return",Promise.reject(gt("XYSDK:950102",t.t0,p)));case 24:case"end":return t.stop()}}),t,this,[[10,19]])})))}},{key:"loginExtUserId",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[AUTH] loginExtUserId:",e),this.preLoginTasks(),n=(r=e||{}).extId,i=void 0===n?this.extId:n,o=r.extUserId,a=void 0===o?"":o,s=r.authCode,c=r.displayName,l=r.tempUser,h=void 0!==l&&l,!(f=au({extId:i,extUserId:a,authCode:s,displayName:c}))){t.next=7;break}return this.logger.warn("verifyRequiredResult: ",f),t.abrupt("return",Promise.reject(f));case 7:if(!(d=this.verifyExtUserId(a))){t.next=11;break}return this.logger.warn("verifyResult: ",d),t.abrupt("return",Promise.reject(d));case 11:return t.prev=11,t.next=14,this.action.loginWithUnified(Se.ExtUserId,{extId:i,extUserId:a,authCode:s,displayName:c,tempUser:h});case 14:return p=t.sent,t.next=17,this.handleLoginResult(p);case 17:return t.abrupt("return",t.sent);case 20:return t.prev=20,t.t0=t.catch(11),this.logger.error("[AUTH]catch loginExtUserId error:: ",t.t0),v=t.t0.msg,g=void 0===v?"":v,t.abrupt("return",Promise.reject(gt("XYSDK:950102",t.t0,g)));case 25:case"end":return t.stop()}}),t,this,[[11,20]])})))}},{key:"loginExtToken",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[AUTH] loginExtToken:",e),this.preLoginTasks(),r=e.extId,n=void 0===r?this.extId:r,i=e.authCode,!(o=au({extId:n,authCode:i}))){t.next=7;break}return this.logger.warn("verifyRequiredResult: ",o),t.abrupt("return",Promise.reject(o));case 7:return t.prev=7,t.next=10,this.action.loginWithUnified(Se.ExtToken,{extId:n,authCode:i});case 10:return a=t.sent,t.next=13,this.handleLoginResult(a);case 13:return t.abrupt("return",t.sent);case 16:return t.prev=16,t.t0=t.catch(7),this.logger.error("[AUTH]catch loginExtToken error:: ",t.t0),t.abrupt("return",gt("XYSDK:950103",t.t0));case 20:case"end":return t.stop()}}),t,this,[[7,16]])})))}},{key:"setLoginTokenInfo",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[invoke] set login token info:",e),t.prev=1,this.preLoginTasks(),this.loginInfo=or.LOGIN_INFO,n=(r=e||{}).clientId,i=r.clientSecret,o=r.access_token,this.action.setTokenInfo(e),n&&this.action.setClientInfo({clientId:n,clientSecret:i}),t.next=9,this.getUserInfo(o);case 9:return t.abrupt("return",t.sent);case 12:return t.prev=12,t.t0=t.catch(1),t.abrupt("return",Promise.reject(t.t0));case 15:case"end":return t.stop()}}),t,this,[[1,12]])})))}},{key:"getUserInfo",value:function(e){return hu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.loginInfo.securityKey||!e){t.next=9;break}return this.logger.log("get user info by token"),t.next=5,this.action.getUserInfo(e);case 5:r=t.sent,i=(n=r||{}).securityKey,o=n.userProfile,s=(a=(void 0===o?{}:o)||{}).id,c=a.enterpriseId,this.setLoginInfo(Object.assign(Object.assign({},this.loginInfo),{id:s||this.loginInfo.id,enterpriseId:c||this.loginInfo.enterpriseId,securityKey:i}));case 9:return this.isLoggedIn=!0,t.abrupt("return",gt("XYSDK:950120",this.loginInfo));case 13:return t.prev=13,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 16:case"end":return t.stop()}}),t,this,[[0,13]])})))}},{key:"verifyExtUserId",value:function(e){if(e&&!/^[0-9a-zA-Z_-]{1,50}$/.test(e)){var t="extUserId can only contain numbers, letters, _ and -, and the length cannot be greater than 50";return this.logger.log("verifyExtUserId error:",t),gt("XYSDK:950101",e,t)}return null}}]),t}();function du(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var pu=[Pe.MEETING_STATS,Pe.NETWORK_PARAMETER],vu=function(t){h(n,t);var r=du(n);function n(t,i){var o;return e(this,n),(o=r.call(this)).logger=i,o.config=t,o}return a(n,[{key:"emitMessage",value:function(e){for(var t,r,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];pu.includes(e)||(r=this.logger).log.apply(r,["[ClientBase]client emit ".concat(e,":")].concat(o));(t=ln(d(n.prototype),"emmit",this)).call.apply(t,[this,e].concat(o))}},{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ln(d(n.prototype),"on",this).call(this,e,t,r)}},{key:"off",value:function(e){ln(d(n.prototype),"removeListener",this).call(this,e)}}]),n}(hn),gu=(r(7960),{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"}}),mu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},yu=p.XY_ERROR_CODE,bu=p.XY_I18N_CODE,Su=function(){function t(){e(this,t),this.errorcode=Rn.get(yu)||ct,this.i18nCode=Rn.get(bu)||gu}return a(t,[{key:"destroy",value:function(){}},{key:"getErrorCode",value:function(){return this.errorcode}},{key:"getI18nCode",value:function(){return this.i18nCode}},{key:"setI18nCode",value:function(e){this.i18nCode=e,Rn.set(bu,this.i18nCode)}},{key:"getI18nMessage",value:function(e){return this.i18nCode[lt][e]||""}},{key:"getErrorCodeMessage",value:function(e){return this.errorcode[lt][e]||""}},{key:"setErrorCode",value:function(e){this.errorcode=e,Rn.set(yu,this.errorcode)}},{key:"getCodeByJson",value:function(e,t,r,n){return mu(this,void 0,void 0,u().mark((function i(){var o,a,s,c,l,h,f;return u().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=p.XY_TIMESTAMP,a=null==r?void 0:r.version,t="string"==typeof t?JSON.parse(t):t,c=(s=t).link,l=s.version,h=(new Date).valueOf(),l===a){i.next=13;break}if(i.t0=c,!i.t0){i.next=11;break}return i.next=10,n.getCodeByJson(c);case 10:i.t0=i.sent;case 11:(f=i.t0)&&("errorcode"===e?this.setErrorCode(f):"i18n"===e&&this.setI18nCode(f),Rn.set(o,h));case 13:case"end":return i.stop()}}),i,this)})))}}]),t}(),wu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Eu=function(){function t(r){e(this,t),this.streamChange=null,this.streamChangeList={content:[],people:[]},this.isAutoBandwidth=!0,this.clientInstance=r,this.logger=r.logger}return a(t,[{key:"getStreamChangeList",value:function(){return this.streamChangeList}},{key:"handleStreamChange",value:function(e){return wu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.streamChange=e,r=e.mediagroupid,n=e.streamChangeInfo,mt.isUndefined(r)&&0===n.length?(this.streamChangeList.people=[],this.streamChangeList.content=[]):this.streamChangeList[0===r?"people":"content"]=n,this.logger.log("stream change list: ",ze()(this.streamChangeList)),i=this.clientInstance.getStreamInstance(),o=this.clientInstance.getPeer(),a=e.mediagroupid||0,!(i&&o&&this.isAutoBandwidth)){t.next=10;break}return t.next=10,i.handleChangeStream(this.streamChange,o,a);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"settingStreamChange",value:function(e){return wu(this,void 0,void 0,u().mark((function t(){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isAutoBandwidth){t.next=9;break}if(r=this.clientInstance.getPeer(),n=this.clientInstance.getStreamInstance(),i=this.streamChangeList.people,1===e&&(i=this.streamChangeList.content),o={type:"streamChange",mediagroupid:e,streamChangeInfo:i},!r||!n){t.next=9;break}return t.next=9,n.handleChangeStream(o,r,o.mediagroupid);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"disableContentStreamChange",value:function(){return wu(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.clientInstance.getPeer(),r=this.clientInstance.getStreamInstance(),!t||!r){e.next=6;break}return n={type:"streamChange",streamChangeInfo:[],mediagroupid:1},e.next=6,r.handleChangeStream(n,t,n.mediagroupid);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"clearContentStreamChange",value:function(){this.streamChangeList.content=[]}},{key:"switchAutoBandwidth",value:function(){return this.isAutoBandwidth=!this.isAutoBandwidth,this.isAutoBandwidth}}]),t}(),ku=function(){function t(r){e(this,t),this.plugin=[],this.logger=r.logger}return a(t,[{key:"getPlugin",value:function(){return this.plugin}},{key:"destroy",value:function(){this.plugin=[]}},{key:"registerPlugins",value:function(e){var t=this;e.forEach((function(e){(null==e?void 0:e.isSupportExtension())&&t.plugin.push(e)}));var r=this.plugin.map((function(e){return e.getPluginName()}));this.logger.log("[client]register plugins: ",r)}}]),t}(),Iu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},xu=function(){function t(r){e(this,t),this.client=r,this.logger=r.logger,this.action=r.getAction(),this.meetingVerified=!1}return a(t,[{key:"destroy",value:function(){this.meetingVerified=!1}},{key:"checkMeetingNumber",value:function(e){return Iu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v,g,m,y,b,S,w,E,k,I,x,C,O,T,_,A,R,N,D,L;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[invoke] check meeting number:",e),t.next=3,this.preVerifyTasks();case 3:if(r=e.confNumber,n=void 0===r?"":r,i=e.password,o=void 0===i?"":i,a=e.__hideId,s=void 0===a?"":a,this.client.setCallInfo(e),t.prev=5,!this.meetingVerified){t.next=8;break}return t.abrupt("return",this.completeMeetingVerify());case 8:return t.next=10,this.action.getCallUri({number:n,country:lt});case 10:if(c=t.sent,this.logger.log("check meeting number resp: ",c),l=c.data,h=(l||{}).errorCode,f=l.avatar,d=void 0===f?"":f,p=l.callNumber,v=void 0===p?"":p,g=l.callUrl,m=void 0===g?"":g,y=l.deviceId,b=void 0===y?"":y,S=l.deviceType,w=void 0===S?"":S,E=l.displayName,k=void 0===E?"":E,I=l.number,x=void 0===I?"":I,C=l.numberType,O=void 0===C?"":C,T=l.enablePwd,_=void 0!==T&&T,A=l.config,R=void 0===A?"":A,N=l.displayConfig,D={avatar:d,callNumber:v,callUrl:m,deviceId:b,deviceType:w,displayName:k,number:x||n,numberType:O,config:R,displayConfig:void 0===N?"":N},L=Object.assign(this.client.getCallInfo(),{meeting:D}),this.client.setCallInfo(L),!h){t.next=27;break}if(!([1001,2036,4115].indexOf(h)>-1)){t.next=24;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950105")));case 24:if(10004041!==h&&10002013!==h&&h!==fo.token_expired){t.next=26;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950151")));case 26:return t.abrupt("return",Promise.reject(gt("XYSDK:950111",l)));case 27:if(this.isSupportedCall(w)){t.next=29;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950109")));case 29:if(!_){t.next=31;break}return t.abrupt("return",this.handlePasswordValidation(n,o,s));case 31:return t.abrupt("return",this.completeMeetingVerify());case 34:return t.prev=34,t.t0=t.catch(5),this.logger.error("check meeting number error: ",t.t0),t.abrupt("return",Promise.reject(t.t0));case 38:case"end":return t.stop()}}),t,this,[[5,34]])})))}},{key:"checkMeetingPassword",value:function(e){return Iu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[invoke] check meeting password:",e),r=e.confNumber,n=void 0===r?"":r,i=e.password,o=void 0===i?"":i,t.next=4,this.preVerifyTasks();case 4:if(!(a=au({confNumber:n,password:o}))){t.next=7;break}return t.abrupt("return",Promise.reject(a));case 7:return t.next=9,this.action.verifyPassword(n,o);case 9:if(t.t0=t.sent,t.t0){t.next=12;break}t.t0={};case 12:if(s=t.t0,200!==(c=s.status)&&204!==c){t.next=18;break}return t.abrupt("return",this.completeMeetingVerify());case 18:return t.abrupt("return",Promise.reject(gt("XYSDK:950108")));case 19:case"end":return t.stop()}}),t,this)})))}},{key:"isSupportedCall",value:function(e){return Zt.includes(e)}},{key:"handlePasswordValidation",value:function(e,t,r){return Iu(this,void 0,void 0,u().mark((function n(){var i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!pr.includes(r+"")){n.next=16;break}return n.prev=1,n.next=4,this.action.ignoreMeetingMonitor(e);case 4:if(n.t0=n.sent,n.t0){n.next=7;break}n.t0={};case 7:if(i=n.t0,200!==i.status){n.next=11;break}return n.abrupt("return",this.completeMeetingVerify());case 11:n.next=15;break;case 13:n.prev=13,n.t1=n.catch(1);case 15:return n.abrupt("return",Promise.reject(gt("XYSDK:950110")));case 16:if(t){n.next=18;break}return n.abrupt("return",Promise.reject(gt("XYSDK:950107",{confNumber:e,password:t,hideId:r})));case 18:return n.abrupt("return",this.checkMeetingPassword({confNumber:e,password:t}));case 19:case"end":return n.stop()}}),n,this,[[1,13]])})))}},{key:"completeMeetingVerify",value:function(){return Iu(this,void 0,void 0,u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.client.getCallInfo(),r=t.meeting,this.client.emitMessage(Pe.CONFERENCE_INFO,r),this.meetingVerified=!0,e.abrupt("return",gt("XYSDK:950120",t));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"preVerifyTasks",value:function(){return Iu(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.client.getAuthManager().getIsLoggedIn()){e.next=4;break}return this.logger.warn("not found token"),e.abrupt("return",Promise.reject(gt("XYSDK:950212")));case 4:return e.abrupt("return",gt("XYSDK:950120"));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"verifyControlPassword",value:function(e){return Iu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=zs(e),t.next=3,this.action.verifyControlPassword(r);case 3:if(n=t.sent,i=n.status,o=n.data,200!==i){t.next=10;break}return t.abrupt("return",gt("XYSDK:950120",o));case 10:return this.logger.error("verifyControlPassword error: ",o),a=(o||{}).code,s=at[a]||at.default,t.abrupt("return",gt(s,o));case 14:case"end":return t.stop()}}),t,this)})))}}]),t}(),Cu={1:"dialogTitle",2:"dialogContent",3:"dialogSubContent",4:"dialogLabel",5:"notifyContent",6:"notifyLabel",7:"notifyContent",8:"dialogContent",9:"dialogSubContent",10:"dialogLabel"},Ou=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Tu=function(){function t(r){e(this,t),this.onhold=!1,this.handStatus=!1,this.cacheMeetingControlMessage=null,this.recordStatusNotification=null,this.recordState="",this.client=r,this.logger=r.logger,this.action=r.getAction()}return a(t,[{key:"destroy",value:function(){this.handStatus=!1}},{key:"getOnHold",value:function(){return this.onhold}},{key:"setOnHold",value:function(e){return this.onhold=e,this.onhold}},{key:"onHand",value:function(e,t){return Ou(this,void 0,void 0,u().mark((function r(){var n,i,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("onHand type:",e),this.handStatus=t,r.prev=2,r.next=5,this.action.hand(e);case 5:if(200!==(n=r.sent).status||0!==n.data.code){r.next=10;break}return r.abrupt("return",t);case 10:return i=(null==n?void 0:n.data)||{},o=i.errorCode,r.abrupt("return",Promise.reject(gt(at[o]||"XYSDK:950111",n.data)));case 12:r.next=18;break;case 14:return r.prev=14,r.t0=r.catch(2),this.logger.log("onHand err:",r.t0),r.abrupt("return",Promise.reject(gt(at[null===r.t0||void 0===r.t0?void 0:r.t0.errorCode]||"XYSDK:950111",r.t0)));case 18:case"end":return r.stop()}}),r,this,[[2,14]])})))}},{key:"handleNotificationMessage",value:function(e){var t=e.content;try{t=mt.isString(t)?JSON.parse(t):t}catch(e){}var r=Object.assign(Object.assign({},e),{content:t});this.logger.log("emit notification:",r),this.client.emitMessage(Pe.NOTIFICATION,r)}},{key:"handleRealTimeNotificationMessage",value:function(e){return Ou(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(e||{}).events,n=(void 0===r?[]:r)[0]||{},i=n.type,o=n.action,a=n.content,s=void 0===a?"":a,c={};try{c=mt.isString(s)?JSON.parse(s):s}catch(e){}return l=c.voteType,t.next=8,this.getSignInText({type:i,businessType:l,environment:lt});case 8:h=t.sent,f=Object.assign(Object.assign({},c),{action:o,type:i,copywriting:h}),this.logger.log("emit interactiveToolInfo:",f),this.client.emitMessage(Pe.INTERACTIVE_TOOL_INFO,f);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"getSignInText",value:function(e){var t=e.type,r=e.environment,n=e.businessType;return Ou(this,void 0,void 0,u().mark((function e(){var i,o,a,s,c,l,h,f;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={zh_CN:"zh-cn",en_US:"en",zh_TW:"zh-tw"},o={dialogTitle:"",dialogContent:"",dialogSubContent:"",dialogLabel:"",notifyContent:"",notifyLabel:""},e.next=4,this.action.getSignInText({type:t,environment:i[r],businessType:n});case 4:if(a=e.sent){e.next=7;break}return e.abrupt("return",o);case 7:return s=a.copyWritingsDTO||{},c=s.copyWritings,l=void 0===c?[]:c,h=Y.VOTE_SIGNATURE_START,f=Y.VOTE_SIGNATURE_STOP,l.forEach((function(e){var r=e.indexNo,n=e.content;(1===r||t===h&&r<=6||t===f&&r>=8)&&(o[Cu[r]]=n)})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"signIn",value:function(e){return Ou(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=String(this.client.getAuthManager().getLoginInfo().id),t.next=3,this.action.signIn({deviceId:r,questionnaireId:e});case 3:return n=t.sent,i=n.data,o=i.status,a=i.data,s="SUCCESS"===o||"VOTE_REPEAT"===o?"XYSDK:950120":"XYSDK:950123",t.abrupt("return",gt(s,{status:o,data:a}));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"reportPollingCapability",value:function(){return Ou(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={multiImage:JSON.stringify(Tr)},r=this.client.getLayoutManager(),n=null==r?void 0:r.getLayoutOrientation(),i={canMultiImagePoll:n===te.NONE,noMainVenuPolling:!0,disableAutoPolling:!0,enableMixPolling:!0},o=C.OPER_SETTING,a=O.COMPLEX_CAPABILITIES,s=O.MMS_CAPABILITIES,c=[{category:o,eventName:a,params:t},{category:o,eventName:s,params:i}],e.prev=7,e.next=10,this.action.setStates(c);case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(7);case 14:case"end":return e.stop()}}),e,this,[[7,12]])})))}},{key:"onSubTitle",value:function(e){var t=e.content,r=t&&JSON.parse(t),n=this.client.getI18nCode();n&&n[lt]&&(r.content=n[lt][r.i18nKey||""]||r.content),this.client.emitMessage(Pe.SUB_TITLE,r),this.client.sendV2States({category:C.STA_MSGCALLBACK,eventName:O.SUBTITLE})}},{key:"handleEPMessage",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,a=void 0===o?"":o,s=a,u=this.client.getClientState().getI18nMessage(a);u&&(s=u.replace("{dn}",i)),r.message=s}this.client.emitMessage(Pe.MEETING_CONTROL_VIDEO,t)}},{key:"handleWaitingState",value:function(e){var t=e.waitingState,r=void 0===t?0:t,n=e.automute,i=void 0===n?"":n,o=this.setOnHold(!!r);o&&this.handStatus&&(this.handStatus=!1,this.client.emitMessage(Pe.CANCEL_HANDUP,!0)),!o&&i&&this.client.handleAutoMute(i),this.client.emitMessage(Pe.ONHOLD,o)}},{key:"resendMeetingControlMessage",value:function(){return Ou(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cacheMeetingControlMessage&&this.cacheMeetingControlMessage.type&&this.onMeetingControlMessage(this.cacheMeetingControlMessage);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"onMeetingControlMessage",value:function(e){var t;return Ou(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d,p,v,g,y,b,S,w,E,k,I,x,O,T;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=e.muteOperation,i=e.disableMute,o=e.chairmanUri,a=void 0===o?"":o,s=e.contentIsDisabled,c=void 0!==s&&s,l=e.commonJson,h=void 0===l?"":l,f=e.isMuteSpeaker,d=e.recordIsDisabled,p=e.groupInfoList,v=e.conferenceMode,g=e.customizedLayout,y="",b=this.client.getLayoutManager(),S=this.client.getInviteInfo(),w=this.client.getPeerConnectionStatus(),b.setLocalStatus({isForceFullScreen:a===S.callerUri}),E={chairmanUri:a,disableMute:i,muteOperation:n,contentIsDisabled:c,isMuteSpeaker:f,recordIsDisabled:d,groupInfoList:p,conferenceMode:v,customizedLayout:g},w&&(n&&(k=m.UNMUTE_AUDIO,I=m.MUTE_AUDIO,y="mute"===n?I:k,this.client.handleAutoMute(n),this.client.sendV2States({category:C.STA_MSGCALLBACK,eventName:fr[y]})),h&&(x=JSON.parse(h),O=x.rename&&JSON.parse(x.rename),(T=(O||{tmpName:""}).tmpName)&&b.setLocalStatus({displayName:Ys(T)})),!a||a===(null===(t=this.cacheMeetingControlMessage)||void 0===t?void 0:t.chairmanUri)&&"on"!==f&&"off"!==f||b.setForceFullScreenId(),b.getPolling().handleCustomizedLayout(g),E=Object.assign(Object.assign({},E),{muteOperation:y}),this.logger.log("emmit meeting-control: ",E),this.client.emitMessage(Pe.MEETING_CONTROL,E)),this.client.getMeeting().setMeetingControlInfo(E),this.cacheMeetingControlMessage=e;case 10:case"end":return r.stop()}}),r,this)})))}},{key:"onRecordingStateChangedMessage",value:function(e){var t=e,r=t.reason,n=t.state,i=t.recordInfo;this.recordState=n;var o=this.client.getClientState().getErrorCodeMessage(r);"CHARGE:641"===r&&(o=this.client.getMeeting().getRecordPermission().developerMessage+o);e=Object.assign(Object.assign({},e),{recordInfo:yt(i),reasonText:o}),this.logger.log("emmit record state changed:",e),this.client.emitMessage(Pe.RECORDING_STATE_CHANGED,e)}},{key:"onRecordStatusNotificationMessage",value:function(e){var t,r=e,n=r.callUri,i=r.recordInfo,o=null===(t=this.client.getLayoutManager().getSelfRoster())||void 0===t?void 0:t.endpointId;e=Object.assign(Object.assign({},e),{isLocal:n===o,recordInfo:yt(i)}),this.recordStatusNotification=e,this.emitRecordStatusNotification()}},{key:"emitRecordStatusNotification",value:function(){this.client.getPeerConnectionStatus()&&this.recordStatusNotification&&(this.logger.log("emmit record status notification:",this.recordStatusNotification),this.client.emitMessage(Pe.RECORD_STATUS_NOTIFICATION,this.recordStatusNotification))}},{key:"stopCloudRecord",value:function(){var e=this.client.getInviteInfo().remoteUri;return this.recordState!==w.RECORD_STATE_STARTED?Promise.reject(gt("XYSDK:953905")):(this.client.getSocketManager().sendSocketMessage({type:"STOP_RECORD",remoteUri:e}),gt("XYSDK:950120"))}}]),t}(),_u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Au=function(){function t(r,n){e(this,t),this.key="",this.wrapEleId="",this.videoEle=null,this.videoState=Oe.UNKNOWN,this.loadState=Oe.LOAD_START,this.streamState=Te.ENABLED,this.layoutState=_e.NORMAL,this.stream=null,this.streamId="",this.streamTimerCountDown=2e3,this.isMatch=!1,this.cacheLayout=null,this.isNormalPlay=!1,this.streamStatusTimer=null,r&&(this.logger=r),this.isContent=!!n,this.videoStateChangeCallBack=function(){},this.videoPlayErrorCallBack=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 a(t,[{key:"getLayoutState",value:function(){return this.layoutState}},{key:"getIsMatch",value:function(){return this.isMatch}},{key:"setIsMatch",value:function(e){return this.isMatch=e,this.isMatch}},{key:"setVideoMediaStream",value:function(e,t){var r,n=this,i=(null==t?void 0:t.id)||"";this.logger.log("[VM]set video stream",{key:e,streamId:i}),this.key=e,i!==this.streamId&&(this.logger.log("[VM]previous streamId: ",this.streamId),this.stream&&this.removeStreamTrackEventListener(),t&&this.initStreamTrackEventListener(t),this.stream=t),this.logger.log("[VM]set next streamId: ",{streamId:(null===(r=this.stream)||void 0===r?void 0:r.id)||""}),this.setSrcObject(i).then((function(){n.streamId=i}))}},{key:"setSlaveVideoStream",value:function(e){return _u(this,void 0,void 0,u().mark((function t(){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(null==e?void 0:e.id)||"",!this.videoEle||r===this.streamId){t.next=12;break}return this.videoEle.srcObject=e,this.streamId=r,t.prev=4,t.next=7,this.videoEle.play();case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(4),this.logger.error("slave video play error: ",t.t0);case 12:case"end":return t.stop()}}),t,this,[[4,9]])})))}},{key:"getVideoTracks",value:function(){return this.stream?this.stream.getVideoTracks():[]}},{key:"updateLocalTrack",value:function(){this.removeStreamTrackEventListener(),this.initStreamTrackEventListener(this.stream),this.sendVideoStatus()}},{key:"setVideoRotationStyle",value:function(e,t,r){var n=document.getElementById(this.wrapEleId)||{},i=n.offsetWidth,o=void 0===i?0:i,a=n.offsetHeight,s=void 0===a?0:a;if(e){var u=Zo(e,o,s)||{},c=u.width,l=void 0===c?"":c,h=u.height,f=void 0===h?"":h,d=u.transform,p=void 0===d?"":d;this.videoEle&&(this.videoEle.style.transform=p,this.videoEle.style.width=l,this.videoEle.style.height=f)}else t&&this.videoEle&&(this.videoEle.style.transform=r?"scaleX(-1)":"scaleX(1)",this.videoEle.style.width=o+"px",this.videoEle.style.height=s+"px")}},{key:"initVideoSource",value:function(e){var t=document.getElementById(e);if(t){var r=this.createVideoElement(t);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: ",{rosterId:this.key,viewId:this.wrapEleId}),this.setSrcObject()):this.logger.log("[vm]update video ele",e)}else this.logger.log("Not found wrap video ele:",this.wrapEleId)}},{key:"createVideoElement",value:function(e){var t=e.querySelector("video");if(t)t.autoplay=!0,t.playsInline=!0,t.controls=!1,t.defaultMuted=!0,t.muted=!0;else{var r=document.createElement("video");r.autoplay=!0,r.playsInline=!0,r.controls=!1,r.defaultMuted=!0,r.muted=!0,e.appendChild(r),t=r}return t}},{key:"setSrcObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _u(this,void 0,void 0,u().mark((function t(){return u().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.videoPlayErrorCallBack&&this.videoPlayErrorCallBack(this.key,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()}}),t,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.streamState=Te.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.key=e,this.initVideoSource(t)}},{key:"setSlaveSource",value:function(e,t){this.logger.log("[vm]set source",{id:e,viewId:t}),this.key=e;var r=document.getElementById(t);if(r){var n=this.createVideoElement(r);this.wrapEleId=t,this.videoEle=n}else this.logger.log("Not found wrap video ele:",this.wrapEleId)}},{key:"destroy",value:function(){this.clearTrackStatusTimer(),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.isNormalPlay=!1,this.videoState=Oe.UNKNOWN}},{key:"setVideoStatusChange",value:function(e){this.videoStateChangeCallBack=e}},{key:"setVideoPlayError",value:function(e){this.videoPlayErrorCallBack=e}},{key:"onEnded",value:function(){this.logger.log("[VM]on video track ended: ",this.key),this.streamState=Te.ENDED,this.sendVideoStatus()}},{key:"onMute",value:function(){var e=this;this.logger.log("[VM]on video track muted: ",this.key),this.streamState=Te.MUTE,this.clearTrackStatusTimer(),this.isNormalPlay&&(this.streamStatusTimer=setTimeout((function(){e.logger.log("[VM]on video track muted timeout: ",e.key),e.streamState===Te.MUTE&&e.sendVideoStatus()}),this.streamTimerCountDown))}},{key:"onUnmute",value:function(){this.logger.log("[VM]on video track unmuted: ",this.key),this.streamState=Te.ENABLED,this.clearTrackStatusTimer(),this.sendVideoStatus()}},{key:"onWaiting",value:function(){var e=this;this.logger.log("[VM]on video waiting",this.key),this.loadState=Oe.LOAD_START,this.clearTrackStatusTimer(),this.isNormalPlay&&(this.streamStatusTimer=setTimeout((function(){e.logger.log("[VM]on video waiting timeout: ",e.key),e.loadState===Oe.LOAD_START&&e.sendVideoStatus()}),this.streamTimerCountDown))}},{key:"onCanPlay",value:function(){this.logger.log("[VM]on video canplay",this.key),this.loadState=Oe.CANPLAY,this.clearTrackStatusTimer(),this.sendVideoStatus()}},{key:"clearTrackStatusTimer",value:function(){this.streamStatusTimer&&(clearTimeout(this.streamStatusTimer),this.streamStatusTimer=null)}},{key:"sendVideoStatus",value:function(){var e=Oe.CANPLAY,t=Oe.ENDED,r=Oe.REQUEST,n=Oe.LOAD_START,i=Te.ENABLED,o=Te.ENDED,a=Te.MUTE;this.loadState===e&&this.streamState===i?(this.videoState=e,this.emmit(this.key)):this.streamState===o?(this.videoState=t,this.emmit(this.key)):this.loadState!==n&&this.streamState!==a||this.isContent&&this.loadState===e||(this.videoState=r,this.emmit(this.key))}},{key:"calculateLayoutState",value:function(e){var t;e&&(this.cacheLayout=e);var r=(null===(t=this.cacheLayout)||void 0===t?void 0:t.roster)||{},n=r.videoRxMute,i=r.videoTxMute,o=r.deviceType,a=r.isContent,s=r.isLocal,u=r.videoMuteReason,c=_e.NORMAL,l=_e.AUDIO_CONTENT,h=_e.REQUEST,f=_e.AUDIO_ONLY,d=_e.MUTE,p=_e.AUDIO_TEL,v=_e.ANSWER_PHONE,g=Oe.REQUEST,m=Oe.UNKNOWN,y=Oe.ENDED,b=c;a?a&&(i?b=l:this.videoState===y?b=d:this.stream&&this.videoState!==g&&this.videoState!==m||(b=h)):n&&i?b=f:i&&5===u?b=v:i||this.videoState===y?b=d:"tel"===o||"pstngw"===o?b=p:this.stream&&this.videoState!==g&&this.videoState!==m||s||(b=h),b===c&&(this.isNormalPlay=!0);var S=this.layoutState!==b;this.layoutState=b;var w={state:this.layoutState,isChange:S};return this.logger.log("[VM]calculate layout state",Object.assign(Object.assign({},w),{key:this.key})),w}},{key:"emmit",value:function(e){this.logger.log("[VM]emit video state change: ",{key:this.key,videoState:this.videoState,loadState:this.loadState,streamState:this.streamState}),this.videoStateChangeCallBack&&this.videoStateChangeCallBack(e)}}]),t}();const Ru=Au;function Nu(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 Du(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 Du(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Du(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 Lu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Pu=function(){function t(r){e(this,t),this.slaveVideoManagers={},this.audioManagers={},this.videoManagerMap=new Map,this.client=r,this.logger=r.logger,this.onVideoStatusChange=this.onVideoStatusChange.bind(this),this.onVideoPlayError=this.onVideoPlayError.bind(this)}return a(t,[{key:"getVideoManagerMap",value:function(){return this.videoManagerMap}},{key:"getAudioManagers",value:function(){return this.audioManagers}},{key:"destroy",value:function(){this.clearInvalidVideoManagers(),this.clearAudioManagers()}},{key:"setVideoRenderer",value:function(e,t){var r=ta(e),n=r.endpointId,i=r.isContent;n&&this.getVideoManagerById(e,i).setSource(e,t)}},{key:"setSlaveVideoRenderer",value:function(e,t){var r=ia(t);if(e&&!mt.isString(e)||t&&!mt.isString(t))return this.logger.warn("[client]rejected because params error"),gt("XYSDK:950101");var n=this.client.getLayoutMap().get(e);if(!n)return gt("XYSDK:950101","rosterId not right: ".concat(e));if(!this.slaveVideoManagers[r]){this.logger.log("[lm]setVideoSlaveRenderer not match: ",r);var i=ta(e).isContent;this.slaveVideoManagers[r]=new Ru(this.logger,i)}var o=this.slaveVideoManagers[r],a=this.client.getVideoStream(e);o.setSlaveSource(r,t),o.setSlaveVideoStream(a);var s=n[0],u=s.isMirror,c=s.roster.isLocal,l=void 0!==c&&c,h=this.client.getMediaManager().getRotationInfo().find((function(t){return t.id===e}));return o.setVideoRotationStyle(h,l,u),this.logger.log("slave video renderer successfully"),gt("XYSDK:950120")}},{key:"removeVideoRenderer",value:function(e){if(this.videoManagerMap.has(e)){var t=this.videoManagerMap.get(e);this.logger.log("[lm]remove vm: ",e),t.destroy(),this.videoManagerMap.delete(e)}}},{key:"removeSlaveVideoRenderer",value:function(){for(var e=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")&&!t,n=ia(t),i=Object.keys(this.slaveVideoManagers),o=function(t){e.slaveVideoManagers[t].destroy(),delete e.slaveVideoManagers[t]},a=0;a<i.length;a++){var s=i[a];if(r)o(s);else if(!r&&n===s){o(s);break}}}},{key:"playVideo",value:function(e){return Lu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,r=Nu(this.videoManagerMap.entries()),t.prev=2,r.s();case 4:if((n=r.n()).done){t.next=15;break}if(i=Yr(n.value,2),o=i[0],a=i[1],!(e&&e.indexOf(o)>-1)&&e){t.next=13;break}if(!(s=a.videoEle)||!s.srcObject){t.next=13;break}return t.next=12,s.play();case 12:this.logger.log("[LM]replay video successfully:",o);case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(2),r.e(t.t0);case 20:return t.prev=20,r.f(),t.finish(20);case 23:t.next=28;break;case 25:t.prev=25,t.t1=t.catch(0),this.logger.error("[render]play video error: ",t.t1);case 28:case"end":return t.stop()}}),t,this,[[0,25],[2,17,20,23]])})))}},{key:"playLocalVideo",value:function(){return Lu(this,void 0,void 0,u().mark((function e(){var t,r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.client.getLayoutManager(),r=t.getSelfRoster()||{},n=r.key,i=void 0===n?"":n,e.next=4,this.playVideo([i]);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"playAudio",value:function(){return Lu(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object.keys(this.audioManagers),r=0,n=t;case 2:if(!(r<n.length)){e.next=12;break}if(i=n[r],!(null==(o=this.audioManagers[i].ele)?void 0:o.srcObject)){e.next=9;break}return e.next=8,o.play();case 8:this.logger.log("replay audio success");case 9:r++,e.next=2;break;case 12:case"end":return e.stop()}}),e,this)})))}},{key:"setAudioRenderer",value:function(e,t){return Lu(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.audioManagers[e]||(this.audioManagers[e]={ele:t}),n=this.audioManagers[e],i=this.client.getMediaManager().getAudioTrackList(),!n||!n.ele||n.ele.srcObject){r.next=22;break}if(!((o=i.findIndex((function(t){return t.rest.streamId===e})))>=0)){r.next=22;break}return a=i[o].data.streams[0],n.ele.srcObject=a,r.prev=8,r.next=11,n.ele.play();case 11:s=this.client.getStreamInstance(),c=s.getDeviceManager(),l=(null==c?void 0:c.getDefaultDeviceId())||{},h=l.audioOutput,f=void 0===h?"":h,null==c||c.setAudioOutputDevice(n.ele,f),r.next=22;break;case 17:r.prev=17,r.t0=r.catch(8),d={type:"audio",key:e,error:r.t0},this.client.emitMessage(Pe.PLAY_FAILED,d),this.logger.warn("audio play error: ",r.t0);case 22:case"end":return r.stop()}}),r,this,[[8,17]])})))}},{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:"onVideoStatusChange",value:function(e){this.client.getLayoutManager().onVideoStatusChange(e)}},{key:"onVideoPlayError",value:function(e,t){var r={type:"video",key:e,error:t};this.client.emitMessage(Pe.PLAY_FAILED,r)}},{key:"updateLocalTrack",value:function(e){this.logger.log("update local track, ",e);var t=this.videoManagerMap.get(e);t&&t.updateLocalTrack()}},{key:"getVideoManagerById",value:function(e,t){if(!this.videoManagerMap.has(e)){var r=new Ru(this.logger,t);r.setVideoStatusChange(this.onVideoStatusChange),r.setVideoPlayError(this.onVideoPlayError),this.videoManagerMap.set(e,r)}return this.videoManagerMap.get(e)}},{key:"clearInvalidVideoManagers",value:function(){var e,t=Nu(this.videoManagerMap);try{for(t.s();!(e=t.n()).done;){var r=Yr(e.value,2),n=r[0],i=r[1];i.getIsMatch()?i.setIsMatch(!1):(i.destroy(),this.videoManagerMap.delete(n))}}catch(e){t.e(e)}finally{t.f()}}},{key:"clearVideoManagersUseMonitorList",value:function(e){var t=this;e.forEach((function(e){t.videoManagerMap.has(e)&&(t.videoManagerMap.get(e).destroy(),t.videoManagerMap.delete(e))}))}},{key:"clearAudioManagers",value:function(){this.logger.log("[client] remove all AudioRender"),this.audioManagers={}}}]),t}();r(9307);const Mu=function(){function t(){e(this,t),this.waitingQueue=[],this.isLock=!1,this.taskCompletedCB=null}return a(t,[{key:"onTaskCompleted",value:function(e){this.taskCompletedCB=e}},{key:"addTask",value:function(e){this.waitingQueue.push({task:e}),this.isLock||this.execute()}},{key:"execute",value:function(e){if(e){var t=e();if(this.isLock=!t,this.isLock)return void this.waitingQueue.unshift({task:e})}if(this.waitingQueue.length){var r=this.waitingQueue.shift();r&&this.execute(r.task)}else this.taskCompletedCB&&this.taskCompletedCB()}},{key:"taskLength",value:function(){return this.waitingQueue.length}},{key:"clear",value:function(){this.waitingQueue=[],this.isLock=!1}}]),t}();function Uu(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var ju=[],Bu=function(t){h(n,t);var r=Uu(n);function n(t,i){var o;e(this,n),(o=r.call(this)).onOpenSocket=function(e){var t;o.logger.log("[WS] open socket success"),o.isConnected=!0,o.reconnectCount=0,o.options.openHeatBeat&&o.sendHeartBeat(),null===(t=o.taskQueue)||void 0===t||t.execute(),o.emmit(je.OPEN,e)},o.onHandleMessage=function(e){o.options.openHeatBeat&&e.data===o.options.pangData?o.clearPangTimer():o.emmit(je.MESSAGE,e)},o.onCloseSocket=function(e){o.isConnected=!1;var t=e.code,r=e.reason,n=e.wasClean;if(o.logger.log("[WS] close websocket success",{code:t,reason:r,wasClean:n}),4e3===t)return o.isClose=!0,void o.emmit(je.TOKEN_INVALID,e);o.isClose||o.handleReconnectCount(),o.emmit(je.ERROR,e)},o.onErrorSocket=function(e){o.logger.log("[WS] error connection websocket",e),o.isConnected=!1,o.isClose||o.handleReconnectCount(),o.emmit(je.ERROR,e)};var a={protocols:[],pingData:Ce.PING,pangData:Ce.PONG,autoReConnect:!0,openHeatBeat:!0,params:{}};return o.options=Object.assign(Object.assign({},a),t),o.logger=i,o.heatBeatFrequency=15e3,o.timeOffset=1e4,o.reconnectCount=0,o.reconnectLimit=5,o.reconnectOffset=3e3,o.reconnectTimer=null,o.lockReconnect=!1,o.headBeatTimer=null,o.isConnected=!1,o.isClose=!1,o.taskQueue=new Mu,o.connect(!1),o.addEvent(),o}return a(n,[{key:"setParams",value:function(e){this.logger.log("[WS] set params:",e),this.options.params=Object.assign(Object.assign({},this.options.params),e)}},{key:"handleReConnect",value:function(e){e&&this.setParams(e),this.handleReconnectCount()}},{key:"connect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.WebSocket){var t=this.options,r=t.url,n=t.params;e&&(n.start=!1);var i=new URLSearchParams(n).toString(),o="".concat(r,"?").concat(i);this.logger.log("[WS] wss url:",o),this.socket=new WebSocket(o,this.options.protocols),ju.push(this.socket),this.lockReconnect=!1}else this.emmit(je.ERROR,gt("XYSDK:950116","Current browser cannot support Websocket, please use XyRTC sdk in chrome!"))}},{key:"addEvent",value:function(){this.socket.addEventListener("open",this.onOpenSocket.bind(this)),this.socket.addEventListener("message",this.onHandleMessage.bind(this)),this.socket.addEventListener("close",this.onCloseSocket.bind(this)),this.socket.addEventListener("error",this.onErrorSocket.bind(this))}},{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:"handleReconnectCount",value:function(){var e=this;this.isClose=!1,this.reconnectCount>=1?this.reconnectTimer||(this.reconnectTimer=setTimeout((function(){e.isConnected||e.reConnect(),e.reconnectTimer=null}),this.reconnectOffset)):this.reConnect()}},{key:"sendHeartBeat",value:function(){var e=this,t=Ce.PING,r=this.options.pingData,n=void 0===r?t:r;this.headBeatTimer||(this.send(n,!0,!1),this.startTimerAndHandlePang()),this.headBeatTimer=setInterval((function(){e.send(n,!0,!1),e.startTimerAndHandlePang()}),this.heatBeatFrequency)}},{key:"startTimerAndHandlePang",value:function(){var e=this;this.pangTimer=setTimeout((function(){e.emmit(je.TIMEOUT,""),e.reConnect()}),this.timeOffset)}},{key:"close",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger.log("[WS] close socket: ",{isReconnect:t}),this.socket&&this.socket.close(),ju.map((function(e){e&&e.close()})),ju=[],this.isClose=!t,this.reset(),t||(this.removeAllListener(),null===(e=this.taskQueue)||void 0===e||e.clear()),this.removeEvent()}},{key:"send",value:function(e){var t,r=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=mt.isString(e),a=n&&!o?JSON.stringify(e):e;i&&(this.logger.log("[WS] send wss message: ",e),this.isConnected||(this.logger.log("[WS] wss connected status: ",this.isConnected),this.logger.log("[WS] socket connection status: ",{0:"connection",1:"open",2:"closing",3:"closed"}[this.socket.readyState]||"unknown"))),null===(t=this.taskQueue)||void 0===t||t.addTask((function(){return r.sendMessageToQueue(a)}))}},{key:"reConnect",value:function(){if(!this.isClose&&!this.lockReconnect&&this.options.autoReConnect){if(this.reconnectCount>=this.reconnectLimit)return this.logger.log("[WS] reconnect count limited:",{reconnectCount:this.reconnectCount,reconnectLimit:this.reconnectLimit}),this.isClose=!0,void this.emmit(je.CLOSE,null);this.lockReconnect=!0,this.reconnectCount+=1,this.logger.log("[WS] reconnect is trigger"),this.logger.log("[WS] reconnect count:",this.reconnectCount),this.close(!0),this.emmit(je.RECONNECT,""),this.connect(!0),this.addEvent()}}},{key:"sendMessageToQueue",value:function(e){var t={id:(new Date).getTime().toString(),data:e};if(!this.isConnected||this.isClose||1!==this.socket.readyState)return this.logger.log("[WS] send wss msg failed, because socket is closed",{isConnected:this.isConnected,isClose:this.isClose,readyState:this.socket.readyState}),!1;try{return this.socket.send(t.data),!0}catch(e){return this.logger.log("[WS]failed to send message ".concat(t.id,": ").concat(e)),!1}}},{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()}}]),n}(hn);const Fu=Bu;var Gu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ku=function(){function t(r){e(this,t),this.socketTask=null,this.wsReConnectCount=0,this.seq=0,this.clientErrorState="NONE",this.client=r,this.logger=r.logger,this.action=r.getAction()}return a(t,[{key:"destroy",value:function(){var e;this.wsReConnectCount=0,null===(e=this.socketTask)||void 0===e||e.close()}},{key:"getWSSReConnectCount",value:function(){return this.wsReConnectCount}},{key:"initWebSocket",value:function(e){var t;return Gu(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[wss] init wss"),this.socketTask&&this.socketTask.close(),n=this.client.getServerManager(),r.next=5,n.getWssUrl();case 5:i=r.sent,o=null===(t=this.action.getTokenInfo())||void 0===t?void 0:t.access_token,a=zs("3"),s={url:i,params:{token:o,start:!0,cap:a}},this.socketTask=new Fu(s,this.logger),this.handleSocketOpen(i),this.handleSocketReceiveMessage(e),this.handleSocketClose(),this.handleSocketTimeout(),this.handleSocketError(),this.handleSocketReconnect(),this.handleSocketTokenInvalid();case 17:case"end":return r.stop()}}),r,this)})))}},{key:"handleSocketTokenInvalid",value:function(){var e,t=this,r=je.TOKEN_INVALID;null===(e=this.socketTask)||void 0===e||e.on(r,(function(){return Gu(t,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client on] Websocket token is invalid"),e.prev=1,e.next=4,this.action.refreshToken();case 4:r=e.sent,n=r.access_token,null===(t=this.socketTask)||void 0===t||t.handleReConnect({token:n}),e.next=15;break;case 9:e.prev=9,e.t0=e.catch(1),this.logger.fatal("[client on] Websocket refresh token is invalid: ",e.t0),this.disconnectInWssError("XYSDK:950114"),this.client.emitMessage(Pe.SOCKET_CLOSE,gt("XYSDK:950114")),this.client.close("REFRESH_TOKEN_INVALID");case 15:case"end":return e.stop()}}),e,this,[[1,9]])})))}))}},{key:"handleSocketReconnect",value:function(){var e,t=this,r=je.RECONNECT;null===(e=this.socketTask)||void 0===e||e.on(r,(function(e){t.logger.log("[client on] Websocket connected is close, reconnect..."),t.wsReConnectCount++,t.client.emitMessage(Pe.SOCKET_RECONNECT,gt("XYSDK:950113",e))}))}},{key:"handleSocketError",value:function(){var e,t=this,r=je.ERROR;null===(e=this.socketTask)||void 0===e||e.on(r,(function(e){t.logger.log("[client on] Websocket connect is error",e),t.client.emitMessage(Pe.SOCKET_ERROR,gt("XYSDK:950115",e))}))}},{key:"handleSocketTimeout",value:function(){var e,t=this,r=je.TIMEOUT;null===(e=this.socketTask)||void 0===e||e.on(r,(function(){t.logger.log("[client on] websocket connect timeout"),t.client.emitMessage(Pe.SOCKET_TIMEOUT,gt("XYSDK:950112"))}))}},{key:"handleSocketClose",value:function(){var e,t=this,r=je.CLOSE;null===(e=this.socketTask)||void 0===e||e.on(r,(function(e){t.logger.log("[client on] Websocket connect is close"),t.disconnectInWssError("XYSDK:950114",{code:null==e?void 0:e.code}),t.client.emitMessage(Pe.SOCKET_CLOSE,gt("XYSDK:950114",{code:null==e?void 0:e.code})),t.client.close("LOCAL_NET_DISCONNECT")}))}},{key:"handleSocketReceiveMessage",value:function(e){var t,r=this,n=je.MESSAGE;null===(t=this.socketTask)||void 0===t||t.on(n,(function(t){var n=t.data;if(n){var i=JSON.parse(n);r.handleSocketMessage(i,e)}}))}},{key:"handleSocketMessage",value:function(e,t){this.client.handleSocketMessage(e,t)}},{key:"handleSocketOpen",value:function(e){var t,r=this,n=je.OPEN;null===(t=this.socketTask)||void 0===t||t.on(n,(function(t){r.logger.log("websocket is connected:",e),r.wsReConnectCount=0;var n=r.client.getInviteInfo(),i=r.client.getPeer();n.callIndex&&(null==i||i.restartIceConnection("socket"),r.reqConfChangeInfo(),r.getMediaOnhold()),r.startCall(),r.client.emitMessage(Pe.SOCKET_OPEN,t)}))}},{key:"disconnectInWssError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{code:1e3};this.logger.log("disconnected wss error",{errorCode:e,detail:t});var r=this.client.getDisconnected(),n=this.client.getClientStatus();if(!r&&n){this.clientErrorState="XYSDK:950114"===e?"WS_CLOSE":"WS_ERROR";var i=4e3===(null==t?void 0:t.code)?"TOKEN_INVALID":"LOCAL_NET_DISCONNECT",o=zr[lt][i];this.client.emitMessage(Pe.DISCONNECTED,gt(e,{message:o,key:i,detail:i},"[internal] disconnected meeting"))}}},{key:"stopCall",value:function(e){var t=this,r=this.client.getInviteInfo();if(r.callIndex){var n=r.callIndex;this.client.getDisconnected()?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:nr[e],callIndex:n},!1),setTimeout((function(){var e;null===(e=t.socketTask)||void 0===e||e.close()}),10)}}},{key:"startCall",value:function(){var e=this.client.getCallInfo(),t=e.confNumber,r=e.displayName,n=void 0===r?"":r,i=e.password,o=void 0===i?"":i,a=e.meeting,s=this.client.getMakeCallParams(),u=s.__hideId,c=void 0===u?"":u,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.client.getAuthManager().getLoginInfo().cellPhone,m=this.client.getInviteInfo();this.logger.log("start call displayName:",n),m.callIndex||this.sendSocketMessage({type:"START_CALL",calleeNumber:v,displayName:n,pwd:o,callMode:"AUDIO_VIDEO",mediaAppend:{audioEncCapList:[99],videoEncCapList:[106]},hideId:c,monitorMode:h,callerNumber:g,muteAudio:f,muteVideo:d})}},{key:"reqConfChangeInfo",value:function(){var e=this.client.getInviteInfo(),t=e.meetingId,r=e.callerUri;this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"getConfChangeInfo",conferenceId:t,endpointId:r}})}},{key:"getMediaOnhold",value:function(){var e=this.client.getInviteInfo(),t=e.meetingId,r=e.callerUri;this.sendSocketMessage({type:"PASS_THROUGH",body:{type:"getMediaOnhold",conferenceId:t,endpointId:r}})}},{key:"sendSocketMessage",value:function(e){var t,r,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.client.getInviteInfo(),a=o.callIndex,s=o.callerUri,u=void 0===s?"":s,c={callIndex:a,meetingId:o.meetingId,endpointId:u,callUri:u},l=Object.assign(Object.assign({},e),c);if(n){var h=this.seq+"";null===(t=this.socketTask)||void 0===t||t.send(Object.assign(Object.assign({},l),{seq:h}),!0,i),this.seq++}else null===(r=this.socketTask)||void 0===r||r.send(l,!0,i)}}]),t}();r(5137);function Vu(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 Hu(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 Hu(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Hu(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 zu=function(){function t(r){e(this,t),this.cacheSpeakerList=[],this.cacheRemoteSpeakerList=[],this.speakerListJson="",this.speakerListTimer=null,this.speakerInterval=2e3,this.speakerTimestamp=(new Date).valueOf(),this.analyserMap=new Map,this.client=r,this.logger=r.logger}return a(t,[{key:"getRemoteSpeakerList",value:function(){return this.cacheRemoteSpeakerList}},{key:"getRemoteSpeakerMap",value:function(){var e={};return this.cacheRemoteSpeakerList.forEach((function(t){var r=sa(t.trackId||"");r&&(e[r]=t)})),e}},{key:"onSpeakerListMessage",value:function(e){var t;if(e){var r=e.map((function(e){var t=e.endpointId,r=t?ea(t,0):"";return Object.assign(Object.assign({},e),{id:r})}));this.cacheRemoteSpeakerList=ze()(r)}if(this.client.getFeatureConfig().enableSpeakerInfo){var n=ze()(this.cacheRemoteSpeakerList),i=null===(t=this.client.getLayoutManager())||void 0===t?void 0:t.getSelfRoster(),o=this.client.getAudioStatus()===m.UNMUTE_AUDIO;if(i&&o){var a=i||{},s=a.endpointId,u=a.displayName,c=a.participantId,l=a.key;n.push({alias:s,name:u,pid:c,endpointId:s,trackId:"",id:l,isLocal:!0})}this.cacheSpeakerList=n,this.logger.log("merged speaker list: ",this.cacheSpeakerList),this.deleteInvalidSpeakerMap(),this.startSpeakerListTimer()}else this.destroy()}},{key:"deleteInvalidSpeakerMap",value:function(){var e,t=this,r=this.client.getAnalyserManager(),n=Vu(this.analyserMap);try{var i=function(){var n=Yr(e.value,2),i=n[0],o=n[1];t.cacheSpeakerList.find((function(e){var t=e.id;return i===t}))||(t.logger.log("delete invalid speaker map: ",i),o&&(o.analyserNode&&r.pauseAnalyser(o.analyserNode.streamId),t.analyserMap.delete(i)))};for(n.s();!(e=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}}},{key:"startSpeakerListTimer",value:function(){var e=this,t=this.cacheSpeakerList.length;this.speakerTimestamp=(new Date).valueOf(),this.updateSpeakerAudioLevel(),t||!this.speakerListTimer?t&&!this.speakerListTimer&&(this.speakerListTimer=setInterval((function(){e.speakerTimestamp=(new Date).valueOf(),e.updateSpeakerAudioLevel()}),this.speakerInterval)):this.destroy()}},{key:"updateSpeakerAudioLevel",value:function(){var e=this,t=this.client.getAnalyserManager(),r=pe.RUNNING;this.cacheSpeakerList.forEach((function(n){var i,o=n.trackId,a=void 0===o?"":o,s=n.id,u=void 0===s?"":s,c=e.analyserMap.has(u),l=null,h=0;if(c){var f=e.analyserMap.get(u),d=f.mediaTrackId,p=f.analyserNode,v=f.timestamp;a&&d!==a?(e.logger.log("[Speaker]update media uaa track id: ",{mediaTrackId:d,trackId:a,id:u}),p&&t.pauseAnalyser(p.streamId),e.createAndUpdateAnalyser(u,a,v)):(!p||p&&p.state!==r)&&e.createAndUpdateAnalyser(u,a,e.speakerTimestamp)}else!c&&u&&e.createAndUpdateAnalyser(u,a,e.speakerTimestamp);(l=null===(i=e.analyserMap.get(u))||void 0===i?void 0:i.analyserNode)&&(h=l.analyser.getAudioLevel()),n.level=h})),this.sortSpeakerAudioLevel()}},{key:"createAndUpdateAnalyser",value:function(e,t,r){var n=this.client.getAudioStream(e),i=this.client.getAnalyserManager(),o=null;n&&(n.getAudioTracks().length&&(o=i.createAnalyser(n,{fftSize:Ut})));this.analyserMap.set(e,{stream:n,analyserNode:o,timestamp:r,mediaTrackId:t})}},{key:"sortSpeakerAudioLevel",value:function(){var e=this,t=this.cacheSpeakerList.filter((function(t){var r=t.level,n=void 0===r?0:r,i=t.id,o=void 0===i?"":i,a=e.analyserMap.get(o);if(a){var s=(a||{}).timestamp,u=void 0===s?0:s,c=n>9,l=e.speakerTimestamp-u>3e3,h=c||!c&&!l;return c&&(a.timestamp=e.speakerTimestamp),h}}));t.sort((function(e,t){var r=e.level,n=void 0===r?0:r,i=t.level;return(void 0===i?0:i)-n})),t.forEach((function(e){delete e.level})),this.emitSpeakerList(t)}},{key:"emitSpeakerList",value:function(e){var t=JSON.stringify(e);if(this.speakerListJson!==t){var r={speakersInfo:e};this.client.emitMessage(Pe.SPEAKERS_INFO,r),this.speakerListJson=t}}},{key:"destroyAnalyserMap",value:function(){var e,t=this.client.getAnalyserManager(),r=Vu(this.analyserMap);try{for(r.s();!(e=r.n()).done;){var n=Yr(e.value,2),i=n[0],o=n[1];o.analyserNode&&t.pauseAnalyser(o.analyserNode.streamId),this.analyserMap.delete(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"destroy",value:function(){this.logger.log("[speaker]destroy"),this.cacheSpeakerList.length&&(this.cacheSpeakerList=[],this.cacheRemoteSpeakerList=[],this.speakerListJson="",this.destroyAnalyserMap()),this.speakerListTimer&&(clearTimeout(this.speakerListTimer),this.speakerListTimer=null)}}]),t}(),Yu=function(){function r(t){e(this,r),this.client=t,this.logger=t.logger}return a(r,[{key:"destroy",value:function(){}},{key:"handleReceiveCustomMessage",value:function(e){var t=e.body.data;t.length>Gt?this.logger.log("SDK get userCustomizedBizMsg max message: ",Object.assign({},e.body,{length:t.length,data:""})):this.logger.log("SDK get userCustomizedBizMsg message: ",e);var r=Ys(t),n=Object.assign(Object.assign({},e.body),{data:r});this.client.emitMessage(Pe.CUSTOM_MESSAGE_RECV,n)}},{key:"sendCustomMessage",value:function(e){if(e&&e.data&&"string"!=typeof e.data)return this.logger.warn("send custom message params error: ",t(e.data)),gt("XYSDK:950101",e);var r=e.data,n=zs(r),i=r.length;if(i>1846666)return this.logger.log("send custom message size limited: ",{oriLen:i,base64Len:n.length}),gt("XYSDK:950010",e);var o=r.length<=Gt,a=e.data.substring(Gt,0),s=Object.assign(Object.assign({},e),{type:"userCustomizedBizMsg",data:n});return this.logger.log("send custom message",Object.assign(Object.assign({},e),{data:"".concat(a,"..."),oriLen:r.length,base64Len:n.length})),this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:s},!0,o),gt("XYSDK:950120")}}]),r}(),Wu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Xu=function(){function t(r){e(this,t),this.client=r,this.logger=r.logger}return a(t,[{key:"destroy",value:function(){}},{key:"setPollingAudioStatus",value:function(e,t){return Wu(this,void 0,void 0,u().mark((function r(){var n,i,o,a,s,c,l,h,f,d;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[client] setPollingAudioStatus: ",{type:e,callUriList:t}),n="string"==typeof t?[t]:Array.isArray(t)?t:[],t&&n.length){r.next=5;break}return this.logger.warn("callUriList should be string or string array."),r.abrupt("return",Promise.reject(gt("XYSDK:950101",{callUriList:t})));case 5:if(i=this.client.getInviteInfo(),o=i.meetingId,a=this.client.getAction(),"mute"!==e&&"unmute"!==e){r.next=28;break}return r.prev=9,s='{"audioEnable": '.concat("mute"===e?'"false"':'"true"',"}"),c=n.map((function(e){return{callUri:e,params:s}})),r.next=14,a.updateWebViewProp(o,c);case 14:if(l=r.sent,h=Yr(l,2),f=h[0],d=h[1],f){r.next=22;break}return r.abrupt("return",d);case 22:return r.abrupt("return",Promise.reject(gt("XYSDK:950111",d)));case 23:r.next=28;break;case 25:return r.prev=25,r.t0=r.catch(9),r.abrupt("return",Promise.reject(gt("XYSDK:950111",r.t0)));case 28:case"end":return r.stop()}}),r,this,[[9,25]])})))}},{key:"getConference",value:function(e){return Wu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f,d,p,v;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] getConference:",e),r=e.token,n=void 0===r?null:r,i=e.id,o=void 0===i?0:i,a=e.sk,s=void 0===a?"":a,c=e.autoMute,l=void 0===c?0:c,h=this.client.getAuthManager().getLoginInfo(),f=s||(null==h?void 0:h.securityKey),d=o||(null==h?void 0:h.id),t.prev=5,(p=this.client.getAction()).setTokenInfo(n),t.next=10,p.getConference(d,f,{autoMute:l});case 10:if(200!==(null==(v=t.sent)?void 0:v.status)){t.next=15;break}return t.abrupt("return",v.data);case 15:return t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:{}}));case 16:t.next=21;break;case 18:return t.prev=18,t.t0=t.catch(5),t.abrupt("return",Promise.reject({code:500,msg:"获取云会议室失败",detail:t.t0}));case 21:case"end":return t.stop()}}),t,this,[[5,18]])})))}},{key:"requestAutoPollingLayout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,r=arguments.length>2?arguments[2]:void 0;return Wu(this,void 0,void 0,u().mark((function n(){var i,o,a;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.client.getAutoMode()){n.next=3;break}return n.abrupt("return",Promise.reject(gt("XYSDK:950101","Auto mode not support request layout")));case 3:return i=this.client.getInviteInfo(),o=i.callerUri,a=i.meetingId,this.logger.log("send request auto polling layout data: ",{command:e,interval:t,reqList:r}),this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{type:"customLayoutEx",conferenceId:a,endpointId:o,layoutMode:1,pageIndex:0,PollingCommand:e,pollingInterval:Number(t)||0,streams:r}}),n.abrupt("return",!0);case 8:case"end":return n.stop()}}),n,this)})))}}]),t}(),qu=function(){function t(r){e(this,t),this.rosters=[],this.activeSpeaker={endpointId:"",pid:0},this.videoTrackList=[],this.audioTrackList=[],this.contentOnholdInfo={enableContentLiveOnHold:!1,audioTrackId:"",contentUrl:""},this.contentSenderPid=0,this.speaker=null,this.layoutRosters={content:[],people:[],total:[]},this.rotationInfo={people:[],content:[],total:[]},this.customMessage=null,this.audioTrackLength=0,this.videoTrackLength=0,this.client=r,this.logger=r.logger}return a(t,[{key:"getContentSenderPid",value:function(){return this.contentSenderPid}},{key:"getSpeakerManager",value:function(){return this.speaker}},{key:"getLayoutRosters",value:function(){return this.layoutRosters}},{key:"getVideoTrackList",value:function(){return this.videoTrackList}},{key:"getOriginRosters",value:function(){return this.rosters}},{key:"getActiveSpeaker",value:function(){return this.activeSpeaker}},{key:"getRotationInfo",value:function(){return this.rotationInfo.total}},{key:"getAudioTrackList",value:function(){return this.audioTrackList||[]}},{key:"destroy",value:function(){var e,t;this.contentOnholdInfo={enableContentLiveOnHold:!1,audioTrackId:"",contentUrl:""},this.audioTrackLength=0,this.videoTrackLength=0,null===(e=this.speaker)||void 0===e||e.destroy(),this.speaker=null,null===(t=this.customMessage)||void 0===t||t.destroy(),this.customMessage=null}},{key:"resetTrackList",value:function(){this.videoTrackList=[],this.audioTrackList=[]}},{key:"handleTrackEvent",value:function(e){var t=e.track,r=t.id,n=t.kind,i=e.streams[0]||{};this.logger.log("client onTrack event: ",{track:{id:r,kind:n},stream:null==i?void 0:i.id}),e&&e.track.kind&&this.mergeTrackList(e)}},{key:"mergeTrackList",value:function(e){var t=e.track,r=t.kind,n=t.id,i={streamId:e.streams[0].id,track:t,trackId:n},o={status:"remote",data:e,rest:i};"video"===r?(this.videoTrackLength+=1,this.videoTrackList.push(o),this.videoTrackLength>=11&&(this.client.getLayoutManager().updateStreams(),this.client.emitMessage(Pe.VIDEO_TRACK,this.videoTrackList))):"audio"===r&&(this.audioTrackLength+=1,this.handleContentOnholdAudio(i),this.audioTrackList.push(o),this.audioTrackLength>=14&&this.client.emitMessage(Pe.AUDIO_TRACK,this.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:"handleRosterMessage",value:function(e){var t=e.body,r=t.contentSenderPid,n=void 0===r?0:r,i=t.rosterInfo;0!==i.length&&(this.contentSenderPid=n,this.rosters=i,this.sendOriginOrderRosterMessage())}},{key:"sendOriginOrderRosterMessage",value:function(){var e=this.client.getLayoutManager(),t=(null==e?void 0:e.calculateSortedRosterList())||[];e.setSortedRosterList(t),this.client.emitMessage(Pe.ROSTER,{rosters:t})}},{key:"handleSpeakersInfoMessage",value:function(e){var t=this.client.getLayoutManager(),r=(null==t?void 0:t.getPolling())||null;this.activeSpeaker=e,this.sendOriginOrderRosterMessage(),null==r||r.handleSpeakersInfo(),this.client.emitMessage(Pe.SPEAKER_INFO,this.activeSpeaker)}},{key:"handleRealTimeSpeakerInfoMessage",value:function(e){this.speaker||(this.speaker=new zu(this.client)),this.speaker.onSpeakerListMessage(e)}},{key:"handleRotationChangeMessage",value:function(e){if(!this.updateRotationInfo(e)){var t=this.client.getAutoMode(),r=this.client.getLayoutManager();t?(r.calculatePosition(),r.calculateRotate()):r.calculateCustomLayoutRotate(),this.client.getLayoutManager().sendLayoutMessage(),this.client.emitMessage(Pe.ROTATION_CHANGE,this.rotationInfo.total)}}},{key:"updateRotationInfo",value:function(e){var t=e.body,r=t.rosterInfo,n=void 0===r?[]:r,i=0===t.mediagroupid?"people":"content";this.rotationInfo[i]=n;var o=[],a=this.rotationInfo,s=a.people,u=a.content,c=function(e,t){e.forEach((function(e){var r=ra(e.participantId,t);o.push(Object.assign(Object.assign({},e),{mediagroupid:t,id:r}))}))};c(s,0),c(u,1);var l=JSON.stringify(o),h=JSON.stringify(this.rotationInfo.total);this.rotationInfo.total=o;var f=l===h;return this.logger.log("rotation info: ",{rotationInfo:this.rotationInfo,isBreakUpdate:f}),f}},{key:"handleConfChangeInfoMessage",value:function(e){var t=e.body,r=t.chairManUrl,n=void 0===r?"":r,i=t.contentUri,o=void 0===i?"":i,a=t.actSpkUri,s=void 0===a?"":a,u=t.totalEpCount,c=void 0===u?0:u,l=t.displayableEpCount,h=void 0===l?0:l,f=t.mediaGroupInfo,d=void 0===f?[]:f,p=t.onHoldCount,v=void 0===p?0:p,g=t.audioTxUnMuteEpCount,m=void 0===g?0:g,y=t.videoTxUnMuteEpCount,b=void 0===y?0:y,S=t.chairManReason,w=void 0===S?"":S,E=h,k=this.contentOnholdInfo.enableContentLiveOnHold&&!this.contentOnholdInfo.contentUrl;this.logger.log("content onhold:",k);var I=this.client.getMakeCallParams().__hideId,x=this.client.getAutoMode();x&&(E=I?h+1:h);var C={participantCount:E,totalEpCount:c,chairManReason:w,chairManUrl:n,contentUri:k?"":o,actSpkUri:s,mediaGroupInfo:d,onHoldCount:v,audioTxUnMuteEpCount:m,videoTxUnMuteEpCount:b},O=this.client.getLayoutManager(),T=null==O?void 0:O.getConfInfo();(null==T?void 0:T.totalEpCount)!==c&&this.client.emitMessage(Pe.PARTICIPANTS_COUNT,{participantsNum:c}),O.setConfInfo(C),x?O.calcPageAndRequestLayout():1!==c||o||O.createCustomLayout([]),this.logger.log("emmit conf change info message: ",C),this.client.emitMessage(Pe.CONF_CHANGE_INFO,C)}},{key:"handleLayoutResultExMessage",value:function(e){this.layoutRosters.total=e.body.layout||[];var t=this.client.getLayoutManager();this.client.getAutoMode()?t.createAutoLayout(this.layoutRosters.total):t.createCustomLayout(this.layoutRosters.total)}},{key:"handleInoutNotifyMessage",value:function(e){var t=this,r=e.body.info||[],n=[];r.map((function(e){var r=t.client.getInviteInfo();if(e.e!==r.callerUri){var i=e.a,o=i.split(":");o.length>1&&(i=o[1]),n.push({displayName:e.c,action:e.t,userId:i})}})),this.client.emitMessage(Pe.IN_OUT_REMINDER,n)}},{key:"handleBulkRosterMessage",value:function(e){var t=e.body,r=t.bulkRosterType,n=void 0===r?0:r,i=t.addRosterInfo,o=void 0===i?[]:i,a=t.changeRosterInfo,s=void 0===a?[]:a,u=t.deleteRosterInfo,c={bulkRosterType:n,addRosterInfo:o,changeRosterInfo:s,deleteRosterInfo:void 0===u?[]:u};this.client.getRosterManager().setBulkRoster(c);var l=this.client.getLayoutManager().getPolling()||null;null==l||l.handleRosterWithPolling(),this.client.emitMessage(Pe.BULK_ROSTER,c)}},{key:"handleConfPropertiesMessage",value:function(e){var t=this,r=e.mg,n=(e.body||{}).confpropertiesInfo,i=void 0===n?[]:n;0===r&&(this.contentOnholdInfo.enableContentLiveOnHold=!0),1===r&&i.forEach((function(e){"contentOnhold"===e.type&&t.handleContentOnhold(e)}))}},{key:"handleContentOnhold",value:function(e){var t=this,r=e.audioTrackId,n=void 0===r?"":r,i=e.contentUrl,o=void 0===i?"":i,a=this.client.getLayoutManager(),s=a.getSelfRoster(),u=a.getLocalShareState(),c=a.getConfInfo();if(this.contentOnholdInfo.enableContentLiveOnHold){(o===(null==s?void 0:s.endpointId)||u)&&(o="");var l={audioTrackId:n,contentUrl:o,enableContentLiveOnHold:!0};if((!o||o!==this.contentOnholdInfo.contentUrl)&&c){c=Object.assign(Object.assign({},c),{contentUri:o});var h=this.client.getAutoMode();a.setConfInfo(c),h&&a.calcPageAndRequestLayout(),this.audioTrackList.map((function(e){t.handleContentOnholdAudio(e.rest,l)})),this.client.emitMessage(Pe.CONF_CHANGE_INFO,c)}this.contentOnholdInfo=l}}},{key:"handleMultiGroupInfoMessage",value:function(e){var t=e.body.mediagrps,r=void 0===t?[]:t,n={endpointId:e.endpointId,mediagrps:r};this.client.emitMessage(Pe.MULTI_GROUP_INFO,n)}},{key:"handleTranslationContentMessage",value:function(e){if(!this.client.getMeetingControl().getOnHold()){var t=e.body;this.client.emitMessage(Pe.TRANSLATION_CONTENT,t)}}},{key:"handleUserCustomBizMessage",value:function(e){this.customMessage||(this.customMessage=new Yu(this.client)),this.customMessage.handleReceiveCustomMessage(e)}},{key:"sendCustomMessage",value:function(e){return this.customMessage||(this.customMessage=new Yu(this.client)),this.customMessage.sendCustomMessage(e)}},{key:"setMonitorGroup",value:function(e,t){this.logger.log("[monitor]".concat(e," monitor group"),t);var r=this.client.getInviteInfo();if(!r.callIndex)return gt("XYSDK:950517");if(!t||!t.length)return gt("XYSDK:950120");var n=r.callerUri,i=r.meetingId;return this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{type:"start"===e?"startMediaGrp":"stopMediaGrp",conferenceId:i,endpointId:n,mediagrps:t.map((function(e){return{id:e}}))}}),gt("XYSDK:950120")}},{key:"sendWebRxBandwidth",value:function(){var e=this.client.getMeeting(),t=this.client.getInviteInfo(),r=t.meetingId,n=t.callerUri,i=e.getEnterpriseMediaConfig(),o=i.rxBandwidth,a=void 0===o?0:o,s=i.pTxBandwidth,u=void 0===s?0:s,c=i.cTxBandwidth,l=void 0===c?0:c;(a||u||l)&&this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{type:"setWebRxBandwidth",meetingId:r,endpointId:n,rxBandwidth:a,pTxBandwidth:u,cTxBandwidth:l}})}},{key:"sendContentCapability",value:function(){var e=this.client.getStreamInstance(),t=e.getContentTrack();if(t&&t.isSharingContent){var r=this.client.getInviteInfo(),n=r.callIndex,i=r.callerUri,o=void 0===i?"":i,a=r.meetingId,s=M.VIDEO,u=M.AUDIO,c=_.NORMAL,l=[],h=[];if(e)e.getMediaStreams().contentStreams.filter((function(e){return e.status===c})).forEach((function(e){var t=e.stream,r=e.resolution,n=e.kind,i={streamId:(null==t?void 0:t.id)||"",resolution:or.MAP_RESOLUTION_INDEX[r]};n===s?l.push(i):n===u&&h.push(i)})),this.logger.log("content capability streams: ",{videoStreamCapability:l,audioStreamCapability:h}),this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",callIndex:n,body:{type:"contentCapability",meetingId:a,version:2,endpointId:o,streams:l,audioStreams:h}})}}},{key:"sendPeopleCapability",value:function(){var e=this.client.getStreamInstance(),t=this.client.getInviteInfo(),r=t.callIndex,n=t.callerUri,i=void 0===n?"":n,o=t.meetingId,a=M.VIDEO,s=M.AUDIO,u=_.NORMAL;if(e){var c=e.getMediaStreams().streams,l=[],h=[];c.filter((function(e){return e.status===u})).forEach((function(e){var t=e.stream,r=e.resolution,n=e.kind,i={streamId:(null==t?void 0:t.id)||"",resolution:or.MAP_RESOLUTION_INDEX[r]};n===a?l.push(i):n===s&&h.push(i)})),this.logger.log("people capability streams: ",{videoStreamCapability:l,audioStreamCapability:h}),this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",callIndex:r,body:{type:"peopleCapability",meetingId:o,version:2,endpointId:i,streams:l,audioStreams:h}})}}},{key:"sendConfParam",value:function(){var e=this.client.getInviteInfo(),t=this.client.getFeatureConfig(),r=e.meetingId,n=e.callerUri,i="true"===e.inoutReminder,o=t.enableSpeakerInfo;this.client.getSocketManager().sendSocketMessage({type:"PASS_THROUGH",body:{type:"ConfParam",inoutReminder:i,uiNeedSpeakers:o,meetingId:r,endpointId:n}})}}]),t}(),$u=function(){function t(r){e(this,t),this.client=r,this.logger=r.logger}return a(t,[{key:"destroy",value:function(){}},{key:"onMonitorReportMessage",value:function(e){var t=e.code,r=e.monitorInfo,n=r.failUriList,i=this.client.getClientState(),o=JSON.parse(JSON.stringify(n));if(o=o.map((function(e){var t=e.status,r="";return r="SIG:412"===t||"SIG:4464"===t?"终端暂不支持":i.getErrorCodeMessage(t)||"未知错误",Object.assign(Object.assign({},e),{message:r})})),"STATE:200"===t){var a=Object.assign(Object.assign({},r),{failUriList:o}),s={monitorInfo:a};this.logger.log("start monitor report: ",a),this.client.emitMessage(Pe.START_MONITOR_REPORT,s)}else{var u="";t&&(u=i.getErrorCodeMessage(t)),this.logger.log("stop monitor report : ",u),this.client.emitMessage(Pe.STOP_MONITOR_REPORT,gt("XYSDK:950312",{message:u}))}}}]),t}();function Zu(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 Ju(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 Ju(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Ju(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 Qu=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},ec=function(){function t(r){var n=this;e(this,t),this.detectLocator=function(){return Qu(n,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isInnerWss=!1,t=this.client.getClientConfig(),r=t.extId,n=void 0===r?"":r,i=t.isSupportHybridCloud,void 0!==i&&i){e.next=4;break}return e.abrupt("return");case 4:return this.logger.log("[Server] detectLocator start"),o="",e.prev=6,e.next=9,this.getEnterpriseId(n);case 9:if(!(a=e.sent)){e.next=19;break}return e.next=13,this.locateServers(a);case 13:return s=e.sent,this.logger.log("[Server] detectLocator serverList:",s),e.next=17,this.detectWorkingServer(s);case 17:(o=e.sent)&&(this.isInnerWss=!0);case 19:e.next=23;break;case 21:e.prev=21,e.t0=e.catch(6);case 23:o&&this.setServerAddress({wssServer:o});case 24:case"end":return e.stop()}}),e,this,[[6,21]])})))},this.client=r,this.logger=r.logger,this.action=r.getAction(),this.serverUrlInfo={},this.isInnerWss=!1,this.init()}return a(t,[{key:"getServerUrlInfo",value:function(){return this.serverUrlInfo}},{key:"getWssUrl",value:function(){var e;return Qu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a,s,c,l,h,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.serverUrlInfo.wssServerUrl,n=void 0===r?"":r,"",i="",t.prev=3,this.logger.log("[Server] getAllocation server:",""),o=this.client.getAuthManager(),a=o.getLoginInfo(),s=a.id,c=a.enterpriseId,l=void 0===c?"":c,t.next=9,this.action.getAllocation(s,"",l,!this.isInnerWss);case 9:h=t.sent,i=(null===(e=null==h?void 0:h.data)||void 0===e?void 0:e.serverId)||"",t.next=15;break;case 13:t.prev=13,t.t0=t.catch(3);case 15:return f="".concat(n,"/websocket/webrtc").concat(i?"/".concat(i):""),this.logger.log("[Server] get wss url:",f),t.abrupt("return",f);case 18:case"end":return t.stop()}}),t,this,[[3,13]])})))}},{key:"setServerAddress",value:function(e){this.logger.log("[Server] set server address:",e);var t=e.httpServer,r=void 0===t?"":t,n=e.wssServer,i=void 0===n?"":n,o=e.logServer,a=void 0===o?"":o,s=this.serverUrlInfo,u=s.httpServerUrl,c=s.wssServerUrl,l=s.logServerUrl;r=this.removeProtocol(r),i=this.removeProtocol(i),a=this.removeProtocol(a),this.logger.log("[Server] server address by remove protocol:",{httpServer:r,wssServer:i,logServer:a});var h=$n.protocol,f=$n.wssProtocol;u=this.formatServerUrl(h,r)||u,c=this.formatServerUrl(f,i)||c,l=this.formatServerUrl(h,a)||l,this.serverUrlInfo=Object.assign(Object.assign({},this.serverUrlInfo),{httpServerUrl:u,wssServerUrl:c,logServerUrl:l}),this.logger.log("[Server] server url:",this.serverUrlInfo),this.setActionInfo()}},{key:"init",value:function(){var e=this.client.getClientConfig().server,t=void 0===e?"":e,r=$n.protocol,n=$n.wssProtocol,i=$n.logHost,o=this.formatServerUrl(r,t),a=this.formatServerUrl(n,t),s=Rn.get(p.XY_LOG_SERVER)||this.formatServerUrl(r,i);this.serverUrlInfo={httpServerUrl:o,wssServerUrl:a,logServerUrl:s},this.setActionInfo(),this.logger.log("[Server] get server info: ",Object.assign({},this.serverUrlInfo))}},{key:"formatServerUrl",value:function(e,t){var r,n=t.split("://"),i=n.length-1,o=i<0?0:i;return r="".concat(e,"//").concat(n[o]),this.logger.log("[Server]final url:",r),r}},{key:"setActionInfo",value:function(){var e=this.client.getClientConfig(),t=e.clientId,r=e.clientSecret,n=void 0===r?"":r,i=this.serverUrlInfo,o=i.httpServerUrl,a=void 0===o?"":o,s=i.logServerUrl,u=void 0===s?"":s;this.logger.setLogServer(u),this.action&&(this.action.setBaseUrl({baseUrl:a,logUrl:u}),this.action.setClientInfo({clientId:t,clientSecret:n}))}},{key:"removeProtocol",value:function(e){if(!e)return"";return e.replace(/^(https?|http?|wss?|ws?|ftp):\/\//i,"")}},{key:"getEnterpriseId",value:function(e){return Qu(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.action.getEnterpriseId(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"locateServers",value:function(e){return Qu(this,void 0,void 0,u().mark((function t(){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[Server] get detectLocator server"),t.next=3,this.action.locator(e);case 3:return r=t.sent,t.abrupt("return",r.filter((function(e){return"WebrtcSigGW"===e.serverName})));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"detectWorkingServer",value:function(e){return Qu(this,void 0,void 0,u().mark((function t(){var r,n,i,o,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Zu(e),t.prev=1,r.s();case 3:if((n=r.n()).done){t.next=19;break}return i=n.value,o=this.removeProtocol(i.innerIp),a=$n.protocol,t.prev=7,t.next=10,Vn().get("".concat(a,"//").concat(o),{timeout:2e3});case 10:return this.logger.log("[Server] detectLocator server:",o),t.abrupt("return",o);case 14:t.prev=14,t.t0=t.catch(7),this.logger.warn("Failed to detect server ".concat(o,":"),t.t0);case 17:t.next=3;break;case 19:t.next=24;break;case 21:t.prev=21,t.t1=t.catch(1),r.e(t.t1);case 24:return t.prev=24,r.f(),t.finish(24);case 27:return t.abrupt("return","");case 28:case"end":return t.stop()}}),t,this,[[1,21,24,27],[7,14]])})))}}]),t}();const tc=ec;function rc(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 nc(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 nc(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,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function nc(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}const ic=function(){function t(r){e(this,t),this.bulkRosterMap=new Map,this.client=r,this.logger=r.logger}return a(t,[{key:"getBulkRosterMap",value:function(){return this.bulkRosterMap}},{key:"destroy",value:function(){this.bulkRosterMap.clear()}},{key:"setBulkRoster",value:function(e){var t=this;this.logger.log("set bulk roster:",e);var r=e.bulkRosterType,n=void 0===r?0:r,i=e.addRosterInfo,o=void 0===i?[]:i,a=e.changeRosterInfo,s=void 0===a?[]:a,u=e.deleteRosterInfo,c=void 0===u?[]:u;if(0===n&&this.appendFullRoster(o),1===n&&(this.appendFullRoster(o),c.length&&c.forEach((function(e){var r,n="",i=rc(t.bulkRosterMap);try{for(i.s();!(r=i.n()).done;){var o=Yr(r.value,2),a=o[0];if(o[1].participantId===e.participantId){n=a;break}}}catch(e){i.e(e)}finally{i.f()}n&&t.bulkRosterMap.delete(n)})),s.length>0)){var l=(this.getSelfRoster()||{}).key;s.forEach((function(e){var r=e.endpointId,n=e.mediagroupid,i=ea(r,n),o=l===i;t.bulkRosterMap.set(i,Object.assign(Object.assign({},e),{isLocal:o,key:i}))}))}}},{key:"filterBulkRosterMap",value:function(e){var t,r=[],n=rc(this.bulkRosterMap.entries());try{for(n.s();!(t=n.n()).done;){var i=Yr(t.value,2)[1];e(i)&&r.push(i)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getSelfRoster",value:function(){return this.client.getLayoutManager().getSelfRoster()||{}}},{key:"appendFullRoster",value:function(e){var t=this,r=this.getSelfRoster().key;e.forEach((function(e){var n=e.endpointId,i=e.mediagroupid,o=ea(n,i),a=r===o,s=1===i;t.bulkRosterMap.set(o,Object.assign(Object.assign({},e),{isLocal:a,isContent:s,key:o}))}))}}]),t}();var oc;!function(e){e[e.nominal=0]="nominal",e[e.fair=1]="fair",e[e.serious=2]="serious",e[e.critical=3]="critical"}(oc||(oc={}));var ac=function(){function t(r){e(this,t),this.interval=5e3,this.pressureState={source:"cpu",state:oc.nominal,time:0},this.logger=r,this.pressureChange=this.pressureChange.bind(this),this.init()}return a(t,[{key:"init",value:function(){it.isSupportDevicePressure()&&(this.observer=new PressureObserver(this.pressureChange),this.observer.observe("cpu",{interval:this.interval}))}},{key:"pressureChange",value:function(e){var t=e[0];if(t){var r=t.time-this.pressureState.time>2e4;if(t.state!==this.pressureState.state||r){var n=t.source,i=t.state,o=t.time;this.pressureState={source:n,state:i,time:o},this.logger.log("[DevicePressure]pressure change: ",this.pressureState)}}}},{key:"destroy",value:function(){this.observer&&this.observer.disconnect()}}]),t}();function sc(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=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}var uc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},cc=function(t){h(n,t);var r=sc(n);function n(t,i){var o,a;e(this,n),(o=r.call(this,t,i)).invite={callerUri:"",callIndex:0,automute:"",meetingId:""},o.disconnected=!1,o.pushType="ALL",o.peer=null,o.callInfo={confNumber:""},o.clientStatus=!0,o.peerConnectionStatus=!1,o.contentMode=y.BOTH,o.isSubscribeBulkRoster=!1,o.isSubscribeTranslation=!1,o.featureConfig=gr,o.facingMode=k.FRONT,o.audioStatus=m.UNMUTE_AUDIO,o.videoStatus=m.UNMUTE_VIDEO,o.makeCallParams=Ur,o.resize=null,o.reconnectEntry=le.INIT,o.plugin=null,o.logger=i,o.logger.start(),o.config=t,o.logger.log("Version: ",zn),o.logger.log("System info: ",navigator.userAgent),o.logger.log("Location: ",window.location),o.logger.log("Screen: ",window.screen),o.logger.log("Init config: ",t);var s,u,l,h,f,d=t.clientId,p=t.clientSecret,v=t.layout,g=t.extId;return d||o.logger.warn("ClientId is not config!"),p||o.logger.warn("ClientSecret is not config!"),g||o.logger.warn("ExtId is not config!"),v&&(o.config.layout=v.toUpperCase()),o.logger.log("Merged config: ",o.config),o.autoMode=(null===(a=t.layout)||void 0===a?void 0:a.toUpperCase())===S.AUTO,o.debug=!!t.debug,o.clientState=new Su,o.action=new Eo(o.logger),o.socketManager=new Ku(c(o)),o.mediaManager=new qu(c(o)),o.serverManager=new tc(c(o)),o.stream=new Aa(c(o)),o.auth=new fu(c(o)),o.vom=new Eu(c(o)),o.meetingControl=new Tu(c(o)),o.layoutManager=new eu(c(o)),o.rosterManager=new ic(c(o)),o.render=new Pu(c(o)),o.meeting=new iu(c(o)),o.verify=new xu(c(o)),o.qualityReport=new uu(c(o)),o.operateQueue=new cu,o.edu=new Xu(c(o)),o.signal=new $u(c(o)),o.ability=bo.createInstance(c(o)),o.registerPlugins(t.plugin||[]),o.onScreenChangeEvent=o.onScreenChangeEvent.bind(c(o)),o.onDocumentChange=(s=o.onScreenChangeEvent,u=15,l=30,f=null,function(){var e=+new Date,t=this,r=arguments;f&&clearTimeout(f),h||(h=e),e-h>=l?(s.apply(t,r),h=e):f=setTimeout((function(){s.apply(t,r)}),u)}),o}return a(n,[{key:"getLoginInfo",value:function(){return this.auth.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:"getVideoManagerMap",value:function(){return this.render.getVideoManagerMap()}},{key:"getAudioManagers",value:function(){return this.render.getAudioManagers()}},{key:"getPreviewStreams",value:function(){return this.stream.getMediaStreams()||{previewStreams:[]}}},{key:"getAudioStreamConfig",value:function(){return this.stream.getAudioStreamConfig()}},{key:"getStreamInstance",value:function(){return this.stream}},{key:"getInviteInfo",value:function(){return this.invite}},{key:"getLocalHide",value:function(){return this.featureConfig.enableHideLocalView}},{key:"getPeerConnectionStatus",value:function(){return this.peerConnectionStatus}},{key:"getAudioStatus",value:function(){return this.audioStatus}},{key:"getVideoStatus",value:function(){return this.videoStatus}},{key:"getMakeCallParams",value:function(){return this.makeCallParams}},{key:"getLayoutManager",value:function(){return this.layoutManager}},{key:"getRosterManager",value:function(){return this.rosterManager}},{key:"getAnalyserManager",value:function(){return this.stream.getAudioAnalyserManager()}},{key:"getUserInfo",value:function(){return this.meeting.getUserInfo()}},{key:"getVOM",value:function(){return this.vom}},{key:"getErrorCode",value:function(){return this.clientState.getErrorCode()}},{key:"getI18nCode",value:function(){return this.clientState.getI18nCode()}},{key:"getAuthManager",value:function(){return this.auth}},{key:"getAction",value:function(){return this.action}},{key:"getRender",value:function(){return this.render}},{key:"getServerManager",value:function(){return this.serverManager}},{key:"getDisconnected",value:function(){return this.disconnected}},{key:"getClientStatus",value:function(){return this.clientStatus}},{key:"getSocketManager",value:function(){return this.socketManager}},{key:"getMediaManager",value:function(){return this.mediaManager}},{key:"getMeeting",value:function(){return this.meeting}},{key:"getPeer",value:function(){return this.peer}},{key:"getClientState",value:function(){return this.clientState}},{key:"getMeetingControl",value:function(){return this.meetingControl}},{key:"getRemoteSpeakerList",value:function(){var e;return(null===(e=this.mediaManager.getSpeakerManager())||void 0===e?void 0:e.getRemoteSpeakerList())||[]}},{key:"getRemoteSpeakerMap",value:function(){var e;return(null===(e=this.mediaManager.getSpeakerManager())||void 0===e?void 0:e.getRemoteSpeakerMap())||{}}},{key:"getLayoutMap",value:function(){return this.layoutManager?this.layoutManager.getLayoutMap():new Map}},{key:"getSelfRoster",value:function(){var e;return null===(e=this.layoutManager)||void 0===e?void 0:e.getSelfRoster()}},{key:"getLocalShareContent",value:function(){var e=this.stream.getContentTrack();return null==e?void 0:e.isSharingContent}},{key:"getFacingMode",value:function(){return this.facingMode}},{key:"getWsReConnectCount",value:function(){return this.socketManager.getWSSReConnectCount()}},{key:"getLayoutAvatarType",value:function(){return this.meeting.getLayoutAvatarType()}},{key:"getEnterpriseMediaConfig",value:function(){return this.meeting.getEnterpriseMediaConfig()}},{key:"getMeetingControlInfo",value:function(){return this.meeting.getMeetingControlInfo()}},{key:"setCallInfo",value:function(e){this.logger.log("set call info:",Object.assign({},e)),this.callInfo=Object.assign(Object.assign({},this.callInfo),e),this.logger.log("set call info finished:",Object.assign({},this.callInfo))}},{key:"getPlugin",value:function(){var e;return(null===(e=this.plugin)||void 0===e?void 0:e.getPlugin())||[]}},{key:"setServerAddress",value:function(e){this.serverManager.setServerAddress(e)}},{key:"createVideoAudioTrack",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.stream.createVideoAudioTrack();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"createContentTrack",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.stream.createContentTrack();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0));case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"getVideoStream",value:function(e){return this.logger.log("[client]getVideoStream: ",e),this.stream.getVideoStream(e)}},{key:"getAudioStream",value:function(e){return this.logger.log("[client]getAudioStream: ",e),this.stream.getAudioStream(e)}},{key:"getAudioAnalyser",value:function(e,t){return this.logger.log("[client]getAudioAnalyser: ",{id:e,config:t}),e&&!mt.isString(e)?(this.logger.warn("[client]rejected because params error"),gt("XYSDK:950101")):this.stream.getAudioAnalyser(e,t)}},{key:"removeAudioAnalyser",value:function(e){return this.logger.log("[client]removeAudioAnalyser: ",e),e&&!mt.isString(e)?(this.logger.warn("[client]rejected because params error"),gt("XYSDK:950101")):this.stream.removeAudioAnalyser(e)}},{key:"registerPlugins",value:function(e){return mt.isArray(e)?(this.plugin||(this.plugin=new ku(this)),this.plugin.registerPlugins(e),Promise.resolve(gt("XYSDK:950120"))):gt("XYSDK:950101")}},{key:"setLayoutOrientation",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[invoke] set layout orientation:",e),!(Object.values(te).indexOf(e)<0)){t.next=4;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950101")));case 4:return this.layoutManager.setLayoutOrientation(e),t.abrupt("return",Promise.resolve(gt("XYSDK:950120")));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"loginXYlinkAccount",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[client] login xylink account:",{userName:e,password:t}),r.prev=1,r.next=4,this.verifyParameter();case 4:r.next=9;break;case 6:return r.prev=6,r.t0=r.catch(1),r.abrupt("return",Promise.reject(r.t0));case 9:return r.next=11,this.auth.login({userName:e,password:t});case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),r,this,[[1,6]])})))}},{key:"loginExternalAccount",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] login external account:",e),!mt.isObject(e)||!e.authCode){t.next=6;break}return this.logger.warn("login external params is invalid"),t.next=5,this.auth.loginExtUserId(e);case 5:case 8:return t.abrupt("return",t.sent);case 6:return t.next=8,this.auth.loginExternalAccount(e);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"loginXYAccount",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] loginXYAccount:",e),t.next=3,this.auth.loginXYAccount(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"loginExtToken",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] loginExtToken:",e),t.next=3,this.auth.loginExtToken(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"loginWithAuthCode",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().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.auth.loginWithAuthCode(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"resetInitParameter",value:function(){this.debug=!1,this.isSubscribeBulkRoster=!1,this.isSubscribeTranslation=!1}},{key:"setContentMode",value:function(e){this.contentMode=e}},{key:"setFeatureConfig",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client]set feature config: ",e),mt.isObject(e)){t.next=4;break}return this.logger.warn("[client]rejected because params error"),t.abrupt("return",gt("XYSDK:950101"));case 4:return this.featureConfig=Object.assign(Object.assign({},this.featureConfig),e),this.layoutManager.getLayoutState().updateIsEnableHideLocalView(),this.processFeatureConfig("enableLowResolution"),this.logger.log("merged feature config: ",this.featureConfig),t.abrupt("return",gt("XYSDK:950120"));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"switchFeatureConfig",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[client] switch feature config: ",{key:e,value:t}),mt.isString(e)){r.next=4;break}return this.logger.warn("[client]rejected because params error"),r.abrupt("return",gt("XYSDK:950101"));case 4:if(!(e in this.featureConfig)){r.next=8;break}return this.featureConfig[e]=t,r.next=8,this.processFeatureConfig(e);case 8:return r.abrupt("return",gt("XYSDK:950120"));case 9:case"end":return r.stop()}}),r,this)})))}},{key:"processFeatureConfig",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){var r,n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.featureConfig[e],t.t0=e,t.next="enableAutoResizeLayout"===t.t0?4:"enableLowResolution"===t.t0?6:13;break;case 4:return r&&this.autoMode&&(this.logger.log("enableAutoResizeLayout start"),this.removeWindowResizeEvent(),this.initWindowResizeEvent()),t.abrupt("break",13);case 6:if(n=z.ALL,this.meeting.processMediaConfig(n),!this.peerConnectionStatus){t.next=12;break}return t.next=11,this.processUplinkLowPerformance();case 11:this.processDownlinkLowPerformance();case 12:return t.abrupt("break",13);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"setVideoProfile",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[meeting] processVideoProfileConfig: ",e,t),e&&t){r.next=3;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950101")));case 3:return r.abrupt("return",this.meeting.processVideoProfileConfig(e,t));case 4:case"end":return r.stop()}}),r,this)})))}},{key:"processUplinkLowPerformance",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] processUplinkLowPerformance"),e.next=3,this.stream.processLowPerformance();case 3:this.mediaManager.sendPeopleCapability(),this.mediaManager.sendContentCapability();case 5:case"end":return e.stop()}}),e,this)})))}},{key:"processDownlinkLowPerformance",value:function(){var e;this.logger.log("[client] processDownlinkLowPerformance"),this.autoMode&&(null===(e=this.layoutManager)||void 0===e||e.calcRequestNewLayout())}},{key:"handleSocketMessage",value:function(e,t){if(!this.disconnected)switch(e.type){case"PASS_THROUGH":this.onPassThroughMessage(e);break;case"confMgmtReport":this.logger.log("Get meeting control confMgmtReport message: ",e),this.meetingControl.onMeetingControlMessage(e);break;case"CALL_INDEX":this.onCallIndexMessage(e);break;case"CONNECTED":t(gt("XYSDK:950120",this.clientStatus&&!this.disconnected)),this.onConnectedMessage(e);break;case"SUB_TITLE":this.logger.log("Get meeting control SUB_TITLE message: ",e),this.meetingControl.onSubTitle(e);break;case"CANCEL_HANGUP":this.logger.log("Get CANCEL_HANGUP message: ",e),this.emitMessage(Pe.CANCEL_HANDUP,!0);break;case"WAITING_STATE":this.logger.log("Get WAITING_STATE message:",e),this.meetingControl.handleWaitingState(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.fatal("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.stream.handleDualStreamMessage(e);break;case"MONITOR_STATE_REPORT":this.logger.log("Get monitor state report: ",e),this.signal.onMonitorReportMessage(e);break;case"RecordingStateChanged":this.logger.log("Get recording state changed:",e),this.meetingControl.onRecordingStateChangedMessage(e);break;case"RecordStatusNotification":this.logger.log("Get record status notification:",e),this.meetingControl.onRecordStatusNotificationMessage(e);break;case"EPMESSAGE":this.logger.log("Get EPMESSAGE message:",e),this.meetingControl.handleEPMessage(e);break;case"NOTIFICATION":this.logger.log("Get NOTIFICATION message:",e),this.meetingControl.handleNotificationMessage(e);break;case"REALTIMENOTIFICATION":this.logger.log("Get REALTIMENOTIFICATION message:",e),this.meetingControl.handleRealTimeNotificationMessage(e);break;default:this.logger.log("接收到其他ws消息",e)}}},{key:"onPassThroughMessage",value:function(e){var t,r;switch(e.body.type){case"confChangeInfo":this.logger.log("receive conf change info message: ",e),this.mediaManager.handleConfChangeInfoMessage(e);break;case"layoutResultEx":this.logger.log("[receive][v2]layout result message: ",e),this.mediaManager.handleLayoutResultExMessage(e);break;case"streamChange":this.logger.log("receive stream change message: ",e),this.vom.handleStreamChange(e.body);break;case"rotationChange":this.logger.log("receive rotationChange: ",e),this.mediaManager.handleRotationChangeMessage(e);break;case"speakerInfo":this.logger.log("receive speaker list message: ",e),this.mediaManager.handleRealTimeSpeakerInfoMessage(e.body.speakerInfos);break;case"speakersInfo":this.logger.log("receive speakers info message: ",e),this.mediaManager.handleSpeakersInfoMessage(e.body.speaker);break;case"answer":this.logger.log("receive answer:",e),null===(t=this.peer)||void 0===t||t.handleAnswer(e.body);break;case"candidate":this.logger.log("receive candidate:",e),null===(r=this.peer)||void 0===r||r.handleCandidate(e.body);break;case"bulkRoster":this.logger.log("receive bulk roster message: ",e),this.mediaManager.handleBulkRosterMessage(e);break;case"roster":this.logger.log("receive roster message: ",e),this.mediaManager.handleRosterMessage(e);break;case"inoutnotify":this.logger.log("[receive]inoutnotify message: ",e),this.mediaManager.handleInoutNotifyMessage(e);break;case"confproperties":this.logger.log("receive conf properties message: ",e),this.mediaManager.handleConfPropertiesMessage(e);break;case"multiGroupInfo":this.logger.log("receive multi group info",e),this.mediaManager.handleMultiGroupInfoMessage(e);break;case"translationContent":this.logger.log("receive translationContent:",e),this.mediaManager.handleTranslationContentMessage(e);break;case"userCustomizedBizMsg":this.mediaManager.handleUserCustomBizMessage(e);break;case"networkParameter":this.emitMessage(Pe.NETWORK_PARAMETER,e.body);break;case"conferenceProperties":this.logger.log("receive conferenceProperties:",e),this.meeting.handleConferencePropertiesMessage(e);break;case"layoutResult":this.logger.log("get layout result message: ",e);break;case"mediaOnhold":this.logger.log("media onhold message: ",e);break;case"participantsNum":this.logger.log("participant message: ",e);break;default:this.logger.log("get pass though default message: ",e)}}},{key:"getConfMgmtUrl",value:function(){return this.logger.log("[client] getConfMgmtUrl"),this.meeting.getConfMgmtUrl()}},{key:"setHideLocalView",value:function(e){var t,r;return uc(this,void 0,void 0,u().mark((function n(){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.log("[client] toggleLocal:",e),this.switchFeatureConfig("enableHideLocalView",e),this.layoutManager.getLayoutState().updateIsEnableHideLocalView(),this.autoMode&&(null===(t=this.layoutManager)||void 0===t||t.calcPageInfo(),null===(r=this.layoutManager)||void 0===r||r.calcRequestNewLayout(),this.mediaManager.sendOriginOrderRosterMessage()),n.abrupt("return",{status:!!this.featureConfig.enableHideLocalView});case 5:case"end":return n.stop()}}),n,this)})))}},{key:"toggleHideId",value:function(e){var t;return uc(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[client] toggleHideId:",e),(n=lu(e))!==(null===(t=this.makeCallParams)||void 0===t?void 0:t.__hideId)&&(this.logger.log("switch hideId: ",n),this.makeCallParams.__hideId=n,this.socketManager.sendSocketMessage({type:"UPDATE_HIDEID",hideId:n})),r.abrupt("return",n);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"setVideoRenderer",value:function(e,t){this.logger.log("[client] setVideoRenderer:",{id:e,wrapEleId:t}),this.render.setVideoRenderer(e,t)}},{key:"setSlaveVideoRenderer",value:function(e,t){this.logger.log("[client] setVideoSlaveRenderer:",{id:e,wrapEleId:t}),this.render.setSlaveVideoRenderer(e,t)}},{key:"removeVideoRenderer",value:function(e){this.logger.log("[client] removeVideoRenderer:",e),this.render.removeVideoRenderer(e)}},{key:"removeSlaveVideoRenderer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.logger.log("[client] removeVideoSlaveRenderer:",{id:e,viewId:t}),this.render.removeSlaveVideoRenderer(e,t)}},{key:"playLocalVideo",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] playLocalVideo"),e.prev=1,e.next=4,this.render.playLocalVideo();case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(1),this.logger.error("play local video error: ",e.t0),e.abrupt("return",Promise.reject(e.t0));case 11:case"end":return e.stop()}}),e,this,[[1,7]])})))}},{key:"playVideo",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] playVideo:",e),t.prev=1,t.next=4,this.render.playVideo(e);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),this.logger.error("play videos error: ",t.t0),t.abrupt("return",Promise.reject(t.t0));case 11:case"end":return t.stop()}}),t,this,[[1,7]])})))}},{key:"playAudio",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] playAudio:"),e.prev=1,e.next=4,this.render.playAudio();case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(1),this.logger.error("play audios error: ",e.t0),e.abrupt("return",Promise.reject(e.t0));case 11:case"end":return e.stop()}}),e,this,[[1,7]])})))}},{key:"setAudioRenderer",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[client]setAudioRenderer:",e),r.next=3,this.render.setAudioRenderer(e,t);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"removeAudioRender",value:function(e){this.logger.log("[client] removeAudioRender:",e),this.render.removeAudioRender(e)}},{key:"getSnapshot",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.stream.getSnapshot(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"setLocalViewParams",value:function(e){var t;return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[invoke] set local view params:",e),mt.isObject(e)){r.next=4;break}return this.logger.warn("[client]rejected because params error"),r.abrupt("return",gt("XYSDK:950101",e));case 4:return null===(t=this.layoutManager)||void 0===t||t.setLocalViewParams(e),r.abrupt("return",Promise.resolve(gt("XYSDK:950120")));case 6:case"end":return r.stop()}}),r,this)})))}},{key:"setLayoutConfig",value:function(e){var t;this.logger.log("[client] set layout config: ",e);var r=Object.assign(Object.assign({},Or),e);null===(t=this.layoutManager)||void 0===t||t.setLayoutConfig(r)}},{key:"sendV2States",value:function(e){this.featureConfig.enableV2States&&this.action.setStates(e)}},{key:"switchLayout",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] switchLayout: ",e),this.autoMode){t.next=3;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950601")));case 3:if(!this.layoutManager.getLayoutState().getIsInDialogMode()){t.next=6;break}return t.abrupt("return",Promise.reject(gt("XYSDK:950604")));case 6:return e=this.layoutManager.switchLayout(e)||ur,this.sendV2States({category:C.OPER_CONFOPERATION,eventName:O.LAYOUT}),t.abrupt("return",e);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"startMeetingFocusView",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] start meeting focus view: ",e),t.abrupt("return",this.meeting.setMeetingFocusView(e,x.START));case 2:case"end":return t.stop()}}),t,this)})))}},{key:"stopMeetingFocusView",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.log("[client] stop meeting focus view: ",e),t.abrupt("return",this.meeting.setMeetingFocusView(e,x.STOP));case 2:case"end":return t.stop()}}),t,this)})))}},{key:"setFocusView",value:function(e){var t;return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[client] setFocusView: ",e),this.autoMode){r.next=3;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950601")));case 3:return r.abrupt("return",(null===(t=this.layoutManager)||void 0===t?void 0:t.setFocusView(e))||"");case 4:case"end":return r.stop()}}),r,this)})))}},{key:"setPageInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[client] setPageInfo: ",t),this.autoMode){r.next=3;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950603")));case 3:if(!this.layoutManager.getLayoutState().getIsInDialogMode()){r.next=6;break}return r.abrupt("return",Promise.reject(gt("XYSDK:950604")));case 6:return null===(e=this.layoutManager)||void 0===e||e.setPageInfo(t),r.abrupt("return",Promise.resolve(gt("XYSDK:950120")));case 8:case"end":return r.stop()}}),r,this)})))}},{key:"checkPermissionWithMeetingNumber",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().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 uc(this,void 0,void 0,u().mark((function t(){return u().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()}}),t,this)})))}},{key:"sendVideoControlResult",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){var n;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.logger.log("[client]invoke sendVideoControlResult: ",{type:e,data:t}),mt.isObject(t)){r.next=4;break}return this.logger.log("[client]invoke params error"),r.abrupt("return",Promise.reject(gt("XYSDK:950101",t)));case 4:return n=JSON.stringify(t),r.next=7,this.action.sendVideoControlResult(e,n);case 7:return r.abrupt("return",Promise.resolve(gt("XYSDK:950120",{},"success")));case 8:case"end":return r.stop()}}),r,this)})))}},{key:"onCallExceptionMessage",value:function(e){var t=zr[lt][e.exception];e.code&&(t=this.clientState.getErrorCodeMessage(e.code)),t=t||zr[lt].default,this.disconnected=!0,this.emitMessage(Pe.DISCONNECTED,gt("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,a=void 0===o?"":o,s=zr[lt][r];"KickoutTipContent"!==r&&"The device locked"!==r&&"New soft device logging"!==r&&"OK"!==r&&i&&(s=this.clientState.getErrorCodeMessage(e.code)),s=s||zr[lt].default,this.disconnected=!0;var u={message:s,code:i,detail:r,reason:a};this.emitMessage(Pe.DISCONNECTED,gt("XYSDK:950230",u)),this.destroy("SERVER_INNER_ERROR",!0)}},{key:"onMediaChangedMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le.MEDIA;if(this.reconnectEntry===le.PEER)return this.emitMessage(Pe.DISCONNECTED,gt("XYSDK:950231","PeerConnection cant trigger track event")),void this.logger.log("Disconnected meeting, PeerConnection cant trigger track event");if(this.peer&&this.stream){this.peer.destroy(),this.peer=new tn(this,!0);var t=this.stream.getVideoAudioTrack(),r=this.stream.getContentTrack();this.mediaManager.resetTrackList(),t&&this.peer.publish(t,v.VIDEO_AUDIO_PIPE),(null==r?void 0:r.isSharingContent)&&r&&this.peer.publish(r,v.CONTENT)}this.mediaManager.sendConfParam(),this.isSubscribeBulkRoster&&this.subscribeBulkRoster(),this.mediaManager.sendWebRxBandwidth(),this.isSubscribeTranslation&&this.startTranslation(),e===le.MEDIA&&this.emitMessage(Pe.MEDIA_CHANGED_MIGRATE,!0),this.reconnectEntry=e}},{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 r=null===(t=this.layoutManager)||void 0===t?void 0:t.getScreenInfo();r&&this.sendScreenInfoMessage(r)}}},{key:"onConnectedMessage",value:function(e){var t=m.UNMUTE_AUDIO,r=m.MUTE_AUDIO;this.invite=Object.assign(Object.assign({},this.invite),e),this.logger.log("Get connected message: ",this.invite);var n=this.makeCallParams,i=n.muteAudio,o=n.muteVideo;this.subscribeBulkRoster(),this.setLocalRosterStatus(),this.emitAudioStatus(i?r:t),this.meeting.handleConferenceInfo(),this.featureConfig.enableCheckRecordPermission&&this.meeting.checkPermissionWithMeetingNumber(),this.meeting.handleUserInfo();var a=this.invite,s=a.meetingId,u=a.callerUri,c=a.vcNumber,l=a.remoteUri,h=void 0===l?"":l,f=this.meeting.getConferenceInfo().mpvc,d=void 0===f?"":f;this.action.setMeetingInfo({meetingId:s,callUri:u,vcNumber:c||d,remoteUri:h}),this.meeting.setEnterpriseBuffetConfig(),this.sendV2States({category:C.STA_CONFSTATUS,eventName:O.CALL_IN,params:{callType:"initiativeJoin",appName:this.config.isThird?hr:lr,audioMute:i,videoMute:o}})}},{key:"setLocalRosterStatus",value:function(){var e,t=this.auth.getLoginInfo().extUserId,r=this.invite.callerUri,n=this.makeCallParams,i=n.muteAudio,o=n.muteVideo,a=m.MUTE_VIDEO,s=m.UNMUTE_VIDEO,u=m.MUTE_AUDIO,c=m.UNMUTE_AUDIO;null===(e=this.layoutManager)||void 0===e||e.setLocalStatus({endpointId:r,participantId:Ft,key:ea(r,0),audioTxMute:i,videoTxMute:o,extUserId:t}),this.emitVideoStatus(o?a:s),this.emitAudioStatus(i?u:c)}},{key:"setLoginTokenInfo",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.auth.setLoginTokenInfo(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"checkMeetingNumber",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.verify.checkMeetingNumber(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"checkMeetingPassword",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.verify.checkMeetingPassword(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"makeCall",value:function(e){var t,r;return uc(this,void 0,void 0,u().mark((function n(){var i,o,a,s,c,l,h,f,d,p,v,g=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.logger.log("[client] makeCall params: ",e),i=window.location,o=i.protocol,a=i.hostname,s=null===(t=this.action.getTokenInfo())||void 0===t?void 0:t.access_token,"https:"!==o&&"localhost"!==a&&this.config.checkSSL&&this.logger.warn("makeCall protocol warning: ",window.location),s){n.next=7;break}return this.logger.warn("not found token"),n.abrupt("return",Promise.reject(gt("XYSDK:950212")));case 7:if(mt.isObject(e)&&e.confNumber){n.next=10;break}return this.logger.warn("params invalid"),n.abrupt("return",Promise.reject(gt("XYSDK:950101",e)));case 10:if(this.clientStatus){n.next=13;break}return this.logger.warn("client status already failed"),n.abrupt("return",Promise.reject(gt("XYSDK:950201")));case 13:return c=e.displayName,l=e.__hideId,h=lu(void 0===l?"":l),this.makeCallParams=Object.assign({},this.makeCallParams,e,{__hideId:h}),this.logger.log("merge make call params: ",this.makeCallParams),n.prev=17,n.next=20,this.serverManager.detectLocator();case 20:return null===(r=this.layoutManager)||void 0===r||r.setLocalStatus({displayName:c}),n.next=23,this.getBasicInfo(e,s);case 23:return f=e.confNumber,d=e.password,p=e.__hideId,v={confNumber:f,password:d,__hideId:p},n.next=27,this.verify.checkMeetingNumber(v);case 27:return n.next=29,this.meeting.setEnterpriseMediaConfig();case 29:n.next=37;break;case 31:return n.prev=31,n.t0=n.catch(17),this.logger.log("make call error:",n.t0),n.next=36,this.close();case 36:return n.abrupt("return",Promise.reject(n.t0));case 37:return n.abrupt("return",new Promise((function(e,t){g.socketManager.initWebSocket(e)})));case 38:case"end":return n.stop()}}),n,this,[[17,31]])})))}},{key:"publish",value:function(e){if(this.logger.log("[client]publish track"),this.clientStatus&&!this.disconnected)if(e){var t=ye.PEOPLE,r=ye.CONTENT,n=e.getTrackType();this.logger.log("publish track: ",n),this.peer||(this.peer=new tn(this)),n===t?this.peer.publish(e,v.VIDEO_AUDIO_PIPE):n===r&&this.peer.publish(e,v.CONTENT)}else this.logger.log("custom track is null")}},{key:"applyShareContent",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.contentMode,this.socketManager.sendSocketMessage({type:"START_CONTENT",mode:t,enableAnnotation:!1});case 2:case"end":return e.stop()}}),e,this)})))}},{key:"applyStopShareContent",value:function(){var e;this.sendStopShareContentMsg(),null===(e=this.peer)||void 0===e||e.closeContentStream(),this.vom.clearContentStreamChange()}},{key:"sendStopShareContentMsg",value:function(){var e;this.socketManager.sendSocketMessage({type:"STOP_CONTENT",mode:this.contentMode}),null===(e=this.peer)||void 0===e||e.resetContentTrackSize()}},{key:"getConference",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.edu.getConference(e);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case 9:case"end":return t.stop()}}),t,this,[[0,6]])})))}},{key:"getServerConfig",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n,i,o,a,s,c,l,h,f,d,v,g,m,y,b;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=p.XY_I18N_CODE,r=p.XY_ERROR_CODE,n=p.XY_TIMESTAMP,i=Rn.get(r),o=Rn.get(t),a=Rn.get(n),s=(new Date).valueOf(),c=pt(Number(a),Number(s)),l=["logServer"],h=!1,i&&o&&c<1||(l=["i18n","errorcode","logServer"],h=!0),e.next=12,this.action.getServerConfig(l);case 12:if(!(f=e.sent)||200!==f.status||!f.data){e.next=22;break}if(d=f.data,v=d.errorcode,g=d.i18n,m=void 0===g?"{}":g,y=d.logServer,b=void 0===y?"":y,Rn.set(p.XY_LOG_SERVER,b),b&&this.logger.setLogServer(b),!h){e.next=22;break}return e.next=20,this.clientState.getCodeByJson("errorcode",v,i,this.action);case 20:return e.next=22,this.clientState.getCodeByJson("i18n",m,o,this.action);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:"addOperateVideoAudioTask",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.operateQueue.addTask((function(){return t.operateVideoAudio(e,r)}))}},{key:"operateVideoAudio",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(n,i){return uc(t,void 0,void 0,u().mark((function t(){var o,a,s,c,l,h,f,d,p,v,g,y,b,S;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("video or audio operate: ",e,r),!this.stream){t.next=43;break}if(h=m.MUTE_AUDIO,f=m.MUTE_VIDEO,d=m.UNMUTE_AUDIO,p=m.UNMUTE_VIDEO,v=[h,f,d,p],y=(g=tr[e]).type,b=g.enabled,S=g.reportEventType,v.includes(e)){t.next=8;break}return this.logger.log("Params invalid"),t.abrupt("return",i(gt("XYSDK:950101")));case 8:if(t.prev=8,e!==d){t.next=16;break}if(!this.stream){t.next=13;break}return t.next=13,this.stream.videoAudioProcess(e);case 13:r&&this.socketManager.sendSocketMessage({type:y}),null===(o=this.layoutManager)||void 0===o||o.setLocalStatus({audioTxMute:!b}),this.emitAudioStatus(e);case 16:if(e!==p){t.next=26;break}if(!this.stream){t.next=20;break}return t.next=20,this.stream.videoAudioProcess(e);case 20:null===(a=this.layoutManager)||void 0===a||a.setLocalStatus({videoTxMute:!b}),null===(s=this.layoutManager)||void 0===s||s.updateLocalTrack(),this.playLocalVideo(),this.vom.settingStreamChange(0),this.emitVideoStatus(e),r&&this.socketManager.sendSocketMessage({type:y});case 26:if(e===f&&(null===(c=this.layoutManager)||void 0===c||c.setLocalStatus({videoTxMute:!b}),this.emitVideoStatus(e)),e===h&&(null===(l=this.layoutManager)||void 0===l||l.setLocalStatus({audioTxMute:!b}),this.emitAudioStatus(e)),e!==f&&e!==h){t.next=33;break}if(r&&this.socketManager.sendSocketMessage({type:y}),!this.stream){t.next=33;break}return t.next=33,this.stream.videoAudioProcess(e);case 33:n(e),this.sendV2States({category:C.OPER_CONFOPERATION,eventName:S}),t.next=41;break;case 37:t.prev=37,t.t0=t.catch(8),this.logger.error("[client]operateVideoAudio error: ",t.t0),i(t.t0);case 41:t.next=45;break;case 43:this.logger.log("Operate error, not found stream lib"),i(gt("XYSDK:950203"));case 45:case"end":return t.stop()}}),t,this,[[8,37]])})))}))}},{key:"peerPublish",value:function(e,t){this.logger.log("[client]invoke peerPublish: ",t),e&&this.peer&&this.peer.publish(e,t)}},{key:"muteAudio",value:function(){return this.logger.log("[client] muteAudio"),this.addOperateVideoAudioTask(m.MUTE_AUDIO)}},{key:"muteVideo",value:function(){return this.logger.log("[client] muteVideo"),this.addOperateVideoAudioTask(m.MUTE_VIDEO)}},{key:"unmuteAudio",value:function(){return this.logger.log("[client] unmuteAudio"),this.addOperateVideoAudioTask(m.UNMUTE_AUDIO)}},{key:"unmuteVideo",value:function(){return this.logger.log("[client] unmuteVideo"),this.addOperateVideoAudioTask(m.UNMUTE_VIDEO)}},{key:"setPollingAudioStatus",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.edu.setPollingAudioStatus(e,t);case 3:return r.abrupt("return",r.sent);case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",Promise.reject(r.t0));case 9:case"end":return r.stop()}}),r,this,[[0,6]])})))}},{key:"onHandUp",value:function(){return this.logger.log("[client] onHandUp"),this.meetingControl.onHand("handup",!0)}},{key:"onHandDown",value:function(){return this.logger.log("[client] onHandDown"),this.meetingControl.onHand("handdown",!1)}},{key:"onMute",value:function(){return this.logger.log("[client] onMute"),this.meetingControl.onHand("mute",!1)}},{key:"setPeerConnectionStatus",value:function(e){var t,r,n,i,o;if(this.logger.log("setPeerConnectionStatus:",e),this.peerConnectionStatus=e,this.mediaManager.sendConfParam(),e){this.invite.automute&&(this.logger.log("setPeerConnectionStatus setAudioStream:",this.invite.automute),this.handleAutoMute(this.invite.automute)),this.meetingControl.resendMeetingControlMessage();var a=(null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo())||{},s=a.totalEpCount,u=void 0===s?0:s,c=a.contentUri;this.processFeatureConfig("enableAutoResizeLayout"),u<=0&&!c&&(this.autoMode?null===(r=this.layoutManager)||void 0===r||r.createAutoLayout([]):null===(n=this.layoutManager)||void 0===n||n.createCustomLayout([]));var l=null===(i=this.layoutManager)||void 0===i?void 0:i.getContentRosterItem();l&&this.sendContentRosterMessage(l),this.mediaManager.sendWebRxBandwidth(),this.meetingControl.emitRecordStatusNotification(),this.qualityReport.reportLocalNetworkLevel(!this.makeCallParams.muteVideo);var h=(null===(o=this.layoutManager)||void 0===o?void 0:o.getFocusRoster())||null;this.emitFocusView(h),this.devicePressure||(this.devicePressure=new ac(this.logger),this.devicePressure.init())}}},{key:"handleAutoMute",value:function(e){this.logger.log("handle automute:",e);var t=m.MUTE_AUDIO,r=m.UNMUTE_AUDIO,n=t;"mute"===e||"forcemute"===e?n=t:"unmute"===e&&(n=r),this.stream&&(n===t&&this.addOperateVideoAudioTask(m.MUTE_AUDIO,!1),n===r&&this.addOperateVideoAudioTask(m.UNMUTE_AUDIO,!1))}},{key:"sendCustomMessage",value:function(e){return this.mediaManager.sendCustomMessage(e)}},{key:"nextPollingPage",value:function(){var e,t,r,n,i=null===(t=null===(e=this.layoutManager)||void 0===e?void 0:e.polling)||void 0===t?void 0:t.getPollingState();i&&i===ke.POLLING&&(null===(n=null===(r=this.layoutManager)||void 0===r?void 0:r.polling)||void 0===n||n.nextPage())}},{key:"switchAutoBandwidth",value:function(){return this.logger.log("[client] switchAutoBandwidth"),this.vom.switchAutoBandwidth()}},{key:"switchDebug",value:function(e){var t=this;return this.logger.log("[client] switchDebug"),new Promise((function(r,n){var i;"boolean"!=typeof e&&n(gt("XYSDK:950101"));try{t.debug=e,null===(i=t.peer)||void 0===i||i.initSenderStatus(),r(t.debug)}catch(e){n(gt("XYSDK:950210"))}}))}},{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(a,s){if(n.logger.log("new layout request list: ",{reqList:e,extReqList:i,maxViewCountPerPage:t,pageIndex:r}),!ou(e))return s(gt("XYSDK:950101",{reqList:e}));if(!ou(i))return s(gt("XYSDK:950101",{extReqList:i}));~~t>9&&(t=9),n.config.layout===S.CUSTOM&&(e=n.meeting.convertReqList(e),i=n.meeting.convertReqList(i),n.logger.log("covert request list:",{reqList:e,extReqList:i})),r=Math.max(0,r);var u=n.invite,c=u.callerUri,l=void 0===c?"":c,h=u.meetingId;n.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:Object.assign({type:"customLayoutEx",conferenceId:h,endpointId:l,layoutMode:0,pageIndex:r,maxViewCountPerPage:t,streams:e,extStreams:i},o)}),a(!0)}))}},{key:"requestAutoPollingLayout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,r=arguments.length>2?arguments[2]:void 0;return uc(this,void 0,void 0,u().mark((function n(){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.edu.requestAutoPollingLayout(e,t,r);case 3:return n.abrupt("return",n.sent);case 6:return n.prev=6,n.t0=n.catch(0),n.abrupt("return",Promise.reject(n.t0));case 9:case"end":return n.stop()}}),n,this,[[0,6]])})))}},{key:"emitAudioStatus",value:function(e){var t,r=m.MUTE_AUDIO,n=m.UNMUTE_AUDIO;this.audioStatus=e,e!==r&&e!==n||null===(t=this.mediaManager.getSpeakerManager())||void 0===t||t.onSpeakerListMessage();var i={status:e};this.emitMessage(Pe.AUDIO_STATUS,i)}},{key:"emitVideoStatus",value:function(e){this.videoStatus=e;var t={status:e};this.emitMessage(Pe.VIDEO_STATUS,t),this.qualityReport.reportLocalNetworkLevel(e!==m.MUTE_VIDEO)}},{key:"emitFocusView",value:function(e){this.peerConnectionStatus&&this.emitMessage(Pe.FOCUS_VIEW,e)}},{key:"sendScreenInfoMessage",value:function(e){this.emitMessage(Pe.SCREEN_INFO,ze()(e))}},{key:"sendContentRosterMessage",value:function(e){var t;null===(t=this.layoutManager)||void 0===t||t.setContentRosterItem(e),this.emitMessage(Pe.CONTENT,{data:e})}},{key:"sendTemplateMode",value:function(e){this.emitMessage(Pe.TEMPLATE_MODE,e)}},{key:"reportQualityData",value:function(e){var t,r=null===(t=this.layoutManager)||void 0===t?void 0:t.getConfInfo();e=this.qualityReport.getNewInternals(e),this.qualityReport.reportQualityData(e,r)}},{key:"sendInternals",value:function(e){this.emitMessage(Pe.MEETING_STATS,this.qualityReport.getNewInternals(e))}},{key:"off",value:function(e){this.logger.log("[client] off:",e),this.removeListener(e)}},{key:"onScreenChangeEvent",value:function(e){this.emitMessage(Pe.CONTAINER_RESIZE,e),this.autoMode&&this.layoutManager&&this.layoutManager.calculateScreenInfo().calculatePosition().calculateRotate().sendLayoutMessage()}},{key:"initWindowResizeEvent",value:function(){var e,t=(null===(e=this.config.container)||void 0===e?void 0:e.elementId)||"";this.resize||(this.resize=new Ke,this.resize.init(t,this.onDocumentChange))}},{key:"removeWindowResizeEvent",value:function(){var e;null===(e=this.resize)||void 0===e||e.destroy(),this.resize=null}},{key:"forceFullScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.logger.log("[client]force full screen:",e),this.layoutManager.startForceFullScreen(e)}},{key:"getBasicInfo",value:function(e,t){return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.setCallInfo(e),r.prev=1,r.next=4,this.auth.getUserInfo(t);case 4:this.meetingControl.reportPollingCapability(),this.getServerConfig(),r.next=11;break;case 8:return r.prev=8,r.t0=r.catch(1),r.abrupt("return",Promise.reject(r.t0));case 11:return r.abrupt("return",gt("XYSDK:950120"));case 12:case"end":return r.stop()}}),r,this,[[1,8]])})))}},{key:"refreshToken",value:function(e){return this.action.refreshToken(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.socketManager.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.render.clearVideoManagersUseMonitorList(e),this.socketManager.sendSocketMessage({type:"STOP_MONITOR",uriList:e}))}},{key:"subscribeBulkRoster",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.invite.callIndex){e.next=7;break}return t=this.invite,r=t.callerUri,n=t.meetingId,this.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:n,endpointId:r,type:"subscribeBulkRoster"}}),this.isSubscribeBulkRoster=!0,e.abrupt("return",gt("XYSDK:950120",!0));case 7:return e.abrupt("return",Promise.reject(gt("XYSDK:950301","subscribeBulkRoster")));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"startTranslation",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[client] startTranslation"),!this.invite.callIndex){e.next=8;break}return t=this.invite,r=t.callerUri,n=t.meetingId,this.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:n,endpointId:r,type:"subscribeTranslation",operation:1}}),this.isSubscribeTranslation=!0,e.abrupt("return",gt("XYSDK:950120",!0));case 8:return e.abrupt("return",Promise.reject(gt("XYSDK:950301","startTranslation")));case 9:case"end":return e.stop()}}),e,this)})))}},{key:"stopTranslation",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.log("[client] stopTranslation"),!this.invite.callIndex){e.next=8;break}return t=this.invite,r=t.callerUri,n=t.meetingId,this.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:n,endpointId:r,type:"subscribeTranslation",operation:2}}),this.isSubscribeTranslation=!1,e.abrupt("return",gt("XYSDK:950120",!0));case 8:return e.abrupt("return",Promise.reject(gt("XYSDK:950301","stopTranslation")));case 9:case"end":return e.stop()}}),e,this)})))}},{key:"setTranslationLanguage",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){var r,n,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[client] setTranslationLanguage:",e),!this.invite.callIndex){t.next=8;break}return r=this.invite,n=r.callerUri,i=r.meetingId,e=vr.includes(e)?e:"English",this.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:{meetingId:i,endpointId:n,language:e,type:"setTranslationLanguage"}}),t.abrupt("return",gt("XYSDK:950120",!0));case 8:return t.abrupt("return",Promise.reject(gt("XYSDK:950301","setTranslationLanguage")));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"startCloudRecord",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.meeting.getRecordPermission(),this.logger.log("[client]Start cloud record:",t),r=t.authorize,n=this.invite.remoteUri,r){e.next=6;break}return e.abrupt("return",Promise.reject(gt("XYSDK:953902")));case 6:return this.socketManager.sendSocketMessage({type:"START_RECORD",remoteUri:n}),e.abrupt("return",gt("XYSDK:950120"));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"stopCloudRecord",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[client] stop record"),e.prev=1,e.abrupt("return",this.meetingControl.stopCloudRecord());case 5:return e.prev=5,e.t0=e.catch(1),e.abrupt("return",Promise.reject(e.t0));case 8:case"end":return e.stop()}}),e,this,[[1,5]])})))}},{key:"updateLayoutSize",value:function(){this.onDocumentChange()}},{key:"bindTrackGroup",value:function(e,t){var r;if(this.logger.log("[client]bind track group: ",{trackType:e,mediagroupId:t}),!mt.isString(e)||!mt.isNumber(t))return this.logger.warn("params type error"),gt("XYSDK:950101",{trackType:e,mediagroupId:t});var n=this.invite,i=n.callerUri,o=n.meetingId,a={grpId:t,mediaStreamId:""};if(this.stream){var s=this.stream.getNormalStreamConfig(M.AUDIO);s&&(a.mediaStreamId=(null===(r=s.stream)||void 0===r?void 0:r.id)||"")}return this.socketManager.sendSocketMessage({type:"PASS_THROUGH",body:{type:"bindAudioTrack",conferenceId:o,endpointId:i,bindinfo:a}}),gt("XYSDK:950120")}},{key:"startMonitorGroup",value:function(e){return this.mediaManager.setMonitorGroup("start",e)}},{key:"stopMonitorGroup",value:function(e){return this.mediaManager.setMonitorGroup("stop",e)}},{key:"getMeetingInviteInfo",value:function(){return this.logger.log("[invoke] get meeting invite info"),this.meeting.getMeetingInviteInfo()}},{key:"rename",value:function(e){var t=this;return this.logger.log("[invoke] rename roster name:",{newName:e}),this.meeting.rename(e,(function(){var r=t.mediaManager.getSpeakerManager();t.layoutManager.setLocalStatus({displayName:e}),null==r||r.onSpeakerListMessage()}))}},{key:"signIn",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[invoke] sign in"),e&&mt.isString(e)){t.next=3;break}return t.abrupt("return",gt("XYSDK:950101"));case 3:return t.abrupt("return",this.meetingControl.signIn(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"verifyControlPassword",value:function(e){return uc(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.log("[invoke] verify control password"),e&&mt.isString(e)){t.next=3;break}return t.abrupt("return",gt("XYSDK:950101"));case 3:return t.abrupt("return",this.verify.verifyControlPassword(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getAbility",value:function(){return this.ability.getAbilityResult()}},{key:"endAllMeeting",value:function(){return uc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.log("[invoke] end all meeting"),e.abrupt("return",this.meeting.endAllMeeting());case 2:case"end":return e.stop()}}),e,this)})))}},{key:"verifyParameter",value:function(){return uc(this,void 0,void 0,u().mark((function e(){var t,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,r=t.clientId,n=t.clientSecret,r){e.next=3;break}return e.abrupt("return",Promise.reject(gt("XYSDK:950101",{},"The clientId is must required")));case 3:if(n){e.next=5;break}return e.abrupt("return",Promise.reject(gt("XYSDK:950101",{},"The clientSecret is must required")));case 5:return e.abrupt("return",!0);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"emitError",value:function(e){this.emitMessage(Pe.ERROR,e)}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"OK",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return uc(this,void 0,void 0,u().mark((function r(){return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.logger.log("[client]xyrtc client destroy: ",{reason:e,blockSendSocket:t}),r.prev=1,r.next=4,this.stream.destroy();case 4:return r.next=6,this.close(e,t);case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(1),r.abrupt("return",Promise.reject(gt("XYSDK:950204",r.t0)));case 12:case"end":return r.stop()}}),r,this,[[1,9]])})))}},{key:"close",value:function(){var e,t,r,n,i,o,a,s,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"OK",l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return uc(this,void 0,void 0,u().mark((function h(){return u().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(!this.clientStatus){u.next=29;break}return this.clientStatus=!1,l||this.socketManager.stopCall(c),null===(e=this.peer)||void 0===e||e.destroy(),null===(t=this.qualityReport)||void 0===t||t.destroy(),this.operateQueue.clear(),this.resetInitParameter(),this.removeWindowResizeEvent(),this.removeAllListener(),null===(r=this.rosterManager)||void 0===r||r.destroy(),null===(n=this.layoutManager)||void 0===n||n.destroy(),this.mediaManager.destroy(),this.ability.destroy(),null===(i=this.resize)||void 0===i||i.destroy(),this.verify.destroy(),null===(o=this.plugin)||void 0===o||o.destroy(),this.meetingControl.destroy(),this.render.destroy(),this.clientState.destroy(),this.edu.destroy(),this.signal.destroy(),null===(a=this.devicePressure)||void 0===a||a.destroy(),this.facingMode=k.FRONT,this.featureConfig=gr,this.reconnectEntry=le.INIT,this.logger.log("xyrtc client destroy successfully"),this.socketManager.destroy(),u.next=29,null===(s=this.logger)||void 0===s?void 0:s.stop();case 29:return u.abrupt("return",!0);case 30:case"end":return u.stop()}}),h,this)})))}}],[{key:"getClientInstance",value:function(e,t){return this.instance||(this.instance=new n(e,t)),this.instance}}]),n}(vu),lc="color: #3876ff;",hc="*********************************************************",fc={clientId:"",clientSecret:"",extId:"",server:$n.host,layout:"AUTO",container:{elementId:"",offset:[0,0]},isThird:!0,isSupportHybridCloud:!1,debug:!1,checkSSL:!0,plugin:[]},dc="%c".concat(hc," \n\t\n* 欢迎使用 XYLink WebRTC SDK - 小鱼易连Web云视频 \n\t\n* 版本:").concat(zn," \n\t\n* 文档地址:https://openapi.xylink.com/common/meeting/doc/description?platform=web \n\t\n* 体验地址:https://meet.xylink.com \n\t\n* 问题反馈:https://github.com/xylink-com/xylink-rtc-demo/issues \n\t\n* 联系方式:luojinghui(luojinghui424@gmail.com) \n\n").concat(hc),pc="%c[INFO] XYLink Agent:"+navigator.userAgent+"\n",vc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},gc=function(){function t(){e(this,t)}return a(t,null,[{key:"createClient",value:function(e,r){var n=r||t.logger,i=Object.assign(Object.assign({},fc),e);return new cc(i,n)}},{key:"setLocale",value:function(e){!function(e){lt=["en_US","zh_CN","zh_TW"].find((function(t){return t.toUpperCase()===e.toUpperCase()}))||"zh_CN"}(e)}},{key:"checkSupportWebRTC",value:function(){return vc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,it.checkSupportWebRTC();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))}},{key:"checkSupportShareContent",value:function(){return vc(this,void 0,void 0,u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",it.isSupportShareContent());case 1:case"end":return e.stop()}}),e)})))}}]),t}();gc.version=zn,gc.logger=Bo.createLogger({dbName:"XYRTC_LOG",tableName:"LOG",dbVersion:20,tableCount:5}),gc.logManager=Bo,gc.createLogger=Bo.createLogger,gc.render=(console.group("小鱼易连 WebRTC SDK"),console.info(dc,lc),console.info(pc,lc),void console.groupEnd()),window.XYRTC=gc})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();