@voicenter-team/events-sdk 0.0.14 → 0.0.18

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,48 +1,45 @@
1
- (function(nt,Me){typeof exports=="object"&&typeof module<"u"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(nt=typeof globalThis<"u"?globalThis:nt||self,Me(nt.VoicenterEventsSDK={}))})(this,function(nt){"use strict";var k0=Object.defineProperty;var R0=(nt,Me,Yt)=>Me in nt?k0(nt,Me,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):nt[Me]=Yt;var Be=(nt,Me,Yt)=>(R0(nt,typeof Me!="symbol"?Me+"":Me,Yt),Yt);var Me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yt(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}function Du(A){if(A.__esModule)return A;var w=A.default;if(typeof w=="function"){var r=function l(){return this instanceof l?Reflect.construct(w,arguments,this.constructor):w.apply(this,arguments)};r.prototype=w.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(A).forEach(function(l){var h=Object.getOwnPropertyDescriptor(A,l);Object.defineProperty(r,l,h.get?h:{enumerable:!0,get:function(){return A[l]}})}),r}var to={exports:{}};const no=Du(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
2
- * [js-md5]{@link https://github.com/emn178/js-md5}
1
+ (function(et,Fe){typeof exports=="object"&&typeof module<"u"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(et=typeof globalThis<"u"?globalThis:et||self,Fe(et.VoicenterEventsSDK={}))})(this,function(et){"use strict";var Ng=Object.defineProperty;var Ug=(et,Fe,Zt)=>Fe in et?Ng(et,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):et[Fe]=Zt;var Te=(et,Fe,Zt)=>(Ug(et,typeof Fe!="symbol"?Fe+"":Fe,Zt),Zt);var Fe=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+/",y={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 y.rotl(r,8)&16711935|y.rotl(r,24)&4278255360;for(var l=0;l<r.length;l++)r[l]=y.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,d=0;c<r.length;c++,d+=8)l[d>>>5]|=r[c]<<24-d%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 d=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(d>>>6*(3-m)&63)):l.push("=");return l.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var l=[],c=0,d=0;c<r.length;d=++c%4)d!=0&&l.push((S.indexOf(r.charAt(c-1))&Math.pow(2,-2*d+8)-1)<<d*2|S.indexOf(r.charAt(c))>>>6-d*2);return l}};io.exports=y})();var Mu=io.exports,Nr={utf8:{stringToBytes:function(S){return Nr.bin.stringToBytes(unescape(encodeURIComponent(S)))},bytesToString:function(S){return decodeURIComponent(escape(Nr.bin.bytesToString(S)))}},bin:{stringToBytes:function(S){for(var y=[],r=0;r<S.length;r++)y.push(S.charCodeAt(r)&255);return y},bytesToString:function(S){for(var y=[],r=0;r<S.length;r++)y.push(String.fromCharCode(S[r]));return y.join("")}}},oo=Nr;/*!
2
+ * Determine if an object is a Buffer
3
3
  *
4
- * @namespace md5
5
- * @version 0.8.3
6
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
7
- * @copyright Chen, Yi-Cyuan 2014-2023
8
- * @license MIT
9
- */(function(A){(function(){var w="input is invalid type",r="finalize already called",l=typeof window=="object",h=l?window:{};h.JS_MD5_NO_WINDOW&&(l=!1);var y=!l&&typeof self=="object",b=!h.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;b?h=Me:y&&(h=self);var E=!h.JS_MD5_NO_COMMON_JS&&!0&&A.exports,k=!h.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),I=[128,32768,8388608,-2147483648],S=[0,8,16,24],p=["hex","array","digest","buffer","arrayBuffer","base64"],f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),_=[],R;if(k){var D=new ArrayBuffer(68);R=new Uint8Array(D),_=new Uint32Array(D)}var Q=Array.isArray;(h.JS_MD5_NO_NODE_JS||!Q)&&(Q=function(a){return Object.prototype.toString.call(a)==="[object Array]"});var ae=ArrayBuffer.isView;k&&(h.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ae)&&(ae=function(a){return typeof a=="object"&&a.buffer&&a.buffer.constructor===ArrayBuffer});var te=function(a){var d=typeof a;if(d==="string")return[a,!0];if(d!=="object"||a===null)throw new Error(w);if(k&&a.constructor===ArrayBuffer)return[new Uint8Array(a),!1];if(!Q(a)&&!ae(a))throw new Error(w);return[a,!1]},he=function(a){return function(d){return new B(!0).update(d)[a]()}},Y=function(){var a=he("hex");b&&(a=q(a)),a.create=function(){return new B},a.update=function(v){return a.create().update(v)};for(var d=0;d<p.length;++d){var c=p[d];a[c]=he(c)}return a},q=function(a){var d=no,c=no.Buffer,v;c.from&&!h.JS_MD5_NO_BUFFER_FROM?v=c.from:v=function(P){return new c(P)};var $=function(P){if(typeof P=="string")return d.createHash("md5").update(P,"utf8").digest("hex");if(P==null)throw new Error(w);return P.constructor===ArrayBuffer&&(P=new Uint8Array(P)),Q(P)||ae(P)||P.constructor===c?d.createHash("md5").update(v(P)).digest("hex"):a(P)};return $},z=function(a){return function(d,c){return new W(d,!0).update(c)[a]()}},J=function(){var a=z("hex");a.create=function(v){return new W(v)},a.update=function(v,$){return a.create(v).update($)};for(var d=0;d<p.length;++d){var c=p[d];a[c]=z(c)}return a};function B(a){if(a)_[0]=_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0,this.blocks=_,this.buffer8=R;else if(k){var d=new ArrayBuffer(68);this.buffer8=new Uint8Array(d),this.blocks=new Uint32Array(d)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}B.prototype.update=function(a){if(this.finalized)throw new Error(r);var d=te(a);a=d[0];for(var c=d[1],v,$=0,P,L=a.length,j=this.blocks,ke=this.buffer8;$<L;){if(this.hashed&&(this.hashed=!1,j[0]=j[16],j[16]=j[1]=j[2]=j[3]=j[4]=j[5]=j[6]=j[7]=j[8]=j[9]=j[10]=j[11]=j[12]=j[13]=j[14]=j[15]=0),c)if(k)for(P=this.start;$<L&&P<64;++$)v=a.charCodeAt($),v<128?ke[P++]=v:v<2048?(ke[P++]=192|v>>>6,ke[P++]=128|v&63):v<55296||v>=57344?(ke[P++]=224|v>>>12,ke[P++]=128|v>>>6&63,ke[P++]=128|v&63):(v=65536+((v&1023)<<10|a.charCodeAt(++$)&1023),ke[P++]=240|v>>>18,ke[P++]=128|v>>>12&63,ke[P++]=128|v>>>6&63,ke[P++]=128|v&63);else for(P=this.start;$<L&&P<64;++$)v=a.charCodeAt($),v<128?j[P>>>2]|=v<<S[P++&3]:v<2048?(j[P>>>2]|=(192|v>>>6)<<S[P++&3],j[P>>>2]|=(128|v&63)<<S[P++&3]):v<55296||v>=57344?(j[P>>>2]|=(224|v>>>12)<<S[P++&3],j[P>>>2]|=(128|v>>>6&63)<<S[P++&3],j[P>>>2]|=(128|v&63)<<S[P++&3]):(v=65536+((v&1023)<<10|a.charCodeAt(++$)&1023),j[P>>>2]|=(240|v>>>18)<<S[P++&3],j[P>>>2]|=(128|v>>>12&63)<<S[P++&3],j[P>>>2]|=(128|v>>>6&63)<<S[P++&3],j[P>>>2]|=(128|v&63)<<S[P++&3]);else if(k)for(P=this.start;$<L&&P<64;++$)ke[P++]=a[$];else for(P=this.start;$<L&&P<64;++$)j[P>>>2]|=a[$]<<S[P++&3];this.lastByteIndex=P,this.bytes+=P-this.start,P>=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var a=this.blocks,d=this.lastByteIndex;a[d>>>2]|=I[d&3],d>=56&&(this.hashed||this.hash(),a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),a[14]=this.bytes<<3,a[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},B.prototype.hash=function(){var a,d,c,v,$,P,L=this.blocks;this.first?(a=L[0]-680876937,a=(a<<7|a>>>25)-271733879<<0,v=(-1732584194^a&2004318071)+L[1]-117830708,v=(v<<12|v>>>20)+a<<0,c=(-271733879^v&(a^-271733879))+L[2]-1126478375,c=(c<<17|c>>>15)+v<<0,d=(a^c&(v^a))+L[3]-1316259209,d=(d<<22|d>>>10)+c<<0):(a=this.h0,d=this.h1,c=this.h2,v=this.h3,a+=(v^d&(c^v))+L[0]-680876936,a=(a<<7|a>>>25)+d<<0,v+=(c^a&(d^c))+L[1]-389564586,v=(v<<12|v>>>20)+a<<0,c+=(d^v&(a^d))+L[2]+606105819,c=(c<<17|c>>>15)+v<<0,d+=(a^c&(v^a))+L[3]-1044525330,d=(d<<22|d>>>10)+c<<0),a+=(v^d&(c^v))+L[4]-176418897,a=(a<<7|a>>>25)+d<<0,v+=(c^a&(d^c))+L[5]+1200080426,v=(v<<12|v>>>20)+a<<0,c+=(d^v&(a^d))+L[6]-1473231341,c=(c<<17|c>>>15)+v<<0,d+=(a^c&(v^a))+L[7]-45705983,d=(d<<22|d>>>10)+c<<0,a+=(v^d&(c^v))+L[8]+1770035416,a=(a<<7|a>>>25)+d<<0,v+=(c^a&(d^c))+L[9]-1958414417,v=(v<<12|v>>>20)+a<<0,c+=(d^v&(a^d))+L[10]-42063,c=(c<<17|c>>>15)+v<<0,d+=(a^c&(v^a))+L[11]-1990404162,d=(d<<22|d>>>10)+c<<0,a+=(v^d&(c^v))+L[12]+1804603682,a=(a<<7|a>>>25)+d<<0,v+=(c^a&(d^c))+L[13]-40341101,v=(v<<12|v>>>20)+a<<0,c+=(d^v&(a^d))+L[14]-1502002290,c=(c<<17|c>>>15)+v<<0,d+=(a^c&(v^a))+L[15]+1236535329,d=(d<<22|d>>>10)+c<<0,a+=(c^v&(d^c))+L[1]-165796510,a=(a<<5|a>>>27)+d<<0,v+=(d^c&(a^d))+L[6]-1069501632,v=(v<<9|v>>>23)+a<<0,c+=(a^d&(v^a))+L[11]+643717713,c=(c<<14|c>>>18)+v<<0,d+=(v^a&(c^v))+L[0]-373897302,d=(d<<20|d>>>12)+c<<0,a+=(c^v&(d^c))+L[5]-701558691,a=(a<<5|a>>>27)+d<<0,v+=(d^c&(a^d))+L[10]+38016083,v=(v<<9|v>>>23)+a<<0,c+=(a^d&(v^a))+L[15]-660478335,c=(c<<14|c>>>18)+v<<0,d+=(v^a&(c^v))+L[4]-405537848,d=(d<<20|d>>>12)+c<<0,a+=(c^v&(d^c))+L[9]+568446438,a=(a<<5|a>>>27)+d<<0,v+=(d^c&(a^d))+L[14]-1019803690,v=(v<<9|v>>>23)+a<<0,c+=(a^d&(v^a))+L[3]-187363961,c=(c<<14|c>>>18)+v<<0,d+=(v^a&(c^v))+L[8]+1163531501,d=(d<<20|d>>>12)+c<<0,a+=(c^v&(d^c))+L[13]-1444681467,a=(a<<5|a>>>27)+d<<0,v+=(d^c&(a^d))+L[2]-51403784,v=(v<<9|v>>>23)+a<<0,c+=(a^d&(v^a))+L[7]+1735328473,c=(c<<14|c>>>18)+v<<0,d+=(v^a&(c^v))+L[12]-1926607734,d=(d<<20|d>>>12)+c<<0,$=d^c,a+=($^v)+L[5]-378558,a=(a<<4|a>>>28)+d<<0,v+=($^a)+L[8]-2022574463,v=(v<<11|v>>>21)+a<<0,P=v^a,c+=(P^d)+L[11]+1839030562,c=(c<<16|c>>>16)+v<<0,d+=(P^c)+L[14]-35309556,d=(d<<23|d>>>9)+c<<0,$=d^c,a+=($^v)+L[1]-1530992060,a=(a<<4|a>>>28)+d<<0,v+=($^a)+L[4]+1272893353,v=(v<<11|v>>>21)+a<<0,P=v^a,c+=(P^d)+L[7]-155497632,c=(c<<16|c>>>16)+v<<0,d+=(P^c)+L[10]-1094730640,d=(d<<23|d>>>9)+c<<0,$=d^c,a+=($^v)+L[13]+681279174,a=(a<<4|a>>>28)+d<<0,v+=($^a)+L[0]-358537222,v=(v<<11|v>>>21)+a<<0,P=v^a,c+=(P^d)+L[3]-722521979,c=(c<<16|c>>>16)+v<<0,d+=(P^c)+L[6]+76029189,d=(d<<23|d>>>9)+c<<0,$=d^c,a+=($^v)+L[9]-640364487,a=(a<<4|a>>>28)+d<<0,v+=($^a)+L[12]-421815835,v=(v<<11|v>>>21)+a<<0,P=v^a,c+=(P^d)+L[15]+530742520,c=(c<<16|c>>>16)+v<<0,d+=(P^c)+L[2]-995338651,d=(d<<23|d>>>9)+c<<0,a+=(c^(d|~v))+L[0]-198630844,a=(a<<6|a>>>26)+d<<0,v+=(d^(a|~c))+L[7]+1126891415,v=(v<<10|v>>>22)+a<<0,c+=(a^(v|~d))+L[14]-1416354905,c=(c<<15|c>>>17)+v<<0,d+=(v^(c|~a))+L[5]-57434055,d=(d<<21|d>>>11)+c<<0,a+=(c^(d|~v))+L[12]+1700485571,a=(a<<6|a>>>26)+d<<0,v+=(d^(a|~c))+L[3]-1894986606,v=(v<<10|v>>>22)+a<<0,c+=(a^(v|~d))+L[10]-1051523,c=(c<<15|c>>>17)+v<<0,d+=(v^(c|~a))+L[1]-2054922799,d=(d<<21|d>>>11)+c<<0,a+=(c^(d|~v))+L[8]+1873313359,a=(a<<6|a>>>26)+d<<0,v+=(d^(a|~c))+L[15]-30611744,v=(v<<10|v>>>22)+a<<0,c+=(a^(v|~d))+L[6]-1560198380,c=(c<<15|c>>>17)+v<<0,d+=(v^(c|~a))+L[13]+1309151649,d=(d<<21|d>>>11)+c<<0,a+=(c^(d|~v))+L[4]-145523070,a=(a<<6|a>>>26)+d<<0,v+=(d^(a|~c))+L[11]-1120210379,v=(v<<10|v>>>22)+a<<0,c+=(a^(v|~d))+L[2]+718787259,c=(c<<15|c>>>17)+v<<0,d+=(v^(c|~a))+L[9]-343485551,d=(d<<21|d>>>11)+c<<0,this.first?(this.h0=a+1732584193<<0,this.h1=d-271733879<<0,this.h2=c-1732584194<<0,this.h3=v+271733878<<0,this.first=!1):(this.h0=this.h0+a<<0,this.h1=this.h1+d<<0,this.h2=this.h2+c<<0,this.h3=this.h3+v<<0)},B.prototype.hex=function(){this.finalize();var a=this.h0,d=this.h1,c=this.h2,v=this.h3;return m[a>>>4&15]+m[a&15]+m[a>>>12&15]+m[a>>>8&15]+m[a>>>20&15]+m[a>>>16&15]+m[a>>>28&15]+m[a>>>24&15]+m[d>>>4&15]+m[d&15]+m[d>>>12&15]+m[d>>>8&15]+m[d>>>20&15]+m[d>>>16&15]+m[d>>>28&15]+m[d>>>24&15]+m[c>>>4&15]+m[c&15]+m[c>>>12&15]+m[c>>>8&15]+m[c>>>20&15]+m[c>>>16&15]+m[c>>>28&15]+m[c>>>24&15]+m[v>>>4&15]+m[v&15]+m[v>>>12&15]+m[v>>>8&15]+m[v>>>20&15]+m[v>>>16&15]+m[v>>>28&15]+m[v>>>24&15]},B.prototype.toString=B.prototype.hex,B.prototype.digest=function(){this.finalize();var a=this.h0,d=this.h1,c=this.h2,v=this.h3;return[a&255,a>>>8&255,a>>>16&255,a>>>24&255,d&255,d>>>8&255,d>>>16&255,d>>>24&255,c&255,c>>>8&255,c>>>16&255,c>>>24&255,v&255,v>>>8&255,v>>>16&255,v>>>24&255]},B.prototype.array=B.prototype.digest,B.prototype.arrayBuffer=function(){this.finalize();var a=new ArrayBuffer(16),d=new Uint32Array(a);return d[0]=this.h0,d[1]=this.h1,d[2]=this.h2,d[3]=this.h3,a},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.base64=function(){for(var a,d,c,v="",$=this.array(),P=0;P<15;)a=$[P++],d=$[P++],c=$[P++],v+=f[a>>>2]+f[(a<<4|d>>>4)&63]+f[(d<<2|c>>>6)&63]+f[c&63];return a=$[P],v+=f[a>>>2]+f[a<<4&63]+"==",v};function W(a,d){var c,v=te(a);if(a=v[0],v[1]){var $=[],P=a.length,L=0,j;for(c=0;c<P;++c)j=a.charCodeAt(c),j<128?$[L++]=j:j<2048?($[L++]=192|j>>>6,$[L++]=128|j&63):j<55296||j>=57344?($[L++]=224|j>>>12,$[L++]=128|j>>>6&63,$[L++]=128|j&63):(j=65536+((j&1023)<<10|a.charCodeAt(++c)&1023),$[L++]=240|j>>>18,$[L++]=128|j>>>12&63,$[L++]=128|j>>>6&63,$[L++]=128|j&63);a=$}a.length>64&&(a=new B(!0).update(a).array());var ke=[],ze=[];for(c=0;c<64;++c){var Vt=a[c]||0;ke[c]=92^Vt,ze[c]=54^Vt}B.call(this,d),this.update(ze),this.oKeyPad=ke,this.inner=!0,this.sharedMemory=d}W.prototype=new B,W.prototype.finalize=function(){if(B.prototype.finalize.call(this),this.inner){this.inner=!1;var a=this.array();B.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(a),B.prototype.finalize.call(this)}};var V=Y();V.md5=V,V.md5.hmac=J(),E?A.exports=V:h.md5=V})()})(to);var Fu=to.exports;const Uu=Yt(Fu);var Pt=(A=>(A.DEFAULT="default",A.NEXT="next",A.PREVIOUS="previous",A))(Pt||{}),un=(A=>(A.USER="User",A.TOKEN="Token",A))(un||{});const Pu="https://loginapidev.voicenter.co.il/Application/GetSettings";class zn{static async getSessionStorageDataByKey(w){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const r=await chrome.storage.session.get(w);if(r[w])return JSON.parse(r[w])}if(typeof window<"u"){const r=window.sessionStorage.getItem(w);if(r)return JSON.parse(r)}}static async updateSessionStorageKey(w,r){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[w]:JSON.stringify(r)}),typeof window<"u"&&window.sessionStorage.setItem(w,JSON.stringify(r))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}class Mu{constructor(w){Be(this,"delay",1e3);Be(this,"lastLoginTimestamp");Be(this,"token");Be(this,"storageKey");this.eventsSdkClass=w,this.eventsSdkClass=w,this.storageKey=""}async login(w){const r={token:w.token,email:w.email,password:w.password};if(this.storageKey=Uu(JSON.stringify(r)),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||await this.userLoginFunction(r,this.storageKey,w.loginType)}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(w){const r=await zn.getSessionStorageDataByKey(w);return r?(this.onLoginResponse(r),!0):!1}async userLoginFunction(w,r,l){let h,y,b;this.eventsSdkClass.options.isNewStack?(h=await this.externalLogin(this.eventsSdkClass.options.loginUrl,w,l),y=await this.getSettings(h.Data.AccessToken),b={...h.Data,...y}):(h=await this.externalLogin(this.eventsSdkClass.options.loginUrl,w,l),b={...h.Data.Socket}),this.onLoginResponse(b),await zn.updateSessionStorageKey(r,b)}onLoginResponse(w){w.MonitorList&&w.MonitorList.length&&(this.eventsSdkClass.servers=[...w.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.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),w.IdentityCode&&(this.token=w.IdentityCode,this.eventsSdkClass.connect(Pt.DEFAULT,!0)),w.Token&&(this.token=w.Token,this.eventsSdkClass.connect(Pt.DEFAULT,!0)),w.RefreshToken&&w.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===un.USER&&(this.eventsSdkClass.options.refreshToken=w.RefreshToken,this.eventsSdkClass.options.tokenExpiry=w.IdentityCodeExpiry,this.handleTokenExpiry()),w.RefreshToken&&w.TokenExpiry&&(this.eventsSdkClass.options.refreshToken=w.RefreshToken,this.eventsSdkClass.options.tokenExpiry=w.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){let w;if(this.eventsSdkClass.options.tokenExpiry)w=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const r=w.getTime()-new Date().getTime()-5e3,l=Math.min(r,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let h,y;if(this.eventsSdkClass.options.isNewStack){const b=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);h=await this.getSettings(b.Data.AccessToken),y={...b.Data,...h}}else y={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(y),await zn.updateSessionStorageKey(this.storageKey,y)}},l)}async externalLogin(w,{password:r,token:l,email:h},y){let b;this.eventsSdkClass.options.isNewStack?y===un.TOKEN?b=JSON.stringify({identityType:un.TOKEN,token:l}):b=JSON.stringify({identityType:un.USER,username:h,password:r}):l?(b=JSON.stringify({token:l}),w=`${w}/Token`):(b=JSON.stringify({email:h,pin:r}),w=`${w}/User`);const k=await(await fetch(w,{method:"POST",headers:{"Content-Type":"application/json"},body:b})).json();if(k.error)throw new Error(k.error);return k}async getSettings(w){return(await fetch(Pu,{headers:{Authorization:`Bearer ${w}`}})).json()}async refreshToken(w,r){return(await fetch(w,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}})).json()}}var Hn={exports:{}};/**
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */var Wu=function(S){return S!=null&&(so(S)||qu(S)||!!S._isBuffer)};function so(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function qu(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&so(S.slice(0,0))}(function(){var S=Mu,y=oo.utf8,r=Wu,l=oo.bin,c=function(d,m){d.constructor==String?m&&m.encoding==="binary"?d=l.stringToBytes(d):d=y.stringToBytes(d):r(d)?d=Array.prototype.slice.call(d,0):!Array.isArray(d)&&d.constructor!==Uint8Array&&(d=d.toString());for(var g=S.bytesToWords(d),x=d.length*8,h=1732584193,_=-271733879,p=-1732584194,u=271733878,s=0;s<g.length;s++)g[s]=(g[s]<<8|g[s]>>>24)&16711935|(g[s]<<24|g[s]>>>8)&4278255360;g[x>>>5]|=128<<x%32,g[(x+64>>>9<<4)+14]=x;for(var w=c._ff,T=c._gg,k=c._hh,q=c._ii,s=0;s<g.length;s+=16){var oe=h,Y=_,se=p,G=u;h=w(h,_,p,u,g[s+0],7,-680876936),u=w(u,h,_,p,g[s+1],12,-389564586),p=w(p,u,h,_,g[s+2],17,606105819),_=w(_,p,u,h,g[s+3],22,-1044525330),h=w(h,_,p,u,g[s+4],7,-176418897),u=w(u,h,_,p,g[s+5],12,1200080426),p=w(p,u,h,_,g[s+6],17,-1473231341),_=w(_,p,u,h,g[s+7],22,-45705983),h=w(h,_,p,u,g[s+8],7,1770035416),u=w(u,h,_,p,g[s+9],12,-1958414417),p=w(p,u,h,_,g[s+10],17,-42063),_=w(_,p,u,h,g[s+11],22,-1990404162),h=w(h,_,p,u,g[s+12],7,1804603682),u=w(u,h,_,p,g[s+13],12,-40341101),p=w(p,u,h,_,g[s+14],17,-1502002290),_=w(_,p,u,h,g[s+15],22,1236535329),h=T(h,_,p,u,g[s+1],5,-165796510),u=T(u,h,_,p,g[s+6],9,-1069501632),p=T(p,u,h,_,g[s+11],14,643717713),_=T(_,p,u,h,g[s+0],20,-373897302),h=T(h,_,p,u,g[s+5],5,-701558691),u=T(u,h,_,p,g[s+10],9,38016083),p=T(p,u,h,_,g[s+15],14,-660478335),_=T(_,p,u,h,g[s+4],20,-405537848),h=T(h,_,p,u,g[s+9],5,568446438),u=T(u,h,_,p,g[s+14],9,-1019803690),p=T(p,u,h,_,g[s+3],14,-187363961),_=T(_,p,u,h,g[s+8],20,1163531501),h=T(h,_,p,u,g[s+13],5,-1444681467),u=T(u,h,_,p,g[s+2],9,-51403784),p=T(p,u,h,_,g[s+7],14,1735328473),_=T(_,p,u,h,g[s+12],20,-1926607734),h=k(h,_,p,u,g[s+5],4,-378558),u=k(u,h,_,p,g[s+8],11,-2022574463),p=k(p,u,h,_,g[s+11],16,1839030562),_=k(_,p,u,h,g[s+14],23,-35309556),h=k(h,_,p,u,g[s+1],4,-1530992060),u=k(u,h,_,p,g[s+4],11,1272893353),p=k(p,u,h,_,g[s+7],16,-155497632),_=k(_,p,u,h,g[s+10],23,-1094730640),h=k(h,_,p,u,g[s+13],4,681279174),u=k(u,h,_,p,g[s+0],11,-358537222),p=k(p,u,h,_,g[s+3],16,-722521979),_=k(_,p,u,h,g[s+6],23,76029189),h=k(h,_,p,u,g[s+9],4,-640364487),u=k(u,h,_,p,g[s+12],11,-421815835),p=k(p,u,h,_,g[s+15],16,530742520),_=k(_,p,u,h,g[s+2],23,-995338651),h=q(h,_,p,u,g[s+0],6,-198630844),u=q(u,h,_,p,g[s+7],10,1126891415),p=q(p,u,h,_,g[s+14],15,-1416354905),_=q(_,p,u,h,g[s+5],21,-57434055),h=q(h,_,p,u,g[s+12],6,1700485571),u=q(u,h,_,p,g[s+3],10,-1894986606),p=q(p,u,h,_,g[s+10],15,-1051523),_=q(_,p,u,h,g[s+1],21,-2054922799),h=q(h,_,p,u,g[s+8],6,1873313359),u=q(u,h,_,p,g[s+15],10,-30611744),p=q(p,u,h,_,g[s+6],15,-1560198380),_=q(_,p,u,h,g[s+13],21,1309151649),h=q(h,_,p,u,g[s+4],6,-145523070),u=q(u,h,_,p,g[s+11],10,-1120210379),p=q(p,u,h,_,g[s+2],15,718787259),_=q(_,p,u,h,g[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(d,m,g,x,h,_,p){var u=d+(m&g|~m&x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._gg=function(d,m,g,x,h,_,p){var u=d+(m&x|g&~x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._hh=function(d,m,g,x,h,_,p){var u=d+(m^g^x)+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._ii=function(d,m,g,x,h,_,p){var u=d+(g^(m|~x))+(h>>>0)+p;return(u<<_|u>>>32-_)+m},c._blocksize=16,c._digestsize=16,ro.exports=function(d,m){if(d==null)throw new Error("Illegal argument "+d);var g=S.wordsToBytes(c(d,m));return m&&m.asBytes?g:m&&m.asString?l.bytesToString(g):S.bytesToHex(g)}})();var Ku=ro.exports;const Hu=Zt(Ku);var Mt=(S=>(S.DEFAULT="default",S.NEXT="next",S.PREVIOUS="previous",S))(Mt||{}),kt=(S=>(S.USER="User",S.TOKEN="Token",S))(kt||{});class Hn{static async getSessionStorageDataByKey(y,r=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const l=await chrome.storage.session.get(y);if(l[y])return r?JSON.parse(l[y]):l[y]}if(typeof window<"u"){const l=window.sessionStorage.getItem(y);if(l)return r?JSON.parse(l):l}}static async updateSessionStorageKey(y,r){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[y]:JSON.stringify(r)}),typeof window<"u"&&window.sessionStorage.setItem(y,JSON.stringify(r))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}class Gu{constructor(y){Te(this,"delay",1e3);Te(this,"lastLoginTimestamp");Te(this,"token");Te(this,"storageKey");this.eventsSdkClass=y,this.eventsSdkClass=y,this.storageKey=""}async login(y){const r={token:y.token,email:y.email,password:y.password};if(this.storageKey=Hu(JSON.stringify(y)),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||await this.userLoginFunction(r,this.storageKey,y.loginType)}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(y){const r=await Hn.getSessionStorageDataByKey(y);return r?(this.onLoginResponse(r),!0):!1}async userLoginFunction(y,r,l){let c,d,m;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,y,l),d=await this.getSettings(c.Data.AccessToken),m={...c.Data,...d}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,y,l),m={...c.Data.Socket}),this.onLoginResponse(m),await Hn.updateSessionStorageKey(r,m)}onLoginResponse(y){y.MonitorList&&y.MonitorList.length&&(this.eventsSdkClass.servers=[...y.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.server&&(this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),this.eventsSdkClass.loggerClass.init()),y.IdentityCode&&(this.token=y.IdentityCode,this.eventsSdkClass.connect(Mt.DEFAULT,!0)),y.Token&&(this.token=y.Token,this.eventsSdkClass.connect(Mt.DEFAULT,!0)),y.RefreshToken&&y.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===kt.USER&&(this.eventsSdkClass.options.refreshToken=y.RefreshToken,this.eventsSdkClass.options.tokenExpiry=y.IdentityCodeExpiry,this.handleTokenExpiry()),y.RefreshToken&&y.TokenExpiry&&this.eventsSdkClass.options.loginType===kt.USER&&(this.eventsSdkClass.options.refreshToken=y.RefreshToken,this.eventsSdkClass.options.tokenExpiry=y.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){let y;if(this.eventsSdkClass.options.tokenExpiry)y=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const r=y.getTime()-new Date().getTime()-5e3,l=Math.min(r,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,d;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),d={...m.Data,...c}}else d={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(d),await Hn.updateSessionStorageKey(this.storageKey,d)}},l)}async externalLogin(y,{password:r,token:l,email:c},d){let m;this.eventsSdkClass.options.isNewStack?d===kt.TOKEN?m=JSON.stringify({identityType:kt.TOKEN,token:l}):m=JSON.stringify({identityType:kt.USER,username:c,password:r}):this.eventsSdkClass.options.loginType===kt.TOKEN?(m=JSON.stringify({token:l}),y=`${y}/${kt.TOKEN}`):(m=JSON.stringify({email:c,pin:r}),y=`${y}/${kt.USER}`);const x=await(await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:m})).json();if(x.error)throw new Error(x.error);return x}async getSettings(y){if(this.eventsSdkClass.options.getSettingsUrl)return(await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${y}`}})).json();throw new Error("getSettingsUrl config parameter not provided")}async refreshToken(y,r){return(await fetch(y,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}})).json()}}var Gn={exports:{}};/**
10
7
  * @license
11
8
  * Lodash <https://lodash.com/>
12
9
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
13
10
  * Released under MIT license <https://lodash.com/license>
14
11
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
15
12
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
16
- */Hn.exports,function(A,w){(function(){var r,l="4.17.21",h=200,y="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",b="Expected a function",E="Invalid `variable` option passed into `_.template`",k="__lodash_hash_undefined__",m=500,I="__lodash_placeholder__",S=1,p=2,f=4,_=1,R=2,D=1,Q=2,ae=4,te=8,he=16,Y=32,q=64,z=128,J=256,B=512,W=30,V="...",a=800,d=16,c=1,v=2,$=3,P=1/0,L=9007199254740991,j=17976931348623157e292,ke=NaN,ze=4294967295,Vt=ze-1,G=ze>>>1,ne=[["ary",z],["bind",D],["bindKey",Q],["curry",te],["curryRight",he],["flip",B],["partial",Y],["partialRight",q],["rearg",J]],H="[object Arguments]",se="[object Array]",K="[object AsyncFunction]",ie="[object Boolean]",oe="[object Date]",ee="[object DOMException]",le="[object Error]",Se="[object Function]",He="[object GeneratorFunction]",Oe="[object Map]",_t="[object Number]",An="[object Null]",rt="[object Object]",an="[object Promise]",En="[object Proxy]",Xe="[object RegExp]",Je="[object Set]",St="[object String]",At="[object Symbol]",Tn="[object Undefined]",kt="[object WeakMap]",Cn="[object WeakSet]",Mt="[object ArrayBuffer]",fn="[object DataView]",Nr="[object Float32Array]",Dr="[object Float64Array]",Fr="[object Int8Array]",Ur="[object Int16Array]",Pr="[object Int32Array]",Mr="[object Uint8Array]",Wr="[object Uint8ClampedArray]",qr="[object Uint16Array]",Kr="[object Uint32Array]",Ju=/\b__p \+= '';/g,Yu=/\b(__p \+=) '' \+/g,Vu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39);/g,so=/[&<>"']/g,Zu=RegExp(oo.source),Qu=RegExp(so.source),ju=/<%-([\s\S]+?)%>/g,ea=/<%([\s\S]+?)%>/g,uo=/<%=([\s\S]+?)%>/g,ta=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,na=/^\w*$/,ra=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/[\\^$.*+?()[\]{}|]/g,ia=RegExp(zr.source),Hr=/^\s+/,oa=/\s/,sa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ua=/\{\n\/\* \[wrapped with (.+)\] \*/,aa=/,? & /,fa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ca=/[()=,{}\[\]\/\s]/,ha=/\\(\\)?/g,la=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ao=/\w*$/,pa=/^[-+]0x[0-9a-f]+$/i,da=/^0b[01]+$/i,ga=/^\[object .+?Constructor\]$/,va=/^0o[0-7]+$/i,ya=/^(?:0|[1-9]\d*)$/,_a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gn=/($^)/,ma=/['\n\r\u2028\u2029\\]/g,$n="\\ud800-\\udfff",wa="\\u0300-\\u036f",xa="\\ufe20-\\ufe2f",ba="\\u20d0-\\u20ff",fo=wa+xa+ba,co="\\u2700-\\u27bf",ho="a-z\\xdf-\\xf6\\xf8-\\xff",Sa="\\xac\\xb1\\xd7\\xf7",Aa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ea="\\u2000-\\u206f",Ta=" \\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",lo="A-Z\\xc0-\\xd6\\xd8-\\xde",po="\\ufe0e\\ufe0f",go=Sa+Aa+Ea+Ta,Gr="['’]",Ca="["+$n+"]",vo="["+go+"]",Xn="["+fo+"]",yo="\\d+",ka="["+co+"]",_o="["+ho+"]",mo="[^"+$n+go+yo+co+ho+lo+"]",$r="\\ud83c[\\udffb-\\udfff]",Ra="(?:"+Xn+"|"+$r+")",wo="[^"+$n+"]",Xr="(?:\\ud83c[\\udde6-\\uddff]){2}",Jr="[\\ud800-\\udbff][\\udc00-\\udfff]",cn="["+lo+"]",xo="\\u200d",bo="(?:"+_o+"|"+mo+")",Oa="(?:"+cn+"|"+mo+")",So="(?:"+Gr+"(?:d|ll|m|re|s|t|ve))?",Ao="(?:"+Gr+"(?:D|LL|M|RE|S|T|VE))?",Eo=Ra+"?",To="["+po+"]?",Ia="(?:"+xo+"(?:"+[wo,Xr,Jr].join("|")+")"+To+Eo+")*",La="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ba="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Co=To+Eo+Ia,Na="(?:"+[ka,Xr,Jr].join("|")+")"+Co,Da="(?:"+[wo+Xn+"?",Xn,Xr,Jr,Ca].join("|")+")",Fa=RegExp(Gr,"g"),Ua=RegExp(Xn,"g"),Yr=RegExp($r+"(?="+$r+")|"+Da+Co,"g"),Pa=RegExp([cn+"?"+_o+"+"+So+"(?="+[vo,cn,"$"].join("|")+")",Oa+"+"+Ao+"(?="+[vo,cn+bo,"$"].join("|")+")",cn+"?"+bo+"+"+So,cn+"+"+Ao,Ba,La,yo,Na].join("|"),"g"),Ma=RegExp("["+xo+$n+fo+po+"]"),Wa=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qa=["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"],Ka=-1,Re={};Re[Nr]=Re[Dr]=Re[Fr]=Re[Ur]=Re[Pr]=Re[Mr]=Re[Wr]=Re[qr]=Re[Kr]=!0,Re[H]=Re[se]=Re[Mt]=Re[ie]=Re[fn]=Re[oe]=Re[le]=Re[Se]=Re[Oe]=Re[_t]=Re[rt]=Re[Xe]=Re[Je]=Re[St]=Re[kt]=!1;var Ce={};Ce[H]=Ce[se]=Ce[Mt]=Ce[fn]=Ce[ie]=Ce[oe]=Ce[Nr]=Ce[Dr]=Ce[Fr]=Ce[Ur]=Ce[Pr]=Ce[Oe]=Ce[_t]=Ce[rt]=Ce[Xe]=Ce[Je]=Ce[St]=Ce[At]=Ce[Mr]=Ce[Wr]=Ce[qr]=Ce[Kr]=!0,Ce[le]=Ce[Se]=Ce[kt]=!1;var za={À:"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"},Ha={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ga={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$a={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xa=parseFloat,Ja=parseInt,ko=typeof Me=="object"&&Me&&Me.Object===Object&&Me,Ya=typeof self=="object"&&self&&self.Object===Object&&self,qe=ko||Ya||Function("return this")(),Vr=w&&!w.nodeType&&w,Zt=Vr&&!0&&A&&!A.nodeType&&A,Ro=Zt&&Zt.exports===Vr,Zr=Ro&&ko.process,ct=function(){try{var T=Zt&&Zt.require&&Zt.require("util").types;return T||Zr&&Zr.binding&&Zr.binding("util")}catch{}}(),Oo=ct&&ct.isArrayBuffer,Io=ct&&ct.isDate,Lo=ct&&ct.isMap,Bo=ct&&ct.isRegExp,No=ct&&ct.isSet,Do=ct&&ct.isTypedArray;function it(T,N,O){switch(O.length){case 0:return T.call(N);case 1:return T.call(N,O[0]);case 2:return T.call(N,O[0],O[1]);case 3:return T.call(N,O[0],O[1],O[2])}return T.apply(N,O)}function Va(T,N,O,Z){for(var pe=-1,be=T==null?0:T.length;++pe<be;){var Ue=T[pe];N(Z,Ue,O(Ue),T)}return Z}function ht(T,N){for(var O=-1,Z=T==null?0:T.length;++O<Z&&N(T[O],O,T)!==!1;);return T}function Za(T,N){for(var O=T==null?0:T.length;O--&&N(T[O],O,T)!==!1;);return T}function Fo(T,N){for(var O=-1,Z=T==null?0:T.length;++O<Z;)if(!N(T[O],O,T))return!1;return!0}function Wt(T,N){for(var O=-1,Z=T==null?0:T.length,pe=0,be=[];++O<Z;){var Ue=T[O];N(Ue,O,T)&&(be[pe++]=Ue)}return be}function Jn(T,N){var O=T==null?0:T.length;return!!O&&hn(T,N,0)>-1}function Qr(T,N,O){for(var Z=-1,pe=T==null?0:T.length;++Z<pe;)if(O(N,T[Z]))return!0;return!1}function Ie(T,N){for(var O=-1,Z=T==null?0:T.length,pe=Array(Z);++O<Z;)pe[O]=N(T[O],O,T);return pe}function qt(T,N){for(var O=-1,Z=N.length,pe=T.length;++O<Z;)T[pe+O]=N[O];return T}function jr(T,N,O,Z){var pe=-1,be=T==null?0:T.length;for(Z&&be&&(O=T[++pe]);++pe<be;)O=N(O,T[pe],pe,T);return O}function Qa(T,N,O,Z){var pe=T==null?0:T.length;for(Z&&pe&&(O=T[--pe]);pe--;)O=N(O,T[pe],pe,T);return O}function ei(T,N){for(var O=-1,Z=T==null?0:T.length;++O<Z;)if(N(T[O],O,T))return!0;return!1}var ja=ti("length");function ef(T){return T.split("")}function tf(T){return T.match(fa)||[]}function Uo(T,N,O){var Z;return O(T,function(pe,be,Ue){if(N(pe,be,Ue))return Z=be,!1}),Z}function Yn(T,N,O,Z){for(var pe=T.length,be=O+(Z?1:-1);Z?be--:++be<pe;)if(N(T[be],be,T))return be;return-1}function hn(T,N,O){return N===N?df(T,N,O):Yn(T,Po,O)}function nf(T,N,O,Z){for(var pe=O-1,be=T.length;++pe<be;)if(Z(T[pe],N))return pe;return-1}function Po(T){return T!==T}function Mo(T,N){var O=T==null?0:T.length;return O?ri(T,N)/O:ke}function ti(T){return function(N){return N==null?r:N[T]}}function ni(T){return function(N){return T==null?r:T[N]}}function Wo(T,N,O,Z,pe){return pe(T,function(be,Ue,Te){O=Z?(Z=!1,be):N(O,be,Ue,Te)}),O}function rf(T,N){var O=T.length;for(T.sort(N);O--;)T[O]=T[O].value;return T}function ri(T,N){for(var O,Z=-1,pe=T.length;++Z<pe;){var be=N(T[Z]);be!==r&&(O=O===r?be:O+be)}return O}function ii(T,N){for(var O=-1,Z=Array(T);++O<T;)Z[O]=N(O);return Z}function of(T,N){return Ie(N,function(O){return[O,T[O]]})}function qo(T){return T&&T.slice(0,Go(T)+1).replace(Hr,"")}function ot(T){return function(N){return T(N)}}function oi(T,N){return Ie(N,function(O){return T[O]})}function kn(T,N){return T.has(N)}function Ko(T,N){for(var O=-1,Z=T.length;++O<Z&&hn(N,T[O],0)>-1;);return O}function zo(T,N){for(var O=T.length;O--&&hn(N,T[O],0)>-1;);return O}function sf(T,N){for(var O=T.length,Z=0;O--;)T[O]===N&&++Z;return Z}var uf=ni(za),af=ni(Ha);function ff(T){return"\\"+$a[T]}function cf(T,N){return T==null?r:T[N]}function ln(T){return Ma.test(T)}function hf(T){return Wa.test(T)}function lf(T){for(var N,O=[];!(N=T.next()).done;)O.push(N.value);return O}function si(T){var N=-1,O=Array(T.size);return T.forEach(function(Z,pe){O[++N]=[pe,Z]}),O}function Ho(T,N){return function(O){return T(N(O))}}function Kt(T,N){for(var O=-1,Z=T.length,pe=0,be=[];++O<Z;){var Ue=T[O];(Ue===N||Ue===I)&&(T[O]=I,be[pe++]=O)}return be}function Vn(T){var N=-1,O=Array(T.size);return T.forEach(function(Z){O[++N]=Z}),O}function pf(T){var N=-1,O=Array(T.size);return T.forEach(function(Z){O[++N]=[Z,Z]}),O}function df(T,N,O){for(var Z=O-1,pe=T.length;++Z<pe;)if(T[Z]===N)return Z;return-1}function gf(T,N,O){for(var Z=O+1;Z--;)if(T[Z]===N)return Z;return Z}function pn(T){return ln(T)?yf(T):ja(T)}function mt(T){return ln(T)?_f(T):ef(T)}function Go(T){for(var N=T.length;N--&&oa.test(T.charAt(N)););return N}var vf=ni(Ga);function yf(T){for(var N=Yr.lastIndex=0;Yr.test(T);)++N;return N}function _f(T){return T.match(Yr)||[]}function mf(T){return T.match(Pa)||[]}var wf=function T(N){N=N==null?qe:dn.defaults(qe.Object(),N,dn.pick(qe,qa));var O=N.Array,Z=N.Date,pe=N.Error,be=N.Function,Ue=N.Math,Te=N.Object,ui=N.RegExp,xf=N.String,lt=N.TypeError,Zn=O.prototype,bf=be.prototype,gn=Te.prototype,Qn=N["__core-js_shared__"],jn=bf.toString,Ee=gn.hasOwnProperty,Sf=0,$o=function(){var e=/[^.]+$/.exec(Qn&&Qn.keys&&Qn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),er=gn.toString,Af=jn.call(Te),Ef=qe._,Tf=ui("^"+jn.call(Ee).replace(zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tr=Ro?N.Buffer:r,zt=N.Symbol,nr=N.Uint8Array,Xo=tr?tr.allocUnsafe:r,rr=Ho(Te.getPrototypeOf,Te),Jo=Te.create,Yo=gn.propertyIsEnumerable,ir=Zn.splice,Vo=zt?zt.isConcatSpreadable:r,Rn=zt?zt.iterator:r,Qt=zt?zt.toStringTag:r,or=function(){try{var e=rn(Te,"defineProperty");return e({},"",{}),e}catch{}}(),Cf=N.clearTimeout!==qe.clearTimeout&&N.clearTimeout,kf=Z&&Z.now!==qe.Date.now&&Z.now,Rf=N.setTimeout!==qe.setTimeout&&N.setTimeout,sr=Ue.ceil,ur=Ue.floor,ai=Te.getOwnPropertySymbols,Of=tr?tr.isBuffer:r,Zo=N.isFinite,If=Zn.join,Lf=Ho(Te.keys,Te),Pe=Ue.max,Ge=Ue.min,Bf=Z.now,Nf=N.parseInt,Qo=Ue.random,Df=Zn.reverse,fi=rn(N,"DataView"),On=rn(N,"Map"),ci=rn(N,"Promise"),vn=rn(N,"Set"),In=rn(N,"WeakMap"),Ln=rn(Te,"create"),ar=In&&new In,yn={},Ff=on(fi),Uf=on(On),Pf=on(ci),Mf=on(vn),Wf=on(In),fr=zt?zt.prototype:r,Bn=fr?fr.valueOf:r,jo=fr?fr.toString:r;function s(e){if(Ne(e)&&!de(e)&&!(e instanceof me)){if(e instanceof pt)return e;if(Ee.call(e,"__wrapped__"))return eu(e)}return new pt(e)}var _n=function(){function e(){}return function(t){if(!Le(t))return{};if(Jo)return Jo(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function cr(){}function pt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}s.templateSettings={escape:ju,evaluate:ea,interpolate:uo,variable:"",imports:{_:s}},s.prototype=cr.prototype,s.prototype.constructor=s,pt.prototype=_n(cr.prototype),pt.prototype.constructor=pt;function me(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ze,this.__views__=[]}function qf(){var e=new me(this.__wrapped__);return e.__actions__=Qe(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Qe(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Qe(this.__views__),e}function Kf(){if(this.__filtered__){var e=new me(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=de(e),i=t<0,o=n?e.length:0,u=th(0,o,this.__views__),g=u.start,x=u.end,C=x-g,F=i?x:g-1,U=this.__iteratees__,M=U.length,X=0,re=Ge(C,this.__takeCount__);if(!n||!i&&o==C&&re==C)return Ss(e,this.__actions__);var fe=[];e:for(;C--&&X<re;){F+=t;for(var ve=-1,ce=e[F];++ve<M;){var _e=U[ve],we=_e.iteratee,at=_e.type,Ze=we(ce);if(at==v)ce=Ze;else if(!Ze){if(at==c)continue e;break e}}fe[X++]=ce}return fe}me.prototype=_n(cr.prototype),me.prototype.constructor=me;function jt(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 Hf(){this.__data__=Ln?Ln(null):{},this.size=0}function Gf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function $f(e){var t=this.__data__;if(Ln){var n=t[e];return n===k?r:n}return Ee.call(t,e)?t[e]:r}function Xf(e){var t=this.__data__;return Ln?t[e]!==r:Ee.call(t,e)}function Jf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===r?k:t,this}jt.prototype.clear=Hf,jt.prototype.delete=Gf,jt.prototype.get=$f,jt.prototype.has=Xf,jt.prototype.set=Jf;function Rt(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 Yf(){this.__data__=[],this.size=0}function Vf(e){var t=this.__data__,n=hr(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():ir.call(t,n,1),--this.size,!0}function Zf(e){var t=this.__data__,n=hr(t,e);return n<0?r:t[n][1]}function Qf(e){return hr(this.__data__,e)>-1}function jf(e,t){var n=this.__data__,i=hr(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}Rt.prototype.clear=Yf,Rt.prototype.delete=Vf,Rt.prototype.get=Zf,Rt.prototype.has=Qf,Rt.prototype.set=jf;function Ot(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 ec(){this.size=0,this.__data__={hash:new jt,map:new(On||Rt),string:new jt}}function tc(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}function nc(e){return Sr(this,e).get(e)}function rc(e){return Sr(this,e).has(e)}function ic(e,t){var n=Sr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}Ot.prototype.clear=ec,Ot.prototype.delete=tc,Ot.prototype.get=nc,Ot.prototype.has=rc,Ot.prototype.set=ic;function en(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ot;++t<n;)this.add(e[t])}function oc(e){return this.__data__.set(e,k),this}function sc(e){return this.__data__.has(e)}en.prototype.add=en.prototype.push=oc,en.prototype.has=sc;function wt(e){var t=this.__data__=new Rt(e);this.size=t.size}function uc(){this.__data__=new Rt,this.size=0}function ac(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function fc(e){return this.__data__.get(e)}function cc(e){return this.__data__.has(e)}function hc(e,t){var n=this.__data__;if(n instanceof Rt){var i=n.__data__;if(!On||i.length<h-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ot(i)}return n.set(e,t),this.size=n.size,this}wt.prototype.clear=uc,wt.prototype.delete=ac,wt.prototype.get=fc,wt.prototype.has=cc,wt.prototype.set=hc;function es(e,t){var n=de(e),i=!n&&sn(e),o=!n&&!i&&Jt(e),u=!n&&!i&&!o&&bn(e),g=n||i||o||u,x=g?ii(e.length,xf):[],C=x.length;for(var F in e)(t||Ee.call(e,F))&&!(g&&(F=="length"||o&&(F=="offset"||F=="parent")||u&&(F=="buffer"||F=="byteLength"||F=="byteOffset")||Nt(F,C)))&&x.push(F);return x}function ts(e){var t=e.length;return t?e[xi(0,t-1)]:r}function lc(e,t){return Ar(Qe(e),tn(t,0,e.length))}function pc(e){return Ar(Qe(e))}function hi(e,t,n){(n!==r&&!xt(e[t],n)||n===r&&!(t in e))&&It(e,t,n)}function Nn(e,t,n){var i=e[t];(!(Ee.call(e,t)&&xt(i,n))||n===r&&!(t in e))&&It(e,t,n)}function hr(e,t){for(var n=e.length;n--;)if(xt(e[n][0],t))return n;return-1}function dc(e,t,n,i){return Ht(e,function(o,u,g){t(i,o,n(o),g)}),i}function ns(e,t){return e&&Tt(t,We(t),e)}function gc(e,t){return e&&Tt(t,et(t),e)}function It(e,t,n){t=="__proto__"&&or?or(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function li(e,t){for(var n=-1,i=t.length,o=O(i),u=e==null;++n<i;)o[n]=u?r:$i(e,t[n]);return o}function tn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function dt(e,t,n,i,o,u){var g,x=t&S,C=t&p,F=t&f;if(n&&(g=o?n(e,i,o,u):n(e)),g!==r)return g;if(!Le(e))return e;var U=de(e);if(U){if(g=rh(e),!x)return Qe(e,g)}else{var M=$e(e),X=M==Se||M==He;if(Jt(e))return Ts(e,x);if(M==rt||M==H||X&&!o){if(g=C||X?{}:Gs(e),!x)return C?$c(e,gc(g,e)):Gc(e,ns(g,e))}else{if(!Ce[M])return o?e:{};g=ih(e,M,x)}}u||(u=new wt);var re=u.get(e);if(re)return re;u.set(e,g),wu(e)?e.forEach(function(ce){g.add(dt(ce,t,n,ce,e,u))}):_u(e)&&e.forEach(function(ce,_e){g.set(_e,dt(ce,t,n,_e,e,u))});var fe=F?C?Li:Ii:C?et:We,ve=U?r:fe(e);return ht(ve||e,function(ce,_e){ve&&(_e=ce,ce=e[_e]),Nn(g,_e,dt(ce,t,n,_e,e,u))}),g}function vc(e){var t=We(e);return function(n){return rs(n,e,t)}}function rs(e,t,n){var i=n.length;if(e==null)return!i;for(e=Te(e);i--;){var o=n[i],u=t[o],g=e[o];if(g===r&&!(o in e)||!u(g))return!1}return!0}function is(e,t,n){if(typeof e!="function")throw new lt(b);return qn(function(){e.apply(r,n)},t)}function Dn(e,t,n,i){var o=-1,u=Jn,g=!0,x=e.length,C=[],F=t.length;if(!x)return C;n&&(t=Ie(t,ot(n))),i?(u=Qr,g=!1):t.length>=h&&(u=kn,g=!1,t=new en(t));e:for(;++o<x;){var U=e[o],M=n==null?U:n(U);if(U=i||U!==0?U:0,g&&M===M){for(var X=F;X--;)if(t[X]===M)continue e;C.push(U)}else u(t,M,i)||C.push(U)}return C}var Ht=Is(Et),os=Is(di,!0);function yc(e,t){var n=!0;return Ht(e,function(i,o,u){return n=!!t(i,o,u),n}),n}function lr(e,t,n){for(var i=-1,o=e.length;++i<o;){var u=e[i],g=t(u);if(g!=null&&(x===r?g===g&&!ut(g):n(g,x)))var x=g,C=u}return C}function _c(e,t,n,i){var o=e.length;for(n=ge(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:ge(i),i<0&&(i+=o),i=n>i?0:bu(i);n<i;)e[n++]=t;return e}function ss(e,t){var n=[];return Ht(e,function(i,o,u){t(i,o,u)&&n.push(i)}),n}function Ke(e,t,n,i,o){var u=-1,g=e.length;for(n||(n=sh),o||(o=[]);++u<g;){var x=e[u];t>0&&n(x)?t>1?Ke(x,t-1,n,i,o):qt(o,x):i||(o[o.length]=x)}return o}var pi=Ls(),us=Ls(!0);function Et(e,t){return e&&pi(e,t,We)}function di(e,t){return e&&us(e,t,We)}function pr(e,t){return Wt(t,function(n){return Dt(e[n])})}function nn(e,t){t=$t(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Ct(t[n++])];return n&&n==i?e:r}function as(e,t,n){var i=t(e);return de(e)?i:qt(i,n(e))}function Ye(e){return e==null?e===r?Tn:An:Qt&&Qt in Te(e)?eh(e):ph(e)}function gi(e,t){return e>t}function mc(e,t){return e!=null&&Ee.call(e,t)}function wc(e,t){return e!=null&&t in Te(e)}function xc(e,t,n){return e>=Ge(t,n)&&e<Pe(t,n)}function vi(e,t,n){for(var i=n?Qr:Jn,o=e[0].length,u=e.length,g=u,x=O(u),C=1/0,F=[];g--;){var U=e[g];g&&t&&(U=Ie(U,ot(t))),C=Ge(U.length,C),x[g]=!n&&(t||o>=120&&U.length>=120)?new en(g&&U):r}U=e[0];var M=-1,X=x[0];e:for(;++M<o&&F.length<C;){var re=U[M],fe=t?t(re):re;if(re=n||re!==0?re:0,!(X?kn(X,fe):i(F,fe,n))){for(g=u;--g;){var ve=x[g];if(!(ve?kn(ve,fe):i(e[g],fe,n)))continue e}X&&X.push(fe),F.push(re)}}return F}function bc(e,t,n,i){return Et(e,function(o,u,g){t(i,n(o),u,g)}),i}function Fn(e,t,n){t=$t(t,e),e=Ys(e,t);var i=e==null?e:e[Ct(vt(t))];return i==null?r:it(i,e,n)}function fs(e){return Ne(e)&&Ye(e)==H}function Sc(e){return Ne(e)&&Ye(e)==Mt}function Ac(e){return Ne(e)&&Ye(e)==oe}function Un(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:Ec(e,t,n,i,Un,o)}function Ec(e,t,n,i,o,u){var g=de(e),x=de(t),C=g?se:$e(e),F=x?se:$e(t);C=C==H?rt:C,F=F==H?rt:F;var U=C==rt,M=F==rt,X=C==F;if(X&&Jt(e)){if(!Jt(t))return!1;g=!0,U=!1}if(X&&!U)return u||(u=new wt),g||bn(e)?Ks(e,t,n,i,o,u):Qc(e,t,C,n,i,o,u);if(!(n&_)){var re=U&&Ee.call(e,"__wrapped__"),fe=M&&Ee.call(t,"__wrapped__");if(re||fe){var ve=re?e.value():e,ce=fe?t.value():t;return u||(u=new wt),o(ve,ce,n,i,u)}}return X?(u||(u=new wt),jc(e,t,n,i,o,u)):!1}function Tc(e){return Ne(e)&&$e(e)==Oe}function yi(e,t,n,i){var o=n.length,u=o,g=!i;if(e==null)return!u;for(e=Te(e);o--;){var x=n[o];if(g&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++o<u;){x=n[o];var C=x[0],F=e[C],U=x[1];if(g&&x[2]){if(F===r&&!(C in e))return!1}else{var M=new wt;if(i)var X=i(F,U,C,e,t,M);if(!(X===r?Un(U,F,_|R,i,M):X))return!1}}return!0}function cs(e){if(!Le(e)||ah(e))return!1;var t=Dt(e)?Tf:ga;return t.test(on(e))}function Cc(e){return Ne(e)&&Ye(e)==Xe}function kc(e){return Ne(e)&&$e(e)==Je}function Rc(e){return Ne(e)&&Or(e.length)&&!!Re[Ye(e)]}function hs(e){return typeof e=="function"?e:e==null?tt:typeof e=="object"?de(e)?ds(e[0],e[1]):ps(e):Bu(e)}function _i(e){if(!Wn(e))return Lf(e);var t=[];for(var n in Te(e))Ee.call(e,n)&&n!="constructor"&&t.push(n);return t}function Oc(e){if(!Le(e))return lh(e);var t=Wn(e),n=[];for(var i in e)i=="constructor"&&(t||!Ee.call(e,i))||n.push(i);return n}function mi(e,t){return e<t}function ls(e,t){var n=-1,i=je(e)?O(e.length):[];return Ht(e,function(o,u,g){i[++n]=t(o,u,g)}),i}function ps(e){var t=Ni(e);return t.length==1&&t[0][2]?Xs(t[0][0],t[0][1]):function(n){return n===e||yi(n,e,t)}}function ds(e,t){return Fi(e)&&$s(t)?Xs(Ct(e),t):function(n){var i=$i(n,e);return i===r&&i===t?Xi(n,e):Un(t,i,_|R)}}function dr(e,t,n,i,o){e!==t&&pi(t,function(u,g){if(o||(o=new wt),Le(u))Ic(e,t,g,n,dr,i,o);else{var x=i?i(Pi(e,g),u,g+"",e,t,o):r;x===r&&(x=u),hi(e,g,x)}},et)}function Ic(e,t,n,i,o,u,g){var x=Pi(e,n),C=Pi(t,n),F=g.get(C);if(F){hi(e,n,F);return}var U=u?u(x,C,n+"",e,t,g):r,M=U===r;if(M){var X=de(C),re=!X&&Jt(C),fe=!X&&!re&&bn(C);U=C,X||re||fe?de(x)?U=x:De(x)?U=Qe(x):re?(M=!1,U=Ts(C,!0)):fe?(M=!1,U=Cs(C,!0)):U=[]:Kn(C)||sn(C)?(U=x,sn(x)?U=Su(x):(!Le(x)||Dt(x))&&(U=Gs(C))):M=!1}M&&(g.set(C,U),o(U,C,i,u,g),g.delete(C)),hi(e,n,U)}function gs(e,t){var n=e.length;if(n)return t+=t<0?n:0,Nt(t,n)?e[t]:r}function vs(e,t,n){t.length?t=Ie(t,function(u){return de(u)?function(g){return nn(g,u.length===1?u[0]:u)}:u}):t=[tt];var i=-1;t=Ie(t,ot(ue()));var o=ls(e,function(u,g,x){var C=Ie(t,function(F){return F(u)});return{criteria:C,index:++i,value:u}});return rf(o,function(u,g){return Hc(u,g,n)})}function Lc(e,t){return ys(e,t,function(n,i){return Xi(e,i)})}function ys(e,t,n){for(var i=-1,o=t.length,u={};++i<o;){var g=t[i],x=nn(e,g);n(x,g)&&Pn(u,$t(g,e),x)}return u}function Bc(e){return function(t){return nn(t,e)}}function wi(e,t,n,i){var o=i?nf:hn,u=-1,g=t.length,x=e;for(e===t&&(t=Qe(t)),n&&(x=Ie(e,ot(n)));++u<g;)for(var C=0,F=t[u],U=n?n(F):F;(C=o(x,U,C,i))>-1;)x!==e&&ir.call(x,C,1),ir.call(e,C,1);return e}function _s(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==u){var u=o;Nt(o)?ir.call(e,o,1):Ai(e,o)}}return e}function xi(e,t){return e+ur(Qo()*(t-e+1))}function Nc(e,t,n,i){for(var o=-1,u=Pe(sr((t-e)/(n||1)),0),g=O(u);u--;)g[i?u:++o]=e,e+=n;return g}function bi(e,t){var n="";if(!e||t<1||t>L)return n;do t%2&&(n+=e),t=ur(t/2),t&&(e+=e);while(t);return n}function ye(e,t){return Mi(Js(e,t,tt),e+"")}function Dc(e){return ts(Sn(e))}function Fc(e,t){var n=Sn(e);return Ar(n,tn(t,0,n.length))}function Pn(e,t,n,i){if(!Le(e))return e;t=$t(t,e);for(var o=-1,u=t.length,g=u-1,x=e;x!=null&&++o<u;){var C=Ct(t[o]),F=n;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(o!=g){var U=x[C];F=i?i(U,C,x):r,F===r&&(F=Le(U)?U:Nt(t[o+1])?[]:{})}Nn(x,C,F),x=x[C]}return e}var ms=ar?function(e,t){return ar.set(e,t),e}:tt,Uc=or?function(e,t){return or(e,"toString",{configurable:!0,enumerable:!1,value:Yi(t),writable:!0})}:tt;function Pc(e){return Ar(Sn(e))}function gt(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 u=O(o);++i<o;)u[i]=e[i+t];return u}function Mc(e,t){var n;return Ht(e,function(i,o,u){return n=t(i,o,u),!n}),!!n}function gr(e,t,n){var i=0,o=e==null?i:e.length;if(typeof t=="number"&&t===t&&o<=G){for(;i<o;){var u=i+o>>>1,g=e[u];g!==null&&!ut(g)&&(n?g<=t:g<t)?i=u+1:o=u}return o}return Si(e,t,tt,n)}function Si(e,t,n,i){var o=0,u=e==null?0:e.length;if(u===0)return 0;t=n(t);for(var g=t!==t,x=t===null,C=ut(t),F=t===r;o<u;){var U=ur((o+u)/2),M=n(e[U]),X=M!==r,re=M===null,fe=M===M,ve=ut(M);if(g)var ce=i||fe;else F?ce=fe&&(i||X):x?ce=fe&&X&&(i||!re):C?ce=fe&&X&&!re&&(i||!ve):re||ve?ce=!1:ce=i?M<=t:M<t;ce?o=U+1:u=U}return Ge(u,Vt)}function ws(e,t){for(var n=-1,i=e.length,o=0,u=[];++n<i;){var g=e[n],x=t?t(g):g;if(!n||!xt(x,C)){var C=x;u[o++]=g===0?0:g}}return u}function xs(e){return typeof e=="number"?e:ut(e)?ke:+e}function st(e){if(typeof e=="string")return e;if(de(e))return Ie(e,st)+"";if(ut(e))return jo?jo.call(e):"";var t=e+"";return t=="0"&&1/e==-P?"-0":t}function Gt(e,t,n){var i=-1,o=Jn,u=e.length,g=!0,x=[],C=x;if(n)g=!1,o=Qr;else if(u>=h){var F=t?null:Vc(e);if(F)return Vn(F);g=!1,o=kn,C=new en}else C=t?[]:x;e:for(;++i<u;){var U=e[i],M=t?t(U):U;if(U=n||U!==0?U:0,g&&M===M){for(var X=C.length;X--;)if(C[X]===M)continue e;t&&C.push(M),x.push(U)}else o(C,M,n)||(C!==x&&C.push(M),x.push(U))}return x}function Ai(e,t){return t=$t(t,e),e=Ys(e,t),e==null||delete e[Ct(vt(t))]}function bs(e,t,n,i){return Pn(e,t,n(nn(e,t)),i)}function vr(e,t,n,i){for(var o=e.length,u=i?o:-1;(i?u--:++u<o)&&t(e[u],u,e););return n?gt(e,i?0:u,i?u+1:o):gt(e,i?u+1:0,i?o:u)}function Ss(e,t){var n=e;return n instanceof me&&(n=n.value()),jr(t,function(i,o){return o.func.apply(o.thisArg,qt([i],o.args))},n)}function Ei(e,t,n){var i=e.length;if(i<2)return i?Gt(e[0]):[];for(var o=-1,u=O(i);++o<i;)for(var g=e[o],x=-1;++x<i;)x!=o&&(u[o]=Dn(u[o]||g,e[x],t,n));return Gt(Ke(u,1),t,n)}function As(e,t,n){for(var i=-1,o=e.length,u=t.length,g={};++i<o;){var x=i<u?t[i]:r;n(g,e[i],x)}return g}function Ti(e){return De(e)?e:[]}function Ci(e){return typeof e=="function"?e:tt}function $t(e,t){return de(e)?e:Fi(e,t)?[e]:js(Ae(e))}var Wc=ye;function Xt(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:gt(e,t,n)}var Es=Cf||function(e){return qe.clearTimeout(e)};function Ts(e,t){if(t)return e.slice();var n=e.length,i=Xo?Xo(n):new e.constructor(n);return e.copy(i),i}function ki(e){var t=new e.constructor(e.byteLength);return new nr(t).set(new nr(e)),t}function qc(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Kc(e){var t=new e.constructor(e.source,ao.exec(e));return t.lastIndex=e.lastIndex,t}function zc(e){return Bn?Te(Bn.call(e)):{}}function Cs(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ks(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,u=ut(e),g=t!==r,x=t===null,C=t===t,F=ut(t);if(!x&&!F&&!u&&e>t||u&&g&&C&&!x&&!F||i&&g&&C||!n&&C||!o)return 1;if(!i&&!u&&!F&&e<t||F&&n&&o&&!i&&!u||x&&n&&o||!g&&o||!C)return-1}return 0}function Hc(e,t,n){for(var i=-1,o=e.criteria,u=t.criteria,g=o.length,x=n.length;++i<g;){var C=ks(o[i],u[i]);if(C){if(i>=x)return C;var F=n[i];return C*(F=="desc"?-1:1)}}return e.index-t.index}function Rs(e,t,n,i){for(var o=-1,u=e.length,g=n.length,x=-1,C=t.length,F=Pe(u-g,0),U=O(C+F),M=!i;++x<C;)U[x]=t[x];for(;++o<g;)(M||o<u)&&(U[n[o]]=e[o]);for(;F--;)U[x++]=e[o++];return U}function Os(e,t,n,i){for(var o=-1,u=e.length,g=-1,x=n.length,C=-1,F=t.length,U=Pe(u-x,0),M=O(U+F),X=!i;++o<U;)M[o]=e[o];for(var re=o;++C<F;)M[re+C]=t[C];for(;++g<x;)(X||o<u)&&(M[re+n[g]]=e[o++]);return M}function Qe(e,t){var n=-1,i=e.length;for(t||(t=O(i));++n<i;)t[n]=e[n];return t}function Tt(e,t,n,i){var o=!n;n||(n={});for(var u=-1,g=t.length;++u<g;){var x=t[u],C=i?i(n[x],e[x],x,n,e):r;C===r&&(C=e[x]),o?It(n,x,C):Nn(n,x,C)}return n}function Gc(e,t){return Tt(e,Di(e),t)}function $c(e,t){return Tt(e,zs(e),t)}function yr(e,t){return function(n,i){var o=de(n)?Va:dc,u=t?t():{};return o(n,e,ue(i,2),u)}}function mn(e){return ye(function(t,n){var i=-1,o=n.length,u=o>1?n[o-1]:r,g=o>2?n[2]:r;for(u=e.length>3&&typeof u=="function"?(o--,u):r,g&&Ve(n[0],n[1],g)&&(u=o<3?r:u,o=1),t=Te(t);++i<o;){var x=n[i];x&&e(t,x,i,u)}return t})}function Is(e,t){return function(n,i){if(n==null)return n;if(!je(n))return e(n,i);for(var o=n.length,u=t?o:-1,g=Te(n);(t?u--:++u<o)&&i(g[u],u,g)!==!1;);return n}}function Ls(e){return function(t,n,i){for(var o=-1,u=Te(t),g=i(t),x=g.length;x--;){var C=g[e?x:++o];if(n(u[C],C,u)===!1)break}return t}}function Xc(e,t,n){var i=t&D,o=Mn(e);function u(){var g=this&&this!==qe&&this instanceof u?o:e;return g.apply(i?n:this,arguments)}return u}function Bs(e){return function(t){t=Ae(t);var n=ln(t)?mt(t):r,i=n?n[0]:t.charAt(0),o=n?Xt(n,1).join(""):t.slice(1);return i[e]()+o}}function wn(e){return function(t){return jr(Iu(Ou(t).replace(Fa,"")),e,"")}}function Mn(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 Jc(e,t,n){var i=Mn(e);function o(){for(var u=arguments.length,g=O(u),x=u,C=xn(o);x--;)g[x]=arguments[x];var F=u<3&&g[0]!==C&&g[u-1]!==C?[]:Kt(g,C);if(u-=F.length,u<n)return Ps(e,t,_r,o.placeholder,r,g,F,r,r,n-u);var U=this&&this!==qe&&this instanceof o?i:e;return it(U,this,g)}return o}function Ns(e){return function(t,n,i){var o=Te(t);if(!je(t)){var u=ue(n,3);t=We(t),n=function(x){return u(o[x],x,o)}}var g=e(t,n,i);return g>-1?o[u?t[g]:g]:r}}function Ds(e){return Bt(function(t){var n=t.length,i=n,o=pt.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new lt(b);if(o&&!g&&br(u)=="wrapper")var g=new pt([],!0)}for(i=g?i:n;++i<n;){u=t[i];var x=br(u),C=x=="wrapper"?Bi(u):r;C&&Ui(C[0])&&C[1]==(z|te|Y|J)&&!C[4].length&&C[9]==1?g=g[br(C[0])].apply(g,C[3]):g=u.length==1&&Ui(u)?g[x]():g.thru(u)}return function(){var F=arguments,U=F[0];if(g&&F.length==1&&de(U))return g.plant(U).value();for(var M=0,X=n?t[M].apply(this,F):U;++M<n;)X=t[M].call(this,X);return X}})}function _r(e,t,n,i,o,u,g,x,C,F){var U=t&z,M=t&D,X=t&Q,re=t&(te|he),fe=t&B,ve=X?r:Mn(e);function ce(){for(var _e=arguments.length,we=O(_e),at=_e;at--;)we[at]=arguments[at];if(re)var Ze=xn(ce),ft=sf(we,Ze);if(i&&(we=Rs(we,i,o,re)),u&&(we=Os(we,u,g,re)),_e-=ft,re&&_e<F){var Fe=Kt(we,Ze);return Ps(e,t,_r,ce.placeholder,n,we,Fe,x,C,F-_e)}var bt=M?n:this,Ut=X?bt[e]:e;return _e=we.length,x?we=dh(we,x):fe&&_e>1&&we.reverse(),U&&C<_e&&(we.length=C),this&&this!==qe&&this instanceof ce&&(Ut=ve||Mn(Ut)),Ut.apply(bt,we)}return ce}function Fs(e,t){return function(n,i){return bc(n,e,t(i),{})}}function mr(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=st(n),i=st(i)):(n=xs(n),i=xs(i)),o=e(n,i)}return o}}function Ri(e){return Bt(function(t){return t=Ie(t,ot(ue())),ye(function(n){var i=this;return e(t,function(o){return it(o,i,n)})})})}function wr(e,t){t=t===r?" ":st(t);var n=t.length;if(n<2)return n?bi(t,e):t;var i=bi(t,sr(e/pn(t)));return ln(t)?Xt(mt(i),0,e).join(""):i.slice(0,e)}function Yc(e,t,n,i){var o=t&D,u=Mn(e);function g(){for(var x=-1,C=arguments.length,F=-1,U=i.length,M=O(U+C),X=this&&this!==qe&&this instanceof g?u:e;++F<U;)M[F]=i[F];for(;C--;)M[F++]=arguments[++x];return it(X,o?n:this,M)}return g}function Us(e){return function(t,n,i){return i&&typeof i!="number"&&Ve(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),Nc(t,n,i,e)}}function xr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=yt(t),n=yt(n)),e(t,n)}}function Ps(e,t,n,i,o,u,g,x,C,F){var U=t&te,M=U?g:r,X=U?r:g,re=U?u:r,fe=U?r:u;t|=U?Y:q,t&=~(U?q:Y),t&ae||(t&=~(D|Q));var ve=[e,t,o,re,M,fe,X,x,C,F],ce=n.apply(r,ve);return Ui(e)&&Vs(ce,ve),ce.placeholder=i,Zs(ce,e,t)}function Oi(e){var t=Ue[e];return function(n,i){if(n=yt(n),i=i==null?0:Ge(ge(i),292),i&&Zo(n)){var o=(Ae(n)+"e").split("e"),u=t(o[0]+"e"+(+o[1]+i));return o=(Ae(u)+"e").split("e"),+(o[0]+"e"+(+o[1]-i))}return t(n)}}var Vc=vn&&1/Vn(new vn([,-0]))[1]==P?function(e){return new vn(e)}:Qi;function Ms(e){return function(t){var n=$e(t);return n==Oe?si(t):n==Je?pf(t):of(t,e(t))}}function Lt(e,t,n,i,o,u,g,x){var C=t&Q;if(!C&&typeof e!="function")throw new lt(b);var F=i?i.length:0;if(F||(t&=~(Y|q),i=o=r),g=g===r?g:Pe(ge(g),0),x=x===r?x:ge(x),F-=o?o.length:0,t&q){var U=i,M=o;i=o=r}var X=C?r:Bi(e),re=[e,t,n,i,o,U,M,u,g,x];if(X&&hh(re,X),e=re[0],t=re[1],n=re[2],i=re[3],o=re[4],x=re[9]=re[9]===r?C?0:e.length:Pe(re[9]-F,0),!x&&t&(te|he)&&(t&=~(te|he)),!t||t==D)var fe=Xc(e,t,n);else t==te||t==he?fe=Jc(e,t,x):(t==Y||t==(D|Y))&&!o.length?fe=Yc(e,t,n,i):fe=_r.apply(r,re);var ve=X?ms:Vs;return Zs(ve(fe,re),e,t)}function Ws(e,t,n,i){return e===r||xt(e,gn[n])&&!Ee.call(i,n)?t:e}function qs(e,t,n,i,o,u){return Le(e)&&Le(t)&&(u.set(t,e),dr(e,t,r,qs,u),u.delete(t)),e}function Zc(e){return Kn(e)?r:e}function Ks(e,t,n,i,o,u){var g=n&_,x=e.length,C=t.length;if(x!=C&&!(g&&C>x))return!1;var F=u.get(e),U=u.get(t);if(F&&U)return F==t&&U==e;var M=-1,X=!0,re=n&R?new en:r;for(u.set(e,t),u.set(t,e);++M<x;){var fe=e[M],ve=t[M];if(i)var ce=g?i(ve,fe,M,t,e,u):i(fe,ve,M,e,t,u);if(ce!==r){if(ce)continue;X=!1;break}if(re){if(!ei(t,function(_e,we){if(!kn(re,we)&&(fe===_e||o(fe,_e,n,i,u)))return re.push(we)})){X=!1;break}}else if(!(fe===ve||o(fe,ve,n,i,u))){X=!1;break}}return u.delete(e),u.delete(t),X}function Qc(e,t,n,i,o,u,g){switch(n){case fn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mt:return!(e.byteLength!=t.byteLength||!u(new nr(e),new nr(t)));case ie:case oe:case _t:return xt(+e,+t);case le:return e.name==t.name&&e.message==t.message;case Xe:case St:return e==t+"";case Oe:var x=si;case Je:var C=i&_;if(x||(x=Vn),e.size!=t.size&&!C)return!1;var F=g.get(e);if(F)return F==t;i|=R,g.set(e,t);var U=Ks(x(e),x(t),i,o,u,g);return g.delete(e),U;case At:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}function jc(e,t,n,i,o,u){var g=n&_,x=Ii(e),C=x.length,F=Ii(t),U=F.length;if(C!=U&&!g)return!1;for(var M=C;M--;){var X=x[M];if(!(g?X in t:Ee.call(t,X)))return!1}var re=u.get(e),fe=u.get(t);if(re&&fe)return re==t&&fe==e;var ve=!0;u.set(e,t),u.set(t,e);for(var ce=g;++M<C;){X=x[M];var _e=e[X],we=t[X];if(i)var at=g?i(we,_e,X,t,e,u):i(_e,we,X,e,t,u);if(!(at===r?_e===we||o(_e,we,n,i,u):at)){ve=!1;break}ce||(ce=X=="constructor")}if(ve&&!ce){var Ze=e.constructor,ft=t.constructor;Ze!=ft&&"constructor"in e&&"constructor"in t&&!(typeof Ze=="function"&&Ze instanceof Ze&&typeof ft=="function"&&ft instanceof ft)&&(ve=!1)}return u.delete(e),u.delete(t),ve}function Bt(e){return Mi(Js(e,r,ru),e+"")}function Ii(e){return as(e,We,Di)}function Li(e){return as(e,et,zs)}var Bi=ar?function(e){return ar.get(e)}:Qi;function br(e){for(var t=e.name+"",n=yn[t],i=Ee.call(yn,t)?n.length:0;i--;){var o=n[i],u=o.func;if(u==null||u==e)return o.name}return t}function xn(e){var t=Ee.call(s,"placeholder")?s:e;return t.placeholder}function ue(){var e=s.iteratee||Vi;return e=e===Vi?hs:e,arguments.length?e(arguments[0],arguments[1]):e}function Sr(e,t){var n=e.__data__;return uh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ni(e){for(var t=We(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,$s(o)]}return t}function rn(e,t){var n=cf(e,t);return cs(n)?n:r}function eh(e){var t=Ee.call(e,Qt),n=e[Qt];try{e[Qt]=r;var i=!0}catch{}var o=er.call(e);return i&&(t?e[Qt]=n:delete e[Qt]),o}var Di=ai?function(e){return e==null?[]:(e=Te(e),Wt(ai(e),function(t){return Yo.call(e,t)}))}:ji,zs=ai?function(e){for(var t=[];e;)qt(t,Di(e)),e=rr(e);return t}:ji,$e=Ye;(fi&&$e(new fi(new ArrayBuffer(1)))!=fn||On&&$e(new On)!=Oe||ci&&$e(ci.resolve())!=an||vn&&$e(new vn)!=Je||In&&$e(new In)!=kt)&&($e=function(e){var t=Ye(e),n=t==rt?e.constructor:r,i=n?on(n):"";if(i)switch(i){case Ff:return fn;case Uf:return Oe;case Pf:return an;case Mf:return Je;case Wf:return kt}return t});function th(e,t,n){for(var i=-1,o=n.length;++i<o;){var u=n[i],g=u.size;switch(u.type){case"drop":e+=g;break;case"dropRight":t-=g;break;case"take":t=Ge(t,e+g);break;case"takeRight":e=Pe(e,t-g);break}}return{start:e,end:t}}function nh(e){var t=e.match(ua);return t?t[1].split(aa):[]}function Hs(e,t,n){t=$t(t,e);for(var i=-1,o=t.length,u=!1;++i<o;){var g=Ct(t[i]);if(!(u=e!=null&&n(e,g)))break;e=e[g]}return u||++i!=o?u:(o=e==null?0:e.length,!!o&&Or(o)&&Nt(g,o)&&(de(e)||sn(e)))}function rh(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Gs(e){return typeof e.constructor=="function"&&!Wn(e)?_n(rr(e)):{}}function ih(e,t,n){var i=e.constructor;switch(t){case Mt:return ki(e);case ie:case oe:return new i(+e);case fn:return qc(e,n);case Nr:case Dr:case Fr:case Ur:case Pr:case Mr:case Wr:case qr:case Kr:return Cs(e,n);case Oe:return new i;case _t:case St:return new i(e);case Xe:return Kc(e);case Je:return new i;case At:return zc(e)}}function oh(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(sa,`{
13
+ */Gn.exports,function(S,y){(function(){var r,l="4.17.21",c=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",h=500,_="__lodash_placeholder__",p=1,u=2,s=4,w=1,T=2,k=1,q=2,oe=4,Y=8,se=16,G=32,D=64,M=128,H=256,L=512,U=30,X="...",j=800,V=16,N=1,be=2,Ae=3,ke=1/0,ae=9007199254740991,qe=17976931348623157e292,bt=NaN,tt=4294967295,zn=tt-1,W=tt>>>1,J=[["ary",M],["bind",k],["bindKey",q],["curry",Y],["curryRight",se],["flip",L],["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]",Ke="[object GeneratorFunction]",Re="[object Map]",yt="[object Number]",xn="[object Null]",nt="[object Object]",an="[object Promise]",Cn="[object Proxy]",ze="[object RegExp]",$e="[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,fo=/&(?:amp|lt|gt|quot|#39);/g,co=/[&<>"']/g,ra=RegExp(fo.source),ia=RegExp(co.source),oa=/<%-([\s\S]+?)%>/g,sa=/<%([\s\S]+?)%>/g,lo=/<%=([\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,ho=/\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",Ta="\\u0300-\\u036f",Ea="\\ufe20-\\ufe2f",ka="\\u20d0-\\u20ff",po=Ta+Ea+ka,go="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",Ra="\\xac\\xb1\\xd7\\xf7",Ia="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oa="\\u2000-\\u206f",La=" \\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",yo="A-Z\\xc0-\\xd6\\xd8-\\xde",_o="\\ufe0e\\ufe0f",mo=Ra+Ia+Oa+La,Xr="['’]",Ba="["+Xn+"]",wo="["+mo+"]",Jn="["+po+"]",So="\\d+",Na="["+go+"]",bo="["+vo+"]",Ao="[^"+Xn+mo+So+go+vo+yo+"]",Jr="\\ud83c[\\udffb-\\udfff]",Ua="(?:"+Jn+"|"+Jr+")",xo="[^"+Xn+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",Zr="[\\ud800-\\udbff][\\udc00-\\udfff]",cn="["+yo+"]",Co="\\u200d",To="(?:"+bo+"|"+Ao+")",Da="(?:"+cn+"|"+Ao+")",Eo="(?:"+Xr+"(?:d|ll|m|re|s|t|ve))?",ko="(?:"+Xr+"(?:D|LL|M|RE|S|T|VE))?",Ro=Ua+"?",Io="["+_o+"]?",Pa="(?:"+Co+"(?:"+[xo,Yr,Zr].join("|")+")"+Io+Ro+")*",Fa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ma="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oo=Io+Ro+Pa,Wa="(?:"+[Na,Yr,Zr].join("|")+")"+Oo,qa="(?:"+[xo+Jn+"?",Jn,Yr,Zr,Ba].join("|")+")",Ka=RegExp(Xr,"g"),Ha=RegExp(Jn,"g"),Vr=RegExp(Jr+"(?="+Jr+")|"+qa+Oo,"g"),Ga=RegExp([cn+"?"+bo+"+"+Eo+"(?="+[wo,cn,"$"].join("|")+")",Da+"+"+ko+"(?="+[wo,cn+To,"$"].join("|")+")",cn+"?"+To+"+"+Eo,cn+"+"+ko,Ma,Fa,So,Wa].join("|"),"g"),za=RegExp("["+Co+Xn+po+_o+"]"),$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,Ee={};Ee[Dr]=Ee[Pr]=Ee[Fr]=Ee[Mr]=Ee[Wr]=Ee[qr]=Ee[Kr]=Ee[Hr]=Ee[Gr]=!0,Ee[F]=Ee[te]=Ee[Wt]=Ee[Q]=Ee[fn]=Ee[ee]=Ee[ue]=Ee[me]=Ee[Re]=Ee[yt]=Ee[nt]=Ee[ze]=Ee[$e]=Ee[At]=Ee[Rt]=!1;var Ce={};Ce[F]=Ce[te]=Ce[Wt]=Ce[fn]=Ce[Q]=Ce[ee]=Ce[Dr]=Ce[Pr]=Ce[Fr]=Ce[Mr]=Ce[Wr]=Ce[Re]=Ce[yt]=Ce[nt]=Ce[ze]=Ce[$e]=Ce[At]=Ce[xt]=Ce[qr]=Ce[Kr]=Ce[Hr]=Ce[Gr]=!0,Ce[ue]=Ce[me]=Ce[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,Lo=typeof Fe=="object"&&Fe&&Fe.Object===Object&&Fe,tf=typeof self=="object"&&self&&self.Object===Object&&self,Me=Lo||tf||Function("return this")(),Qr=y&&!y.nodeType&&y,Vt=Qr&&!0&&S&&!S.nodeType&&S,Bo=Vt&&Vt.exports===Qr,jr=Bo&&Lo.process,ft=function(){try{var A=Vt&&Vt.require&&Vt.require("util").types;return A||jr&&jr.binding&&jr.binding("util")}catch{}}(),No=ft&&ft.isArrayBuffer,Uo=ft&&ft.isDate,Do=ft&&ft.isMap,Po=ft&&ft.isRegExp,Fo=ft&&ft.isSet,Mo=ft&&ft.isTypedArray;function rt(A,R,E){switch(E.length){case 0:return A.call(R);case 1:return A.call(R,E[0]);case 2:return A.call(R,E[0],E[1]);case 3:return A.call(R,E[0],E[1],E[2])}return A.apply(R,E)}function nf(A,R,E,z){for(var fe=-1,_e=A==null?0:A.length;++fe<_e;){var Ue=A[fe];R(z,Ue,E(Ue),A)}return z}function ct(A,R){for(var E=-1,z=A==null?0:A.length;++E<z&&R(A[E],E,A)!==!1;);return A}function rf(A,R){for(var E=A==null?0:A.length;E--&&R(A[E],E,A)!==!1;);return A}function Wo(A,R){for(var E=-1,z=A==null?0:A.length;++E<z;)if(!R(A[E],E,A))return!1;return!0}function qt(A,R){for(var E=-1,z=A==null?0:A.length,fe=0,_e=[];++E<z;){var Ue=A[E];R(Ue,E,A)&&(_e[fe++]=Ue)}return _e}function Yn(A,R){var E=A==null?0:A.length;return!!E&&ln(A,R,0)>-1}function ei(A,R,E){for(var z=-1,fe=A==null?0:A.length;++z<fe;)if(E(R,A[z]))return!0;return!1}function Ie(A,R){for(var E=-1,z=A==null?0:A.length,fe=Array(z);++E<z;)fe[E]=R(A[E],E,A);return fe}function Kt(A,R){for(var E=-1,z=R.length,fe=A.length;++E<z;)A[fe+E]=R[E];return A}function ti(A,R,E,z){var fe=-1,_e=A==null?0:A.length;for(z&&_e&&(E=A[++fe]);++fe<_e;)E=R(E,A[fe],fe,A);return E}function of(A,R,E,z){var fe=A==null?0:A.length;for(z&&fe&&(E=A[--fe]);fe--;)E=R(E,A[fe],fe,A);return E}function ni(A,R){for(var E=-1,z=A==null?0:A.length;++E<z;)if(R(A[E],E,A))return!0;return!1}var sf=ri("length");function uf(A){return A.split("")}function af(A){return A.match(ga)||[]}function qo(A,R,E){var z;return E(A,function(fe,_e,Ue){if(R(fe,_e,Ue))return z=_e,!1}),z}function Zn(A,R,E,z){for(var fe=A.length,_e=E+(z?1:-1);z?_e--:++_e<fe;)if(R(A[_e],_e,A))return _e;return-1}function ln(A,R,E){return R===R?wf(A,R,E):Zn(A,Ko,E)}function ff(A,R,E,z){for(var fe=E-1,_e=A.length;++fe<_e;)if(z(A[fe],R))return fe;return-1}function Ko(A){return A!==A}function Ho(A,R){var E=A==null?0:A.length;return E?oi(A,R)/E: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 Go(A,R,E,z,fe){return fe(A,function(_e,Ue,xe){E=z?(z=!1,_e):R(E,_e,Ue,xe)}),E}function cf(A,R){var E=A.length;for(A.sort(R);E--;)A[E]=A[E].value;return A}function oi(A,R){for(var E,z=-1,fe=A.length;++z<fe;){var _e=R(A[z]);_e!==r&&(E=E===r?_e:E+_e)}return E}function si(A,R){for(var E=-1,z=Array(A);++E<A;)z[E]=R(E);return z}function lf(A,R){return Ie(R,function(E){return[E,A[E]]})}function zo(A){return A&&A.slice(0,Yo(A)+1).replace($r,"")}function it(A){return function(R){return A(R)}}function ui(A,R){return Ie(R,function(E){return A[E]})}function kn(A,R){return A.has(R)}function $o(A,R){for(var E=-1,z=A.length;++E<z&&ln(R,A[E],0)>-1;);return E}function Xo(A,R){for(var E=A.length;E--&&ln(R,A[E],0)>-1;);return E}function hf(A,R){for(var E=A.length,z=0;E--;)A[E]===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,E=[];!(R=A.next()).done;)E.push(R.value);return E}function ai(A){var R=-1,E=Array(A.size);return A.forEach(function(z,fe){E[++R]=[fe,z]}),E}function Jo(A,R){return function(E){return A(R(E))}}function Ht(A,R){for(var E=-1,z=A.length,fe=0,_e=[];++E<z;){var Ue=A[E];(Ue===R||Ue===_)&&(A[E]=_,_e[fe++]=E)}return _e}function Vn(A){var R=-1,E=Array(A.size);return A.forEach(function(z){E[++R]=z}),E}function mf(A){var R=-1,E=Array(A.size);return A.forEach(function(z){E[++R]=[z,z]}),E}function wf(A,R,E){for(var z=E-1,fe=A.length;++z<fe;)if(A[z]===R)return z;return-1}function Sf(A,R,E){for(var z=E+1;z--;)if(A[z]===R)return z;return z}function pn(A){return hn(A)?Af(A):sf(A)}function _t(A){return hn(A)?xf(A):uf(A)}function Yo(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 Tf=function A(R){R=R==null?Me:dn.defaults(Me.Object(),R,dn.pick(Me,Xa));var E=R.Array,z=R.Date,fe=R.Error,_e=R.Function,Ue=R.Math,xe=R.Object,fi=R.RegExp,Ef=R.String,lt=R.TypeError,Qn=E.prototype,kf=_e.prototype,gn=xe.prototype,jn=R["__core-js_shared__"],er=kf.toString,Se=gn.hasOwnProperty,Rf=0,Zo=function(){var e=/[^.]+$/.exec(jn&&jn.keys&&jn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),tr=gn.toString,If=er.call(xe),Of=Me._,Lf=fi("^"+er.call(Se).replace(zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=Bo?R.Buffer:r,Gt=R.Symbol,rr=R.Uint8Array,Vo=nr?nr.allocUnsafe:r,ir=Jo(xe.getPrototypeOf,xe),Qo=xe.create,jo=gn.propertyIsEnumerable,or=Qn.splice,es=Gt?Gt.isConcatSpreadable:r,Rn=Gt?Gt.iterator:r,Qt=Gt?Gt.toStringTag:r,sr=function(){try{var e=rn(xe,"defineProperty");return e({},"",{}),e}catch{}}(),Bf=R.clearTimeout!==Me.clearTimeout&&R.clearTimeout,Nf=z&&z.now!==Me.Date.now&&z.now,Uf=R.setTimeout!==Me.setTimeout&&R.setTimeout,ur=Ue.ceil,ar=Ue.floor,ci=xe.getOwnPropertySymbols,Df=nr?nr.isBuffer:r,ts=R.isFinite,Pf=Qn.join,Ff=Jo(xe.keys,xe),De=Ue.max,He=Ue.min,Mf=z.now,Wf=R.parseInt,ns=Ue.random,qf=Qn.reverse,li=rn(R,"DataView"),In=rn(R,"Map"),hi=rn(R,"Promise"),vn=rn(R,"Set"),On=rn(R,"WeakMap"),Ln=rn(xe,"create"),fr=On&&new On,yn={},Kf=on(li),Hf=on(In),Gf=on(hi),zf=on(vn),$f=on(On),cr=Gt?Gt.prototype:r,Bn=cr?cr.valueOf:r,rs=cr?cr.toString:r;function a(e){if(Le(e)&&!ce(e)&&!(e instanceof ge)){if(e instanceof ht)return e;if(Se.call(e,"__wrapped__"))return iu(e)}return new ht(e)}var _n=function(){function e(){}return function(t){if(!Oe(t))return{};if(Qo)return Qo(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}a.templateSettings={escape:oa,evaluate:sa,interpolate:lo,variable:"",imports:{_:a}},a.prototype=lr.prototype,a.prototype.constructor=a,ht.prototype=_n(lr.prototype),ht.prototype.constructor=ht;function ge(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=tt,this.__views__=[]}function Xf(){var e=new ge(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 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__),v=f.start,b=f.end,C=b-v,I=i?b:v-1,O=this.__iteratees__,B=O.length,K=0,Z=He(C,this.__takeCount__);if(!n||!i&&o==C&&Z==C)return Es(e,this.__actions__);var re=[];e:for(;C--&&K<Z;){I+=t;for(var he=-1,ie=e[I];++he<B;){var de=O[he],ve=de.iteratee,ut=de.type,Ye=ve(ie);if(ut==be)ie=Ye;else if(!Ye){if(ut==N)continue e;break e}}re[K++]=ie}return re}ge.prototype=_n(lr.prototype),ge.prototype.constructor=ge;function jt(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__=Ln?Ln(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(Ln){var n=t[e];return n===x?r:n}return Se.call(t,e)?t[e]:r}function jf(e){var t=this.__data__;return Ln?t[e]!==r:Se.call(t,e)}function ec(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===r?x:t,this}jt.prototype.clear=Zf,jt.prototype.delete=Vf,jt.prototype.get=Qf,jt.prototype.has=jf,jt.prototype.set=ec;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 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}It.prototype.clear=tc,It.prototype.delete=nc,It.prototype.get=rc,It.prototype.has=ic,It.prototype.set=oc;function Ot(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 jt,map:new(In||It),string:new jt}}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}Ot.prototype.clear=sc,Ot.prototype.delete=uc,Ot.prototype.get=ac,Ot.prototype.has=fc,Ot.prototype.set=cc;function en(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ot;++t<n;)this.add(e[t])}function lc(e){return this.__data__.set(e,x),this}function hc(e){return this.__data__.has(e)}en.prototype.add=en.prototype.push=lc,en.prototype.has=hc;function mt(e){var t=this.__data__=new It(e);this.size=t.size}function pc(){this.__data__=new It,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 It){var i=n.__data__;if(!In||i.length<c-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ot(i)}return n.set(e,t),this.size=n.size,this}mt.prototype.clear=pc,mt.prototype.delete=dc,mt.prototype.get=gc,mt.prototype.has=vc,mt.prototype.set=yc;function is(e,t){var n=ce(e),i=!n&&sn(e),o=!n&&!i&&Yt(e),f=!n&&!i&&!o&&bn(e),v=n||i||o||f,b=v?si(e.length,Ef):[],C=b.length;for(var I in e)(t||Se.call(e,I))&&!(v&&(I=="length"||o&&(I=="offset"||I=="parent")||f&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||Ut(I,C)))&&b.push(I);return b}function os(e){var t=e.length;return t?e[Ai(0,t-1)]:r}function _c(e,t){return Cr(Ze(e),tn(t,0,e.length))}function mc(e){return Cr(Ze(e))}function pi(e,t,n){(n!==r&&!wt(e[t],n)||n===r&&!(t in e))&&Lt(e,t,n)}function Nn(e,t,n){var i=e[t];(!(Se.call(e,t)&&wt(i,n))||n===r&&!(t in e))&&Lt(e,t,n)}function hr(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function wc(e,t,n,i){return zt(e,function(o,f,v){t(i,o,n(o),v)}),i}function ss(e,t){return e&&Tt(t,Pe(t),e)}function Sc(e,t){return e&&Tt(t,Qe(t),e)}function Lt(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 tn(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 v,b=t&p,C=t&u,I=t&s;if(n&&(v=o?n(e,i,o,f):n(e)),v!==r)return v;if(!Oe(e))return e;var O=ce(e);if(O){if(v=fl(e),!b)return Ze(e,v)}else{var B=Ge(e),K=B==me||B==Ke;if(Yt(e))return Is(e,b);if(B==nt||B==F||K&&!o){if(v=C||K?{}:Ys(e),!b)return C?Qc(e,Sc(v,e)):Vc(e,ss(v,e))}else{if(!Ce[B])return o?e:{};v=cl(e,B,b)}}f||(f=new mt);var Z=f.get(e);if(Z)return Z;f.set(e,v),xu(e)?e.forEach(function(ie){v.add(pt(ie,t,n,ie,e,f))}):bu(e)&&e.forEach(function(ie,de){v.set(de,pt(ie,t,n,de,e,f))});var re=I?C?Ni:Bi:C?Qe:Pe,he=O?r:re(e);return ct(he||e,function(ie,de){he&&(de=ie,ie=e[de]),Nn(v,de,pt(ie,t,n,de,e,f))}),v}function bc(e){var t=Pe(e);return function(n){return us(n,e,t)}}function us(e,t,n){var i=n.length;if(e==null)return!i;for(e=xe(e);i--;){var o=n[i],f=t[o],v=e[o];if(v===r&&!(o in e)||!f(v))return!1}return!0}function as(e,t,n){if(typeof e!="function")throw new lt(m);return qn(function(){e.apply(r,n)},t)}function Un(e,t,n,i){var o=-1,f=Yn,v=!0,b=e.length,C=[],I=t.length;if(!b)return C;n&&(t=Ie(t,it(n))),i?(f=ei,v=!1):t.length>=c&&(f=kn,v=!1,t=new en(t));e:for(;++o<b;){var O=e[o],B=n==null?O:n(O);if(O=i||O!==0?O:0,v&&B===B){for(var K=I;K--;)if(t[K]===B)continue e;C.push(O)}else f(t,B,i)||C.push(O)}return C}var zt=Us(Ct),fs=Us(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],v=t(f);if(v!=null&&(b===r?v===v&&!st(v):n(v,b)))var b=v,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:Tu(i);n<i;)e[n++]=t;return e}function cs(e,t){var n=[];return zt(e,function(i,o,f){t(i,o,f)&&n.push(i)}),n}function We(e,t,n,i,o){var f=-1,v=e.length;for(n||(n=hl),o||(o=[]);++f<v;){var b=e[f];t>0&&n(b)?t>1?We(b,t-1,n,i,o):Kt(o,b):i||(o[o.length]=b)}return o}var gi=Ds(),ls=Ds(!0);function Ct(e,t){return e&&gi(e,t,Pe)}function vi(e,t){return e&&ls(e,t,Pe)}function dr(e,t){return qt(t,function(n){return Dt(e[n])})}function nn(e,t){t=Xt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Et(t[n++])];return n&&n==i?e:r}function hs(e,t,n){var i=t(e);return ce(e)?i:Kt(i,n(e))}function Xe(e){return e==null?e===r?Tn:xn:Qt&&Qt in xe(e)?sl(e):ml(e)}function yi(e,t){return e>t}function Cc(e,t){return e!=null&&Se.call(e,t)}function Tc(e,t){return e!=null&&t in xe(e)}function Ec(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,v=f,b=E(f),C=1/0,I=[];v--;){var O=e[v];v&&t&&(O=Ie(O,it(t))),C=He(O.length,C),b[v]=!n&&(t||o>=120&&O.length>=120)?new en(v&&O):r}O=e[0];var B=-1,K=b[0];e:for(;++B<o&&I.length<C;){var Z=O[B],re=t?t(Z):Z;if(Z=n||Z!==0?Z:0,!(K?kn(K,re):i(I,re,n))){for(v=f;--v;){var he=b[v];if(!(he?kn(he,re):i(e[v],re,n)))continue e}K&&K.push(re),I.push(Z)}}return I}function kc(e,t,n,i){return Ct(e,function(o,f,v){t(i,n(o),f,v)}),i}function Dn(e,t,n){t=Xt(t,e),e=js(e,t);var i=e==null?e:e[Et(gt(t))];return i==null?r:rt(i,e,n)}function ps(e){return Le(e)&&Xe(e)==F}function Rc(e){return Le(e)&&Xe(e)==Wt}function Ic(e){return Le(e)&&Xe(e)==ee}function Pn(e,t,n,i,o){return e===t?!0:e==null||t==null||!Le(e)&&!Le(t)?e!==e&&t!==t:Oc(e,t,n,i,Pn,o)}function Oc(e,t,n,i,o,f){var v=ce(e),b=ce(t),C=v?te:Ge(e),I=b?te:Ge(t);C=C==F?nt:C,I=I==F?nt:I;var O=C==nt,B=I==nt,K=C==I;if(K&&Yt(e)){if(!Yt(t))return!1;v=!0,O=!1}if(K&&!O)return f||(f=new mt),v||bn(e)?$s(e,t,n,i,o,f):il(e,t,C,n,i,o,f);if(!(n&w)){var Z=O&&Se.call(e,"__wrapped__"),re=B&&Se.call(t,"__wrapped__");if(Z||re){var he=Z?e.value():e,ie=re?t.value():t;return f||(f=new mt),o(he,ie,n,i,f)}}return K?(f||(f=new mt),ol(e,t,n,i,o,f)):!1}function Lc(e){return Le(e)&&Ge(e)==Re}function mi(e,t,n,i){var o=n.length,f=o,v=!i;if(e==null)return!f;for(e=xe(e);o--;){var b=n[o];if(v&&b[2]?b[1]!==e[b[0]]:!(b[0]in e))return!1}for(;++o<f;){b=n[o];var C=b[0],I=e[C],O=b[1];if(v&&b[2]){if(I===r&&!(C in e))return!1}else{var B=new mt;if(i)var K=i(I,O,C,e,t,B);if(!(K===r?Pn(O,I,w|T,i,B):K))return!1}}return!0}function ds(e){if(!Oe(e)||dl(e))return!1;var t=Dt(e)?Lf:Sa;return t.test(on(e))}function Bc(e){return Le(e)&&Xe(e)==ze}function Nc(e){return Le(e)&&Ge(e)==$e}function Uc(e){return Le(e)&&Or(e.length)&&!!Ee[Xe(e)]}function gs(e){return typeof e=="function"?e:e==null?je:typeof e=="object"?ce(e)?_s(e[0],e[1]):ys(e):Pu(e)}function wi(e){if(!Wn(e))return Ff(e);var t=[];for(var n in xe(e))Se.call(e,n)&&n!="constructor"&&t.push(n);return t}function Dc(e){if(!Oe(e))return _l(e);var t=Wn(e),n=[];for(var i in e)i=="constructor"&&(t||!Se.call(e,i))||n.push(i);return n}function Si(e,t){return e<t}function vs(e,t){var n=-1,i=Ve(e)?E(e.length):[];return zt(e,function(o,f,v){i[++n]=t(o,f,v)}),i}function ys(e){var t=Di(e);return t.length==1&&t[0][2]?Vs(t[0][0],t[0][1]):function(n){return n===e||mi(n,e,t)}}function _s(e,t){return Fi(e)&&Zs(t)?Vs(Et(e),t):function(n){var i=Ji(n,e);return i===r&&i===t?Yi(n,e):Pn(t,i,w|T)}}function gr(e,t,n,i,o){e!==t&&gi(t,function(f,v){if(o||(o=new mt),Oe(f))Pc(e,t,v,n,gr,i,o);else{var b=i?i(Wi(e,v),f,v+"",e,t,o):r;b===r&&(b=f),pi(e,v,b)}},Qe)}function Pc(e,t,n,i,o,f,v){var b=Wi(e,n),C=Wi(t,n),I=v.get(C);if(I){pi(e,n,I);return}var O=f?f(b,C,n+"",e,t,v):r,B=O===r;if(B){var K=ce(C),Z=!K&&Yt(C),re=!K&&!Z&&bn(C);O=C,K||Z||re?ce(b)?O=b:Be(b)?O=Ze(b):Z?(B=!1,O=Is(C,!0)):re?(B=!1,O=Os(C,!0)):O=[]:Kn(C)||sn(C)?(O=b,sn(b)?O=Eu(b):(!Oe(b)||Dt(b))&&(O=Ys(C))):B=!1}B&&(v.set(C,O),o(O,C,i,f,v),v.delete(C)),pi(e,n,O)}function ms(e,t){var n=e.length;if(n)return t+=t<0?n:0,Ut(t,n)?e[t]:r}function ws(e,t,n){t.length?t=Ie(t,function(f){return ce(f)?function(v){return nn(v,f.length===1?f[0]:f)}:f}):t=[je];var i=-1;t=Ie(t,it(ne()));var o=vs(e,function(f,v,b){var C=Ie(t,function(I){return I(f)});return{criteria:C,index:++i,value:f}});return cf(o,function(f,v){return Zc(f,v,n)})}function Fc(e,t){return Ss(e,t,function(n,i){return Yi(e,i)})}function Ss(e,t,n){for(var i=-1,o=t.length,f={};++i<o;){var v=t[i],b=nn(e,v);n(b,v)&&Fn(f,Xt(v,e),b)}return f}function Mc(e){return function(t){return nn(t,e)}}function bi(e,t,n,i){var o=i?ff:ln,f=-1,v=t.length,b=e;for(e===t&&(t=Ze(t)),n&&(b=Ie(e,it(n)));++f<v;)for(var C=0,I=t[f],O=n?n(I):I;(C=o(b,O,C,i))>-1;)b!==e&&or.call(b,C,1),or.call(e,C,1);return e}function bs(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):Ti(e,o)}}return e}function Ai(e,t){return e+ar(ns()*(t-e+1))}function Wc(e,t,n,i){for(var o=-1,f=De(ur((t-e)/(n||1)),0),v=E(f);f--;)v[i?f:++o]=e,e+=n;return v}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(Qs(e,t,je),e+"")}function qc(e){return os(An(e))}function Kc(e,t){var n=An(e);return Cr(n,tn(t,0,n.length))}function Fn(e,t,n,i){if(!Oe(e))return e;t=Xt(t,e);for(var o=-1,f=t.length,v=f-1,b=e;b!=null&&++o<f;){var C=Et(t[o]),I=n;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(o!=v){var O=b[C];I=i?i(O,C,b):r,I===r&&(I=Oe(O)?O:Ut(t[o+1])?[]:{})}Nn(b,C,I),b=b[C]}return e}var As=fr?function(e,t){return fr.set(e,t),e}:je,Hc=sr?function(e,t){return sr(e,"toString",{configurable:!0,enumerable:!1,value:Vi(t),writable:!0})}:je;function Gc(e){return Cr(An(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 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,v=e[f];v!==null&&!st(v)&&(n?v<=t:v<t)?i=f+1:o=f}return o}return Ci(e,t,je,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 v=t!==t,b=t===null,C=st(t),I=t===r;o<f;){var O=ar((o+f)/2),B=n(e[O]),K=B!==r,Z=B===null,re=B===B,he=st(B);if(v)var ie=i||re;else I?ie=re&&(i||K):b?ie=re&&K&&(i||!Z):C?ie=re&&K&&!Z&&(i||!he):Z||he?ie=!1:ie=i?B<=t:B<t;ie?o=O+1:f=O}return He(f,zn)}function xs(e,t){for(var n=-1,i=e.length,o=0,f=[];++n<i;){var v=e[n],b=t?t(v):v;if(!n||!wt(b,C)){var C=b;f[o++]=v===0?0:v}}return f}function Cs(e){return typeof e=="number"?e:st(e)?bt:+e}function ot(e){if(typeof e=="string")return e;if(ce(e))return Ie(e,ot)+"";if(st(e))return rs?rs.call(e):"";var t=e+"";return t=="0"&&1/e==-ke?"-0":t}function $t(e,t,n){var i=-1,o=Yn,f=e.length,v=!0,b=[],C=b;if(n)v=!1,o=ei;else if(f>=c){var I=t?null:nl(e);if(I)return Vn(I);v=!1,o=kn,C=new en}else C=t?[]:b;e:for(;++i<f;){var O=e[i],B=t?t(O):O;if(O=n||O!==0?O:0,v&&B===B){for(var K=C.length;K--;)if(C[K]===B)continue e;t&&C.push(B),b.push(O)}else o(C,B,n)||(C!==b&&C.push(B),b.push(O))}return b}function Ti(e,t){return t=Xt(t,e),e=js(e,t),e==null||delete e[Et(gt(t))]}function Ts(e,t,n,i){return Fn(e,t,n(nn(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 Es(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 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 v=e[o],b=-1;++b<i;)b!=o&&(f[o]=Un(f[o]||v,e[b],t,n));return $t(We(f,1),t,n)}function ks(e,t,n){for(var i=-1,o=e.length,f=t.length,v={};++i<o;){var b=i<f?t[i]:r;n(v,e[i],b)}return v}function ki(e){return Be(e)?e:[]}function Ri(e){return typeof e=="function"?e:je}function Xt(e,t){return ce(e)?e:Fi(e,t)?[e]:ru(we(e))}var $c=pe;function Jt(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:dt(e,t,n)}var Rs=Bf||function(e){return Me.clearTimeout(e)};function Is(e,t){if(t)return e.slice();var n=e.length,i=Vo?Vo(n):new e.constructor(n);return e.copy(i),i}function Ii(e){var t=new e.constructor(e.byteLength);return new rr(t).set(new rr(e)),t}function Xc(e,t){var n=t?Ii(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jc(e){var t=new e.constructor(e.source,ho.exec(e));return t.lastIndex=e.lastIndex,t}function Yc(e){return Bn?xe(Bn.call(e)):{}}function Os(e,t){var n=t?Ii(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),v=t!==r,b=t===null,C=t===t,I=st(t);if(!b&&!I&&!f&&e>t||f&&v&&C&&!b&&!I||i&&v&&C||!n&&C||!o)return 1;if(!i&&!f&&!I&&e<t||I&&n&&o&&!i&&!f||b&&n&&o||!v&&o||!C)return-1}return 0}function Zc(e,t,n){for(var i=-1,o=e.criteria,f=t.criteria,v=o.length,b=n.length;++i<v;){var C=Ls(o[i],f[i]);if(C){if(i>=b)return C;var I=n[i];return C*(I=="desc"?-1:1)}}return e.index-t.index}function Bs(e,t,n,i){for(var o=-1,f=e.length,v=n.length,b=-1,C=t.length,I=De(f-v,0),O=E(C+I),B=!i;++b<C;)O[b]=t[b];for(;++o<v;)(B||o<f)&&(O[n[o]]=e[o]);for(;I--;)O[b++]=e[o++];return O}function Ns(e,t,n,i){for(var o=-1,f=e.length,v=-1,b=n.length,C=-1,I=t.length,O=De(f-b,0),B=E(O+I),K=!i;++o<O;)B[o]=e[o];for(var Z=o;++C<I;)B[Z+C]=t[C];for(;++v<b;)(K||o<f)&&(B[Z+n[v]]=e[o++]);return B}function Ze(e,t){var n=-1,i=e.length;for(t||(t=E(i));++n<i;)t[n]=e[n];return t}function Tt(e,t,n,i){var o=!n;n||(n={});for(var f=-1,v=t.length;++f<v;){var b=t[f],C=i?i(n[b],e[b],b,n,e):r;C===r&&(C=e[b]),o?Lt(n,b,C):Nn(n,b,C)}return n}function Vc(e,t){return Tt(e,Pi(e),t)}function Qc(e,t){return Tt(e,Xs(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,v=o>2?n[2]:r;for(f=e.length>3&&typeof f=="function"?(o--,f):r,v&&Je(n[0],n[1],v)&&(f=o<3?r:f,o=1),t=xe(t);++i<o;){var b=n[i];b&&e(t,b,i,f)}return t})}function Us(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,v=xe(n);(t?f--:++f<o)&&i(v[f],f,v)!==!1;);return n}}function Ds(e){return function(t,n,i){for(var o=-1,f=xe(t),v=i(t),b=v.length;b--;){var C=v[e?b:++o];if(n(f[C],C,f)===!1)break}return t}}function jc(e,t,n){var i=t&k,o=Mn(e);function f(){var v=this&&this!==Me&&this instanceof f?o:e;return v.apply(i?n:this,arguments)}return f}function Ps(e){return function(t){t=we(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(Uu(Nu(t).replace(Ka,"")),e,"")}}function Mn(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 Oe(i)?i:n}}function el(e,t,n){var i=Mn(e);function o(){for(var f=arguments.length,v=E(f),b=f,C=Sn(o);b--;)v[b]=arguments[b];var I=f<3&&v[0]!==C&&v[f-1]!==C?[]:Ht(v,C);if(f-=I.length,f<n)return Ks(e,t,mr,o.placeholder,r,v,I,r,r,n-f);var O=this&&this!==Me&&this instanceof o?i:e;return rt(O,this,v)}return o}function Fs(e){return function(t,n,i){var o=xe(t);if(!Ve(t)){var f=ne(n,3);t=Pe(t),n=function(b){return f(o[b],b,o)}}var v=e(t,n,i);return v>-1?o[f?t[v]:v]:r}}function Ms(e){return Nt(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&&!v&&Ar(f)=="wrapper")var v=new ht([],!0)}for(i=v?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?v=v[Ar(C[0])].apply(v,C[3]):v=f.length==1&&Mi(f)?v[b]():v.thru(f)}return function(){var I=arguments,O=I[0];if(v&&I.length==1&&ce(O))return v.plant(O).value();for(var B=0,K=n?t[B].apply(this,I):O;++B<n;)K=t[B].call(this,K);return K}})}function mr(e,t,n,i,o,f,v,b,C,I){var O=t&M,B=t&k,K=t&q,Z=t&(Y|se),re=t&L,he=K?r:Mn(e);function ie(){for(var de=arguments.length,ve=E(de),ut=de;ut--;)ve[ut]=arguments[ut];if(Z)var Ye=Sn(ie),at=hf(ve,Ye);if(i&&(ve=Bs(ve,i,o,Z)),f&&(ve=Ns(ve,f,v,Z)),de-=at,Z&&de<I){var Ne=Ht(ve,Ye);return Ks(e,t,mr,ie.placeholder,n,ve,Ne,b,C,I-de)}var St=B?n:this,Ft=K?St[e]:e;return de=ve.length,b?ve=wl(ve,b):re&&de>1&&ve.reverse(),O&&C<de&&(ve.length=C),this&&this!==Me&&this instanceof ie&&(Ft=he||Mn(Ft)),Ft.apply(St,ve)}return ie}function Ws(e,t){return function(n,i){return kc(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=Cs(n),i=Cs(i)),o=e(n,i)}return o}}function Oi(e){return Nt(function(t){return t=Ie(t,it(ne())),pe(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?xi(t,e):t;var i=xi(t,ur(e/pn(t)));return hn(t)?Jt(_t(i),0,e).join(""):i.slice(0,e)}function tl(e,t,n,i){var o=t&k,f=Mn(e);function v(){for(var b=-1,C=arguments.length,I=-1,O=i.length,B=E(O+C),K=this&&this!==Me&&this instanceof v?f:e;++I<O;)B[I]=i[I];for(;C--;)B[I++]=arguments[++b];return rt(K,o?n:this,B)}return v}function qs(e){return function(t,n,i){return i&&typeof i!="number"&&Je(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=vt(t),n=vt(n)),e(t,n)}}function Ks(e,t,n,i,o,f,v,b,C,I){var O=t&Y,B=O?v:r,K=O?r:v,Z=O?f:r,re=O?r:f;t|=O?G:D,t&=~(O?D:G),t&oe||(t&=~(k|q));var he=[e,t,o,Z,B,re,K,b,C,I],ie=n.apply(r,he);return Mi(e)&&eu(ie,he),ie.placeholder=i,tu(ie,e,t)}function Li(e){var t=Ue[e];return function(n,i){if(n=vt(n),i=i==null?0:He(le(i),292),i&&ts(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]==ke?function(e){return new vn(e)}:eo;function Hs(e){return function(t){var n=Ge(t);return n==Re?ai(t):n==$e?mf(t):lf(t,e(t))}}function Bt(e,t,n,i,o,f,v,b){var C=t&q;if(!C&&typeof e!="function")throw new lt(m);var I=i?i.length:0;if(I||(t&=~(G|D),i=o=r),v=v===r?v:De(le(v),0),b=b===r?b:le(b),I-=o?o.length:0,t&D){var O=i,B=o;i=o=r}var K=C?r:Ui(e),Z=[e,t,n,i,o,O,B,f,v,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]-I,0),!b&&t&(Y|se)&&(t&=~(Y|se)),!t||t==k)var re=jc(e,t,n);else t==Y||t==se?re=el(e,t,b):(t==G||t==(k|G))&&!o.length?re=tl(e,t,n,i):re=mr.apply(r,Z);var he=K?As:eu;return tu(he(re,Z),e,t)}function Gs(e,t,n,i){return e===r||wt(e,gn[n])&&!Se.call(i,n)?t:e}function zs(e,t,n,i,o,f){return Oe(e)&&Oe(t)&&(f.set(t,e),gr(e,t,r,zs,f),f.delete(t)),e}function rl(e){return Kn(e)?r:e}function $s(e,t,n,i,o,f){var v=n&w,b=e.length,C=t.length;if(b!=C&&!(v&&C>b))return!1;var I=f.get(e),O=f.get(t);if(I&&O)return I==t&&O==e;var B=-1,K=!0,Z=n&T?new en:r;for(f.set(e,t),f.set(t,e);++B<b;){var re=e[B],he=t[B];if(i)var ie=v?i(he,re,B,t,e,f):i(re,he,B,e,t,f);if(ie!==r){if(ie)continue;K=!1;break}if(Z){if(!ni(t,function(de,ve){if(!kn(Z,ve)&&(re===de||o(re,de,n,i,f)))return Z.push(ve)})){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,v){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 ue:return e.name==t.name&&e.message==t.message;case ze:case At:return e==t+"";case Re:var b=ai;case $e:var C=i&w;if(b||(b=Vn),e.size!=t.size&&!C)return!1;var I=v.get(e);if(I)return I==t;i|=T,v.set(e,t);var O=$s(b(e),b(t),i,o,f,v);return v.delete(e),O;case xt:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}function ol(e,t,n,i,o,f){var v=n&w,b=Bi(e),C=b.length,I=Bi(t),O=I.length;if(C!=O&&!v)return!1;for(var B=C;B--;){var K=b[B];if(!(v?K in t:Se.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=v;++B<C;){K=b[B];var de=e[K],ve=t[K];if(i)var ut=v?i(ve,de,K,t,e,f):i(de,ve,K,e,t,f);if(!(ut===r?de===ve||o(de,ve,n,i,f):ut)){he=!1;break}ie||(ie=K=="constructor")}if(he&&!ie){var Ye=e.constructor,at=t.constructor;Ye!=at&&"constructor"in e&&"constructor"in t&&!(typeof Ye=="function"&&Ye instanceof Ye&&typeof at=="function"&&at instanceof at)&&(he=!1)}return f.delete(e),f.delete(t),he}function Nt(e){return qi(Qs(e,r,uu),e+"")}function Bi(e){return hs(e,Pe,Pi)}function Ni(e){return hs(e,Qe,Xs)}var Ui=fr?function(e){return fr.get(e)}:eo;function Ar(e){for(var t=e.name+"",n=yn[t],i=Se.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=Se.call(a,"placeholder")?a:e;return t.placeholder}function ne(){var e=a.iteratee||Qi;return e=e===Qi?gs: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,Zs(o)]}return t}function rn(e,t){var n=vf(e,t);return ds(n)?n:r}function sl(e){var t=Se.call(e,Qt),n=e[Qt];try{e[Qt]=r;var i=!0}catch{}var o=tr.call(e);return i&&(t?e[Qt]=n:delete e[Qt]),o}var Pi=ci?function(e){return e==null?[]:(e=xe(e),qt(ci(e),function(t){return jo.call(e,t)}))}:to,Xs=ci?function(e){for(var t=[];e;)Kt(t,Pi(e)),e=ir(e);return t}:to,Ge=Xe;(li&&Ge(new li(new ArrayBuffer(1)))!=fn||In&&Ge(new In)!=Re||hi&&Ge(hi.resolve())!=an||vn&&Ge(new vn)!=$e||On&&Ge(new On)!=Rt)&&(Ge=function(e){var t=Xe(e),n=t==nt?e.constructor:r,i=n?on(n):"";if(i)switch(i){case Kf:return fn;case Hf:return Re;case Gf:return an;case zf:return $e;case $f:return Rt}return t});function ul(e,t,n){for(var i=-1,o=n.length;++i<o;){var f=n[i],v=f.size;switch(f.type){case"drop":e+=v;break;case"dropRight":t-=v;break;case"take":t=He(t,e+v);break;case"takeRight":e=De(e,t-v);break}}return{start:e,end:t}}function al(e){var t=e.match(pa);return t?t[1].split(da):[]}function Js(e,t,n){t=Xt(t,e);for(var i=-1,o=t.length,f=!1;++i<o;){var v=Et(t[i]);if(!(f=e!=null&&n(e,v)))break;e=e[v]}return f||++i!=o?f:(o=e==null?0:e.length,!!o&&Or(o)&&Ut(v,o)&&(ce(e)||sn(e)))}function fl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Se.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ys(e){return typeof e.constructor=="function"&&!Wn(e)?_n(ir(e)):{}}function cl(e,t,n){var i=e.constructor;switch(t){case Wt:return Ii(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 Os(e,n);case Re:return new i;case yt:case At:return new i(e);case ze:return Jc(e);case $e: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,`{
17
14
  /* [wrapped with `+t+`] */
18
- `)}function sh(e){return de(e)||sn(e)||!!(Vo&&e&&e[Vo])}function Nt(e,t){var n=typeof e;return t=t??L,!!t&&(n=="number"||n!="symbol"&&ya.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e,t,n){if(!Le(n))return!1;var i=typeof t;return(i=="number"?je(n)&&Nt(t,n.length):i=="string"&&t in n)?xt(n[t],e):!1}function Fi(e,t){if(de(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ut(e)?!0:na.test(e)||!ta.test(e)||t!=null&&e in Te(t)}function uh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ui(e){var t=br(e),n=s[t];if(typeof n!="function"||!(t in me.prototype))return!1;if(e===n)return!0;var i=Bi(n);return!!i&&e===i[0]}function ah(e){return!!$o&&$o in e}var fh=Qn?Dt:eo;function Wn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gn;return e===n}function $s(e){return e===e&&!Le(e)}function Xs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in Te(n))}}function ch(e){var t=kr(e,function(i){return n.size===m&&n.clear(),i}),n=t.cache;return t}function hh(e,t){var n=e[1],i=t[1],o=n|i,u=o<(D|Q|z),g=i==z&&n==te||i==z&&n==J&&e[7].length<=t[8]||i==(z|J)&&t[7].length<=t[8]&&n==te;if(!(u||g))return e;i&D&&(e[2]=t[2],o|=n&D?0:ae);var x=t[3];if(x){var C=e[3];e[3]=C?Rs(C,x,t[4]):x,e[4]=C?Kt(e[3],I):t[4]}return x=t[5],x&&(C=e[5],e[5]=C?Os(C,x,t[6]):x,e[6]=C?Kt(e[5],I):t[6]),x=t[7],x&&(e[7]=x),i&z&&(e[8]=e[8]==null?t[8]:Ge(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function lh(e){var t=[];if(e!=null)for(var n in Te(e))t.push(n);return t}function ph(e){return er.call(e)}function Js(e,t,n){return t=Pe(t===r?e.length-1:t,0),function(){for(var i=arguments,o=-1,u=Pe(i.length-t,0),g=O(u);++o<u;)g[o]=i[t+o];o=-1;for(var x=O(t+1);++o<t;)x[o]=i[o];return x[t]=n(g),it(e,this,x)}}function Ys(e,t){return t.length<2?e:nn(e,gt(t,0,-1))}function dh(e,t){for(var n=e.length,i=Ge(t.length,n),o=Qe(e);i--;){var u=t[i];e[i]=Nt(u,n)?o[u]:r}return e}function Pi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Vs=Qs(ms),qn=Rf||function(e,t){return qe.setTimeout(e,t)},Mi=Qs(Uc);function Zs(e,t,n){var i=t+"";return Mi(e,oh(i,gh(nh(i),n)))}function Qs(e){var t=0,n=0;return function(){var i=Bf(),o=d-(i-n);if(n=i,o>0){if(++t>=a)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ar(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var u=xi(n,o),g=e[u];e[u]=e[n],e[n]=g}return e.length=t,e}var js=ch(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ra,function(n,i,o,u){t.push(o?u.replace(ha,"$1"):i||n)}),t});function Ct(e){if(typeof e=="string"||ut(e))return e;var t=e+"";return t=="0"&&1/e==-P?"-0":t}function on(e){if(e!=null){try{return jn.call(e)}catch{}try{return e+""}catch{}}return""}function gh(e,t){return ht(ne,function(n){var i="_."+n[0];t&n[1]&&!Jn(e,i)&&e.push(i)}),e.sort()}function eu(e){if(e instanceof me)return e.clone();var t=new pt(e.__wrapped__,e.__chain__);return t.__actions__=Qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function vh(e,t,n){(n?Ve(e,t,n):t===r)?t=1:t=Pe(ge(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,u=0,g=O(sr(i/t));o<i;)g[u++]=gt(e,o,o+=t);return g}function yh(e){for(var t=-1,n=e==null?0:e.length,i=0,o=[];++t<n;){var u=e[t];u&&(o[i++]=u)}return o}function _h(){var e=arguments.length;if(!e)return[];for(var t=O(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return qt(de(n)?Qe(n):[n],Ke(t,1))}var mh=ye(function(e,t){return De(e)?Dn(e,Ke(t,1,De,!0)):[]}),wh=ye(function(e,t){var n=vt(t);return De(n)&&(n=r),De(e)?Dn(e,Ke(t,1,De,!0),ue(n,2)):[]}),xh=ye(function(e,t){var n=vt(t);return De(n)&&(n=r),De(e)?Dn(e,Ke(t,1,De,!0),r,n):[]});function bh(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:ge(t),gt(e,t<0?0:t,i)):[]}function Sh(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:ge(t),t=i-t,gt(e,0,t<0?0:t)):[]}function Ah(e,t){return e&&e.length?vr(e,ue(t,3),!0,!0):[]}function Eh(e,t){return e&&e.length?vr(e,ue(t,3),!0):[]}function Th(e,t,n,i){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Ve(e,t,n)&&(n=0,i=o),_c(e,t,n,i)):[]}function tu(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:ge(n);return o<0&&(o=Pe(i+o,0)),Yn(e,ue(t,3),o)}function nu(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ge(n),o=n<0?Pe(i+o,0):Ge(o,i-1)),Yn(e,ue(t,3),o,!0)}function ru(e){var t=e==null?0:e.length;return t?Ke(e,1):[]}function Ch(e){var t=e==null?0:e.length;return t?Ke(e,P):[]}function kh(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:ge(t),Ke(e,t)):[]}function Rh(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 iu(e){return e&&e.length?e[0]:r}function Oh(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:ge(n);return o<0&&(o=Pe(i+o,0)),hn(e,t,o)}function Ih(e){var t=e==null?0:e.length;return t?gt(e,0,-1):[]}var Lh=ye(function(e){var t=Ie(e,Ti);return t.length&&t[0]===e[0]?vi(t):[]}),Bh=ye(function(e){var t=vt(e),n=Ie(e,Ti);return t===vt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?vi(n,ue(t,2)):[]}),Nh=ye(function(e){var t=vt(e),n=Ie(e,Ti);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?vi(n,r,t):[]});function Dh(e,t){return e==null?"":If.call(e,t)}function vt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Fh(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=ge(n),o=o<0?Pe(i+o,0):Ge(o,i-1)),t===t?gf(e,t,o):Yn(e,Po,o,!0)}function Uh(e,t){return e&&e.length?gs(e,ge(t)):r}var Ph=ye(ou);function ou(e,t){return e&&e.length&&t&&t.length?wi(e,t):e}function Mh(e,t,n){return e&&e.length&&t&&t.length?wi(e,t,ue(n,2)):e}function Wh(e,t,n){return e&&e.length&&t&&t.length?wi(e,t,r,n):e}var qh=Bt(function(e,t){var n=e==null?0:e.length,i=li(e,t);return _s(e,Ie(t,function(o){return Nt(o,n)?+o:o}).sort(ks)),i});function Kh(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,o=[],u=e.length;for(t=ue(t,3);++i<u;){var g=e[i];t(g,i,e)&&(n.push(g),o.push(i))}return _s(e,o),n}function Wi(e){return e==null?e:Df.call(e)}function zh(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&Ve(e,t,n)?(t=0,n=i):(t=t==null?0:ge(t),n=n===r?i:ge(n)),gt(e,t,n)):[]}function Hh(e,t){return gr(e,t)}function Gh(e,t,n){return Si(e,t,ue(n,2))}function $h(e,t){var n=e==null?0:e.length;if(n){var i=gr(e,t);if(i<n&&xt(e[i],t))return i}return-1}function Xh(e,t){return gr(e,t,!0)}function Jh(e,t,n){return Si(e,t,ue(n,2),!0)}function Yh(e,t){var n=e==null?0:e.length;if(n){var i=gr(e,t,!0)-1;if(xt(e[i],t))return i}return-1}function Vh(e){return e&&e.length?ws(e):[]}function Zh(e,t){return e&&e.length?ws(e,ue(t,2)):[]}function Qh(e){var t=e==null?0:e.length;return t?gt(e,1,t):[]}function jh(e,t,n){return e&&e.length?(t=n||t===r?1:ge(t),gt(e,0,t<0?0:t)):[]}function el(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:ge(t),t=i-t,gt(e,t<0?0:t,i)):[]}function tl(e,t){return e&&e.length?vr(e,ue(t,3),!1,!0):[]}function nl(e,t){return e&&e.length?vr(e,ue(t,3)):[]}var rl=ye(function(e){return Gt(Ke(e,1,De,!0))}),il=ye(function(e){var t=vt(e);return De(t)&&(t=r),Gt(Ke(e,1,De,!0),ue(t,2))}),ol=ye(function(e){var t=vt(e);return t=typeof t=="function"?t:r,Gt(Ke(e,1,De,!0),r,t)});function sl(e){return e&&e.length?Gt(e):[]}function ul(e,t){return e&&e.length?Gt(e,ue(t,2)):[]}function al(e,t){return t=typeof t=="function"?t:r,e&&e.length?Gt(e,r,t):[]}function qi(e){if(!(e&&e.length))return[];var t=0;return e=Wt(e,function(n){if(De(n))return t=Pe(n.length,t),!0}),ii(t,function(n){return Ie(e,ti(n))})}function su(e,t){if(!(e&&e.length))return[];var n=qi(e);return t==null?n:Ie(n,function(i){return it(t,r,i)})}var fl=ye(function(e,t){return De(e)?Dn(e,t):[]}),cl=ye(function(e){return Ei(Wt(e,De))}),hl=ye(function(e){var t=vt(e);return De(t)&&(t=r),Ei(Wt(e,De),ue(t,2))}),ll=ye(function(e){var t=vt(e);return t=typeof t=="function"?t:r,Ei(Wt(e,De),r,t)}),pl=ye(qi);function dl(e,t){return As(e||[],t||[],Nn)}function gl(e,t){return As(e||[],t||[],Pn)}var vl=ye(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,su(e,n)});function uu(e){var t=s(e);return t.__chain__=!0,t}function yl(e,t){return t(e),e}function Er(e,t){return t(e)}var _l=Bt(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(u){return li(u,e)};return t>1||this.__actions__.length||!(i instanceof me)||!Nt(n)?this.thru(o):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:Er,args:[o],thisArg:r}),new pt(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(r),u}))});function ml(){return uu(this)}function wl(){return new pt(this.value(),this.__chain__)}function xl(){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 bl(){return this}function Sl(e){for(var t,n=this;n instanceof cr;){var i=eu(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 Al(){var e=this.__wrapped__;if(e instanceof me){var t=e;return this.__actions__.length&&(t=new me(this)),t=t.reverse(),t.__actions__.push({func:Er,args:[Wi],thisArg:r}),new pt(t,this.__chain__)}return this.thru(Wi)}function El(){return Ss(this.__wrapped__,this.__actions__)}var Tl=yr(function(e,t,n){Ee.call(e,n)?++e[n]:It(e,n,1)});function Cl(e,t,n){var i=de(e)?Fo:yc;return n&&Ve(e,t,n)&&(t=r),i(e,ue(t,3))}function kl(e,t){var n=de(e)?Wt:ss;return n(e,ue(t,3))}var Rl=Ns(tu),Ol=Ns(nu);function Il(e,t){return Ke(Tr(e,t),1)}function Ll(e,t){return Ke(Tr(e,t),P)}function Bl(e,t,n){return n=n===r?1:ge(n),Ke(Tr(e,t),n)}function au(e,t){var n=de(e)?ht:Ht;return n(e,ue(t,3))}function fu(e,t){var n=de(e)?Za:os;return n(e,ue(t,3))}var Nl=yr(function(e,t,n){Ee.call(e,n)?e[n].push(t):It(e,n,[t])});function Dl(e,t,n,i){e=je(e)?e:Sn(e),n=n&&!i?ge(n):0;var o=e.length;return n<0&&(n=Pe(o+n,0)),Ir(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&hn(e,t,n)>-1}var Fl=ye(function(e,t,n){var i=-1,o=typeof t=="function",u=je(e)?O(e.length):[];return Ht(e,function(g){u[++i]=o?it(t,g,n):Fn(g,t,n)}),u}),Ul=yr(function(e,t,n){It(e,n,t)});function Tr(e,t){var n=de(e)?Ie:ls;return n(e,ue(t,3))}function Pl(e,t,n,i){return e==null?[]:(de(t)||(t=t==null?[]:[t]),n=i?r:n,de(n)||(n=n==null?[]:[n]),vs(e,t,n))}var Ml=yr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Wl(e,t,n){var i=de(e)?jr:Wo,o=arguments.length<3;return i(e,ue(t,4),n,o,Ht)}function ql(e,t,n){var i=de(e)?Qa:Wo,o=arguments.length<3;return i(e,ue(t,4),n,o,os)}function Kl(e,t){var n=de(e)?Wt:ss;return n(e,Rr(ue(t,3)))}function zl(e){var t=de(e)?ts:Dc;return t(e)}function Hl(e,t,n){(n?Ve(e,t,n):t===r)?t=1:t=ge(t);var i=de(e)?lc:Fc;return i(e,t)}function Gl(e){var t=de(e)?pc:Pc;return t(e)}function $l(e){if(e==null)return 0;if(je(e))return Ir(e)?pn(e):e.length;var t=$e(e);return t==Oe||t==Je?e.size:_i(e).length}function Xl(e,t,n){var i=de(e)?ei:Mc;return n&&Ve(e,t,n)&&(t=r),i(e,ue(t,3))}var Jl=ye(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Ve(e,t[0],t[1])?t=[]:n>2&&Ve(t[0],t[1],t[2])&&(t=[t[0]]),vs(e,Ke(t,1),[])}),Cr=kf||function(){return qe.Date.now()};function Yl(e,t){if(typeof t!="function")throw new lt(b);return e=ge(e),function(){if(--e<1)return t.apply(this,arguments)}}function cu(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Lt(e,z,r,r,r,r,t)}function hu(e,t){var n;if(typeof t!="function")throw new lt(b);return e=ge(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Ki=ye(function(e,t,n){var i=D;if(n.length){var o=Kt(n,xn(Ki));i|=Y}return Lt(e,i,t,n,o)}),lu=ye(function(e,t,n){var i=D|Q;if(n.length){var o=Kt(n,xn(lu));i|=Y}return Lt(t,i,e,n,o)});function pu(e,t,n){t=n?r:t;var i=Lt(e,te,r,r,r,r,r,t);return i.placeholder=pu.placeholder,i}function du(e,t,n){t=n?r:t;var i=Lt(e,he,r,r,r,r,r,t);return i.placeholder=du.placeholder,i}function gu(e,t,n){var i,o,u,g,x,C,F=0,U=!1,M=!1,X=!0;if(typeof e!="function")throw new lt(b);t=yt(t)||0,Le(n)&&(U=!!n.leading,M="maxWait"in n,u=M?Pe(yt(n.maxWait)||0,t):u,X="trailing"in n?!!n.trailing:X);function re(Fe){var bt=i,Ut=o;return i=o=r,F=Fe,g=e.apply(Ut,bt),g}function fe(Fe){return F=Fe,x=qn(_e,t),U?re(Fe):g}function ve(Fe){var bt=Fe-C,Ut=Fe-F,Nu=t-bt;return M?Ge(Nu,u-Ut):Nu}function ce(Fe){var bt=Fe-C,Ut=Fe-F;return C===r||bt>=t||bt<0||M&&Ut>=u}function _e(){var Fe=Cr();if(ce(Fe))return we(Fe);x=qn(_e,ve(Fe))}function we(Fe){return x=r,X&&i?re(Fe):(i=o=r,g)}function at(){x!==r&&Es(x),F=0,i=C=o=x=r}function Ze(){return x===r?g:we(Cr())}function ft(){var Fe=Cr(),bt=ce(Fe);if(i=arguments,o=this,C=Fe,bt){if(x===r)return fe(C);if(M)return Es(x),x=qn(_e,t),re(C)}return x===r&&(x=qn(_e,t)),g}return ft.cancel=at,ft.flush=Ze,ft}var Vl=ye(function(e,t){return is(e,1,t)}),Zl=ye(function(e,t,n){return is(e,yt(t)||0,n)});function Ql(e){return Lt(e,B)}function kr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new lt(b);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],u=n.cache;if(u.has(o))return u.get(o);var g=e.apply(this,i);return n.cache=u.set(o,g)||u,g};return n.cache=new(kr.Cache||Ot),n}kr.Cache=Ot;function Rr(e){if(typeof e!="function")throw new lt(b);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 jl(e){return hu(2,e)}var ep=Wc(function(e,t){t=t.length==1&&de(t[0])?Ie(t[0],ot(ue())):Ie(Ke(t,1),ot(ue()));var n=t.length;return ye(function(i){for(var o=-1,u=Ge(i.length,n);++o<u;)i[o]=t[o].call(this,i[o]);return it(e,this,i)})}),zi=ye(function(e,t){var n=Kt(t,xn(zi));return Lt(e,Y,r,t,n)}),vu=ye(function(e,t){var n=Kt(t,xn(vu));return Lt(e,q,r,t,n)}),tp=Bt(function(e,t){return Lt(e,J,r,r,r,t)});function np(e,t){if(typeof e!="function")throw new lt(b);return t=t===r?t:ge(t),ye(e,t)}function rp(e,t){if(typeof e!="function")throw new lt(b);return t=t==null?0:Pe(ge(t),0),ye(function(n){var i=n[t],o=Xt(n,0,t);return i&&qt(o,i),it(e,this,o)})}function ip(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new lt(b);return Le(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),gu(e,t,{leading:i,maxWait:t,trailing:o})}function op(e){return cu(e,1)}function sp(e,t){return zi(Ci(t),e)}function up(){if(!arguments.length)return[];var e=arguments[0];return de(e)?e:[e]}function ap(e){return dt(e,f)}function fp(e,t){return t=typeof t=="function"?t:r,dt(e,f,t)}function cp(e){return dt(e,S|f)}function hp(e,t){return t=typeof t=="function"?t:r,dt(e,S|f,t)}function lp(e,t){return t==null||rs(e,t,We(t))}function xt(e,t){return e===t||e!==e&&t!==t}var pp=xr(gi),dp=xr(function(e,t){return e>=t}),sn=fs(function(){return arguments}())?fs:function(e){return Ne(e)&&Ee.call(e,"callee")&&!Yo.call(e,"callee")},de=O.isArray,gp=Oo?ot(Oo):Sc;function je(e){return e!=null&&Or(e.length)&&!Dt(e)}function De(e){return Ne(e)&&je(e)}function vp(e){return e===!0||e===!1||Ne(e)&&Ye(e)==ie}var Jt=Of||eo,yp=Io?ot(Io):Ac;function _p(e){return Ne(e)&&e.nodeType===1&&!Kn(e)}function mp(e){if(e==null)return!0;if(je(e)&&(de(e)||typeof e=="string"||typeof e.splice=="function"||Jt(e)||bn(e)||sn(e)))return!e.length;var t=$e(e);if(t==Oe||t==Je)return!e.size;if(Wn(e))return!_i(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0}function wp(e,t){return Un(e,t)}function xp(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Un(e,t,r,n):!!i}function Hi(e){if(!Ne(e))return!1;var t=Ye(e);return t==le||t==ee||typeof e.message=="string"&&typeof e.name=="string"&&!Kn(e)}function bp(e){return typeof e=="number"&&Zo(e)}function Dt(e){if(!Le(e))return!1;var t=Ye(e);return t==Se||t==He||t==K||t==En}function yu(e){return typeof e=="number"&&e==ge(e)}function Or(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=L}function Le(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ne(e){return e!=null&&typeof e=="object"}var _u=Lo?ot(Lo):Tc;function Sp(e,t){return e===t||yi(e,t,Ni(t))}function Ap(e,t,n){return n=typeof n=="function"?n:r,yi(e,t,Ni(t),n)}function Ep(e){return mu(e)&&e!=+e}function Tp(e){if(fh(e))throw new pe(y);return cs(e)}function Cp(e){return e===null}function kp(e){return e==null}function mu(e){return typeof e=="number"||Ne(e)&&Ye(e)==_t}function Kn(e){if(!Ne(e)||Ye(e)!=rt)return!1;var t=rr(e);if(t===null)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&jn.call(n)==Af}var Gi=Bo?ot(Bo):Cc;function Rp(e){return yu(e)&&e>=-L&&e<=L}var wu=No?ot(No):kc;function Ir(e){return typeof e=="string"||!de(e)&&Ne(e)&&Ye(e)==St}function ut(e){return typeof e=="symbol"||Ne(e)&&Ye(e)==At}var bn=Do?ot(Do):Rc;function Op(e){return e===r}function Ip(e){return Ne(e)&&$e(e)==kt}function Lp(e){return Ne(e)&&Ye(e)==Cn}var Bp=xr(mi),Np=xr(function(e,t){return e<=t});function xu(e){if(!e)return[];if(je(e))return Ir(e)?mt(e):Qe(e);if(Rn&&e[Rn])return lf(e[Rn]());var t=$e(e),n=t==Oe?si:t==Je?Vn:Sn;return n(e)}function Ft(e){if(!e)return e===0?e:0;if(e=yt(e),e===P||e===-P){var t=e<0?-1:1;return t*j}return e===e?e:0}function ge(e){var t=Ft(e),n=t%1;return t===t?n?t-n:t:0}function bu(e){return e?tn(ge(e),0,ze):0}function yt(e){if(typeof e=="number")return e;if(ut(e))return ke;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=qo(e);var n=da.test(e);return n||va.test(e)?Ja(e.slice(2),n?2:8):pa.test(e)?ke:+e}function Su(e){return Tt(e,et(e))}function Dp(e){return e?tn(ge(e),-L,L):e===0?e:0}function Ae(e){return e==null?"":st(e)}var Fp=mn(function(e,t){if(Wn(t)||je(t)){Tt(t,We(t),e);return}for(var n in t)Ee.call(t,n)&&Nn(e,n,t[n])}),Au=mn(function(e,t){Tt(t,et(t),e)}),Lr=mn(function(e,t,n,i){Tt(t,et(t),e,i)}),Up=mn(function(e,t,n,i){Tt(t,We(t),e,i)}),Pp=Bt(li);function Mp(e,t){var n=_n(e);return t==null?n:ns(n,t)}var Wp=ye(function(e,t){e=Te(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&Ve(t[0],t[1],o)&&(i=1);++n<i;)for(var u=t[n],g=et(u),x=-1,C=g.length;++x<C;){var F=g[x],U=e[F];(U===r||xt(U,gn[F])&&!Ee.call(e,F))&&(e[F]=u[F])}return e}),qp=ye(function(e){return e.push(r,qs),it(Eu,r,e)});function Kp(e,t){return Uo(e,ue(t,3),Et)}function zp(e,t){return Uo(e,ue(t,3),di)}function Hp(e,t){return e==null?e:pi(e,ue(t,3),et)}function Gp(e,t){return e==null?e:us(e,ue(t,3),et)}function $p(e,t){return e&&Et(e,ue(t,3))}function Xp(e,t){return e&&di(e,ue(t,3))}function Jp(e){return e==null?[]:pr(e,We(e))}function Yp(e){return e==null?[]:pr(e,et(e))}function $i(e,t,n){var i=e==null?r:nn(e,t);return i===r?n:i}function Vp(e,t){return e!=null&&Hs(e,t,mc)}function Xi(e,t){return e!=null&&Hs(e,t,wc)}var Zp=Fs(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=er.call(t)),e[t]=n},Yi(tt)),Qp=Fs(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=er.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]},ue),jp=ye(Fn);function We(e){return je(e)?es(e):_i(e)}function et(e){return je(e)?es(e,!0):Oc(e)}function ed(e,t){var n={};return t=ue(t,3),Et(e,function(i,o,u){It(n,t(i,o,u),i)}),n}function td(e,t){var n={};return t=ue(t,3),Et(e,function(i,o,u){It(n,o,t(i,o,u))}),n}var nd=mn(function(e,t,n){dr(e,t,n)}),Eu=mn(function(e,t,n,i){dr(e,t,n,i)}),rd=Bt(function(e,t){var n={};if(e==null)return n;var i=!1;t=Ie(t,function(u){return u=$t(u,e),i||(i=u.length>1),u}),Tt(e,Li(e),n),i&&(n=dt(n,S|p|f,Zc));for(var o=t.length;o--;)Ai(n,t[o]);return n});function id(e,t){return Tu(e,Rr(ue(t)))}var od=Bt(function(e,t){return e==null?{}:Lc(e,t)});function Tu(e,t){if(e==null)return{};var n=Ie(Li(e),function(i){return[i]});return t=ue(t),ys(e,n,function(i,o){return t(i,o[0])})}function sd(e,t,n){t=$t(t,e);var i=-1,o=t.length;for(o||(o=1,e=r);++i<o;){var u=e==null?r:e[Ct(t[i])];u===r&&(i=o,u=n),e=Dt(u)?u.call(e):u}return e}function ud(e,t,n){return e==null?e:Pn(e,t,n)}function ad(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Pn(e,t,n,i)}var Cu=Ms(We),ku=Ms(et);function fd(e,t,n){var i=de(e),o=i||Jt(e)||bn(e);if(t=ue(t,4),n==null){var u=e&&e.constructor;o?n=i?new u:[]:Le(e)?n=Dt(u)?_n(rr(e)):{}:n={}}return(o?ht:Et)(e,function(g,x,C){return t(n,g,x,C)}),n}function cd(e,t){return e==null?!0:Ai(e,t)}function hd(e,t,n){return e==null?e:bs(e,t,Ci(n))}function ld(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:bs(e,t,Ci(n),i)}function Sn(e){return e==null?[]:oi(e,We(e))}function pd(e){return e==null?[]:oi(e,et(e))}function dd(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=yt(n),n=n===n?n:0),t!==r&&(t=yt(t),t=t===t?t:0),tn(yt(e),t,n)}function gd(e,t,n){return t=Ft(t),n===r?(n=t,t=0):n=Ft(n),e=yt(e),xc(e,t,n)}function vd(e,t,n){if(n&&typeof n!="boolean"&&Ve(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=Qo();return Ge(e+o*(t-e+Xa("1e-"+((o+"").length-1))),t)}return xi(e,t)}var yd=wn(function(e,t,n){return t=t.toLowerCase(),e+(n?Ru(t):t)});function Ru(e){return Ji(Ae(e).toLowerCase())}function Ou(e){return e=Ae(e),e&&e.replace(_a,uf).replace(Ua,"")}function _d(e,t,n){e=Ae(e),t=st(t);var i=e.length;n=n===r?i:tn(ge(n),0,i);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function md(e){return e=Ae(e),e&&Qu.test(e)?e.replace(so,af):e}function wd(e){return e=Ae(e),e&&ia.test(e)?e.replace(zr,"\\$&"):e}var xd=wn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),bd=wn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Sd=Bs("toLowerCase");function Ad(e,t,n){e=Ae(e),t=ge(t);var i=t?pn(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return wr(ur(o),n)+e+wr(sr(o),n)}function Ed(e,t,n){e=Ae(e),t=ge(t);var i=t?pn(e):0;return t&&i<t?e+wr(t-i,n):e}function Td(e,t,n){e=Ae(e),t=ge(t);var i=t?pn(e):0;return t&&i<t?wr(t-i,n)+e:e}function Cd(e,t,n){return n||t==null?t=0:t&&(t=+t),Nf(Ae(e).replace(Hr,""),t||0)}function kd(e,t,n){return(n?Ve(e,t,n):t===r)?t=1:t=ge(t),bi(Ae(e),t)}function Rd(){var e=arguments,t=Ae(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Od=wn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function Id(e,t,n){return n&&typeof n!="number"&&Ve(e,t,n)&&(t=n=r),n=n===r?ze:n>>>0,n?(e=Ae(e),e&&(typeof t=="string"||t!=null&&!Gi(t))&&(t=st(t),!t&&ln(e))?Xt(mt(e),0,n):e.split(t,n)):[]}var Ld=wn(function(e,t,n){return e+(n?" ":"")+Ji(t)});function Bd(e,t,n){return e=Ae(e),n=n==null?0:tn(ge(n),0,e.length),t=st(t),e.slice(n,n+t.length)==t}function Nd(e,t,n){var i=s.templateSettings;n&&Ve(e,t,n)&&(t=r),e=Ae(e),t=Lr({},t,i,Ws);var o=Lr({},t.imports,i.imports,Ws),u=We(o),g=oi(o,u),x,C,F=0,U=t.interpolate||Gn,M="__p += '",X=ui((t.escape||Gn).source+"|"+U.source+"|"+(U===uo?la:Gn).source+"|"+(t.evaluate||Gn).source+"|$","g"),re="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ka+"]")+`
19
- `;e.replace(X,function(ce,_e,we,at,Ze,ft){return we||(we=at),M+=e.slice(F,ft).replace(ma,ff),_e&&(x=!0,M+=`' +
20
- __e(`+_e+`) +
21
- '`),Ze&&(C=!0,M+=`';
22
- `+Ze+`;
23
- __p += '`),we&&(M+=`' +
24
- ((__t = (`+we+`)) == null ? '' : __t) +
25
- '`),F=ft+ce.length,ce}),M+=`';
26
- `;var fe=Ee.call(t,"variable")&&t.variable;if(!fe)M=`with (obj) {
27
- `+M+`
15
+ `)}function hl(e){return ce(e)||sn(e)||!!(es&&e&&e[es])}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 Je(e,t,n){if(!Oe(n))return!1;var i=typeof t;return(i=="number"?Ve(n)&&Ut(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:aa.test(e)||!ua.test(e)||t!=null&&e in xe(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!!Zo&&Zo in e}var gl=jn?Dt:no;function Wn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gn;return e===n}function Zs(e){return e===e&&!Oe(e)}function Vs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in xe(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<(k|q|M),v=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||v))return e;i&k&&(e[2]=t[2],o|=n&k?0:oe);var b=t[3];if(b){var C=e[3];e[3]=C?Bs(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]:He(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 xe(e))t.push(n);return t}function ml(e){return tr.call(e)}function Qs(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),v=E(f);++o<f;)v[o]=i[t+o];o=-1;for(var b=E(t+1);++o<t;)b[o]=i[o];return b[t]=n(v),rt(e,this,b)}}function js(e,t){return t.length<2?e:nn(e,dt(t,0,-1))}function wl(e,t){for(var n=e.length,i=He(t.length,n),o=Ze(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 eu=nu(As),qn=Uf||function(e,t){return Me.setTimeout(e,t)},qi=nu(Hc);function tu(e,t,n){var i=t+"";return qi(e,ll(i,Sl(al(i),n)))}function nu(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),v=e[f];e[f]=e[n],e[n]=v}return e.length=t,e}var ru=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 Et(e){if(typeof e=="string"||st(e))return e;var t=e+"";return t=="0"&&1/e==-ke?"-0":t}function on(e){if(e!=null){try{return er.call(e)}catch{}try{return e+""}catch{}}return""}function Sl(e,t){return ct(J,function(n){var i="_."+n[0];t&n[1]&&!Yn(e,i)&&e.push(i)}),e.sort()}function iu(e){if(e instanceof ge)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,v=E(ur(i/t));o<i;)v[f++]=dt(e,o,o+=t);return v}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],We(t,1))}var Cl=pe(function(e,t){return Be(e)?Un(e,We(t,1,Be,!0)):[]}),Tl=pe(function(e,t){var n=gt(t);return Be(n)&&(n=r),Be(e)?Un(e,We(t,1,Be,!0),ne(n,2)):[]}),El=pe(function(e,t){var n=gt(t);return Be(n)&&(n=r),Be(e)?Un(e,We(t,1,Be,!0),r,n):[]});function kl(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 Rl(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 Il(e,t){return e&&e.length?yr(e,ne(t,3),!0,!0):[]}function Ol(e,t){return e&&e.length?yr(e,ne(t,3),!0):[]}function Ll(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 ou(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 su(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 uu(e){var t=e==null?0:e.length;return t?We(e,1):[]}function Bl(e){var t=e==null?0:e.length;return t?We(e,ke):[]}function Nl(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:le(t),We(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 au(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?dt(e,0,-1):[]}var Fl=pe(function(e){var t=Ie(e,ki);return t.length&&t[0]===e[0]?_i(t):[]}),Ml=pe(function(e){var t=gt(e),n=Ie(e,ki);return t===gt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?_i(n,ne(t,2)):[]}),Wl=pe(function(e){var t=gt(e),n=Ie(e,ki);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 gt(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):He(o,i-1)),t===t?Sf(e,t,o):Zn(e,Ko,o,!0)}function Hl(e,t){return e&&e.length?ms(e,le(t)):r}var Gl=pe(fu);function fu(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=Nt(function(e,t){var n=e==null?0:e.length,i=di(e,t);return bs(e,Ie(t,function(o){return Ut(o,n)?+o:o}).sort(Ls)),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 v=e[i];t(v,i,e)&&(n.push(v),o.push(i))}return bs(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"&&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 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&&wt(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(wt(e[i],t))return i}return-1}function nh(e){return e&&e.length?xs(e):[]}function rh(e,t){return e&&e.length?xs(e,ne(t,2)):[]}function ih(e){var t=e==null?0:e.length;return t?dt(e,1,t):[]}function oh(e,t,n){return e&&e.length?(t=n||t===r?1:le(t),dt(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,dt(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(We(e,1,Be,!0))}),ch=pe(function(e){var t=gt(e);return Be(t)&&(t=r),$t(We(e,1,Be,!0),ne(t,2))}),lh=pe(function(e){var t=gt(e);return t=typeof t=="function"?t:r,$t(We(e,1,Be,!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(Be(n))return t=De(n.length,t),!0}),si(t,function(n){return Ie(e,ri(n))})}function cu(e,t){if(!(e&&e.length))return[];var n=Hi(e);return t==null?n:Ie(n,function(i){return rt(t,r,i)})}var gh=pe(function(e,t){return Be(e)?Un(e,t):[]}),vh=pe(function(e){return Ei(qt(e,Be))}),yh=pe(function(e){var t=gt(e);return Be(t)&&(t=r),Ei(qt(e,Be),ne(t,2))}),_h=pe(function(e){var t=gt(e);return t=typeof t=="function"?t:r,Ei(qt(e,Be),r,t)}),mh=pe(Hi);function wh(e,t){return ks(e||[],t||[],Nn)}function Sh(e,t){return ks(e||[],t||[],Fn)}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,cu(e,n)});function lu(e){var t=a(e);return t.__chain__=!0,t}function Ah(e,t){return t(e),e}function Tr(e,t){return t(e)}var xh=Nt(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:Tr,args:[o],thisArg:r}),new ht(i,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function Ch(){return lu(this)}function Th(){return new ht(this.value(),this.__chain__)}function Eh(){this.__values__===r&&(this.__values__=Cu(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function kh(){return this}function Rh(e){for(var t,n=this;n instanceof lr;){var i=iu(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 Ih(){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:Tr,args:[Ki],thisArg:r}),new ht(t,this.__chain__)}return this.thru(Ki)}function Oh(){return Es(this.__wrapped__,this.__actions__)}var Lh=_r(function(e,t,n){Se.call(e,n)?++e[n]:Lt(e,n,1)});function Bh(e,t,n){var i=ce(e)?Wo:Ac;return n&&Je(e,t,n)&&(t=r),i(e,ne(t,3))}function Nh(e,t){var n=ce(e)?qt:cs;return n(e,ne(t,3))}var Uh=Fs(ou),Dh=Fs(su);function Ph(e,t){return We(Er(e,t),1)}function Fh(e,t){return We(Er(e,t),ke)}function Mh(e,t,n){return n=n===r?1:le(n),We(Er(e,t),n)}function hu(e,t){var n=ce(e)?ct:zt;return n(e,ne(t,3))}function pu(e,t){var n=ce(e)?rf:fs;return n(e,ne(t,3))}var Wh=_r(function(e,t,n){Se.call(e,n)?e[n].push(t):Lt(e,n,[t])});function qh(e,t,n,i){e=Ve(e)?e:An(e),n=n&&!i?le(n):0;var o=e.length;return n<0&&(n=De(o+n,0)),Lr(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=Ve(e)?E(e.length):[];return zt(e,function(v){f[++i]=o?rt(t,v,n):Dn(v,t,n)}),f}),Hh=_r(function(e,t,n){Lt(e,n,t)});function Er(e,t){var n=ce(e)?Ie:vs;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]),ws(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:Go,o=arguments.length<3;return i(e,ne(t,4),n,o,zt)}function Xh(e,t,n){var i=ce(e)?of:Go,o=arguments.length<3;return i(e,ne(t,4),n,o,fs)}function Jh(e,t){var n=ce(e)?qt:cs;return n(e,Ir(ne(t,3)))}function Yh(e){var t=ce(e)?os:qc;return t(e)}function Zh(e,t,n){(n?Je(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(Ve(e))return Lr(e)?pn(e):e.length;var t=Ge(e);return t==Re||t==$e?e.size:wi(e).length}function jh(e,t,n){var i=ce(e)?ni:zc;return n&&Je(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&&Je(e,t[0],t[1])?t=[]:n>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),ws(e,We(t,1),[])}),kr=Nf||function(){return Me.Date.now()};function tp(e,t){if(typeof t!="function")throw new lt(m);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function du(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Bt(e,M,r,r,r,r,t)}function gu(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 Gi=pe(function(e,t,n){var i=k;if(n.length){var o=Ht(n,Sn(Gi));i|=G}return Bt(e,i,t,n,o)}),vu=pe(function(e,t,n){var i=k|q;if(n.length){var o=Ht(n,Sn(vu));i|=G}return Bt(t,i,e,n,o)});function yu(e,t,n){t=n?r:t;var i=Bt(e,Y,r,r,r,r,r,t);return i.placeholder=yu.placeholder,i}function _u(e,t,n){t=n?r:t;var i=Bt(e,se,r,r,r,r,r,t);return i.placeholder=_u.placeholder,i}function mu(e,t,n){var i,o,f,v,b,C,I=0,O=!1,B=!1,K=!0;if(typeof e!="function")throw new lt(m);t=vt(t)||0,Oe(n)&&(O=!!n.leading,B="maxWait"in n,f=B?De(vt(n.maxWait)||0,t):f,K="trailing"in n?!!n.trailing:K);function Z(Ne){var St=i,Ft=o;return i=o=r,I=Ne,v=e.apply(Ft,St),v}function re(Ne){return I=Ne,b=qn(de,t),O?Z(Ne):v}function he(Ne){var St=Ne-C,Ft=Ne-I,Fu=t-St;return B?He(Fu,f-Ft):Fu}function ie(Ne){var St=Ne-C,Ft=Ne-I;return C===r||St>=t||St<0||B&&Ft>=f}function de(){var Ne=kr();if(ie(Ne))return ve(Ne);b=qn(de,he(Ne))}function ve(Ne){return b=r,K&&i?Z(Ne):(i=o=r,v)}function ut(){b!==r&&Rs(b),I=0,i=C=o=b=r}function Ye(){return b===r?v:ve(kr())}function at(){var Ne=kr(),St=ie(Ne);if(i=arguments,o=this,C=Ne,St){if(b===r)return re(C);if(B)return Rs(b),b=qn(de,t),Z(C)}return b===r&&(b=qn(de,t)),v}return at.cancel=ut,at.flush=Ye,at}var np=pe(function(e,t){return as(e,1,t)}),rp=pe(function(e,t,n){return as(e,vt(t)||0,n)});function ip(e){return Bt(e,L)}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 v=e.apply(this,i);return n.cache=f.set(o,v)||f,v};return n.cache=new(Rr.Cache||Ot),n}Rr.Cache=Ot;function Ir(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 op(e){return gu(2,e)}var sp=$c(function(e,t){t=t.length==1&&ce(t[0])?Ie(t[0],it(ne())):Ie(We(t,1),it(ne()));var n=t.length;return pe(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)})}),zi=pe(function(e,t){var n=Ht(t,Sn(zi));return Bt(e,G,r,t,n)}),wu=pe(function(e,t){var n=Ht(t,Sn(wu));return Bt(e,D,r,t,n)}),up=Nt(function(e,t){return Bt(e,H,r,r,r,t)});function ap(e,t){if(typeof e!="function")throw new lt(m);return t=t===r?t:le(t),pe(e,t)}function fp(e,t){if(typeof e!="function")throw new lt(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),rt(e,this,o)})}function cp(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new lt(m);return Oe(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),mu(e,t,{leading:i,maxWait:t,trailing:o})}function lp(e){return du(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 pt(e,s)}function gp(e,t){return t=typeof t=="function"?t:r,pt(e,s,t)}function vp(e){return pt(e,p|s)}function yp(e,t){return t=typeof t=="function"?t:r,pt(e,p|s,t)}function _p(e,t){return t==null||us(e,t,Pe(t))}function wt(e,t){return e===t||e!==e&&t!==t}var mp=br(yi),wp=br(function(e,t){return e>=t}),sn=ps(function(){return arguments}())?ps:function(e){return Le(e)&&Se.call(e,"callee")&&!jo.call(e,"callee")},ce=E.isArray,Sp=No?it(No):Rc;function Ve(e){return e!=null&&Or(e.length)&&!Dt(e)}function Be(e){return Le(e)&&Ve(e)}function bp(e){return e===!0||e===!1||Le(e)&&Xe(e)==Q}var Yt=Df||no,Ap=Uo?it(Uo):Ic;function xp(e){return Le(e)&&e.nodeType===1&&!Kn(e)}function Cp(e){if(e==null)return!0;if(Ve(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||Yt(e)||bn(e)||sn(e)))return!e.length;var t=Ge(e);if(t==Re||t==$e)return!e.size;if(Wn(e))return!wi(e).length;for(var n in e)if(Se.call(e,n))return!1;return!0}function Tp(e,t){return Pn(e,t)}function Ep(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Pn(e,t,r,n):!!i}function $i(e){if(!Le(e))return!1;var t=Xe(e);return t==ue||t==$||typeof e.message=="string"&&typeof e.name=="string"&&!Kn(e)}function kp(e){return typeof e=="number"&&ts(e)}function Dt(e){if(!Oe(e))return!1;var t=Xe(e);return t==me||t==Ke||t==P||t==Cn}function Su(e){return typeof e=="number"&&e==le(e)}function Or(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ae}function Oe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Le(e){return e!=null&&typeof e=="object"}var bu=Do?it(Do):Lc;function Rp(e,t){return e===t||mi(e,t,Di(t))}function Ip(e,t,n){return n=typeof n=="function"?n:r,mi(e,t,Di(t),n)}function Op(e){return Au(e)&&e!=+e}function Lp(e){if(gl(e))throw new fe(d);return ds(e)}function Bp(e){return e===null}function Np(e){return e==null}function Au(e){return typeof e=="number"||Le(e)&&Xe(e)==yt}function Kn(e){if(!Le(e)||Xe(e)!=nt)return!1;var t=ir(e);if(t===null)return!0;var n=Se.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&er.call(n)==If}var Xi=Po?it(Po):Bc;function Up(e){return Su(e)&&e>=-ae&&e<=ae}var xu=Fo?it(Fo):Nc;function Lr(e){return typeof e=="string"||!ce(e)&&Le(e)&&Xe(e)==At}function st(e){return typeof e=="symbol"||Le(e)&&Xe(e)==xt}var bn=Mo?it(Mo):Uc;function Dp(e){return e===r}function Pp(e){return Le(e)&&Ge(e)==Rt}function Fp(e){return Le(e)&&Xe(e)==En}var Mp=br(Si),Wp=br(function(e,t){return e<=t});function Cu(e){if(!e)return[];if(Ve(e))return Lr(e)?_t(e):Ze(e);if(Rn&&e[Rn])return _f(e[Rn]());var t=Ge(e),n=t==Re?ai:t==$e?Vn:An;return n(e)}function Pt(e){if(!e)return e===0?e:0;if(e=vt(e),e===ke||e===-ke){var t=e<0?-1:1;return t*qe}return e===e?e:0}function le(e){var t=Pt(e),n=t%1;return t===t?n?t-n:t:0}function Tu(e){return e?tn(le(e),0,tt):0}function vt(e){if(typeof e=="number")return e;if(st(e))return bt;if(Oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zo(e);var n=wa.test(e);return n||ba.test(e)?ef(e.slice(2),n?2:8):ma.test(e)?bt:+e}function Eu(e){return Tt(e,Qe(e))}function qp(e){return e?tn(le(e),-ae,ae):e===0?e:0}function we(e){return e==null?"":ot(e)}var Kp=mn(function(e,t){if(Wn(t)||Ve(t)){Tt(t,Pe(t),e);return}for(var n in t)Se.call(t,n)&&Nn(e,n,t[n])}),ku=mn(function(e,t){Tt(t,Qe(t),e)}),Br=mn(function(e,t,n,i){Tt(t,Qe(t),e,i)}),Hp=mn(function(e,t,n,i){Tt(t,Pe(t),e,i)}),Gp=Nt(di);function zp(e,t){var n=_n(e);return t==null?n:ss(n,t)}var $p=pe(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],v=Qe(f),b=-1,C=v.length;++b<C;){var I=v[b],O=e[I];(O===r||wt(O,gn[I])&&!Se.call(e,I))&&(e[I]=f[I])}return e}),Xp=pe(function(e){return e.push(r,zs),rt(Ru,r,e)});function Jp(e,t){return qo(e,ne(t,3),Ct)}function Yp(e,t){return qo(e,ne(t,3),vi)}function Zp(e,t){return e==null?e:gi(e,ne(t,3),Qe)}function Vp(e,t){return e==null?e:ls(e,ne(t,3),Qe)}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,Qe(e))}function Ji(e,t,n){var i=e==null?r:nn(e,t);return i===r?n:i}function nd(e,t){return e!=null&&Js(e,t,Cc)}function Yi(e,t){return e!=null&&Js(e,t,Tc)}var rd=Ws(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),e[t]=n},Vi(je)),id=Ws(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=tr.call(t)),Se.call(e,t)?e[t].push(n):e[t]=[n]},ne),od=pe(Dn);function Pe(e){return Ve(e)?is(e):wi(e)}function Qe(e){return Ve(e)?is(e,!0):Dc(e)}function sd(e,t){var n={};return t=ne(t,3),Ct(e,function(i,o,f){Lt(n,t(i,o,f),i)}),n}function ud(e,t){var n={};return t=ne(t,3),Ct(e,function(i,o,f){Lt(n,o,t(i,o,f))}),n}var ad=mn(function(e,t,n){gr(e,t,n)}),Ru=mn(function(e,t,n,i){gr(e,t,n,i)}),fd=Nt(function(e,t){var n={};if(e==null)return n;var i=!1;t=Ie(t,function(f){return f=Xt(f,e),i||(i=f.length>1),f}),Tt(e,Ni(e),n),i&&(n=pt(n,p|u|s,rl));for(var o=t.length;o--;)Ti(n,t[o]);return n});function cd(e,t){return Iu(e,Ir(ne(t)))}var ld=Nt(function(e,t){return e==null?{}:Fc(e,t)});function Iu(e,t){if(e==null)return{};var n=Ie(Ni(e),function(i){return[i]});return t=ne(t),Ss(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[Et(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:Fn(e,t,n)}function dd(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Fn(e,t,n,i)}var Ou=Hs(Pe),Lu=Hs(Qe);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:[]:Oe(e)?n=Dt(f)?_n(ir(e)):{}:n={}}return(o?ct:Ct)(e,function(v,b,C){return t(n,v,b,C)}),n}function vd(e,t){return e==null?!0:Ti(e,t)}function yd(e,t,n){return e==null?e:Ts(e,t,Ri(n))}function _d(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Ts(e,t,Ri(n),i)}function An(e){return e==null?[]:ui(e,Pe(e))}function md(e){return e==null?[]:ui(e,Qe(e))}function wd(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),tn(vt(e),t,n)}function Sd(e,t,n){return t=Pt(t),n===r?(n=t,t=0):n=Pt(n),e=vt(e),Ec(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=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=ns();return He(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?Bu(t):t)});function Bu(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=ot(t);var i=e.length;n=n===r?i:tn(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(co,df):e}function Td(e){return e=we(e),e&&ca.test(e)?e.replace(zr,"\\$&"):e}var Ed=wn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),kd=wn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Rd=Ps("toLowerCase");function Id(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 Od(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 Ld(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 Bd(e,t,n){return n||t==null?t=0:t&&(t=+t),Wf(we(e).replace($r,""),t||0)}function Nd(e,t,n){return(n?Je(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"&&Je(e,t,n)&&(t=n=r),n=n===r?tt:n>>>0,n?(e=we(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 Fd=wn(function(e,t,n){return e+(n?" ":"")+Zi(t)});function Md(e,t,n){return e=we(e),n=n==null?0:tn(le(n),0,e.length),t=ot(t),e.slice(n,n+t.length)==t}function Wd(e,t,n){var i=a.templateSettings;n&&Je(e,t,n)&&(t=r),e=we(e),t=Br({},t,i,Gs);var o=Br({},t.imports,i.imports,Gs),f=Pe(o),v=ui(o,f),b,C,I=0,O=t.interpolate||$n,B="__p += '",K=fi((t.escape||$n).source+"|"+O.source+"|"+(O===lo?_a:$n).source+"|"+(t.evaluate||$n).source+"|$","g"),Z="//# sourceURL="+(Se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ja+"]")+`
16
+ `;e.replace(K,function(ie,de,ve,ut,Ye,at){return ve||(ve=ut),B+=e.slice(I,at).replace(Ca,gf),de&&(b=!0,B+=`' +
17
+ __e(`+de+`) +
18
+ '`),Ye&&(C=!0,B+=`';
19
+ `+Ye+`;
20
+ __p += '`),ve&&(B+=`' +
21
+ ((__t = (`+ve+`)) == null ? '' : __t) +
22
+ '`),I=at+ie.length,ie}),B+=`';
23
+ `;var re=Se.call(t,"variable")&&t.variable;if(!re)B=`with (obj) {
24
+ `+B+`
28
25
  }
29
- `;else if(ca.test(fe))throw new pe(E);M=(C?M.replace(Ju,""):M).replace(Yu,"$1").replace(Vu,"$1;"),M="function("+(fe||"obj")+`) {
30
- `+(fe?"":`obj || (obj = {});
31
- `)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
26
+ `;else if(va.test(re))throw new fe(g);B=(C?B.replace(ea,""):B).replace(ta,"$1").replace(na,"$1;"),B="function("+(re||"obj")+`) {
27
+ `+(re?"":`obj || (obj = {});
28
+ `)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
32
29
  function print() { __p += __j.call(arguments, '') }
33
30
  `:`;
34
- `)+M+`return __p
35
- }`;var ve=Lu(function(){return be(u,re+"return "+M).apply(r,g)});if(ve.source=M,Hi(ve))throw ve;return ve}function Dd(e){return Ae(e).toLowerCase()}function Fd(e){return Ae(e).toUpperCase()}function Ud(e,t,n){if(e=Ae(e),e&&(n||t===r))return qo(e);if(!e||!(t=st(t)))return e;var i=mt(e),o=mt(t),u=Ko(i,o),g=zo(i,o)+1;return Xt(i,u,g).join("")}function Pd(e,t,n){if(e=Ae(e),e&&(n||t===r))return e.slice(0,Go(e)+1);if(!e||!(t=st(t)))return e;var i=mt(e),o=zo(i,mt(t))+1;return Xt(i,0,o).join("")}function Md(e,t,n){if(e=Ae(e),e&&(n||t===r))return e.replace(Hr,"");if(!e||!(t=st(t)))return e;var i=mt(e),o=Ko(i,mt(t));return Xt(i,o).join("")}function Wd(e,t){var n=W,i=V;if(Le(t)){var o="separator"in t?t.separator:o;n="length"in t?ge(t.length):n,i="omission"in t?st(t.omission):i}e=Ae(e);var u=e.length;if(ln(e)){var g=mt(e);u=g.length}if(n>=u)return e;var x=n-pn(i);if(x<1)return i;var C=g?Xt(g,0,x).join(""):e.slice(0,x);if(o===r)return C+i;if(g&&(x+=C.length-x),Gi(o)){if(e.slice(x).search(o)){var F,U=C;for(o.global||(o=ui(o.source,Ae(ao.exec(o))+"g")),o.lastIndex=0;F=o.exec(U);)var M=F.index;C=C.slice(0,M===r?x:M)}}else if(e.indexOf(st(o),x)!=x){var X=C.lastIndexOf(o);X>-1&&(C=C.slice(0,X))}return C+i}function qd(e){return e=Ae(e),e&&Zu.test(e)?e.replace(oo,vf):e}var Kd=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ji=Bs("toUpperCase");function Iu(e,t,n){return e=Ae(e),t=n?r:t,t===r?hf(e)?mf(e):tf(e):e.match(t)||[]}var Lu=ye(function(e,t){try{return it(e,r,t)}catch(n){return Hi(n)?n:new pe(n)}}),zd=Bt(function(e,t){return ht(t,function(n){n=Ct(n),It(e,n,Ki(e[n],e))}),e});function Hd(e){var t=e==null?0:e.length,n=ue();return e=t?Ie(e,function(i){if(typeof i[1]!="function")throw new lt(b);return[n(i[0]),i[1]]}):[],ye(function(i){for(var o=-1;++o<t;){var u=e[o];if(it(u[0],this,i))return it(u[1],this,i)}})}function Gd(e){return vc(dt(e,S))}function Yi(e){return function(){return e}}function $d(e,t){return e==null||e!==e?t:e}var Xd=Ds(),Jd=Ds(!0);function tt(e){return e}function Vi(e){return hs(typeof e=="function"?e:dt(e,S))}function Yd(e){return ps(dt(e,S))}function Vd(e,t){return ds(e,dt(t,S))}var Zd=ye(function(e,t){return function(n){return Fn(n,e,t)}}),Qd=ye(function(e,t){return function(n){return Fn(e,n,t)}});function Zi(e,t,n){var i=We(t),o=pr(t,i);n==null&&!(Le(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=pr(t,We(t)));var u=!(Le(n)&&"chain"in n)||!!n.chain,g=Dt(e);return ht(o,function(x){var C=t[x];e[x]=C,g&&(e.prototype[x]=function(){var F=this.__chain__;if(u||F){var U=e(this.__wrapped__),M=U.__actions__=Qe(this.__actions__);return M.push({func:C,args:arguments,thisArg:e}),U.__chain__=F,U}return C.apply(e,qt([this.value()],arguments))})}),e}function jd(){return qe._===this&&(qe._=Ef),this}function Qi(){}function e0(e){return e=ge(e),ye(function(t){return gs(t,e)})}var t0=Ri(Ie),n0=Ri(Fo),r0=Ri(ei);function Bu(e){return Fi(e)?ti(Ct(e)):Bc(e)}function i0(e){return function(t){return e==null?r:nn(e,t)}}var o0=Us(),s0=Us(!0);function ji(){return[]}function eo(){return!1}function u0(){return{}}function a0(){return""}function f0(){return!0}function c0(e,t){if(e=ge(e),e<1||e>L)return[];var n=ze,i=Ge(e,ze);t=ue(t),e-=ze;for(var o=ii(i,t);++n<e;)t(n);return o}function h0(e){return de(e)?Ie(e,Ct):ut(e)?[e]:Qe(js(Ae(e)))}function l0(e){var t=++Sf;return Ae(e)+t}var p0=mr(function(e,t){return e+t},0),d0=Oi("ceil"),g0=mr(function(e,t){return e/t},1),v0=Oi("floor");function y0(e){return e&&e.length?lr(e,tt,gi):r}function _0(e,t){return e&&e.length?lr(e,ue(t,2),gi):r}function m0(e){return Mo(e,tt)}function w0(e,t){return Mo(e,ue(t,2))}function x0(e){return e&&e.length?lr(e,tt,mi):r}function b0(e,t){return e&&e.length?lr(e,ue(t,2),mi):r}var S0=mr(function(e,t){return e*t},1),A0=Oi("round"),E0=mr(function(e,t){return e-t},0);function T0(e){return e&&e.length?ri(e,tt):0}function C0(e,t){return e&&e.length?ri(e,ue(t,2)):0}return s.after=Yl,s.ary=cu,s.assign=Fp,s.assignIn=Au,s.assignInWith=Lr,s.assignWith=Up,s.at=Pp,s.before=hu,s.bind=Ki,s.bindAll=zd,s.bindKey=lu,s.castArray=up,s.chain=uu,s.chunk=vh,s.compact=yh,s.concat=_h,s.cond=Hd,s.conforms=Gd,s.constant=Yi,s.countBy=Tl,s.create=Mp,s.curry=pu,s.curryRight=du,s.debounce=gu,s.defaults=Wp,s.defaultsDeep=qp,s.defer=Vl,s.delay=Zl,s.difference=mh,s.differenceBy=wh,s.differenceWith=xh,s.drop=bh,s.dropRight=Sh,s.dropRightWhile=Ah,s.dropWhile=Eh,s.fill=Th,s.filter=kl,s.flatMap=Il,s.flatMapDeep=Ll,s.flatMapDepth=Bl,s.flatten=ru,s.flattenDeep=Ch,s.flattenDepth=kh,s.flip=Ql,s.flow=Xd,s.flowRight=Jd,s.fromPairs=Rh,s.functions=Jp,s.functionsIn=Yp,s.groupBy=Nl,s.initial=Ih,s.intersection=Lh,s.intersectionBy=Bh,s.intersectionWith=Nh,s.invert=Zp,s.invertBy=Qp,s.invokeMap=Fl,s.iteratee=Vi,s.keyBy=Ul,s.keys=We,s.keysIn=et,s.map=Tr,s.mapKeys=ed,s.mapValues=td,s.matches=Yd,s.matchesProperty=Vd,s.memoize=kr,s.merge=nd,s.mergeWith=Eu,s.method=Zd,s.methodOf=Qd,s.mixin=Zi,s.negate=Rr,s.nthArg=e0,s.omit=rd,s.omitBy=id,s.once=jl,s.orderBy=Pl,s.over=t0,s.overArgs=ep,s.overEvery=n0,s.overSome=r0,s.partial=zi,s.partialRight=vu,s.partition=Ml,s.pick=od,s.pickBy=Tu,s.property=Bu,s.propertyOf=i0,s.pull=Ph,s.pullAll=ou,s.pullAllBy=Mh,s.pullAllWith=Wh,s.pullAt=qh,s.range=o0,s.rangeRight=s0,s.rearg=tp,s.reject=Kl,s.remove=Kh,s.rest=np,s.reverse=Wi,s.sampleSize=Hl,s.set=ud,s.setWith=ad,s.shuffle=Gl,s.slice=zh,s.sortBy=Jl,s.sortedUniq=Vh,s.sortedUniqBy=Zh,s.split=Id,s.spread=rp,s.tail=Qh,s.take=jh,s.takeRight=el,s.takeRightWhile=tl,s.takeWhile=nl,s.tap=yl,s.throttle=ip,s.thru=Er,s.toArray=xu,s.toPairs=Cu,s.toPairsIn=ku,s.toPath=h0,s.toPlainObject=Su,s.transform=fd,s.unary=op,s.union=rl,s.unionBy=il,s.unionWith=ol,s.uniq=sl,s.uniqBy=ul,s.uniqWith=al,s.unset=cd,s.unzip=qi,s.unzipWith=su,s.update=hd,s.updateWith=ld,s.values=Sn,s.valuesIn=pd,s.without=fl,s.words=Iu,s.wrap=sp,s.xor=cl,s.xorBy=hl,s.xorWith=ll,s.zip=pl,s.zipObject=dl,s.zipObjectDeep=gl,s.zipWith=vl,s.entries=Cu,s.entriesIn=ku,s.extend=Au,s.extendWith=Lr,Zi(s,s),s.add=p0,s.attempt=Lu,s.camelCase=yd,s.capitalize=Ru,s.ceil=d0,s.clamp=dd,s.clone=ap,s.cloneDeep=cp,s.cloneDeepWith=hp,s.cloneWith=fp,s.conformsTo=lp,s.deburr=Ou,s.defaultTo=$d,s.divide=g0,s.endsWith=_d,s.eq=xt,s.escape=md,s.escapeRegExp=wd,s.every=Cl,s.find=Rl,s.findIndex=tu,s.findKey=Kp,s.findLast=Ol,s.findLastIndex=nu,s.findLastKey=zp,s.floor=v0,s.forEach=au,s.forEachRight=fu,s.forIn=Hp,s.forInRight=Gp,s.forOwn=$p,s.forOwnRight=Xp,s.get=$i,s.gt=pp,s.gte=dp,s.has=Vp,s.hasIn=Xi,s.head=iu,s.identity=tt,s.includes=Dl,s.indexOf=Oh,s.inRange=gd,s.invoke=jp,s.isArguments=sn,s.isArray=de,s.isArrayBuffer=gp,s.isArrayLike=je,s.isArrayLikeObject=De,s.isBoolean=vp,s.isBuffer=Jt,s.isDate=yp,s.isElement=_p,s.isEmpty=mp,s.isEqual=wp,s.isEqualWith=xp,s.isError=Hi,s.isFinite=bp,s.isFunction=Dt,s.isInteger=yu,s.isLength=Or,s.isMap=_u,s.isMatch=Sp,s.isMatchWith=Ap,s.isNaN=Ep,s.isNative=Tp,s.isNil=kp,s.isNull=Cp,s.isNumber=mu,s.isObject=Le,s.isObjectLike=Ne,s.isPlainObject=Kn,s.isRegExp=Gi,s.isSafeInteger=Rp,s.isSet=wu,s.isString=Ir,s.isSymbol=ut,s.isTypedArray=bn,s.isUndefined=Op,s.isWeakMap=Ip,s.isWeakSet=Lp,s.join=Dh,s.kebabCase=xd,s.last=vt,s.lastIndexOf=Fh,s.lowerCase=bd,s.lowerFirst=Sd,s.lt=Bp,s.lte=Np,s.max=y0,s.maxBy=_0,s.mean=m0,s.meanBy=w0,s.min=x0,s.minBy=b0,s.stubArray=ji,s.stubFalse=eo,s.stubObject=u0,s.stubString=a0,s.stubTrue=f0,s.multiply=S0,s.nth=Uh,s.noConflict=jd,s.noop=Qi,s.now=Cr,s.pad=Ad,s.padEnd=Ed,s.padStart=Td,s.parseInt=Cd,s.random=vd,s.reduce=Wl,s.reduceRight=ql,s.repeat=kd,s.replace=Rd,s.result=sd,s.round=A0,s.runInContext=T,s.sample=zl,s.size=$l,s.snakeCase=Od,s.some=Xl,s.sortedIndex=Hh,s.sortedIndexBy=Gh,s.sortedIndexOf=$h,s.sortedLastIndex=Xh,s.sortedLastIndexBy=Jh,s.sortedLastIndexOf=Yh,s.startCase=Ld,s.startsWith=Bd,s.subtract=E0,s.sum=T0,s.sumBy=C0,s.template=Nd,s.times=c0,s.toFinite=Ft,s.toInteger=ge,s.toLength=bu,s.toLower=Dd,s.toNumber=yt,s.toSafeInteger=Dp,s.toString=Ae,s.toUpper=Fd,s.trim=Ud,s.trimEnd=Pd,s.trimStart=Md,s.truncate=Wd,s.unescape=qd,s.uniqueId=l0,s.upperCase=Kd,s.upperFirst=Ji,s.each=au,s.eachRight=fu,s.first=iu,Zi(s,function(){var e={};return Et(s,function(t,n){Ee.call(s.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),s.VERSION=l,ht(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){s[e].placeholder=s}),ht(["drop","take"],function(e,t){me.prototype[e]=function(n){n=n===r?1:Pe(ge(n),0);var i=this.__filtered__&&!t?new me(this):this.clone();return i.__filtered__?i.__takeCount__=Ge(n,i.__takeCount__):i.__views__.push({size:Ge(n,ze),type:e+(i.__dir__<0?"Right":"")}),i},me.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),ht(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==c||n==$;me.prototype[e]=function(o){var u=this.clone();return u.__iteratees__.push({iteratee:ue(o,3),type:n}),u.__filtered__=u.__filtered__||i,u}}),ht(["head","last"],function(e,t){var n="take"+(t?"Right":"");me.prototype[e]=function(){return this[n](1).value()[0]}}),ht(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");me.prototype[e]=function(){return this.__filtered__?new me(this):this[n](1)}}),me.prototype.compact=function(){return this.filter(tt)},me.prototype.find=function(e){return this.filter(e).head()},me.prototype.findLast=function(e){return this.reverse().find(e)},me.prototype.invokeMap=ye(function(e,t){return typeof e=="function"?new me(this):this.map(function(n){return Fn(n,e,t)})}),me.prototype.reject=function(e){return this.filter(Rr(ue(e)))},me.prototype.slice=function(e,t){e=ge(e);var n=this;return n.__filtered__&&(e>0||t<0)?new me(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=ge(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},me.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},me.prototype.toArray=function(){return this.take(ze)},Et(me.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=s[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);o&&(s.prototype[t]=function(){var g=this.__wrapped__,x=i?[1]:arguments,C=g instanceof me,F=x[0],U=C||de(g),M=function(_e){var we=o.apply(s,qt([_e],x));return i&&X?we[0]:we};U&&n&&typeof F=="function"&&F.length!=1&&(C=U=!1);var X=this.__chain__,re=!!this.__actions__.length,fe=u&&!X,ve=C&&!re;if(!u&&U){g=ve?g:new me(this);var ce=e.apply(g,x);return ce.__actions__.push({func:Er,args:[M],thisArg:r}),new pt(ce,X)}return fe&&ve?e.apply(this,x):(ce=this.thru(M),fe?i?ce.value()[0]:ce.value():ce)})}),ht(["pop","push","shift","sort","splice","unshift"],function(e){var t=Zn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);s.prototype[e]=function(){var o=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(de(u)?u:[],o)}return this[n](function(g){return t.apply(de(g)?g:[],o)})}}),Et(me.prototype,function(e,t){var n=s[t];if(n){var i=n.name+"";Ee.call(yn,i)||(yn[i]=[]),yn[i].push({name:t,func:n})}}),yn[_r(r,Q).name]=[{name:"wrapper",func:r}],me.prototype.clone=qf,me.prototype.reverse=Kf,me.prototype.value=zf,s.prototype.at=_l,s.prototype.chain=ml,s.prototype.commit=wl,s.prototype.next=xl,s.prototype.plant=Sl,s.prototype.reverse=Al,s.prototype.toJSON=s.prototype.valueOf=s.prototype.value=El,s.prototype.first=s.prototype.head,Rn&&(s.prototype[Rn]=bl),s},dn=wf();Zt?((Zt.exports=dn)._=dn,Vr._=dn):qe._=dn}).call(Me)}(Hn,Hn.exports);var Wu=Hn.exports;const ro={isNewStack:!1,servers:[{URLID:1,Priority:5,Version:"1.3.7",Domain:"monitor1.comms24x7.com"},{URLID:2,Priority:4,Version:"1.3.7",Domain:"monitor2.comms24x7.com"}],loginUrl:"https://loginapi.comms24x7.com/monitorAPI/Login",refreshTokenUrl:"https://loginapi.comms24x7.com/monitorAPI/RefreshIdentityToken",fallbackServer:{Domain:"monitor5.voicenter.co.il",Priority:0,Version:"1.3.7",URLID:1},token:"",loginType:un.TOKEN,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:!1,loggerSocketConnection:"",loggerServer:"http://127.0.0.1:3000/",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:!1,upgrade:!1,transports:["websocket"],debug:!1},username:"username",password:"92455783085",email:"sasha.za@starkey.co.il"};function qu(){return function A(w,r,l){function h(E,k){if(!r[E]){if(!w[E]){var m=typeof require=="function"&&require;if(!k&&m)return m(E,!0);if(y)return y(E,!0);throw new Error("Cannot find module '"+E+"'")}var I=r[E]={exports:{}};w[E][0].call(I.exports,function(S){var p=w[E][1][S];return h(p||S)},I,I.exports,A,w,r,l)}return r[E].exports}for(var y=typeof require=="function"&&require,b=0;b<l.length;b++)h(l[b]);return h}({1:[function(A,w){w.exports=A("./lib/")},{"./lib/":2}],2:[function(A,w,r){function l(m,I){typeof m=="object"&&(I=m,m=void 0),I=I||{};var S,p=h(m),f=p.source,_=p.id;return I.forceNew||I["force new connection"]||I.multiplex===!1?(E("ignoring socket cache for %s",f),S=b(f,I)):(k[_]||(E("new io instance for %s",f),k[_]=b(f,I)),S=k[_]),S.socket(p.path)}var h=A("./url"),y=A("socket.io-parser"),b=A("./manager"),E=A("debug")("socket.io-client");w.exports=r=l;var k=r.managers={};r.protocol=y.protocol,r.connect=l,r.Manager=A("./manager"),r.Socket=A("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(A,w){function r(p,f){return this instanceof r?(p&&typeof p=="object"&&(f=p,p=void 0),f=f||{},f.path=f.path||"/socket.io",this.nsps={},this.subs=[],this.opts=f,this.reconnection(f.reconnection!==!1),this.reconnectionAttempts(f.reconnectionAttempts||1/0),this.reconnectionDelay(f.reconnectionDelay||1e3),this.reconnectionDelayMax(f.reconnectionDelayMax||5e3),this.randomizationFactor(f.randomizationFactor||.5),this.backoff=new S({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(f.timeout==null?2e4:f.timeout),this.readyState="closed",this.uri=p,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new b.Encoder,this.decoder=new b.Decoder,this.autoConnect=f.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(p,f)}var l=(A("./url"),A("engine.io-client")),h=A("./socket"),y=A("component-emitter"),b=A("socket.io-parser"),E=A("./on"),k=A("component-bind"),m=(A("object-component"),A("debug")("socket.io-client:manager")),I=A("indexof"),S=A("backo2");w.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var p in this.nsps)this.nsps[p].emit.apply(this.nsps[p],arguments)},r.prototype.updateSocketIds=function(){for(var p in this.nsps)this.nsps[p].id=this.engine.id},y(r.prototype),r.prototype.reconnection=function(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection},r.prototype.reconnectionAttempts=function(p){return arguments.length?(this._reconnectionAttempts=p,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(p){return arguments.length?(this._reconnectionDelay=p,this.backoff&&this.backoff.setMin(p),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(p){return arguments.length?(this._randomizationFactor=p,this.backoff&&this.backoff.setJitter(p),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(p){return arguments.length?(this._reconnectionDelayMax=p,this.backoff&&this.backoff.setMax(p),this):this._reconnectionDelayMax},r.prototype.timeout=function(p){return arguments.length?(this._timeout=p,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},r.prototype.open=r.prototype.connect=function(p){if(m("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;m("opening %s",this.uri),this.engine=l(this.uri,this.opts);var f=this.engine,_=this;this.readyState="opening",this.skipReconnect=!1;var R=E(f,"open",function(){_.onopen(),p&&p()}),D=E(f,"error",function(te){if(m("connect_error"),_.cleanup(),_.readyState="closed",_.emitAll("connect_error",te),p){var he=new Error("Connection error");he.data=te,p(he)}else _.maybeReconnectOnOpen()});if(this._timeout!==!1){var Q=this._timeout;m("connect attempt will timeout after %d",Q);var ae=setTimeout(function(){m("connect attempt timed out after %d",Q),R.destroy(),f.close(),f.emit("error","timeout"),_.emitAll("connect_timeout",Q)},Q);this.subs.push({destroy:function(){clearTimeout(ae)}})}return this.subs.push(R),this.subs.push(D),this},r.prototype.onopen=function(){m("open"),this.cleanup(),this.readyState="open",this.emit("open");var p=this.engine;this.subs.push(E(p,"data",k(this,"ondata"))),this.subs.push(E(this.decoder,"decoded",k(this,"ondecoded"))),this.subs.push(E(p,"error",k(this,"onerror"))),this.subs.push(E(p,"close",k(this,"onclose")))},r.prototype.ondata=function(p){this.decoder.add(p)},r.prototype.ondecoded=function(p){this.emit("packet",p)},r.prototype.onerror=function(p){m("error",p),this.emitAll("error",p)},r.prototype.socket=function(p){var f=this.nsps[p];if(!f){f=new h(this,p),this.nsps[p]=f;var _=this;f.on("connect",function(){f.id=_.engine.id,~I(_.connected,f)||_.connected.push(f)})}return f},r.prototype.destroy=function(p){var f=I(this.connected,p);~f&&this.connected.splice(f,1),this.connected.length||this.close()},r.prototype.packet=function(p){m("writing packet %j",p);var f=this;f.encoding?f.packetBuffer.push(p):(f.encoding=!0,this.encoder.encode(p,function(_){for(var R=0;R<_.length;R++)f.engine.write(_[R]);f.encoding=!1,f.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var p=this.packetBuffer.shift();this.packet(p)}},r.prototype.cleanup=function(){for(var p;p=this.subs.shift();)p.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(p){m("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",p),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var p=this;if(this.backoff.attempts>=this._reconnectionAttempts)m("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var f=this.backoff.duration();m("will wait %dms before reconnect attempt",f),this.reconnecting=!0;var _=setTimeout(function(){p.skipReconnect||(m("attempting reconnect"),p.emitAll("reconnect_attempt",p.backoff.attempts),p.emitAll("reconnecting",p.backoff.attempts),p.skipReconnect||p.open(function(R){R?(m("reconnect attempt error"),p.reconnecting=!1,p.reconnect(),p.emitAll("reconnect_error",R.data)):(m("reconnect success"),p.onreconnect())}))},f);this.subs.push({destroy:function(){clearTimeout(_)}})}},r.prototype.onreconnect=function(){var p=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",p)}},{"./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(A,w){function r(l,h,y){return l.on(h,y),{destroy:function(){l.removeListener(h,y)}}}w.exports=r},{}],5:[function(A,w,r){function l(f,_){this.io=f,this.nsp=_,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var h=A("socket.io-parser"),y=A("component-emitter"),b=A("to-array"),E=A("./on"),k=A("component-bind"),m=A("debug")("socket.io-client:socket"),I=A("has-binary");w.exports=l;var S={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},p=y.prototype.emit;y(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var f=this.io;this.subs=[E(f,"open",k(this,"onopen")),E(f,"packet",k(this,"onpacket")),E(f,"close",k(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 f=b(arguments);return f.unshift("message"),this.emit.apply(this,f),this},l.prototype.emit=function(f){if(S.hasOwnProperty(f))return p.apply(this,arguments),this;var _=b(arguments),R=h.EVENT;I(_)&&(R=h.BINARY_EVENT);var D={type:R,data:_};return typeof _[_.length-1]=="function"&&(m("emitting packet with ack id %d",this.ids),this.acks[this.ids]=_.pop(),D.id=this.ids++),this.connected?this.packet(D):this.sendBuffer.push(D),this},l.prototype.packet=function(f){f.nsp=this.nsp,this.io.packet(f)},l.prototype.onopen=function(){m("transport is open - connecting"),this.nsp!="/"&&this.packet({type:h.CONNECT})},l.prototype.onclose=function(f){m("close (%s)",f),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",f)},l.prototype.onpacket=function(f){if(f.nsp==this.nsp)switch(f.type){case h.CONNECT:this.onconnect();break;case h.EVENT:this.onevent(f);break;case h.BINARY_EVENT:this.onevent(f);break;case h.ACK:this.onack(f);break;case h.BINARY_ACK:this.onack(f);break;case h.DISCONNECT:this.ondisconnect();break;case h.ERROR:this.emit("error",f.data)}},l.prototype.onevent=function(f){var _=f.data||[];m("emitting event %j",_),f.id!=null&&(m("attaching ack callback to event"),_.push(this.ack(f.id))),this.connected?p.apply(this,_):this.receiveBuffer.push(_)},l.prototype.ack=function(f){var _=this,R=!1;return function(){if(!R){R=!0;var D=b(arguments);m("sending ack %j",D);var Q=I(D)?h.BINARY_ACK:h.ACK;_.packet({type:Q,id:f,data:D})}}},l.prototype.onack=function(f){m("calling ack %s with %j",f.id,f.data);var _=this.acks[f.id];_.apply(this,f.data),delete this.acks[f.id]},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var f;for(f=0;f<this.receiveBuffer.length;f++)p.apply(this,this.receiveBuffer[f]);for(this.receiveBuffer=[],f=0;f<this.sendBuffer.length;f++)this.packet(this.sendBuffer[f]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){m("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var f=0;f<this.subs.length;f++)this.subs[f].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(m("performing disconnect (%s)",this.nsp),this.packet({type:h.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(A,w){(function(r){function l(b,m){var k=b,m=m||r.location;return b==null&&(b=m.protocol+"//"+m.host),typeof b=="string"&&(b.charAt(0)=="/"&&(b=b.charAt(1)=="/"?m.protocol+b:m.hostname+b),/^(https?|wss?):\/\//.test(b)||(y("protocol-less url %s",b),b=typeof m<"u"?m.protocol+"//"+b:"https://"+b),y("parse %s",b),k=h(b)),k.port||(/^(http|ws)$/.test(k.protocol)?k.port="80":/^(http|ws)s$/.test(k.protocol)&&(k.port="443")),k.path=k.path||"/",k.id=k.protocol+"://"+k.host+":"+k.port,k.href=k.protocol+"://"+k.host+(m&&m.port==k.port?"":":"+k.port),k}var h=A("parseuri"),y=A("debug")("socket.io-client:url");w.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(A,w){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}w.exports=r,r.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var h=Math.random(),y=Math.floor(h*this.jitter*l);l=1&Math.floor(10*h)?l+y:l-y}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(A,w){var r=[].slice;w.exports=function(l,h){if(typeof h=="string"&&(h=l[h]),typeof h!="function")throw new Error("bind() requires a function");var y=r.call(arguments,2);return function(){return h.apply(l,y.concat(r.call(arguments)))}}},{}],9:[function(A,w){function r(h){return h?l(h):void 0}function l(h){for(var y in r.prototype)h[y]=r.prototype[y];return h}w.exports=r,r.prototype.on=r.prototype.addEventListener=function(h,y){return this._callbacks=this._callbacks||{},(this._callbacks[h]=this._callbacks[h]||[]).push(y),this},r.prototype.once=function(h,y){function b(){E.off(h,b),y.apply(this,arguments)}var E=this;return this._callbacks=this._callbacks||{},b.fn=y,this.on(h,b),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(h,y){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var b=this._callbacks[h];if(!b)return this;if(arguments.length==1)return delete this._callbacks[h],this;for(var E,k=0;k<b.length;k++)if(E=b[k],E===y||E.fn===y){b.splice(k,1);break}return this},r.prototype.emit=function(h){this._callbacks=this._callbacks||{};var y=[].slice.call(arguments,1),b=this._callbacks[h];if(b){b=b.slice(0);for(var E=0,k=b.length;k>E;++E)b[E].apply(this,y)}return this},r.prototype.listeners=function(h){return this._callbacks=this._callbacks||{},this._callbacks[h]||[]},r.prototype.hasListeners=function(h){return!!this.listeners(h).length}},{}],10:[function(A,w){function r(h){return r.enabled(h)?function(y){y=l(y);var b=new Date,E=b-(r[h]||b);r[h]=b,y=h+" "+y+" +"+r.humanize(E),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function l(h){return h instanceof Error?h.stack||h.message:h}w.exports=r,r.names=[],r.skips=[],r.enable=function(h){try{localStorage.debug=h}catch{}for(var y=(h||"").split(/[\s,]+/),b=y.length,E=0;b>E;E++)h=y[E].replace("*",".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.substr(1)+"$")):r.names.push(new RegExp("^"+h+"$"))},r.disable=function(){r.enable("")},r.humanize=function(h){var y=1e3,b=6e4,E=60*b;return h>=E?(h/E).toFixed(1)+"h":h>=b?(h/b).toFixed(1)+"m":h>=y?(h/y|0)+"s":h+"ms"},r.enabled=function(h){for(var y=0,b=r.skips.length;b>y;y++)if(r.skips[y].test(h))return!1;for(var y=0,b=r.names.length;b>y;y++)if(r.names[y].test(h))return!0;return!1};try{window.localStorage&&r.enable(localStorage.debug)}catch{}},{}],11:[function(A,w){w.exports=A("./lib/")},{"./lib/":12}],12:[function(A,w){w.exports=A("./socket"),w.exports.parser=A("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(A,w){(function(r){function l(f,_){if(!(this instanceof l))return new l(f,_);if(_=_||{},f&&typeof f=="object"&&(_=f,f=null),f&&(f=I(f),_.host=f.host,_.secure=f.protocol=="https"||f.protocol=="wss",_.port=f.port,f.query&&(_.query=f.query)),this.secure=_.secure!=null?_.secure:r.location&&location.protocol=="https:",_.host){var R=_.host.split(":");_.hostname=R.shift(),R.length?_.port=R.pop():_.port||(_.port=this.secure?"443":"80")}this.agent=_.agent||!1,this.hostname=_.hostname||(r.location?location.hostname:"localhost"),this.port=_.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=_.query||{},typeof this.query=="string"&&(this.query=p.decode(this.query)),this.upgrade=_.upgrade!==!1,this.path=(_.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!_.forceJSONP,this.jsonp=_.jsonp!==!1,this.forceBase64=!!_.forceBase64,this.enablesXDR=!!_.enablesXDR,this.timestampParam=_.timestampParam||"t",this.timestampRequests=_.timestampRequests,this.transports=_.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=_.policyPort||843,this.rememberUpgrade=_.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=_.onlyBinaryUpgrades,this.pfx=_.pfx||null,this.key=_.key||null,this.passphrase=_.passphrase||null,this.cert=_.cert||null,this.ca=_.ca||null,this.ciphers=_.ciphers||null,this.rejectUnauthorized=_.rejectUnauthorized||null,this.open()}function h(f){var _={};for(var R in f)f.hasOwnProperty(R)&&(_[R]=f[R]);return _}var y=A("./transports"),b=A("component-emitter"),E=A("debug")("engine.io-client:socket"),k=A("indexof"),m=A("engine.io-parser"),I=A("parseuri"),S=A("parsejson"),p=A("parseqs");w.exports=l,l.priorWebsocketSuccess=!1,b(l.prototype),l.protocol=m.protocol,l.Socket=l,l.Transport=A("./transport"),l.transports=A("./transports"),l.parser=A("engine.io-parser"),l.prototype.createTransport=function(f){E('creating transport "%s"',f);var _=h(this.query);_.EIO=m.protocol,_.transport=f,this.id&&(_.sid=this.id);var R=new y[f]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:_,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 R},l.prototype.open=function(){var _;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)_="websocket";else{if(this.transports.length==0){var f=this;return void setTimeout(function(){f.emit("error","No transports available")},0)}_=this.transports[0]}this.readyState="opening";var _;try{_=this.createTransport(_)}catch{return this.transports.shift(),void this.open()}_.open(),this.setTransport(_)},l.prototype.setTransport=function(f){E("setting transport %s",f.name);var _=this;this.transport&&(E("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",function(){_.onDrain()}).on("packet",function(R){_.onPacket(R)}).on("error",function(R){_.onError(R)}).on("close",function(){_.onClose("transport close")})},l.prototype.probe=function(f){function _(){if(z.onlyBinaryUpgrades){var J=!this.supportsBinary&&z.transport.supportsBinary;q=q||J}q||(E('probe transport "%s" opened',f),Y.send([{type:"ping",data:"probe"}]),Y.once("packet",function(B){if(!q)if(B.type=="pong"&&B.data=="probe"){if(E('probe transport "%s" pong',f),z.upgrading=!0,z.emit("upgrading",Y),!Y)return;l.priorWebsocketSuccess=Y.name=="websocket",E('pausing current transport "%s"',z.transport.name),z.transport.pause(function(){q||z.readyState!="closed"&&(E("changing transport and sending upgrade packet"),he(),z.setTransport(Y),Y.send([{type:"upgrade"}]),z.emit("upgrade",Y),Y=null,z.upgrading=!1,z.flush())})}else{E('probe transport "%s" failed',f);var W=new Error("probe error");W.transport=Y.name,z.emit("upgradeError",W)}}))}function R(){q||(q=!0,he(),Y.close(),Y=null)}function D(J){var B=new Error("probe error: "+J);B.transport=Y.name,R(),E('probe transport "%s" failed because of error: %s',f,J),z.emit("upgradeError",B)}function Q(){D("transport closed")}function ae(){D("socket closed")}function te(J){Y&&J.name!=Y.name&&(E('"%s" works - aborting "%s"',J.name,Y.name),R())}function he(){Y.removeListener("open",_),Y.removeListener("error",D),Y.removeListener("close",Q),z.removeListener("close",ae),z.removeListener("upgrading",te)}E('probing transport "%s"',f);var Y=this.createTransport(f,{probe:1}),q=!1,z=this;l.priorWebsocketSuccess=!1,Y.once("open",_),Y.once("error",D),Y.once("close",Q),this.once("close",ae),this.once("upgrading",te),Y.open()},l.prototype.onOpen=function(){if(E("socket open"),this.readyState="open",l.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){E("starting upgrade probes");for(var f=0,_=this.upgrades.length;_>f;f++)this.probe(this.upgrades[f])}},l.prototype.onPacket=function(f){if(this.readyState=="opening"||this.readyState=="open")switch(E('socket receive: type "%s", data "%s"',f.type,f.data),this.emit("packet",f),this.emit("heartbeat"),f.type){case"open":this.onHandshake(S(f.data));break;case"pong":this.setPing();break;case"error":var _=new Error("server error");_.code=f.data,this.emit("error",_);break;case"message":this.emit("data",f.data),this.emit("message",f.data)}else E('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(f){this.emit("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(f){clearTimeout(this.pingTimeoutTimer);var _=this;_.pingTimeoutTimer=setTimeout(function(){_.readyState!="closed"&&_.onClose("ping timeout")},f||_.pingInterval+_.pingTimeout)},l.prototype.setPing=function(){var f=this;clearTimeout(f.pingIntervalTimer),f.pingIntervalTimer=setTimeout(function(){E("writing ping packet - expecting pong within %sms",f.pingTimeout),f.ping(),f.onHeartbeat(f.pingTimeout)},f.pingInterval)},l.prototype.ping=function(){this.sendPacket("ping")},l.prototype.onDrain=function(){for(var f=0;f<this.prevBufferLen;f++)this.callbackBuffer[f]&&this.callbackBuffer[f]();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&&(E("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(f,_){return this.sendPacket("message",f,_),this},l.prototype.sendPacket=function(f,_,R){if(this.readyState!="closing"&&this.readyState!="closed"){var D={type:f,data:_};this.emit("packetCreate",D),this.writeBuffer.push(D),this.callbackBuffer.push(R),this.flush()}},l.prototype.close=function(){function f(){D.onClose("forced close"),E("socket closing - telling transport to close"),D.transport.close()}function _(){D.removeListener("upgrade",_),D.removeListener("upgradeError",_),f()}function R(){D.once("upgrade",_),D.once("upgradeError",_)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var D=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?R():f()}):this.upgrading?R():f()}return this},l.prototype.onError=function(f){E("socket error %j",f),l.priorWebsocketSuccess=!1,this.emit("error",f),this.onClose("transport error",f)},l.prototype.onClose=function(f,_){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){E('socket close with reason: "%s"',f);var R=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){R.writeBuffer=[],R.callbackBuffer=[],R.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",f,_)}},l.prototype.filterUpgrades=function(f){for(var _=[],R=0,D=f.length;D>R;R++)~k(this.transports,f[R])&&_.push(f[R]);return _}}).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(A,w){function r(y){this.path=y.path,this.hostname=y.hostname,this.port=y.port,this.secure=y.secure,this.query=y.query,this.timestampParam=y.timestampParam,this.timestampRequests=y.timestampRequests,this.readyState="",this.agent=y.agent||!1,this.socket=y.socket,this.enablesXDR=y.enablesXDR,this.pfx=y.pfx,this.key=y.key,this.passphrase=y.passphrase,this.cert=y.cert,this.ca=y.ca,this.ciphers=y.ciphers,this.rejectUnauthorized=y.rejectUnauthorized}var l=A("engine.io-parser"),h=A("component-emitter");w.exports=r,h(r.prototype),r.timestamps=0,r.prototype.onError=function(y,b){var E=new Error(y);return E.type="TransportError",E.description=b,this.emit("error",E),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(y){if(this.readyState!="open")throw new Error("Transport not open");this.write(y)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(y){var b=l.decodePacket(y,this.socket.binaryType);this.onPacket(b)},r.prototype.onPacket=function(y){this.emit("packet",y)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(A,w,r){(function(l){function h(m){var I,S=!1,p=!1,f=m.jsonp!==!1;if(l.location){var _=location.protocol=="https:",R=location.port;R||(R=_?443:80),S=m.hostname!=location.hostname||R!=m.port,p=m.secure!=_}if(m.xdomain=S,m.xscheme=p,I=new y(m),"open"in I&&!m.forceJSONP)return new b(m);if(!f)throw new Error("JSONP disabled");return new E(m)}var y=A("xmlhttprequest"),b=A("./polling-xhr"),E=A("./polling-jsonp"),k=A("./websocket");r.polling=h,r.websocket=k}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(A,w){(function(r){function l(){}function h(I){y.call(this,I),this.query=this.query||{},E||(r.___eio||(r.___eio=[]),E=r.___eio),this.index=E.length;var S=this;E.push(function(p){S.onData(p)}),this.query.j=this.index,r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){S.script&&(S.script.onerror=l)},!1)}var y=A("./polling"),b=A("component-inherit");w.exports=h;var E,k=/\n/g,m=/\\n/g;b(h,y),h.prototype.supportsBinary=!1,h.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),y.prototype.doClose.call(this)},h.prototype.doPoll=function(){var I=this,S=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),S.async=!0,S.src=this.uri(),S.onerror=function(_){I.onError("jsonp poll error",_)};var p=document.getElementsByTagName("script")[0];p.parentNode.insertBefore(S,p),this.script=S;var f=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);f&&setTimeout(function(){var _=document.createElement("iframe");document.body.appendChild(_),document.body.removeChild(_)},100)},h.prototype.doWrite=function(I,S){function p(){f(),S()}function f(){if(_.iframe)try{_.form.removeChild(_.iframe)}catch(he){_.onError("jsonp polling iframe removal error",he)}try{var te='<iframe src="javascript:0" name="'+_.iframeId+'">';R=document.createElement(te)}catch{R=document.createElement("iframe"),R.name=_.iframeId,R.src="javascript:0"}R.id=_.iframeId,_.form.appendChild(R),_.iframe=R}var _=this;if(!this.form){var R,D=document.createElement("form"),Q=document.createElement("textarea"),ae=this.iframeId="eio_iframe_"+this.index;D.className="socketio",D.style.position="absolute",D.style.top="-1000px",D.style.left="-1000px",D.target=ae,D.method="POST",D.setAttribute("accept-charset","utf-8"),Q.name="d",D.appendChild(Q),document.body.appendChild(D),this.form=D,this.area=Q}this.form.action=this.uri(),f(),I=I.replace(m,`\\
36
- `),this.area.value=I.replace(k,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){_.iframe.readyState=="complete"&&p()}:this.iframe.onload=p}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(A,w){(function(r){function l(){}function h(p){if(k.call(this,p),r.location){var f=location.protocol=="https:",_=location.port;_||(_=f?443:80),this.xd=p.hostname!=r.location.hostname||_!=p.port,this.xs=p.secure!=f}}function y(p){this.method=p.method||"GET",this.uri=p.uri,this.xd=!!p.xd,this.xs=!!p.xs,this.async=p.async!==!1,this.data=p.data!=null?p.data:null,this.agent=p.agent,this.isBinary=p.isBinary,this.supportsBinary=p.supportsBinary,this.enablesXDR=p.enablesXDR,this.pfx=p.pfx,this.key=p.key,this.passphrase=p.passphrase,this.cert=p.cert,this.ca=p.ca,this.ciphers=p.ciphers,this.rejectUnauthorized=p.rejectUnauthorized,this.create()}function b(){for(var p in y.requests)y.requests.hasOwnProperty(p)&&y.requests[p].abort()}var E=A("xmlhttprequest"),k=A("./polling"),m=A("component-emitter"),I=A("component-inherit"),S=A("debug")("engine.io-client:polling-xhr");w.exports=h,w.exports.Request=y,I(h,k),h.prototype.supportsBinary=!0,h.prototype.request=function(p){return p=p||{},p.uri=this.uri(),p.xd=this.xd,p.xs=this.xs,p.agent=this.agent||!1,p.supportsBinary=this.supportsBinary,p.enablesXDR=this.enablesXDR,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,new y(p)},h.prototype.doWrite=function(p,f){var _=typeof p!="string"&&p!==void 0,R=this.request({method:"POST",data:p,isBinary:_}),D=this;R.on("success",f),R.on("error",function(Q){D.onError("xhr post error",Q)}),this.sendXhr=R},h.prototype.doPoll=function(){S("xhr poll");var p=this.request(),f=this;p.on("data",function(_){f.onData(_)}),p.on("error",function(_){f.onError("xhr poll error",_)}),this.pollXhr=p},m(y.prototype),y.prototype.create=function(){var p={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};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;var f=this.xhr=new E(p),_=this;try{if(S("xhr open %s: %s",this.method,this.uri),f.open(this.method,this.uri,this.async),this.supportsBinary&&(f.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?f.setRequestHeader("Content-type","application/octet-stream"):f.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in f&&(f.withCredentials=!0),this.hasXDR()?(f.onload=function(){_.onLoad()},f.onerror=function(){_.onError(f.responseText)}):f.onreadystatechange=function(){f.readyState==4&&(f.status==200||f.status==1223?_.onLoad():setTimeout(function(){_.onError(f.status)},0))},S("xhr data %s",this.data),f.send(this.data)}catch(R){return void setTimeout(function(){_.onError(R)},0)}r.document&&(this.index=y.requestsCount++,y.requests[this.index]=this)},y.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},y.prototype.onData=function(p){this.emit("data",p),this.onSuccess()},y.prototype.onError=function(p){this.emit("error",p),this.cleanup(!0)},y.prototype.cleanup=function(p){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,p)try{this.xhr.abort()}catch{}r.document&&delete y.requests[this.index],this.xhr=null}},y.prototype.onLoad=function(){var p;try{var f;try{f=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}p=f==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(_){this.onError(_)}p!=null&&this.onData(p)},y.prototype.hasXDR=function(){return typeof r.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},y.prototype.abort=function(){this.cleanup()},r.document&&(y.requestsCount=0,y.requests={},r.attachEvent?r.attachEvent("onunload",b):r.addEventListener&&r.addEventListener("beforeunload",b,!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(A,w){function r(m){var I=m&&m.forceBase64;(!k||I)&&(this.supportsBinary=!1),l.call(this,m)}var l=A("../transport"),h=A("parseqs"),y=A("engine.io-parser"),b=A("component-inherit"),E=A("debug")("engine.io-client:polling");w.exports=r;var k=function(){var m=A("xmlhttprequest"),I=new m({xdomain:!1});return I.responseType!=null}();b(r,l),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(m){function I(){E("paused"),S.readyState="paused",m()}var S=this;if(this.readyState="pausing",this.polling||!this.writable){var p=0;this.polling&&(E("we are currently polling - waiting to pause"),p++,this.once("pollComplete",function(){E("pre-pause polling complete"),--p||I()})),this.writable||(E("we are currently writing - waiting to pause"),p++,this.once("drain",function(){E("pre-pause writing complete"),--p||I()}))}else I()},r.prototype.poll=function(){E("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(m){var I=this;E("polling got data %s",m);var S=function(p){return I.readyState=="opening"&&I.onOpen(),p.type=="close"?(I.onClose(),!1):void I.onPacket(p)};y.decodePayload(m,this.socket.binaryType,S),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():E('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function m(){E("writing close packet"),I.write([{type:"close"}])}var I=this;this.readyState=="open"?(E("transport open - closing"),m()):(E("transport not open - deferring close"),this.once("open",m))},r.prototype.write=function(m){var S=this;this.writable=!1;var I=function(){S.writable=!0,S.emit("drain")},S=this;y.encodePayload(m,this.supportsBinary,function(p){S.doWrite(p,I)})},r.prototype.uri=function(){var m=this.query||{},I=this.secure?"https":"http",S="";return this.timestampRequests!==!1&&(m[this.timestampParam]=+new Date+"-"+l.timestamps++),this.supportsBinary||m.sid||(m.b64=1),m=h.encode(m),this.port&&(I=="https"&&this.port!=443||I=="http"&&this.port!=80)&&(S=":"+this.port),m.length&&(m="?"+m),I+"://"+this.hostname+S+this.path+m}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(A,w){function r(m){var I=m&&m.forceBase64;I&&(this.supportsBinary=!1),l.call(this,m)}var l=A("../transport"),h=A("engine.io-parser"),y=A("parseqs"),b=A("component-inherit"),E=A("debug")("engine.io-client:websocket"),k=A("ws");w.exports=r,b(r,l),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var m=this.uri(),I=void 0,S={agent:this.agent};S.pfx=this.pfx,S.key=this.key,S.passphrase=this.passphrase,S.cert=this.cert,S.ca=this.ca,S.ciphers=this.ciphers,S.rejectUnauthorized=this.rejectUnauthorized,this.ws=new k(m,I,S),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var m=this;this.ws.onopen=function(){m.onOpen()},this.ws.onclose=function(){m.onClose()},this.ws.onmessage=function(I){m.onData(I.data)},this.ws.onerror=function(I){m.onError("websocket error",I)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(m){var I=this;setTimeout(function(){l.prototype.onData.call(I,m)},0)}),r.prototype.write=function(m){function I(){S.writable=!0,S.emit("drain")}var S=this;this.writable=!1;for(var p=0,f=m.length;f>p;p++)h.encodePacket(m[p],this.supportsBinary,function(_){try{S.ws.send(_)}catch{E("websocket closed before onclose event")}});setTimeout(I,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 m=this.query||{},I=this.secure?"wss":"ws",S="";return this.port&&(I=="wss"&&this.port!=443||I=="ws"&&this.port!=80)&&(S=":"+this.port),this.timestampRequests&&(m[this.timestampParam]=+new Date),this.supportsBinary||(m.b64=1),m=y.encode(m),m.length&&(m="?"+m),I+"://"+this.hostname+S+this.path+m},r.prototype.check=function(){return!(!k||"__initialize"in k&&this.name===r.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(A,w){var r=A("has-cors");w.exports=function(l){var h=l.xdomain,y=l.xscheme,b=l.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!h||r))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!y&&b)return new XDomainRequest}catch{}if(!h)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(A,w){w.exports=function(r,l){var h=function(){};h.prototype=l.prototype,r.prototype=new h,r.prototype.constructor=r}},{}],22:[function(A,w,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 h(){var k=arguments,m=this.useColors;if(k[0]=(m?"%c":"")+this.namespace+(m?" %c":" ")+k[0]+(m?"%c ":" ")+"+"+r.humanize(this.diff),!m)return k;var I="color: "+this.color;k=[k[0],I,"color: inherit"].concat(Array.prototype.slice.call(k,1));var S=0,p=0;return k[0].replace(/%[a-z%]/g,function(f){f!=="%%"&&(S++,f==="%c"&&(p=S))}),k.splice(p,0,I),k}function y(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function b(k){try{k==null?localStorage.removeItem("debug"):localStorage.debug=k}catch{}}function E(){var k;try{k=localStorage.debug}catch{}return k}r=w.exports=A("./debug"),r.log=y,r.formatArgs=h,r.save=b,r.load=E,r.useColors=l,r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(k){return JSON.stringify(k)},r.enable(E())},{"./debug":23}],23:[function(A,w,r){function l(){return r.colors[I++%r.colors.length]}function h(S){function p(){}function f(){var R=f,D=+new Date,Q=D-(m||D);R.diff=Q,R.prev=m,R.curr=D,m=D,R.useColors==null&&(R.useColors=r.useColors()),R.color==null&&R.useColors&&(R.color=l());var ae=Array.prototype.slice.call(arguments);ae[0]=r.coerce(ae[0]),typeof ae[0]!="string"&&(ae=["%o"].concat(ae));var te=0;ae[0]=ae[0].replace(/%([a-z%])/g,function(Y,q){if(Y==="%%")return Y;te++;var z=r.formatters[q];if(typeof z=="function"){var J=ae[te];Y=z.call(R,J),ae.splice(te,1),te--}return Y}),typeof r.formatArgs=="function"&&(ae=r.formatArgs.apply(R,ae));var he=f.log||r.log||console.log.bind(console);he.apply(R,ae)}p.enabled=!1,f.enabled=!0;var _=r.enabled(S)?f:p;return _.namespace=S,_}function y(S){r.save(S);for(var p=(S||"").split(/[\s,]+/),f=p.length,_=0;f>_;_++)p[_]&&(S=p[_].replace(/\*/g,".*?"),S[0]==="-"?r.skips.push(new RegExp("^"+S.substr(1)+"$")):r.names.push(new RegExp("^"+S+"$")))}function b(){r.enable("")}function E(S){var p,f;for(p=0,f=r.skips.length;f>p;p++)if(r.skips[p].test(S))return!1;for(p=0,f=r.names.length;f>p;p++)if(r.names[p].test(S))return!0;return!1}function k(S){return S instanceof Error?S.stack||S.message:S}r=w.exports=h,r.coerce=k,r.disable=b,r.enable=y,r.enabled=E,r.humanize=A("ms"),r.names=[],r.skips=[],r.formatters={};var m,I=0},{ms:24}],24:[function(A,w){function r(S){var p=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(S);if(p){var f=parseFloat(p[1]),_=(p[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"y":return f*I;case"days":case"day":case"d":return f*m;case"hours":case"hour":case"h":return f*k;case"minutes":case"minute":case"m":return f*E;case"seconds":case"second":case"s":return f*b;case"ms":return f}}}function l(S){return S>=m?Math.round(S/m)+"d":S>=k?Math.round(S/k)+"h":S>=E?Math.round(S/E)+"m":S>=b?Math.round(S/b)+"s":S+"ms"}function h(S){return y(S,m,"day")||y(S,k,"hour")||y(S,E,"minute")||y(S,b,"second")||S+" ms"}function y(S,p,f){return p>S?void 0:1.5*p>S?Math.floor(S/p)+" "+f:Math.ceil(S/p)+" "+f+"s"}var b=1e3,E=60*b,k=60*E,m=24*k,I=365.25*m;w.exports=function(S,p){return p=p||{},typeof S=="string"?r(S):p.long?h(S):l(S)}},{}],25:[function(A,w,r){(function(l){function h(q,z){var J="b"+r.packets[q.type]+q.data.data;return z(J)}function y(q,z,J){if(!z)return r.encodeBase64Packet(q,J);var B=q.data,W=new Uint8Array(B),V=new Uint8Array(1+B.byteLength);V[0]=ae[q.type];for(var a=0;a<W.length;a++)V[a+1]=W[a];return J(V.buffer)}function b(q,z,J){if(!z)return r.encodeBase64Packet(q,J);var B=new FileReader;return B.onload=function(){q.data=B.result,r.encodePacket(q,z,!0,J)},B.readAsArrayBuffer(q.data)}function E(q,z,J){if(!z)return r.encodeBase64Packet(q,J);if(Q)return b(q,z,J);var B=new Uint8Array(1);B[0]=ae[q.type];var W=new Y([B.buffer,q.data]);return J(W)}function k(q,z,J){for(var B=new Array(q.length),W=f(q.length,J),V=function(d,c,v){z(c,function($,P){B[d]=P,v($,B)})},a=0;a<q.length;a++)V(a,q[a],W)}var m=A("./keys"),I=A("has-binary"),S=A("arraybuffer.slice"),p=A("base64-arraybuffer"),f=A("after"),_=A("utf8"),R=navigator.userAgent.match(/Android/i),D=/PhantomJS/i.test(navigator.userAgent),Q=R||D;r.protocol=3;var ae=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},te=m(ae),he={type:"error",data:"parser error"},Y=A("blob");r.encodePacket=function(q,z,J,B){typeof z=="function"&&(B=z,z=!1),typeof J=="function"&&(B=J,J=null);var W=q.data===void 0?void 0:q.data.buffer||q.data;if(l.ArrayBuffer&&W instanceof ArrayBuffer)return y(q,z,B);if(Y&&W instanceof l.Blob)return E(q,z,B);if(W&&W.base64)return h(q,B);var V=ae[q.type];return q.data!==void 0&&(V+=J?_.encode(String(q.data)):String(q.data)),B(""+V)},r.encodeBase64Packet=function(q,z){var J="b"+r.packets[q.type];if(Y&&q.data instanceof Y){var B=new FileReader;return B.onload=function(){var c=B.result.split(",")[1];z(J+c)},B.readAsDataURL(q.data)}var W;try{W=String.fromCharCode.apply(null,new Uint8Array(q.data))}catch{for(var V=new Uint8Array(q.data),a=new Array(V.length),d=0;d<V.length;d++)a[d]=V[d];W=String.fromCharCode.apply(null,a)}return J+=l.btoa(W),z(J)},r.decodePacket=function(q,z,J){if(typeof q=="string"||q===void 0){if(q.charAt(0)=="b")return r.decodeBase64Packet(q.substr(1),z);if(J)try{q=_.decode(q)}catch{return he}var W=q.charAt(0);return Number(W)==W&&te[W]?q.length>1?{type:te[W],data:q.substring(1)}:{type:te[W]}:he}var B=new Uint8Array(q),W=B[0],V=S(q,1);return Y&&z==="blob"&&(V=new Y([V])),{type:te[W],data:V}},r.decodeBase64Packet=function(q,z){var J=te[q.charAt(0)];if(!l.ArrayBuffer)return{type:J,data:{base64:!0,data:q.substr(1)}};var B=p.decode(q.substr(1));return z==="blob"&&Y&&(B=new Y([B])),{type:J,data:B}},r.encodePayload=function(q,z,J){function B(a){return a.length+":"+a}function W(a,d){r.encodePacket(a,V?z:!1,!0,function(c){d(null,B(c))})}typeof z=="function"&&(J=z,z=null);var V=I(q);return z&&V?Y&&!Q?r.encodePayloadAsBlob(q,J):r.encodePayloadAsArrayBuffer(q,J):q.length?void k(q,W,function(a,d){return J(d.join(""))}):J("0:")},r.decodePayload=function(q,z,J){if(typeof q!="string")return r.decodePayloadAsBinary(q,z,J);typeof z=="function"&&(J=z,z=null);var B;if(q=="")return J(he,0,1);for(var W,V,a="",d=0,c=q.length;c>d;d++){var v=q.charAt(d);if(v!=":")a+=v;else{if(a==""||a!=(W=Number(a))||(V=q.substr(d+1,W),a!=V.length))return J(he,0,1);if(V.length){if(B=r.decodePacket(V,z,!0),he.type==B.type&&he.data==B.data)return J(he,0,1);var $=J(B,d+W,c);if($===!1)return}d+=W,a=""}}return a!=""?J(he,0,1):void 0},r.encodePayloadAsArrayBuffer=function(q,z){function J(B,W){r.encodePacket(B,!0,!0,function(V){return W(null,V)})}return q.length?void k(q,J,function(B,W){var V=W.reduce(function(c,v){var $;return $=typeof v=="string"?v.length:v.byteLength,c+$.toString().length+$+2},0),a=new Uint8Array(V),d=0;return W.forEach(function(c){var v=typeof c=="string",$=c;if(v){for(var P=new Uint8Array(c.length),L=0;L<c.length;L++)P[L]=c.charCodeAt(L);$=P.buffer}a[d++]=v?0:1;for(var j=$.byteLength.toString(),L=0;L<j.length;L++)a[d++]=parseInt(j[L]);a[d++]=255;for(var P=new Uint8Array($),L=0;L<P.length;L++)a[d++]=P[L]}),z(a.buffer)}):z(new ArrayBuffer(0))},r.encodePayloadAsBlob=function(q,z){function J(B,W){r.encodePacket(B,!0,!0,function(V){var a=new Uint8Array(1);if(a[0]=1,typeof V=="string"){for(var d=new Uint8Array(V.length),c=0;c<V.length;c++)d[c]=V.charCodeAt(c);V=d.buffer,a[0]=0}for(var v=V instanceof ArrayBuffer?V.byteLength:V.size,$=v.toString(),P=new Uint8Array($.length+1),c=0;c<$.length;c++)P[c]=parseInt($[c]);if(P[$.length]=255,Y){var L=new Y([a.buffer,P.buffer,V]);W(null,L)}})}k(q,J,function(B,W){return z(new Y(W))})},r.decodePayloadAsBinary=function(q,z,J){typeof z=="function"&&(J=z,z=null);for(var B=q,W=[],V=!1;B.byteLength>0;){for(var a=new Uint8Array(B),d=a[0]===0,c="",v=1;a[v]!=255;v++){if(c.length>310){V=!0;break}c+=a[v]}if(V)return J(he,0,1);B=S(B,2+c.length),c=parseInt(c);var $=S(B,0,c);if(d)try{$=String.fromCharCode.apply(null,new Uint8Array($))}catch{var P=new Uint8Array($);$="";for(var v=0;v<P.length;v++)$+=String.fromCharCode(P[v])}W.push($),B=S(B,c)}var L=W.length;W.forEach(function(j,ke){J(r.decodePacket(j,z,!0),ke,L)})}}).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(A,w){w.exports=Object.keys||function(r){var l=[],h=Object.prototype.hasOwnProperty;for(var y in r)h.call(r,y)&&l.push(y);return l}},{}],27:[function(A,w){function r(h,y,b){function E(m,I){if(E.count<=0)throw new Error("after called too many times");--E.count,m?(k=!0,y(m),y=b):E.count!==0||k||y(null,I)}var k=!1;return b=b||l,E.count=h,h===0?y():E}function l(){}w.exports=r},{}],28:[function(A,w){w.exports=function(r,l,h){var y=r.byteLength;if(l=l||0,h=h||y,r.slice)return r.slice(l,h);if(0>l&&(l+=y),0>h&&(h+=y),h>y&&(h=y),l>=y||l>=h||y===0)return new ArrayBuffer(0);for(var b=new Uint8Array(r),E=new Uint8Array(h-l),k=l,m=0;h>k;k++,m++)E[m]=b[k];return E.buffer}},{}],29:[function(A,w,r){(function(l){r.encode=function(h){var y,b=new Uint8Array(h),E=b.length,k="";for(y=0;E>y;y+=3)k+=l[b[y]>>2],k+=l[(3&b[y])<<4|b[y+1]>>4],k+=l[(15&b[y+1])<<2|b[y+2]>>6],k+=l[63&b[y+2]];return E%3===2?k=k.substring(0,k.length-1)+"=":E%3===1&&(k=k.substring(0,k.length-2)+"=="),k},r.decode=function(h){var y,b,E,k,m,I=.75*h.length,S=h.length,p=0;h[h.length-1]==="="&&(I--,h[h.length-2]==="="&&I--);var f=new ArrayBuffer(I),_=new Uint8Array(f);for(y=0;S>y;y+=4)b=l.indexOf(h[y]),E=l.indexOf(h[y+1]),k=l.indexOf(h[y+2]),m=l.indexOf(h[y+3]),_[p++]=b<<2|E>>4,_[p++]=(15&E)<<4|k>>2,_[p++]=(3&k)<<6|63&m;return f}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(A,w){(function(r){function l(I){for(var S=0;S<I.length;S++){var p=I[S];if(p.buffer instanceof ArrayBuffer){var f=p.buffer;if(p.byteLength!==f.byteLength){var _=new Uint8Array(p.byteLength);_.set(new Uint8Array(f,p.byteOffset,p.byteLength)),f=_.buffer}I[S]=f}}}function h(I,S){S=S||{};var p=new b;l(I);for(var f=0;f<I.length;f++)p.append(I[f]);return S.type?p.getBlob(S.type):p.getBlob()}function y(I,S){return l(I),new Blob(I,S||{})}var b=r.BlobBuilder||r.WebKitBlobBuilder||r.MSBlobBuilder||r.MozBlobBuilder,E=function(){try{var I=new Blob(["hi"]);return I.size===2}catch{return!1}}(),k=E&&function(){try{var I=new Blob([new Uint8Array([1,2])]);return I.size===2}catch{return!1}}(),m=b&&b.prototype.append&&b.prototype.getBlob;w.exports=function(){return E?k?r.Blob:y:m?h:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(A,w,r){(function(l){(function(h){function y(B){for(var W,V,a=[],d=0,c=B.length;c>d;)W=B.charCodeAt(d++),W>=55296&&56319>=W&&c>d?(V=B.charCodeAt(d++),(64512&V)==56320?a.push(((1023&W)<<10)+(1023&V)+65536):(a.push(W),d--)):a.push(W);return a}function b(B){for(var W,V=B.length,a=-1,d="";++a<V;)W=B[a],W>65535&&(W-=65536,d+=he(W>>>10&1023|55296),W=56320|1023&W),d+=he(W);return d}function E(B){if(B>=55296&&57343>=B)throw Error("Lone surrogate U+"+B.toString(16).toUpperCase()+" is not a scalar value")}function k(B,W){return he(B>>W&63|128)}function m(B){if(!(4294967168&B))return he(B);var W="";return 4294965248&B?4294901760&B?!(4292870144&B)&&(W=he(B>>18&7|240),W+=k(B,12),W+=k(B,6)):(E(B),W=he(B>>12&15|224),W+=k(B,6)):W=he(B>>6&31|192),W+=he(63&B|128)}function I(B){for(var W,V=y(B),a=V.length,d=-1,c="";++d<a;)W=V[d],c+=m(W);return c}function S(){if(te>=ae)throw Error("Invalid byte index");var B=255&Q[te];if(te++,(192&B)==128)return 63&B;throw Error("Invalid continuation byte")}function p(){var B,W,V,a,d;if(te>ae)throw Error("Invalid byte index");if(te==ae)return!1;if(B=255&Q[te],te++,(128&B)==0)return B;if((224&B)==192){var W=S();if(d=(31&B)<<6|W,d>=128)return d;throw Error("Invalid continuation byte")}if((240&B)==224){if(W=S(),V=S(),d=(15&B)<<12|W<<6|V,d>=2048)return E(d),d;throw Error("Invalid continuation byte")}if((248&B)==240&&(W=S(),V=S(),a=S(),d=(15&B)<<18|W<<12|V<<6|a,d>=65536&&1114111>=d))return d;throw Error("Invalid UTF-8 detected")}function f(B){Q=y(B),ae=Q.length,te=0;for(var W,V=[];(W=p())!==!1;)V.push(W);return b(V)}var _=typeof r=="object"&&r,R=typeof w=="object"&&w&&w.exports==_&&w,D=typeof l=="object"&&l;(D.global===D||D.window===D)&&(h=D);var Q,ae,te,he=String.fromCharCode,Y={version:"2.0.0",encode:I,decode:f};if(_&&!_.nodeType)if(R)R.exports=Y;else{var q={},z=q.hasOwnProperty;for(var J in Y)z.call(Y,J)&&(_[J]=Y[J])}else h.utf8=Y})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(A,w){(function(r){var l=/^[\],:{}\s]*$/,h=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,b=/(?:^|:|,)(?:\s*\[)+/g,E=/^\s+/,k=/\s+$/;w.exports=function(m){return typeof m=="string"&&m?(m=m.replace(E,"").replace(k,""),r.JSON&&JSON.parse?JSON.parse(m):l.test(m.replace(h,"@").replace(y,"]").replace(b,""))?new Function("return "+m)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(A,w,r){r.encode=function(l){var h="";for(var y in l)l.hasOwnProperty(y)&&(h.length&&(h+="&"),h+=encodeURIComponent(y)+"="+encodeURIComponent(l[y]));return h},r.decode=function(l){for(var h={},y=l.split("&"),b=0,E=y.length;E>b;b++){var k=y[b].split("=");h[decodeURIComponent(k[0])]=decodeURIComponent(k[1])}return h}},{}],34:[function(A,w){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"];w.exports=function(h){var y=h,b=h.indexOf("["),E=h.indexOf("]");b!=-1&&E!=-1&&(h=h.substring(0,b)+h.substring(b,E).replace(/:/g,";")+h.substring(E,h.length));for(var k=r.exec(h||""),m={},I=14;I--;)m[l[I]]=k[I]||"";return b!=-1&&E!=-1&&(m.source=y,m.host=m.host.substring(1,m.host.length-1).replace(/;/g,":"),m.authority=m.authority.replace("[","").replace("]","").replace(/;/g,":"),m.ipv6uri=!0),m}},{}],35:[function(A,w){function r(y,b){return b?new h(y,b):new h(y)}var l=function(){return self}(),h=l.WebSocket||l.MozWebSocket;w.exports=h?r:null,h&&(r.prototype=h.prototype)},{}],36:[function(A,w){(function(r){function l(y){function b(E){if(!E)return!1;if(r.Buffer&&r.Buffer.isBuffer(E)||r.ArrayBuffer&&E instanceof ArrayBuffer||r.Blob&&E instanceof Blob||r.File&&E instanceof File)return!0;if(h(E)){for(var k=0;k<E.length;k++)if(b(E[k]))return!0}else if(E&&typeof E=="object"){E.toJSON&&(E=E.toJSON());for(var m in E)if(Object.prototype.hasOwnProperty.call(E,m)&&b(E[m]))return!0}return!1}return b(y)}var h=A("isarray");w.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(A,w){w.exports=Array.isArray||function(r){return Object.prototype.toString.call(r)=="[object Array]"}},{}],38:[function(A,w){var r=A("global");try{w.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch{w.exports=!1}},{global:39}],39:[function(A,w){w.exports=function(){return this}()},{}],40:[function(A,w){var r=[].indexOf;w.exports=function(l,h){if(r)return l.indexOf(h);for(var y=0;y<l.length;++y)if(l[y]===h)return y;return-1}},{}],41:[function(A,w,r){var l=Object.prototype.hasOwnProperty;r.keys=Object.keys||function(h){var y=[];for(var b in h)l.call(h,b)&&y.push(b);return y},r.values=function(h){var y=[];for(var b in h)l.call(h,b)&&y.push(h[b]);return y},r.merge=function(h,y){for(var b in y)l.call(y,b)&&(h[b]=y[b]);return h},r.length=function(h){return r.keys(h).length},r.isEmpty=function(h){return r.length(h)==0}},{}],42:[function(A,w){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"];w.exports=function(h){for(var y=r.exec(h||""),b={},E=14;E--;)b[l[E]]=y[E]||"";return b}},{}],43:[function(A,w,r){(function(l){var h=A("isarray"),y=A("./is-buffer");r.deconstructPacket=function(b){function E(S){if(!S)return S;if(y(S)){var p={_placeholder:!0,num:k.length};return k.push(S),p}if(h(S)){for(var f=new Array(S.length),_=0;_<S.length;_++)f[_]=E(S[_]);return f}if(typeof S=="object"&&!(S instanceof Date)){var f={};for(var R in S)f[R]=E(S[R]);return f}return S}var k=[],m=b.data,I=b;return I.data=E(m),I.attachments=k.length,{packet:I,buffers:k}},r.reconstructPacket=function(b,E){function k(m){if(m&&m._placeholder){var I=E[m.num];return I}if(h(m)){for(var S=0;S<m.length;S++)m[S]=k(m[S]);return m}if(m&&typeof m=="object"){for(var p in m)m[p]=k(m[p]);return m}return m}return b.data=k(b.data),b.attachments=void 0,b},r.removeBlobs=function(b,E){function k(S,p,f){if(!S)return S;if(l.Blob&&S instanceof Blob||l.File&&S instanceof File){m++;var _=new FileReader;_.onload=function(){f?f[p]=this.result:I=this.result,--m||E(I)},_.readAsArrayBuffer(S)}else if(h(S))for(var R=0;R<S.length;R++)k(S[R],R,S);else if(S&&typeof S=="object"&&!y(S))for(var D in S)k(S[D],D,S)}var m=0,I=b;k(I),m||E(I)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(A,w,r){function l(){}function h(R){var D="",Q=!1;return D+=R.type,(r.BINARY_EVENT==R.type||r.BINARY_ACK==R.type)&&(D+=R.attachments,D+="-"),R.nsp&&R.nsp!="/"&&(Q=!0,D+=R.nsp),R.id!=null&&(Q&&(D+=",",Q=!1),D+=R.id),R.data!=null&&(Q&&(D+=","),D+=S.stringify(R.data)),I("encoded %j as %s",R,D),D}function y(R,D){function Q(ae){var te=f.deconstructPacket(ae),he=h(te.packet),Y=te.buffers;Y.unshift(he),D(Y)}f.removeBlobs(R,Q)}function b(){this.reconstructor=null}function E(R){var D={},Q=0;if(D.type=Number(R.charAt(0)),r.types[D.type]==null)return m();if(r.BINARY_EVENT==D.type||r.BINARY_ACK==D.type){for(var ae="";R.charAt(++Q)!="-"&&(ae+=R.charAt(Q),Q!=R.length););if(ae!=Number(ae)||R.charAt(Q)!="-")throw new Error("Illegal attachments");D.attachments=Number(ae)}if(R.charAt(Q+1)=="/")for(D.nsp="";++Q;){var te=R.charAt(Q);if(te==","||(D.nsp+=te,Q==R.length))break}else D.nsp="/";var he=R.charAt(Q+1);if(he!==""&&Number(he)==he){for(D.id="";++Q;){var te=R.charAt(Q);if(te==null||Number(te)!=te){--Q;break}if(D.id+=R.charAt(Q),Q==R.length)break}D.id=Number(D.id)}if(R.charAt(++Q))try{D.data=S.parse(R.substr(Q))}catch{return m()}return I("decoded %s as %j",R,D),D}function k(R){this.reconPack=R,this.buffers=[]}function m(){return{type:r.ERROR,data:"parser error"}}var I=A("debug")("socket.io-parser"),S=A("json3"),p=(A("isarray"),A("component-emitter")),f=A("./binary"),_=A("./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=b,l.prototype.encode=function(R,D){if(I("encoding packet %j",R),r.BINARY_EVENT==R.type||r.BINARY_ACK==R.type)y(R,D);else{var Q=h(R);D([Q])}},p(b.prototype),b.prototype.add=function(R){var D;if(typeof R=="string")D=E(R),r.BINARY_EVENT==D.type||r.BINARY_ACK==D.type?(this.reconstructor=new k(D),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",D)):this.emit("decoded",D);else{if(!_(R)&&!R.base64)throw new Error("Unknown type: "+R);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");D=this.reconstructor.takeBinaryData(R),D&&(this.reconstructor=null,this.emit("decoded",D))}},b.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},k.prototype.takeBinaryData=function(R){if(this.buffers.push(R),this.buffers.length==this.reconPack.attachments){var D=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),D}return null},k.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(A,w){(function(r){function l(h){return r.Buffer&&r.Buffer.isBuffer(h)||r.ArrayBuffer&&h instanceof ArrayBuffer}w.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(A,w){w.exports=A(37)},{}],47:[function(A,w,r){(function(l){function h(G){if(h[G]!==E)return h[G];var ne;if(G=="bug-string-char-index")ne=!1;else if(G=="json")ne=h("json-stringify")&&h("json-parse");else{var H,se='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(G=="json-stringify"){var K=I.stringify,ie=typeof K=="function"&&S;if(ie){(H=function(){return 1}).toJSON=H;try{ie=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(k)===E&&K(E)===E&&K()===E&&K(H)==="1"&&K([H])=="[1]"&&K([E])=="[null]"&&K(null)=="null"&&K([E,k,null])=="[null,null,null]"&&K({a:[H,!0,!1,null,`\0\b
37
- \f\r `]})==se&&K(null,H)==="1"&&K([1,2],null,1)==`[
31
+ `)+B+`return __p
32
+ }`;var he=Du(function(){return _e(f,Z+"return "+B).apply(r,v)});if(he.source=B,$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 zo(e);if(!e||!(t=ot(t)))return e;var i=_t(e),o=_t(t),f=$o(i,o),v=Xo(i,o)+1;return Jt(i,f,v).join("")}function Gd(e,t,n){if(e=we(e),e&&(n||t===r))return e.slice(0,Yo(e)+1);if(!e||!(t=ot(t)))return e;var i=_t(e),o=Xo(i,_t(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=ot(t)))return e;var i=_t(e),o=$o(i,_t(t));return Jt(i,o).join("")}function $d(e,t){var n=U,i=X;if(Oe(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=we(e);var f=e.length;if(hn(e)){var v=_t(e);f=v.length}if(n>=f)return e;var b=n-pn(i);if(b<1)return i;var C=v?Jt(v,0,b).join(""):e.slice(0,b);if(o===r)return C+i;if(v&&(b+=C.length-b),Xi(o)){if(e.slice(b).search(o)){var I,O=C;for(o.global||(o=fi(o.source,we(ho.exec(o))+"g")),o.lastIndex=0;I=o.exec(O);)var B=I.index;C=C.slice(0,B===r?b:B)}}else if(e.indexOf(ot(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(fo,bf):e}var Jd=wn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zi=Ps("toUpperCase");function Uu(e,t,n){return e=we(e),t=n?r:t,t===r?yf(e)?Cf(e):af(e):e.match(t)||[]}var Du=pe(function(e,t){try{return rt(e,r,t)}catch(n){return $i(n)?n:new fe(n)}}),Yd=Nt(function(e,t){return ct(t,function(n){n=Et(n),Lt(e,n,Gi(e[n],e))}),e});function Zd(e){var t=e==null?0:e.length,n=ne();return e=t?Ie(e,function(i){if(typeof i[1]!="function")throw new lt(m);return[n(i[0]),i[1]]}):[],pe(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 Vd(e){return bc(pt(e,p))}function Vi(e){return function(){return e}}function Qd(e,t){return e==null||e!==e?t:e}var jd=Ms(),eg=Ms(!0);function je(e){return e}function Qi(e){return gs(typeof e=="function"?e:pt(e,p))}function tg(e){return ys(pt(e,p))}function ng(e,t){return _s(e,pt(t,p))}var rg=pe(function(e,t){return function(n){return Dn(n,e,t)}}),ig=pe(function(e,t){return function(n){return Dn(e,n,t)}});function ji(e,t,n){var i=Pe(t),o=dr(t,i);n==null&&!(Oe(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=dr(t,Pe(t)));var f=!(Oe(n)&&"chain"in n)||!!n.chain,v=Dt(e);return ct(o,function(b){var C=t[b];e[b]=C,v&&(e.prototype[b]=function(){var I=this.__chain__;if(f||I){var O=e(this.__wrapped__),B=O.__actions__=Ze(this.__actions__);return B.push({func:C,args:arguments,thisArg:e}),O.__chain__=I,O}return C.apply(e,Kt([this.value()],arguments))})}),e}function og(){return Me._===this&&(Me._=Of),this}function eo(){}function sg(e){return e=le(e),pe(function(t){return ms(t,e)})}var ug=Oi(Ie),ag=Oi(Wo),fg=Oi(ni);function Pu(e){return Fi(e)?ri(Et(e)):Mc(e)}function cg(e){return function(t){return e==null?r:nn(e,t)}}var lg=qs(),hg=qs(!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=tt,i=He(e,tt);t=ne(t),e-=tt;for(var o=si(i,t);++n<e;)t(n);return o}function yg(e){return ce(e)?Ie(e,Et):st(e)?[e]:Ze(ru(we(e)))}function _g(e){var t=++Rf;return we(e)+t}var mg=wr(function(e,t){return e+t},0),wg=Li("ceil"),Sg=wr(function(e,t){return e/t},1),bg=Li("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 Cg(e){return Ho(e,je)}function Tg(e,t){return Ho(e,ne(t,2))}function Eg(e){return e&&e.length?pr(e,je,Si):r}function kg(e,t){return e&&e.length?pr(e,ne(t,2),Si):r}var Rg=wr(function(e,t){return e*t},1),Ig=Li("round"),Og=wr(function(e,t){return e-t},0);function Lg(e){return e&&e.length?oi(e,je):0}function Bg(e,t){return e&&e.length?oi(e,ne(t,2)):0}return a.after=tp,a.ary=du,a.assign=Kp,a.assignIn=ku,a.assignInWith=Br,a.assignWith=Hp,a.at=Gp,a.before=gu,a.bind=Gi,a.bindAll=Yd,a.bindKey=vu,a.castArray=pp,a.chain=lu,a.chunk=bl,a.compact=Al,a.concat=xl,a.cond=Zd,a.conforms=Vd,a.constant=Vi,a.countBy=Lh,a.create=zp,a.curry=yu,a.curryRight=_u,a.debounce=mu,a.defaults=$p,a.defaultsDeep=Xp,a.defer=np,a.delay=rp,a.difference=Cl,a.differenceBy=Tl,a.differenceWith=El,a.drop=kl,a.dropRight=Rl,a.dropRightWhile=Il,a.dropWhile=Ol,a.fill=Ll,a.filter=Nh,a.flatMap=Ph,a.flatMapDeep=Fh,a.flatMapDepth=Mh,a.flatten=uu,a.flattenDeep=Bl,a.flattenDepth=Nl,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=Qe,a.map=Er,a.mapKeys=sd,a.mapValues=ud,a.matches=tg,a.matchesProperty=ng,a.memoize=Rr,a.merge=ad,a.mergeWith=Ru,a.method=rg,a.methodOf=ig,a.mixin=ji,a.negate=Ir,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=wu,a.partition=zh,a.pick=ld,a.pickBy=Iu,a.property=Pu,a.propertyOf=cg,a.pull=Gl,a.pullAll=fu,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=Tr,a.toArray=Cu,a.toPairs=Ou,a.toPairsIn=Lu,a.toPath=yg,a.toPlainObject=Eu,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=cu,a.update=yd,a.updateWith=_d,a.values=An,a.valuesIn=md,a.without=gh,a.words=Uu,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=Ou,a.entriesIn=Lu,a.extend=ku,a.extendWith=Br,ji(a,a),a.add=mg,a.attempt=Du,a.camelCase=Ad,a.capitalize=Bu,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=wt,a.escape=Cd,a.escapeRegExp=Td,a.every=Bh,a.find=Uh,a.findIndex=ou,a.findKey=Jp,a.findLast=Dh,a.findLastIndex=su,a.findLastKey=Yp,a.floor=bg,a.forEach=hu,a.forEachRight=pu,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=au,a.identity=je,a.includes=qh,a.indexOf=Dl,a.inRange=Sd,a.invoke=od,a.isArguments=sn,a.isArray=ce,a.isArrayBuffer=Sp,a.isArrayLike=Ve,a.isArrayLikeObject=Be,a.isBoolean=bp,a.isBuffer=Yt,a.isDate=Ap,a.isElement=xp,a.isEmpty=Cp,a.isEqual=Tp,a.isEqualWith=Ep,a.isError=$i,a.isFinite=kp,a.isFunction=Dt,a.isInteger=Su,a.isLength=Or,a.isMap=bu,a.isMatch=Rp,a.isMatchWith=Ip,a.isNaN=Op,a.isNative=Lp,a.isNil=Np,a.isNull=Bp,a.isNumber=Au,a.isObject=Oe,a.isObjectLike=Le,a.isPlainObject=Kn,a.isRegExp=Xi,a.isSafeInteger=Up,a.isSet=xu,a.isString=Lr,a.isSymbol=st,a.isTypedArray=bn,a.isUndefined=Dp,a.isWeakMap=Pp,a.isWeakSet=Fp,a.join=ql,a.kebabCase=Ed,a.last=gt,a.lastIndexOf=Kl,a.lowerCase=kd,a.lowerFirst=Rd,a.lt=Mp,a.lte=Wp,a.max=Ag,a.maxBy=xg,a.mean=Cg,a.meanBy=Tg,a.min=Eg,a.minBy=kg,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=kr,a.pad=Id,a.padEnd=Od,a.padStart=Ld,a.parseInt=Bd,a.random=bd,a.reduce=$h,a.reduceRight=Xh,a.repeat=Nd,a.replace=Ud,a.result=hd,a.round=Ig,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=Og,a.sum=Lg,a.sumBy=Bg,a.template=Wd,a.times=vg,a.toFinite=Pt,a.toInteger=le,a.toLength=Tu,a.toLower=qd,a.toNumber=vt,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=hu,a.eachRight=pu,a.first=au,ji(a,function(){var e={};return Ct(a,function(t,n){Se.call(a.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),a.VERSION=l,ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){a[e].placeholder=a}),ct(["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__=He(n,i.__takeCount__):i.__views__.push({size:He(n,tt),type:e+(i.__dir__<0?"Right":"")}),i},ge.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),ct(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==N||n==Ae;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}}),ct(["head","last"],function(e,t){var n="take"+(t?"Right":"");ge.prototype[e]=function(){return this[n](1).value()[0]}}),ct(["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(je)},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 Dn(n,e,t)})}),ge.prototype.reject=function(e){return this.filter(Ir(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(tt)},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 v=this.__wrapped__,b=i?[1]:arguments,C=v instanceof ge,I=b[0],O=C||ce(v),B=function(de){var ve=o.apply(a,Kt([de],b));return i&&K?ve[0]:ve};O&&n&&typeof I=="function"&&I.length!=1&&(C=O=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=f&&!K,he=C&&!Z;if(!f&&O){v=he?v:new ge(this);var ie=e.apply(v,b);return ie.__actions__.push({func:Tr,args:[B],thisArg:r}),new ht(ie,K)}return re&&he?e.apply(this,b):(ie=this.thru(B),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);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(v){return t.apply(ce(v)?v:[],o)})}}),Ct(ge.prototype,function(e,t){var n=a[t];if(n){var i=n.name+"";Se.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=Th,a.prototype.next=Eh,a.prototype.plant=Rh,a.prototype.reverse=Ih,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Oh,a.prototype.first=a.prototype.head,Rn&&(a.prototype[Rn]=kh),a},dn=Tf();Vt?((Vt.exports=dn)._=dn,Qr._=dn):Me._=dn}).call(Fe)}(Gn,Gn.exports);var zu=Gn.exports;const uo={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:!1,upgrade:!1,transports:["websocket"],debug:!1}};function $u(){return function S(y,r,l){function c(g,x){if(!r[g]){if(!y[g]){var h=typeof require=="function"&&require;if(!x&&h)return h(g,!0);if(d)return d(g,!0);throw new Error("Cannot find module '"+g+"'")}var _=r[g]={exports:{}};y[g][0].call(_.exports,function(p){var u=y[g][1][p];return c(u||p)},_,_.exports,S,y,r,l)}return r[g].exports}for(var d=typeof require=="function"&&require,m=0;m<l.length;m++)c(l[m]);return c}({1:[function(S,y){y.exports=S("./lib/")},{"./lib/":2}],2:[function(S,y,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?(g("ignoring socket cache for %s",s),p=m(s,_)):(x[w]||(g("new io instance for %s",s),x[w]=m(s,_)),p=x[w]),p.socket(u.path)}var c=S("./url"),d=S("socket.io-parser"),m=S("./manager"),g=S("debug")("socket.io-client");y.exports=r=l;var x=r.managers={};r.protocol=d.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,y){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"),d=S("component-emitter"),m=S("socket.io-parser"),g=S("./on"),x=S("component-bind"),h=(S("object-component"),S("debug")("socket.io-client:manager")),_=S("indexof"),p=S("backo2");y.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},d(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 T=g(s,"open",function(){w.onopen(),u&&u()}),k=g(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),T.destroy(),s.close(),s.emit("error","timeout"),w.emitAll("connect_timeout",q)},q);this.subs.push({destroy:function(){clearTimeout(oe)}})}return this.subs.push(T),this.subs.push(k),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var u=this.engine;this.subs.push(g(u,"data",x(this,"ondata"))),this.subs.push(g(this.decoder,"decoded",x(this,"ondecoded"))),this.subs.push(g(u,"error",x(this,"onerror"))),this.subs.push(g(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 T=0;T<w.length;T++)s.engine.write(w[T]);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(T){T?(h("reconnect attempt error"),u.reconnecting=!1,u.reconnect(),u.emitAll("reconnect_error",T.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,y){function r(l,c,d){return l.on(c,d),{destroy:function(){l.removeListener(c,d)}}}y.exports=r},{}],5:[function(S,y,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"),d=S("component-emitter"),m=S("to-array"),g=S("./on"),x=S("component-bind"),h=S("debug")("socket.io-client:socket"),_=S("has-binary");y.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=d.prototype.emit;d(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var s=this.io;this.subs=[g(s,"open",x(this,"onopen")),g(s,"packet",x(this,"onpacket")),g(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),T=c.EVENT;_(w)&&(T=c.BINARY_EVENT);var k={type:T,data:w};return typeof w[w.length-1]=="function"&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),k.id=this.ids++),this.connected?this.packet(k):this.sendBuffer.push(k),this},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,T=!1;return function(){if(!T){T=!0;var k=m(arguments);h("sending ack %j",k);var q=_(k)?c.BINARY_ACK:c.ACK;w.packet({type:q,id:s,data:k})}}},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,y){(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)||(d("protocol-less url %s",m),m=typeof h<"u"?h.protocol+"//"+m:"https://"+m),d("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"),d=S("debug")("socket.io-client:url");y.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(S,y){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}y.exports=r,r.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),d=Math.floor(c*this.jitter*l);l=1&Math.floor(10*c)?l+d:l-d}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,y){var r=[].slice;y.exports=function(l,c){if(typeof c=="string"&&(c=l[c]),typeof c!="function")throw new Error("bind() requires a function");var d=r.call(arguments,2);return function(){return c.apply(l,d.concat(r.call(arguments)))}}},{}],9:[function(S,y){function r(c){return c?l(c):void 0}function l(c){for(var d in r.prototype)c[d]=r.prototype[d];return c}y.exports=r,r.prototype.on=r.prototype.addEventListener=function(c,d){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(d),this},r.prototype.once=function(c,d){function m(){g.off(c,m),d.apply(this,arguments)}var g=this;return this._callbacks=this._callbacks||{},m.fn=d,this.on(c,m),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(c,d){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 g,x=0;x<m.length;x++)if(g=m[x],g===d||g.fn===d){m.splice(x,1);break}return this},r.prototype.emit=function(c){this._callbacks=this._callbacks||{};var d=[].slice.call(arguments,1),m=this._callbacks[c];if(m){m=m.slice(0);for(var g=0,x=m.length;x>g;++g)m[g].apply(this,d)}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,y){function r(c){return r.enabled(c)?function(d){d=l(d);var m=new Date,g=m-(r[c]||m);r[c]=m,d=c+" "+d+" +"+r.humanize(g),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}y.exports=r,r.names=[],r.skips=[],r.enable=function(c){try{localStorage.debug=c}catch{}for(var d=(c||"").split(/[\s,]+/),m=d.length,g=0;m>g;g++)c=d[g].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 d=1e3,m=6e4,g=60*m;return c>=g?(c/g).toFixed(1)+"h":c>=m?(c/m).toFixed(1)+"m":c>=d?(c/d|0)+"s":c+"ms"},r.enabled=function(c){for(var d=0,m=r.skips.length;m>d;d++)if(r.skips[d].test(c))return!1;for(var d=0,m=r.names.length;m>d;d++)if(r.names[d].test(c))return!0;return!1};try{window.localStorage&&r.enable(localStorage.debug)}catch{}},{}],11:[function(S,y){y.exports=S("./lib/")},{"./lib/":12}],12:[function(S,y){y.exports=S("./socket"),y.exports.parser=S("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(S,y){(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 T=w.host.split(":");w.hostname=T.shift(),T.length?w.port=T.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 T in s)s.hasOwnProperty(T)&&(w[T]=s[T]);return w}var d=S("./transports"),m=S("component-emitter"),g=S("debug")("engine.io-client:socket"),x=S("indexof"),h=S("engine.io-parser"),_=S("parseuri"),p=S("parsejson"),u=S("parseqs");y.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){g('creating transport "%s"',s);var w=c(this.query);w.EIO=h.protocol,w.transport=s,this.id&&(w.sid=this.id);var T=new d[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 T},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){g("setting transport %s",s.name);var w=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=s,s.on("drain",function(){w.onDrain()}).on("packet",function(T){w.onPacket(T)}).on("error",function(T){w.onError(T)}).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||(g('probe transport "%s" opened',s),G.send([{type:"ping",data:"probe"}]),G.once("packet",function(L){if(!D)if(L.type=="pong"&&L.data=="probe"){if(g('probe transport "%s" pong',s),M.upgrading=!0,M.emit("upgrading",G),!G)return;l.priorWebsocketSuccess=G.name=="websocket",g('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(g("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{g('probe transport "%s" failed',s);var U=new Error("probe error");U.transport=G.name,M.emit("upgradeError",U)}}))}function T(){D||(D=!0,se(),G.close(),G=null)}function k(H){var L=new Error("probe error: "+H);L.transport=G.name,T(),g('probe transport "%s" failed because of error: %s',s,H),M.emit("upgradeError",L)}function q(){k("transport closed")}function oe(){k("socket closed")}function Y(H){G&&H.name!=G.name&&(g('"%s" works - aborting "%s"',H.name,G.name),T())}function se(){G.removeListener("open",w),G.removeListener("error",k),G.removeListener("close",q),M.removeListener("close",oe),M.removeListener("upgrading",Y)}g('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",k),G.once("close",q),this.once("close",oe),this.once("upgrading",Y),G.open()},l.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",l.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){g("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(g('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 g('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(){g("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&&(g("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,T){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:s,data:w};this.emit("packetCreate",k),this.writeBuffer.push(k),this.callbackBuffer.push(T),this.flush()}},l.prototype.close=function(){function s(){k.onClose("forced close"),g("socket closing - telling transport to close"),k.transport.close()}function w(){k.removeListener("upgrade",w),k.removeListener("upgradeError",w),s()}function T(){k.once("upgrade",w),k.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var k=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?T():s()}):this.upgrading?T():s()}return this},l.prototype.onError=function(s){g("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"){g('socket close with reason: "%s"',s);var T=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){T.writeBuffer=[],T.callbackBuffer=[],T.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=[],T=0,k=s.length;k>T;T++)~x(this.transports,s[T])&&w.push(s[T]);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,y){function r(d){this.path=d.path,this.hostname=d.hostname,this.port=d.port,this.secure=d.secure,this.query=d.query,this.timestampParam=d.timestampParam,this.timestampRequests=d.timestampRequests,this.readyState="",this.agent=d.agent||!1,this.socket=d.socket,this.enablesXDR=d.enablesXDR,this.pfx=d.pfx,this.key=d.key,this.passphrase=d.passphrase,this.cert=d.cert,this.ca=d.ca,this.ciphers=d.ciphers,this.rejectUnauthorized=d.rejectUnauthorized}var l=S("engine.io-parser"),c=S("component-emitter");y.exports=r,c(r.prototype),r.timestamps=0,r.prototype.onError=function(d,m){var g=new Error(d);return g.type="TransportError",g.description=m,this.emit("error",g),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(d){if(this.readyState!="open")throw new Error("Transport not open");this.write(d)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(d){var m=l.decodePacket(d,this.socket.binaryType);this.onPacket(m)},r.prototype.onPacket=function(d){this.emit("packet",d)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(S,y,r){(function(l){function c(h){var _,p=!1,u=!1,s=h.jsonp!==!1;if(l.location){var w=location.protocol=="https:",T=location.port;T||(T=w?443:80),p=h.hostname!=location.hostname||T!=h.port,u=h.secure!=w}if(h.xdomain=p,h.xscheme=u,_=new d(h),"open"in _&&!h.forceJSONP)return new m(h);if(!s)throw new Error("JSONP disabled");return new g(h)}var d=S("xmlhttprequest"),m=S("./polling-xhr"),g=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,y){(function(r){function l(){}function c(_){d.call(this,_),this.query=this.query||{},g||(r.___eio||(r.___eio=[]),g=r.___eio),this.index=g.length;var p=this;g.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 d=S("./polling"),m=S("component-inherit");y.exports=c;var g,x=/\n/g,h=/\\n/g;m(c,d),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),d.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+'">';T=document.createElement(Y)}catch{T=document.createElement("iframe"),T.name=w.iframeId,T.src="javascript:0"}T.id=w.iframeId,w.form.appendChild(T),w.iframe=T}var w=this;if(!this.form){var T,k=document.createElement("form"),q=document.createElement("textarea"),oe=this.iframeId="eio_iframe_"+this.index;k.className="socketio",k.style.position="absolute",k.style.top="-1000px",k.style.left="-1000px",k.target=oe,k.method="POST",k.setAttribute("accept-charset","utf-8"),q.name="d",k.appendChild(q),document.body.appendChild(k),this.form=k,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,y){(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 d(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 d.requests)d.requests.hasOwnProperty(u)&&d.requests[u].abort()}var g=S("xmlhttprequest"),x=S("./polling"),h=S("component-emitter"),_=S("component-inherit"),p=S("debug")("engine.io-client:polling-xhr");y.exports=c,y.exports.Request=d,_(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 d(u)},c.prototype.doWrite=function(u,s){var w=typeof u!="string"&&u!==void 0,T=this.request({method:"POST",data:u,isBinary:w}),k=this;T.on("success",s),T.on("error",function(q){k.onError("xhr post error",q)}),this.sendXhr=T},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(d.prototype),d.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 g(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(T){return void setTimeout(function(){w.onError(T)},0)}r.document&&(this.index=d.requestsCount++,d.requests[this.index]=this)},d.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},d.prototype.onData=function(u){this.emit("data",u),this.onSuccess()},d.prototype.onError=function(u){this.emit("error",u),this.cleanup(!0)},d.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 d.requests[this.index],this.xhr=null}},d.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)},d.prototype.hasXDR=function(){return typeof r.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},d.prototype.abort=function(){this.cleanup()},r.document&&(d.requestsCount=0,d.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,y){function r(h){var _=h&&h.forceBase64;(!x||_)&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("parseqs"),d=S("engine.io-parser"),m=S("component-inherit"),g=S("debug")("engine.io-client:polling");y.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 _(){g("paused"),p.readyState="paused",h()}var p=this;if(this.readyState="pausing",this.polling||!this.writable){var u=0;this.polling&&(g("we are currently polling - waiting to pause"),u++,this.once("pollComplete",function(){g("pre-pause polling complete"),--u||_()})),this.writable||(g("we are currently writing - waiting to pause"),u++,this.once("drain",function(){g("pre-pause writing complete"),--u||_()}))}else _()},r.prototype.poll=function(){g("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(h){var _=this;g("polling got data %s",h);var p=function(u){return _.readyState=="opening"&&_.onOpen(),u.type=="close"?(_.onClose(),!1):void _.onPacket(u)};d.decodePayload(h,this.socket.binaryType,p),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():g('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function h(){g("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(g("transport open - closing"),h()):(g("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;d.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,y){function r(h){var _=h&&h.forceBase64;_&&(this.supportsBinary=!1),l.call(this,h)}var l=S("../transport"),c=S("engine.io-parser"),d=S("parseqs"),m=S("component-inherit"),g=S("debug")("engine.io-client:websocket"),x=S("ws");y.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{g("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=d.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,y){var r=S("has-cors");y.exports=function(l){var c=l.xdomain,d=l.xscheme,m=l.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||r))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!d&&m)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(S,y){y.exports=function(r,l){var c=function(){};c.prototype=l.prototype,r.prototype=new c,r.prototype.constructor=r}},{}],22:[function(S,y,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 d(){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 g(){var x;try{x=localStorage.debug}catch{}return x}r=y.exports=S("./debug"),r.log=d,r.formatArgs=c,r.save=m,r.load=g,r.useColors=l,r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(x){return JSON.stringify(x)},r.enable(g())},{"./debug":23}],23:[function(S,y,r){function l(){return r.colors[_++%r.colors.length]}function c(p){function u(){}function s(){var T=s,k=+new Date,q=k-(h||k);T.diff=q,T.prev=h,T.curr=k,h=k,T.useColors==null&&(T.useColors=r.useColors()),T.color==null&&T.useColors&&(T.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(T,H),oe.splice(Y,1),Y--}return G}),typeof r.formatArgs=="function"&&(oe=r.formatArgs.apply(T,oe));var se=s.log||r.log||console.log.bind(console);se.apply(T,oe)}u.enabled=!1,s.enabled=!0;var w=r.enabled(p)?s:u;return w.namespace=p,w}function d(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 g(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=y.exports=c,r.coerce=x,r.disable=m,r.enable=d,r.enabled=g,r.humanize=S("ms"),r.names=[],r.skips=[],r.formatters={};var h,_=0},{ms:24}],24:[function(S,y){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*g;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>=g?Math.round(p/g)+"m":p>=m?Math.round(p/m)+"s":p+"ms"}function c(p){return d(p,h,"day")||d(p,x,"hour")||d(p,g,"minute")||d(p,m,"second")||p+" ms"}function d(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,g=60*m,x=60*g,h=24*x,_=365.25*h;y.exports=function(p,u){return u=u||{},typeof p=="string"?r(p):u.long?c(p):l(p)}},{}],25:[function(S,y,r){(function(l){function c(D,M){var H="b"+r.packets[D.type]+D.data.data;return M(H)}function d(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var L=D.data,U=new Uint8Array(L),X=new Uint8Array(1+L.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 L=new FileReader;return L.onload=function(){D.data=L.result,r.encodePacket(D,M,!0,H)},L.readAsArrayBuffer(D.data)}function g(D,M,H){if(!M)return r.encodeBase64Packet(D,H);if(q)return m(D,M,H);var L=new Uint8Array(1);L[0]=oe[D.type];var U=new G([L.buffer,D.data]);return H(U)}function x(D,M,H){for(var L=new Array(D.length),U=s(D.length,H),X=function(V,N,be){M(N,function(Ae,ke){L[V]=ke,be(Ae,L)})},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"),T=navigator.userAgent.match(/Android/i),k=/PhantomJS/i.test(navigator.userAgent),q=T||k;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,L){typeof M=="function"&&(L=M,M=!1),typeof H=="function"&&(L=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(l.ArrayBuffer&&U instanceof ArrayBuffer)return d(D,M,L);if(G&&U instanceof l.Blob)return g(D,M,L);if(U&&U.base64)return c(D,L);var X=oe[D.type];return D.data!==void 0&&(X+=H?w.encode(String(D.data)):String(D.data)),L(""+X)},r.encodeBase64Packet=function(D,M){var H="b"+r.packets[D.type];if(G&&D.data instanceof G){var L=new FileReader;return L.onload=function(){var N=L.result.split(",")[1];M(H+N)},L.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 L=new Uint8Array(D),U=L[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 L=u.decode(D.substr(1));return M==="blob"&&G&&(L=new G([L])),{type:H,data:L}},r.encodePayload=function(D,M,H){function L(j){return j.length+":"+j}function U(j,V){r.encodePacket(j,X?M:!1,!0,function(N){V(null,L(N))})}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 L;if(D=="")return H(se,0,1);for(var U,X,j="",V=0,N=D.length;N>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(L=r.decodePacket(X,M,!0),se.type==L.type&&se.data==L.data)return H(se,0,1);var Ae=H(L,V+U,N);if(Ae===!1)return}V+=U,j=""}}return j!=""?H(se,0,1):void 0},r.encodePayloadAsArrayBuffer=function(D,M){function H(L,U){r.encodePacket(L,!0,!0,function(X){return U(null,X)})}return D.length?void x(D,H,function(L,U){var X=U.reduce(function(N,be){var Ae;return Ae=typeof be=="string"?be.length:be.byteLength,N+Ae.toString().length+Ae+2},0),j=new Uint8Array(X),V=0;return U.forEach(function(N){var be=typeof N=="string",Ae=N;if(be){for(var ke=new Uint8Array(N.length),ae=0;ae<N.length;ae++)ke[ae]=N.charCodeAt(ae);Ae=ke.buffer}j[V++]=be?0:1;for(var qe=Ae.byteLength.toString(),ae=0;ae<qe.length;ae++)j[V++]=parseInt(qe[ae]);j[V++]=255;for(var ke=new Uint8Array(Ae),ae=0;ae<ke.length;ae++)j[V++]=ke[ae]}),M(j.buffer)}):M(new ArrayBuffer(0))},r.encodePayloadAsBlob=function(D,M){function H(L,U){r.encodePacket(L,!0,!0,function(X){var j=new Uint8Array(1);if(j[0]=1,typeof X=="string"){for(var V=new Uint8Array(X.length),N=0;N<X.length;N++)V[N]=X.charCodeAt(N);X=V.buffer,j[0]=0}for(var be=X instanceof ArrayBuffer?X.byteLength:X.size,Ae=be.toString(),ke=new Uint8Array(Ae.length+1),N=0;N<Ae.length;N++)ke[N]=parseInt(Ae[N]);if(ke[Ae.length]=255,G){var ae=new G([j.buffer,ke.buffer,X]);U(null,ae)}})}x(D,H,function(L,U){return M(new G(U))})},r.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=M,M=null);for(var L=D,U=[],X=!1;L.byteLength>0;){for(var j=new Uint8Array(L),V=j[0]===0,N="",be=1;j[be]!=255;be++){if(N.length>310){X=!0;break}N+=j[be]}if(X)return H(se,0,1);L=p(L,2+N.length),N=parseInt(N);var Ae=p(L,0,N);if(V)try{Ae=String.fromCharCode.apply(null,new Uint8Array(Ae))}catch{var ke=new Uint8Array(Ae);Ae="";for(var be=0;be<ke.length;be++)Ae+=String.fromCharCode(ke[be])}U.push(Ae),L=p(L,N)}var ae=U.length;U.forEach(function(qe,bt){H(r.decodePacket(qe,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,y){y.exports=Object.keys||function(r){var l=[],c=Object.prototype.hasOwnProperty;for(var d in r)c.call(r,d)&&l.push(d);return l}},{}],27:[function(S,y){function r(c,d,m){function g(h,_){if(g.count<=0)throw new Error("after called too many times");--g.count,h?(x=!0,d(h),d=m):g.count!==0||x||d(null,_)}var x=!1;return m=m||l,g.count=c,c===0?d():g}function l(){}y.exports=r},{}],28:[function(S,y){y.exports=function(r,l,c){var d=r.byteLength;if(l=l||0,c=c||d,r.slice)return r.slice(l,c);if(0>l&&(l+=d),0>c&&(c+=d),c>d&&(c=d),l>=d||l>=c||d===0)return new ArrayBuffer(0);for(var m=new Uint8Array(r),g=new Uint8Array(c-l),x=l,h=0;c>x;x++,h++)g[h]=m[x];return g.buffer}},{}],29:[function(S,y,r){(function(l){r.encode=function(c){var d,m=new Uint8Array(c),g=m.length,x="";for(d=0;g>d;d+=3)x+=l[m[d]>>2],x+=l[(3&m[d])<<4|m[d+1]>>4],x+=l[(15&m[d+1])<<2|m[d+2]>>6],x+=l[63&m[d+2]];return g%3===2?x=x.substring(0,x.length-1)+"=":g%3===1&&(x=x.substring(0,x.length-2)+"=="),x},r.decode=function(c){var d,m,g,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(d=0;p>d;d+=4)m=l.indexOf(c[d]),g=l.indexOf(c[d+1]),x=l.indexOf(c[d+2]),h=l.indexOf(c[d+3]),w[u++]=m<<2|g>>4,w[u++]=(15&g)<<4|x>>2,w[u++]=(3&x)<<6|63&h;return s}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(S,y){(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 d(_,p){return l(_),new Blob(_,p||{})}var m=r.BlobBuilder||r.WebKitBlobBuilder||r.MSBlobBuilder||r.MozBlobBuilder,g=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),x=g&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),h=m&&m.prototype.append&&m.prototype.getBlob;y.exports=function(){return g?x?r.Blob:d:h?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(S,y,r){(function(l){(function(c){function d(L){for(var U,X,j=[],V=0,N=L.length;N>V;)U=L.charCodeAt(V++),U>=55296&&56319>=U&&N>V?(X=L.charCodeAt(V++),(64512&X)==56320?j.push(((1023&U)<<10)+(1023&X)+65536):(j.push(U),V--)):j.push(U);return j}function m(L){for(var U,X=L.length,j=-1,V="";++j<X;)U=L[j],U>65535&&(U-=65536,V+=se(U>>>10&1023|55296),U=56320|1023&U),V+=se(U);return V}function g(L){if(L>=55296&&57343>=L)throw Error("Lone surrogate U+"+L.toString(16).toUpperCase()+" is not a scalar value")}function x(L,U){return se(L>>U&63|128)}function h(L){if(!(4294967168&L))return se(L);var U="";return 4294965248&L?4294901760&L?!(4292870144&L)&&(U=se(L>>18&7|240),U+=x(L,12),U+=x(L,6)):(g(L),U=se(L>>12&15|224),U+=x(L,6)):U=se(L>>6&31|192),U+=se(63&L|128)}function _(L){for(var U,X=d(L),j=X.length,V=-1,N="";++V<j;)U=X[V],N+=h(U);return N}function p(){if(Y>=oe)throw Error("Invalid byte index");var L=255&q[Y];if(Y++,(192&L)==128)return 63&L;throw Error("Invalid continuation byte")}function u(){var L,U,X,j,V;if(Y>oe)throw Error("Invalid byte index");if(Y==oe)return!1;if(L=255&q[Y],Y++,(128&L)==0)return L;if((224&L)==192){var U=p();if(V=(31&L)<<6|U,V>=128)return V;throw Error("Invalid continuation byte")}if((240&L)==224){if(U=p(),X=p(),V=(15&L)<<12|U<<6|X,V>=2048)return g(V),V;throw Error("Invalid continuation byte")}if((248&L)==240&&(U=p(),X=p(),j=p(),V=(15&L)<<18|U<<12|X<<6|j,V>=65536&&1114111>=V))return V;throw Error("Invalid UTF-8 detected")}function s(L){q=d(L),oe=q.length,Y=0;for(var U,X=[];(U=u())!==!1;)X.push(U);return m(X)}var w=typeof r=="object"&&r,T=typeof y=="object"&&y&&y.exports==w&&y,k=typeof l=="object"&&l;(k.global===k||k.window===k)&&(c=k);var q,oe,Y,se=String.fromCharCode,G={version:"2.0.0",encode:_,decode:s};if(w&&!w.nodeType)if(T)T.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,y){(function(r){var l=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/^\s+/,x=/\s+$/;y.exports=function(h){return typeof h=="string"&&h?(h=h.replace(g,"").replace(x,""),r.JSON&&JSON.parse?JSON.parse(h):l.test(h.replace(c,"@").replace(d,"]").replace(m,""))?new Function("return "+h)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(S,y,r){r.encode=function(l){var c="";for(var d in l)l.hasOwnProperty(d)&&(c.length&&(c+="&"),c+=encodeURIComponent(d)+"="+encodeURIComponent(l[d]));return c},r.decode=function(l){for(var c={},d=l.split("&"),m=0,g=d.length;g>m;m++){var x=d[m].split("=");c[decodeURIComponent(x[0])]=decodeURIComponent(x[1])}return c}},{}],34:[function(S,y){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"];y.exports=function(c){var d=c,m=c.indexOf("["),g=c.indexOf("]");m!=-1&&g!=-1&&(c=c.substring(0,m)+c.substring(m,g).replace(/:/g,";")+c.substring(g,c.length));for(var x=r.exec(c||""),h={},_=14;_--;)h[l[_]]=x[_]||"";return m!=-1&&g!=-1&&(h.source=d,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,y){function r(d,m){return m?new c(d,m):new c(d)}var l=function(){return self}(),c=l.WebSocket||l.MozWebSocket;y.exports=c?r:null,c&&(r.prototype=c.prototype)},{}],36:[function(S,y){(function(r){function l(d){function m(g){if(!g)return!1;if(r.Buffer&&r.Buffer.isBuffer(g)||r.ArrayBuffer&&g instanceof ArrayBuffer||r.Blob&&g instanceof Blob||r.File&&g instanceof File)return!0;if(c(g)){for(var x=0;x<g.length;x++)if(m(g[x]))return!0}else if(g&&typeof g=="object"){g.toJSON&&(g=g.toJSON());for(var h in g)if(Object.prototype.hasOwnProperty.call(g,h)&&m(g[h]))return!0}return!1}return m(d)}var c=S("isarray");y.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(S,y){y.exports=Array.isArray||function(r){return Object.prototype.toString.call(r)=="[object Array]"}},{}],38:[function(S,y){var r=S("global");try{y.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch{y.exports=!1}},{global:39}],39:[function(S,y){y.exports=function(){return this}()},{}],40:[function(S,y){var r=[].indexOf;y.exports=function(l,c){if(r)return l.indexOf(c);for(var d=0;d<l.length;++d)if(l[d]===c)return d;return-1}},{}],41:[function(S,y,r){var l=Object.prototype.hasOwnProperty;r.keys=Object.keys||function(c){var d=[];for(var m in c)l.call(c,m)&&d.push(m);return d},r.values=function(c){var d=[];for(var m in c)l.call(c,m)&&d.push(c[m]);return d},r.merge=function(c,d){for(var m in d)l.call(d,m)&&(c[m]=d[m]);return c},r.length=function(c){return r.keys(c).length},r.isEmpty=function(c){return r.length(c)==0}},{}],42:[function(S,y){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"];y.exports=function(c){for(var d=r.exec(c||""),m={},g=14;g--;)m[l[g]]=d[g]||"";return m}},{}],43:[function(S,y,r){(function(l){var c=S("isarray"),d=S("./is-buffer");r.deconstructPacket=function(m){function g(p){if(!p)return p;if(d(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]=g(p[w]);return s}if(typeof p=="object"&&!(p instanceof Date)){var s={};for(var T in p)s[T]=g(p[T]);return s}return p}var x=[],h=m.data,_=m;return _.data=g(h),_.attachments=x.length,{packet:_,buffers:x}},r.reconstructPacket=function(m,g){function x(h){if(h&&h._placeholder){var _=g[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,g){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||g(_)},w.readAsArrayBuffer(p)}else if(c(p))for(var T=0;T<p.length;T++)x(p[T],T,p);else if(p&&typeof p=="object"&&!d(p))for(var k in p)x(p[k],k,p)}var h=0,_=m;x(_),h||g(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(S,y,r){function l(){}function c(T){var k="",q=!1;return k+=T.type,(r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type)&&(k+=T.attachments,k+="-"),T.nsp&&T.nsp!="/"&&(q=!0,k+=T.nsp),T.id!=null&&(q&&(k+=",",q=!1),k+=T.id),T.data!=null&&(q&&(k+=","),k+=p.stringify(T.data)),_("encoded %j as %s",T,k),k}function d(T,k){function q(oe){var Y=s.deconstructPacket(oe),se=c(Y.packet),G=Y.buffers;G.unshift(se),k(G)}s.removeBlobs(T,q)}function m(){this.reconstructor=null}function g(T){var k={},q=0;if(k.type=Number(T.charAt(0)),r.types[k.type]==null)return h();if(r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type){for(var oe="";T.charAt(++q)!="-"&&(oe+=T.charAt(q),q!=T.length););if(oe!=Number(oe)||T.charAt(q)!="-")throw new Error("Illegal attachments");k.attachments=Number(oe)}if(T.charAt(q+1)=="/")for(k.nsp="";++q;){var Y=T.charAt(q);if(Y==","||(k.nsp+=Y,q==T.length))break}else k.nsp="/";var se=T.charAt(q+1);if(se!==""&&Number(se)==se){for(k.id="";++q;){var Y=T.charAt(q);if(Y==null||Number(Y)!=Y){--q;break}if(k.id+=T.charAt(q),q==T.length)break}k.id=Number(k.id)}if(T.charAt(++q))try{k.data=p.parse(T.substr(q))}catch{return h()}return _("decoded %s as %j",T,k),k}function x(T){this.reconPack=T,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(T,k){if(_("encoding packet %j",T),r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type)d(T,k);else{var q=c(T);k([q])}},u(m.prototype),m.prototype.add=function(T){var k;if(typeof T=="string")k=g(T),r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type?(this.reconstructor=new x(k),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",k)):this.emit("decoded",k);else{if(!w(T)&&!T.base64)throw new Error("Unknown type: "+T);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");k=this.reconstructor.takeBinaryData(T),k&&(this.reconstructor=null,this.emit("decoded",k))}},m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},x.prototype.takeBinaryData=function(T){if(this.buffers.push(T),this.buffers.length==this.reconPack.attachments){var k=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),k}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,y){(function(r){function l(c){return r.Buffer&&r.Buffer.isBuffer(c)||r.ArrayBuffer&&c instanceof ArrayBuffer}y.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(S,y){y.exports=S(37)},{}],47:[function(S,y,r){(function(l){function c(W){if(c[W]!==g)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)===g&&P(g)===g&&P()===g&&P(F)==="1"&&P([F])=="[1]"&&P([g])=="[null]"&&P(null)=="null"&&P([g,x,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
34
+ \f\r `]})==te&&P(null,F)==="1"&&P([1,2],null,1)==`[
38
35
  1,
39
36
  2
40
- ]`&&K(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&K(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&K(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&K(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{ie=!1}}ne=ie}if(G=="json-parse"){var oe=I.parse;if(typeof oe=="function")try{if(oe("0")===0&&!oe(!1)){H=oe(se);var ee=H.a.length==5&&H.a[0]===1;if(ee){try{ee=!oe('" "')}catch{}if(ee)try{ee=oe("01")!==1}catch{}if(ee)try{ee=oe("1.")!==1}catch{}}}}catch{ee=!1}ne=ee}}return h[G]=!!ne}var y,b,E,k={}.toString,m=typeof JSON=="object"&&JSON,I=typeof r=="object"&&r&&!r.nodeType&&r;I&&m?(I.stringify=m.stringify,I.parse=m.parse):I=l.JSON=m||{};var S=new Date(-0xc782b5b800cec);try{S=S.getUTCFullYear()==-109252&&S.getUTCMonth()===0&&S.getUTCDate()===1&&S.getUTCHours()==10&&S.getUTCMinutes()==37&&S.getUTCSeconds()==6&&S.getUTCMilliseconds()==708}catch{}if(!h("json")){var p="[object Function]",f="[object Date]",_="[object Number]",R="[object String]",D="[object Array]",Q="[object Boolean]",ae=h("bug-string-char-index");if(!S)var te=Math.floor,he=[0,31,59,90,120,151,181,212,243,273,304,334],Y=function(G,ne){return he[ne]+365*(G-1970)+te((G-1969+(ne=+(ne>1)))/4)-te((G-1901+ne)/100)+te((G-1601+ne)/400)};(y={}.hasOwnProperty)||(y=function(G){var ne,H={};return(H.__proto__=null,H.__proto__={toString:1},H).toString!=k?y=function(se){var K=this.__proto__,ie=se in(this.__proto__=null,this);return this.__proto__=K,ie}:(ne=H.constructor,y=function(se){var K=(this.constructor||ne).prototype;return se in this&&!(se in K&&this[se]===K[se])}),H=null,y.call(this,G)});var q={boolean:1,number:1,string:1,undefined:1},z=function(G,ne){var H=typeof G[ne];return H=="object"?!!G[ne]:!q[H]};if(b=function(G,ne){var H,se,K,ie=0;(H=function(){this.valueOf=0}).prototype.valueOf=0,se=new H;for(K in se)y.call(se,K)&&ie++;return H=se=null,ie?b=ie==2?function(oe,ee){var le,Se={},He=k.call(oe)==p;for(le in oe)He&&le=="prototype"||y.call(Se,le)||!(Se[le]=1)||!y.call(oe,le)||ee(le)}:function(oe,ee){var le,Se,He=k.call(oe)==p;for(le in oe)He&&le=="prototype"||!y.call(oe,le)||(Se=le==="constructor")||ee(le);(Se||y.call(oe,le="constructor"))&&ee(le)}:(se=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],b=function(oe,ee){var le,Se,He=k.call(oe)==p,Oe=!He&&typeof oe.constructor!="function"&&z(oe,"hasOwnProperty")?oe.hasOwnProperty:y;for(le in oe)He&&le=="prototype"||!Oe.call(oe,le)||ee(le);for(Se=se.length;le=se[--Se];Oe.call(oe,le)&&ee(le));}),b(G,ne)},!h("json-stringify")){var J={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},B="000000",W=function(G,ne){return(B+(ne||0)).slice(-G)},V="\\u00",a=function(G){var ne,H='"',se=0,K=G.length,ie=K>10&&ae;for(ie&&(ne=G.split(""));K>se;se++){var oe=G.charCodeAt(se);switch(oe){case 8:case 9:case 10:case 12:case 13:case 34:case 92:H+=J[oe];break;default:if(32>oe){H+=V+W(2,oe.toString(16));break}H+=ie?ne[se]:ae?G.charAt(se):G[se]}}return H+'"'},d=function(G,ne,H,se,K,ie,oe){var ee,le,Se,He,Oe,_t,An,rt,an,En,Xe,Je,St,At,Tn,kt;try{ee=ne[G]}catch{}if(typeof ee=="object"&&ee)if(le=k.call(ee),le!=f||y.call(ee,"toJSON"))typeof ee.toJSON=="function"&&(le!=_&&le!=R&&le!=D||y.call(ee,"toJSON"))&&(ee=ee.toJSON(G));else if(ee>-1/0&&1/0>ee){if(Y){for(Oe=te(ee/864e5),Se=te(Oe/365.2425)+1970-1;Y(Se+1,0)<=Oe;Se++);for(He=te((Oe-Y(Se,0))/30.42);Y(Se,He+1)<=Oe;He++);Oe=1+Oe-Y(Se,He),_t=(ee%864e5+864e5)%864e5,An=te(_t/36e5)%24,rt=te(_t/6e4)%60,an=te(_t/1e3)%60,En=_t%1e3}else Se=ee.getUTCFullYear(),He=ee.getUTCMonth(),Oe=ee.getUTCDate(),An=ee.getUTCHours(),rt=ee.getUTCMinutes(),an=ee.getUTCSeconds(),En=ee.getUTCMilliseconds();ee=(0>=Se||Se>=1e4?(0>Se?"-":"+")+W(6,0>Se?-Se:Se):W(4,Se))+"-"+W(2,He+1)+"-"+W(2,Oe)+"T"+W(2,An)+":"+W(2,rt)+":"+W(2,an)+"."+W(3,En)+"Z"}else ee=null;if(H&&(ee=H.call(ne,G,ee)),ee===null)return"null";if(le=k.call(ee),le==Q)return""+ee;if(le==_)return ee>-1/0&&1/0>ee?""+ee:"null";if(le==R)return a(""+ee);if(typeof ee=="object"){for(At=oe.length;At--;)if(oe[At]===ee)throw TypeError();if(oe.push(ee),Xe=[],Tn=ie,ie+=K,le==D){for(St=0,At=ee.length;At>St;St++)Je=d(St,ee,H,se,K,ie,oe),Xe.push(Je===E?"null":Je);kt=Xe.length?K?`[
41
- `+ie+Xe.join(`,
42
- `+ie)+`
43
- `+Tn+"]":"["+Xe.join(",")+"]":"[]"}else b(se||ee,function(Cn){var Mt=d(Cn,ee,H,se,K,ie,oe);Mt!==E&&Xe.push(a(Cn)+":"+(K?" ":"")+Mt)}),kt=Xe.length?K?`{
44
- `+ie+Xe.join(`,
45
- `+ie)+`
46
- `+Tn+"}":"{"+Xe.join(",")+"}":"{}";return oe.pop(),kt}};I.stringify=function(G,ne,H){var se,K,ie,oe;if(typeof ne=="function"||typeof ne=="object"&&ne){if((oe=k.call(ne))==p)K=ne;else if(oe==D){ie={};for(var ee,le=0,Se=ne.length;Se>le;ee=ne[le++],oe=k.call(ee),(oe==R||oe==_)&&(ie[ee]=1));}}if(H)if((oe=k.call(H))==_){if((H-=H%1)>0)for(se="",H>10&&(H=10);se.length<H;se+=" ");}else oe==R&&(se=H.length<=10?H:H.slice(0,10));return d("",(ee={},ee[""]=G,ee),K,ie,se,"",[])}}if(!h("json-parse")){var c,v,$=String.fromCharCode,P={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
47
- `,102:"\f",114:"\r"},L=function(){throw c=v=null,SyntaxError()},j=function(){for(var G,ne,H,se,K,ie=v,oe=ie.length;oe>c;)switch(K=ie.charCodeAt(c)){case 9:case 10:case 13:case 32:c++;break;case 123:case 125:case 91:case 93:case 58:case 44:return G=ae?ie.charAt(c):ie[c],c++,G;case 34:for(G="@",c++;oe>c;)if(K=ie.charCodeAt(c),32>K)L();else if(K==92)switch(K=ie.charCodeAt(++c)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:G+=P[K],c++;break;case 117:for(ne=++c,H=c+4;H>c;c++)K=ie.charCodeAt(c),K>=48&&57>=K||K>=97&&102>=K||K>=65&&70>=K||L();G+=$("0x"+ie.slice(ne,c));break;default:L()}else{if(K==34)break;for(K=ie.charCodeAt(c),ne=c;K>=32&&K!=92&&K!=34;)K=ie.charCodeAt(++c);G+=ie.slice(ne,c)}if(ie.charCodeAt(c)==34)return c++,G;L();default:if(ne=c,K==45&&(se=!0,K=ie.charCodeAt(++c)),K>=48&&57>=K){for(K==48&&(K=ie.charCodeAt(c+1),K>=48&&57>=K)&&L(),se=!1;oe>c&&(K=ie.charCodeAt(c),K>=48&&57>=K);c++);if(ie.charCodeAt(c)==46){for(H=++c;oe>H&&(K=ie.charCodeAt(H),K>=48&&57>=K);H++);H==c&&L(),c=H}if(K=ie.charCodeAt(c),K==101||K==69){for(K=ie.charCodeAt(++c),(K==43||K==45)&&c++,H=c;oe>H&&(K=ie.charCodeAt(H),K>=48&&57>=K);H++);H==c&&L(),c=H}return+ie.slice(ne,c)}if(se&&L(),ie.slice(c,c+4)=="true")return c+=4,!0;if(ie.slice(c,c+5)=="false")return c+=5,!1;if(ie.slice(c,c+4)=="null")return c+=4,null;L()}return"$"},ke=function(G){var ne,H;if(G=="$"&&L(),typeof G=="string"){if((ae?G.charAt(0):G[0])=="@")return G.slice(1);if(G=="["){for(ne=[];G=j(),G!="]";H||(H=!0))H&&(G==","?(G=j(),G=="]"&&L()):L()),G==","&&L(),ne.push(ke(G));return ne}if(G=="{"){for(ne={};G=j(),G!="}";H||(H=!0))H&&(G==","?(G=j(),G=="}"&&L()):L()),(G==","||typeof G!="string"||(ae?G.charAt(0):G[0])!="@"||j()!=":")&&L(),ne[G.slice(1)]=ke(j());return ne}L()}return G},ze=function(G,ne,H){var se=Vt(G,ne,H);se===E?delete G[ne]:G[ne]=se},Vt=function(G,ne,H){var se,K=G[ne];if(typeof K=="object"&&K)if(k.call(K)==D)for(se=K.length;se--;)ze(K,se,H);else b(K,function(ie){ze(K,ie,H)});return H.call(G,ne,K)};I.parse=function(G,ne){var H,se;return c=0,v=""+G,H=ke(j()),j()!="$"&&L(),c=v=null,ne&&k.call(ne)==p?Vt((se={},se[""]=H,se),"",ne):H}}}})(this)},{}],48:[function(A,w){function r(l,h){var y=[];h=h||0;for(var b=h||0;b<l.length;b++)y[b-h]=l[b];return y}w.exports=r},{}]},{},[1])(1)}const Ku=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:qu},Symbol.toStringTag,{value:"Module"}))}),zu=/v\d+_\d+_\d+/;function Hu(A){return typeof A=="function"}const Br=Object.entries(Ku).reduce((A,w)=>{var h;const r=w[1].default,l=(h=w[0].match(zu))==null?void 0:h[0];return Hu(r)&&l&&(A[l]=r()),A},{}),io=A=>{if(A in Br)return Br[A];throw new Error(`Socket version ${A} not found`)},Gu={...Br,getSocketVersion:io,makeSocketVersion:(A,...w)=>io(A)(...w)};var xe=(A=>(A.ALL_DIALER_STATUS="AllDialersStatus",A.ALL_EXTENSION_STATUS="AllExtensionsStatus",A.ALL_USERS_STATUS="AllUsersStatus",A.CONNECT="connect",A.DISCONNECT="disconnect",A.EXTENSION_EVENT="ExtensionEvent",A.KEEP_ALIVE="keepalive",A.KEEP_ALIVE_RESPONSE="keepaliveResponse",A.LOGIN_STATUS="loginStatus",A.LOGIN_SUCCESS="loginSuccess",A.QUEUE_EVENT="QueueEvent",A.ONLINE_STATUS_EVENT="onlineStatusEvent",A.DIALER_EVENT="DialerEvent",A))(xe||{});class $u{constructor(w){Be(this,"io");Be(this,"ioFunction");Be(this,"lastEventTimestamp",new Date().getTime());Be(this,"doReconnect",!0);Be(this,"keepAliveInterval");Be(this,"keepReconnectInterval");Be(this,"connected",!1);this.eventsSdkClass=w,this.eventsSdkClass=w}getSocketIoFunction(w){const r=w.split("v="),l="v".concat(r[r.length-1]).replaceAll(".","_");this.ioFunction=Gu.getSocketVersion(l)}initSocketConnection(){const w=this.eventsSdkClass.authClass.token,r=this.eventsSdkClass.options.protocol,l=this.eventsSdkClass.server;try{const h=l.Domain,y=`${r}://${h}`,b={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:w}};w&&(b.query={token:w}),this.ioFunction&&(this.io=this.ioFunction(y,b))}catch{}}initSocketEvents(){this.io&&this.io.on(xe.LOGIN_SUCCESS,w=>this.eventsSdkClass.emit(xe.LOGIN_SUCCESS,w)).on(xe.QUEUE_EVENT,w=>this.eventsSdkClass.emit(xe.QUEUE_EVENT,w)).on(xe.EXTENSION_EVENT,w=>this.eventsSdkClass.emit(xe.EXTENSION_EVENT,w)).on(xe.DIALER_EVENT,w=>this.eventsSdkClass.emit(xe.DIALER_EVENT,w)).on(xe.LOGIN_STATUS,w=>this.eventsSdkClass.emit(xe.LOGIN_STATUS,w)).on(xe.ALL_EXTENSION_STATUS,w=>this.eventsSdkClass.emit(xe.ALL_EXTENSION_STATUS,w)).on(xe.ALL_DIALER_STATUS,w=>this.eventsSdkClass.emit(xe.ALL_DIALER_STATUS,w)).on(xe.KEEP_ALIVE_RESPONSE,w=>this.onKeepAliveResponse(w)).on(xe.CONNECT,()=>this.onConnect()).on(xe.DISCONNECT,()=>this.onDisconnect())}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(xe.KEEP_ALIVE,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var w;this.io&&(this.io.close(),(w=this.io)==null||w.disconnect(),this.io=void 0),zn.clearSessionStorage()}onKeepAliveResponse(w){if(w.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(xe.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(){this.connected=!1,this.closeAllConnections(),this.eventsSdkClass.emit(xe.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(this.keepReconnectInterval=setInterval(()=>{console.log("attempt to connect..."),this.eventsSdkClass.connect(Pt.NEXT,!0)},15e3))}}class Xu{constructor(w){Be(this,"argumentOptions");Be(this,"options",{...ro});Be(this,"servers",[]);Be(this,"server");Be(this,"socket");Be(this,"authClass",new Mu(this));Be(this,"socketIoClass",new $u(this));Be(this,"reconnectOptions",{retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5});Be(this,"retryConnection",Wu.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}));Be(this,"listeners",{[xe.ALL_EXTENSION_STATUS]:[],[xe.ALL_DIALER_STATUS]:[],[xe.ALL_USERS_STATUS]:[],[xe.QUEUE_EVENT]:[],[xe.EXTENSION_EVENT]:[],[xe.DIALER_EVENT]:[],[xe.LOGIN_SUCCESS]:[],[xe.LOGIN_STATUS]:[],[xe.KEEP_ALIVE_RESPONSE]:[],[xe.ONLINE_STATUS_EVENT]:[]});Be(this,"allListeners",[]);this.options={...ro,...w},this.server=this.options.fallbackServer,this.argumentOptions={...w}}on(w,r){w==="*"?this.allListeners.push(r):this.listeners[w].push(r)}off(w,r){if(w==="*")this.allListeners=this.allListeners.filter(l=>l!==r);else{const h=this.listeners[w].filter(y=>y!==r);this.listeners={...this.listeners,[w]:h}}}emit(w,r){this.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[w].forEach(h=>h({name:w,data:r}));const l={name:w,data:r};this.allListeners.forEach(h=>h(l))}connect(w=Pt.DEFAULT,r=!1){let l;w===Pt.DEFAULT&&(l=this.findCurrentServer()),w===Pt.NEXT&&(l=this.findNextAvailableServer()),w===Pt.PREVIOUS&&(l=this.findMaxPriorityServer()),l||(this.server=this.findCurrentServer()),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()}findCurrentServer(){return this.servers.length&&(this.server=this.servers[0]),this.server||(this.server=this.options.fallbackServer),this.server}findNextAvailableServer(){const r=this.server.Priority+1,l=this.servers.find(h=>h.Priority===r)||this.findMinPriorityServer();return this.server={...l},this.server}findMaxPriorityServer(){const w=this.getServerWithHighestPriority(this.servers);return this.server?this.server&&w.Domain!==this.server.Domain?(this.server=w,this.server):this.server:(this.server=w,this.server)}findMinPriorityServer(){const w=Math.min(...this.servers.map(l=>l.Priority)),r=this.servers.find(l=>l.Priority===w);return r?(this.server=r,this.server):this.server}getServerWithHighestPriority(w){let r,l=Number.MAX_SAFE_INTEGER;return r=w.find(h=>{h.Priority<l&&(l=h.Priority,r=h)}),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)}}nt.EventsEnum=xe,nt.default=Xu,Object.defineProperties(nt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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 d,m,g,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]",T="[object String]",k="[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)};(d={}.hasOwnProperty)||(d=function(W){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=x?d=function(te){var P=this.__proto__,Q=te in(this.__proto__=null,this);return this.__proto__=P,Q}:(J=F.constructor,d=function(te){var P=(this.constructor||J).prototype;return te in this&&!(te in P&&this[te]===P[te])}),F=null,d.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)d.call(te,P)&&Q++;return F=te=null,Q?m=Q==2?function(ee,$){var ue,me={},Ke=x.call(ee)==u;for(ue in ee)Ke&&ue=="prototype"||d.call(me,ue)||!(me[ue]=1)||!d.call(ee,ue)||$(ue)}:function(ee,$){var ue,me,Ke=x.call(ee)==u;for(ue in ee)Ke&&ue=="prototype"||!d.call(ee,ue)||(me=ue==="constructor")||$(ue);(me||d.call(ee,ue="constructor"))&&$(ue)}:(te=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(ee,$){var ue,me,Ke=x.call(ee)==u,Re=!Ke&&typeof ee.constructor!="function"&&M(ee,"hasOwnProperty")?ee.hasOwnProperty:d;for(ue in ee)Ke&&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"},L="000000",U=function(W,J){return(L+(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,Ke,Re,yt,xn,nt,an,Cn,ze,$e,At,xt,Tn,Rt;try{$=J[W]}catch{}if(typeof $=="object"&&$)if(ue=x.call($),ue!=s||d.call($,"toJSON"))typeof $.toJSON=="function"&&(ue!=w&&ue!=T&&ue!=k||d.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(Ke=Y((Re-G(me,0))/30.42);G(me,Ke+1)<=Re;Ke++);Re=1+Re-G(me,Ke),yt=($%864e5+864e5)%864e5,xn=Y(yt/36e5)%24,nt=Y(yt/6e4)%60,an=Y(yt/1e3)%60,Cn=yt%1e3}else me=$.getUTCFullYear(),Ke=$.getUTCMonth(),Re=$.getUTCDate(),xn=$.getUTCHours(),nt=$.getUTCMinutes(),an=$.getUTCSeconds(),Cn=$.getUTCMilliseconds();$=(0>=me||me>=1e4?(0>me?"-":"+")+U(6,0>me?-me:me):U(4,me))+"-"+U(2,Ke+1)+"-"+U(2,Re)+"T"+U(2,xn)+":"+U(2,nt)+":"+U(2,an)+"."+U(3,Cn)+"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==T)return j(""+$);if(typeof $=="object"){for(xt=ee.length;xt--;)if(ee[xt]===$)throw TypeError();if(ee.push($),ze=[],Tn=Q,Q+=P,ue==k){for(At=0,xt=$.length;xt>At;At++)$e=V(At,$,F,te,P,Q,ee),ze.push($e===g?"null":$e);Rt=ze.length?P?`[
38
+ `+Q+ze.join(`,
39
+ `+Q)+`
40
+ `+Tn+"]":"["+ze.join(",")+"]":"[]"}else m(te||$,function(En){var Wt=V(En,$,F,te,P,Q,ee);Wt!==g&&ze.push(j(En)+":"+(P?" ":"")+Wt)}),Rt=ze.length?P?`{
41
+ `+Q+ze.join(`,
42
+ `+Q)+`
43
+ `+Tn+"}":"{"+ze.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==k){Q={};for(var $,ue=0,me=J.length;me>ue;$=J[ue++],ee=x.call($),(ee==T||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==T&&(te=F.length<=10?F:F.slice(0,10));return V("",($={},$[""]=W,$),P,Q,te,"",[])}}if(!c("json-parse")){var N,be,Ae=String.fromCharCode,ke={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
44
+ `,102:"\f",114:"\r"},ae=function(){throw N=be=null,SyntaxError()},qe=function(){for(var W,J,F,te,P,Q=be,ee=Q.length;ee>N;)switch(P=Q.charCodeAt(N)){case 9:case 10:case 13:case 32:N++;break;case 123:case 125:case 91:case 93:case 58:case 44:return W=oe?Q.charAt(N):Q[N],N++,W;case 34:for(W="@",N++;ee>N;)if(P=Q.charCodeAt(N),32>P)ae();else if(P==92)switch(P=Q.charCodeAt(++N)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:W+=ke[P],N++;break;case 117:for(J=++N,F=N+4;F>N;N++)P=Q.charCodeAt(N),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ae();W+=Ae("0x"+Q.slice(J,N));break;default:ae()}else{if(P==34)break;for(P=Q.charCodeAt(N),J=N;P>=32&&P!=92&&P!=34;)P=Q.charCodeAt(++N);W+=Q.slice(J,N)}if(Q.charCodeAt(N)==34)return N++,W;ae();default:if(J=N,P==45&&(te=!0,P=Q.charCodeAt(++N)),P>=48&&57>=P){for(P==48&&(P=Q.charCodeAt(N+1),P>=48&&57>=P)&&ae(),te=!1;ee>N&&(P=Q.charCodeAt(N),P>=48&&57>=P);N++);if(Q.charCodeAt(N)==46){for(F=++N;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==N&&ae(),N=F}if(P=Q.charCodeAt(N),P==101||P==69){for(P=Q.charCodeAt(++N),(P==43||P==45)&&N++,F=N;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==N&&ae(),N=F}return+Q.slice(J,N)}if(te&&ae(),Q.slice(N,N+4)=="true")return N+=4,!0;if(Q.slice(N,N+5)=="false")return N+=5,!1;if(Q.slice(N,N+4)=="null")return N+=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=qe(),W!="]";F||(F=!0))F&&(W==","?(W=qe(),W=="]"&&ae()):ae()),W==","&&ae(),J.push(bt(W));return J}if(W=="{"){for(J={};W=qe(),W!="}";F||(F=!0))F&&(W==","?(W=qe(),W=="}"&&ae()):ae()),(W==","||typeof W!="string"||(oe?W.charAt(0):W[0])!="@"||qe()!=":")&&ae(),J[W.slice(1)]=bt(qe());return J}ae()}return W},tt=function(W,J,F){var te=zn(W,J,F);te===g?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)==k)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 N=0,be=""+W,F=bt(qe()),qe()!="$"&&ae(),N=be=null,J&&x.call(J)==u?zn((te={},te[""]=F,te),"",J):F}}}})(this)},{}],48:[function(S,y){function r(l,c){var d=[];c=c||0;for(var m=c||0;m<l.length;m++)d[m-c]=l[m];return d}y.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,y)=>{var c;const r=y[1].default,l=(c=y[0].match(Ju))==null?void 0:c[0];return Yu(r)&&l&&(S[l]=r()),S},{}),ao=S=>{if(S in Ur)return Ur[S];throw new Error(`Socket version ${S} not found`)},Zu={...Ur,getSocketVersion:ao,makeSocketVersion:(S,...y)=>ao(S)(...y)};var ye=(S=>(S.ALL_DIALER_STATUS="AllDialersStatus",S.ALL_EXTENSION_STATUS="AllExtensionsStatus",S.ALL_USERS_STATUS="AllUsersStatus",S.CONNECT="connect",S.DISCONNECT="disconnect",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))(ye||{}),un=(S=>(S.INFO="INFO",S.WARN="WARN",S.ERROR="ERROR",S))(un||{});class Vu{constructor(y){Te(this,"io");Te(this,"ioFunction");Te(this,"lastEventTimestamp",new Date().getTime());Te(this,"doReconnect",!0);Te(this,"keepAliveInterval");Te(this,"keepReconnectInterval");Te(this,"connected",!1);this.eventsSdkClass=y,this.eventsSdkClass=y}getSocketIoFunction(y){const r=y.split("v="),l="v".concat(r[r.length-1]).replaceAll(".","_");this.ioFunction=Zu.getSocketVersion(l)}initSocketConnection(){const y=this.eventsSdkClass.authClass.token,r=this.eventsSdkClass.options.protocol,l=this.eventsSdkClass.server;try{const c=l.Domain,d=`${r}://${c}`;this.eventsSdkClass.loggerClass.log(un.INFO,ye.CONNECT,"Connecting to..",d);const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:y}};y&&(m.query={token:y}),this.ioFunction&&(this.io=this.ioFunction(d,m))}catch{}}initSocketEvents(){this.io&&this.io.on(ye.LOGIN_SUCCESS,y=>this.eventsSdkClass.emit(ye.LOGIN_SUCCESS,y)).on(ye.QUEUE_EVENT,y=>this.eventsSdkClass.emit(ye.QUEUE_EVENT,y)).on(ye.EXTENSION_EVENT,y=>this.eventsSdkClass.emit(ye.EXTENSION_EVENT,y)).on(ye.DIALER_EVENT,y=>this.eventsSdkClass.emit(ye.DIALER_EVENT,y)).on(ye.LOGIN_STATUS,y=>this.eventsSdkClass.emit(ye.LOGIN_STATUS,y)).on(ye.ALL_EXTENSION_STATUS,y=>this.eventsSdkClass.emit(ye.ALL_EXTENSION_STATUS,y)).on(ye.ALL_DIALER_STATUS,y=>this.eventsSdkClass.emit(ye.ALL_DIALER_STATUS,y)).on(ye.KEEP_ALIVE_RESPONSE,y=>this.onKeepAliveResponse(y)).on(ye.CONNECT,()=>this.onConnect()).on(ye.DISCONNECT,()=>this.onDisconnect())}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(ye.KEEP_ALIVE,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var y;this.io&&(this.io.close(),(y=this.io)==null||y.disconnect(),this.io=void 0),Hn.clearSessionStorage()}onKeepAliveResponse(y){if(y.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(ye.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(){this.connected=!1,this.closeAllConnections(),this.eventsSdkClass.emit(ye.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(this.keepReconnectInterval=setInterval(()=>{console.log("attempt to connect..."),this.eventsSdkClass.connect(Mt.NEXT,!0)},15e3))}}class Qu{constructor(y){Te(this,"io");Te(this,"storageLogger");this.eventsSdkClass=y,this.eventsSdkClass=y}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(y,r,...l){const c=[r,...l];this.storageLogger?y===un.INFO?this.storageLogger.log(c):y===un.ERROR&&this.storageLogger.error(c):y===un.INFO?console.log(c):y===un.ERROR&&console.error(c)}}class ju{constructor(y){Te(this,"argumentOptions");Te(this,"options",{...uo});Te(this,"servers",[]);Te(this,"server");Te(this,"socket");Te(this,"authClass",new Gu(this));Te(this,"socketIoClass",new Vu(this));Te(this,"loggerClass",new Qu(this));Te(this,"reconnectOptions",{retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5});Te(this,"retryConnection",zu.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}));Te(this,"listeners",{[ye.ALL_EXTENSION_STATUS]:[],[ye.ALL_DIALER_STATUS]:[],[ye.ALL_USERS_STATUS]:[],[ye.QUEUE_EVENT]:[],[ye.EXTENSION_EVENT]:[],[ye.DIALER_EVENT]:[],[ye.LOGIN_SUCCESS]:[],[ye.LOGIN_STATUS]:[],[ye.KEEP_ALIVE_RESPONSE]:[],[ye.ONLINE_STATUS_EVENT]:[]});Te(this,"allListeners",[]);this.options={...uo,...y},this.server=this.options.fallbackServer,this.argumentOptions={...y}}on(y,r){y==="*"?this.allListeners.push(r):this.listeners[y].push(r)}off(y,r){if(y==="*")this.allListeners=this.allListeners.filter(l=>l!==r);else{const c=this.listeners[y].filter(d=>d!==r);this.listeners={...this.listeners,[y]:c}}}emit(y,r){this.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[y].forEach(c=>c({name:y,data:r}));const l={name:y,data:r};this.allListeners.forEach(c=>c(l))}connect(y=Mt.DEFAULT,r=!1){let l;y===Mt.DEFAULT&&(l=this.findCurrentServer()),y===Mt.NEXT&&(l=this.findNextAvailableServer()),y===Mt.PREVIOUS&&(l=this.findMaxPriorityServer()),l||(this.server=this.findCurrentServer()),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()}findCurrentServer(){return this.servers.length&&(this.server=this.servers[0]),this.server||(this.server=this.options.fallbackServer),this.server}findNextAvailableServer(){const r=this.server.Priority+1,l=this.servers.find(c=>c.Priority===r)||this.findMinPriorityServer();return this.server={...l},this.server}findMaxPriorityServer(){const y=this.getServerWithHighestPriority(this.servers);return this.server?this.server&&y.Domain!==this.server.Domain?(this.server=y,this.server):this.server:(this.server=y,this.server)}findMinPriorityServer(){const y=Math.min(...this.servers.map(l=>l.Priority)),r=this.servers.find(l=>l.Priority===y);return r?(this.server=r,this.server):this.server}getServerWithHighestPriority(y){let r,l=Number.MAX_SAFE_INTEGER;return r=y.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)}}et.EventsEnum=ye,et.default=ju,Object.defineProperties(et,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
48
45
  //# sourceMappingURL=voicenter-events-sdk.umd.js.map