@voicenter-team/events-sdk 0.0.21 → 0.0.23

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.
@@ -1,45 +1,45 @@
1
- var VoicenterEventsSDK=function(St){"use strict";var Bg=Object.defineProperty;var Ug=(St,je,Zt)=>je in St?Bg(St,je,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):St[je]=Zt;var Se=(St,je,Zt)=>(Ug(St,typeof je!="symbol"?je+"":je,Zt),Zt);var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zt(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}var ro={exports:{}},io={exports:{}};(function(){var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v={rotl:function(r,l){return r<<l|r>>>32-l},rotr:function(r,l){return r<<32-l|r>>>l},endian:function(r){if(r.constructor==Number)return v.rotl(r,8)&16711935|v.rotl(r,24)&4278255360;for(var l=0;l<r.length;l++)r[l]=v.endian(r[l]);return r},randomBytes:function(r){for(var l=[];r>0;r--)l.push(Math.floor(Math.random()*256));return l},bytesToWords:function(r){for(var l=[],c=0,g=0;c<r.length;c++,g+=8)l[g>>>5]|=r[c]<<24-g%32;return l},wordsToBytes:function(r){for(var l=[],c=0;c<r.length*32;c+=8)l.push(r[c>>>5]>>>24-c%32&255);return l},bytesToHex:function(r){for(var l=[],c=0;c<r.length;c++)l.push((r[c]>>>4).toString(16)),l.push((r[c]&15).toString(16));return l.join("")},hexToBytes:function(r){for(var l=[],c=0;c<r.length;c+=2)l.push(parseInt(r.substr(c,2),16));return l},bytesToBase64:function(r){for(var l=[],c=0;c<r.length;c+=3)for(var g=r[c]<<16|r[c+1]<<8|r[c+2],m=0;m<4;m++)c*8+m*6<=r.length*8?l.push(S.charAt(g>>>6*(3-m)&63)):l.push("=");return l.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var l=[],c=0,g=0;c<r.length;g=++c%4)g!=0&&l.push((S.indexOf(r.charAt(c-1))&Math.pow(2,-2*g+8)-1)<<g*2|S.indexOf(r.charAt(c))>>>6-g*2);return l}};io.exports=v})();var Fu=io.exports,Br={utf8:{stringToBytes:function(S){return Br.bin.stringToBytes(unescape(encodeURIComponent(S)))},bytesToString:function(S){return decodeURIComponent(escape(Br.bin.bytesToString(S)))}},bin:{stringToBytes:function(S){for(var v=[],r=0;r<S.length;r++)v.push(S.charCodeAt(r)&255);return v},bytesToString:function(S){for(var v=[],r=0;r<S.length;r++)v.push(String.fromCharCode(S[r]));return v.join("")}}},oo=Br;/*!
1
+ var VoicenterEventsSDK=function(Ct){"use strict";var Ug=Object.defineProperty;var Dg=(Ct,et,Zt)=>et in Ct?Ug(Ct,et,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Ct[et]=Zt;var me=(Ct,et,Zt)=>(Dg(Ct,typeof et!="symbol"?et+"":et,Zt),Zt);var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zt(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}var ro={exports:{}},io={exports:{}};(function(){var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v={rotl:function(r,l){return r<<l|r>>>32-l},rotr:function(r,l){return r<<32-l|r>>>l},endian:function(r){if(r.constructor==Number)return v.rotl(r,8)&16711935|v.rotl(r,24)&4278255360;for(var l=0;l<r.length;l++)r[l]=v.endian(r[l]);return r},randomBytes:function(r){for(var l=[];r>0;r--)l.push(Math.floor(Math.random()*256));return l},bytesToWords:function(r){for(var l=[],c=0,g=0;c<r.length;c++,g+=8)l[g>>>5]|=r[c]<<24-g%32;return l},wordsToBytes:function(r){for(var l=[],c=0;c<r.length*32;c+=8)l.push(r[c>>>5]>>>24-c%32&255);return l},bytesToHex:function(r){for(var l=[],c=0;c<r.length;c++)l.push((r[c]>>>4).toString(16)),l.push((r[c]&15).toString(16));return l.join("")},hexToBytes:function(r){for(var l=[],c=0;c<r.length;c+=2)l.push(parseInt(r.substr(c,2),16));return l},bytesToBase64:function(r){for(var l=[],c=0;c<r.length;c+=3)for(var g=r[c]<<16|r[c+1]<<8|r[c+2],m=0;m<4;m++)c*8+m*6<=r.length*8?l.push(S.charAt(g>>>6*(3-m)&63)):l.push("=");return l.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var l=[],c=0,g=0;c<r.length;g=++c%4)g!=0&&l.push((S.indexOf(r.charAt(c-1))&Math.pow(2,-2*g+8)-1)<<g*2|S.indexOf(r.charAt(c))>>>6-g*2);return l}};io.exports=v})();var Fa=io.exports,Br={utf8:{stringToBytes:function(S){return Br.bin.stringToBytes(unescape(encodeURIComponent(S)))},bytesToString:function(S){return decodeURIComponent(escape(Br.bin.bytesToString(S)))}},bin:{stringToBytes:function(S){for(var v=[],r=0;r<S.length;r++)v.push(S.charCodeAt(r)&255);return v},bytesToString:function(S){for(var v=[],r=0;r<S.length;r++)v.push(String.fromCharCode(S[r]));return v.join("")}}},oo=Br;/*!
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 Mu=function(S){return S!=null&&(so(S)||Wu(S)||!!S._isBuffer)};function so(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function Wu(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&so(S.slice(0,0))}(function(){var S=Fu,v=oo.utf8,r=Mu,l=oo.bin,c=function(g,m){g.constructor==String?m&&m.encoding==="binary"?g=l.stringToBytes(g):g=v.stringToBytes(g):r(g)?g=Array.prototype.slice.call(g,0):!Array.isArray(g)&&g.constructor!==Uint8Array&&(g=g.toString());for(var d=S.bytesToWords(g),x=g.length*8,h=1732584193,_=-271733879,p=-1732584194,u=271733878,s=0;s<d.length;s++)d[s]=(d[s]<<8|d[s]>>>24)&16711935|(d[s]<<24|d[s]>>>8)&4278255360;d[x>>>5]|=128<<x%32,d[(x+64>>>9<<4)+14]=x;for(var w=c._ff,k=c._gg,E=c._hh,q=c._ii,s=0;s<d.length;s+=16){var oe=h,Y=_,se=p,G=u;h=w(h,_,p,u,d[s+0],7,-680876936),u=w(u,h,_,p,d[s+1],12,-389564586),p=w(p,u,h,_,d[s+2],17,606105819),_=w(_,p,u,h,d[s+3],22,-1044525330),h=w(h,_,p,u,d[s+4],7,-176418897),u=w(u,h,_,p,d[s+5],12,1200080426),p=w(p,u,h,_,d[s+6],17,-1473231341),_=w(_,p,u,h,d[s+7],22,-45705983),h=w(h,_,p,u,d[s+8],7,1770035416),u=w(u,h,_,p,d[s+9],12,-1958414417),p=w(p,u,h,_,d[s+10],17,-42063),_=w(_,p,u,h,d[s+11],22,-1990404162),h=w(h,_,p,u,d[s+12],7,1804603682),u=w(u,h,_,p,d[s+13],12,-40341101),p=w(p,u,h,_,d[s+14],17,-1502002290),_=w(_,p,u,h,d[s+15],22,1236535329),h=k(h,_,p,u,d[s+1],5,-165796510),u=k(u,h,_,p,d[s+6],9,-1069501632),p=k(p,u,h,_,d[s+11],14,643717713),_=k(_,p,u,h,d[s+0],20,-373897302),h=k(h,_,p,u,d[s+5],5,-701558691),u=k(u,h,_,p,d[s+10],9,38016083),p=k(p,u,h,_,d[s+15],14,-660478335),_=k(_,p,u,h,d[s+4],20,-405537848),h=k(h,_,p,u,d[s+9],5,568446438),u=k(u,h,_,p,d[s+14],9,-1019803690),p=k(p,u,h,_,d[s+3],14,-187363961),_=k(_,p,u,h,d[s+8],20,1163531501),h=k(h,_,p,u,d[s+13],5,-1444681467),u=k(u,h,_,p,d[s+2],9,-51403784),p=k(p,u,h,_,d[s+7],14,1735328473),_=k(_,p,u,h,d[s+12],20,-1926607734),h=E(h,_,p,u,d[s+5],4,-378558),u=E(u,h,_,p,d[s+8],11,-2022574463),p=E(p,u,h,_,d[s+11],16,1839030562),_=E(_,p,u,h,d[s+14],23,-35309556),h=E(h,_,p,u,d[s+1],4,-1530992060),u=E(u,h,_,p,d[s+4],11,1272893353),p=E(p,u,h,_,d[s+7],16,-155497632),_=E(_,p,u,h,d[s+10],23,-1094730640),h=E(h,_,p,u,d[s+13],4,681279174),u=E(u,h,_,p,d[s+0],11,-358537222),p=E(p,u,h,_,d[s+3],16,-722521979),_=E(_,p,u,h,d[s+6],23,76029189),h=E(h,_,p,u,d[s+9],4,-640364487),u=E(u,h,_,p,d[s+12],11,-421815835),p=E(p,u,h,_,d[s+15],16,530742520),_=E(_,p,u,h,d[s+2],23,-995338651),h=q(h,_,p,u,d[s+0],6,-198630844),u=q(u,h,_,p,d[s+7],10,1126891415),p=q(p,u,h,_,d[s+14],15,-1416354905),_=q(_,p,u,h,d[s+5],21,-57434055),h=q(h,_,p,u,d[s+12],6,1700485571),u=q(u,h,_,p,d[s+3],10,-1894986606),p=q(p,u,h,_,d[s+10],15,-1051523),_=q(_,p,u,h,d[s+1],21,-2054922799),h=q(h,_,p,u,d[s+8],6,1873313359),u=q(u,h,_,p,d[s+15],10,-30611744),p=q(p,u,h,_,d[s+6],15,-1560198380),_=q(_,p,u,h,d[s+13],21,1309151649),h=q(h,_,p,u,d[s+4],6,-145523070),u=q(u,h,_,p,d[s+11],10,-1120210379),p=q(p,u,h,_,d[s+2],15,718787259),_=q(_,p,u,h,d[s+9],21,-343485551),h=h+oe>>>0,_=_+Y>>>0,p=p+se>>>0,u=u+G>>>0}return S.endian([h,_,p,u])};c._ff=function(g,m,d,x,h,_,p){var u=g+(m&d|~m&x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._gg=function(g,m,d,x,h,_,p){var u=g+(m&x|d&~x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._hh=function(g,m,d,x,h,_,p){var u=g+(m^d^x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._ii=function(g,m,d,x,h,_,p){var u=g+(d^(m|~x))+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._blocksize=16,c._digestsize=16,ro.exports=function(g,m){if(g==null)throw new Error("Illegal argument "+g);var d=S.wordsToBytes(c(g,m));return m&&m.asBytes?d:m&&m.asString?l.bytesToString(d):S.bytesToHex(d)}})();var qu=ro.exports;const Ku=Zt(qu);var Vt=(S=>(S.MAIN="main",S.NEXT="next",S))(Vt||{}),Et=(S=>(S.USER="User",S.TOKEN="Token",S))(Et||{});class xn{static async getSessionStorageDataByKey(v,r=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const l=await chrome.storage.session.get(v);if(l[v])return r?JSON.parse(l[v]):l[v]}if(typeof window<"u"){const l=window.sessionStorage.getItem(v);if(l)return r?JSON.parse(l):l}}static async updateSessionStorageKey(v,r){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[v]:JSON.stringify(r)}),typeof window<"u"&&window.sessionStorage.setItem(v,JSON.stringify(r))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var Mt=(S=>(S.INFO="INFO",S.WARN="WARN",S.ERROR="ERROR",S))(Mt||{});class Hu{constructor(v){Se(this,"delay",1e3);Se(this,"lastLoginTimestamp");Se(this,"token");Se(this,"storageKey");this.eventsSdkClass=v,this.eventsSdkClass=v,this.storageKey=""}async login(v){const r={token:v.token,email:v.email,password:v.password};if(this.storageKey=Ku(JSON.stringify(v)),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(xn.clearSessionStorage(),await this.userLoginFunction(r,this.storageKey,v.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(v){const r=await xn.getSessionStorageDataByKey(v);return r?(this.onLoginResponse(r),!0):!1}async userLoginFunction(v,r,l){let c,g,m;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),g=await this.getSettings(c.Data.AccessToken),m={...c.Data,...g}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),m={...c.Data.Socket}),this.onLoginResponse(m),await xn.updateSessionStorageKey(r,m)}onLoginResponse(v){if(v.MonitorList&&v.MonitorList.length&&(this.eventsSdkClass.servers=[...v.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&v.URLList&&(this.eventsSdkClass.URLList=v.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.loggerClass.init()),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${v.Client}`),v.IdentityCode&&(this.token=v.IdentityCode,this.eventsSdkClass.connect(Vt.MAIN)),v.Token&&(this.token=v.Token,this.eventsSdkClass.connect(Vt.MAIN)),v.RefreshToken&&v.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Et.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.IdentityCodeExpiry,this.handleTokenExpiry()),v.RefreshToken&&v.TokenExpiry&&this.eventsSdkClass.options.loginType===Et.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let v;if(this.eventsSdkClass.options.tokenExpiry)v=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const r=v.getTime()-new Date().getTime()-5e3,l=Math.min(r,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,g;if(this.eventsSdkClass.options.isNewStack){const m=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(m.Data.AccessToken),g={...m.Data,...c}}else g={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(g),await xn.updateSessionStorageKey(this.storageKey,g)}},l)}async externalLogin(v,{password:r,token:l,email:c},g){if(!v)throw new Error("loginUrl not provided");let m;this.eventsSdkClass.options.isNewStack?g===Et.TOKEN?m=JSON.stringify({identityType:Et.TOKEN,token:l}):m=JSON.stringify({identityType:Et.USER,username:c,password:r}):this.eventsSdkClass.options.loginType===Et.TOKEN?(m=JSON.stringify({token:l}),v=`${v}/${Et.TOKEN}`):(m=JSON.stringify({email:c,pin:r}),v=`${v}/${Et.USER}`);try{const d=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:m});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 x=await d.json();if(x.error)throw new Error(x.error);return x}catch(d){throw this.eventsSdkClass.loggerClass.log(Mt.ERROR,`External login ${v}`,d),d}}async getSettings(v){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const r=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${v}`}});if(!r.ok&&r.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return r.json()}catch(r){throw this.eventsSdkClass.loggerClass.log(Mt.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,r),r}}async refreshToken(v,r){try{return(await fetch(v,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}})).json()}catch(l){throw this.eventsSdkClass.loggerClass.log(Mt.ERROR,`Refresh token ${v}`,l),l}}}var Gn={exports:{}};/**
6
+ */var Ma=function(S){return S!=null&&(so(S)||Wa(S)||!!S._isBuffer)};function so(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function Wa(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&so(S.slice(0,0))}(function(){var S=Fa,v=oo.utf8,r=Ma,l=oo.bin,c=function(g,m){g.constructor==String?m&&m.encoding==="binary"?g=l.stringToBytes(g):g=v.stringToBytes(g):r(g)?g=Array.prototype.slice.call(g,0):!Array.isArray(g)&&g.constructor!==Uint8Array&&(g=g.toString());for(var d=S.bytesToWords(g),A=g.length*8,h=1732584193,_=-271733879,p=-1732584194,a=271733878,s=0;s<d.length;s++)d[s]=(d[s]<<8|d[s]>>>24)&16711935|(d[s]<<24|d[s]>>>8)&4278255360;d[A>>>5]|=128<<A%32,d[(A+64>>>9<<4)+14]=A;for(var w=c._ff,k=c._gg,T=c._hh,q=c._ii,s=0;s<d.length;s+=16){var oe=h,Y=_,se=p,z=a;h=w(h,_,p,a,d[s+0],7,-680876936),a=w(a,h,_,p,d[s+1],12,-389564586),p=w(p,a,h,_,d[s+2],17,606105819),_=w(_,p,a,h,d[s+3],22,-1044525330),h=w(h,_,p,a,d[s+4],7,-176418897),a=w(a,h,_,p,d[s+5],12,1200080426),p=w(p,a,h,_,d[s+6],17,-1473231341),_=w(_,p,a,h,d[s+7],22,-45705983),h=w(h,_,p,a,d[s+8],7,1770035416),a=w(a,h,_,p,d[s+9],12,-1958414417),p=w(p,a,h,_,d[s+10],17,-42063),_=w(_,p,a,h,d[s+11],22,-1990404162),h=w(h,_,p,a,d[s+12],7,1804603682),a=w(a,h,_,p,d[s+13],12,-40341101),p=w(p,a,h,_,d[s+14],17,-1502002290),_=w(_,p,a,h,d[s+15],22,1236535329),h=k(h,_,p,a,d[s+1],5,-165796510),a=k(a,h,_,p,d[s+6],9,-1069501632),p=k(p,a,h,_,d[s+11],14,643717713),_=k(_,p,a,h,d[s+0],20,-373897302),h=k(h,_,p,a,d[s+5],5,-701558691),a=k(a,h,_,p,d[s+10],9,38016083),p=k(p,a,h,_,d[s+15],14,-660478335),_=k(_,p,a,h,d[s+4],20,-405537848),h=k(h,_,p,a,d[s+9],5,568446438),a=k(a,h,_,p,d[s+14],9,-1019803690),p=k(p,a,h,_,d[s+3],14,-187363961),_=k(_,p,a,h,d[s+8],20,1163531501),h=k(h,_,p,a,d[s+13],5,-1444681467),a=k(a,h,_,p,d[s+2],9,-51403784),p=k(p,a,h,_,d[s+7],14,1735328473),_=k(_,p,a,h,d[s+12],20,-1926607734),h=T(h,_,p,a,d[s+5],4,-378558),a=T(a,h,_,p,d[s+8],11,-2022574463),p=T(p,a,h,_,d[s+11],16,1839030562),_=T(_,p,a,h,d[s+14],23,-35309556),h=T(h,_,p,a,d[s+1],4,-1530992060),a=T(a,h,_,p,d[s+4],11,1272893353),p=T(p,a,h,_,d[s+7],16,-155497632),_=T(_,p,a,h,d[s+10],23,-1094730640),h=T(h,_,p,a,d[s+13],4,681279174),a=T(a,h,_,p,d[s+0],11,-358537222),p=T(p,a,h,_,d[s+3],16,-722521979),_=T(_,p,a,h,d[s+6],23,76029189),h=T(h,_,p,a,d[s+9],4,-640364487),a=T(a,h,_,p,d[s+12],11,-421815835),p=T(p,a,h,_,d[s+15],16,530742520),_=T(_,p,a,h,d[s+2],23,-995338651),h=q(h,_,p,a,d[s+0],6,-198630844),a=q(a,h,_,p,d[s+7],10,1126891415),p=q(p,a,h,_,d[s+14],15,-1416354905),_=q(_,p,a,h,d[s+5],21,-57434055),h=q(h,_,p,a,d[s+12],6,1700485571),a=q(a,h,_,p,d[s+3],10,-1894986606),p=q(p,a,h,_,d[s+10],15,-1051523),_=q(_,p,a,h,d[s+1],21,-2054922799),h=q(h,_,p,a,d[s+8],6,1873313359),a=q(a,h,_,p,d[s+15],10,-30611744),p=q(p,a,h,_,d[s+6],15,-1560198380),_=q(_,p,a,h,d[s+13],21,1309151649),h=q(h,_,p,a,d[s+4],6,-145523070),a=q(a,h,_,p,d[s+11],10,-1120210379),p=q(p,a,h,_,d[s+2],15,718787259),_=q(_,p,a,h,d[s+9],21,-343485551),h=h+oe>>>0,_=_+Y>>>0,p=p+se>>>0,a=a+z>>>0}return S.endian([h,_,p,a])};c._ff=function(g,m,d,A,h,_,p){var a=g+(m&d|~m&A)+(h>>>0)+p;return(a<<_|a>>>32-_)+m},c._gg=function(g,m,d,A,h,_,p){var a=g+(m&A|d&~A)+(h>>>0)+p;return(a<<_|a>>>32-_)+m},c._hh=function(g,m,d,A,h,_,p){var a=g+(m^d^A)+(h>>>0)+p;return(a<<_|a>>>32-_)+m},c._ii=function(g,m,d,A,h,_,p){var a=g+(d^(m|~A))+(h>>>0)+p;return(a<<_|a>>>32-_)+m},c._blocksize=16,c._digestsize=16,ro.exports=function(g,m){if(g==null)throw new Error("Illegal argument "+g);var d=S.wordsToBytes(c(g,m));return m&&m.asBytes?d:m&&m.asString?l.bytesToString(d):S.bytesToHex(d)}})();var qa=ro.exports;const Ka=Zt(qa);var Vt=(S=>(S.MAIN="main",S.NEXT="next",S))(Vt||{}),Rt=(S=>(S.USER="User",S.TOKEN="Token",S))(Rt||{});class An{static async getSessionStorageDataByKey(v,r=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const l=await chrome.storage.session.get(v);if(l[v])return r?JSON.parse(l[v]):l[v]}if(typeof window<"u"){const l=window.sessionStorage.getItem(v);if(l)return r?JSON.parse(l):l}}static async updateSessionStorageKey(v,r){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[v]:JSON.stringify(r)}),typeof window<"u"&&window.sessionStorage.setItem(v,JSON.stringify(r))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var We=(S=>(S.INFO="INFO",S.WARN="WARN",S.ERROR="ERROR",S))(We||{});class Ha{constructor(v){me(this,"delay",1e3);me(this,"lastLoginTimestamp");me(this,"token");me(this,"storageKey");this.eventsSdkClass=v,this.eventsSdkClass=v,this.storageKey=""}async login(v){const r={token:v.token,email:v.email,password:v.password};if(this.storageKey=Ka(JSON.stringify({...v,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(An.clearSessionStorage(),await this.userLoginFunction(r,this.storageKey,v.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(v){const r=await An.getSessionStorageDataByKey(v);return r?(this.eventsSdkClass.loggerClass.log(We.INFO,"got data from session",r),this.onLoginResponse(r),!0):!1}async userLoginFunction(v,r,l){let c,g,m;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),g=await this.getSettings(c.Data.AccessToken),m={...c.Data,...g}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),m={...c.Data.Socket}),this.onLoginResponse(m),await An.updateSessionStorageKey(r,m)}onLoginResponse(v){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),v.MonitorList&&v.MonitorList.length&&(this.eventsSdkClass.servers=[...v.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&v.URLList&&(this.eventsSdkClass.URLList=v.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.loggerClass.init()),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${v.Client}`),v.IdentityCode&&(this.token=v.IdentityCode,this.eventsSdkClass.connect(Vt.MAIN)),v.Token&&(this.token=v.Token,this.eventsSdkClass.connect(Vt.MAIN)),v.RefreshToken&&v.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Rt.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.IdentityCodeExpiry,this.handleTokenExpiry()),v.RefreshToken&&v.TokenExpiry&&this.eventsSdkClass.options.loginType===Rt.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let v;if(this.eventsSdkClass.options.tokenExpiry)v=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const r=v.getTime()-new Date().getTime()-5e3,l=Math.min(r,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,g;if(this.eventsSdkClass.options.isNewStack){const m=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(m.Data.AccessToken),g={...m.Data,...c}}else g={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(g),await An.updateSessionStorageKey(this.storageKey,g)}},l)}async externalLogin(v,{password:r,token:l,email:c},g){if(!v)throw new Error("loginUrl not provided");let m;this.eventsSdkClass.options.isNewStack?g===Rt.TOKEN?m=JSON.stringify({identityType:Rt.TOKEN,token:l}):m=JSON.stringify({identityType:Rt.USER,username:c,password:r}):this.eventsSdkClass.options.loginType===Rt.TOKEN?(m=JSON.stringify({token:l}),v=`${v}/${Rt.TOKEN}`):(m=JSON.stringify({email:c,pin:r}),v=`${v}/${Rt.USER}`);try{const d=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:m});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 A=await d.json();if(A.error)throw new Error(A.error);return A}catch(d){throw this.eventsSdkClass.loggerClass.log(We.ERROR,`External login ${v}`,d),d}}async getSettings(v){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const r=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${v}`}});if(!r.ok&&r.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return r.json()}catch(r){throw this.eventsSdkClass.loggerClass.log(We.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,r),r}}async refreshToken(v,r){try{return(await fetch(v,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}})).json()}catch(l){throw this.eventsSdkClass.loggerClass.log(We.ERROR,`Refresh token ${v}`,l),l}}}var zn={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
- */Gn.exports,function(S,v){(function(){var r,l="4.17.21",c=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",d="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",h=500,_="__lodash_placeholder__",p=1,u=2,s=4,w=1,k=2,E=1,q=2,oe=4,Y=8,se=16,G=32,D=64,M=128,H=256,O=512,U=30,X="...",j=800,V=16,B=1,Ae=2,xe=3,Ee=1/0,ae=9007199254740991,We=17976931348623157e292,bt=NaN,et=4294967295,zn=et-1,W=et>>>1,J=[["ary",M],["bind",E],["bindKey",q],["curry",Y],["curryRight",se],["flip",O],["partial",G],["partialRight",D],["rearg",H]],F="[object Arguments]",te="[object Array]",P="[object AsyncFunction]",Q="[object Boolean]",ee="[object Date]",$="[object DOMException]",ue="[object Error]",me="[object Function]",qe="[object GeneratorFunction]",Re="[object Map]",vt="[object Number]",Cn="[object Null]",tt="[object Object]",an="[object Promise]",kn="[object Proxy]",Ge="[object RegExp]",ze="[object Set]",At="[object String]",xt="[object Symbol]",Tn="[object Undefined]",Rt="[object WeakMap]",En="[object WeakSet]",Wt="[object ArrayBuffer]",fn="[object DataView]",Dr="[object Float32Array]",Pr="[object Float64Array]",Fr="[object Int8Array]",Mr="[object Int16Array]",Wr="[object Int32Array]",qr="[object Uint8Array]",Kr="[object Uint8ClampedArray]",Hr="[object Uint16Array]",Gr="[object Uint32Array]",ea=/\b__p \+= '';/g,ta=/\b(__p \+=) '' \+/g,na=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ao=/&(?:amp|lt|gt|quot|#39);/g,fo=/[&<>"']/g,ra=RegExp(ao.source),ia=RegExp(fo.source),oa=/<%-([\s\S]+?)%>/g,sa=/<%([\s\S]+?)%>/g,co=/<%=([\s\S]+?)%>/g,ua=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aa=/^\w*$/,fa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/[\\^$.*+?()[\]{}|]/g,ca=RegExp(zr.source),$r=/^\s+/,la=/\s/,ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pa=/\{\n\/\* \[wrapped with (.+)\] \*/,da=/,? & /,ga=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,va=/[()=,{}\[\]\/\s]/,ya=/\\(\\)?/g,_a=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lo=/\w*$/,ma=/^[-+]0x[0-9a-f]+$/i,wa=/^0b[01]+$/i,Sa=/^\[object .+?Constructor\]$/,ba=/^0o[0-7]+$/i,Aa=/^(?:0|[1-9]\d*)$/,xa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$n=/($^)/,Ca=/['\n\r\u2028\u2029\\]/g,Xn="\\ud800-\\udfff",ka="\\u0300-\\u036f",Ta="\\ufe20-\\ufe2f",Ea="\\u20d0-\\u20ff",ho=ka+Ta+Ea,po="\\u2700-\\u27bf",go="a-z\\xdf-\\xf6\\xf8-\\xff",Ra="\\xac\\xb1\\xd7\\xf7",La="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ia="\\u2000-\\u206f",Oa=" \\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",vo="A-Z\\xc0-\\xd6\\xd8-\\xde",yo="\\ufe0e\\ufe0f",_o=Ra+La+Ia+Oa,Xr="['’]",Na="["+Xn+"]",mo="["+_o+"]",Jn="["+ho+"]",wo="\\d+",Ba="["+po+"]",So="["+go+"]",bo="[^"+Xn+_o+wo+po+go+vo+"]",Jr="\\ud83c[\\udffb-\\udfff]",Ua="(?:"+Jn+"|"+Jr+")",Ao="[^"+Xn+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",Zr="[\\ud800-\\udbff][\\udc00-\\udfff]",cn="["+vo+"]",xo="\\u200d",Co="(?:"+So+"|"+bo+")",Da="(?:"+cn+"|"+bo+")",ko="(?:"+Xr+"(?:d|ll|m|re|s|t|ve))?",To="(?:"+Xr+"(?:D|LL|M|RE|S|T|VE))?",Eo=Ua+"?",Ro="["+yo+"]?",Pa="(?:"+xo+"(?:"+[Ao,Yr,Zr].join("|")+")"+Ro+Eo+")*",Fa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ma="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lo=Ro+Eo+Pa,Wa="(?:"+[Ba,Yr,Zr].join("|")+")"+Lo,qa="(?:"+[Ao+Jn+"?",Jn,Yr,Zr,Na].join("|")+")",Ka=RegExp(Xr,"g"),Ha=RegExp(Jn,"g"),Vr=RegExp(Jr+"(?="+Jr+")|"+qa+Lo,"g"),Ga=RegExp([cn+"?"+So+"+"+ko+"(?="+[mo,cn,"$"].join("|")+")",Da+"+"+To+"(?="+[mo,cn+Co,"$"].join("|")+")",cn+"?"+Co+"+"+ko,cn+"+"+To,Ma,Fa,wo,Wa].join("|"),"g"),za=RegExp("["+xo+Xn+ho+yo+"]"),$a=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xa=["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"],Ja=-1,Te={};Te[Dr]=Te[Pr]=Te[Fr]=Te[Mr]=Te[Wr]=Te[qr]=Te[Kr]=Te[Hr]=Te[Gr]=!0,Te[F]=Te[te]=Te[Wt]=Te[Q]=Te[fn]=Te[ee]=Te[ue]=Te[me]=Te[Re]=Te[vt]=Te[tt]=Te[Ge]=Te[ze]=Te[At]=Te[Rt]=!1;var ke={};ke[F]=ke[te]=ke[Wt]=ke[fn]=ke[Q]=ke[ee]=ke[Dr]=ke[Pr]=ke[Fr]=ke[Mr]=ke[Wr]=ke[Re]=ke[vt]=ke[tt]=ke[Ge]=ke[ze]=ke[At]=ke[xt]=ke[qr]=ke[Kr]=ke[Hr]=ke[Gr]=!0,ke[ue]=ke[me]=ke[Rt]=!1;var Ya={À:"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"},Za={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Va={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Qa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ja=parseFloat,ef=parseInt,Io=typeof je=="object"&&je&&je.Object===Object&&je,tf=typeof self=="object"&&self&&self.Object===Object&&self,Fe=Io||tf||Function("return this")(),Qr=v&&!v.nodeType&&v,Qt=Qr&&!0&&S&&!S.nodeType&&S,Oo=Qt&&Qt.exports===Qr,jr=Oo&&Io.process,at=function(){try{var A=Qt&&Qt.require&&Qt.require("util").types;return A||jr&&jr.binding&&jr.binding("util")}catch{}}(),No=at&&at.isArrayBuffer,Bo=at&&at.isDate,Uo=at&&at.isMap,Do=at&&at.isRegExp,Po=at&&at.isSet,Fo=at&&at.isTypedArray;function nt(A,R,T){switch(T.length){case 0:return A.call(R);case 1:return A.call(R,T[0]);case 2:return A.call(R,T[0],T[1]);case 3:return A.call(R,T[0],T[1],T[2])}return A.apply(R,T)}function nf(A,R,T,z){for(var fe=-1,_e=A==null?0:A.length;++fe<_e;){var Ue=A[fe];R(z,Ue,T(Ue),A)}return z}function ft(A,R){for(var T=-1,z=A==null?0:A.length;++T<z&&R(A[T],T,A)!==!1;);return A}function rf(A,R){for(var T=A==null?0:A.length;T--&&R(A[T],T,A)!==!1;);return A}function Mo(A,R){for(var T=-1,z=A==null?0:A.length;++T<z;)if(!R(A[T],T,A))return!1;return!0}function qt(A,R){for(var T=-1,z=A==null?0:A.length,fe=0,_e=[];++T<z;){var Ue=A[T];R(Ue,T,A)&&(_e[fe++]=Ue)}return _e}function Yn(A,R){var T=A==null?0:A.length;return!!T&&ln(A,R,0)>-1}function ei(A,R,T){for(var z=-1,fe=A==null?0:A.length;++z<fe;)if(T(R,A[z]))return!0;return!1}function Le(A,R){for(var T=-1,z=A==null?0:A.length,fe=Array(z);++T<z;)fe[T]=R(A[T],T,A);return fe}function Kt(A,R){for(var T=-1,z=R.length,fe=A.length;++T<z;)A[fe+T]=R[T];return A}function ti(A,R,T,z){var fe=-1,_e=A==null?0:A.length;for(z&&_e&&(T=A[++fe]);++fe<_e;)T=R(T,A[fe],fe,A);return T}function of(A,R,T,z){var fe=A==null?0:A.length;for(z&&fe&&(T=A[--fe]);fe--;)T=R(T,A[fe],fe,A);return T}function ni(A,R){for(var T=-1,z=A==null?0:A.length;++T<z;)if(R(A[T],T,A))return!0;return!1}var sf=ri("length");function uf(A){return A.split("")}function af(A){return A.match(ga)||[]}function Wo(A,R,T){var z;return T(A,function(fe,_e,Ue){if(R(fe,_e,Ue))return z=_e,!1}),z}function Zn(A,R,T,z){for(var fe=A.length,_e=T+(z?1:-1);z?_e--:++_e<fe;)if(R(A[_e],_e,A))return _e;return-1}function ln(A,R,T){return R===R?wf(A,R,T):Zn(A,qo,T)}function ff(A,R,T,z){for(var fe=T-1,_e=A.length;++fe<_e;)if(z(A[fe],R))return fe;return-1}function qo(A){return A!==A}function Ko(A,R){var T=A==null?0:A.length;return T?oi(A,R)/T:bt}function ri(A){return function(R){return R==null?r:R[A]}}function ii(A){return function(R){return A==null?r:A[R]}}function Ho(A,R,T,z,fe){return fe(A,function(_e,Ue,Ce){T=z?(z=!1,_e):R(T,_e,Ue,Ce)}),T}function cf(A,R){var T=A.length;for(A.sort(R);T--;)A[T]=A[T].value;return A}function oi(A,R){for(var T,z=-1,fe=A.length;++z<fe;){var _e=R(A[z]);_e!==r&&(T=T===r?_e:T+_e)}return T}function si(A,R){for(var T=-1,z=Array(A);++T<A;)z[T]=R(T);return z}function lf(A,R){return Le(R,function(T){return[T,A[T]]})}function Go(A){return A&&A.slice(0,Jo(A)+1).replace($r,"")}function rt(A){return function(R){return A(R)}}function ui(A,R){return Le(R,function(T){return A[T]})}function Rn(A,R){return A.has(R)}function zo(A,R){for(var T=-1,z=A.length;++T<z&&ln(R,A[T],0)>-1;);return T}function $o(A,R){for(var T=A.length;T--&&ln(R,A[T],0)>-1;);return T}function hf(A,R){for(var T=A.length,z=0;T--;)A[T]===R&&++z;return z}var pf=ii(Ya),df=ii(Za);function gf(A){return"\\"+Qa[A]}function vf(A,R){return A==null?r:A[R]}function hn(A){return za.test(A)}function yf(A){return $a.test(A)}function _f(A){for(var R,T=[];!(R=A.next()).done;)T.push(R.value);return T}function ai(A){var R=-1,T=Array(A.size);return A.forEach(function(z,fe){T[++R]=[fe,z]}),T}function Xo(A,R){return function(T){return A(R(T))}}function Ht(A,R){for(var T=-1,z=A.length,fe=0,_e=[];++T<z;){var Ue=A[T];(Ue===R||Ue===_)&&(A[T]=_,_e[fe++]=T)}return _e}function Vn(A){var R=-1,T=Array(A.size);return A.forEach(function(z){T[++R]=z}),T}function mf(A){var R=-1,T=Array(A.size);return A.forEach(function(z){T[++R]=[z,z]}),T}function wf(A,R,T){for(var z=T-1,fe=A.length;++z<fe;)if(A[z]===R)return z;return-1}function Sf(A,R,T){for(var z=T+1;z--;)if(A[z]===R)return z;return z}function pn(A){return hn(A)?Af(A):sf(A)}function yt(A){return hn(A)?xf(A):uf(A)}function Jo(A){for(var R=A.length;R--&&la.test(A.charAt(R)););return R}var bf=ii(Va);function Af(A){for(var R=Vr.lastIndex=0;Vr.test(A);)++R;return R}function xf(A){return A.match(Vr)||[]}function Cf(A){return A.match(Ga)||[]}var kf=function A(R){R=R==null?Fe:dn.defaults(Fe.Object(),R,dn.pick(Fe,Xa));var T=R.Array,z=R.Date,fe=R.Error,_e=R.Function,Ue=R.Math,Ce=R.Object,fi=R.RegExp,Tf=R.String,ct=R.TypeError,Qn=T.prototype,Ef=_e.prototype,gn=Ce.prototype,jn=R["__core-js_shared__"],er=Ef.toString,be=gn.hasOwnProperty,Rf=0,Yo=function(){var e=/[^.]+$/.exec(jn&&jn.keys&&jn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),tr=gn.toString,Lf=er.call(Ce),If=Fe._,Of=fi("^"+er.call(be).replace(zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=Oo?R.Buffer:r,Gt=R.Symbol,rr=R.Uint8Array,Zo=nr?nr.allocUnsafe:r,ir=Xo(Ce.getPrototypeOf,Ce),Vo=Ce.create,Qo=gn.propertyIsEnumerable,or=Qn.splice,jo=Gt?Gt.isConcatSpreadable:r,Ln=Gt?Gt.iterator:r,jt=Gt?Gt.toStringTag:r,sr=function(){try{var e=on(Ce,"defineProperty");return e({},"",{}),e}catch{}}(),Nf=R.clearTimeout!==Fe.clearTimeout&&R.clearTimeout,Bf=z&&z.now!==Fe.Date.now&&z.now,Uf=R.setTimeout!==Fe.setTimeout&&R.setTimeout,ur=Ue.ceil,ar=Ue.floor,ci=Ce.getOwnPropertySymbols,Df=nr?nr.isBuffer:r,es=R.isFinite,Pf=Qn.join,Ff=Xo(Ce.keys,Ce),De=Ue.max,Ke=Ue.min,Mf=z.now,Wf=R.parseInt,ts=Ue.random,qf=Qn.reverse,li=on(R,"DataView"),In=on(R,"Map"),hi=on(R,"Promise"),vn=on(R,"Set"),On=on(R,"WeakMap"),Nn=on(Ce,"create"),fr=On&&new On,yn={},Kf=sn(li),Hf=sn(In),Gf=sn(hi),zf=sn(vn),$f=sn(On),cr=Gt?Gt.prototype:r,Bn=cr?cr.valueOf:r,ns=cr?cr.toString:r;function a(e){if(Oe(e)&&!ce(e)&&!(e instanceof ge)){if(e instanceof lt)return e;if(be.call(e,"__wrapped__"))return ru(e)}return new lt(e)}var _n=function(){function e(){}return function(t){if(!Ie(t))return{};if(Vo)return Vo(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function lr(){}function lt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}a.templateSettings={escape:oa,evaluate:sa,interpolate:co,variable:"",imports:{_:a}},a.prototype=lr.prototype,a.prototype.constructor=a,lt.prototype=_n(lr.prototype),lt.prototype.constructor=lt;function ge(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]}function Xf(){var e=new ge(this.__wrapped__);return e.__actions__=Ye(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ye(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ye(this.__views__),e}function Jf(){if(this.__filtered__){var e=new ge(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Yf(){var e=this.__wrapped__.value(),t=this.__dir__,n=ce(e),i=t<0,o=n?e.length:0,f=ul(0,o,this.__views__),y=f.start,b=f.end,C=b-y,L=i?b:y-1,I=this.__iteratees__,N=I.length,K=0,Z=Ke(C,this.__takeCount__);if(!n||!i&&o==C&&Z==C)return ks(e,this.__actions__);var re=[];e:for(;C--&&K<Z;){L+=t;for(var he=-1,ie=e[L];++he<N;){var de=I[he],ye=de.iteratee,st=de.type,Je=ye(ie);if(st==Ae)ie=Je;else if(!Je){if(st==B)continue e;break e}}re[K++]=ie}return re}ge.prototype=_n(lr.prototype),ge.prototype.constructor=ge;function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Zf(){this.__data__=Nn?Nn(null):{},this.size=0}function Vf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Qf(e){var t=this.__data__;if(Nn){var n=t[e];return n===x?r:n}return be.call(t,e)?t[e]:r}function jf(e){var t=this.__data__;return Nn?t[e]!==r:be.call(t,e)}function ec(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nn&&t===r?x:t,this}en.prototype.clear=Zf,en.prototype.delete=Vf,en.prototype.get=Qf,en.prototype.has=jf,en.prototype.set=ec;function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function tc(){this.__data__=[],this.size=0}function nc(e){var t=this.__data__,n=hr(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():or.call(t,n,1),--this.size,!0}function rc(e){var t=this.__data__,n=hr(t,e);return n<0?r:t[n][1]}function ic(e){return hr(this.__data__,e)>-1}function oc(e,t){var n=this.__data__,i=hr(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}Lt.prototype.clear=tc,Lt.prototype.delete=nc,Lt.prototype.get=rc,Lt.prototype.has=ic,Lt.prototype.set=oc;function It(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function sc(){this.size=0,this.__data__={hash:new en,map:new(In||Lt),string:new en}}function uc(e){var t=xr(this,e).delete(e);return this.size-=t?1:0,t}function ac(e){return xr(this,e).get(e)}function fc(e){return xr(this,e).has(e)}function cc(e,t){var n=xr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}It.prototype.clear=sc,It.prototype.delete=uc,It.prototype.get=ac,It.prototype.has=fc,It.prototype.set=cc;function tn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new It;++t<n;)this.add(e[t])}function lc(e){return this.__data__.set(e,x),this}function hc(e){return this.__data__.has(e)}tn.prototype.add=tn.prototype.push=lc,tn.prototype.has=hc;function _t(e){var t=this.__data__=new Lt(e);this.size=t.size}function pc(){this.__data__=new Lt,this.size=0}function dc(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function gc(e){return this.__data__.get(e)}function vc(e){return this.__data__.has(e)}function yc(e,t){var n=this.__data__;if(n instanceof Lt){var i=n.__data__;if(!In||i.length<c-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new It(i)}return n.set(e,t),this.size=n.size,this}_t.prototype.clear=pc,_t.prototype.delete=dc,_t.prototype.get=gc,_t.prototype.has=vc,_t.prototype.set=yc;function rs(e,t){var n=ce(e),i=!n&&un(e),o=!n&&!i&&Yt(e),f=!n&&!i&&!o&&bn(e),y=n||i||o||f,b=y?si(e.length,Tf):[],C=b.length;for(var L in e)(t||be.call(e,L))&&!(y&&(L=="length"||o&&(L=="offset"||L=="parent")||f&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||Ut(L,C)))&&b.push(L);return b}function is(e){var t=e.length;return t?e[Ai(0,t-1)]:r}function _c(e,t){return Cr(Ye(e),nn(t,0,e.length))}function mc(e){return Cr(Ye(e))}function pi(e,t,n){(n!==r&&!mt(e[t],n)||n===r&&!(t in e))&&Ot(e,t,n)}function Un(e,t,n){var i=e[t];(!(be.call(e,t)&&mt(i,n))||n===r&&!(t in e))&&Ot(e,t,n)}function hr(e,t){for(var n=e.length;n--;)if(mt(e[n][0],t))return n;return-1}function wc(e,t,n,i){return zt(e,function(o,f,y){t(i,o,n(o),y)}),i}function os(e,t){return e&&kt(t,Pe(t),e)}function Sc(e,t){return e&&kt(t,Ve(t),e)}function Ot(e,t,n){t=="__proto__"&&sr?sr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function di(e,t){for(var n=-1,i=t.length,o=T(i),f=e==null;++n<i;)o[n]=f?r:Ji(e,t[n]);return o}function nn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ht(e,t,n,i,o,f){var y,b=t&p,C=t&u,L=t&s;if(n&&(y=o?n(e,i,o,f):n(e)),y!==r)return y;if(!Ie(e))return e;var I=ce(e);if(I){if(y=fl(e),!b)return Ye(e,y)}else{var N=He(e),K=N==me||N==qe;if(Yt(e))return Rs(e,b);if(N==tt||N==F||K&&!o){if(y=C||K?{}:Js(e),!b)return C?Qc(e,Sc(y,e)):Vc(e,os(y,e))}else{if(!ke[N])return o?e:{};y=cl(e,N,b)}}f||(f=new _t);var Z=f.get(e);if(Z)return Z;f.set(e,y),Au(e)?e.forEach(function(ie){y.add(ht(ie,t,n,ie,e,f))}):Su(e)&&e.forEach(function(ie,de){y.set(de,ht(ie,t,n,de,e,f))});var re=L?C?Bi:Ni:C?Ve:Pe,he=I?r:re(e);return ft(he||e,function(ie,de){he&&(de=ie,ie=e[de]),Un(y,de,ht(ie,t,n,de,e,f))}),y}function bc(e){var t=Pe(e);return function(n){return ss(n,e,t)}}function ss(e,t,n){var i=n.length;if(e==null)return!i;for(e=Ce(e);i--;){var o=n[i],f=t[o],y=e[o];if(y===r&&!(o in e)||!f(y))return!1}return!0}function us(e,t,n){if(typeof e!="function")throw new ct(m);return Kn(function(){e.apply(r,n)},t)}function Dn(e,t,n,i){var o=-1,f=Yn,y=!0,b=e.length,C=[],L=t.length;if(!b)return C;n&&(t=Le(t,rt(n))),i?(f=ei,y=!1):t.length>=c&&(f=Rn,y=!1,t=new tn(t));e:for(;++o<b;){var I=e[o],N=n==null?I:n(I);if(I=i||I!==0?I:0,y&&N===N){for(var K=L;K--;)if(t[K]===N)continue e;C.push(I)}else f(t,N,i)||C.push(I)}return C}var zt=Bs(Ct),as=Bs(vi,!0);function Ac(e,t){var n=!0;return zt(e,function(i,o,f){return n=!!t(i,o,f),n}),n}function pr(e,t,n){for(var i=-1,o=e.length;++i<o;){var f=e[i],y=t(f);if(y!=null&&(b===r?y===y&&!ot(y):n(y,b)))var b=y,C=f}return C}function xc(e,t,n,i){var o=e.length;for(n=le(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:le(i),i<0&&(i+=o),i=n>i?0:Cu(i);n<i;)e[n++]=t;return e}function fs(e,t){var n=[];return zt(e,function(i,o,f){t(i,o,f)&&n.push(i)}),n}function Me(e,t,n,i,o){var f=-1,y=e.length;for(n||(n=hl),o||(o=[]);++f<y;){var b=e[f];t>0&&n(b)?t>1?Me(b,t-1,n,i,o):Kt(o,b):i||(o[o.length]=b)}return o}var gi=Us(),cs=Us(!0);function Ct(e,t){return e&&gi(e,t,Pe)}function vi(e,t){return e&&cs(e,t,Pe)}function dr(e,t){return qt(t,function(n){return Dt(e[n])})}function rn(e,t){t=Xt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Tt(t[n++])];return n&&n==i?e:r}function ls(e,t,n){var i=t(e);return ce(e)?i:Kt(i,n(e))}function $e(e){return e==null?e===r?Tn:Cn:jt&&jt in Ce(e)?sl(e):ml(e)}function yi(e,t){return e>t}function Cc(e,t){return e!=null&&be.call(e,t)}function kc(e,t){return e!=null&&t in Ce(e)}function Tc(e,t,n){return e>=Ke(t,n)&&e<De(t,n)}function _i(e,t,n){for(var i=n?ei:Yn,o=e[0].length,f=e.length,y=f,b=T(f),C=1/0,L=[];y--;){var I=e[y];y&&t&&(I=Le(I,rt(t))),C=Ke(I.length,C),b[y]=!n&&(t||o>=120&&I.length>=120)?new tn(y&&I):r}I=e[0];var N=-1,K=b[0];e:for(;++N<o&&L.length<C;){var Z=I[N],re=t?t(Z):Z;if(Z=n||Z!==0?Z:0,!(K?Rn(K,re):i(L,re,n))){for(y=f;--y;){var he=b[y];if(!(he?Rn(he,re):i(e[y],re,n)))continue e}K&&K.push(re),L.push(Z)}}return L}function Ec(e,t,n,i){return Ct(e,function(o,f,y){t(i,n(o),f,y)}),i}function Pn(e,t,n){t=Xt(t,e),e=Qs(e,t);var i=e==null?e:e[Tt(dt(t))];return i==null?r:nt(i,e,n)}function hs(e){return Oe(e)&&$e(e)==F}function Rc(e){return Oe(e)&&$e(e)==Wt}function Lc(e){return Oe(e)&&$e(e)==ee}function Fn(e,t,n,i,o){return e===t?!0:e==null||t==null||!Oe(e)&&!Oe(t)?e!==e&&t!==t:Ic(e,t,n,i,Fn,o)}function Ic(e,t,n,i,o,f){var y=ce(e),b=ce(t),C=y?te:He(e),L=b?te:He(t);C=C==F?tt:C,L=L==F?tt:L;var I=C==tt,N=L==tt,K=C==L;if(K&&Yt(e)){if(!Yt(t))return!1;y=!0,I=!1}if(K&&!I)return f||(f=new _t),y||bn(e)?zs(e,t,n,i,o,f):il(e,t,C,n,i,o,f);if(!(n&w)){var Z=I&&be.call(e,"__wrapped__"),re=N&&be.call(t,"__wrapped__");if(Z||re){var he=Z?e.value():e,ie=re?t.value():t;return f||(f=new _t),o(he,ie,n,i,f)}}return K?(f||(f=new _t),ol(e,t,n,i,o,f)):!1}function Oc(e){return Oe(e)&&He(e)==Re}function mi(e,t,n,i){var o=n.length,f=o,y=!i;if(e==null)return!f;for(e=Ce(e);o--;){var b=n[o];if(y&&b[2]?b[1]!==e[b[0]]:!(b[0]in e))return!1}for(;++o<f;){b=n[o];var C=b[0],L=e[C],I=b[1];if(y&&b[2]){if(L===r&&!(C in e))return!1}else{var N=new _t;if(i)var K=i(L,I,C,e,t,N);if(!(K===r?Fn(I,L,w|k,i,N):K))return!1}}return!0}function ps(e){if(!Ie(e)||dl(e))return!1;var t=Dt(e)?Of:Sa;return t.test(sn(e))}function Nc(e){return Oe(e)&&$e(e)==Ge}function Bc(e){return Oe(e)&&He(e)==ze}function Uc(e){return Oe(e)&&Ir(e.length)&&!!Te[$e(e)]}function ds(e){return typeof e=="function"?e:e==null?Qe:typeof e=="object"?ce(e)?ys(e[0],e[1]):vs(e):Du(e)}function wi(e){if(!qn(e))return Ff(e);var t=[];for(var n in Ce(e))be.call(e,n)&&n!="constructor"&&t.push(n);return t}function Dc(e){if(!Ie(e))return _l(e);var t=qn(e),n=[];for(var i in e)i=="constructor"&&(t||!be.call(e,i))||n.push(i);return n}function Si(e,t){return e<t}function gs(e,t){var n=-1,i=Ze(e)?T(e.length):[];return zt(e,function(o,f,y){i[++n]=t(o,f,y)}),i}function vs(e){var t=Di(e);return t.length==1&&t[0][2]?Zs(t[0][0],t[0][1]):function(n){return n===e||mi(n,e,t)}}function ys(e,t){return Fi(e)&&Ys(t)?Zs(Tt(e),t):function(n){var i=Ji(n,e);return i===r&&i===t?Yi(n,e):Fn(t,i,w|k)}}function gr(e,t,n,i,o){e!==t&&gi(t,function(f,y){if(o||(o=new _t),Ie(f))Pc(e,t,y,n,gr,i,o);else{var b=i?i(Wi(e,y),f,y+"",e,t,o):r;b===r&&(b=f),pi(e,y,b)}},Ve)}function Pc(e,t,n,i,o,f,y){var b=Wi(e,n),C=Wi(t,n),L=y.get(C);if(L){pi(e,n,L);return}var I=f?f(b,C,n+"",e,t,y):r,N=I===r;if(N){var K=ce(C),Z=!K&&Yt(C),re=!K&&!Z&&bn(C);I=C,K||Z||re?ce(b)?I=b:Ne(b)?I=Ye(b):Z?(N=!1,I=Rs(C,!0)):re?(N=!1,I=Ls(C,!0)):I=[]:Hn(C)||un(C)?(I=b,un(b)?I=ku(b):(!Ie(b)||Dt(b))&&(I=Js(C))):N=!1}N&&(y.set(C,I),o(I,C,i,f,y),y.delete(C)),pi(e,n,I)}function _s(e,t){var n=e.length;if(n)return t+=t<0?n:0,Ut(t,n)?e[t]:r}function ms(e,t,n){t.length?t=Le(t,function(f){return ce(f)?function(y){return rn(y,f.length===1?f[0]:f)}:f}):t=[Qe];var i=-1;t=Le(t,rt(ne()));var o=gs(e,function(f,y,b){var C=Le(t,function(L){return L(f)});return{criteria:C,index:++i,value:f}});return cf(o,function(f,y){return Zc(f,y,n)})}function Fc(e,t){return ws(e,t,function(n,i){return Yi(e,i)})}function ws(e,t,n){for(var i=-1,o=t.length,f={};++i<o;){var y=t[i],b=rn(e,y);n(b,y)&&Mn(f,Xt(y,e),b)}return f}function Mc(e){return function(t){return rn(t,e)}}function bi(e,t,n,i){var o=i?ff:ln,f=-1,y=t.length,b=e;for(e===t&&(t=Ye(t)),n&&(b=Le(e,rt(n)));++f<y;)for(var C=0,L=t[f],I=n?n(L):L;(C=o(b,I,C,i))>-1;)b!==e&&or.call(b,C,1),or.call(e,C,1);return e}function Ss(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==f){var f=o;Ut(o)?or.call(e,o,1):ki(e,o)}}return e}function Ai(e,t){return e+ar(ts()*(t-e+1))}function Wc(e,t,n,i){for(var o=-1,f=De(ur((t-e)/(n||1)),0),y=T(f);f--;)y[i?f:++o]=e,e+=n;return y}function xi(e,t){var n="";if(!e||t<1||t>ae)return n;do t%2&&(n+=e),t=ar(t/2),t&&(e+=e);while(t);return n}function pe(e,t){return qi(Vs(e,t,Qe),e+"")}function qc(e){return is(An(e))}function Kc(e,t){var n=An(e);return Cr(n,nn(t,0,n.length))}function Mn(e,t,n,i){if(!Ie(e))return e;t=Xt(t,e);for(var o=-1,f=t.length,y=f-1,b=e;b!=null&&++o<f;){var C=Tt(t[o]),L=n;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(o!=y){var I=b[C];L=i?i(I,C,b):r,L===r&&(L=Ie(I)?I:Ut(t[o+1])?[]:{})}Un(b,C,L),b=b[C]}return e}var bs=fr?function(e,t){return fr.set(e,t),e}:Qe,Hc=sr?function(e,t){return sr(e,"toString",{configurable:!0,enumerable:!1,value:Vi(t),writable:!0})}:Qe;function Gc(e){return Cr(An(e))}function pt(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var f=T(o);++i<o;)f[i]=e[i+t];return f}function zc(e,t){var n;return zt(e,function(i,o,f){return n=t(i,o,f),!n}),!!n}function vr(e,t,n){var i=0,o=e==null?i:e.length;if(typeof t=="number"&&t===t&&o<=W){for(;i<o;){var f=i+o>>>1,y=e[f];y!==null&&!ot(y)&&(n?y<=t:y<t)?i=f+1:o=f}return o}return Ci(e,t,Qe,n)}function Ci(e,t,n,i){var o=0,f=e==null?0:e.length;if(f===0)return 0;t=n(t);for(var y=t!==t,b=t===null,C=ot(t),L=t===r;o<f;){var I=ar((o+f)/2),N=n(e[I]),K=N!==r,Z=N===null,re=N===N,he=ot(N);if(y)var ie=i||re;else L?ie=re&&(i||K):b?ie=re&&K&&(i||!Z):C?ie=re&&K&&!Z&&(i||!he):Z||he?ie=!1:ie=i?N<=t:N<t;ie?o=I+1:f=I}return Ke(f,zn)}function As(e,t){for(var n=-1,i=e.length,o=0,f=[];++n<i;){var y=e[n],b=t?t(y):y;if(!n||!mt(b,C)){var C=b;f[o++]=y===0?0:y}}return f}function xs(e){return typeof e=="number"?e:ot(e)?bt:+e}function it(e){if(typeof e=="string")return e;if(ce(e))return Le(e,it)+"";if(ot(e))return ns?ns.call(e):"";var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function $t(e,t,n){var i=-1,o=Yn,f=e.length,y=!0,b=[],C=b;if(n)y=!1,o=ei;else if(f>=c){var L=t?null:nl(e);if(L)return Vn(L);y=!1,o=Rn,C=new tn}else C=t?[]:b;e:for(;++i<f;){var I=e[i],N=t?t(I):I;if(I=n||I!==0?I:0,y&&N===N){for(var K=C.length;K--;)if(C[K]===N)continue e;t&&C.push(N),b.push(I)}else o(C,N,n)||(C!==b&&C.push(N),b.push(I))}return b}function ki(e,t){return t=Xt(t,e),e=Qs(e,t),e==null||delete e[Tt(dt(t))]}function Cs(e,t,n,i){return Mn(e,t,n(rn(e,t)),i)}function yr(e,t,n,i){for(var o=e.length,f=i?o:-1;(i?f--:++f<o)&&t(e[f],f,e););return n?pt(e,i?0:f,i?f+1:o):pt(e,i?f+1:0,i?o:f)}function ks(e,t){var n=e;return n instanceof ge&&(n=n.value()),ti(t,function(i,o){return o.func.apply(o.thisArg,Kt([i],o.args))},n)}function Ti(e,t,n){var i=e.length;if(i<2)return i?$t(e[0]):[];for(var o=-1,f=T(i);++o<i;)for(var y=e[o],b=-1;++b<i;)b!=o&&(f[o]=Dn(f[o]||y,e[b],t,n));return $t(Me(f,1),t,n)}function Ts(e,t,n){for(var i=-1,o=e.length,f=t.length,y={};++i<o;){var b=i<f?t[i]:r;n(y,e[i],b)}return y}function Ei(e){return Ne(e)?e:[]}function Ri(e){return typeof e=="function"?e:Qe}function Xt(e,t){return ce(e)?e:Fi(e,t)?[e]:nu(we(e))}var $c=pe;function Jt(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:pt(e,t,n)}var Es=Nf||function(e){return Fe.clearTimeout(e)};function Rs(e,t){if(t)return e.slice();var n=e.length,i=Zo?Zo(n):new e.constructor(n);return e.copy(i),i}function Li(e){var t=new e.constructor(e.byteLength);return new rr(t).set(new rr(e)),t}function Xc(e,t){var n=t?Li(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jc(e){var t=new e.constructor(e.source,lo.exec(e));return t.lastIndex=e.lastIndex,t}function Yc(e){return Bn?Ce(Bn.call(e)):{}}function Ls(e,t){var n=t?Li(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Is(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,f=ot(e),y=t!==r,b=t===null,C=t===t,L=ot(t);if(!b&&!L&&!f&&e>t||f&&y&&C&&!b&&!L||i&&y&&C||!n&&C||!o)return 1;if(!i&&!f&&!L&&e<t||L&&n&&o&&!i&&!f||b&&n&&o||!y&&o||!C)return-1}return 0}function Zc(e,t,n){for(var i=-1,o=e.criteria,f=t.criteria,y=o.length,b=n.length;++i<y;){var C=Is(o[i],f[i]);if(C){if(i>=b)return C;var L=n[i];return C*(L=="desc"?-1:1)}}return e.index-t.index}function Os(e,t,n,i){for(var o=-1,f=e.length,y=n.length,b=-1,C=t.length,L=De(f-y,0),I=T(C+L),N=!i;++b<C;)I[b]=t[b];for(;++o<y;)(N||o<f)&&(I[n[o]]=e[o]);for(;L--;)I[b++]=e[o++];return I}function Ns(e,t,n,i){for(var o=-1,f=e.length,y=-1,b=n.length,C=-1,L=t.length,I=De(f-b,0),N=T(I+L),K=!i;++o<I;)N[o]=e[o];for(var Z=o;++C<L;)N[Z+C]=t[C];for(;++y<b;)(K||o<f)&&(N[Z+n[y]]=e[o++]);return N}function Ye(e,t){var n=-1,i=e.length;for(t||(t=T(i));++n<i;)t[n]=e[n];return t}function kt(e,t,n,i){var o=!n;n||(n={});for(var f=-1,y=t.length;++f<y;){var b=t[f],C=i?i(n[b],e[b],b,n,e):r;C===r&&(C=e[b]),o?Ot(n,b,C):Un(n,b,C)}return n}function Vc(e,t){return kt(e,Pi(e),t)}function Qc(e,t){return kt(e,$s(e),t)}function _r(e,t){return function(n,i){var o=ce(n)?nf:wc,f=t?t():{};return o(n,e,ne(i,2),f)}}function mn(e){return pe(function(t,n){var i=-1,o=n.length,f=o>1?n[o-1]:r,y=o>2?n[2]:r;for(f=e.length>3&&typeof f=="function"?(o--,f):r,y&&Xe(n[0],n[1],y)&&(f=o<3?r:f,o=1),t=Ce(t);++i<o;){var b=n[i];b&&e(t,b,i,f)}return t})}function Bs(e,t){return function(n,i){if(n==null)return n;if(!Ze(n))return e(n,i);for(var o=n.length,f=t?o:-1,y=Ce(n);(t?f--:++f<o)&&i(y[f],f,y)!==!1;);return n}}function Us(e){return function(t,n,i){for(var o=-1,f=Ce(t),y=i(t),b=y.length;b--;){var C=y[e?b:++o];if(n(f[C],C,f)===!1)break}return t}}function jc(e,t,n){var i=t&E,o=Wn(e);function f(){var y=this&&this!==Fe&&this instanceof f?o:e;return y.apply(i?n:this,arguments)}return f}function Ds(e){return function(t){t=we(t);var n=hn(t)?yt(t):r,i=n?n[0]:t.charAt(0),o=n?Jt(n,1).join(""):t.slice(1);return i[e]()+o}}function wn(e){return function(t){return ti(Bu(Nu(t).replace(Ka,"")),e,"")}}function Wn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_n(e.prototype),i=e.apply(n,t);return Ie(i)?i:n}}function el(e,t,n){var i=Wn(e);function o(){for(var f=arguments.length,y=T(f),b=f,C=Sn(o);b--;)y[b]=arguments[b];var L=f<3&&y[0]!==C&&y[f-1]!==C?[]:Ht(y,C);if(f-=L.length,f<n)return qs(e,t,mr,o.placeholder,r,y,L,r,r,n-f);var I=this&&this!==Fe&&this instanceof o?i:e;return nt(I,this,y)}return o}function Ps(e){return function(t,n,i){var o=Ce(t);if(!Ze(t)){var f=ne(n,3);t=Pe(t),n=function(b){return f(o[b],b,o)}}var y=e(t,n,i);return y>-1?o[f?t[y]:y]:r}}function Fs(e){return Bt(function(t){var n=t.length,i=n,o=lt.prototype.thru;for(e&&t.reverse();i--;){var f=t[i];if(typeof f!="function")throw new ct(m);if(o&&!y&&Ar(f)=="wrapper")var y=new lt([],!0)}for(i=y?i:n;++i<n;){f=t[i];var b=Ar(f),C=b=="wrapper"?Ui(f):r;C&&Mi(C[0])&&C[1]==(M|Y|G|H)&&!C[4].length&&C[9]==1?y=y[Ar(C[0])].apply(y,C[3]):y=f.length==1&&Mi(f)?y[b]():y.thru(f)}return function(){var L=arguments,I=L[0];if(y&&L.length==1&&ce(I))return y.plant(I).value();for(var N=0,K=n?t[N].apply(this,L):I;++N<n;)K=t[N].call(this,K);return K}})}function mr(e,t,n,i,o,f,y,b,C,L){var I=t&M,N=t&E,K=t&q,Z=t&(Y|se),re=t&O,he=K?r:Wn(e);function ie(){for(var de=arguments.length,ye=T(de),st=de;st--;)ye[st]=arguments[st];if(Z)var Je=Sn(ie),ut=hf(ye,Je);if(i&&(ye=Os(ye,i,o,Z)),f&&(ye=Ns(ye,f,y,Z)),de-=ut,Z&&de<L){var Be=Ht(ye,Je);return qs(e,t,mr,ie.placeholder,n,ye,Be,b,C,L-de)}var wt=N?n:this,Ft=K?wt[e]:e;return de=ye.length,b?ye=wl(ye,b):re&&de>1&&ye.reverse(),I&&C<de&&(ye.length=C),this&&this!==Fe&&this instanceof ie&&(Ft=he||Wn(Ft)),Ft.apply(wt,ye)}return ie}function Ms(e,t){return function(n,i){return Ec(n,e,t(i),{})}}function wr(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;typeof n=="string"||typeof i=="string"?(n=it(n),i=it(i)):(n=xs(n),i=xs(i)),o=e(n,i)}return o}}function Ii(e){return Bt(function(t){return t=Le(t,rt(ne())),pe(function(n){var i=this;return e(t,function(o){return nt(o,i,n)})})})}function Sr(e,t){t=t===r?" ":it(t);var n=t.length;if(n<2)return n?xi(t,e):t;var i=xi(t,ur(e/pn(t)));return hn(t)?Jt(yt(i),0,e).join(""):i.slice(0,e)}function tl(e,t,n,i){var o=t&E,f=Wn(e);function y(){for(var b=-1,C=arguments.length,L=-1,I=i.length,N=T(I+C),K=this&&this!==Fe&&this instanceof y?f:e;++L<I;)N[L]=i[L];for(;C--;)N[L++]=arguments[++b];return nt(K,o?n:this,N)}return y}function Ws(e){return function(t,n,i){return i&&typeof i!="number"&&Xe(t,n,i)&&(n=i=r),t=Pt(t),n===r?(n=t,t=0):n=Pt(n),i=i===r?t<n?1:-1:Pt(i),Wc(t,n,i,e)}}function br(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=gt(t),n=gt(n)),e(t,n)}}function qs(e,t,n,i,o,f,y,b,C,L){var I=t&Y,N=I?y:r,K=I?r:y,Z=I?f:r,re=I?r:f;t|=I?G:D,t&=~(I?D:G),t&oe||(t&=~(E|q));var he=[e,t,o,Z,N,re,K,b,C,L],ie=n.apply(r,he);return Mi(e)&&js(ie,he),ie.placeholder=i,eu(ie,e,t)}function Oi(e){var t=Ue[e];return function(n,i){if(n=gt(n),i=i==null?0:Ke(le(i),292),i&&es(n)){var o=(we(n)+"e").split("e"),f=t(o[0]+"e"+(+o[1]+i));return o=(we(f)+"e").split("e"),+(o[0]+"e"+(+o[1]-i))}return t(n)}}var nl=vn&&1/Vn(new vn([,-0]))[1]==Ee?function(e){return new vn(e)}:eo;function Ks(e){return function(t){var n=He(t);return n==Re?ai(t):n==ze?mf(t):lf(t,e(t))}}function Nt(e,t,n,i,o,f,y,b){var C=t&q;if(!C&&typeof e!="function")throw new ct(m);var L=i?i.length:0;if(L||(t&=~(G|D),i=o=r),y=y===r?y:De(le(y),0),b=b===r?b:le(b),L-=o?o.length:0,t&D){var I=i,N=o;i=o=r}var K=C?r:Ui(e),Z=[e,t,n,i,o,I,N,f,y,b];if(K&&yl(Z,K),e=Z[0],t=Z[1],n=Z[2],i=Z[3],o=Z[4],b=Z[9]=Z[9]===r?C?0:e.length:De(Z[9]-L,0),!b&&t&(Y|se)&&(t&=~(Y|se)),!t||t==E)var re=jc(e,t,n);else t==Y||t==se?re=el(e,t,b):(t==G||t==(E|G))&&!o.length?re=tl(e,t,n,i):re=mr.apply(r,Z);var he=K?bs:js;return eu(he(re,Z),e,t)}function Hs(e,t,n,i){return e===r||mt(e,gn[n])&&!be.call(i,n)?t:e}function Gs(e,t,n,i,o,f){return Ie(e)&&Ie(t)&&(f.set(t,e),gr(e,t,r,Gs,f),f.delete(t)),e}function rl(e){return Hn(e)?r:e}function zs(e,t,n,i,o,f){var y=n&w,b=e.length,C=t.length;if(b!=C&&!(y&&C>b))return!1;var L=f.get(e),I=f.get(t);if(L&&I)return L==t&&I==e;var N=-1,K=!0,Z=n&k?new tn:r;for(f.set(e,t),f.set(t,e);++N<b;){var re=e[N],he=t[N];if(i)var ie=y?i(he,re,N,t,e,f):i(re,he,N,e,t,f);if(ie!==r){if(ie)continue;K=!1;break}if(Z){if(!ni(t,function(de,ye){if(!Rn(Z,ye)&&(re===de||o(re,de,n,i,f)))return Z.push(ye)})){K=!1;break}}else if(!(re===he||o(re,he,n,i,f))){K=!1;break}}return f.delete(e),f.delete(t),K}function il(e,t,n,i,o,f,y){switch(n){case fn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Wt:return!(e.byteLength!=t.byteLength||!f(new rr(e),new rr(t)));case Q:case ee:case vt:return mt(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case Ge:case At:return e==t+"";case Re:var b=ai;case ze:var C=i&w;if(b||(b=Vn),e.size!=t.size&&!C)return!1;var L=y.get(e);if(L)return L==t;i|=k,y.set(e,t);var I=zs(b(e),b(t),i,o,f,y);return y.delete(e),I;case xt:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}function ol(e,t,n,i,o,f){var y=n&w,b=Ni(e),C=b.length,L=Ni(t),I=L.length;if(C!=I&&!y)return!1;for(var N=C;N--;){var K=b[N];if(!(y?K in t:be.call(t,K)))return!1}var Z=f.get(e),re=f.get(t);if(Z&&re)return Z==t&&re==e;var he=!0;f.set(e,t),f.set(t,e);for(var ie=y;++N<C;){K=b[N];var de=e[K],ye=t[K];if(i)var st=y?i(ye,de,K,t,e,f):i(de,ye,K,e,t,f);if(!(st===r?de===ye||o(de,ye,n,i,f):st)){he=!1;break}ie||(ie=K=="constructor")}if(he&&!ie){var Je=e.constructor,ut=t.constructor;Je!=ut&&"constructor"in e&&"constructor"in t&&!(typeof Je=="function"&&Je instanceof Je&&typeof ut=="function"&&ut instanceof ut)&&(he=!1)}return f.delete(e),f.delete(t),he}function Bt(e){return qi(Vs(e,r,su),e+"")}function Ni(e){return ls(e,Pe,Pi)}function Bi(e){return ls(e,Ve,$s)}var Ui=fr?function(e){return fr.get(e)}:eo;function Ar(e){for(var t=e.name+"",n=yn[t],i=be.call(yn,t)?n.length:0;i--;){var o=n[i],f=o.func;if(f==null||f==e)return o.name}return t}function Sn(e){var t=be.call(a,"placeholder")?a:e;return t.placeholder}function ne(){var e=a.iteratee||Qi;return e=e===Qi?ds:e,arguments.length?e(arguments[0],arguments[1]):e}function xr(e,t){var n=e.__data__;return pl(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Di(e){for(var t=Pe(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Ys(o)]}return t}function on(e,t){var n=vf(e,t);return ps(n)?n:r}function sl(e){var t=be.call(e,jt),n=e[jt];try{e[jt]=r;var i=!0}catch{}var o=tr.call(e);return i&&(t?e[jt]=n:delete e[jt]),o}var Pi=ci?function(e){return e==null?[]:(e=Ce(e),qt(ci(e),function(t){return Qo.call(e,t)}))}:to,$s=ci?function(e){for(var t=[];e;)Kt(t,Pi(e)),e=ir(e);return t}:to,He=$e;(li&&He(new li(new ArrayBuffer(1)))!=fn||In&&He(new In)!=Re||hi&&He(hi.resolve())!=an||vn&&He(new vn)!=ze||On&&He(new On)!=Rt)&&(He=function(e){var t=$e(e),n=t==tt?e.constructor:r,i=n?sn(n):"";if(i)switch(i){case Kf:return fn;case Hf:return Re;case Gf:return an;case zf:return ze;case $f:return Rt}return t});function ul(e,t,n){for(var i=-1,o=n.length;++i<o;){var f=n[i],y=f.size;switch(f.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=Ke(t,e+y);break;case"takeRight":e=De(e,t-y);break}}return{start:e,end:t}}function al(e){var t=e.match(pa);return t?t[1].split(da):[]}function Xs(e,t,n){t=Xt(t,e);for(var i=-1,o=t.length,f=!1;++i<o;){var y=Tt(t[i]);if(!(f=e!=null&&n(e,y)))break;e=e[y]}return f||++i!=o?f:(o=e==null?0:e.length,!!o&&Ir(o)&&Ut(y,o)&&(ce(e)||un(e)))}function fl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&be.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Js(e){return typeof e.constructor=="function"&&!qn(e)?_n(ir(e)):{}}function cl(e,t,n){var i=e.constructor;switch(t){case Wt:return Li(e);case Q:case ee:return new i(+e);case fn:return Xc(e,n);case Dr:case Pr:case Fr:case Mr:case Wr:case qr:case Kr:case Hr:case Gr:return Ls(e,n);case Re:return new i;case vt:case At:return new i(e);case Ge:return Jc(e);case ze:return new i;case xt:return Yc(e)}}function ll(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(ha,`{
13
+ */zn.exports,function(S,v){(function(){var r,l="4.17.21",c=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",d="Invalid `variable` option passed into `_.template`",A="__lodash_hash_undefined__",h=500,_="__lodash_placeholder__",p=1,a=2,s=4,w=1,k=2,T=1,q=2,oe=4,Y=8,se=16,z=32,D=64,M=128,H=256,I=512,U=30,X="...",j=800,V=16,B=1,be=2,Ae=3,Te=1/0,ue=9007199254740991,qe=17976931348623157e292,bt=NaN,tt=4294967295,Gn=tt-1,W=tt>>>1,J=[["ary",M],["bind",T],["bindKey",q],["curry",Y],["curryRight",se],["flip",I],["partial",z],["partialRight",D],["rearg",H]],F="[object Arguments]",te="[object Array]",P="[object AsyncFunction]",Q="[object Boolean]",ee="[object Date]",$="[object DOMException]",ae="[object Error]",we="[object Function]",Ke="[object GeneratorFunction]",Re="[object Map]",yt="[object Number]",xn="[object Null]",nt="[object Object]",un="[object Promise]",kn="[object Proxy]",Ge="[object RegExp]",$e="[object Set]",At="[object String]",xt="[object Symbol]",En="[object Undefined]",Ot="[object WeakMap]",Tn="[object WeakSet]",Wt="[object ArrayBuffer]",fn="[object DataView]",Dr="[object Float32Array]",Pr="[object Float64Array]",Fr="[object Int8Array]",Mr="[object Int16Array]",Wr="[object Int32Array]",qr="[object Uint8Array]",Kr="[object Uint8ClampedArray]",Hr="[object Uint16Array]",zr="[object Uint32Array]",tu=/\b__p \+= '';/g,nu=/\b(__p \+=) '' \+/g,ru=/(__e\(.*?\)|\b__t\)) \+\n'';/g,uo=/&(?:amp|lt|gt|quot|#39);/g,fo=/[&<>"']/g,iu=RegExp(uo.source),ou=RegExp(fo.source),su=/<%-([\s\S]+?)%>/g,au=/<%([\s\S]+?)%>/g,co=/<%=([\s\S]+?)%>/g,uu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fu=/^\w*$/,cu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gr=/[\\^$.*+?()[\]{}|]/g,lu=RegExp(Gr.source),$r=/^\s+/,hu=/\s/,pu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,du=/\{\n\/\* \[wrapped with (.+)\] \*/,gu=/,? & /,vu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yu=/[()=,{}\[\]\/\s]/,_u=/\\(\\)?/g,mu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lo=/\w*$/,wu=/^[-+]0x[0-9a-f]+$/i,Su=/^0b[01]+$/i,Cu=/^\[object .+?Constructor\]$/,bu=/^0o[0-7]+$/i,Au=/^(?:0|[1-9]\d*)$/,xu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$n=/($^)/,ku=/['\n\r\u2028\u2029\\]/g,Xn="\\ud800-\\udfff",Eu="\\u0300-\\u036f",Tu="\\ufe20-\\ufe2f",Ru="\\u20d0-\\u20ff",ho=Eu+Tu+Ru,po="\\u2700-\\u27bf",go="a-z\\xdf-\\xf6\\xf8-\\xff",Ou="\\xac\\xb1\\xd7\\xf7",Lu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Iu="\\u2000-\\u206f",Nu=" \\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",vo="A-Z\\xc0-\\xd6\\xd8-\\xde",yo="\\ufe0e\\ufe0f",_o=Ou+Lu+Iu+Nu,Xr="['’]",Bu="["+Xn+"]",mo="["+_o+"]",Jn="["+ho+"]",wo="\\d+",Uu="["+po+"]",So="["+go+"]",Co="[^"+Xn+_o+wo+po+go+vo+"]",Jr="\\ud83c[\\udffb-\\udfff]",Du="(?:"+Jn+"|"+Jr+")",bo="[^"+Xn+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",Zr="[\\ud800-\\udbff][\\udc00-\\udfff]",cn="["+vo+"]",Ao="\\u200d",xo="(?:"+So+"|"+Co+")",Pu="(?:"+cn+"|"+Co+")",ko="(?:"+Xr+"(?:d|ll|m|re|s|t|ve))?",Eo="(?:"+Xr+"(?:D|LL|M|RE|S|T|VE))?",To=Du+"?",Ro="["+yo+"]?",Fu="(?:"+Ao+"(?:"+[bo,Yr,Zr].join("|")+")"+Ro+To+")*",Mu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oo=Ro+To+Fu,qu="(?:"+[Uu,Yr,Zr].join("|")+")"+Oo,Ku="(?:"+[bo+Jn+"?",Jn,Yr,Zr,Bu].join("|")+")",Hu=RegExp(Xr,"g"),zu=RegExp(Jn,"g"),Vr=RegExp(Jr+"(?="+Jr+")|"+Ku+Oo,"g"),Gu=RegExp([cn+"?"+So+"+"+ko+"(?="+[mo,cn,"$"].join("|")+")",Pu+"+"+Eo+"(?="+[mo,cn+xo,"$"].join("|")+")",cn+"?"+xo+"+"+ko,cn+"+"+Eo,Wu,Mu,wo,qu].join("|"),"g"),$u=RegExp("["+Ao+Xn+ho+yo+"]"),Xu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ju=["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"],Yu=-1,Ee={};Ee[Dr]=Ee[Pr]=Ee[Fr]=Ee[Mr]=Ee[Wr]=Ee[qr]=Ee[Kr]=Ee[Hr]=Ee[zr]=!0,Ee[F]=Ee[te]=Ee[Wt]=Ee[Q]=Ee[fn]=Ee[ee]=Ee[ae]=Ee[we]=Ee[Re]=Ee[yt]=Ee[nt]=Ee[Ge]=Ee[$e]=Ee[At]=Ee[Ot]=!1;var ke={};ke[F]=ke[te]=ke[Wt]=ke[fn]=ke[Q]=ke[ee]=ke[Dr]=ke[Pr]=ke[Fr]=ke[Mr]=ke[Wr]=ke[Re]=ke[yt]=ke[nt]=ke[Ge]=ke[$e]=ke[At]=ke[xt]=ke[qr]=ke[Kr]=ke[Hr]=ke[zr]=!0,ke[ae]=ke[we]=ke[Ot]=!1;var Zu={À:"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"},Vu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Qu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ju={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ef=parseFloat,tf=parseInt,Lo=typeof et=="object"&&et&&et.Object===Object&&et,nf=typeof self=="object"&&self&&self.Object===Object&&self,Fe=Lo||nf||Function("return this")(),Qr=v&&!v.nodeType&&v,Qt=Qr&&!0&&S&&!S.nodeType&&S,Io=Qt&&Qt.exports===Qr,jr=Io&&Lo.process,ft=function(){try{var b=Qt&&Qt.require&&Qt.require("util").types;return b||jr&&jr.binding&&jr.binding("util")}catch{}}(),No=ft&&ft.isArrayBuffer,Bo=ft&&ft.isDate,Uo=ft&&ft.isMap,Do=ft&&ft.isRegExp,Po=ft&&ft.isSet,Fo=ft&&ft.isTypedArray;function rt(b,R,E){switch(E.length){case 0:return b.call(R);case 1:return b.call(R,E[0]);case 2:return b.call(R,E[0],E[1]);case 3:return b.call(R,E[0],E[1],E[2])}return b.apply(R,E)}function rf(b,R,E,G){for(var fe=-1,_e=b==null?0:b.length;++fe<_e;){var Ue=b[fe];R(G,Ue,E(Ue),b)}return G}function ct(b,R){for(var E=-1,G=b==null?0:b.length;++E<G&&R(b[E],E,b)!==!1;);return b}function of(b,R){for(var E=b==null?0:b.length;E--&&R(b[E],E,b)!==!1;);return b}function Mo(b,R){for(var E=-1,G=b==null?0:b.length;++E<G;)if(!R(b[E],E,b))return!1;return!0}function qt(b,R){for(var E=-1,G=b==null?0:b.length,fe=0,_e=[];++E<G;){var Ue=b[E];R(Ue,E,b)&&(_e[fe++]=Ue)}return _e}function Yn(b,R){var E=b==null?0:b.length;return!!E&&ln(b,R,0)>-1}function ei(b,R,E){for(var G=-1,fe=b==null?0:b.length;++G<fe;)if(E(R,b[G]))return!0;return!1}function Oe(b,R){for(var E=-1,G=b==null?0:b.length,fe=Array(G);++E<G;)fe[E]=R(b[E],E,b);return fe}function Kt(b,R){for(var E=-1,G=R.length,fe=b.length;++E<G;)b[fe+E]=R[E];return b}function ti(b,R,E,G){var fe=-1,_e=b==null?0:b.length;for(G&&_e&&(E=b[++fe]);++fe<_e;)E=R(E,b[fe],fe,b);return E}function sf(b,R,E,G){var fe=b==null?0:b.length;for(G&&fe&&(E=b[--fe]);fe--;)E=R(E,b[fe],fe,b);return E}function ni(b,R){for(var E=-1,G=b==null?0:b.length;++E<G;)if(R(b[E],E,b))return!0;return!1}var af=ri("length");function uf(b){return b.split("")}function ff(b){return b.match(vu)||[]}function Wo(b,R,E){var G;return E(b,function(fe,_e,Ue){if(R(fe,_e,Ue))return G=_e,!1}),G}function Zn(b,R,E,G){for(var fe=b.length,_e=E+(G?1:-1);G?_e--:++_e<fe;)if(R(b[_e],_e,b))return _e;return-1}function ln(b,R,E){return R===R?Sf(b,R,E):Zn(b,qo,E)}function cf(b,R,E,G){for(var fe=E-1,_e=b.length;++fe<_e;)if(G(b[fe],R))return fe;return-1}function qo(b){return b!==b}function Ko(b,R){var E=b==null?0:b.length;return E?oi(b,R)/E:bt}function ri(b){return function(R){return R==null?r:R[b]}}function ii(b){return function(R){return b==null?r:b[R]}}function Ho(b,R,E,G,fe){return fe(b,function(_e,Ue,xe){E=G?(G=!1,_e):R(E,_e,Ue,xe)}),E}function lf(b,R){var E=b.length;for(b.sort(R);E--;)b[E]=b[E].value;return b}function oi(b,R){for(var E,G=-1,fe=b.length;++G<fe;){var _e=R(b[G]);_e!==r&&(E=E===r?_e:E+_e)}return E}function si(b,R){for(var E=-1,G=Array(b);++E<b;)G[E]=R(E);return G}function hf(b,R){return Oe(R,function(E){return[E,b[E]]})}function zo(b){return b&&b.slice(0,Jo(b)+1).replace($r,"")}function it(b){return function(R){return b(R)}}function ai(b,R){return Oe(R,function(E){return b[E]})}function Rn(b,R){return b.has(R)}function Go(b,R){for(var E=-1,G=b.length;++E<G&&ln(R,b[E],0)>-1;);return E}function $o(b,R){for(var E=b.length;E--&&ln(R,b[E],0)>-1;);return E}function pf(b,R){for(var E=b.length,G=0;E--;)b[E]===R&&++G;return G}var df=ii(Zu),gf=ii(Vu);function vf(b){return"\\"+ju[b]}function yf(b,R){return b==null?r:b[R]}function hn(b){return $u.test(b)}function _f(b){return Xu.test(b)}function mf(b){for(var R,E=[];!(R=b.next()).done;)E.push(R.value);return E}function ui(b){var R=-1,E=Array(b.size);return b.forEach(function(G,fe){E[++R]=[fe,G]}),E}function Xo(b,R){return function(E){return b(R(E))}}function Ht(b,R){for(var E=-1,G=b.length,fe=0,_e=[];++E<G;){var Ue=b[E];(Ue===R||Ue===_)&&(b[E]=_,_e[fe++]=E)}return _e}function Vn(b){var R=-1,E=Array(b.size);return b.forEach(function(G){E[++R]=G}),E}function wf(b){var R=-1,E=Array(b.size);return b.forEach(function(G){E[++R]=[G,G]}),E}function Sf(b,R,E){for(var G=E-1,fe=b.length;++G<fe;)if(b[G]===R)return G;return-1}function Cf(b,R,E){for(var G=E+1;G--;)if(b[G]===R)return G;return G}function pn(b){return hn(b)?Af(b):af(b)}function _t(b){return hn(b)?xf(b):uf(b)}function Jo(b){for(var R=b.length;R--&&hu.test(b.charAt(R)););return R}var bf=ii(Qu);function Af(b){for(var R=Vr.lastIndex=0;Vr.test(b);)++R;return R}function xf(b){return b.match(Vr)||[]}function kf(b){return b.match(Gu)||[]}var Ef=function b(R){R=R==null?Fe:dn.defaults(Fe.Object(),R,dn.pick(Fe,Ju));var E=R.Array,G=R.Date,fe=R.Error,_e=R.Function,Ue=R.Math,xe=R.Object,fi=R.RegExp,Tf=R.String,lt=R.TypeError,Qn=E.prototype,Rf=_e.prototype,gn=xe.prototype,jn=R["__core-js_shared__"],er=Rf.toString,Ce=gn.hasOwnProperty,Of=0,Yo=function(){var e=/[^.]+$/.exec(jn&&jn.keys&&jn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),tr=gn.toString,Lf=er.call(xe),If=Fe._,Nf=fi("^"+er.call(Ce).replace(Gr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=Io?R.Buffer:r,zt=R.Symbol,rr=R.Uint8Array,Zo=nr?nr.allocUnsafe:r,ir=Xo(xe.getPrototypeOf,xe),Vo=xe.create,Qo=gn.propertyIsEnumerable,or=Qn.splice,jo=zt?zt.isConcatSpreadable:r,On=zt?zt.iterator:r,jt=zt?zt.toStringTag:r,sr=function(){try{var e=on(xe,"defineProperty");return e({},"",{}),e}catch{}}(),Bf=R.clearTimeout!==Fe.clearTimeout&&R.clearTimeout,Uf=G&&G.now!==Fe.Date.now&&G.now,Df=R.setTimeout!==Fe.setTimeout&&R.setTimeout,ar=Ue.ceil,ur=Ue.floor,ci=xe.getOwnPropertySymbols,Pf=nr?nr.isBuffer:r,es=R.isFinite,Ff=Qn.join,Mf=Xo(xe.keys,xe),De=Ue.max,He=Ue.min,Wf=G.now,qf=R.parseInt,ts=Ue.random,Kf=Qn.reverse,li=on(R,"DataView"),Ln=on(R,"Map"),hi=on(R,"Promise"),vn=on(R,"Set"),In=on(R,"WeakMap"),Nn=on(xe,"create"),fr=In&&new In,yn={},Hf=sn(li),zf=sn(Ln),Gf=sn(hi),$f=sn(vn),Xf=sn(In),cr=zt?zt.prototype:r,Bn=cr?cr.valueOf:r,ns=cr?cr.toString:r;function u(e){if(Ie(e)&&!ce(e)&&!(e instanceof ve)){if(e instanceof ht)return e;if(Ce.call(e,"__wrapped__"))return ra(e)}return new ht(e)}var _n=function(){function e(){}return function(t){if(!Le(t))return{};if(Vo)return Vo(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function lr(){}function ht(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}u.templateSettings={escape:su,evaluate:au,interpolate:co,variable:"",imports:{_:u}},u.prototype=lr.prototype,u.prototype.constructor=u,ht.prototype=_n(lr.prototype),ht.prototype.constructor=ht;function ve(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=tt,this.__views__=[]}function Jf(){var e=new ve(this.__wrapped__);return e.__actions__=Ze(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ze(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ze(this.__views__),e}function Yf(){if(this.__filtered__){var e=new ve(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Zf(){var e=this.__wrapped__.value(),t=this.__dir__,n=ce(e),i=t<0,o=n?e.length:0,f=ul(0,o,this.__views__),y=f.start,C=f.end,x=C-y,O=i?C:y-1,L=this.__iteratees__,N=L.length,K=0,Z=He(x,this.__takeCount__);if(!n||!i&&o==x&&Z==x)return ks(e,this.__actions__);var re=[];e:for(;x--&&K<Z;){O+=t;for(var pe=-1,ie=e[O];++pe<N;){var ge=L[pe],ye=ge.iteratee,at=ge.type,Ye=ye(ie);if(at==be)ie=Ye;else if(!Ye){if(at==B)continue e;break e}}re[K++]=ie}return re}ve.prototype=_n(lr.prototype),ve.prototype.constructor=ve;function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vf(){this.__data__=Nn?Nn(null):{},this.size=0}function Qf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function jf(e){var t=this.__data__;if(Nn){var n=t[e];return n===A?r:n}return Ce.call(t,e)?t[e]:r}function ec(e){var t=this.__data__;return Nn?t[e]!==r:Ce.call(t,e)}function tc(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nn&&t===r?A:t,this}en.prototype.clear=Vf,en.prototype.delete=Qf,en.prototype.get=jf,en.prototype.has=ec,en.prototype.set=tc;function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function nc(){this.__data__=[],this.size=0}function rc(e){var t=this.__data__,n=hr(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():or.call(t,n,1),--this.size,!0}function ic(e){var t=this.__data__,n=hr(t,e);return n<0?r:t[n][1]}function oc(e){return hr(this.__data__,e)>-1}function sc(e,t){var n=this.__data__,i=hr(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}Lt.prototype.clear=nc,Lt.prototype.delete=rc,Lt.prototype.get=ic,Lt.prototype.has=oc,Lt.prototype.set=sc;function It(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ac(){this.size=0,this.__data__={hash:new en,map:new(Ln||Lt),string:new en}}function uc(e){var t=Ar(this,e).delete(e);return this.size-=t?1:0,t}function fc(e){return Ar(this,e).get(e)}function cc(e){return Ar(this,e).has(e)}function lc(e,t){var n=Ar(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}It.prototype.clear=ac,It.prototype.delete=uc,It.prototype.get=fc,It.prototype.has=cc,It.prototype.set=lc;function tn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new It;++t<n;)this.add(e[t])}function hc(e){return this.__data__.set(e,A),this}function pc(e){return this.__data__.has(e)}tn.prototype.add=tn.prototype.push=hc,tn.prototype.has=pc;function mt(e){var t=this.__data__=new Lt(e);this.size=t.size}function dc(){this.__data__=new Lt,this.size=0}function gc(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vc(e){return this.__data__.get(e)}function yc(e){return this.__data__.has(e)}function _c(e,t){var n=this.__data__;if(n instanceof Lt){var i=n.__data__;if(!Ln||i.length<c-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new It(i)}return n.set(e,t),this.size=n.size,this}mt.prototype.clear=dc,mt.prototype.delete=gc,mt.prototype.get=vc,mt.prototype.has=yc,mt.prototype.set=_c;function rs(e,t){var n=ce(e),i=!n&&an(e),o=!n&&!i&&Yt(e),f=!n&&!i&&!o&&Cn(e),y=n||i||o||f,C=y?si(e.length,Tf):[],x=C.length;for(var O in e)(t||Ce.call(e,O))&&!(y&&(O=="length"||o&&(O=="offset"||O=="parent")||f&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Dt(O,x)))&&C.push(O);return C}function is(e){var t=e.length;return t?e[bi(0,t-1)]:r}function mc(e,t){return xr(Ze(e),nn(t,0,e.length))}function wc(e){return xr(Ze(e))}function pi(e,t,n){(n!==r&&!wt(e[t],n)||n===r&&!(t in e))&&Nt(e,t,n)}function Un(e,t,n){var i=e[t];(!(Ce.call(e,t)&&wt(i,n))||n===r&&!(t in e))&&Nt(e,t,n)}function hr(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function Sc(e,t,n,i){return Gt(e,function(o,f,y){t(i,o,n(o),y)}),i}function os(e,t){return e&&Et(t,Pe(t),e)}function Cc(e,t){return e&&Et(t,Qe(t),e)}function Nt(e,t,n){t=="__proto__"&&sr?sr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function di(e,t){for(var n=-1,i=t.length,o=E(i),f=e==null;++n<i;)o[n]=f?r:Ji(e,t[n]);return o}function nn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function pt(e,t,n,i,o,f){var y,C=t&p,x=t&a,O=t&s;if(n&&(y=o?n(e,i,o,f):n(e)),y!==r)return y;if(!Le(e))return e;var L=ce(e);if(L){if(y=cl(e),!C)return Ze(e,y)}else{var N=ze(e),K=N==we||N==Ke;if(Yt(e))return Rs(e,C);if(N==nt||N==F||K&&!o){if(y=x||K?{}:Js(e),!C)return x?jc(e,Cc(y,e)):Qc(e,os(y,e))}else{if(!ke[N])return o?e:{};y=ll(e,N,C)}}f||(f=new mt);var Z=f.get(e);if(Z)return Z;f.set(e,y),ba(e)?e.forEach(function(ie){y.add(pt(ie,t,n,ie,e,f))}):Sa(e)&&e.forEach(function(ie,ge){y.set(ge,pt(ie,t,n,ge,e,f))});var re=O?x?Bi:Ni:x?Qe:Pe,pe=L?r:re(e);return ct(pe||e,function(ie,ge){pe&&(ge=ie,ie=e[ge]),Un(y,ge,pt(ie,t,n,ge,e,f))}),y}function bc(e){var t=Pe(e);return function(n){return ss(n,e,t)}}function ss(e,t,n){var i=n.length;if(e==null)return!i;for(e=xe(e);i--;){var o=n[i],f=t[o],y=e[o];if(y===r&&!(o in e)||!f(y))return!1}return!0}function as(e,t,n){if(typeof e!="function")throw new lt(m);return Kn(function(){e.apply(r,n)},t)}function Dn(e,t,n,i){var o=-1,f=Yn,y=!0,C=e.length,x=[],O=t.length;if(!C)return x;n&&(t=Oe(t,it(n))),i?(f=ei,y=!1):t.length>=c&&(f=Rn,y=!1,t=new tn(t));e:for(;++o<C;){var L=e[o],N=n==null?L:n(L);if(L=i||L!==0?L:0,y&&N===N){for(var K=O;K--;)if(t[K]===N)continue e;x.push(L)}else f(t,N,i)||x.push(L)}return x}var Gt=Bs(kt),us=Bs(vi,!0);function Ac(e,t){var n=!0;return Gt(e,function(i,o,f){return n=!!t(i,o,f),n}),n}function pr(e,t,n){for(var i=-1,o=e.length;++i<o;){var f=e[i],y=t(f);if(y!=null&&(C===r?y===y&&!st(y):n(y,C)))var C=y,x=f}return x}function xc(e,t,n,i){var o=e.length;for(n=le(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:le(i),i<0&&(i+=o),i=n>i?0:xa(i);n<i;)e[n++]=t;return e}function fs(e,t){var n=[];return Gt(e,function(i,o,f){t(i,o,f)&&n.push(i)}),n}function Me(e,t,n,i,o){var f=-1,y=e.length;for(n||(n=pl),o||(o=[]);++f<y;){var C=e[f];t>0&&n(C)?t>1?Me(C,t-1,n,i,o):Kt(o,C):i||(o[o.length]=C)}return o}var gi=Us(),cs=Us(!0);function kt(e,t){return e&&gi(e,t,Pe)}function vi(e,t){return e&&cs(e,t,Pe)}function dr(e,t){return qt(t,function(n){return Pt(e[n])})}function rn(e,t){t=Xt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Tt(t[n++])];return n&&n==i?e:r}function ls(e,t,n){var i=t(e);return ce(e)?i:Kt(i,n(e))}function Xe(e){return e==null?e===r?En:xn:jt&&jt in xe(e)?al(e):wl(e)}function yi(e,t){return e>t}function kc(e,t){return e!=null&&Ce.call(e,t)}function Ec(e,t){return e!=null&&t in xe(e)}function Tc(e,t,n){return e>=He(t,n)&&e<De(t,n)}function _i(e,t,n){for(var i=n?ei:Yn,o=e[0].length,f=e.length,y=f,C=E(f),x=1/0,O=[];y--;){var L=e[y];y&&t&&(L=Oe(L,it(t))),x=He(L.length,x),C[y]=!n&&(t||o>=120&&L.length>=120)?new tn(y&&L):r}L=e[0];var N=-1,K=C[0];e:for(;++N<o&&O.length<x;){var Z=L[N],re=t?t(Z):Z;if(Z=n||Z!==0?Z:0,!(K?Rn(K,re):i(O,re,n))){for(y=f;--y;){var pe=C[y];if(!(pe?Rn(pe,re):i(e[y],re,n)))continue e}K&&K.push(re),O.push(Z)}}return O}function Rc(e,t,n,i){return kt(e,function(o,f,y){t(i,n(o),f,y)}),i}function Pn(e,t,n){t=Xt(t,e),e=Qs(e,t);var i=e==null?e:e[Tt(gt(t))];return i==null?r:rt(i,e,n)}function hs(e){return Ie(e)&&Xe(e)==F}function Oc(e){return Ie(e)&&Xe(e)==Wt}function Lc(e){return Ie(e)&&Xe(e)==ee}function Fn(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ie(e)&&!Ie(t)?e!==e&&t!==t:Ic(e,t,n,i,Fn,o)}function Ic(e,t,n,i,o,f){var y=ce(e),C=ce(t),x=y?te:ze(e),O=C?te:ze(t);x=x==F?nt:x,O=O==F?nt:O;var L=x==nt,N=O==nt,K=x==O;if(K&&Yt(e)){if(!Yt(t))return!1;y=!0,L=!1}if(K&&!L)return f||(f=new mt),y||Cn(e)?Gs(e,t,n,i,o,f):ol(e,t,x,n,i,o,f);if(!(n&w)){var Z=L&&Ce.call(e,"__wrapped__"),re=N&&Ce.call(t,"__wrapped__");if(Z||re){var pe=Z?e.value():e,ie=re?t.value():t;return f||(f=new mt),o(pe,ie,n,i,f)}}return K?(f||(f=new mt),sl(e,t,n,i,o,f)):!1}function Nc(e){return Ie(e)&&ze(e)==Re}function mi(e,t,n,i){var o=n.length,f=o,y=!i;if(e==null)return!f;for(e=xe(e);o--;){var C=n[o];if(y&&C[2]?C[1]!==e[C[0]]:!(C[0]in e))return!1}for(;++o<f;){C=n[o];var x=C[0],O=e[x],L=C[1];if(y&&C[2]){if(O===r&&!(x in e))return!1}else{var N=new mt;if(i)var K=i(O,L,x,e,t,N);if(!(K===r?Fn(L,O,w|k,i,N):K))return!1}}return!0}function ps(e){if(!Le(e)||gl(e))return!1;var t=Pt(e)?Nf:Cu;return t.test(sn(e))}function Bc(e){return Ie(e)&&Xe(e)==Ge}function Uc(e){return Ie(e)&&ze(e)==$e}function Dc(e){return Ie(e)&&Lr(e.length)&&!!Ee[Xe(e)]}function ds(e){return typeof e=="function"?e:e==null?je:typeof e=="object"?ce(e)?ys(e[0],e[1]):vs(e):Da(e)}function wi(e){if(!qn(e))return Mf(e);var t=[];for(var n in xe(e))Ce.call(e,n)&&n!="constructor"&&t.push(n);return t}function Pc(e){if(!Le(e))return ml(e);var t=qn(e),n=[];for(var i in e)i=="constructor"&&(t||!Ce.call(e,i))||n.push(i);return n}function Si(e,t){return e<t}function gs(e,t){var n=-1,i=Ve(e)?E(e.length):[];return Gt(e,function(o,f,y){i[++n]=t(o,f,y)}),i}function vs(e){var t=Di(e);return t.length==1&&t[0][2]?Zs(t[0][0],t[0][1]):function(n){return n===e||mi(n,e,t)}}function ys(e,t){return Fi(e)&&Ys(t)?Zs(Tt(e),t):function(n){var i=Ji(n,e);return i===r&&i===t?Yi(n,e):Fn(t,i,w|k)}}function gr(e,t,n,i,o){e!==t&&gi(t,function(f,y){if(o||(o=new mt),Le(f))Fc(e,t,y,n,gr,i,o);else{var C=i?i(Wi(e,y),f,y+"",e,t,o):r;C===r&&(C=f),pi(e,y,C)}},Qe)}function Fc(e,t,n,i,o,f,y){var C=Wi(e,n),x=Wi(t,n),O=y.get(x);if(O){pi(e,n,O);return}var L=f?f(C,x,n+"",e,t,y):r,N=L===r;if(N){var K=ce(x),Z=!K&&Yt(x),re=!K&&!Z&&Cn(x);L=x,K||Z||re?ce(C)?L=C:Ne(C)?L=Ze(C):Z?(N=!1,L=Rs(x,!0)):re?(N=!1,L=Os(x,!0)):L=[]:Hn(x)||an(x)?(L=C,an(C)?L=ka(C):(!Le(C)||Pt(C))&&(L=Js(x))):N=!1}N&&(y.set(x,L),o(L,x,i,f,y),y.delete(x)),pi(e,n,L)}function _s(e,t){var n=e.length;if(n)return t+=t<0?n:0,Dt(t,n)?e[t]:r}function ms(e,t,n){t.length?t=Oe(t,function(f){return ce(f)?function(y){return rn(y,f.length===1?f[0]:f)}:f}):t=[je];var i=-1;t=Oe(t,it(ne()));var o=gs(e,function(f,y,C){var x=Oe(t,function(O){return O(f)});return{criteria:x,index:++i,value:f}});return lf(o,function(f,y){return Vc(f,y,n)})}function Mc(e,t){return ws(e,t,function(n,i){return Yi(e,i)})}function ws(e,t,n){for(var i=-1,o=t.length,f={};++i<o;){var y=t[i],C=rn(e,y);n(C,y)&&Mn(f,Xt(y,e),C)}return f}function Wc(e){return function(t){return rn(t,e)}}function Ci(e,t,n,i){var o=i?cf:ln,f=-1,y=t.length,C=e;for(e===t&&(t=Ze(t)),n&&(C=Oe(e,it(n)));++f<y;)for(var x=0,O=t[f],L=n?n(O):O;(x=o(C,L,x,i))>-1;)C!==e&&or.call(C,x,1),or.call(e,x,1);return e}function Ss(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==f){var f=o;Dt(o)?or.call(e,o,1):ki(e,o)}}return e}function bi(e,t){return e+ur(ts()*(t-e+1))}function qc(e,t,n,i){for(var o=-1,f=De(ar((t-e)/(n||1)),0),y=E(f);f--;)y[i?f:++o]=e,e+=n;return y}function Ai(e,t){var n="";if(!e||t<1||t>ue)return n;do t%2&&(n+=e),t=ur(t/2),t&&(e+=e);while(t);return n}function de(e,t){return qi(Vs(e,t,je),e+"")}function Kc(e){return is(bn(e))}function Hc(e,t){var n=bn(e);return xr(n,nn(t,0,n.length))}function Mn(e,t,n,i){if(!Le(e))return e;t=Xt(t,e);for(var o=-1,f=t.length,y=f-1,C=e;C!=null&&++o<f;){var x=Tt(t[o]),O=n;if(x==="__proto__"||x==="constructor"||x==="prototype")return e;if(o!=y){var L=C[x];O=i?i(L,x,C):r,O===r&&(O=Le(L)?L:Dt(t[o+1])?[]:{})}Un(C,x,O),C=C[x]}return e}var Cs=fr?function(e,t){return fr.set(e,t),e}:je,zc=sr?function(e,t){return sr(e,"toString",{configurable:!0,enumerable:!1,value:Vi(t),writable:!0})}:je;function Gc(e){return xr(bn(e))}function dt(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var f=E(o);++i<o;)f[i]=e[i+t];return f}function $c(e,t){var n;return Gt(e,function(i,o,f){return n=t(i,o,f),!n}),!!n}function vr(e,t,n){var i=0,o=e==null?i:e.length;if(typeof t=="number"&&t===t&&o<=W){for(;i<o;){var f=i+o>>>1,y=e[f];y!==null&&!st(y)&&(n?y<=t:y<t)?i=f+1:o=f}return o}return xi(e,t,je,n)}function xi(e,t,n,i){var o=0,f=e==null?0:e.length;if(f===0)return 0;t=n(t);for(var y=t!==t,C=t===null,x=st(t),O=t===r;o<f;){var L=ur((o+f)/2),N=n(e[L]),K=N!==r,Z=N===null,re=N===N,pe=st(N);if(y)var ie=i||re;else O?ie=re&&(i||K):C?ie=re&&K&&(i||!Z):x?ie=re&&K&&!Z&&(i||!pe):Z||pe?ie=!1:ie=i?N<=t:N<t;ie?o=L+1:f=L}return He(f,Gn)}function bs(e,t){for(var n=-1,i=e.length,o=0,f=[];++n<i;){var y=e[n],C=t?t(y):y;if(!n||!wt(C,x)){var x=C;f[o++]=y===0?0:y}}return f}function As(e){return typeof e=="number"?e:st(e)?bt:+e}function ot(e){if(typeof e=="string")return e;if(ce(e))return Oe(e,ot)+"";if(st(e))return ns?ns.call(e):"";var t=e+"";return t=="0"&&1/e==-Te?"-0":t}function $t(e,t,n){var i=-1,o=Yn,f=e.length,y=!0,C=[],x=C;if(n)y=!1,o=ei;else if(f>=c){var O=t?null:rl(e);if(O)return Vn(O);y=!1,o=Rn,x=new tn}else x=t?[]:C;e:for(;++i<f;){var L=e[i],N=t?t(L):L;if(L=n||L!==0?L:0,y&&N===N){for(var K=x.length;K--;)if(x[K]===N)continue e;t&&x.push(N),C.push(L)}else o(x,N,n)||(x!==C&&x.push(N),C.push(L))}return C}function ki(e,t){return t=Xt(t,e),e=Qs(e,t),e==null||delete e[Tt(gt(t))]}function xs(e,t,n,i){return Mn(e,t,n(rn(e,t)),i)}function yr(e,t,n,i){for(var o=e.length,f=i?o:-1;(i?f--:++f<o)&&t(e[f],f,e););return n?dt(e,i?0:f,i?f+1:o):dt(e,i?f+1:0,i?o:f)}function ks(e,t){var n=e;return n instanceof ve&&(n=n.value()),ti(t,function(i,o){return o.func.apply(o.thisArg,Kt([i],o.args))},n)}function Ei(e,t,n){var i=e.length;if(i<2)return i?$t(e[0]):[];for(var o=-1,f=E(i);++o<i;)for(var y=e[o],C=-1;++C<i;)C!=o&&(f[o]=Dn(f[o]||y,e[C],t,n));return $t(Me(f,1),t,n)}function Es(e,t,n){for(var i=-1,o=e.length,f=t.length,y={};++i<o;){var C=i<f?t[i]:r;n(y,e[i],C)}return y}function Ti(e){return Ne(e)?e:[]}function Ri(e){return typeof e=="function"?e:je}function Xt(e,t){return ce(e)?e:Fi(e,t)?[e]:na(Se(e))}var Xc=de;function Jt(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:dt(e,t,n)}var Ts=Bf||function(e){return Fe.clearTimeout(e)};function Rs(e,t){if(t)return e.slice();var n=e.length,i=Zo?Zo(n):new e.constructor(n);return e.copy(i),i}function Oi(e){var t=new e.constructor(e.byteLength);return new rr(t).set(new rr(e)),t}function Jc(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Yc(e){var t=new e.constructor(e.source,lo.exec(e));return t.lastIndex=e.lastIndex,t}function Zc(e){return Bn?xe(Bn.call(e)):{}}function Os(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ls(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,f=st(e),y=t!==r,C=t===null,x=t===t,O=st(t);if(!C&&!O&&!f&&e>t||f&&y&&x&&!C&&!O||i&&y&&x||!n&&x||!o)return 1;if(!i&&!f&&!O&&e<t||O&&n&&o&&!i&&!f||C&&n&&o||!y&&o||!x)return-1}return 0}function Vc(e,t,n){for(var i=-1,o=e.criteria,f=t.criteria,y=o.length,C=n.length;++i<y;){var x=Ls(o[i],f[i]);if(x){if(i>=C)return x;var O=n[i];return x*(O=="desc"?-1:1)}}return e.index-t.index}function Is(e,t,n,i){for(var o=-1,f=e.length,y=n.length,C=-1,x=t.length,O=De(f-y,0),L=E(x+O),N=!i;++C<x;)L[C]=t[C];for(;++o<y;)(N||o<f)&&(L[n[o]]=e[o]);for(;O--;)L[C++]=e[o++];return L}function Ns(e,t,n,i){for(var o=-1,f=e.length,y=-1,C=n.length,x=-1,O=t.length,L=De(f-C,0),N=E(L+O),K=!i;++o<L;)N[o]=e[o];for(var Z=o;++x<O;)N[Z+x]=t[x];for(;++y<C;)(K||o<f)&&(N[Z+n[y]]=e[o++]);return N}function Ze(e,t){var n=-1,i=e.length;for(t||(t=E(i));++n<i;)t[n]=e[n];return t}function Et(e,t,n,i){var o=!n;n||(n={});for(var f=-1,y=t.length;++f<y;){var C=t[f],x=i?i(n[C],e[C],C,n,e):r;x===r&&(x=e[C]),o?Nt(n,C,x):Un(n,C,x)}return n}function Qc(e,t){return Et(e,Pi(e),t)}function jc(e,t){return Et(e,$s(e),t)}function _r(e,t){return function(n,i){var o=ce(n)?rf:Sc,f=t?t():{};return o(n,e,ne(i,2),f)}}function mn(e){return de(function(t,n){var i=-1,o=n.length,f=o>1?n[o-1]:r,y=o>2?n[2]:r;for(f=e.length>3&&typeof f=="function"?(o--,f):r,y&&Je(n[0],n[1],y)&&(f=o<3?r:f,o=1),t=xe(t);++i<o;){var C=n[i];C&&e(t,C,i,f)}return t})}function Bs(e,t){return function(n,i){if(n==null)return n;if(!Ve(n))return e(n,i);for(var o=n.length,f=t?o:-1,y=xe(n);(t?f--:++f<o)&&i(y[f],f,y)!==!1;);return n}}function Us(e){return function(t,n,i){for(var o=-1,f=xe(t),y=i(t),C=y.length;C--;){var x=y[e?C:++o];if(n(f[x],x,f)===!1)break}return t}}function el(e,t,n){var i=t&T,o=Wn(e);function f(){var y=this&&this!==Fe&&this instanceof f?o:e;return y.apply(i?n:this,arguments)}return f}function Ds(e){return function(t){t=Se(t);var n=hn(t)?_t(t):r,i=n?n[0]:t.charAt(0),o=n?Jt(n,1).join(""):t.slice(1);return i[e]()+o}}function wn(e){return function(t){return ti(Ba(Na(t).replace(Hu,"")),e,"")}}function Wn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_n(e.prototype),i=e.apply(n,t);return Le(i)?i:n}}function tl(e,t,n){var i=Wn(e);function o(){for(var f=arguments.length,y=E(f),C=f,x=Sn(o);C--;)y[C]=arguments[C];var O=f<3&&y[0]!==x&&y[f-1]!==x?[]:Ht(y,x);if(f-=O.length,f<n)return qs(e,t,mr,o.placeholder,r,y,O,r,r,n-f);var L=this&&this!==Fe&&this instanceof o?i:e;return rt(L,this,y)}return o}function Ps(e){return function(t,n,i){var o=xe(t);if(!Ve(t)){var f=ne(n,3);t=Pe(t),n=function(C){return f(o[C],C,o)}}var y=e(t,n,i);return y>-1?o[f?t[y]:y]:r}}function Fs(e){return Ut(function(t){var n=t.length,i=n,o=ht.prototype.thru;for(e&&t.reverse();i--;){var f=t[i];if(typeof f!="function")throw new lt(m);if(o&&!y&&br(f)=="wrapper")var y=new ht([],!0)}for(i=y?i:n;++i<n;){f=t[i];var C=br(f),x=C=="wrapper"?Ui(f):r;x&&Mi(x[0])&&x[1]==(M|Y|z|H)&&!x[4].length&&x[9]==1?y=y[br(x[0])].apply(y,x[3]):y=f.length==1&&Mi(f)?y[C]():y.thru(f)}return function(){var O=arguments,L=O[0];if(y&&O.length==1&&ce(L))return y.plant(L).value();for(var N=0,K=n?t[N].apply(this,O):L;++N<n;)K=t[N].call(this,K);return K}})}function mr(e,t,n,i,o,f,y,C,x,O){var L=t&M,N=t&T,K=t&q,Z=t&(Y|se),re=t&I,pe=K?r:Wn(e);function ie(){for(var ge=arguments.length,ye=E(ge),at=ge;at--;)ye[at]=arguments[at];if(Z)var Ye=Sn(ie),ut=pf(ye,Ye);if(i&&(ye=Is(ye,i,o,Z)),f&&(ye=Ns(ye,f,y,Z)),ge-=ut,Z&&ge<O){var Be=Ht(ye,Ye);return qs(e,t,mr,ie.placeholder,n,ye,Be,C,x,O-ge)}var St=N?n:this,Mt=K?St[e]:e;return ge=ye.length,C?ye=Sl(ye,C):re&&ge>1&&ye.reverse(),L&&x<ge&&(ye.length=x),this&&this!==Fe&&this instanceof ie&&(Mt=pe||Wn(Mt)),Mt.apply(St,ye)}return ie}function Ms(e,t){return function(n,i){return Rc(n,e,t(i),{})}}function wr(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;typeof n=="string"||typeof i=="string"?(n=ot(n),i=ot(i)):(n=As(n),i=As(i)),o=e(n,i)}return o}}function Li(e){return Ut(function(t){return t=Oe(t,it(ne())),de(function(n){var i=this;return e(t,function(o){return rt(o,i,n)})})})}function Sr(e,t){t=t===r?" ":ot(t);var n=t.length;if(n<2)return n?Ai(t,e):t;var i=Ai(t,ar(e/pn(t)));return hn(t)?Jt(_t(i),0,e).join(""):i.slice(0,e)}function nl(e,t,n,i){var o=t&T,f=Wn(e);function y(){for(var C=-1,x=arguments.length,O=-1,L=i.length,N=E(L+x),K=this&&this!==Fe&&this instanceof y?f:e;++O<L;)N[O]=i[O];for(;x--;)N[O++]=arguments[++C];return rt(K,o?n:this,N)}return y}function Ws(e){return function(t,n,i){return i&&typeof i!="number"&&Je(t,n,i)&&(n=i=r),t=Ft(t),n===r?(n=t,t=0):n=Ft(n),i=i===r?t<n?1:-1:Ft(i),qc(t,n,i,e)}}function Cr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=vt(t),n=vt(n)),e(t,n)}}function qs(e,t,n,i,o,f,y,C,x,O){var L=t&Y,N=L?y:r,K=L?r:y,Z=L?f:r,re=L?r:f;t|=L?z:D,t&=~(L?D:z),t&oe||(t&=~(T|q));var pe=[e,t,o,Z,N,re,K,C,x,O],ie=n.apply(r,pe);return Mi(e)&&js(ie,pe),ie.placeholder=i,ea(ie,e,t)}function Ii(e){var t=Ue[e];return function(n,i){if(n=vt(n),i=i==null?0:He(le(i),292),i&&es(n)){var o=(Se(n)+"e").split("e"),f=t(o[0]+"e"+(+o[1]+i));return o=(Se(f)+"e").split("e"),+(o[0]+"e"+(+o[1]-i))}return t(n)}}var rl=vn&&1/Vn(new vn([,-0]))[1]==Te?function(e){return new vn(e)}:eo;function Ks(e){return function(t){var n=ze(t);return n==Re?ui(t):n==$e?wf(t):hf(t,e(t))}}function Bt(e,t,n,i,o,f,y,C){var x=t&q;if(!x&&typeof e!="function")throw new lt(m);var O=i?i.length:0;if(O||(t&=~(z|D),i=o=r),y=y===r?y:De(le(y),0),C=C===r?C:le(C),O-=o?o.length:0,t&D){var L=i,N=o;i=o=r}var K=x?r:Ui(e),Z=[e,t,n,i,o,L,N,f,y,C];if(K&&_l(Z,K),e=Z[0],t=Z[1],n=Z[2],i=Z[3],o=Z[4],C=Z[9]=Z[9]===r?x?0:e.length:De(Z[9]-O,0),!C&&t&(Y|se)&&(t&=~(Y|se)),!t||t==T)var re=el(e,t,n);else t==Y||t==se?re=tl(e,t,C):(t==z||t==(T|z))&&!o.length?re=nl(e,t,n,i):re=mr.apply(r,Z);var pe=K?Cs:js;return ea(pe(re,Z),e,t)}function Hs(e,t,n,i){return e===r||wt(e,gn[n])&&!Ce.call(i,n)?t:e}function zs(e,t,n,i,o,f){return Le(e)&&Le(t)&&(f.set(t,e),gr(e,t,r,zs,f),f.delete(t)),e}function il(e){return Hn(e)?r:e}function Gs(e,t,n,i,o,f){var y=n&w,C=e.length,x=t.length;if(C!=x&&!(y&&x>C))return!1;var O=f.get(e),L=f.get(t);if(O&&L)return O==t&&L==e;var N=-1,K=!0,Z=n&k?new tn:r;for(f.set(e,t),f.set(t,e);++N<C;){var re=e[N],pe=t[N];if(i)var ie=y?i(pe,re,N,t,e,f):i(re,pe,N,e,t,f);if(ie!==r){if(ie)continue;K=!1;break}if(Z){if(!ni(t,function(ge,ye){if(!Rn(Z,ye)&&(re===ge||o(re,ge,n,i,f)))return Z.push(ye)})){K=!1;break}}else if(!(re===pe||o(re,pe,n,i,f))){K=!1;break}}return f.delete(e),f.delete(t),K}function ol(e,t,n,i,o,f,y){switch(n){case fn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Wt:return!(e.byteLength!=t.byteLength||!f(new rr(e),new rr(t)));case Q:case ee:case yt:return wt(+e,+t);case ae:return e.name==t.name&&e.message==t.message;case Ge:case At:return e==t+"";case Re:var C=ui;case $e:var x=i&w;if(C||(C=Vn),e.size!=t.size&&!x)return!1;var O=y.get(e);if(O)return O==t;i|=k,y.set(e,t);var L=Gs(C(e),C(t),i,o,f,y);return y.delete(e),L;case xt:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}function sl(e,t,n,i,o,f){var y=n&w,C=Ni(e),x=C.length,O=Ni(t),L=O.length;if(x!=L&&!y)return!1;for(var N=x;N--;){var K=C[N];if(!(y?K in t:Ce.call(t,K)))return!1}var Z=f.get(e),re=f.get(t);if(Z&&re)return Z==t&&re==e;var pe=!0;f.set(e,t),f.set(t,e);for(var ie=y;++N<x;){K=C[N];var ge=e[K],ye=t[K];if(i)var at=y?i(ye,ge,K,t,e,f):i(ge,ye,K,e,t,f);if(!(at===r?ge===ye||o(ge,ye,n,i,f):at)){pe=!1;break}ie||(ie=K=="constructor")}if(pe&&!ie){var Ye=e.constructor,ut=t.constructor;Ye!=ut&&"constructor"in e&&"constructor"in t&&!(typeof Ye=="function"&&Ye instanceof Ye&&typeof ut=="function"&&ut instanceof ut)&&(pe=!1)}return f.delete(e),f.delete(t),pe}function Ut(e){return qi(Vs(e,r,sa),e+"")}function Ni(e){return ls(e,Pe,Pi)}function Bi(e){return ls(e,Qe,$s)}var Ui=fr?function(e){return fr.get(e)}:eo;function br(e){for(var t=e.name+"",n=yn[t],i=Ce.call(yn,t)?n.length:0;i--;){var o=n[i],f=o.func;if(f==null||f==e)return o.name}return t}function Sn(e){var t=Ce.call(u,"placeholder")?u:e;return t.placeholder}function ne(){var e=u.iteratee||Qi;return e=e===Qi?ds:e,arguments.length?e(arguments[0],arguments[1]):e}function Ar(e,t){var n=e.__data__;return dl(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Di(e){for(var t=Pe(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Ys(o)]}return t}function on(e,t){var n=yf(e,t);return ps(n)?n:r}function al(e){var t=Ce.call(e,jt),n=e[jt];try{e[jt]=r;var i=!0}catch{}var o=tr.call(e);return i&&(t?e[jt]=n:delete e[jt]),o}var Pi=ci?function(e){return e==null?[]:(e=xe(e),qt(ci(e),function(t){return Qo.call(e,t)}))}:to,$s=ci?function(e){for(var t=[];e;)Kt(t,Pi(e)),e=ir(e);return t}:to,ze=Xe;(li&&ze(new li(new ArrayBuffer(1)))!=fn||Ln&&ze(new Ln)!=Re||hi&&ze(hi.resolve())!=un||vn&&ze(new vn)!=$e||In&&ze(new In)!=Ot)&&(ze=function(e){var t=Xe(e),n=t==nt?e.constructor:r,i=n?sn(n):"";if(i)switch(i){case Hf:return fn;case zf:return Re;case Gf:return un;case $f:return $e;case Xf:return Ot}return t});function ul(e,t,n){for(var i=-1,o=n.length;++i<o;){var f=n[i],y=f.size;switch(f.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=He(t,e+y);break;case"takeRight":e=De(e,t-y);break}}return{start:e,end:t}}function fl(e){var t=e.match(du);return t?t[1].split(gu):[]}function Xs(e,t,n){t=Xt(t,e);for(var i=-1,o=t.length,f=!1;++i<o;){var y=Tt(t[i]);if(!(f=e!=null&&n(e,y)))break;e=e[y]}return f||++i!=o?f:(o=e==null?0:e.length,!!o&&Lr(o)&&Dt(y,o)&&(ce(e)||an(e)))}function cl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Js(e){return typeof e.constructor=="function"&&!qn(e)?_n(ir(e)):{}}function ll(e,t,n){var i=e.constructor;switch(t){case Wt:return Oi(e);case Q:case ee:return new i(+e);case fn:return Jc(e,n);case Dr:case Pr:case Fr:case Mr:case Wr:case qr:case Kr:case Hr:case zr:return Os(e,n);case Re:return new i;case yt:case At:return new i(e);case Ge:return Yc(e);case $e:return new i;case xt:return Zc(e)}}function hl(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(pu,`{
14
14
  /* [wrapped with `+t+`] */
15
- `)}function hl(e){return ce(e)||un(e)||!!(jo&&e&&e[jo])}function Ut(e,t){var n=typeof e;return t=t??ae,!!t&&(n=="number"||n!="symbol"&&Aa.test(e))&&e>-1&&e%1==0&&e<t}function Xe(e,t,n){if(!Ie(n))return!1;var i=typeof t;return(i=="number"?Ze(n)&&Ut(t,n.length):i=="string"&&t in n)?mt(n[t],e):!1}function Fi(e,t){if(ce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ot(e)?!0:aa.test(e)||!ua.test(e)||t!=null&&e in Ce(t)}function pl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mi(e){var t=Ar(e),n=a[t];if(typeof n!="function"||!(t in ge.prototype))return!1;if(e===n)return!0;var i=Ui(n);return!!i&&e===i[0]}function dl(e){return!!Yo&&Yo in e}var gl=jn?Dt:no;function qn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gn;return e===n}function Ys(e){return e===e&&!Ie(e)}function Zs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in Ce(n))}}function vl(e){var t=Rr(e,function(i){return n.size===h&&n.clear(),i}),n=t.cache;return t}function yl(e,t){var n=e[1],i=t[1],o=n|i,f=o<(E|q|M),y=i==M&&n==Y||i==M&&n==H&&e[7].length<=t[8]||i==(M|H)&&t[7].length<=t[8]&&n==Y;if(!(f||y))return e;i&E&&(e[2]=t[2],o|=n&E?0:oe);var b=t[3];if(b){var C=e[3];e[3]=C?Os(C,b,t[4]):b,e[4]=C?Ht(e[3],_):t[4]}return b=t[5],b&&(C=e[5],e[5]=C?Ns(C,b,t[6]):b,e[6]=C?Ht(e[5],_):t[6]),b=t[7],b&&(e[7]=b),i&M&&(e[8]=e[8]==null?t[8]:Ke(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function _l(e){var t=[];if(e!=null)for(var n in Ce(e))t.push(n);return t}function ml(e){return tr.call(e)}function Vs(e,t,n){return t=De(t===r?e.length-1:t,0),function(){for(var i=arguments,o=-1,f=De(i.length-t,0),y=T(f);++o<f;)y[o]=i[t+o];o=-1;for(var b=T(t+1);++o<t;)b[o]=i[o];return b[t]=n(y),nt(e,this,b)}}function Qs(e,t){return t.length<2?e:rn(e,pt(t,0,-1))}function wl(e,t){for(var n=e.length,i=Ke(t.length,n),o=Ye(e);i--;){var f=t[i];e[i]=Ut(f,n)?o[f]:r}return e}function Wi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var js=tu(bs),Kn=Uf||function(e,t){return Fe.setTimeout(e,t)},qi=tu(Hc);function eu(e,t,n){var i=t+"";return qi(e,ll(i,Sl(al(i),n)))}function tu(e){var t=0,n=0;return function(){var i=Mf(),o=V-(i-n);if(n=i,o>0){if(++t>=j)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Cr(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var f=Ai(n,o),y=e[f];e[f]=e[n],e[n]=y}return e.length=t,e}var nu=vl(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fa,function(n,i,o,f){t.push(o?f.replace(ya,"$1"):i||n)}),t});function Tt(e){if(typeof e=="string"||ot(e))return e;var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function sn(e){if(e!=null){try{return er.call(e)}catch{}try{return e+""}catch{}}return""}function Sl(e,t){return ft(J,function(n){var i="_."+n[0];t&n[1]&&!Yn(e,i)&&e.push(i)}),e.sort()}function ru(e){if(e instanceof ge)return e.clone();var t=new lt(e.__wrapped__,e.__chain__);return t.__actions__=Ye(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function bl(e,t,n){(n?Xe(e,t,n):t===r)?t=1:t=De(le(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,f=0,y=T(ur(i/t));o<i;)y[f++]=pt(e,o,o+=t);return y}function Al(e){for(var t=-1,n=e==null?0:e.length,i=0,o=[];++t<n;){var f=e[t];f&&(o[i++]=f)}return o}function xl(){var e=arguments.length;if(!e)return[];for(var t=T(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Kt(ce(n)?Ye(n):[n],Me(t,1))}var Cl=pe(function(e,t){return Ne(e)?Dn(e,Me(t,1,Ne,!0)):[]}),kl=pe(function(e,t){var n=dt(t);return Ne(n)&&(n=r),Ne(e)?Dn(e,Me(t,1,Ne,!0),ne(n,2)):[]}),Tl=pe(function(e,t){var n=dt(t);return Ne(n)&&(n=r),Ne(e)?Dn(e,Me(t,1,Ne,!0),r,n):[]});function El(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),pt(e,t<0?0:t,i)):[]}function Rl(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,pt(e,0,t<0?0:t)):[]}function Ll(e,t){return e&&e.length?yr(e,ne(t,3),!0,!0):[]}function Il(e,t){return e&&e.length?yr(e,ne(t,3),!0):[]}function Ol(e,t,n,i){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Xe(e,t,n)&&(n=0,i=o),xc(e,t,n,i)):[]}function iu(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),Zn(e,ne(t,3),o)}function ou(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=le(n),o=n<0?De(i+o,0):Ke(o,i-1)),Zn(e,ne(t,3),o,!0)}function su(e){var t=e==null?0:e.length;return t?Me(e,1):[]}function Nl(e){var t=e==null?0:e.length;return t?Me(e,Ee):[]}function Bl(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:le(t),Me(e,t)):[]}function Ul(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i}function uu(e){return e&&e.length?e[0]:r}function Dl(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),ln(e,t,o)}function Pl(e){var t=e==null?0:e.length;return t?pt(e,0,-1):[]}var Fl=pe(function(e){var t=Le(e,Ei);return t.length&&t[0]===e[0]?_i(t):[]}),Ml=pe(function(e){var t=dt(e),n=Le(e,Ei);return t===dt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?_i(n,ne(t,2)):[]}),Wl=pe(function(e){var t=dt(e),n=Le(e,Ei);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?_i(n,r,t):[]});function ql(e,t){return e==null?"":Pf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Kl(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=le(n),o=o<0?De(i+o,0):Ke(o,i-1)),t===t?Sf(e,t,o):Zn(e,qo,o,!0)}function Hl(e,t){return e&&e.length?_s(e,le(t)):r}var Gl=pe(au);function au(e,t){return e&&e.length&&t&&t.length?bi(e,t):e}function zl(e,t,n){return e&&e.length&&t&&t.length?bi(e,t,ne(n,2)):e}function $l(e,t,n){return e&&e.length&&t&&t.length?bi(e,t,r,n):e}var Xl=Bt(function(e,t){var n=e==null?0:e.length,i=di(e,t);return Ss(e,Le(t,function(o){return Ut(o,n)?+o:o}).sort(Is)),i});function Jl(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,o=[],f=e.length;for(t=ne(t,3);++i<f;){var y=e[i];t(y,i,e)&&(n.push(y),o.push(i))}return Ss(e,o),n}function Ki(e){return e==null?e:qf.call(e)}function Yl(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&Xe(e,t,n)?(t=0,n=i):(t=t==null?0:le(t),n=n===r?i:le(n)),pt(e,t,n)):[]}function Zl(e,t){return vr(e,t)}function Vl(e,t,n){return Ci(e,t,ne(n,2))}function Ql(e,t){var n=e==null?0:e.length;if(n){var i=vr(e,t);if(i<n&&mt(e[i],t))return i}return-1}function jl(e,t){return vr(e,t,!0)}function eh(e,t,n){return Ci(e,t,ne(n,2),!0)}function th(e,t){var n=e==null?0:e.length;if(n){var i=vr(e,t,!0)-1;if(mt(e[i],t))return i}return-1}function nh(e){return e&&e.length?As(e):[]}function rh(e,t){return e&&e.length?As(e,ne(t,2)):[]}function ih(e){var t=e==null?0:e.length;return t?pt(e,1,t):[]}function oh(e,t,n){return e&&e.length?(t=n||t===r?1:le(t),pt(e,0,t<0?0:t)):[]}function sh(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,pt(e,t<0?0:t,i)):[]}function uh(e,t){return e&&e.length?yr(e,ne(t,3),!1,!0):[]}function ah(e,t){return e&&e.length?yr(e,ne(t,3)):[]}var fh=pe(function(e){return $t(Me(e,1,Ne,!0))}),ch=pe(function(e){var t=dt(e);return Ne(t)&&(t=r),$t(Me(e,1,Ne,!0),ne(t,2))}),lh=pe(function(e){var t=dt(e);return t=typeof t=="function"?t:r,$t(Me(e,1,Ne,!0),r,t)});function hh(e){return e&&e.length?$t(e):[]}function ph(e,t){return e&&e.length?$t(e,ne(t,2)):[]}function dh(e,t){return t=typeof t=="function"?t:r,e&&e.length?$t(e,r,t):[]}function Hi(e){if(!(e&&e.length))return[];var t=0;return e=qt(e,function(n){if(Ne(n))return t=De(n.length,t),!0}),si(t,function(n){return Le(e,ri(n))})}function fu(e,t){if(!(e&&e.length))return[];var n=Hi(e);return t==null?n:Le(n,function(i){return nt(t,r,i)})}var gh=pe(function(e,t){return Ne(e)?Dn(e,t):[]}),vh=pe(function(e){return Ti(qt(e,Ne))}),yh=pe(function(e){var t=dt(e);return Ne(t)&&(t=r),Ti(qt(e,Ne),ne(t,2))}),_h=pe(function(e){var t=dt(e);return t=typeof t=="function"?t:r,Ti(qt(e,Ne),r,t)}),mh=pe(Hi);function wh(e,t){return Ts(e||[],t||[],Un)}function Sh(e,t){return Ts(e||[],t||[],Mn)}var bh=pe(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,fu(e,n)});function cu(e){var t=a(e);return t.__chain__=!0,t}function Ah(e,t){return t(e),e}function kr(e,t){return t(e)}var xh=Bt(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(f){return di(f,e)};return t>1||this.__actions__.length||!(i instanceof ge)||!Ut(n)?this.thru(o):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:kr,args:[o],thisArg:r}),new lt(i,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function Ch(){return cu(this)}function kh(){return new lt(this.value(),this.__chain__)}function Th(){this.__values__===r&&(this.__values__=xu(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Eh(){return this}function Rh(e){for(var t,n=this;n instanceof lr;){var i=ru(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function Lh(){var e=this.__wrapped__;if(e instanceof ge){var t=e;return this.__actions__.length&&(t=new ge(this)),t=t.reverse(),t.__actions__.push({func:kr,args:[Ki],thisArg:r}),new lt(t,this.__chain__)}return this.thru(Ki)}function Ih(){return ks(this.__wrapped__,this.__actions__)}var Oh=_r(function(e,t,n){be.call(e,n)?++e[n]:Ot(e,n,1)});function Nh(e,t,n){var i=ce(e)?Mo:Ac;return n&&Xe(e,t,n)&&(t=r),i(e,ne(t,3))}function Bh(e,t){var n=ce(e)?qt:fs;return n(e,ne(t,3))}var Uh=Ps(iu),Dh=Ps(ou);function Ph(e,t){return Me(Tr(e,t),1)}function Fh(e,t){return Me(Tr(e,t),Ee)}function Mh(e,t,n){return n=n===r?1:le(n),Me(Tr(e,t),n)}function lu(e,t){var n=ce(e)?ft:zt;return n(e,ne(t,3))}function hu(e,t){var n=ce(e)?rf:as;return n(e,ne(t,3))}var Wh=_r(function(e,t,n){be.call(e,n)?e[n].push(t):Ot(e,n,[t])});function qh(e,t,n,i){e=Ze(e)?e:An(e),n=n&&!i?le(n):0;var o=e.length;return n<0&&(n=De(o+n,0)),Or(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&ln(e,t,n)>-1}var Kh=pe(function(e,t,n){var i=-1,o=typeof t=="function",f=Ze(e)?T(e.length):[];return zt(e,function(y){f[++i]=o?nt(t,y,n):Pn(y,t,n)}),f}),Hh=_r(function(e,t,n){Ot(e,n,t)});function Tr(e,t){var n=ce(e)?Le:gs;return n(e,ne(t,3))}function Gh(e,t,n,i){return e==null?[]:(ce(t)||(t=t==null?[]:[t]),n=i?r:n,ce(n)||(n=n==null?[]:[n]),ms(e,t,n))}var zh=_r(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function $h(e,t,n){var i=ce(e)?ti:Ho,o=arguments.length<3;return i(e,ne(t,4),n,o,zt)}function Xh(e,t,n){var i=ce(e)?of:Ho,o=arguments.length<3;return i(e,ne(t,4),n,o,as)}function Jh(e,t){var n=ce(e)?qt:fs;return n(e,Lr(ne(t,3)))}function Yh(e){var t=ce(e)?is:qc;return t(e)}function Zh(e,t,n){(n?Xe(e,t,n):t===r)?t=1:t=le(t);var i=ce(e)?_c:Kc;return i(e,t)}function Vh(e){var t=ce(e)?mc:Gc;return t(e)}function Qh(e){if(e==null)return 0;if(Ze(e))return Or(e)?pn(e):e.length;var t=He(e);return t==Re||t==ze?e.size:wi(e).length}function jh(e,t,n){var i=ce(e)?ni:zc;return n&&Xe(e,t,n)&&(t=r),i(e,ne(t,3))}var ep=pe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Xe(e,t[0],t[1])?t=[]:n>2&&Xe(t[0],t[1],t[2])&&(t=[t[0]]),ms(e,Me(t,1),[])}),Er=Bf||function(){return Fe.Date.now()};function tp(e,t){if(typeof t!="function")throw new ct(m);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function pu(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Nt(e,M,r,r,r,r,t)}function du(e,t){var n;if(typeof t!="function")throw new ct(m);return e=le(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Gi=pe(function(e,t,n){var i=E;if(n.length){var o=Ht(n,Sn(Gi));i|=G}return Nt(e,i,t,n,o)}),gu=pe(function(e,t,n){var i=E|q;if(n.length){var o=Ht(n,Sn(gu));i|=G}return Nt(t,i,e,n,o)});function vu(e,t,n){t=n?r:t;var i=Nt(e,Y,r,r,r,r,r,t);return i.placeholder=vu.placeholder,i}function yu(e,t,n){t=n?r:t;var i=Nt(e,se,r,r,r,r,r,t);return i.placeholder=yu.placeholder,i}function _u(e,t,n){var i,o,f,y,b,C,L=0,I=!1,N=!1,K=!0;if(typeof e!="function")throw new ct(m);t=gt(t)||0,Ie(n)&&(I=!!n.leading,N="maxWait"in n,f=N?De(gt(n.maxWait)||0,t):f,K="trailing"in n?!!n.trailing:K);function Z(Be){var wt=i,Ft=o;return i=o=r,L=Be,y=e.apply(Ft,wt),y}function re(Be){return L=Be,b=Kn(de,t),I?Z(Be):y}function he(Be){var wt=Be-C,Ft=Be-L,Pu=t-wt;return N?Ke(Pu,f-Ft):Pu}function ie(Be){var wt=Be-C,Ft=Be-L;return C===r||wt>=t||wt<0||N&&Ft>=f}function de(){var Be=Er();if(ie(Be))return ye(Be);b=Kn(de,he(Be))}function ye(Be){return b=r,K&&i?Z(Be):(i=o=r,y)}function st(){b!==r&&Es(b),L=0,i=C=o=b=r}function Je(){return b===r?y:ye(Er())}function ut(){var Be=Er(),wt=ie(Be);if(i=arguments,o=this,C=Be,wt){if(b===r)return re(C);if(N)return Es(b),b=Kn(de,t),Z(C)}return b===r&&(b=Kn(de,t)),y}return ut.cancel=st,ut.flush=Je,ut}var np=pe(function(e,t){return us(e,1,t)}),rp=pe(function(e,t,n){return us(e,gt(t)||0,n)});function ip(e){return Nt(e,O)}function Rr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ct(m);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],f=n.cache;if(f.has(o))return f.get(o);var y=e.apply(this,i);return n.cache=f.set(o,y)||f,y};return n.cache=new(Rr.Cache||It),n}Rr.Cache=It;function Lr(e){if(typeof e!="function")throw new ct(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function op(e){return du(2,e)}var sp=$c(function(e,t){t=t.length==1&&ce(t[0])?Le(t[0],rt(ne())):Le(Me(t,1),rt(ne()));var n=t.length;return pe(function(i){for(var o=-1,f=Ke(i.length,n);++o<f;)i[o]=t[o].call(this,i[o]);return nt(e,this,i)})}),zi=pe(function(e,t){var n=Ht(t,Sn(zi));return Nt(e,G,r,t,n)}),mu=pe(function(e,t){var n=Ht(t,Sn(mu));return Nt(e,D,r,t,n)}),up=Bt(function(e,t){return Nt(e,H,r,r,r,t)});function ap(e,t){if(typeof e!="function")throw new ct(m);return t=t===r?t:le(t),pe(e,t)}function fp(e,t){if(typeof e!="function")throw new ct(m);return t=t==null?0:De(le(t),0),pe(function(n){var i=n[t],o=Jt(n,0,t);return i&&Kt(o,i),nt(e,this,o)})}function cp(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new ct(m);return Ie(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),_u(e,t,{leading:i,maxWait:t,trailing:o})}function lp(e){return pu(e,1)}function hp(e,t){return zi(Ri(t),e)}function pp(){if(!arguments.length)return[];var e=arguments[0];return ce(e)?e:[e]}function dp(e){return ht(e,s)}function gp(e,t){return t=typeof t=="function"?t:r,ht(e,s,t)}function vp(e){return ht(e,p|s)}function yp(e,t){return t=typeof t=="function"?t:r,ht(e,p|s,t)}function _p(e,t){return t==null||ss(e,t,Pe(t))}function mt(e,t){return e===t||e!==e&&t!==t}var mp=br(yi),wp=br(function(e,t){return e>=t}),un=hs(function(){return arguments}())?hs:function(e){return Oe(e)&&be.call(e,"callee")&&!Qo.call(e,"callee")},ce=T.isArray,Sp=No?rt(No):Rc;function Ze(e){return e!=null&&Ir(e.length)&&!Dt(e)}function Ne(e){return Oe(e)&&Ze(e)}function bp(e){return e===!0||e===!1||Oe(e)&&$e(e)==Q}var Yt=Df||no,Ap=Bo?rt(Bo):Lc;function xp(e){return Oe(e)&&e.nodeType===1&&!Hn(e)}function Cp(e){if(e==null)return!0;if(Ze(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||Yt(e)||bn(e)||un(e)))return!e.length;var t=He(e);if(t==Re||t==ze)return!e.size;if(qn(e))return!wi(e).length;for(var n in e)if(be.call(e,n))return!1;return!0}function kp(e,t){return Fn(e,t)}function Tp(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Fn(e,t,r,n):!!i}function $i(e){if(!Oe(e))return!1;var t=$e(e);return t==ue||t==$||typeof e.message=="string"&&typeof e.name=="string"&&!Hn(e)}function Ep(e){return typeof e=="number"&&es(e)}function Dt(e){if(!Ie(e))return!1;var t=$e(e);return t==me||t==qe||t==P||t==kn}function wu(e){return typeof e=="number"&&e==le(e)}function Ir(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ae}function Ie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Oe(e){return e!=null&&typeof e=="object"}var Su=Uo?rt(Uo):Oc;function Rp(e,t){return e===t||mi(e,t,Di(t))}function Lp(e,t,n){return n=typeof n=="function"?n:r,mi(e,t,Di(t),n)}function Ip(e){return bu(e)&&e!=+e}function Op(e){if(gl(e))throw new fe(g);return ps(e)}function Np(e){return e===null}function Bp(e){return e==null}function bu(e){return typeof e=="number"||Oe(e)&&$e(e)==vt}function Hn(e){if(!Oe(e)||$e(e)!=tt)return!1;var t=ir(e);if(t===null)return!0;var n=be.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&er.call(n)==Lf}var Xi=Do?rt(Do):Nc;function Up(e){return wu(e)&&e>=-ae&&e<=ae}var Au=Po?rt(Po):Bc;function Or(e){return typeof e=="string"||!ce(e)&&Oe(e)&&$e(e)==At}function ot(e){return typeof e=="symbol"||Oe(e)&&$e(e)==xt}var bn=Fo?rt(Fo):Uc;function Dp(e){return e===r}function Pp(e){return Oe(e)&&He(e)==Rt}function Fp(e){return Oe(e)&&$e(e)==En}var Mp=br(Si),Wp=br(function(e,t){return e<=t});function xu(e){if(!e)return[];if(Ze(e))return Or(e)?yt(e):Ye(e);if(Ln&&e[Ln])return _f(e[Ln]());var t=He(e),n=t==Re?ai:t==ze?Vn:An;return n(e)}function Pt(e){if(!e)return e===0?e:0;if(e=gt(e),e===Ee||e===-Ee){var t=e<0?-1:1;return t*We}return e===e?e:0}function le(e){var t=Pt(e),n=t%1;return t===t?n?t-n:t:0}function Cu(e){return e?nn(le(e),0,et):0}function gt(e){if(typeof e=="number")return e;if(ot(e))return bt;if(Ie(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ie(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Go(e);var n=wa.test(e);return n||ba.test(e)?ef(e.slice(2),n?2:8):ma.test(e)?bt:+e}function ku(e){return kt(e,Ve(e))}function qp(e){return e?nn(le(e),-ae,ae):e===0?e:0}function we(e){return e==null?"":it(e)}var Kp=mn(function(e,t){if(qn(t)||Ze(t)){kt(t,Pe(t),e);return}for(var n in t)be.call(t,n)&&Un(e,n,t[n])}),Tu=mn(function(e,t){kt(t,Ve(t),e)}),Nr=mn(function(e,t,n,i){kt(t,Ve(t),e,i)}),Hp=mn(function(e,t,n,i){kt(t,Pe(t),e,i)}),Gp=Bt(di);function zp(e,t){var n=_n(e);return t==null?n:os(n,t)}var $p=pe(function(e,t){e=Ce(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&Xe(t[0],t[1],o)&&(i=1);++n<i;)for(var f=t[n],y=Ve(f),b=-1,C=y.length;++b<C;){var L=y[b],I=e[L];(I===r||mt(I,gn[L])&&!be.call(e,L))&&(e[L]=f[L])}return e}),Xp=pe(function(e){return e.push(r,Gs),nt(Eu,r,e)});function Jp(e,t){return Wo(e,ne(t,3),Ct)}function Yp(e,t){return Wo(e,ne(t,3),vi)}function Zp(e,t){return e==null?e:gi(e,ne(t,3),Ve)}function Vp(e,t){return e==null?e:cs(e,ne(t,3),Ve)}function Qp(e,t){return e&&Ct(e,ne(t,3))}function jp(e,t){return e&&vi(e,ne(t,3))}function ed(e){return e==null?[]:dr(e,Pe(e))}function td(e){return e==null?[]:dr(e,Ve(e))}function Ji(e,t,n){var i=e==null?r:rn(e,t);return i===r?n:i}function nd(e,t){return e!=null&&Xs(e,t,Cc)}function Yi(e,t){return e!=null&&Xs(e,t,kc)}var rd=Ms(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),e[t]=n},Vi(Qe)),id=Ms(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),be.call(e,t)?e[t].push(n):e[t]=[n]},ne),od=pe(Pn);function Pe(e){return Ze(e)?rs(e):wi(e)}function Ve(e){return Ze(e)?rs(e,!0):Dc(e)}function sd(e,t){var n={};return t=ne(t,3),Ct(e,function(i,o,f){Ot(n,t(i,o,f),i)}),n}function ud(e,t){var n={};return t=ne(t,3),Ct(e,function(i,o,f){Ot(n,o,t(i,o,f))}),n}var ad=mn(function(e,t,n){gr(e,t,n)}),Eu=mn(function(e,t,n,i){gr(e,t,n,i)}),fd=Bt(function(e,t){var n={};if(e==null)return n;var i=!1;t=Le(t,function(f){return f=Xt(f,e),i||(i=f.length>1),f}),kt(e,Bi(e),n),i&&(n=ht(n,p|u|s,rl));for(var o=t.length;o--;)ki(n,t[o]);return n});function cd(e,t){return Ru(e,Lr(ne(t)))}var ld=Bt(function(e,t){return e==null?{}:Fc(e,t)});function Ru(e,t){if(e==null)return{};var n=Le(Bi(e),function(i){return[i]});return t=ne(t),ws(e,n,function(i,o){return t(i,o[0])})}function hd(e,t,n){t=Xt(t,e);var i=-1,o=t.length;for(o||(o=1,e=r);++i<o;){var f=e==null?r:e[Tt(t[i])];f===r&&(i=o,f=n),e=Dt(f)?f.call(e):f}return e}function pd(e,t,n){return e==null?e:Mn(e,t,n)}function dd(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Mn(e,t,n,i)}var Lu=Ks(Pe),Iu=Ks(Ve);function gd(e,t,n){var i=ce(e),o=i||Yt(e)||bn(e);if(t=ne(t,4),n==null){var f=e&&e.constructor;o?n=i?new f:[]:Ie(e)?n=Dt(f)?_n(ir(e)):{}:n={}}return(o?ft:Ct)(e,function(y,b,C){return t(n,y,b,C)}),n}function vd(e,t){return e==null?!0:ki(e,t)}function yd(e,t,n){return e==null?e:Cs(e,t,Ri(n))}function _d(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Cs(e,t,Ri(n),i)}function An(e){return e==null?[]:ui(e,Pe(e))}function md(e){return e==null?[]:ui(e,Ve(e))}function wd(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=gt(n),n=n===n?n:0),t!==r&&(t=gt(t),t=t===t?t:0),nn(gt(e),t,n)}function Sd(e,t,n){return t=Pt(t),n===r?(n=t,t=0):n=Pt(n),e=gt(e),Tc(e,t,n)}function bd(e,t,n){if(n&&typeof n!="boolean"&&Xe(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Pt(e),t===r?(t=e,e=0):t=Pt(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=ts();return Ke(e+o*(t-e+ja("1e-"+((o+"").length-1))),t)}return Ai(e,t)}var Ad=wn(function(e,t,n){return t=t.toLowerCase(),e+(n?Ou(t):t)});function Ou(e){return Zi(we(e).toLowerCase())}function Nu(e){return e=we(e),e&&e.replace(xa,pf).replace(Ha,"")}function xd(e,t,n){e=we(e),t=it(t);var i=e.length;n=n===r?i:nn(le(n),0,i);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function Cd(e){return e=we(e),e&&ia.test(e)?e.replace(fo,df):e}function kd(e){return e=we(e),e&&ca.test(e)?e.replace(zr,"\\$&"):e}var Td=wn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ed=wn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Rd=Ds("toLowerCase");function Ld(e,t,n){e=we(e),t=le(t);var i=t?pn(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return Sr(ar(o),n)+e+Sr(ur(o),n)}function Id(e,t,n){e=we(e),t=le(t);var i=t?pn(e):0;return t&&i<t?e+Sr(t-i,n):e}function Od(e,t,n){e=we(e),t=le(t);var i=t?pn(e):0;return t&&i<t?Sr(t-i,n)+e:e}function Nd(e,t,n){return n||t==null?t=0:t&&(t=+t),Wf(we(e).replace($r,""),t||0)}function Bd(e,t,n){return(n?Xe(e,t,n):t===r)?t=1:t=le(t),xi(we(e),t)}function Ud(){var e=arguments,t=we(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Dd=wn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function Pd(e,t,n){return n&&typeof n!="number"&&Xe(e,t,n)&&(t=n=r),n=n===r?et:n>>>0,n?(e=we(e),e&&(typeof t=="string"||t!=null&&!Xi(t))&&(t=it(t),!t&&hn(e))?Jt(yt(e),0,n):e.split(t,n)):[]}var Fd=wn(function(e,t,n){return e+(n?" ":"")+Zi(t)});function Md(e,t,n){return e=we(e),n=n==null?0:nn(le(n),0,e.length),t=it(t),e.slice(n,n+t.length)==t}function Wd(e,t,n){var i=a.templateSettings;n&&Xe(e,t,n)&&(t=r),e=we(e),t=Nr({},t,i,Hs);var o=Nr({},t.imports,i.imports,Hs),f=Pe(o),y=ui(o,f),b,C,L=0,I=t.interpolate||$n,N="__p += '",K=fi((t.escape||$n).source+"|"+I.source+"|"+(I===co?_a:$n).source+"|"+(t.evaluate||$n).source+"|$","g"),Z="//# sourceURL="+(be.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ja+"]")+`
16
- `;e.replace(K,function(ie,de,ye,st,Je,ut){return ye||(ye=st),N+=e.slice(L,ut).replace(Ca,gf),de&&(b=!0,N+=`' +
17
- __e(`+de+`) +
18
- '`),Je&&(C=!0,N+=`';
19
- `+Je+`;
15
+ `)}function pl(e){return ce(e)||an(e)||!!(jo&&e&&e[jo])}function Dt(e,t){var n=typeof e;return t=t??ue,!!t&&(n=="number"||n!="symbol"&&Au.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,n){if(!Le(n))return!1;var i=typeof t;return(i=="number"?Ve(n)&&Dt(t,n.length):i=="string"&&t in n)?wt(n[t],e):!1}function Fi(e,t){if(ce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||st(e)?!0:fu.test(e)||!uu.test(e)||t!=null&&e in xe(t)}function dl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mi(e){var t=br(e),n=u[t];if(typeof n!="function"||!(t in ve.prototype))return!1;if(e===n)return!0;var i=Ui(n);return!!i&&e===i[0]}function gl(e){return!!Yo&&Yo in e}var vl=jn?Pt:no;function qn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gn;return e===n}function Ys(e){return e===e&&!Le(e)}function Zs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in xe(n))}}function yl(e){var t=Rr(e,function(i){return n.size===h&&n.clear(),i}),n=t.cache;return t}function _l(e,t){var n=e[1],i=t[1],o=n|i,f=o<(T|q|M),y=i==M&&n==Y||i==M&&n==H&&e[7].length<=t[8]||i==(M|H)&&t[7].length<=t[8]&&n==Y;if(!(f||y))return e;i&T&&(e[2]=t[2],o|=n&T?0:oe);var C=t[3];if(C){var x=e[3];e[3]=x?Is(x,C,t[4]):C,e[4]=x?Ht(e[3],_):t[4]}return C=t[5],C&&(x=e[5],e[5]=x?Ns(x,C,t[6]):C,e[6]=x?Ht(e[5],_):t[6]),C=t[7],C&&(e[7]=C),i&M&&(e[8]=e[8]==null?t[8]:He(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function ml(e){var t=[];if(e!=null)for(var n in xe(e))t.push(n);return t}function wl(e){return tr.call(e)}function Vs(e,t,n){return t=De(t===r?e.length-1:t,0),function(){for(var i=arguments,o=-1,f=De(i.length-t,0),y=E(f);++o<f;)y[o]=i[t+o];o=-1;for(var C=E(t+1);++o<t;)C[o]=i[o];return C[t]=n(y),rt(e,this,C)}}function Qs(e,t){return t.length<2?e:rn(e,dt(t,0,-1))}function Sl(e,t){for(var n=e.length,i=He(t.length,n),o=Ze(e);i--;){var f=t[i];e[i]=Dt(f,n)?o[f]:r}return e}function Wi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var js=ta(Cs),Kn=Df||function(e,t){return Fe.setTimeout(e,t)},qi=ta(zc);function ea(e,t,n){var i=t+"";return qi(e,hl(i,Cl(fl(i),n)))}function ta(e){var t=0,n=0;return function(){var i=Wf(),o=V-(i-n);if(n=i,o>0){if(++t>=j)return arguments[0]}else t=0;return e.apply(r,arguments)}}function xr(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var f=bi(n,o),y=e[f];e[f]=e[n],e[n]=y}return e.length=t,e}var na=yl(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cu,function(n,i,o,f){t.push(o?f.replace(_u,"$1"):i||n)}),t});function Tt(e){if(typeof e=="string"||st(e))return e;var t=e+"";return t=="0"&&1/e==-Te?"-0":t}function sn(e){if(e!=null){try{return er.call(e)}catch{}try{return e+""}catch{}}return""}function Cl(e,t){return ct(J,function(n){var i="_."+n[0];t&n[1]&&!Yn(e,i)&&e.push(i)}),e.sort()}function ra(e){if(e instanceof ve)return e.clone();var t=new ht(e.__wrapped__,e.__chain__);return t.__actions__=Ze(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function bl(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=De(le(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,f=0,y=E(ar(i/t));o<i;)y[f++]=dt(e,o,o+=t);return y}function Al(e){for(var t=-1,n=e==null?0:e.length,i=0,o=[];++t<n;){var f=e[t];f&&(o[i++]=f)}return o}function xl(){var e=arguments.length;if(!e)return[];for(var t=E(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Kt(ce(n)?Ze(n):[n],Me(t,1))}var kl=de(function(e,t){return Ne(e)?Dn(e,Me(t,1,Ne,!0)):[]}),El=de(function(e,t){var n=gt(t);return Ne(n)&&(n=r),Ne(e)?Dn(e,Me(t,1,Ne,!0),ne(n,2)):[]}),Tl=de(function(e,t){var n=gt(t);return Ne(n)&&(n=r),Ne(e)?Dn(e,Me(t,1,Ne,!0),r,n):[]});function Rl(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),dt(e,t<0?0:t,i)):[]}function Ol(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,dt(e,0,t<0?0:t)):[]}function Ll(e,t){return e&&e.length?yr(e,ne(t,3),!0,!0):[]}function Il(e,t){return e&&e.length?yr(e,ne(t,3),!0):[]}function Nl(e,t,n,i){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Je(e,t,n)&&(n=0,i=o),xc(e,t,n,i)):[]}function ia(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),Zn(e,ne(t,3),o)}function oa(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=le(n),o=n<0?De(i+o,0):He(o,i-1)),Zn(e,ne(t,3),o,!0)}function sa(e){var t=e==null?0:e.length;return t?Me(e,1):[]}function Bl(e){var t=e==null?0:e.length;return t?Me(e,Te):[]}function Ul(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:le(t),Me(e,t)):[]}function Dl(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i}function aa(e){return e&&e.length?e[0]:r}function Pl(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),ln(e,t,o)}function Fl(e){var t=e==null?0:e.length;return t?dt(e,0,-1):[]}var Ml=de(function(e){var t=Oe(e,Ti);return t.length&&t[0]===e[0]?_i(t):[]}),Wl=de(function(e){var t=gt(e),n=Oe(e,Ti);return t===gt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?_i(n,ne(t,2)):[]}),ql=de(function(e){var t=gt(e),n=Oe(e,Ti);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?_i(n,r,t):[]});function Kl(e,t){return e==null?"":Ff.call(e,t)}function gt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Hl(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=le(n),o=o<0?De(i+o,0):He(o,i-1)),t===t?Cf(e,t,o):Zn(e,qo,o,!0)}function zl(e,t){return e&&e.length?_s(e,le(t)):r}var Gl=de(ua);function ua(e,t){return e&&e.length&&t&&t.length?Ci(e,t):e}function $l(e,t,n){return e&&e.length&&t&&t.length?Ci(e,t,ne(n,2)):e}function Xl(e,t,n){return e&&e.length&&t&&t.length?Ci(e,t,r,n):e}var Jl=Ut(function(e,t){var n=e==null?0:e.length,i=di(e,t);return Ss(e,Oe(t,function(o){return Dt(o,n)?+o:o}).sort(Ls)),i});function Yl(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,o=[],f=e.length;for(t=ne(t,3);++i<f;){var y=e[i];t(y,i,e)&&(n.push(y),o.push(i))}return Ss(e,o),n}function Ki(e){return e==null?e:Kf.call(e)}function Zl(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&Je(e,t,n)?(t=0,n=i):(t=t==null?0:le(t),n=n===r?i:le(n)),dt(e,t,n)):[]}function Vl(e,t){return vr(e,t)}function Ql(e,t,n){return xi(e,t,ne(n,2))}function jl(e,t){var n=e==null?0:e.length;if(n){var i=vr(e,t);if(i<n&&wt(e[i],t))return i}return-1}function eh(e,t){return vr(e,t,!0)}function th(e,t,n){return xi(e,t,ne(n,2),!0)}function nh(e,t){var n=e==null?0:e.length;if(n){var i=vr(e,t,!0)-1;if(wt(e[i],t))return i}return-1}function rh(e){return e&&e.length?bs(e):[]}function ih(e,t){return e&&e.length?bs(e,ne(t,2)):[]}function oh(e){var t=e==null?0:e.length;return t?dt(e,1,t):[]}function sh(e,t,n){return e&&e.length?(t=n||t===r?1:le(t),dt(e,0,t<0?0:t)):[]}function ah(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,dt(e,t<0?0:t,i)):[]}function uh(e,t){return e&&e.length?yr(e,ne(t,3),!1,!0):[]}function fh(e,t){return e&&e.length?yr(e,ne(t,3)):[]}var ch=de(function(e){return $t(Me(e,1,Ne,!0))}),lh=de(function(e){var t=gt(e);return Ne(t)&&(t=r),$t(Me(e,1,Ne,!0),ne(t,2))}),hh=de(function(e){var t=gt(e);return t=typeof t=="function"?t:r,$t(Me(e,1,Ne,!0),r,t)});function ph(e){return e&&e.length?$t(e):[]}function dh(e,t){return e&&e.length?$t(e,ne(t,2)):[]}function gh(e,t){return t=typeof t=="function"?t:r,e&&e.length?$t(e,r,t):[]}function Hi(e){if(!(e&&e.length))return[];var t=0;return e=qt(e,function(n){if(Ne(n))return t=De(n.length,t),!0}),si(t,function(n){return Oe(e,ri(n))})}function fa(e,t){if(!(e&&e.length))return[];var n=Hi(e);return t==null?n:Oe(n,function(i){return rt(t,r,i)})}var vh=de(function(e,t){return Ne(e)?Dn(e,t):[]}),yh=de(function(e){return Ei(qt(e,Ne))}),_h=de(function(e){var t=gt(e);return Ne(t)&&(t=r),Ei(qt(e,Ne),ne(t,2))}),mh=de(function(e){var t=gt(e);return t=typeof t=="function"?t:r,Ei(qt(e,Ne),r,t)}),wh=de(Hi);function Sh(e,t){return Es(e||[],t||[],Un)}function Ch(e,t){return Es(e||[],t||[],Mn)}var bh=de(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,fa(e,n)});function ca(e){var t=u(e);return t.__chain__=!0,t}function Ah(e,t){return t(e),e}function kr(e,t){return t(e)}var xh=Ut(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(f){return di(f,e)};return t>1||this.__actions__.length||!(i instanceof ve)||!Dt(n)?this.thru(o):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:kr,args:[o],thisArg:r}),new ht(i,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function kh(){return ca(this)}function Eh(){return new ht(this.value(),this.__chain__)}function Th(){this.__values__===r&&(this.__values__=Aa(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Rh(){return this}function Oh(e){for(var t,n=this;n instanceof lr;){var i=ra(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function Lh(){var e=this.__wrapped__;if(e instanceof ve){var t=e;return this.__actions__.length&&(t=new ve(this)),t=t.reverse(),t.__actions__.push({func:kr,args:[Ki],thisArg:r}),new ht(t,this.__chain__)}return this.thru(Ki)}function Ih(){return ks(this.__wrapped__,this.__actions__)}var Nh=_r(function(e,t,n){Ce.call(e,n)?++e[n]:Nt(e,n,1)});function Bh(e,t,n){var i=ce(e)?Mo:Ac;return n&&Je(e,t,n)&&(t=r),i(e,ne(t,3))}function Uh(e,t){var n=ce(e)?qt:fs;return n(e,ne(t,3))}var Dh=Ps(ia),Ph=Ps(oa);function Fh(e,t){return Me(Er(e,t),1)}function Mh(e,t){return Me(Er(e,t),Te)}function Wh(e,t,n){return n=n===r?1:le(n),Me(Er(e,t),n)}function la(e,t){var n=ce(e)?ct:Gt;return n(e,ne(t,3))}function ha(e,t){var n=ce(e)?of:us;return n(e,ne(t,3))}var qh=_r(function(e,t,n){Ce.call(e,n)?e[n].push(t):Nt(e,n,[t])});function Kh(e,t,n,i){e=Ve(e)?e:bn(e),n=n&&!i?le(n):0;var o=e.length;return n<0&&(n=De(o+n,0)),Ir(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&ln(e,t,n)>-1}var Hh=de(function(e,t,n){var i=-1,o=typeof t=="function",f=Ve(e)?E(e.length):[];return Gt(e,function(y){f[++i]=o?rt(t,y,n):Pn(y,t,n)}),f}),zh=_r(function(e,t,n){Nt(e,n,t)});function Er(e,t){var n=ce(e)?Oe:gs;return n(e,ne(t,3))}function Gh(e,t,n,i){return e==null?[]:(ce(t)||(t=t==null?[]:[t]),n=i?r:n,ce(n)||(n=n==null?[]:[n]),ms(e,t,n))}var $h=_r(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Xh(e,t,n){var i=ce(e)?ti:Ho,o=arguments.length<3;return i(e,ne(t,4),n,o,Gt)}function Jh(e,t,n){var i=ce(e)?sf:Ho,o=arguments.length<3;return i(e,ne(t,4),n,o,us)}function Yh(e,t){var n=ce(e)?qt:fs;return n(e,Or(ne(t,3)))}function Zh(e){var t=ce(e)?is:Kc;return t(e)}function Vh(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=le(t);var i=ce(e)?mc:Hc;return i(e,t)}function Qh(e){var t=ce(e)?wc:Gc;return t(e)}function jh(e){if(e==null)return 0;if(Ve(e))return Ir(e)?pn(e):e.length;var t=ze(e);return t==Re||t==$e?e.size:wi(e).length}function ep(e,t,n){var i=ce(e)?ni:$c;return n&&Je(e,t,n)&&(t=r),i(e,ne(t,3))}var tp=de(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Je(e,t[0],t[1])?t=[]:n>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),ms(e,Me(t,1),[])}),Tr=Uf||function(){return Fe.Date.now()};function np(e,t){if(typeof t!="function")throw new lt(m);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function pa(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Bt(e,M,r,r,r,r,t)}function da(e,t){var n;if(typeof t!="function")throw new lt(m);return e=le(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var zi=de(function(e,t,n){var i=T;if(n.length){var o=Ht(n,Sn(zi));i|=z}return Bt(e,i,t,n,o)}),ga=de(function(e,t,n){var i=T|q;if(n.length){var o=Ht(n,Sn(ga));i|=z}return Bt(t,i,e,n,o)});function va(e,t,n){t=n?r:t;var i=Bt(e,Y,r,r,r,r,r,t);return i.placeholder=va.placeholder,i}function ya(e,t,n){t=n?r:t;var i=Bt(e,se,r,r,r,r,r,t);return i.placeholder=ya.placeholder,i}function _a(e,t,n){var i,o,f,y,C,x,O=0,L=!1,N=!1,K=!0;if(typeof e!="function")throw new lt(m);t=vt(t)||0,Le(n)&&(L=!!n.leading,N="maxWait"in n,f=N?De(vt(n.maxWait)||0,t):f,K="trailing"in n?!!n.trailing:K);function Z(Be){var St=i,Mt=o;return i=o=r,O=Be,y=e.apply(Mt,St),y}function re(Be){return O=Be,C=Kn(ge,t),L?Z(Be):y}function pe(Be){var St=Be-x,Mt=Be-O,Pa=t-St;return N?He(Pa,f-Mt):Pa}function ie(Be){var St=Be-x,Mt=Be-O;return x===r||St>=t||St<0||N&&Mt>=f}function ge(){var Be=Tr();if(ie(Be))return ye(Be);C=Kn(ge,pe(Be))}function ye(Be){return C=r,K&&i?Z(Be):(i=o=r,y)}function at(){C!==r&&Ts(C),O=0,i=x=o=C=r}function Ye(){return C===r?y:ye(Tr())}function ut(){var Be=Tr(),St=ie(Be);if(i=arguments,o=this,x=Be,St){if(C===r)return re(x);if(N)return Ts(C),C=Kn(ge,t),Z(x)}return C===r&&(C=Kn(ge,t)),y}return ut.cancel=at,ut.flush=Ye,ut}var rp=de(function(e,t){return as(e,1,t)}),ip=de(function(e,t,n){return as(e,vt(t)||0,n)});function op(e){return Bt(e,I)}function Rr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new lt(m);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],f=n.cache;if(f.has(o))return f.get(o);var y=e.apply(this,i);return n.cache=f.set(o,y)||f,y};return n.cache=new(Rr.Cache||It),n}Rr.Cache=It;function Or(e){if(typeof e!="function")throw new lt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function sp(e){return da(2,e)}var ap=Xc(function(e,t){t=t.length==1&&ce(t[0])?Oe(t[0],it(ne())):Oe(Me(t,1),it(ne()));var n=t.length;return de(function(i){for(var o=-1,f=He(i.length,n);++o<f;)i[o]=t[o].call(this,i[o]);return rt(e,this,i)})}),Gi=de(function(e,t){var n=Ht(t,Sn(Gi));return Bt(e,z,r,t,n)}),ma=de(function(e,t){var n=Ht(t,Sn(ma));return Bt(e,D,r,t,n)}),up=Ut(function(e,t){return Bt(e,H,r,r,r,t)});function fp(e,t){if(typeof e!="function")throw new lt(m);return t=t===r?t:le(t),de(e,t)}function cp(e,t){if(typeof e!="function")throw new lt(m);return t=t==null?0:De(le(t),0),de(function(n){var i=n[t],o=Jt(n,0,t);return i&&Kt(o,i),rt(e,this,o)})}function lp(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new lt(m);return Le(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),_a(e,t,{leading:i,maxWait:t,trailing:o})}function hp(e){return pa(e,1)}function pp(e,t){return Gi(Ri(t),e)}function dp(){if(!arguments.length)return[];var e=arguments[0];return ce(e)?e:[e]}function gp(e){return pt(e,s)}function vp(e,t){return t=typeof t=="function"?t:r,pt(e,s,t)}function yp(e){return pt(e,p|s)}function _p(e,t){return t=typeof t=="function"?t:r,pt(e,p|s,t)}function mp(e,t){return t==null||ss(e,t,Pe(t))}function wt(e,t){return e===t||e!==e&&t!==t}var wp=Cr(yi),Sp=Cr(function(e,t){return e>=t}),an=hs(function(){return arguments}())?hs:function(e){return Ie(e)&&Ce.call(e,"callee")&&!Qo.call(e,"callee")},ce=E.isArray,Cp=No?it(No):Oc;function Ve(e){return e!=null&&Lr(e.length)&&!Pt(e)}function Ne(e){return Ie(e)&&Ve(e)}function bp(e){return e===!0||e===!1||Ie(e)&&Xe(e)==Q}var Yt=Pf||no,Ap=Bo?it(Bo):Lc;function xp(e){return Ie(e)&&e.nodeType===1&&!Hn(e)}function kp(e){if(e==null)return!0;if(Ve(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||Yt(e)||Cn(e)||an(e)))return!e.length;var t=ze(e);if(t==Re||t==$e)return!e.size;if(qn(e))return!wi(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0}function Ep(e,t){return Fn(e,t)}function Tp(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Fn(e,t,r,n):!!i}function $i(e){if(!Ie(e))return!1;var t=Xe(e);return t==ae||t==$||typeof e.message=="string"&&typeof e.name=="string"&&!Hn(e)}function Rp(e){return typeof e=="number"&&es(e)}function Pt(e){if(!Le(e))return!1;var t=Xe(e);return t==we||t==Ke||t==P||t==kn}function wa(e){return typeof e=="number"&&e==le(e)}function Lr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ue}function Le(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ie(e){return e!=null&&typeof e=="object"}var Sa=Uo?it(Uo):Nc;function Op(e,t){return e===t||mi(e,t,Di(t))}function Lp(e,t,n){return n=typeof n=="function"?n:r,mi(e,t,Di(t),n)}function Ip(e){return Ca(e)&&e!=+e}function Np(e){if(vl(e))throw new fe(g);return ps(e)}function Bp(e){return e===null}function Up(e){return e==null}function Ca(e){return typeof e=="number"||Ie(e)&&Xe(e)==yt}function Hn(e){if(!Ie(e)||Xe(e)!=nt)return!1;var t=ir(e);if(t===null)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&er.call(n)==Lf}var Xi=Do?it(Do):Bc;function Dp(e){return wa(e)&&e>=-ue&&e<=ue}var ba=Po?it(Po):Uc;function Ir(e){return typeof e=="string"||!ce(e)&&Ie(e)&&Xe(e)==At}function st(e){return typeof e=="symbol"||Ie(e)&&Xe(e)==xt}var Cn=Fo?it(Fo):Dc;function Pp(e){return e===r}function Fp(e){return Ie(e)&&ze(e)==Ot}function Mp(e){return Ie(e)&&Xe(e)==Tn}var Wp=Cr(Si),qp=Cr(function(e,t){return e<=t});function Aa(e){if(!e)return[];if(Ve(e))return Ir(e)?_t(e):Ze(e);if(On&&e[On])return mf(e[On]());var t=ze(e),n=t==Re?ui:t==$e?Vn:bn;return n(e)}function Ft(e){if(!e)return e===0?e:0;if(e=vt(e),e===Te||e===-Te){var t=e<0?-1:1;return t*qe}return e===e?e:0}function le(e){var t=Ft(e),n=t%1;return t===t?n?t-n:t:0}function xa(e){return e?nn(le(e),0,tt):0}function vt(e){if(typeof e=="number")return e;if(st(e))return bt;if(Le(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Le(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zo(e);var n=Su.test(e);return n||bu.test(e)?tf(e.slice(2),n?2:8):wu.test(e)?bt:+e}function ka(e){return Et(e,Qe(e))}function Kp(e){return e?nn(le(e),-ue,ue):e===0?e:0}function Se(e){return e==null?"":ot(e)}var Hp=mn(function(e,t){if(qn(t)||Ve(t)){Et(t,Pe(t),e);return}for(var n in t)Ce.call(t,n)&&Un(e,n,t[n])}),Ea=mn(function(e,t){Et(t,Qe(t),e)}),Nr=mn(function(e,t,n,i){Et(t,Qe(t),e,i)}),zp=mn(function(e,t,n,i){Et(t,Pe(t),e,i)}),Gp=Ut(di);function $p(e,t){var n=_n(e);return t==null?n:os(n,t)}var Xp=de(function(e,t){e=xe(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&Je(t[0],t[1],o)&&(i=1);++n<i;)for(var f=t[n],y=Qe(f),C=-1,x=y.length;++C<x;){var O=y[C],L=e[O];(L===r||wt(L,gn[O])&&!Ce.call(e,O))&&(e[O]=f[O])}return e}),Jp=de(function(e){return e.push(r,zs),rt(Ta,r,e)});function Yp(e,t){return Wo(e,ne(t,3),kt)}function Zp(e,t){return Wo(e,ne(t,3),vi)}function Vp(e,t){return e==null?e:gi(e,ne(t,3),Qe)}function Qp(e,t){return e==null?e:cs(e,ne(t,3),Qe)}function jp(e,t){return e&&kt(e,ne(t,3))}function ed(e,t){return e&&vi(e,ne(t,3))}function td(e){return e==null?[]:dr(e,Pe(e))}function nd(e){return e==null?[]:dr(e,Qe(e))}function Ji(e,t,n){var i=e==null?r:rn(e,t);return i===r?n:i}function rd(e,t){return e!=null&&Xs(e,t,kc)}function Yi(e,t){return e!=null&&Xs(e,t,Ec)}var id=Ms(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),e[t]=n},Vi(je)),od=Ms(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]},ne),sd=de(Pn);function Pe(e){return Ve(e)?rs(e):wi(e)}function Qe(e){return Ve(e)?rs(e,!0):Pc(e)}function ad(e,t){var n={};return t=ne(t,3),kt(e,function(i,o,f){Nt(n,t(i,o,f),i)}),n}function ud(e,t){var n={};return t=ne(t,3),kt(e,function(i,o,f){Nt(n,o,t(i,o,f))}),n}var fd=mn(function(e,t,n){gr(e,t,n)}),Ta=mn(function(e,t,n,i){gr(e,t,n,i)}),cd=Ut(function(e,t){var n={};if(e==null)return n;var i=!1;t=Oe(t,function(f){return f=Xt(f,e),i||(i=f.length>1),f}),Et(e,Bi(e),n),i&&(n=pt(n,p|a|s,il));for(var o=t.length;o--;)ki(n,t[o]);return n});function ld(e,t){return Ra(e,Or(ne(t)))}var hd=Ut(function(e,t){return e==null?{}:Mc(e,t)});function Ra(e,t){if(e==null)return{};var n=Oe(Bi(e),function(i){return[i]});return t=ne(t),ws(e,n,function(i,o){return t(i,o[0])})}function pd(e,t,n){t=Xt(t,e);var i=-1,o=t.length;for(o||(o=1,e=r);++i<o;){var f=e==null?r:e[Tt(t[i])];f===r&&(i=o,f=n),e=Pt(f)?f.call(e):f}return e}function dd(e,t,n){return e==null?e:Mn(e,t,n)}function gd(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Mn(e,t,n,i)}var Oa=Ks(Pe),La=Ks(Qe);function vd(e,t,n){var i=ce(e),o=i||Yt(e)||Cn(e);if(t=ne(t,4),n==null){var f=e&&e.constructor;o?n=i?new f:[]:Le(e)?n=Pt(f)?_n(ir(e)):{}:n={}}return(o?ct:kt)(e,function(y,C,x){return t(n,y,C,x)}),n}function yd(e,t){return e==null?!0:ki(e,t)}function _d(e,t,n){return e==null?e:xs(e,t,Ri(n))}function md(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:xs(e,t,Ri(n),i)}function bn(e){return e==null?[]:ai(e,Pe(e))}function wd(e){return e==null?[]:ai(e,Qe(e))}function Sd(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=vt(n),n=n===n?n:0),t!==r&&(t=vt(t),t=t===t?t:0),nn(vt(e),t,n)}function Cd(e,t,n){return t=Ft(t),n===r?(n=t,t=0):n=Ft(n),e=vt(e),Tc(e,t,n)}function bd(e,t,n){if(n&&typeof n!="boolean"&&Je(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Ft(e),t===r?(t=e,e=0):t=Ft(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=ts();return He(e+o*(t-e+ef("1e-"+((o+"").length-1))),t)}return bi(e,t)}var Ad=wn(function(e,t,n){return t=t.toLowerCase(),e+(n?Ia(t):t)});function Ia(e){return Zi(Se(e).toLowerCase())}function Na(e){return e=Se(e),e&&e.replace(xu,df).replace(zu,"")}function xd(e,t,n){e=Se(e),t=ot(t);var i=e.length;n=n===r?i:nn(le(n),0,i);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function kd(e){return e=Se(e),e&&ou.test(e)?e.replace(fo,gf):e}function Ed(e){return e=Se(e),e&&lu.test(e)?e.replace(Gr,"\\$&"):e}var Td=wn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Rd=wn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Od=Ds("toLowerCase");function Ld(e,t,n){e=Se(e),t=le(t);var i=t?pn(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return Sr(ur(o),n)+e+Sr(ar(o),n)}function Id(e,t,n){e=Se(e),t=le(t);var i=t?pn(e):0;return t&&i<t?e+Sr(t-i,n):e}function Nd(e,t,n){e=Se(e),t=le(t);var i=t?pn(e):0;return t&&i<t?Sr(t-i,n)+e:e}function Bd(e,t,n){return n||t==null?t=0:t&&(t=+t),qf(Se(e).replace($r,""),t||0)}function Ud(e,t,n){return(n?Je(e,t,n):t===r)?t=1:t=le(t),Ai(Se(e),t)}function Dd(){var e=arguments,t=Se(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Pd=wn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function Fd(e,t,n){return n&&typeof n!="number"&&Je(e,t,n)&&(t=n=r),n=n===r?tt:n>>>0,n?(e=Se(e),e&&(typeof t=="string"||t!=null&&!Xi(t))&&(t=ot(t),!t&&hn(e))?Jt(_t(e),0,n):e.split(t,n)):[]}var Md=wn(function(e,t,n){return e+(n?" ":"")+Zi(t)});function Wd(e,t,n){return e=Se(e),n=n==null?0:nn(le(n),0,e.length),t=ot(t),e.slice(n,n+t.length)==t}function qd(e,t,n){var i=u.templateSettings;n&&Je(e,t,n)&&(t=r),e=Se(e),t=Nr({},t,i,Hs);var o=Nr({},t.imports,i.imports,Hs),f=Pe(o),y=ai(o,f),C,x,O=0,L=t.interpolate||$n,N="__p += '",K=fi((t.escape||$n).source+"|"+L.source+"|"+(L===co?mu:$n).source+"|"+(t.evaluate||$n).source+"|$","g"),Z="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yu+"]")+`
16
+ `;e.replace(K,function(ie,ge,ye,at,Ye,ut){return ye||(ye=at),N+=e.slice(O,ut).replace(ku,vf),ge&&(C=!0,N+=`' +
17
+ __e(`+ge+`) +
18
+ '`),Ye&&(x=!0,N+=`';
19
+ `+Ye+`;
20
20
  __p += '`),ye&&(N+=`' +
21
21
  ((__t = (`+ye+`)) == null ? '' : __t) +
22
- '`),L=ut+ie.length,ie}),N+=`';
23
- `;var re=be.call(t,"variable")&&t.variable;if(!re)N=`with (obj) {
22
+ '`),O=ut+ie.length,ie}),N+=`';
23
+ `;var re=Ce.call(t,"variable")&&t.variable;if(!re)N=`with (obj) {
24
24
  `+N+`
25
25
  }
26
- `;else if(va.test(re))throw new fe(d);N=(C?N.replace(ea,""):N).replace(ta,"$1").replace(na,"$1;"),N="function("+(re||"obj")+`) {
26
+ `;else if(yu.test(re))throw new fe(d);N=(x?N.replace(tu,""):N).replace(nu,"$1").replace(ru,"$1;"),N="function("+(re||"obj")+`) {
27
27
  `+(re?"":`obj || (obj = {});
28
- `)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
28
+ `)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(x?`, __j = Array.prototype.join;
29
29
  function print() { __p += __j.call(arguments, '') }
30
30
  `:`;
31
31
  `)+N+`return __p
32
- }`;var he=Uu(function(){return _e(f,Z+"return "+N).apply(r,y)});if(he.source=N,$i(he))throw he;return he}function qd(e){return we(e).toLowerCase()}function Kd(e){return we(e).toUpperCase()}function Hd(e,t,n){if(e=we(e),e&&(n||t===r))return Go(e);if(!e||!(t=it(t)))return e;var i=yt(e),o=yt(t),f=zo(i,o),y=$o(i,o)+1;return Jt(i,f,y).join("")}function Gd(e,t,n){if(e=we(e),e&&(n||t===r))return e.slice(0,Jo(e)+1);if(!e||!(t=it(t)))return e;var i=yt(e),o=$o(i,yt(t))+1;return Jt(i,0,o).join("")}function zd(e,t,n){if(e=we(e),e&&(n||t===r))return e.replace($r,"");if(!e||!(t=it(t)))return e;var i=yt(e),o=zo(i,yt(t));return Jt(i,o).join("")}function $d(e,t){var n=U,i=X;if(Ie(t)){var o="separator"in t?t.separator:o;n="length"in t?le(t.length):n,i="omission"in t?it(t.omission):i}e=we(e);var f=e.length;if(hn(e)){var y=yt(e);f=y.length}if(n>=f)return e;var b=n-pn(i);if(b<1)return i;var C=y?Jt(y,0,b).join(""):e.slice(0,b);if(o===r)return C+i;if(y&&(b+=C.length-b),Xi(o)){if(e.slice(b).search(o)){var L,I=C;for(o.global||(o=fi(o.source,we(lo.exec(o))+"g")),o.lastIndex=0;L=o.exec(I);)var N=L.index;C=C.slice(0,N===r?b:N)}}else if(e.indexOf(it(o),b)!=b){var K=C.lastIndexOf(o);K>-1&&(C=C.slice(0,K))}return C+i}function Xd(e){return e=we(e),e&&ra.test(e)?e.replace(ao,bf):e}var Jd=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zi=Ds("toUpperCase");function Bu(e,t,n){return e=we(e),t=n?r:t,t===r?yf(e)?Cf(e):af(e):e.match(t)||[]}var Uu=pe(function(e,t){try{return nt(e,r,t)}catch(n){return $i(n)?n:new fe(n)}}),Yd=Bt(function(e,t){return ft(t,function(n){n=Tt(n),Ot(e,n,Gi(e[n],e))}),e});function Zd(e){var t=e==null?0:e.length,n=ne();return e=t?Le(e,function(i){if(typeof i[1]!="function")throw new ct(m);return[n(i[0]),i[1]]}):[],pe(function(i){for(var o=-1;++o<t;){var f=e[o];if(nt(f[0],this,i))return nt(f[1],this,i)}})}function Vd(e){return bc(ht(e,p))}function Vi(e){return function(){return e}}function Qd(e,t){return e==null||e!==e?t:e}var jd=Fs(),eg=Fs(!0);function Qe(e){return e}function Qi(e){return ds(typeof e=="function"?e:ht(e,p))}function tg(e){return vs(ht(e,p))}function ng(e,t){return ys(e,ht(t,p))}var rg=pe(function(e,t){return function(n){return Pn(n,e,t)}}),ig=pe(function(e,t){return function(n){return Pn(e,n,t)}});function ji(e,t,n){var i=Pe(t),o=dr(t,i);n==null&&!(Ie(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=dr(t,Pe(t)));var f=!(Ie(n)&&"chain"in n)||!!n.chain,y=Dt(e);return ft(o,function(b){var C=t[b];e[b]=C,y&&(e.prototype[b]=function(){var L=this.__chain__;if(f||L){var I=e(this.__wrapped__),N=I.__actions__=Ye(this.__actions__);return N.push({func:C,args:arguments,thisArg:e}),I.__chain__=L,I}return C.apply(e,Kt([this.value()],arguments))})}),e}function og(){return Fe._===this&&(Fe._=If),this}function eo(){}function sg(e){return e=le(e),pe(function(t){return _s(t,e)})}var ug=Ii(Le),ag=Ii(Mo),fg=Ii(ni);function Du(e){return Fi(e)?ri(Tt(e)):Mc(e)}function cg(e){return function(t){return e==null?r:rn(e,t)}}var lg=Ws(),hg=Ws(!0);function to(){return[]}function no(){return!1}function pg(){return{}}function dg(){return""}function gg(){return!0}function vg(e,t){if(e=le(e),e<1||e>ae)return[];var n=et,i=Ke(e,et);t=ne(t),e-=et;for(var o=si(i,t);++n<e;)t(n);return o}function yg(e){return ce(e)?Le(e,Tt):ot(e)?[e]:Ye(nu(we(e)))}function _g(e){var t=++Rf;return we(e)+t}var mg=wr(function(e,t){return e+t},0),wg=Oi("ceil"),Sg=wr(function(e,t){return e/t},1),bg=Oi("floor");function Ag(e){return e&&e.length?pr(e,Qe,yi):r}function xg(e,t){return e&&e.length?pr(e,ne(t,2),yi):r}function Cg(e){return Ko(e,Qe)}function kg(e,t){return Ko(e,ne(t,2))}function Tg(e){return e&&e.length?pr(e,Qe,Si):r}function Eg(e,t){return e&&e.length?pr(e,ne(t,2),Si):r}var Rg=wr(function(e,t){return e*t},1),Lg=Oi("round"),Ig=wr(function(e,t){return e-t},0);function Og(e){return e&&e.length?oi(e,Qe):0}function Ng(e,t){return e&&e.length?oi(e,ne(t,2)):0}return a.after=tp,a.ary=pu,a.assign=Kp,a.assignIn=Tu,a.assignInWith=Nr,a.assignWith=Hp,a.at=Gp,a.before=du,a.bind=Gi,a.bindAll=Yd,a.bindKey=gu,a.castArray=pp,a.chain=cu,a.chunk=bl,a.compact=Al,a.concat=xl,a.cond=Zd,a.conforms=Vd,a.constant=Vi,a.countBy=Oh,a.create=zp,a.curry=vu,a.curryRight=yu,a.debounce=_u,a.defaults=$p,a.defaultsDeep=Xp,a.defer=np,a.delay=rp,a.difference=Cl,a.differenceBy=kl,a.differenceWith=Tl,a.drop=El,a.dropRight=Rl,a.dropRightWhile=Ll,a.dropWhile=Il,a.fill=Ol,a.filter=Bh,a.flatMap=Ph,a.flatMapDeep=Fh,a.flatMapDepth=Mh,a.flatten=su,a.flattenDeep=Nl,a.flattenDepth=Bl,a.flip=ip,a.flow=jd,a.flowRight=eg,a.fromPairs=Ul,a.functions=ed,a.functionsIn=td,a.groupBy=Wh,a.initial=Pl,a.intersection=Fl,a.intersectionBy=Ml,a.intersectionWith=Wl,a.invert=rd,a.invertBy=id,a.invokeMap=Kh,a.iteratee=Qi,a.keyBy=Hh,a.keys=Pe,a.keysIn=Ve,a.map=Tr,a.mapKeys=sd,a.mapValues=ud,a.matches=tg,a.matchesProperty=ng,a.memoize=Rr,a.merge=ad,a.mergeWith=Eu,a.method=rg,a.methodOf=ig,a.mixin=ji,a.negate=Lr,a.nthArg=sg,a.omit=fd,a.omitBy=cd,a.once=op,a.orderBy=Gh,a.over=ug,a.overArgs=sp,a.overEvery=ag,a.overSome=fg,a.partial=zi,a.partialRight=mu,a.partition=zh,a.pick=ld,a.pickBy=Ru,a.property=Du,a.propertyOf=cg,a.pull=Gl,a.pullAll=au,a.pullAllBy=zl,a.pullAllWith=$l,a.pullAt=Xl,a.range=lg,a.rangeRight=hg,a.rearg=up,a.reject=Jh,a.remove=Jl,a.rest=ap,a.reverse=Ki,a.sampleSize=Zh,a.set=pd,a.setWith=dd,a.shuffle=Vh,a.slice=Yl,a.sortBy=ep,a.sortedUniq=nh,a.sortedUniqBy=rh,a.split=Pd,a.spread=fp,a.tail=ih,a.take=oh,a.takeRight=sh,a.takeRightWhile=uh,a.takeWhile=ah,a.tap=Ah,a.throttle=cp,a.thru=kr,a.toArray=xu,a.toPairs=Lu,a.toPairsIn=Iu,a.toPath=yg,a.toPlainObject=ku,a.transform=gd,a.unary=lp,a.union=fh,a.unionBy=ch,a.unionWith=lh,a.uniq=hh,a.uniqBy=ph,a.uniqWith=dh,a.unset=vd,a.unzip=Hi,a.unzipWith=fu,a.update=yd,a.updateWith=_d,a.values=An,a.valuesIn=md,a.without=gh,a.words=Bu,a.wrap=hp,a.xor=vh,a.xorBy=yh,a.xorWith=_h,a.zip=mh,a.zipObject=wh,a.zipObjectDeep=Sh,a.zipWith=bh,a.entries=Lu,a.entriesIn=Iu,a.extend=Tu,a.extendWith=Nr,ji(a,a),a.add=mg,a.attempt=Uu,a.camelCase=Ad,a.capitalize=Ou,a.ceil=wg,a.clamp=wd,a.clone=dp,a.cloneDeep=vp,a.cloneDeepWith=yp,a.cloneWith=gp,a.conformsTo=_p,a.deburr=Nu,a.defaultTo=Qd,a.divide=Sg,a.endsWith=xd,a.eq=mt,a.escape=Cd,a.escapeRegExp=kd,a.every=Nh,a.find=Uh,a.findIndex=iu,a.findKey=Jp,a.findLast=Dh,a.findLastIndex=ou,a.findLastKey=Yp,a.floor=bg,a.forEach=lu,a.forEachRight=hu,a.forIn=Zp,a.forInRight=Vp,a.forOwn=Qp,a.forOwnRight=jp,a.get=Ji,a.gt=mp,a.gte=wp,a.has=nd,a.hasIn=Yi,a.head=uu,a.identity=Qe,a.includes=qh,a.indexOf=Dl,a.inRange=Sd,a.invoke=od,a.isArguments=un,a.isArray=ce,a.isArrayBuffer=Sp,a.isArrayLike=Ze,a.isArrayLikeObject=Ne,a.isBoolean=bp,a.isBuffer=Yt,a.isDate=Ap,a.isElement=xp,a.isEmpty=Cp,a.isEqual=kp,a.isEqualWith=Tp,a.isError=$i,a.isFinite=Ep,a.isFunction=Dt,a.isInteger=wu,a.isLength=Ir,a.isMap=Su,a.isMatch=Rp,a.isMatchWith=Lp,a.isNaN=Ip,a.isNative=Op,a.isNil=Bp,a.isNull=Np,a.isNumber=bu,a.isObject=Ie,a.isObjectLike=Oe,a.isPlainObject=Hn,a.isRegExp=Xi,a.isSafeInteger=Up,a.isSet=Au,a.isString=Or,a.isSymbol=ot,a.isTypedArray=bn,a.isUndefined=Dp,a.isWeakMap=Pp,a.isWeakSet=Fp,a.join=ql,a.kebabCase=Td,a.last=dt,a.lastIndexOf=Kl,a.lowerCase=Ed,a.lowerFirst=Rd,a.lt=Mp,a.lte=Wp,a.max=Ag,a.maxBy=xg,a.mean=Cg,a.meanBy=kg,a.min=Tg,a.minBy=Eg,a.stubArray=to,a.stubFalse=no,a.stubObject=pg,a.stubString=dg,a.stubTrue=gg,a.multiply=Rg,a.nth=Hl,a.noConflict=og,a.noop=eo,a.now=Er,a.pad=Ld,a.padEnd=Id,a.padStart=Od,a.parseInt=Nd,a.random=bd,a.reduce=$h,a.reduceRight=Xh,a.repeat=Bd,a.replace=Ud,a.result=hd,a.round=Lg,a.runInContext=A,a.sample=Yh,a.size=Qh,a.snakeCase=Dd,a.some=jh,a.sortedIndex=Zl,a.sortedIndexBy=Vl,a.sortedIndexOf=Ql,a.sortedLastIndex=jl,a.sortedLastIndexBy=eh,a.sortedLastIndexOf=th,a.startCase=Fd,a.startsWith=Md,a.subtract=Ig,a.sum=Og,a.sumBy=Ng,a.template=Wd,a.times=vg,a.toFinite=Pt,a.toInteger=le,a.toLength=Cu,a.toLower=qd,a.toNumber=gt,a.toSafeInteger=qp,a.toString=we,a.toUpper=Kd,a.trim=Hd,a.trimEnd=Gd,a.trimStart=zd,a.truncate=$d,a.unescape=Xd,a.uniqueId=_g,a.upperCase=Jd,a.upperFirst=Zi,a.each=lu,a.eachRight=hu,a.first=uu,ji(a,function(){var e={};return Ct(a,function(t,n){be.call(a.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),a.VERSION=l,ft(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){a[e].placeholder=a}),ft(["drop","take"],function(e,t){ge.prototype[e]=function(n){n=n===r?1:De(le(n),0);var i=this.__filtered__&&!t?new ge(this):this.clone();return i.__filtered__?i.__takeCount__=Ke(n,i.__takeCount__):i.__views__.push({size:Ke(n,et),type:e+(i.__dir__<0?"Right":"")}),i},ge.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),ft(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==B||n==xe;ge.prototype[e]=function(o){var f=this.clone();return f.__iteratees__.push({iteratee:ne(o,3),type:n}),f.__filtered__=f.__filtered__||i,f}}),ft(["head","last"],function(e,t){var n="take"+(t?"Right":"");ge.prototype[e]=function(){return this[n](1).value()[0]}}),ft(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ge.prototype[e]=function(){return this.__filtered__?new ge(this):this[n](1)}}),ge.prototype.compact=function(){return this.filter(Qe)},ge.prototype.find=function(e){return this.filter(e).head()},ge.prototype.findLast=function(e){return this.reverse().find(e)},ge.prototype.invokeMap=pe(function(e,t){return typeof e=="function"?new ge(this):this.map(function(n){return Pn(n,e,t)})}),ge.prototype.reject=function(e){return this.filter(Lr(ne(e)))},ge.prototype.slice=function(e,t){e=le(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ge(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=le(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},ge.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ge.prototype.toArray=function(){return this.take(et)},Ct(ge.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=a[i?"take"+(t=="last"?"Right":""):t],f=i||/^find/.test(t);o&&(a.prototype[t]=function(){var y=this.__wrapped__,b=i?[1]:arguments,C=y instanceof ge,L=b[0],I=C||ce(y),N=function(de){var ye=o.apply(a,Kt([de],b));return i&&K?ye[0]:ye};I&&n&&typeof L=="function"&&L.length!=1&&(C=I=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=f&&!K,he=C&&!Z;if(!f&&I){y=he?y:new ge(this);var ie=e.apply(y,b);return ie.__actions__.push({func:kr,args:[N],thisArg:r}),new lt(ie,K)}return re&&he?e.apply(this,b):(ie=this.thru(N),re?i?ie.value()[0]:ie.value():ie)})}),ft(["pop","push","shift","sort","splice","unshift"],function(e){var t=Qn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);a.prototype[e]=function(){var o=arguments;if(i&&!this.__chain__){var f=this.value();return t.apply(ce(f)?f:[],o)}return this[n](function(y){return t.apply(ce(y)?y:[],o)})}}),Ct(ge.prototype,function(e,t){var n=a[t];if(n){var i=n.name+"";be.call(yn,i)||(yn[i]=[]),yn[i].push({name:t,func:n})}}),yn[mr(r,q).name]=[{name:"wrapper",func:r}],ge.prototype.clone=Xf,ge.prototype.reverse=Jf,ge.prototype.value=Yf,a.prototype.at=xh,a.prototype.chain=Ch,a.prototype.commit=kh,a.prototype.next=Th,a.prototype.plant=Rh,a.prototype.reverse=Lh,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Ih,a.prototype.first=a.prototype.head,Ln&&(a.prototype[Ln]=Eh),a},dn=kf();Qt?((Qt.exports=dn)._=dn,Qr._=dn):Fe._=dn}).call(je)}(Gn,Gn.exports);var Gu=Gn.exports;const zu={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 $u(){return function S(v,r,l){function c(d,x){if(!r[d]){if(!v[d]){var h=typeof require=="function"&&require;if(!x&&h)return h(d,!0);if(g)return g(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=r[d]={exports:{}};v[d][0].call(_.exports,function(p){var u=v[d][1][p];return c(u||p)},_,_.exports,S,v,r,l)}return r[d].exports}for(var g=typeof require=="function"&&require,m=0;m<l.length;m++)c(l[m]);return c}({1:[function(S,v){v.exports=S("./lib/")},{"./lib/":2}],2:[function(S,v,r){function l(h,_){typeof h=="object"&&(_=h,h=void 0),_=_||{};var p,u=c(h),s=u.source,w=u.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",s),p=m(s,_)):(x[w]||(d("new io instance for %s",s),x[w]=m(s,_)),p=x[w]),p.socket(u.path)}var c=S("./url"),g=S("socket.io-parser"),m=S("./manager"),d=S("debug")("socket.io-client");v.exports=r=l;var x=r.managers={};r.protocol=g.protocol,r.connect=l,r.Manager=S("./manager"),r.Socket=S("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(S,v){function r(u,s){return this instanceof r?(u&&typeof u=="object"&&(s=u,u=void 0),s=s||{},s.path=s.path||"/socket.io",this.nsps={},this.subs=[],this.opts=s,this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(s.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this.readyState="closed",this.uri=u,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new m.Encoder,this.decoder=new m.Decoder,this.autoConnect=s.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(u,s)}var l=(S("./url"),S("engine.io-client")),c=S("./socket"),g=S("component-emitter"),m=S("socket.io-parser"),d=S("./on"),x=S("component-bind"),h=(S("object-component"),S("debug")("socket.io-client:manager")),_=S("indexof"),p=S("backo2");v.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var u in this.nsps)this.nsps[u].emit.apply(this.nsps[u],arguments)},r.prototype.updateSocketIds=function(){for(var u in this.nsps)this.nsps[u].id=this.engine.id},g(r.prototype),r.prototype.reconnection=function(u){return arguments.length?(this._reconnection=!!u,this):this._reconnection},r.prototype.reconnectionAttempts=function(u){return arguments.length?(this._reconnectionAttempts=u,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(u){return arguments.length?(this._reconnectionDelay=u,this.backoff&&this.backoff.setMin(u),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(u){return arguments.length?(this._randomizationFactor=u,this.backoff&&this.backoff.setJitter(u),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(u){return arguments.length?(this._reconnectionDelayMax=u,this.backoff&&this.backoff.setMax(u),this):this._reconnectionDelayMax},r.prototype.timeout=function(u){return arguments.length?(this._timeout=u,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},r.prototype.open=r.prototype.connect=function(u){if(h("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=l(this.uri,this.opts);var s=this.engine,w=this;this.readyState="opening",this.skipReconnect=!1;var k=d(s,"open",function(){w.onopen(),u&&u()}),E=d(s,"error",function(Y){if(h("connect_error"),w.cleanup(),w.readyState="closed",w.emitAll("connect_error",Y),u){var se=new Error("Connection error");se.data=Y,u(se)}else w.maybeReconnectOnOpen()});if(this._timeout!==!1){var q=this._timeout;h("connect attempt will timeout after %d",q);var oe=setTimeout(function(){h("connect attempt timed out after %d",q),k.destroy(),s.close(),s.emit("error","timeout"),w.emitAll("connect_timeout",q)},q);this.subs.push({destroy:function(){clearTimeout(oe)}})}return this.subs.push(k),this.subs.push(E),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var u=this.engine;this.subs.push(d(u,"data",x(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",x(this,"ondecoded"))),this.subs.push(d(u,"error",x(this,"onerror"))),this.subs.push(d(u,"close",x(this,"onclose")))},r.prototype.ondata=function(u){this.decoder.add(u)},r.prototype.ondecoded=function(u){this.emit("packet",u)},r.prototype.onerror=function(u){h("error",u),this.emitAll("error",u)},r.prototype.socket=function(u){var s=this.nsps[u];if(!s){s=new c(this,u),this.nsps[u]=s;var w=this;s.on("connect",function(){s.id=w.engine.id,~_(w.connected,s)||w.connected.push(s)})}return s},r.prototype.destroy=function(u){var s=_(this.connected,u);~s&&this.connected.splice(s,1),this.connected.length||this.close()},r.prototype.packet=function(u){h("writing packet %j",u);var s=this;s.encoding?s.packetBuffer.push(u):(s.encoding=!0,this.encoder.encode(u,function(w){for(var k=0;k<w.length;k++)s.engine.write(w[k]);s.encoding=!1,s.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var u=this.packetBuffer.shift();this.packet(u)}},r.prototype.cleanup=function(){for(var u;u=this.subs.shift();)u.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(u){h("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",u),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var u=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var s=this.backoff.duration();h("will wait %dms before reconnect attempt",s),this.reconnecting=!0;var w=setTimeout(function(){u.skipReconnect||(h("attempting reconnect"),u.emitAll("reconnect_attempt",u.backoff.attempts),u.emitAll("reconnecting",u.backoff.attempts),u.skipReconnect||u.open(function(k){k?(h("reconnect attempt error"),u.reconnecting=!1,u.reconnect(),u.emitAll("reconnect_error",k.data)):(h("reconnect success"),u.onreconnect())}))},s);this.subs.push({destroy:function(){clearTimeout(w)}})}},r.prototype.onreconnect=function(){var u=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",u)}},{"./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(S,v){function r(l,c,g){return l.on(c,g),{destroy:function(){l.removeListener(c,g)}}}v.exports=r},{}],5:[function(S,v,r){function l(s,w){this.io=s,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=S("socket.io-parser"),g=S("component-emitter"),m=S("to-array"),d=S("./on"),x=S("component-bind"),h=S("debug")("socket.io-client:socket"),_=S("has-binary");v.exports=l;var p={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},u=g.prototype.emit;g(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var s=this.io;this.subs=[d(s,"open",x(this,"onopen")),d(s,"packet",x(this,"onpacket")),d(s,"close",x(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},l.prototype.send=function(){var s=m(arguments);return s.unshift("message"),this.emit.apply(this,s),this},l.prototype.emit=function(s){if(p.hasOwnProperty(s))return u.apply(this,arguments),this;var w=m(arguments),k=c.EVENT;_(w)&&(k=c.BINARY_EVENT);var E={type:k,data:w};return typeof w[w.length-1]=="function"&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),E.id=this.ids++),this.connected?this.packet(E):this.sendBuffer.push(E),this},l.prototype.packet=function(s){s.nsp=this.nsp,this.io.packet(s)},l.prototype.onopen=function(){h("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},l.prototype.onclose=function(s){h("close (%s)",s),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",s)},l.prototype.onpacket=function(s){if(s.nsp==this.nsp)switch(s.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(s);break;case c.BINARY_EVENT:this.onevent(s);break;case c.ACK:this.onack(s);break;case c.BINARY_ACK:this.onack(s);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",s.data)}},l.prototype.onevent=function(s){var w=s.data||[];h("emitting event %j",w),s.id!=null&&(h("attaching ack callback to event"),w.push(this.ack(s.id))),this.connected?u.apply(this,w):this.receiveBuffer.push(w)},l.prototype.ack=function(s){var w=this,k=!1;return function(){if(!k){k=!0;var E=m(arguments);h("sending ack %j",E);var q=_(E)?c.BINARY_ACK:c.ACK;w.packet({type:q,id:s,data:E})}}},l.prototype.onack=function(s){h("calling ack %s with %j",s.id,s.data);var w=this.acks[s.id];w.apply(this,s.data),delete this.acks[s.id]},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var s;for(s=0;s<this.receiveBuffer.length;s++)u.apply(this,this.receiveBuffer[s]);for(this.receiveBuffer=[],s=0;s<this.sendBuffer.length;s++)this.packet(this.sendBuffer[s]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){h("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var s=0;s<this.subs.length;s++)this.subs[s].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(h("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(S,v){(function(r){function l(m,h){var x=m,h=h||r.location;return m==null&&(m=h.protocol+"//"+h.host),typeof m=="string"&&(m.charAt(0)=="/"&&(m=m.charAt(1)=="/"?h.protocol+m:h.hostname+m),/^(https?|wss?):\/\//.test(m)||(g("protocol-less url %s",m),m=typeof h<"u"?h.protocol+"//"+m:"https://"+m),g("parse %s",m),x=c(m)),x.port||(/^(http|ws)$/.test(x.protocol)?x.port="80":/^(http|ws)s$/.test(x.protocol)&&(x.port="443")),x.path=x.path||"/",x.id=x.protocol+"://"+x.host+":"+x.port,x.href=x.protocol+"://"+x.host+(h&&h.port==x.port?"":":"+x.port),x}var c=S("parseuri"),g=S("debug")("socket.io-client:url");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(S,v){function r(l){l=l||{},this.ms=l.min||100,this.max=l.max||1e4,this.factor=l.factor||2,this.jitter=l.jitter>0&&l.jitter<=1?l.jitter:0,this.attempts=0}v.exports=r,r.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),g=Math.floor(c*this.jitter*l);l=1&Math.floor(10*c)?l+g:l-g}return 0|Math.min(l,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(l){this.ms=l},r.prototype.setMax=function(l){this.max=l},r.prototype.setJitter=function(l){this.jitter=l}},{}],8:[function(S,v){var r=[].slice;v.exports=function(l,c){if(typeof c=="string"&&(c=l[c]),typeof c!="function")throw new Error("bind() requires a function");var g=r.call(arguments,2);return function(){return c.apply(l,g.concat(r.call(arguments)))}}},{}],9:[function(S,v){function r(c){return c?l(c):void 0}function l(c){for(var g in r.prototype)c[g]=r.prototype[g];return c}v.exports=r,r.prototype.on=r.prototype.addEventListener=function(c,g){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(g),this},r.prototype.once=function(c,g){function m(){d.off(c,m),g.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},m.fn=g,this.on(c,m),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(c,g){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var m=this._callbacks[c];if(!m)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,x=0;x<m.length;x++)if(d=m[x],d===g||d.fn===g){m.splice(x,1);break}return this},r.prototype.emit=function(c){this._callbacks=this._callbacks||{};var g=[].slice.call(arguments,1),m=this._callbacks[c];if(m){m=m.slice(0);for(var d=0,x=m.length;x>d;++d)m[d].apply(this,g)}return this},r.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},r.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(S,v){function r(c){return r.enabled(c)?function(g){g=l(g);var m=new Date,d=m-(r[c]||m);r[c]=m,g=c+" "+g+" +"+r.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function l(c){return c instanceof Error?c.stack||c.message:c}v.exports=r,r.names=[],r.skips=[],r.enable=function(c){try{localStorage.debug=c}catch{}for(var g=(c||"").split(/[\s,]+/),m=g.length,d=0;m>d;d++)c=g[d].replace("*",".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.substr(1)+"$")):r.names.push(new RegExp("^"+c+"$"))},r.disable=function(){r.enable("")},r.humanize=function(c){var g=1e3,m=6e4,d=60*m;return c>=d?(c/d).toFixed(1)+"h":c>=m?(c/m).toFixed(1)+"m":c>=g?(c/g|0)+"s":c+"ms"},r.enabled=function(c){for(var g=0,m=r.skips.length;m>g;g++)if(r.skips[g].test(c))return!1;for(var g=0,m=r.names.length;m>g;g++)if(r.names[g].test(c))return!0;return!1};try{window.localStorage&&r.enable(localStorage.debug)}catch{}},{}],11:[function(S,v){v.exports=S("./lib/")},{"./lib/":12}],12:[function(S,v){v.exports=S("./socket"),v.exports.parser=S("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(S,v){(function(r){function l(s,w){if(!(this instanceof l))return new l(s,w);if(w=w||{},s&&typeof s=="object"&&(w=s,s=null),s&&(s=_(s),w.host=s.host,w.secure=s.protocol=="https"||s.protocol=="wss",w.port=s.port,s.query&&(w.query=s.query)),this.secure=w.secure!=null?w.secure:r.location&&location.protocol=="https:",w.host){var k=w.host.split(":");w.hostname=k.shift(),k.length?w.port=k.pop():w.port||(w.port=this.secure?"443":"80")}this.agent=w.agent||!1,this.hostname=w.hostname||(r.location?location.hostname:"localhost"),this.port=w.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=w.query||{},typeof this.query=="string"&&(this.query=u.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(s){var w={};for(var k in s)s.hasOwnProperty(k)&&(w[k]=s[k]);return w}var g=S("./transports"),m=S("component-emitter"),d=S("debug")("engine.io-client:socket"),x=S("indexof"),h=S("engine.io-parser"),_=S("parseuri"),p=S("parsejson"),u=S("parseqs");v.exports=l,l.priorWebsocketSuccess=!1,m(l.prototype),l.protocol=h.protocol,l.Socket=l,l.Transport=S("./transport"),l.transports=S("./transports"),l.parser=S("engine.io-parser"),l.prototype.createTransport=function(s){d('creating transport "%s"',s);var w=c(this.query);w.EIO=h.protocol,w.transport=s,this.id&&(w.sid=this.id);var k=new g[s]({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 k},l.prototype.open=function(){var w;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)w="websocket";else{if(this.transports.length==0){var s=this;return void setTimeout(function(){s.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)},l.prototype.setTransport=function(s){d("setting transport %s",s.name);var w=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=s,s.on("drain",function(){w.onDrain()}).on("packet",function(k){w.onPacket(k)}).on("error",function(k){w.onError(k)}).on("close",function(){w.onClose("transport close")})},l.prototype.probe=function(s){function w(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(d('probe transport "%s" opened',s),G.send([{type:"ping",data:"probe"}]),G.once("packet",function(O){if(!D)if(O.type=="pong"&&O.data=="probe"){if(d('probe transport "%s" pong',s),M.upgrading=!0,M.emit("upgrading",G),!G)return;l.priorWebsocketSuccess=G.name=="websocket",d('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(d("changing transport and sending upgrade packet"),se(),M.setTransport(G),G.send([{type:"upgrade"}]),M.emit("upgrade",G),G=null,M.upgrading=!1,M.flush())})}else{d('probe transport "%s" failed',s);var U=new Error("probe error");U.transport=G.name,M.emit("upgradeError",U)}}))}function k(){D||(D=!0,se(),G.close(),G=null)}function E(H){var O=new Error("probe error: "+H);O.transport=G.name,k(),d('probe transport "%s" failed because of error: %s',s,H),M.emit("upgradeError",O)}function q(){E("transport closed")}function oe(){E("socket closed")}function Y(H){G&&H.name!=G.name&&(d('"%s" works - aborting "%s"',H.name,G.name),k())}function se(){G.removeListener("open",w),G.removeListener("error",E),G.removeListener("close",q),M.removeListener("close",oe),M.removeListener("upgrading",Y)}d('probing transport "%s"',s);var G=this.createTransport(s,{probe:1}),D=!1,M=this;l.priorWebsocketSuccess=!1,G.once("open",w),G.once("error",E),G.once("close",q),this.once("close",oe),this.once("upgrading",Y),G.open()},l.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",l.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var s=0,w=this.upgrades.length;w>s;s++)this.probe(this.upgrades[s])}},l.prototype.onPacket=function(s){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',s.type,s.data),this.emit("packet",s),this.emit("heartbeat"),s.type){case"open":this.onHandshake(p(s.data));break;case"pong":this.setPing();break;case"error":var w=new Error("server error");w.code=s.data,this.emit("error",w);break;case"message":this.emit("data",s.data),this.emit("message",s.data)}else d('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(s){this.emit("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this.upgrades=this.filterUpgrades(s.upgrades),this.pingInterval=s.pingInterval,this.pingTimeout=s.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(s){clearTimeout(this.pingTimeoutTimer);var w=this;w.pingTimeoutTimer=setTimeout(function(){w.readyState!="closed"&&w.onClose("ping timeout")},s||w.pingInterval+w.pingTimeout)},l.prototype.setPing=function(){var s=this;clearTimeout(s.pingIntervalTimer),s.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",s.pingTimeout),s.ping(),s.onHeartbeat(s.pingTimeout)},s.pingInterval)},l.prototype.ping=function(){this.sendPacket("ping")},l.prototype.onDrain=function(){for(var s=0;s<this.prevBufferLen;s++)this.callbackBuffer[s]&&this.callbackBuffer[s]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},l.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"))},l.prototype.write=l.prototype.send=function(s,w){return this.sendPacket("message",s,w),this},l.prototype.sendPacket=function(s,w,k){if(this.readyState!="closing"&&this.readyState!="closed"){var E={type:s,data:w};this.emit("packetCreate",E),this.writeBuffer.push(E),this.callbackBuffer.push(k),this.flush()}},l.prototype.close=function(){function s(){E.onClose("forced close"),d("socket closing - telling transport to close"),E.transport.close()}function w(){E.removeListener("upgrade",w),E.removeListener("upgradeError",w),s()}function k(){E.once("upgrade",w),E.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var E=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?k():s()}):this.upgrading?k():s()}return this},l.prototype.onError=function(s){d("socket error %j",s),l.priorWebsocketSuccess=!1,this.emit("error",s),this.onClose("transport error",s)},l.prototype.onClose=function(s,w){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',s);var k=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){k.writeBuffer=[],k.callbackBuffer=[],k.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",s,w)}},l.prototype.filterUpgrades=function(s){for(var w=[],k=0,E=s.length;E>k;k++)~x(this.transports,s[k])&&w.push(s[k]);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(S,v){function r(g){this.path=g.path,this.hostname=g.hostname,this.port=g.port,this.secure=g.secure,this.query=g.query,this.timestampParam=g.timestampParam,this.timestampRequests=g.timestampRequests,this.readyState="",this.agent=g.agent||!1,this.socket=g.socket,this.enablesXDR=g.enablesXDR,this.pfx=g.pfx,this.key=g.key,this.passphrase=g.passphrase,this.cert=g.cert,this.ca=g.ca,this.ciphers=g.ciphers,this.rejectUnauthorized=g.rejectUnauthorized}var l=S("engine.io-parser"),c=S("component-emitter");v.exports=r,c(r.prototype),r.timestamps=0,r.prototype.onError=function(g,m){var d=new Error(g);return d.type="TransportError",d.description=m,this.emit("error",d),this},r.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(g){if(this.readyState!="open")throw new Error("Transport not open");this.write(g)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(g){var m=l.decodePacket(g,this.socket.binaryType);this.onPacket(m)},r.prototype.onPacket=function(g){this.emit("packet",g)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(S,v,r){(function(l){function c(h){var _,p=!1,u=!1,s=h.jsonp!==!1;if(l.location){var w=location.protocol=="https:",k=location.port;k||(k=w?443:80),p=h.hostname!=location.hostname||k!=h.port,u=h.secure!=w}if(h.xdomain=p,h.xscheme=u,_=new g(h),"open"in _&&!h.forceJSONP)return new m(h);if(!s)throw new Error("JSONP disabled");return new d(h)}var g=S("xmlhttprequest"),m=S("./polling-xhr"),d=S("./polling-jsonp"),x=S("./websocket");r.polling=c,r.websocket=x}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(S,v){(function(r){function l(){}function c(_){g.call(this,_),this.query=this.query||{},d||(r.___eio||(r.___eio=[]),d=r.___eio),this.index=d.length;var p=this;d.push(function(u){p.onData(u)}),this.query.j=this.index,r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){p.script&&(p.script.onerror=l)},!1)}var g=S("./polling"),m=S("component-inherit");v.exports=c;var d,x=/\n/g,h=/\\n/g;m(c,g),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),g.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,p=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),p.async=!0,p.src=this.uri(),p.onerror=function(w){_.onError("jsonp poll error",w)};var u=document.getElementsByTagName("script")[0];u.parentNode.insertBefore(p,u),this.script=p;var s=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);s&&setTimeout(function(){var w=document.createElement("iframe");document.body.appendChild(w),document.body.removeChild(w)},100)},c.prototype.doWrite=function(_,p){function u(){s(),p()}function s(){if(w.iframe)try{w.form.removeChild(w.iframe)}catch(se){w.onError("jsonp polling iframe removal error",se)}try{var Y='<iframe src="javascript:0" name="'+w.iframeId+'">';k=document.createElement(Y)}catch{k=document.createElement("iframe"),k.name=w.iframeId,k.src="javascript:0"}k.id=w.iframeId,w.form.appendChild(k),w.iframe=k}var w=this;if(!this.form){var k,E=document.createElement("form"),q=document.createElement("textarea"),oe=this.iframeId="eio_iframe_"+this.index;E.className="socketio",E.style.position="absolute",E.style.top="-1000px",E.style.left="-1000px",E.target=oe,E.method="POST",E.setAttribute("accept-charset","utf-8"),q.name="d",E.appendChild(q),document.body.appendChild(E),this.form=E,this.area=q}this.form.action=this.uri(),s(),_=_.replace(h,`\\
33
- `),this.area.value=_.replace(x,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){w.iframe.readyState=="complete"&&u()}:this.iframe.onload=u}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(S,v){(function(r){function l(){}function c(u){if(x.call(this,u),r.location){var s=location.protocol=="https:",w=location.port;w||(w=s?443:80),this.xd=u.hostname!=r.location.hostname||w!=u.port,this.xs=u.secure!=s}}function g(u){this.method=u.method||"GET",this.uri=u.uri,this.xd=!!u.xd,this.xs=!!u.xs,this.async=u.async!==!1,this.data=u.data!=null?u.data:null,this.agent=u.agent,this.isBinary=u.isBinary,this.supportsBinary=u.supportsBinary,this.enablesXDR=u.enablesXDR,this.pfx=u.pfx,this.key=u.key,this.passphrase=u.passphrase,this.cert=u.cert,this.ca=u.ca,this.ciphers=u.ciphers,this.rejectUnauthorized=u.rejectUnauthorized,this.create()}function m(){for(var u in g.requests)g.requests.hasOwnProperty(u)&&g.requests[u].abort()}var d=S("xmlhttprequest"),x=S("./polling"),h=S("component-emitter"),_=S("component-inherit"),p=S("debug")("engine.io-client:polling-xhr");v.exports=c,v.exports.Request=g,_(c,x),c.prototype.supportsBinary=!0,c.prototype.request=function(u){return u=u||{},u.uri=this.uri(),u.xd=this.xd,u.xs=this.xs,u.agent=this.agent||!1,u.supportsBinary=this.supportsBinary,u.enablesXDR=this.enablesXDR,u.pfx=this.pfx,u.key=this.key,u.passphrase=this.passphrase,u.cert=this.cert,u.ca=this.ca,u.ciphers=this.ciphers,u.rejectUnauthorized=this.rejectUnauthorized,new g(u)},c.prototype.doWrite=function(u,s){var w=typeof u!="string"&&u!==void 0,k=this.request({method:"POST",data:u,isBinary:w}),E=this;k.on("success",s),k.on("error",function(q){E.onError("xhr post error",q)}),this.sendXhr=k},c.prototype.doPoll=function(){p("xhr poll");var u=this.request(),s=this;u.on("data",function(w){s.onData(w)}),u.on("error",function(w){s.onError("xhr poll error",w)}),this.pollXhr=u},h(g.prototype),g.prototype.create=function(){var u={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};u.pfx=this.pfx,u.key=this.key,u.passphrase=this.passphrase,u.cert=this.cert,u.ca=this.ca,u.ciphers=this.ciphers,u.rejectUnauthorized=this.rejectUnauthorized;var s=this.xhr=new d(u),w=this;try{if(p("xhr open %s: %s",this.method,this.uri),s.open(this.method,this.uri,this.async),this.supportsBinary&&(s.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?s.setRequestHeader("Content-type","application/octet-stream"):s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in s&&(s.withCredentials=!0),this.hasXDR()?(s.onload=function(){w.onLoad()},s.onerror=function(){w.onError(s.responseText)}):s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==1223?w.onLoad():setTimeout(function(){w.onError(s.status)},0))},p("xhr data %s",this.data),s.send(this.data)}catch(k){return void setTimeout(function(){w.onError(k)},0)}r.document&&(this.index=g.requestsCount++,g.requests[this.index]=this)},g.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},g.prototype.onData=function(u){this.emit("data",u),this.onSuccess()},g.prototype.onError=function(u){this.emit("error",u),this.cleanup(!0)},g.prototype.cleanup=function(u){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,u)try{this.xhr.abort()}catch{}r.document&&delete g.requests[this.index],this.xhr=null}},g.prototype.onLoad=function(){var u;try{var s;try{s=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}u=s==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(w){this.onError(w)}u!=null&&this.onData(u)},g.prototype.hasXDR=function(){return typeof r.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},g.prototype.abort=function(){this.cleanup()},r.document&&(g.requestsCount=0,g.requests={},r.attachEvent?r.attachEvent("onunload",m):r.addEventListener&&r.addEventListener("beforeunload",m,!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(S,v){function r(h){var _=h&&h.forceBase64;(!x||_)&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("parseqs"),g=S("engine.io-parser"),m=S("component-inherit"),d=S("debug")("engine.io-client:polling");v.exports=r;var x=function(){var h=S("xmlhttprequest"),_=new h({xdomain:!1});return _.responseType!=null}();m(r,l),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(h){function _(){d("paused"),p.readyState="paused",h()}var p=this;if(this.readyState="pausing",this.polling||!this.writable){var u=0;this.polling&&(d("we are currently polling - waiting to pause"),u++,this.once("pollComplete",function(){d("pre-pause polling complete"),--u||_()})),this.writable||(d("we are currently writing - waiting to pause"),u++,this.once("drain",function(){d("pre-pause writing complete"),--u||_()}))}else _()},r.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(h){var _=this;d("polling got data %s",h);var p=function(u){return _.readyState=="opening"&&_.onOpen(),u.type=="close"?(_.onClose(),!1):void _.onPacket(u)};g.decodePayload(h,this.socket.binaryType,p),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function h(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),h()):(d("transport not open - deferring close"),this.once("open",h))},r.prototype.write=function(h){var p=this;this.writable=!1;var _=function(){p.writable=!0,p.emit("drain")},p=this;g.encodePayload(h,this.supportsBinary,function(u){p.doWrite(u,_)})},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"https":"http",p="";return this.timestampRequests!==!1&&(h[this.timestampParam]=+new Date+"-"+l.timestamps++),this.supportsBinary||h.sid||(h.b64=1),h=c.encode(h),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(p=":"+this.port),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(S,v){function r(h){var _=h&&h.forceBase64;_&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("engine.io-parser"),g=S("parseqs"),m=S("component-inherit"),d=S("debug")("engine.io-client:websocket"),x=S("ws");v.exports=r,m(r,l),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var h=this.uri(),_=void 0,p={agent:this.agent};p.pfx=this.pfx,p.key=this.key,p.passphrase=this.passphrase,p.cert=this.cert,p.ca=this.ca,p.ciphers=this.ciphers,p.rejectUnauthorized=this.rejectUnauthorized,this.ws=new x(h,_,p),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var h=this;this.ws.onopen=function(){h.onOpen()},this.ws.onclose=function(){h.onClose()},this.ws.onmessage=function(_){h.onData(_.data)},this.ws.onerror=function(_){h.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(h){var _=this;setTimeout(function(){l.prototype.onData.call(_,h)},0)}),r.prototype.write=function(h){function _(){p.writable=!0,p.emit("drain")}var p=this;this.writable=!1;for(var u=0,s=h.length;s>u;u++)c.encodePacket(h[u],this.supportsBinary,function(w){try{p.ws.send(w)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},r.prototype.onClose=function(){l.prototype.onClose.call(this)},r.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"wss":"ws",p="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(p=":"+this.port),this.timestampRequests&&(h[this.timestampParam]=+new Date),this.supportsBinary||(h.b64=1),h=g.encode(h),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h},r.prototype.check=function(){return!(!x||"__initialize"in x&&this.name===r.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(S,v){var r=S("has-cors");v.exports=function(l){var c=l.xdomain,g=l.xscheme,m=l.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||r))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!g&&m)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(S,v){v.exports=function(r,l){var c=function(){};c.prototype=l.prototype,r.prototype=new c,r.prototype.constructor=r}},{}],22:[function(S,v,r){function l(){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 x=arguments,h=this.useColors;if(x[0]=(h?"%c":"")+this.namespace+(h?" %c":" ")+x[0]+(h?"%c ":" ")+"+"+r.humanize(this.diff),!h)return x;var _="color: "+this.color;x=[x[0],_,"color: inherit"].concat(Array.prototype.slice.call(x,1));var p=0,u=0;return x[0].replace(/%[a-z%]/g,function(s){s!=="%%"&&(p++,s==="%c"&&(u=p))}),x.splice(u,0,_),x}function g(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function m(x){try{x==null?localStorage.removeItem("debug"):localStorage.debug=x}catch{}}function d(){var x;try{x=localStorage.debug}catch{}return x}r=v.exports=S("./debug"),r.log=g,r.formatArgs=c,r.save=m,r.load=d,r.useColors=l,r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(x){return JSON.stringify(x)},r.enable(d())},{"./debug":23}],23:[function(S,v,r){function l(){return r.colors[_++%r.colors.length]}function c(p){function u(){}function s(){var k=s,E=+new Date,q=E-(h||E);k.diff=q,k.prev=h,k.curr=E,h=E,k.useColors==null&&(k.useColors=r.useColors()),k.color==null&&k.useColors&&(k.color=l());var oe=Array.prototype.slice.call(arguments);oe[0]=r.coerce(oe[0]),typeof oe[0]!="string"&&(oe=["%o"].concat(oe));var Y=0;oe[0]=oe[0].replace(/%([a-z%])/g,function(G,D){if(G==="%%")return G;Y++;var M=r.formatters[D];if(typeof M=="function"){var H=oe[Y];G=M.call(k,H),oe.splice(Y,1),Y--}return G}),typeof r.formatArgs=="function"&&(oe=r.formatArgs.apply(k,oe));var se=s.log||r.log||console.log.bind(console);se.apply(k,oe)}u.enabled=!1,s.enabled=!0;var w=r.enabled(p)?s:u;return w.namespace=p,w}function g(p){r.save(p);for(var u=(p||"").split(/[\s,]+/),s=u.length,w=0;s>w;w++)u[w]&&(p=u[w].replace(/\*/g,".*?"),p[0]==="-"?r.skips.push(new RegExp("^"+p.substr(1)+"$")):r.names.push(new RegExp("^"+p+"$")))}function m(){r.enable("")}function d(p){var u,s;for(u=0,s=r.skips.length;s>u;u++)if(r.skips[u].test(p))return!1;for(u=0,s=r.names.length;s>u;u++)if(r.names[u].test(p))return!0;return!1}function x(p){return p instanceof Error?p.stack||p.message:p}r=v.exports=c,r.coerce=x,r.disable=m,r.enable=g,r.enabled=d,r.humanize=S("ms"),r.names=[],r.skips=[],r.formatters={};var h,_=0},{ms:24}],24:[function(S,v){function r(p){var u=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(p);if(u){var s=parseFloat(u[1]),w=(u[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"y":return s*_;case"days":case"day":case"d":return s*h;case"hours":case"hour":case"h":return s*x;case"minutes":case"minute":case"m":return s*d;case"seconds":case"second":case"s":return s*m;case"ms":return s}}}function l(p){return p>=h?Math.round(p/h)+"d":p>=x?Math.round(p/x)+"h":p>=d?Math.round(p/d)+"m":p>=m?Math.round(p/m)+"s":p+"ms"}function c(p){return g(p,h,"day")||g(p,x,"hour")||g(p,d,"minute")||g(p,m,"second")||p+" ms"}function g(p,u,s){return u>p?void 0:1.5*u>p?Math.floor(p/u)+" "+s:Math.ceil(p/u)+" "+s+"s"}var m=1e3,d=60*m,x=60*d,h=24*x,_=365.25*h;v.exports=function(p,u){return u=u||{},typeof p=="string"?r(p):u.long?c(p):l(p)}},{}],25:[function(S,v,r){(function(l){function c(D,M){var H="b"+r.packets[D.type]+D.data.data;return M(H)}function g(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var O=D.data,U=new Uint8Array(O),X=new Uint8Array(1+O.byteLength);X[0]=oe[D.type];for(var j=0;j<U.length;j++)X[j+1]=U[j];return H(X.buffer)}function m(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var O=new FileReader;return O.onload=function(){D.data=O.result,r.encodePacket(D,M,!0,H)},O.readAsArrayBuffer(D.data)}function d(D,M,H){if(!M)return r.encodeBase64Packet(D,H);if(q)return m(D,M,H);var O=new Uint8Array(1);O[0]=oe[D.type];var U=new G([O.buffer,D.data]);return H(U)}function x(D,M,H){for(var O=new Array(D.length),U=s(D.length,H),X=function(V,B,Ae){M(B,function(xe,Ee){O[V]=Ee,Ae(xe,O)})},j=0;j<D.length;j++)X(j,D[j],U)}var h=S("./keys"),_=S("has-binary"),p=S("arraybuffer.slice"),u=S("base64-arraybuffer"),s=S("after"),w=S("utf8"),k=navigator.userAgent.match(/Android/i),E=/PhantomJS/i.test(navigator.userAgent),q=k||E;r.protocol=3;var oe=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},Y=h(oe),se={type:"error",data:"parser error"},G=S("blob");r.encodePacket=function(D,M,H,O){typeof M=="function"&&(O=M,M=!1),typeof H=="function"&&(O=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(l.ArrayBuffer&&U instanceof ArrayBuffer)return g(D,M,O);if(G&&U instanceof l.Blob)return d(D,M,O);if(U&&U.base64)return c(D,O);var X=oe[D.type];return D.data!==void 0&&(X+=H?w.encode(String(D.data)):String(D.data)),O(""+X)},r.encodeBase64Packet=function(D,M){var H="b"+r.packets[D.type];if(G&&D.data instanceof G){var O=new FileReader;return O.onload=function(){var B=O.result.split(",")[1];M(H+B)},O.readAsDataURL(D.data)}var U;try{U=String.fromCharCode.apply(null,new Uint8Array(D.data))}catch{for(var X=new Uint8Array(D.data),j=new Array(X.length),V=0;V<X.length;V++)j[V]=X[V];U=String.fromCharCode.apply(null,j)}return H+=l.btoa(U),M(H)},r.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return r.decodeBase64Packet(D.substr(1),M);if(H)try{D=w.decode(D)}catch{return se}var U=D.charAt(0);return Number(U)==U&&Y[U]?D.length>1?{type:Y[U],data:D.substring(1)}:{type:Y[U]}:se}var O=new Uint8Array(D),U=O[0],X=p(D,1);return G&&M==="blob"&&(X=new G([X])),{type:Y[U],data:X}},r.decodeBase64Packet=function(D,M){var H=Y[D.charAt(0)];if(!l.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var O=u.decode(D.substr(1));return M==="blob"&&G&&(O=new G([O])),{type:H,data:O}},r.encodePayload=function(D,M,H){function O(j){return j.length+":"+j}function U(j,V){r.encodePacket(j,X?M:!1,!0,function(B){V(null,O(B))})}typeof M=="function"&&(H=M,M=null);var X=_(D);return M&&X?G&&!q?r.encodePayloadAsBlob(D,H):r.encodePayloadAsArrayBuffer(D,H):D.length?void x(D,U,function(j,V){return H(V.join(""))}):H("0:")},r.decodePayload=function(D,M,H){if(typeof D!="string")return r.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var O;if(D=="")return H(se,0,1);for(var U,X,j="",V=0,B=D.length;B>V;V++){var Ae=D.charAt(V);if(Ae!=":")j+=Ae;else{if(j==""||j!=(U=Number(j))||(X=D.substr(V+1,U),j!=X.length))return H(se,0,1);if(X.length){if(O=r.decodePacket(X,M,!0),se.type==O.type&&se.data==O.data)return H(se,0,1);var xe=H(O,V+U,B);if(xe===!1)return}V+=U,j=""}}return j!=""?H(se,0,1):void 0},r.encodePayloadAsArrayBuffer=function(D,M){function H(O,U){r.encodePacket(O,!0,!0,function(X){return U(null,X)})}return D.length?void x(D,H,function(O,U){var X=U.reduce(function(B,Ae){var xe;return xe=typeof Ae=="string"?Ae.length:Ae.byteLength,B+xe.toString().length+xe+2},0),j=new Uint8Array(X),V=0;return U.forEach(function(B){var Ae=typeof B=="string",xe=B;if(Ae){for(var Ee=new Uint8Array(B.length),ae=0;ae<B.length;ae++)Ee[ae]=B.charCodeAt(ae);xe=Ee.buffer}j[V++]=Ae?0:1;for(var We=xe.byteLength.toString(),ae=0;ae<We.length;ae++)j[V++]=parseInt(We[ae]);j[V++]=255;for(var Ee=new Uint8Array(xe),ae=0;ae<Ee.length;ae++)j[V++]=Ee[ae]}),M(j.buffer)}):M(new ArrayBuffer(0))},r.encodePayloadAsBlob=function(D,M){function H(O,U){r.encodePacket(O,!0,!0,function(X){var j=new Uint8Array(1);if(j[0]=1,typeof X=="string"){for(var V=new Uint8Array(X.length),B=0;B<X.length;B++)V[B]=X.charCodeAt(B);X=V.buffer,j[0]=0}for(var Ae=X instanceof ArrayBuffer?X.byteLength:X.size,xe=Ae.toString(),Ee=new Uint8Array(xe.length+1),B=0;B<xe.length;B++)Ee[B]=parseInt(xe[B]);if(Ee[xe.length]=255,G){var ae=new G([j.buffer,Ee.buffer,X]);U(null,ae)}})}x(D,H,function(O,U){return M(new G(U))})},r.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=M,M=null);for(var O=D,U=[],X=!1;O.byteLength>0;){for(var j=new Uint8Array(O),V=j[0]===0,B="",Ae=1;j[Ae]!=255;Ae++){if(B.length>310){X=!0;break}B+=j[Ae]}if(X)return H(se,0,1);O=p(O,2+B.length),B=parseInt(B);var xe=p(O,0,B);if(V)try{xe=String.fromCharCode.apply(null,new Uint8Array(xe))}catch{var Ee=new Uint8Array(xe);xe="";for(var Ae=0;Ae<Ee.length;Ae++)xe+=String.fromCharCode(Ee[Ae])}U.push(xe),O=p(O,B)}var ae=U.length;U.forEach(function(We,bt){H(r.decodePacket(We,M,!0),bt,ae)})}}).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(S,v){v.exports=Object.keys||function(r){var l=[],c=Object.prototype.hasOwnProperty;for(var g in r)c.call(r,g)&&l.push(g);return l}},{}],27:[function(S,v){function r(c,g,m){function d(h,_){if(d.count<=0)throw new Error("after called too many times");--d.count,h?(x=!0,g(h),g=m):d.count!==0||x||g(null,_)}var x=!1;return m=m||l,d.count=c,c===0?g():d}function l(){}v.exports=r},{}],28:[function(S,v){v.exports=function(r,l,c){var g=r.byteLength;if(l=l||0,c=c||g,r.slice)return r.slice(l,c);if(0>l&&(l+=g),0>c&&(c+=g),c>g&&(c=g),l>=g||l>=c||g===0)return new ArrayBuffer(0);for(var m=new Uint8Array(r),d=new Uint8Array(c-l),x=l,h=0;c>x;x++,h++)d[h]=m[x];return d.buffer}},{}],29:[function(S,v,r){(function(l){r.encode=function(c){var g,m=new Uint8Array(c),d=m.length,x="";for(g=0;d>g;g+=3)x+=l[m[g]>>2],x+=l[(3&m[g])<<4|m[g+1]>>4],x+=l[(15&m[g+1])<<2|m[g+2]>>6],x+=l[63&m[g+2]];return d%3===2?x=x.substring(0,x.length-1)+"=":d%3===1&&(x=x.substring(0,x.length-2)+"=="),x},r.decode=function(c){var g,m,d,x,h,_=.75*c.length,p=c.length,u=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var s=new ArrayBuffer(_),w=new Uint8Array(s);for(g=0;p>g;g+=4)m=l.indexOf(c[g]),d=l.indexOf(c[g+1]),x=l.indexOf(c[g+2]),h=l.indexOf(c[g+3]),w[u++]=m<<2|d>>4,w[u++]=(15&d)<<4|x>>2,w[u++]=(3&x)<<6|63&h;return s}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(S,v){(function(r){function l(_){for(var p=0;p<_.length;p++){var u=_[p];if(u.buffer instanceof ArrayBuffer){var s=u.buffer;if(u.byteLength!==s.byteLength){var w=new Uint8Array(u.byteLength);w.set(new Uint8Array(s,u.byteOffset,u.byteLength)),s=w.buffer}_[p]=s}}}function c(_,p){p=p||{};var u=new m;l(_);for(var s=0;s<_.length;s++)u.append(_[s]);return p.type?u.getBlob(p.type):u.getBlob()}function g(_,p){return l(_),new Blob(_,p||{})}var m=r.BlobBuilder||r.WebKitBlobBuilder||r.MSBlobBuilder||r.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),x=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),h=m&&m.prototype.append&&m.prototype.getBlob;v.exports=function(){return d?x?r.Blob:g:h?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(S,v,r){(function(l){(function(c){function g(O){for(var U,X,j=[],V=0,B=O.length;B>V;)U=O.charCodeAt(V++),U>=55296&&56319>=U&&B>V?(X=O.charCodeAt(V++),(64512&X)==56320?j.push(((1023&U)<<10)+(1023&X)+65536):(j.push(U),V--)):j.push(U);return j}function m(O){for(var U,X=O.length,j=-1,V="";++j<X;)U=O[j],U>65535&&(U-=65536,V+=se(U>>>10&1023|55296),U=56320|1023&U),V+=se(U);return V}function d(O){if(O>=55296&&57343>=O)throw Error("Lone surrogate U+"+O.toString(16).toUpperCase()+" is not a scalar value")}function x(O,U){return se(O>>U&63|128)}function h(O){if(!(4294967168&O))return se(O);var U="";return 4294965248&O?4294901760&O?!(4292870144&O)&&(U=se(O>>18&7|240),U+=x(O,12),U+=x(O,6)):(d(O),U=se(O>>12&15|224),U+=x(O,6)):U=se(O>>6&31|192),U+=se(63&O|128)}function _(O){for(var U,X=g(O),j=X.length,V=-1,B="";++V<j;)U=X[V],B+=h(U);return B}function p(){if(Y>=oe)throw Error("Invalid byte index");var O=255&q[Y];if(Y++,(192&O)==128)return 63&O;throw Error("Invalid continuation byte")}function u(){var O,U,X,j,V;if(Y>oe)throw Error("Invalid byte index");if(Y==oe)return!1;if(O=255&q[Y],Y++,(128&O)==0)return O;if((224&O)==192){var U=p();if(V=(31&O)<<6|U,V>=128)return V;throw Error("Invalid continuation byte")}if((240&O)==224){if(U=p(),X=p(),V=(15&O)<<12|U<<6|X,V>=2048)return d(V),V;throw Error("Invalid continuation byte")}if((248&O)==240&&(U=p(),X=p(),j=p(),V=(15&O)<<18|U<<12|X<<6|j,V>=65536&&1114111>=V))return V;throw Error("Invalid UTF-8 detected")}function s(O){q=g(O),oe=q.length,Y=0;for(var U,X=[];(U=u())!==!1;)X.push(U);return m(X)}var w=typeof r=="object"&&r,k=typeof v=="object"&&v&&v.exports==w&&v,E=typeof l=="object"&&l;(E.global===E||E.window===E)&&(c=E);var q,oe,Y,se=String.fromCharCode,G={version:"2.0.0",encode:_,decode:s};if(w&&!w.nodeType)if(k)k.exports=G;else{var D={},M=D.hasOwnProperty;for(var H in G)M.call(G,H)&&(w[H]=G[H])}else c.utf8=G})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(S,v){(function(r){var l=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,x=/\s+$/;v.exports=function(h){return typeof h=="string"&&h?(h=h.replace(d,"").replace(x,""),r.JSON&&JSON.parse?JSON.parse(h):l.test(h.replace(c,"@").replace(g,"]").replace(m,""))?new Function("return "+h)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(S,v,r){r.encode=function(l){var c="";for(var g in l)l.hasOwnProperty(g)&&(c.length&&(c+="&"),c+=encodeURIComponent(g)+"="+encodeURIComponent(l[g]));return c},r.decode=function(l){for(var c={},g=l.split("&"),m=0,d=g.length;d>m;m++){var x=g[m].split("=");c[decodeURIComponent(x[0])]=decodeURIComponent(x[1])}return c}},{}],34:[function(S,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){var g=c,m=c.indexOf("["),d=c.indexOf("]");m!=-1&&d!=-1&&(c=c.substring(0,m)+c.substring(m,d).replace(/:/g,";")+c.substring(d,c.length));for(var x=r.exec(c||""),h={},_=14;_--;)h[l[_]]=x[_]||"";return m!=-1&&d!=-1&&(h.source=g,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h}},{}],35:[function(S,v){function r(g,m){return m?new c(g,m):new c(g)}var l=function(){return self}(),c=l.WebSocket||l.MozWebSocket;v.exports=c?r:null,c&&(r.prototype=c.prototype)},{}],36:[function(S,v){(function(r){function l(g){function m(d){if(!d)return!1;if(r.Buffer&&r.Buffer.isBuffer(d)||r.ArrayBuffer&&d instanceof ArrayBuffer||r.Blob&&d instanceof Blob||r.File&&d instanceof File)return!0;if(c(d)){for(var x=0;x<d.length;x++)if(m(d[x]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var h in d)if(Object.prototype.hasOwnProperty.call(d,h)&&m(d[h]))return!0}return!1}return m(g)}var c=S("isarray");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(S,v){v.exports=Array.isArray||function(r){return Object.prototype.toString.call(r)=="[object Array]"}},{}],38:[function(S,v){var r=S("global");try{v.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch{v.exports=!1}},{global:39}],39:[function(S,v){v.exports=function(){return this}()},{}],40:[function(S,v){var r=[].indexOf;v.exports=function(l,c){if(r)return l.indexOf(c);for(var g=0;g<l.length;++g)if(l[g]===c)return g;return-1}},{}],41:[function(S,v,r){var l=Object.prototype.hasOwnProperty;r.keys=Object.keys||function(c){var g=[];for(var m in c)l.call(c,m)&&g.push(m);return g},r.values=function(c){var g=[];for(var m in c)l.call(c,m)&&g.push(c[m]);return g},r.merge=function(c,g){for(var m in g)l.call(g,m)&&(c[m]=g[m]);return c},r.length=function(c){return r.keys(c).length},r.isEmpty=function(c){return r.length(c)==0}},{}],42:[function(S,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){for(var g=r.exec(c||""),m={},d=14;d--;)m[l[d]]=g[d]||"";return m}},{}],43:[function(S,v,r){(function(l){var c=S("isarray"),g=S("./is-buffer");r.deconstructPacket=function(m){function d(p){if(!p)return p;if(g(p)){var u={_placeholder:!0,num:x.length};return x.push(p),u}if(c(p)){for(var s=new Array(p.length),w=0;w<p.length;w++)s[w]=d(p[w]);return s}if(typeof p=="object"&&!(p instanceof Date)){var s={};for(var k in p)s[k]=d(p[k]);return s}return p}var x=[],h=m.data,_=m;return _.data=d(h),_.attachments=x.length,{packet:_,buffers:x}},r.reconstructPacket=function(m,d){function x(h){if(h&&h._placeholder){var _=d[h.num];return _}if(c(h)){for(var p=0;p<h.length;p++)h[p]=x(h[p]);return h}if(h&&typeof h=="object"){for(var u in h)h[u]=x(h[u]);return h}return h}return m.data=x(m.data),m.attachments=void 0,m},r.removeBlobs=function(m,d){function x(p,u,s){if(!p)return p;if(l.Blob&&p instanceof Blob||l.File&&p instanceof File){h++;var w=new FileReader;w.onload=function(){s?s[u]=this.result:_=this.result,--h||d(_)},w.readAsArrayBuffer(p)}else if(c(p))for(var k=0;k<p.length;k++)x(p[k],k,p);else if(p&&typeof p=="object"&&!g(p))for(var E in p)x(p[E],E,p)}var h=0,_=m;x(_),h||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(S,v,r){function l(){}function c(k){var E="",q=!1;return E+=k.type,(r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)&&(E+=k.attachments,E+="-"),k.nsp&&k.nsp!="/"&&(q=!0,E+=k.nsp),k.id!=null&&(q&&(E+=",",q=!1),E+=k.id),k.data!=null&&(q&&(E+=","),E+=p.stringify(k.data)),_("encoded %j as %s",k,E),E}function g(k,E){function q(oe){var Y=s.deconstructPacket(oe),se=c(Y.packet),G=Y.buffers;G.unshift(se),E(G)}s.removeBlobs(k,q)}function m(){this.reconstructor=null}function d(k){var E={},q=0;if(E.type=Number(k.charAt(0)),r.types[E.type]==null)return h();if(r.BINARY_EVENT==E.type||r.BINARY_ACK==E.type){for(var oe="";k.charAt(++q)!="-"&&(oe+=k.charAt(q),q!=k.length););if(oe!=Number(oe)||k.charAt(q)!="-")throw new Error("Illegal attachments");E.attachments=Number(oe)}if(k.charAt(q+1)=="/")for(E.nsp="";++q;){var Y=k.charAt(q);if(Y==","||(E.nsp+=Y,q==k.length))break}else E.nsp="/";var se=k.charAt(q+1);if(se!==""&&Number(se)==se){for(E.id="";++q;){var Y=k.charAt(q);if(Y==null||Number(Y)!=Y){--q;break}if(E.id+=k.charAt(q),q==k.length)break}E.id=Number(E.id)}if(k.charAt(++q))try{E.data=p.parse(k.substr(q))}catch{return h()}return _("decoded %s as %j",k,E),E}function x(k){this.reconPack=k,this.buffers=[]}function h(){return{type:r.ERROR,data:"parser error"}}var _=S("debug")("socket.io-parser"),p=S("json3"),u=(S("isarray"),S("component-emitter")),s=S("./binary"),w=S("./is-buffer");r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],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=l,r.Decoder=m,l.prototype.encode=function(k,E){if(_("encoding packet %j",k),r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)g(k,E);else{var q=c(k);E([q])}},u(m.prototype),m.prototype.add=function(k){var E;if(typeof k=="string")E=d(k),r.BINARY_EVENT==E.type||r.BINARY_ACK==E.type?(this.reconstructor=new x(E),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",E)):this.emit("decoded",E);else{if(!w(k)&&!k.base64)throw new Error("Unknown type: "+k);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");E=this.reconstructor.takeBinaryData(k),E&&(this.reconstructor=null,this.emit("decoded",E))}},m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},x.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length==this.reconPack.attachments){var E=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),E}return null},x.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(S,v){(function(r){function l(c){return r.Buffer&&r.Buffer.isBuffer(c)||r.ArrayBuffer&&c instanceof ArrayBuffer}v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(S,v){v.exports=S(37)},{}],47:[function(S,v,r){(function(l){function c(W){if(c[W]!==d)return c[W];var J;if(W=="bug-string-char-index")J=!1;else if(W=="json")J=c("json-stringify")&&c("json-parse");else{var F,te='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(W=="json-stringify"){var P=_.stringify,Q=typeof P=="function"&&p;if(Q){(F=function(){return 1}).toJSON=F;try{Q=P(0)==="0"&&P(new Number)==="0"&&P(new String)=='""'&&P(x)===d&&P(d)===d&&P()===d&&P(F)==="1"&&P([F])=="[1]"&&P([d])=="[null]"&&P(null)=="null"&&P([d,x,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
32
+ }`;var pe=Ua(function(){return _e(f,Z+"return "+N).apply(r,y)});if(pe.source=N,$i(pe))throw pe;return pe}function Kd(e){return Se(e).toLowerCase()}function Hd(e){return Se(e).toUpperCase()}function zd(e,t,n){if(e=Se(e),e&&(n||t===r))return zo(e);if(!e||!(t=ot(t)))return e;var i=_t(e),o=_t(t),f=Go(i,o),y=$o(i,o)+1;return Jt(i,f,y).join("")}function Gd(e,t,n){if(e=Se(e),e&&(n||t===r))return e.slice(0,Jo(e)+1);if(!e||!(t=ot(t)))return e;var i=_t(e),o=$o(i,_t(t))+1;return Jt(i,0,o).join("")}function $d(e,t,n){if(e=Se(e),e&&(n||t===r))return e.replace($r,"");if(!e||!(t=ot(t)))return e;var i=_t(e),o=Go(i,_t(t));return Jt(i,o).join("")}function Xd(e,t){var n=U,i=X;if(Le(t)){var o="separator"in t?t.separator:o;n="length"in t?le(t.length):n,i="omission"in t?ot(t.omission):i}e=Se(e);var f=e.length;if(hn(e)){var y=_t(e);f=y.length}if(n>=f)return e;var C=n-pn(i);if(C<1)return i;var x=y?Jt(y,0,C).join(""):e.slice(0,C);if(o===r)return x+i;if(y&&(C+=x.length-C),Xi(o)){if(e.slice(C).search(o)){var O,L=x;for(o.global||(o=fi(o.source,Se(lo.exec(o))+"g")),o.lastIndex=0;O=o.exec(L);)var N=O.index;x=x.slice(0,N===r?C:N)}}else if(e.indexOf(ot(o),C)!=C){var K=x.lastIndexOf(o);K>-1&&(x=x.slice(0,K))}return x+i}function Jd(e){return e=Se(e),e&&iu.test(e)?e.replace(uo,bf):e}var Yd=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zi=Ds("toUpperCase");function Ba(e,t,n){return e=Se(e),t=n?r:t,t===r?_f(e)?kf(e):ff(e):e.match(t)||[]}var Ua=de(function(e,t){try{return rt(e,r,t)}catch(n){return $i(n)?n:new fe(n)}}),Zd=Ut(function(e,t){return ct(t,function(n){n=Tt(n),Nt(e,n,zi(e[n],e))}),e});function Vd(e){var t=e==null?0:e.length,n=ne();return e=t?Oe(e,function(i){if(typeof i[1]!="function")throw new lt(m);return[n(i[0]),i[1]]}):[],de(function(i){for(var o=-1;++o<t;){var f=e[o];if(rt(f[0],this,i))return rt(f[1],this,i)}})}function Qd(e){return bc(pt(e,p))}function Vi(e){return function(){return e}}function jd(e,t){return e==null||e!==e?t:e}var eg=Fs(),tg=Fs(!0);function je(e){return e}function Qi(e){return ds(typeof e=="function"?e:pt(e,p))}function ng(e){return vs(pt(e,p))}function rg(e,t){return ys(e,pt(t,p))}var ig=de(function(e,t){return function(n){return Pn(n,e,t)}}),og=de(function(e,t){return function(n){return Pn(e,n,t)}});function ji(e,t,n){var i=Pe(t),o=dr(t,i);n==null&&!(Le(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=dr(t,Pe(t)));var f=!(Le(n)&&"chain"in n)||!!n.chain,y=Pt(e);return ct(o,function(C){var x=t[C];e[C]=x,y&&(e.prototype[C]=function(){var O=this.__chain__;if(f||O){var L=e(this.__wrapped__),N=L.__actions__=Ze(this.__actions__);return N.push({func:x,args:arguments,thisArg:e}),L.__chain__=O,L}return x.apply(e,Kt([this.value()],arguments))})}),e}function sg(){return Fe._===this&&(Fe._=If),this}function eo(){}function ag(e){return e=le(e),de(function(t){return _s(t,e)})}var ug=Li(Oe),fg=Li(Mo),cg=Li(ni);function Da(e){return Fi(e)?ri(Tt(e)):Wc(e)}function lg(e){return function(t){return e==null?r:rn(e,t)}}var hg=Ws(),pg=Ws(!0);function to(){return[]}function no(){return!1}function dg(){return{}}function gg(){return""}function vg(){return!0}function yg(e,t){if(e=le(e),e<1||e>ue)return[];var n=tt,i=He(e,tt);t=ne(t),e-=tt;for(var o=si(i,t);++n<e;)t(n);return o}function _g(e){return ce(e)?Oe(e,Tt):st(e)?[e]:Ze(na(Se(e)))}function mg(e){var t=++Of;return Se(e)+t}var wg=wr(function(e,t){return e+t},0),Sg=Ii("ceil"),Cg=wr(function(e,t){return e/t},1),bg=Ii("floor");function Ag(e){return e&&e.length?pr(e,je,yi):r}function xg(e,t){return e&&e.length?pr(e,ne(t,2),yi):r}function kg(e){return Ko(e,je)}function Eg(e,t){return Ko(e,ne(t,2))}function Tg(e){return e&&e.length?pr(e,je,Si):r}function Rg(e,t){return e&&e.length?pr(e,ne(t,2),Si):r}var Og=wr(function(e,t){return e*t},1),Lg=Ii("round"),Ig=wr(function(e,t){return e-t},0);function Ng(e){return e&&e.length?oi(e,je):0}function Bg(e,t){return e&&e.length?oi(e,ne(t,2)):0}return u.after=np,u.ary=pa,u.assign=Hp,u.assignIn=Ea,u.assignInWith=Nr,u.assignWith=zp,u.at=Gp,u.before=da,u.bind=zi,u.bindAll=Zd,u.bindKey=ga,u.castArray=dp,u.chain=ca,u.chunk=bl,u.compact=Al,u.concat=xl,u.cond=Vd,u.conforms=Qd,u.constant=Vi,u.countBy=Nh,u.create=$p,u.curry=va,u.curryRight=ya,u.debounce=_a,u.defaults=Xp,u.defaultsDeep=Jp,u.defer=rp,u.delay=ip,u.difference=kl,u.differenceBy=El,u.differenceWith=Tl,u.drop=Rl,u.dropRight=Ol,u.dropRightWhile=Ll,u.dropWhile=Il,u.fill=Nl,u.filter=Uh,u.flatMap=Fh,u.flatMapDeep=Mh,u.flatMapDepth=Wh,u.flatten=sa,u.flattenDeep=Bl,u.flattenDepth=Ul,u.flip=op,u.flow=eg,u.flowRight=tg,u.fromPairs=Dl,u.functions=td,u.functionsIn=nd,u.groupBy=qh,u.initial=Fl,u.intersection=Ml,u.intersectionBy=Wl,u.intersectionWith=ql,u.invert=id,u.invertBy=od,u.invokeMap=Hh,u.iteratee=Qi,u.keyBy=zh,u.keys=Pe,u.keysIn=Qe,u.map=Er,u.mapKeys=ad,u.mapValues=ud,u.matches=ng,u.matchesProperty=rg,u.memoize=Rr,u.merge=fd,u.mergeWith=Ta,u.method=ig,u.methodOf=og,u.mixin=ji,u.negate=Or,u.nthArg=ag,u.omit=cd,u.omitBy=ld,u.once=sp,u.orderBy=Gh,u.over=ug,u.overArgs=ap,u.overEvery=fg,u.overSome=cg,u.partial=Gi,u.partialRight=ma,u.partition=$h,u.pick=hd,u.pickBy=Ra,u.property=Da,u.propertyOf=lg,u.pull=Gl,u.pullAll=ua,u.pullAllBy=$l,u.pullAllWith=Xl,u.pullAt=Jl,u.range=hg,u.rangeRight=pg,u.rearg=up,u.reject=Yh,u.remove=Yl,u.rest=fp,u.reverse=Ki,u.sampleSize=Vh,u.set=dd,u.setWith=gd,u.shuffle=Qh,u.slice=Zl,u.sortBy=tp,u.sortedUniq=rh,u.sortedUniqBy=ih,u.split=Fd,u.spread=cp,u.tail=oh,u.take=sh,u.takeRight=ah,u.takeRightWhile=uh,u.takeWhile=fh,u.tap=Ah,u.throttle=lp,u.thru=kr,u.toArray=Aa,u.toPairs=Oa,u.toPairsIn=La,u.toPath=_g,u.toPlainObject=ka,u.transform=vd,u.unary=hp,u.union=ch,u.unionBy=lh,u.unionWith=hh,u.uniq=ph,u.uniqBy=dh,u.uniqWith=gh,u.unset=yd,u.unzip=Hi,u.unzipWith=fa,u.update=_d,u.updateWith=md,u.values=bn,u.valuesIn=wd,u.without=vh,u.words=Ba,u.wrap=pp,u.xor=yh,u.xorBy=_h,u.xorWith=mh,u.zip=wh,u.zipObject=Sh,u.zipObjectDeep=Ch,u.zipWith=bh,u.entries=Oa,u.entriesIn=La,u.extend=Ea,u.extendWith=Nr,ji(u,u),u.add=wg,u.attempt=Ua,u.camelCase=Ad,u.capitalize=Ia,u.ceil=Sg,u.clamp=Sd,u.clone=gp,u.cloneDeep=yp,u.cloneDeepWith=_p,u.cloneWith=vp,u.conformsTo=mp,u.deburr=Na,u.defaultTo=jd,u.divide=Cg,u.endsWith=xd,u.eq=wt,u.escape=kd,u.escapeRegExp=Ed,u.every=Bh,u.find=Dh,u.findIndex=ia,u.findKey=Yp,u.findLast=Ph,u.findLastIndex=oa,u.findLastKey=Zp,u.floor=bg,u.forEach=la,u.forEachRight=ha,u.forIn=Vp,u.forInRight=Qp,u.forOwn=jp,u.forOwnRight=ed,u.get=Ji,u.gt=wp,u.gte=Sp,u.has=rd,u.hasIn=Yi,u.head=aa,u.identity=je,u.includes=Kh,u.indexOf=Pl,u.inRange=Cd,u.invoke=sd,u.isArguments=an,u.isArray=ce,u.isArrayBuffer=Cp,u.isArrayLike=Ve,u.isArrayLikeObject=Ne,u.isBoolean=bp,u.isBuffer=Yt,u.isDate=Ap,u.isElement=xp,u.isEmpty=kp,u.isEqual=Ep,u.isEqualWith=Tp,u.isError=$i,u.isFinite=Rp,u.isFunction=Pt,u.isInteger=wa,u.isLength=Lr,u.isMap=Sa,u.isMatch=Op,u.isMatchWith=Lp,u.isNaN=Ip,u.isNative=Np,u.isNil=Up,u.isNull=Bp,u.isNumber=Ca,u.isObject=Le,u.isObjectLike=Ie,u.isPlainObject=Hn,u.isRegExp=Xi,u.isSafeInteger=Dp,u.isSet=ba,u.isString=Ir,u.isSymbol=st,u.isTypedArray=Cn,u.isUndefined=Pp,u.isWeakMap=Fp,u.isWeakSet=Mp,u.join=Kl,u.kebabCase=Td,u.last=gt,u.lastIndexOf=Hl,u.lowerCase=Rd,u.lowerFirst=Od,u.lt=Wp,u.lte=qp,u.max=Ag,u.maxBy=xg,u.mean=kg,u.meanBy=Eg,u.min=Tg,u.minBy=Rg,u.stubArray=to,u.stubFalse=no,u.stubObject=dg,u.stubString=gg,u.stubTrue=vg,u.multiply=Og,u.nth=zl,u.noConflict=sg,u.noop=eo,u.now=Tr,u.pad=Ld,u.padEnd=Id,u.padStart=Nd,u.parseInt=Bd,u.random=bd,u.reduce=Xh,u.reduceRight=Jh,u.repeat=Ud,u.replace=Dd,u.result=pd,u.round=Lg,u.runInContext=b,u.sample=Zh,u.size=jh,u.snakeCase=Pd,u.some=ep,u.sortedIndex=Vl,u.sortedIndexBy=Ql,u.sortedIndexOf=jl,u.sortedLastIndex=eh,u.sortedLastIndexBy=th,u.sortedLastIndexOf=nh,u.startCase=Md,u.startsWith=Wd,u.subtract=Ig,u.sum=Ng,u.sumBy=Bg,u.template=qd,u.times=yg,u.toFinite=Ft,u.toInteger=le,u.toLength=xa,u.toLower=Kd,u.toNumber=vt,u.toSafeInteger=Kp,u.toString=Se,u.toUpper=Hd,u.trim=zd,u.trimEnd=Gd,u.trimStart=$d,u.truncate=Xd,u.unescape=Jd,u.uniqueId=mg,u.upperCase=Yd,u.upperFirst=Zi,u.each=la,u.eachRight=ha,u.first=aa,ji(u,function(){var e={};return kt(u,function(t,n){Ce.call(u.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),u.VERSION=l,ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){u[e].placeholder=u}),ct(["drop","take"],function(e,t){ve.prototype[e]=function(n){n=n===r?1:De(le(n),0);var i=this.__filtered__&&!t?new ve(this):this.clone();return i.__filtered__?i.__takeCount__=He(n,i.__takeCount__):i.__views__.push({size:He(n,tt),type:e+(i.__dir__<0?"Right":"")}),i},ve.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),ct(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==B||n==Ae;ve.prototype[e]=function(o){var f=this.clone();return f.__iteratees__.push({iteratee:ne(o,3),type:n}),f.__filtered__=f.__filtered__||i,f}}),ct(["head","last"],function(e,t){var n="take"+(t?"Right":"");ve.prototype[e]=function(){return this[n](1).value()[0]}}),ct(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ve.prototype[e]=function(){return this.__filtered__?new ve(this):this[n](1)}}),ve.prototype.compact=function(){return this.filter(je)},ve.prototype.find=function(e){return this.filter(e).head()},ve.prototype.findLast=function(e){return this.reverse().find(e)},ve.prototype.invokeMap=de(function(e,t){return typeof e=="function"?new ve(this):this.map(function(n){return Pn(n,e,t)})}),ve.prototype.reject=function(e){return this.filter(Or(ne(e)))},ve.prototype.slice=function(e,t){e=le(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ve(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=le(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},ve.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ve.prototype.toArray=function(){return this.take(tt)},kt(ve.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=u[i?"take"+(t=="last"?"Right":""):t],f=i||/^find/.test(t);o&&(u.prototype[t]=function(){var y=this.__wrapped__,C=i?[1]:arguments,x=y instanceof ve,O=C[0],L=x||ce(y),N=function(ge){var ye=o.apply(u,Kt([ge],C));return i&&K?ye[0]:ye};L&&n&&typeof O=="function"&&O.length!=1&&(x=L=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=f&&!K,pe=x&&!Z;if(!f&&L){y=pe?y:new ve(this);var ie=e.apply(y,C);return ie.__actions__.push({func:kr,args:[N],thisArg:r}),new ht(ie,K)}return re&&pe?e.apply(this,C):(ie=this.thru(N),re?i?ie.value()[0]:ie.value():ie)})}),ct(["pop","push","shift","sort","splice","unshift"],function(e){var t=Qn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);u.prototype[e]=function(){var o=arguments;if(i&&!this.__chain__){var f=this.value();return t.apply(ce(f)?f:[],o)}return this[n](function(y){return t.apply(ce(y)?y:[],o)})}}),kt(ve.prototype,function(e,t){var n=u[t];if(n){var i=n.name+"";Ce.call(yn,i)||(yn[i]=[]),yn[i].push({name:t,func:n})}}),yn[mr(r,q).name]=[{name:"wrapper",func:r}],ve.prototype.clone=Jf,ve.prototype.reverse=Yf,ve.prototype.value=Zf,u.prototype.at=xh,u.prototype.chain=kh,u.prototype.commit=Eh,u.prototype.next=Th,u.prototype.plant=Oh,u.prototype.reverse=Lh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Ih,u.prototype.first=u.prototype.head,On&&(u.prototype[On]=Rh),u},dn=Ef();Qt?((Qt.exports=dn)._=dn,Qr._=dn):Fe._=dn}).call(et)}(zn,zn.exports);var za=zn.exports;const Ga={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 $a(){return function S(v,r,l){function c(d,A){if(!r[d]){if(!v[d]){var h=typeof require=="function"&&require;if(!A&&h)return h(d,!0);if(g)return g(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=r[d]={exports:{}};v[d][0].call(_.exports,function(p){var a=v[d][1][p];return c(a||p)},_,_.exports,S,v,r,l)}return r[d].exports}for(var g=typeof require=="function"&&require,m=0;m<l.length;m++)c(l[m]);return c}({1:[function(S,v){v.exports=S("./lib/")},{"./lib/":2}],2:[function(S,v,r){function l(h,_){typeof h=="object"&&(_=h,h=void 0),_=_||{};var p,a=c(h),s=a.source,w=a.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",s),p=m(s,_)):(A[w]||(d("new io instance for %s",s),A[w]=m(s,_)),p=A[w]),p.socket(a.path)}var c=S("./url"),g=S("socket.io-parser"),m=S("./manager"),d=S("debug")("socket.io-client");v.exports=r=l;var A=r.managers={};r.protocol=g.protocol,r.connect=l,r.Manager=S("./manager"),r.Socket=S("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(S,v){function r(a,s){return this instanceof r?(a&&typeof a=="object"&&(s=a,a=void 0),s=s||{},s.path=s.path||"/socket.io",this.nsps={},this.subs=[],this.opts=s,this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(s.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this.readyState="closed",this.uri=a,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new m.Encoder,this.decoder=new m.Decoder,this.autoConnect=s.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(a,s)}var l=(S("./url"),S("engine.io-client")),c=S("./socket"),g=S("component-emitter"),m=S("socket.io-parser"),d=S("./on"),A=S("component-bind"),h=(S("object-component"),S("debug")("socket.io-client:manager")),_=S("indexof"),p=S("backo2");v.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var a in this.nsps)this.nsps[a].emit.apply(this.nsps[a],arguments)},r.prototype.updateSocketIds=function(){for(var a in this.nsps)this.nsps[a].id=this.engine.id},g(r.prototype),r.prototype.reconnection=function(a){return arguments.length?(this._reconnection=!!a,this):this._reconnection},r.prototype.reconnectionAttempts=function(a){return arguments.length?(this._reconnectionAttempts=a,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(a){return arguments.length?(this._reconnectionDelay=a,this.backoff&&this.backoff.setMin(a),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(a){return arguments.length?(this._randomizationFactor=a,this.backoff&&this.backoff.setJitter(a),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(a){return arguments.length?(this._reconnectionDelayMax=a,this.backoff&&this.backoff.setMax(a),this):this._reconnectionDelayMax},r.prototype.timeout=function(a){return arguments.length?(this._timeout=a,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},r.prototype.open=r.prototype.connect=function(a){if(h("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=l(this.uri,this.opts);var s=this.engine,w=this;this.readyState="opening",this.skipReconnect=!1;var k=d(s,"open",function(){w.onopen(),a&&a()}),T=d(s,"error",function(Y){if(h("connect_error"),w.cleanup(),w.readyState="closed",w.emitAll("connect_error",Y),a){var se=new Error("Connection error");se.data=Y,a(se)}else w.maybeReconnectOnOpen()});if(this._timeout!==!1){var q=this._timeout;h("connect attempt will timeout after %d",q);var oe=setTimeout(function(){h("connect attempt timed out after %d",q),k.destroy(),s.close(),s.emit("error","timeout"),w.emitAll("connect_timeout",q)},q);this.subs.push({destroy:function(){clearTimeout(oe)}})}return this.subs.push(k),this.subs.push(T),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var a=this.engine;this.subs.push(d(a,"data",A(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",A(this,"ondecoded"))),this.subs.push(d(a,"error",A(this,"onerror"))),this.subs.push(d(a,"close",A(this,"onclose")))},r.prototype.ondata=function(a){this.decoder.add(a)},r.prototype.ondecoded=function(a){this.emit("packet",a)},r.prototype.onerror=function(a){h("error",a),this.emitAll("error",a)},r.prototype.socket=function(a){var s=this.nsps[a];if(!s){s=new c(this,a),this.nsps[a]=s;var w=this;s.on("connect",function(){s.id=w.engine.id,~_(w.connected,s)||w.connected.push(s)})}return s},r.prototype.destroy=function(a){var s=_(this.connected,a);~s&&this.connected.splice(s,1),this.connected.length||this.close()},r.prototype.packet=function(a){h("writing packet %j",a);var s=this;s.encoding?s.packetBuffer.push(a):(s.encoding=!0,this.encoder.encode(a,function(w){for(var k=0;k<w.length;k++)s.engine.write(w[k]);s.encoding=!1,s.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},r.prototype.cleanup=function(){for(var a;a=this.subs.shift();)a.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(a){h("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",a),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var a=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var s=this.backoff.duration();h("will wait %dms before reconnect attempt",s),this.reconnecting=!0;var w=setTimeout(function(){a.skipReconnect||(h("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(k){k?(h("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",k.data)):(h("reconnect success"),a.onreconnect())}))},s);this.subs.push({destroy:function(){clearTimeout(w)}})}},r.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},{"./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(S,v){function r(l,c,g){return l.on(c,g),{destroy:function(){l.removeListener(c,g)}}}v.exports=r},{}],5:[function(S,v,r){function l(s,w){this.io=s,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=S("socket.io-parser"),g=S("component-emitter"),m=S("to-array"),d=S("./on"),A=S("component-bind"),h=S("debug")("socket.io-client:socket"),_=S("has-binary");v.exports=l;var p={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},a=g.prototype.emit;g(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var s=this.io;this.subs=[d(s,"open",A(this,"onopen")),d(s,"packet",A(this,"onpacket")),d(s,"close",A(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},l.prototype.send=function(){var s=m(arguments);return s.unshift("message"),this.emit.apply(this,s),this},l.prototype.emit=function(s){if(p.hasOwnProperty(s))return a.apply(this,arguments),this;var w=m(arguments),k=c.EVENT;_(w)&&(k=c.BINARY_EVENT);var T={type:k,data:w};return typeof w[w.length-1]=="function"&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),T.id=this.ids++),this.connected?this.packet(T):this.sendBuffer.push(T),this},l.prototype.packet=function(s){s.nsp=this.nsp,this.io.packet(s)},l.prototype.onopen=function(){h("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},l.prototype.onclose=function(s){h("close (%s)",s),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",s)},l.prototype.onpacket=function(s){if(s.nsp==this.nsp)switch(s.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(s);break;case c.BINARY_EVENT:this.onevent(s);break;case c.ACK:this.onack(s);break;case c.BINARY_ACK:this.onack(s);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",s.data)}},l.prototype.onevent=function(s){var w=s.data||[];h("emitting event %j",w),s.id!=null&&(h("attaching ack callback to event"),w.push(this.ack(s.id))),this.connected?a.apply(this,w):this.receiveBuffer.push(w)},l.prototype.ack=function(s){var w=this,k=!1;return function(){if(!k){k=!0;var T=m(arguments);h("sending ack %j",T);var q=_(T)?c.BINARY_ACK:c.ACK;w.packet({type:q,id:s,data:T})}}},l.prototype.onack=function(s){h("calling ack %s with %j",s.id,s.data);var w=this.acks[s.id];w.apply(this,s.data),delete this.acks[s.id]},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var s;for(s=0;s<this.receiveBuffer.length;s++)a.apply(this,this.receiveBuffer[s]);for(this.receiveBuffer=[],s=0;s<this.sendBuffer.length;s++)this.packet(this.sendBuffer[s]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){h("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var s=0;s<this.subs.length;s++)this.subs[s].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(h("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(S,v){(function(r){function l(m,h){var A=m,h=h||r.location;return m==null&&(m=h.protocol+"//"+h.host),typeof m=="string"&&(m.charAt(0)=="/"&&(m=m.charAt(1)=="/"?h.protocol+m:h.hostname+m),/^(https?|wss?):\/\//.test(m)||(g("protocol-less url %s",m),m=typeof h<"u"?h.protocol+"//"+m:"https://"+m),g("parse %s",m),A=c(m)),A.port||(/^(http|ws)$/.test(A.protocol)?A.port="80":/^(http|ws)s$/.test(A.protocol)&&(A.port="443")),A.path=A.path||"/",A.id=A.protocol+"://"+A.host+":"+A.port,A.href=A.protocol+"://"+A.host+(h&&h.port==A.port?"":":"+A.port),A}var c=S("parseuri"),g=S("debug")("socket.io-client:url");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(S,v){function r(l){l=l||{},this.ms=l.min||100,this.max=l.max||1e4,this.factor=l.factor||2,this.jitter=l.jitter>0&&l.jitter<=1?l.jitter:0,this.attempts=0}v.exports=r,r.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),g=Math.floor(c*this.jitter*l);l=1&Math.floor(10*c)?l+g:l-g}return 0|Math.min(l,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(l){this.ms=l},r.prototype.setMax=function(l){this.max=l},r.prototype.setJitter=function(l){this.jitter=l}},{}],8:[function(S,v){var r=[].slice;v.exports=function(l,c){if(typeof c=="string"&&(c=l[c]),typeof c!="function")throw new Error("bind() requires a function");var g=r.call(arguments,2);return function(){return c.apply(l,g.concat(r.call(arguments)))}}},{}],9:[function(S,v){function r(c){return c?l(c):void 0}function l(c){for(var g in r.prototype)c[g]=r.prototype[g];return c}v.exports=r,r.prototype.on=r.prototype.addEventListener=function(c,g){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(g),this},r.prototype.once=function(c,g){function m(){d.off(c,m),g.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},m.fn=g,this.on(c,m),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(c,g){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var m=this._callbacks[c];if(!m)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,A=0;A<m.length;A++)if(d=m[A],d===g||d.fn===g){m.splice(A,1);break}return this},r.prototype.emit=function(c){this._callbacks=this._callbacks||{};var g=[].slice.call(arguments,1),m=this._callbacks[c];if(m){m=m.slice(0);for(var d=0,A=m.length;A>d;++d)m[d].apply(this,g)}return this},r.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},r.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(S,v){function r(c){return r.enabled(c)?function(g){g=l(g);var m=new Date,d=m-(r[c]||m);r[c]=m,g=c+" "+g+" +"+r.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function l(c){return c instanceof Error?c.stack||c.message:c}v.exports=r,r.names=[],r.skips=[],r.enable=function(c){try{localStorage.debug=c}catch{}for(var g=(c||"").split(/[\s,]+/),m=g.length,d=0;m>d;d++)c=g[d].replace("*",".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.substr(1)+"$")):r.names.push(new RegExp("^"+c+"$"))},r.disable=function(){r.enable("")},r.humanize=function(c){var g=1e3,m=6e4,d=60*m;return c>=d?(c/d).toFixed(1)+"h":c>=m?(c/m).toFixed(1)+"m":c>=g?(c/g|0)+"s":c+"ms"},r.enabled=function(c){for(var g=0,m=r.skips.length;m>g;g++)if(r.skips[g].test(c))return!1;for(var g=0,m=r.names.length;m>g;g++)if(r.names[g].test(c))return!0;return!1};try{window.localStorage&&r.enable(localStorage.debug)}catch{}},{}],11:[function(S,v){v.exports=S("./lib/")},{"./lib/":12}],12:[function(S,v){v.exports=S("./socket"),v.exports.parser=S("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(S,v){(function(r){function l(s,w){if(!(this instanceof l))return new l(s,w);if(w=w||{},s&&typeof s=="object"&&(w=s,s=null),s&&(s=_(s),w.host=s.host,w.secure=s.protocol=="https"||s.protocol=="wss",w.port=s.port,s.query&&(w.query=s.query)),this.secure=w.secure!=null?w.secure:r.location&&location.protocol=="https:",w.host){var k=w.host.split(":");w.hostname=k.shift(),k.length?w.port=k.pop():w.port||(w.port=this.secure?"443":"80")}this.agent=w.agent||!1,this.hostname=w.hostname||(r.location?location.hostname:"localhost"),this.port=w.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=w.query||{},typeof this.query=="string"&&(this.query=a.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(s){var w={};for(var k in s)s.hasOwnProperty(k)&&(w[k]=s[k]);return w}var g=S("./transports"),m=S("component-emitter"),d=S("debug")("engine.io-client:socket"),A=S("indexof"),h=S("engine.io-parser"),_=S("parseuri"),p=S("parsejson"),a=S("parseqs");v.exports=l,l.priorWebsocketSuccess=!1,m(l.prototype),l.protocol=h.protocol,l.Socket=l,l.Transport=S("./transport"),l.transports=S("./transports"),l.parser=S("engine.io-parser"),l.prototype.createTransport=function(s){d('creating transport "%s"',s);var w=c(this.query);w.EIO=h.protocol,w.transport=s,this.id&&(w.sid=this.id);var k=new g[s]({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 k},l.prototype.open=function(){var w;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)w="websocket";else{if(this.transports.length==0){var s=this;return void setTimeout(function(){s.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)},l.prototype.setTransport=function(s){d("setting transport %s",s.name);var w=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=s,s.on("drain",function(){w.onDrain()}).on("packet",function(k){w.onPacket(k)}).on("error",function(k){w.onError(k)}).on("close",function(){w.onClose("transport close")})},l.prototype.probe=function(s){function w(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(d('probe transport "%s" opened',s),z.send([{type:"ping",data:"probe"}]),z.once("packet",function(I){if(!D)if(I.type=="pong"&&I.data=="probe"){if(d('probe transport "%s" pong',s),M.upgrading=!0,M.emit("upgrading",z),!z)return;l.priorWebsocketSuccess=z.name=="websocket",d('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(d("changing transport and sending upgrade packet"),se(),M.setTransport(z),z.send([{type:"upgrade"}]),M.emit("upgrade",z),z=null,M.upgrading=!1,M.flush())})}else{d('probe transport "%s" failed',s);var U=new Error("probe error");U.transport=z.name,M.emit("upgradeError",U)}}))}function k(){D||(D=!0,se(),z.close(),z=null)}function T(H){var I=new Error("probe error: "+H);I.transport=z.name,k(),d('probe transport "%s" failed because of error: %s',s,H),M.emit("upgradeError",I)}function q(){T("transport closed")}function oe(){T("socket closed")}function Y(H){z&&H.name!=z.name&&(d('"%s" works - aborting "%s"',H.name,z.name),k())}function se(){z.removeListener("open",w),z.removeListener("error",T),z.removeListener("close",q),M.removeListener("close",oe),M.removeListener("upgrading",Y)}d('probing transport "%s"',s);var z=this.createTransport(s,{probe:1}),D=!1,M=this;l.priorWebsocketSuccess=!1,z.once("open",w),z.once("error",T),z.once("close",q),this.once("close",oe),this.once("upgrading",Y),z.open()},l.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",l.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var s=0,w=this.upgrades.length;w>s;s++)this.probe(this.upgrades[s])}},l.prototype.onPacket=function(s){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',s.type,s.data),this.emit("packet",s),this.emit("heartbeat"),s.type){case"open":this.onHandshake(p(s.data));break;case"pong":this.setPing();break;case"error":var w=new Error("server error");w.code=s.data,this.emit("error",w);break;case"message":this.emit("data",s.data),this.emit("message",s.data)}else d('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(s){this.emit("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this.upgrades=this.filterUpgrades(s.upgrades),this.pingInterval=s.pingInterval,this.pingTimeout=s.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(s){clearTimeout(this.pingTimeoutTimer);var w=this;w.pingTimeoutTimer=setTimeout(function(){w.readyState!="closed"&&w.onClose("ping timeout")},s||w.pingInterval+w.pingTimeout)},l.prototype.setPing=function(){var s=this;clearTimeout(s.pingIntervalTimer),s.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",s.pingTimeout),s.ping(),s.onHeartbeat(s.pingTimeout)},s.pingInterval)},l.prototype.ping=function(){this.sendPacket("ping")},l.prototype.onDrain=function(){for(var s=0;s<this.prevBufferLen;s++)this.callbackBuffer[s]&&this.callbackBuffer[s]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},l.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"))},l.prototype.write=l.prototype.send=function(s,w){return this.sendPacket("message",s,w),this},l.prototype.sendPacket=function(s,w,k){if(this.readyState!="closing"&&this.readyState!="closed"){var T={type:s,data:w};this.emit("packetCreate",T),this.writeBuffer.push(T),this.callbackBuffer.push(k),this.flush()}},l.prototype.close=function(){function s(){T.onClose("forced close"),d("socket closing - telling transport to close"),T.transport.close()}function w(){T.removeListener("upgrade",w),T.removeListener("upgradeError",w),s()}function k(){T.once("upgrade",w),T.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var T=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?k():s()}):this.upgrading?k():s()}return this},l.prototype.onError=function(s){d("socket error %j",s),l.priorWebsocketSuccess=!1,this.emit("error",s),this.onClose("transport error",s)},l.prototype.onClose=function(s,w){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',s);var k=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){k.writeBuffer=[],k.callbackBuffer=[],k.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",s,w)}},l.prototype.filterUpgrades=function(s){for(var w=[],k=0,T=s.length;T>k;k++)~A(this.transports,s[k])&&w.push(s[k]);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(S,v){function r(g){this.path=g.path,this.hostname=g.hostname,this.port=g.port,this.secure=g.secure,this.query=g.query,this.timestampParam=g.timestampParam,this.timestampRequests=g.timestampRequests,this.readyState="",this.agent=g.agent||!1,this.socket=g.socket,this.enablesXDR=g.enablesXDR,this.pfx=g.pfx,this.key=g.key,this.passphrase=g.passphrase,this.cert=g.cert,this.ca=g.ca,this.ciphers=g.ciphers,this.rejectUnauthorized=g.rejectUnauthorized}var l=S("engine.io-parser"),c=S("component-emitter");v.exports=r,c(r.prototype),r.timestamps=0,r.prototype.onError=function(g,m){var d=new Error(g);return d.type="TransportError",d.description=m,this.emit("error",d),this},r.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(g){if(this.readyState!="open")throw new Error("Transport not open");this.write(g)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(g){var m=l.decodePacket(g,this.socket.binaryType);this.onPacket(m)},r.prototype.onPacket=function(g){this.emit("packet",g)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(S,v,r){(function(l){function c(h){var _,p=!1,a=!1,s=h.jsonp!==!1;if(l.location){var w=location.protocol=="https:",k=location.port;k||(k=w?443:80),p=h.hostname!=location.hostname||k!=h.port,a=h.secure!=w}if(h.xdomain=p,h.xscheme=a,_=new g(h),"open"in _&&!h.forceJSONP)return new m(h);if(!s)throw new Error("JSONP disabled");return new d(h)}var g=S("xmlhttprequest"),m=S("./polling-xhr"),d=S("./polling-jsonp"),A=S("./websocket");r.polling=c,r.websocket=A}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(S,v){(function(r){function l(){}function c(_){g.call(this,_),this.query=this.query||{},d||(r.___eio||(r.___eio=[]),d=r.___eio),this.index=d.length;var p=this;d.push(function(a){p.onData(a)}),this.query.j=this.index,r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){p.script&&(p.script.onerror=l)},!1)}var g=S("./polling"),m=S("component-inherit");v.exports=c;var d,A=/\n/g,h=/\\n/g;m(c,g),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),g.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,p=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),p.async=!0,p.src=this.uri(),p.onerror=function(w){_.onError("jsonp poll error",w)};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(p,a),this.script=p;var s=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);s&&setTimeout(function(){var w=document.createElement("iframe");document.body.appendChild(w),document.body.removeChild(w)},100)},c.prototype.doWrite=function(_,p){function a(){s(),p()}function s(){if(w.iframe)try{w.form.removeChild(w.iframe)}catch(se){w.onError("jsonp polling iframe removal error",se)}try{var Y='<iframe src="javascript:0" name="'+w.iframeId+'">';k=document.createElement(Y)}catch{k=document.createElement("iframe"),k.name=w.iframeId,k.src="javascript:0"}k.id=w.iframeId,w.form.appendChild(k),w.iframe=k}var w=this;if(!this.form){var k,T=document.createElement("form"),q=document.createElement("textarea"),oe=this.iframeId="eio_iframe_"+this.index;T.className="socketio",T.style.position="absolute",T.style.top="-1000px",T.style.left="-1000px",T.target=oe,T.method="POST",T.setAttribute("accept-charset","utf-8"),q.name="d",T.appendChild(q),document.body.appendChild(T),this.form=T,this.area=q}this.form.action=this.uri(),s(),_=_.replace(h,`\\
33
+ `),this.area.value=_.replace(A,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){w.iframe.readyState=="complete"&&a()}:this.iframe.onload=a}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(S,v){(function(r){function l(){}function c(a){if(A.call(this,a),r.location){var s=location.protocol=="https:",w=location.port;w||(w=s?443:80),this.xd=a.hostname!=r.location.hostname||w!=a.port,this.xs=a.secure!=s}}function g(a){this.method=a.method||"GET",this.uri=a.uri,this.xd=!!a.xd,this.xs=!!a.xs,this.async=a.async!==!1,this.data=a.data!=null?a.data:null,this.agent=a.agent,this.isBinary=a.isBinary,this.supportsBinary=a.supportsBinary,this.enablesXDR=a.enablesXDR,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.create()}function m(){for(var a in g.requests)g.requests.hasOwnProperty(a)&&g.requests[a].abort()}var d=S("xmlhttprequest"),A=S("./polling"),h=S("component-emitter"),_=S("component-inherit"),p=S("debug")("engine.io-client:polling-xhr");v.exports=c,v.exports.Request=g,_(c,A),c.prototype.supportsBinary=!0,c.prototype.request=function(a){return a=a||{},a.uri=this.uri(),a.xd=this.xd,a.xs=this.xs,a.agent=this.agent||!1,a.supportsBinary=this.supportsBinary,a.enablesXDR=this.enablesXDR,a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized,new g(a)},c.prototype.doWrite=function(a,s){var w=typeof a!="string"&&a!==void 0,k=this.request({method:"POST",data:a,isBinary:w}),T=this;k.on("success",s),k.on("error",function(q){T.onError("xhr post error",q)}),this.sendXhr=k},c.prototype.doPoll=function(){p("xhr poll");var a=this.request(),s=this;a.on("data",function(w){s.onData(w)}),a.on("error",function(w){s.onError("xhr poll error",w)}),this.pollXhr=a},h(g.prototype),g.prototype.create=function(){var a={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized;var s=this.xhr=new d(a),w=this;try{if(p("xhr open %s: %s",this.method,this.uri),s.open(this.method,this.uri,this.async),this.supportsBinary&&(s.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?s.setRequestHeader("Content-type","application/octet-stream"):s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in s&&(s.withCredentials=!0),this.hasXDR()?(s.onload=function(){w.onLoad()},s.onerror=function(){w.onError(s.responseText)}):s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==1223?w.onLoad():setTimeout(function(){w.onError(s.status)},0))},p("xhr data %s",this.data),s.send(this.data)}catch(k){return void setTimeout(function(){w.onError(k)},0)}r.document&&(this.index=g.requestsCount++,g.requests[this.index]=this)},g.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},g.prototype.onData=function(a){this.emit("data",a),this.onSuccess()},g.prototype.onError=function(a){this.emit("error",a),this.cleanup(!0)},g.prototype.cleanup=function(a){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,a)try{this.xhr.abort()}catch{}r.document&&delete g.requests[this.index],this.xhr=null}},g.prototype.onLoad=function(){var a;try{var s;try{s=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}a=s==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(w){this.onError(w)}a!=null&&this.onData(a)},g.prototype.hasXDR=function(){return typeof r.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},g.prototype.abort=function(){this.cleanup()},r.document&&(g.requestsCount=0,g.requests={},r.attachEvent?r.attachEvent("onunload",m):r.addEventListener&&r.addEventListener("beforeunload",m,!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(S,v){function r(h){var _=h&&h.forceBase64;(!A||_)&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("parseqs"),g=S("engine.io-parser"),m=S("component-inherit"),d=S("debug")("engine.io-client:polling");v.exports=r;var A=function(){var h=S("xmlhttprequest"),_=new h({xdomain:!1});return _.responseType!=null}();m(r,l),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(h){function _(){d("paused"),p.readyState="paused",h()}var p=this;if(this.readyState="pausing",this.polling||!this.writable){var a=0;this.polling&&(d("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){d("pre-pause polling complete"),--a||_()})),this.writable||(d("we are currently writing - waiting to pause"),a++,this.once("drain",function(){d("pre-pause writing complete"),--a||_()}))}else _()},r.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(h){var _=this;d("polling got data %s",h);var p=function(a){return _.readyState=="opening"&&_.onOpen(),a.type=="close"?(_.onClose(),!1):void _.onPacket(a)};g.decodePayload(h,this.socket.binaryType,p),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function h(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),h()):(d("transport not open - deferring close"),this.once("open",h))},r.prototype.write=function(h){var p=this;this.writable=!1;var _=function(){p.writable=!0,p.emit("drain")},p=this;g.encodePayload(h,this.supportsBinary,function(a){p.doWrite(a,_)})},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"https":"http",p="";return this.timestampRequests!==!1&&(h[this.timestampParam]=+new Date+"-"+l.timestamps++),this.supportsBinary||h.sid||(h.b64=1),h=c.encode(h),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(p=":"+this.port),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(S,v){function r(h){var _=h&&h.forceBase64;_&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("engine.io-parser"),g=S("parseqs"),m=S("component-inherit"),d=S("debug")("engine.io-client:websocket"),A=S("ws");v.exports=r,m(r,l),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var h=this.uri(),_=void 0,p={agent:this.agent};p.pfx=this.pfx,p.key=this.key,p.passphrase=this.passphrase,p.cert=this.cert,p.ca=this.ca,p.ciphers=this.ciphers,p.rejectUnauthorized=this.rejectUnauthorized,this.ws=new A(h,_,p),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var h=this;this.ws.onopen=function(){h.onOpen()},this.ws.onclose=function(){h.onClose()},this.ws.onmessage=function(_){h.onData(_.data)},this.ws.onerror=function(_){h.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(h){var _=this;setTimeout(function(){l.prototype.onData.call(_,h)},0)}),r.prototype.write=function(h){function _(){p.writable=!0,p.emit("drain")}var p=this;this.writable=!1;for(var a=0,s=h.length;s>a;a++)c.encodePacket(h[a],this.supportsBinary,function(w){try{p.ws.send(w)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},r.prototype.onClose=function(){l.prototype.onClose.call(this)},r.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"wss":"ws",p="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(p=":"+this.port),this.timestampRequests&&(h[this.timestampParam]=+new Date),this.supportsBinary||(h.b64=1),h=g.encode(h),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h},r.prototype.check=function(){return!(!A||"__initialize"in A&&this.name===r.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(S,v){var r=S("has-cors");v.exports=function(l){var c=l.xdomain,g=l.xscheme,m=l.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||r))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!g&&m)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(S,v){v.exports=function(r,l){var c=function(){};c.prototype=l.prototype,r.prototype=new c,r.prototype.constructor=r}},{}],22:[function(S,v,r){function l(){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 A=arguments,h=this.useColors;if(A[0]=(h?"%c":"")+this.namespace+(h?" %c":" ")+A[0]+(h?"%c ":" ")+"+"+r.humanize(this.diff),!h)return A;var _="color: "+this.color;A=[A[0],_,"color: inherit"].concat(Array.prototype.slice.call(A,1));var p=0,a=0;return A[0].replace(/%[a-z%]/g,function(s){s!=="%%"&&(p++,s==="%c"&&(a=p))}),A.splice(a,0,_),A}function g(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function m(A){try{A==null?localStorage.removeItem("debug"):localStorage.debug=A}catch{}}function d(){var A;try{A=localStorage.debug}catch{}return A}r=v.exports=S("./debug"),r.log=g,r.formatArgs=c,r.save=m,r.load=d,r.useColors=l,r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(A){return JSON.stringify(A)},r.enable(d())},{"./debug":23}],23:[function(S,v,r){function l(){return r.colors[_++%r.colors.length]}function c(p){function a(){}function s(){var k=s,T=+new Date,q=T-(h||T);k.diff=q,k.prev=h,k.curr=T,h=T,k.useColors==null&&(k.useColors=r.useColors()),k.color==null&&k.useColors&&(k.color=l());var oe=Array.prototype.slice.call(arguments);oe[0]=r.coerce(oe[0]),typeof oe[0]!="string"&&(oe=["%o"].concat(oe));var Y=0;oe[0]=oe[0].replace(/%([a-z%])/g,function(z,D){if(z==="%%")return z;Y++;var M=r.formatters[D];if(typeof M=="function"){var H=oe[Y];z=M.call(k,H),oe.splice(Y,1),Y--}return z}),typeof r.formatArgs=="function"&&(oe=r.formatArgs.apply(k,oe));var se=s.log||r.log||console.log.bind(console);se.apply(k,oe)}a.enabled=!1,s.enabled=!0;var w=r.enabled(p)?s:a;return w.namespace=p,w}function g(p){r.save(p);for(var a=(p||"").split(/[\s,]+/),s=a.length,w=0;s>w;w++)a[w]&&(p=a[w].replace(/\*/g,".*?"),p[0]==="-"?r.skips.push(new RegExp("^"+p.substr(1)+"$")):r.names.push(new RegExp("^"+p+"$")))}function m(){r.enable("")}function d(p){var a,s;for(a=0,s=r.skips.length;s>a;a++)if(r.skips[a].test(p))return!1;for(a=0,s=r.names.length;s>a;a++)if(r.names[a].test(p))return!0;return!1}function A(p){return p instanceof Error?p.stack||p.message:p}r=v.exports=c,r.coerce=A,r.disable=m,r.enable=g,r.enabled=d,r.humanize=S("ms"),r.names=[],r.skips=[],r.formatters={};var h,_=0},{ms:24}],24:[function(S,v){function r(p){var a=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(p);if(a){var s=parseFloat(a[1]),w=(a[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"y":return s*_;case"days":case"day":case"d":return s*h;case"hours":case"hour":case"h":return s*A;case"minutes":case"minute":case"m":return s*d;case"seconds":case"second":case"s":return s*m;case"ms":return s}}}function l(p){return p>=h?Math.round(p/h)+"d":p>=A?Math.round(p/A)+"h":p>=d?Math.round(p/d)+"m":p>=m?Math.round(p/m)+"s":p+"ms"}function c(p){return g(p,h,"day")||g(p,A,"hour")||g(p,d,"minute")||g(p,m,"second")||p+" ms"}function g(p,a,s){return a>p?void 0:1.5*a>p?Math.floor(p/a)+" "+s:Math.ceil(p/a)+" "+s+"s"}var m=1e3,d=60*m,A=60*d,h=24*A,_=365.25*h;v.exports=function(p,a){return a=a||{},typeof p=="string"?r(p):a.long?c(p):l(p)}},{}],25:[function(S,v,r){(function(l){function c(D,M){var H="b"+r.packets[D.type]+D.data.data;return M(H)}function g(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var I=D.data,U=new Uint8Array(I),X=new Uint8Array(1+I.byteLength);X[0]=oe[D.type];for(var j=0;j<U.length;j++)X[j+1]=U[j];return H(X.buffer)}function m(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var I=new FileReader;return I.onload=function(){D.data=I.result,r.encodePacket(D,M,!0,H)},I.readAsArrayBuffer(D.data)}function d(D,M,H){if(!M)return r.encodeBase64Packet(D,H);if(q)return m(D,M,H);var I=new Uint8Array(1);I[0]=oe[D.type];var U=new z([I.buffer,D.data]);return H(U)}function A(D,M,H){for(var I=new Array(D.length),U=s(D.length,H),X=function(V,B,be){M(B,function(Ae,Te){I[V]=Te,be(Ae,I)})},j=0;j<D.length;j++)X(j,D[j],U)}var h=S("./keys"),_=S("has-binary"),p=S("arraybuffer.slice"),a=S("base64-arraybuffer"),s=S("after"),w=S("utf8"),k=navigator.userAgent.match(/Android/i),T=/PhantomJS/i.test(navigator.userAgent),q=k||T;r.protocol=3;var oe=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},Y=h(oe),se={type:"error",data:"parser error"},z=S("blob");r.encodePacket=function(D,M,H,I){typeof M=="function"&&(I=M,M=!1),typeof H=="function"&&(I=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(l.ArrayBuffer&&U instanceof ArrayBuffer)return g(D,M,I);if(z&&U instanceof l.Blob)return d(D,M,I);if(U&&U.base64)return c(D,I);var X=oe[D.type];return D.data!==void 0&&(X+=H?w.encode(String(D.data)):String(D.data)),I(""+X)},r.encodeBase64Packet=function(D,M){var H="b"+r.packets[D.type];if(z&&D.data instanceof z){var I=new FileReader;return I.onload=function(){var B=I.result.split(",")[1];M(H+B)},I.readAsDataURL(D.data)}var U;try{U=String.fromCharCode.apply(null,new Uint8Array(D.data))}catch{for(var X=new Uint8Array(D.data),j=new Array(X.length),V=0;V<X.length;V++)j[V]=X[V];U=String.fromCharCode.apply(null,j)}return H+=l.btoa(U),M(H)},r.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return r.decodeBase64Packet(D.substr(1),M);if(H)try{D=w.decode(D)}catch{return se}var U=D.charAt(0);return Number(U)==U&&Y[U]?D.length>1?{type:Y[U],data:D.substring(1)}:{type:Y[U]}:se}var I=new Uint8Array(D),U=I[0],X=p(D,1);return z&&M==="blob"&&(X=new z([X])),{type:Y[U],data:X}},r.decodeBase64Packet=function(D,M){var H=Y[D.charAt(0)];if(!l.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var I=a.decode(D.substr(1));return M==="blob"&&z&&(I=new z([I])),{type:H,data:I}},r.encodePayload=function(D,M,H){function I(j){return j.length+":"+j}function U(j,V){r.encodePacket(j,X?M:!1,!0,function(B){V(null,I(B))})}typeof M=="function"&&(H=M,M=null);var X=_(D);return M&&X?z&&!q?r.encodePayloadAsBlob(D,H):r.encodePayloadAsArrayBuffer(D,H):D.length?void A(D,U,function(j,V){return H(V.join(""))}):H("0:")},r.decodePayload=function(D,M,H){if(typeof D!="string")return r.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var I;if(D=="")return H(se,0,1);for(var U,X,j="",V=0,B=D.length;B>V;V++){var be=D.charAt(V);if(be!=":")j+=be;else{if(j==""||j!=(U=Number(j))||(X=D.substr(V+1,U),j!=X.length))return H(se,0,1);if(X.length){if(I=r.decodePacket(X,M,!0),se.type==I.type&&se.data==I.data)return H(se,0,1);var Ae=H(I,V+U,B);if(Ae===!1)return}V+=U,j=""}}return j!=""?H(se,0,1):void 0},r.encodePayloadAsArrayBuffer=function(D,M){function H(I,U){r.encodePacket(I,!0,!0,function(X){return U(null,X)})}return D.length?void A(D,H,function(I,U){var X=U.reduce(function(B,be){var Ae;return Ae=typeof be=="string"?be.length:be.byteLength,B+Ae.toString().length+Ae+2},0),j=new Uint8Array(X),V=0;return U.forEach(function(B){var be=typeof B=="string",Ae=B;if(be){for(var Te=new Uint8Array(B.length),ue=0;ue<B.length;ue++)Te[ue]=B.charCodeAt(ue);Ae=Te.buffer}j[V++]=be?0:1;for(var qe=Ae.byteLength.toString(),ue=0;ue<qe.length;ue++)j[V++]=parseInt(qe[ue]);j[V++]=255;for(var Te=new Uint8Array(Ae),ue=0;ue<Te.length;ue++)j[V++]=Te[ue]}),M(j.buffer)}):M(new ArrayBuffer(0))},r.encodePayloadAsBlob=function(D,M){function H(I,U){r.encodePacket(I,!0,!0,function(X){var j=new Uint8Array(1);if(j[0]=1,typeof X=="string"){for(var V=new Uint8Array(X.length),B=0;B<X.length;B++)V[B]=X.charCodeAt(B);X=V.buffer,j[0]=0}for(var be=X instanceof ArrayBuffer?X.byteLength:X.size,Ae=be.toString(),Te=new Uint8Array(Ae.length+1),B=0;B<Ae.length;B++)Te[B]=parseInt(Ae[B]);if(Te[Ae.length]=255,z){var ue=new z([j.buffer,Te.buffer,X]);U(null,ue)}})}A(D,H,function(I,U){return M(new z(U))})},r.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=M,M=null);for(var I=D,U=[],X=!1;I.byteLength>0;){for(var j=new Uint8Array(I),V=j[0]===0,B="",be=1;j[be]!=255;be++){if(B.length>310){X=!0;break}B+=j[be]}if(X)return H(se,0,1);I=p(I,2+B.length),B=parseInt(B);var Ae=p(I,0,B);if(V)try{Ae=String.fromCharCode.apply(null,new Uint8Array(Ae))}catch{var Te=new Uint8Array(Ae);Ae="";for(var be=0;be<Te.length;be++)Ae+=String.fromCharCode(Te[be])}U.push(Ae),I=p(I,B)}var ue=U.length;U.forEach(function(qe,bt){H(r.decodePacket(qe,M,!0),bt,ue)})}}).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(S,v){v.exports=Object.keys||function(r){var l=[],c=Object.prototype.hasOwnProperty;for(var g in r)c.call(r,g)&&l.push(g);return l}},{}],27:[function(S,v){function r(c,g,m){function d(h,_){if(d.count<=0)throw new Error("after called too many times");--d.count,h?(A=!0,g(h),g=m):d.count!==0||A||g(null,_)}var A=!1;return m=m||l,d.count=c,c===0?g():d}function l(){}v.exports=r},{}],28:[function(S,v){v.exports=function(r,l,c){var g=r.byteLength;if(l=l||0,c=c||g,r.slice)return r.slice(l,c);if(0>l&&(l+=g),0>c&&(c+=g),c>g&&(c=g),l>=g||l>=c||g===0)return new ArrayBuffer(0);for(var m=new Uint8Array(r),d=new Uint8Array(c-l),A=l,h=0;c>A;A++,h++)d[h]=m[A];return d.buffer}},{}],29:[function(S,v,r){(function(l){r.encode=function(c){var g,m=new Uint8Array(c),d=m.length,A="";for(g=0;d>g;g+=3)A+=l[m[g]>>2],A+=l[(3&m[g])<<4|m[g+1]>>4],A+=l[(15&m[g+1])<<2|m[g+2]>>6],A+=l[63&m[g+2]];return d%3===2?A=A.substring(0,A.length-1)+"=":d%3===1&&(A=A.substring(0,A.length-2)+"=="),A},r.decode=function(c){var g,m,d,A,h,_=.75*c.length,p=c.length,a=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var s=new ArrayBuffer(_),w=new Uint8Array(s);for(g=0;p>g;g+=4)m=l.indexOf(c[g]),d=l.indexOf(c[g+1]),A=l.indexOf(c[g+2]),h=l.indexOf(c[g+3]),w[a++]=m<<2|d>>4,w[a++]=(15&d)<<4|A>>2,w[a++]=(3&A)<<6|63&h;return s}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(S,v){(function(r){function l(_){for(var p=0;p<_.length;p++){var a=_[p];if(a.buffer instanceof ArrayBuffer){var s=a.buffer;if(a.byteLength!==s.byteLength){var w=new Uint8Array(a.byteLength);w.set(new Uint8Array(s,a.byteOffset,a.byteLength)),s=w.buffer}_[p]=s}}}function c(_,p){p=p||{};var a=new m;l(_);for(var s=0;s<_.length;s++)a.append(_[s]);return p.type?a.getBlob(p.type):a.getBlob()}function g(_,p){return l(_),new Blob(_,p||{})}var m=r.BlobBuilder||r.WebKitBlobBuilder||r.MSBlobBuilder||r.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),A=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),h=m&&m.prototype.append&&m.prototype.getBlob;v.exports=function(){return d?A?r.Blob:g:h?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(S,v,r){(function(l){(function(c){function g(I){for(var U,X,j=[],V=0,B=I.length;B>V;)U=I.charCodeAt(V++),U>=55296&&56319>=U&&B>V?(X=I.charCodeAt(V++),(64512&X)==56320?j.push(((1023&U)<<10)+(1023&X)+65536):(j.push(U),V--)):j.push(U);return j}function m(I){for(var U,X=I.length,j=-1,V="";++j<X;)U=I[j],U>65535&&(U-=65536,V+=se(U>>>10&1023|55296),U=56320|1023&U),V+=se(U);return V}function d(I){if(I>=55296&&57343>=I)throw Error("Lone surrogate U+"+I.toString(16).toUpperCase()+" is not a scalar value")}function A(I,U){return se(I>>U&63|128)}function h(I){if(!(4294967168&I))return se(I);var U="";return 4294965248&I?4294901760&I?!(4292870144&I)&&(U=se(I>>18&7|240),U+=A(I,12),U+=A(I,6)):(d(I),U=se(I>>12&15|224),U+=A(I,6)):U=se(I>>6&31|192),U+=se(63&I|128)}function _(I){for(var U,X=g(I),j=X.length,V=-1,B="";++V<j;)U=X[V],B+=h(U);return B}function p(){if(Y>=oe)throw Error("Invalid byte index");var I=255&q[Y];if(Y++,(192&I)==128)return 63&I;throw Error("Invalid continuation byte")}function a(){var I,U,X,j,V;if(Y>oe)throw Error("Invalid byte index");if(Y==oe)return!1;if(I=255&q[Y],Y++,(128&I)==0)return I;if((224&I)==192){var U=p();if(V=(31&I)<<6|U,V>=128)return V;throw Error("Invalid continuation byte")}if((240&I)==224){if(U=p(),X=p(),V=(15&I)<<12|U<<6|X,V>=2048)return d(V),V;throw Error("Invalid continuation byte")}if((248&I)==240&&(U=p(),X=p(),j=p(),V=(15&I)<<18|U<<12|X<<6|j,V>=65536&&1114111>=V))return V;throw Error("Invalid UTF-8 detected")}function s(I){q=g(I),oe=q.length,Y=0;for(var U,X=[];(U=a())!==!1;)X.push(U);return m(X)}var w=typeof r=="object"&&r,k=typeof v=="object"&&v&&v.exports==w&&v,T=typeof l=="object"&&l;(T.global===T||T.window===T)&&(c=T);var q,oe,Y,se=String.fromCharCode,z={version:"2.0.0",encode:_,decode:s};if(w&&!w.nodeType)if(k)k.exports=z;else{var D={},M=D.hasOwnProperty;for(var H in z)M.call(z,H)&&(w[H]=z[H])}else c.utf8=z})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(S,v){(function(r){var l=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,A=/\s+$/;v.exports=function(h){return typeof h=="string"&&h?(h=h.replace(d,"").replace(A,""),r.JSON&&JSON.parse?JSON.parse(h):l.test(h.replace(c,"@").replace(g,"]").replace(m,""))?new Function("return "+h)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(S,v,r){r.encode=function(l){var c="";for(var g in l)l.hasOwnProperty(g)&&(c.length&&(c+="&"),c+=encodeURIComponent(g)+"="+encodeURIComponent(l[g]));return c},r.decode=function(l){for(var c={},g=l.split("&"),m=0,d=g.length;d>m;m++){var A=g[m].split("=");c[decodeURIComponent(A[0])]=decodeURIComponent(A[1])}return c}},{}],34:[function(S,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){var g=c,m=c.indexOf("["),d=c.indexOf("]");m!=-1&&d!=-1&&(c=c.substring(0,m)+c.substring(m,d).replace(/:/g,";")+c.substring(d,c.length));for(var A=r.exec(c||""),h={},_=14;_--;)h[l[_]]=A[_]||"";return m!=-1&&d!=-1&&(h.source=g,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h}},{}],35:[function(S,v){function r(g,m){return m?new c(g,m):new c(g)}var l=function(){return self}(),c=l.WebSocket||l.MozWebSocket;v.exports=c?r:null,c&&(r.prototype=c.prototype)},{}],36:[function(S,v){(function(r){function l(g){function m(d){if(!d)return!1;if(r.Buffer&&r.Buffer.isBuffer(d)||r.ArrayBuffer&&d instanceof ArrayBuffer||r.Blob&&d instanceof Blob||r.File&&d instanceof File)return!0;if(c(d)){for(var A=0;A<d.length;A++)if(m(d[A]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var h in d)if(Object.prototype.hasOwnProperty.call(d,h)&&m(d[h]))return!0}return!1}return m(g)}var c=S("isarray");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(S,v){v.exports=Array.isArray||function(r){return Object.prototype.toString.call(r)=="[object Array]"}},{}],38:[function(S,v){var r=S("global");try{v.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch{v.exports=!1}},{global:39}],39:[function(S,v){v.exports=function(){return this}()},{}],40:[function(S,v){var r=[].indexOf;v.exports=function(l,c){if(r)return l.indexOf(c);for(var g=0;g<l.length;++g)if(l[g]===c)return g;return-1}},{}],41:[function(S,v,r){var l=Object.prototype.hasOwnProperty;r.keys=Object.keys||function(c){var g=[];for(var m in c)l.call(c,m)&&g.push(m);return g},r.values=function(c){var g=[];for(var m in c)l.call(c,m)&&g.push(c[m]);return g},r.merge=function(c,g){for(var m in g)l.call(g,m)&&(c[m]=g[m]);return c},r.length=function(c){return r.keys(c).length},r.isEmpty=function(c){return r.length(c)==0}},{}],42:[function(S,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){for(var g=r.exec(c||""),m={},d=14;d--;)m[l[d]]=g[d]||"";return m}},{}],43:[function(S,v,r){(function(l){var c=S("isarray"),g=S("./is-buffer");r.deconstructPacket=function(m){function d(p){if(!p)return p;if(g(p)){var a={_placeholder:!0,num:A.length};return A.push(p),a}if(c(p)){for(var s=new Array(p.length),w=0;w<p.length;w++)s[w]=d(p[w]);return s}if(typeof p=="object"&&!(p instanceof Date)){var s={};for(var k in p)s[k]=d(p[k]);return s}return p}var A=[],h=m.data,_=m;return _.data=d(h),_.attachments=A.length,{packet:_,buffers:A}},r.reconstructPacket=function(m,d){function A(h){if(h&&h._placeholder){var _=d[h.num];return _}if(c(h)){for(var p=0;p<h.length;p++)h[p]=A(h[p]);return h}if(h&&typeof h=="object"){for(var a in h)h[a]=A(h[a]);return h}return h}return m.data=A(m.data),m.attachments=void 0,m},r.removeBlobs=function(m,d){function A(p,a,s){if(!p)return p;if(l.Blob&&p instanceof Blob||l.File&&p instanceof File){h++;var w=new FileReader;w.onload=function(){s?s[a]=this.result:_=this.result,--h||d(_)},w.readAsArrayBuffer(p)}else if(c(p))for(var k=0;k<p.length;k++)A(p[k],k,p);else if(p&&typeof p=="object"&&!g(p))for(var T in p)A(p[T],T,p)}var h=0,_=m;A(_),h||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(S,v,r){function l(){}function c(k){var T="",q=!1;return T+=k.type,(r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)&&(T+=k.attachments,T+="-"),k.nsp&&k.nsp!="/"&&(q=!0,T+=k.nsp),k.id!=null&&(q&&(T+=",",q=!1),T+=k.id),k.data!=null&&(q&&(T+=","),T+=p.stringify(k.data)),_("encoded %j as %s",k,T),T}function g(k,T){function q(oe){var Y=s.deconstructPacket(oe),se=c(Y.packet),z=Y.buffers;z.unshift(se),T(z)}s.removeBlobs(k,q)}function m(){this.reconstructor=null}function d(k){var T={},q=0;if(T.type=Number(k.charAt(0)),r.types[T.type]==null)return h();if(r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type){for(var oe="";k.charAt(++q)!="-"&&(oe+=k.charAt(q),q!=k.length););if(oe!=Number(oe)||k.charAt(q)!="-")throw new Error("Illegal attachments");T.attachments=Number(oe)}if(k.charAt(q+1)=="/")for(T.nsp="";++q;){var Y=k.charAt(q);if(Y==","||(T.nsp+=Y,q==k.length))break}else T.nsp="/";var se=k.charAt(q+1);if(se!==""&&Number(se)==se){for(T.id="";++q;){var Y=k.charAt(q);if(Y==null||Number(Y)!=Y){--q;break}if(T.id+=k.charAt(q),q==k.length)break}T.id=Number(T.id)}if(k.charAt(++q))try{T.data=p.parse(k.substr(q))}catch{return h()}return _("decoded %s as %j",k,T),T}function A(k){this.reconPack=k,this.buffers=[]}function h(){return{type:r.ERROR,data:"parser error"}}var _=S("debug")("socket.io-parser"),p=S("json3"),a=(S("isarray"),S("component-emitter")),s=S("./binary"),w=S("./is-buffer");r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],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=l,r.Decoder=m,l.prototype.encode=function(k,T){if(_("encoding packet %j",k),r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)g(k,T);else{var q=c(k);T([q])}},a(m.prototype),m.prototype.add=function(k){var T;if(typeof k=="string")T=d(k),r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type?(this.reconstructor=new A(T),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",T)):this.emit("decoded",T);else{if(!w(k)&&!k.base64)throw new Error("Unknown type: "+k);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");T=this.reconstructor.takeBinaryData(k),T&&(this.reconstructor=null,this.emit("decoded",T))}},m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},A.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length==this.reconPack.attachments){var T=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),T}return null},A.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(S,v){(function(r){function l(c){return r.Buffer&&r.Buffer.isBuffer(c)||r.ArrayBuffer&&c instanceof ArrayBuffer}v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(S,v){v.exports=S(37)},{}],47:[function(S,v,r){(function(l){function c(W){if(c[W]!==d)return c[W];var J;if(W=="bug-string-char-index")J=!1;else if(W=="json")J=c("json-stringify")&&c("json-parse");else{var F,te='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(W=="json-stringify"){var P=_.stringify,Q=typeof P=="function"&&p;if(Q){(F=function(){return 1}).toJSON=F;try{Q=P(0)==="0"&&P(new Number)==="0"&&P(new String)=='""'&&P(A)===d&&P(d)===d&&P()===d&&P(F)==="1"&&P([F])=="[1]"&&P([d])=="[null]"&&P(null)=="null"&&P([d,A,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
34
34
  \f\r `]})==te&&P(null,F)==="1"&&P([1,2],null,1)==`[
35
35
  1,
36
36
  2
37
- ]`&&P(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&P(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&P(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&P(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{Q=!1}}J=Q}if(W=="json-parse"){var ee=_.parse;if(typeof ee=="function")try{if(ee("0")===0&&!ee(!1)){F=ee(te);var $=F.a.length==5&&F.a[0]===1;if($){try{$=!ee('" "')}catch{}if($)try{$=ee("01")!==1}catch{}if($)try{$=ee("1.")!==1}catch{}}}}catch{$=!1}J=$}}return c[W]=!!J}var g,m,d,x={}.toString,h=typeof JSON=="object"&&JSON,_=typeof r=="object"&&r&&!r.nodeType&&r;_&&h?(_.stringify=h.stringify,_.parse=h.parse):_=l.JSON=h||{};var p=new Date(-0xc782b5b800cec);try{p=p.getUTCFullYear()==-109252&&p.getUTCMonth()===0&&p.getUTCDate()===1&&p.getUTCHours()==10&&p.getUTCMinutes()==37&&p.getUTCSeconds()==6&&p.getUTCMilliseconds()==708}catch{}if(!c("json")){var u="[object Function]",s="[object Date]",w="[object Number]",k="[object String]",E="[object Array]",q="[object Boolean]",oe=c("bug-string-char-index");if(!p)var Y=Math.floor,se=[0,31,59,90,120,151,181,212,243,273,304,334],G=function(W,J){return se[J]+365*(W-1970)+Y((W-1969+(J=+(J>1)))/4)-Y((W-1901+J)/100)+Y((W-1601+J)/400)};(g={}.hasOwnProperty)||(g=function(W){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=x?g=function(te){var P=this.__proto__,Q=te in(this.__proto__=null,this);return this.__proto__=P,Q}:(J=F.constructor,g=function(te){var P=(this.constructor||J).prototype;return te in this&&!(te in P&&this[te]===P[te])}),F=null,g.call(this,W)});var D={boolean:1,number:1,string:1,undefined:1},M=function(W,J){var F=typeof W[J];return F=="object"?!!W[J]:!D[F]};if(m=function(W,J){var F,te,P,Q=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,te=new F;for(P in te)g.call(te,P)&&Q++;return F=te=null,Q?m=Q==2?function(ee,$){var ue,me={},qe=x.call(ee)==u;for(ue in ee)qe&&ue=="prototype"||g.call(me,ue)||!(me[ue]=1)||!g.call(ee,ue)||$(ue)}:function(ee,$){var ue,me,qe=x.call(ee)==u;for(ue in ee)qe&&ue=="prototype"||!g.call(ee,ue)||(me=ue==="constructor")||$(ue);(me||g.call(ee,ue="constructor"))&&$(ue)}:(te=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(ee,$){var ue,me,qe=x.call(ee)==u,Re=!qe&&typeof ee.constructor!="function"&&M(ee,"hasOwnProperty")?ee.hasOwnProperty:g;for(ue in ee)qe&&ue=="prototype"||!Re.call(ee,ue)||$(ue);for(me=te.length;ue=te[--me];Re.call(ee,ue)&&$(ue));}),m(W,J)},!c("json-stringify")){var H={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},O="000000",U=function(W,J){return(O+(J||0)).slice(-W)},X="\\u00",j=function(W){var J,F='"',te=0,P=W.length,Q=P>10&&oe;for(Q&&(J=W.split(""));P>te;te++){var ee=W.charCodeAt(te);switch(ee){case 8:case 9:case 10:case 12:case 13:case 34:case 92:F+=H[ee];break;default:if(32>ee){F+=X+U(2,ee.toString(16));break}F+=Q?J[te]:oe?W.charAt(te):W[te]}}return F+'"'},V=function(W,J,F,te,P,Q,ee){var $,ue,me,qe,Re,vt,Cn,tt,an,kn,Ge,ze,At,xt,Tn,Rt;try{$=J[W]}catch{}if(typeof $=="object"&&$)if(ue=x.call($),ue!=s||g.call($,"toJSON"))typeof $.toJSON=="function"&&(ue!=w&&ue!=k&&ue!=E||g.call($,"toJSON"))&&($=$.toJSON(W));else if($>-1/0&&1/0>$){if(G){for(Re=Y($/864e5),me=Y(Re/365.2425)+1970-1;G(me+1,0)<=Re;me++);for(qe=Y((Re-G(me,0))/30.42);G(me,qe+1)<=Re;qe++);Re=1+Re-G(me,qe),vt=($%864e5+864e5)%864e5,Cn=Y(vt/36e5)%24,tt=Y(vt/6e4)%60,an=Y(vt/1e3)%60,kn=vt%1e3}else me=$.getUTCFullYear(),qe=$.getUTCMonth(),Re=$.getUTCDate(),Cn=$.getUTCHours(),tt=$.getUTCMinutes(),an=$.getUTCSeconds(),kn=$.getUTCMilliseconds();$=(0>=me||me>=1e4?(0>me?"-":"+")+U(6,0>me?-me:me):U(4,me))+"-"+U(2,qe+1)+"-"+U(2,Re)+"T"+U(2,Cn)+":"+U(2,tt)+":"+U(2,an)+"."+U(3,kn)+"Z"}else $=null;if(F&&($=F.call(J,W,$)),$===null)return"null";if(ue=x.call($),ue==q)return""+$;if(ue==w)return $>-1/0&&1/0>$?""+$:"null";if(ue==k)return j(""+$);if(typeof $=="object"){for(xt=ee.length;xt--;)if(ee[xt]===$)throw TypeError();if(ee.push($),Ge=[],Tn=Q,Q+=P,ue==E){for(At=0,xt=$.length;xt>At;At++)ze=V(At,$,F,te,P,Q,ee),Ge.push(ze===d?"null":ze);Rt=Ge.length?P?`[
37
+ ]`&&P(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&P(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&P(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&P(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{Q=!1}}J=Q}if(W=="json-parse"){var ee=_.parse;if(typeof ee=="function")try{if(ee("0")===0&&!ee(!1)){F=ee(te);var $=F.a.length==5&&F.a[0]===1;if($){try{$=!ee('" "')}catch{}if($)try{$=ee("01")!==1}catch{}if($)try{$=ee("1.")!==1}catch{}}}}catch{$=!1}J=$}}return c[W]=!!J}var g,m,d,A={}.toString,h=typeof JSON=="object"&&JSON,_=typeof r=="object"&&r&&!r.nodeType&&r;_&&h?(_.stringify=h.stringify,_.parse=h.parse):_=l.JSON=h||{};var p=new Date(-0xc782b5b800cec);try{p=p.getUTCFullYear()==-109252&&p.getUTCMonth()===0&&p.getUTCDate()===1&&p.getUTCHours()==10&&p.getUTCMinutes()==37&&p.getUTCSeconds()==6&&p.getUTCMilliseconds()==708}catch{}if(!c("json")){var a="[object Function]",s="[object Date]",w="[object Number]",k="[object String]",T="[object Array]",q="[object Boolean]",oe=c("bug-string-char-index");if(!p)var Y=Math.floor,se=[0,31,59,90,120,151,181,212,243,273,304,334],z=function(W,J){return se[J]+365*(W-1970)+Y((W-1969+(J=+(J>1)))/4)-Y((W-1901+J)/100)+Y((W-1601+J)/400)};(g={}.hasOwnProperty)||(g=function(W){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=A?g=function(te){var P=this.__proto__,Q=te in(this.__proto__=null,this);return this.__proto__=P,Q}:(J=F.constructor,g=function(te){var P=(this.constructor||J).prototype;return te in this&&!(te in P&&this[te]===P[te])}),F=null,g.call(this,W)});var D={boolean:1,number:1,string:1,undefined:1},M=function(W,J){var F=typeof W[J];return F=="object"?!!W[J]:!D[F]};if(m=function(W,J){var F,te,P,Q=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,te=new F;for(P in te)g.call(te,P)&&Q++;return F=te=null,Q?m=Q==2?function(ee,$){var ae,we={},Ke=A.call(ee)==a;for(ae in ee)Ke&&ae=="prototype"||g.call(we,ae)||!(we[ae]=1)||!g.call(ee,ae)||$(ae)}:function(ee,$){var ae,we,Ke=A.call(ee)==a;for(ae in ee)Ke&&ae=="prototype"||!g.call(ee,ae)||(we=ae==="constructor")||$(ae);(we||g.call(ee,ae="constructor"))&&$(ae)}:(te=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(ee,$){var ae,we,Ke=A.call(ee)==a,Re=!Ke&&typeof ee.constructor!="function"&&M(ee,"hasOwnProperty")?ee.hasOwnProperty:g;for(ae in ee)Ke&&ae=="prototype"||!Re.call(ee,ae)||$(ae);for(we=te.length;ae=te[--we];Re.call(ee,ae)&&$(ae));}),m(W,J)},!c("json-stringify")){var H={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",U=function(W,J){return(I+(J||0)).slice(-W)},X="\\u00",j=function(W){var J,F='"',te=0,P=W.length,Q=P>10&&oe;for(Q&&(J=W.split(""));P>te;te++){var ee=W.charCodeAt(te);switch(ee){case 8:case 9:case 10:case 12:case 13:case 34:case 92:F+=H[ee];break;default:if(32>ee){F+=X+U(2,ee.toString(16));break}F+=Q?J[te]:oe?W.charAt(te):W[te]}}return F+'"'},V=function(W,J,F,te,P,Q,ee){var $,ae,we,Ke,Re,yt,xn,nt,un,kn,Ge,$e,At,xt,En,Ot;try{$=J[W]}catch{}if(typeof $=="object"&&$)if(ae=A.call($),ae!=s||g.call($,"toJSON"))typeof $.toJSON=="function"&&(ae!=w&&ae!=k&&ae!=T||g.call($,"toJSON"))&&($=$.toJSON(W));else if($>-1/0&&1/0>$){if(z){for(Re=Y($/864e5),we=Y(Re/365.2425)+1970-1;z(we+1,0)<=Re;we++);for(Ke=Y((Re-z(we,0))/30.42);z(we,Ke+1)<=Re;Ke++);Re=1+Re-z(we,Ke),yt=($%864e5+864e5)%864e5,xn=Y(yt/36e5)%24,nt=Y(yt/6e4)%60,un=Y(yt/1e3)%60,kn=yt%1e3}else we=$.getUTCFullYear(),Ke=$.getUTCMonth(),Re=$.getUTCDate(),xn=$.getUTCHours(),nt=$.getUTCMinutes(),un=$.getUTCSeconds(),kn=$.getUTCMilliseconds();$=(0>=we||we>=1e4?(0>we?"-":"+")+U(6,0>we?-we:we):U(4,we))+"-"+U(2,Ke+1)+"-"+U(2,Re)+"T"+U(2,xn)+":"+U(2,nt)+":"+U(2,un)+"."+U(3,kn)+"Z"}else $=null;if(F&&($=F.call(J,W,$)),$===null)return"null";if(ae=A.call($),ae==q)return""+$;if(ae==w)return $>-1/0&&1/0>$?""+$:"null";if(ae==k)return j(""+$);if(typeof $=="object"){for(xt=ee.length;xt--;)if(ee[xt]===$)throw TypeError();if(ee.push($),Ge=[],En=Q,Q+=P,ae==T){for(At=0,xt=$.length;xt>At;At++)$e=V(At,$,F,te,P,Q,ee),Ge.push($e===d?"null":$e);Ot=Ge.length?P?`[
38
38
  `+Q+Ge.join(`,
39
39
  `+Q)+`
40
- `+Tn+"]":"["+Ge.join(",")+"]":"[]"}else m(te||$,function(En){var Wt=V(En,$,F,te,P,Q,ee);Wt!==d&&Ge.push(j(En)+":"+(P?" ":"")+Wt)}),Rt=Ge.length?P?`{
40
+ `+En+"]":"["+Ge.join(",")+"]":"[]"}else m(te||$,function(Tn){var Wt=V(Tn,$,F,te,P,Q,ee);Wt!==d&&Ge.push(j(Tn)+":"+(P?" ":"")+Wt)}),Ot=Ge.length?P?`{
41
41
  `+Q+Ge.join(`,
42
42
  `+Q)+`
43
- `+Tn+"}":"{"+Ge.join(",")+"}":"{}";return ee.pop(),Rt}};_.stringify=function(W,J,F){var te,P,Q,ee;if(typeof J=="function"||typeof J=="object"&&J){if((ee=x.call(J))==u)P=J;else if(ee==E){Q={};for(var $,ue=0,me=J.length;me>ue;$=J[ue++],ee=x.call($),(ee==k||ee==w)&&(Q[$]=1));}}if(F)if((ee=x.call(F))==w){if((F-=F%1)>0)for(te="",F>10&&(F=10);te.length<F;te+=" ");}else ee==k&&(te=F.length<=10?F:F.slice(0,10));return V("",($={},$[""]=W,$),P,Q,te,"",[])}}if(!c("json-parse")){var B,Ae,xe=String.fromCharCode,Ee={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
44
- `,102:"\f",114:"\r"},ae=function(){throw B=Ae=null,SyntaxError()},We=function(){for(var W,J,F,te,P,Q=Ae,ee=Q.length;ee>B;)switch(P=Q.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return W=oe?Q.charAt(B):Q[B],B++,W;case 34:for(W="@",B++;ee>B;)if(P=Q.charCodeAt(B),32>P)ae();else if(P==92)switch(P=Q.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:W+=Ee[P],B++;break;case 117:for(J=++B,F=B+4;F>B;B++)P=Q.charCodeAt(B),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ae();W+=xe("0x"+Q.slice(J,B));break;default:ae()}else{if(P==34)break;for(P=Q.charCodeAt(B),J=B;P>=32&&P!=92&&P!=34;)P=Q.charCodeAt(++B);W+=Q.slice(J,B)}if(Q.charCodeAt(B)==34)return B++,W;ae();default:if(J=B,P==45&&(te=!0,P=Q.charCodeAt(++B)),P>=48&&57>=P){for(P==48&&(P=Q.charCodeAt(B+1),P>=48&&57>=P)&&ae(),te=!1;ee>B&&(P=Q.charCodeAt(B),P>=48&&57>=P);B++);if(Q.charCodeAt(B)==46){for(F=++B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ae(),B=F}if(P=Q.charCodeAt(B),P==101||P==69){for(P=Q.charCodeAt(++B),(P==43||P==45)&&B++,F=B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ae(),B=F}return+Q.slice(J,B)}if(te&&ae(),Q.slice(B,B+4)=="true")return B+=4,!0;if(Q.slice(B,B+5)=="false")return B+=5,!1;if(Q.slice(B,B+4)=="null")return B+=4,null;ae()}return"$"},bt=function(W){var J,F;if(W=="$"&&ae(),typeof W=="string"){if((oe?W.charAt(0):W[0])=="@")return W.slice(1);if(W=="["){for(J=[];W=We(),W!="]";F||(F=!0))F&&(W==","?(W=We(),W=="]"&&ae()):ae()),W==","&&ae(),J.push(bt(W));return J}if(W=="{"){for(J={};W=We(),W!="}";F||(F=!0))F&&(W==","?(W=We(),W=="}"&&ae()):ae()),(W==","||typeof W!="string"||(oe?W.charAt(0):W[0])!="@"||We()!=":")&&ae(),J[W.slice(1)]=bt(We());return J}ae()}return W},et=function(W,J,F){var te=zn(W,J,F);te===d?delete W[J]:W[J]=te},zn=function(W,J,F){var te,P=W[J];if(typeof P=="object"&&P)if(x.call(P)==E)for(te=P.length;te--;)et(P,te,F);else m(P,function(Q){et(P,Q,F)});return F.call(W,J,P)};_.parse=function(W,J){var F,te;return B=0,Ae=""+W,F=bt(We()),We()!="$"&&ae(),B=Ae=null,J&&x.call(J)==u?zn((te={},te[""]=F,te),"",J):F}}}})(this)},{}],48:[function(S,v){function r(l,c){var g=[];c=c||0;for(var m=c||0;m<l.length;m++)g[m-c]=l[m];return g}v.exports=r},{}]},{},[1])(1)}const Xu=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}))}),Ju=/v\d+_\d+_\d+/;function Yu(S){return typeof S=="function"}const Ur=Object.entries(Xu).reduce((S,v)=>{var c;const r=v[1].default,l=(c=v[0].match(Ju))==null?void 0:c[0];return Yu(r)&&l&&(S[l]=r()),S},{}),uo=S=>{if(S in Ur)return Ur[S];throw new Error(`Socket version ${S} not found`)},Zu={...Ur,getSocketVersion:uo,makeSocketVersion:(S,...v)=>uo(S)(...v)};var ve=(S=>(S.ALL_DIALER_STATUS="AllDialersStatus",S.ALL_EXTENSION_STATUS="AllExtensionsStatus",S.ALL_USERS_STATUS="AllUsersStatus",S.CONNECT="connect",S.DISCONNECT="disconnect",S.CONNECT_ERROR_EVENT="connect_error",S.EXTENSION_EVENT="ExtensionEvent",S.KEEP_ALIVE="keepalive",S.KEEP_ALIVE_RESPONSE="keepaliveResponse",S.LOGIN_STATUS="loginStatus",S.LOGIN_SUCCESS="loginSuccess",S.QUEUE_EVENT="QueueEvent",S.ONLINE_STATUS_EVENT="onlineStatusEvent",S.DIALER_EVENT="DialerEvent",S))(ve||{});class Vu{constructor(v){Se(this,"io");Se(this,"ioFunction");Se(this,"lastEventTimestamp",new Date().getTime());Se(this,"doReconnect",!0);Se(this,"keepAliveInterval");Se(this,"keepReconnectInterval");Se(this,"connected",!1);this.eventsSdkClass=v,this.eventsSdkClass=v}getSocketIoFunction(v){const r=v.split("v="),l="v".concat(r[r.length-1]).replaceAll(".","_");this.ioFunction=Zu.getSocketVersion(l)}initSocketConnection(){const v=this.eventsSdkClass.authClass.token,r=this.eventsSdkClass.options.protocol,l=this.eventsSdkClass.server;try{const c=l?l.Domain:this.eventsSdkClass.URL,g=l?`${r}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.emit(ve.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:g});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:v},timeout:this.eventsSdkClass.options.timeout};if(v&&(m.query={token:v}),this.ioFunction&&g)this.io=this.ioFunction(g,m);else throw new Error("Socket server url no defined")}catch{}}initSocketEvents(){this.io&&this.io.on(ve.LOGIN_SUCCESS,v=>this.eventsSdkClass.emit(ve.LOGIN_SUCCESS,v)).on(ve.QUEUE_EVENT,v=>this.eventsSdkClass.emit(ve.QUEUE_EVENT,v)).on(ve.EXTENSION_EVENT,v=>this.eventsSdkClass.emit(ve.EXTENSION_EVENT,v)).on(ve.DIALER_EVENT,v=>this.eventsSdkClass.emit(ve.DIALER_EVENT,v)).on(ve.LOGIN_STATUS,v=>this.eventsSdkClass.emit(ve.LOGIN_STATUS,v)).on(ve.ALL_EXTENSION_STATUS,v=>this.eventsSdkClass.emit(ve.ALL_EXTENSION_STATUS,v)).on(ve.ALL_DIALER_STATUS,v=>this.eventsSdkClass.emit(ve.ALL_DIALER_STATUS,v)).on(ve.KEEP_ALIVE_RESPONSE,v=>this.onKeepAliveResponse(v)).on(ve.CONNECT,()=>this.onConnect()).on(ve.DISCONNECT,()=>this.onDisconnect()).on(ve.CONNECT_ERROR_EVENT,()=>{this.eventsSdkClass.emit(ve.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),setTimeout(()=>{this.eventsSdkClass.connect(Vt.NEXT)},this.eventsSdkClass.options.reconnectionDelay)})}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.io.emit(ve.KEEP_ALIVE,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var v;this.io&&(this.io.close(),(v=this.io)==null||v.disconnect(),this.io=void 0),xn.clearSessionStorage()}onKeepAliveResponse(v){if(v.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.emit(ve.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(){this.connected=!1,this.closeAllConnections(),this.eventsSdkClass.emit(ve.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(Vt.NEXT))}}class Qu{constructor(v){Se(this,"io");Se(this,"storageLogger");this.eventsSdkClass=v,this.eventsSdkClass=v}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)}log(v,r,...l){const c=[r,...l];this.storageLogger?v===Mt.INFO?this.storageLogger.log(c):v===Mt.ERROR&&this.storageLogger.error(c):v===Mt.INFO?console.log(c):v===Mt.ERROR&&console.error(c)}}class ju{constructor(v){Se(this,"argumentOptions");Se(this,"options");Se(this,"servers",[]);Se(this,"URLList",[]);Se(this,"server");Se(this,"URL");Se(this,"socket");Se(this,"mainServer");Se(this,"alreadyAttemptedOtherServers",[]);Se(this,"authClass",new Hu(this));Se(this,"socketIoClass",new Vu(this));Se(this,"loggerClass",new Qu(this));Se(this,"reconnectOptions");Se(this,"retryConnection");Se(this,"listeners",{[ve.ALL_EXTENSION_STATUS]:[],[ve.ALL_DIALER_STATUS]:[],[ve.ALL_USERS_STATUS]:[],[ve.QUEUE_EVENT]:[],[ve.EXTENSION_EVENT]:[],[ve.DIALER_EVENT]:[],[ve.LOGIN_SUCCESS]:[],[ve.LOGIN_STATUS]:[],[ve.KEEP_ALIVE_RESPONSE]:[],[ve.ONLINE_STATUS_EVENT]:[]});Se(this,"allListeners",[]);this.options={...zu,...v},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:3e5},this.server=this.options.fallbackServer,this.retryConnection=Gu.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...v}}on(v,r){v==="*"?this.allListeners.push(r):this.listeners[v].push(r)}off(v,r){if(v==="*")this.allListeners=this.allListeners.filter(l=>l!==r);else{const c=this.listeners[v].filter(g=>g!==r);this.listeners={...this.listeners,[v]:c}}}emit(v,r){this.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[v].forEach(c=>c({name:v,data:r}));const l={name:v,data:r};this.allListeners.forEach(c=>c(l))}connect(v){v===Vt.MAIN&&this.findMainServer(),v===Vt.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((v,r)=>r.Priority>v.Priority?r:v),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 v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0)),v.length&&(this.server=v.reduce((r,l)=>l.Priority>r.Priority?l:r),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0)),v.length&&(this.URL=v[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}getServerWithHighestPriority(v){let r,l=Number.MAX_SAFE_INTEGER;return r=v.find(c=>{c.Priority<l&&(l=c.Priority,r=c)}),r||this.server}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)}}return St.EventsEnum=ve,St.default=ju,Object.defineProperties(St,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),St}({});
43
+ `+En+"}":"{"+Ge.join(",")+"}":"{}";return ee.pop(),Ot}};_.stringify=function(W,J,F){var te,P,Q,ee;if(typeof J=="function"||typeof J=="object"&&J){if((ee=A.call(J))==a)P=J;else if(ee==T){Q={};for(var $,ae=0,we=J.length;we>ae;$=J[ae++],ee=A.call($),(ee==k||ee==w)&&(Q[$]=1));}}if(F)if((ee=A.call(F))==w){if((F-=F%1)>0)for(te="",F>10&&(F=10);te.length<F;te+=" ");}else ee==k&&(te=F.length<=10?F:F.slice(0,10));return V("",($={},$[""]=W,$),P,Q,te,"",[])}}if(!c("json-parse")){var B,be,Ae=String.fromCharCode,Te={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
44
+ `,102:"\f",114:"\r"},ue=function(){throw B=be=null,SyntaxError()},qe=function(){for(var W,J,F,te,P,Q=be,ee=Q.length;ee>B;)switch(P=Q.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return W=oe?Q.charAt(B):Q[B],B++,W;case 34:for(W="@",B++;ee>B;)if(P=Q.charCodeAt(B),32>P)ue();else if(P==92)switch(P=Q.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:W+=Te[P],B++;break;case 117:for(J=++B,F=B+4;F>B;B++)P=Q.charCodeAt(B),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ue();W+=Ae("0x"+Q.slice(J,B));break;default:ue()}else{if(P==34)break;for(P=Q.charCodeAt(B),J=B;P>=32&&P!=92&&P!=34;)P=Q.charCodeAt(++B);W+=Q.slice(J,B)}if(Q.charCodeAt(B)==34)return B++,W;ue();default:if(J=B,P==45&&(te=!0,P=Q.charCodeAt(++B)),P>=48&&57>=P){for(P==48&&(P=Q.charCodeAt(B+1),P>=48&&57>=P)&&ue(),te=!1;ee>B&&(P=Q.charCodeAt(B),P>=48&&57>=P);B++);if(Q.charCodeAt(B)==46){for(F=++B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ue(),B=F}if(P=Q.charCodeAt(B),P==101||P==69){for(P=Q.charCodeAt(++B),(P==43||P==45)&&B++,F=B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ue(),B=F}return+Q.slice(J,B)}if(te&&ue(),Q.slice(B,B+4)=="true")return B+=4,!0;if(Q.slice(B,B+5)=="false")return B+=5,!1;if(Q.slice(B,B+4)=="null")return B+=4,null;ue()}return"$"},bt=function(W){var J,F;if(W=="$"&&ue(),typeof W=="string"){if((oe?W.charAt(0):W[0])=="@")return W.slice(1);if(W=="["){for(J=[];W=qe(),W!="]";F||(F=!0))F&&(W==","?(W=qe(),W=="]"&&ue()):ue()),W==","&&ue(),J.push(bt(W));return J}if(W=="{"){for(J={};W=qe(),W!="}";F||(F=!0))F&&(W==","?(W=qe(),W=="}"&&ue()):ue()),(W==","||typeof W!="string"||(oe?W.charAt(0):W[0])!="@"||qe()!=":")&&ue(),J[W.slice(1)]=bt(qe());return J}ue()}return W},tt=function(W,J,F){var te=Gn(W,J,F);te===d?delete W[J]:W[J]=te},Gn=function(W,J,F){var te,P=W[J];if(typeof P=="object"&&P)if(A.call(P)==T)for(te=P.length;te--;)tt(P,te,F);else m(P,function(Q){tt(P,Q,F)});return F.call(W,J,P)};_.parse=function(W,J){var F,te;return B=0,be=""+W,F=bt(qe()),qe()!="$"&&ue(),B=be=null,J&&A.call(J)==a?Gn((te={},te[""]=F,te),"",J):F}}}})(this)},{}],48:[function(S,v){function r(l,c){var g=[];c=c||0;for(var m=c||0;m<l.length;m++)g[m-c]=l[m];return g}v.exports=r},{}]},{},[1])(1)}const Xa=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:$a},Symbol.toStringTag,{value:"Module"}))}),Ja=/v\d+_\d+_\d+/;function Ya(S){return typeof S=="function"}const Ur=Object.entries(Xa).reduce((S,v)=>{var c;const r=v[1].default,l=(c=v[0].match(Ja))==null?void 0:c[0];return Ya(r)&&l&&(S[l]=r()),S},{}),ao=S=>{if(S in Ur)return Ur[S];throw new Error(`Socket version ${S} not found`)},Za={...Ur,getSocketVersion:ao,makeSocketVersion:(S,...v)=>ao(S)(...v)};var he=(S=>(S.ALL_DIALER_STATUS="AllDialersStatus",S.ALL_EXTENSION_STATUS="AllExtensionsStatus",S.ALL_USERS_STATUS="AllUsersStatus",S.CONNECT="connect",S.DISCONNECT="disconnect",S.CONNECT_ERROR_EVENT="connect_error",S.EXTENSION_EVENT="ExtensionEvent",S.KEEP_ALIVE="keepalive",S.KEEP_ALIVE_RESPONSE="keepaliveResponse",S.LOGIN_STATUS="loginStatus",S.LOGIN_SUCCESS="loginSuccess",S.QUEUE_EVENT="QueueEvent",S.ONLINE_STATUS_EVENT="onlineStatusEvent",S.DIALER_EVENT="DialerEvent",S))(he||{});class Va{constructor(v){me(this,"io");me(this,"ioFunction");me(this,"lastEventTimestamp",new Date().getTime());me(this,"doReconnect",!0);me(this,"keepAliveInterval");me(this,"keepReconnectInterval");me(this,"connected",!1);this.eventsSdkClass=v,this.eventsSdkClass=v}getSocketIoFunction(v){const r=v.split("v="),l="v".concat(r[r.length-1]).replaceAll(".","_");this.ioFunction=Za.getSocketVersion(l)}initSocketConnection(){const v=this.eventsSdkClass.authClass.token,r=this.eventsSdkClass.options.protocol,l=this.eventsSdkClass.server;try{const c=l?l.Domain:this.eventsSdkClass.URL,g=l?`${r}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(We.INFO,"Connecting to..",g),this.eventsSdkClass.eventEmitterClass.emit(he.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:g});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:v},timeout:this.eventsSdkClass.options.timeout};if(v&&(m.query={token:v}),this.ioFunction&&g)this.io=this.ioFunction(g,m);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log(We.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(he.LOGIN_SUCCESS,v=>this.eventsSdkClass.eventEmitterClass.emit(he.LOGIN_SUCCESS,v)).on(he.QUEUE_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(he.QUEUE_EVENT,v)).on(he.EXTENSION_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(he.EXTENSION_EVENT,v)).on(he.DIALER_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(he.DIALER_EVENT,v)).on(he.LOGIN_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(he.LOGIN_STATUS,v)).on(he.ALL_EXTENSION_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(he.ALL_EXTENSION_STATUS,v)).on(he.ALL_DIALER_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(he.ALL_DIALER_STATUS,v)).on(he.KEEP_ALIVE_RESPONSE,v=>this.onKeepAliveResponse(v)).on(he.CONNECT,()=>this.onConnect()).on(he.DISCONNECT,v=>this.onDisconnect(v)).on(he.CONNECT_ERROR_EVENT,v=>this.onConnectError(v))}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(he.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(We.INFO,`EMIT -> ${he.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var v;this.io&&(this.io.close(),(v=this.io)==null||v.disconnect(),this.io=void 0),An.clearSessionStorage()}onKeepAliveResponse(v){if(this.eventsSdkClass.loggerClass.log(We.INFO,he.KEEP_ALIVE_RESPONSE),v.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(We.INFO,he.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(he.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(v){this.connected=!1,this.eventsSdkClass.loggerClass.log(We.INFO,he.DISCONNECT,v),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(he.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(Vt.NEXT))}onConnectError(v){this.eventsSdkClass.eventEmitterClass.emit(he.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(We.ERROR,he.CONNECT_ERROR_EVENT,v),setTimeout(()=>{this.eventsSdkClass.connect(Vt.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}class Qa{constructor(v){me(this,"io");me(this,"storageLogger");this.eventsSdkClass=v,this.eventsSdkClass=v}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)}log(v,r,...l){const c=[r,...l];this.storageLogger?v===We.INFO?this.storageLogger.log(c):v===We.ERROR&&this.storageLogger.error(c):v===We.INFO?console.log(c):v===We.ERROR&&console.error(c)}}class ja{constructor(v){me(this,"listeners",{[he.ALL_EXTENSION_STATUS]:[],[he.ALL_DIALER_STATUS]:[],[he.ALL_USERS_STATUS]:[],[he.QUEUE_EVENT]:[],[he.EXTENSION_EVENT]:[],[he.DIALER_EVENT]:[],[he.LOGIN_SUCCESS]:[],[he.LOGIN_STATUS]:[],[he.KEEP_ALIVE_RESPONSE]:[],[he.ONLINE_STATUS_EVENT]:[]});me(this,"allListeners",[]);this.eventsSdkClass=v,this.eventsSdkClass=v}on(v,r){v==="*"?this.allListeners.push(r):this.listeners[v].push(r)}off(v,r){if(v==="*")this.allListeners=this.allListeners.filter(l=>l!==r);else{const c=this.listeners[v].filter(g=>g!==r);this.listeners={...this.listeners,[v]:c}}}emit(v,r){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[v].forEach(c=>c({name:v,data:r}));const l={name:v,data:r};this.allListeners.forEach(c=>c(l))}}class eu{constructor(v){me(this,"argumentOptions");me(this,"options");me(this,"servers",[]);me(this,"URLList",[]);me(this,"server");me(this,"URL");me(this,"socket");me(this,"mainServer");me(this,"alreadyAttemptedOtherServers",[]);me(this,"authClass",new Ha(this));me(this,"socketIoClass",new Va(this));me(this,"loggerClass",new Qa(this));me(this,"eventEmitterClass",new ja(this));me(this,"reconnectOptions");me(this,"retryConnection");this.options={...Ga,...v},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:3e5},this.server=this.options.fallbackServer,this.retryConnection=za.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...v}}on(v,r){this.eventEmitterClass.on(v,r)}emit(v,r){this.socketIoClass.io&&this.socketIoClass.io.emit(v,r)}connect(v){v===Vt.MAIN&&this.findMainServer(),v===Vt.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((v,r)=>r.Priority>v.Priority?r:v),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 v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0)),v.length&&(this.server=v.reduce((r,l)=>l.Priority>r.Priority?l:r),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0)),v.length&&(this.URL=v[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)}}return Ct.EventsEnum=he,Ct.default=eu,Object.defineProperties(Ct,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Ct}({});
45
45
  //# sourceMappingURL=voicenter-events-sdk.iife.js.map