@voicenter-team/events-sdk 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voicenter-events-sdk.cjs.js +18 -18
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +9 -0
- package/dist/voicenter-events-sdk.es.js +2475 -2424
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +18 -18
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +18 -18
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(Ut,zt){typeof exports=="object"&&typeof module<"u"?zt(exports):typeof define=="function"&&define.amd?define(["exports"],zt):(Ut=typeof globalThis<"u"?globalThis:Ut||self,zt(Ut.VoicenterEventsSDK={}))})(this,function(Ut){"use strict";var
|
|
1
|
+
(function(Ut,zt){typeof exports=="object"&&typeof module<"u"?zt(exports):typeof define=="function"&&define.amd?define(["exports"],zt):(Ut=typeof globalThis<"u"?globalThis:Ut||self,zt(Ut.VoicenterEventsSDK={}))})(this,function(Ut){"use strict";var Nm=Object.defineProperty;var Bm=(Ut,zt,pn)=>zt in Ut?Nm(Ut,zt,{enumerable:!0,configurable:!0,writable:!0,value:pn}):Ut[zt]=pn;var St=(Ut,zt,pn)=>(Bm(Ut,typeof zt!="symbol"?zt+"":zt,pn),pn);var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var gs={exports:{}},ys={exports:{}};(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(n,a){return n<<a|n>>>32-a},rotr:function(n,a){return n<<32-a|n>>>a},endian:function(n){if(n.constructor==Number)return o.rotl(n,8)&16711935|o.rotl(n,24)&4278255360;for(var a=0;a<n.length;a++)n[a]=o.endian(n[a]);return n},randomBytes:function(n){for(var a=[];n>0;n--)a.push(Math.floor(Math.random()*256));return a},bytesToWords:function(n){for(var a=[],c=0,f=0;c<n.length;c++,f+=8)a[f>>>5]|=n[c]<<24-f%32;return a},wordsToBytes:function(n){for(var a=[],c=0;c<n.length*32;c+=8)a.push(n[c>>>5]>>>24-c%32&255);return a},bytesToHex:function(n){for(var a=[],c=0;c<n.length;c++)a.push((n[c]>>>4).toString(16)),a.push((n[c]&15).toString(16));return a.join("")},hexToBytes:function(n){for(var a=[],c=0;c<n.length;c+=2)a.push(parseInt(n.substr(c,2),16));return a},bytesToBase64:function(n){for(var a=[],c=0;c<n.length;c+=3)for(var f=n[c]<<16|n[c+1]<<8|n[c+2],v=0;v<4;v++)c*8+v*6<=n.length*8?a.push(r.charAt(f>>>6*(3-v)&63)):a.push("=");return a.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var a=[],c=0,f=0;c<n.length;f=++c%4)f!=0&&a.push((r.indexOf(n.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<f*2|r.indexOf(n.charAt(c))>>>6-f*2);return a}};ys.exports=o})();var Wu=ys.exports,bi={utf8:{stringToBytes:function(r){return bi.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(bi.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var o=[],n=0;n<r.length;n++)o.push(r.charCodeAt(n)&255);return o},bytesToString:function(r){for(var o=[],n=0;n<r.length;n++)o.push(String.fromCharCode(r[n]));return o.join("")}}},vs=bi;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/var Mc=function(r){return r!=null&&(ys(r)||qc(r)||!!r._isBuffer)};function ys(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function qc(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&ys(r.slice(0,0))}(function(){var r=Fc,o=gs.utf8,n=Mc,a=gs.bin,c=function(f,v){f.constructor==String?v&&v.encoding==="binary"?f=a.stringToBytes(f):f=o.stringToBytes(f):n(f)?f=Array.prototype.slice.call(f,0):!Array.isArray(f)&&f.constructor!==Uint8Array&&(f=f.toString());for(var d=r.bytesToWords(f),b=f.length*8,p=1732584193,_=-271733879,g=-1732584194,l=271733878,u=0;u<d.length;u++)d[u]=(d[u]<<8|d[u]>>>24)&16711935|(d[u]<<24|d[u]>>>8)&4278255360;d[b>>>5]|=128<<b%32,d[(b+64>>>9<<4)+14]=b;for(var w=c._ff,A=c._gg,k=c._hh,L=c._ii,u=0;u<d.length;u+=16){var Y=p,J=_,N=g,U=l;p=w(p,_,g,l,d[u+0],7,-680876936),l=w(l,p,_,g,d[u+1],12,-389564586),g=w(g,l,p,_,d[u+2],17,606105819),_=w(_,g,l,p,d[u+3],22,-1044525330),p=w(p,_,g,l,d[u+4],7,-176418897),l=w(l,p,_,g,d[u+5],12,1200080426),g=w(g,l,p,_,d[u+6],17,-1473231341),_=w(_,g,l,p,d[u+7],22,-45705983),p=w(p,_,g,l,d[u+8],7,1770035416),l=w(l,p,_,g,d[u+9],12,-1958414417),g=w(g,l,p,_,d[u+10],17,-42063),_=w(_,g,l,p,d[u+11],22,-1990404162),p=w(p,_,g,l,d[u+12],7,1804603682),l=w(l,p,_,g,d[u+13],12,-40341101),g=w(g,l,p,_,d[u+14],17,-1502002290),_=w(_,g,l,p,d[u+15],22,1236535329),p=A(p,_,g,l,d[u+1],5,-165796510),l=A(l,p,_,g,d[u+6],9,-1069501632),g=A(g,l,p,_,d[u+11],14,643717713),_=A(_,g,l,p,d[u+0],20,-373897302),p=A(p,_,g,l,d[u+5],5,-701558691),l=A(l,p,_,g,d[u+10],9,38016083),g=A(g,l,p,_,d[u+15],14,-660478335),_=A(_,g,l,p,d[u+4],20,-405537848),p=A(p,_,g,l,d[u+9],5,568446438),l=A(l,p,_,g,d[u+14],9,-1019803690),g=A(g,l,p,_,d[u+3],14,-187363961),_=A(_,g,l,p,d[u+8],20,1163531501),p=A(p,_,g,l,d[u+13],5,-1444681467),l=A(l,p,_,g,d[u+2],9,-51403784),g=A(g,l,p,_,d[u+7],14,1735328473),_=A(_,g,l,p,d[u+12],20,-1926607734),p=k(p,_,g,l,d[u+5],4,-378558),l=k(l,p,_,g,d[u+8],11,-2022574463),g=k(g,l,p,_,d[u+11],16,1839030562),_=k(_,g,l,p,d[u+14],23,-35309556),p=k(p,_,g,l,d[u+1],4,-1530992060),l=k(l,p,_,g,d[u+4],11,1272893353),g=k(g,l,p,_,d[u+7],16,-155497632),_=k(_,g,l,p,d[u+10],23,-1094730640),p=k(p,_,g,l,d[u+13],4,681279174),l=k(l,p,_,g,d[u+0],11,-358537222),g=k(g,l,p,_,d[u+3],16,-722521979),_=k(_,g,l,p,d[u+6],23,76029189),p=k(p,_,g,l,d[u+9],4,-640364487),l=k(l,p,_,g,d[u+12],11,-421815835),g=k(g,l,p,_,d[u+15],16,530742520),_=k(_,g,l,p,d[u+2],23,-995338651),p=L(p,_,g,l,d[u+0],6,-198630844),l=L(l,p,_,g,d[u+7],10,1126891415),g=L(g,l,p,_,d[u+14],15,-1416354905),_=L(_,g,l,p,d[u+5],21,-57434055),p=L(p,_,g,l,d[u+12],6,1700485571),l=L(l,p,_,g,d[u+3],10,-1894986606),g=L(g,l,p,_,d[u+10],15,-1051523),_=L(_,g,l,p,d[u+1],21,-2054922799),p=L(p,_,g,l,d[u+8],6,1873313359),l=L(l,p,_,g,d[u+15],10,-30611744),g=L(g,l,p,_,d[u+6],15,-1560198380),_=L(_,g,l,p,d[u+13],21,1309151649),p=L(p,_,g,l,d[u+4],6,-145523070),l=L(l,p,_,g,d[u+11],10,-1120210379),g=L(g,l,p,_,d[u+2],15,718787259),_=L(_,g,l,p,d[u+9],21,-343485551),p=p+Y>>>0,_=_+J>>>0,g=g+N>>>0,l=l+U>>>0}return r.endian([p,_,g,l])};c._ff=function(f,v,d,b,p,_,g){var l=f+(v&d|~v&b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._gg=function(f,v,d,b,p,_,g){var l=f+(v&b|d&~b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._hh=function(f,v,d,b,p,_,g){var l=f+(v^d^b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._ii=function(f,v,d,b,p,_,g){var l=f+(d^(v|~b))+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._blocksize=16,c._digestsize=16,ps.exports=function(f,v){if(f==null)throw new Error("Illegal argument "+f);var d=r.wordsToBytes(c(f,v));return v&&v.asBytes?d:v&&v.asString?a.bytesToString(d):r.bytesToHex(d)}})();var Wc=ps.exports;const Hc=ln(Wc);var pn=(r=>(r.MAIN="main",r.NEXT="next",r))(pn||{}),Me=(r=>(r.USER="User",r.TOKEN="Token",r))(Me||{});class Jn{static async getSessionStorageDataByKey(o,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const a=await chrome.storage.session.get(o);if(a[o])return n?JSON.parse(a[o]):a[o]}if(typeof window<"u"){const a=window.sessionStorage.getItem(o);if(a)return n?JSON.parse(a):a}}static async updateSessionStorageKey(o,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[o]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(o,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var $t=(r=>(r.INFO="INFO",r.WARN="WARN",r.ERROR="ERROR",r))($t||{});class Kc{constructor(o){St(this,"delay",1e3);St(this,"lastLoginTimestamp");St(this,"token");St(this,"storageKey");this.eventsSdkClass=o,this.eventsSdkClass=o,this.storageKey=""}async login(o){const n={token:o.token,email:o.email,password:o.password};if(this.storageKey=Hc(JSON.stringify({...o,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(Jn.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,o.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(o){const n=await Jn.getSessionStorageDataByKey(o);return n?(this.eventsSdkClass.loggerClass.log($t.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(o,n,a){let c,f,v;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),f=await this.getSettings(c.Data.AccessToken),v={...c.Data,...f}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),v={...c.Data.Socket}),this.onLoginResponse(v),await Jn.updateSessionStorageKey(n,v)}onLoginResponse(o){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),o.MonitorList&&o.MonitorList.length&&(this.eventsSdkClass.servers=[...o.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&o.URLList&&(this.eventsSdkClass.URLList=o.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${o.Client}`),o.IdentityCode&&(this.token=o.IdentityCode,this.eventsSdkClass.connect(pn.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(pn.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Me.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===Me.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let o;if(this.eventsSdkClass.options.tokenExpiry)o=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=o.getTime()-new Date().getTime()-5e3,a=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,f;if(this.eventsSdkClass.options.isNewStack){const v=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(v.Data.AccessToken),f={...v.Data,...c}}else f={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(f),await Jn.updateSessionStorageKey(this.storageKey,f)}},a)}async externalLogin(o,{password:n,token:a,email:c},f){if(!o)throw new Error("loginUrl not provided");let v;this.eventsSdkClass.options.isNewStack?f===Me.TOKEN?v=JSON.stringify({identityType:Me.TOKEN,token:a}):v=JSON.stringify({identityType:Me.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===Me.TOKEN?(v=JSON.stringify({token:a}),o=`${o}/${Me.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${Me.USER}`);try{const d=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:v});if(!d.ok&&d.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!d.ok&&d.status===401)throw new Error("Unauthorized. Invalid token provided");if(!d.ok&&d.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const b=await d.json();if(b.error)throw new Error(b.error);return b}catch(d){throw this.eventsSdkClass.loggerClass.log($t.ERROR,`External login ${o}`,d),d}}async getSettings(o){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${o}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw this.eventsSdkClass.loggerClass.log($t.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,n),n}}async refreshToken(o,n){try{return(await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(a){throw this.eventsSdkClass.loggerClass.log($t.ERROR,`Refresh token ${o}`,a),a}}}var mr={exports:{}};/**
|
|
6
|
+
*/var Hu=function(r){return r!=null&&(ms(r)||Ku(r)||!!r._isBuffer)};function ms(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Ku(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&ms(r.slice(0,0))}(function(){var r=Wu,o=vs.utf8,n=Hu,a=vs.bin,c=function(f,v){f.constructor==String?v&&v.encoding==="binary"?f=a.stringToBytes(f):f=o.stringToBytes(f):n(f)?f=Array.prototype.slice.call(f,0):!Array.isArray(f)&&f.constructor!==Uint8Array&&(f=f.toString());for(var d=r.bytesToWords(f),b=f.length*8,p=1732584193,_=-271733879,g=-1732584194,l=271733878,u=0;u<d.length;u++)d[u]=(d[u]<<8|d[u]>>>24)&16711935|(d[u]<<24|d[u]>>>8)&4278255360;d[b>>>5]|=128<<b%32,d[(b+64>>>9<<4)+14]=b;for(var w=c._ff,A=c._gg,k=c._hh,L=c._ii,u=0;u<d.length;u+=16){var Y=p,J=_,N=g,U=l;p=w(p,_,g,l,d[u+0],7,-680876936),l=w(l,p,_,g,d[u+1],12,-389564586),g=w(g,l,p,_,d[u+2],17,606105819),_=w(_,g,l,p,d[u+3],22,-1044525330),p=w(p,_,g,l,d[u+4],7,-176418897),l=w(l,p,_,g,d[u+5],12,1200080426),g=w(g,l,p,_,d[u+6],17,-1473231341),_=w(_,g,l,p,d[u+7],22,-45705983),p=w(p,_,g,l,d[u+8],7,1770035416),l=w(l,p,_,g,d[u+9],12,-1958414417),g=w(g,l,p,_,d[u+10],17,-42063),_=w(_,g,l,p,d[u+11],22,-1990404162),p=w(p,_,g,l,d[u+12],7,1804603682),l=w(l,p,_,g,d[u+13],12,-40341101),g=w(g,l,p,_,d[u+14],17,-1502002290),_=w(_,g,l,p,d[u+15],22,1236535329),p=A(p,_,g,l,d[u+1],5,-165796510),l=A(l,p,_,g,d[u+6],9,-1069501632),g=A(g,l,p,_,d[u+11],14,643717713),_=A(_,g,l,p,d[u+0],20,-373897302),p=A(p,_,g,l,d[u+5],5,-701558691),l=A(l,p,_,g,d[u+10],9,38016083),g=A(g,l,p,_,d[u+15],14,-660478335),_=A(_,g,l,p,d[u+4],20,-405537848),p=A(p,_,g,l,d[u+9],5,568446438),l=A(l,p,_,g,d[u+14],9,-1019803690),g=A(g,l,p,_,d[u+3],14,-187363961),_=A(_,g,l,p,d[u+8],20,1163531501),p=A(p,_,g,l,d[u+13],5,-1444681467),l=A(l,p,_,g,d[u+2],9,-51403784),g=A(g,l,p,_,d[u+7],14,1735328473),_=A(_,g,l,p,d[u+12],20,-1926607734),p=k(p,_,g,l,d[u+5],4,-378558),l=k(l,p,_,g,d[u+8],11,-2022574463),g=k(g,l,p,_,d[u+11],16,1839030562),_=k(_,g,l,p,d[u+14],23,-35309556),p=k(p,_,g,l,d[u+1],4,-1530992060),l=k(l,p,_,g,d[u+4],11,1272893353),g=k(g,l,p,_,d[u+7],16,-155497632),_=k(_,g,l,p,d[u+10],23,-1094730640),p=k(p,_,g,l,d[u+13],4,681279174),l=k(l,p,_,g,d[u+0],11,-358537222),g=k(g,l,p,_,d[u+3],16,-722521979),_=k(_,g,l,p,d[u+6],23,76029189),p=k(p,_,g,l,d[u+9],4,-640364487),l=k(l,p,_,g,d[u+12],11,-421815835),g=k(g,l,p,_,d[u+15],16,530742520),_=k(_,g,l,p,d[u+2],23,-995338651),p=L(p,_,g,l,d[u+0],6,-198630844),l=L(l,p,_,g,d[u+7],10,1126891415),g=L(g,l,p,_,d[u+14],15,-1416354905),_=L(_,g,l,p,d[u+5],21,-57434055),p=L(p,_,g,l,d[u+12],6,1700485571),l=L(l,p,_,g,d[u+3],10,-1894986606),g=L(g,l,p,_,d[u+10],15,-1051523),_=L(_,g,l,p,d[u+1],21,-2054922799),p=L(p,_,g,l,d[u+8],6,1873313359),l=L(l,p,_,g,d[u+15],10,-30611744),g=L(g,l,p,_,d[u+6],15,-1560198380),_=L(_,g,l,p,d[u+13],21,1309151649),p=L(p,_,g,l,d[u+4],6,-145523070),l=L(l,p,_,g,d[u+11],10,-1120210379),g=L(g,l,p,_,d[u+2],15,718787259),_=L(_,g,l,p,d[u+9],21,-343485551),p=p+Y>>>0,_=_+J>>>0,g=g+N>>>0,l=l+U>>>0}return r.endian([p,_,g,l])};c._ff=function(f,v,d,b,p,_,g){var l=f+(v&d|~v&b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._gg=function(f,v,d,b,p,_,g){var l=f+(v&b|d&~b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._hh=function(f,v,d,b,p,_,g){var l=f+(v^d^b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._ii=function(f,v,d,b,p,_,g){var l=f+(d^(v|~b))+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._blocksize=16,c._digestsize=16,gs.exports=function(f,v){if(f==null)throw new Error("Illegal argument "+f);var d=r.wordsToBytes(c(f,v));return v&&v.asBytes?d:v&&v.asString?a.bytesToString(d):r.bytesToHex(d)}})();var zu=gs.exports;const Xu=pn(zu);var dn=(r=>(r.MAIN="main",r.NEXT="next",r))(dn||{}),qe=(r=>(r.USER="User",r.TOKEN="Token",r))(qe||{});class jn{static async getSessionStorageDataByKey(o,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const a=await chrome.storage.session.get(o);if(a[o])return n?JSON.parse(a[o]):a[o]}if(typeof window<"u"){const a=window.sessionStorage.getItem(o);if(a)return n?JSON.parse(a):a}}static async updateSessionStorageKey(o,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[o]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(o,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var Jt=(r=>(r.INFO="INFO",r.WARN="WARN",r.ERROR="ERROR",r))(Jt||{});class Gu{constructor(o){St(this,"delay",1e3);St(this,"lastLoginTimestamp");St(this,"token");St(this,"storageKey");this.eventsSdkClass=o,this.eventsSdkClass=o,this.storageKey=""}async login(o){const n={token:o.token,email:o.email,password:o.password};if(this.storageKey=Xu(JSON.stringify({...o,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(jn.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,o.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(o){const n=await jn.getSessionStorageDataByKey(o);return n?(this.eventsSdkClass.loggerClass.log(Jt.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(o,n,a){let c,f,v;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),f=await this.getSettings(c.Data.AccessToken),v={...c.Data,...f}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),v={...c.Data.Socket}),this.onLoginResponse(v),await jn.updateSessionStorageKey(n,v)}onLoginResponse(o){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),o.MonitorList&&o.MonitorList.length&&(this.eventsSdkClass.servers=[...o.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&o.URLList&&(this.eventsSdkClass.URLList=o.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${o.Client}`),o.IdentityCode&&(this.token=o.IdentityCode,this.eventsSdkClass.connect(dn.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(dn.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===qe.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===qe.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let o;if(this.eventsSdkClass.options.tokenExpiry)o=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=o.getTime()-new Date().getTime()-5e3,a=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,f;if(this.eventsSdkClass.options.isNewStack){const v=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(v.Data.AccessToken),f={...v.Data,...c}}else f={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(f),await jn.updateSessionStorageKey(this.storageKey,f)}},a)}async externalLogin(o,{password:n,token:a,email:c},f){if(!o)throw new Error("loginUrl not provided");let v;this.eventsSdkClass.options.isNewStack?f===qe.TOKEN?v=JSON.stringify({identityType:qe.TOKEN,token:a}):v=JSON.stringify({identityType:qe.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===qe.TOKEN?(v=JSON.stringify({token:a}),o=`${o}/${qe.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${qe.USER}`);try{const d=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:v});if(!d.ok&&d.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!d.ok&&d.status===401)throw new Error("Unauthorized. Invalid token provided");if(!d.ok&&d.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const b=await d.json();if(b.error)throw new Error(b.error);return b}catch(d){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`External login ${o}`,d),d}}async getSettings(o){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${o}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,n),n}}async refreshToken(o,n){try{return(await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(a){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Refresh token ${o}`,a),a}}}var _r={exports:{}};/**
|
|
7
7
|
* @license
|
|
8
8
|
* Lodash <https://lodash.com/>
|
|
9
9
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
10
10
|
* Released under MIT license <https://lodash.com/license>
|
|
11
11
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
12
12
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
13
|
-
*/mr.exports,function(r,o){(function(){var n,a="4.17.21",c=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",d="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",p=500,_="__lodash_placeholder__",g=1,l=2,u=4,w=1,A=2,k=1,L=2,Y=4,J=8,N=16,U=32,T=64,I=128,P=256,R=512,B=30,H="...",z=800,G=16,F=1,pt=2,ut=3,xt=1/0,ct=9007199254740991,jt=17976931348623157e292,Be=NaN,ce=4294967295,Or=ce-1,$=ce>>>1,Q=[["ary",I],["bind",k],["bindKey",L],["curry",J],["curryRight",N],["flip",R],["partial",U],["partialRight",T],["rearg",P]],X="[object Arguments]",rt="[object Array]",K="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",Yt="[object GeneratorFunction]",It="[object Map]",Ee="[object Number]",Qn="[object Null]",fe="[object Object]",Nn="[object Promise]",tr="[object Proxy]",Qt="[object RegExp]",te="[object Set]",Le="[object String]",Ue="[object Symbol]",er="[object Undefined]",We="[object WeakMap]",nr="[object WeakSet]",en="[object ArrayBuffer]",Bn="[object DataView]",Xi="[object Float32Array]",Gi="[object Float64Array]",$i="[object Int8Array]",Ji="[object Int16Array]",ji="[object Int32Array]",Yi="[object Uint8Array]",Vi="[object Uint8ClampedArray]",Zi="[object Uint16Array]",Qi="[object Uint32Array]",Xh=/\b__p \+= '';/g,Gh=/\b(__p \+=) '' \+/g,$h=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ca=/&(?:amp|lt|gt|quot|#39);/g,fa=/[&<>"']/g,Jh=RegExp(ca.source),jh=RegExp(fa.source),Yh=/<%-([\s\S]+?)%>/g,Vh=/<%([\s\S]+?)%>/g,ha=/<%=([\s\S]+?)%>/g,Zh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qh=/^\w*$/,tl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,to=/[\\^$.*+?()[\]{}|]/g,el=RegExp(to.source),eo=/^\s+/,nl=/\s/,rl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,ol=/,? & /,sl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,al=/[()=,{}\[\]\/\s]/,ul=/\\(\\)?/g,cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,la=/\w*$/,fl=/^[-+]0x[0-9a-f]+$/i,hl=/^0b[01]+$/i,ll=/^\[object .+?Constructor\]$/,pl=/^0o[0-7]+$/i,dl=/^(?:0|[1-9]\d*)$/,gl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,yl=/['\n\r\u2028\u2029\\]/g,Nr="\\ud800-\\udfff",vl="\\u0300-\\u036f",ml="\\ufe20-\\ufe2f",_l="\\u20d0-\\u20ff",pa=vl+ml+_l,da="\\u2700-\\u27bf",ga="a-z\\xdf-\\xf6\\xf8-\\xff",wl="\\xac\\xb1\\xd7\\xf7",bl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cl="\\u2000-\\u206f",Sl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ya="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",ma=wl+bl+Cl+Sl,no="['’]",kl="["+Nr+"]",_a="["+ma+"]",Br="["+pa+"]",wa="\\d+",Al="["+da+"]",ba="["+ga+"]",Ca="[^"+Nr+ma+wa+da+ga+ya+"]",ro="\\ud83c[\\udffb-\\udfff]",xl="(?:"+Br+"|"+ro+")",Sa="[^"+Nr+"]",io="(?:\\ud83c[\\udde6-\\uddff]){2}",oo="[\\ud800-\\udbff][\\udc00-\\udfff]",Ln="["+ya+"]",ka="\\u200d",Aa="(?:"+ba+"|"+Ca+")",El="(?:"+Ln+"|"+Ca+")",xa="(?:"+no+"(?:d|ll|m|re|s|t|ve))?",Ea="(?:"+no+"(?:D|LL|M|RE|S|T|VE))?",Ta=xl+"?",Ra="["+va+"]?",Tl="(?:"+ka+"(?:"+[Sa,io,oo].join("|")+")"+Ra+Ta+")*",Rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ol="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oa=Ra+Ta+Tl,Il="(?:"+[Al,io,oo].join("|")+")"+Oa,Nl="(?:"+[Sa+Br+"?",Br,io,oo,kl].join("|")+")",Bl=RegExp(no,"g"),Ll=RegExp(Br,"g"),so=RegExp(ro+"(?="+ro+")|"+Nl+Oa,"g"),Ul=RegExp([Ln+"?"+ba+"+"+xa+"(?="+[_a,Ln,"$"].join("|")+")",El+"+"+Ea+"(?="+[_a,Ln+Aa,"$"].join("|")+")",Ln+"?"+Aa+"+"+xa,Ln+"+"+Ea,Ol,Rl,wa,Il].join("|"),"g"),Dl=RegExp("["+ka+Nr+pa+va+"]"),Pl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ml=-1,Ot={};Ot[Xi]=Ot[Gi]=Ot[$i]=Ot[Ji]=Ot[ji]=Ot[Yi]=Ot[Vi]=Ot[Zi]=Ot[Qi]=!0,Ot[X]=Ot[rt]=Ot[en]=Ot[et]=Ot[Bn]=Ot[nt]=Ot[at]=Ot[kt]=Ot[It]=Ot[Ee]=Ot[fe]=Ot[Qt]=Ot[te]=Ot[Le]=Ot[We]=!1;var Rt={};Rt[X]=Rt[rt]=Rt[en]=Rt[Bn]=Rt[et]=Rt[nt]=Rt[Xi]=Rt[Gi]=Rt[$i]=Rt[Ji]=Rt[ji]=Rt[It]=Rt[Ee]=Rt[fe]=Rt[Qt]=Rt[te]=Rt[Le]=Rt[Ue]=Rt[Yi]=Rt[Vi]=Rt[Zi]=Rt[Qi]=!0,Rt[at]=Rt[kt]=Rt[We]=!1;var ql={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Wl={"&":"&","<":"<",">":">",'"':""","'":"'"},Hl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Kl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},zl=parseFloat,Xl=parseInt,Ia=typeof zt=="object"&&zt&&zt.Object===Object&&zt,Gl=typeof self=="object"&&self&&self.Object===Object&&self,Xt=Ia||Gl||Function("return this")(),ao=o&&!o.nodeType&&o,gn=ao&&!0&&r&&!r.nodeType&&r,Na=gn&&gn.exports===ao,uo=Na&&Ia.process,me=function(){try{var x=gn&&gn.require&&gn.require("util").types;return x||uo&&uo.binding&&uo.binding("util")}catch{}}(),Ba=me&&me.isArrayBuffer,La=me&&me.isDate,Ua=me&&me.isMap,Da=me&&me.isRegExp,Pa=me&&me.isSet,Fa=me&&me.isTypedArray;function he(x,D,O){switch(O.length){case 0:return x.call(D);case 1:return x.call(D,O[0]);case 2:return x.call(D,O[0],O[1]);case 3:return x.call(D,O[0],O[1],O[2])}return x.apply(D,O)}function $l(x,D,O,V){for(var ft=-1,Ct=x==null?0:x.length;++ft<Ct;){var qt=x[ft];D(V,qt,O(qt),x)}return V}function _e(x,D){for(var O=-1,V=x==null?0:x.length;++O<V&&D(x[O],O,x)!==!1;);return x}function Jl(x,D){for(var O=x==null?0:x.length;O--&&D(x[O],O,x)!==!1;);return x}function Ma(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(!D(x[O],O,x))return!1;return!0}function nn(x,D){for(var O=-1,V=x==null?0:x.length,ft=0,Ct=[];++O<V;){var qt=x[O];D(qt,O,x)&&(Ct[ft++]=qt)}return Ct}function Lr(x,D){var O=x==null?0:x.length;return!!O&&Un(x,D,0)>-1}function co(x,D,O){for(var V=-1,ft=x==null?0:x.length;++V<ft;)if(O(D,x[V]))return!0;return!1}function Nt(x,D){for(var O=-1,V=x==null?0:x.length,ft=Array(V);++O<V;)ft[O]=D(x[O],O,x);return ft}function rn(x,D){for(var O=-1,V=D.length,ft=x.length;++O<V;)x[ft+O]=D[O];return x}function fo(x,D,O,V){var ft=-1,Ct=x==null?0:x.length;for(V&&Ct&&(O=x[++ft]);++ft<Ct;)O=D(O,x[ft],ft,x);return O}function jl(x,D,O,V){var ft=x==null?0:x.length;for(V&&ft&&(O=x[--ft]);ft--;)O=D(O,x[ft],ft,x);return O}function ho(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(D(x[O],O,x))return!0;return!1}var Yl=lo("length");function Vl(x){return x.split("")}function Zl(x){return x.match(sl)||[]}function qa(x,D,O){var V;return O(x,function(ft,Ct,qt){if(D(ft,Ct,qt))return V=Ct,!1}),V}function Ur(x,D,O,V){for(var ft=x.length,Ct=O+(V?1:-1);V?Ct--:++Ct<ft;)if(D(x[Ct],Ct,x))return Ct;return-1}function Un(x,D,O){return D===D?fp(x,D,O):Ur(x,Wa,O)}function Ql(x,D,O,V){for(var ft=O-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function Wa(x){return x!==x}function Ha(x,D){var O=x==null?0:x.length;return O?go(x,D)/O:Be}function lo(x){return function(D){return D==null?n:D[x]}}function po(x){return function(D){return x==null?n:x[D]}}function Ka(x,D,O,V,ft){return ft(x,function(Ct,qt,Tt){O=V?(V=!1,Ct):D(O,Ct,qt,Tt)}),O}function tp(x,D){var O=x.length;for(x.sort(D);O--;)x[O]=x[O].value;return x}function go(x,D){for(var O,V=-1,ft=x.length;++V<ft;){var Ct=D(x[V]);Ct!==n&&(O=O===n?Ct:O+Ct)}return O}function yo(x,D){for(var O=-1,V=Array(x);++O<x;)V[O]=D(O);return V}function ep(x,D){return Nt(D,function(O){return[O,x[O]]})}function za(x){return x&&x.slice(0,Ja(x)+1).replace(eo,"")}function le(x){return function(D){return x(D)}}function vo(x,D){return Nt(D,function(O){return x[O]})}function rr(x,D){return x.has(D)}function Xa(x,D){for(var O=-1,V=x.length;++O<V&&Un(D,x[O],0)>-1;);return O}function Ga(x,D){for(var O=x.length;O--&&Un(D,x[O],0)>-1;);return O}function np(x,D){for(var O=x.length,V=0;O--;)x[O]===D&&++V;return V}var rp=po(ql),ip=po(Wl);function op(x){return"\\"+Kl[x]}function sp(x,D){return x==null?n:x[D]}function Dn(x){return Dl.test(x)}function ap(x){return Pl.test(x)}function up(x){for(var D,O=[];!(D=x.next()).done;)O.push(D.value);return O}function mo(x){var D=-1,O=Array(x.size);return x.forEach(function(V,ft){O[++D]=[ft,V]}),O}function $a(x,D){return function(O){return x(D(O))}}function on(x,D){for(var O=-1,V=x.length,ft=0,Ct=[];++O<V;){var qt=x[O];(qt===D||qt===_)&&(x[O]=_,Ct[ft++]=O)}return Ct}function Dr(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=V}),O}function cp(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function fp(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function hp(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function Pn(x){return Dn(x)?pp(x):Yl(x)}function Te(x){return Dn(x)?dp(x):Vl(x)}function Ja(x){for(var D=x.length;D--&&nl.test(x.charAt(D)););return D}var lp=po(Hl);function pp(x){for(var D=so.lastIndex=0;so.test(x);)++D;return D}function dp(x){return x.match(so)||[]}function gp(x){return x.match(Ul)||[]}var yp=function x(D){D=D==null?Xt:Fn.defaults(Xt.Object(),D,Fn.pick(Xt,Fl));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,qt=D.Math,Tt=D.Object,_o=D.RegExp,vp=D.String,we=D.TypeError,Pr=O.prototype,mp=Ct.prototype,Mn=Tt.prototype,Fr=D["__core-js_shared__"],Mr=mp.toString,Et=Mn.hasOwnProperty,_p=0,ja=function(){var t=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),qr=Mn.toString,wp=Mr.call(Tt),bp=Xt._,Cp=_o("^"+Mr.call(Et).replace(to,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wr=Na?D.Buffer:n,sn=D.Symbol,Hr=D.Uint8Array,Ya=Wr?Wr.allocUnsafe:n,Kr=$a(Tt.getPrototypeOf,Tt),Va=Tt.create,Za=Mn.propertyIsEnumerable,zr=Pr.splice,Qa=sn?sn.isConcatSpreadable:n,ir=sn?sn.iterator:n,yn=sn?sn.toStringTag:n,Xr=function(){try{var t=bn(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),Sp=D.clearTimeout!==Xt.clearTimeout&&D.clearTimeout,kp=V&&V.now!==Xt.Date.now&&V.now,Ap=D.setTimeout!==Xt.setTimeout&&D.setTimeout,Gr=qt.ceil,$r=qt.floor,wo=Tt.getOwnPropertySymbols,xp=Wr?Wr.isBuffer:n,tu=D.isFinite,Ep=Pr.join,Tp=$a(Tt.keys,Tt),Wt=qt.max,Vt=qt.min,Rp=V.now,Op=D.parseInt,eu=qt.random,Ip=Pr.reverse,bo=bn(D,"DataView"),or=bn(D,"Map"),Co=bn(D,"Promise"),qn=bn(D,"Set"),sr=bn(D,"WeakMap"),ar=bn(Tt,"create"),Jr=sr&&new sr,Wn={},Np=Cn(bo),Bp=Cn(or),Lp=Cn(Co),Up=Cn(qn),Dp=Cn(sr),jr=sn?sn.prototype:n,ur=jr?jr.valueOf:n,nu=jr?jr.toString:n;function y(t){if(Lt(t)&&!lt(t)&&!(t instanceof mt)){if(t instanceof be)return t;if(Et.call(t,"__wrapped__"))return rc(t)}return new be(t)}var Hn=function(){function t(){}return function(e){if(!Bt(e))return{};if(Va)return Va(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function Yr(){}function be(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:Yh,evaluate:Vh,interpolate:ha,variable:"",imports:{_:y}},y.prototype=Yr.prototype,y.prototype.constructor=y,be.prototype=Hn(Yr.prototype),be.prototype.constructor=be;function mt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ce,this.__views__=[]}function Pp(){var t=new mt(this.__wrapped__);return t.__actions__=oe(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=oe(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=oe(this.__views__),t}function Fp(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Mp(){var t=this.__wrapped__.value(),e=this.__dir__,i=lt(t),s=e<0,h=i?t.length:0,m=Vd(0,h,this.__views__),C=m.start,S=m.end,E=S-C,M=s?S:C-1,q=this.__iteratees__,W=q.length,j=0,tt=Vt(E,this.__takeCount__);if(!i||!s&&h==E&&tt==E)return xu(t,this.__actions__);var ot=[];t:for(;E--&&j<tt;){M+=e;for(var gt=-1,st=t[M];++gt<W;){var vt=q[gt],wt=vt.iteratee,ge=vt.type,re=wt(st);if(ge==pt)st=re;else if(!re){if(ge==F)continue t;break t}}ot[j++]=st}return ot}mt.prototype=Hn(Yr.prototype),mt.prototype.constructor=mt;function vn(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function qp(){this.__data__=ar?ar(null):{},this.size=0}function Wp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Hp(t){var e=this.__data__;if(ar){var i=e[t];return i===b?n:i}return Et.call(e,t)?e[t]:n}function Kp(t){var e=this.__data__;return ar?e[t]!==n:Et.call(e,t)}function zp(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=ar&&e===n?b:e,this}vn.prototype.clear=qp,vn.prototype.delete=Wp,vn.prototype.get=Hp,vn.prototype.has=Kp,vn.prototype.set=zp;function He(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Xp(){this.__data__=[],this.size=0}function Gp(t){var e=this.__data__,i=Vr(e,t);if(i<0)return!1;var s=e.length-1;return i==s?e.pop():zr.call(e,i,1),--this.size,!0}function $p(t){var e=this.__data__,i=Vr(e,t);return i<0?n:e[i][1]}function Jp(t){return Vr(this.__data__,t)>-1}function jp(t,e){var i=this.__data__,s=Vr(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}He.prototype.clear=Xp,He.prototype.delete=Gp,He.prototype.get=$p,He.prototype.has=Jp,He.prototype.set=jp;function Ke(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Yp(){this.size=0,this.__data__={hash:new vn,map:new(or||He),string:new vn}}function Vp(t){var e=ci(this,t).delete(t);return this.size-=e?1:0,e}function Zp(t){return ci(this,t).get(t)}function Qp(t){return ci(this,t).has(t)}function td(t,e){var i=ci(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this}Ke.prototype.clear=Yp,Ke.prototype.delete=Vp,Ke.prototype.get=Zp,Ke.prototype.has=Qp,Ke.prototype.set=td;function mn(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new Ke;++e<i;)this.add(t[e])}function ed(t){return this.__data__.set(t,b),this}function nd(t){return this.__data__.has(t)}mn.prototype.add=mn.prototype.push=ed,mn.prototype.has=nd;function Re(t){var e=this.__data__=new He(t);this.size=e.size}function rd(){this.__data__=new He,this.size=0}function id(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function od(t){return this.__data__.get(t)}function sd(t){return this.__data__.has(t)}function ad(t,e){var i=this.__data__;if(i instanceof He){var s=i.__data__;if(!or||s.length<c-1)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new Ke(s)}return i.set(t,e),this.size=i.size,this}Re.prototype.clear=rd,Re.prototype.delete=id,Re.prototype.get=od,Re.prototype.has=sd,Re.prototype.set=ad;function ru(t,e){var i=lt(t),s=!i&&Sn(t),h=!i&&!s&&hn(t),m=!i&&!s&&!h&&Gn(t),C=i||s||h||m,S=C?yo(t.length,vp):[],E=S.length;for(var M in t)(e||Et.call(t,M))&&!(C&&(M=="length"||h&&(M=="offset"||M=="parent")||m&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||$e(M,E)))&&S.push(M);return S}function iu(t){var e=t.length;return e?t[Bo(0,e-1)]:n}function ud(t,e){return fi(oe(t),_n(e,0,t.length))}function cd(t){return fi(oe(t))}function So(t,e,i){(i!==n&&!Oe(t[e],i)||i===n&&!(e in t))&&ze(t,e,i)}function cr(t,e,i){var s=t[e];(!(Et.call(t,e)&&Oe(s,i))||i===n&&!(e in t))&&ze(t,e,i)}function Vr(t,e){for(var i=t.length;i--;)if(Oe(t[i][0],e))return i;return-1}function fd(t,e,i,s){return an(t,function(h,m,C){e(s,h,i(h),C)}),s}function ou(t,e){return t&&Pe(e,Kt(e),t)}function hd(t,e){return t&&Pe(e,ae(e),t)}function ze(t,e,i){e=="__proto__"&&Xr?Xr(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function ko(t,e){for(var i=-1,s=e.length,h=O(s),m=t==null;++i<s;)h[i]=m?n:is(t,e[i]);return h}function _n(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function Ce(t,e,i,s,h,m){var C,S=e&g,E=e&l,M=e&u;if(i&&(C=h?i(t,s,h,m):i(t)),C!==n)return C;if(!Bt(t))return t;var q=lt(t);if(q){if(C=Qd(t),!S)return oe(t,C)}else{var W=Zt(t),j=W==kt||W==Yt;if(hn(t))return Ru(t,S);if(W==fe||W==X||j&&!h){if(C=E||j?{}:Ju(t),!S)return E?Hd(t,hd(C,t)):Wd(t,ou(C,t))}else{if(!Rt[W])return h?t:{};C=tg(t,W,S)}}m||(m=new Re);var tt=m.get(t);if(tt)return tt;m.set(t,C),Sc(t)?t.forEach(function(st){C.add(Ce(st,e,i,st,t,m))}):bc(t)&&t.forEach(function(st,vt){C.set(vt,Ce(st,e,i,vt,t,m))});var ot=M?E?zo:Ko:E?ae:Kt,gt=q?n:ot(t);return _e(gt||t,function(st,vt){gt&&(vt=st,st=t[vt]),cr(C,vt,Ce(st,e,i,vt,t,m))}),C}function ld(t){var e=Kt(t);return function(i){return su(i,t,e)}}function su(t,e,i){var s=i.length;if(t==null)return!s;for(t=Tt(t);s--;){var h=i[s],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function au(t,e,i){if(typeof t!="function")throw new we(v);return yr(function(){t.apply(n,i)},e)}function fr(t,e,i,s){var h=-1,m=Lr,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;i&&(e=Nt(e,le(i))),s?(m=co,C=!1):e.length>=c&&(m=rr,C=!1,e=new mn(e));t:for(;++h<S;){var q=t[h],W=i==null?q:i(q);if(q=s||q!==0?q:0,C&&W===W){for(var j=M;j--;)if(e[j]===W)continue t;E.push(q)}else m(e,W,s)||E.push(q)}return E}var an=Lu(De),uu=Lu(xo,!0);function pd(t,e){var i=!0;return an(t,function(s,h,m){return i=!!e(s,h,m),i}),i}function Zr(t,e,i){for(var s=-1,h=t.length;++s<h;){var m=t[s],C=e(m);if(C!=null&&(S===n?C===C&&!de(C):i(C,S)))var S=C,E=m}return E}function dd(t,e,i,s){var h=t.length;for(i=dt(i),i<0&&(i=-i>h?0:h+i),s=s===n||s>h?h:dt(s),s<0&&(s+=h),s=i>s?0:Ac(s);i<s;)t[i++]=e;return t}function cu(t,e){var i=[];return an(t,function(s,h,m){e(s,h,m)&&i.push(s)}),i}function Gt(t,e,i,s,h){var m=-1,C=t.length;for(i||(i=ng),h||(h=[]);++m<C;){var S=t[m];e>0&&i(S)?e>1?Gt(S,e-1,i,s,h):rn(h,S):s||(h[h.length]=S)}return h}var Ao=Uu(),fu=Uu(!0);function De(t,e){return t&&Ao(t,e,Kt)}function xo(t,e){return t&&fu(t,e,Kt)}function Qr(t,e){return nn(e,function(i){return Je(t[i])})}function wn(t,e){e=cn(e,t);for(var i=0,s=e.length;t!=null&&i<s;)t=t[Fe(e[i++])];return i&&i==s?t:n}function hu(t,e,i){var s=e(t);return lt(t)?s:rn(s,i(t))}function ee(t){return t==null?t===n?er:Qn:yn&&yn in Tt(t)?Yd(t):cg(t)}function Eo(t,e){return t>e}function gd(t,e){return t!=null&&Et.call(t,e)}function yd(t,e){return t!=null&&e in Tt(t)}function vd(t,e,i){return t>=Vt(e,i)&&t<Wt(e,i)}function To(t,e,i){for(var s=i?co:Lr,h=t[0].length,m=t.length,C=m,S=O(m),E=1/0,M=[];C--;){var q=t[C];C&&e&&(q=Nt(q,le(e))),E=Vt(q.length,E),S[C]=!i&&(e||h>=120&&q.length>=120)?new mn(C&&q):n}q=t[0];var W=-1,j=S[0];t:for(;++W<h&&M.length<E;){var tt=q[W],ot=e?e(tt):tt;if(tt=i||tt!==0?tt:0,!(j?rr(j,ot):s(M,ot,i))){for(C=m;--C;){var gt=S[C];if(!(gt?rr(gt,ot):s(t[C],ot,i)))continue t}j&&j.push(ot),M.push(tt)}}return M}function md(t,e,i,s){return De(t,function(h,m,C){e(s,i(h),m,C)}),s}function hr(t,e,i){e=cn(e,t),t=Zu(t,e);var s=t==null?t:t[Fe(ke(e))];return s==null?n:he(s,t,i)}function lu(t){return Lt(t)&&ee(t)==X}function _d(t){return Lt(t)&&ee(t)==en}function wd(t){return Lt(t)&&ee(t)==nt}function lr(t,e,i,s,h){return t===e?!0:t==null||e==null||!Lt(t)&&!Lt(e)?t!==t&&e!==e:bd(t,e,i,s,lr,h)}function bd(t,e,i,s,h,m){var C=lt(t),S=lt(e),E=C?rt:Zt(t),M=S?rt:Zt(e);E=E==X?fe:E,M=M==X?fe:M;var q=E==fe,W=M==fe,j=E==M;if(j&&hn(t)){if(!hn(e))return!1;C=!0,q=!1}if(j&&!q)return m||(m=new Re),C||Gn(t)?Xu(t,e,i,s,h,m):Jd(t,e,E,i,s,h,m);if(!(i&w)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var gt=tt?t.value():t,st=ot?e.value():e;return m||(m=new Re),h(gt,st,i,s,m)}}return j?(m||(m=new Re),jd(t,e,i,s,h,m)):!1}function Cd(t){return Lt(t)&&Zt(t)==It}function Ro(t,e,i,s){var h=i.length,m=h,C=!s;if(t==null)return!m;for(t=Tt(t);h--;){var S=i[h];if(C&&S[2]?S[1]!==t[S[0]]:!(S[0]in t))return!1}for(;++h<m;){S=i[h];var E=S[0],M=t[E],q=S[1];if(C&&S[2]){if(M===n&&!(E in t))return!1}else{var W=new Re;if(s)var j=s(M,q,E,t,e,W);if(!(j===n?lr(q,M,w|A,s,W):j))return!1}}return!0}function pu(t){if(!Bt(t)||ig(t))return!1;var e=Je(t)?Cp:ll;return e.test(Cn(t))}function Sd(t){return Lt(t)&&ee(t)==Qt}function kd(t){return Lt(t)&&Zt(t)==te}function Ad(t){return Lt(t)&&yi(t.length)&&!!Ot[ee(t)]}function du(t){return typeof t=="function"?t:t==null?ue:typeof t=="object"?lt(t)?vu(t[0],t[1]):yu(t):Dc(t)}function Oo(t){if(!gr(t))return Tp(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function xd(t){if(!Bt(t))return ug(t);var e=gr(t),i=[];for(var s in t)s=="constructor"&&(e||!Et.call(t,s))||i.push(s);return i}function Io(t,e){return t<e}function gu(t,e){var i=-1,s=se(t)?O(t.length):[];return an(t,function(h,m,C){s[++i]=e(h,m,C)}),s}function yu(t){var e=Go(t);return e.length==1&&e[0][2]?Yu(e[0][0],e[0][1]):function(i){return i===t||Ro(i,t,e)}}function vu(t,e){return Jo(t)&&ju(e)?Yu(Fe(t),e):function(i){var s=is(i,t);return s===n&&s===e?os(i,t):lr(e,s,w|A)}}function ti(t,e,i,s,h){t!==e&&Ao(e,function(m,C){if(h||(h=new Re),Bt(m))Ed(t,e,C,i,ti,s,h);else{var S=s?s(Yo(t,C),m,C+"",t,e,h):n;S===n&&(S=m),So(t,C,S)}},ae)}function Ed(t,e,i,s,h,m,C){var S=Yo(t,i),E=Yo(e,i),M=C.get(E);if(M){So(t,i,M);return}var q=m?m(S,E,i+"",t,e,C):n,W=q===n;if(W){var j=lt(E),tt=!j&&hn(E),ot=!j&&!tt&&Gn(E);q=E,j||tt||ot?lt(S)?q=S:Dt(S)?q=oe(S):tt?(W=!1,q=Ru(E,!0)):ot?(W=!1,q=Ou(E,!0)):q=[]:vr(E)||Sn(E)?(q=S,Sn(S)?q=xc(S):(!Bt(S)||Je(S))&&(q=Ju(E))):W=!1}W&&(C.set(E,q),h(q,E,s,m,C),C.delete(E)),So(t,i,q)}function mu(t,e){var i=t.length;if(i)return e+=e<0?i:0,$e(e,i)?t[e]:n}function _u(t,e,i){e.length?e=Nt(e,function(m){return lt(m)?function(C){return wn(C,m.length===1?m[0]:m)}:m}):e=[ue];var s=-1;e=Nt(e,le(it()));var h=gu(t,function(m,C,S){var E=Nt(e,function(M){return M(m)});return{criteria:E,index:++s,value:m}});return tp(h,function(m,C){return qd(m,C,i)})}function Td(t,e){return wu(t,e,function(i,s){return os(t,s)})}function wu(t,e,i){for(var s=-1,h=e.length,m={};++s<h;){var C=e[s],S=wn(t,C);i(S,C)&&pr(m,cn(C,t),S)}return m}function Rd(t){return function(e){return wn(e,t)}}function No(t,e,i,s){var h=s?Ql:Un,m=-1,C=e.length,S=t;for(t===e&&(e=oe(e)),i&&(S=Nt(t,le(i)));++m<C;)for(var E=0,M=e[m],q=i?i(M):M;(E=h(S,q,E,s))>-1;)S!==t&&zr.call(S,E,1),zr.call(t,E,1);return t}function bu(t,e){for(var i=t?e.length:0,s=i-1;i--;){var h=e[i];if(i==s||h!==m){var m=h;$e(h)?zr.call(t,h,1):Do(t,h)}}return t}function Bo(t,e){return t+$r(eu()*(e-t+1))}function Od(t,e,i,s){for(var h=-1,m=Wt(Gr((e-t)/(i||1)),0),C=O(m);m--;)C[s?m:++h]=t,t+=i;return C}function Lo(t,e){var i="";if(!t||e<1||e>ct)return i;do e%2&&(i+=t),e=$r(e/2),e&&(t+=t);while(e);return i}function yt(t,e){return Vo(Vu(t,e,ue),t+"")}function Id(t){return iu($n(t))}function Nd(t,e){var i=$n(t);return fi(i,_n(e,0,i.length))}function pr(t,e,i,s){if(!Bt(t))return t;e=cn(e,t);for(var h=-1,m=e.length,C=m-1,S=t;S!=null&&++h<m;){var E=Fe(e[h]),M=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return t;if(h!=C){var q=S[E];M=s?s(q,E,S):n,M===n&&(M=Bt(q)?q:$e(e[h+1])?[]:{})}cr(S,E,M),S=S[E]}return t}var Cu=Jr?function(t,e){return Jr.set(t,e),t}:ue,Bd=Xr?function(t,e){return Xr(t,"toString",{configurable:!0,enumerable:!1,value:as(e),writable:!0})}:ue;function Ld(t){return fi($n(t))}function Se(t,e,i){var s=-1,h=t.length;e<0&&(e=-e>h?0:h+e),i=i>h?h:i,i<0&&(i+=h),h=e>i?0:i-e>>>0,e>>>=0;for(var m=O(h);++s<h;)m[s]=t[s+e];return m}function Ud(t,e){var i;return an(t,function(s,h,m){return i=e(s,h,m),!i}),!!i}function ei(t,e,i){var s=0,h=t==null?s:t.length;if(typeof e=="number"&&e===e&&h<=$){for(;s<h;){var m=s+h>>>1,C=t[m];C!==null&&!de(C)&&(i?C<=e:C<e)?s=m+1:h=m}return h}return Uo(t,e,ue,i)}function Uo(t,e,i,s){var h=0,m=t==null?0:t.length;if(m===0)return 0;e=i(e);for(var C=e!==e,S=e===null,E=de(e),M=e===n;h<m;){var q=$r((h+m)/2),W=i(t[q]),j=W!==n,tt=W===null,ot=W===W,gt=de(W);if(C)var st=s||ot;else M?st=ot&&(s||j):S?st=ot&&j&&(s||!tt):E?st=ot&&j&&!tt&&(s||!gt):tt||gt?st=!1:st=s?W<=e:W<e;st?h=q+1:m=q}return Vt(m,Or)}function Su(t,e){for(var i=-1,s=t.length,h=0,m=[];++i<s;){var C=t[i],S=e?e(C):C;if(!i||!Oe(S,E)){var E=S;m[h++]=C===0?0:C}}return m}function ku(t){return typeof t=="number"?t:de(t)?Be:+t}function pe(t){if(typeof t=="string")return t;if(lt(t))return Nt(t,pe)+"";if(de(t))return nu?nu.call(t):"";var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function un(t,e,i){var s=-1,h=Lr,m=t.length,C=!0,S=[],E=S;if(i)C=!1,h=co;else if(m>=c){var M=e?null:Gd(t);if(M)return Dr(M);C=!1,h=rr,E=new mn}else E=e?[]:S;t:for(;++s<m;){var q=t[s],W=e?e(q):q;if(q=i||q!==0?q:0,C&&W===W){for(var j=E.length;j--;)if(E[j]===W)continue t;e&&E.push(W),S.push(q)}else h(E,W,i)||(E!==S&&E.push(W),S.push(q))}return S}function Do(t,e){return e=cn(e,t),t=Zu(t,e),t==null||delete t[Fe(ke(e))]}function Au(t,e,i,s){return pr(t,e,i(wn(t,e)),s)}function ni(t,e,i,s){for(var h=t.length,m=s?h:-1;(s?m--:++m<h)&&e(t[m],m,t););return i?Se(t,s?0:m,s?m+1:h):Se(t,s?m+1:0,s?h:m)}function xu(t,e){var i=t;return i instanceof mt&&(i=i.value()),fo(e,function(s,h){return h.func.apply(h.thisArg,rn([s],h.args))},i)}function Po(t,e,i){var s=t.length;if(s<2)return s?un(t[0]):[];for(var h=-1,m=O(s);++h<s;)for(var C=t[h],S=-1;++S<s;)S!=h&&(m[h]=fr(m[h]||C,t[S],e,i));return un(Gt(m,1),e,i)}function Eu(t,e,i){for(var s=-1,h=t.length,m=e.length,C={};++s<h;){var S=s<m?e[s]:n;i(C,t[s],S)}return C}function Fo(t){return Dt(t)?t:[]}function Mo(t){return typeof t=="function"?t:ue}function cn(t,e){return lt(t)?t:Jo(t,e)?[t]:nc(At(t))}var Dd=yt;function fn(t,e,i){var s=t.length;return i=i===n?s:i,!e&&i>=s?t:Se(t,e,i)}var Tu=Sp||function(t){return Xt.clearTimeout(t)};function Ru(t,e){if(e)return t.slice();var i=t.length,s=Ya?Ya(i):new t.constructor(i);return t.copy(s),s}function qo(t){var e=new t.constructor(t.byteLength);return new Hr(e).set(new Hr(t)),e}function Pd(t,e){var i=e?qo(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Fd(t){var e=new t.constructor(t.source,la.exec(t));return e.lastIndex=t.lastIndex,e}function Md(t){return ur?Tt(ur.call(t)):{}}function Ou(t,e){var i=e?qo(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Iu(t,e){if(t!==e){var i=t!==n,s=t===null,h=t===t,m=de(t),C=e!==n,S=e===null,E=e===e,M=de(e);if(!S&&!M&&!m&&t>e||m&&C&&E&&!S&&!M||s&&C&&E||!i&&E||!h)return 1;if(!s&&!m&&!M&&t<e||M&&i&&h&&!s&&!m||S&&i&&h||!C&&h||!E)return-1}return 0}function qd(t,e,i){for(var s=-1,h=t.criteria,m=e.criteria,C=h.length,S=i.length;++s<C;){var E=Iu(h[s],m[s]);if(E){if(s>=S)return E;var M=i[s];return E*(M=="desc"?-1:1)}}return t.index-e.index}function Nu(t,e,i,s){for(var h=-1,m=t.length,C=i.length,S=-1,E=e.length,M=Wt(m-C,0),q=O(E+M),W=!s;++S<E;)q[S]=e[S];for(;++h<C;)(W||h<m)&&(q[i[h]]=t[h]);for(;M--;)q[S++]=t[h++];return q}function Bu(t,e,i,s){for(var h=-1,m=t.length,C=-1,S=i.length,E=-1,M=e.length,q=Wt(m-S,0),W=O(q+M),j=!s;++h<q;)W[h]=t[h];for(var tt=h;++E<M;)W[tt+E]=e[E];for(;++C<S;)(j||h<m)&&(W[tt+i[C]]=t[h++]);return W}function oe(t,e){var i=-1,s=t.length;for(e||(e=O(s));++i<s;)e[i]=t[i];return e}function Pe(t,e,i,s){var h=!i;i||(i={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=s?s(i[S],t[S],S,i,t):n;E===n&&(E=t[S]),h?ze(i,S,E):cr(i,S,E)}return i}function Wd(t,e){return Pe(t,$o(t),e)}function Hd(t,e){return Pe(t,Gu(t),e)}function ri(t,e){return function(i,s){var h=lt(i)?$l:fd,m=e?e():{};return h(i,t,it(s,2),m)}}function Kn(t){return yt(function(e,i){var s=-1,h=i.length,m=h>1?i[h-1]:n,C=h>2?i[2]:n;for(m=t.length>3&&typeof m=="function"?(h--,m):n,C&&ne(i[0],i[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++s<h;){var S=i[s];S&&t(e,S,s,m)}return e})}function Lu(t,e){return function(i,s){if(i==null)return i;if(!se(i))return t(i,s);for(var h=i.length,m=e?h:-1,C=Tt(i);(e?m--:++m<h)&&s(C[m],m,C)!==!1;);return i}}function Uu(t){return function(e,i,s){for(var h=-1,m=Tt(e),C=s(e),S=C.length;S--;){var E=C[t?S:++h];if(i(m[E],E,m)===!1)break}return e}}function Kd(t,e,i){var s=e&k,h=dr(t);function m(){var C=this&&this!==Xt&&this instanceof m?h:t;return C.apply(s?i:this,arguments)}return m}function Du(t){return function(e){e=At(e);var i=Dn(e)?Te(e):n,s=i?i[0]:e.charAt(0),h=i?fn(i,1).join(""):e.slice(1);return s[t]()+h}}function zn(t){return function(e){return fo(Lc(Bc(e).replace(Bl,"")),t,"")}}function dr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var i=Hn(t.prototype),s=t.apply(i,e);return Bt(s)?s:i}}function zd(t,e,i){var s=dr(t);function h(){for(var m=arguments.length,C=O(m),S=m,E=Xn(h);S--;)C[S]=arguments[S];var M=m<3&&C[0]!==E&&C[m-1]!==E?[]:on(C,E);if(m-=M.length,m<i)return Wu(t,e,ii,h.placeholder,n,C,M,n,n,i-m);var q=this&&this!==Xt&&this instanceof h?s:t;return he(q,this,C)}return h}function Pu(t){return function(e,i,s){var h=Tt(e);if(!se(e)){var m=it(i,3);e=Kt(e),i=function(S){return m(h[S],S,h)}}var C=t(e,i,s);return C>-1?h[m?e[C]:C]:n}}function Fu(t){return Ge(function(e){var i=e.length,s=i,h=be.prototype.thru;for(t&&e.reverse();s--;){var m=e[s];if(typeof m!="function")throw new we(v);if(h&&!C&&ui(m)=="wrapper")var C=new be([],!0)}for(s=C?s:i;++s<i;){m=e[s];var S=ui(m),E=S=="wrapper"?Xo(m):n;E&&jo(E[0])&&E[1]==(I|J|U|P)&&!E[4].length&&E[9]==1?C=C[ui(E[0])].apply(C,E[3]):C=m.length==1&&jo(m)?C[S]():C.thru(m)}return function(){var M=arguments,q=M[0];if(C&&M.length==1&<(q))return C.plant(q).value();for(var W=0,j=i?e[W].apply(this,M):q;++W<i;)j=e[W].call(this,j);return j}})}function ii(t,e,i,s,h,m,C,S,E,M){var q=e&I,W=e&k,j=e&L,tt=e&(J|N),ot=e&R,gt=j?n:dr(t);function st(){for(var vt=arguments.length,wt=O(vt),ge=vt;ge--;)wt[ge]=arguments[ge];if(tt)var re=Xn(st),ye=np(wt,re);if(s&&(wt=Nu(wt,s,h,tt)),m&&(wt=Bu(wt,m,C,tt)),vt-=ye,tt&&vt<M){var Pt=on(wt,re);return Wu(t,e,ii,st.placeholder,i,wt,Pt,S,E,M-vt)}var Ie=W?i:this,Ye=j?Ie[t]:t;return vt=wt.length,S?wt=fg(wt,S):ot&&vt>1&&wt.reverse(),q&&E<vt&&(wt.length=E),this&&this!==Xt&&this instanceof st&&(Ye=gt||dr(Ye)),Ye.apply(Ie,wt)}return st}function Mu(t,e){return function(i,s){return md(i,t,e(s),{})}}function oi(t,e){return function(i,s){var h;if(i===n&&s===n)return e;if(i!==n&&(h=i),s!==n){if(h===n)return s;typeof i=="string"||typeof s=="string"?(i=pe(i),s=pe(s)):(i=ku(i),s=ku(s)),h=t(i,s)}return h}}function Wo(t){return Ge(function(e){return e=Nt(e,le(it())),yt(function(i){var s=this;return t(e,function(h){return he(h,s,i)})})})}function si(t,e){e=e===n?" ":pe(e);var i=e.length;if(i<2)return i?Lo(e,t):e;var s=Lo(e,Gr(t/Pn(e)));return Dn(e)?fn(Te(s),0,t).join(""):s.slice(0,t)}function Xd(t,e,i,s){var h=e&k,m=dr(t);function C(){for(var S=-1,E=arguments.length,M=-1,q=s.length,W=O(q+E),j=this&&this!==Xt&&this instanceof C?m:t;++M<q;)W[M]=s[M];for(;E--;)W[M++]=arguments[++S];return he(j,h?i:this,W)}return C}function qu(t){return function(e,i,s){return s&&typeof s!="number"&&ne(e,i,s)&&(i=s=n),e=je(e),i===n?(i=e,e=0):i=je(i),s=s===n?e<i?1:-1:je(s),Od(e,i,s,t)}}function ai(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=Ae(e),i=Ae(i)),t(e,i)}}function Wu(t,e,i,s,h,m,C,S,E,M){var q=e&J,W=q?C:n,j=q?n:C,tt=q?m:n,ot=q?n:m;e|=q?U:T,e&=~(q?T:U),e&Y||(e&=~(k|L));var gt=[t,e,h,tt,W,ot,j,S,E,M],st=i.apply(n,gt);return jo(t)&&Qu(st,gt),st.placeholder=s,tc(st,t,e)}function Ho(t){var e=qt[t];return function(i,s){if(i=Ae(i),s=s==null?0:Vt(dt(s),292),s&&tu(i)){var h=(At(i)+"e").split("e"),m=e(h[0]+"e"+(+h[1]+s));return h=(At(m)+"e").split("e"),+(h[0]+"e"+(+h[1]-s))}return e(i)}}var Gd=qn&&1/Dr(new qn([,-0]))[1]==xt?function(t){return new qn(t)}:fs;function Hu(t){return function(e){var i=Zt(e);return i==It?mo(e):i==te?cp(e):ep(e,t(e))}}function Xe(t,e,i,s,h,m,C,S){var E=e&L;if(!E&&typeof t!="function")throw new we(v);var M=s?s.length:0;if(M||(e&=~(U|T),s=h=n),C=C===n?C:Wt(dt(C),0),S=S===n?S:dt(S),M-=h?h.length:0,e&T){var q=s,W=h;s=h=n}var j=E?n:Xo(t),tt=[t,e,i,s,h,q,W,m,C,S];if(j&&ag(tt,j),t=tt[0],e=tt[1],i=tt[2],s=tt[3],h=tt[4],S=tt[9]=tt[9]===n?E?0:t.length:Wt(tt[9]-M,0),!S&&e&(J|N)&&(e&=~(J|N)),!e||e==k)var ot=Kd(t,e,i);else e==J||e==N?ot=zd(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Xd(t,e,i,s):ot=ii.apply(n,tt);var gt=j?Cu:Qu;return tc(gt(ot,tt),t,e)}function Ku(t,e,i,s){return t===n||Oe(t,Mn[i])&&!Et.call(s,i)?e:t}function zu(t,e,i,s,h,m){return Bt(t)&&Bt(e)&&(m.set(e,t),ti(t,e,n,zu,m),m.delete(e)),t}function $d(t){return vr(t)?n:t}function Xu(t,e,i,s,h,m){var C=i&w,S=t.length,E=e.length;if(S!=E&&!(C&&E>S))return!1;var M=m.get(t),q=m.get(e);if(M&&q)return M==e&&q==t;var W=-1,j=!0,tt=i&A?new mn:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],gt=e[W];if(s)var st=C?s(gt,ot,W,e,t,m):s(ot,gt,W,t,e,m);if(st!==n){if(st)continue;j=!1;break}if(tt){if(!ho(e,function(vt,wt){if(!rr(tt,wt)&&(ot===vt||h(ot,vt,i,s,m)))return tt.push(wt)})){j=!1;break}}else if(!(ot===gt||h(ot,gt,i,s,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function Jd(t,e,i,s,h,m,C){switch(i){case Bn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case en:return!(t.byteLength!=e.byteLength||!m(new Hr(t),new Hr(e)));case et:case nt:case Ee:return Oe(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Qt:case Le:return t==e+"";case It:var S=mo;case te:var E=s&w;if(S||(S=Dr),t.size!=e.size&&!E)return!1;var M=C.get(t);if(M)return M==e;s|=A,C.set(t,e);var q=Xu(S(t),S(e),s,h,m,C);return C.delete(t),q;case Ue:if(ur)return ur.call(t)==ur.call(e)}return!1}function jd(t,e,i,s,h,m){var C=i&w,S=Ko(t),E=S.length,M=Ko(e),q=M.length;if(E!=q&&!C)return!1;for(var W=E;W--;){var j=S[W];if(!(C?j in e:Et.call(e,j)))return!1}var tt=m.get(t),ot=m.get(e);if(tt&&ot)return tt==e&&ot==t;var gt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){j=S[W];var vt=t[j],wt=e[j];if(s)var ge=C?s(wt,vt,j,e,t,m):s(vt,wt,j,t,e,m);if(!(ge===n?vt===wt||h(vt,wt,i,s,m):ge)){gt=!1;break}st||(st=j=="constructor")}if(gt&&!st){var re=t.constructor,ye=e.constructor;re!=ye&&"constructor"in t&&"constructor"in e&&!(typeof re=="function"&&re instanceof re&&typeof ye=="function"&&ye instanceof ye)&&(gt=!1)}return m.delete(t),m.delete(e),gt}function Ge(t){return Vo(Vu(t,n,sc),t+"")}function Ko(t){return hu(t,Kt,$o)}function zo(t){return hu(t,ae,Gu)}var Xo=Jr?function(t){return Jr.get(t)}:fs;function ui(t){for(var e=t.name+"",i=Wn[e],s=Et.call(Wn,e)?i.length:0;s--;){var h=i[s],m=h.func;if(m==null||m==t)return h.name}return e}function Xn(t){var e=Et.call(y,"placeholder")?y:t;return e.placeholder}function it(){var t=y.iteratee||us;return t=t===us?du:t,arguments.length?t(arguments[0],arguments[1]):t}function ci(t,e){var i=t.__data__;return rg(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Go(t){for(var e=Kt(t),i=e.length;i--;){var s=e[i],h=t[s];e[i]=[s,h,ju(h)]}return e}function bn(t,e){var i=sp(t,e);return pu(i)?i:n}function Yd(t){var e=Et.call(t,yn),i=t[yn];try{t[yn]=n;var s=!0}catch{}var h=qr.call(t);return s&&(e?t[yn]=i:delete t[yn]),h}var $o=wo?function(t){return t==null?[]:(t=Tt(t),nn(wo(t),function(e){return Za.call(t,e)}))}:hs,Gu=wo?function(t){for(var e=[];t;)rn(e,$o(t)),t=Kr(t);return e}:hs,Zt=ee;(bo&&Zt(new bo(new ArrayBuffer(1)))!=Bn||or&&Zt(new or)!=It||Co&&Zt(Co.resolve())!=Nn||qn&&Zt(new qn)!=te||sr&&Zt(new sr)!=We)&&(Zt=function(t){var e=ee(t),i=e==fe?t.constructor:n,s=i?Cn(i):"";if(s)switch(s){case Np:return Bn;case Bp:return It;case Lp:return Nn;case Up:return te;case Dp:return We}return e});function Vd(t,e,i){for(var s=-1,h=i.length;++s<h;){var m=i[s],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=Vt(e,t+C);break;case"takeRight":t=Wt(t,e-C);break}}return{start:t,end:e}}function Zd(t){var e=t.match(il);return e?e[1].split(ol):[]}function $u(t,e,i){e=cn(e,t);for(var s=-1,h=e.length,m=!1;++s<h;){var C=Fe(e[s]);if(!(m=t!=null&&i(t,C)))break;t=t[C]}return m||++s!=h?m:(h=t==null?0:t.length,!!h&&yi(h)&&$e(C,h)&&(lt(t)||Sn(t)))}function Qd(t){var e=t.length,i=new t.constructor(e);return e&&typeof t[0]=="string"&&Et.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function Ju(t){return typeof t.constructor=="function"&&!gr(t)?Hn(Kr(t)):{}}function tg(t,e,i){var s=t.constructor;switch(e){case en:return qo(t);case et:case nt:return new s(+t);case Bn:return Pd(t,i);case Xi:case Gi:case $i:case Ji:case ji:case Yi:case Vi:case Zi:case Qi:return Ou(t,i);case It:return new s;case Ee:case Le:return new s(t);case Qt:return Fd(t);case te:return new s;case Ue:return Md(t)}}function eg(t,e){var i=e.length;if(!i)return t;var s=i-1;return e[s]=(i>1?"& ":"")+e[s],e=e.join(i>2?", ":" "),t.replace(rl,`{
|
|
13
|
+
*/_r.exports,function(r,o){(function(){var n,a="4.17.21",c=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",d="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",p=500,_="__lodash_placeholder__",g=1,l=2,u=4,w=1,A=2,k=1,L=2,Y=4,J=8,N=16,U=32,T=64,I=128,P=256,R=512,B=30,H="...",z=800,G=16,F=1,pt=2,ct=3,xt=1/0,ut=9007199254740991,Yt=17976931348623157e292,Le=NaN,fe=4294967295,Nr=fe-1,$=fe>>>1,Q=[["ary",I],["bind",k],["bindKey",L],["curry",J],["curryRight",N],["flip",R],["partial",U],["partialRight",T],["rearg",P]],X="[object Arguments]",rt="[object Array]",K="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",Vt="[object GeneratorFunction]",It="[object Map]",Te="[object Number]",tr="[object Null]",he="[object Object]",Bn="[object Promise]",er="[object Proxy]",te="[object RegExp]",ee="[object Set]",Ue="[object String]",De="[object Symbol]",nr="[object Undefined]",He="[object WeakMap]",rr="[object WeakSet]",nn="[object ArrayBuffer]",Ln="[object DataView]",$i="[object Float32Array]",Ji="[object Float64Array]",ji="[object Int8Array]",Yi="[object Int16Array]",Vi="[object Int32Array]",Zi="[object Uint8Array]",Qi="[object Uint8ClampedArray]",to="[object Uint16Array]",eo="[object Uint32Array]",Qh=/\b__p \+= '';/g,tl=/\b(__p \+=) '' \+/g,el=/(__e\(.*?\)|\b__t\)) \+\n'';/g,la=/&(?:amp|lt|gt|quot|#39);/g,pa=/[&<>"']/g,nl=RegExp(la.source),rl=RegExp(pa.source),il=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,da=/<%=([\s\S]+?)%>/g,sl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,al=/^\w*$/,cl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,no=/[\\^$.*+?()[\]{}|]/g,ul=RegExp(no.source),ro=/^\s+/,fl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ll=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,dl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gl=/[()=,{}\[\]\/\s]/,yl=/\\(\\)?/g,vl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ga=/\w*$/,ml=/^[-+]0x[0-9a-f]+$/i,_l=/^0b[01]+$/i,wl=/^\[object .+?Constructor\]$/,bl=/^0o[0-7]+$/i,Cl=/^(?:0|[1-9]\d*)$/,Sl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Br=/($^)/,kl=/['\n\r\u2028\u2029\\]/g,Lr="\\ud800-\\udfff",Al="\\u0300-\\u036f",xl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",ya=Al+xl+El,va="\\u2700-\\u27bf",ma="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",Rl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ol="\\u2000-\\u206f",Il=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_a="A-Z\\xc0-\\xd6\\xd8-\\xde",wa="\\ufe0e\\ufe0f",ba=Tl+Rl+Ol+Il,io="['’]",Nl="["+Lr+"]",Ca="["+ba+"]",Ur="["+ya+"]",Sa="\\d+",Bl="["+va+"]",ka="["+ma+"]",Aa="[^"+Lr+ba+Sa+va+ma+_a+"]",oo="\\ud83c[\\udffb-\\udfff]",Ll="(?:"+Ur+"|"+oo+")",xa="[^"+Lr+"]",so="(?:\\ud83c[\\udde6-\\uddff]){2}",ao="[\\ud800-\\udbff][\\udc00-\\udfff]",Un="["+_a+"]",Ea="\\u200d",Ta="(?:"+ka+"|"+Aa+")",Ul="(?:"+Un+"|"+Aa+")",Ra="(?:"+io+"(?:d|ll|m|re|s|t|ve))?",Oa="(?:"+io+"(?:D|LL|M|RE|S|T|VE))?",Ia=Ll+"?",Na="["+wa+"]?",Dl="(?:"+Ea+"(?:"+[xa,so,ao].join("|")+")"+Na+Ia+")*",Pl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ba=Na+Ia+Dl,Ml="(?:"+[Bl,so,ao].join("|")+")"+Ba,ql="(?:"+[xa+Ur+"?",Ur,so,ao,Nl].join("|")+")",Wl=RegExp(io,"g"),Hl=RegExp(Ur,"g"),co=RegExp(oo+"(?="+oo+")|"+ql+Ba,"g"),Kl=RegExp([Un+"?"+ka+"+"+Ra+"(?="+[Ca,Un,"$"].join("|")+")",Ul+"+"+Oa+"(?="+[Ca,Un+Ta,"$"].join("|")+")",Un+"?"+Ta+"+"+Ra,Un+"+"+Oa,Fl,Pl,Sa,Ml].join("|"),"g"),zl=RegExp("["+Ea+Lr+ya+wa+"]"),Xl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$l=-1,Ot={};Ot[$i]=Ot[Ji]=Ot[ji]=Ot[Yi]=Ot[Vi]=Ot[Zi]=Ot[Qi]=Ot[to]=Ot[eo]=!0,Ot[X]=Ot[rt]=Ot[nn]=Ot[et]=Ot[Ln]=Ot[nt]=Ot[at]=Ot[kt]=Ot[It]=Ot[Te]=Ot[he]=Ot[te]=Ot[ee]=Ot[Ue]=Ot[He]=!1;var Rt={};Rt[X]=Rt[rt]=Rt[nn]=Rt[Ln]=Rt[et]=Rt[nt]=Rt[$i]=Rt[Ji]=Rt[ji]=Rt[Yi]=Rt[Vi]=Rt[It]=Rt[Te]=Rt[he]=Rt[te]=Rt[ee]=Rt[Ue]=Rt[De]=Rt[Zi]=Rt[Qi]=Rt[to]=Rt[eo]=!0,Rt[at]=Rt[kt]=Rt[He]=!1;var Jl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jl={"&":"&","<":"<",">":">",'"':""","'":"'"},Yl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Vl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zl=parseFloat,Ql=parseInt,La=typeof zt=="object"&&zt&&zt.Object===Object&&zt,tp=typeof self=="object"&&self&&self.Object===Object&&self,Gt=La||tp||Function("return this")(),uo=o&&!o.nodeType&&o,yn=uo&&!0&&r&&!r.nodeType&&r,Ua=yn&&yn.exports===uo,fo=Ua&&La.process,_e=function(){try{var x=yn&&yn.require&&yn.require("util").types;return x||fo&&fo.binding&&fo.binding("util")}catch{}}(),Da=_e&&_e.isArrayBuffer,Pa=_e&&_e.isDate,Fa=_e&&_e.isMap,Ma=_e&&_e.isRegExp,qa=_e&&_e.isSet,Wa=_e&&_e.isTypedArray;function le(x,D,O){switch(O.length){case 0:return x.call(D);case 1:return x.call(D,O[0]);case 2:return x.call(D,O[0],O[1]);case 3:return x.call(D,O[0],O[1],O[2])}return x.apply(D,O)}function ep(x,D,O,V){for(var ft=-1,Ct=x==null?0:x.length;++ft<Ct;){var qt=x[ft];D(V,qt,O(qt),x)}return V}function we(x,D){for(var O=-1,V=x==null?0:x.length;++O<V&&D(x[O],O,x)!==!1;);return x}function np(x,D){for(var O=x==null?0:x.length;O--&&D(x[O],O,x)!==!1;);return x}function Ha(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(!D(x[O],O,x))return!1;return!0}function rn(x,D){for(var O=-1,V=x==null?0:x.length,ft=0,Ct=[];++O<V;){var qt=x[O];D(qt,O,x)&&(Ct[ft++]=qt)}return Ct}function Dr(x,D){var O=x==null?0:x.length;return!!O&&Dn(x,D,0)>-1}function ho(x,D,O){for(var V=-1,ft=x==null?0:x.length;++V<ft;)if(O(D,x[V]))return!0;return!1}function Nt(x,D){for(var O=-1,V=x==null?0:x.length,ft=Array(V);++O<V;)ft[O]=D(x[O],O,x);return ft}function on(x,D){for(var O=-1,V=D.length,ft=x.length;++O<V;)x[ft+O]=D[O];return x}function lo(x,D,O,V){var ft=-1,Ct=x==null?0:x.length;for(V&&Ct&&(O=x[++ft]);++ft<Ct;)O=D(O,x[ft],ft,x);return O}function rp(x,D,O,V){var ft=x==null?0:x.length;for(V&&ft&&(O=x[--ft]);ft--;)O=D(O,x[ft],ft,x);return O}function po(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(D(x[O],O,x))return!0;return!1}var ip=go("length");function op(x){return x.split("")}function sp(x){return x.match(dl)||[]}function Ka(x,D,O){var V;return O(x,function(ft,Ct,qt){if(D(ft,Ct,qt))return V=Ct,!1}),V}function Pr(x,D,O,V){for(var ft=x.length,Ct=O+(V?1:-1);V?Ct--:++Ct<ft;)if(D(x[Ct],Ct,x))return Ct;return-1}function Dn(x,D,O){return D===D?mp(x,D,O):Pr(x,za,O)}function ap(x,D,O,V){for(var ft=O-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function za(x){return x!==x}function Xa(x,D){var O=x==null?0:x.length;return O?vo(x,D)/O:Le}function go(x){return function(D){return D==null?n:D[x]}}function yo(x){return function(D){return x==null?n:x[D]}}function Ga(x,D,O,V,ft){return ft(x,function(Ct,qt,Tt){O=V?(V=!1,Ct):D(O,Ct,qt,Tt)}),O}function cp(x,D){var O=x.length;for(x.sort(D);O--;)x[O]=x[O].value;return x}function vo(x,D){for(var O,V=-1,ft=x.length;++V<ft;){var Ct=D(x[V]);Ct!==n&&(O=O===n?Ct:O+Ct)}return O}function mo(x,D){for(var O=-1,V=Array(x);++O<x;)V[O]=D(O);return V}function up(x,D){return Nt(D,function(O){return[O,x[O]]})}function $a(x){return x&&x.slice(0,Va(x)+1).replace(ro,"")}function pe(x){return function(D){return x(D)}}function _o(x,D){return Nt(D,function(O){return x[O]})}function ir(x,D){return x.has(D)}function Ja(x,D){for(var O=-1,V=x.length;++O<V&&Dn(D,x[O],0)>-1;);return O}function ja(x,D){for(var O=x.length;O--&&Dn(D,x[O],0)>-1;);return O}function fp(x,D){for(var O=x.length,V=0;O--;)x[O]===D&&++V;return V}var hp=yo(Jl),lp=yo(jl);function pp(x){return"\\"+Vl[x]}function dp(x,D){return x==null?n:x[D]}function Pn(x){return zl.test(x)}function gp(x){return Xl.test(x)}function yp(x){for(var D,O=[];!(D=x.next()).done;)O.push(D.value);return O}function wo(x){var D=-1,O=Array(x.size);return x.forEach(function(V,ft){O[++D]=[ft,V]}),O}function Ya(x,D){return function(O){return x(D(O))}}function sn(x,D){for(var O=-1,V=x.length,ft=0,Ct=[];++O<V;){var qt=x[O];(qt===D||qt===_)&&(x[O]=_,Ct[ft++]=O)}return Ct}function Fr(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=V}),O}function vp(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function mp(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function _p(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function Fn(x){return Pn(x)?bp(x):ip(x)}function Re(x){return Pn(x)?Cp(x):op(x)}function Va(x){for(var D=x.length;D--&&fl.test(x.charAt(D)););return D}var wp=yo(Yl);function bp(x){for(var D=co.lastIndex=0;co.test(x);)++D;return D}function Cp(x){return x.match(co)||[]}function Sp(x){return x.match(Kl)||[]}var kp=function x(D){D=D==null?Gt:Mn.defaults(Gt.Object(),D,Mn.pick(Gt,Gl));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,qt=D.Math,Tt=D.Object,bo=D.RegExp,Ap=D.String,be=D.TypeError,Mr=O.prototype,xp=Ct.prototype,qn=Tt.prototype,qr=D["__core-js_shared__"],Wr=xp.toString,Et=qn.hasOwnProperty,Ep=0,Za=function(){var t=/[^.]+$/.exec(qr&&qr.keys&&qr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Hr=qn.toString,Tp=Wr.call(Tt),Rp=Gt._,Op=bo("^"+Wr.call(Et).replace(no,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kr=Ua?D.Buffer:n,an=D.Symbol,zr=D.Uint8Array,Qa=Kr?Kr.allocUnsafe:n,Xr=Ya(Tt.getPrototypeOf,Tt),tc=Tt.create,ec=qn.propertyIsEnumerable,Gr=Mr.splice,nc=an?an.isConcatSpreadable:n,or=an?an.iterator:n,vn=an?an.toStringTag:n,$r=function(){try{var t=Cn(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),Ip=D.clearTimeout!==Gt.clearTimeout&&D.clearTimeout,Np=V&&V.now!==Gt.Date.now&&V.now,Bp=D.setTimeout!==Gt.setTimeout&&D.setTimeout,Jr=qt.ceil,jr=qt.floor,Co=Tt.getOwnPropertySymbols,Lp=Kr?Kr.isBuffer:n,rc=D.isFinite,Up=Mr.join,Dp=Ya(Tt.keys,Tt),Wt=qt.max,Zt=qt.min,Pp=V.now,Fp=D.parseInt,ic=qt.random,Mp=Mr.reverse,So=Cn(D,"DataView"),sr=Cn(D,"Map"),ko=Cn(D,"Promise"),Wn=Cn(D,"Set"),ar=Cn(D,"WeakMap"),cr=Cn(Tt,"create"),Yr=ar&&new ar,Hn={},qp=Sn(So),Wp=Sn(sr),Hp=Sn(ko),Kp=Sn(Wn),zp=Sn(ar),Vr=an?an.prototype:n,ur=Vr?Vr.valueOf:n,oc=Vr?Vr.toString:n;function y(t){if(Lt(t)&&!lt(t)&&!(t instanceof mt)){if(t instanceof Ce)return t;if(Et.call(t,"__wrapped__"))return su(t)}return new Ce(t)}var Kn=function(){function t(){}return function(e){if(!Bt(e))return{};if(tc)return tc(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function Zr(){}function Ce(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:il,evaluate:ol,interpolate:da,variable:"",imports:{_:y}},y.prototype=Zr.prototype,y.prototype.constructor=y,Ce.prototype=Kn(Zr.prototype),Ce.prototype.constructor=Ce;function mt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fe,this.__views__=[]}function Xp(){var t=new mt(this.__wrapped__);return t.__actions__=se(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=se(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=se(this.__views__),t}function Gp(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function $p(){var t=this.__wrapped__.value(),e=this.__dir__,i=lt(t),s=e<0,h=i?t.length:0,m=og(0,h,this.__views__),C=m.start,S=m.end,E=S-C,M=s?S:C-1,q=this.__iteratees__,W=q.length,j=0,tt=Zt(E,this.__takeCount__);if(!i||!s&&h==E&&tt==E)return Rc(t,this.__actions__);var ot=[];t:for(;E--&&j<tt;){M+=e;for(var gt=-1,st=t[M];++gt<W;){var vt=q[gt],wt=vt.iteratee,ye=vt.type,ie=wt(st);if(ye==pt)st=ie;else if(!ie){if(ye==F)continue t;break t}}ot[j++]=st}return ot}mt.prototype=Kn(Zr.prototype),mt.prototype.constructor=mt;function mn(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Jp(){this.__data__=cr?cr(null):{},this.size=0}function jp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Yp(t){var e=this.__data__;if(cr){var i=e[t];return i===b?n:i}return Et.call(e,t)?e[t]:n}function Vp(t){var e=this.__data__;return cr?e[t]!==n:Et.call(e,t)}function Zp(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=cr&&e===n?b:e,this}mn.prototype.clear=Jp,mn.prototype.delete=jp,mn.prototype.get=Yp,mn.prototype.has=Vp,mn.prototype.set=Zp;function Ke(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Qp(){this.__data__=[],this.size=0}function td(t){var e=this.__data__,i=Qr(e,t);if(i<0)return!1;var s=e.length-1;return i==s?e.pop():Gr.call(e,i,1),--this.size,!0}function ed(t){var e=this.__data__,i=Qr(e,t);return i<0?n:e[i][1]}function nd(t){return Qr(this.__data__,t)>-1}function rd(t,e){var i=this.__data__,s=Qr(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}Ke.prototype.clear=Qp,Ke.prototype.delete=td,Ke.prototype.get=ed,Ke.prototype.has=nd,Ke.prototype.set=rd;function ze(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function id(){this.size=0,this.__data__={hash:new mn,map:new(sr||Ke),string:new mn}}function od(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e}function sd(t){return hi(this,t).get(t)}function ad(t){return hi(this,t).has(t)}function cd(t,e){var i=hi(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this}ze.prototype.clear=id,ze.prototype.delete=od,ze.prototype.get=sd,ze.prototype.has=ad,ze.prototype.set=cd;function _n(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new ze;++e<i;)this.add(t[e])}function ud(t){return this.__data__.set(t,b),this}function fd(t){return this.__data__.has(t)}_n.prototype.add=_n.prototype.push=ud,_n.prototype.has=fd;function Oe(t){var e=this.__data__=new Ke(t);this.size=e.size}function hd(){this.__data__=new Ke,this.size=0}function ld(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function pd(t){return this.__data__.get(t)}function dd(t){return this.__data__.has(t)}function gd(t,e){var i=this.__data__;if(i instanceof Ke){var s=i.__data__;if(!sr||s.length<c-1)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new ze(s)}return i.set(t,e),this.size=i.size,this}Oe.prototype.clear=hd,Oe.prototype.delete=ld,Oe.prototype.get=pd,Oe.prototype.has=dd,Oe.prototype.set=gd;function sc(t,e){var i=lt(t),s=!i&&kn(t),h=!i&&!s&&ln(t),m=!i&&!s&&!h&&$n(t),C=i||s||h||m,S=C?mo(t.length,Ap):[],E=S.length;for(var M in t)(e||Et.call(t,M))&&!(C&&(M=="length"||h&&(M=="offset"||M=="parent")||m&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||Je(M,E)))&&S.push(M);return S}function ac(t){var e=t.length;return e?t[Uo(0,e-1)]:n}function yd(t,e){return li(se(t),wn(e,0,t.length))}function vd(t){return li(se(t))}function Ao(t,e,i){(i!==n&&!Ie(t[e],i)||i===n&&!(e in t))&&Xe(t,e,i)}function fr(t,e,i){var s=t[e];(!(Et.call(t,e)&&Ie(s,i))||i===n&&!(e in t))&&Xe(t,e,i)}function Qr(t,e){for(var i=t.length;i--;)if(Ie(t[i][0],e))return i;return-1}function md(t,e,i,s){return cn(t,function(h,m,C){e(s,h,i(h),C)}),s}function cc(t,e){return t&&Fe(e,Kt(e),t)}function _d(t,e){return t&&Fe(e,ce(e),t)}function Xe(t,e,i){e=="__proto__"&&$r?$r(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function xo(t,e){for(var i=-1,s=e.length,h=O(s),m=t==null;++i<s;)h[i]=m?n:ss(t,e[i]);return h}function wn(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function Se(t,e,i,s,h,m){var C,S=e&g,E=e&l,M=e&u;if(i&&(C=h?i(t,s,h,m):i(t)),C!==n)return C;if(!Bt(t))return t;var q=lt(t);if(q){if(C=ag(t),!S)return se(t,C)}else{var W=Qt(t),j=W==kt||W==Vt;if(ln(t))return Nc(t,S);if(W==he||W==X||j&&!h){if(C=E||j?{}:Vc(t),!S)return E?Yd(t,_d(C,t)):jd(t,cc(C,t))}else{if(!Rt[W])return h?t:{};C=cg(t,W,S)}}m||(m=new Oe);var tt=m.get(t);if(tt)return tt;m.set(t,C),xu(t)?t.forEach(function(st){C.add(Se(st,e,i,st,t,m))}):ku(t)&&t.forEach(function(st,vt){C.set(vt,Se(st,e,i,vt,t,m))});var ot=M?E?Go:Xo:E?ce:Kt,gt=q?n:ot(t);return we(gt||t,function(st,vt){gt&&(vt=st,st=t[vt]),fr(C,vt,Se(st,e,i,vt,t,m))}),C}function wd(t){var e=Kt(t);return function(i){return uc(i,t,e)}}function uc(t,e,i){var s=i.length;if(t==null)return!s;for(t=Tt(t);s--;){var h=i[s],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function fc(t,e,i){if(typeof t!="function")throw new be(v);return vr(function(){t.apply(n,i)},e)}function hr(t,e,i,s){var h=-1,m=Dr,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;i&&(e=Nt(e,pe(i))),s?(m=ho,C=!1):e.length>=c&&(m=ir,C=!1,e=new _n(e));t:for(;++h<S;){var q=t[h],W=i==null?q:i(q);if(q=s||q!==0?q:0,C&&W===W){for(var j=M;j--;)if(e[j]===W)continue t;E.push(q)}else m(e,W,s)||E.push(q)}return E}var cn=Pc(Pe),hc=Pc(To,!0);function bd(t,e){var i=!0;return cn(t,function(s,h,m){return i=!!e(s,h,m),i}),i}function ti(t,e,i){for(var s=-1,h=t.length;++s<h;){var m=t[s],C=e(m);if(C!=null&&(S===n?C===C&&!ge(C):i(C,S)))var S=C,E=m}return E}function Cd(t,e,i,s){var h=t.length;for(i=dt(i),i<0&&(i=-i>h?0:h+i),s=s===n||s>h?h:dt(s),s<0&&(s+=h),s=i>s?0:Tu(s);i<s;)t[i++]=e;return t}function lc(t,e){var i=[];return cn(t,function(s,h,m){e(s,h,m)&&i.push(s)}),i}function $t(t,e,i,s,h){var m=-1,C=t.length;for(i||(i=fg),h||(h=[]);++m<C;){var S=t[m];e>0&&i(S)?e>1?$t(S,e-1,i,s,h):on(h,S):s||(h[h.length]=S)}return h}var Eo=Fc(),pc=Fc(!0);function Pe(t,e){return t&&Eo(t,e,Kt)}function To(t,e){return t&&pc(t,e,Kt)}function ei(t,e){return rn(e,function(i){return je(t[i])})}function bn(t,e){e=fn(e,t);for(var i=0,s=e.length;t!=null&&i<s;)t=t[Me(e[i++])];return i&&i==s?t:n}function dc(t,e,i){var s=e(t);return lt(t)?s:on(s,i(t))}function ne(t){return t==null?t===n?nr:tr:vn&&vn in Tt(t)?ig(t):vg(t)}function Ro(t,e){return t>e}function Sd(t,e){return t!=null&&Et.call(t,e)}function kd(t,e){return t!=null&&e in Tt(t)}function Ad(t,e,i){return t>=Zt(e,i)&&t<Wt(e,i)}function Oo(t,e,i){for(var s=i?ho:Dr,h=t[0].length,m=t.length,C=m,S=O(m),E=1/0,M=[];C--;){var q=t[C];C&&e&&(q=Nt(q,pe(e))),E=Zt(q.length,E),S[C]=!i&&(e||h>=120&&q.length>=120)?new _n(C&&q):n}q=t[0];var W=-1,j=S[0];t:for(;++W<h&&M.length<E;){var tt=q[W],ot=e?e(tt):tt;if(tt=i||tt!==0?tt:0,!(j?ir(j,ot):s(M,ot,i))){for(C=m;--C;){var gt=S[C];if(!(gt?ir(gt,ot):s(t[C],ot,i)))continue t}j&&j.push(ot),M.push(tt)}}return M}function xd(t,e,i,s){return Pe(t,function(h,m,C){e(s,i(h),m,C)}),s}function lr(t,e,i){e=fn(e,t),t=eu(t,e);var s=t==null?t:t[Me(Ae(e))];return s==null?n:le(s,t,i)}function gc(t){return Lt(t)&&ne(t)==X}function Ed(t){return Lt(t)&&ne(t)==nn}function Td(t){return Lt(t)&&ne(t)==nt}function pr(t,e,i,s,h){return t===e?!0:t==null||e==null||!Lt(t)&&!Lt(e)?t!==t&&e!==e:Rd(t,e,i,s,pr,h)}function Rd(t,e,i,s,h,m){var C=lt(t),S=lt(e),E=C?rt:Qt(t),M=S?rt:Qt(e);E=E==X?he:E,M=M==X?he:M;var q=E==he,W=M==he,j=E==M;if(j&&ln(t)){if(!ln(e))return!1;C=!0,q=!1}if(j&&!q)return m||(m=new Oe),C||$n(t)?Jc(t,e,i,s,h,m):ng(t,e,E,i,s,h,m);if(!(i&w)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var gt=tt?t.value():t,st=ot?e.value():e;return m||(m=new Oe),h(gt,st,i,s,m)}}return j?(m||(m=new Oe),rg(t,e,i,s,h,m)):!1}function Od(t){return Lt(t)&&Qt(t)==It}function Io(t,e,i,s){var h=i.length,m=h,C=!s;if(t==null)return!m;for(t=Tt(t);h--;){var S=i[h];if(C&&S[2]?S[1]!==t[S[0]]:!(S[0]in t))return!1}for(;++h<m;){S=i[h];var E=S[0],M=t[E],q=S[1];if(C&&S[2]){if(M===n&&!(E in t))return!1}else{var W=new Oe;if(s)var j=s(M,q,E,t,e,W);if(!(j===n?pr(q,M,w|A,s,W):j))return!1}}return!0}function yc(t){if(!Bt(t)||lg(t))return!1;var e=je(t)?Op:wl;return e.test(Sn(t))}function Id(t){return Lt(t)&&ne(t)==te}function Nd(t){return Lt(t)&&Qt(t)==ee}function Bd(t){return Lt(t)&&mi(t.length)&&!!Ot[ne(t)]}function vc(t){return typeof t=="function"?t:t==null?ue:typeof t=="object"?lt(t)?wc(t[0],t[1]):_c(t):Mu(t)}function No(t){if(!yr(t))return Dp(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function Ld(t){if(!Bt(t))return yg(t);var e=yr(t),i=[];for(var s in t)s=="constructor"&&(e||!Et.call(t,s))||i.push(s);return i}function Bo(t,e){return t<e}function mc(t,e){var i=-1,s=ae(t)?O(t.length):[];return cn(t,function(h,m,C){s[++i]=e(h,m,C)}),s}function _c(t){var e=Jo(t);return e.length==1&&e[0][2]?Qc(e[0][0],e[0][1]):function(i){return i===t||Io(i,t,e)}}function wc(t,e){return Yo(t)&&Zc(e)?Qc(Me(t),e):function(i){var s=ss(i,t);return s===n&&s===e?as(i,t):pr(e,s,w|A)}}function ni(t,e,i,s,h){t!==e&&Eo(e,function(m,C){if(h||(h=new Oe),Bt(m))Ud(t,e,C,i,ni,s,h);else{var S=s?s(Zo(t,C),m,C+"",t,e,h):n;S===n&&(S=m),Ao(t,C,S)}},ce)}function Ud(t,e,i,s,h,m,C){var S=Zo(t,i),E=Zo(e,i),M=C.get(E);if(M){Ao(t,i,M);return}var q=m?m(S,E,i+"",t,e,C):n,W=q===n;if(W){var j=lt(E),tt=!j&&ln(E),ot=!j&&!tt&&$n(E);q=E,j||tt||ot?lt(S)?q=S:Dt(S)?q=se(S):tt?(W=!1,q=Nc(E,!0)):ot?(W=!1,q=Bc(E,!0)):q=[]:mr(E)||kn(E)?(q=S,kn(S)?q=Ru(S):(!Bt(S)||je(S))&&(q=Vc(E))):W=!1}W&&(C.set(E,q),h(q,E,s,m,C),C.delete(E)),Ao(t,i,q)}function bc(t,e){var i=t.length;if(i)return e+=e<0?i:0,Je(e,i)?t[e]:n}function Cc(t,e,i){e.length?e=Nt(e,function(m){return lt(m)?function(C){return bn(C,m.length===1?m[0]:m)}:m}):e=[ue];var s=-1;e=Nt(e,pe(it()));var h=mc(t,function(m,C,S){var E=Nt(e,function(M){return M(m)});return{criteria:E,index:++s,value:m}});return cp(h,function(m,C){return Jd(m,C,i)})}function Dd(t,e){return Sc(t,e,function(i,s){return as(t,s)})}function Sc(t,e,i){for(var s=-1,h=e.length,m={};++s<h;){var C=e[s],S=bn(t,C);i(S,C)&&dr(m,fn(C,t),S)}return m}function Pd(t){return function(e){return bn(e,t)}}function Lo(t,e,i,s){var h=s?ap:Dn,m=-1,C=e.length,S=t;for(t===e&&(e=se(e)),i&&(S=Nt(t,pe(i)));++m<C;)for(var E=0,M=e[m],q=i?i(M):M;(E=h(S,q,E,s))>-1;)S!==t&&Gr.call(S,E,1),Gr.call(t,E,1);return t}function kc(t,e){for(var i=t?e.length:0,s=i-1;i--;){var h=e[i];if(i==s||h!==m){var m=h;Je(h)?Gr.call(t,h,1):Fo(t,h)}}return t}function Uo(t,e){return t+jr(ic()*(e-t+1))}function Fd(t,e,i,s){for(var h=-1,m=Wt(Jr((e-t)/(i||1)),0),C=O(m);m--;)C[s?m:++h]=t,t+=i;return C}function Do(t,e){var i="";if(!t||e<1||e>ut)return i;do e%2&&(i+=t),e=jr(e/2),e&&(t+=t);while(e);return i}function yt(t,e){return Qo(tu(t,e,ue),t+"")}function Md(t){return ac(Jn(t))}function qd(t,e){var i=Jn(t);return li(i,wn(e,0,i.length))}function dr(t,e,i,s){if(!Bt(t))return t;e=fn(e,t);for(var h=-1,m=e.length,C=m-1,S=t;S!=null&&++h<m;){var E=Me(e[h]),M=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return t;if(h!=C){var q=S[E];M=s?s(q,E,S):n,M===n&&(M=Bt(q)?q:Je(e[h+1])?[]:{})}fr(S,E,M),S=S[E]}return t}var Ac=Yr?function(t,e){return Yr.set(t,e),t}:ue,Wd=$r?function(t,e){return $r(t,"toString",{configurable:!0,enumerable:!1,value:us(e),writable:!0})}:ue;function Hd(t){return li(Jn(t))}function ke(t,e,i){var s=-1,h=t.length;e<0&&(e=-e>h?0:h+e),i=i>h?h:i,i<0&&(i+=h),h=e>i?0:i-e>>>0,e>>>=0;for(var m=O(h);++s<h;)m[s]=t[s+e];return m}function Kd(t,e){var i;return cn(t,function(s,h,m){return i=e(s,h,m),!i}),!!i}function ri(t,e,i){var s=0,h=t==null?s:t.length;if(typeof e=="number"&&e===e&&h<=$){for(;s<h;){var m=s+h>>>1,C=t[m];C!==null&&!ge(C)&&(i?C<=e:C<e)?s=m+1:h=m}return h}return Po(t,e,ue,i)}function Po(t,e,i,s){var h=0,m=t==null?0:t.length;if(m===0)return 0;e=i(e);for(var C=e!==e,S=e===null,E=ge(e),M=e===n;h<m;){var q=jr((h+m)/2),W=i(t[q]),j=W!==n,tt=W===null,ot=W===W,gt=ge(W);if(C)var st=s||ot;else M?st=ot&&(s||j):S?st=ot&&j&&(s||!tt):E?st=ot&&j&&!tt&&(s||!gt):tt||gt?st=!1:st=s?W<=e:W<e;st?h=q+1:m=q}return Zt(m,Nr)}function xc(t,e){for(var i=-1,s=t.length,h=0,m=[];++i<s;){var C=t[i],S=e?e(C):C;if(!i||!Ie(S,E)){var E=S;m[h++]=C===0?0:C}}return m}function Ec(t){return typeof t=="number"?t:ge(t)?Le:+t}function de(t){if(typeof t=="string")return t;if(lt(t))return Nt(t,de)+"";if(ge(t))return oc?oc.call(t):"";var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function un(t,e,i){var s=-1,h=Dr,m=t.length,C=!0,S=[],E=S;if(i)C=!1,h=ho;else if(m>=c){var M=e?null:tg(t);if(M)return Fr(M);C=!1,h=ir,E=new _n}else E=e?[]:S;t:for(;++s<m;){var q=t[s],W=e?e(q):q;if(q=i||q!==0?q:0,C&&W===W){for(var j=E.length;j--;)if(E[j]===W)continue t;e&&E.push(W),S.push(q)}else h(E,W,i)||(E!==S&&E.push(W),S.push(q))}return S}function Fo(t,e){return e=fn(e,t),t=eu(t,e),t==null||delete t[Me(Ae(e))]}function Tc(t,e,i,s){return dr(t,e,i(bn(t,e)),s)}function ii(t,e,i,s){for(var h=t.length,m=s?h:-1;(s?m--:++m<h)&&e(t[m],m,t););return i?ke(t,s?0:m,s?m+1:h):ke(t,s?m+1:0,s?h:m)}function Rc(t,e){var i=t;return i instanceof mt&&(i=i.value()),lo(e,function(s,h){return h.func.apply(h.thisArg,on([s],h.args))},i)}function Mo(t,e,i){var s=t.length;if(s<2)return s?un(t[0]):[];for(var h=-1,m=O(s);++h<s;)for(var C=t[h],S=-1;++S<s;)S!=h&&(m[h]=hr(m[h]||C,t[S],e,i));return un($t(m,1),e,i)}function Oc(t,e,i){for(var s=-1,h=t.length,m=e.length,C={};++s<h;){var S=s<m?e[s]:n;i(C,t[s],S)}return C}function qo(t){return Dt(t)?t:[]}function Wo(t){return typeof t=="function"?t:ue}function fn(t,e){return lt(t)?t:Yo(t,e)?[t]:ou(At(t))}var zd=yt;function hn(t,e,i){var s=t.length;return i=i===n?s:i,!e&&i>=s?t:ke(t,e,i)}var Ic=Ip||function(t){return Gt.clearTimeout(t)};function Nc(t,e){if(e)return t.slice();var i=t.length,s=Qa?Qa(i):new t.constructor(i);return t.copy(s),s}function Ho(t){var e=new t.constructor(t.byteLength);return new zr(e).set(new zr(t)),e}function Xd(t,e){var i=e?Ho(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Gd(t){var e=new t.constructor(t.source,ga.exec(t));return e.lastIndex=t.lastIndex,e}function $d(t){return ur?Tt(ur.call(t)):{}}function Bc(t,e){var i=e?Ho(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Lc(t,e){if(t!==e){var i=t!==n,s=t===null,h=t===t,m=ge(t),C=e!==n,S=e===null,E=e===e,M=ge(e);if(!S&&!M&&!m&&t>e||m&&C&&E&&!S&&!M||s&&C&&E||!i&&E||!h)return 1;if(!s&&!m&&!M&&t<e||M&&i&&h&&!s&&!m||S&&i&&h||!C&&h||!E)return-1}return 0}function Jd(t,e,i){for(var s=-1,h=t.criteria,m=e.criteria,C=h.length,S=i.length;++s<C;){var E=Lc(h[s],m[s]);if(E){if(s>=S)return E;var M=i[s];return E*(M=="desc"?-1:1)}}return t.index-e.index}function Uc(t,e,i,s){for(var h=-1,m=t.length,C=i.length,S=-1,E=e.length,M=Wt(m-C,0),q=O(E+M),W=!s;++S<E;)q[S]=e[S];for(;++h<C;)(W||h<m)&&(q[i[h]]=t[h]);for(;M--;)q[S++]=t[h++];return q}function Dc(t,e,i,s){for(var h=-1,m=t.length,C=-1,S=i.length,E=-1,M=e.length,q=Wt(m-S,0),W=O(q+M),j=!s;++h<q;)W[h]=t[h];for(var tt=h;++E<M;)W[tt+E]=e[E];for(;++C<S;)(j||h<m)&&(W[tt+i[C]]=t[h++]);return W}function se(t,e){var i=-1,s=t.length;for(e||(e=O(s));++i<s;)e[i]=t[i];return e}function Fe(t,e,i,s){var h=!i;i||(i={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=s?s(i[S],t[S],S,i,t):n;E===n&&(E=t[S]),h?Xe(i,S,E):fr(i,S,E)}return i}function jd(t,e){return Fe(t,jo(t),e)}function Yd(t,e){return Fe(t,jc(t),e)}function oi(t,e){return function(i,s){var h=lt(i)?ep:md,m=e?e():{};return h(i,t,it(s,2),m)}}function zn(t){return yt(function(e,i){var s=-1,h=i.length,m=h>1?i[h-1]:n,C=h>2?i[2]:n;for(m=t.length>3&&typeof m=="function"?(h--,m):n,C&&re(i[0],i[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++s<h;){var S=i[s];S&&t(e,S,s,m)}return e})}function Pc(t,e){return function(i,s){if(i==null)return i;if(!ae(i))return t(i,s);for(var h=i.length,m=e?h:-1,C=Tt(i);(e?m--:++m<h)&&s(C[m],m,C)!==!1;);return i}}function Fc(t){return function(e,i,s){for(var h=-1,m=Tt(e),C=s(e),S=C.length;S--;){var E=C[t?S:++h];if(i(m[E],E,m)===!1)break}return e}}function Vd(t,e,i){var s=e&k,h=gr(t);function m(){var C=this&&this!==Gt&&this instanceof m?h:t;return C.apply(s?i:this,arguments)}return m}function Mc(t){return function(e){e=At(e);var i=Pn(e)?Re(e):n,s=i?i[0]:e.charAt(0),h=i?hn(i,1).join(""):e.slice(1);return s[t]()+h}}function Xn(t){return function(e){return lo(Pu(Du(e).replace(Wl,"")),t,"")}}function gr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var i=Kn(t.prototype),s=t.apply(i,e);return Bt(s)?s:i}}function Zd(t,e,i){var s=gr(t);function h(){for(var m=arguments.length,C=O(m),S=m,E=Gn(h);S--;)C[S]=arguments[S];var M=m<3&&C[0]!==E&&C[m-1]!==E?[]:sn(C,E);if(m-=M.length,m<i)return zc(t,e,si,h.placeholder,n,C,M,n,n,i-m);var q=this&&this!==Gt&&this instanceof h?s:t;return le(q,this,C)}return h}function qc(t){return function(e,i,s){var h=Tt(e);if(!ae(e)){var m=it(i,3);e=Kt(e),i=function(S){return m(h[S],S,h)}}var C=t(e,i,s);return C>-1?h[m?e[C]:C]:n}}function Wc(t){return $e(function(e){var i=e.length,s=i,h=Ce.prototype.thru;for(t&&e.reverse();s--;){var m=e[s];if(typeof m!="function")throw new be(v);if(h&&!C&&fi(m)=="wrapper")var C=new Ce([],!0)}for(s=C?s:i;++s<i;){m=e[s];var S=fi(m),E=S=="wrapper"?$o(m):n;E&&Vo(E[0])&&E[1]==(I|J|U|P)&&!E[4].length&&E[9]==1?C=C[fi(E[0])].apply(C,E[3]):C=m.length==1&&Vo(m)?C[S]():C.thru(m)}return function(){var M=arguments,q=M[0];if(C&&M.length==1&<(q))return C.plant(q).value();for(var W=0,j=i?e[W].apply(this,M):q;++W<i;)j=e[W].call(this,j);return j}})}function si(t,e,i,s,h,m,C,S,E,M){var q=e&I,W=e&k,j=e&L,tt=e&(J|N),ot=e&R,gt=j?n:gr(t);function st(){for(var vt=arguments.length,wt=O(vt),ye=vt;ye--;)wt[ye]=arguments[ye];if(tt)var ie=Gn(st),ve=fp(wt,ie);if(s&&(wt=Uc(wt,s,h,tt)),m&&(wt=Dc(wt,m,C,tt)),vt-=ve,tt&&vt<M){var Pt=sn(wt,ie);return zc(t,e,si,st.placeholder,i,wt,Pt,S,E,M-vt)}var Ne=W?i:this,Ve=j?Ne[t]:t;return vt=wt.length,S?wt=mg(wt,S):ot&&vt>1&&wt.reverse(),q&&E<vt&&(wt.length=E),this&&this!==Gt&&this instanceof st&&(Ve=gt||gr(Ve)),Ve.apply(Ne,wt)}return st}function Hc(t,e){return function(i,s){return xd(i,t,e(s),{})}}function ai(t,e){return function(i,s){var h;if(i===n&&s===n)return e;if(i!==n&&(h=i),s!==n){if(h===n)return s;typeof i=="string"||typeof s=="string"?(i=de(i),s=de(s)):(i=Ec(i),s=Ec(s)),h=t(i,s)}return h}}function Ko(t){return $e(function(e){return e=Nt(e,pe(it())),yt(function(i){var s=this;return t(e,function(h){return le(h,s,i)})})})}function ci(t,e){e=e===n?" ":de(e);var i=e.length;if(i<2)return i?Do(e,t):e;var s=Do(e,Jr(t/Fn(e)));return Pn(e)?hn(Re(s),0,t).join(""):s.slice(0,t)}function Qd(t,e,i,s){var h=e&k,m=gr(t);function C(){for(var S=-1,E=arguments.length,M=-1,q=s.length,W=O(q+E),j=this&&this!==Gt&&this instanceof C?m:t;++M<q;)W[M]=s[M];for(;E--;)W[M++]=arguments[++S];return le(j,h?i:this,W)}return C}function Kc(t){return function(e,i,s){return s&&typeof s!="number"&&re(e,i,s)&&(i=s=n),e=Ye(e),i===n?(i=e,e=0):i=Ye(i),s=s===n?e<i?1:-1:Ye(s),Fd(e,i,s,t)}}function ui(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=xe(e),i=xe(i)),t(e,i)}}function zc(t,e,i,s,h,m,C,S,E,M){var q=e&J,W=q?C:n,j=q?n:C,tt=q?m:n,ot=q?n:m;e|=q?U:T,e&=~(q?T:U),e&Y||(e&=~(k|L));var gt=[t,e,h,tt,W,ot,j,S,E,M],st=i.apply(n,gt);return Vo(t)&&nu(st,gt),st.placeholder=s,ru(st,t,e)}function zo(t){var e=qt[t];return function(i,s){if(i=xe(i),s=s==null?0:Zt(dt(s),292),s&&rc(i)){var h=(At(i)+"e").split("e"),m=e(h[0]+"e"+(+h[1]+s));return h=(At(m)+"e").split("e"),+(h[0]+"e"+(+h[1]-s))}return e(i)}}var tg=Wn&&1/Fr(new Wn([,-0]))[1]==xt?function(t){return new Wn(t)}:ls;function Xc(t){return function(e){var i=Qt(e);return i==It?wo(e):i==ee?vp(e):up(e,t(e))}}function Ge(t,e,i,s,h,m,C,S){var E=e&L;if(!E&&typeof t!="function")throw new be(v);var M=s?s.length:0;if(M||(e&=~(U|T),s=h=n),C=C===n?C:Wt(dt(C),0),S=S===n?S:dt(S),M-=h?h.length:0,e&T){var q=s,W=h;s=h=n}var j=E?n:$o(t),tt=[t,e,i,s,h,q,W,m,C,S];if(j&&gg(tt,j),t=tt[0],e=tt[1],i=tt[2],s=tt[3],h=tt[4],S=tt[9]=tt[9]===n?E?0:t.length:Wt(tt[9]-M,0),!S&&e&(J|N)&&(e&=~(J|N)),!e||e==k)var ot=Vd(t,e,i);else e==J||e==N?ot=Zd(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Qd(t,e,i,s):ot=si.apply(n,tt);var gt=j?Ac:nu;return ru(gt(ot,tt),t,e)}function Gc(t,e,i,s){return t===n||Ie(t,qn[i])&&!Et.call(s,i)?e:t}function $c(t,e,i,s,h,m){return Bt(t)&&Bt(e)&&(m.set(e,t),ni(t,e,n,$c,m),m.delete(e)),t}function eg(t){return mr(t)?n:t}function Jc(t,e,i,s,h,m){var C=i&w,S=t.length,E=e.length;if(S!=E&&!(C&&E>S))return!1;var M=m.get(t),q=m.get(e);if(M&&q)return M==e&&q==t;var W=-1,j=!0,tt=i&A?new _n:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],gt=e[W];if(s)var st=C?s(gt,ot,W,e,t,m):s(ot,gt,W,t,e,m);if(st!==n){if(st)continue;j=!1;break}if(tt){if(!po(e,function(vt,wt){if(!ir(tt,wt)&&(ot===vt||h(ot,vt,i,s,m)))return tt.push(wt)})){j=!1;break}}else if(!(ot===gt||h(ot,gt,i,s,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function ng(t,e,i,s,h,m,C){switch(i){case Ln:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nn:return!(t.byteLength!=e.byteLength||!m(new zr(t),new zr(e)));case et:case nt:case Te:return Ie(+t,+e);case at:return t.name==e.name&&t.message==e.message;case te:case Ue:return t==e+"";case It:var S=wo;case ee:var E=s&w;if(S||(S=Fr),t.size!=e.size&&!E)return!1;var M=C.get(t);if(M)return M==e;s|=A,C.set(t,e);var q=Jc(S(t),S(e),s,h,m,C);return C.delete(t),q;case De:if(ur)return ur.call(t)==ur.call(e)}return!1}function rg(t,e,i,s,h,m){var C=i&w,S=Xo(t),E=S.length,M=Xo(e),q=M.length;if(E!=q&&!C)return!1;for(var W=E;W--;){var j=S[W];if(!(C?j in e:Et.call(e,j)))return!1}var tt=m.get(t),ot=m.get(e);if(tt&&ot)return tt==e&&ot==t;var gt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){j=S[W];var vt=t[j],wt=e[j];if(s)var ye=C?s(wt,vt,j,e,t,m):s(vt,wt,j,t,e,m);if(!(ye===n?vt===wt||h(vt,wt,i,s,m):ye)){gt=!1;break}st||(st=j=="constructor")}if(gt&&!st){var ie=t.constructor,ve=e.constructor;ie!=ve&&"constructor"in t&&"constructor"in e&&!(typeof ie=="function"&&ie instanceof ie&&typeof ve=="function"&&ve instanceof ve)&&(gt=!1)}return m.delete(t),m.delete(e),gt}function $e(t){return Qo(tu(t,n,uu),t+"")}function Xo(t){return dc(t,Kt,jo)}function Go(t){return dc(t,ce,jc)}var $o=Yr?function(t){return Yr.get(t)}:ls;function fi(t){for(var e=t.name+"",i=Hn[e],s=Et.call(Hn,e)?i.length:0;s--;){var h=i[s],m=h.func;if(m==null||m==t)return h.name}return e}function Gn(t){var e=Et.call(y,"placeholder")?y:t;return e.placeholder}function it(){var t=y.iteratee||fs;return t=t===fs?vc:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(t,e){var i=t.__data__;return hg(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Jo(t){for(var e=Kt(t),i=e.length;i--;){var s=e[i],h=t[s];e[i]=[s,h,Zc(h)]}return e}function Cn(t,e){var i=dp(t,e);return yc(i)?i:n}function ig(t){var e=Et.call(t,vn),i=t[vn];try{t[vn]=n;var s=!0}catch{}var h=Hr.call(t);return s&&(e?t[vn]=i:delete t[vn]),h}var jo=Co?function(t){return t==null?[]:(t=Tt(t),rn(Co(t),function(e){return ec.call(t,e)}))}:ps,jc=Co?function(t){for(var e=[];t;)on(e,jo(t)),t=Xr(t);return e}:ps,Qt=ne;(So&&Qt(new So(new ArrayBuffer(1)))!=Ln||sr&&Qt(new sr)!=It||ko&&Qt(ko.resolve())!=Bn||Wn&&Qt(new Wn)!=ee||ar&&Qt(new ar)!=He)&&(Qt=function(t){var e=ne(t),i=e==he?t.constructor:n,s=i?Sn(i):"";if(s)switch(s){case qp:return Ln;case Wp:return It;case Hp:return Bn;case Kp:return ee;case zp:return He}return e});function og(t,e,i){for(var s=-1,h=i.length;++s<h;){var m=i[s],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=Zt(e,t+C);break;case"takeRight":t=Wt(t,e-C);break}}return{start:t,end:e}}function sg(t){var e=t.match(ll);return e?e[1].split(pl):[]}function Yc(t,e,i){e=fn(e,t);for(var s=-1,h=e.length,m=!1;++s<h;){var C=Me(e[s]);if(!(m=t!=null&&i(t,C)))break;t=t[C]}return m||++s!=h?m:(h=t==null?0:t.length,!!h&&mi(h)&&Je(C,h)&&(lt(t)||kn(t)))}function ag(t){var e=t.length,i=new t.constructor(e);return e&&typeof t[0]=="string"&&Et.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function Vc(t){return typeof t.constructor=="function"&&!yr(t)?Kn(Xr(t)):{}}function cg(t,e,i){var s=t.constructor;switch(e){case nn:return Ho(t);case et:case nt:return new s(+t);case Ln:return Xd(t,i);case $i:case Ji:case ji:case Yi:case Vi:case Zi:case Qi:case to:case eo:return Bc(t,i);case It:return new s;case Te:case Ue:return new s(t);case te:return Gd(t);case ee:return new s;case De:return $d(t)}}function ug(t,e){var i=e.length;if(!i)return t;var s=i-1;return e[s]=(i>1?"& ":"")+e[s],e=e.join(i>2?", ":" "),t.replace(hl,`{
|
|
14
14
|
/* [wrapped with `+e+`] */
|
|
15
|
-
`)}function ng(t){return lt(t)||Sn(t)||!!(Qa&&t&&t[Qa])}function $e(t,e){var i=typeof t;return e=e??ct,!!e&&(i=="number"||i!="symbol"&&dl.test(t))&&t>-1&&t%1==0&&t<e}function ne(t,e,i){if(!Bt(i))return!1;var s=typeof e;return(s=="number"?se(i)&&$e(e,i.length):s=="string"&&e in i)?Oe(i[e],t):!1}function Jo(t,e){if(lt(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||de(t)?!0:Qh.test(t)||!Zh.test(t)||e!=null&&t in Tt(e)}function rg(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function jo(t){var e=ui(t),i=y[e];if(typeof i!="function"||!(e in mt.prototype))return!1;if(t===i)return!0;var s=Xo(i);return!!s&&t===s[0]}function ig(t){return!!ja&&ja in t}var og=Fr?Je:ls;function gr(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Mn;return t===i}function ju(t){return t===t&&!Bt(t)}function Yu(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Tt(i))}}function sg(t){var e=di(t,function(s){return i.size===p&&i.clear(),s}),i=e.cache;return e}function ag(t,e){var i=t[1],s=e[1],h=i|s,m=h<(k|L|I),C=s==I&&i==J||s==I&&i==P&&t[7].length<=e[8]||s==(I|P)&&e[7].length<=e[8]&&i==J;if(!(m||C))return t;s&k&&(t[2]=e[2],h|=i&k?0:Y);var S=e[3];if(S){var E=t[3];t[3]=E?Nu(E,S,e[4]):S,t[4]=E?on(t[3],_):e[4]}return S=e[5],S&&(E=t[5],t[5]=E?Bu(E,S,e[6]):S,t[6]=E?on(t[5],_):e[6]),S=e[7],S&&(t[7]=S),s&I&&(t[8]=t[8]==null?e[8]:Vt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function ug(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function cg(t){return qr.call(t)}function Vu(t,e,i){return e=Wt(e===n?t.length-1:e,0),function(){for(var s=arguments,h=-1,m=Wt(s.length-e,0),C=O(m);++h<m;)C[h]=s[e+h];h=-1;for(var S=O(e+1);++h<e;)S[h]=s[h];return S[e]=i(C),he(t,this,S)}}function Zu(t,e){return e.length<2?t:wn(t,Se(e,0,-1))}function fg(t,e){for(var i=t.length,s=Vt(e.length,i),h=oe(t);s--;){var m=e[s];t[s]=$e(m,i)?h[m]:n}return t}function Yo(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Qu=ec(Cu),yr=Ap||function(t,e){return Xt.setTimeout(t,e)},Vo=ec(Bd);function tc(t,e,i){var s=e+"";return Vo(t,eg(s,hg(Zd(s),i)))}function ec(t){var e=0,i=0;return function(){var s=Rp(),h=G-(s-i);if(i=s,h>0){if(++e>=z)return arguments[0]}else e=0;return t.apply(n,arguments)}}function fi(t,e){var i=-1,s=t.length,h=s-1;for(e=e===n?s:e;++i<e;){var m=Bo(i,h),C=t[m];t[m]=t[i],t[i]=C}return t.length=e,t}var nc=sg(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(tl,function(i,s,h,m){e.push(h?m.replace(ul,"$1"):s||i)}),e});function Fe(t){if(typeof t=="string"||de(t))return t;var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function Cn(t){if(t!=null){try{return Mr.call(t)}catch{}try{return t+""}catch{}}return""}function hg(t,e){return _e(Q,function(i){var s="_."+i[0];e&i[1]&&!Lr(t,s)&&t.push(s)}),t.sort()}function rc(t){if(t instanceof mt)return t.clone();var e=new be(t.__wrapped__,t.__chain__);return e.__actions__=oe(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function lg(t,e,i){(i?ne(t,e,i):e===n)?e=1:e=Wt(dt(e),0);var s=t==null?0:t.length;if(!s||e<1)return[];for(var h=0,m=0,C=O(Gr(s/e));h<s;)C[m++]=Se(t,h,h+=e);return C}function pg(t){for(var e=-1,i=t==null?0:t.length,s=0,h=[];++e<i;){var m=t[e];m&&(h[s++]=m)}return h}function dg(){var t=arguments.length;if(!t)return[];for(var e=O(t-1),i=arguments[0],s=t;s--;)e[s-1]=arguments[s];return rn(lt(i)?oe(i):[i],Gt(e,1))}var gg=yt(function(t,e){return Dt(t)?fr(t,Gt(e,1,Dt,!0)):[]}),yg=yt(function(t,e){var i=ke(e);return Dt(i)&&(i=n),Dt(t)?fr(t,Gt(e,1,Dt,!0),it(i,2)):[]}),vg=yt(function(t,e){var i=ke(e);return Dt(i)&&(i=n),Dt(t)?fr(t,Gt(e,1,Dt,!0),n,i):[]});function mg(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),Se(t,e<0?0:e,s)):[]}function _g(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,Se(t,0,e<0?0:e)):[]}function wg(t,e){return t&&t.length?ni(t,it(e,3),!0,!0):[]}function bg(t,e){return t&&t.length?ni(t,it(e,3),!0):[]}function Cg(t,e,i,s){var h=t==null?0:t.length;return h?(i&&typeof i!="number"&&ne(t,e,i)&&(i=0,s=h),dd(t,e,i,s)):[]}function ic(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:dt(i);return h<0&&(h=Wt(s+h,0)),Ur(t,it(e,3),h)}function oc(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s-1;return i!==n&&(h=dt(i),h=i<0?Wt(s+h,0):Vt(h,s-1)),Ur(t,it(e,3),h,!0)}function sc(t){var e=t==null?0:t.length;return e?Gt(t,1):[]}function Sg(t){var e=t==null?0:t.length;return e?Gt(t,xt):[]}function kg(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:dt(e),Gt(t,e)):[]}function Ag(t){for(var e=-1,i=t==null?0:t.length,s={};++e<i;){var h=t[e];s[h[0]]=h[1]}return s}function ac(t){return t&&t.length?t[0]:n}function xg(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:dt(i);return h<0&&(h=Wt(s+h,0)),Un(t,e,h)}function Eg(t){var e=t==null?0:t.length;return e?Se(t,0,-1):[]}var Tg=yt(function(t){var e=Nt(t,Fo);return e.length&&e[0]===t[0]?To(e):[]}),Rg=yt(function(t){var e=ke(t),i=Nt(t,Fo);return e===ke(i)?e=n:i.pop(),i.length&&i[0]===t[0]?To(i,it(e,2)):[]}),Og=yt(function(t){var e=ke(t),i=Nt(t,Fo);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?To(i,n,e):[]});function Ig(t,e){return t==null?"":Ep.call(t,e)}function ke(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Ng(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s;return i!==n&&(h=dt(i),h=h<0?Wt(s+h,0):Vt(h,s-1)),e===e?hp(t,e,h):Ur(t,Wa,h,!0)}function Bg(t,e){return t&&t.length?mu(t,dt(e)):n}var Lg=yt(uc);function uc(t,e){return t&&t.length&&e&&e.length?No(t,e):t}function Ug(t,e,i){return t&&t.length&&e&&e.length?No(t,e,it(i,2)):t}function Dg(t,e,i){return t&&t.length&&e&&e.length?No(t,e,n,i):t}var Pg=Ge(function(t,e){var i=t==null?0:t.length,s=ko(t,e);return bu(t,Nt(e,function(h){return $e(h,i)?+h:h}).sort(Iu)),s});function Fg(t,e){var i=[];if(!(t&&t.length))return i;var s=-1,h=[],m=t.length;for(e=it(e,3);++s<m;){var C=t[s];e(C,s,t)&&(i.push(C),h.push(s))}return bu(t,h),i}function Zo(t){return t==null?t:Ip.call(t)}function Mg(t,e,i){var s=t==null?0:t.length;return s?(i&&typeof i!="number"&&ne(t,e,i)?(e=0,i=s):(e=e==null?0:dt(e),i=i===n?s:dt(i)),Se(t,e,i)):[]}function qg(t,e){return ei(t,e)}function Wg(t,e,i){return Uo(t,e,it(i,2))}function Hg(t,e){var i=t==null?0:t.length;if(i){var s=ei(t,e);if(s<i&&Oe(t[s],e))return s}return-1}function Kg(t,e){return ei(t,e,!0)}function zg(t,e,i){return Uo(t,e,it(i,2),!0)}function Xg(t,e){var i=t==null?0:t.length;if(i){var s=ei(t,e,!0)-1;if(Oe(t[s],e))return s}return-1}function Gg(t){return t&&t.length?Su(t):[]}function $g(t,e){return t&&t.length?Su(t,it(e,2)):[]}function Jg(t){var e=t==null?0:t.length;return e?Se(t,1,e):[]}function jg(t,e,i){return t&&t.length?(e=i||e===n?1:dt(e),Se(t,0,e<0?0:e)):[]}function Yg(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,Se(t,e<0?0:e,s)):[]}function Vg(t,e){return t&&t.length?ni(t,it(e,3),!1,!0):[]}function Zg(t,e){return t&&t.length?ni(t,it(e,3)):[]}var Qg=yt(function(t){return un(Gt(t,1,Dt,!0))}),ty=yt(function(t){var e=ke(t);return Dt(e)&&(e=n),un(Gt(t,1,Dt,!0),it(e,2))}),ey=yt(function(t){var e=ke(t);return e=typeof e=="function"?e:n,un(Gt(t,1,Dt,!0),n,e)});function ny(t){return t&&t.length?un(t):[]}function ry(t,e){return t&&t.length?un(t,it(e,2)):[]}function iy(t,e){return e=typeof e=="function"?e:n,t&&t.length?un(t,n,e):[]}function Qo(t){if(!(t&&t.length))return[];var e=0;return t=nn(t,function(i){if(Dt(i))return e=Wt(i.length,e),!0}),yo(e,function(i){return Nt(t,lo(i))})}function cc(t,e){if(!(t&&t.length))return[];var i=Qo(t);return e==null?i:Nt(i,function(s){return he(e,n,s)})}var oy=yt(function(t,e){return Dt(t)?fr(t,e):[]}),sy=yt(function(t){return Po(nn(t,Dt))}),ay=yt(function(t){var e=ke(t);return Dt(e)&&(e=n),Po(nn(t,Dt),it(e,2))}),uy=yt(function(t){var e=ke(t);return e=typeof e=="function"?e:n,Po(nn(t,Dt),n,e)}),cy=yt(Qo);function fy(t,e){return Eu(t||[],e||[],cr)}function hy(t,e){return Eu(t||[],e||[],pr)}var ly=yt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,cc(t,i)});function fc(t){var e=y(t);return e.__chain__=!0,e}function py(t,e){return e(t),t}function hi(t,e){return e(t)}var dy=Ge(function(t){var e=t.length,i=e?t[0]:0,s=this.__wrapped__,h=function(m){return ko(m,t)};return e>1||this.__actions__.length||!(s instanceof mt)||!$e(i)?this.thru(h):(s=s.slice(i,+i+(e?1:0)),s.__actions__.push({func:hi,args:[h],thisArg:n}),new be(s,this.__chain__).thru(function(m){return e&&!m.length&&m.push(n),m}))});function gy(){return fc(this)}function yy(){return new be(this.value(),this.__chain__)}function vy(){this.__values__===n&&(this.__values__=kc(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function my(){return this}function _y(t){for(var e,i=this;i instanceof Yr;){var s=rc(i);s.__index__=0,s.__values__=n,e?h.__wrapped__=s:e=s;var h=s;i=i.__wrapped__}return h.__wrapped__=t,e}function wy(){var t=this.__wrapped__;if(t instanceof mt){var e=t;return this.__actions__.length&&(e=new mt(this)),e=e.reverse(),e.__actions__.push({func:hi,args:[Zo],thisArg:n}),new be(e,this.__chain__)}return this.thru(Zo)}function by(){return xu(this.__wrapped__,this.__actions__)}var Cy=ri(function(t,e,i){Et.call(t,i)?++t[i]:ze(t,i,1)});function Sy(t,e,i){var s=lt(t)?Ma:pd;return i&&ne(t,e,i)&&(e=n),s(t,it(e,3))}function ky(t,e){var i=lt(t)?nn:cu;return i(t,it(e,3))}var Ay=Pu(ic),xy=Pu(oc);function Ey(t,e){return Gt(li(t,e),1)}function Ty(t,e){return Gt(li(t,e),xt)}function Ry(t,e,i){return i=i===n?1:dt(i),Gt(li(t,e),i)}function hc(t,e){var i=lt(t)?_e:an;return i(t,it(e,3))}function lc(t,e){var i=lt(t)?Jl:uu;return i(t,it(e,3))}var Oy=ri(function(t,e,i){Et.call(t,i)?t[i].push(e):ze(t,i,[e])});function Iy(t,e,i,s){t=se(t)?t:$n(t),i=i&&!s?dt(i):0;var h=t.length;return i<0&&(i=Wt(h+i,0)),vi(t)?i<=h&&t.indexOf(e,i)>-1:!!h&&Un(t,e,i)>-1}var Ny=yt(function(t,e,i){var s=-1,h=typeof e=="function",m=se(t)?O(t.length):[];return an(t,function(C){m[++s]=h?he(e,C,i):hr(C,e,i)}),m}),By=ri(function(t,e,i){ze(t,i,e)});function li(t,e){var i=lt(t)?Nt:gu;return i(t,it(e,3))}function Ly(t,e,i,s){return t==null?[]:(lt(e)||(e=e==null?[]:[e]),i=s?n:i,lt(i)||(i=i==null?[]:[i]),_u(t,e,i))}var Uy=ri(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Dy(t,e,i){var s=lt(t)?fo:Ka,h=arguments.length<3;return s(t,it(e,4),i,h,an)}function Py(t,e,i){var s=lt(t)?jl:Ka,h=arguments.length<3;return s(t,it(e,4),i,h,uu)}function Fy(t,e){var i=lt(t)?nn:cu;return i(t,gi(it(e,3)))}function My(t){var e=lt(t)?iu:Id;return e(t)}function qy(t,e,i){(i?ne(t,e,i):e===n)?e=1:e=dt(e);var s=lt(t)?ud:Nd;return s(t,e)}function Wy(t){var e=lt(t)?cd:Ld;return e(t)}function Hy(t){if(t==null)return 0;if(se(t))return vi(t)?Pn(t):t.length;var e=Zt(t);return e==It||e==te?t.size:Oo(t).length}function Ky(t,e,i){var s=lt(t)?ho:Ud;return i&&ne(t,e,i)&&(e=n),s(t,it(e,3))}var zy=yt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&ne(t,e[0],e[1])?e=[]:i>2&&ne(e[0],e[1],e[2])&&(e=[e[0]]),_u(t,Gt(e,1),[])}),pi=kp||function(){return Xt.Date.now()};function Xy(t,e){if(typeof e!="function")throw new we(v);return t=dt(t),function(){if(--t<1)return e.apply(this,arguments)}}function pc(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,Xe(t,I,n,n,n,n,e)}function dc(t,e){var i;if(typeof e!="function")throw new we(v);return t=dt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var ts=yt(function(t,e,i){var s=k;if(i.length){var h=on(i,Xn(ts));s|=U}return Xe(t,s,e,i,h)}),gc=yt(function(t,e,i){var s=k|L;if(i.length){var h=on(i,Xn(gc));s|=U}return Xe(e,s,t,i,h)});function yc(t,e,i){e=i?n:e;var s=Xe(t,J,n,n,n,n,n,e);return s.placeholder=yc.placeholder,s}function vc(t,e,i){e=i?n:e;var s=Xe(t,N,n,n,n,n,n,e);return s.placeholder=vc.placeholder,s}function mc(t,e,i){var s,h,m,C,S,E,M=0,q=!1,W=!1,j=!0;if(typeof t!="function")throw new we(v);e=Ae(e)||0,Bt(i)&&(q=!!i.leading,W="maxWait"in i,m=W?Wt(Ae(i.maxWait)||0,e):m,j="trailing"in i?!!i.trailing:j);function tt(Pt){var Ie=s,Ye=h;return s=h=n,M=Pt,C=t.apply(Ye,Ie),C}function ot(Pt){return M=Pt,S=yr(vt,e),q?tt(Pt):C}function gt(Pt){var Ie=Pt-E,Ye=Pt-M,Pc=e-Ie;return W?Vt(Pc,m-Ye):Pc}function st(Pt){var Ie=Pt-E,Ye=Pt-M;return E===n||Ie>=e||Ie<0||W&&Ye>=m}function vt(){var Pt=pi();if(st(Pt))return wt(Pt);S=yr(vt,gt(Pt))}function wt(Pt){return S=n,j&&s?tt(Pt):(s=h=n,C)}function ge(){S!==n&&Tu(S),M=0,s=E=h=S=n}function re(){return S===n?C:wt(pi())}function ye(){var Pt=pi(),Ie=st(Pt);if(s=arguments,h=this,E=Pt,Ie){if(S===n)return ot(E);if(W)return Tu(S),S=yr(vt,e),tt(E)}return S===n&&(S=yr(vt,e)),C}return ye.cancel=ge,ye.flush=re,ye}var Gy=yt(function(t,e){return au(t,1,e)}),$y=yt(function(t,e,i){return au(t,Ae(e)||0,i)});function Jy(t){return Xe(t,R)}function di(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new we(v);var i=function(){var s=arguments,h=e?e.apply(this,s):s[0],m=i.cache;if(m.has(h))return m.get(h);var C=t.apply(this,s);return i.cache=m.set(h,C)||m,C};return i.cache=new(di.Cache||Ke),i}di.Cache=Ke;function gi(t){if(typeof t!="function")throw new we(v);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function jy(t){return dc(2,t)}var Yy=Dd(function(t,e){e=e.length==1&<(e[0])?Nt(e[0],le(it())):Nt(Gt(e,1),le(it()));var i=e.length;return yt(function(s){for(var h=-1,m=Vt(s.length,i);++h<m;)s[h]=e[h].call(this,s[h]);return he(t,this,s)})}),es=yt(function(t,e){var i=on(e,Xn(es));return Xe(t,U,n,e,i)}),_c=yt(function(t,e){var i=on(e,Xn(_c));return Xe(t,T,n,e,i)}),Vy=Ge(function(t,e){return Xe(t,P,n,n,n,e)});function Zy(t,e){if(typeof t!="function")throw new we(v);return e=e===n?e:dt(e),yt(t,e)}function Qy(t,e){if(typeof t!="function")throw new we(v);return e=e==null?0:Wt(dt(e),0),yt(function(i){var s=i[e],h=fn(i,0,e);return s&&rn(h,s),he(t,this,h)})}function tv(t,e,i){var s=!0,h=!0;if(typeof t!="function")throw new we(v);return Bt(i)&&(s="leading"in i?!!i.leading:s,h="trailing"in i?!!i.trailing:h),mc(t,e,{leading:s,maxWait:e,trailing:h})}function ev(t){return pc(t,1)}function nv(t,e){return es(Mo(e),t)}function rv(){if(!arguments.length)return[];var t=arguments[0];return lt(t)?t:[t]}function iv(t){return Ce(t,u)}function ov(t,e){return e=typeof e=="function"?e:n,Ce(t,u,e)}function sv(t){return Ce(t,g|u)}function av(t,e){return e=typeof e=="function"?e:n,Ce(t,g|u,e)}function uv(t,e){return e==null||su(t,e,Kt(e))}function Oe(t,e){return t===e||t!==t&&e!==e}var cv=ai(Eo),fv=ai(function(t,e){return t>=e}),Sn=lu(function(){return arguments}())?lu:function(t){return Lt(t)&&Et.call(t,"callee")&&!Za.call(t,"callee")},lt=O.isArray,hv=Ba?le(Ba):_d;function se(t){return t!=null&&yi(t.length)&&!Je(t)}function Dt(t){return Lt(t)&&se(t)}function lv(t){return t===!0||t===!1||Lt(t)&&ee(t)==et}var hn=xp||ls,pv=La?le(La):wd;function dv(t){return Lt(t)&&t.nodeType===1&&!vr(t)}function gv(t){if(t==null)return!0;if(se(t)&&(lt(t)||typeof t=="string"||typeof t.splice=="function"||hn(t)||Gn(t)||Sn(t)))return!t.length;var e=Zt(t);if(e==It||e==te)return!t.size;if(gr(t))return!Oo(t).length;for(var i in t)if(Et.call(t,i))return!1;return!0}function yv(t,e){return lr(t,e)}function vv(t,e,i){i=typeof i=="function"?i:n;var s=i?i(t,e):n;return s===n?lr(t,e,n,i):!!s}function ns(t){if(!Lt(t))return!1;var e=ee(t);return e==at||e==Z||typeof t.message=="string"&&typeof t.name=="string"&&!vr(t)}function mv(t){return typeof t=="number"&&tu(t)}function Je(t){if(!Bt(t))return!1;var e=ee(t);return e==kt||e==Yt||e==K||e==tr}function wc(t){return typeof t=="number"&&t==dt(t)}function yi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ct}function Bt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lt(t){return t!=null&&typeof t=="object"}var bc=Ua?le(Ua):Cd;function _v(t,e){return t===e||Ro(t,e,Go(e))}function wv(t,e,i){return i=typeof i=="function"?i:n,Ro(t,e,Go(e),i)}function bv(t){return Cc(t)&&t!=+t}function Cv(t){if(og(t))throw new ft(f);return pu(t)}function Sv(t){return t===null}function kv(t){return t==null}function Cc(t){return typeof t=="number"||Lt(t)&&ee(t)==Ee}function vr(t){if(!Lt(t)||ee(t)!=fe)return!1;var e=Kr(t);if(e===null)return!0;var i=Et.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Mr.call(i)==wp}var rs=Da?le(Da):Sd;function Av(t){return wc(t)&&t>=-ct&&t<=ct}var Sc=Pa?le(Pa):kd;function vi(t){return typeof t=="string"||!lt(t)&&Lt(t)&&ee(t)==Le}function de(t){return typeof t=="symbol"||Lt(t)&&ee(t)==Ue}var Gn=Fa?le(Fa):Ad;function xv(t){return t===n}function Ev(t){return Lt(t)&&Zt(t)==We}function Tv(t){return Lt(t)&&ee(t)==nr}var Rv=ai(Io),Ov=ai(function(t,e){return t<=e});function kc(t){if(!t)return[];if(se(t))return vi(t)?Te(t):oe(t);if(ir&&t[ir])return up(t[ir]());var e=Zt(t),i=e==It?mo:e==te?Dr:$n;return i(t)}function je(t){if(!t)return t===0?t:0;if(t=Ae(t),t===xt||t===-xt){var e=t<0?-1:1;return e*jt}return t===t?t:0}function dt(t){var e=je(t),i=e%1;return e===e?i?e-i:e:0}function Ac(t){return t?_n(dt(t),0,ce):0}function Ae(t){if(typeof t=="number")return t;if(de(t))return Be;if(Bt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Bt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=za(t);var i=hl.test(t);return i||pl.test(t)?Xl(t.slice(2),i?2:8):fl.test(t)?Be:+t}function xc(t){return Pe(t,ae(t))}function Iv(t){return t?_n(dt(t),-ct,ct):t===0?t:0}function At(t){return t==null?"":pe(t)}var Nv=Kn(function(t,e){if(gr(e)||se(e)){Pe(e,Kt(e),t);return}for(var i in e)Et.call(e,i)&&cr(t,i,e[i])}),Ec=Kn(function(t,e){Pe(e,ae(e),t)}),mi=Kn(function(t,e,i,s){Pe(e,ae(e),t,s)}),Bv=Kn(function(t,e,i,s){Pe(e,Kt(e),t,s)}),Lv=Ge(ko);function Uv(t,e){var i=Hn(t);return e==null?i:ou(i,e)}var Dv=yt(function(t,e){t=Tt(t);var i=-1,s=e.length,h=s>2?e[2]:n;for(h&&ne(e[0],e[1],h)&&(s=1);++i<s;)for(var m=e[i],C=ae(m),S=-1,E=C.length;++S<E;){var M=C[S],q=t[M];(q===n||Oe(q,Mn[M])&&!Et.call(t,M))&&(t[M]=m[M])}return t}),Pv=yt(function(t){return t.push(n,zu),he(Tc,n,t)});function Fv(t,e){return qa(t,it(e,3),De)}function Mv(t,e){return qa(t,it(e,3),xo)}function qv(t,e){return t==null?t:Ao(t,it(e,3),ae)}function Wv(t,e){return t==null?t:fu(t,it(e,3),ae)}function Hv(t,e){return t&&De(t,it(e,3))}function Kv(t,e){return t&&xo(t,it(e,3))}function zv(t){return t==null?[]:Qr(t,Kt(t))}function Xv(t){return t==null?[]:Qr(t,ae(t))}function is(t,e,i){var s=t==null?n:wn(t,e);return s===n?i:s}function Gv(t,e){return t!=null&&$u(t,e,gd)}function os(t,e){return t!=null&&$u(t,e,yd)}var $v=Mu(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=qr.call(e)),t[e]=i},as(ue)),Jv=Mu(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=qr.call(e)),Et.call(t,e)?t[e].push(i):t[e]=[i]},it),jv=yt(hr);function Kt(t){return se(t)?ru(t):Oo(t)}function ae(t){return se(t)?ru(t,!0):xd(t)}function Yv(t,e){var i={};return e=it(e,3),De(t,function(s,h,m){ze(i,e(s,h,m),s)}),i}function Vv(t,e){var i={};return e=it(e,3),De(t,function(s,h,m){ze(i,h,e(s,h,m))}),i}var Zv=Kn(function(t,e,i){ti(t,e,i)}),Tc=Kn(function(t,e,i,s){ti(t,e,i,s)}),Qv=Ge(function(t,e){var i={};if(t==null)return i;var s=!1;e=Nt(e,function(m){return m=cn(m,t),s||(s=m.length>1),m}),Pe(t,zo(t),i),s&&(i=Ce(i,g|l|u,$d));for(var h=e.length;h--;)Do(i,e[h]);return i});function t0(t,e){return Rc(t,gi(it(e)))}var e0=Ge(function(t,e){return t==null?{}:Td(t,e)});function Rc(t,e){if(t==null)return{};var i=Nt(zo(t),function(s){return[s]});return e=it(e),wu(t,i,function(s,h){return e(s,h[0])})}function n0(t,e,i){e=cn(e,t);var s=-1,h=e.length;for(h||(h=1,t=n);++s<h;){var m=t==null?n:t[Fe(e[s])];m===n&&(s=h,m=i),t=Je(m)?m.call(t):m}return t}function r0(t,e,i){return t==null?t:pr(t,e,i)}function i0(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:pr(t,e,i,s)}var Oc=Hu(Kt),Ic=Hu(ae);function o0(t,e,i){var s=lt(t),h=s||hn(t)||Gn(t);if(e=it(e,4),i==null){var m=t&&t.constructor;h?i=s?new m:[]:Bt(t)?i=Je(m)?Hn(Kr(t)):{}:i={}}return(h?_e:De)(t,function(C,S,E){return e(i,C,S,E)}),i}function s0(t,e){return t==null?!0:Do(t,e)}function a0(t,e,i){return t==null?t:Au(t,e,Mo(i))}function u0(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:Au(t,e,Mo(i),s)}function $n(t){return t==null?[]:vo(t,Kt(t))}function c0(t){return t==null?[]:vo(t,ae(t))}function f0(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=Ae(i),i=i===i?i:0),e!==n&&(e=Ae(e),e=e===e?e:0),_n(Ae(t),e,i)}function h0(t,e,i){return e=je(e),i===n?(i=e,e=0):i=je(i),t=Ae(t),vd(t,e,i)}function l0(t,e,i){if(i&&typeof i!="boolean"&&ne(t,e,i)&&(e=i=n),i===n&&(typeof e=="boolean"?(i=e,e=n):typeof t=="boolean"&&(i=t,t=n)),t===n&&e===n?(t=0,e=1):(t=je(t),e===n?(e=t,t=0):e=je(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var h=eu();return Vt(t+h*(e-t+zl("1e-"+((h+"").length-1))),e)}return Bo(t,e)}var p0=zn(function(t,e,i){return e=e.toLowerCase(),t+(i?Nc(e):e)});function Nc(t){return ss(At(t).toLowerCase())}function Bc(t){return t=At(t),t&&t.replace(gl,rp).replace(Ll,"")}function d0(t,e,i){t=At(t),e=pe(e);var s=t.length;i=i===n?s:_n(dt(i),0,s);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function g0(t){return t=At(t),t&&jh.test(t)?t.replace(fa,ip):t}function y0(t){return t=At(t),t&&el.test(t)?t.replace(to,"\\$&"):t}var v0=zn(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),m0=zn(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),_0=Du("toLowerCase");function w0(t,e,i){t=At(t),e=dt(e);var s=e?Pn(t):0;if(!e||s>=e)return t;var h=(e-s)/2;return si($r(h),i)+t+si(Gr(h),i)}function b0(t,e,i){t=At(t),e=dt(e);var s=e?Pn(t):0;return e&&s<e?t+si(e-s,i):t}function C0(t,e,i){t=At(t),e=dt(e);var s=e?Pn(t):0;return e&&s<e?si(e-s,i)+t:t}function S0(t,e,i){return i||e==null?e=0:e&&(e=+e),Op(At(t).replace(eo,""),e||0)}function k0(t,e,i){return(i?ne(t,e,i):e===n)?e=1:e=dt(e),Lo(At(t),e)}function A0(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var x0=zn(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function E0(t,e,i){return i&&typeof i!="number"&&ne(t,e,i)&&(e=i=n),i=i===n?ce:i>>>0,i?(t=At(t),t&&(typeof e=="string"||e!=null&&!rs(e))&&(e=pe(e),!e&&Dn(t))?fn(Te(t),0,i):t.split(e,i)):[]}var T0=zn(function(t,e,i){return t+(i?" ":"")+ss(e)});function R0(t,e,i){return t=At(t),i=i==null?0:_n(dt(i),0,t.length),e=pe(e),t.slice(i,i+e.length)==e}function O0(t,e,i){var s=y.templateSettings;i&&ne(t,e,i)&&(e=n),t=At(t),e=mi({},e,s,Ku);var h=mi({},e.imports,s.imports,Ku),m=Kt(h),C=vo(h,m),S,E,M=0,q=e.interpolate||Ir,W="__p += '",j=_o((e.escape||Ir).source+"|"+q.source+"|"+(q===ha?cl:Ir).source+"|"+(e.evaluate||Ir).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ml+"]")+`
|
|
16
|
-
`;t.replace(j,function(st,vt,wt,
|
|
15
|
+
`)}function fg(t){return lt(t)||kn(t)||!!(nc&&t&&t[nc])}function Je(t,e){var i=typeof t;return e=e??ut,!!e&&(i=="number"||i!="symbol"&&Cl.test(t))&&t>-1&&t%1==0&&t<e}function re(t,e,i){if(!Bt(i))return!1;var s=typeof e;return(s=="number"?ae(i)&&Je(e,i.length):s=="string"&&e in i)?Ie(i[e],t):!1}function Yo(t,e){if(lt(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||ge(t)?!0:al.test(t)||!sl.test(t)||e!=null&&t in Tt(e)}function hg(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Vo(t){var e=fi(t),i=y[e];if(typeof i!="function"||!(e in mt.prototype))return!1;if(t===i)return!0;var s=$o(i);return!!s&&t===s[0]}function lg(t){return!!Za&&Za in t}var pg=qr?je:ds;function yr(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||qn;return t===i}function Zc(t){return t===t&&!Bt(t)}function Qc(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Tt(i))}}function dg(t){var e=yi(t,function(s){return i.size===p&&i.clear(),s}),i=e.cache;return e}function gg(t,e){var i=t[1],s=e[1],h=i|s,m=h<(k|L|I),C=s==I&&i==J||s==I&&i==P&&t[7].length<=e[8]||s==(I|P)&&e[7].length<=e[8]&&i==J;if(!(m||C))return t;s&k&&(t[2]=e[2],h|=i&k?0:Y);var S=e[3];if(S){var E=t[3];t[3]=E?Uc(E,S,e[4]):S,t[4]=E?sn(t[3],_):e[4]}return S=e[5],S&&(E=t[5],t[5]=E?Dc(E,S,e[6]):S,t[6]=E?sn(t[5],_):e[6]),S=e[7],S&&(t[7]=S),s&I&&(t[8]=t[8]==null?e[8]:Zt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function yg(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function vg(t){return Hr.call(t)}function tu(t,e,i){return e=Wt(e===n?t.length-1:e,0),function(){for(var s=arguments,h=-1,m=Wt(s.length-e,0),C=O(m);++h<m;)C[h]=s[e+h];h=-1;for(var S=O(e+1);++h<e;)S[h]=s[h];return S[e]=i(C),le(t,this,S)}}function eu(t,e){return e.length<2?t:bn(t,ke(e,0,-1))}function mg(t,e){for(var i=t.length,s=Zt(e.length,i),h=se(t);s--;){var m=e[s];t[s]=Je(m,i)?h[m]:n}return t}function Zo(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var nu=iu(Ac),vr=Bp||function(t,e){return Gt.setTimeout(t,e)},Qo=iu(Wd);function ru(t,e,i){var s=e+"";return Qo(t,ug(s,_g(sg(s),i)))}function iu(t){var e=0,i=0;return function(){var s=Pp(),h=G-(s-i);if(i=s,h>0){if(++e>=z)return arguments[0]}else e=0;return t.apply(n,arguments)}}function li(t,e){var i=-1,s=t.length,h=s-1;for(e=e===n?s:e;++i<e;){var m=Uo(i,h),C=t[m];t[m]=t[i],t[i]=C}return t.length=e,t}var ou=dg(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(cl,function(i,s,h,m){e.push(h?m.replace(yl,"$1"):s||i)}),e});function Me(t){if(typeof t=="string"||ge(t))return t;var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function Sn(t){if(t!=null){try{return Wr.call(t)}catch{}try{return t+""}catch{}}return""}function _g(t,e){return we(Q,function(i){var s="_."+i[0];e&i[1]&&!Dr(t,s)&&t.push(s)}),t.sort()}function su(t){if(t instanceof mt)return t.clone();var e=new Ce(t.__wrapped__,t.__chain__);return e.__actions__=se(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function wg(t,e,i){(i?re(t,e,i):e===n)?e=1:e=Wt(dt(e),0);var s=t==null?0:t.length;if(!s||e<1)return[];for(var h=0,m=0,C=O(Jr(s/e));h<s;)C[m++]=ke(t,h,h+=e);return C}function bg(t){for(var e=-1,i=t==null?0:t.length,s=0,h=[];++e<i;){var m=t[e];m&&(h[s++]=m)}return h}function Cg(){var t=arguments.length;if(!t)return[];for(var e=O(t-1),i=arguments[0],s=t;s--;)e[s-1]=arguments[s];return on(lt(i)?se(i):[i],$t(e,1))}var Sg=yt(function(t,e){return Dt(t)?hr(t,$t(e,1,Dt,!0)):[]}),kg=yt(function(t,e){var i=Ae(e);return Dt(i)&&(i=n),Dt(t)?hr(t,$t(e,1,Dt,!0),it(i,2)):[]}),Ag=yt(function(t,e){var i=Ae(e);return Dt(i)&&(i=n),Dt(t)?hr(t,$t(e,1,Dt,!0),n,i):[]});function xg(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),ke(t,e<0?0:e,s)):[]}function Eg(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,ke(t,0,e<0?0:e)):[]}function Tg(t,e){return t&&t.length?ii(t,it(e,3),!0,!0):[]}function Rg(t,e){return t&&t.length?ii(t,it(e,3),!0):[]}function Og(t,e,i,s){var h=t==null?0:t.length;return h?(i&&typeof i!="number"&&re(t,e,i)&&(i=0,s=h),Cd(t,e,i,s)):[]}function au(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:dt(i);return h<0&&(h=Wt(s+h,0)),Pr(t,it(e,3),h)}function cu(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s-1;return i!==n&&(h=dt(i),h=i<0?Wt(s+h,0):Zt(h,s-1)),Pr(t,it(e,3),h,!0)}function uu(t){var e=t==null?0:t.length;return e?$t(t,1):[]}function Ig(t){var e=t==null?0:t.length;return e?$t(t,xt):[]}function Ng(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:dt(e),$t(t,e)):[]}function Bg(t){for(var e=-1,i=t==null?0:t.length,s={};++e<i;){var h=t[e];s[h[0]]=h[1]}return s}function fu(t){return t&&t.length?t[0]:n}function Lg(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:dt(i);return h<0&&(h=Wt(s+h,0)),Dn(t,e,h)}function Ug(t){var e=t==null?0:t.length;return e?ke(t,0,-1):[]}var Dg=yt(function(t){var e=Nt(t,qo);return e.length&&e[0]===t[0]?Oo(e):[]}),Pg=yt(function(t){var e=Ae(t),i=Nt(t,qo);return e===Ae(i)?e=n:i.pop(),i.length&&i[0]===t[0]?Oo(i,it(e,2)):[]}),Fg=yt(function(t){var e=Ae(t),i=Nt(t,qo);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?Oo(i,n,e):[]});function Mg(t,e){return t==null?"":Up.call(t,e)}function Ae(t){var e=t==null?0:t.length;return e?t[e-1]:n}function qg(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s;return i!==n&&(h=dt(i),h=h<0?Wt(s+h,0):Zt(h,s-1)),e===e?_p(t,e,h):Pr(t,za,h,!0)}function Wg(t,e){return t&&t.length?bc(t,dt(e)):n}var Hg=yt(hu);function hu(t,e){return t&&t.length&&e&&e.length?Lo(t,e):t}function Kg(t,e,i){return t&&t.length&&e&&e.length?Lo(t,e,it(i,2)):t}function zg(t,e,i){return t&&t.length&&e&&e.length?Lo(t,e,n,i):t}var Xg=$e(function(t,e){var i=t==null?0:t.length,s=xo(t,e);return kc(t,Nt(e,function(h){return Je(h,i)?+h:h}).sort(Lc)),s});function Gg(t,e){var i=[];if(!(t&&t.length))return i;var s=-1,h=[],m=t.length;for(e=it(e,3);++s<m;){var C=t[s];e(C,s,t)&&(i.push(C),h.push(s))}return kc(t,h),i}function ts(t){return t==null?t:Mp.call(t)}function $g(t,e,i){var s=t==null?0:t.length;return s?(i&&typeof i!="number"&&re(t,e,i)?(e=0,i=s):(e=e==null?0:dt(e),i=i===n?s:dt(i)),ke(t,e,i)):[]}function Jg(t,e){return ri(t,e)}function jg(t,e,i){return Po(t,e,it(i,2))}function Yg(t,e){var i=t==null?0:t.length;if(i){var s=ri(t,e);if(s<i&&Ie(t[s],e))return s}return-1}function Vg(t,e){return ri(t,e,!0)}function Zg(t,e,i){return Po(t,e,it(i,2),!0)}function Qg(t,e){var i=t==null?0:t.length;if(i){var s=ri(t,e,!0)-1;if(Ie(t[s],e))return s}return-1}function ty(t){return t&&t.length?xc(t):[]}function ey(t,e){return t&&t.length?xc(t,it(e,2)):[]}function ny(t){var e=t==null?0:t.length;return e?ke(t,1,e):[]}function ry(t,e,i){return t&&t.length?(e=i||e===n?1:dt(e),ke(t,0,e<0?0:e)):[]}function iy(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,ke(t,e<0?0:e,s)):[]}function oy(t,e){return t&&t.length?ii(t,it(e,3),!1,!0):[]}function sy(t,e){return t&&t.length?ii(t,it(e,3)):[]}var ay=yt(function(t){return un($t(t,1,Dt,!0))}),cy=yt(function(t){var e=Ae(t);return Dt(e)&&(e=n),un($t(t,1,Dt,!0),it(e,2))}),uy=yt(function(t){var e=Ae(t);return e=typeof e=="function"?e:n,un($t(t,1,Dt,!0),n,e)});function fy(t){return t&&t.length?un(t):[]}function hy(t,e){return t&&t.length?un(t,it(e,2)):[]}function ly(t,e){return e=typeof e=="function"?e:n,t&&t.length?un(t,n,e):[]}function es(t){if(!(t&&t.length))return[];var e=0;return t=rn(t,function(i){if(Dt(i))return e=Wt(i.length,e),!0}),mo(e,function(i){return Nt(t,go(i))})}function lu(t,e){if(!(t&&t.length))return[];var i=es(t);return e==null?i:Nt(i,function(s){return le(e,n,s)})}var py=yt(function(t,e){return Dt(t)?hr(t,e):[]}),dy=yt(function(t){return Mo(rn(t,Dt))}),gy=yt(function(t){var e=Ae(t);return Dt(e)&&(e=n),Mo(rn(t,Dt),it(e,2))}),yy=yt(function(t){var e=Ae(t);return e=typeof e=="function"?e:n,Mo(rn(t,Dt),n,e)}),vy=yt(es);function my(t,e){return Oc(t||[],e||[],fr)}function _y(t,e){return Oc(t||[],e||[],dr)}var wy=yt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,lu(t,i)});function pu(t){var e=y(t);return e.__chain__=!0,e}function by(t,e){return e(t),t}function pi(t,e){return e(t)}var Cy=$e(function(t){var e=t.length,i=e?t[0]:0,s=this.__wrapped__,h=function(m){return xo(m,t)};return e>1||this.__actions__.length||!(s instanceof mt)||!Je(i)?this.thru(h):(s=s.slice(i,+i+(e?1:0)),s.__actions__.push({func:pi,args:[h],thisArg:n}),new Ce(s,this.__chain__).thru(function(m){return e&&!m.length&&m.push(n),m}))});function Sy(){return pu(this)}function ky(){return new Ce(this.value(),this.__chain__)}function Ay(){this.__values__===n&&(this.__values__=Eu(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function xy(){return this}function Ey(t){for(var e,i=this;i instanceof Zr;){var s=su(i);s.__index__=0,s.__values__=n,e?h.__wrapped__=s:e=s;var h=s;i=i.__wrapped__}return h.__wrapped__=t,e}function Ty(){var t=this.__wrapped__;if(t instanceof mt){var e=t;return this.__actions__.length&&(e=new mt(this)),e=e.reverse(),e.__actions__.push({func:pi,args:[ts],thisArg:n}),new Ce(e,this.__chain__)}return this.thru(ts)}function Ry(){return Rc(this.__wrapped__,this.__actions__)}var Oy=oi(function(t,e,i){Et.call(t,i)?++t[i]:Xe(t,i,1)});function Iy(t,e,i){var s=lt(t)?Ha:bd;return i&&re(t,e,i)&&(e=n),s(t,it(e,3))}function Ny(t,e){var i=lt(t)?rn:lc;return i(t,it(e,3))}var By=qc(au),Ly=qc(cu);function Uy(t,e){return $t(di(t,e),1)}function Dy(t,e){return $t(di(t,e),xt)}function Py(t,e,i){return i=i===n?1:dt(i),$t(di(t,e),i)}function du(t,e){var i=lt(t)?we:cn;return i(t,it(e,3))}function gu(t,e){var i=lt(t)?np:hc;return i(t,it(e,3))}var Fy=oi(function(t,e,i){Et.call(t,i)?t[i].push(e):Xe(t,i,[e])});function My(t,e,i,s){t=ae(t)?t:Jn(t),i=i&&!s?dt(i):0;var h=t.length;return i<0&&(i=Wt(h+i,0)),_i(t)?i<=h&&t.indexOf(e,i)>-1:!!h&&Dn(t,e,i)>-1}var qy=yt(function(t,e,i){var s=-1,h=typeof e=="function",m=ae(t)?O(t.length):[];return cn(t,function(C){m[++s]=h?le(e,C,i):lr(C,e,i)}),m}),Wy=oi(function(t,e,i){Xe(t,i,e)});function di(t,e){var i=lt(t)?Nt:mc;return i(t,it(e,3))}function Hy(t,e,i,s){return t==null?[]:(lt(e)||(e=e==null?[]:[e]),i=s?n:i,lt(i)||(i=i==null?[]:[i]),Cc(t,e,i))}var Ky=oi(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function zy(t,e,i){var s=lt(t)?lo:Ga,h=arguments.length<3;return s(t,it(e,4),i,h,cn)}function Xy(t,e,i){var s=lt(t)?rp:Ga,h=arguments.length<3;return s(t,it(e,4),i,h,hc)}function Gy(t,e){var i=lt(t)?rn:lc;return i(t,vi(it(e,3)))}function $y(t){var e=lt(t)?ac:Md;return e(t)}function Jy(t,e,i){(i?re(t,e,i):e===n)?e=1:e=dt(e);var s=lt(t)?yd:qd;return s(t,e)}function jy(t){var e=lt(t)?vd:Hd;return e(t)}function Yy(t){if(t==null)return 0;if(ae(t))return _i(t)?Fn(t):t.length;var e=Qt(t);return e==It||e==ee?t.size:No(t).length}function Vy(t,e,i){var s=lt(t)?po:Kd;return i&&re(t,e,i)&&(e=n),s(t,it(e,3))}var Zy=yt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&re(t,e[0],e[1])?e=[]:i>2&&re(e[0],e[1],e[2])&&(e=[e[0]]),Cc(t,$t(e,1),[])}),gi=Np||function(){return Gt.Date.now()};function Qy(t,e){if(typeof e!="function")throw new be(v);return t=dt(t),function(){if(--t<1)return e.apply(this,arguments)}}function yu(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,Ge(t,I,n,n,n,n,e)}function vu(t,e){var i;if(typeof e!="function")throw new be(v);return t=dt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var ns=yt(function(t,e,i){var s=k;if(i.length){var h=sn(i,Gn(ns));s|=U}return Ge(t,s,e,i,h)}),mu=yt(function(t,e,i){var s=k|L;if(i.length){var h=sn(i,Gn(mu));s|=U}return Ge(e,s,t,i,h)});function _u(t,e,i){e=i?n:e;var s=Ge(t,J,n,n,n,n,n,e);return s.placeholder=_u.placeholder,s}function wu(t,e,i){e=i?n:e;var s=Ge(t,N,n,n,n,n,n,e);return s.placeholder=wu.placeholder,s}function bu(t,e,i){var s,h,m,C,S,E,M=0,q=!1,W=!1,j=!0;if(typeof t!="function")throw new be(v);e=xe(e)||0,Bt(i)&&(q=!!i.leading,W="maxWait"in i,m=W?Wt(xe(i.maxWait)||0,e):m,j="trailing"in i?!!i.trailing:j);function tt(Pt){var Ne=s,Ve=h;return s=h=n,M=Pt,C=t.apply(Ve,Ne),C}function ot(Pt){return M=Pt,S=vr(vt,e),q?tt(Pt):C}function gt(Pt){var Ne=Pt-E,Ve=Pt-M,qu=e-Ne;return W?Zt(qu,m-Ve):qu}function st(Pt){var Ne=Pt-E,Ve=Pt-M;return E===n||Ne>=e||Ne<0||W&&Ve>=m}function vt(){var Pt=gi();if(st(Pt))return wt(Pt);S=vr(vt,gt(Pt))}function wt(Pt){return S=n,j&&s?tt(Pt):(s=h=n,C)}function ye(){S!==n&&Ic(S),M=0,s=E=h=S=n}function ie(){return S===n?C:wt(gi())}function ve(){var Pt=gi(),Ne=st(Pt);if(s=arguments,h=this,E=Pt,Ne){if(S===n)return ot(E);if(W)return Ic(S),S=vr(vt,e),tt(E)}return S===n&&(S=vr(vt,e)),C}return ve.cancel=ye,ve.flush=ie,ve}var tv=yt(function(t,e){return fc(t,1,e)}),ev=yt(function(t,e,i){return fc(t,xe(e)||0,i)});function nv(t){return Ge(t,R)}function yi(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new be(v);var i=function(){var s=arguments,h=e?e.apply(this,s):s[0],m=i.cache;if(m.has(h))return m.get(h);var C=t.apply(this,s);return i.cache=m.set(h,C)||m,C};return i.cache=new(yi.Cache||ze),i}yi.Cache=ze;function vi(t){if(typeof t!="function")throw new be(v);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function rv(t){return vu(2,t)}var iv=zd(function(t,e){e=e.length==1&<(e[0])?Nt(e[0],pe(it())):Nt($t(e,1),pe(it()));var i=e.length;return yt(function(s){for(var h=-1,m=Zt(s.length,i);++h<m;)s[h]=e[h].call(this,s[h]);return le(t,this,s)})}),rs=yt(function(t,e){var i=sn(e,Gn(rs));return Ge(t,U,n,e,i)}),Cu=yt(function(t,e){var i=sn(e,Gn(Cu));return Ge(t,T,n,e,i)}),ov=$e(function(t,e){return Ge(t,P,n,n,n,e)});function sv(t,e){if(typeof t!="function")throw new be(v);return e=e===n?e:dt(e),yt(t,e)}function av(t,e){if(typeof t!="function")throw new be(v);return e=e==null?0:Wt(dt(e),0),yt(function(i){var s=i[e],h=hn(i,0,e);return s&&on(h,s),le(t,this,h)})}function cv(t,e,i){var s=!0,h=!0;if(typeof t!="function")throw new be(v);return Bt(i)&&(s="leading"in i?!!i.leading:s,h="trailing"in i?!!i.trailing:h),bu(t,e,{leading:s,maxWait:e,trailing:h})}function uv(t){return yu(t,1)}function fv(t,e){return rs(Wo(e),t)}function hv(){if(!arguments.length)return[];var t=arguments[0];return lt(t)?t:[t]}function lv(t){return Se(t,u)}function pv(t,e){return e=typeof e=="function"?e:n,Se(t,u,e)}function dv(t){return Se(t,g|u)}function gv(t,e){return e=typeof e=="function"?e:n,Se(t,g|u,e)}function yv(t,e){return e==null||uc(t,e,Kt(e))}function Ie(t,e){return t===e||t!==t&&e!==e}var vv=ui(Ro),mv=ui(function(t,e){return t>=e}),kn=gc(function(){return arguments}())?gc:function(t){return Lt(t)&&Et.call(t,"callee")&&!ec.call(t,"callee")},lt=O.isArray,_v=Da?pe(Da):Ed;function ae(t){return t!=null&&mi(t.length)&&!je(t)}function Dt(t){return Lt(t)&&ae(t)}function wv(t){return t===!0||t===!1||Lt(t)&&ne(t)==et}var ln=Lp||ds,bv=Pa?pe(Pa):Td;function Cv(t){return Lt(t)&&t.nodeType===1&&!mr(t)}function Sv(t){if(t==null)return!0;if(ae(t)&&(lt(t)||typeof t=="string"||typeof t.splice=="function"||ln(t)||$n(t)||kn(t)))return!t.length;var e=Qt(t);if(e==It||e==ee)return!t.size;if(yr(t))return!No(t).length;for(var i in t)if(Et.call(t,i))return!1;return!0}function kv(t,e){return pr(t,e)}function Av(t,e,i){i=typeof i=="function"?i:n;var s=i?i(t,e):n;return s===n?pr(t,e,n,i):!!s}function is(t){if(!Lt(t))return!1;var e=ne(t);return e==at||e==Z||typeof t.message=="string"&&typeof t.name=="string"&&!mr(t)}function xv(t){return typeof t=="number"&&rc(t)}function je(t){if(!Bt(t))return!1;var e=ne(t);return e==kt||e==Vt||e==K||e==er}function Su(t){return typeof t=="number"&&t==dt(t)}function mi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ut}function Bt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lt(t){return t!=null&&typeof t=="object"}var ku=Fa?pe(Fa):Od;function Ev(t,e){return t===e||Io(t,e,Jo(e))}function Tv(t,e,i){return i=typeof i=="function"?i:n,Io(t,e,Jo(e),i)}function Rv(t){return Au(t)&&t!=+t}function Ov(t){if(pg(t))throw new ft(f);return yc(t)}function Iv(t){return t===null}function Nv(t){return t==null}function Au(t){return typeof t=="number"||Lt(t)&&ne(t)==Te}function mr(t){if(!Lt(t)||ne(t)!=he)return!1;var e=Xr(t);if(e===null)return!0;var i=Et.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Wr.call(i)==Tp}var os=Ma?pe(Ma):Id;function Bv(t){return Su(t)&&t>=-ut&&t<=ut}var xu=qa?pe(qa):Nd;function _i(t){return typeof t=="string"||!lt(t)&&Lt(t)&&ne(t)==Ue}function ge(t){return typeof t=="symbol"||Lt(t)&&ne(t)==De}var $n=Wa?pe(Wa):Bd;function Lv(t){return t===n}function Uv(t){return Lt(t)&&Qt(t)==He}function Dv(t){return Lt(t)&&ne(t)==rr}var Pv=ui(Bo),Fv=ui(function(t,e){return t<=e});function Eu(t){if(!t)return[];if(ae(t))return _i(t)?Re(t):se(t);if(or&&t[or])return yp(t[or]());var e=Qt(t),i=e==It?wo:e==ee?Fr:Jn;return i(t)}function Ye(t){if(!t)return t===0?t:0;if(t=xe(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Yt}return t===t?t:0}function dt(t){var e=Ye(t),i=e%1;return e===e?i?e-i:e:0}function Tu(t){return t?wn(dt(t),0,fe):0}function xe(t){if(typeof t=="number")return t;if(ge(t))return Le;if(Bt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Bt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=$a(t);var i=_l.test(t);return i||bl.test(t)?Ql(t.slice(2),i?2:8):ml.test(t)?Le:+t}function Ru(t){return Fe(t,ce(t))}function Mv(t){return t?wn(dt(t),-ut,ut):t===0?t:0}function At(t){return t==null?"":de(t)}var qv=zn(function(t,e){if(yr(e)||ae(e)){Fe(e,Kt(e),t);return}for(var i in e)Et.call(e,i)&&fr(t,i,e[i])}),Ou=zn(function(t,e){Fe(e,ce(e),t)}),wi=zn(function(t,e,i,s){Fe(e,ce(e),t,s)}),Wv=zn(function(t,e,i,s){Fe(e,Kt(e),t,s)}),Hv=$e(xo);function Kv(t,e){var i=Kn(t);return e==null?i:cc(i,e)}var zv=yt(function(t,e){t=Tt(t);var i=-1,s=e.length,h=s>2?e[2]:n;for(h&&re(e[0],e[1],h)&&(s=1);++i<s;)for(var m=e[i],C=ce(m),S=-1,E=C.length;++S<E;){var M=C[S],q=t[M];(q===n||Ie(q,qn[M])&&!Et.call(t,M))&&(t[M]=m[M])}return t}),Xv=yt(function(t){return t.push(n,$c),le(Iu,n,t)});function Gv(t,e){return Ka(t,it(e,3),Pe)}function $v(t,e){return Ka(t,it(e,3),To)}function Jv(t,e){return t==null?t:Eo(t,it(e,3),ce)}function jv(t,e){return t==null?t:pc(t,it(e,3),ce)}function Yv(t,e){return t&&Pe(t,it(e,3))}function Vv(t,e){return t&&To(t,it(e,3))}function Zv(t){return t==null?[]:ei(t,Kt(t))}function Qv(t){return t==null?[]:ei(t,ce(t))}function ss(t,e,i){var s=t==null?n:bn(t,e);return s===n?i:s}function t0(t,e){return t!=null&&Yc(t,e,Sd)}function as(t,e){return t!=null&&Yc(t,e,kd)}var e0=Hc(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Hr.call(e)),t[e]=i},us(ue)),n0=Hc(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Hr.call(e)),Et.call(t,e)?t[e].push(i):t[e]=[i]},it),r0=yt(lr);function Kt(t){return ae(t)?sc(t):No(t)}function ce(t){return ae(t)?sc(t,!0):Ld(t)}function i0(t,e){var i={};return e=it(e,3),Pe(t,function(s,h,m){Xe(i,e(s,h,m),s)}),i}function o0(t,e){var i={};return e=it(e,3),Pe(t,function(s,h,m){Xe(i,h,e(s,h,m))}),i}var s0=zn(function(t,e,i){ni(t,e,i)}),Iu=zn(function(t,e,i,s){ni(t,e,i,s)}),a0=$e(function(t,e){var i={};if(t==null)return i;var s=!1;e=Nt(e,function(m){return m=fn(m,t),s||(s=m.length>1),m}),Fe(t,Go(t),i),s&&(i=Se(i,g|l|u,eg));for(var h=e.length;h--;)Fo(i,e[h]);return i});function c0(t,e){return Nu(t,vi(it(e)))}var u0=$e(function(t,e){return t==null?{}:Dd(t,e)});function Nu(t,e){if(t==null)return{};var i=Nt(Go(t),function(s){return[s]});return e=it(e),Sc(t,i,function(s,h){return e(s,h[0])})}function f0(t,e,i){e=fn(e,t);var s=-1,h=e.length;for(h||(h=1,t=n);++s<h;){var m=t==null?n:t[Me(e[s])];m===n&&(s=h,m=i),t=je(m)?m.call(t):m}return t}function h0(t,e,i){return t==null?t:dr(t,e,i)}function l0(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:dr(t,e,i,s)}var Bu=Xc(Kt),Lu=Xc(ce);function p0(t,e,i){var s=lt(t),h=s||ln(t)||$n(t);if(e=it(e,4),i==null){var m=t&&t.constructor;h?i=s?new m:[]:Bt(t)?i=je(m)?Kn(Xr(t)):{}:i={}}return(h?we:Pe)(t,function(C,S,E){return e(i,C,S,E)}),i}function d0(t,e){return t==null?!0:Fo(t,e)}function g0(t,e,i){return t==null?t:Tc(t,e,Wo(i))}function y0(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:Tc(t,e,Wo(i),s)}function Jn(t){return t==null?[]:_o(t,Kt(t))}function v0(t){return t==null?[]:_o(t,ce(t))}function m0(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=xe(i),i=i===i?i:0),e!==n&&(e=xe(e),e=e===e?e:0),wn(xe(t),e,i)}function _0(t,e,i){return e=Ye(e),i===n?(i=e,e=0):i=Ye(i),t=xe(t),Ad(t,e,i)}function w0(t,e,i){if(i&&typeof i!="boolean"&&re(t,e,i)&&(e=i=n),i===n&&(typeof e=="boolean"?(i=e,e=n):typeof t=="boolean"&&(i=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Ye(t),e===n?(e=t,t=0):e=Ye(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var h=ic();return Zt(t+h*(e-t+Zl("1e-"+((h+"").length-1))),e)}return Uo(t,e)}var b0=Xn(function(t,e,i){return e=e.toLowerCase(),t+(i?Uu(e):e)});function Uu(t){return cs(At(t).toLowerCase())}function Du(t){return t=At(t),t&&t.replace(Sl,hp).replace(Hl,"")}function C0(t,e,i){t=At(t),e=de(e);var s=t.length;i=i===n?s:wn(dt(i),0,s);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function S0(t){return t=At(t),t&&rl.test(t)?t.replace(pa,lp):t}function k0(t){return t=At(t),t&&ul.test(t)?t.replace(no,"\\$&"):t}var A0=Xn(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),x0=Xn(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),E0=Mc("toLowerCase");function T0(t,e,i){t=At(t),e=dt(e);var s=e?Fn(t):0;if(!e||s>=e)return t;var h=(e-s)/2;return ci(jr(h),i)+t+ci(Jr(h),i)}function R0(t,e,i){t=At(t),e=dt(e);var s=e?Fn(t):0;return e&&s<e?t+ci(e-s,i):t}function O0(t,e,i){t=At(t),e=dt(e);var s=e?Fn(t):0;return e&&s<e?ci(e-s,i)+t:t}function I0(t,e,i){return i||e==null?e=0:e&&(e=+e),Fp(At(t).replace(ro,""),e||0)}function N0(t,e,i){return(i?re(t,e,i):e===n)?e=1:e=dt(e),Do(At(t),e)}function B0(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var L0=Xn(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function U0(t,e,i){return i&&typeof i!="number"&&re(t,e,i)&&(e=i=n),i=i===n?fe:i>>>0,i?(t=At(t),t&&(typeof e=="string"||e!=null&&!os(e))&&(e=de(e),!e&&Pn(t))?hn(Re(t),0,i):t.split(e,i)):[]}var D0=Xn(function(t,e,i){return t+(i?" ":"")+cs(e)});function P0(t,e,i){return t=At(t),i=i==null?0:wn(dt(i),0,t.length),e=de(e),t.slice(i,i+e.length)==e}function F0(t,e,i){var s=y.templateSettings;i&&re(t,e,i)&&(e=n),t=At(t),e=wi({},e,s,Gc);var h=wi({},e.imports,s.imports,Gc),m=Kt(h),C=_o(h,m),S,E,M=0,q=e.interpolate||Br,W="__p += '",j=bo((e.escape||Br).source+"|"+q.source+"|"+(q===da?vl:Br).source+"|"+(e.evaluate||Br).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$l+"]")+`
|
|
16
|
+
`;t.replace(j,function(st,vt,wt,ye,ie,ve){return wt||(wt=ye),W+=t.slice(M,ve).replace(kl,pp),vt&&(S=!0,W+=`' +
|
|
17
17
|
__e(`+vt+`) +
|
|
18
|
-
'`),
|
|
19
|
-
`+
|
|
18
|
+
'`),ie&&(E=!0,W+=`';
|
|
19
|
+
`+ie+`;
|
|
20
20
|
__p += '`),wt&&(W+=`' +
|
|
21
21
|
((__t = (`+wt+`)) == null ? '' : __t) +
|
|
22
|
-
'`),M=
|
|
22
|
+
'`),M=ve+st.length,st}),W+=`';
|
|
23
23
|
`;var ot=Et.call(e,"variable")&&e.variable;if(!ot)W=`with (obj) {
|
|
24
24
|
`+W+`
|
|
25
25
|
}
|
|
26
|
-
`;else if(
|
|
26
|
+
`;else if(gl.test(ot))throw new ft(d);W=(E?W.replace(Qh,""):W).replace(tl,"$1").replace(el,"$1;"),W="function("+(ot||"obj")+`) {
|
|
27
27
|
`+(ot?"":`obj || (obj = {});
|
|
28
28
|
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
|
|
29
29
|
function print() { __p += __j.call(arguments, '') }
|
|
30
30
|
`:`;
|
|
31
31
|
`)+W+`return __p
|
|
32
|
-
}`;var gt=Uc(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(gt.source=W,ns(gt))throw gt;return gt}function I0(t){return At(t).toLowerCase()}function N0(t){return At(t).toUpperCase()}function B0(t,e,i){if(t=At(t),t&&(i||e===n))return za(t);if(!t||!(e=pe(e)))return t;var s=Te(t),h=Te(e),m=Xa(s,h),C=Ga(s,h)+1;return fn(s,m,C).join("")}function L0(t,e,i){if(t=At(t),t&&(i||e===n))return t.slice(0,Ja(t)+1);if(!t||!(e=pe(e)))return t;var s=Te(t),h=Ga(s,Te(e))+1;return fn(s,0,h).join("")}function U0(t,e,i){if(t=At(t),t&&(i||e===n))return t.replace(eo,"");if(!t||!(e=pe(e)))return t;var s=Te(t),h=Xa(s,Te(e));return fn(s,h).join("")}function D0(t,e){var i=B,s=H;if(Bt(e)){var h="separator"in e?e.separator:h;i="length"in e?dt(e.length):i,s="omission"in e?pe(e.omission):s}t=At(t);var m=t.length;if(Dn(t)){var C=Te(t);m=C.length}if(i>=m)return t;var S=i-Pn(s);if(S<1)return s;var E=C?fn(C,0,S).join(""):t.slice(0,S);if(h===n)return E+s;if(C&&(S+=E.length-S),rs(h)){if(t.slice(S).search(h)){var M,q=E;for(h.global||(h=_o(h.source,At(la.exec(h))+"g")),h.lastIndex=0;M=h.exec(q);)var W=M.index;E=E.slice(0,W===n?S:W)}}else if(t.indexOf(pe(h),S)!=S){var j=E.lastIndexOf(h);j>-1&&(E=E.slice(0,j))}return E+s}function P0(t){return t=At(t),t&&Jh.test(t)?t.replace(ca,lp):t}var F0=zn(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),ss=Du("toUpperCase");function Lc(t,e,i){return t=At(t),e=i?n:e,e===n?ap(t)?gp(t):Zl(t):t.match(e)||[]}var Uc=yt(function(t,e){try{return he(t,n,e)}catch(i){return ns(i)?i:new ft(i)}}),M0=Ge(function(t,e){return _e(e,function(i){i=Fe(i),ze(t,i,ts(t[i],t))}),t});function q0(t){var e=t==null?0:t.length,i=it();return t=e?Nt(t,function(s){if(typeof s[1]!="function")throw new we(v);return[i(s[0]),s[1]]}):[],yt(function(s){for(var h=-1;++h<e;){var m=t[h];if(he(m[0],this,s))return he(m[1],this,s)}})}function W0(t){return ld(Ce(t,g))}function as(t){return function(){return t}}function H0(t,e){return t==null||t!==t?e:t}var K0=Fu(),z0=Fu(!0);function ue(t){return t}function us(t){return du(typeof t=="function"?t:Ce(t,g))}function X0(t){return yu(Ce(t,g))}function G0(t,e){return vu(t,Ce(e,g))}var $0=yt(function(t,e){return function(i){return hr(i,t,e)}}),J0=yt(function(t,e){return function(i){return hr(t,i,e)}});function cs(t,e,i){var s=Kt(e),h=Qr(e,s);i==null&&!(Bt(e)&&(h.length||!s.length))&&(i=e,e=t,t=this,h=Qr(e,Kt(e)));var m=!(Bt(i)&&"chain"in i)||!!i.chain,C=Je(t);return _e(h,function(S){var E=e[S];t[S]=E,C&&(t.prototype[S]=function(){var M=this.__chain__;if(m||M){var q=t(this.__wrapped__),W=q.__actions__=oe(this.__actions__);return W.push({func:E,args:arguments,thisArg:t}),q.__chain__=M,q}return E.apply(t,rn([this.value()],arguments))})}),t}function j0(){return Xt._===this&&(Xt._=bp),this}function fs(){}function Y0(t){return t=dt(t),yt(function(e){return mu(e,t)})}var V0=Wo(Nt),Z0=Wo(Ma),Q0=Wo(ho);function Dc(t){return Jo(t)?lo(Fe(t)):Rd(t)}function tm(t){return function(e){return t==null?n:wn(t,e)}}var em=qu(),nm=qu(!0);function hs(){return[]}function ls(){return!1}function rm(){return{}}function im(){return""}function om(){return!0}function sm(t,e){if(t=dt(t),t<1||t>ct)return[];var i=ce,s=Vt(t,ce);e=it(e),t-=ce;for(var h=yo(s,e);++i<t;)e(i);return h}function am(t){return lt(t)?Nt(t,Fe):de(t)?[t]:oe(nc(At(t)))}function um(t){var e=++_p;return At(t)+e}var cm=oi(function(t,e){return t+e},0),fm=Ho("ceil"),hm=oi(function(t,e){return t/e},1),lm=Ho("floor");function pm(t){return t&&t.length?Zr(t,ue,Eo):n}function dm(t,e){return t&&t.length?Zr(t,it(e,2),Eo):n}function gm(t){return Ha(t,ue)}function ym(t,e){return Ha(t,it(e,2))}function vm(t){return t&&t.length?Zr(t,ue,Io):n}function mm(t,e){return t&&t.length?Zr(t,it(e,2),Io):n}var _m=oi(function(t,e){return t*e},1),wm=Ho("round"),bm=oi(function(t,e){return t-e},0);function Cm(t){return t&&t.length?go(t,ue):0}function Sm(t,e){return t&&t.length?go(t,it(e,2)):0}return y.after=Xy,y.ary=pc,y.assign=Nv,y.assignIn=Ec,y.assignInWith=mi,y.assignWith=Bv,y.at=Lv,y.before=dc,y.bind=ts,y.bindAll=M0,y.bindKey=gc,y.castArray=rv,y.chain=fc,y.chunk=lg,y.compact=pg,y.concat=dg,y.cond=q0,y.conforms=W0,y.constant=as,y.countBy=Cy,y.create=Uv,y.curry=yc,y.curryRight=vc,y.debounce=mc,y.defaults=Dv,y.defaultsDeep=Pv,y.defer=Gy,y.delay=$y,y.difference=gg,y.differenceBy=yg,y.differenceWith=vg,y.drop=mg,y.dropRight=_g,y.dropRightWhile=wg,y.dropWhile=bg,y.fill=Cg,y.filter=ky,y.flatMap=Ey,y.flatMapDeep=Ty,y.flatMapDepth=Ry,y.flatten=sc,y.flattenDeep=Sg,y.flattenDepth=kg,y.flip=Jy,y.flow=K0,y.flowRight=z0,y.fromPairs=Ag,y.functions=zv,y.functionsIn=Xv,y.groupBy=Oy,y.initial=Eg,y.intersection=Tg,y.intersectionBy=Rg,y.intersectionWith=Og,y.invert=$v,y.invertBy=Jv,y.invokeMap=Ny,y.iteratee=us,y.keyBy=By,y.keys=Kt,y.keysIn=ae,y.map=li,y.mapKeys=Yv,y.mapValues=Vv,y.matches=X0,y.matchesProperty=G0,y.memoize=di,y.merge=Zv,y.mergeWith=Tc,y.method=$0,y.methodOf=J0,y.mixin=cs,y.negate=gi,y.nthArg=Y0,y.omit=Qv,y.omitBy=t0,y.once=jy,y.orderBy=Ly,y.over=V0,y.overArgs=Yy,y.overEvery=Z0,y.overSome=Q0,y.partial=es,y.partialRight=_c,y.partition=Uy,y.pick=e0,y.pickBy=Rc,y.property=Dc,y.propertyOf=tm,y.pull=Lg,y.pullAll=uc,y.pullAllBy=Ug,y.pullAllWith=Dg,y.pullAt=Pg,y.range=em,y.rangeRight=nm,y.rearg=Vy,y.reject=Fy,y.remove=Fg,y.rest=Zy,y.reverse=Zo,y.sampleSize=qy,y.set=r0,y.setWith=i0,y.shuffle=Wy,y.slice=Mg,y.sortBy=zy,y.sortedUniq=Gg,y.sortedUniqBy=$g,y.split=E0,y.spread=Qy,y.tail=Jg,y.take=jg,y.takeRight=Yg,y.takeRightWhile=Vg,y.takeWhile=Zg,y.tap=py,y.throttle=tv,y.thru=hi,y.toArray=kc,y.toPairs=Oc,y.toPairsIn=Ic,y.toPath=am,y.toPlainObject=xc,y.transform=o0,y.unary=ev,y.union=Qg,y.unionBy=ty,y.unionWith=ey,y.uniq=ny,y.uniqBy=ry,y.uniqWith=iy,y.unset=s0,y.unzip=Qo,y.unzipWith=cc,y.update=a0,y.updateWith=u0,y.values=$n,y.valuesIn=c0,y.without=oy,y.words=Lc,y.wrap=nv,y.xor=sy,y.xorBy=ay,y.xorWith=uy,y.zip=cy,y.zipObject=fy,y.zipObjectDeep=hy,y.zipWith=ly,y.entries=Oc,y.entriesIn=Ic,y.extend=Ec,y.extendWith=mi,cs(y,y),y.add=cm,y.attempt=Uc,y.camelCase=p0,y.capitalize=Nc,y.ceil=fm,y.clamp=f0,y.clone=iv,y.cloneDeep=sv,y.cloneDeepWith=av,y.cloneWith=ov,y.conformsTo=uv,y.deburr=Bc,y.defaultTo=H0,y.divide=hm,y.endsWith=d0,y.eq=Oe,y.escape=g0,y.escapeRegExp=y0,y.every=Sy,y.find=Ay,y.findIndex=ic,y.findKey=Fv,y.findLast=xy,y.findLastIndex=oc,y.findLastKey=Mv,y.floor=lm,y.forEach=hc,y.forEachRight=lc,y.forIn=qv,y.forInRight=Wv,y.forOwn=Hv,y.forOwnRight=Kv,y.get=is,y.gt=cv,y.gte=fv,y.has=Gv,y.hasIn=os,y.head=ac,y.identity=ue,y.includes=Iy,y.indexOf=xg,y.inRange=h0,y.invoke=jv,y.isArguments=Sn,y.isArray=lt,y.isArrayBuffer=hv,y.isArrayLike=se,y.isArrayLikeObject=Dt,y.isBoolean=lv,y.isBuffer=hn,y.isDate=pv,y.isElement=dv,y.isEmpty=gv,y.isEqual=yv,y.isEqualWith=vv,y.isError=ns,y.isFinite=mv,y.isFunction=Je,y.isInteger=wc,y.isLength=yi,y.isMap=bc,y.isMatch=_v,y.isMatchWith=wv,y.isNaN=bv,y.isNative=Cv,y.isNil=kv,y.isNull=Sv,y.isNumber=Cc,y.isObject=Bt,y.isObjectLike=Lt,y.isPlainObject=vr,y.isRegExp=rs,y.isSafeInteger=Av,y.isSet=Sc,y.isString=vi,y.isSymbol=de,y.isTypedArray=Gn,y.isUndefined=xv,y.isWeakMap=Ev,y.isWeakSet=Tv,y.join=Ig,y.kebabCase=v0,y.last=ke,y.lastIndexOf=Ng,y.lowerCase=m0,y.lowerFirst=_0,y.lt=Rv,y.lte=Ov,y.max=pm,y.maxBy=dm,y.mean=gm,y.meanBy=ym,y.min=vm,y.minBy=mm,y.stubArray=hs,y.stubFalse=ls,y.stubObject=rm,y.stubString=im,y.stubTrue=om,y.multiply=_m,y.nth=Bg,y.noConflict=j0,y.noop=fs,y.now=pi,y.pad=w0,y.padEnd=b0,y.padStart=C0,y.parseInt=S0,y.random=l0,y.reduce=Dy,y.reduceRight=Py,y.repeat=k0,y.replace=A0,y.result=n0,y.round=wm,y.runInContext=x,y.sample=My,y.size=Hy,y.snakeCase=x0,y.some=Ky,y.sortedIndex=qg,y.sortedIndexBy=Wg,y.sortedIndexOf=Hg,y.sortedLastIndex=Kg,y.sortedLastIndexBy=zg,y.sortedLastIndexOf=Xg,y.startCase=T0,y.startsWith=R0,y.subtract=bm,y.sum=Cm,y.sumBy=Sm,y.template=O0,y.times=sm,y.toFinite=je,y.toInteger=dt,y.toLength=Ac,y.toLower=I0,y.toNumber=Ae,y.toSafeInteger=Iv,y.toString=At,y.toUpper=N0,y.trim=B0,y.trimEnd=L0,y.trimStart=U0,y.truncate=D0,y.unescape=P0,y.uniqueId=um,y.upperCase=F0,y.upperFirst=ss,y.each=hc,y.eachRight=lc,y.first=ac,cs(y,function(){var t={};return De(y,function(e,i){Et.call(y.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),y.VERSION=a,_e(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),_e(["drop","take"],function(t,e){mt.prototype[t]=function(i){i=i===n?1:Wt(dt(i),0);var s=this.__filtered__&&!e?new mt(this):this.clone();return s.__filtered__?s.__takeCount__=Vt(i,s.__takeCount__):s.__views__.push({size:Vt(i,ce),type:t+(s.__dir__<0?"Right":"")}),s},mt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),_e(["filter","map","takeWhile"],function(t,e){var i=e+1,s=i==F||i==ut;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:i}),m.__filtered__=m.__filtered__||s,m}}),_e(["head","last"],function(t,e){var i="take"+(e?"Right":"");mt.prototype[t]=function(){return this[i](1).value()[0]}}),_e(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");mt.prototype[t]=function(){return this.__filtered__?new mt(this):this[i](1)}}),mt.prototype.compact=function(){return this.filter(ue)},mt.prototype.find=function(t){return this.filter(t).head()},mt.prototype.findLast=function(t){return this.reverse().find(t)},mt.prototype.invokeMap=yt(function(t,e){return typeof t=="function"?new mt(this):this.map(function(i){return hr(i,t,e)})}),mt.prototype.reject=function(t){return this.filter(gi(it(t)))},mt.prototype.slice=function(t,e){t=dt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new mt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=dt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(ce)},De(mt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),s=/^(?:head|last)$/.test(e),h=y[s?"take"+(e=="last"?"Right":""):e],m=s||/^find/.test(e);h&&(y.prototype[e]=function(){var C=this.__wrapped__,S=s?[1]:arguments,E=C instanceof mt,M=S[0],q=E||lt(C),W=function(vt){var wt=h.apply(y,rn([vt],S));return s&&j?wt[0]:wt};q&&i&&typeof M=="function"&&M.length!=1&&(E=q=!1);var j=this.__chain__,tt=!!this.__actions__.length,ot=m&&!j,gt=E&&!tt;if(!m&&q){C=gt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:hi,args:[W],thisArg:n}),new be(st,j)}return ot&>?t.apply(this,S):(st=this.thru(W),ot?s?st.value()[0]:st.value():st)})}),_e(["pop","push","shift","sort","splice","unshift"],function(t){var e=Pr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",s=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var h=arguments;if(s&&!this.__chain__){var m=this.value();return e.apply(lt(m)?m:[],h)}return this[i](function(C){return e.apply(lt(C)?C:[],h)})}}),De(mt.prototype,function(t,e){var i=y[e];if(i){var s=i.name+"";Et.call(Wn,s)||(Wn[s]=[]),Wn[s].push({name:e,func:i})}}),Wn[ii(n,L).name]=[{name:"wrapper",func:n}],mt.prototype.clone=Pp,mt.prototype.reverse=Fp,mt.prototype.value=Mp,y.prototype.at=dy,y.prototype.chain=gy,y.prototype.commit=yy,y.prototype.next=vy,y.prototype.plant=_y,y.prototype.reverse=wy,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=by,y.prototype.first=y.prototype.head,ir&&(y.prototype[ir]=my),y},Fn=yp();gn?((gn.exports=Fn)._=Fn,ao._=Fn):Xt._=Fn}).call(zt)}(mr,mr.exports);var zc=mr.exports;const Xc={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function Gc(){return function r(o,n,a){function c(d,b){if(!n[d]){if(!o[d]){var p=typeof require=="function"&&require;if(!b&&p)return p(d,!0);if(f)return f(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=n[d]={exports:{}};o[d][0].call(_.exports,function(g){var l=o[d][1][g];return c(l||g)},_,_.exports,r,o,n,a)}return n[d].exports}for(var f=typeof require=="function"&&require,v=0;v<a.length;v++)c(a[v]);return c}({1:[function(r,o){o.exports=r("./lib/")},{"./lib/":2}],2:[function(r,o,n){function a(p,_){typeof p=="object"&&(_=p,p=void 0),_=_||{};var g,l=c(p),u=l.source,w=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",u),g=v(u,_)):(b[w]||(d("new io instance for %s",u),b[w]=v(u,_)),g=b[w]),g.socket(l.path)}var c=r("./url"),f=r("socket.io-parser"),v=r("./manager"),d=r("debug")("socket.io-client");o.exports=n=a;var b=n.managers={};n.protocol=f.protocol,n.connect=a,n.Manager=r("./manager"),n.Socket=r("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(r,o){function n(l,u){return this instanceof n?(l&&typeof l=="object"&&(u=l,l=void 0),u=u||{},u.path=u.path||"/socket.io",this.nsps={},this.subs=[],this.opts=u,this.reconnection(u.reconnection!==!1),this.reconnectionAttempts(u.reconnectionAttempts||1/0),this.reconnectionDelay(u.reconnectionDelay||1e3),this.reconnectionDelayMax(u.reconnectionDelayMax||5e3),this.randomizationFactor(u.randomizationFactor||.5),this.backoff=new g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new v.Encoder,this.decoder=new v.Decoder,this.autoConnect=u.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,u)}var a=(r("./url"),r("engine.io-client")),c=r("./socket"),f=r("component-emitter"),v=r("socket.io-parser"),d=r("./on"),b=r("component-bind"),p=(r("object-component"),r("debug")("socket.io-client:manager")),_=r("indexof"),g=r("backo2");o.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},f(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=a(this.uri,this.opts);var u=this.engine,w=this;this.readyState="opening",this.skipReconnect=!1;var A=d(u,"open",function(){w.onopen(),l&&l()}),k=d(u,"error",function(J){if(p("connect_error"),w.cleanup(),w.readyState="closed",w.emitAll("connect_error",J),l){var N=new Error("Connection error");N.data=J,l(N)}else w.maybeReconnectOnOpen()});if(this._timeout!==!1){var L=this._timeout;p("connect attempt will timeout after %d",L);var Y=setTimeout(function(){p("connect attempt timed out after %d",L),A.destroy(),u.close(),u.emit("error","timeout"),w.emitAll("connect_timeout",L)},L);this.subs.push({destroy:function(){clearTimeout(Y)}})}return this.subs.push(A),this.subs.push(k),this},n.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(d(l,"data",b(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",b(this,"ondecoded"))),this.subs.push(d(l,"error",b(this,"onerror"))),this.subs.push(d(l,"close",b(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){p("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var u=this.nsps[l];if(!u){u=new c(this,l),this.nsps[l]=u;var w=this;u.on("connect",function(){u.id=w.engine.id,~_(w.connected,u)||w.connected.push(u)})}return u},n.prototype.destroy=function(l){var u=_(this.connected,l);~u&&this.connected.splice(u,1),this.connected.length||this.close()},n.prototype.packet=function(l){p("writing packet %j",l);var u=this;u.encoding?u.packetBuffer.push(l):(u.encoding=!0,this.encoder.encode(l,function(w){for(var A=0;A<w.length;A++)u.engine.write(w[A]);u.encoding=!1,u.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){p("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var u=this.backoff.duration();p("will wait %dms before reconnect attempt",u),this.reconnecting=!0;var w=setTimeout(function(){l.skipReconnect||(p("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(A){A?(p("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",A.data)):(p("reconnect success"),l.onreconnect())}))},u);this.subs.push({destroy:function(){clearTimeout(w)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(r,o){function n(a,c,f){return a.on(c,f),{destroy:function(){a.removeListener(c,f)}}}o.exports=n},{}],5:[function(r,o,n){function a(u,w){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var c=r("socket.io-parser"),f=r("component-emitter"),v=r("to-array"),d=r("./on"),b=r("component-bind"),p=r("debug")("socket.io-client:socket"),_=r("has-binary");o.exports=a;var g={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=f.prototype.emit;f(a.prototype),a.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[d(u,"open",b(this,"onopen")),d(u,"packet",b(this,"onpacket")),d(u,"close",b(this,"onclose"))]}},a.prototype.open=a.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},a.prototype.send=function(){var u=v(arguments);return u.unshift("message"),this.emit.apply(this,u),this},a.prototype.emit=function(u){if(g.hasOwnProperty(u))return l.apply(this,arguments),this;var w=v(arguments),A=c.EVENT;_(w)&&(A=c.BINARY_EVENT);var k={type:A,data:w};return typeof w[w.length-1]=="function"&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),k.id=this.ids++),this.connected?this.packet(k):this.sendBuffer.push(k),this},a.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},a.prototype.onopen=function(){p("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},a.prototype.onclose=function(u){p("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},a.prototype.onpacket=function(u){if(u.nsp==this.nsp)switch(u.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(u);break;case c.BINARY_EVENT:this.onevent(u);break;case c.ACK:this.onack(u);break;case c.BINARY_ACK:this.onack(u);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",u.data)}},a.prototype.onevent=function(u){var w=u.data||[];p("emitting event %j",w),u.id!=null&&(p("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?l.apply(this,w):this.receiveBuffer.push(w)},a.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=v(arguments);p("sending ack %j",k);var L=_(k)?c.BINARY_ACK:c.ACK;w.packet({type:L,id:u,data:k})}}},a.prototype.onack=function(u){p("calling ack %s with %j",u.id,u.data);var w=this.acks[u.id];w.apply(this,u.data),delete this.acks[u.id]},a.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},a.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)l.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},a.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},a.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},a.prototype.close=a.prototype.disconnect=function(){return this.connected&&(p("performing disconnect (%s)",this.nsp),this.packet({type:c.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(r,o){(function(n){function a(v,p){var b=v,p=p||n.location;return v==null&&(v=p.protocol+"//"+p.host),typeof v=="string"&&(v.charAt(0)=="/"&&(v=v.charAt(1)=="/"?p.protocol+v:p.hostname+v),/^(https?|wss?):\/\//.test(v)||(f("protocol-less url %s",v),v=typeof p<"u"?p.protocol+"//"+v:"https://"+v),f("parse %s",v),b=c(v)),b.port||(/^(http|ws)$/.test(b.protocol)?b.port="80":/^(http|ws)s$/.test(b.protocol)&&(b.port="443")),b.path=b.path||"/",b.id=b.protocol+"://"+b.host+":"+b.port,b.href=b.protocol+"://"+b.host+(p&&p.port==b.port?"":":"+b.port),b}var c=r("parseuri"),f=r("debug")("socket.io-client:url");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(r,o){function n(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}o.exports=n,n.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),f=Math.floor(c*this.jitter*a);a=1&Math.floor(10*c)?a+f:a-f}return 0|Math.min(a,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(a){this.ms=a},n.prototype.setMax=function(a){this.max=a},n.prototype.setJitter=function(a){this.jitter=a}},{}],8:[function(r,o){var n=[].slice;o.exports=function(a,c){if(typeof c=="string"&&(c=a[c]),typeof c!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return c.apply(a,f.concat(n.call(arguments)))}}},{}],9:[function(r,o){function n(c){return c?a(c):void 0}function a(c){for(var f in n.prototype)c[f]=n.prototype[f];return c}o.exports=n,n.prototype.on=n.prototype.addEventListener=function(c,f){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(f),this},n.prototype.once=function(c,f){function v(){d.off(c,v),f.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},v.fn=f,this.on(c,v),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(c,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var v=this._callbacks[c];if(!v)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,b=0;b<v.length;b++)if(d=v[b],d===f||d.fn===f){v.splice(b,1);break}return this},n.prototype.emit=function(c){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),v=this._callbacks[c];if(v){v=v.slice(0);for(var d=0,b=v.length;b>d;++d)v[d].apply(this,f)}return this},n.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},n.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(r,o){function n(c){return n.enabled(c)?function(f){f=a(f);var v=new Date,d=v-(n[c]||v);n[c]=v,f=c+" "+f+" +"+n.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function a(c){return c instanceof Error?c.stack||c.message:c}o.exports=n,n.names=[],n.skips=[],n.enable=function(c){try{localStorage.debug=c}catch{}for(var f=(c||"").split(/[\s,]+/),v=f.length,d=0;v>d;d++)c=f[d].replace("*",".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$"))},n.disable=function(){n.enable("")},n.humanize=function(c){var f=1e3,v=6e4,d=60*v;return c>=d?(c/d).toFixed(1)+"h":c>=v?(c/v).toFixed(1)+"m":c>=f?(c/f|0)+"s":c+"ms"},n.enabled=function(c){for(var f=0,v=n.skips.length;v>f;f++)if(n.skips[f].test(c))return!1;for(var f=0,v=n.names.length;v>f;f++)if(n.names[f].test(c))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(r,o){o.exports=r("./lib/")},{"./lib/":12}],12:[function(r,o){o.exports=r("./socket"),o.exports.parser=r("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(r,o){(function(n){function a(u,w){if(!(this instanceof a))return new a(u,w);if(w=w||{},u&&typeof u=="object"&&(w=u,u=null),u&&(u=_(u),w.host=u.host,w.secure=u.protocol=="https"||u.protocol=="wss",w.port=u.port,u.query&&(w.query=u.query)),this.secure=w.secure!=null?w.secure:n.location&&location.protocol=="https:",w.host){var A=w.host.split(":");w.hostname=A.shift(),A.length?w.port=A.pop():w.port||(w.port=this.secure?"443":"80")}this.agent=w.agent||!1,this.hostname=w.hostname||(n.location?location.hostname:"localhost"),this.port=w.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=w.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=w.upgrade!==!1,this.path=(w.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!w.forceJSONP,this.jsonp=w.jsonp!==!1,this.forceBase64=!!w.forceBase64,this.enablesXDR=!!w.enablesXDR,this.timestampParam=w.timestampParam||"t",this.timestampRequests=w.timestampRequests,this.transports=w.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=w.policyPort||843,this.rememberUpgrade=w.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=w.onlyBinaryUpgrades,this.pfx=w.pfx||null,this.key=w.key||null,this.passphrase=w.passphrase||null,this.cert=w.cert||null,this.ca=w.ca||null,this.ciphers=w.ciphers||null,this.rejectUnauthorized=w.rejectUnauthorized||null,this.open()}function c(u){var w={};for(var A in u)u.hasOwnProperty(A)&&(w[A]=u[A]);return w}var f=r("./transports"),v=r("component-emitter"),d=r("debug")("engine.io-client:socket"),b=r("indexof"),p=r("engine.io-parser"),_=r("parseuri"),g=r("parsejson"),l=r("parseqs");o.exports=a,a.priorWebsocketSuccess=!1,v(a.prototype),a.protocol=p.protocol,a.Socket=a,a.Transport=r("./transport"),a.transports=r("./transports"),a.parser=r("engine.io-parser"),a.prototype.createTransport=function(u){d('creating transport "%s"',u);var w=c(this.query);w.EIO=p.protocol,w.transport=u,this.id&&(w.sid=this.id);var A=new f[u]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:w,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return A},a.prototype.open=function(){var w;if(this.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)w="websocket";else{if(this.transports.length==0){var u=this;return void setTimeout(function(){u.emit("error","No transports available")},0)}w=this.transports[0]}this.readyState="opening";var w;try{w=this.createTransport(w)}catch{return this.transports.shift(),void this.open()}w.open(),this.setTransport(w)},a.prototype.setTransport=function(u){d("setting transport %s",u.name);var w=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=u,u.on("drain",function(){w.onDrain()}).on("packet",function(A){w.onPacket(A)}).on("error",function(A){w.onError(A)}).on("close",function(){w.onClose("transport close")})},a.prototype.probe=function(u){function w(){if(I.onlyBinaryUpgrades){var P=!this.supportsBinary&&I.transport.supportsBinary;T=T||P}T||(d('probe transport "%s" opened',u),U.send([{type:"ping",data:"probe"}]),U.once("packet",function(R){if(!T)if(R.type=="pong"&&R.data=="probe"){if(d('probe transport "%s" pong',u),I.upgrading=!0,I.emit("upgrading",U),!U)return;a.priorWebsocketSuccess=U.name=="websocket",d('pausing current transport "%s"',I.transport.name),I.transport.pause(function(){T||I.readyState!="closed"&&(d("changing transport and sending upgrade packet"),N(),I.setTransport(U),U.send([{type:"upgrade"}]),I.emit("upgrade",U),U=null,I.upgrading=!1,I.flush())})}else{d('probe transport "%s" failed',u);var B=new Error("probe error");B.transport=U.name,I.emit("upgradeError",B)}}))}function A(){T||(T=!0,N(),U.close(),U=null)}function k(P){var R=new Error("probe error: "+P);R.transport=U.name,A(),d('probe transport "%s" failed because of error: %s',u,P),I.emit("upgradeError",R)}function L(){k("transport closed")}function Y(){k("socket closed")}function J(P){U&&P.name!=U.name&&(d('"%s" works - aborting "%s"',P.name,U.name),A())}function N(){U.removeListener("open",w),U.removeListener("error",k),U.removeListener("close",L),I.removeListener("close",Y),I.removeListener("upgrading",J)}d('probing transport "%s"',u);var U=this.createTransport(u,{probe:1}),T=!1,I=this;a.priorWebsocketSuccess=!1,U.once("open",w),U.once("error",k),U.once("close",L),this.once("close",Y),this.once("upgrading",J),U.open()},a.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",a.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var u=0,w=this.upgrades.length;w>u;u++)this.probe(this.upgrades[u])}},a.prototype.onPacket=function(u){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',u.type,u.data),this.emit("packet",u),this.emit("heartbeat"),u.type){case"open":this.onHandshake(g(u.data));break;case"pong":this.setPing();break;case"error":var w=new Error("server error");w.code=u.data,this.emit("error",w);break;case"message":this.emit("data",u.data),this.emit("message",u.data)}else d('packet received with socket readyState "%s"',this.readyState)},a.prototype.onHandshake=function(u){this.emit("handshake",u),this.id=u.sid,this.transport.query.sid=u.sid,this.upgrades=this.filterUpgrades(u.upgrades),this.pingInterval=u.pingInterval,this.pingTimeout=u.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},a.prototype.onHeartbeat=function(u){clearTimeout(this.pingTimeoutTimer);var w=this;w.pingTimeoutTimer=setTimeout(function(){w.readyState!="closed"&&w.onClose("ping timeout")},u||w.pingInterval+w.pingTimeout)},a.prototype.setPing=function(){var u=this;clearTimeout(u.pingIntervalTimer),u.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",u.pingTimeout),u.ping(),u.onHeartbeat(u.pingTimeout)},u.pingInterval)},a.prototype.ping=function(){this.sendPacket("ping")},a.prototype.onDrain=function(){for(var u=0;u<this.prevBufferLen;u++)this.callbackBuffer[u]&&this.callbackBuffer[u]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},a.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(d("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},a.prototype.write=a.prototype.send=function(u,w){return this.sendPacket("message",u,w),this},a.prototype.sendPacket=function(u,w,A){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:u,data:w};this.emit("packetCreate",k),this.writeBuffer.push(k),this.callbackBuffer.push(A),this.flush()}},a.prototype.close=function(){function u(){k.onClose("forced close"),d("socket closing - telling transport to close"),k.transport.close()}function w(){k.removeListener("upgrade",w),k.removeListener("upgradeError",w),u()}function A(){k.once("upgrade",w),k.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var k=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?A():u()}):this.upgrading?A():u()}return this},a.prototype.onError=function(u){d("socket error %j",u),a.priorWebsocketSuccess=!1,this.emit("error",u),this.onClose("transport error",u)},a.prototype.onClose=function(u,w){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',u);var A=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){A.writeBuffer=[],A.callbackBuffer=[],A.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",u,w)}},a.prototype.filterUpgrades=function(u){for(var w=[],A=0,k=u.length;k>A;A++)~b(this.transports,u[A])&&w.push(u[A]);return w}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(r,o){function n(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized}var a=r("engine.io-parser"),c=r("component-emitter");o.exports=n,c(n.prototype),n.timestamps=0,n.prototype.onError=function(f,v){var d=new Error(f);return d.type="TransportError",d.description=v,this.emit("error",d),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(f){if(this.readyState!="open")throw new Error("Transport not open");this.write(f)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(f){var v=a.decodePacket(f,this.socket.binaryType);this.onPacket(v)},n.prototype.onPacket=function(f){this.emit("packet",f)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(r,o,n){(function(a){function c(p){var _,g=!1,l=!1,u=p.jsonp!==!1;if(a.location){var w=location.protocol=="https:",A=location.port;A||(A=w?443:80),g=p.hostname!=location.hostname||A!=p.port,l=p.secure!=w}if(p.xdomain=g,p.xscheme=l,_=new f(p),"open"in _&&!p.forceJSONP)return new v(p);if(!u)throw new Error("JSONP disabled");return new d(p)}var f=r("xmlhttprequest"),v=r("./polling-xhr"),d=r("./polling-jsonp"),b=r("./websocket");n.polling=c,n.websocket=b}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(r,o){(function(n){function a(){}function c(_){f.call(this,_),this.query=this.query||{},d||(n.___eio||(n.___eio=[]),d=n.___eio),this.index=d.length;var g=this;d.push(function(l){g.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){g.script&&(g.script.onerror=a)},!1)}var f=r("./polling"),v=r("component-inherit");o.exports=c;var d,b=/\n/g,p=/\\n/g;v(c,f),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),f.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,g=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),g.async=!0,g.src=this.uri(),g.onerror=function(w){_.onError("jsonp poll error",w)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(g,l),this.script=g;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var w=document.createElement("iframe");document.body.appendChild(w),document.body.removeChild(w)},100)},c.prototype.doWrite=function(_,g){function l(){u(),g()}function u(){if(w.iframe)try{w.form.removeChild(w.iframe)}catch(N){w.onError("jsonp polling iframe removal error",N)}try{var J='<iframe src="javascript:0" name="'+w.iframeId+'">';A=document.createElement(J)}catch{A=document.createElement("iframe"),A.name=w.iframeId,A.src="javascript:0"}A.id=w.iframeId,w.form.appendChild(A),w.iframe=A}var w=this;if(!this.form){var A,k=document.createElement("form"),L=document.createElement("textarea"),Y=this.iframeId="eio_iframe_"+this.index;k.className="socketio",k.style.position="absolute",k.style.top="-1000px",k.style.left="-1000px",k.target=Y,k.method="POST",k.setAttribute("accept-charset","utf-8"),L.name="d",k.appendChild(L),document.body.appendChild(k),this.form=k,this.area=L}this.form.action=this.uri(),u(),_=_.replace(p,`\\
|
|
33
|
-
`),this.area.value=_.replace(b,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){w.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(r,o){(function(n){function a(){}function c(l){if(b.call(this,l),n.location){var u=location.protocol=="https:",w=location.port;w||(w=u?443:80),this.xd=l.hostname!=n.location.hostname||w!=l.port,this.xs=l.secure!=u}}function f(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function v(){for(var l in f.requests)f.requests.hasOwnProperty(l)&&f.requests[l].abort()}var d=r("xmlhttprequest"),b=r("./polling"),p=r("component-emitter"),_=r("component-inherit"),g=r("debug")("engine.io-client:polling-xhr");o.exports=c,o.exports.Request=f,_(c,b),c.prototype.supportsBinary=!0,c.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new f(l)},c.prototype.doWrite=function(l,u){var w=typeof l!="string"&&l!==void 0,A=this.request({method:"POST",data:l,isBinary:w}),k=this;A.on("success",u),A.on("error",function(L){k.onError("xhr post error",L)}),this.sendXhr=A},c.prototype.doPoll=function(){g("xhr poll");var l=this.request(),u=this;l.on("data",function(w){u.onData(w)}),l.on("error",function(w){u.onError("xhr poll error",w)}),this.pollXhr=l},p(f.prototype),f.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var u=this.xhr=new d(l),w=this;try{if(g("xhr open %s: %s",this.method,this.uri),u.open(this.method,this.uri,this.async),this.supportsBinary&&(u.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?u.setRequestHeader("Content-type","application/octet-stream"):u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in u&&(u.withCredentials=!0),this.hasXDR()?(u.onload=function(){w.onLoad()},u.onerror=function(){w.onError(u.responseText)}):u.onreadystatechange=function(){u.readyState==4&&(u.status==200||u.status==1223?w.onLoad():setTimeout(function(){w.onError(u.status)},0))},g("xhr data %s",this.data),u.send(this.data)}catch(A){return void setTimeout(function(){w.onError(A)},0)}n.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},f.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},f.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=a:this.xhr.onreadystatechange=a,l)try{this.xhr.abort()}catch{}n.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var l;try{var u;try{u=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=u==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(w){this.onError(w)}l!=null&&this.onData(l)},f.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},n.document&&(f.requestsCount=0,f.requests={},n.attachEvent?n.attachEvent("onunload",v):n.addEventListener&&n.addEventListener("beforeunload",v,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(r,o){function n(p){var _=p&&p.forceBase64;(!b||_)&&(this.supportsBinary=!1),a.call(this,p)}var a=r("../transport"),c=r("parseqs"),f=r("engine.io-parser"),v=r("component-inherit"),d=r("debug")("engine.io-client:polling");o.exports=n;var b=function(){var p=r("xmlhttprequest"),_=new p({xdomain:!1});return _.responseType!=null}();v(n,a),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(p){function _(){d("paused"),g.readyState="paused",p()}var g=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(d("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){d("pre-pause polling complete"),--l||_()})),this.writable||(d("we are currently writing - waiting to pause"),l++,this.once("drain",function(){d("pre-pause writing complete"),--l||_()}))}else _()},n.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(p){var _=this;d("polling got data %s",p);var g=function(l){return _.readyState=="opening"&&_.onOpen(),l.type=="close"?(_.onClose(),!1):void _.onPacket(l)};f.decodePayload(p,this.socket.binaryType,g),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function p(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),p()):(d("transport not open - deferring close"),this.once("open",p))},n.prototype.write=function(p){var g=this;this.writable=!1;var _=function(){g.writable=!0,g.emit("drain")},g=this;f.encodePayload(p,this.supportsBinary,function(l){g.doWrite(l,_)})},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"https":"http",g="";return this.timestampRequests!==!1&&(p[this.timestampParam]=+new Date+"-"+a.timestamps++),this.supportsBinary||p.sid||(p.b64=1),p=c.encode(p),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(g=":"+this.port),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(r,o){function n(p){var _=p&&p.forceBase64;_&&(this.supportsBinary=!1),a.call(this,p)}var a=r("../transport"),c=r("engine.io-parser"),f=r("parseqs"),v=r("component-inherit"),d=r("debug")("engine.io-client:websocket"),b=r("ws");o.exports=n,v(n,a),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var p=this.uri(),_=void 0,g={agent:this.agent};g.pfx=this.pfx,g.key=this.key,g.passphrase=this.passphrase,g.cert=this.cert,g.ca=this.ca,g.ciphers=this.ciphers,g.rejectUnauthorized=this.rejectUnauthorized,this.ws=new b(p,_,g),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var p=this;this.ws.onopen=function(){p.onOpen()},this.ws.onclose=function(){p.onClose()},this.ws.onmessage=function(_){p.onData(_.data)},this.ws.onerror=function(_){p.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(p){var _=this;setTimeout(function(){a.prototype.onData.call(_,p)},0)}),n.prototype.write=function(p){function _(){g.writable=!0,g.emit("drain")}var g=this;this.writable=!1;for(var l=0,u=p.length;u>l;l++)c.encodePacket(p[l],this.supportsBinary,function(w){try{g.ws.send(w)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},n.prototype.onClose=function(){a.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"wss":"ws",g="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(g=":"+this.port),this.timestampRequests&&(p[this.timestampParam]=+new Date),this.supportsBinary||(p.b64=1),p=f.encode(p),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p},n.prototype.check=function(){return!(!b||"__initialize"in b&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(r,o){var n=r("has-cors");o.exports=function(a){var c=a.xdomain,f=a.xscheme,v=a.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!f&&v)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(r,o){o.exports=function(n,a){var c=function(){};c.prototype=a.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(r,o,n){function a(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function c(){var b=arguments,p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+n.humanize(this.diff),!p)return b;var _="color: "+this.color;b=[b[0],_,"color: inherit"].concat(Array.prototype.slice.call(b,1));var g=0,l=0;return b[0].replace(/%[a-z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_),b}function f(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function v(b){try{b==null?localStorage.removeItem("debug"):localStorage.debug=b}catch{}}function d(){var b;try{b=localStorage.debug}catch{}return b}n=o.exports=r("./debug"),n.log=f,n.formatArgs=c,n.save=v,n.load=d,n.useColors=a,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(b){return JSON.stringify(b)},n.enable(d())},{"./debug":23}],23:[function(r,o,n){function a(){return n.colors[_++%n.colors.length]}function c(g){function l(){}function u(){var A=u,k=+new Date,L=k-(p||k);A.diff=L,A.prev=p,A.curr=k,p=k,A.useColors==null&&(A.useColors=n.useColors()),A.color==null&&A.useColors&&(A.color=a());var Y=Array.prototype.slice.call(arguments);Y[0]=n.coerce(Y[0]),typeof Y[0]!="string"&&(Y=["%o"].concat(Y));var J=0;Y[0]=Y[0].replace(/%([a-z%])/g,function(U,T){if(U==="%%")return U;J++;var I=n.formatters[T];if(typeof I=="function"){var P=Y[J];U=I.call(A,P),Y.splice(J,1),J--}return U}),typeof n.formatArgs=="function"&&(Y=n.formatArgs.apply(A,Y));var N=u.log||n.log||console.log.bind(console);N.apply(A,Y)}l.enabled=!1,u.enabled=!0;var w=n.enabled(g)?u:l;return w.namespace=g,w}function f(g){n.save(g);for(var l=(g||"").split(/[\s,]+/),u=l.length,w=0;u>w;w++)l[w]&&(g=l[w].replace(/\*/g,".*?"),g[0]==="-"?n.skips.push(new RegExp("^"+g.substr(1)+"$")):n.names.push(new RegExp("^"+g+"$")))}function v(){n.enable("")}function d(g){var l,u;for(l=0,u=n.skips.length;u>l;l++)if(n.skips[l].test(g))return!1;for(l=0,u=n.names.length;u>l;l++)if(n.names[l].test(g))return!0;return!1}function b(g){return g instanceof Error?g.stack||g.message:g}n=o.exports=c,n.coerce=b,n.disable=v,n.enable=f,n.enabled=d,n.humanize=r("ms"),n.names=[],n.skips=[],n.formatters={};var p,_=0},{ms:24}],24:[function(r,o){function n(g){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(g);if(l){var u=parseFloat(l[1]),w=(l[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"y":return u*_;case"days":case"day":case"d":return u*p;case"hours":case"hour":case"h":return u*b;case"minutes":case"minute":case"m":return u*d;case"seconds":case"second":case"s":return u*v;case"ms":return u}}}function a(g){return g>=p?Math.round(g/p)+"d":g>=b?Math.round(g/b)+"h":g>=d?Math.round(g/d)+"m":g>=v?Math.round(g/v)+"s":g+"ms"}function c(g){return f(g,p,"day")||f(g,b,"hour")||f(g,d,"minute")||f(g,v,"second")||g+" ms"}function f(g,l,u){return l>g?void 0:1.5*l>g?Math.floor(g/l)+" "+u:Math.ceil(g/l)+" "+u+"s"}var v=1e3,d=60*v,b=60*d,p=24*b,_=365.25*p;o.exports=function(g,l){return l=l||{},typeof g=="string"?n(g):l.long?c(g):a(g)}},{}],25:[function(r,o,n){(function(a){function c(T,I){var P="b"+n.packets[T.type]+T.data.data;return I(P)}function f(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=T.data,B=new Uint8Array(R),H=new Uint8Array(1+R.byteLength);H[0]=Y[T.type];for(var z=0;z<B.length;z++)H[z+1]=B[z];return P(H.buffer)}function v(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=new FileReader;return R.onload=function(){T.data=R.result,n.encodePacket(T,I,!0,P)},R.readAsArrayBuffer(T.data)}function d(T,I,P){if(!I)return n.encodeBase64Packet(T,P);if(L)return v(T,I,P);var R=new Uint8Array(1);R[0]=Y[T.type];var B=new U([R.buffer,T.data]);return P(B)}function b(T,I,P){for(var R=new Array(T.length),B=u(T.length,P),H=function(G,F,pt){I(F,function(ut,xt){R[G]=xt,pt(ut,R)})},z=0;z<T.length;z++)H(z,T[z],B)}var p=r("./keys"),_=r("has-binary"),g=r("arraybuffer.slice"),l=r("base64-arraybuffer"),u=r("after"),w=r("utf8"),A=navigator.userAgent.match(/Android/i),k=/PhantomJS/i.test(navigator.userAgent),L=A||k;n.protocol=3;var Y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},J=p(Y),N={type:"error",data:"parser error"},U=r("blob");n.encodePacket=function(T,I,P,R){typeof I=="function"&&(R=I,I=!1),typeof P=="function"&&(R=P,P=null);var B=T.data===void 0?void 0:T.data.buffer||T.data;if(a.ArrayBuffer&&B instanceof ArrayBuffer)return f(T,I,R);if(U&&B instanceof a.Blob)return d(T,I,R);if(B&&B.base64)return c(T,R);var H=Y[T.type];return T.data!==void 0&&(H+=P?w.encode(String(T.data)):String(T.data)),R(""+H)},n.encodeBase64Packet=function(T,I){var P="b"+n.packets[T.type];if(U&&T.data instanceof U){var R=new FileReader;return R.onload=function(){var F=R.result.split(",")[1];I(P+F)},R.readAsDataURL(T.data)}var B;try{B=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch{for(var H=new Uint8Array(T.data),z=new Array(H.length),G=0;G<H.length;G++)z[G]=H[G];B=String.fromCharCode.apply(null,z)}return P+=a.btoa(B),I(P)},n.decodePacket=function(T,I,P){if(typeof T=="string"||T===void 0){if(T.charAt(0)=="b")return n.decodeBase64Packet(T.substr(1),I);if(P)try{T=w.decode(T)}catch{return N}var B=T.charAt(0);return Number(B)==B&&J[B]?T.length>1?{type:J[B],data:T.substring(1)}:{type:J[B]}:N}var R=new Uint8Array(T),B=R[0],H=g(T,1);return U&&I==="blob"&&(H=new U([H])),{type:J[B],data:H}},n.decodeBase64Packet=function(T,I){var P=J[T.charAt(0)];if(!a.ArrayBuffer)return{type:P,data:{base64:!0,data:T.substr(1)}};var R=l.decode(T.substr(1));return I==="blob"&&U&&(R=new U([R])),{type:P,data:R}},n.encodePayload=function(T,I,P){function R(z){return z.length+":"+z}function B(z,G){n.encodePacket(z,H?I:!1,!0,function(F){G(null,R(F))})}typeof I=="function"&&(P=I,I=null);var H=_(T);return I&&H?U&&!L?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,B,function(z,G){return P(G.join(""))}):P("0:")},n.decodePayload=function(T,I,P){if(typeof T!="string")return n.decodePayloadAsBinary(T,I,P);typeof I=="function"&&(P=I,I=null);var R;if(T=="")return P(N,0,1);for(var B,H,z="",G=0,F=T.length;F>G;G++){var pt=T.charAt(G);if(pt!=":")z+=pt;else{if(z==""||z!=(B=Number(z))||(H=T.substr(G+1,B),z!=H.length))return P(N,0,1);if(H.length){if(R=n.decodePacket(H,I,!0),N.type==R.type&&N.data==R.data)return P(N,0,1);var ut=P(R,G+B,F);if(ut===!1)return}G+=B,z=""}}return z!=""?P(N,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){return B(null,H)})}return T.length?void b(T,P,function(R,B){var H=B.reduce(function(F,pt){var ut;return ut=typeof pt=="string"?pt.length:pt.byteLength,F+ut.toString().length+ut+2},0),z=new Uint8Array(H),G=0;return B.forEach(function(F){var pt=typeof F=="string",ut=F;if(pt){for(var xt=new Uint8Array(F.length),ct=0;ct<F.length;ct++)xt[ct]=F.charCodeAt(ct);ut=xt.buffer}z[G++]=pt?0:1;for(var jt=ut.byteLength.toString(),ct=0;ct<jt.length;ct++)z[G++]=parseInt(jt[ct]);z[G++]=255;for(var xt=new Uint8Array(ut),ct=0;ct<xt.length;ct++)z[G++]=xt[ct]}),I(z.buffer)}):I(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){var z=new Uint8Array(1);if(z[0]=1,typeof H=="string"){for(var G=new Uint8Array(H.length),F=0;F<H.length;F++)G[F]=H.charCodeAt(F);H=G.buffer,z[0]=0}for(var pt=H instanceof ArrayBuffer?H.byteLength:H.size,ut=pt.toString(),xt=new Uint8Array(ut.length+1),F=0;F<ut.length;F++)xt[F]=parseInt(ut[F]);if(xt[ut.length]=255,U){var ct=new U([z.buffer,xt.buffer,H]);B(null,ct)}})}b(T,P,function(R,B){return I(new U(B))})},n.decodePayloadAsBinary=function(T,I,P){typeof I=="function"&&(P=I,I=null);for(var R=T,B=[],H=!1;R.byteLength>0;){for(var z=new Uint8Array(R),G=z[0]===0,F="",pt=1;z[pt]!=255;pt++){if(F.length>310){H=!0;break}F+=z[pt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ut=g(R,0,F);if(G)try{ut=String.fromCharCode.apply(null,new Uint8Array(ut))}catch{var xt=new Uint8Array(ut);ut="";for(var pt=0;pt<xt.length;pt++)ut+=String.fromCharCode(xt[pt])}B.push(ut),R=g(R,F)}var ct=B.length;B.forEach(function(jt,Be){P(n.decodePacket(jt,I,!0),Be,ct)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(r,o){o.exports=Object.keys||function(n){var a=[],c=Object.prototype.hasOwnProperty;for(var f in n)c.call(n,f)&&a.push(f);return a}},{}],27:[function(r,o){function n(c,f,v){function d(p,_){if(d.count<=0)throw new Error("after called too many times");--d.count,p?(b=!0,f(p),f=v):d.count!==0||b||f(null,_)}var b=!1;return v=v||a,d.count=c,c===0?f():d}function a(){}o.exports=n},{}],28:[function(r,o){o.exports=function(n,a,c){var f=n.byteLength;if(a=a||0,c=c||f,n.slice)return n.slice(a,c);if(0>a&&(a+=f),0>c&&(c+=f),c>f&&(c=f),a>=f||a>=c||f===0)return new ArrayBuffer(0);for(var v=new Uint8Array(n),d=new Uint8Array(c-a),b=a,p=0;c>b;b++,p++)d[p]=v[b];return d.buffer}},{}],29:[function(r,o,n){(function(a){n.encode=function(c){var f,v=new Uint8Array(c),d=v.length,b="";for(f=0;d>f;f+=3)b+=a[v[f]>>2],b+=a[(3&v[f])<<4|v[f+1]>>4],b+=a[(15&v[f+1])<<2|v[f+2]>>6],b+=a[63&v[f+2]];return d%3===2?b=b.substring(0,b.length-1)+"=":d%3===1&&(b=b.substring(0,b.length-2)+"=="),b},n.decode=function(c){var f,v,d,b,p,_=.75*c.length,g=c.length,l=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var u=new ArrayBuffer(_),w=new Uint8Array(u);for(f=0;g>f;f+=4)v=a.indexOf(c[f]),d=a.indexOf(c[f+1]),b=a.indexOf(c[f+2]),p=a.indexOf(c[f+3]),w[l++]=v<<2|d>>4,w[l++]=(15&d)<<4|b>>2,w[l++]=(3&b)<<6|63&p;return u}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(r,o){(function(n){function a(_){for(var g=0;g<_.length;g++){var l=_[g];if(l.buffer instanceof ArrayBuffer){var u=l.buffer;if(l.byteLength!==u.byteLength){var w=new Uint8Array(l.byteLength);w.set(new Uint8Array(u,l.byteOffset,l.byteLength)),u=w.buffer}_[g]=u}}}function c(_,g){g=g||{};var l=new v;a(_);for(var u=0;u<_.length;u++)l.append(_[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(_,g){return a(_),new Blob(_,g||{})}var v=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),b=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),p=v&&v.prototype.append&&v.prototype.getBlob;o.exports=function(){return d?b?n.Blob:f:p?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(r,o,n){(function(a){(function(c){function f(R){for(var B,H,z=[],G=0,F=R.length;F>G;)B=R.charCodeAt(G++),B>=55296&&56319>=B&&F>G?(H=R.charCodeAt(G++),(64512&H)==56320?z.push(((1023&B)<<10)+(1023&H)+65536):(z.push(B),G--)):z.push(B);return z}function v(R){for(var B,H=R.length,z=-1,G="";++z<H;)B=R[z],B>65535&&(B-=65536,G+=N(B>>>10&1023|55296),B=56320|1023&B),G+=N(B);return G}function d(R){if(R>=55296&&57343>=R)throw Error("Lone surrogate U+"+R.toString(16).toUpperCase()+" is not a scalar value")}function b(R,B){return N(R>>B&63|128)}function p(R){if(!(4294967168&R))return N(R);var B="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(B=N(R>>18&7|240),B+=b(R,12),B+=b(R,6)):(d(R),B=N(R>>12&15|224),B+=b(R,6)):B=N(R>>6&31|192),B+=N(63&R|128)}function _(R){for(var B,H=f(R),z=H.length,G=-1,F="";++G<z;)B=H[G],F+=p(B);return F}function g(){if(J>=Y)throw Error("Invalid byte index");var R=255&L[J];if(J++,(192&R)==128)return 63&R;throw Error("Invalid continuation byte")}function l(){var R,B,H,z,G;if(J>Y)throw Error("Invalid byte index");if(J==Y)return!1;if(R=255&L[J],J++,(128&R)==0)return R;if((224&R)==192){var B=g();if(G=(31&R)<<6|B,G>=128)return G;throw Error("Invalid continuation byte")}if((240&R)==224){if(B=g(),H=g(),G=(15&R)<<12|B<<6|H,G>=2048)return d(G),G;throw Error("Invalid continuation byte")}if((248&R)==240&&(B=g(),H=g(),z=g(),G=(15&R)<<18|B<<12|H<<6|z,G>=65536&&1114111>=G))return G;throw Error("Invalid UTF-8 detected")}function u(R){L=f(R),Y=L.length,J=0;for(var B,H=[];(B=l())!==!1;)H.push(B);return v(H)}var w=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==w&&o,k=typeof a=="object"&&a;(k.global===k||k.window===k)&&(c=k);var L,Y,J,N=String.fromCharCode,U={version:"2.0.0",encode:_,decode:u};if(w&&!w.nodeType)if(A)A.exports=U;else{var T={},I=T.hasOwnProperty;for(var P in U)I.call(U,P)&&(w[P]=U[P])}else c.utf8=U})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(r,o){(function(n){var a=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,f=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,b=/\s+$/;o.exports=function(p){return typeof p=="string"&&p?(p=p.replace(d,"").replace(b,""),n.JSON&&JSON.parse?JSON.parse(p):a.test(p.replace(c,"@").replace(f,"]").replace(v,""))?new Function("return "+p)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(r,o,n){n.encode=function(a){var c="";for(var f in a)a.hasOwnProperty(f)&&(c.length&&(c+="&"),c+=encodeURIComponent(f)+"="+encodeURIComponent(a[f]));return c},n.decode=function(a){for(var c={},f=a.split("&"),v=0,d=f.length;d>v;v++){var b=f[v].split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}return c}},{}],34:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){var f=c,v=c.indexOf("["),d=c.indexOf("]");v!=-1&&d!=-1&&(c=c.substring(0,v)+c.substring(v,d).replace(/:/g,";")+c.substring(d,c.length));for(var b=n.exec(c||""),p={},_=14;_--;)p[a[_]]=b[_]||"";return v!=-1&&d!=-1&&(p.source=f,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p}},{}],35:[function(r,o){function n(f,v){return v?new c(f,v):new c(f)}var a=function(){return self}(),c=a.WebSocket||a.MozWebSocket;o.exports=c?n:null,c&&(n.prototype=c.prototype)},{}],36:[function(r,o){(function(n){function a(f){function v(d){if(!d)return!1;if(n.Buffer&&n.Buffer.isBuffer(d)||n.ArrayBuffer&&d instanceof ArrayBuffer||n.Blob&&d instanceof Blob||n.File&&d instanceof File)return!0;if(c(d)){for(var b=0;b<d.length;b++)if(v(d[b]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&v(d[p]))return!0}return!1}return v(f)}var c=r("isarray");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(r,o){o.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(r,o){var n=r("global");try{o.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{o.exports=!1}},{global:39}],39:[function(r,o){o.exports=function(){return this}()},{}],40:[function(r,o){var n=[].indexOf;o.exports=function(a,c){if(n)return a.indexOf(c);for(var f=0;f<a.length;++f)if(a[f]===c)return f;return-1}},{}],41:[function(r,o,n){var a=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(v);return f},n.values=function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(c[v]);return f},n.merge=function(c,f){for(var v in f)a.call(f,v)&&(c[v]=f[v]);return c},n.length=function(c){return n.keys(c).length},n.isEmpty=function(c){return n.length(c)==0}},{}],42:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){for(var f=n.exec(c||""),v={},d=14;d--;)v[a[d]]=f[d]||"";return v}},{}],43:[function(r,o,n){(function(a){var c=r("isarray"),f=r("./is-buffer");n.deconstructPacket=function(v){function d(g){if(!g)return g;if(f(g)){var l={_placeholder:!0,num:b.length};return b.push(g),l}if(c(g)){for(var u=new Array(g.length),w=0;w<g.length;w++)u[w]=d(g[w]);return u}if(typeof g=="object"&&!(g instanceof Date)){var u={};for(var A in g)u[A]=d(g[A]);return u}return g}var b=[],p=v.data,_=v;return _.data=d(p),_.attachments=b.length,{packet:_,buffers:b}},n.reconstructPacket=function(v,d){function b(p){if(p&&p._placeholder){var _=d[p.num];return _}if(c(p)){for(var g=0;g<p.length;g++)p[g]=b(p[g]);return p}if(p&&typeof p=="object"){for(var l in p)p[l]=b(p[l]);return p}return p}return v.data=b(v.data),v.attachments=void 0,v},n.removeBlobs=function(v,d){function b(g,l,u){if(!g)return g;if(a.Blob&&g instanceof Blob||a.File&&g instanceof File){p++;var w=new FileReader;w.onload=function(){u?u[l]=this.result:_=this.result,--p||d(_)},w.readAsArrayBuffer(g)}else if(c(g))for(var A=0;A<g.length;A++)b(g[A],A,g);else if(g&&typeof g=="object"&&!f(g))for(var k in g)b(g[k],k,g)}var p=0,_=v;b(_),p||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(r,o,n){function a(){}function c(A){var k="",L=!1;return k+=A.type,(n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)&&(k+=A.attachments,k+="-"),A.nsp&&A.nsp!="/"&&(L=!0,k+=A.nsp),A.id!=null&&(L&&(k+=",",L=!1),k+=A.id),A.data!=null&&(L&&(k+=","),k+=g.stringify(A.data)),_("encoded %j as %s",A,k),k}function f(A,k){function L(Y){var J=u.deconstructPacket(Y),N=c(J.packet),U=J.buffers;U.unshift(N),k(U)}u.removeBlobs(A,L)}function v(){this.reconstructor=null}function d(A){var k={},L=0;if(k.type=Number(A.charAt(0)),n.types[k.type]==null)return p();if(n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type){for(var Y="";A.charAt(++L)!="-"&&(Y+=A.charAt(L),L!=A.length););if(Y!=Number(Y)||A.charAt(L)!="-")throw new Error("Illegal attachments");k.attachments=Number(Y)}if(A.charAt(L+1)=="/")for(k.nsp="";++L;){var J=A.charAt(L);if(J==","||(k.nsp+=J,L==A.length))break}else k.nsp="/";var N=A.charAt(L+1);if(N!==""&&Number(N)==N){for(k.id="";++L;){var J=A.charAt(L);if(J==null||Number(J)!=J){--L;break}if(k.id+=A.charAt(L),L==A.length)break}k.id=Number(k.id)}if(A.charAt(++L))try{k.data=g.parse(A.substr(L))}catch{return p()}return _("decoded %s as %j",A,k),k}function b(A){this.reconPack=A,this.buffers=[]}function p(){return{type:n.ERROR,data:"parser error"}}var _=r("debug")("socket.io-parser"),g=r("json3"),l=(r("isarray"),r("component-emitter")),u=r("./binary"),w=r("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=a,n.Decoder=v,a.prototype.encode=function(A,k){if(_("encoding packet %j",A),n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)f(A,k);else{var L=c(A);k([L])}},l(v.prototype),v.prototype.add=function(A){var k;if(typeof A=="string")k=d(A),n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type?(this.reconstructor=new b(k),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",k)):this.emit("decoded",k);else{if(!w(A)&&!A.base64)throw new Error("Unknown type: "+A);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");k=this.reconstructor.takeBinaryData(A),k&&(this.reconstructor=null,this.emit("decoded",k))}},v.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},b.prototype.takeBinaryData=function(A){if(this.buffers.push(A),this.buffers.length==this.reconPack.attachments){var k=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),k}return null},b.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(r,o){(function(n){function a(c){return n.Buffer&&n.Buffer.isBuffer(c)||n.ArrayBuffer&&c instanceof ArrayBuffer}o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(r,o){o.exports=r(37)},{}],47:[function(r,o,n){(function(a){function c($){if(c[$]!==d)return c[$];var Q;if($=="bug-string-char-index")Q=!1;else if($=="json")Q=c("json-stringify")&&c("json-parse");else{var X,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if($=="json-stringify"){var K=_.stringify,et=typeof K=="function"&&g;if(et){(X=function(){return 1}).toJSON=X;try{et=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(b)===d&&K(d)===d&&K()===d&&K(X)==="1"&&K([X])=="[1]"&&K([d])=="[null]"&&K(null)=="null"&&K([d,b,null])=="[null,null,null]"&&K({a:[X,!0,!1,null,`\0\b
|
|
32
|
+
}`;var gt=Fu(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(gt.source=W,is(gt))throw gt;return gt}function M0(t){return At(t).toLowerCase()}function q0(t){return At(t).toUpperCase()}function W0(t,e,i){if(t=At(t),t&&(i||e===n))return $a(t);if(!t||!(e=de(e)))return t;var s=Re(t),h=Re(e),m=Ja(s,h),C=ja(s,h)+1;return hn(s,m,C).join("")}function H0(t,e,i){if(t=At(t),t&&(i||e===n))return t.slice(0,Va(t)+1);if(!t||!(e=de(e)))return t;var s=Re(t),h=ja(s,Re(e))+1;return hn(s,0,h).join("")}function K0(t,e,i){if(t=At(t),t&&(i||e===n))return t.replace(ro,"");if(!t||!(e=de(e)))return t;var s=Re(t),h=Ja(s,Re(e));return hn(s,h).join("")}function z0(t,e){var i=B,s=H;if(Bt(e)){var h="separator"in e?e.separator:h;i="length"in e?dt(e.length):i,s="omission"in e?de(e.omission):s}t=At(t);var m=t.length;if(Pn(t)){var C=Re(t);m=C.length}if(i>=m)return t;var S=i-Fn(s);if(S<1)return s;var E=C?hn(C,0,S).join(""):t.slice(0,S);if(h===n)return E+s;if(C&&(S+=E.length-S),os(h)){if(t.slice(S).search(h)){var M,q=E;for(h.global||(h=bo(h.source,At(ga.exec(h))+"g")),h.lastIndex=0;M=h.exec(q);)var W=M.index;E=E.slice(0,W===n?S:W)}}else if(t.indexOf(de(h),S)!=S){var j=E.lastIndexOf(h);j>-1&&(E=E.slice(0,j))}return E+s}function X0(t){return t=At(t),t&&nl.test(t)?t.replace(la,wp):t}var G0=Xn(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),cs=Mc("toUpperCase");function Pu(t,e,i){return t=At(t),e=i?n:e,e===n?gp(t)?Sp(t):sp(t):t.match(e)||[]}var Fu=yt(function(t,e){try{return le(t,n,e)}catch(i){return is(i)?i:new ft(i)}}),$0=$e(function(t,e){return we(e,function(i){i=Me(i),Xe(t,i,ns(t[i],t))}),t});function J0(t){var e=t==null?0:t.length,i=it();return t=e?Nt(t,function(s){if(typeof s[1]!="function")throw new be(v);return[i(s[0]),s[1]]}):[],yt(function(s){for(var h=-1;++h<e;){var m=t[h];if(le(m[0],this,s))return le(m[1],this,s)}})}function j0(t){return wd(Se(t,g))}function us(t){return function(){return t}}function Y0(t,e){return t==null||t!==t?e:t}var V0=Wc(),Z0=Wc(!0);function ue(t){return t}function fs(t){return vc(typeof t=="function"?t:Se(t,g))}function Q0(t){return _c(Se(t,g))}function tm(t,e){return wc(t,Se(e,g))}var em=yt(function(t,e){return function(i){return lr(i,t,e)}}),nm=yt(function(t,e){return function(i){return lr(t,i,e)}});function hs(t,e,i){var s=Kt(e),h=ei(e,s);i==null&&!(Bt(e)&&(h.length||!s.length))&&(i=e,e=t,t=this,h=ei(e,Kt(e)));var m=!(Bt(i)&&"chain"in i)||!!i.chain,C=je(t);return we(h,function(S){var E=e[S];t[S]=E,C&&(t.prototype[S]=function(){var M=this.__chain__;if(m||M){var q=t(this.__wrapped__),W=q.__actions__=se(this.__actions__);return W.push({func:E,args:arguments,thisArg:t}),q.__chain__=M,q}return E.apply(t,on([this.value()],arguments))})}),t}function rm(){return Gt._===this&&(Gt._=Rp),this}function ls(){}function im(t){return t=dt(t),yt(function(e){return bc(e,t)})}var om=Ko(Nt),sm=Ko(Ha),am=Ko(po);function Mu(t){return Yo(t)?go(Me(t)):Pd(t)}function cm(t){return function(e){return t==null?n:bn(t,e)}}var um=Kc(),fm=Kc(!0);function ps(){return[]}function ds(){return!1}function hm(){return{}}function lm(){return""}function pm(){return!0}function dm(t,e){if(t=dt(t),t<1||t>ut)return[];var i=fe,s=Zt(t,fe);e=it(e),t-=fe;for(var h=mo(s,e);++i<t;)e(i);return h}function gm(t){return lt(t)?Nt(t,Me):ge(t)?[t]:se(ou(At(t)))}function ym(t){var e=++Ep;return At(t)+e}var vm=ai(function(t,e){return t+e},0),mm=zo("ceil"),_m=ai(function(t,e){return t/e},1),wm=zo("floor");function bm(t){return t&&t.length?ti(t,ue,Ro):n}function Cm(t,e){return t&&t.length?ti(t,it(e,2),Ro):n}function Sm(t){return Xa(t,ue)}function km(t,e){return Xa(t,it(e,2))}function Am(t){return t&&t.length?ti(t,ue,Bo):n}function xm(t,e){return t&&t.length?ti(t,it(e,2),Bo):n}var Em=ai(function(t,e){return t*e},1),Tm=zo("round"),Rm=ai(function(t,e){return t-e},0);function Om(t){return t&&t.length?vo(t,ue):0}function Im(t,e){return t&&t.length?vo(t,it(e,2)):0}return y.after=Qy,y.ary=yu,y.assign=qv,y.assignIn=Ou,y.assignInWith=wi,y.assignWith=Wv,y.at=Hv,y.before=vu,y.bind=ns,y.bindAll=$0,y.bindKey=mu,y.castArray=hv,y.chain=pu,y.chunk=wg,y.compact=bg,y.concat=Cg,y.cond=J0,y.conforms=j0,y.constant=us,y.countBy=Oy,y.create=Kv,y.curry=_u,y.curryRight=wu,y.debounce=bu,y.defaults=zv,y.defaultsDeep=Xv,y.defer=tv,y.delay=ev,y.difference=Sg,y.differenceBy=kg,y.differenceWith=Ag,y.drop=xg,y.dropRight=Eg,y.dropRightWhile=Tg,y.dropWhile=Rg,y.fill=Og,y.filter=Ny,y.flatMap=Uy,y.flatMapDeep=Dy,y.flatMapDepth=Py,y.flatten=uu,y.flattenDeep=Ig,y.flattenDepth=Ng,y.flip=nv,y.flow=V0,y.flowRight=Z0,y.fromPairs=Bg,y.functions=Zv,y.functionsIn=Qv,y.groupBy=Fy,y.initial=Ug,y.intersection=Dg,y.intersectionBy=Pg,y.intersectionWith=Fg,y.invert=e0,y.invertBy=n0,y.invokeMap=qy,y.iteratee=fs,y.keyBy=Wy,y.keys=Kt,y.keysIn=ce,y.map=di,y.mapKeys=i0,y.mapValues=o0,y.matches=Q0,y.matchesProperty=tm,y.memoize=yi,y.merge=s0,y.mergeWith=Iu,y.method=em,y.methodOf=nm,y.mixin=hs,y.negate=vi,y.nthArg=im,y.omit=a0,y.omitBy=c0,y.once=rv,y.orderBy=Hy,y.over=om,y.overArgs=iv,y.overEvery=sm,y.overSome=am,y.partial=rs,y.partialRight=Cu,y.partition=Ky,y.pick=u0,y.pickBy=Nu,y.property=Mu,y.propertyOf=cm,y.pull=Hg,y.pullAll=hu,y.pullAllBy=Kg,y.pullAllWith=zg,y.pullAt=Xg,y.range=um,y.rangeRight=fm,y.rearg=ov,y.reject=Gy,y.remove=Gg,y.rest=sv,y.reverse=ts,y.sampleSize=Jy,y.set=h0,y.setWith=l0,y.shuffle=jy,y.slice=$g,y.sortBy=Zy,y.sortedUniq=ty,y.sortedUniqBy=ey,y.split=U0,y.spread=av,y.tail=ny,y.take=ry,y.takeRight=iy,y.takeRightWhile=oy,y.takeWhile=sy,y.tap=by,y.throttle=cv,y.thru=pi,y.toArray=Eu,y.toPairs=Bu,y.toPairsIn=Lu,y.toPath=gm,y.toPlainObject=Ru,y.transform=p0,y.unary=uv,y.union=ay,y.unionBy=cy,y.unionWith=uy,y.uniq=fy,y.uniqBy=hy,y.uniqWith=ly,y.unset=d0,y.unzip=es,y.unzipWith=lu,y.update=g0,y.updateWith=y0,y.values=Jn,y.valuesIn=v0,y.without=py,y.words=Pu,y.wrap=fv,y.xor=dy,y.xorBy=gy,y.xorWith=yy,y.zip=vy,y.zipObject=my,y.zipObjectDeep=_y,y.zipWith=wy,y.entries=Bu,y.entriesIn=Lu,y.extend=Ou,y.extendWith=wi,hs(y,y),y.add=vm,y.attempt=Fu,y.camelCase=b0,y.capitalize=Uu,y.ceil=mm,y.clamp=m0,y.clone=lv,y.cloneDeep=dv,y.cloneDeepWith=gv,y.cloneWith=pv,y.conformsTo=yv,y.deburr=Du,y.defaultTo=Y0,y.divide=_m,y.endsWith=C0,y.eq=Ie,y.escape=S0,y.escapeRegExp=k0,y.every=Iy,y.find=By,y.findIndex=au,y.findKey=Gv,y.findLast=Ly,y.findLastIndex=cu,y.findLastKey=$v,y.floor=wm,y.forEach=du,y.forEachRight=gu,y.forIn=Jv,y.forInRight=jv,y.forOwn=Yv,y.forOwnRight=Vv,y.get=ss,y.gt=vv,y.gte=mv,y.has=t0,y.hasIn=as,y.head=fu,y.identity=ue,y.includes=My,y.indexOf=Lg,y.inRange=_0,y.invoke=r0,y.isArguments=kn,y.isArray=lt,y.isArrayBuffer=_v,y.isArrayLike=ae,y.isArrayLikeObject=Dt,y.isBoolean=wv,y.isBuffer=ln,y.isDate=bv,y.isElement=Cv,y.isEmpty=Sv,y.isEqual=kv,y.isEqualWith=Av,y.isError=is,y.isFinite=xv,y.isFunction=je,y.isInteger=Su,y.isLength=mi,y.isMap=ku,y.isMatch=Ev,y.isMatchWith=Tv,y.isNaN=Rv,y.isNative=Ov,y.isNil=Nv,y.isNull=Iv,y.isNumber=Au,y.isObject=Bt,y.isObjectLike=Lt,y.isPlainObject=mr,y.isRegExp=os,y.isSafeInteger=Bv,y.isSet=xu,y.isString=_i,y.isSymbol=ge,y.isTypedArray=$n,y.isUndefined=Lv,y.isWeakMap=Uv,y.isWeakSet=Dv,y.join=Mg,y.kebabCase=A0,y.last=Ae,y.lastIndexOf=qg,y.lowerCase=x0,y.lowerFirst=E0,y.lt=Pv,y.lte=Fv,y.max=bm,y.maxBy=Cm,y.mean=Sm,y.meanBy=km,y.min=Am,y.minBy=xm,y.stubArray=ps,y.stubFalse=ds,y.stubObject=hm,y.stubString=lm,y.stubTrue=pm,y.multiply=Em,y.nth=Wg,y.noConflict=rm,y.noop=ls,y.now=gi,y.pad=T0,y.padEnd=R0,y.padStart=O0,y.parseInt=I0,y.random=w0,y.reduce=zy,y.reduceRight=Xy,y.repeat=N0,y.replace=B0,y.result=f0,y.round=Tm,y.runInContext=x,y.sample=$y,y.size=Yy,y.snakeCase=L0,y.some=Vy,y.sortedIndex=Jg,y.sortedIndexBy=jg,y.sortedIndexOf=Yg,y.sortedLastIndex=Vg,y.sortedLastIndexBy=Zg,y.sortedLastIndexOf=Qg,y.startCase=D0,y.startsWith=P0,y.subtract=Rm,y.sum=Om,y.sumBy=Im,y.template=F0,y.times=dm,y.toFinite=Ye,y.toInteger=dt,y.toLength=Tu,y.toLower=M0,y.toNumber=xe,y.toSafeInteger=Mv,y.toString=At,y.toUpper=q0,y.trim=W0,y.trimEnd=H0,y.trimStart=K0,y.truncate=z0,y.unescape=X0,y.uniqueId=ym,y.upperCase=G0,y.upperFirst=cs,y.each=du,y.eachRight=gu,y.first=fu,hs(y,function(){var t={};return Pe(y,function(e,i){Et.call(y.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),y.VERSION=a,we(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),we(["drop","take"],function(t,e){mt.prototype[t]=function(i){i=i===n?1:Wt(dt(i),0);var s=this.__filtered__&&!e?new mt(this):this.clone();return s.__filtered__?s.__takeCount__=Zt(i,s.__takeCount__):s.__views__.push({size:Zt(i,fe),type:t+(s.__dir__<0?"Right":"")}),s},mt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),we(["filter","map","takeWhile"],function(t,e){var i=e+1,s=i==F||i==ct;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:i}),m.__filtered__=m.__filtered__||s,m}}),we(["head","last"],function(t,e){var i="take"+(e?"Right":"");mt.prototype[t]=function(){return this[i](1).value()[0]}}),we(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");mt.prototype[t]=function(){return this.__filtered__?new mt(this):this[i](1)}}),mt.prototype.compact=function(){return this.filter(ue)},mt.prototype.find=function(t){return this.filter(t).head()},mt.prototype.findLast=function(t){return this.reverse().find(t)},mt.prototype.invokeMap=yt(function(t,e){return typeof t=="function"?new mt(this):this.map(function(i){return lr(i,t,e)})}),mt.prototype.reject=function(t){return this.filter(vi(it(t)))},mt.prototype.slice=function(t,e){t=dt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new mt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=dt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(fe)},Pe(mt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),s=/^(?:head|last)$/.test(e),h=y[s?"take"+(e=="last"?"Right":""):e],m=s||/^find/.test(e);h&&(y.prototype[e]=function(){var C=this.__wrapped__,S=s?[1]:arguments,E=C instanceof mt,M=S[0],q=E||lt(C),W=function(vt){var wt=h.apply(y,on([vt],S));return s&&j?wt[0]:wt};q&&i&&typeof M=="function"&&M.length!=1&&(E=q=!1);var j=this.__chain__,tt=!!this.__actions__.length,ot=m&&!j,gt=E&&!tt;if(!m&&q){C=gt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:pi,args:[W],thisArg:n}),new Ce(st,j)}return ot&>?t.apply(this,S):(st=this.thru(W),ot?s?st.value()[0]:st.value():st)})}),we(["pop","push","shift","sort","splice","unshift"],function(t){var e=Mr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",s=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var h=arguments;if(s&&!this.__chain__){var m=this.value();return e.apply(lt(m)?m:[],h)}return this[i](function(C){return e.apply(lt(C)?C:[],h)})}}),Pe(mt.prototype,function(t,e){var i=y[e];if(i){var s=i.name+"";Et.call(Hn,s)||(Hn[s]=[]),Hn[s].push({name:e,func:i})}}),Hn[si(n,L).name]=[{name:"wrapper",func:n}],mt.prototype.clone=Xp,mt.prototype.reverse=Gp,mt.prototype.value=$p,y.prototype.at=Cy,y.prototype.chain=Sy,y.prototype.commit=ky,y.prototype.next=Ay,y.prototype.plant=Ey,y.prototype.reverse=Ty,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Ry,y.prototype.first=y.prototype.head,or&&(y.prototype[or]=xy),y},Mn=kp();yn?((yn.exports=Mn)._=Mn,uo._=Mn):Gt._=Mn}).call(zt)}(_r,_r.exports);var $u=_r.exports;const Ju={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function ju(){return function r(o,n,a){function c(d,b){if(!n[d]){if(!o[d]){var p=typeof require=="function"&&require;if(!b&&p)return p(d,!0);if(f)return f(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=n[d]={exports:{}};o[d][0].call(_.exports,function(g){var l=o[d][1][g];return c(l||g)},_,_.exports,r,o,n,a)}return n[d].exports}for(var f=typeof require=="function"&&require,v=0;v<a.length;v++)c(a[v]);return c}({1:[function(r,o){o.exports=r("./lib/")},{"./lib/":2}],2:[function(r,o,n){function a(p,_){typeof p=="object"&&(_=p,p=void 0),_=_||{};var g,l=c(p),u=l.source,w=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",u),g=v(u,_)):(b[w]||(d("new io instance for %s",u),b[w]=v(u,_)),g=b[w]),g.socket(l.path)}var c=r("./url"),f=r("socket.io-parser"),v=r("./manager"),d=r("debug")("socket.io-client");o.exports=n=a;var b=n.managers={};n.protocol=f.protocol,n.connect=a,n.Manager=r("./manager"),n.Socket=r("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(r,o){function n(l,u){return this instanceof n?(l&&typeof l=="object"&&(u=l,l=void 0),u=u||{},u.path=u.path||"/socket.io",this.nsps={},this.subs=[],this.opts=u,this.reconnection(u.reconnection!==!1),this.reconnectionAttempts(u.reconnectionAttempts||1/0),this.reconnectionDelay(u.reconnectionDelay||1e3),this.reconnectionDelayMax(u.reconnectionDelayMax||5e3),this.randomizationFactor(u.randomizationFactor||.5),this.backoff=new g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new v.Encoder,this.decoder=new v.Decoder,this.autoConnect=u.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,u)}var a=(r("./url"),r("engine.io-client")),c=r("./socket"),f=r("component-emitter"),v=r("socket.io-parser"),d=r("./on"),b=r("component-bind"),p=(r("object-component"),r("debug")("socket.io-client:manager")),_=r("indexof"),g=r("backo2");o.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},f(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=a(this.uri,this.opts);var u=this.engine,w=this;this.readyState="opening",this.skipReconnect=!1;var A=d(u,"open",function(){w.onopen(),l&&l()}),k=d(u,"error",function(J){if(p("connect_error"),w.cleanup(),w.readyState="closed",w.emitAll("connect_error",J),l){var N=new Error("Connection error");N.data=J,l(N)}else w.maybeReconnectOnOpen()});if(this._timeout!==!1){var L=this._timeout;p("connect attempt will timeout after %d",L);var Y=setTimeout(function(){p("connect attempt timed out after %d",L),A.destroy(),u.close(),u.emit("error","timeout"),w.emitAll("connect_timeout",L)},L);this.subs.push({destroy:function(){clearTimeout(Y)}})}return this.subs.push(A),this.subs.push(k),this},n.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(d(l,"data",b(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",b(this,"ondecoded"))),this.subs.push(d(l,"error",b(this,"onerror"))),this.subs.push(d(l,"close",b(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){p("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var u=this.nsps[l];if(!u){u=new c(this,l),this.nsps[l]=u;var w=this;u.on("connect",function(){u.id=w.engine.id,~_(w.connected,u)||w.connected.push(u)})}return u},n.prototype.destroy=function(l){var u=_(this.connected,l);~u&&this.connected.splice(u,1),this.connected.length||this.close()},n.prototype.packet=function(l){p("writing packet %j",l);var u=this;u.encoding?u.packetBuffer.push(l):(u.encoding=!0,this.encoder.encode(l,function(w){for(var A=0;A<w.length;A++)u.engine.write(w[A]);u.encoding=!1,u.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){p("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var u=this.backoff.duration();p("will wait %dms before reconnect attempt",u),this.reconnecting=!0;var w=setTimeout(function(){l.skipReconnect||(p("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(A){A?(p("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",A.data)):(p("reconnect success"),l.onreconnect())}))},u);this.subs.push({destroy:function(){clearTimeout(w)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(r,o){function n(a,c,f){return a.on(c,f),{destroy:function(){a.removeListener(c,f)}}}o.exports=n},{}],5:[function(r,o,n){function a(u,w){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var c=r("socket.io-parser"),f=r("component-emitter"),v=r("to-array"),d=r("./on"),b=r("component-bind"),p=r("debug")("socket.io-client:socket"),_=r("has-binary");o.exports=a;var g={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=f.prototype.emit;f(a.prototype),a.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[d(u,"open",b(this,"onopen")),d(u,"packet",b(this,"onpacket")),d(u,"close",b(this,"onclose"))]}},a.prototype.open=a.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},a.prototype.send=function(){var u=v(arguments);return u.unshift("message"),this.emit.apply(this,u),this},a.prototype.emit=function(u){if(g.hasOwnProperty(u))return l.apply(this,arguments),this;var w=v(arguments),A=c.EVENT;_(w)&&(A=c.BINARY_EVENT);var k={type:A,data:w};return typeof w[w.length-1]=="function"&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),k.id=this.ids++),this.connected?this.packet(k):this.sendBuffer.push(k),this},a.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},a.prototype.onopen=function(){p("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},a.prototype.onclose=function(u){p("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},a.prototype.onpacket=function(u){if(u.nsp==this.nsp)switch(u.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(u);break;case c.BINARY_EVENT:this.onevent(u);break;case c.ACK:this.onack(u);break;case c.BINARY_ACK:this.onack(u);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",u.data)}},a.prototype.onevent=function(u){var w=u.data||[];p("emitting event %j",w),u.id!=null&&(p("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?l.apply(this,w):this.receiveBuffer.push(w)},a.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=v(arguments);p("sending ack %j",k);var L=_(k)?c.BINARY_ACK:c.ACK;w.packet({type:L,id:u,data:k})}}},a.prototype.onack=function(u){p("calling ack %s with %j",u.id,u.data);var w=this.acks[u.id];w.apply(this,u.data),delete this.acks[u.id]},a.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},a.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)l.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},a.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},a.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},a.prototype.close=a.prototype.disconnect=function(){return this.connected&&(p("performing disconnect (%s)",this.nsp),this.packet({type:c.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(r,o){(function(n){function a(v,p){var b=v,p=p||n.location;return v==null&&(v=p.protocol+"//"+p.host),typeof v=="string"&&(v.charAt(0)=="/"&&(v=v.charAt(1)=="/"?p.protocol+v:p.hostname+v),/^(https?|wss?):\/\//.test(v)||(f("protocol-less url %s",v),v=typeof p<"u"?p.protocol+"//"+v:"https://"+v),f("parse %s",v),b=c(v)),b.port||(/^(http|ws)$/.test(b.protocol)?b.port="80":/^(http|ws)s$/.test(b.protocol)&&(b.port="443")),b.path=b.path||"/",b.id=b.protocol+"://"+b.host+":"+b.port,b.href=b.protocol+"://"+b.host+(p&&p.port==b.port?"":":"+b.port),b}var c=r("parseuri"),f=r("debug")("socket.io-client:url");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(r,o){function n(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}o.exports=n,n.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),f=Math.floor(c*this.jitter*a);a=1&Math.floor(10*c)?a+f:a-f}return 0|Math.min(a,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(a){this.ms=a},n.prototype.setMax=function(a){this.max=a},n.prototype.setJitter=function(a){this.jitter=a}},{}],8:[function(r,o){var n=[].slice;o.exports=function(a,c){if(typeof c=="string"&&(c=a[c]),typeof c!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return c.apply(a,f.concat(n.call(arguments)))}}},{}],9:[function(r,o){function n(c){return c?a(c):void 0}function a(c){for(var f in n.prototype)c[f]=n.prototype[f];return c}o.exports=n,n.prototype.on=n.prototype.addEventListener=function(c,f){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(f),this},n.prototype.once=function(c,f){function v(){d.off(c,v),f.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},v.fn=f,this.on(c,v),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(c,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var v=this._callbacks[c];if(!v)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,b=0;b<v.length;b++)if(d=v[b],d===f||d.fn===f){v.splice(b,1);break}return this},n.prototype.emit=function(c){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),v=this._callbacks[c];if(v){v=v.slice(0);for(var d=0,b=v.length;b>d;++d)v[d].apply(this,f)}return this},n.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},n.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(r,o){function n(c){return n.enabled(c)?function(f){f=a(f);var v=new Date,d=v-(n[c]||v);n[c]=v,f=c+" "+f+" +"+n.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function a(c){return c instanceof Error?c.stack||c.message:c}o.exports=n,n.names=[],n.skips=[],n.enable=function(c){try{localStorage.debug=c}catch{}for(var f=(c||"").split(/[\s,]+/),v=f.length,d=0;v>d;d++)c=f[d].replace("*",".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$"))},n.disable=function(){n.enable("")},n.humanize=function(c){var f=1e3,v=6e4,d=60*v;return c>=d?(c/d).toFixed(1)+"h":c>=v?(c/v).toFixed(1)+"m":c>=f?(c/f|0)+"s":c+"ms"},n.enabled=function(c){for(var f=0,v=n.skips.length;v>f;f++)if(n.skips[f].test(c))return!1;for(var f=0,v=n.names.length;v>f;f++)if(n.names[f].test(c))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(r,o){o.exports=r("./lib/")},{"./lib/":12}],12:[function(r,o){o.exports=r("./socket"),o.exports.parser=r("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(r,o){(function(n){function a(u,w){if(!(this instanceof a))return new a(u,w);if(w=w||{},u&&typeof u=="object"&&(w=u,u=null),u&&(u=_(u),w.host=u.host,w.secure=u.protocol=="https"||u.protocol=="wss",w.port=u.port,u.query&&(w.query=u.query)),this.secure=w.secure!=null?w.secure:n.location&&location.protocol=="https:",w.host){var A=w.host.split(":");w.hostname=A.shift(),A.length?w.port=A.pop():w.port||(w.port=this.secure?"443":"80")}this.agent=w.agent||!1,this.hostname=w.hostname||(n.location?location.hostname:"localhost"),this.port=w.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=w.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=w.upgrade!==!1,this.path=(w.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!w.forceJSONP,this.jsonp=w.jsonp!==!1,this.forceBase64=!!w.forceBase64,this.enablesXDR=!!w.enablesXDR,this.timestampParam=w.timestampParam||"t",this.timestampRequests=w.timestampRequests,this.transports=w.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=w.policyPort||843,this.rememberUpgrade=w.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=w.onlyBinaryUpgrades,this.pfx=w.pfx||null,this.key=w.key||null,this.passphrase=w.passphrase||null,this.cert=w.cert||null,this.ca=w.ca||null,this.ciphers=w.ciphers||null,this.rejectUnauthorized=w.rejectUnauthorized||null,this.open()}function c(u){var w={};for(var A in u)u.hasOwnProperty(A)&&(w[A]=u[A]);return w}var f=r("./transports"),v=r("component-emitter"),d=r("debug")("engine.io-client:socket"),b=r("indexof"),p=r("engine.io-parser"),_=r("parseuri"),g=r("parsejson"),l=r("parseqs");o.exports=a,a.priorWebsocketSuccess=!1,v(a.prototype),a.protocol=p.protocol,a.Socket=a,a.Transport=r("./transport"),a.transports=r("./transports"),a.parser=r("engine.io-parser"),a.prototype.createTransport=function(u){d('creating transport "%s"',u);var w=c(this.query);w.EIO=p.protocol,w.transport=u,this.id&&(w.sid=this.id);var A=new f[u]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:w,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return A},a.prototype.open=function(){var w;if(this.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)w="websocket";else{if(this.transports.length==0){var u=this;return void setTimeout(function(){u.emit("error","No transports available")},0)}w=this.transports[0]}this.readyState="opening";var w;try{w=this.createTransport(w)}catch{return this.transports.shift(),void this.open()}w.open(),this.setTransport(w)},a.prototype.setTransport=function(u){d("setting transport %s",u.name);var w=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=u,u.on("drain",function(){w.onDrain()}).on("packet",function(A){w.onPacket(A)}).on("error",function(A){w.onError(A)}).on("close",function(){w.onClose("transport close")})},a.prototype.probe=function(u){function w(){if(I.onlyBinaryUpgrades){var P=!this.supportsBinary&&I.transport.supportsBinary;T=T||P}T||(d('probe transport "%s" opened',u),U.send([{type:"ping",data:"probe"}]),U.once("packet",function(R){if(!T)if(R.type=="pong"&&R.data=="probe"){if(d('probe transport "%s" pong',u),I.upgrading=!0,I.emit("upgrading",U),!U)return;a.priorWebsocketSuccess=U.name=="websocket",d('pausing current transport "%s"',I.transport.name),I.transport.pause(function(){T||I.readyState!="closed"&&(d("changing transport and sending upgrade packet"),N(),I.setTransport(U),U.send([{type:"upgrade"}]),I.emit("upgrade",U),U=null,I.upgrading=!1,I.flush())})}else{d('probe transport "%s" failed',u);var B=new Error("probe error");B.transport=U.name,I.emit("upgradeError",B)}}))}function A(){T||(T=!0,N(),U.close(),U=null)}function k(P){var R=new Error("probe error: "+P);R.transport=U.name,A(),d('probe transport "%s" failed because of error: %s',u,P),I.emit("upgradeError",R)}function L(){k("transport closed")}function Y(){k("socket closed")}function J(P){U&&P.name!=U.name&&(d('"%s" works - aborting "%s"',P.name,U.name),A())}function N(){U.removeListener("open",w),U.removeListener("error",k),U.removeListener("close",L),I.removeListener("close",Y),I.removeListener("upgrading",J)}d('probing transport "%s"',u);var U=this.createTransport(u,{probe:1}),T=!1,I=this;a.priorWebsocketSuccess=!1,U.once("open",w),U.once("error",k),U.once("close",L),this.once("close",Y),this.once("upgrading",J),U.open()},a.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",a.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var u=0,w=this.upgrades.length;w>u;u++)this.probe(this.upgrades[u])}},a.prototype.onPacket=function(u){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',u.type,u.data),this.emit("packet",u),this.emit("heartbeat"),u.type){case"open":this.onHandshake(g(u.data));break;case"pong":this.setPing();break;case"error":var w=new Error("server error");w.code=u.data,this.emit("error",w);break;case"message":this.emit("data",u.data),this.emit("message",u.data)}else d('packet received with socket readyState "%s"',this.readyState)},a.prototype.onHandshake=function(u){this.emit("handshake",u),this.id=u.sid,this.transport.query.sid=u.sid,this.upgrades=this.filterUpgrades(u.upgrades),this.pingInterval=u.pingInterval,this.pingTimeout=u.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},a.prototype.onHeartbeat=function(u){clearTimeout(this.pingTimeoutTimer);var w=this;w.pingTimeoutTimer=setTimeout(function(){w.readyState!="closed"&&w.onClose("ping timeout")},u||w.pingInterval+w.pingTimeout)},a.prototype.setPing=function(){var u=this;clearTimeout(u.pingIntervalTimer),u.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",u.pingTimeout),u.ping(),u.onHeartbeat(u.pingTimeout)},u.pingInterval)},a.prototype.ping=function(){this.sendPacket("ping")},a.prototype.onDrain=function(){for(var u=0;u<this.prevBufferLen;u++)this.callbackBuffer[u]&&this.callbackBuffer[u]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},a.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(d("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},a.prototype.write=a.prototype.send=function(u,w){return this.sendPacket("message",u,w),this},a.prototype.sendPacket=function(u,w,A){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:u,data:w};this.emit("packetCreate",k),this.writeBuffer.push(k),this.callbackBuffer.push(A),this.flush()}},a.prototype.close=function(){function u(){k.onClose("forced close"),d("socket closing - telling transport to close"),k.transport.close()}function w(){k.removeListener("upgrade",w),k.removeListener("upgradeError",w),u()}function A(){k.once("upgrade",w),k.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var k=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?A():u()}):this.upgrading?A():u()}return this},a.prototype.onError=function(u){d("socket error %j",u),a.priorWebsocketSuccess=!1,this.emit("error",u),this.onClose("transport error",u)},a.prototype.onClose=function(u,w){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',u);var A=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){A.writeBuffer=[],A.callbackBuffer=[],A.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",u,w)}},a.prototype.filterUpgrades=function(u){for(var w=[],A=0,k=u.length;k>A;A++)~b(this.transports,u[A])&&w.push(u[A]);return w}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(r,o){function n(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized}var a=r("engine.io-parser"),c=r("component-emitter");o.exports=n,c(n.prototype),n.timestamps=0,n.prototype.onError=function(f,v){var d=new Error(f);return d.type="TransportError",d.description=v,this.emit("error",d),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(f){if(this.readyState!="open")throw new Error("Transport not open");this.write(f)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(f){var v=a.decodePacket(f,this.socket.binaryType);this.onPacket(v)},n.prototype.onPacket=function(f){this.emit("packet",f)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(r,o,n){(function(a){function c(p){var _,g=!1,l=!1,u=p.jsonp!==!1;if(a.location){var w=location.protocol=="https:",A=location.port;A||(A=w?443:80),g=p.hostname!=location.hostname||A!=p.port,l=p.secure!=w}if(p.xdomain=g,p.xscheme=l,_=new f(p),"open"in _&&!p.forceJSONP)return new v(p);if(!u)throw new Error("JSONP disabled");return new d(p)}var f=r("xmlhttprequest"),v=r("./polling-xhr"),d=r("./polling-jsonp"),b=r("./websocket");n.polling=c,n.websocket=b}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(r,o){(function(n){function a(){}function c(_){f.call(this,_),this.query=this.query||{},d||(n.___eio||(n.___eio=[]),d=n.___eio),this.index=d.length;var g=this;d.push(function(l){g.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){g.script&&(g.script.onerror=a)},!1)}var f=r("./polling"),v=r("component-inherit");o.exports=c;var d,b=/\n/g,p=/\\n/g;v(c,f),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),f.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,g=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),g.async=!0,g.src=this.uri(),g.onerror=function(w){_.onError("jsonp poll error",w)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(g,l),this.script=g;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var w=document.createElement("iframe");document.body.appendChild(w),document.body.removeChild(w)},100)},c.prototype.doWrite=function(_,g){function l(){u(),g()}function u(){if(w.iframe)try{w.form.removeChild(w.iframe)}catch(N){w.onError("jsonp polling iframe removal error",N)}try{var J='<iframe src="javascript:0" name="'+w.iframeId+'">';A=document.createElement(J)}catch{A=document.createElement("iframe"),A.name=w.iframeId,A.src="javascript:0"}A.id=w.iframeId,w.form.appendChild(A),w.iframe=A}var w=this;if(!this.form){var A,k=document.createElement("form"),L=document.createElement("textarea"),Y=this.iframeId="eio_iframe_"+this.index;k.className="socketio",k.style.position="absolute",k.style.top="-1000px",k.style.left="-1000px",k.target=Y,k.method="POST",k.setAttribute("accept-charset","utf-8"),L.name="d",k.appendChild(L),document.body.appendChild(k),this.form=k,this.area=L}this.form.action=this.uri(),u(),_=_.replace(p,`\\
|
|
33
|
+
`),this.area.value=_.replace(b,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){w.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(r,o){(function(n){function a(){}function c(l){if(b.call(this,l),n.location){var u=location.protocol=="https:",w=location.port;w||(w=u?443:80),this.xd=l.hostname!=n.location.hostname||w!=l.port,this.xs=l.secure!=u}}function f(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function v(){for(var l in f.requests)f.requests.hasOwnProperty(l)&&f.requests[l].abort()}var d=r("xmlhttprequest"),b=r("./polling"),p=r("component-emitter"),_=r("component-inherit"),g=r("debug")("engine.io-client:polling-xhr");o.exports=c,o.exports.Request=f,_(c,b),c.prototype.supportsBinary=!0,c.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new f(l)},c.prototype.doWrite=function(l,u){var w=typeof l!="string"&&l!==void 0,A=this.request({method:"POST",data:l,isBinary:w}),k=this;A.on("success",u),A.on("error",function(L){k.onError("xhr post error",L)}),this.sendXhr=A},c.prototype.doPoll=function(){g("xhr poll");var l=this.request(),u=this;l.on("data",function(w){u.onData(w)}),l.on("error",function(w){u.onError("xhr poll error",w)}),this.pollXhr=l},p(f.prototype),f.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var u=this.xhr=new d(l),w=this;try{if(g("xhr open %s: %s",this.method,this.uri),u.open(this.method,this.uri,this.async),this.supportsBinary&&(u.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?u.setRequestHeader("Content-type","application/octet-stream"):u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in u&&(u.withCredentials=!0),this.hasXDR()?(u.onload=function(){w.onLoad()},u.onerror=function(){w.onError(u.responseText)}):u.onreadystatechange=function(){u.readyState==4&&(u.status==200||u.status==1223?w.onLoad():setTimeout(function(){w.onError(u.status)},0))},g("xhr data %s",this.data),u.send(this.data)}catch(A){return void setTimeout(function(){w.onError(A)},0)}n.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},f.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},f.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=a:this.xhr.onreadystatechange=a,l)try{this.xhr.abort()}catch{}n.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var l;try{var u;try{u=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=u==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(w){this.onError(w)}l!=null&&this.onData(l)},f.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},n.document&&(f.requestsCount=0,f.requests={},n.attachEvent?n.attachEvent("onunload",v):n.addEventListener&&n.addEventListener("beforeunload",v,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(r,o){function n(p){var _=p&&p.forceBase64;(!b||_)&&(this.supportsBinary=!1),a.call(this,p)}var a=r("../transport"),c=r("parseqs"),f=r("engine.io-parser"),v=r("component-inherit"),d=r("debug")("engine.io-client:polling");o.exports=n;var b=function(){var p=r("xmlhttprequest"),_=new p({xdomain:!1});return _.responseType!=null}();v(n,a),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(p){function _(){d("paused"),g.readyState="paused",p()}var g=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(d("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){d("pre-pause polling complete"),--l||_()})),this.writable||(d("we are currently writing - waiting to pause"),l++,this.once("drain",function(){d("pre-pause writing complete"),--l||_()}))}else _()},n.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(p){var _=this;d("polling got data %s",p);var g=function(l){return _.readyState=="opening"&&_.onOpen(),l.type=="close"?(_.onClose(),!1):void _.onPacket(l)};f.decodePayload(p,this.socket.binaryType,g),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function p(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),p()):(d("transport not open - deferring close"),this.once("open",p))},n.prototype.write=function(p){var g=this;this.writable=!1;var _=function(){g.writable=!0,g.emit("drain")},g=this;f.encodePayload(p,this.supportsBinary,function(l){g.doWrite(l,_)})},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"https":"http",g="";return this.timestampRequests!==!1&&(p[this.timestampParam]=+new Date+"-"+a.timestamps++),this.supportsBinary||p.sid||(p.b64=1),p=c.encode(p),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(g=":"+this.port),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(r,o){function n(p){var _=p&&p.forceBase64;_&&(this.supportsBinary=!1),a.call(this,p)}var a=r("../transport"),c=r("engine.io-parser"),f=r("parseqs"),v=r("component-inherit"),d=r("debug")("engine.io-client:websocket"),b=r("ws");o.exports=n,v(n,a),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var p=this.uri(),_=void 0,g={agent:this.agent};g.pfx=this.pfx,g.key=this.key,g.passphrase=this.passphrase,g.cert=this.cert,g.ca=this.ca,g.ciphers=this.ciphers,g.rejectUnauthorized=this.rejectUnauthorized,this.ws=new b(p,_,g),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var p=this;this.ws.onopen=function(){p.onOpen()},this.ws.onclose=function(){p.onClose()},this.ws.onmessage=function(_){p.onData(_.data)},this.ws.onerror=function(_){p.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(p){var _=this;setTimeout(function(){a.prototype.onData.call(_,p)},0)}),n.prototype.write=function(p){function _(){g.writable=!0,g.emit("drain")}var g=this;this.writable=!1;for(var l=0,u=p.length;u>l;l++)c.encodePacket(p[l],this.supportsBinary,function(w){try{g.ws.send(w)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},n.prototype.onClose=function(){a.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"wss":"ws",g="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(g=":"+this.port),this.timestampRequests&&(p[this.timestampParam]=+new Date),this.supportsBinary||(p.b64=1),p=f.encode(p),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p},n.prototype.check=function(){return!(!b||"__initialize"in b&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(r,o){var n=r("has-cors");o.exports=function(a){var c=a.xdomain,f=a.xscheme,v=a.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!f&&v)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(r,o){o.exports=function(n,a){var c=function(){};c.prototype=a.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(r,o,n){function a(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function c(){var b=arguments,p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+n.humanize(this.diff),!p)return b;var _="color: "+this.color;b=[b[0],_,"color: inherit"].concat(Array.prototype.slice.call(b,1));var g=0,l=0;return b[0].replace(/%[a-z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_),b}function f(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function v(b){try{b==null?localStorage.removeItem("debug"):localStorage.debug=b}catch{}}function d(){var b;try{b=localStorage.debug}catch{}return b}n=o.exports=r("./debug"),n.log=f,n.formatArgs=c,n.save=v,n.load=d,n.useColors=a,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(b){return JSON.stringify(b)},n.enable(d())},{"./debug":23}],23:[function(r,o,n){function a(){return n.colors[_++%n.colors.length]}function c(g){function l(){}function u(){var A=u,k=+new Date,L=k-(p||k);A.diff=L,A.prev=p,A.curr=k,p=k,A.useColors==null&&(A.useColors=n.useColors()),A.color==null&&A.useColors&&(A.color=a());var Y=Array.prototype.slice.call(arguments);Y[0]=n.coerce(Y[0]),typeof Y[0]!="string"&&(Y=["%o"].concat(Y));var J=0;Y[0]=Y[0].replace(/%([a-z%])/g,function(U,T){if(U==="%%")return U;J++;var I=n.formatters[T];if(typeof I=="function"){var P=Y[J];U=I.call(A,P),Y.splice(J,1),J--}return U}),typeof n.formatArgs=="function"&&(Y=n.formatArgs.apply(A,Y));var N=u.log||n.log||console.log.bind(console);N.apply(A,Y)}l.enabled=!1,u.enabled=!0;var w=n.enabled(g)?u:l;return w.namespace=g,w}function f(g){n.save(g);for(var l=(g||"").split(/[\s,]+/),u=l.length,w=0;u>w;w++)l[w]&&(g=l[w].replace(/\*/g,".*?"),g[0]==="-"?n.skips.push(new RegExp("^"+g.substr(1)+"$")):n.names.push(new RegExp("^"+g+"$")))}function v(){n.enable("")}function d(g){var l,u;for(l=0,u=n.skips.length;u>l;l++)if(n.skips[l].test(g))return!1;for(l=0,u=n.names.length;u>l;l++)if(n.names[l].test(g))return!0;return!1}function b(g){return g instanceof Error?g.stack||g.message:g}n=o.exports=c,n.coerce=b,n.disable=v,n.enable=f,n.enabled=d,n.humanize=r("ms"),n.names=[],n.skips=[],n.formatters={};var p,_=0},{ms:24}],24:[function(r,o){function n(g){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(g);if(l){var u=parseFloat(l[1]),w=(l[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"y":return u*_;case"days":case"day":case"d":return u*p;case"hours":case"hour":case"h":return u*b;case"minutes":case"minute":case"m":return u*d;case"seconds":case"second":case"s":return u*v;case"ms":return u}}}function a(g){return g>=p?Math.round(g/p)+"d":g>=b?Math.round(g/b)+"h":g>=d?Math.round(g/d)+"m":g>=v?Math.round(g/v)+"s":g+"ms"}function c(g){return f(g,p,"day")||f(g,b,"hour")||f(g,d,"minute")||f(g,v,"second")||g+" ms"}function f(g,l,u){return l>g?void 0:1.5*l>g?Math.floor(g/l)+" "+u:Math.ceil(g/l)+" "+u+"s"}var v=1e3,d=60*v,b=60*d,p=24*b,_=365.25*p;o.exports=function(g,l){return l=l||{},typeof g=="string"?n(g):l.long?c(g):a(g)}},{}],25:[function(r,o,n){(function(a){function c(T,I){var P="b"+n.packets[T.type]+T.data.data;return I(P)}function f(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=T.data,B=new Uint8Array(R),H=new Uint8Array(1+R.byteLength);H[0]=Y[T.type];for(var z=0;z<B.length;z++)H[z+1]=B[z];return P(H.buffer)}function v(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=new FileReader;return R.onload=function(){T.data=R.result,n.encodePacket(T,I,!0,P)},R.readAsArrayBuffer(T.data)}function d(T,I,P){if(!I)return n.encodeBase64Packet(T,P);if(L)return v(T,I,P);var R=new Uint8Array(1);R[0]=Y[T.type];var B=new U([R.buffer,T.data]);return P(B)}function b(T,I,P){for(var R=new Array(T.length),B=u(T.length,P),H=function(G,F,pt){I(F,function(ct,xt){R[G]=xt,pt(ct,R)})},z=0;z<T.length;z++)H(z,T[z],B)}var p=r("./keys"),_=r("has-binary"),g=r("arraybuffer.slice"),l=r("base64-arraybuffer"),u=r("after"),w=r("utf8"),A=navigator.userAgent.match(/Android/i),k=/PhantomJS/i.test(navigator.userAgent),L=A||k;n.protocol=3;var Y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},J=p(Y),N={type:"error",data:"parser error"},U=r("blob");n.encodePacket=function(T,I,P,R){typeof I=="function"&&(R=I,I=!1),typeof P=="function"&&(R=P,P=null);var B=T.data===void 0?void 0:T.data.buffer||T.data;if(a.ArrayBuffer&&B instanceof ArrayBuffer)return f(T,I,R);if(U&&B instanceof a.Blob)return d(T,I,R);if(B&&B.base64)return c(T,R);var H=Y[T.type];return T.data!==void 0&&(H+=P?w.encode(String(T.data)):String(T.data)),R(""+H)},n.encodeBase64Packet=function(T,I){var P="b"+n.packets[T.type];if(U&&T.data instanceof U){var R=new FileReader;return R.onload=function(){var F=R.result.split(",")[1];I(P+F)},R.readAsDataURL(T.data)}var B;try{B=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch{for(var H=new Uint8Array(T.data),z=new Array(H.length),G=0;G<H.length;G++)z[G]=H[G];B=String.fromCharCode.apply(null,z)}return P+=a.btoa(B),I(P)},n.decodePacket=function(T,I,P){if(typeof T=="string"||T===void 0){if(T.charAt(0)=="b")return n.decodeBase64Packet(T.substr(1),I);if(P)try{T=w.decode(T)}catch{return N}var B=T.charAt(0);return Number(B)==B&&J[B]?T.length>1?{type:J[B],data:T.substring(1)}:{type:J[B]}:N}var R=new Uint8Array(T),B=R[0],H=g(T,1);return U&&I==="blob"&&(H=new U([H])),{type:J[B],data:H}},n.decodeBase64Packet=function(T,I){var P=J[T.charAt(0)];if(!a.ArrayBuffer)return{type:P,data:{base64:!0,data:T.substr(1)}};var R=l.decode(T.substr(1));return I==="blob"&&U&&(R=new U([R])),{type:P,data:R}},n.encodePayload=function(T,I,P){function R(z){return z.length+":"+z}function B(z,G){n.encodePacket(z,H?I:!1,!0,function(F){G(null,R(F))})}typeof I=="function"&&(P=I,I=null);var H=_(T);return I&&H?U&&!L?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,B,function(z,G){return P(G.join(""))}):P("0:")},n.decodePayload=function(T,I,P){if(typeof T!="string")return n.decodePayloadAsBinary(T,I,P);typeof I=="function"&&(P=I,I=null);var R;if(T=="")return P(N,0,1);for(var B,H,z="",G=0,F=T.length;F>G;G++){var pt=T.charAt(G);if(pt!=":")z+=pt;else{if(z==""||z!=(B=Number(z))||(H=T.substr(G+1,B),z!=H.length))return P(N,0,1);if(H.length){if(R=n.decodePacket(H,I,!0),N.type==R.type&&N.data==R.data)return P(N,0,1);var ct=P(R,G+B,F);if(ct===!1)return}G+=B,z=""}}return z!=""?P(N,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){return B(null,H)})}return T.length?void b(T,P,function(R,B){var H=B.reduce(function(F,pt){var ct;return ct=typeof pt=="string"?pt.length:pt.byteLength,F+ct.toString().length+ct+2},0),z=new Uint8Array(H),G=0;return B.forEach(function(F){var pt=typeof F=="string",ct=F;if(pt){for(var xt=new Uint8Array(F.length),ut=0;ut<F.length;ut++)xt[ut]=F.charCodeAt(ut);ct=xt.buffer}z[G++]=pt?0:1;for(var Yt=ct.byteLength.toString(),ut=0;ut<Yt.length;ut++)z[G++]=parseInt(Yt[ut]);z[G++]=255;for(var xt=new Uint8Array(ct),ut=0;ut<xt.length;ut++)z[G++]=xt[ut]}),I(z.buffer)}):I(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){var z=new Uint8Array(1);if(z[0]=1,typeof H=="string"){for(var G=new Uint8Array(H.length),F=0;F<H.length;F++)G[F]=H.charCodeAt(F);H=G.buffer,z[0]=0}for(var pt=H instanceof ArrayBuffer?H.byteLength:H.size,ct=pt.toString(),xt=new Uint8Array(ct.length+1),F=0;F<ct.length;F++)xt[F]=parseInt(ct[F]);if(xt[ct.length]=255,U){var ut=new U([z.buffer,xt.buffer,H]);B(null,ut)}})}b(T,P,function(R,B){return I(new U(B))})},n.decodePayloadAsBinary=function(T,I,P){typeof I=="function"&&(P=I,I=null);for(var R=T,B=[],H=!1;R.byteLength>0;){for(var z=new Uint8Array(R),G=z[0]===0,F="",pt=1;z[pt]!=255;pt++){if(F.length>310){H=!0;break}F+=z[pt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ct=g(R,0,F);if(G)try{ct=String.fromCharCode.apply(null,new Uint8Array(ct))}catch{var xt=new Uint8Array(ct);ct="";for(var pt=0;pt<xt.length;pt++)ct+=String.fromCharCode(xt[pt])}B.push(ct),R=g(R,F)}var ut=B.length;B.forEach(function(Yt,Le){P(n.decodePacket(Yt,I,!0),Le,ut)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(r,o){o.exports=Object.keys||function(n){var a=[],c=Object.prototype.hasOwnProperty;for(var f in n)c.call(n,f)&&a.push(f);return a}},{}],27:[function(r,o){function n(c,f,v){function d(p,_){if(d.count<=0)throw new Error("after called too many times");--d.count,p?(b=!0,f(p),f=v):d.count!==0||b||f(null,_)}var b=!1;return v=v||a,d.count=c,c===0?f():d}function a(){}o.exports=n},{}],28:[function(r,o){o.exports=function(n,a,c){var f=n.byteLength;if(a=a||0,c=c||f,n.slice)return n.slice(a,c);if(0>a&&(a+=f),0>c&&(c+=f),c>f&&(c=f),a>=f||a>=c||f===0)return new ArrayBuffer(0);for(var v=new Uint8Array(n),d=new Uint8Array(c-a),b=a,p=0;c>b;b++,p++)d[p]=v[b];return d.buffer}},{}],29:[function(r,o,n){(function(a){n.encode=function(c){var f,v=new Uint8Array(c),d=v.length,b="";for(f=0;d>f;f+=3)b+=a[v[f]>>2],b+=a[(3&v[f])<<4|v[f+1]>>4],b+=a[(15&v[f+1])<<2|v[f+2]>>6],b+=a[63&v[f+2]];return d%3===2?b=b.substring(0,b.length-1)+"=":d%3===1&&(b=b.substring(0,b.length-2)+"=="),b},n.decode=function(c){var f,v,d,b,p,_=.75*c.length,g=c.length,l=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var u=new ArrayBuffer(_),w=new Uint8Array(u);for(f=0;g>f;f+=4)v=a.indexOf(c[f]),d=a.indexOf(c[f+1]),b=a.indexOf(c[f+2]),p=a.indexOf(c[f+3]),w[l++]=v<<2|d>>4,w[l++]=(15&d)<<4|b>>2,w[l++]=(3&b)<<6|63&p;return u}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(r,o){(function(n){function a(_){for(var g=0;g<_.length;g++){var l=_[g];if(l.buffer instanceof ArrayBuffer){var u=l.buffer;if(l.byteLength!==u.byteLength){var w=new Uint8Array(l.byteLength);w.set(new Uint8Array(u,l.byteOffset,l.byteLength)),u=w.buffer}_[g]=u}}}function c(_,g){g=g||{};var l=new v;a(_);for(var u=0;u<_.length;u++)l.append(_[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(_,g){return a(_),new Blob(_,g||{})}var v=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),b=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),p=v&&v.prototype.append&&v.prototype.getBlob;o.exports=function(){return d?b?n.Blob:f:p?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(r,o,n){(function(a){(function(c){function f(R){for(var B,H,z=[],G=0,F=R.length;F>G;)B=R.charCodeAt(G++),B>=55296&&56319>=B&&F>G?(H=R.charCodeAt(G++),(64512&H)==56320?z.push(((1023&B)<<10)+(1023&H)+65536):(z.push(B),G--)):z.push(B);return z}function v(R){for(var B,H=R.length,z=-1,G="";++z<H;)B=R[z],B>65535&&(B-=65536,G+=N(B>>>10&1023|55296),B=56320|1023&B),G+=N(B);return G}function d(R){if(R>=55296&&57343>=R)throw Error("Lone surrogate U+"+R.toString(16).toUpperCase()+" is not a scalar value")}function b(R,B){return N(R>>B&63|128)}function p(R){if(!(4294967168&R))return N(R);var B="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(B=N(R>>18&7|240),B+=b(R,12),B+=b(R,6)):(d(R),B=N(R>>12&15|224),B+=b(R,6)):B=N(R>>6&31|192),B+=N(63&R|128)}function _(R){for(var B,H=f(R),z=H.length,G=-1,F="";++G<z;)B=H[G],F+=p(B);return F}function g(){if(J>=Y)throw Error("Invalid byte index");var R=255&L[J];if(J++,(192&R)==128)return 63&R;throw Error("Invalid continuation byte")}function l(){var R,B,H,z,G;if(J>Y)throw Error("Invalid byte index");if(J==Y)return!1;if(R=255&L[J],J++,(128&R)==0)return R;if((224&R)==192){var B=g();if(G=(31&R)<<6|B,G>=128)return G;throw Error("Invalid continuation byte")}if((240&R)==224){if(B=g(),H=g(),G=(15&R)<<12|B<<6|H,G>=2048)return d(G),G;throw Error("Invalid continuation byte")}if((248&R)==240&&(B=g(),H=g(),z=g(),G=(15&R)<<18|B<<12|H<<6|z,G>=65536&&1114111>=G))return G;throw Error("Invalid UTF-8 detected")}function u(R){L=f(R),Y=L.length,J=0;for(var B,H=[];(B=l())!==!1;)H.push(B);return v(H)}var w=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==w&&o,k=typeof a=="object"&&a;(k.global===k||k.window===k)&&(c=k);var L,Y,J,N=String.fromCharCode,U={version:"2.0.0",encode:_,decode:u};if(w&&!w.nodeType)if(A)A.exports=U;else{var T={},I=T.hasOwnProperty;for(var P in U)I.call(U,P)&&(w[P]=U[P])}else c.utf8=U})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(r,o){(function(n){var a=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,f=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,b=/\s+$/;o.exports=function(p){return typeof p=="string"&&p?(p=p.replace(d,"").replace(b,""),n.JSON&&JSON.parse?JSON.parse(p):a.test(p.replace(c,"@").replace(f,"]").replace(v,""))?new Function("return "+p)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(r,o,n){n.encode=function(a){var c="";for(var f in a)a.hasOwnProperty(f)&&(c.length&&(c+="&"),c+=encodeURIComponent(f)+"="+encodeURIComponent(a[f]));return c},n.decode=function(a){for(var c={},f=a.split("&"),v=0,d=f.length;d>v;v++){var b=f[v].split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}return c}},{}],34:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){var f=c,v=c.indexOf("["),d=c.indexOf("]");v!=-1&&d!=-1&&(c=c.substring(0,v)+c.substring(v,d).replace(/:/g,";")+c.substring(d,c.length));for(var b=n.exec(c||""),p={},_=14;_--;)p[a[_]]=b[_]||"";return v!=-1&&d!=-1&&(p.source=f,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p}},{}],35:[function(r,o){function n(f,v){return v?new c(f,v):new c(f)}var a=function(){return self}(),c=a.WebSocket||a.MozWebSocket;o.exports=c?n:null,c&&(n.prototype=c.prototype)},{}],36:[function(r,o){(function(n){function a(f){function v(d){if(!d)return!1;if(n.Buffer&&n.Buffer.isBuffer(d)||n.ArrayBuffer&&d instanceof ArrayBuffer||n.Blob&&d instanceof Blob||n.File&&d instanceof File)return!0;if(c(d)){for(var b=0;b<d.length;b++)if(v(d[b]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&v(d[p]))return!0}return!1}return v(f)}var c=r("isarray");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(r,o){o.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(r,o){var n=r("global");try{o.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{o.exports=!1}},{global:39}],39:[function(r,o){o.exports=function(){return this}()},{}],40:[function(r,o){var n=[].indexOf;o.exports=function(a,c){if(n)return a.indexOf(c);for(var f=0;f<a.length;++f)if(a[f]===c)return f;return-1}},{}],41:[function(r,o,n){var a=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(v);return f},n.values=function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(c[v]);return f},n.merge=function(c,f){for(var v in f)a.call(f,v)&&(c[v]=f[v]);return c},n.length=function(c){return n.keys(c).length},n.isEmpty=function(c){return n.length(c)==0}},{}],42:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){for(var f=n.exec(c||""),v={},d=14;d--;)v[a[d]]=f[d]||"";return v}},{}],43:[function(r,o,n){(function(a){var c=r("isarray"),f=r("./is-buffer");n.deconstructPacket=function(v){function d(g){if(!g)return g;if(f(g)){var l={_placeholder:!0,num:b.length};return b.push(g),l}if(c(g)){for(var u=new Array(g.length),w=0;w<g.length;w++)u[w]=d(g[w]);return u}if(typeof g=="object"&&!(g instanceof Date)){var u={};for(var A in g)u[A]=d(g[A]);return u}return g}var b=[],p=v.data,_=v;return _.data=d(p),_.attachments=b.length,{packet:_,buffers:b}},n.reconstructPacket=function(v,d){function b(p){if(p&&p._placeholder){var _=d[p.num];return _}if(c(p)){for(var g=0;g<p.length;g++)p[g]=b(p[g]);return p}if(p&&typeof p=="object"){for(var l in p)p[l]=b(p[l]);return p}return p}return v.data=b(v.data),v.attachments=void 0,v},n.removeBlobs=function(v,d){function b(g,l,u){if(!g)return g;if(a.Blob&&g instanceof Blob||a.File&&g instanceof File){p++;var w=new FileReader;w.onload=function(){u?u[l]=this.result:_=this.result,--p||d(_)},w.readAsArrayBuffer(g)}else if(c(g))for(var A=0;A<g.length;A++)b(g[A],A,g);else if(g&&typeof g=="object"&&!f(g))for(var k in g)b(g[k],k,g)}var p=0,_=v;b(_),p||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(r,o,n){function a(){}function c(A){var k="",L=!1;return k+=A.type,(n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)&&(k+=A.attachments,k+="-"),A.nsp&&A.nsp!="/"&&(L=!0,k+=A.nsp),A.id!=null&&(L&&(k+=",",L=!1),k+=A.id),A.data!=null&&(L&&(k+=","),k+=g.stringify(A.data)),_("encoded %j as %s",A,k),k}function f(A,k){function L(Y){var J=u.deconstructPacket(Y),N=c(J.packet),U=J.buffers;U.unshift(N),k(U)}u.removeBlobs(A,L)}function v(){this.reconstructor=null}function d(A){var k={},L=0;if(k.type=Number(A.charAt(0)),n.types[k.type]==null)return p();if(n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type){for(var Y="";A.charAt(++L)!="-"&&(Y+=A.charAt(L),L!=A.length););if(Y!=Number(Y)||A.charAt(L)!="-")throw new Error("Illegal attachments");k.attachments=Number(Y)}if(A.charAt(L+1)=="/")for(k.nsp="";++L;){var J=A.charAt(L);if(J==","||(k.nsp+=J,L==A.length))break}else k.nsp="/";var N=A.charAt(L+1);if(N!==""&&Number(N)==N){for(k.id="";++L;){var J=A.charAt(L);if(J==null||Number(J)!=J){--L;break}if(k.id+=A.charAt(L),L==A.length)break}k.id=Number(k.id)}if(A.charAt(++L))try{k.data=g.parse(A.substr(L))}catch{return p()}return _("decoded %s as %j",A,k),k}function b(A){this.reconPack=A,this.buffers=[]}function p(){return{type:n.ERROR,data:"parser error"}}var _=r("debug")("socket.io-parser"),g=r("json3"),l=(r("isarray"),r("component-emitter")),u=r("./binary"),w=r("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=a,n.Decoder=v,a.prototype.encode=function(A,k){if(_("encoding packet %j",A),n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)f(A,k);else{var L=c(A);k([L])}},l(v.prototype),v.prototype.add=function(A){var k;if(typeof A=="string")k=d(A),n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type?(this.reconstructor=new b(k),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",k)):this.emit("decoded",k);else{if(!w(A)&&!A.base64)throw new Error("Unknown type: "+A);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");k=this.reconstructor.takeBinaryData(A),k&&(this.reconstructor=null,this.emit("decoded",k))}},v.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},b.prototype.takeBinaryData=function(A){if(this.buffers.push(A),this.buffers.length==this.reconPack.attachments){var k=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),k}return null},b.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(r,o){(function(n){function a(c){return n.Buffer&&n.Buffer.isBuffer(c)||n.ArrayBuffer&&c instanceof ArrayBuffer}o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(r,o){o.exports=r(37)},{}],47:[function(r,o,n){(function(a){function c($){if(c[$]!==d)return c[$];var Q;if($=="bug-string-char-index")Q=!1;else if($=="json")Q=c("json-stringify")&&c("json-parse");else{var X,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if($=="json-stringify"){var K=_.stringify,et=typeof K=="function"&&g;if(et){(X=function(){return 1}).toJSON=X;try{et=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(b)===d&&K(d)===d&&K()===d&&K(X)==="1"&&K([X])=="[1]"&&K([d])=="[null]"&&K(null)=="null"&&K([d,b,null])=="[null,null,null]"&&K({a:[X,!0,!1,null,`\0\b
|
|
34
34
|
\f\r `]})==rt&&K(null,X)==="1"&&K([1,2],null,1)==`[
|
|
35
35
|
1,
|
|
36
36
|
2
|
|
37
|
-
]`&&K(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&K(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&K(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&K(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{et=!1}}Q=et}if($=="json-parse"){var nt=_.parse;if(typeof nt=="function")try{if(nt("0")===0&&!nt(!1)){X=nt(rt);var Z=X.a.length==5&&X.a[0]===1;if(Z){try{Z=!nt('" "')}catch{}if(Z)try{Z=nt("01")!==1}catch{}if(Z)try{Z=nt("1.")!==1}catch{}}}}catch{Z=!1}Q=Z}}return c[$]=!!Q}var f,v,d,b={}.toString,p=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&p?(_.stringify=p.stringify,_.parse=p.parse):_=a.JSON=p||{};var g=new Date(-0xc782b5b800cec);try{g=g.getUTCFullYear()==-109252&&g.getUTCMonth()===0&&g.getUTCDate()===1&&g.getUTCHours()==10&&g.getUTCMinutes()==37&&g.getUTCSeconds()==6&&g.getUTCMilliseconds()==708}catch{}if(!c("json")){var l="[object Function]",u="[object Date]",w="[object Number]",A="[object String]",k="[object Array]",L="[object Boolean]",Y=c("bug-string-char-index");if(!g)var J=Math.floor,N=[0,31,59,90,120,151,181,212,243,273,304,334],U=function($,Q){return N[Q]+365*($-1970)+J(($-1969+(Q=+(Q>1)))/4)-J(($-1901+Q)/100)+J(($-1601+Q)/400)};(f={}.hasOwnProperty)||(f=function($){var Q,X={};return(X.__proto__=null,X.__proto__={toString:1},X).toString!=b?f=function(rt){var K=this.__proto__,et=rt in(this.__proto__=null,this);return this.__proto__=K,et}:(Q=X.constructor,f=function(rt){var K=(this.constructor||Q).prototype;return rt in this&&!(rt in K&&this[rt]===K[rt])}),X=null,f.call(this,$)});var T={boolean:1,number:1,string:1,undefined:1},I=function($,Q){var X=typeof $[Q];return X=="object"?!!$[Q]:!T[X]};if(v=function($,Q){var X,rt,K,et=0;(X=function(){this.valueOf=0}).prototype.valueOf=0,rt=new X;for(K in rt)f.call(rt,K)&&et++;return X=rt=null,et?v=et==2?function(nt,Z){var at,kt={},
|
|
38
|
-
`+et+
|
|
37
|
+
]`&&K(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&K(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&K(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&K(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{et=!1}}Q=et}if($=="json-parse"){var nt=_.parse;if(typeof nt=="function")try{if(nt("0")===0&&!nt(!1)){X=nt(rt);var Z=X.a.length==5&&X.a[0]===1;if(Z){try{Z=!nt('" "')}catch{}if(Z)try{Z=nt("01")!==1}catch{}if(Z)try{Z=nt("1.")!==1}catch{}}}}catch{Z=!1}Q=Z}}return c[$]=!!Q}var f,v,d,b={}.toString,p=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&p?(_.stringify=p.stringify,_.parse=p.parse):_=a.JSON=p||{};var g=new Date(-0xc782b5b800cec);try{g=g.getUTCFullYear()==-109252&&g.getUTCMonth()===0&&g.getUTCDate()===1&&g.getUTCHours()==10&&g.getUTCMinutes()==37&&g.getUTCSeconds()==6&&g.getUTCMilliseconds()==708}catch{}if(!c("json")){var l="[object Function]",u="[object Date]",w="[object Number]",A="[object String]",k="[object Array]",L="[object Boolean]",Y=c("bug-string-char-index");if(!g)var J=Math.floor,N=[0,31,59,90,120,151,181,212,243,273,304,334],U=function($,Q){return N[Q]+365*($-1970)+J(($-1969+(Q=+(Q>1)))/4)-J(($-1901+Q)/100)+J(($-1601+Q)/400)};(f={}.hasOwnProperty)||(f=function($){var Q,X={};return(X.__proto__=null,X.__proto__={toString:1},X).toString!=b?f=function(rt){var K=this.__proto__,et=rt in(this.__proto__=null,this);return this.__proto__=K,et}:(Q=X.constructor,f=function(rt){var K=(this.constructor||Q).prototype;return rt in this&&!(rt in K&&this[rt]===K[rt])}),X=null,f.call(this,$)});var T={boolean:1,number:1,string:1,undefined:1},I=function($,Q){var X=typeof $[Q];return X=="object"?!!$[Q]:!T[X]};if(v=function($,Q){var X,rt,K,et=0;(X=function(){this.valueOf=0}).prototype.valueOf=0,rt=new X;for(K in rt)f.call(rt,K)&&et++;return X=rt=null,et?v=et==2?function(nt,Z){var at,kt={},Vt=b.call(nt)==l;for(at in nt)Vt&&at=="prototype"||f.call(kt,at)||!(kt[at]=1)||!f.call(nt,at)||Z(at)}:function(nt,Z){var at,kt,Vt=b.call(nt)==l;for(at in nt)Vt&&at=="prototype"||!f.call(nt,at)||(kt=at==="constructor")||Z(at);(kt||f.call(nt,at="constructor"))&&Z(at)}:(rt=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(nt,Z){var at,kt,Vt=b.call(nt)==l,It=!Vt&&typeof nt.constructor!="function"&&I(nt,"hasOwnProperty")?nt.hasOwnProperty:f;for(at in nt)Vt&&at=="prototype"||!It.call(nt,at)||Z(at);for(kt=rt.length;at=rt[--kt];It.call(nt,at)&&Z(at));}),v($,Q)},!c("json-stringify")){var P={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R="000000",B=function($,Q){return(R+(Q||0)).slice(-$)},H="\\u00",z=function($){var Q,X='"',rt=0,K=$.length,et=K>10&&Y;for(et&&(Q=$.split(""));K>rt;rt++){var nt=$.charCodeAt(rt);switch(nt){case 8:case 9:case 10:case 12:case 13:case 34:case 92:X+=P[nt];break;default:if(32>nt){X+=H+B(2,nt.toString(16));break}X+=et?Q[rt]:Y?$.charAt(rt):$[rt]}}return X+'"'},G=function($,Q,X,rt,K,et,nt){var Z,at,kt,Vt,It,Te,tr,he,Bn,er,te,ee,Ue,De,nr,He;try{Z=Q[$]}catch{}if(typeof Z=="object"&&Z)if(at=b.call(Z),at!=u||f.call(Z,"toJSON"))typeof Z.toJSON=="function"&&(at!=w&&at!=A&&at!=k||f.call(Z,"toJSON"))&&(Z=Z.toJSON($));else if(Z>-1/0&&1/0>Z){if(U){for(It=J(Z/864e5),kt=J(It/365.2425)+1970-1;U(kt+1,0)<=It;kt++);for(Vt=J((It-U(kt,0))/30.42);U(kt,Vt+1)<=It;Vt++);It=1+It-U(kt,Vt),Te=(Z%864e5+864e5)%864e5,tr=J(Te/36e5)%24,he=J(Te/6e4)%60,Bn=J(Te/1e3)%60,er=Te%1e3}else kt=Z.getUTCFullYear(),Vt=Z.getUTCMonth(),It=Z.getUTCDate(),tr=Z.getUTCHours(),he=Z.getUTCMinutes(),Bn=Z.getUTCSeconds(),er=Z.getUTCMilliseconds();Z=(0>=kt||kt>=1e4?(0>kt?"-":"+")+B(6,0>kt?-kt:kt):B(4,kt))+"-"+B(2,Vt+1)+"-"+B(2,It)+"T"+B(2,tr)+":"+B(2,he)+":"+B(2,Bn)+"."+B(3,er)+"Z"}else Z=null;if(X&&(Z=X.call(Q,$,Z)),Z===null)return"null";if(at=b.call(Z),at==L)return""+Z;if(at==w)return Z>-1/0&&1/0>Z?""+Z:"null";if(at==A)return z(""+Z);if(typeof Z=="object"){for(De=nt.length;De--;)if(nt[De]===Z)throw TypeError();if(nt.push(Z),te=[],nr=et,et+=K,at==k){for(Ue=0,De=Z.length;De>Ue;Ue++)ee=G(Ue,Z,X,rt,K,et,nt),te.push(ee===d?"null":ee);He=te.length?K?`[
|
|
38
|
+
`+et+te.join(`,
|
|
39
39
|
`+et)+`
|
|
40
|
-
`+
|
|
41
|
-
`+et+
|
|
40
|
+
`+nr+"]":"["+te.join(",")+"]":"[]"}else v(rt||Z,function(rr){var nn=G(rr,Z,X,rt,K,et,nt);nn!==d&&te.push(z(rr)+":"+(K?" ":"")+nn)}),He=te.length?K?`{
|
|
41
|
+
`+et+te.join(`,
|
|
42
42
|
`+et)+`
|
|
43
|
-
`+
|
|
44
|
-
`,102:"\f",114:"\r"},ct=function(){throw F=pt=null,SyntaxError()},jt=function(){for(var $,Q,X,rt,K,et=pt,nt=et.length;nt>F;)switch(K=et.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return $=Y?et.charAt(F):et[F],F++,$;case 34:for($="@",F++;nt>F;)if(K=et.charCodeAt(F),32>K)ct();else if(K==92)switch(K=et.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:$+=xt[K],F++;break;case 117:for(Q=++F,X=F+4;X>F;F++)K=et.charCodeAt(F),K>=48&&57>=K||K>=97&&102>=K||K>=65&&70>=K||ct();$+=ut("0x"+et.slice(Q,F));break;default:ct()}else{if(K==34)break;for(K=et.charCodeAt(F),Q=F;K>=32&&K!=92&&K!=34;)K=et.charCodeAt(++F);$+=et.slice(Q,F)}if(et.charCodeAt(F)==34)return F++,$;ct();default:if(Q=F,K==45&&(rt=!0,K=et.charCodeAt(++F)),K>=48&&57>=K){for(K==48&&(K=et.charCodeAt(F+1),K>=48&&57>=K)&&ct(),rt=!1;nt>F&&(K=et.charCodeAt(F),K>=48&&57>=K);F++);if(et.charCodeAt(F)==46){for(X=++F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ct(),F=X}if(K=et.charCodeAt(F),K==101||K==69){for(K=et.charCodeAt(++F),(K==43||K==45)&&F++,X=F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ct(),F=X}return+et.slice(Q,F)}if(rt&&ct(),et.slice(F,F+4)=="true")return F+=4,!0;if(et.slice(F,F+5)=="false")return F+=5,!1;if(et.slice(F,F+4)=="null")return F+=4,null;ct()}return"$"},Be=function($){var Q,X;if($=="$"&&ct(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=jt(),$!="]";X||(X=!0))X&&($==","?($=jt(),$=="]"&&ct()):ct()),$==","&&ct(),Q.push(Be($));return Q}if($=="{"){for(Q={};$=jt(),$!="}";X||(X=!0))X&&($==","?($=jt(),$=="}"&&ct()):ct()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||jt()!=":")&&ct(),Q[$.slice(1)]=Be(jt());return Q}ct()}return $},ce=function($,Q,X){var rt=Or($,Q,X);rt===d?delete $[Q]:$[Q]=rt},Or=function($,Q,X){var rt,K=$[Q];if(typeof K=="object"&&K)if(b.call(K)==k)for(rt=K.length;rt--;)ce(K,rt,X);else v(K,function(et){ce(K,et,X)});return X.call($,Q,K)};_.parse=function($,Q){var X,rt;return F=0,pt=""+$,X=Be(jt()),jt()!="$"&&ct(),F=pt=null,Q&&b.call(Q)==l?Or((rt={},rt[""]=X,rt),"",Q):X}}}})(this)},{}],48:[function(r,o){function n(a,c){var f=[];c=c||0;for(var v=c||0;v<a.length;v++)f[v-c]=a[v];return f}o.exports=n},{}]},{},[1])(1)}const $c=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"}))}),Jc=/v\d+_\d+_\d+/;function jc(r){return typeof r=="function"}const wi=Object.entries($c).reduce((r,o)=>{var c;const n=o[1].default,a=(c=o[0].match(Jc))==null?void 0:c[0];return jc(n)&&a&&(r[a]=n()),r},{}),vs=r=>{if(r in wi)return wi[r];throw new Error(`Socket version ${r} not found`)},Yc={...wi,getSocketVersion:vs,makeSocketVersion:(r,...o)=>vs(r)(...o)};var ms=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(ms||{}),_s=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(_s||{}),ws=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(ws||{}),bs=(r=>(r.INCOMINC="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2Call",r))(bs||{}),Cs=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(Cs||{}),ht=(r=>(r.ALL_DIALER_STATUS="AllDialersStatus",r.ALL_EXTENSION_STATUS="AllExtensionsStatus",r.ALL_USERS_STATUS="AllUsersStatus",r.CONNECT="connect",r.DISCONNECT="disconnect",r.CONNECT_ERROR_EVENT="connect_error",r.EXTENSION_EVENT="ExtensionEvent",r.KEEP_ALIVE="keepalive",r.KEEP_ALIVE_RESPONSE="keepaliveResponse",r.LOGIN_STATUS="loginStatus",r.LOGIN_SUCCESS="loginSuccess",r.QUEUE_EVENT="QueueEvent",r.ONLINE_STATUS_EVENT="onlineStatusEvent",r.DIALER_EVENT="DialerEvent",r.EXTENSIONS_UPDATED="ExtensionsUpdated",r))(ht||{}),Ss=(r=>(r.NEWCALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(Ss||{}),ks=(r=>(r.NORMAL_HANGUP="Normal hangup",r.USER_BUSY="User busy",r.CALL_REJECTED="Call Rejected",r.UNALLOCATED_NUMBER="Unallocated (unassigned) number",r.UNKNOWN="Unknown",r.NO_USER_RESPONDING="No user responding",r.USER_ALERTING="User alerting, no answer",r.ANSWERED_ELSEWHERE="Answered elsewhere",r))(ks||{}),As=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(As||{});class Vc{constructor(o){St(this,"io");St(this,"ioFunction");St(this,"lastEventTimestamp",new Date().getTime());St(this,"doReconnect",!0);St(this,"keepAliveInterval");St(this,"keepReconnectInterval");St(this,"connected",!1);this.eventsSdkClass=o,this.eventsSdkClass=o}getSocketIoFunction(o){const n=o.split("v="),a="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Yc.getSocketVersion(a)}initSocketConnection(){const o=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,a=this.eventsSdkClass.server;try{const c=a?a.Domain:this.eventsSdkClass.URL,f=a?`${n}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log($t.INFO,"Connecting to..",f),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f});const v={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:o},timeout:this.eventsSdkClass.options.timeout};if(o&&(v.query={token:o}),this.ioFunction&&f)this.io=this.ioFunction(f,v);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log($t.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(ht.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_SUCCESS,o)).on(ht.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.QUEUE_EVENT,o)).on(ht.EXTENSION_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSION_EVENT,o)).on(ht.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.DIALER_EVENT,o)).on(ht.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_STATUS,o)).on(ht.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_EXTENSION_STATUS,o)).on(ht.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_DIALER_STATUS,o)).on(ht.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(ht.CONNECT,()=>this.onConnect()).on(ht.DISCONNECT,o=>this.onDisconnect(o)).on(ht.CONNECT_ERROR_EVENT,o=>this.onConnectError(o)).on(ht.EXTENSIONS_UPDATED,o=>{this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSIONS_UPDATED,o)})}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io){this.eventsSdkClass.emit(ht.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log($t.INFO,`EMIT -> ${ht.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var o;this.io&&(this.io.close(),(o=this.io)==null||o.disconnect(),this.io=void 0),Jn.clearSessionStorage()}onKeepAliveResponse(o){if(this.eventsSdkClass.loggerClass.log($t.INFO,ht.KEEP_ALIVE_RESPONSE),o.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log($t.INFO,ht.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log($t.INFO,ht.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(pn.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log($t.ERROR,ht.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(pn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Zc=Object.defineProperty,Qc=(r,o,n)=>o in r?Zc(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Ht=(r,o,n)=>(Qc(r,typeof o!="symbol"?o+"":o,n),n);function tf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function ef(r){if(r.__esModule)return r;var o=r.default;if(typeof o=="function"){var n=function a(){return this instanceof a?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};n.prototype=o.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var c=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:function(){return r[a]}})}),n}var bi={exports:{}},nf=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,rf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],xs=function(r){var o=r,n=r.indexOf("["),a=r.indexOf("]");n!=-1&&a!=-1&&(r=r.substring(0,n)+r.substring(n,a).replace(/:/g,";")+r.substring(a,r.length));for(var c=nf.exec(r||""),f={},v=14;v--;)f[rf[v]]=c[v]||"";return n!=-1&&a!=-1&&(f.source=o,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=of(f,f.path),f.queryKey=sf(f,f.query),f};function of(r,o){var n=/\/{2,9}/g,a=o.replace(n,"/").split("/");return(o.substr(0,1)=="/"||o.length===0)&&a.splice(0,1),o.substr(o.length-1,1)=="/"&&a.splice(a.length-1,1),a}function sf(r,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,c,f){c&&(n[c]=f)}),n}var Ci={exports:{}},Si={exports:{}},jn=1e3,Yn=jn*60,Vn=Yn*60,Zn=Vn*24,af=Zn*365.25,uf=function(r,o){o=o||{};var n=typeof r;if(n==="string"&&r.length>0)return cf(r);if(n==="number"&&isNaN(r)===!1)return o.long?hf(r):ff(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function cf(r){if(r=String(r),!(r.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var n=parseFloat(o[1]),a=(o[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return n*af;case"days":case"day":case"d":return n*Zn;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Vn;case"minutes":case"minute":case"mins":case"min":case"m":return n*Yn;case"seconds":case"second":case"secs":case"sec":case"s":return n*jn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function ff(r){return r>=Zn?Math.round(r/Zn)+"d":r>=Vn?Math.round(r/Vn)+"h":r>=Yn?Math.round(r/Yn)+"m":r>=jn?Math.round(r/jn)+"s":r+"ms"}function hf(r){return _r(r,Zn,"day")||_r(r,Vn,"hour")||_r(r,Yn,"minute")||_r(r,jn,"second")||r+" ms"}function _r(r,o,n){if(!(r<o))return r<o*1.5?Math.floor(r/o)+" "+n:Math.ceil(r/o)+" "+n+"s"}(function(r,o){o=r.exports=a.debug=a.default=a,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=uf,o.instances=[],o.names=[],o.skips=[],o.formatters={};function n(p){var _=0,g;for(g in p)_=(_<<5)-_+p.charCodeAt(g),_|=0;return o.colors[Math.abs(_)%o.colors.length]}function a(p){var _;function g(){if(g.enabled){var l=g,u=+new Date,w=u-(_||u);l.diff=w,l.prev=_,l.curr=u,_=u;for(var A=new Array(arguments.length),k=0;k<A.length;k++)A[k]=arguments[k];A[0]=o.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");var L=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,function(J,N){if(J==="%%")return J;L++;var U=o.formatters[N];if(typeof U=="function"){var T=A[L];J=U.call(l,T),A.splice(L,1),L--}return J}),o.formatArgs.call(l,A);var Y=g.log||o.log||console.log.bind(console);Y.apply(l,A)}}return g.namespace=p,g.enabled=o.enabled(p),g.useColors=o.useColors(),g.color=n(p),g.destroy=c,typeof o.init=="function"&&o.init(g),o.instances.push(g),g}function c(){var p=o.instances.indexOf(this);return p!==-1?(o.instances.splice(p,1),!0):!1}function f(p){o.save(p),o.names=[],o.skips=[];var _,g=(typeof p=="string"?p:"").split(/[\s,]+/),l=g.length;for(_=0;_<l;_++)g[_]&&(p=g[_].replace(/\*/g,".*?"),p[0]==="-"?o.skips.push(new RegExp("^"+p.substr(1)+"$")):o.names.push(new RegExp("^"+p+"$")));for(_=0;_<o.instances.length;_++){var u=o.instances[_];u.enabled=o.enabled(u.namespace)}}function v(){o.enable("")}function d(p){if(p[p.length-1]==="*")return!0;var _,g;for(_=0,g=o.skips.length;_<g;_++)if(o.skips[_].test(p))return!1;for(_=0,g=o.names.length;_<g;_++)if(o.names[_].test(p))return!0;return!1}function b(p){return p instanceof Error?p.stack||p.message:p}})(Si,Si.exports);var lf=Si.exports;(function(r,o){o=r.exports=lf,o.log=c,o.formatArgs=a,o.save=f,o.load=v,o.useColors=n,o.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o.formatters.j=function(b){try{return JSON.stringify(b)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}};function a(b){var p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+o.humanize(this.diff),!!p){var _="color: "+this.color;b.splice(1,0,_,"color: inherit");var g=0,l=0;b[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function f(b){try{b==null?o.storage.removeItem("debug"):o.storage.debug=b}catch{}}function v(){var b;try{b=o.storage.debug}catch{}return!b&&typeof process<"u"&&"env"in process&&(b=process.env.DEBUG),b}o.enable(v());function d(){try{return window.localStorage}catch{}}})(Ci,Ci.exports);var qe=Ci.exports,pf=xs,Es=qe("socket.io-client:url"),df=gf;function gf(r,o){var n=r;o=o||typeof location<"u"&&location,r==null&&(r=o.protocol+"//"+o.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=o.protocol+r:r=o.host+r),/^(https?|wss?):\/\//.test(r)||(Es("protocol-less url %s",r),typeof o<"u"?r=o.protocol+"//"+r:r="https://"+r),Es("parse %s",r),n=pf(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var a=n.host.indexOf(":")!==-1,c=a?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port,n.href=n.protocol+"://"+c+(o&&o.port===n.port?"":":"+n.port),n}var wr={},Ts={exports:{}};(function(r){r.exports=o;function o(a){if(a)return n(a)}function n(a){for(var c in o.prototype)a[c]=o.prototype[c];return a}o.prototype.on=o.prototype.addEventListener=function(a,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(c),this},o.prototype.once=function(a,c){function f(){this.off(a,f),c.apply(this,arguments)}return f.fn=c,this.on(a,f),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(a,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var f=this._callbacks["$"+a];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var v,d=0;d<f.length;d++)if(v=f[d],v===c||v.fn===c){f.splice(d,1);break}return f.length===0&&delete this._callbacks["$"+a],this},o.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),f=this._callbacks["$"+a],v=1;v<arguments.length;v++)c[v-1]=arguments[v];if(f){f=f.slice(0);for(var v=0,d=f.length;v<d;++v)f[v].apply(this,c)}return this},o.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},o.prototype.hasListeners=function(a){return!!this.listeners(a).length}})(Ts);var kn=Ts.exports,br={},yf={}.toString,ki=Array.isArray||function(r){return yf.call(r)=="[object Array]"},Rs=wf,vf=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",mf=typeof ArrayBuffer=="function",_f=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function wf(r){return vf&&Buffer.isBuffer(r)||mf&&(r instanceof ArrayBuffer||_f(r))}var Ai=ki,Os=Rs,Is=Object.prototype.toString,bf=typeof Blob=="function"||typeof Blob<"u"&&Is.call(Blob)==="[object BlobConstructor]",Cf=typeof File=="function"||typeof File<"u"&&Is.call(File)==="[object FileConstructor]";br.deconstructPacket=function(r){var o=[],n=r.data,a=r;return a.data=xi(n,o),a.attachments=o.length,{packet:a,buffers:o}};function xi(r,o){if(!r)return r;if(Os(r)){var n={_placeholder:!0,num:o.length};return o.push(r),n}else if(Ai(r)){for(var a=new Array(r.length),c=0;c<r.length;c++)a[c]=xi(r[c],o);return a}else if(typeof r=="object"&&!(r instanceof Date)){var a={};for(var f in r)a[f]=xi(r[f],o);return a}return r}br.reconstructPacket=function(r,o){return r.data=Ei(r.data,o),r.attachments=void 0,r};function Ei(r,o){if(!r)return r;if(r&&r._placeholder===!0){var n=typeof r.num=="number"&&r.num>=0&&r.num<o.length;if(n)return o[r.num];throw new Error("illegal attachments")}else if(Ai(r))for(var a=0;a<r.length;a++)r[a]=Ei(r[a],o);else if(typeof r=="object")for(var c in r)r[c]=Ei(r[c],o);return r}br.removeBlobs=function(r,o){function n(f,v,d){if(!f)return f;if(bf&&f instanceof Blob||Cf&&f instanceof File){a++;var b=new FileReader;b.onload=function(){d?d[v]=this.result:c=this.result,--a||o(c)},b.readAsArrayBuffer(f)}else if(Ai(f))for(var p=0;p<f.length;p++)n(f[p],p,f);else if(typeof f=="object"&&!Os(f))for(var _ in f)n(f[_],_,f)}var a=0,c=r;n(c),a||o(c)},function(r){var o=qe("socket.io-parser"),n=kn,a=br,c=ki,f=Rs;r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],r.CONNECT=0,r.DISCONNECT=1,r.EVENT=2,r.ACK=3,r.ERROR=4,r.BINARY_EVENT=5,r.BINARY_ACK=6,r.Encoder=v,r.Decoder=g;function v(){}var d=r.ERROR+'"encode error"';v.prototype.encode=function(k,L){if(o("encoding packet %j",k),r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)_(k,L);else{var Y=b(k);L([Y])}};function b(k){var L=""+k.type;if((r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)&&(L+=k.attachments+"-"),k.nsp&&k.nsp!=="/"&&(L+=k.nsp+","),k.id!=null&&(L+=k.id),k.data!=null){var Y=p(k.data);if(Y!==!1)L+=Y;else return d}return o("encoded %j as %s",k,L),L}function p(k){try{return JSON.stringify(k)}catch{return!1}}function _(k,L){function Y(J){var N=a.deconstructPacket(J),U=b(N.packet),T=N.buffers;T.unshift(U),L(T)}a.removeBlobs(k,Y)}function g(){this.reconstructor=null}n(g.prototype),g.prototype.add=function(k){var L;if(typeof k=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");L=l(k),r.BINARY_EVENT===L.type||r.BINARY_ACK===L.type?(this.reconstructor=new w(L),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",L)):this.emit("decoded",L)}else if(f(k)||k.base64)if(this.reconstructor)L=this.reconstructor.takeBinaryData(k),L&&(this.reconstructor=null,this.emit("decoded",L));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+k)};function l(k){var L=0,Y={type:Number(k.charAt(0))};if(r.types[Y.type]==null)return A("unknown packet type "+Y.type);if(r.BINARY_EVENT===Y.type||r.BINARY_ACK===Y.type){for(var J=L+1;k.charAt(++L)!=="-"&&L!=k.length;);var N=k.substring(J,L);if(N!=Number(N)||k.charAt(L)!=="-")throw new Error("Illegal attachments");Y.attachments=Number(N)}if(k.charAt(L+1)==="/"){for(var J=L+1;++L;){var U=k.charAt(L);if(U===","||L===k.length)break}Y.nsp=k.substring(J,L)}else Y.nsp="/";var T=k.charAt(L+1);if(T!==""&&Number(T)==T){for(var J=L+1;++L;){var U=k.charAt(L);if(U==null||Number(U)!=U){--L;break}if(L===k.length)break}Y.id=Number(k.substring(J,L+1))}if(k.charAt(++L)){var I=u(k.substr(L)),P=I!==!1&&(Y.type===r.ERROR||c(I));if(P)Y.data=I;else return A("invalid payload")}return o("decoded %s as %j",k,Y),Y}function u(k){try{return JSON.parse(k)}catch{return!1}}g.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function w(k){this.reconPack=k,this.buffers=[]}w.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length===this.reconPack.attachments){var L=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),L}return null},w.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function A(k){return{type:r.ERROR,data:"parser error: "+k}}}(wr);var Ti={exports:{}},Cr={},Ri={exports:{}};try{Ri.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Ri.exports=!1}var Sf=Ri.exports,Oi=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),kf=Sf,Af=Oi,Ii=function(r){var o=r.xdomain,n=r.xscheme,a=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||kf))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&a)return new XDomainRequest}catch{}if(!o)try{return new Af[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},Ni={exports:{}},dn={},xf=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var a in r)n.call(r,a)&&o.push(a);return o},Ef=ki,Ns=Object.prototype.toString,Tf=typeof Blob=="function"||typeof Blob<"u"&&Ns.call(Blob)==="[object BlobConstructor]",Rf=typeof File=="function"||typeof File<"u"&&Ns.call(File)==="[object FileConstructor]",Bs=Sr;function Sr(r){if(!r||typeof r!="object")return!1;if(Ef(r)){for(var o=0,n=r.length;o<n;o++)if(Sr(r[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(r)||typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||Tf&&r instanceof Blob||Rf&&r instanceof File)return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return Sr(r.toJSON(),!0);for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&Sr(r[a]))return!0;return!1}var Of=function(r,o,n){var a=r.byteLength;if(o=o||0,n=n||a,r.slice)return r.slice(o,n);if(o<0&&(o+=a),n<0&&(n+=a),n>a&&(n=a),o>=a||o>=n||a===0)return new ArrayBuffer(0);for(var c=new Uint8Array(r),f=new Uint8Array(n-o),v=o,d=0;v<n;v++,d++)f[d]=c[v];return f.buffer},If=Nf;function Nf(r,o,n){var a=!1;return n=n||Bf,c.count=r,r===0?o():c;function c(f,v){if(c.count<=0)throw new Error("after called too many times");--c.count,f?(a=!0,o(f),o=n):c.count===0&&!a&&o(null,v)}}function Bf(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Ve=String.fromCharCode;function Ls(r){for(var o=[],n=0,a=r.length,c,f;n<a;)c=r.charCodeAt(n++),c>=55296&&c<=56319&&n<a?(f=r.charCodeAt(n++),(f&64512)==56320?o.push(((c&1023)<<10)+(f&1023)+65536):(o.push(c),n--)):o.push(c);return o}function Lf(r){for(var o=r.length,n=-1,a,c="";++n<o;)a=r[n],a>65535&&(a-=65536,c+=Ve(a>>>10&1023|55296),a=56320|a&1023),c+=Ve(a);return c}function Us(r,o){if(r>=55296&&r<=57343){if(o)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Bi(r,o){return Ve(r>>o&63|128)}function Uf(r,o){if(!(r&4294967168))return Ve(r);var n="";return r&4294965248?r&4294901760?r&4292870144||(n=Ve(r>>18&7|240),n+=Bi(r,12),n+=Bi(r,6)):(Us(r,o)||(r=65533),n=Ve(r>>12&15|224),n+=Bi(r,6)):n=Ve(r>>6&31|192),n+=Ve(r&63|128),n}function Df(r,o){o=o||{};for(var n=o.strict!==!1,a=Ls(r),c=a.length,f=-1,v,d="";++f<c;)v=a[f],d+=Uf(v,n);return d}function An(){if(Ze>=Ar)throw Error("Invalid byte index");var r=kr[Ze]&255;if(Ze++,(r&192)==128)return r&63;throw Error("Invalid continuation byte")}function Pf(r){var o,n,a,c,f;if(Ze>Ar)throw Error("Invalid byte index");if(Ze==Ar)return!1;if(o=kr[Ze]&255,Ze++,!(o&128))return o;if((o&224)==192){if(n=An(),f=(o&31)<<6|n,f>=128)return f;throw Error("Invalid continuation byte")}if((o&240)==224){if(n=An(),a=An(),f=(o&15)<<12|n<<6|a,f>=2048)return Us(f,r)?f:65533;throw Error("Invalid continuation byte")}if((o&248)==240&&(n=An(),a=An(),c=An(),f=(o&7)<<18|n<<12|a<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}var kr,Ar,Ze;function Ff(r,o){o=o||{};var n=o.strict!==!1;kr=Ls(r),Ar=kr.length,Ze=0;for(var a=[],c;(c=Pf(n))!==!1;)a.push(c);return Lf(a)}var Mf={version:"2.1.2",encode:Df,decode:Ff},Li={},Ds;function qf(){return Ds||(Ds=1,function(r){Li.encode=function(o){var n=new Uint8Array(o),a,c=n.length,f="";for(a=0;a<c;a+=3)f+=r[n[a]>>2],f+=r[(n[a]&3)<<4|n[a+1]>>4],f+=r[(n[a+1]&15)<<2|n[a+2]>>6],f+=r[n[a+2]&63];return c%3===2?f=f.substring(0,f.length-1)+"=":c%3===1&&(f=f.substring(0,f.length-2)+"=="),f},Li.decode=function(o){var n=o.length*.75,a=o.length,c,f=0,v,d,b,p;o[o.length-1]==="="&&(n--,o[o.length-2]==="="&&n--);var _=new ArrayBuffer(n),g=new Uint8Array(_);for(c=0;c<a;c+=4)v=r.indexOf(o[c]),d=r.indexOf(o[c+1]),b=r.indexOf(o[c+2]),p=r.indexOf(o[c+3]),g[f++]=v<<2|d>>4,g[f++]=(d&15)<<4|b>>2,g[f++]=(b&3)<<6|p&63;return _}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),Li}var Ui,Ps;function Wf(){if(Ps)return Ui;Ps=1;var r=typeof r<"u"?r:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,o=function(){try{var d=new Blob(["hi"]);return d.size===2}catch{return!1}}(),n=o&&function(){try{var d=new Blob([new Uint8Array([1,2])]);return d.size===2}catch{return!1}}(),a=r&&r.prototype.append&&r.prototype.getBlob;function c(d){return d.map(function(b){if(b.buffer instanceof ArrayBuffer){var p=b.buffer;if(b.byteLength!==p.byteLength){var _=new Uint8Array(b.byteLength);_.set(new Uint8Array(p,b.byteOffset,b.byteLength)),p=_.buffer}return p}return b})}function f(d,b){b=b||{};var p=new r;return c(d).forEach(function(_){p.append(_)}),b.type?p.getBlob(b.type):p.getBlob()}function v(d,b){return new Blob(c(d),b||{})}return typeof Blob<"u"&&(f.prototype=Blob.prototype,v.prototype=Blob.prototype),Ui=function(){return o?n?Blob:v:a?f:void 0}(),Ui}(function(r){var o=xf,n=Bs,a=Of,c=If,f=Mf,v;typeof ArrayBuffer<"u"&&(v=qf());var d=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),b=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),p=d||b;r.protocol=3;var _=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=o(_),l={type:"error",data:"parser error"},u=Wf();r.encodePacket=function(N,U,T,I){typeof U=="function"&&(I=U,U=!1),typeof T=="function"&&(I=T,T=null);var P=N.data===void 0?void 0:N.data.buffer||N.data;if(typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer)return A(N,U,I);if(typeof u<"u"&&P instanceof u)return L(N,U,I);if(P&&P.base64)return w(N,I);var R=_[N.type];return N.data!==void 0&&(R+=T?f.encode(String(N.data),{strict:!1}):String(N.data)),I(""+R)};function w(N,U){var T="b"+r.packets[N.type]+N.data.data;return U(T)}function A(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=N.data,P=new Uint8Array(I),R=new Uint8Array(1+I.byteLength);R[0]=_[N.type];for(var B=0;B<P.length;B++)R[B+1]=P[B];return T(R.buffer)}function k(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=new FileReader;return I.onload=function(){r.encodePacket({type:N.type,data:I.result},U,!0,T)},I.readAsArrayBuffer(N.data)}function L(N,U,T){if(!U)return r.encodeBase64Packet(N,T);if(p)return k(N,U,T);var I=new Uint8Array(1);I[0]=_[N.type];var P=new u([I.buffer,N.data]);return T(P)}r.encodeBase64Packet=function(N,U){var T="b"+r.packets[N.type];if(typeof u<"u"&&N.data instanceof u){var I=new FileReader;return I.onload=function(){var z=I.result.split(",")[1];U(T+z)},I.readAsDataURL(N.data)}var P;try{P=String.fromCharCode.apply(null,new Uint8Array(N.data))}catch{for(var R=new Uint8Array(N.data),B=new Array(R.length),H=0;H<R.length;H++)B[H]=R[H];P=String.fromCharCode.apply(null,B)}return T+=btoa(P),U(T)},r.decodePacket=function(N,U,T){if(N===void 0)return l;if(typeof N=="string"){if(N.charAt(0)==="b")return r.decodeBase64Packet(N.substr(1),U);if(T&&(N=Y(N),N===!1))return l;var P=N.charAt(0);return Number(P)!=P||!g[P]?l:N.length>1?{type:g[P],data:N.substring(1)}:{type:g[P]}}var I=new Uint8Array(N),P=I[0],R=a(N,1);return u&&U==="blob"&&(R=new u([R])),{type:g[P],data:R}};function Y(N){try{N=f.decode(N,{strict:!1})}catch{return!1}return N}r.decodeBase64Packet=function(N,U){var T=g[N.charAt(0)];if(!v)return{type:T,data:{base64:!0,data:N.substr(1)}};var I=v.decode(N.substr(1));return U==="blob"&&u&&(I=new u([I])),{type:T,data:I}},r.encodePayload=function(N,U,T){typeof U=="function"&&(T=U,U=null);var I=n(N);if(U&&I)return u&&!p?r.encodePayloadAsBlob(N,T):r.encodePayloadAsArrayBuffer(N,T);if(!N.length)return T("0:");function P(B){return B.length+":"+B}function R(B,H){r.encodePacket(B,I?U:!1,!1,function(z){H(null,P(z))})}J(N,R,function(B,H){return T(H.join(""))})};function J(N,U,T){for(var I=new Array(N.length),P=c(N.length,T),R=function(H,z,G){U(z,function(F,pt){I[H]=pt,G(F,I)})},B=0;B<N.length;B++)R(B,N[B],P)}r.decodePayload=function(N,U,T){if(typeof N!="string")return r.decodePayloadAsBinary(N,U,T);typeof U=="function"&&(T=U,U=null);var I;if(N==="")return T(l,0,1);for(var P="",R,B,H=0,z=N.length;H<z;H++){var G=N.charAt(H);if(G!==":"){P+=G;continue}if(P===""||P!=(R=Number(P))||(B=N.substr(H+1,R),P!=B.length))return T(l,0,1);if(B.length){if(I=r.decodePacket(B,U,!1),l.type===I.type&&l.data===I.data)return T(l,0,1);var F=T(I,H+R,z);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},r.encodePayloadAsArrayBuffer=function(N,U){if(!N.length)return U(new ArrayBuffer(0));function T(I,P){r.encodePacket(I,!0,!0,function(R){return P(null,R)})}J(N,T,function(I,P){var R=P.reduce(function(z,G){var F;return typeof G=="string"?F=G.length:F=G.byteLength,z+F.toString().length+F+2},0),B=new Uint8Array(R),H=0;return P.forEach(function(z){var G=typeof z=="string",F=z;if(G){for(var pt=new Uint8Array(z.length),ut=0;ut<z.length;ut++)pt[ut]=z.charCodeAt(ut);F=pt.buffer}G?B[H++]=0:B[H++]=1;for(var xt=F.byteLength.toString(),ut=0;ut<xt.length;ut++)B[H++]=parseInt(xt[ut]);B[H++]=255;for(var pt=new Uint8Array(F),ut=0;ut<pt.length;ut++)B[H++]=pt[ut]}),U(B.buffer)})},r.encodePayloadAsBlob=function(N,U){function T(I,P){r.encodePacket(I,!0,!0,function(R){var B=new Uint8Array(1);if(B[0]=1,typeof R=="string"){for(var H=new Uint8Array(R.length),z=0;z<R.length;z++)H[z]=R.charCodeAt(z);R=H.buffer,B[0]=0}for(var G=R instanceof ArrayBuffer?R.byteLength:R.size,F=G.toString(),pt=new Uint8Array(F.length+1),z=0;z<F.length;z++)pt[z]=parseInt(F[z]);if(pt[F.length]=255,u){var ut=new u([B.buffer,pt.buffer,R]);P(null,ut)}})}J(N,T,function(I,P){return U(new u(P))})},r.decodePayloadAsBinary=function(N,U,T){typeof U=="function"&&(T=U,U=null);for(var I=N,P=[];I.byteLength>0;){for(var R=new Uint8Array(I),B=R[0]===0,H="",z=1;R[z]!==255;z++){if(H.length>310)return T(l,0,1);H+=R[z]}I=a(I,2+H.length),H=parseInt(H);var G=a(I,0,H);if(B)try{G=String.fromCharCode.apply(null,new Uint8Array(G))}catch{var F=new Uint8Array(G);G="";for(var z=0;z<F.length;z++)G+=String.fromCharCode(F[z])}P.push(G),I=a(I,H)}var pt=P.length;P.forEach(function(ut,xt){T(r.decodePacket(ut,U,!0),xt,pt)})}})(dn);var Di,Fs;function Pi(){if(Fs)return Di;Fs=1;var r=dn,o=kn;Di=n;function n(a){this.path=a.path,this.hostname=a.hostname,this.port=a.port,this.secure=a.secure,this.query=a.query,this.timestampParam=a.timestampParam,this.timestampRequests=a.timestampRequests,this.readyState="",this.agent=a.agent||!1,this.socket=a.socket,this.enablesXDR=a.enablesXDR,this.withCredentials=a.withCredentials,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.forceNode=a.forceNode,this.isReactNative=a.isReactNative,this.extraHeaders=a.extraHeaders,this.localAddress=a.localAddress}return o(n.prototype),n.prototype.onError=function(a,c){var f=new Error(a);return f.type="TransportError",f.description=c,this.emit("error",f),this},n.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(a){if(this.readyState==="open")this.write(a);else throw new Error("Transport not open")},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(a){var c=r.decodePacket(a,this.socket.binaryType);this.onPacket(c)},n.prototype.onPacket=function(a){this.emit("packet",a)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Di}var xn={};xn.encode=function(r){var o="";for(var n in r)r.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return o},xn.decode=function(r){for(var o={},n=r.split("&"),a=0,c=n.length;a<c;a++){var f=n[a].split("=");o[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return o};var xr=function(r,o){var n=function(){};n.prototype=o.prototype,r.prototype=new n,r.prototype.constructor=r},Ms="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Er=64,qs={},Ws=0,Qe=0,Hs;function Fi(r){var o="";do o=Ms[r%Er]+o,r=Math.floor(r/Er);while(r>0);return o}function Hf(r){var o=0;for(Qe=0;Qe<r.length;Qe++)o=o*Er+qs[r.charAt(Qe)];return o}function Mi(){var r=Fi(+new Date);return r!==Hs?(Ws=0,Hs=r):r+"."+Fi(Ws++)}for(;Qe<Er;Qe++)qs[Ms[Qe]]=Qe;Mi.encode=Fi,Mi.decode=Hf;var Ks=Mi,zs=Pi(),Kf=xn,Xs=dn,zf=xr,Xf=Ks,xe=qe("engine.io-client:polling"),Gs=Ne,Gf=function(){var r=Ii,o=new r({xdomain:!1});return o.responseType!=null}();function Ne(r){var o=r&&r.forceBase64;(!Gf||o)&&(this.supportsBinary=!1),zs.call(this,r)}zf(Ne,zs),Ne.prototype.name="polling",Ne.prototype.doOpen=function(){this.poll()},Ne.prototype.pause=function(r){var o=this;this.readyState="pausing";function n(){xe("paused"),o.readyState="paused",r()}if(this.polling||!this.writable){var a=0;this.polling&&(xe("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){xe("pre-pause polling complete"),--a||n()})),this.writable||(xe("we are currently writing - waiting to pause"),a++,this.once("drain",function(){xe("pre-pause writing complete"),--a||n()}))}else n()},Ne.prototype.poll=function(){xe("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Ne.prototype.onData=function(r){var o=this;xe("polling got data %s",r);var n=function(a,c,f){if(o.readyState==="opening"&&a.type==="open"&&o.onOpen(),a.type==="close")return o.onClose(),!1;o.onPacket(a)};Xs.decodePayload(r,this.socket.binaryType,n),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():xe('ignoring poll - transport state "%s"',this.readyState))},Ne.prototype.doClose=function(){var r=this;function o(){xe("writing close packet"),r.write([{type:"close"}])}this.readyState==="open"?(xe("transport open - closing"),o()):(xe("transport not open - deferring close"),this.once("open",o))},Ne.prototype.write=function(r){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};Xs.encodePayload(r,this.supportsBinary,function(a){o.doWrite(a,n)})},Ne.prototype.uri=function(){var r=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(r[this.timestampParam]=Xf()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=Kf.encode(r),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r};var $f=Ii,$s=Gs,Jf=kn,jf=xr,qi=qe("engine.io-client:polling-xhr"),Yf=Oi;Ni.exports=En,Ni.exports.Request=Mt;function Js(){}function En(r){if($s.call(this,r),this.requestTimeout=r.requestTimeout,this.extraHeaders=r.extraHeaders,typeof location<"u"){var o=location.protocol==="https:",n=location.port;n||(n=o?443:80),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port,this.xs=r.secure!==o}}jf(En,$s),En.prototype.supportsBinary=!0,En.prototype.request=function(r){return r=r||{},r.uri=this.uri(),r.xd=this.xd,r.xs=this.xs,r.agent=this.agent||!1,r.supportsBinary=this.supportsBinary,r.enablesXDR=this.enablesXDR,r.withCredentials=this.withCredentials,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,r.requestTimeout=this.requestTimeout,r.extraHeaders=this.extraHeaders,new Mt(r)},En.prototype.doWrite=function(r,o){var n=typeof r!="string"&&r!==void 0,a=this.request({method:"POST",data:r,isBinary:n}),c=this;a.on("success",o),a.on("error",function(f){c.onError("xhr post error",f)}),this.sendXhr=a},En.prototype.doPoll=function(){qi("xhr poll");var r=this.request(),o=this;r.on("data",function(n){o.onData(n)}),r.on("error",function(n){o.onError("xhr poll error",n)}),this.pollXhr=r};function Mt(r){this.method=r.method||"GET",this.uri=r.uri,this.xd=!!r.xd,this.xs=!!r.xs,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.agent=r.agent,this.isBinary=r.isBinary,this.supportsBinary=r.supportsBinary,this.enablesXDR=r.enablesXDR,this.withCredentials=r.withCredentials,this.requestTimeout=r.requestTimeout,this.pfx=r.pfx,this.key=r.key,this.passphrase=r.passphrase,this.cert=r.cert,this.ca=r.ca,this.ciphers=r.ciphers,this.rejectUnauthorized=r.rejectUnauthorized,this.extraHeaders=r.extraHeaders,this.create()}if(Jf(Mt.prototype),Mt.prototype.create=function(){var r={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized;var o=this.xhr=new $f(r),n=this;try{qi("xhr open %s: %s",this.method,this.uri),o.open(this.method,this.uri,this.async);try{if(this.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(var a in this.extraHeaders)this.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this.extraHeaders[a])}}catch{}if(this.method==="POST")try{this.isBinary?o.setRequestHeader("Content-type","application/octet-stream"):o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in o&&(o.withCredentials=this.withCredentials),this.requestTimeout&&(o.timeout=this.requestTimeout),this.hasXDR()?(o.onload=function(){n.onLoad()},o.onerror=function(){n.onError(o.responseText)}):o.onreadystatechange=function(){if(o.readyState===2)try{var c=o.getResponseHeader("Content-Type");(n.supportsBinary&&c==="application/octet-stream"||c==="application/octet-stream; charset=UTF-8")&&(o.responseType="arraybuffer")}catch{}o.readyState===4&&(o.status===200||o.status===1223?n.onLoad():setTimeout(function(){n.onError(typeof o.status=="number"?o.status:0)},0))},qi("xhr data %s",this.data),o.send(this.data)}catch(c){setTimeout(function(){n.onError(c)},0);return}typeof document<"u"&&(this.index=Mt.requestsCount++,Mt.requests[this.index]=this)},Mt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Mt.prototype.onData=function(r){this.emit("data",r),this.onSuccess()},Mt.prototype.onError=function(r){this.emit("error",r),this.cleanup(!0)},Mt.prototype.cleanup=function(r){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Js:this.xhr.onreadystatechange=Js,r)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Mt.requests[this.index],this.xhr=null}},Mt.prototype.onLoad=function(){var r;try{var o;try{o=this.xhr.getResponseHeader("Content-Type")}catch{}o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8"?r=this.xhr.response||this.xhr.responseText:r=this.xhr.responseText}catch(n){this.onError(n)}r!=null&&this.onData(r)},Mt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},Mt.prototype.abort=function(){this.cleanup()},Mt.requestsCount=0,Mt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",js);else if(typeof addEventListener=="function"){var Vf="onpagehide"in Yf?"pagehide":"unload";addEventListener(Vf,js,!1)}}function js(){for(var r in Mt.requests)Mt.requests.hasOwnProperty(r)&&Mt.requests[r].abort()}var Zf=Ni.exports,Wi=Gs,Qf=xr,Ys=Oi,th=Tn,eh=/\n/g,nh=/\\n/g,Tr;function rh(){}function Tn(r){Wi.call(this,r),this.query=this.query||{},Tr||(Tr=Ys.___eio=Ys.___eio||[]),this.index=Tr.length;var o=this;Tr.push(function(n){o.onData(n)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=rh)},!1)}Qf(Tn,Wi),Tn.prototype.supportsBinary=!1,Tn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),Wi.prototype.doClose.call(this)},Tn.prototype.doPoll=function(){var r=this,o=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),o.async=!0,o.src=this.uri(),o.onerror=function(c){r.onError("jsonp poll error",c)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(o,n):(document.head||document.body).appendChild(o),this.script=o;var a=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);a&&setTimeout(function(){var c=document.createElement("iframe");document.body.appendChild(c),document.body.removeChild(c)},100)},Tn.prototype.doWrite=function(r,o){var n=this;if(!this.form){var a=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index,v;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=f,a.method="POST",a.setAttribute("accept-charset","utf-8"),c.name="d",a.appendChild(c),document.body.appendChild(a),this.form=a,this.area=c}this.form.action=this.uri();function d(){b(),o()}function b(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(_){n.onError("jsonp polling iframe removal error",_)}try{var p='<iframe src="javascript:0" name="'+n.iframeId+'">';v=document.createElement(p)}catch{v=document.createElement("iframe"),v.name=n.iframeId,v.src="javascript:0"}v.id=n.iframeId,n.form.appendChild(v),n.iframe=v}b(),r=r.replace(nh,`\\
|
|
45
|
-
`),this.area.value=r.replace(eh,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const ih={},oh=Object.freeze(Object.defineProperty({__proto__:null,default:ih},Symbol.toStringTag,{value:"Module"})),sh=ef(oh);var Hi=Pi(),ah=dn,uh=xn,ch=xr,fh=Ks,hh=qe("engine.io-client:websocket"),Rr,Ki;if(typeof WebSocket<"u"?Rr=WebSocket:typeof self<"u"&&(Rr=self.WebSocket||self.MozWebSocket),typeof window>"u")try{Ki=sh}catch{}var Rn=Rr||Ki,lh=ve;function ve(r){var o=r&&r.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=r.perMessageDeflate,this.usingBrowserWebSocket=Rr&&!r.forceNode,this.protocols=r.protocols,this.usingBrowserWebSocket||(Rn=Ki),Hi.call(this,r)}ch(ve,Hi),ve.prototype.name="websocket",ve.prototype.supportsBinary=!0,ve.prototype.doOpen=function(){if(this.check()){var r=this.uri(),o=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?o?new Rn(r,o):new Rn(r):new Rn(r,o,n)}catch(a){return this.emit("error",a)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},ve.prototype.addEventListeners=function(){var r=this;this.ws.onopen=function(){r.onOpen()},this.ws.onclose=function(){r.onClose()},this.ws.onmessage=function(o){r.onData(o.data)},this.ws.onerror=function(o){r.onError("websocket error",o)}},ve.prototype.write=function(r){var o=this;this.writable=!1;for(var n=r.length,a=0,c=n;a<c;a++)(function(v){ah.encodePacket(v,o.supportsBinary,function(d){if(!o.usingBrowserWebSocket){var b={};if(v.options&&(b.compress=v.options.compress),o.perMessageDeflate){var p=typeof d=="string"?Buffer.byteLength(d):d.length;p<o.perMessageDeflate.threshold&&(b.compress=!1)}}try{o.usingBrowserWebSocket?o.ws.send(d):o.ws.send(d,b)}catch{hh("websocket closed before onclose event")}--n||f()})})(r[a]);function f(){o.emit("flush"),setTimeout(function(){o.writable=!0,o.emit("drain")},0)}},ve.prototype.onClose=function(){Hi.prototype.onClose.call(this)},ve.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},ve.prototype.uri=function(){var r=this.query||{},o=this.secure?"wss":"ws",n="";this.port&&(o==="wss"&&Number(this.port)!==443||o==="ws"&&Number(this.port)!==80)&&(n=":"+this.port),this.timestampRequests&&(r[this.timestampParam]=fh()),this.supportsBinary||(r.b64=1),r=uh.encode(r),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r},ve.prototype.check=function(){return!!Rn&&!("__initialize"in Rn&&this.name===ve.prototype.name)};var ph=Ii,dh=Zf,gh=th,yh=lh;Cr.polling=vh,Cr.websocket=yh;function vh(r){var o,n=!1,a=!1,c=r.jsonp!==!1;if(typeof location<"u"){var f=location.protocol==="https:",v=location.port;v||(v=f?443:80),n=r.hostname!==location.hostname||v!==r.port,a=r.secure!==f}if(r.xdomain=n,r.xscheme=a,o=new ph(r),"open"in o&&!r.forceJSONP)return new dh(r);if(!c)throw new Error("JSONP disabled");return new gh(r)}var mh=[].indexOf,Vs=function(r,o){if(mh)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},_h=Cr,wh=kn,Ft=qe("engine.io-client:socket"),bh=Vs,Zs=dn,Qs=xs,Ch=xn,Sh=_t;function _t(r,o){if(!(this instanceof _t))return new _t(r,o);o=o||{},r&&typeof r=="object"&&(o=r,r=null),r?(r=Qs(r),o.hostname=r.host,o.secure=r.protocol==="https"||r.protocol==="wss",o.port=r.port,r.query&&(o.query=r.query)):o.host&&(o.hostname=Qs(o.host).host),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.agent=o.agent||!1,this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=o.query||{},typeof this.query=="string"&&(this.query=Ch.decode(this.query)),this.upgrade=o.upgrade!==!1,this.path=(o.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!o.forceJSONP,this.jsonp=o.jsonp!==!1,this.forceBase64=!!o.forceBase64,this.enablesXDR=!!o.enablesXDR,this.withCredentials=o.withCredentials!==!1,this.timestampParam=o.timestampParam||"t",this.timestampRequests=o.timestampRequests,this.transports=o.transports||["polling","websocket"],this.transportOptions=o.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=o.policyPort||843,this.rememberUpgrade=o.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=o.onlyBinaryUpgrades,this.perMessageDeflate=o.perMessageDeflate!==!1?o.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=o.pfx||void 0,this.key=o.key||void 0,this.passphrase=o.passphrase||void 0,this.cert=o.cert||void 0,this.ca=o.ca||void 0,this.ciphers=o.ciphers||void 0,this.rejectUnauthorized=o.rejectUnauthorized===void 0?!0:o.rejectUnauthorized,this.forceNode=!!o.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(o.extraHeaders&&Object.keys(o.extraHeaders).length>0&&(this.extraHeaders=o.extraHeaders),o.localAddress&&(this.localAddress=o.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}_t.priorWebsocketSuccess=!1,wh(_t.prototype),_t.protocol=Zs.protocol,_t.Socket=_t,_t.Transport=Pi(),_t.transports=Cr,_t.parser=dn,_t.prototype.createTransport=function(r){Ft('creating transport "%s"',r);var o=kh(this.query);o.EIO=Zs.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var a=new _h[r]({query:o,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return a};function kh(r){var o={};for(var n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o}_t.prototype.open=function(){var r;if(this.rememberUpgrade&&_t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){var o=this;setTimeout(function(){o.emit("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)},_t.prototype.setTransport=function(r){Ft("setting transport %s",r.name);var o=this;this.transport&&(Ft("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=r,r.on("drain",function(){o.onDrain()}).on("packet",function(n){o.onPacket(n)}).on("error",function(n){o.onError(n)}).on("close",function(){o.onClose("transport close")})},_t.prototype.probe=function(r){Ft('probing transport "%s"',r);var o=this.createTransport(r,{probe:1}),n=!1,a=this;_t.priorWebsocketSuccess=!1;function c(){if(a.onlyBinaryUpgrades){var g=!this.supportsBinary&&a.transport.supportsBinary;n=n||g}n||(Ft('probe transport "%s" opened',r),o.send([{type:"ping",data:"probe"}]),o.once("packet",function(l){if(!n)if(l.type==="pong"&&l.data==="probe"){if(Ft('probe transport "%s" pong',r),a.upgrading=!0,a.emit("upgrading",o),!o)return;_t.priorWebsocketSuccess=o.name==="websocket",Ft('pausing current transport "%s"',a.transport.name),a.transport.pause(function(){n||a.readyState!=="closed"&&(Ft("changing transport and sending upgrade packet"),_(),a.setTransport(o),o.send([{type:"upgrade"}]),a.emit("upgrade",o),o=null,a.upgrading=!1,a.flush())})}else{Ft('probe transport "%s" failed',r);var u=new Error("probe error");u.transport=o.name,a.emit("upgradeError",u)}}))}function f(){n||(n=!0,_(),o.close(),o=null)}function v(g){var l=new Error("probe error: "+g);l.transport=o.name,f(),Ft('probe transport "%s" failed because of error: %s',r,g),a.emit("upgradeError",l)}function d(){v("transport closed")}function b(){v("socket closed")}function p(g){o&&g.name!==o.name&&(Ft('"%s" works - aborting "%s"',g.name,o.name),f())}function _(){o.removeListener("open",c),o.removeListener("error",v),o.removeListener("close",d),a.removeListener("close",b),a.removeListener("upgrading",p)}o.once("open",c),o.once("error",v),o.once("close",d),this.once("close",b),this.once("upgrading",p),o.open()},_t.prototype.onOpen=function(){if(Ft("socket open"),this.readyState="open",_t.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Ft("starting upgrade probes");for(var r=0,o=this.upgrades.length;r<o;r++)this.probe(this.upgrades[r])}},_t.prototype.onPacket=function(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Ft('socket receive: type "%s", data "%s"',r.type,r.data),this.emit("packet",r),this.emit("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var o=new Error("server error");o.code=r.data,this.onError(o);break;case"message":this.emit("data",r.data),this.emit("message",r.data);break}else Ft('packet received with socket readyState "%s"',this.readyState)},_t.prototype.onHandshake=function(r){this.emit("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},_t.prototype.onHeartbeat=function(r){clearTimeout(this.pingTimeoutTimer);var o=this;o.pingTimeoutTimer=setTimeout(function(){o.readyState!=="closed"&&o.onClose("ping timeout")},r||o.pingInterval+o.pingTimeout)},_t.prototype.setPing=function(){var r=this;clearTimeout(r.pingIntervalTimer),r.pingIntervalTimer=setTimeout(function(){Ft("writing ping packet - expecting pong within %sms",r.pingTimeout),r.ping(),r.onHeartbeat(r.pingTimeout)},r.pingInterval)},_t.prototype.ping=function(){var r=this;this.sendPacket("ping",function(){r.emit("ping")})},_t.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()},_t.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(Ft("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},_t.prototype.write=_t.prototype.send=function(r,o,n){return this.sendPacket("message",r,o,n),this},_t.prototype.sendPacket=function(r,o,n,a){if(typeof o=="function"&&(a=o,o=void 0),typeof n=="function"&&(a=n,n=null),!(this.readyState==="closing"||this.readyState==="closed")){n=n||{},n.compress=n.compress!==!1;var c={type:r,data:o,options:n};this.emit("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}},_t.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?a():o()}):this.upgrading?a():o()}function o(){r.onClose("forced close"),Ft("socket closing - telling transport to close"),r.transport.close()}function n(){r.removeListener("upgrade",n),r.removeListener("upgradeError",n),o()}function a(){r.once("upgrade",n),r.once("upgradeError",n)}return this},_t.prototype.onError=function(r){Ft("socket error %j",r),_t.priorWebsocketSuccess=!1,this.emit("error",r),this.onClose("transport error",r)},_t.prototype.onClose=function(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Ft('socket close with reason: "%s"',r);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",r,o),n.writeBuffer=[],n.prevBufferLen=0}},_t.prototype.filterUpgrades=function(r){for(var o=[],n=0,a=r.length;n<a;n++)~bh(this.transports,r[n])&&o.push(r[n]);return o},Ti.exports=Sh,Ti.exports.parser=dn;var Ah=Ti.exports,ta={exports:{}},xh=Eh;function Eh(r,o){var n=[];o=o||0;for(var a=o||0;a<r.length;a++)n[a-o]=r[a];return n}var ea=Th;function Th(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var na=[].slice,ra=function(r,o){if(typeof o=="string"&&(o=r[o]),typeof o!="function")throw new Error("bind() requires a function");var n=na.call(arguments,2);return function(){return o.apply(r,n.concat(na.call(arguments)))}};(function(r,o){var n=wr,a=kn,c=xh,f=ea,v=ra,d=qe("socket.io-client:socket"),b=xn,p=Bs;r.exports=l;var _={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},g=a.prototype.emit;function l(u,w,A){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},A&&A.query&&(this.query=A.query),this.io.autoConnect&&this.open()}a(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[f(u,"open",v(this,"onopen")),f(u,"packet",v(this,"onpacket")),f(u,"close",v(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},l.prototype.send=function(){var u=c(arguments);return u.unshift("message"),this.emit.apply(this,u),this},l.prototype.emit=function(u){if(_.hasOwnProperty(u))return g.apply(this,arguments),this;var w=c(arguments),A={type:(this.flags.binary!==void 0?this.flags.binary:p(w))?n.BINARY_EVENT:n.EVENT,data:w};return A.options={},A.options.compress=!this.flags||this.flags.compress!==!1,typeof w[w.length-1]=="function"&&(d("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),A.id=this.ids++),this.connected?this.packet(A):this.sendBuffer.push(A),this.flags={},this},l.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},l.prototype.onopen=function(){if(d("transport is open - connecting"),this.nsp!=="/")if(this.query){var u=typeof this.query=="object"?b.encode(this.query):this.query;d("sending connect packet with query %s",u),this.packet({type:n.CONNECT,query:u})}else this.packet({type:n.CONNECT})},l.prototype.onclose=function(u){d("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},l.prototype.onpacket=function(u){var w=u.nsp===this.nsp,A=u.type===n.ERROR&&u.nsp==="/";if(!(!w&&!A))switch(u.type){case n.CONNECT:this.onconnect();break;case n.EVENT:this.onevent(u);break;case n.BINARY_EVENT:this.onevent(u);break;case n.ACK:this.onack(u);break;case n.BINARY_ACK:this.onack(u);break;case n.DISCONNECT:this.ondisconnect();break;case n.ERROR:this.emit("error",u.data);break}},l.prototype.onevent=function(u){var w=u.data||[];d("emitting event %j",w),u.id!=null&&(d("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?g.apply(this,w):this.receiveBuffer.push(w)},l.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=c(arguments);d("sending ack %j",k),w.packet({type:p(k)?n.BINARY_ACK:n.ACK,id:u,data:k})}}},l.prototype.onack=function(u){var w=this.acks[u.id];typeof w=="function"?(d("calling ack %s with %j",u.id,u.data),w.apply(this,u.data),delete this.acks[u.id]):d("bad ack %s",u.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},l.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)g.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){d("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(d("performing disconnect (%s)",this.nsp),this.packet({type:n.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(u){return this.flags.compress=u,this},l.prototype.binary=function(u){return this.flags.binary=u,this}})(ta);var ia=ta.exports,Rh=On;function On(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}On.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),n=Math.floor(o*this.jitter*r);r=Math.floor(o*10)&1?r+n:r-n}return Math.min(r,this.max)|0},On.prototype.reset=function(){this.attempts=0},On.prototype.setMin=function(r){this.ms=r},On.prototype.setMax=function(r){this.max=r},On.prototype.setJitter=function(r){this.jitter=r};var Oh=Ah,Ih=ia,Nh=kn,Bh=wr,tn=ea,In=ra,Jt=qe("socket.io-client:manager"),oa=Vs,Lh=Rh,sa=Object.prototype.hasOwnProperty,aa=bt;function bt(r,o){if(!(this instanceof bt))return new bt(r,o);r&&typeof r=="object"&&(o=r,r=void 0),o=o||{},o.path=o.path||"/socket.io",this.nsps={},this.subs=[],this.opts=o,this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor(o.randomizationFactor||.5),this.backoff=new Lh({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this.readyState="closed",this.uri=r,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=o.parser||Bh;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=o.autoConnect!==!1,this.autoConnect&&this.open()}bt.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var r in this.nsps)sa.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)},bt.prototype.updateSocketIds=function(){for(var r in this.nsps)sa.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))},bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id},Nh(bt.prototype),bt.prototype.reconnection=function(r){return arguments.length?(this._reconnection=!!r,this):this._reconnection},bt.prototype.reconnectionAttempts=function(r){return arguments.length?(this._reconnectionAttempts=r,this):this._reconnectionAttempts},bt.prototype.reconnectionDelay=function(r){return arguments.length?(this._reconnectionDelay=r,this.backoff&&this.backoff.setMin(r),this):this._reconnectionDelay},bt.prototype.randomizationFactor=function(r){return arguments.length?(this._randomizationFactor=r,this.backoff&&this.backoff.setJitter(r),this):this._randomizationFactor},bt.prototype.reconnectionDelayMax=function(r){return arguments.length?(this._reconnectionDelayMax=r,this.backoff&&this.backoff.setMax(r),this):this._reconnectionDelayMax},bt.prototype.timeout=function(r){return arguments.length?(this._timeout=r,this):this._timeout},bt.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},bt.prototype.open=bt.prototype.connect=function(r,o){if(Jt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Jt("opening %s",this.uri),this.engine=Oh(this.uri,this.opts);var n=this.engine,a=this;this.readyState="opening",this.skipReconnect=!1;var c=tn(n,"open",function(){a.onopen(),r&&r()}),f=tn(n,"error",function(b){if(Jt("connect_error"),a.cleanup(),a.readyState="closed",a.emitAll("connect_error",b),r){var p=new Error("Connection error");p.data=b,r(p)}else a.maybeReconnectOnOpen()});if(this._timeout!==!1){var v=this._timeout;Jt("connect attempt will timeout after %d",v),v===0&&c.destroy();var d=setTimeout(function(){Jt("connect attempt timed out after %d",v),c.destroy(),n.close(),n.emit("error","timeout"),a.emitAll("connect_timeout",v)},v);this.subs.push({destroy:function(){clearTimeout(d)}})}return this.subs.push(c),this.subs.push(f),this},bt.prototype.onopen=function(){Jt("open"),this.cleanup(),this.readyState="open",this.emit("open");var r=this.engine;this.subs.push(tn(r,"data",In(this,"ondata"))),this.subs.push(tn(r,"ping",In(this,"onping"))),this.subs.push(tn(r,"pong",In(this,"onpong"))),this.subs.push(tn(r,"error",In(this,"onerror"))),this.subs.push(tn(r,"close",In(this,"onclose"))),this.subs.push(tn(this.decoder,"decoded",In(this,"ondecoded")))},bt.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},bt.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},bt.prototype.ondata=function(r){this.decoder.add(r)},bt.prototype.ondecoded=function(r){this.emit("packet",r)},bt.prototype.onerror=function(r){Jt("error",r),this.emitAll("error",r)},bt.prototype.socket=function(r,o){var n=this.nsps[r];if(!n){n=new Ih(this,r,o),this.nsps[r]=n;var a=this;n.on("connecting",c),n.on("connect",function(){n.id=a.generateId(r)}),this.autoConnect&&c()}function c(){~oa(a.connecting,n)||a.connecting.push(n)}return n},bt.prototype.destroy=function(r){var o=oa(this.connecting,r);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()},bt.prototype.packet=function(r){Jt("writing packet %j",r);var o=this;r.query&&r.type===0&&(r.nsp+="?"+r.query),o.encoding?o.packetBuffer.push(r):(o.encoding=!0,this.encoder.encode(r,function(n){for(var a=0;a<n.length;a++)o.engine.write(n[a],r.options);o.encoding=!1,o.processPacketQueue()}))},bt.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var r=this.packetBuffer.shift();this.packet(r)}},bt.prototype.cleanup=function(){Jt("cleanup");for(var r=this.subs.length,o=0;o<r;o++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},bt.prototype.close=bt.prototype.disconnect=function(){Jt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},bt.prototype.onclose=function(r){Jt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",r),this._reconnection&&!this.skipReconnect&&this.reconnect()},bt.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var r=this;if(this.backoff.attempts>=this._reconnectionAttempts)Jt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var o=this.backoff.duration();Jt("will wait %dms before reconnect attempt",o),this.reconnecting=!0;var n=setTimeout(function(){r.skipReconnect||(Jt("attempting reconnect"),r.emitAll("reconnect_attempt",r.backoff.attempts),r.emitAll("reconnecting",r.backoff.attempts),!r.skipReconnect&&r.open(function(a){a?(Jt("reconnect attempt error"),r.reconnecting=!1,r.reconnect(),r.emitAll("reconnect_error",a.data)):(Jt("reconnect success"),r.onreconnect())}))},o);this.subs.push({destroy:function(){clearTimeout(n)}})}},bt.prototype.onreconnect=function(){var r=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",r)},function(r,o){var n=df,a=wr,c=aa,f=qe("socket.io-client");r.exports=o=d;var v=o.managers={};function d(b,p){typeof b=="object"&&(p=b,b=void 0),p=p||{};var _=n(b),g=_.source,l=_.id,u=_.path,w=v[l]&&u in v[l].nsps,A=p.forceNew||p["force new connection"]||p.multiplex===!1||w,k;return A?(f("ignoring socket cache for %s",g),k=c(g,p)):(v[l]||(f("new io instance for %s",g),v[l]=c(g,p)),k=v[l]),_.query&&!p.query&&(p.query=_.query),k.socket(_.path,p)}o.protocol=a.protocol,o.connect=d,o.Manager=aa,o.Socket=ia}(bi,bi.exports);var Uh=bi.exports;const Dh=tf(Uh);function Ph(r){return!!r&&(typeof r=="object"||typeof r=="function")&&typeof r.then=="function"}function Fh(r,o){const n=o.map(c=>JSON.stringify(c)).join(" "),a=new Date().toISOString();return JSON.stringify({level:r,time:a,message:n})}function Mh(r){const o=r[0],n=r.slice(1);return{level:o,logs:n}}function qh(r,o){const n=JSON.parse(r);return o.forEach(a=>delete n[a]),n}const Wh={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},zi={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ie=console;class ua{constructor(o){Ht(this,"logToConsole"),Ht(this,"overloadGlobalConsole"),Ht(this,"namespace"),Ht(this,"socketEmitInterval"),Ht(this,"storageId"),Ht(this,"emitInProgress"),Ht(this,"queue"),Ht(this,"processing"),Ht(this,"interval"),Ht(this,"logIndex"),Ht(this,"socket"),Ht(this,"getItem"),Ht(this,"setItem"),Ht(this,"parseLog"),Ht(this,"_logMethod"),Ht(this,"_warnMethod"),Ht(this,"_errorMethod"),Ht(this,"_debugMethod");const{loggerOptions:n}=o;if(!n.namespace)throw new Error("Config property 'namespace' should be provided!");this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.namespace=n.namespace,this.socketEmitInterval=n.socketEmitInterval||zi.socketEmitInterval,this.logToConsole=n.logToConsole??zi.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole??zi.overloadGlobalConsole,this.storageId=this.getStorageName(n.namespace),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(o)}setupStorageFunctions(o,n,a){this.getItem=o&&typeof o=="function"?this.promisifyStorageFunction(o):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=a&&typeof a=="function"?a:Fh}promisifyStorageFunction(o){const n=o("");return Ph(n)?o:async(...a)=>new Promise((c,f)=>{try{const v=o(...a);c(v)}catch(v){f(v)}})}init(o){const{socket:n,url:a,socketOptions:c={}}=o;this._logMethod=ie.log.bind(ie),this._warnMethod=ie.warn.bind(ie),this._errorMethod=ie.error.bind(ie),this._debugMethod=ie.debug.bind(ie),this.initStorage().then(()=>{if(n)this.socket=n;else if(a)this.socket=this.createConnection(a,c);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(o,n={}){const a={...Wh,...n};return Dh(o,a)}async emitLogs(){if(!this.emitInProgress)try{const o=await this.getItem(this.storageId);if(!o)return;let n=[];this.emitInProgress=!0;const a=JSON.parse(o);let c=Object.keys(a);if(!c.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const d of c)await this.socket.emit("Log",a[d]),n.push(d);const f=await this.getItem(this.storageId);if(!f)return;const v=qh(f,n);await this.setItem(this.storageId,JSON.stringify(v))}catch(o){this._errorMethod(o)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){const o=this;ie=Object.assign(ie,{log:function(){o.log(...arguments)},warn:function(){o.warn(...arguments)},error:function(){o.error(...arguments)},debug:function(){o.debug(...arguments)}})}async initStorage(){const o=await this.getItem(this.storageId);(!o||typeof o!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(o="_LOGGER_"){return this.namespace.toString().toUpperCase()+o+Date.now()}async processLog(...o){try{if(o.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:a,logs:c}=Mh(o),f=JSON.parse(n),v=this.formItemKey(a);f[v]=this.parseLog(a,c),await this.setItem(this.storageId,JSON.stringify(f))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;this.processing=!0;const o=this.queue.shift();await this.processLog(...o).finally(()=>{this.processing=!1,this.processQueue()})}log(...o){const n=["INFO",...o];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ie,o),this.processQueue()}warn(...o){const n=["WARN",...o];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ie,o),this.processQueue()}error(...o){const n=["ERROR",...o];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ie,o),this.processQueue()}debug(...o){const n=["DEBUG",...o];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ie,o),this.processQueue()}async defaultGetItemFunction(o){return localStorage.getItem(o)}async defaultSetItemFunction(o,n){try{localStorage.setItem(o,n)}catch(a){this._errorMethod(a)}}formItemKey(o){const n=new Date().toISOString();return this.logIndex++,`${o}-${this.namespace}-${n}-${this.logIndex}`}}class Hh{constructor(o){St(this,"io");St(this,"storageLogger");this.eventsSdkClass=o,this.eventsSdkClass=o}init(){this.eventsSdkClass.options.useLogger&&(this.eventsSdkClass.options.loggerSocketConnection?this.io=this.eventsSdkClass.options.loggerSocketConnection:this.eventsSdkClass.socketIoClass.ioFunction&&(this.io=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),this.io?this.storageLogger=new ua({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new ua({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(o,n,...a){const c=[n,...a];this.storageLogger?o===$t.INFO?this.storageLogger.log(c):o===$t.ERROR&&this.storageLogger.error(c):o===$t.INFO?console.log(c):o===$t.ERROR&&console.error(c)}}class Kh{constructor(o){St(this,"listeners",{[ht.ALL_EXTENSION_STATUS]:[],[ht.ALL_DIALER_STATUS]:[],[ht.ALL_USERS_STATUS]:[],[ht.QUEUE_EVENT]:[],[ht.EXTENSION_EVENT]:[],[ht.DIALER_EVENT]:[],[ht.LOGIN_SUCCESS]:[],[ht.LOGIN_STATUS]:[],[ht.KEEP_ALIVE_RESPONSE]:[],[ht.ONLINE_STATUS_EVENT]:[],[ht.EXTENSIONS_UPDATED]:[]});St(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(a=>a!==n);else{const c=this.listeners[o].filter(f=>f!==n);this.listeners={...this.listeners,[o]:c}}}emit(o,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[o].forEach(c=>c({name:o,data:n}));const a={name:o,data:n};this.allListeners.forEach(c=>c(a))}}class zh{constructor(o){St(this,"argumentOptions");St(this,"options");St(this,"servers",[]);St(this,"URLList",[]);St(this,"server");St(this,"URL");St(this,"socket");St(this,"mainServer");St(this,"alreadyAttemptedOtherServers",[]);St(this,"authClass",new Kc(this));St(this,"socketIoClass",new Vc(this));St(this,"loggerClass",new Hh(this));St(this,"eventEmitterClass",new Kh(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...Xc,...o},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=zc.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...o}}on(o,n){this.eventEmitterClass.on(o,n)}emit(o,n){this.socketIoClass.io&&this.socketIoClass.io.emit(o,n)}connect(o){o===pn.MAIN&&this.findMainServer(),o===pn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((o,n)=>n.Priority>o.Priority?n:o),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),o.length&&(this.server=o.reduce((n,a)=>a.Priority>n.Priority?a:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),o.length&&(this.URL=o[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}Ut.CallStatusEnum=ms,Ut.CallTypeEnum=_s,Ut.DialerTypeEnum=ws,Ut.DirectionEnum=bs,Ut.DoNotCallMeStatusCodeEnum=Cs,Ut.EventsEnum=ht,Ut.ExtensionEventReasonEnum=Ss,Ut.ExtensionHangupCauseEnum=ks,Ut.QueueEventReasonEnum=As,Ut.default=zh,Object.defineProperties(Ut,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
43
|
+
`+nr+"}":"{"+te.join(",")+"}":"{}";return nt.pop(),He}};_.stringify=function($,Q,X){var rt,K,et,nt;if(typeof Q=="function"||typeof Q=="object"&&Q){if((nt=b.call(Q))==l)K=Q;else if(nt==k){et={};for(var Z,at=0,kt=Q.length;kt>at;Z=Q[at++],nt=b.call(Z),(nt==A||nt==w)&&(et[Z]=1));}}if(X)if((nt=b.call(X))==w){if((X-=X%1)>0)for(rt="",X>10&&(X=10);rt.length<X;rt+=" ");}else nt==A&&(rt=X.length<=10?X:X.slice(0,10));return G("",(Z={},Z[""]=$,Z),K,et,rt,"",[])}}if(!c("json-parse")){var F,pt,ct=String.fromCharCode,xt={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
|
|
44
|
+
`,102:"\f",114:"\r"},ut=function(){throw F=pt=null,SyntaxError()},Yt=function(){for(var $,Q,X,rt,K,et=pt,nt=et.length;nt>F;)switch(K=et.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return $=Y?et.charAt(F):et[F],F++,$;case 34:for($="@",F++;nt>F;)if(K=et.charCodeAt(F),32>K)ut();else if(K==92)switch(K=et.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:$+=xt[K],F++;break;case 117:for(Q=++F,X=F+4;X>F;F++)K=et.charCodeAt(F),K>=48&&57>=K||K>=97&&102>=K||K>=65&&70>=K||ut();$+=ct("0x"+et.slice(Q,F));break;default:ut()}else{if(K==34)break;for(K=et.charCodeAt(F),Q=F;K>=32&&K!=92&&K!=34;)K=et.charCodeAt(++F);$+=et.slice(Q,F)}if(et.charCodeAt(F)==34)return F++,$;ut();default:if(Q=F,K==45&&(rt=!0,K=et.charCodeAt(++F)),K>=48&&57>=K){for(K==48&&(K=et.charCodeAt(F+1),K>=48&&57>=K)&&ut(),rt=!1;nt>F&&(K=et.charCodeAt(F),K>=48&&57>=K);F++);if(et.charCodeAt(F)==46){for(X=++F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ut(),F=X}if(K=et.charCodeAt(F),K==101||K==69){for(K=et.charCodeAt(++F),(K==43||K==45)&&F++,X=F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ut(),F=X}return+et.slice(Q,F)}if(rt&&ut(),et.slice(F,F+4)=="true")return F+=4,!0;if(et.slice(F,F+5)=="false")return F+=5,!1;if(et.slice(F,F+4)=="null")return F+=4,null;ut()}return"$"},Le=function($){var Q,X;if($=="$"&&ut(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=Yt(),$!="]";X||(X=!0))X&&($==","?($=Yt(),$=="]"&&ut()):ut()),$==","&&ut(),Q.push(Le($));return Q}if($=="{"){for(Q={};$=Yt(),$!="}";X||(X=!0))X&&($==","?($=Yt(),$=="}"&&ut()):ut()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||Yt()!=":")&&ut(),Q[$.slice(1)]=Le(Yt());return Q}ut()}return $},fe=function($,Q,X){var rt=Nr($,Q,X);rt===d?delete $[Q]:$[Q]=rt},Nr=function($,Q,X){var rt,K=$[Q];if(typeof K=="object"&&K)if(b.call(K)==k)for(rt=K.length;rt--;)fe(K,rt,X);else v(K,function(et){fe(K,et,X)});return X.call($,Q,K)};_.parse=function($,Q){var X,rt;return F=0,pt=""+$,X=Le(Yt()),Yt()!="$"&&ut(),F=pt=null,Q&&b.call(Q)==l?Nr((rt={},rt[""]=X,rt),"",Q):X}}}})(this)},{}],48:[function(r,o){function n(a,c){var f=[];c=c||0;for(var v=c||0;v<a.length;v++)f[v-c]=a[v];return f}o.exports=n},{}]},{},[1])(1)}const Yu=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:ju},Symbol.toStringTag,{value:"Module"}))}),Vu=/v\d+_\d+_\d+/;function Zu(r){return typeof r=="function"}const Ci=Object.entries(Yu).reduce((r,o)=>{var c;const n=o[1].default,a=(c=o[0].match(Vu))==null?void 0:c[0];return Zu(n)&&a&&(r[a]=n()),r},{}),_s=r=>{if(r in Ci)return Ci[r];throw new Error(`Socket version ${r} not found`)},Qu={...Ci,getSocketVersion:_s,makeSocketVersion:(r,...o)=>_s(r)(...o)};var ws=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(ws||{}),bs=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(bs||{}),Cs=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(Cs||{}),Ss=(r=>(r.INCOMINC="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2Call",r))(Ss||{}),ks=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(ks||{}),ht=(r=>(r.ALL_DIALER_STATUS="AllDialersStatus",r.ALL_EXTENSION_STATUS="AllExtensionsStatus",r.ALL_USERS_STATUS="AllUsersStatus",r.CONNECT="connect",r.DISCONNECT="disconnect",r.CONNECT_ERROR_EVENT="connect_error",r.EXTENSION_EVENT="ExtensionEvent",r.KEEP_ALIVE="keepalive",r.KEEP_ALIVE_RESPONSE="keepaliveResponse",r.LOGIN_STATUS="loginStatus",r.LOGIN_SUCCESS="loginSuccess",r.QUEUE_EVENT="QueueEvent",r.ONLINE_STATUS_EVENT="onlineStatusEvent",r.DIALER_EVENT="DialerEvent",r.EXTENSIONS_UPDATED="ExtensionsUpdated",r))(ht||{}),As=(r=>(r.NEWCALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(As||{}),xs=(r=>(r.NORMAL_HANGUP="Normal hangup",r.USER_BUSY="User busy",r.CALL_REJECTED="Call Rejected",r.UNALLOCATED_NUMBER="Unallocated (unassigned) number",r.UNKNOWN="Unknown",r.NO_USER_RESPONDING="No user responding",r.USER_ALERTING="User alerting, no answer",r.ANSWERED_ELSEWHERE="Answered elsewhere",r))(xs||{}),Es=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(Es||{});class tf{constructor(o){St(this,"io");St(this,"ioFunction");St(this,"lastEventTimestamp",new Date().getTime());St(this,"doReconnect",!0);St(this,"keepAliveInterval");St(this,"keepReconnectInterval");St(this,"connected",!1);this.eventsSdkClass=o,this.eventsSdkClass=o}getSocketIoFunction(o){const n=o.split("v="),a="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Qu.getSocketVersion(a)}initSocketConnection(){const o=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,a=this.eventsSdkClass.server;try{const c=a?a.Domain:this.eventsSdkClass.URL,f=a?`${n}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Jt.INFO,"Connecting to..",f),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f});const v={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:o},timeout:this.eventsSdkClass.options.timeout};if(o&&(v.query={token:o}),this.ioFunction&&f)this.io=this.ioFunction(f,v);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log(Jt.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(ht.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_SUCCESS,o)).on(ht.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.QUEUE_EVENT,o)).on(ht.EXTENSION_EVENT,o=>{o=o.data.currentCall?this.configureExtensionUTC(o):o,this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSION_EVENT,o)}).on(ht.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.DIALER_EVENT,o)).on(ht.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_STATUS,o)).on(ht.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_EXTENSION_STATUS,o)).on(ht.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_DIALER_STATUS,o)).on(ht.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(ht.CONNECT,()=>this.onConnect()).on(ht.DISCONNECT,o=>this.onDisconnect(o)).on(ht.CONNECT_ERROR_EVENT,o=>this.onConnectError(o)).on(ht.EXTENSIONS_UPDATED,o=>{this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSIONS_UPDATED,o)})}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io){this.eventsSdkClass.emit(ht.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Jt.INFO,`EMIT -> ${ht.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var o;this.io&&(this.io.close(),(o=this.io)==null||o.disconnect(),this.io=void 0),jn.clearSessionStorage()}onKeepAliveResponse(o){if(this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.KEEP_ALIVE_RESPONSE),o.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(dn.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(Jt.ERROR,ht.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(dn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}configureExtensionUTC(o){const{servertime:n,servertimeoffset:a,data:{currentCall:c}}=o;if(!c)return o;const f=(n-a*60)*1e3,v=Date.now()-f;return{...o,data:{...o.data,currentCall:{...c,callStartedUTC:(c.callStarted-a*60)*1e3,callStartedUTCClient:(c.callStarted-a*60)*1e3+v,callAnsweredUTC:(c.callAnswered-a*60)*1e3,callAnsweredUTCClient:(c.callAnswered-a*60)*1e3+v}}}}}var ef=Object.defineProperty,nf=(r,o,n)=>o in r?ef(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Ht=(r,o,n)=>(nf(r,typeof o!="symbol"?o+"":o,n),n);function rf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function of(r){if(r.__esModule)return r;var o=r.default;if(typeof o=="function"){var n=function a(){return this instanceof a?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};n.prototype=o.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var c=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:function(){return r[a]}})}),n}var Si={exports:{}},sf=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,af=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],Ts=function(r){var o=r,n=r.indexOf("["),a=r.indexOf("]");n!=-1&&a!=-1&&(r=r.substring(0,n)+r.substring(n,a).replace(/:/g,";")+r.substring(a,r.length));for(var c=sf.exec(r||""),f={},v=14;v--;)f[af[v]]=c[v]||"";return n!=-1&&a!=-1&&(f.source=o,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=cf(f,f.path),f.queryKey=uf(f,f.query),f};function cf(r,o){var n=/\/{2,9}/g,a=o.replace(n,"/").split("/");return(o.substr(0,1)=="/"||o.length===0)&&a.splice(0,1),o.substr(o.length-1,1)=="/"&&a.splice(a.length-1,1),a}function uf(r,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,c,f){c&&(n[c]=f)}),n}var ki={exports:{}},Ai={exports:{}},Yn=1e3,Vn=Yn*60,Zn=Vn*60,Qn=Zn*24,ff=Qn*365.25,hf=function(r,o){o=o||{};var n=typeof r;if(n==="string"&&r.length>0)return lf(r);if(n==="number"&&isNaN(r)===!1)return o.long?df(r):pf(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function lf(r){if(r=String(r),!(r.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var n=parseFloat(o[1]),a=(o[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return n*ff;case"days":case"day":case"d":return n*Qn;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Zn;case"minutes":case"minute":case"mins":case"min":case"m":return n*Vn;case"seconds":case"second":case"secs":case"sec":case"s":return n*Yn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function pf(r){return r>=Qn?Math.round(r/Qn)+"d":r>=Zn?Math.round(r/Zn)+"h":r>=Vn?Math.round(r/Vn)+"m":r>=Yn?Math.round(r/Yn)+"s":r+"ms"}function df(r){return wr(r,Qn,"day")||wr(r,Zn,"hour")||wr(r,Vn,"minute")||wr(r,Yn,"second")||r+" ms"}function wr(r,o,n){if(!(r<o))return r<o*1.5?Math.floor(r/o)+" "+n:Math.ceil(r/o)+" "+n+"s"}(function(r,o){o=r.exports=a.debug=a.default=a,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=hf,o.instances=[],o.names=[],o.skips=[],o.formatters={};function n(p){var _=0,g;for(g in p)_=(_<<5)-_+p.charCodeAt(g),_|=0;return o.colors[Math.abs(_)%o.colors.length]}function a(p){var _;function g(){if(g.enabled){var l=g,u=+new Date,w=u-(_||u);l.diff=w,l.prev=_,l.curr=u,_=u;for(var A=new Array(arguments.length),k=0;k<A.length;k++)A[k]=arguments[k];A[0]=o.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");var L=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,function(J,N){if(J==="%%")return J;L++;var U=o.formatters[N];if(typeof U=="function"){var T=A[L];J=U.call(l,T),A.splice(L,1),L--}return J}),o.formatArgs.call(l,A);var Y=g.log||o.log||console.log.bind(console);Y.apply(l,A)}}return g.namespace=p,g.enabled=o.enabled(p),g.useColors=o.useColors(),g.color=n(p),g.destroy=c,typeof o.init=="function"&&o.init(g),o.instances.push(g),g}function c(){var p=o.instances.indexOf(this);return p!==-1?(o.instances.splice(p,1),!0):!1}function f(p){o.save(p),o.names=[],o.skips=[];var _,g=(typeof p=="string"?p:"").split(/[\s,]+/),l=g.length;for(_=0;_<l;_++)g[_]&&(p=g[_].replace(/\*/g,".*?"),p[0]==="-"?o.skips.push(new RegExp("^"+p.substr(1)+"$")):o.names.push(new RegExp("^"+p+"$")));for(_=0;_<o.instances.length;_++){var u=o.instances[_];u.enabled=o.enabled(u.namespace)}}function v(){o.enable("")}function d(p){if(p[p.length-1]==="*")return!0;var _,g;for(_=0,g=o.skips.length;_<g;_++)if(o.skips[_].test(p))return!1;for(_=0,g=o.names.length;_<g;_++)if(o.names[_].test(p))return!0;return!1}function b(p){return p instanceof Error?p.stack||p.message:p}})(Ai,Ai.exports);var gf=Ai.exports;(function(r,o){o=r.exports=gf,o.log=c,o.formatArgs=a,o.save=f,o.load=v,o.useColors=n,o.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o.formatters.j=function(b){try{return JSON.stringify(b)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}};function a(b){var p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+o.humanize(this.diff),!!p){var _="color: "+this.color;b.splice(1,0,_,"color: inherit");var g=0,l=0;b[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function f(b){try{b==null?o.storage.removeItem("debug"):o.storage.debug=b}catch{}}function v(){var b;try{b=o.storage.debug}catch{}return!b&&typeof process<"u"&&"env"in process&&(b=process.env.DEBUG),b}o.enable(v());function d(){try{return window.localStorage}catch{}}})(ki,ki.exports);var We=ki.exports,yf=Ts,Rs=We("socket.io-client:url"),vf=mf;function mf(r,o){var n=r;o=o||typeof location<"u"&&location,r==null&&(r=o.protocol+"//"+o.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=o.protocol+r:r=o.host+r),/^(https?|wss?):\/\//.test(r)||(Rs("protocol-less url %s",r),typeof o<"u"?r=o.protocol+"//"+r:r="https://"+r),Rs("parse %s",r),n=yf(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var a=n.host.indexOf(":")!==-1,c=a?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port,n.href=n.protocol+"://"+c+(o&&o.port===n.port?"":":"+n.port),n}var br={},Os={exports:{}};(function(r){r.exports=o;function o(a){if(a)return n(a)}function n(a){for(var c in o.prototype)a[c]=o.prototype[c];return a}o.prototype.on=o.prototype.addEventListener=function(a,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(c),this},o.prototype.once=function(a,c){function f(){this.off(a,f),c.apply(this,arguments)}return f.fn=c,this.on(a,f),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(a,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var f=this._callbacks["$"+a];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var v,d=0;d<f.length;d++)if(v=f[d],v===c||v.fn===c){f.splice(d,1);break}return f.length===0&&delete this._callbacks["$"+a],this},o.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),f=this._callbacks["$"+a],v=1;v<arguments.length;v++)c[v-1]=arguments[v];if(f){f=f.slice(0);for(var v=0,d=f.length;v<d;++v)f[v].apply(this,c)}return this},o.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},o.prototype.hasListeners=function(a){return!!this.listeners(a).length}})(Os);var An=Os.exports,Cr={},_f={}.toString,xi=Array.isArray||function(r){return _f.call(r)=="[object Array]"},Is=Sf,wf=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",bf=typeof ArrayBuffer=="function",Cf=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function Sf(r){return wf&&Buffer.isBuffer(r)||bf&&(r instanceof ArrayBuffer||Cf(r))}var Ei=xi,Ns=Is,Bs=Object.prototype.toString,kf=typeof Blob=="function"||typeof Blob<"u"&&Bs.call(Blob)==="[object BlobConstructor]",Af=typeof File=="function"||typeof File<"u"&&Bs.call(File)==="[object FileConstructor]";Cr.deconstructPacket=function(r){var o=[],n=r.data,a=r;return a.data=Ti(n,o),a.attachments=o.length,{packet:a,buffers:o}};function Ti(r,o){if(!r)return r;if(Ns(r)){var n={_placeholder:!0,num:o.length};return o.push(r),n}else if(Ei(r)){for(var a=new Array(r.length),c=0;c<r.length;c++)a[c]=Ti(r[c],o);return a}else if(typeof r=="object"&&!(r instanceof Date)){var a={};for(var f in r)a[f]=Ti(r[f],o);return a}return r}Cr.reconstructPacket=function(r,o){return r.data=Ri(r.data,o),r.attachments=void 0,r};function Ri(r,o){if(!r)return r;if(r&&r._placeholder===!0){var n=typeof r.num=="number"&&r.num>=0&&r.num<o.length;if(n)return o[r.num];throw new Error("illegal attachments")}else if(Ei(r))for(var a=0;a<r.length;a++)r[a]=Ri(r[a],o);else if(typeof r=="object")for(var c in r)r[c]=Ri(r[c],o);return r}Cr.removeBlobs=function(r,o){function n(f,v,d){if(!f)return f;if(kf&&f instanceof Blob||Af&&f instanceof File){a++;var b=new FileReader;b.onload=function(){d?d[v]=this.result:c=this.result,--a||o(c)},b.readAsArrayBuffer(f)}else if(Ei(f))for(var p=0;p<f.length;p++)n(f[p],p,f);else if(typeof f=="object"&&!Ns(f))for(var _ in f)n(f[_],_,f)}var a=0,c=r;n(c),a||o(c)},function(r){var o=We("socket.io-parser"),n=An,a=Cr,c=xi,f=Is;r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],r.CONNECT=0,r.DISCONNECT=1,r.EVENT=2,r.ACK=3,r.ERROR=4,r.BINARY_EVENT=5,r.BINARY_ACK=6,r.Encoder=v,r.Decoder=g;function v(){}var d=r.ERROR+'"encode error"';v.prototype.encode=function(k,L){if(o("encoding packet %j",k),r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)_(k,L);else{var Y=b(k);L([Y])}};function b(k){var L=""+k.type;if((r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)&&(L+=k.attachments+"-"),k.nsp&&k.nsp!=="/"&&(L+=k.nsp+","),k.id!=null&&(L+=k.id),k.data!=null){var Y=p(k.data);if(Y!==!1)L+=Y;else return d}return o("encoded %j as %s",k,L),L}function p(k){try{return JSON.stringify(k)}catch{return!1}}function _(k,L){function Y(J){var N=a.deconstructPacket(J),U=b(N.packet),T=N.buffers;T.unshift(U),L(T)}a.removeBlobs(k,Y)}function g(){this.reconstructor=null}n(g.prototype),g.prototype.add=function(k){var L;if(typeof k=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");L=l(k),r.BINARY_EVENT===L.type||r.BINARY_ACK===L.type?(this.reconstructor=new w(L),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",L)):this.emit("decoded",L)}else if(f(k)||k.base64)if(this.reconstructor)L=this.reconstructor.takeBinaryData(k),L&&(this.reconstructor=null,this.emit("decoded",L));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+k)};function l(k){var L=0,Y={type:Number(k.charAt(0))};if(r.types[Y.type]==null)return A("unknown packet type "+Y.type);if(r.BINARY_EVENT===Y.type||r.BINARY_ACK===Y.type){for(var J=L+1;k.charAt(++L)!=="-"&&L!=k.length;);var N=k.substring(J,L);if(N!=Number(N)||k.charAt(L)!=="-")throw new Error("Illegal attachments");Y.attachments=Number(N)}if(k.charAt(L+1)==="/"){for(var J=L+1;++L;){var U=k.charAt(L);if(U===","||L===k.length)break}Y.nsp=k.substring(J,L)}else Y.nsp="/";var T=k.charAt(L+1);if(T!==""&&Number(T)==T){for(var J=L+1;++L;){var U=k.charAt(L);if(U==null||Number(U)!=U){--L;break}if(L===k.length)break}Y.id=Number(k.substring(J,L+1))}if(k.charAt(++L)){var I=u(k.substr(L)),P=I!==!1&&(Y.type===r.ERROR||c(I));if(P)Y.data=I;else return A("invalid payload")}return o("decoded %s as %j",k,Y),Y}function u(k){try{return JSON.parse(k)}catch{return!1}}g.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function w(k){this.reconPack=k,this.buffers=[]}w.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length===this.reconPack.attachments){var L=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),L}return null},w.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function A(k){return{type:r.ERROR,data:"parser error: "+k}}}(br);var Oi={exports:{}},Sr={},Ii={exports:{}};try{Ii.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Ii.exports=!1}var xf=Ii.exports,Ni=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),Ef=xf,Tf=Ni,Bi=function(r){var o=r.xdomain,n=r.xscheme,a=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||Ef))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&a)return new XDomainRequest}catch{}if(!o)try{return new Tf[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},Li={exports:{}},gn={},Rf=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var a in r)n.call(r,a)&&o.push(a);return o},Of=xi,Ls=Object.prototype.toString,If=typeof Blob=="function"||typeof Blob<"u"&&Ls.call(Blob)==="[object BlobConstructor]",Nf=typeof File=="function"||typeof File<"u"&&Ls.call(File)==="[object FileConstructor]",Us=kr;function kr(r){if(!r||typeof r!="object")return!1;if(Of(r)){for(var o=0,n=r.length;o<n;o++)if(kr(r[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(r)||typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||If&&r instanceof Blob||Nf&&r instanceof File)return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return kr(r.toJSON(),!0);for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&kr(r[a]))return!0;return!1}var Bf=function(r,o,n){var a=r.byteLength;if(o=o||0,n=n||a,r.slice)return r.slice(o,n);if(o<0&&(o+=a),n<0&&(n+=a),n>a&&(n=a),o>=a||o>=n||a===0)return new ArrayBuffer(0);for(var c=new Uint8Array(r),f=new Uint8Array(n-o),v=o,d=0;v<n;v++,d++)f[d]=c[v];return f.buffer},Lf=Uf;function Uf(r,o,n){var a=!1;return n=n||Df,c.count=r,r===0?o():c;function c(f,v){if(c.count<=0)throw new Error("after called too many times");--c.count,f?(a=!0,o(f),o=n):c.count===0&&!a&&o(null,v)}}function Df(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Ze=String.fromCharCode;function Ds(r){for(var o=[],n=0,a=r.length,c,f;n<a;)c=r.charCodeAt(n++),c>=55296&&c<=56319&&n<a?(f=r.charCodeAt(n++),(f&64512)==56320?o.push(((c&1023)<<10)+(f&1023)+65536):(o.push(c),n--)):o.push(c);return o}function Pf(r){for(var o=r.length,n=-1,a,c="";++n<o;)a=r[n],a>65535&&(a-=65536,c+=Ze(a>>>10&1023|55296),a=56320|a&1023),c+=Ze(a);return c}function Ps(r,o){if(r>=55296&&r<=57343){if(o)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Ui(r,o){return Ze(r>>o&63|128)}function Ff(r,o){if(!(r&4294967168))return Ze(r);var n="";return r&4294965248?r&4294901760?r&4292870144||(n=Ze(r>>18&7|240),n+=Ui(r,12),n+=Ui(r,6)):(Ps(r,o)||(r=65533),n=Ze(r>>12&15|224),n+=Ui(r,6)):n=Ze(r>>6&31|192),n+=Ze(r&63|128),n}function Mf(r,o){o=o||{};for(var n=o.strict!==!1,a=Ds(r),c=a.length,f=-1,v,d="";++f<c;)v=a[f],d+=Ff(v,n);return d}function xn(){if(Qe>=xr)throw Error("Invalid byte index");var r=Ar[Qe]&255;if(Qe++,(r&192)==128)return r&63;throw Error("Invalid continuation byte")}function qf(r){var o,n,a,c,f;if(Qe>xr)throw Error("Invalid byte index");if(Qe==xr)return!1;if(o=Ar[Qe]&255,Qe++,!(o&128))return o;if((o&224)==192){if(n=xn(),f=(o&31)<<6|n,f>=128)return f;throw Error("Invalid continuation byte")}if((o&240)==224){if(n=xn(),a=xn(),f=(o&15)<<12|n<<6|a,f>=2048)return Ps(f,r)?f:65533;throw Error("Invalid continuation byte")}if((o&248)==240&&(n=xn(),a=xn(),c=xn(),f=(o&7)<<18|n<<12|a<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}var Ar,xr,Qe;function Wf(r,o){o=o||{};var n=o.strict!==!1;Ar=Ds(r),xr=Ar.length,Qe=0;for(var a=[],c;(c=qf(n))!==!1;)a.push(c);return Pf(a)}var Hf={version:"2.1.2",encode:Mf,decode:Wf},Di={},Fs;function Kf(){return Fs||(Fs=1,function(r){Di.encode=function(o){var n=new Uint8Array(o),a,c=n.length,f="";for(a=0;a<c;a+=3)f+=r[n[a]>>2],f+=r[(n[a]&3)<<4|n[a+1]>>4],f+=r[(n[a+1]&15)<<2|n[a+2]>>6],f+=r[n[a+2]&63];return c%3===2?f=f.substring(0,f.length-1)+"=":c%3===1&&(f=f.substring(0,f.length-2)+"=="),f},Di.decode=function(o){var n=o.length*.75,a=o.length,c,f=0,v,d,b,p;o[o.length-1]==="="&&(n--,o[o.length-2]==="="&&n--);var _=new ArrayBuffer(n),g=new Uint8Array(_);for(c=0;c<a;c+=4)v=r.indexOf(o[c]),d=r.indexOf(o[c+1]),b=r.indexOf(o[c+2]),p=r.indexOf(o[c+3]),g[f++]=v<<2|d>>4,g[f++]=(d&15)<<4|b>>2,g[f++]=(b&3)<<6|p&63;return _}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),Di}var Pi,Ms;function zf(){if(Ms)return Pi;Ms=1;var r=typeof r<"u"?r:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,o=function(){try{var d=new Blob(["hi"]);return d.size===2}catch{return!1}}(),n=o&&function(){try{var d=new Blob([new Uint8Array([1,2])]);return d.size===2}catch{return!1}}(),a=r&&r.prototype.append&&r.prototype.getBlob;function c(d){return d.map(function(b){if(b.buffer instanceof ArrayBuffer){var p=b.buffer;if(b.byteLength!==p.byteLength){var _=new Uint8Array(b.byteLength);_.set(new Uint8Array(p,b.byteOffset,b.byteLength)),p=_.buffer}return p}return b})}function f(d,b){b=b||{};var p=new r;return c(d).forEach(function(_){p.append(_)}),b.type?p.getBlob(b.type):p.getBlob()}function v(d,b){return new Blob(c(d),b||{})}return typeof Blob<"u"&&(f.prototype=Blob.prototype,v.prototype=Blob.prototype),Pi=function(){return o?n?Blob:v:a?f:void 0}(),Pi}(function(r){var o=Rf,n=Us,a=Bf,c=Lf,f=Hf,v;typeof ArrayBuffer<"u"&&(v=Kf());var d=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),b=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),p=d||b;r.protocol=3;var _=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=o(_),l={type:"error",data:"parser error"},u=zf();r.encodePacket=function(N,U,T,I){typeof U=="function"&&(I=U,U=!1),typeof T=="function"&&(I=T,T=null);var P=N.data===void 0?void 0:N.data.buffer||N.data;if(typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer)return A(N,U,I);if(typeof u<"u"&&P instanceof u)return L(N,U,I);if(P&&P.base64)return w(N,I);var R=_[N.type];return N.data!==void 0&&(R+=T?f.encode(String(N.data),{strict:!1}):String(N.data)),I(""+R)};function w(N,U){var T="b"+r.packets[N.type]+N.data.data;return U(T)}function A(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=N.data,P=new Uint8Array(I),R=new Uint8Array(1+I.byteLength);R[0]=_[N.type];for(var B=0;B<P.length;B++)R[B+1]=P[B];return T(R.buffer)}function k(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=new FileReader;return I.onload=function(){r.encodePacket({type:N.type,data:I.result},U,!0,T)},I.readAsArrayBuffer(N.data)}function L(N,U,T){if(!U)return r.encodeBase64Packet(N,T);if(p)return k(N,U,T);var I=new Uint8Array(1);I[0]=_[N.type];var P=new u([I.buffer,N.data]);return T(P)}r.encodeBase64Packet=function(N,U){var T="b"+r.packets[N.type];if(typeof u<"u"&&N.data instanceof u){var I=new FileReader;return I.onload=function(){var z=I.result.split(",")[1];U(T+z)},I.readAsDataURL(N.data)}var P;try{P=String.fromCharCode.apply(null,new Uint8Array(N.data))}catch{for(var R=new Uint8Array(N.data),B=new Array(R.length),H=0;H<R.length;H++)B[H]=R[H];P=String.fromCharCode.apply(null,B)}return T+=btoa(P),U(T)},r.decodePacket=function(N,U,T){if(N===void 0)return l;if(typeof N=="string"){if(N.charAt(0)==="b")return r.decodeBase64Packet(N.substr(1),U);if(T&&(N=Y(N),N===!1))return l;var P=N.charAt(0);return Number(P)!=P||!g[P]?l:N.length>1?{type:g[P],data:N.substring(1)}:{type:g[P]}}var I=new Uint8Array(N),P=I[0],R=a(N,1);return u&&U==="blob"&&(R=new u([R])),{type:g[P],data:R}};function Y(N){try{N=f.decode(N,{strict:!1})}catch{return!1}return N}r.decodeBase64Packet=function(N,U){var T=g[N.charAt(0)];if(!v)return{type:T,data:{base64:!0,data:N.substr(1)}};var I=v.decode(N.substr(1));return U==="blob"&&u&&(I=new u([I])),{type:T,data:I}},r.encodePayload=function(N,U,T){typeof U=="function"&&(T=U,U=null);var I=n(N);if(U&&I)return u&&!p?r.encodePayloadAsBlob(N,T):r.encodePayloadAsArrayBuffer(N,T);if(!N.length)return T("0:");function P(B){return B.length+":"+B}function R(B,H){r.encodePacket(B,I?U:!1,!1,function(z){H(null,P(z))})}J(N,R,function(B,H){return T(H.join(""))})};function J(N,U,T){for(var I=new Array(N.length),P=c(N.length,T),R=function(H,z,G){U(z,function(F,pt){I[H]=pt,G(F,I)})},B=0;B<N.length;B++)R(B,N[B],P)}r.decodePayload=function(N,U,T){if(typeof N!="string")return r.decodePayloadAsBinary(N,U,T);typeof U=="function"&&(T=U,U=null);var I;if(N==="")return T(l,0,1);for(var P="",R,B,H=0,z=N.length;H<z;H++){var G=N.charAt(H);if(G!==":"){P+=G;continue}if(P===""||P!=(R=Number(P))||(B=N.substr(H+1,R),P!=B.length))return T(l,0,1);if(B.length){if(I=r.decodePacket(B,U,!1),l.type===I.type&&l.data===I.data)return T(l,0,1);var F=T(I,H+R,z);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},r.encodePayloadAsArrayBuffer=function(N,U){if(!N.length)return U(new ArrayBuffer(0));function T(I,P){r.encodePacket(I,!0,!0,function(R){return P(null,R)})}J(N,T,function(I,P){var R=P.reduce(function(z,G){var F;return typeof G=="string"?F=G.length:F=G.byteLength,z+F.toString().length+F+2},0),B=new Uint8Array(R),H=0;return P.forEach(function(z){var G=typeof z=="string",F=z;if(G){for(var pt=new Uint8Array(z.length),ct=0;ct<z.length;ct++)pt[ct]=z.charCodeAt(ct);F=pt.buffer}G?B[H++]=0:B[H++]=1;for(var xt=F.byteLength.toString(),ct=0;ct<xt.length;ct++)B[H++]=parseInt(xt[ct]);B[H++]=255;for(var pt=new Uint8Array(F),ct=0;ct<pt.length;ct++)B[H++]=pt[ct]}),U(B.buffer)})},r.encodePayloadAsBlob=function(N,U){function T(I,P){r.encodePacket(I,!0,!0,function(R){var B=new Uint8Array(1);if(B[0]=1,typeof R=="string"){for(var H=new Uint8Array(R.length),z=0;z<R.length;z++)H[z]=R.charCodeAt(z);R=H.buffer,B[0]=0}for(var G=R instanceof ArrayBuffer?R.byteLength:R.size,F=G.toString(),pt=new Uint8Array(F.length+1),z=0;z<F.length;z++)pt[z]=parseInt(F[z]);if(pt[F.length]=255,u){var ct=new u([B.buffer,pt.buffer,R]);P(null,ct)}})}J(N,T,function(I,P){return U(new u(P))})},r.decodePayloadAsBinary=function(N,U,T){typeof U=="function"&&(T=U,U=null);for(var I=N,P=[];I.byteLength>0;){for(var R=new Uint8Array(I),B=R[0]===0,H="",z=1;R[z]!==255;z++){if(H.length>310)return T(l,0,1);H+=R[z]}I=a(I,2+H.length),H=parseInt(H);var G=a(I,0,H);if(B)try{G=String.fromCharCode.apply(null,new Uint8Array(G))}catch{var F=new Uint8Array(G);G="";for(var z=0;z<F.length;z++)G+=String.fromCharCode(F[z])}P.push(G),I=a(I,H)}var pt=P.length;P.forEach(function(ct,xt){T(r.decodePacket(ct,U,!0),xt,pt)})}})(gn);var Fi,qs;function Mi(){if(qs)return Fi;qs=1;var r=gn,o=An;Fi=n;function n(a){this.path=a.path,this.hostname=a.hostname,this.port=a.port,this.secure=a.secure,this.query=a.query,this.timestampParam=a.timestampParam,this.timestampRequests=a.timestampRequests,this.readyState="",this.agent=a.agent||!1,this.socket=a.socket,this.enablesXDR=a.enablesXDR,this.withCredentials=a.withCredentials,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.forceNode=a.forceNode,this.isReactNative=a.isReactNative,this.extraHeaders=a.extraHeaders,this.localAddress=a.localAddress}return o(n.prototype),n.prototype.onError=function(a,c){var f=new Error(a);return f.type="TransportError",f.description=c,this.emit("error",f),this},n.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(a){if(this.readyState==="open")this.write(a);else throw new Error("Transport not open")},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(a){var c=r.decodePacket(a,this.socket.binaryType);this.onPacket(c)},n.prototype.onPacket=function(a){this.emit("packet",a)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Fi}var En={};En.encode=function(r){var o="";for(var n in r)r.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return o},En.decode=function(r){for(var o={},n=r.split("&"),a=0,c=n.length;a<c;a++){var f=n[a].split("=");o[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return o};var Er=function(r,o){var n=function(){};n.prototype=o.prototype,r.prototype=new n,r.prototype.constructor=r},Ws="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Tr=64,Hs={},Ks=0,tn=0,zs;function qi(r){var o="";do o=Ws[r%Tr]+o,r=Math.floor(r/Tr);while(r>0);return o}function Xf(r){var o=0;for(tn=0;tn<r.length;tn++)o=o*Tr+Hs[r.charAt(tn)];return o}function Wi(){var r=qi(+new Date);return r!==zs?(Ks=0,zs=r):r+"."+qi(Ks++)}for(;tn<Tr;tn++)Hs[Ws[tn]]=tn;Wi.encode=qi,Wi.decode=Xf;var Xs=Wi,Gs=Mi(),Gf=En,$s=gn,$f=Er,Jf=Xs,Ee=We("engine.io-client:polling"),Js=Be,jf=function(){var r=Bi,o=new r({xdomain:!1});return o.responseType!=null}();function Be(r){var o=r&&r.forceBase64;(!jf||o)&&(this.supportsBinary=!1),Gs.call(this,r)}$f(Be,Gs),Be.prototype.name="polling",Be.prototype.doOpen=function(){this.poll()},Be.prototype.pause=function(r){var o=this;this.readyState="pausing";function n(){Ee("paused"),o.readyState="paused",r()}if(this.polling||!this.writable){var a=0;this.polling&&(Ee("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){Ee("pre-pause polling complete"),--a||n()})),this.writable||(Ee("we are currently writing - waiting to pause"),a++,this.once("drain",function(){Ee("pre-pause writing complete"),--a||n()}))}else n()},Be.prototype.poll=function(){Ee("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Be.prototype.onData=function(r){var o=this;Ee("polling got data %s",r);var n=function(a,c,f){if(o.readyState==="opening"&&a.type==="open"&&o.onOpen(),a.type==="close")return o.onClose(),!1;o.onPacket(a)};$s.decodePayload(r,this.socket.binaryType,n),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Ee('ignoring poll - transport state "%s"',this.readyState))},Be.prototype.doClose=function(){var r=this;function o(){Ee("writing close packet"),r.write([{type:"close"}])}this.readyState==="open"?(Ee("transport open - closing"),o()):(Ee("transport not open - deferring close"),this.once("open",o))},Be.prototype.write=function(r){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};$s.encodePayload(r,this.supportsBinary,function(a){o.doWrite(a,n)})},Be.prototype.uri=function(){var r=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(r[this.timestampParam]=Jf()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=Gf.encode(r),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r};var Yf=Bi,js=Js,Vf=An,Zf=Er,Hi=We("engine.io-client:polling-xhr"),Qf=Ni;Li.exports=Tn,Li.exports.Request=Mt;function Ys(){}function Tn(r){if(js.call(this,r),this.requestTimeout=r.requestTimeout,this.extraHeaders=r.extraHeaders,typeof location<"u"){var o=location.protocol==="https:",n=location.port;n||(n=o?443:80),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port,this.xs=r.secure!==o}}Zf(Tn,js),Tn.prototype.supportsBinary=!0,Tn.prototype.request=function(r){return r=r||{},r.uri=this.uri(),r.xd=this.xd,r.xs=this.xs,r.agent=this.agent||!1,r.supportsBinary=this.supportsBinary,r.enablesXDR=this.enablesXDR,r.withCredentials=this.withCredentials,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,r.requestTimeout=this.requestTimeout,r.extraHeaders=this.extraHeaders,new Mt(r)},Tn.prototype.doWrite=function(r,o){var n=typeof r!="string"&&r!==void 0,a=this.request({method:"POST",data:r,isBinary:n}),c=this;a.on("success",o),a.on("error",function(f){c.onError("xhr post error",f)}),this.sendXhr=a},Tn.prototype.doPoll=function(){Hi("xhr poll");var r=this.request(),o=this;r.on("data",function(n){o.onData(n)}),r.on("error",function(n){o.onError("xhr poll error",n)}),this.pollXhr=r};function Mt(r){this.method=r.method||"GET",this.uri=r.uri,this.xd=!!r.xd,this.xs=!!r.xs,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.agent=r.agent,this.isBinary=r.isBinary,this.supportsBinary=r.supportsBinary,this.enablesXDR=r.enablesXDR,this.withCredentials=r.withCredentials,this.requestTimeout=r.requestTimeout,this.pfx=r.pfx,this.key=r.key,this.passphrase=r.passphrase,this.cert=r.cert,this.ca=r.ca,this.ciphers=r.ciphers,this.rejectUnauthorized=r.rejectUnauthorized,this.extraHeaders=r.extraHeaders,this.create()}if(Vf(Mt.prototype),Mt.prototype.create=function(){var r={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized;var o=this.xhr=new Yf(r),n=this;try{Hi("xhr open %s: %s",this.method,this.uri),o.open(this.method,this.uri,this.async);try{if(this.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(var a in this.extraHeaders)this.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this.extraHeaders[a])}}catch{}if(this.method==="POST")try{this.isBinary?o.setRequestHeader("Content-type","application/octet-stream"):o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in o&&(o.withCredentials=this.withCredentials),this.requestTimeout&&(o.timeout=this.requestTimeout),this.hasXDR()?(o.onload=function(){n.onLoad()},o.onerror=function(){n.onError(o.responseText)}):o.onreadystatechange=function(){if(o.readyState===2)try{var c=o.getResponseHeader("Content-Type");(n.supportsBinary&&c==="application/octet-stream"||c==="application/octet-stream; charset=UTF-8")&&(o.responseType="arraybuffer")}catch{}o.readyState===4&&(o.status===200||o.status===1223?n.onLoad():setTimeout(function(){n.onError(typeof o.status=="number"?o.status:0)},0))},Hi("xhr data %s",this.data),o.send(this.data)}catch(c){setTimeout(function(){n.onError(c)},0);return}typeof document<"u"&&(this.index=Mt.requestsCount++,Mt.requests[this.index]=this)},Mt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Mt.prototype.onData=function(r){this.emit("data",r),this.onSuccess()},Mt.prototype.onError=function(r){this.emit("error",r),this.cleanup(!0)},Mt.prototype.cleanup=function(r){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Ys:this.xhr.onreadystatechange=Ys,r)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Mt.requests[this.index],this.xhr=null}},Mt.prototype.onLoad=function(){var r;try{var o;try{o=this.xhr.getResponseHeader("Content-Type")}catch{}o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8"?r=this.xhr.response||this.xhr.responseText:r=this.xhr.responseText}catch(n){this.onError(n)}r!=null&&this.onData(r)},Mt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},Mt.prototype.abort=function(){this.cleanup()},Mt.requestsCount=0,Mt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Vs);else if(typeof addEventListener=="function"){var th="onpagehide"in Qf?"pagehide":"unload";addEventListener(th,Vs,!1)}}function Vs(){for(var r in Mt.requests)Mt.requests.hasOwnProperty(r)&&Mt.requests[r].abort()}var eh=Li.exports,Ki=Js,nh=Er,Zs=Ni,rh=Rn,ih=/\n/g,oh=/\\n/g,Rr;function sh(){}function Rn(r){Ki.call(this,r),this.query=this.query||{},Rr||(Rr=Zs.___eio=Zs.___eio||[]),this.index=Rr.length;var o=this;Rr.push(function(n){o.onData(n)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=sh)},!1)}nh(Rn,Ki),Rn.prototype.supportsBinary=!1,Rn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),Ki.prototype.doClose.call(this)},Rn.prototype.doPoll=function(){var r=this,o=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),o.async=!0,o.src=this.uri(),o.onerror=function(c){r.onError("jsonp poll error",c)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(o,n):(document.head||document.body).appendChild(o),this.script=o;var a=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);a&&setTimeout(function(){var c=document.createElement("iframe");document.body.appendChild(c),document.body.removeChild(c)},100)},Rn.prototype.doWrite=function(r,o){var n=this;if(!this.form){var a=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index,v;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=f,a.method="POST",a.setAttribute("accept-charset","utf-8"),c.name="d",a.appendChild(c),document.body.appendChild(a),this.form=a,this.area=c}this.form.action=this.uri();function d(){b(),o()}function b(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(_){n.onError("jsonp polling iframe removal error",_)}try{var p='<iframe src="javascript:0" name="'+n.iframeId+'">';v=document.createElement(p)}catch{v=document.createElement("iframe"),v.name=n.iframeId,v.src="javascript:0"}v.id=n.iframeId,n.form.appendChild(v),n.iframe=v}b(),r=r.replace(oh,`\\
|
|
45
|
+
`),this.area.value=r.replace(ih,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const ah={},ch=Object.freeze(Object.defineProperty({__proto__:null,default:ah},Symbol.toStringTag,{value:"Module"})),uh=of(ch);var zi=Mi(),fh=gn,hh=En,lh=Er,ph=Xs,dh=We("engine.io-client:websocket"),Or,Xi;if(typeof WebSocket<"u"?Or=WebSocket:typeof self<"u"&&(Or=self.WebSocket||self.MozWebSocket),typeof window>"u")try{Xi=uh}catch{}var On=Or||Xi,gh=me;function me(r){var o=r&&r.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=r.perMessageDeflate,this.usingBrowserWebSocket=Or&&!r.forceNode,this.protocols=r.protocols,this.usingBrowserWebSocket||(On=Xi),zi.call(this,r)}lh(me,zi),me.prototype.name="websocket",me.prototype.supportsBinary=!0,me.prototype.doOpen=function(){if(this.check()){var r=this.uri(),o=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?o?new On(r,o):new On(r):new On(r,o,n)}catch(a){return this.emit("error",a)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},me.prototype.addEventListeners=function(){var r=this;this.ws.onopen=function(){r.onOpen()},this.ws.onclose=function(){r.onClose()},this.ws.onmessage=function(o){r.onData(o.data)},this.ws.onerror=function(o){r.onError("websocket error",o)}},me.prototype.write=function(r){var o=this;this.writable=!1;for(var n=r.length,a=0,c=n;a<c;a++)(function(v){fh.encodePacket(v,o.supportsBinary,function(d){if(!o.usingBrowserWebSocket){var b={};if(v.options&&(b.compress=v.options.compress),o.perMessageDeflate){var p=typeof d=="string"?Buffer.byteLength(d):d.length;p<o.perMessageDeflate.threshold&&(b.compress=!1)}}try{o.usingBrowserWebSocket?o.ws.send(d):o.ws.send(d,b)}catch{dh("websocket closed before onclose event")}--n||f()})})(r[a]);function f(){o.emit("flush"),setTimeout(function(){o.writable=!0,o.emit("drain")},0)}},me.prototype.onClose=function(){zi.prototype.onClose.call(this)},me.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},me.prototype.uri=function(){var r=this.query||{},o=this.secure?"wss":"ws",n="";this.port&&(o==="wss"&&Number(this.port)!==443||o==="ws"&&Number(this.port)!==80)&&(n=":"+this.port),this.timestampRequests&&(r[this.timestampParam]=ph()),this.supportsBinary||(r.b64=1),r=hh.encode(r),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r},me.prototype.check=function(){return!!On&&!("__initialize"in On&&this.name===me.prototype.name)};var yh=Bi,vh=eh,mh=rh,_h=gh;Sr.polling=wh,Sr.websocket=_h;function wh(r){var o,n=!1,a=!1,c=r.jsonp!==!1;if(typeof location<"u"){var f=location.protocol==="https:",v=location.port;v||(v=f?443:80),n=r.hostname!==location.hostname||v!==r.port,a=r.secure!==f}if(r.xdomain=n,r.xscheme=a,o=new yh(r),"open"in o&&!r.forceJSONP)return new vh(r);if(!c)throw new Error("JSONP disabled");return new mh(r)}var bh=[].indexOf,Qs=function(r,o){if(bh)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},Ch=Sr,Sh=An,Ft=We("engine.io-client:socket"),kh=Qs,ta=gn,ea=Ts,Ah=En,xh=_t;function _t(r,o){if(!(this instanceof _t))return new _t(r,o);o=o||{},r&&typeof r=="object"&&(o=r,r=null),r?(r=ea(r),o.hostname=r.host,o.secure=r.protocol==="https"||r.protocol==="wss",o.port=r.port,r.query&&(o.query=r.query)):o.host&&(o.hostname=ea(o.host).host),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.agent=o.agent||!1,this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=o.query||{},typeof this.query=="string"&&(this.query=Ah.decode(this.query)),this.upgrade=o.upgrade!==!1,this.path=(o.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!o.forceJSONP,this.jsonp=o.jsonp!==!1,this.forceBase64=!!o.forceBase64,this.enablesXDR=!!o.enablesXDR,this.withCredentials=o.withCredentials!==!1,this.timestampParam=o.timestampParam||"t",this.timestampRequests=o.timestampRequests,this.transports=o.transports||["polling","websocket"],this.transportOptions=o.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=o.policyPort||843,this.rememberUpgrade=o.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=o.onlyBinaryUpgrades,this.perMessageDeflate=o.perMessageDeflate!==!1?o.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=o.pfx||void 0,this.key=o.key||void 0,this.passphrase=o.passphrase||void 0,this.cert=o.cert||void 0,this.ca=o.ca||void 0,this.ciphers=o.ciphers||void 0,this.rejectUnauthorized=o.rejectUnauthorized===void 0?!0:o.rejectUnauthorized,this.forceNode=!!o.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(o.extraHeaders&&Object.keys(o.extraHeaders).length>0&&(this.extraHeaders=o.extraHeaders),o.localAddress&&(this.localAddress=o.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}_t.priorWebsocketSuccess=!1,Sh(_t.prototype),_t.protocol=ta.protocol,_t.Socket=_t,_t.Transport=Mi(),_t.transports=Sr,_t.parser=gn,_t.prototype.createTransport=function(r){Ft('creating transport "%s"',r);var o=Eh(this.query);o.EIO=ta.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var a=new Ch[r]({query:o,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return a};function Eh(r){var o={};for(var n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o}_t.prototype.open=function(){var r;if(this.rememberUpgrade&&_t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){var o=this;setTimeout(function(){o.emit("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)},_t.prototype.setTransport=function(r){Ft("setting transport %s",r.name);var o=this;this.transport&&(Ft("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=r,r.on("drain",function(){o.onDrain()}).on("packet",function(n){o.onPacket(n)}).on("error",function(n){o.onError(n)}).on("close",function(){o.onClose("transport close")})},_t.prototype.probe=function(r){Ft('probing transport "%s"',r);var o=this.createTransport(r,{probe:1}),n=!1,a=this;_t.priorWebsocketSuccess=!1;function c(){if(a.onlyBinaryUpgrades){var g=!this.supportsBinary&&a.transport.supportsBinary;n=n||g}n||(Ft('probe transport "%s" opened',r),o.send([{type:"ping",data:"probe"}]),o.once("packet",function(l){if(!n)if(l.type==="pong"&&l.data==="probe"){if(Ft('probe transport "%s" pong',r),a.upgrading=!0,a.emit("upgrading",o),!o)return;_t.priorWebsocketSuccess=o.name==="websocket",Ft('pausing current transport "%s"',a.transport.name),a.transport.pause(function(){n||a.readyState!=="closed"&&(Ft("changing transport and sending upgrade packet"),_(),a.setTransport(o),o.send([{type:"upgrade"}]),a.emit("upgrade",o),o=null,a.upgrading=!1,a.flush())})}else{Ft('probe transport "%s" failed',r);var u=new Error("probe error");u.transport=o.name,a.emit("upgradeError",u)}}))}function f(){n||(n=!0,_(),o.close(),o=null)}function v(g){var l=new Error("probe error: "+g);l.transport=o.name,f(),Ft('probe transport "%s" failed because of error: %s',r,g),a.emit("upgradeError",l)}function d(){v("transport closed")}function b(){v("socket closed")}function p(g){o&&g.name!==o.name&&(Ft('"%s" works - aborting "%s"',g.name,o.name),f())}function _(){o.removeListener("open",c),o.removeListener("error",v),o.removeListener("close",d),a.removeListener("close",b),a.removeListener("upgrading",p)}o.once("open",c),o.once("error",v),o.once("close",d),this.once("close",b),this.once("upgrading",p),o.open()},_t.prototype.onOpen=function(){if(Ft("socket open"),this.readyState="open",_t.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Ft("starting upgrade probes");for(var r=0,o=this.upgrades.length;r<o;r++)this.probe(this.upgrades[r])}},_t.prototype.onPacket=function(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Ft('socket receive: type "%s", data "%s"',r.type,r.data),this.emit("packet",r),this.emit("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var o=new Error("server error");o.code=r.data,this.onError(o);break;case"message":this.emit("data",r.data),this.emit("message",r.data);break}else Ft('packet received with socket readyState "%s"',this.readyState)},_t.prototype.onHandshake=function(r){this.emit("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},_t.prototype.onHeartbeat=function(r){clearTimeout(this.pingTimeoutTimer);var o=this;o.pingTimeoutTimer=setTimeout(function(){o.readyState!=="closed"&&o.onClose("ping timeout")},r||o.pingInterval+o.pingTimeout)},_t.prototype.setPing=function(){var r=this;clearTimeout(r.pingIntervalTimer),r.pingIntervalTimer=setTimeout(function(){Ft("writing ping packet - expecting pong within %sms",r.pingTimeout),r.ping(),r.onHeartbeat(r.pingTimeout)},r.pingInterval)},_t.prototype.ping=function(){var r=this;this.sendPacket("ping",function(){r.emit("ping")})},_t.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()},_t.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(Ft("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},_t.prototype.write=_t.prototype.send=function(r,o,n){return this.sendPacket("message",r,o,n),this},_t.prototype.sendPacket=function(r,o,n,a){if(typeof o=="function"&&(a=o,o=void 0),typeof n=="function"&&(a=n,n=null),!(this.readyState==="closing"||this.readyState==="closed")){n=n||{},n.compress=n.compress!==!1;var c={type:r,data:o,options:n};this.emit("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}},_t.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?a():o()}):this.upgrading?a():o()}function o(){r.onClose("forced close"),Ft("socket closing - telling transport to close"),r.transport.close()}function n(){r.removeListener("upgrade",n),r.removeListener("upgradeError",n),o()}function a(){r.once("upgrade",n),r.once("upgradeError",n)}return this},_t.prototype.onError=function(r){Ft("socket error %j",r),_t.priorWebsocketSuccess=!1,this.emit("error",r),this.onClose("transport error",r)},_t.prototype.onClose=function(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Ft('socket close with reason: "%s"',r);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",r,o),n.writeBuffer=[],n.prevBufferLen=0}},_t.prototype.filterUpgrades=function(r){for(var o=[],n=0,a=r.length;n<a;n++)~kh(this.transports,r[n])&&o.push(r[n]);return o},Oi.exports=xh,Oi.exports.parser=gn;var Th=Oi.exports,na={exports:{}},Rh=Oh;function Oh(r,o){var n=[];o=o||0;for(var a=o||0;a<r.length;a++)n[a-o]=r[a];return n}var ra=Ih;function Ih(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var ia=[].slice,oa=function(r,o){if(typeof o=="string"&&(o=r[o]),typeof o!="function")throw new Error("bind() requires a function");var n=ia.call(arguments,2);return function(){return o.apply(r,n.concat(ia.call(arguments)))}};(function(r,o){var n=br,a=An,c=Rh,f=ra,v=oa,d=We("socket.io-client:socket"),b=En,p=Us;r.exports=l;var _={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},g=a.prototype.emit;function l(u,w,A){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},A&&A.query&&(this.query=A.query),this.io.autoConnect&&this.open()}a(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[f(u,"open",v(this,"onopen")),f(u,"packet",v(this,"onpacket")),f(u,"close",v(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},l.prototype.send=function(){var u=c(arguments);return u.unshift("message"),this.emit.apply(this,u),this},l.prototype.emit=function(u){if(_.hasOwnProperty(u))return g.apply(this,arguments),this;var w=c(arguments),A={type:(this.flags.binary!==void 0?this.flags.binary:p(w))?n.BINARY_EVENT:n.EVENT,data:w};return A.options={},A.options.compress=!this.flags||this.flags.compress!==!1,typeof w[w.length-1]=="function"&&(d("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),A.id=this.ids++),this.connected?this.packet(A):this.sendBuffer.push(A),this.flags={},this},l.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},l.prototype.onopen=function(){if(d("transport is open - connecting"),this.nsp!=="/")if(this.query){var u=typeof this.query=="object"?b.encode(this.query):this.query;d("sending connect packet with query %s",u),this.packet({type:n.CONNECT,query:u})}else this.packet({type:n.CONNECT})},l.prototype.onclose=function(u){d("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},l.prototype.onpacket=function(u){var w=u.nsp===this.nsp,A=u.type===n.ERROR&&u.nsp==="/";if(!(!w&&!A))switch(u.type){case n.CONNECT:this.onconnect();break;case n.EVENT:this.onevent(u);break;case n.BINARY_EVENT:this.onevent(u);break;case n.ACK:this.onack(u);break;case n.BINARY_ACK:this.onack(u);break;case n.DISCONNECT:this.ondisconnect();break;case n.ERROR:this.emit("error",u.data);break}},l.prototype.onevent=function(u){var w=u.data||[];d("emitting event %j",w),u.id!=null&&(d("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?g.apply(this,w):this.receiveBuffer.push(w)},l.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=c(arguments);d("sending ack %j",k),w.packet({type:p(k)?n.BINARY_ACK:n.ACK,id:u,data:k})}}},l.prototype.onack=function(u){var w=this.acks[u.id];typeof w=="function"?(d("calling ack %s with %j",u.id,u.data),w.apply(this,u.data),delete this.acks[u.id]):d("bad ack %s",u.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},l.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)g.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){d("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(d("performing disconnect (%s)",this.nsp),this.packet({type:n.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(u){return this.flags.compress=u,this},l.prototype.binary=function(u){return this.flags.binary=u,this}})(na);var sa=na.exports,Nh=In;function In(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}In.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),n=Math.floor(o*this.jitter*r);r=Math.floor(o*10)&1?r+n:r-n}return Math.min(r,this.max)|0},In.prototype.reset=function(){this.attempts=0},In.prototype.setMin=function(r){this.ms=r},In.prototype.setMax=function(r){this.max=r},In.prototype.setJitter=function(r){this.jitter=r};var Bh=Th,Lh=sa,Uh=An,Dh=br,en=ra,Nn=oa,jt=We("socket.io-client:manager"),aa=Qs,Ph=Nh,ca=Object.prototype.hasOwnProperty,ua=bt;function bt(r,o){if(!(this instanceof bt))return new bt(r,o);r&&typeof r=="object"&&(o=r,r=void 0),o=o||{},o.path=o.path||"/socket.io",this.nsps={},this.subs=[],this.opts=o,this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor(o.randomizationFactor||.5),this.backoff=new Ph({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this.readyState="closed",this.uri=r,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=o.parser||Dh;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=o.autoConnect!==!1,this.autoConnect&&this.open()}bt.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var r in this.nsps)ca.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)},bt.prototype.updateSocketIds=function(){for(var r in this.nsps)ca.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))},bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id},Uh(bt.prototype),bt.prototype.reconnection=function(r){return arguments.length?(this._reconnection=!!r,this):this._reconnection},bt.prototype.reconnectionAttempts=function(r){return arguments.length?(this._reconnectionAttempts=r,this):this._reconnectionAttempts},bt.prototype.reconnectionDelay=function(r){return arguments.length?(this._reconnectionDelay=r,this.backoff&&this.backoff.setMin(r),this):this._reconnectionDelay},bt.prototype.randomizationFactor=function(r){return arguments.length?(this._randomizationFactor=r,this.backoff&&this.backoff.setJitter(r),this):this._randomizationFactor},bt.prototype.reconnectionDelayMax=function(r){return arguments.length?(this._reconnectionDelayMax=r,this.backoff&&this.backoff.setMax(r),this):this._reconnectionDelayMax},bt.prototype.timeout=function(r){return arguments.length?(this._timeout=r,this):this._timeout},bt.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},bt.prototype.open=bt.prototype.connect=function(r,o){if(jt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;jt("opening %s",this.uri),this.engine=Bh(this.uri,this.opts);var n=this.engine,a=this;this.readyState="opening",this.skipReconnect=!1;var c=en(n,"open",function(){a.onopen(),r&&r()}),f=en(n,"error",function(b){if(jt("connect_error"),a.cleanup(),a.readyState="closed",a.emitAll("connect_error",b),r){var p=new Error("Connection error");p.data=b,r(p)}else a.maybeReconnectOnOpen()});if(this._timeout!==!1){var v=this._timeout;jt("connect attempt will timeout after %d",v),v===0&&c.destroy();var d=setTimeout(function(){jt("connect attempt timed out after %d",v),c.destroy(),n.close(),n.emit("error","timeout"),a.emitAll("connect_timeout",v)},v);this.subs.push({destroy:function(){clearTimeout(d)}})}return this.subs.push(c),this.subs.push(f),this},bt.prototype.onopen=function(){jt("open"),this.cleanup(),this.readyState="open",this.emit("open");var r=this.engine;this.subs.push(en(r,"data",Nn(this,"ondata"))),this.subs.push(en(r,"ping",Nn(this,"onping"))),this.subs.push(en(r,"pong",Nn(this,"onpong"))),this.subs.push(en(r,"error",Nn(this,"onerror"))),this.subs.push(en(r,"close",Nn(this,"onclose"))),this.subs.push(en(this.decoder,"decoded",Nn(this,"ondecoded")))},bt.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},bt.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},bt.prototype.ondata=function(r){this.decoder.add(r)},bt.prototype.ondecoded=function(r){this.emit("packet",r)},bt.prototype.onerror=function(r){jt("error",r),this.emitAll("error",r)},bt.prototype.socket=function(r,o){var n=this.nsps[r];if(!n){n=new Lh(this,r,o),this.nsps[r]=n;var a=this;n.on("connecting",c),n.on("connect",function(){n.id=a.generateId(r)}),this.autoConnect&&c()}function c(){~aa(a.connecting,n)||a.connecting.push(n)}return n},bt.prototype.destroy=function(r){var o=aa(this.connecting,r);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()},bt.prototype.packet=function(r){jt("writing packet %j",r);var o=this;r.query&&r.type===0&&(r.nsp+="?"+r.query),o.encoding?o.packetBuffer.push(r):(o.encoding=!0,this.encoder.encode(r,function(n){for(var a=0;a<n.length;a++)o.engine.write(n[a],r.options);o.encoding=!1,o.processPacketQueue()}))},bt.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var r=this.packetBuffer.shift();this.packet(r)}},bt.prototype.cleanup=function(){jt("cleanup");for(var r=this.subs.length,o=0;o<r;o++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},bt.prototype.close=bt.prototype.disconnect=function(){jt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},bt.prototype.onclose=function(r){jt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",r),this._reconnection&&!this.skipReconnect&&this.reconnect()},bt.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var r=this;if(this.backoff.attempts>=this._reconnectionAttempts)jt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var o=this.backoff.duration();jt("will wait %dms before reconnect attempt",o),this.reconnecting=!0;var n=setTimeout(function(){r.skipReconnect||(jt("attempting reconnect"),r.emitAll("reconnect_attempt",r.backoff.attempts),r.emitAll("reconnecting",r.backoff.attempts),!r.skipReconnect&&r.open(function(a){a?(jt("reconnect attempt error"),r.reconnecting=!1,r.reconnect(),r.emitAll("reconnect_error",a.data)):(jt("reconnect success"),r.onreconnect())}))},o);this.subs.push({destroy:function(){clearTimeout(n)}})}},bt.prototype.onreconnect=function(){var r=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",r)},function(r,o){var n=vf,a=br,c=ua,f=We("socket.io-client");r.exports=o=d;var v=o.managers={};function d(b,p){typeof b=="object"&&(p=b,b=void 0),p=p||{};var _=n(b),g=_.source,l=_.id,u=_.path,w=v[l]&&u in v[l].nsps,A=p.forceNew||p["force new connection"]||p.multiplex===!1||w,k;return A?(f("ignoring socket cache for %s",g),k=c(g,p)):(v[l]||(f("new io instance for %s",g),v[l]=c(g,p)),k=v[l]),_.query&&!p.query&&(p.query=_.query),k.socket(_.path,p)}o.protocol=a.protocol,o.connect=d,o.Manager=ua,o.Socket=sa}(Si,Si.exports);var Fh=Si.exports;const Mh=rf(Fh);let Ir;const qh=new Uint8Array(16);function Wh(){if(!Ir&&(Ir=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ir))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ir(qh)}const Xt=[];for(let r=0;r<256;++r)Xt.push((r+256).toString(16).slice(1));function Hh(r,o=0){return Xt[r[o+0]]+Xt[r[o+1]]+Xt[r[o+2]]+Xt[r[o+3]]+"-"+Xt[r[o+4]]+Xt[r[o+5]]+"-"+Xt[r[o+6]]+Xt[r[o+7]]+"-"+Xt[r[o+8]]+Xt[r[o+9]]+"-"+Xt[r[o+10]]+Xt[r[o+11]]+Xt[r[o+12]]+Xt[r[o+13]]+Xt[r[o+14]]+Xt[r[o+15]]}const Kh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),fa={randomUUID:Kh};function zh(r,o,n){if(fa.randomUUID&&!o&&!r)return fa.randomUUID();r=r||{};const a=r.random||(r.rng||Wh)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,o){n=n||0;for(let c=0;c<16;++c)o[n+c]=a[c];return o}return Hh(a)}function Xh(r){return!!r&&(typeof r=="object"||typeof r=="function")&&typeof r.then=="function"}function Gh(r,o){const n=o.map(c=>JSON.stringify(c)).join(" "),a=new Date().toISOString();return JSON.stringify({level:r,time:a,message:n})}function $h(r){const o=r[0],n=r.slice(1);return{level:o,logs:n}}function Jh(r,o){const n=JSON.parse(r);return o.forEach(a=>delete n[a]),n}const jh={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Gi={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let oe=console;class ha{constructor(o){Ht(this,"logToConsole"),Ht(this,"overloadGlobalConsole"),Ht(this,"namespace"),Ht(this,"socketEmitInterval"),Ht(this,"storageId"),Ht(this,"emitInProgress"),Ht(this,"queue"),Ht(this,"processing"),Ht(this,"interval"),Ht(this,"logIndex"),Ht(this,"socket"),Ht(this,"getItem"),Ht(this,"setItem"),Ht(this,"parseLog"),Ht(this,"_logMethod"),Ht(this,"_warnMethod"),Ht(this,"_errorMethod"),Ht(this,"_debugMethod");const{loggerOptions:n}=o;if(!n.namespace)throw new Error("Config property 'namespace' should be provided!");this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.namespace=n.namespace,this.socketEmitInterval=n.socketEmitInterval||Gi.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:Gi.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:Gi.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(o)}setupStorageFunctions(o,n,a){this.getItem=o&&typeof o=="function"?this.promisifyStorageFunction(o):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=a&&typeof a=="function"?a:Gh}promisifyStorageFunction(o){const n=o("");return Xh(n)?o:async(...a)=>new Promise((c,f)=>{try{const v=o(...a);c(v)}catch(v){f(v)}})}init(o){const{socket:n,url:a,socketOptions:c={}}=o;this._logMethod=oe.log.bind(oe),this._warnMethod=oe.warn.bind(oe),this._errorMethod=oe.error.bind(oe),this._debugMethod=oe.debug.bind(oe),this.initStorage().then(()=>{if(n)this.socket=n;else if(a)this.socket=this.createConnection(a,c);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(o,n={}){const a={...jh,...n};return Mh(o,a)}async emitLogs(){if(!this.emitInProgress)try{const o=await this.getItem(this.storageId);if(!o)return;let n=[];this.emitInProgress=!0;const a=JSON.parse(o);let c=Object.keys(a);if(!c.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const d of c)await this.socket.emit("Log",a[d]),n.push(d);const f=await this.getItem(this.storageId);if(!f)return;const v=Jh(f,n);await this.setItem(this.storageId,JSON.stringify(v))}catch(o){this._errorMethod(o)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){const o=this;oe=Object.assign(oe,{log:function(){o.log(...arguments)},warn:function(){o.warn(...arguments)},error:function(){o.error(...arguments)},debug:function(){o.debug(...arguments)}})}async initStorage(){const o=await this.getItem(this.storageId);(!o||typeof o!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const o=zh();return this.namespace.toString().toUpperCase()+o+Date.now()}async processLog(...o){try{if(o.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:a,logs:c}=$h(o),f=JSON.parse(n),v=this.formItemKey(a);f[v]=this.parseLog(a,c),await this.setItem(this.storageId,JSON.stringify(f))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;this.processing=!0;const o=this.queue.shift();await this.processLog(...o).finally(()=>{this.processing=!1,this.processQueue()})}log(...o){const n=["INFO",...o];this.queue.push(n),this.logToConsole&&this._logMethod.apply(oe,o),this.processQueue()}warn(...o){const n=["WARN",...o];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(oe,o),this.processQueue()}error(...o){const n=["ERROR",...o];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(oe,o),this.processQueue()}debug(...o){const n=["DEBUG",...o];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(oe,o),this.processQueue()}async defaultGetItemFunction(o){return localStorage.getItem(o)}async defaultSetItemFunction(o,n){try{localStorage.setItem(o,n)}catch(a){this._errorMethod(a)}}formItemKey(o){const n=new Date().toISOString();return this.logIndex++,`${o}-${this.namespace}-${n}-${this.logIndex}`}}class Yh{constructor(o){St(this,"io");St(this,"storageLogger");this.eventsSdkClass=o,this.eventsSdkClass=o}init(){this.eventsSdkClass.options.useLogger&&(this.eventsSdkClass.options.loggerSocketConnection?this.io=this.eventsSdkClass.options.loggerSocketConnection:this.eventsSdkClass.socketIoClass.ioFunction&&(this.io=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),this.io?this.storageLogger=new ha({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new ha({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(o,n,...a){const c=[n,...a];this.storageLogger?o===Jt.INFO?this.storageLogger.log(c):o===Jt.ERROR&&this.storageLogger.error(c):o===Jt.INFO?console.log(c):o===Jt.ERROR&&console.error(c)}}class Vh{constructor(o){St(this,"listeners",{[ht.ALL_EXTENSION_STATUS]:[],[ht.ALL_DIALER_STATUS]:[],[ht.ALL_USERS_STATUS]:[],[ht.QUEUE_EVENT]:[],[ht.EXTENSION_EVENT]:[],[ht.DIALER_EVENT]:[],[ht.LOGIN_SUCCESS]:[],[ht.LOGIN_STATUS]:[],[ht.KEEP_ALIVE_RESPONSE]:[],[ht.ONLINE_STATUS_EVENT]:[],[ht.EXTENSIONS_UPDATED]:[]});St(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(a=>a!==n);else{const c=this.listeners[o].filter(f=>f!==n);this.listeners={...this.listeners,[o]:c}}}emit(o,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[o].forEach(c=>c({name:o,data:n}));const a={name:o,data:n};this.allListeners.forEach(c=>c(a))}}class Zh{constructor(o){St(this,"argumentOptions");St(this,"options");St(this,"servers",[]);St(this,"URLList",[]);St(this,"server");St(this,"URL");St(this,"socket");St(this,"mainServer");St(this,"alreadyAttemptedOtherServers",[]);St(this,"authClass",new Gu(this));St(this,"socketIoClass",new tf(this));St(this,"loggerClass",new Yh(this));St(this,"eventEmitterClass",new Vh(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...Ju,...o},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=$u.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...o}}on(o,n){this.eventEmitterClass.on(o,n)}emit(o,n){this.socketIoClass.io&&this.socketIoClass.io.emit(o,n)}connect(o){o===dn.MAIN&&this.findMainServer(),o===dn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((o,n)=>n.Priority>o.Priority?n:o),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),o.length&&(this.server=o.reduce((n,a)=>a.Priority>n.Priority?a:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),o.length&&(this.URL=o[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}Ut.CallStatusEnum=ws,Ut.CallTypeEnum=bs,Ut.DialerTypeEnum=Cs,Ut.DirectionEnum=Ss,Ut.DoNotCallMeStatusCodeEnum=ks,Ut.EventsEnum=ht,Ut.ExtensionEventReasonEnum=As,Ut.ExtensionHangupCauseEnum=xs,Ut.QueueEventReasonEnum=Es,Ut.default=Zh,Object.defineProperties(Ut,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
46
46
|
//# sourceMappingURL=voicenter-events-sdk.umd.js.map
|