bl-trtc-callkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ (function(It,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("vue"),require("trtc-sdk-v5")):typeof define=="function"&&define.amd?define(["exports","vue","trtc-sdk-v5"],N):(It=typeof globalThis<"u"?globalThis:It||self,N(It.BlTRTCCallKit={},It.Vue,It.TRTC))})(this,(function(It,N,nt){"use strict";var we=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},At=[],yt=[],Ia=typeof Uint8Array<"u"?Uint8Array:Array,Rn=!1;function gr(){Rn=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e<n;++e)At[e]=t[e],yt[t.charCodeAt(e)]=e;yt[45]=62,yt[95]=63}function Ma(t,e,n){for(var r,a,i=[],s=e;s<n;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(At[(a=r)>>18&63]+At[a>>12&63]+At[a>>6&63]+At[63&a]);return i.join("")}function vr(t){var e;Rn||gr();for(var n=t.length,r=n%3,a="",i=[],s=0,l=n-r;s<l;s+=16383)i.push(Ma(t,s,s+16383>l?l:s+16383));return r===1?(e=t[n-1],a+=At[e>>2],a+=At[e<<4&63],a+="=="):r===2&&(e=(t[n-2]<<8)+t[n-1],a+=At[e>>10],a+=At[e>>4&63],a+=At[e<<2&63],a+="="),i.push(a),i.join("")}function tn(t,e,n,r,a){var i,s,l=8*a-r-1,h=(1<<l)-1,o=h>>1,c=-7,u=n?a-1:0,p=n?-1:1,f=t[e+u];for(u+=p,i=f&(1<<-c)-1,f>>=-c,c+=l;c>0;i=256*i+t[e+u],u+=p,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;c>0;s=256*s+t[e+u],u+=p,c-=8);if(i===0)i=1-o;else{if(i===h)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),i-=o}return(f?-1:1)*s*Math.pow(2,i-r)}function wr(t,e,n,r,a,i){var s,l,h,o=8*i-a-1,c=(1<<o)-1,u=c>>1,p=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,_=r?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+u>=1?p/h:p*Math.pow(2,1-u))*h>=2&&(s++,h/=2),s+u>=c?(l=0,s=c):s+u>=1?(l=(e*h-1)*Math.pow(2,a),s+=u):(l=e*Math.pow(2,u-1)*Math.pow(2,a),s=0));a>=8;t[n+f]=255&l,f+=_,l/=256,a-=8);for(s=s<<a|l,o+=a;o>0;t[n+f]=255&s,f+=_,s/=256,o-=8);t[n+f-_]|=128*g}var Da={}.toString,mr=Array.isArray||function(t){return Da.call(t)=="[object Array]"};function An(){return A.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Mt(t,e){if(An()<e)throw new RangeError("Invalid typed array length");return A.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=A.prototype:(t===null&&(t=new A(e)),t.length=e),t}function A(t,e,n){if(!(A.TYPED_ARRAY_SUPPORT||this instanceof A))return new A(t,e,n);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Bn(this,t)}return yr(this,t,e,n)}function yr(t,e,n,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?(function(a,i,s,l){if(i.byteLength,s<0||i.byteLength<s)throw new RangeError("'offset' is out of bounds");if(i.byteLength<s+(l||0))throw new RangeError("'length' is out of bounds");return i=s===void 0&&l===void 0?new Uint8Array(i):l===void 0?new Uint8Array(i,s):new Uint8Array(i,s,l),A.TYPED_ARRAY_SUPPORT?(a=i).__proto__=A.prototype:a=Ln(a,i),a})(t,e,n,r):typeof e=="string"?(function(a,i,s){if(typeof s=="string"&&s!==""||(s="utf8"),!A.isEncoding(s))throw new TypeError('"encoding" must be a valid string encoding');var l=0|kr(i,s),h=(a=Mt(a,l)).write(i,s);return h!==l&&(a=a.slice(0,h)),a})(t,e,n):(function(a,i){if(Bt(i)){var s=0|zn(i.length);return(a=Mt(a,s)).length===0||i.copy(a,0,0,s),a}if(i){if(typeof ArrayBuffer<"u"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||(l=i.length)!=l?Mt(a,0):Ln(a,i);if(i.type==="Buffer"&&mr(i.data))return Ln(a,i.data)}var l;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")})(t,e)}function br(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Bn(t,e){if(br(e),t=Mt(t,e<0?0:0|zn(e)),!A.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function Ln(t,e){var n=e.length<0?0:0|zn(e.length);t=Mt(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function zn(t){if(t>=An())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+An().toString(16)+" bytes");return 0|t}function Bt(t){return!(t==null||!t._isBuffer)}function kr(t,e){if(Bt(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var n=t.length;if(n===0)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return rn(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Tr(t).length;default:if(r)return rn(t).length;e=(""+e).toLowerCase(),r=!0}}function Ca(t,e,n){var r=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return ja(this,e,n);case"utf8":case"utf-8":return Rr(this,e,n);case"ascii":return Va(this,e,n);case"latin1":case"binary":return Za(this,e,n);case"base64":return Fa(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wa(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function $t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Er(t,e,n,r,a){if(t.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0){if(!a)return-1;n=0}if(typeof e=="string"&&(e=A.from(e,r)),Bt(e))return e.length===0?-1:Sr(t,e,n,r,a);if(typeof e=="number")return e&=255,A.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Sr(t,[e],n,r,a);throw new TypeError("val must be string, number or Buffer")}function Sr(t,e,n,r,a){var i,s=1,l=t.length,h=e.length;if(r!==void 0&&((r=String(r).toLowerCase())==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,l/=2,h/=2,n/=2}function o(f,_){return s===1?f[_]:f.readUInt16BE(_*s)}if(a){var c=-1;for(i=n;i<l;i++)if(o(t,i)===o(e,c===-1?0:i-c)){if(c===-1&&(c=i),i-c+1===h)return c*s}else c!==-1&&(i-=i-c),c=-1}else for(n+h>l&&(n=l-h),i=n;i>=0;i--){for(var u=!0,p=0;p<h;p++)if(o(t,i+p)!==o(e,p)){u=!1;break}if(u)return i}return-1}function Pa(t,e,n,r){n=Number(n)||0;var a=t.length-n;r?(r=Number(r))>a&&(r=a):r=a;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var l=parseInt(e.substr(2*s,2),16);if(isNaN(l))return s;t[n+s]=l}return s}function Oa(t,e,n,r){return an(rn(e,t.length-n),t,n,r)}function xr(t,e,n,r){return an((function(a){for(var i=[],s=0;s<a.length;++s)i.push(255&a.charCodeAt(s));return i})(e),t,n,r)}function Na(t,e,n,r){return xr(t,e,n,r)}function Ua(t,e,n,r){return an(Tr(e),t,n,r)}function Ha(t,e,n,r){return an((function(a,i){for(var s,l,h,o=[],c=0;c<a.length&&!((i-=2)<0);++c)s=a.charCodeAt(c),l=s>>8,h=s%256,o.push(h),o.push(l);return o})(e,t.length-n),t,n,r)}function Fa(t,e,n){return e===0&&n===t.length?vr(t):vr(t.slice(e,n))}function Rr(t,e,n){n=Math.min(t.length,n);for(var r=[],a=e;a<n;){var i,s,l,h,o=t[a],c=null,u=o>239?4:o>223?3:o>191?2:1;if(a+u<=n)switch(u){case 1:o<128&&(c=o);break;case 2:(192&(i=t[a+1]))==128&&(h=(31&o)<<6|63&i)>127&&(c=h);break;case 3:i=t[a+1],s=t[a+2],(192&i)==128&&(192&s)==128&&(h=(15&o)<<12|(63&i)<<6|63&s)>2047&&(h<55296||h>57343)&&(c=h);break;case 4:i=t[a+1],s=t[a+2],l=t[a+3],(192&i)==128&&(192&s)==128&&(192&l)==128&&(h=(15&o)<<18|(63&i)<<12|(63&s)<<6|63&l)>65535&&h<1114112&&(c=h)}c===null?(c=65533,u=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),a+=u}return(function(p){var f=p.length;if(f<=Ar)return String.fromCharCode.apply(String,p);for(var _="",g=0;g<f;)_+=String.fromCharCode.apply(String,p.slice(g,g+=Ar));return _})(r)}A.TYPED_ARRAY_SUPPORT=we.TYPED_ARRAY_SUPPORT===void 0||we.TYPED_ARRAY_SUPPORT,A.poolSize=8192,A._augment=function(t){return t.__proto__=A.prototype,t},A.from=function(t,e,n){return yr(null,t,e,n)},A.TYPED_ARRAY_SUPPORT&&(A.prototype.__proto__=Uint8Array.prototype,A.__proto__=Uint8Array),A.alloc=function(t,e,n){return(function(r,a,i,s){return br(a),a<=0?Mt(r,a):i!==void 0?typeof s=="string"?Mt(r,a).fill(i,s):Mt(r,a).fill(i):Mt(r,a)})(null,t,e,n)},A.allocUnsafe=function(t){return Bn(null,t)},A.allocUnsafeSlow=function(t){return Bn(null,t)},A.isBuffer=Te,A.compare=function(t,e){if(!Bt(t)||!Bt(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,a=0,i=Math.min(n,r);a<i;++a)if(t[a]!==e[a]){n=t[a],r=e[a];break}return n<r?-1:r<n?1:0},A.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(t,e){if(!mr(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return A.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=A.allocUnsafe(e),a=0;for(n=0;n<t.length;++n){var i=t[n];if(!Bt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,a),a+=i.length}return r},A.byteLength=kr,A.prototype._isBuffer=!0,A.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)$t(this,e,e+1);return this},A.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)$t(this,e,e+3),$t(this,e+1,e+2);return this},A.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)$t(this,e,e+7),$t(this,e+1,e+6),$t(this,e+2,e+5),$t(this,e+3,e+4);return this},A.prototype.toString=function(){var t=0|this.length;return t===0?"":arguments.length===0?Rr(this,0,t):Ca.apply(this,arguments)},A.prototype.equals=function(t){if(!Bt(t))throw new TypeError("Argument must be a Buffer");return this===t||A.compare(this,t)===0},A.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},A.prototype.compare=function(t,e,n,r,a){if(!Bt(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),r===void 0&&(r=0),a===void 0&&(a=this.length),e<0||n>t.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&e>=n)return 0;if(r>=a)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(i,s),h=this.slice(r,a),o=t.slice(e,n),c=0;c<l;++c)if(h[c]!==o[c]){i=h[c],s=o[c];break}return i<s?-1:s<i?1:0},A.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1},A.prototype.indexOf=function(t,e,n){return Er(this,t,e,n,!0)},A.prototype.lastIndexOf=function(t,e,n){return Er(this,t,e,n,!1)},A.prototype.write=function(t,e,n,r){if(e===void 0)r="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,r===void 0&&(r="utf8")):(r=n,n=void 0)}var a=this.length-e;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return Pa(this,t,e,n);case"utf8":case"utf-8":return Oa(this,t,e,n);case"ascii":return xr(this,t,e,n);case"latin1":case"binary":return Na(this,t,e,n);case"base64":return Ua(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ha(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ar=4096;function Va(t,e,n){var r="";n=Math.min(t.length,n);for(var a=e;a<n;++a)r+=String.fromCharCode(127&t[a]);return r}function Za(t,e,n){var r="";n=Math.min(t.length,n);for(var a=e;a<n;++a)r+=String.fromCharCode(t[a]);return r}function ja(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var a="",i=e;i<n;++i)a+=Ka(t[i]);return a}function Wa(t,e,n){for(var r=t.slice(e,n),a="",i=0;i<r.length;i+=2)a+=String.fromCharCode(r[i]+256*r[i+1]);return a}function ot(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function dt(t,e,n,r,a,i){if(!Bt(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function en(t,e,n,r){e<0&&(e=65535+e+1);for(var a=0,i=Math.min(t.length-n,2);a<i;++a)t[n+a]=(e&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function nn(t,e,n,r){e<0&&(e=4294967295+e+1);for(var a=0,i=Math.min(t.length-n,4);a<i;++a)t[n+a]=e>>>8*(r?a:3-a)&255}function Br(t,e,n,r,a,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Lr(t,e,n,r,a){return a||Br(t,0,n,4),wr(t,e,n,r,23,4),n+4}function zr(t,e,n,r,a){return a||Br(t,0,n,8),wr(t,e,n,r,52,8),n+8}A.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),A.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=A.prototype;else{var a=e-t;n=new A(a,void 0);for(var i=0;i<a;++i)n[i]=this[i+t]}return n},A.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||ot(t,e,this.length);for(var r=this[t],a=1,i=0;++i<e&&(a*=256);)r+=this[t+i]*a;return r},A.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||ot(t,e,this.length);for(var r=this[t+--e],a=1;e>0&&(a*=256);)r+=this[t+--e]*a;return r},A.prototype.readUInt8=function(t,e){return e||ot(t,1,this.length),this[t]},A.prototype.readUInt16LE=function(t,e){return e||ot(t,2,this.length),this[t]|this[t+1]<<8},A.prototype.readUInt16BE=function(t,e){return e||ot(t,2,this.length),this[t]<<8|this[t+1]},A.prototype.readUInt32LE=function(t,e){return e||ot(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},A.prototype.readUInt32BE=function(t,e){return e||ot(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},A.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||ot(t,e,this.length);for(var r=this[t],a=1,i=0;++i<e&&(a*=256);)r+=this[t+i]*a;return r>=(a*=128)&&(r-=Math.pow(2,8*e)),r},A.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||ot(t,e,this.length);for(var r=e,a=1,i=this[t+--r];r>0&&(a*=256);)i+=this[t+--r]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*e)),i},A.prototype.readInt8=function(t,e){return e||ot(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},A.prototype.readInt16LE=function(t,e){e||ot(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt16BE=function(t,e){e||ot(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},A.prototype.readInt32LE=function(t,e){return e||ot(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},A.prototype.readInt32BE=function(t,e){return e||ot(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},A.prototype.readFloatLE=function(t,e){return e||ot(t,4,this.length),tn(this,t,!0,23,4)},A.prototype.readFloatBE=function(t,e){return e||ot(t,4,this.length),tn(this,t,!1,23,4)},A.prototype.readDoubleLE=function(t,e){return e||ot(t,8,this.length),tn(this,t,!0,52,8)},A.prototype.readDoubleBE=function(t,e){return e||ot(t,8,this.length),tn(this,t,!1,52,8)},A.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(this,t,e,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[e]=255&t;++i<n&&(a*=256);)this[e+i]=t/a&255;return e+n},A.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(this,t,e,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[e+a]=255&t;--a>=0&&(i*=256);)this[e+a]=t/i&255;return e+n},A.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,255,0),A.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},A.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):en(this,t,e,!0),e+2},A.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):en(this,t,e,!1),e+2},A.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nn(this,t,e,!0),e+4},A.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nn(this,t,e,!1),e+4},A.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var a=Math.pow(2,8*n-1);dt(this,t,e,n,a-1,-a)}var i=0,s=1,l=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&l===0&&this[e+i-1]!==0&&(l=1),this[e+i]=(t/s>>0)-l&255;return e+n},A.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var a=Math.pow(2,8*n-1);dt(this,t,e,n,a-1,-a)}var i=n-1,s=1,l=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&l===0&&this[e+i+1]!==0&&(l=1),this[e+i]=(t/s>>0)-l&255;return e+n},A.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,127,-128),A.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},A.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):en(this,t,e,!0),e+2},A.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):en(this,t,e,!1),e+2},A.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),A.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nn(this,t,e,!0),e+4},A.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),A.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nn(this,t,e,!1),e+4},A.prototype.writeFloatLE=function(t,e,n){return Lr(this,t,e,!0,n)},A.prototype.writeFloatBE=function(t,e,n){return Lr(this,t,e,!1,n)},A.prototype.writeDoubleLE=function(t,e,n){return zr(this,t,e,!0,n)},A.prototype.writeDoubleBE=function(t,e,n){return zr(this,t,e,!1,n)},A.prototype.copy=function(t,e,n,r){if(n||(n=0),r||r===0||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var a,i=r-n;if(this===t&&n<e&&e<r)for(a=i-1;a>=0;--a)t[a+e]=this[a+n];else if(i<1e3||!A.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)t[a+e]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},A.prototype.fill=function(t,e,n,r){if(typeof t=="string"){if(typeof e=="string"?(r=e,e=0,n=this.length):typeof n=="string"&&(r=n,n=this.length),t.length===1){var a=t.charCodeAt(0);a<256&&(t=a)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!A.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof t=="number"&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=n===void 0?this.length:n>>>0,t||(t=0),typeof t=="number")for(i=e;i<n;++i)this[i]=t;else{var s=Bt(t)?t:rn(new A(t,r).toString()),l=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%l]}return this};var Ya=/[^+\/0-9A-Za-z-_]/g;function Ka(t){return t<16?"0"+t.toString(16):t.toString(16)}function rn(t,e){var n;e=e||1/0;for(var r=t.length,a=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Tr(t){return(function(e){var n,r,a,i,s,l;Rn||gr();var h=e.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=e[h-2]==="="?2:e[h-1]==="="?1:0,l=new Ia(3*h/4-s),a=s>0?h-4:h;var o=0;for(n=0,r=0;n<a;n+=4,r+=3)i=yt[e.charCodeAt(n)]<<18|yt[e.charCodeAt(n+1)]<<12|yt[e.charCodeAt(n+2)]<<6|yt[e.charCodeAt(n+3)],l[o++]=i>>16&255,l[o++]=i>>8&255,l[o++]=255&i;return s===2?(i=yt[e.charCodeAt(n)]<<2|yt[e.charCodeAt(n+1)]>>4,l[o++]=255&i):s===1&&(i=yt[e.charCodeAt(n)]<<10|yt[e.charCodeAt(n+1)]<<4|yt[e.charCodeAt(n+2)]>>2,l[o++]=i>>8&255,l[o++]=255&i),l})((function(e){if((e=(function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")})(e).replace(Ya,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e})(t))}function an(t,e,n,r){for(var a=0;a<r&&!(a+n>=e.length||a>=t.length);++a)e[a+n]=t[a];return a}function Te(t){return t!=null&&(!!t._isBuffer||Ir(t)||(function(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Ir(e.slice(0,0))})(t))}function Ir(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function G(t,e){return t(e={exports:{}},e.exports),e.exports}var X=G(function(t,e){var n;t.exports=(n=n||(function(r,a){var i=Object.create||(function(){function d(){}return function(v){var w;return d.prototype=v,w=new d,d.prototype=null,w}})(),s={},l=s.lib={},h=l.Base={extend:function(d){var v=i(this);return d&&v.mixIn(d),v.hasOwnProperty("init")&&this.init!==v.init||(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var v in d)d.hasOwnProperty(v)&&(this[v]=d[v]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}},o=l.WordArray=h.extend({init:function(d,v){d=this.words=d||[],this.sigBytes=v??4*d.length},toString:function(d){return(d||u).stringify(this)},concat:function(d){var v=this.words,w=d.words,m=this.sigBytes,y=d.sigBytes;if(this.clamp(),m%4)for(var x=0;x<y;x++){var S=w[x>>>2]>>>24-x%4*8&255;v[m+x>>>2]|=S<<24-(m+x)%4*8}else for(var x=0;x<y;x+=4)v[m+x>>>2]=w[x>>>2];return this.sigBytes+=y,this},clamp:function(){var d=this.words,v=this.sigBytes;d[v>>>2]&=4294967295<<32-v%4*8,d.length=r.ceil(v/4)},clone:function(){var d=h.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var v,w=[],m=function(k){var k=k,E=987654321,B=4294967295;return function(){var b=((E=36969*(65535&E)+(E>>16)&B)<<16)+(k=18e3*(65535&k)+(k>>16)&B)&B;return b/=4294967296,(b+=.5)*(r.random()>.5?1:-1)}},y=0;y<d;y+=4){var x=m(4294967296*(v||r.random()));v=987654071*x(),w.push(4294967296*x()|0)}return new o.init(w,d)}}),c=s.enc={},u=c.Hex={stringify:function(d){for(var v=d.words,w=d.sigBytes,m=[],y=0;y<w;y++){var x=v[y>>>2]>>>24-y%4*8&255;m.push((x>>>4).toString(16)),m.push((15&x).toString(16))}return m.join("")},parse:function(d){for(var v=d.length,w=[],m=0;m<v;m+=2)w[m>>>3]|=parseInt(d.substr(m,2),16)<<24-m%8*4;return new o.init(w,v/2)}},p=c.Latin1={stringify:function(d){for(var v=d.words,w=d.sigBytes,m=[],y=0;y<w;y++){var x=v[y>>>2]>>>24-y%4*8&255;m.push(String.fromCharCode(x))}return m.join("")},parse:function(d){for(var v=d.length,w=[],m=0;m<v;m++)w[m>>>2]|=(255&d.charCodeAt(m))<<24-m%4*8;return new o.init(w,v)}},f=c.Utf8={stringify:function(d){try{return decodeURIComponent(escape(p.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return p.parse(unescape(encodeURIComponent(d)))}},_=l.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=f.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var v=this._data,w=v.words,m=v.sigBytes,y=this.blockSize,x=4*y,S=m/x,k=(S=d?r.ceil(S):r.max((0|S)-this._minBufferSize,0))*y,E=r.min(4*k,m);if(k){for(var B=0;B<k;B+=y)this._doProcessBlock(w,B);var b=w.splice(0,k);v.sigBytes-=E}return new o.init(b,E)},clone:function(){var d=h.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0}),g=(l.Hasher=_.extend({cfg:h.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var v=this._doFinalize();return v},blockSize:16,_createHelper:function(d){return function(v,w){return new d.init(w).finalize(v)}},_createHmacHelper:function(d){return function(v,w){return new g.HMAC.init(d,w).finalize(v)}}}),s.algo={});return s})(Math),n)}),Mr=(G(function(t,e){var n,r,a,i,s,l;t.exports=(a=(r=n=X).lib,i=a.Base,s=a.WordArray,(l=r.x64={}).Word=i.extend({init:function(h,o){this.high=h,this.low=o}}),l.WordArray=i.extend({init:function(h,o){h=this.words=h||[],this.sigBytes=o??8*h.length},toX32:function(){for(var h=this.words,o=h.length,c=[],u=0;u<o;u++){var p=h[u];c.push(p.high),c.push(p.low)}return s.create(c,this.sigBytes)},clone:function(){for(var h=i.clone.call(this),o=h.words=this.words.slice(0),c=o.length,u=0;u<c;u++)o[u]=o[u].clone();return h}}),n)}),G(function(t,e){var n;t.exports=(n=X,(function(){if(typeof ArrayBuffer=="function"){var r=n.lib.WordArray,a=r.init;(r.init=function(i){if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),(i instanceof Int8Array||typeof Uint8ClampedArray<"u"&&i instanceof Uint8ClampedArray||i instanceof Int16Array||i instanceof Uint16Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),i instanceof Uint8Array){for(var s=i.byteLength,l=[],h=0;h<s;h++)l[h>>>2]|=i[h]<<24-h%4*8;a.call(this,l,s)}else a.apply(this,arguments)}).prototype=r}})(),n.lib.WordArray)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.WordArray,i=r.enc;function s(l){return l<<8&4278255360|l>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(l){for(var h=l.words,o=l.sigBytes,c=[],u=0;u<o;u+=2){var p=h[u>>>2]>>>16-u%4*8&65535;c.push(String.fromCharCode(p))}return c.join("")},parse:function(l){for(var h=l.length,o=[],c=0;c<h;c++)o[c>>>1]|=l.charCodeAt(c)<<16-c%2*16;return a.create(o,2*h)}},i.Utf16LE={stringify:function(l){for(var h=l.words,o=l.sigBytes,c=[],u=0;u<o;u+=2){var p=s(h[u>>>2]>>>16-u%4*8&65535);c.push(String.fromCharCode(p))}return c.join("")},parse:function(l){for(var h=l.length,o=[],c=0;c<h;c++)o[c>>>1]|=s(l.charCodeAt(c)<<16-c%2*16);return a.create(o,2*h)}}})(),n.enc.Utf16)}),G(function(t,e){var n,r,a;t.exports=(a=(r=n=X).lib.WordArray,r.enc.Base64={stringify:function(i){var s=i.words,l=i.sigBytes,h=this._map;i.clamp();for(var o=[],c=0;c<l;c+=3)for(var u=(s[c>>>2]>>>24-c%4*8&255)<<16|(s[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|s[c+2>>>2]>>>24-(c+2)%4*8&255,p=0;p<4&&c+.75*p<l;p++)o.push(h.charAt(u>>>6*(3-p)&63));var f=h.charAt(64);if(f)for(;o.length%4;)o.push(f);return o.join("")},parse:function(i){var s=i.length,l=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var o=0;o<l.length;o++)h[l.charCodeAt(o)]=o}var c=l.charAt(64);if(c){var u=i.indexOf(c);u!==-1&&(s=u)}return(function(p,f,_){for(var g=[],d=0,v=0;v<f;v++)if(v%4){var w=_[p.charCodeAt(v-1)]<<v%4*2,m=_[p.charCodeAt(v)]>>>6-v%4*2;g[d>>>2]|=(w|m)<<24-d%4*8,d++}return a.create(g,d)})(i,s,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}),G(function(t,e){var n;t.exports=(n=X,(function(r){var a=n,i=a.lib,s=i.WordArray,l=i.Hasher,h=a.algo,o=[];(function(){for(var g=0;g<64;g++)o[g]=4294967296*r.abs(r.sin(g+1))|0})();var c=h.MD5=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,d){for(var v=0;v<16;v++){var w=d+v,m=g[w];g[w]=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8)}var y=this._hash.words,x=g[d+0],S=g[d+1],k=g[d+2],E=g[d+3],B=g[d+4],b=g[d+5],R=g[d+6],C=g[d+7],L=g[d+8],P=g[d+9],H=g[d+10],Z=g[d+11],j=g[d+12],F=g[d+13],K=g[d+14],it=g[d+15],T=y[0],M=y[1],z=y[2],I=y[3];T=u(T,M,z,I,x,7,o[0]),I=u(I,T,M,z,S,12,o[1]),z=u(z,I,T,M,k,17,o[2]),M=u(M,z,I,T,E,22,o[3]),T=u(T,M,z,I,B,7,o[4]),I=u(I,T,M,z,b,12,o[5]),z=u(z,I,T,M,R,17,o[6]),M=u(M,z,I,T,C,22,o[7]),T=u(T,M,z,I,L,7,o[8]),I=u(I,T,M,z,P,12,o[9]),z=u(z,I,T,M,H,17,o[10]),M=u(M,z,I,T,Z,22,o[11]),T=u(T,M,z,I,j,7,o[12]),I=u(I,T,M,z,F,12,o[13]),z=u(z,I,T,M,K,17,o[14]),T=p(T,M=u(M,z,I,T,it,22,o[15]),z,I,S,5,o[16]),I=p(I,T,M,z,R,9,o[17]),z=p(z,I,T,M,Z,14,o[18]),M=p(M,z,I,T,x,20,o[19]),T=p(T,M,z,I,b,5,o[20]),I=p(I,T,M,z,H,9,o[21]),z=p(z,I,T,M,it,14,o[22]),M=p(M,z,I,T,B,20,o[23]),T=p(T,M,z,I,P,5,o[24]),I=p(I,T,M,z,K,9,o[25]),z=p(z,I,T,M,E,14,o[26]),M=p(M,z,I,T,L,20,o[27]),T=p(T,M,z,I,F,5,o[28]),I=p(I,T,M,z,k,9,o[29]),z=p(z,I,T,M,C,14,o[30]),T=f(T,M=p(M,z,I,T,j,20,o[31]),z,I,b,4,o[32]),I=f(I,T,M,z,L,11,o[33]),z=f(z,I,T,M,Z,16,o[34]),M=f(M,z,I,T,K,23,o[35]),T=f(T,M,z,I,S,4,o[36]),I=f(I,T,M,z,B,11,o[37]),z=f(z,I,T,M,C,16,o[38]),M=f(M,z,I,T,H,23,o[39]),T=f(T,M,z,I,F,4,o[40]),I=f(I,T,M,z,x,11,o[41]),z=f(z,I,T,M,E,16,o[42]),M=f(M,z,I,T,R,23,o[43]),T=f(T,M,z,I,P,4,o[44]),I=f(I,T,M,z,j,11,o[45]),z=f(z,I,T,M,it,16,o[46]),T=_(T,M=f(M,z,I,T,k,23,o[47]),z,I,x,6,o[48]),I=_(I,T,M,z,C,10,o[49]),z=_(z,I,T,M,K,15,o[50]),M=_(M,z,I,T,b,21,o[51]),T=_(T,M,z,I,j,6,o[52]),I=_(I,T,M,z,E,10,o[53]),z=_(z,I,T,M,H,15,o[54]),M=_(M,z,I,T,S,21,o[55]),T=_(T,M,z,I,L,6,o[56]),I=_(I,T,M,z,it,10,o[57]),z=_(z,I,T,M,R,15,o[58]),M=_(M,z,I,T,F,21,o[59]),T=_(T,M,z,I,B,6,o[60]),I=_(I,T,M,z,Z,10,o[61]),z=_(z,I,T,M,k,15,o[62]),M=_(M,z,I,T,P,21,o[63]),y[0]=y[0]+T|0,y[1]=y[1]+M|0,y[2]=y[2]+z|0,y[3]=y[3]+I|0},_doFinalize:function(){var g=this._data,d=g.words,v=8*this._nDataBytes,w=8*g.sigBytes;d[w>>>5]|=128<<24-w%32;var m=r.floor(v/4294967296),y=v;d[15+(w+64>>>9<<4)]=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[14+(w+64>>>9<<4)]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),g.sigBytes=4*(d.length+1),this._process();for(var x=this._hash,S=x.words,k=0;k<4;k++){var E=S[k];S[k]=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8)}return x},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function u(g,d,v,w,m,y,x){var S=g+(d&v|~d&w)+m+x;return(S<<y|S>>>32-y)+d}function p(g,d,v,w,m,y,x){var S=g+(d&w|v&~w)+m+x;return(S<<y|S>>>32-y)+d}function f(g,d,v,w,m,y,x){var S=g+(d^v^w)+m+x;return(S<<y|S>>>32-y)+d}function _(g,d,v,w,m,y,x){var S=g+(v^(d|~w))+m+x;return(S<<y|S>>>32-y)+d}a.MD5=l._createHelper(c),a.HmacMD5=l._createHmacHelper(c)})(Math),n.MD5)}),G(function(t,e){var n,r,a,i,s,l,h,o;t.exports=(a=(r=n=X).lib,i=a.WordArray,s=a.Hasher,l=r.algo,h=[],o=l.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,u){for(var p=this._hash.words,f=p[0],_=p[1],g=p[2],d=p[3],v=p[4],w=0;w<80;w++){if(w<16)h[w]=0|c[u+w];else{var m=h[w-3]^h[w-8]^h[w-14]^h[w-16];h[w]=m<<1|m>>>31}var y=(f<<5|f>>>27)+v+h[w];y+=w<20?1518500249+(_&g|~_&d):w<40?1859775393+(_^g^d):w<60?(_&g|_&d|g&d)-1894007588:(_^g^d)-899497514,v=d,d=g,g=_<<30|_>>>2,_=f,f=y}p[0]=p[0]+f|0,p[1]=p[1]+_|0,p[2]=p[2]+g|0,p[3]=p[3]+d|0,p[4]=p[4]+v|0},_doFinalize:function(){var c=this._data,u=c.words,p=8*this._nDataBytes,f=8*c.sigBytes;return u[f>>>5]|=128<<24-f%32,u[14+(f+64>>>9<<4)]=Math.floor(p/4294967296),u[15+(f+64>>>9<<4)]=p,c.sigBytes=4*u.length,this._process(),this._hash},clone:function(){var c=s.clone.call(this);return c._hash=this._hash.clone(),c}}),r.SHA1=s._createHelper(o),r.HmacSHA1=s._createHmacHelper(o),n.SHA1)}),G(function(t,e){var n;t.exports=(n=X,(function(r){var a=n,i=a.lib,s=i.WordArray,l=i.Hasher,h=a.algo,o=[],c=[];(function(){function f(v){for(var w=r.sqrt(v),m=2;m<=w;m++)if(!(v%m))return!1;return!0}function _(v){return 4294967296*(v-(0|v))|0}for(var g=2,d=0;d<64;)f(g)&&(d<8&&(o[d]=_(r.pow(g,.5))),c[d]=_(r.pow(g,1/3)),d++),g++})();var u=[],p=h.SHA256=l.extend({_doReset:function(){this._hash=new s.init(o.slice(0))},_doProcessBlock:function(f,_){for(var g=this._hash.words,d=g[0],v=g[1],w=g[2],m=g[3],y=g[4],x=g[5],S=g[6],k=g[7],E=0;E<64;E++){if(E<16)u[E]=0|f[_+E];else{var B=u[E-15],b=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,R=u[E-2],C=(R<<15|R>>>17)^(R<<13|R>>>19)^R>>>10;u[E]=b+u[E-7]+C+u[E-16]}var L=d&v^d&w^v&w,P=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),H=k+((y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25))+(y&x^~y&S)+c[E]+u[E];k=S,S=x,x=y,y=m+H|0,m=w,w=v,v=d,d=H+(P+L)|0}g[0]=g[0]+d|0,g[1]=g[1]+v|0,g[2]=g[2]+w|0,g[3]=g[3]+m|0,g[4]=g[4]+y|0,g[5]=g[5]+x|0,g[6]=g[6]+S|0,g[7]=g[7]+k|0},_doFinalize:function(){var f=this._data,_=f.words,g=8*this._nDataBytes,d=8*f.sigBytes;return _[d>>>5]|=128<<24-d%32,_[14+(d+64>>>9<<4)]=r.floor(g/4294967296),_[15+(d+64>>>9<<4)]=g,f.sigBytes=4*_.length,this._process(),this._hash},clone:function(){var f=l.clone.call(this);return f._hash=this._hash.clone(),f}});a.SHA256=l._createHelper(p),a.HmacSHA256=l._createHmacHelper(p)})(Math),n.SHA256)}),G(function(t,e){var n,r,a,i,s,l;t.exports=(a=(r=n=X).lib.WordArray,i=r.algo,s=i.SHA256,l=i.SHA224=s.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var h=s._doFinalize.call(this);return h.sigBytes-=4,h}}),r.SHA224=s._createHelper(l),r.HmacSHA224=s._createHmacHelper(l),n.SHA224)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.Hasher,i=r.x64,s=i.Word,l=i.WordArray,h=r.algo;function o(){return s.create.apply(s,arguments)}var c=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],u=[];(function(){for(var f=0;f<80;f++)u[f]=o()})();var p=h.SHA512=a.extend({_doReset:function(){this._hash=new l.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(f,_){for(var g=this._hash.words,d=g[0],v=g[1],w=g[2],m=g[3],y=g[4],x=g[5],S=g[6],k=g[7],E=d.high,B=d.low,b=v.high,R=v.low,C=w.high,L=w.low,P=m.high,H=m.low,Z=y.high,j=y.low,F=x.high,K=x.low,it=S.high,T=S.low,M=k.high,z=k.low,I=E,at=B,wt=b,gt=R,St=C,Ut=L,qe=P,Rt=H,mt=Z,vt=j,Ae=F,ge=K,D=it,O=T,W=M,Y=z,V=0;V<80;V++){var ut=u[V];if(V<16)var Xe=ut.high=0|f[_+2*V],Be=ut.low=0|f[_+2*V+1];else{var ya=u[V-15],Le=ya.high,$e=ya.low,Cs=(Le>>>1|$e<<31)^(Le>>>8|$e<<24)^Le>>>7,ba=($e>>>1|Le<<31)^($e>>>8|Le<<24)^($e>>>7|Le<<25),ka=u[V-2],ze=ka.high,Je=ka.low,Ps=(ze>>>19|Je<<13)^(ze<<3|Je>>>29)^ze>>>6,Ea=(Je>>>19|ze<<13)^(Je<<3|ze>>>29)^(Je>>>6|ze<<26),Sa=u[V-7],Os=Sa.high,Ns=Sa.low,xa=u[V-16],Us=xa.high,Ra=xa.low;Xe=(Xe=(Xe=Cs+Os+((Be=ba+Ns)>>>0<ba>>>0?1:0))+Ps+((Be+=Ea)>>>0<Ea>>>0?1:0))+Us+((Be+=Ra)>>>0<Ra>>>0?1:0),ut.high=Xe,ut.low=Be}var ve,Hs=mt&Ae^~mt&D,Aa=vt&ge^~vt&O,Fs=I&wt^I&St^wt&St,Vs=at&gt^at&Ut^gt&Ut,Zs=(I>>>28|at<<4)^(I<<30|at>>>2)^(I<<25|at>>>7),Ba=(at>>>28|I<<4)^(at<<30|I>>>2)^(at<<25|I>>>7),js=(mt>>>14|vt<<18)^(mt>>>18|vt<<14)^(mt<<23|vt>>>9),Ws=(vt>>>14|mt<<18)^(vt>>>18|mt<<14)^(vt<<23|mt>>>9),La=c[V],Ys=La.high,za=La.low,Qe=W+js+((ve=Y+Ws)>>>0<Y>>>0?1:0),Ta=Ba+Vs;W=D,Y=O,D=Ae,O=ge,Ae=mt,ge=vt,mt=qe+(Qe=(Qe=(Qe=Qe+Hs+((ve+=Aa)>>>0<Aa>>>0?1:0))+Ys+((ve+=za)>>>0<za>>>0?1:0))+Xe+((ve+=Be)>>>0<Be>>>0?1:0))+((vt=Rt+ve|0)>>>0<Rt>>>0?1:0)|0,qe=St,Rt=Ut,St=wt,Ut=gt,wt=I,gt=at,I=Qe+(Zs+Fs+(Ta>>>0<Ba>>>0?1:0))+((at=ve+Ta|0)>>>0<ve>>>0?1:0)|0}B=d.low=B+at,d.high=E+I+(B>>>0<at>>>0?1:0),R=v.low=R+gt,v.high=b+wt+(R>>>0<gt>>>0?1:0),L=w.low=L+Ut,w.high=C+St+(L>>>0<Ut>>>0?1:0),H=m.low=H+Rt,m.high=P+qe+(H>>>0<Rt>>>0?1:0),j=y.low=j+vt,y.high=Z+mt+(j>>>0<vt>>>0?1:0),K=x.low=K+ge,x.high=F+Ae+(K>>>0<ge>>>0?1:0),T=S.low=T+O,S.high=it+D+(T>>>0<O>>>0?1:0),z=k.low=z+Y,k.high=M+W+(z>>>0<Y>>>0?1:0)},_doFinalize:function(){var f=this._data,_=f.words,g=8*this._nDataBytes,d=8*f.sigBytes;return _[d>>>5]|=128<<24-d%32,_[30+(d+128>>>10<<5)]=Math.floor(g/4294967296),_[31+(d+128>>>10<<5)]=g,f.sigBytes=4*_.length,this._process(),this._hash.toX32()},clone:function(){var f=a.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:32});r.SHA512=a._createHelper(p),r.HmacSHA512=a._createHmacHelper(p)})(),n.SHA512)}),G(function(t,e){var n,r,a,i,s,l,h,o;t.exports=(a=(r=n=X).x64,i=a.Word,s=a.WordArray,l=r.algo,h=l.SHA512,o=l.SHA384=h.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var c=h._doFinalize.call(this);return c.sigBytes-=16,c}}),r.SHA384=h._createHelper(o),r.HmacSHA384=h._createHmacHelper(o),n.SHA384)}),G(function(t,e){var n;t.exports=(n=X,(function(r){var a=n,i=a.lib,s=i.WordArray,l=i.Hasher,h=a.x64.Word,o=a.algo,c=[],u=[],p=[];(function(){for(var g=1,d=0,v=0;v<24;v++){c[g+5*d]=(v+1)*(v+2)/2%64;var w=(2*g+3*d)%5;g=d%5,d=w}for(g=0;g<5;g++)for(d=0;d<5;d++)u[g+5*d]=d+(2*g+3*d)%5*5;for(var m=1,y=0;y<24;y++){for(var x=0,S=0,k=0;k<7;k++){if(1&m){var E=(1<<k)-1;E<32?S^=1<<E:x^=1<<E-32}128&m?m=m<<1^113:m<<=1}p[y]=h.create(x,S)}})();var f=[];(function(){for(var g=0;g<25;g++)f[g]=h.create()})();var _=o.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var g=this._state=[],d=0;d<25;d++)g[d]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(g,d){for(var v=this._state,w=this.blockSize/2,m=0;m<w;m++){var y=g[d+2*m],x=g[d+2*m+1];y=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),x=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8),(z=v[m]).high^=x,z.low^=y}for(var S=0;S<24;S++){for(var k=0;k<5;k++){for(var E=0,B=0,b=0;b<5;b++)E^=(z=v[k+5*b]).high,B^=z.low;var R=f[k];R.high=E,R.low=B}for(k=0;k<5;k++){var C=f[(k+4)%5],L=f[(k+1)%5],P=L.high,H=L.low;for(E=C.high^(P<<1|H>>>31),B=C.low^(H<<1|P>>>31),b=0;b<5;b++)(z=v[k+5*b]).high^=E,z.low^=B}for(var Z=1;Z<25;Z++){var j=(z=v[Z]).high,F=z.low,K=c[Z];K<32?(E=j<<K|F>>>32-K,B=F<<K|j>>>32-K):(E=F<<K-32|j>>>64-K,B=j<<K-32|F>>>64-K);var it=f[u[Z]];it.high=E,it.low=B}var T=f[0],M=v[0];for(T.high=M.high,T.low=M.low,k=0;k<5;k++)for(b=0;b<5;b++){var z=v[Z=k+5*b],I=f[Z],at=f[(k+1)%5+5*b],wt=f[(k+2)%5+5*b];z.high=I.high^~at.high&wt.high,z.low=I.low^~at.low&wt.low}z=v[0];var gt=p[S];z.high^=gt.high,z.low^=gt.low}},_doFinalize:function(){var g=this._data,d=g.words,v=(this._nDataBytes,8*g.sigBytes),w=32*this.blockSize;d[v>>>5]|=1<<24-v%32,d[(r.ceil((v+1)/w)*w>>>5)-1]|=128,g.sigBytes=4*d.length,this._process();for(var m=this._state,y=this.cfg.outputLength/8,x=y/8,S=[],k=0;k<x;k++){var E=m[k],B=E.high,b=E.low;B=16711935&(B<<8|B>>>24)|4278255360&(B<<24|B>>>8),b=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),S.push(b),S.push(B)}return new s.init(S,y)},clone:function(){for(var g=l.clone.call(this),d=g._state=this._state.slice(0),v=0;v<25;v++)d[v]=d[v].clone();return g}});a.SHA3=l._createHelper(_),a.HmacSHA3=l._createHmacHelper(_)})(Math),n.SHA3)}),G(function(t,e){var n;t.exports=(n=X,(function(r){var a=n,i=a.lib,s=i.WordArray,l=i.Hasher,h=a.algo,o=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=s.create([0,1518500249,1859775393,2400959708,2840853838]),_=s.create([1352829926,1548603684,1836072691,2053994217,0]),g=h.RIPEMD160=l.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,k){for(var E=0;E<16;E++){var B=k+E,b=S[B];S[B]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8)}var R,C,L,P,H,Z,j,F,K,it,T,M=this._hash.words,z=f.words,I=_.words,at=o.words,wt=c.words,gt=u.words,St=p.words;for(Z=R=M[0],j=C=M[1],F=L=M[2],K=P=M[3],it=H=M[4],E=0;E<80;E+=1)T=R+S[k+at[E]]|0,T+=E<16?d(C,L,P)+z[0]:E<32?v(C,L,P)+z[1]:E<48?w(C,L,P)+z[2]:E<64?m(C,L,P)+z[3]:y(C,L,P)+z[4],T=(T=x(T|=0,gt[E]))+H|0,R=H,H=P,P=x(L,10),L=C,C=T,T=Z+S[k+wt[E]]|0,T+=E<16?y(j,F,K)+I[0]:E<32?m(j,F,K)+I[1]:E<48?w(j,F,K)+I[2]:E<64?v(j,F,K)+I[3]:d(j,F,K)+I[4],T=(T=x(T|=0,St[E]))+it|0,Z=it,it=K,K=x(F,10),F=j,j=T;T=M[1]+L+K|0,M[1]=M[2]+P+it|0,M[2]=M[3]+H+Z|0,M[3]=M[4]+R+j|0,M[4]=M[0]+C+F|0,M[0]=T},_doFinalize:function(){var S=this._data,k=S.words,E=8*this._nDataBytes,B=8*S.sigBytes;k[B>>>5]|=128<<24-B%32,k[14+(B+64>>>9<<4)]=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8),S.sigBytes=4*(k.length+1),this._process();for(var b=this._hash,R=b.words,C=0;C<5;C++){var L=R[C];R[C]=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8)}return b},clone:function(){var S=l.clone.call(this);return S._hash=this._hash.clone(),S}});function d(S,k,E){return S^k^E}function v(S,k,E){return S&k|~S&E}function w(S,k,E){return(S|~k)^E}function m(S,k,E){return S&E|k&~E}function y(S,k,E){return S^(k|~E)}function x(S,k){return S<<k|S>>>32-k}a.RIPEMD160=l._createHelper(g),a.HmacRIPEMD160=l._createHmacHelper(g)})(),n.RIPEMD160)}),G(function(t,e){var n,r,a,i,s,l;t.exports=(r=(n=X).lib,a=r.Base,i=n.enc,s=i.Utf8,l=n.algo,void(l.HMAC=a.extend({init:function(h,o){h=this._hasher=new h.init,typeof o=="string"&&(o=s.parse(o));var c=h.blockSize,u=4*c;o.sigBytes>u&&(o=h.finalize(o)),o.clamp();for(var p=this._oKey=o.clone(),f=this._iKey=o.clone(),_=p.words,g=f.words,d=0;d<c;d++)_[d]^=1549556828,g[d]^=909522486;p.sigBytes=f.sigBytes=u,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var o=this._hasher,c=o.finalize(h);o.reset();var u=o.finalize(this._oKey.clone().concat(c));return u}})))}),G(function(t,e){var n,r,a,i,s,l,h,o,c;t.exports=(a=(r=n=X).lib,i=a.Base,s=a.WordArray,l=r.algo,h=l.SHA1,o=l.HMAC,c=l.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:h,iterations:1}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,p){for(var f=this.cfg,_=o.create(f.hasher,u),g=s.create(),d=s.create([1]),v=g.words,w=d.words,m=f.keySize,y=f.iterations;v.length<m;){var x=_.update(p).finalize(d);_.reset();for(var S=x.words,k=S.length,E=x,B=1;B<y;B++){E=_.finalize(E),_.reset();for(var b=E.words,R=0;R<k;R++)S[R]^=b[R]}g.concat(x),w[0]++}return g.sigBytes=4*m,g}}),r.PBKDF2=function(u,p,f){return c.create(f).compute(u,p)},n.PBKDF2)}),G(function(t,e){var n,r,a,i,s,l,h,o;t.exports=(a=(r=n=X).lib,i=a.Base,s=a.WordArray,l=r.algo,h=l.MD5,o=l.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:h,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,u){for(var p=this.cfg,f=p.hasher.create(),_=s.create(),g=_.words,d=p.keySize,v=p.iterations;g.length<d;){w&&f.update(w);var w=f.update(c).finalize(u);f.reset();for(var m=1;m<v;m++)w=f.finalize(w),f.reset();_.concat(w)}return _.sigBytes=4*d,_}}),r.EvpKDF=function(c,u,p){return o.create(p).compute(c,u)},n.EvpKDF)}),G(function(t,e){var n,r,a,i,s,l,h,o,c,u,p,f,_,g,d,v,w,m,y,x,S,k,E,B;t.exports=void((n=X).lib.Cipher||(a=n,i=a.lib,s=i.Base,l=i.WordArray,h=i.BufferedBlockAlgorithm,o=a.enc,o.Utf8,c=o.Base64,u=a.algo,p=u.EvpKDF,f=i.Cipher=h.extend({cfg:s.extend(),createEncryptor:function(b,R){return this.create(this._ENC_XFORM_MODE,b,R)},createDecryptor:function(b,R){return this.create(this._DEC_XFORM_MODE,b,R)},init:function(b,R,C){this.cfg=this.cfg.extend(C),this._xformMode=b,this._key=R,this.reset()},reset:function(){h.reset.call(this),this._doReset()},process:function(b){return this._append(b),this._process()},finalize:function(b){b&&this._append(b);var R=this._doFinalize();return R},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function b(R){return typeof R=="string"?B:S}return function(R){return{encrypt:function(C,L,P){return b(L).encrypt(R,C,L,P)},decrypt:function(C,L,P){return b(L).decrypt(R,C,L,P)}}}})()}),i.StreamCipher=f.extend({_doFinalize:function(){var b=this._process(!0);return b},blockSize:1}),_=a.mode={},g=i.BlockCipherMode=s.extend({createEncryptor:function(b,R){return this.Encryptor.create(b,R)},createDecryptor:function(b,R){return this.Decryptor.create(b,R)},init:function(b,R){this._cipher=b,this._iv=R}}),d=_.CBC=(function(){var b=g.extend();function R(C,L,P){var H=this._iv;if(H){var Z=H;this._iv=r}else var Z=this._prevBlock;for(var j=0;j<P;j++)C[L+j]^=Z[j]}return b.Encryptor=b.extend({processBlock:function(C,L){var P=this._cipher,H=P.blockSize;R.call(this,C,L,H),P.encryptBlock(C,L),this._prevBlock=C.slice(L,L+H)}}),b.Decryptor=b.extend({processBlock:function(C,L){var P=this._cipher,H=P.blockSize,Z=C.slice(L,L+H);P.decryptBlock(C,L),R.call(this,C,L,H),this._prevBlock=Z}}),b})(),v=a.pad={},w=v.Pkcs7={pad:function(b,R){for(var C=4*R,L=C-b.sigBytes%C,P=L<<24|L<<16|L<<8|L,H=[],Z=0;Z<L;Z+=4)H.push(P);var j=l.create(H,L);b.concat(j)},unpad:function(b){var R=255&b.words[b.sigBytes-1>>>2];b.sigBytes-=R}},i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:w}),reset:function(){f.reset.call(this);var b=this.cfg,R=b.iv,C=b.mode;if(this._xformMode==this._ENC_XFORM_MODE)var L=C.createEncryptor;else{var L=C.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==L?this._mode.init(this,R&&R.words):(this._mode=L.call(C,this,R&&R.words),this._mode.__creator=L)},_doProcessBlock:function(b,R){this._mode.processBlock(b,R)},_doFinalize:function(){var b=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){b.pad(this._data,this.blockSize);var R=this._process(!0)}else{var R=this._process(!0);b.unpad(R)}return R},blockSize:4}),m=i.CipherParams=s.extend({init:function(b){this.mixIn(b)},toString:function(b){return(b||this.formatter).stringify(this)}}),y=a.format={},x=y.OpenSSL={stringify:function(b){var R=b.ciphertext,C=b.salt;if(C)var L=l.create([1398893684,1701076831]).concat(C).concat(R);else var L=R;return L.toString(c)},parse:function(b){var R=c.parse(b),C=R.words;if(C[0]==1398893684&&C[1]==1701076831){var L=l.create(C.slice(2,4));C.splice(0,4),R.sigBytes-=16}return m.create({ciphertext:R,salt:L})}},S=i.SerializableCipher=s.extend({cfg:s.extend({format:x}),encrypt:function(b,R,C,L){L=this.cfg.extend(L);var P=b.createEncryptor(C,L),H=P.finalize(R),Z=P.cfg;return m.create({ciphertext:H,key:C,iv:Z.iv,algorithm:b,mode:Z.mode,padding:Z.padding,blockSize:b.blockSize,formatter:L.format})},decrypt:function(b,R,C,L){L=this.cfg.extend(L),R=this._parse(R,L.format);var P=b.createDecryptor(C,L).finalize(R.ciphertext);return P},_parse:function(b,R){return typeof b=="string"?R.parse(b,this):b}}),k=a.kdf={},E=k.OpenSSL={execute:function(b,R,C,L){L||(L=l.random(8));var P=p.create({keySize:R+C}).compute(b,L),H=l.create(P.words.slice(R),4*C);return P.sigBytes=4*R,m.create({key:P,iv:H,salt:L})}},B=i.PasswordBasedCipher=S.extend({cfg:S.cfg.extend({kdf:E}),encrypt:function(b,R,C,L){var P=(L=this.cfg.extend(L)).kdf.execute(C,b.keySize,b.ivSize);L.iv=P.iv;var H=S.encrypt.call(this,b,R,P.key,L);return H.mixIn(P),H},decrypt:function(b,R,C,L){L=this.cfg.extend(L),R=this._parse(R,L.format);var P=L.kdf.execute(C,b.keySize,b.ivSize,R.salt);L.iv=P.iv;var H=S.decrypt.call(this,b,R,P.key,L);return H}})))}),G(function(t,e){var n;t.exports=((n=X).mode.CFB=(function(){var r=n.lib.BlockCipherMode.extend();function a(i,s,l,h){var o=this._iv;if(o){var c=o.slice(0);this._iv=void 0}else c=this._prevBlock;h.encryptBlock(c,0);for(var u=0;u<l;u++)i[s+u]^=c[u]}return r.Encryptor=r.extend({processBlock:function(i,s){var l=this._cipher,h=l.blockSize;a.call(this,i,s,h,l),this._prevBlock=i.slice(s,s+h)}}),r.Decryptor=r.extend({processBlock:function(i,s){var l=this._cipher,h=l.blockSize,o=i.slice(s,s+h);a.call(this,i,s,h,l),this._prevBlock=o}}),r})(),n.mode.CFB)}),G(function(t,e){var n,r,a;t.exports=((n=X).mode.CTR=(r=n.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(i,s){var l=this._cipher,h=l.blockSize,o=this._iv,c=this._counter;o&&(c=this._counter=o.slice(0),this._iv=void 0);var u=c.slice(0);l.encryptBlock(u,0),c[h-1]=c[h-1]+1|0;for(var p=0;p<h;p++)i[s+p]^=u[p]}}),r.Decryptor=a,r),n.mode.CTR)}),G(function(t,e){var n;t.exports=((n=X).mode.CTRGladman=(function(){var r=n.lib.BlockCipherMode.extend();function a(s){if((s>>24&255)==255){var l=s>>16&255,h=s>>8&255,o=255&s;l===255?(l=0,h===255?(h=0,o===255?o=0:++o):++h):++l,s=0,s+=l<<16,s+=h<<8,s+=o}else s+=1<<24;return s}var i=r.Encryptor=r.extend({processBlock:function(s,l){var h=this._cipher,o=h.blockSize,c=this._iv,u=this._counter;c&&(u=this._counter=c.slice(0),this._iv=void 0),(function(_){(_[0]=a(_[0]))===0&&(_[1]=a(_[1]))})(u);var p=u.slice(0);h.encryptBlock(p,0);for(var f=0;f<o;f++)s[l+f]^=p[f]}});return r.Decryptor=i,r})(),n.mode.CTRGladman)}),G(function(t,e){var n,r,a;t.exports=((n=X).mode.OFB=(r=n.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(i,s){var l=this._cipher,h=l.blockSize,o=this._iv,c=this._keystream;o&&(c=this._keystream=o.slice(0),this._iv=void 0),l.encryptBlock(c,0);for(var u=0;u<h;u++)i[s+u]^=c[u]}}),r.Decryptor=a,r),n.mode.OFB)}),G(function(t,e){var n,r;t.exports=((n=X).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),r.Decryptor=r.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),r),n.mode.ECB)}),G(function(t,e){var n;t.exports=((n=X).pad.AnsiX923={pad:function(r,a){var i=r.sigBytes,s=4*a,l=s-i%s,h=i+l-1;r.clamp(),r.words[h>>>2]|=l<<24-h%4*8,r.sigBytes+=l},unpad:function(r){var a=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=a}},n.pad.Ansix923)}),G(function(t,e){var n;t.exports=((n=X).pad.Iso10126={pad:function(r,a){var i=4*a,s=i-r.sigBytes%i;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var a=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=a}},n.pad.Iso10126)}),G(function(t,e){var n;t.exports=((n=X).pad.Iso97971={pad:function(r,a){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,a)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971)}),G(function(t,e){var n;t.exports=((n=X).pad.ZeroPadding={pad:function(r,a){var i=4*a;r.clamp(),r.sigBytes+=i-(r.sigBytes%i||i)},unpad:function(r){for(var a=r.words,i=r.sigBytes-1;!(a[i>>>2]>>>24-i%4*8&255);)i--;r.sigBytes=i+1}},n.pad.ZeroPadding)}),G(function(t,e){var n;t.exports=((n=X).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}),G(function(t,e){var n,r,a,i;t.exports=(a=(r=n=X).lib.CipherParams,i=r.enc.Hex,r.format.Hex={stringify:function(s){return s.ciphertext.toString(i)},parse:function(s){var l=i.parse(s);return a.create({ciphertext:l})}},n.format.Hex)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.BlockCipher,i=r.algo,s=[],l=[],h=[],o=[],c=[],u=[],p=[],f=[],_=[],g=[];(function(){for(var w=[],m=0;m<256;m++)w[m]=m<128?m<<1:m<<1^283;var y=0,x=0;for(m=0;m<256;m++){var S=x^x<<1^x<<2^x<<3^x<<4;S=S>>>8^255&S^99,s[y]=S,l[S]=y;var k=w[y],E=w[k],B=w[E],b=257*w[S]^16843008*S;h[y]=b<<24|b>>>8,o[y]=b<<16|b>>>16,c[y]=b<<8|b>>>24,u[y]=b,b=16843009*B^65537*E^257*k^16843008*y,p[S]=b<<24|b>>>8,f[S]=b<<16|b>>>16,_[S]=b<<8|b>>>24,g[S]=b,y?(y=k^w[w[w[B^k]]],x^=w[w[x]]):y=x=1}})();var d=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=a.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var w=this._keyPriorReset=this._key,m=w.words,y=w.sigBytes/4,x=4*((this._nRounds=y+6)+1),S=this._keySchedule=[],k=0;k<x;k++)if(k<y)S[k]=m[k];else{var E=S[k-1];k%y?y>6&&k%y==4&&(E=s[E>>>24]<<24|s[E>>>16&255]<<16|s[E>>>8&255]<<8|s[255&E]):(E=s[(E=E<<8|E>>>24)>>>24]<<24|s[E>>>16&255]<<16|s[E>>>8&255]<<8|s[255&E],E^=d[k/y|0]<<24),S[k]=S[k-y]^E}for(var B=this._invKeySchedule=[],b=0;b<x;b++)k=x-b,E=b%4?S[k]:S[k-4],B[b]=b<4||k<=4?E:p[s[E>>>24]]^f[s[E>>>16&255]]^_[s[E>>>8&255]]^g[s[255&E]]}},encryptBlock:function(w,m){this._doCryptBlock(w,m,this._keySchedule,h,o,c,u,s)},decryptBlock:function(w,m){var y=w[m+1];w[m+1]=w[m+3],w[m+3]=y,this._doCryptBlock(w,m,this._invKeySchedule,p,f,_,g,l),y=w[m+1],w[m+1]=w[m+3],w[m+3]=y},_doCryptBlock:function(w,m,y,x,S,k,E,B){for(var b=this._nRounds,R=w[m]^y[0],C=w[m+1]^y[1],L=w[m+2]^y[2],P=w[m+3]^y[3],H=4,Z=1;Z<b;Z++){var j=x[R>>>24]^S[C>>>16&255]^k[L>>>8&255]^E[255&P]^y[H++],F=x[C>>>24]^S[L>>>16&255]^k[P>>>8&255]^E[255&R]^y[H++],K=x[L>>>24]^S[P>>>16&255]^k[R>>>8&255]^E[255&C]^y[H++],it=x[P>>>24]^S[R>>>16&255]^k[C>>>8&255]^E[255&L]^y[H++];R=j,C=F,L=K,P=it}j=(B[R>>>24]<<24|B[C>>>16&255]<<16|B[L>>>8&255]<<8|B[255&P])^y[H++],F=(B[C>>>24]<<24|B[L>>>16&255]<<16|B[P>>>8&255]<<8|B[255&R])^y[H++],K=(B[L>>>24]<<24|B[P>>>16&255]<<16|B[R>>>8&255]<<8|B[255&C])^y[H++],it=(B[P>>>24]<<24|B[R>>>16&255]<<16|B[C>>>8&255]<<8|B[255&L])^y[H++],w[m]=j,w[m+1]=F,w[m+2]=K,w[m+3]=it},keySize:8});r.AES=a._createHelper(v)})(),n.AES)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib,i=a.WordArray,s=a.BlockCipher,l=r.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=l.DES=s.extend({_doReset:function(){for(var v=this._key.words,w=[],m=0;m<56;m++){var y=h[m]-1;w[m]=v[y>>>5]>>>31-y%32&1}for(var x=this._subKeys=[],S=0;S<16;S++){var k=x[S]=[],E=c[S];for(m=0;m<24;m++)k[m/6|0]|=w[(o[m]-1+E)%28]<<31-m%6,k[4+(m/6|0)]|=w[28+(o[m+24]-1+E)%28]<<31-m%6;for(k[0]=k[0]<<1|k[0]>>>31,m=1;m<7;m++)k[m]=k[m]>>>4*(m-1)+3;k[7]=k[7]<<5|k[7]>>>27}var B=this._invSubKeys=[];for(m=0;m<16;m++)B[m]=x[15-m]},encryptBlock:function(v,w){this._doCryptBlock(v,w,this._subKeys)},decryptBlock:function(v,w){this._doCryptBlock(v,w,this._invSubKeys)},_doCryptBlock:function(v,w,m){this._lBlock=v[w],this._rBlock=v[w+1],_.call(this,4,252645135),_.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),_.call(this,1,1431655765);for(var y=0;y<16;y++){for(var x=m[y],S=this._lBlock,k=this._rBlock,E=0,B=0;B<8;B++)E|=u[B][((k^x[B])&p[B])>>>0];this._lBlock=k,this._rBlock=S^E}var b=this._lBlock;this._lBlock=this._rBlock,this._rBlock=b,_.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),_.call(this,16,65535),_.call(this,4,252645135),v[w]=this._lBlock,v[w+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function _(v,w){var m=(this._lBlock>>>v^this._rBlock)&w;this._rBlock^=m,this._lBlock^=m<<v}function g(v,w){var m=(this._rBlock>>>v^this._lBlock)&w;this._lBlock^=m,this._rBlock^=m<<v}r.DES=s._createHelper(f);var d=l.TripleDES=s.extend({_doReset:function(){var v=this._key.words;this._des1=f.createEncryptor(i.create(v.slice(0,2))),this._des2=f.createEncryptor(i.create(v.slice(2,4))),this._des3=f.createEncryptor(i.create(v.slice(4,6)))},encryptBlock:function(v,w){this._des1.encryptBlock(v,w),this._des2.decryptBlock(v,w),this._des3.encryptBlock(v,w)},decryptBlock:function(v,w){this._des3.decryptBlock(v,w),this._des2.encryptBlock(v,w),this._des1.decryptBlock(v,w)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=s._createHelper(d)})(),n.TripleDES)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.StreamCipher,i=r.algo,s=i.RC4=a.extend({_doReset:function(){for(var o=this._key,c=o.words,u=o.sigBytes,p=this._S=[],f=0;f<256;f++)p[f]=f;f=0;for(var _=0;f<256;f++){var g=f%u,d=c[g>>>2]>>>24-g%4*8&255;_=(_+p[f]+d)%256;var v=p[f];p[f]=p[_],p[_]=v}this._i=this._j=0},_doProcessBlock:function(o,c){o[c]^=l.call(this)},keySize:8,ivSize:0});function l(){for(var o=this._S,c=this._i,u=this._j,p=0,f=0;f<4;f++){u=(u+o[c=(c+1)%256])%256;var _=o[c];o[c]=o[u],o[u]=_,p|=o[(o[c]+o[u])%256]<<24-8*f}return this._i=c,this._j=u,p}r.RC4=a._createHelper(s);var h=i.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)l.call(this)}});r.RC4Drop=a._createHelper(h)})(),n.RC4)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.StreamCipher,i=r.algo,s=[],l=[],h=[],o=i.Rabbit=a.extend({_doReset:function(){for(var u=this._key.words,p=this.cfg.iv,f=0;f<4;f++)u[f]=16711935&(u[f]<<8|u[f]>>>24)|4278255360&(u[f]<<24|u[f]>>>8);var _=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],g=this._C=[u[2]<<16|u[2]>>>16,4294901760&u[0]|65535&u[1],u[3]<<16|u[3]>>>16,4294901760&u[1]|65535&u[2],u[0]<<16|u[0]>>>16,4294901760&u[2]|65535&u[3],u[1]<<16|u[1]>>>16,4294901760&u[3]|65535&u[0]];for(this._b=0,f=0;f<4;f++)c.call(this);for(f=0;f<8;f++)g[f]^=_[f+4&7];if(p){var d=p.words,v=d[0],w=d[1],m=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),y=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),x=m>>>16|4294901760&y,S=y<<16|65535&m;for(g[0]^=m,g[1]^=x,g[2]^=y,g[3]^=S,g[4]^=m,g[5]^=x,g[6]^=y,g[7]^=S,f=0;f<4;f++)c.call(this)}},_doProcessBlock:function(u,p){var f=this._X;c.call(this),s[0]=f[0]^f[5]>>>16^f[3]<<16,s[1]=f[2]^f[7]>>>16^f[5]<<16,s[2]=f[4]^f[1]>>>16^f[7]<<16,s[3]=f[6]^f[3]>>>16^f[1]<<16;for(var _=0;_<4;_++)s[_]=16711935&(s[_]<<8|s[_]>>>24)|4278255360&(s[_]<<24|s[_]>>>8),u[p+_]^=s[_]},blockSize:4,ivSize:2});function c(){for(var u=this._X,p=this._C,f=0;f<8;f++)l[f]=p[f];for(p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<l[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<l[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<l[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<l[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<l[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<l[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<l[6]>>>0?1:0)|0,this._b=p[7]>>>0<l[7]>>>0?1:0,f=0;f<8;f++){var _=u[f]+p[f],g=65535&_,d=_>>>16,v=((g*g>>>17)+g*d>>>15)+d*d,w=((4294901760&_)*_|0)+((65535&_)*_|0);h[f]=v^w}u[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,u[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,u[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,u[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,u[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,u[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,u[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,u[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}r.Rabbit=a._createHelper(o)})(),n.Rabbit)}),G(function(t,e){var n;t.exports=(n=X,(function(){var r=n,a=r.lib.StreamCipher,i=r.algo,s=[],l=[],h=[],o=i.RabbitLegacy=a.extend({_doReset:function(){var u=this._key.words,p=this.cfg.iv,f=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],_=this._C=[u[2]<<16|u[2]>>>16,4294901760&u[0]|65535&u[1],u[3]<<16|u[3]>>>16,4294901760&u[1]|65535&u[2],u[0]<<16|u[0]>>>16,4294901760&u[2]|65535&u[3],u[1]<<16|u[1]>>>16,4294901760&u[3]|65535&u[0]];this._b=0;for(var g=0;g<4;g++)c.call(this);for(g=0;g<8;g++)_[g]^=f[g+4&7];if(p){var d=p.words,v=d[0],w=d[1],m=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),y=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),x=m>>>16|4294901760&y,S=y<<16|65535&m;for(_[0]^=m,_[1]^=x,_[2]^=y,_[3]^=S,_[4]^=m,_[5]^=x,_[6]^=y,_[7]^=S,g=0;g<4;g++)c.call(this)}},_doProcessBlock:function(u,p){var f=this._X;c.call(this),s[0]=f[0]^f[5]>>>16^f[3]<<16,s[1]=f[2]^f[7]>>>16^f[5]<<16,s[2]=f[4]^f[1]>>>16^f[7]<<16,s[3]=f[6]^f[3]>>>16^f[1]<<16;for(var _=0;_<4;_++)s[_]=16711935&(s[_]<<8|s[_]>>>24)|4278255360&(s[_]<<24|s[_]>>>8),u[p+_]^=s[_]},blockSize:4,ivSize:2});function c(){for(var u=this._X,p=this._C,f=0;f<8;f++)l[f]=p[f];for(p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<l[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<l[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<l[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<l[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<l[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<l[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<l[6]>>>0?1:0)|0,this._b=p[7]>>>0<l[7]>>>0?1:0,f=0;f<8;f++){var _=u[f]+p[f],g=65535&_,d=_>>>16,v=((g*g>>>17)+g*d>>>15)+d*d,w=((4294901760&_)*_|0)+((65535&_)*_|0);h[f]=v^w}u[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,u[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,u[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,u[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,u[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,u[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,u[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,u[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}r.RabbitLegacy=a._createHelper(o)})(),n.RabbitLegacy)}),G(function(t,e){t.exports=X}));function Dr(){throw new Error("setTimeout has not been defined")}function Cr(){throw new Error("clearTimeout has not been defined")}var Ht=Dr,Ft=Cr;function Pr(t){if(Ht===setTimeout)return setTimeout(t,0);if((Ht===Dr||!Ht)&&setTimeout)return Ht=setTimeout,setTimeout(t,0);try{return Ht(t,0)}catch{try{return Ht.call(null,t,0)}catch{return Ht.call(this,t,0)}}}typeof we.setTimeout=="function"&&(Ht=setTimeout),typeof we.clearTimeout=="function"&&(Ft=clearTimeout);var Jt,Dt=[],me=!1,on=-1;function Ga(){me&&Jt&&(me=!1,Jt.length?Dt=Jt.concat(Dt):on=-1,Dt.length&&Or())}function Or(){if(!me){var t=Pr(Ga);me=!0;for(var e=Dt.length;e;){for(Jt=Dt,Dt=[];++on<e;)Jt&&Jt[on].run();on=-1,e=Dt.length}Jt=null,me=!1,(function(n){if(Ft===clearTimeout)return clearTimeout(n);if((Ft===Cr||!Ft)&&clearTimeout)return Ft=clearTimeout,clearTimeout(n);try{Ft(n)}catch{try{return Ft.call(null,n)}catch{return Ft.call(this,n)}}})(t)}}function ht(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Dt.push(new Nr(t,e)),Dt.length!==1||me||Pr(Or)}function Nr(t,e){this.fun=t,this.array=e}Nr.prototype.run=function(){this.fun.apply(null,this.array)};var Ie=we.performance||{};Ie.now||Ie.mozNow||Ie.msNow||Ie.oNow||Ie.webkitNow;function Vt(){}function q(){q.init.call(this)}function Ur(t){return t._maxListeners===void 0?q.defaultMaxListeners:t._maxListeners}function qa(t,e,n){if(e)t.call(n);else for(var r=t.length,a=Me(t,r),i=0;i<r;++i)a[i].call(n)}function Xa(t,e,n,r){if(e)t.call(n,r);else for(var a=t.length,i=Me(t,a),s=0;s<a;++s)i[s].call(n,r)}function $a(t,e,n,r,a){if(e)t.call(n,r,a);else for(var i=t.length,s=Me(t,i),l=0;l<i;++l)s[l].call(n,r,a)}function Ja(t,e,n,r,a,i){if(e)t.call(n,r,a,i);else for(var s=t.length,l=Me(t,s),h=0;h<s;++h)l[h].call(n,r,a,i)}function Qa(t,e,n,r){if(e)t.apply(n,r);else for(var a=t.length,i=Me(t,a),s=0;s<a;++s)i[s].apply(n,r)}function Hr(t,e,n,r){var a,i,s,l;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),s=i[e]):(i=t._events=new Vt,t._eventsCount=0),s){if(typeof s=="function"?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(a=Ur(t))&&a>0&&s.length>a){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,l=h,typeof console.warn=="function"?console.warn(l):console.log(l)}}else s=i[e]=n,++t._eventsCount;return t}function Fr(t,e,n){var r=!1;function a(){t.removeListener(e,a),r||(r=!0,n.apply(t,arguments))}return a.listener=n,a}function Vr(t){var e=this._events;if(e){var n=e[t];if(typeof n=="function")return 1;if(n)return n.length}return 0}function Me(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}Vt.prototype=Object.create(null),q.EventEmitter=q,q.usingDomains=!1,q.prototype.domain=void 0,q.prototype._events=void 0,q.prototype._maxListeners=void 0,q.defaultMaxListeners=10,q.init=function(){this.domain=null,q.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Vt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},q.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},q.prototype.getMaxListeners=function(){return Ur(this)},q.prototype.emit=function(t){var e,n,r,a,i,s,l,h=t==="error";if(s=this._events)h=h&&s.error==null;else if(!h)return!1;if(l=this.domain,h){if(e=arguments[1],!l){if(e instanceof Error)throw e;var o=new Error('Uncaught, unspecified "error" event. ('+e+")");throw o.context=e,o}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=l,e.domainThrown=!1,l.emit("error",e),!1}if(!(n=s[t]))return!1;var c=typeof n=="function";switch(r=arguments.length){case 1:qa(n,c,this);break;case 2:Xa(n,c,this,arguments[1]);break;case 3:$a(n,c,this,arguments[1],arguments[2]);break;case 4:Ja(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(r-1),i=1;i<r;i++)a[i-1]=arguments[i];Qa(n,c,this,a)}return!0},q.prototype.addListener=function(t,e){return Hr(this,t,e,!1)},q.prototype.on=q.prototype.addListener,q.prototype.prependListener=function(t,e){return Hr(this,t,e,!0)},q.prototype.once=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,Fr(this,t,e)),this},q.prototype.prependOnceListener=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Fr(this,t,e)),this},q.prototype.removeListener=function(t,e){var n,r,a,i,s;if(typeof e!="function")throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)--this._eventsCount==0?this._events=new Vt:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(a=-1,i=n.length;i-- >0;)if(n[i]===e||n[i].listener&&n[i].listener===e){s=n[i].listener,a=i;break}if(a<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount==0)return this._events=new Vt,this;delete r[t]}else(function(l,h){for(var o=h,c=o+1,u=l.length;c<u;o+=1,c+=1)l[o]=l[c];l.pop()})(n,a);r.removeListener&&this.emit("removeListener",t,s||e)}return this},q.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return arguments.length===0?(this._events=new Vt,this._eventsCount=0):n[t]&&(--this._eventsCount==0?this._events=new Vt:delete n[t]),this;if(arguments.length===0){for(var r,a=Object.keys(n),i=0;i<a.length;++i)(r=a[i])!=="removeListener"&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Vt,this._eventsCount=0,this}if(typeof(e=n[t])=="function")this.removeListener(t,e);else if(e)do this.removeListener(t,e[e.length-1]);while(e[0]);return this},q.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?typeof e=="function"?[e.listener||e]:(function(r){for(var a=new Array(r.length),i=0;i<a.length;++i)a[i]=r[i].listener||r[i];return a})(e):[]},q.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Vr.call(t,e)},q.prototype.listenerCount=Vr,q.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var pt=typeof Object.create=="function"?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},to=/%[sdj%]/g;function eo(t){if(!Cn(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(Zt(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,a=r.length,i=String(t).replace(to,function(l){if(l==="%%")return"%";if(n>=a)return l;switch(l){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return l}}),s=r[n];n<a;s=r[++n])Dn(s)||!De(s)?i+=" "+s:i+=" "+Zt(s);return i}function Zr(t,e){if(jt(we.process))return function(){return Zr(t,e).apply(this,arguments)};var n=!1;return function(){return n||(console.error(e),n=!0),t.apply(this,arguments)}}var Tn,sn={};function Zt(t,e){var n={seen:[],stylize:ro};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),jr(e)?n.showHidden=e:e&&(function(r,a){if(!a||!De(a))return r;for(var i=Object.keys(a),s=i.length;s--;)r[i[s]]=a[i[s]]})(n,e),jt(n.showHidden)&&(n.showHidden=!1),jt(n.depth)&&(n.depth=2),jt(n.colors)&&(n.colors=!1),jt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=no),ln(n,t,n.depth)}function no(t,e){var n=Zt.styles[e];return n?"\x1B["+Zt.colors[n][0]+"m"+t+"\x1B["+Zt.colors[n][1]+"m":t}function ro(t,e){return t}function ln(t,e,n){if(t.customInspect&&e&&Nn(e.inspect)&&e.inspect!==Zt&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return Cn(r)||(r=ln(t,r,n)),r}var a=(function(f,_){if(jt(_))return f.stylize("undefined","undefined");if(Cn(_)){var g="'"+JSON.stringify(_).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return f.stylize(g,"string")}if(d=_,typeof d=="number")return f.stylize(""+_,"number");var d;if(jr(_))return f.stylize(""+_,"boolean");if(Dn(_))return f.stylize("null","null")})(t,e);if(a)return a;var i=Object.keys(e),s=(function(f){var _={};return f.forEach(function(g,d){_[g]=!0}),_})(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),On(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return In(e);if(i.length===0){if(Nn(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(Pn(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Wr(e))return t.stylize(Date.prototype.toString.call(e),"date");if(On(e))return In(e)}var h,o,c="",u=!1,p=["{","}"];return h=e,Array.isArray(h)&&(u=!0,p=["[","]"]),Nn(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),Pn(e)&&(c=" "+RegExp.prototype.toString.call(e)),Wr(e)&&(c=" "+Date.prototype.toUTCString.call(e)),On(e)&&(c=" "+In(e)),i.length!==0||u&&e.length!=0?n<0?Pn(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),o=u?(function(f,_,g,d,v){for(var w=[],m=0,y=_.length;m<y;++m)Yr(_,String(m))?w.push(Mn(f,_,g,d,String(m),!0)):w.push("");return v.forEach(function(x){x.match(/^\d+$/)||w.push(Mn(f,_,g,d,x,!0))}),w})(t,e,n,s,i):i.map(function(f){return Mn(t,e,n,s,f,u)}),t.seen.pop(),(function(f,_,g){return f.reduce(function(d,v){return v.indexOf(`
2
+ `),d+v.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?g[0]+(_===""?"":_+`
3
+ `)+" "+f.join(`,
4
+ `)+" "+g[1]:g[0]+_+" "+f.join(", ")+" "+g[1]})(o,c,p)):p[0]+c+p[1]}function In(t){return"["+Error.prototype.toString.call(t)+"]"}function Mn(t,e,n,r,a,i){var s,l,h;if((h=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?l=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(l=t.stylize("[Setter]","special")),Yr(r,a)||(s="["+a+"]"),l||(t.seen.indexOf(h.value)<0?(l=Dn(n)?ln(t,h.value,null):ln(t,h.value,n-1)).indexOf(`
5
+ `)>-1&&(l=i?l.split(`
6
+ `).map(function(o){return" "+o}).join(`
7
+ `).substr(2):`
8
+ `+l.split(`
9
+ `).map(function(o){return" "+o}).join(`
10
+ `)):l=t.stylize("[Circular]","special")),jt(s)){if(i&&a.match(/^\d+$/))return l;(s=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+l}function jr(t){return typeof t=="boolean"}function Dn(t){return t===null}function Cn(t){return typeof t=="string"}function jt(t){return t===void 0}function Pn(t){return De(t)&&Un(t)==="[object RegExp]"}function De(t){return typeof t=="object"&&t!==null}function Wr(t){return De(t)&&Un(t)==="[object Date]"}function On(t){return De(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Nn(t){return typeof t=="function"}function Un(t){return Object.prototype.toString.call(t)}function Yr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Qt(){this.head=null,this.tail=null,this.length=0}Zt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Zt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Qt.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},Qt.prototype.unshift=function(t){var e={data:t,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length},Qt.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Qt.prototype.clear=function(){this.head=this.tail=null,this.length=0},Qt.prototype.join=function(t){if(this.length===0)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},Qt.prototype.concat=function(t){if(this.length===0)return A.alloc(0);if(this.length===1)return this.head.data;for(var e=A.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e};var io=A.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ce(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),(function(e){if(e&&!io(e))throw new Error("Unknown encoding: "+e)})(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=oo;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=so;break;default:return void(this.write=ao)}this.charBuffer=new A(6),this.charReceived=0,this.charLength=0}function ao(t){return t.toString(this.encoding)}function oo(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function so(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Ce.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((a=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&a<=56319)){if(this.charReceived=this.charLength=0,t.length===0)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var a;if(r=(e+=t.toString(this.encoding,0,r)).length-1,(a=e.charCodeAt(r))>=55296&&a<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),t.copy(this.charBuffer,0,0,i),e.substring(0,r)}return e},Ce.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(e==1&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},Ce.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,a=this.encoding;e+=r.slice(0,n).toString(a)}return e},rt.ReadableState=Kr;var Q=(function(t){return jt(Tn)&&(Tn=""),t=t.toUpperCase(),sn[t]||(new RegExp("\\b"+t+"\\b","i").test(Tn)?sn[t]=function(){var e=eo.apply(null,arguments);console.error("%s %d: %s",t,0,e)}:sn[t]=function(){}),sn[t]})("stream");function Kr(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof bt&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Qt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Ce(t.encoding),this.encoding=t.encoding)}function rt(t){if(!(this instanceof rt))return new rt(t);this._readableState=new Kr(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),q.call(this)}function Gr(t,e,n,r,a){var i=(function(o,c){var u=null;return Te(c)||typeof c=="string"||c==null||o.objectMode||(u=new TypeError("Invalid non-string/buffer chunk")),u})(e,n);if(i)t.emit("error",i);else if(n===null)e.reading=!1,(function(o,c){if(!c.ended){if(c.decoder){var u=c.decoder.end();u&&u.length&&(c.buffer.push(u),c.length+=c.objectMode?1:u.length)}c.ended=!0,hn(o)}})(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!a){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&a){var l=new Error("stream.unshift() after end event");t.emit("error",l)}else{var h;!e.decoder||a||r||(n=e.decoder.write(n),h=!e.objectMode&&n.length===0),a||(e.reading=!1),h||(e.flowing&&e.length===0&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,a?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&hn(t))),(function(o,c){c.readingMore||(c.readingMore=!0,ht(lo,o,c))})(t,e)}else a||(e.reading=!1);return(function(o){return!o.ended&&(o.needReadable||o.length<o.highWaterMark||o.length===0)})(e)}pt(rt,q),rt.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||typeof t!="string"||(e=e||n.defaultEncoding)!==n.encoding&&(t=A.from(t,e),e=""),Gr(this,n,t,e,!1)},rt.prototype.unshift=function(t){return Gr(this,this._readableState,t,"",!0)},rt.prototype.isPaused=function(){return this._readableState.flowing===!1},rt.prototype.setEncoding=function(t){return this._readableState.decoder=new Ce(t),this._readableState.encoding=t,this};var qr=8388608;function Xr(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=(function(n){return n>=qr?n=qr:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n})(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function hn(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Q("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ht($r,t):$r(t))}function $r(t){Q("emit readable"),t.emit("readable"),Hn(t)}function lo(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Q("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function ho(t){Q("readable nexttick read 0"),t.read(0)}function co(t,e){e.reading||(Q("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Hn(t),e.flowing&&!e.reading&&t.read(0)}function Hn(t){var e=t._readableState;for(Q("flow",e.flowing);e.flowing&&t.read()!==null;);}function Jr(t,e){return e.length===0?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):e.buffer.length===1?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=(function(r,a,i){var s;return r<a.head.data.length?(s=a.head.data.slice(0,r),a.head.data=a.head.data.slice(r)):s=r===a.head.data.length?a.shift():i?(function(l,h){var o=h.head,c=1,u=o.data;for(l-=u.length;o=o.next;){var p=o.data,f=l>p.length?p.length:l;if(f===p.length?u+=p:u+=p.slice(0,l),(l-=f)===0){f===p.length?(++c,o.next?h.head=o.next:h.head=h.tail=null):(h.head=o,o.data=p.slice(f));break}++c}return h.length-=c,u})(r,a):(function(l,h){var o=A.allocUnsafe(l),c=h.head,u=1;for(c.data.copy(o),l-=c.data.length;c=c.next;){var p=c.data,f=l>p.length?p.length:l;if(p.copy(o,o.length-l,0,f),(l-=f)===0){f===p.length?(++u,c.next?h.head=c.next:h.head=h.tail=null):(h.head=c,c.data=p.slice(f));break}++u}return h.length-=u,o})(r,a),s})(t,e.buffer,e.decoder),n);var n}function Fn(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ht(fo,e,t))}function fo(t,e){t.endEmitted||t.length!==0||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Qr(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function uo(){}function po(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function Vn(t,e){Object.defineProperty(this,"buffer",{get:Zr(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof bt&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){(function(s,l){var h=s._writableState,o=h.sync,c=h.writecb;if((function(p){p.writing=!1,p.writecb=null,p.length-=p.writelen,p.writelen=0})(h),l)(function(p,f,_,g,d){--f.pendingcb,_?ht(d,g):d(g),p._writableState.errorEmitted=!0,p.emit("error",g)})(s,h,o,l,c);else{var u=ni(h);u||h.corked||h.bufferProcessing||!h.bufferedRequest||ei(s,h),o?ht(ti,s,h,u,c):ti(s,h,u,c)}})(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ai(this)}function ft(t){if(!(this instanceof ft||this instanceof bt))return new ft(t);this._writableState=new Vn(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev)),q.call(this)}function Zn(t,e,n,r,a,i,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(a,e.onwrite):t._write(a,i,e.onwrite),e.sync=!1}function ti(t,e,n,r){n||(function(a,i){i.length===0&&i.needDrain&&(i.needDrain=!1,a.emit("drain"))})(t,e),e.pendingcb--,r(),ii(t,e)}function ei(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,a=new Array(r),i=e.corkedRequestsFree;i.entry=n;for(var s=0;n;)a[s]=n,n=n.next,s+=1;Zn(t,e,!0,e.length,a,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new ai(e)}else{for(;n;){var l=n.chunk,h=n.encoding,o=n.callback;if(Zn(t,e,!1,e.objectMode?1:l.length,l,h,o),n=n.next,e.writing)break}n===null&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}function ni(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ri(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function ii(t,e){var n=ni(e);return n&&(e.pendingcb===0?(ri(t,e),e.finished=!0,t.emit("finish")):ri(t,e)),n}function ai(t){var e=this;this.next=null,this.entry=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var a=r.callback;t.pendingcb--,a(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}rt.prototype.read=function(t){Q("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Q("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Fn(this):hn(this),null;if((t=Xr(t,e))===0&&e.ended)return e.length===0&&Fn(this),null;var r,a=e.needReadable;return Q("need readable",a),(e.length===0||e.length-t<e.highWaterMark)&&Q("length less than watermark",a=!0),e.ended||e.reading?Q("reading or ended",a=!1):a&&(Q("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Xr(n,e))),(r=t>0?Jr(t,e):null)===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Fn(this)),r!==null&&this.emit("data",r),r},rt.prototype._read=function(t){this.emit("error",new Error("not implemented"))},rt.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,Q("pipe count=%d opts=%j",r.pipesCount,e);var a=!e||e.end!==!1?s:o;function i(d){Q("onunpipe"),d===n&&o()}function s(){Q("onend"),t.end()}r.endEmitted?ht(a):n.once("end",a),t.on("unpipe",i);var l=(function(d){return function(){var v=d._readableState;Q("pipeOnDrain",v.awaitDrain),v.awaitDrain&&v.awaitDrain--,v.awaitDrain===0&&d.listeners("data").length&&(v.flowing=!0,Hn(d))}})(n);t.on("drain",l);var h=!1;function o(){Q("cleanup"),t.removeListener("close",f),t.removeListener("finish",_),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",i),n.removeListener("end",s),n.removeListener("end",o),n.removeListener("data",u),h=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||l()}var c=!1;function u(d){Q("ondata"),c=!1,t.write(d)!==!1||c||((r.pipesCount===1&&r.pipes===t||r.pipesCount>1&&Qr(r.pipes,t)!==-1)&&!h&&(Q("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function p(d){var v;Q("onerror",d),g(),t.removeListener("error",p),v="error",t.listeners(v).length===0&&t.emit("error",d)}function f(){t.removeListener("finish",_),g()}function _(){Q("onfinish"),t.removeListener("close",f),g()}function g(){Q("unpipe"),n.unpipe(t)}return n.on("data",u),(function(d,v,w){if(typeof d.prependListener=="function")return d.prependListener(v,w);d._events&&d._events[v]?Array.isArray(d._events[v])?d._events[v].unshift(w):d._events[v]=[w,d._events[v]]:d.on(v,w)})(t,"error",p),t.once("close",f),t.once("finish",_),t.emit("pipe",n),r.flowing||(Q("pipe resume"),n.resume()),t},rt.prototype.unpipe=function(t){var e=this._readableState;if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<r;a++)n[a].emit("unpipe",this);return this}var i=Qr(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},rt.prototype.on=function(t,e){var n=q.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&hn(this):ht(ho,this))}return n},rt.prototype.addListener=rt.prototype.on,rt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Q("resume"),t.flowing=!0,(function(e,n){n.resumeScheduled||(n.resumeScheduled=!0,ht(co,e,n))})(this,t)),this},rt.prototype.pause=function(){return Q("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Q("pause"),this._readableState.flowing=!1,this.emit("pause")),this},rt.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var a in t.on("end",function(){if(Q("wrapped end"),e.decoder&&!e.ended){var i=e.decoder.end();i&&i.length&&r.push(i)}r.push(null)}),t.on("data",function(i){Q("wrapped data"),e.decoder&&(i=e.decoder.write(i)),e.objectMode&&i==null||(e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause()))}),t)this[a]===void 0&&typeof t[a]=="function"&&(this[a]=(function(i){return function(){return t[i].apply(t,arguments)}})(a));return(function(i,s){for(var l=0,h=i.length;l<h;l++)s(i[l],l)})(["error","close","destroy","pause","resume"],function(i){t.on(i,r.emit.bind(r,i))}),r._read=function(i){Q("wrapped _read",i),n&&(n=!1,t.resume())},r},rt._fromList=Jr,ft.WritableState=Vn,pt(ft,q),Vn.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},ft.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},ft.prototype.write=function(t,e,n){var r=this._writableState,a=!1;return typeof e=="function"&&(n=e,e=null),A.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),typeof n!="function"&&(n=uo),r.ended?(function(i,s){var l=new Error("write after end");i.emit("error",l),ht(s,l)})(this,n):(function(i,s,l,h){var o=!0,c=!1;return l===null?c=new TypeError("May not write null values to stream"):A.isBuffer(l)||typeof l=="string"||l===void 0||s.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c&&(i.emit("error",c),ht(h,c),o=!1),o})(this,r,t,n)&&(r.pendingcb++,a=(function(i,s,l,h,o){l=(function(f,_,g){return f.objectMode||f.decodeStrings===!1||typeof _!="string"||(_=A.from(_,g)),_})(s,l,h),A.isBuffer(l)&&(h="buffer");var c=s.objectMode?1:l.length;s.length+=c;var u=s.length<s.highWaterMark;if(u||(s.needDrain=!0),s.writing||s.corked){var p=s.lastBufferedRequest;s.lastBufferedRequest=new po(l,h,o),p?p.next=s.lastBufferedRequest:s.bufferedRequest=s.lastBufferedRequest,s.bufferedRequestCount+=1}else Zn(i,s,!1,c,l,h,o);return u})(this,r,t,e,n)),a},ft.prototype.cork=function(){this._writableState.corked++},ft.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||ei(this,t))},ft.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},ft.prototype._write=function(t,e,n){n(new Error("not implemented"))},ft.prototype._writev=null,ft.prototype.end=function(t,e,n){var r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),t!=null&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||(function(a,i,s){i.ending=!0,ii(a,i),s&&(i.finished?ht(s):a.once("finish",s)),i.ended=!0,a.writable=!1})(this,r,n)},pt(bt,rt);for(var oi=Object.keys(ft.prototype),jn=0;jn<oi.length;jn++){var Wn=oi[jn];bt.prototype[Wn]||(bt.prototype[Wn]=ft.prototype[Wn])}function bt(t){if(!(this instanceof bt))return new bt(t);rt.call(this,t),ft.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_o)}function _o(){this.allowHalfOpen||this._writableState.ended||ht(go,this)}function go(t){t.end()}function vo(t){this.afterTransform=function(e,n){return(function(r,a,i){var s=r._transformState;s.transforming=!1;var l=s.writecb;if(!l)return r.emit("error",new Error("no writecb in Transform class"));s.writechunk=null,s.writecb=null,i!=null&&r.push(i),l(a);var h=r._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&r._read(h.highWaterMark)})(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function kt(t){if(!(this instanceof kt))return new kt(t);bt.call(this,t),this._transformState=new vo(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n){si(e,n)}):si(e)})}function si(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function Pe(t){if(!(this instanceof Pe))return new Pe(t);kt.call(this,t)}function Ct(){q.call(this)}pt(kt,bt),kt.prototype.push=function(t,e){return this._transformState.needTransform=!1,bt.prototype.push.call(this,t,e)},kt.prototype._transform=function(t,e,n){throw new Error("Not implemented")},kt.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},kt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},pt(Pe,kt),Pe.prototype._transform=function(t,e,n){n(null,t)},pt(Ct,q),Ct.Readable=rt,Ct.Writable=ft,Ct.Duplex=bt,Ct.Transform=kt,Ct.PassThrough=Pe,Ct.Stream=Ct,Ct.prototype.pipe=function(t,e){var n=this;function r(c){t.writable&&t.write(c)===!1&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",a),t._isStdio||e&&e.end===!1||(n.on("end",s),n.on("close",l));var i=!1;function s(){i||(i=!0,t.end())}function l(){i||(i=!0,typeof t.destroy=="function"&&t.destroy())}function h(c){if(o(),q.listenerCount(this,"error")===0)throw c}function o(){n.removeListener("data",r),t.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",h),t.removeListener("error",h),n.removeListener("end",o),n.removeListener("close",o),t.removeListener("close",o)}return n.on("error",h),t.on("error",h),n.on("end",o),n.on("close",o),t.on("close",o),t.emit("pipe",n),t};var li={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function wo(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Pt(t,e,n,r,a){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),a);else for(var i=0;i<r;i++)t[a+i]=e[n+i]}var cn=Uint8Array,Et=Uint16Array,fn=Int32Array,mo=4,hi=0,ci=1,yo=2;function ye(t){for(var e=t.length;--e>=0;)t[e]=0}var bo=0,fi=1,ko=2,Yn=29,Oe=256,Ne=Oe+1+Yn,be=30,Kn=19,ui=2*Ne+1,te=15,Gn=16,Eo=7,qn=256,di=16,pi=17,_i=18,Xn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],un=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],So=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gi=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ot=new Array(2*(Ne+2));ye(Ot);var Ue=new Array(2*be);ye(Ue);var He=new Array(512);ye(He);var Fe=new Array(256);ye(Fe);var $n=new Array(Yn);ye($n);var vi,wi,mi,dn=new Array(be);function Jn(t,e,n,r,a){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=t&&t.length}function Qn(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function yi(t){return t<256?He[t]:He[256+(t>>>7)]}function Ve(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function _t(t,e,n){t.bi_valid>Gn-n?(t.bi_buf|=e<<t.bi_valid&65535,Ve(t,t.bi_buf),t.bi_buf=e>>Gn-t.bi_valid,t.bi_valid+=n-Gn):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function Lt(t,e,n){_t(t,n[2*e],n[2*e+1])}function bi(t,e){var n=0;do n|=1&t,t>>>=1,n<<=1;while(--e>0);return n>>>1}function ki(t,e,n){var r,a,i=new Array(te+1),s=0;for(r=1;r<=te;r++)i[r]=s=s+n[r-1]<<1;for(a=0;a<=e;a++){var l=t[2*a+1];l!==0&&(t[2*a]=bi(i[l]++,l))}}function Ei(t){var e;for(e=0;e<Ne;e++)t.dyn_ltree[2*e]=0;for(e=0;e<be;e++)t.dyn_dtree[2*e]=0;for(e=0;e<Kn;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*qn]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function Si(t){t.bi_valid>8?Ve(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function xi(t,e,n,r){var a=2*e,i=2*n;return t[a]<t[i]||t[a]===t[i]&&r[e]<=r[n]}function tr(t,e,n){for(var r=t.heap[n],a=n<<1;a<=t.heap_len&&(a<t.heap_len&&xi(e,t.heap[a+1],t.heap[a],t.depth)&&a++,!xi(e,r,t.heap[a],t.depth));)t.heap[n]=t.heap[a],n=a,a<<=1;t.heap[n]=r}function Ri(t,e,n){var r,a,i,s,l=0;if(t.last_lit!==0)do r=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],a=t.pending_buf[t.l_buf+l],l++,r===0?Lt(t,a,e):(Lt(t,(i=Fe[a])+Oe+1,e),(s=Xn[i])!==0&&_t(t,a-=$n[i],s),Lt(t,i=yi(--r),n),(s=un[i])!==0&&_t(t,r-=dn[i],s));while(l<t.last_lit);Lt(t,qn,e)}function er(t,e){var n,r,a,i=e.dyn_tree,s=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=ui,n=0;n<h;n++)i[2*n]!==0?(t.heap[++t.heap_len]=o=n,t.depth[n]=0):i[2*n+1]=0;for(;t.heap_len<2;)i[2*(a=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[a]=0,t.opt_len--,l&&(t.static_len-=s[2*a+1]);for(e.max_code=o,n=t.heap_len>>1;n>=1;n--)tr(t,i,n);a=h;do n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],tr(t,i,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,i[2*a]=i[2*n]+i[2*r],t.depth[a]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,i[2*n+1]=i[2*r+1]=a,t.heap[1]=a++,tr(t,i,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],(function(c,u){var p,f,_,g,d,v,w=u.dyn_tree,m=u.max_code,y=u.stat_desc.static_tree,x=u.stat_desc.has_stree,S=u.stat_desc.extra_bits,k=u.stat_desc.extra_base,E=u.stat_desc.max_length,B=0;for(g=0;g<=te;g++)c.bl_count[g]=0;for(w[2*c.heap[c.heap_max]+1]=0,p=c.heap_max+1;p<ui;p++)(g=w[2*w[2*(f=c.heap[p])+1]+1]+1)>E&&(g=E,B++),w[2*f+1]=g,f>m||(c.bl_count[g]++,d=0,f>=k&&(d=S[f-k]),v=w[2*f],c.opt_len+=v*(g+d),x&&(c.static_len+=v*(y[2*f+1]+d)));if(B!==0){do{for(g=E-1;c.bl_count[g]===0;)g--;c.bl_count[g]--,c.bl_count[g+1]+=2,c.bl_count[E]--,B-=2}while(B>0);for(g=E;g!==0;g--)for(f=c.bl_count[g];f!==0;)(_=c.heap[--p])>m||(w[2*_+1]!==g&&(c.opt_len+=(g-w[2*_+1])*w[2*_],w[2*_+1]=g),f--)}})(t,e),ki(i,o,t.bl_count)}function Ai(t,e,n){var r,a,i=-1,s=e[1],l=0,h=7,o=4;for(s===0&&(h=138,o=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)a=s,s=e[2*(r+1)+1],++l<h&&a===s||(l<o?t.bl_tree[2*a]+=l:a!==0?(a!==i&&t.bl_tree[2*a]++,t.bl_tree[2*di]++):l<=10?t.bl_tree[2*pi]++:t.bl_tree[2*_i]++,l=0,i=a,s===0?(h=138,o=3):a===s?(h=6,o=3):(h=7,o=4))}function Bi(t,e,n){var r,a,i=-1,s=e[1],l=0,h=7,o=4;for(s===0&&(h=138,o=3),r=0;r<=n;r++)if(a=s,s=e[2*(r+1)+1],!(++l<h&&a===s)){if(l<o)do Lt(t,a,t.bl_tree);while(--l!=0);else a!==0?(a!==i&&(Lt(t,a,t.bl_tree),l--),Lt(t,di,t.bl_tree),_t(t,l-3,2)):l<=10?(Lt(t,pi,t.bl_tree),_t(t,l-3,3)):(Lt(t,_i,t.bl_tree),_t(t,l-11,7));l=0,i=a,s===0?(h=138,o=3):a===s?(h=6,o=3):(h=7,o=4)}}ye(dn);var Li=!1;function xo(t){Li||((function(){var e,n,r,a,i,s=new Array(te+1);for(r=0,a=0;a<Yn-1;a++)for($n[a]=r,e=0;e<1<<Xn[a];e++)Fe[r++]=a;for(Fe[r-1]=a,i=0,a=0;a<16;a++)for(dn[a]=i,e=0;e<1<<un[a];e++)He[i++]=a;for(i>>=7;a<be;a++)for(dn[a]=i<<7,e=0;e<1<<un[a]-7;e++)He[256+i++]=a;for(n=0;n<=te;n++)s[n]=0;for(e=0;e<=143;)Ot[2*e+1]=8,e++,s[8]++;for(;e<=255;)Ot[2*e+1]=9,e++,s[9]++;for(;e<=279;)Ot[2*e+1]=7,e++,s[7]++;for(;e<=287;)Ot[2*e+1]=8,e++,s[8]++;for(ki(Ot,Ne+1,s),e=0;e<be;e++)Ue[2*e+1]=5,Ue[2*e]=bi(e,5);vi=new Jn(Ot,Xn,Oe+1,Ne,te),wi=new Jn(Ue,un,0,be,te),mi=new Jn(new Array(0),So,0,Kn,Eo)})(),Li=!0),t.l_desc=new Qn(t.dyn_ltree,vi),t.d_desc=new Qn(t.dyn_dtree,wi),t.bl_desc=new Qn(t.bl_tree,mi),t.bi_buf=0,t.bi_valid=0,Ei(t)}function zi(t,e,n,r){_t(t,(bo<<1)+(r?1:0),3),(function(a,i,s,l){Si(a),Ve(a,s),Ve(a,~s),Pt(a.pending_buf,a.window,i,s,a.pending),a.pending+=s})(t,e,n)}function Ro(t){_t(t,fi<<1,3),Lt(t,qn,Ot),(function(e){e.bi_valid===16?(Ve(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(t)}function Ao(t,e,n,r){var a,i,s=0;t.level>0?(t.strm.data_type===yo&&(t.strm.data_type=(function(l){var h,o=4093624447;for(h=0;h<=31;h++,o>>>=1)if(1&o&&l.dyn_ltree[2*h]!==0)return hi;if(l.dyn_ltree[18]!==0||l.dyn_ltree[20]!==0||l.dyn_ltree[26]!==0)return ci;for(h=32;h<Oe;h++)if(l.dyn_ltree[2*h]!==0)return ci;return hi})(t)),er(t,t.l_desc),er(t,t.d_desc),s=(function(l){var h;for(Ai(l,l.dyn_ltree,l.l_desc.max_code),Ai(l,l.dyn_dtree,l.d_desc.max_code),er(l,l.bl_desc),h=Kn-1;h>=3&&l.bl_tree[2*gi[h]+1]===0;h--);return l.opt_len+=3*(h+1)+5+5+4,h})(t),a=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=a&&(a=i)):a=i=n+5,n+4<=a&&e!==-1?zi(t,e,n,r):t.strategy===mo||i===a?(_t(t,(fi<<1)+(r?1:0),3),Ri(t,Ot,Ue)):(_t(t,(ko<<1)+(r?1:0),3),(function(l,h,o,c){var u;for(_t(l,h-257,5),_t(l,o-1,5),_t(l,c-4,4),u=0;u<c;u++)_t(l,l.bl_tree[2*gi[u]+1],3);Bi(l,l.dyn_ltree,h-1),Bi(l,l.dyn_dtree,o-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),Ri(t,t.dyn_ltree,t.dyn_dtree)),Ei(t),r&&Si(t)}function Wt(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,e===0?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(Fe[n]+Oe+1)]++,t.dyn_dtree[2*yi(e)]++),t.last_lit===t.lit_bufsize-1}function nr(t,e,n,r){for(var a=65535&t|0,i=t>>>16&65535|0,s=0;n!==0;){n-=s=n>2e3?2e3:n;do i=i+(a=a+e[r++]|0)|0;while(--s);a%=65521,i%=65521}return a|i<<16|0}var Bo=(function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e})();function st(t,e,n,r){var a=Bo,i=r+n;t^=-1;for(var s=r;s<i;s++)t=t>>>8^a[255&(t^e[s])];return-1^t}var ke,ee=0,Lo=1,zo=3,Yt=4,Ti=5,ne=0,Ii=1,re=-2,To=-3,rr=-5,Io=-1,Mo=1,pn=2,Do=3,Co=4,Po=2,ir=8,Oo=9,ar=286,No=30,Uo=19,Ho=2*ar+1,Fo=15,J=3,Kt=258,xt=Kt+J+1,Vo=32,or=42,sr=69,_n=73,gn=91,vn=103,ie=113,Ze=666,lt=1,je=2,ae=3,Ee=4,Zo=3;function Gt(t,e){return t.msg=li[e],e}function Mi(t){return(t<<1)-(t>4?9:0)}function oe(t){for(var e=t.length;--e>=0;)t[e]=0}function qt(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(Pt(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))}function ct(t,e){Ao(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,qt(t.strm)}function $(t,e){t.pending_buf[t.pending++]=e}function We(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function Di(t,e){var n,r,a=t.max_chain_length,i=t.strstart,s=t.prev_length,l=t.nice_match,h=t.strstart>t.w_size-xt?t.strstart-(t.w_size-xt):0,o=t.window,c=t.w_mask,u=t.prev,p=t.strstart+Kt,f=o[i+s-1],_=o[i+s];t.prev_length>=t.good_match&&(a>>=2),l>t.lookahead&&(l=t.lookahead);do if(o[(n=e)+s]===_&&o[n+s-1]===f&&o[n]===o[i]&&o[++n]===o[i+1]){i+=2,n++;do;while(o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&o[++i]===o[++n]&&i<p);if(r=Kt-(p-i),i=p-Kt,r>s){if(t.match_start=e,s=r,r>=l)break;f=o[i+s-1],_=o[i+s]}}while((e=u[e&c])>h&&--a!=0);return s<=t.lookahead?s:t.lookahead}function Ye(t){var e,n,r,a,i,s,l,h,o,c,u=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-xt)){Pt(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,e=n=t.hash_size;do r=t.head[--e],t.head[e]=r>=u?r-u:0;while(--n);e=n=u;do r=t.prev[--e],t.prev[e]=r>=u?r-u:0;while(--n);a+=u}if(t.strm.avail_in===0)break;if(s=t.strm,l=t.window,h=t.strstart+t.lookahead,o=a,c=void 0,(c=s.avail_in)>o&&(c=o),n=c===0?0:(s.avail_in-=c,Pt(l,s.input,s.next_in,c,h),s.state.wrap===1?s.adler=nr(s.adler,l,c,h):s.state.wrap===2&&(s.adler=st(s.adler,l,c,h)),s.next_in+=c,s.total_in+=c,c),t.lookahead+=n,t.lookahead+t.insert>=J)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+J-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<J)););}while(t.lookahead<xt&&t.strm.avail_in!==0)}function lr(t,e){for(var n,r;;){if(t.lookahead<xt){if(Ye(t),t.lookahead<xt&&e===ee)return lt;if(t.lookahead===0)break}if(n=0,t.lookahead>=J&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+J-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),n!==0&&t.strstart-n<=t.w_size-xt&&(t.match_length=Di(t,n)),t.match_length>=J)if(r=Wt(t,t.strstart-t.match_start,t.match_length-J),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=J){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+J-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!=0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=Wt(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(ct(t,!1),t.strm.avail_out===0))return lt}return t.insert=t.strstart<J-1?t.strstart:J-1,e===Yt?(ct(t,!0),t.strm.avail_out===0?ae:Ee):t.last_lit&&(ct(t,!1),t.strm.avail_out===0)?lt:je}function Se(t,e){for(var n,r,a;;){if(t.lookahead<xt){if(Ye(t),t.lookahead<xt&&e===ee)return lt;if(t.lookahead===0)break}if(n=0,t.lookahead>=J&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+J-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=J-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-xt&&(t.match_length=Di(t,n),t.match_length<=5&&(t.strategy===Mo||t.match_length===J&&t.strstart-t.match_start>4096)&&(t.match_length=J-1)),t.prev_length>=J&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-J,r=Wt(t,t.strstart-1-t.prev_match,t.prev_length-J),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=a&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+J-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!=0);if(t.match_available=0,t.match_length=J-1,t.strstart++,r&&(ct(t,!1),t.strm.avail_out===0))return lt}else if(t.match_available){if((r=Wt(t,0,t.window[t.strstart-1]))&&ct(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return lt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=Wt(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<J-1?t.strstart:J-1,e===Yt?(ct(t,!0),t.strm.avail_out===0?ae:Ee):t.last_lit&&(ct(t,!1),t.strm.avail_out===0)?lt:je}function zt(t,e,n,r,a){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=a}function jo(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ir,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Et(2*Ho),this.dyn_dtree=new Et(2*(2*No+1)),this.bl_tree=new Et(2*(2*Uo+1)),oe(this.dyn_ltree),oe(this.dyn_dtree),oe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Et(Fo+1),this.heap=new Et(2*ar+1),oe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Et(2*ar+1),oe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ci(t){var e,n=(function(r){var a;return r&&r.state?(r.total_in=r.total_out=0,r.data_type=Po,(a=r.state).pending=0,a.pending_out=0,a.wrap<0&&(a.wrap=-a.wrap),a.status=a.wrap?or:ie,r.adler=a.wrap===2?0:1,a.last_flush=ee,xo(a),ne):Gt(r,re)})(t);return n===ne&&((e=t.state).window_size=2*e.w_size,oe(e.head),e.max_lazy_match=ke[e.level].max_lazy,e.good_match=ke[e.level].good_length,e.nice_match=ke[e.level].nice_length,e.max_chain_length=ke[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=J-1,e.match_available=0,e.ins_h=0),n}function Wo(t,e){var n,r,a,i;if(!t||!t.state||e>Ti||e<0)return t?Gt(t,re):re;if(r=t.state,!t.output||!t.input&&t.avail_in!==0||r.status===Ze&&e!==Yt)return Gt(t,t.avail_out===0?rr:re);if(r.strm=t,n=r.last_flush,r.last_flush=e,r.status===or)if(r.wrap===2)t.adler=0,$(r,31),$(r,139),$(r,8),r.gzhead?($(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),$(r,255&r.gzhead.time),$(r,r.gzhead.time>>8&255),$(r,r.gzhead.time>>16&255),$(r,r.gzhead.time>>24&255),$(r,r.level===9?2:r.strategy>=pn||r.level<2?4:0),$(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&($(r,255&r.gzhead.extra.length),$(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=st(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=sr):($(r,0),$(r,0),$(r,0),$(r,0),$(r,0),$(r,r.level===9?2:r.strategy>=pn||r.level<2?4:0),$(r,Zo),r.status=ie);else{var s=ir+(r.w_bits-8<<4)<<8;s|=(r.strategy>=pn||r.level<2?0:r.level<6?1:r.level===6?2:3)<<6,r.strstart!==0&&(s|=Vo),s+=31-s%31,r.status=ie,We(r,s),r.strstart!==0&&(We(r,t.adler>>>16),We(r,65535&t.adler)),t.adler=1}if(r.status===sr)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),qt(t),a=r.pending,r.pending!==r.pending_buf_size));)$(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=_n)}else r.status=_n;if(r.status===_n)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),qt(t),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,$(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),i===0&&(r.gzindex=0,r.status=gn)}else r.status=gn;if(r.status===gn)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),qt(t),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,$(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(t.adler=st(t.adler,r.pending_buf,r.pending-a,a)),i===0&&(r.status=vn)}else r.status=vn;if(r.status===vn&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&qt(t),r.pending+2<=r.pending_buf_size&&($(r,255&t.adler),$(r,t.adler>>8&255),t.adler=0,r.status=ie)):r.status=ie),r.pending!==0){if(qt(t),t.avail_out===0)return r.last_flush=-1,ne}else if(t.avail_in===0&&Mi(e)<=Mi(n)&&e!==Yt)return Gt(t,rr);if(r.status===Ze&&t.avail_in!==0)return Gt(t,rr);if(t.avail_in!==0||r.lookahead!==0||e!==ee&&r.status!==Ze){var l=r.strategy===pn?(function(h,o){for(var c;;){if(h.lookahead===0&&(Ye(h),h.lookahead===0)){if(o===ee)return lt;break}if(h.match_length=0,c=Wt(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++,c&&(ct(h,!1),h.strm.avail_out===0))return lt}return h.insert=0,o===Yt?(ct(h,!0),h.strm.avail_out===0?ae:Ee):h.last_lit&&(ct(h,!1),h.strm.avail_out===0)?lt:je})(r,e):r.strategy===Do?(function(h,o){for(var c,u,p,f,_=h.window;;){if(h.lookahead<=Kt){if(Ye(h),h.lookahead<=Kt&&o===ee)return lt;if(h.lookahead===0)break}if(h.match_length=0,h.lookahead>=J&&h.strstart>0&&(u=_[p=h.strstart-1])===_[++p]&&u===_[++p]&&u===_[++p]){f=h.strstart+Kt;do;while(u===_[++p]&&u===_[++p]&&u===_[++p]&&u===_[++p]&&u===_[++p]&&u===_[++p]&&u===_[++p]&&u===_[++p]&&p<f);h.match_length=Kt-(f-p),h.match_length>h.lookahead&&(h.match_length=h.lookahead)}if(h.match_length>=J?(c=Wt(h,1,h.match_length-J),h.lookahead-=h.match_length,h.strstart+=h.match_length,h.match_length=0):(c=Wt(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++),c&&(ct(h,!1),h.strm.avail_out===0))return lt}return h.insert=0,o===Yt?(ct(h,!0),h.strm.avail_out===0?ae:Ee):h.last_lit&&(ct(h,!1),h.strm.avail_out===0)?lt:je})(r,e):ke[r.level].func(r,e);if(l!==ae&&l!==Ee||(r.status=Ze),l===lt||l===ae)return t.avail_out===0&&(r.last_flush=-1),ne;if(l===je&&(e===Lo?Ro(r):e!==Ti&&(zi(r,0,0,!1),e===zo&&(oe(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),qt(t),t.avail_out===0))return r.last_flush=-1,ne}return e!==Yt?ne:r.wrap<=0?Ii:(r.wrap===2?($(r,255&t.adler),$(r,t.adler>>8&255),$(r,t.adler>>16&255),$(r,t.adler>>24&255),$(r,255&t.total_in),$(r,t.total_in>>8&255),$(r,t.total_in>>16&255),$(r,t.total_in>>24&255)):(We(r,t.adler>>>16),We(r,65535&t.adler)),qt(t),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?ne:Ii)}ke=[new zt(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ye(t),t.lookahead===0&&e===ee)return lt;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((t.strstart===0||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,ct(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-xt&&(ct(t,!1),t.strm.avail_out===0))return lt}return t.insert=0,e===Yt?(ct(t,!0),t.strm.avail_out===0?ae:Ee):(t.strstart>t.block_start&&(ct(t,!1),t.strm.avail_out),lt)}),new zt(4,4,8,4,lr),new zt(4,5,16,8,lr),new zt(4,6,32,32,lr),new zt(4,4,16,16,Se),new zt(8,16,32,32,Se),new zt(8,16,128,128,Se),new zt(8,32,128,256,Se),new zt(32,128,258,1024,Se),new zt(32,258,258,4096,Se)];var wn=30,Yo=12;function Ko(t,e){var n,r,a,i,s,l,h,o,c,u,p,f,_,g,d,v,w,m,y,x,S,k,E,B,b;n=t.state,r=t.next_in,B=t.input,a=r+(t.avail_in-5),i=t.next_out,b=t.output,s=i-(e-t.avail_out),l=i+(t.avail_out-257),h=n.dmax,o=n.wsize,c=n.whave,u=n.wnext,p=n.window,f=n.hold,_=n.bits,g=n.lencode,d=n.distcode,v=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;t:do{_<15&&(f+=B[r++]<<_,_+=8,f+=B[r++]<<_,_+=8),m=g[f&v];e:for(;;){if(f>>>=y=m>>>24,_-=y,(y=m>>>16&255)===0)b[i++]=65535&m;else{if(!(16&y)){if((64&y)==0){m=g[(65535&m)+(f&(1<<y)-1)];continue e}if(32&y){n.mode=Yo;break t}t.msg="invalid literal/length code",n.mode=wn;break t}x=65535&m,(y&=15)&&(_<y&&(f+=B[r++]<<_,_+=8),x+=f&(1<<y)-1,f>>>=y,_-=y),_<15&&(f+=B[r++]<<_,_+=8,f+=B[r++]<<_,_+=8),m=d[f&w];n:for(;;){if(f>>>=y=m>>>24,_-=y,!(16&(y=m>>>16&255))){if((64&y)==0){m=d[(65535&m)+(f&(1<<y)-1)];continue n}t.msg="invalid distance code",n.mode=wn;break t}if(S=65535&m,_<(y&=15)&&(f+=B[r++]<<_,(_+=8)<y&&(f+=B[r++]<<_,_+=8)),(S+=f&(1<<y)-1)>h){t.msg="invalid distance too far back",n.mode=wn;break t}if(f>>>=y,_-=y,S>(y=i-s)){if((y=S-y)>c&&n.sane){t.msg="invalid distance too far back",n.mode=wn;break t}if(k=0,E=p,u===0){if(k+=o-y,y<x){x-=y;do b[i++]=p[k++];while(--y);k=i-S,E=b}}else if(u<y){if(k+=o+u-y,(y-=u)<x){x-=y;do b[i++]=p[k++];while(--y);if(k=0,u<x){x-=y=u;do b[i++]=p[k++];while(--y);k=i-S,E=b}}}else if(k+=u-y,y<x){x-=y;do b[i++]=p[k++];while(--y);k=i-S,E=b}for(;x>2;)b[i++]=E[k++],b[i++]=E[k++],b[i++]=E[k++],x-=3;x&&(b[i++]=E[k++],x>1&&(b[i++]=E[k++]))}else{k=i-S;do b[i++]=b[k++],b[i++]=b[k++],b[i++]=b[k++],x-=3;while(x>2);x&&(b[i++]=b[k++],x>1&&(b[i++]=b[k++]))}break}}break}}while(r<a&&i<l);r-=x=_>>3,f&=(1<<(_-=x<<3))-1,t.next_in=r,t.next_out=i,t.avail_in=r<a?a-r+5:5-(r-a),t.avail_out=i<l?l-i+257:257-(i-l),n.hold=f,n.bits=_}var xe=15,Pi=852,Oi=592,Ni=0,hr=1,Ui=2,Go=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],qo=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Xo=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],$o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Ke(t,e,n,r,a,i,s,l){var h,o,c,u,p,f,_,g,d,v=l.bits,w=0,m=0,y=0,x=0,S=0,k=0,E=0,B=0,b=0,R=0,C=null,L=0,P=new Et(xe+1),H=new Et(xe+1),Z=null,j=0;for(w=0;w<=xe;w++)P[w]=0;for(m=0;m<r;m++)P[e[n+m]]++;for(S=v,x=xe;x>=1&&P[x]===0;x--);if(S>x&&(S=x),x===0)return a[i++]=20971520,a[i++]=20971520,l.bits=1,0;for(y=1;y<x&&P[y]===0;y++);for(S<y&&(S=y),B=1,w=1;w<=xe;w++)if(B<<=1,(B-=P[w])<0)return-1;if(B>0&&(t===Ni||x!==1))return-1;for(H[1]=0,w=1;w<xe;w++)H[w+1]=H[w]+P[w];for(m=0;m<r;m++)e[n+m]!==0&&(s[H[e[n+m]]++]=m);if(t===Ni?(C=Z=s,f=19):t===hr?(C=Go,L-=257,Z=qo,j-=257,f=256):(C=Xo,Z=$o,f=-1),R=0,m=0,w=y,p=i,k=S,E=0,c=-1,u=(b=1<<S)-1,t===hr&&b>Pi||t===Ui&&b>Oi)return 1;for(;;){_=w-E,s[m]<f?(g=0,d=s[m]):s[m]>f?(g=Z[j+s[m]],d=C[L+s[m]]):(g=96,d=0),h=1<<w-E,y=o=1<<k;do a[p+(R>>E)+(o-=h)]=_<<24|g<<16|d|0;while(o!==0);for(h=1<<w-1;R&h;)h>>=1;if(h!==0?(R&=h-1,R+=h):R=0,m++,--P[w]==0){if(w===x)break;w=e[n+s[m]]}if(w>S&&(R&u)!==c){for(E===0&&(E=S),p+=y,B=1<<(k=w-E);k+E<x&&!((B-=P[k+E])<=0);)k++,B<<=1;if(b+=1<<k,t===hr&&b>Pi||t===Ui&&b>Oi)return 1;a[c=R&u]=S<<24|k<<16|p-i|0}}return R!==0&&(a[p+R]=w-E<<24|64<<16|0),l.bits=S,0}var Jo=0,Hi=1,Fi=2,Vi=4,Qo=5,mn=6,yn=0,ts=1,es=2,Xt=-2,ns=-3,rs=-4,is=-5,Zi=8,ji=1,Wi=2,Yi=3,Ki=4,Gi=5,qi=6,Xi=7,$i=8,Ji=9,Qi=10,ta=11,Nt=12,cr=13,ea=14,fr=15,na=16,ra=17,ia=18,aa=19,bn=20,kn=21,oa=22,sa=23,la=24,ha=25,ca=26,ur=27,fa=28,ua=29,tt=30,as=31,os=32,ss=852,ls=592;function da(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function hs(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Et(320),this.work=new Et(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function pa(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,(function(n){var r;return n&&n.state?(r=n.state,n.total_in=n.total_out=r.total=0,n.msg="",r.wrap&&(n.adler=1&r.wrap),r.mode=ji,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new fn(ss),r.distcode=r.distdyn=new fn(ls),r.sane=1,r.back=-1,yn):Xt})(t)):Xt}function cs(t,e){var n,r;return t?(r=new hs,t.state=r,r.window=null,(n=(function(a,i){var s,l;return a&&a.state?(l=a.state,i<0?(s=0,i=-i):(s=1+(i>>4),i<48&&(i&=15)),i&&(i<8||i>15)?Xt:(l.window!==null&&l.wbits!==i&&(l.window=null),l.wrap=s,l.wbits=i,pa(a))):Xt})(t,e))!==yn&&(t.state=null),n):Xt}var dr,pr,_a=!0;function fs(t){if(_a){var e;for(dr=new fn(512),pr=new fn(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Ke(Hi,t.lens,0,288,dr,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ke(Fi,t.lens,0,32,pr,0,t.work,{bits:5}),_a=!1}t.lencode=dr,t.lenbits=9,t.distcode=pr,t.distbits=5}function us(t,e){var n,r,a,i,s,l,h,o,c,u,p,f,_,g,d,v,w,m,y,x,S,k,E,B,b=0,R=new cn(4),C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return Xt;(n=t.state).mode===Nt&&(n.mode=cr),s=t.next_out,a=t.output,h=t.avail_out,i=t.next_in,r=t.input,l=t.avail_in,o=n.hold,c=n.bits,u=l,p=h,k=yn;t:for(;;)switch(n.mode){case ji:if(n.wrap===0){n.mode=cr;break}for(;c<16;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(2&n.wrap&&o===35615){n.check=0,R[0]=255&o,R[1]=o>>>8&255,n.check=st(n.check,R,2,0),o=0,c=0,n.mode=Wi;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&o)<<8)+(o>>8))%31){t.msg="incorrect header check",n.mode=tt;break}if((15&o)!==Zi){t.msg="unknown compression method",n.mode=tt;break}if(c-=4,S=8+(15&(o>>>=4)),n.wbits===0)n.wbits=S;else if(S>n.wbits){t.msg="invalid window size",n.mode=tt;break}n.dmax=1<<S,t.adler=n.check=1,n.mode=512&o?Qi:Nt,o=0,c=0;break;case Wi:for(;c<16;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(n.flags=o,(255&n.flags)!==Zi){t.msg="unknown compression method",n.mode=tt;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=tt;break}n.head&&(n.head.text=o>>8&1),512&n.flags&&(R[0]=255&o,R[1]=o>>>8&255,n.check=st(n.check,R,2,0)),o=0,c=0,n.mode=Yi;case Yi:for(;c<32;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.head&&(n.head.time=o),512&n.flags&&(R[0]=255&o,R[1]=o>>>8&255,R[2]=o>>>16&255,R[3]=o>>>24&255,n.check=st(n.check,R,4,0)),o=0,c=0,n.mode=Ki;case Ki:for(;c<16;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.head&&(n.head.xflags=255&o,n.head.os=o>>8),512&n.flags&&(R[0]=255&o,R[1]=o>>>8&255,n.check=st(n.check,R,2,0)),o=0,c=0,n.mode=Gi;case Gi:if(1024&n.flags){for(;c<16;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.length=o,n.head&&(n.head.extra_len=o),512&n.flags&&(R[0]=255&o,R[1]=o>>>8&255,n.check=st(n.check,R,2,0)),o=0,c=0}else n.head&&(n.head.extra=null);n.mode=qi;case qi:if(1024&n.flags&&((f=n.length)>l&&(f=l),f&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Pt(n.head.extra,r,i,f,S)),512&n.flags&&(n.check=st(n.check,r,f,i)),l-=f,i+=f,n.length-=f),n.length))break t;n.length=0,n.mode=Xi;case Xi:if(2048&n.flags){if(l===0)break t;f=0;do S=r[i+f++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S));while(S&&f<l);if(512&n.flags&&(n.check=st(n.check,r,f,i)),l-=f,i+=f,S)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=$i;case $i:if(4096&n.flags){if(l===0)break t;f=0;do S=r[i+f++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S));while(S&&f<l);if(512&n.flags&&(n.check=st(n.check,r,f,i)),l-=f,i+=f,S)break t}else n.head&&(n.head.comment=null);n.mode=Ji;case Ji:if(512&n.flags){for(;c<16;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(o!==(65535&n.check)){t.msg="header crc mismatch",n.mode=tt;break}o=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Nt;break;case Qi:for(;c<32;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}t.adler=n.check=da(o),o=0,c=0,n.mode=ta;case ta:if(n.havedict===0)return t.next_out=s,t.avail_out=h,t.next_in=i,t.avail_in=l,n.hold=o,n.bits=c,es;t.adler=n.check=1,n.mode=Nt;case Nt:if(e===Qo||e===mn)break t;case cr:if(n.last){o>>>=7&c,c-=7&c,n.mode=ur;break}for(;c<3;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}switch(n.last=1&o,c-=1,3&(o>>>=1)){case 0:n.mode=ea;break;case 1:if(fs(n),n.mode=bn,e===mn){o>>>=2,c-=2;break t}break;case 2:n.mode=ra;break;case 3:t.msg="invalid block type",n.mode=tt}o>>>=2,c-=2;break;case ea:for(o>>>=7&c,c-=7&c;c<32;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if((65535&o)!=(o>>>16^65535)){t.msg="invalid stored block lengths",n.mode=tt;break}if(n.length=65535&o,o=0,c=0,n.mode=fr,e===mn)break t;case fr:n.mode=na;case na:if(f=n.length){if(f>l&&(f=l),f>h&&(f=h),f===0)break t;Pt(a,r,i,f,s),l-=f,i+=f,h-=f,s+=f,n.length-=f;break}n.mode=Nt;break;case ra:for(;c<14;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(n.nlen=257+(31&o),o>>>=5,c-=5,n.ndist=1+(31&o),o>>>=5,c-=5,n.ncode=4+(15&o),o>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=tt;break}n.have=0,n.mode=ia;case ia:for(;n.have<n.ncode;){for(;c<3;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.lens[C[n.have++]]=7&o,o>>>=3,c-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},k=Ke(Jo,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,k){t.msg="invalid code lengths set",n.mode=tt;break}n.have=0,n.mode=aa;case aa:for(;n.have<n.nlen+n.ndist;){for(;v=(b=n.lencode[o&(1<<n.lenbits)-1])>>>16&255,w=65535&b,!((d=b>>>24)<=c);){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(w<16)o>>>=d,c-=d,n.lens[n.have++]=w;else{if(w===16){for(B=d+2;c<B;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(o>>>=d,c-=d,n.have===0){t.msg="invalid bit length repeat",n.mode=tt;break}S=n.lens[n.have-1],f=3+(3&o),o>>>=2,c-=2}else if(w===17){for(B=d+3;c<B;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}c-=d,S=0,f=3+(7&(o>>>=d)),o>>>=3,c-=3}else{for(B=d+7;c<B;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}c-=d,S=0,f=11+(127&(o>>>=d)),o>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=tt;break}for(;f--;)n.lens[n.have++]=S}}if(n.mode===tt)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=tt;break}if(n.lenbits=9,E={bits:n.lenbits},k=Ke(Hi,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,k){t.msg="invalid literal/lengths set",n.mode=tt;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},k=Ke(Fi,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,k){t.msg="invalid distances set",n.mode=tt;break}if(n.mode=bn,e===mn)break t;case bn:n.mode=kn;case kn:if(l>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=i,t.avail_in=l,n.hold=o,n.bits=c,Ko(t,p),s=t.next_out,a=t.output,h=t.avail_out,i=t.next_in,r=t.input,l=t.avail_in,o=n.hold,c=n.bits,n.mode===Nt&&(n.back=-1);break}for(n.back=0;v=(b=n.lencode[o&(1<<n.lenbits)-1])>>>16&255,w=65535&b,!((d=b>>>24)<=c);){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(v&&(240&v)==0){for(m=d,y=v,x=w;v=(b=n.lencode[x+((o&(1<<m+y)-1)>>m)])>>>16&255,w=65535&b,!(m+(d=b>>>24)<=c);){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}o>>>=m,c-=m,n.back+=m}if(o>>>=d,c-=d,n.back+=d,n.length=w,v===0){n.mode=ca;break}if(32&v){n.back=-1,n.mode=Nt;break}if(64&v){t.msg="invalid literal/length code",n.mode=tt;break}n.extra=15&v,n.mode=oa;case oa:if(n.extra){for(B=n.extra;c<B;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.length+=o&(1<<n.extra)-1,o>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=sa;case sa:for(;v=(b=n.distcode[o&(1<<n.distbits)-1])>>>16&255,w=65535&b,!((d=b>>>24)<=c);){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if((240&v)==0){for(m=d,y=v,x=w;v=(b=n.distcode[x+((o&(1<<m+y)-1)>>m)])>>>16&255,w=65535&b,!(m+(d=b>>>24)<=c);){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}o>>>=m,c-=m,n.back+=m}if(o>>>=d,c-=d,n.back+=d,64&v){t.msg="invalid distance code",n.mode=tt;break}n.offset=w,n.extra=15&v,n.mode=la;case la:if(n.extra){for(B=n.extra;c<B;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}n.offset+=o&(1<<n.extra)-1,o>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=tt;break}n.mode=ha;case ha:if(h===0)break t;if(f=p-h,n.offset>f){if((f=n.offset-f)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=tt;break}f>n.wnext?(f-=n.wnext,_=n.wsize-f):_=n.wnext-f,f>n.length&&(f=n.length),g=n.window}else g=a,_=s-n.offset,f=n.length;f>h&&(f=h),h-=f,n.length-=f;do a[s++]=g[_++];while(--f);n.length===0&&(n.mode=kn);break;case ca:if(h===0)break t;a[s++]=n.length,h--,n.mode=kn;break;case ur:if(n.wrap){for(;c<32;){if(l===0)break t;l--,o|=r[i++]<<c,c+=8}if(p-=h,t.total_out+=p,n.total+=p,p&&(t.adler=n.check=n.flags?st(n.check,a,p,s-p):nr(n.check,a,p,s-p)),p=h,(n.flags?o:da(o))!==n.check){t.msg="incorrect data check",n.mode=tt;break}o=0,c=0}n.mode=fa;case fa:if(n.wrap&&n.flags){for(;c<32;){if(l===0)break t;l--,o+=r[i++]<<c,c+=8}if(o!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=tt;break}o=0,c=0}n.mode=ua;case ua:k=ts;break t;case tt:k=ns;break t;case as:return rs;case os:default:return Xt}return t.next_out=s,t.avail_out=h,t.next_in=i,t.avail_in=l,n.hold=o,n.bits=c,(n.wsize||p!==t.avail_out&&n.mode<tt&&(n.mode<ur||e!==Vi))&&(function(L,P,H,Z){var j,F=L.state;F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new cn(F.wsize)),Z>=F.wsize?(Pt(F.window,P,H-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):((j=F.wsize-F.wnext)>Z&&(j=Z),Pt(F.window,P,H-Z,j,F.wnext),(Z-=j)?(Pt(F.window,P,H-Z,Z,0),F.wnext=Z,F.whave=F.wsize):(F.wnext+=j,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=j)))})(t,t.output,t.next_out,p-t.avail_out),u-=t.avail_in,p-=t.avail_out,t.total_in+=u,t.total_out+=p,n.total+=p,n.wrap&&p&&(t.adler=n.check=n.flags?st(n.check,a,p,t.next_out-p):nr(n.check,a,p,t.next_out-p)),t.data_type=n.bits+(n.last?64:0)+(n.mode===Nt?128:0)+(n.mode===bn||n.mode===fr?256:0),(u===0&&p===0||e===Vi)&&k===yn&&(k=is),k}var En,Re=1,Ge=7;function Tt(t){if(t<Re||t>Ge)throw new TypeError("Bad argument");this.mode=t,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function ds(t,e){for(var n=0;n<t.length;n++)this[e+n]=t[n]}Tt.prototype.init=function(t,e,n,r,a){var i;switch(this.windowBits=t,this.level=e,this.memLevel=n,this.strategy=r,this.mode!==3&&this.mode!==4||(this.windowBits+=16),this.mode===Ge&&(this.windowBits+=32),this.mode!==5&&this.mode!==6||(this.windowBits=-this.windowBits),this.strm=new wo,this.mode){case Re:case 3:case 5:i=(function(s,l,h,o,c,u){if(!s)return re;var p=1;if(l===Io&&(l=6),o<0?(p=0,o=-o):o>15&&(p=2,o-=16),c<1||c>Oo||h!==ir||o<8||o>15||l<0||l>9||u<0||u>Co)return Gt(s,re);o===8&&(o=9);var f=new jo;return s.state=f,f.strm=s,f.wrap=p,f.gzhead=null,f.w_bits=o,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=c+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+J-1)/J),f.window=new cn(2*f.w_size),f.head=new Et(f.hash_size),f.prev=new Et(f.w_size),f.lit_bufsize=1<<c+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new cn(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=l,f.strategy=u,f.method=h,Ci(s)})(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case Ge:i=cs(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}i===0?(this.write_in_progress=!1,this.init_done=!0):this._error(i)},Tt.prototype.params=function(){throw new Error("deflateParams Not supported")},Tt.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===0)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Tt.prototype.write=function(t,e,n,r,a,i,s){this._writeCheck(),this.write_in_progress=!0;var l=this;return ht(function(){l.write_in_progress=!1;var h=l._write(t,e,n,r,a,i,s);l.callback(h[0],h[1]),l.pending_close&&l.close()}),this},Tt.prototype.writeSync=function(t,e,n,r,a,i,s){return this._writeCheck(),this._write(t,e,n,r,a,i,s)},Tt.prototype._write=function(t,e,n,r,a,i,s){if(this.write_in_progress=!0,t!==0&&t!==1&&t!==2&&t!==3&&t!==4&&t!==5)throw new Error("Invalid flush value");e==null&&(e=new A(0),r=0,n=0),a._set?a.set=a._set:a.set=ds;var l,h=this.strm;switch(h.avail_in=r,h.input=e,h.next_in=n,h.avail_out=s,h.output=a,h.next_out=i,this.mode){case Re:case 3:case 5:l=Wo(h,t);break;case Ge:case 2:case 4:case 6:l=us(h,t);break;default:throw new Error("Unknown mode "+this.mode)}return l!==1&&l!==0&&this._error(l),this.write_in_progress=!1,[h.avail_in,h.avail_out]},Tt.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===Re||this.mode===3||this.mode===5?(function(t){var e;t&&t.state&&((e=t.state.status)!==or&&e!==sr&&e!==_n&&e!==gn&&e!==vn&&e!==ie&&e!==Ze?Gt(t,re):(t.state=null,e===ie&&Gt(t,To)))})(this.strm):(function(t){if(!t||!t.state)return Xt;var e=t.state;e.window&&(e.window=null),t.state=null})(this.strm),this.mode=0)},Tt.prototype.reset=function(){switch(this.mode){case Re:case 5:En=Ci(this.strm);break;case 2:case 6:En=pa(this.strm)}En!==0&&this._error(En)},Tt.prototype._error=function(t){this.onerror(li[t]+": "+this.strm.msg,t),this.write_in_progress=!1,this.pending_close&&this.close()};var ga=Object.freeze({NONE:0,DEFLATE:Re,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:Ge,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:Tt}),U={};Object.keys(ga).forEach(function(t){U[t]=ga[t]}),U.Z_MIN_WINDOWBITS=8,U.Z_MAX_WINDOWBITS=15,U.Z_DEFAULT_WINDOWBITS=15,U.Z_MIN_CHUNK=64,U.Z_MAX_CHUNK=1/0,U.Z_DEFAULT_CHUNK=16384,U.Z_MIN_MEMLEVEL=1,U.Z_MAX_MEMLEVEL=9,U.Z_DEFAULT_MEMLEVEL=8,U.Z_MIN_LEVEL=-1,U.Z_MAX_LEVEL=9,U.Z_DEFAULT_LEVEL=U.Z_DEFAULT_COMPRESSION;var Sn={Z_OK:U.Z_OK,Z_STREAM_END:U.Z_STREAM_END,Z_NEED_DICT:U.Z_NEED_DICT,Z_ERRNO:U.Z_ERRNO,Z_STREAM_ERROR:U.Z_STREAM_ERROR,Z_DATA_ERROR:U.Z_DATA_ERROR,Z_MEM_ERROR:U.Z_MEM_ERROR,Z_BUF_ERROR:U.Z_BUF_ERROR,Z_VERSION_ERROR:U.Z_VERSION_ERROR};function se(t,e,n){var r=[],a=0;function i(){for(var l;(l=t.read())!==null;)r.push(l),a+=l.length;t.once("readable",i)}function s(){var l=A.concat(r,a);r=[],n(null,l),t.close()}t.on("error",function(l){t.removeListener("end",s),t.removeListener("readable",i),n(l)}),t.on("end",s),t.end(e),i()}function le(t,e){if(typeof e=="string"&&(e=new A(e)),!Te(e))throw new TypeError("Not a string or buffer");var n=U.Z_FINISH;return t._processChunk(e,n)}function he(t){if(!(this instanceof he))return new he(t);et.call(this,t,U.DEFLATE)}function ce(t){if(!(this instanceof ce))return new ce(t);et.call(this,t,U.INFLATE)}function fe(t){if(!(this instanceof fe))return new fe(t);et.call(this,t,U.GZIP)}function ue(t){if(!(this instanceof ue))return new ue(t);et.call(this,t,U.GUNZIP)}function de(t){if(!(this instanceof de))return new de(t);et.call(this,t,U.DEFLATERAW)}function pe(t){if(!(this instanceof pe))return new pe(t);et.call(this,t,U.INFLATERAW)}function _e(t){if(!(this instanceof _e))return new _e(t);et.call(this,t,U.UNZIP)}function et(t,e){if(this._opts=t=t||{},this._chunkSize=t.chunkSize||U.Z_DEFAULT_CHUNK,kt.call(this,t),t.flush&&t.flush!==U.Z_NO_FLUSH&&t.flush!==U.Z_PARTIAL_FLUSH&&t.flush!==U.Z_SYNC_FLUSH&&t.flush!==U.Z_FULL_FLUSH&&t.flush!==U.Z_FINISH&&t.flush!==U.Z_BLOCK)throw new Error("Invalid flush flag: "+t.flush);if(this._flushFlag=t.flush||U.Z_NO_FLUSH,t.chunkSize&&(t.chunkSize<U.Z_MIN_CHUNK||t.chunkSize>U.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<U.Z_MIN_WINDOWBITS||t.windowBits>U.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<U.Z_MIN_LEVEL||t.level>U.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<U.Z_MIN_MEMLEVEL||t.memLevel>U.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=U.Z_FILTERED&&t.strategy!=U.Z_HUFFMAN_ONLY&&t.strategy!=U.Z_RLE&&t.strategy!=U.Z_FIXED&&t.strategy!=U.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!Te(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new U.Zlib(e);var n=this;this._hadError=!1,this._binding.onerror=function(i,s){n._binding=null,n._hadError=!0;var l=new Error(i);l.errno=s,l.code=U.codes[s],n.emit("error",l)};var r=U.Z_DEFAULT_COMPRESSION;typeof t.level=="number"&&(r=t.level);var a=U.Z_DEFAULT_STRATEGY;typeof t.strategy=="number"&&(a=t.strategy),this._binding.init(t.windowBits||U.Z_DEFAULT_WINDOWBITS,r,t.memLevel||U.Z_DEFAULT_MEMLEVEL,a,t.dictionary),this._buffer=new A(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=a,this.once("end",this.close)}Object.keys(Sn).forEach(function(t){Sn[Sn[t]]=t}),pt(et,kt),et.prototype.params=function(t,e,n){if(t<U.Z_MIN_LEVEL||t>U.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(e!=U.Z_FILTERED&&e!=U.Z_HUFFMAN_ONLY&&e!=U.Z_RLE&&e!=U.Z_FIXED&&e!=U.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+e);if(this._level!==t||this._strategy!==e){var r=this;this.flush(U.Z_SYNC_FLUSH,function(){r._binding.params(t,e),r._hadError||(r._level=t,r._strategy=e,n&&n())})}else ht(n)},et.prototype.reset=function(){return this._binding.reset()},et.prototype._flush=function(t){this._transform(new A(0),"",t)},et.prototype.flush=function(t,e){var n=this._writableState;if((typeof t=="function"||t===void 0&&!e)&&(e=t,t=U.Z_FULL_FLUSH),n.ended)e&&ht(e);else if(n.ending)e&&this.once("end",e);else if(n.needDrain){var r=this;this.once("drain",function(){r.flush(e)})}else this._flushFlag=t,this.write(new A(0),"",e)},et.prototype.close=function(t){if(t&&ht(t),!this._closed){this._closed=!0,this._binding.close();var e=this;ht(function(){e.emit("close")})}},et.prototype._transform=function(t,e,n){var r,a=this._writableState,i=(a.ending||a.ended)&&(!t||a.length===t.length);if(!t===null&&!Te(t))return n(new Error("invalid input"));i?r=U.Z_FINISH:(r=this._flushFlag,t.length>=a.length&&(this._flushFlag=this._opts.flush||U.Z_NO_FLUSH)),this._processChunk(t,r,n)},et.prototype._processChunk=function(t,e,n){var r=t&&t.length,a=this._chunkSize-this._offset,i=0,s=this,l=typeof n=="function";if(!l){var h,o=[],c=0;this.on("error",function(g){h=g});do var u=this._binding.writeSync(e,t,i,r,this._buffer,this._offset,a);while(!this._hadError&&_(u[0],u[1]));if(this._hadError)throw h;var p=A.concat(o,c);return this.close(),p}var f=this._binding.write(e,t,i,r,this._buffer,this._offset,a);function _(g,d){if(!s._hadError){var v=a-d;if((function(y,x){if(!y)throw new Error(x)})(v>=0,"have should not go down"),v>0){var w=s._buffer.slice(s._offset,s._offset+v);s._offset+=v,l?s.push(w):(o.push(w),c+=w.length)}if((d===0||s._offset>=s._chunkSize)&&(a=s._chunkSize,s._offset=0,s._buffer=new A(s._chunkSize)),d===0){if(i+=r-g,r=g,!l)return!0;var m=s._binding.write(e,t,i,r,s._buffer,s._offset,s._chunkSize);return m.callback=_,void(m.buffer=t)}if(!l)return!1;n()}}f.buffer=t,f.callback=_},pt(he,et),pt(ce,et),pt(fe,et),pt(ue,et),pt(de,et),pt(pe,et),pt(_e,et);var va={codes:Sn,createDeflate:function(t){return new he(t)},createInflate:function(t){return new ce(t)},createDeflateRaw:function(t){return new de(t)},createInflateRaw:function(t){return new pe(t)},createGzip:function(t){return new fe(t)},createGunzip:function(t){return new ue(t)},createUnzip:function(t){return new _e(t)},deflate:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new he(e),t,n)},deflateSync:function(t,e){return le(new he(e),t)},gzip:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new fe(e),t,n)},gzipSync:function(t,e){return le(new fe(e),t)},deflateRaw:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new de(e),t,n)},deflateRawSync:function(t,e){return le(new de(e),t)},unzip:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new _e(e),t,n)},unzipSync:function(t,e){return le(new _e(e),t)},inflate:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new ce(e),t,n)},inflateSync:function(t,e){return le(new ce(e),t)},gunzip:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new ue(e),t,n)},gunzipSync:function(t,e){return le(new ue(e),t)},inflateRaw:function(t,e,n){return typeof e=="function"&&(n=e,e={}),se(new pe(e),t,n)},inflateRawSync:function(t,e){return le(new pe(e),t)},Deflate:he,Inflate:ce,Gzip:fe,Gunzip:ue,DeflateRaw:de,InflateRaw:pe,Unzip:_e,Zlib:et};class ps{constructor(e,n,r){this.SDKAPPID=e,this.EXPIRETIME=r,this.PRIVATEKEY=n}genTestUserSig(e){return this._isNumber(this.SDKAPPID)?this._isString(this.PRIVATEKEY)?this._isString(e)?this._isNumber(this.EXPIRETIME)?(console.log("sdkAppID="+this.SDKAPPID+" key="+this.PRIVATEKEY+" userID="+e+" expire="+this.EXPIRETIME),this.genSigWithUserbuf(e,this.EXPIRETIME,null)):(console.error("expireTime must be a number"),""):(console.error("userID must be a string"),""):(console.error("privateKey must be a string"),""):(console.error("sdkAppID must be a number"),"")}newBuffer(e,n){return A.from?A.from(e,n):new A(e,n)}unescape(e){return e.replace(/_/g,"=").replace(/\-/g,"/").replace(/\*/g,"+")}escape(e){return e.replace(/\+/g,"*").replace(/\//g,"-").replace(/=/g,"_")}encode(e){return this.escape(this.newBuffer(e).toString("base64"))}decode(e){return this.newBuffer(this.unescape(e),"base64")}base64encode(e){return this.newBuffer(e).toString("base64")}base64decode(e){return this.newBuffer(e,"base64").toString()}_hmacsha256(e,n,r,a){let i="TLS.identifier:"+e+`
11
+ `;i+="TLS.sdkappid:"+this.SDKAPPID+`
12
+ `,i+="TLS.time:"+n+`
13
+ `,i+="TLS.expire:"+r+`
14
+ `,a!=null&&(i+="TLS.userbuf:"+a+`
15
+ `);let s=Mr.HmacSHA256(i,this.PRIVATEKEY);return Mr.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(e){return e!==null&&(typeof e=="number"&&!isNaN(e-0)||typeof e=="object"&&e.constructor===Number)}_isString(e){return typeof e=="string"}genSigWithUserbuf(e,n,r){let a=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":e,"TLS.sdkappid":this.SDKAPPID,"TLS.time":a,"TLS.expire":n},s="";if(r!=null){let c=this.base64encode(r);i["TLS.userbuf"]=c,s=this._hmacsha256(e,a,n,c)}else s=this._hmacsha256(e,a,n,null);i["TLS.sig"]=s;let l=JSON.stringify(i),h=va.deflateSync(this.newBuffer(l)).toString("base64"),o=this.escape(h);return console.log("ret="+o),o}validate(e){let n=this.decode(e),r=va.inflateSync(n);console.log("validate ret="+r)}}let xn=window.SDKAppID;console.log("🚀 ~GGG SDKAPPID:",xn);let _r=window.SDKSecretKey;console.log("🚀 ~GGG SECRETKEY:",_r);const _s=604800;function gs({userID:t,SDKAppID:e,SecretKey:n}){e&&(xn=e),n&&(_r=n);const a=new ps(xn,_r,_s).genTestUserSig(t);return{SDKAppID:xn,userSig:a}}const vs="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768359133902'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12117'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M17.516667%20500.983333c0%2055.033333%202.054167%2078.5875%2014.325%20132.345834%204.270833%2018.7%2014.745833%2048.591667%2021.870833%2066.466666%2017.0125%2042.6875%2048.295833%2096.245833%2077.591667%20129.0875%2029.6375%2033.2375%2040.495833%2045.695833%2075.304166%2073.045834%2048.570833%2038.158333%2096.041667%2062.558333%20154.916667%2081.779166%2020.004167%206.525%2052.5%2014.7125%2071.345833%2017%2022.9%202.779167%2040.520833%204.5%2056.5125%205.275h38.279167c16.5-0.783333%2034.504167-2.520833%2058.183333-5.120833%2015.904167-1.75%2033.991667-6.65%2049.720834-10.295833%2023.7125-5.491667%2065.575-21.241667%2086.541666-31.808334%206.816667-3.433333%2012.629167-6.158333%2018.9125-9.429166l19.304167-10.7c28.1-17%2044.783333-30.3125%2069.995833-50.016667l39.791667-38.55c28.733333-34.370833%2043.470833-48.891667%2067.520833-90.825%2011.525-20.0875%2019.495833-37.758333%2028.879167-59.4625%2051.383333-118.845833%2047.283333-280.908333-9.35-393.25-7.1375-14.15-13.129167-25.816667-20.55-39.458333-24.404167-44.895833-71.704167-100.0375-110.358333-131.329167-43.05-34.845833-62.083333-45.495833-111.354167-70.333333-60.920833-30.708333-143.316667-44.433333-212.279167-44.433334-104.808333%200-207.425%2038.2-290.058333%20100-38.145833%2028.533333-76.254167%2068.5875-104.320833%20107.366667C57.291667%20298.758333%2017.516667%20404.133333%2017.516667%20500.983333z'%20fill='%2314B400'%20p-id='12118'%3e%3c/path%3e%3cpath%20d='M401.0875%20150.3875c-90.966667%2016.291667-107.383333%20115.995833-88.566667%20212.3875%2019.2375%2098.554167%2089.308333%20242.670833%20150.279167%20319.683333%2023.741667%2029.991667%2030.2625%2037.158333%2055.091667%2061.583334l20.454166%2019.583333c40.208333%2037.041667%20152.145833%20115.054167%20217.9%2047.6%2010.195833-10.4625%2024.6-30.533333%2027.758334-50.491667%205.091667-32.220833-25.4625-49.9125-46.4375-69.7l-62.375-55.979166c-9.208333-9.379167-12.4875-4.5375-26.516667%200.304166-10.158333%203.5125-19.695833%206.958333-29.591667%2010.408334-41.625%2014.5-32.258333%2017.1125-54.270833-0.316667-61.595833-48.7875-107.7625-105.891667-126.308333-187.154167-2.345833-10.266667-11.1625-59.129167-8.441667-68.341666%202.15-7.279167%2058.345833-50.216667%2059.970833-56.291667%201.4125-5.2875-8.016667-98.666667-8.975-107.670833-2.379167-22.383333-3.391667-49.958333-16.391666-62.0875-14.179167-13.229167-39.808333-17.775-63.579167-13.516667z'%20fill='%23FEFDFC'%20p-id='12119'%3e%3c/path%3e%3c/svg%3e",wa="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768382101596'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8216'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M510.82885015%20513.55777368m358.46705228-358.46705229a506.948967%20506.948967%200%201%200-716.93410456%20716.93410457%20506.948967%20506.948967%200%201%200%20716.93410456-716.93410457Z'%20fill='%23ea331b'%20p-id='8217'%3e%3c/path%3e%3cpath%20d='M511.23865671%20491.7945444c-41.24543107%200-82.50977582%207.84936752-119.82737014%2025.5340869l-7.84306295%2066.7921271c-0.01260984%203.92153148-2.96321511%206.87213675-7.86197665%207.86197664l-112.94262426%2024.55055158c-14.72150427%202.94430142-30.4580674-4.9239805-33.39606355-19.65179004a10.824279%2010.824279%200%200%201-0.01260913-7.85567209l0.99614446-63.84152111c0.97723076-18.66825471%209.82274203-35.35682893%2024.55055087-46.163107%2075.62502924-50.09094233%20165.98417187-77.57949006%20256.34962119-79.55286528%2090.35283807-1.96076538%20179.72844609%2022.60239532%20256.33700994%2071.69719391%2014.72780884%2010.80627807%2023.56701625%2027.50115756%2024.55685614%2046.16941085l-0.98353533%2065.79598264c0%2015.72395329-11.78350812%2027.50746142-27.51376598%2027.51376598-2.93799615%200.97092549-5.88860143%200-7.84936751-0.00630456l-112.96153866-22.58978619c-3.92153077%200-6.86583219-2.94430142-7.85567209-7.85567208l-5.90121055-66.7921271c-37.31128975-15.71134416-77.56057636-22.57087179-117.8413858-21.60625015z%20m0%200'%20fill='%23ffffff'%20p-id='8218'%20data-spm-anchor-id='a313x.search_index.0.i3.5a6e3a81TURsDW'%20class='selected'%3e%3c/path%3e%3c/svg%3e",ws="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358629006'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6156'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20637.1c106.5%200%20193.7-87.2%20193.7-193.7V257.7C705.7%20151.2%20618.5%2064%20512%2064c-106.6%200-193.7%2087.2-193.7%20193.7v185.7c0%20106.5%2087.1%20193.7%20193.7%20193.7z'%20p-id='6157'%20fill='%232c2c2c'%3e%3c/path%3e%3cpath%20d='M834.9%20403c-22.3%200-40.4%2018.1-40.4%2040.4%200%20155.8-126.7%20282.5-282.5%20282.5S229.5%20599.2%20229.5%20443.4c0-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%20183.9%20137.3%20336.1%20314.8%20359.9v108.3c0%2026.6%2021.8%2048.4%2048.4%2048.4%2026.6%200%2048.4-21.8%2048.4-48.4V803.3c177.5-23.8%20314.8-176.1%20314.8-359.9%200.1-22.3-17.9-40.4-40.2-40.4z'%20p-id='6158'%20fill='%232c2c2c'%3e%3c/path%3e%3c/svg%3e",ms="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358648084'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6380'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M556.4%20631.7L318.3%20291.6v151.8c0%20106.6%2087.2%20193.7%20193.7%20193.7%2015.3%200%2030.1-2%2044.4-5.4z'%20p-id='6381'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M512%20725.9c-155.8%200-282.5-126.7-282.5-282.5%200-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%20183.9%20137.3%20336.1%20314.8%20359.9v108.3c0%2026.6%2021.8%2048.4%2048.4%2048.4%2026.6%200%2048.4-21.8%2048.4-48.4V803.3c34.1-4.6%2066.6-13.9%2097-27.3l-47.6-67.9c-30.4%2011.3-63.3%2017.8-97.7%2017.8zM760.9%20707.3c70.3-66.2%20114.4-160%20114.4-264%200-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%2076.6-30.8%20146.1-80.5%20197l-52.5-74.9c27.4-33.4%2044.2-75.8%2044.2-122.1V257.7C705.7%20151.2%20618.5%2064%20512%2064c-60.8%200-115.1%2028.5-150.7%2072.8l-35.7-51c-10.2-14.5-30.4-18.1-45-7.9-14.5%2010.2-18.1%2030.4-7.9%2045l494.7%20706.6c10.2%2014.5%2030.4%2018.1%2045%207.9%2014.5-10.2%2018.1-30.4%207.9-45l-59.4-85.1z'%20p-id='6382'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e",ys="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358681920'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7461'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M868.032%20287.808a64%2064%200%200%201%20101.056%2051.648l2.624%20302.592a64%2064%200%200%201-102.752%2051.456l-206.912-157.536a64%2064%200%200%201%201.728-103.104l204.256-145.056z'%20fill='%232c2c2c'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M144%20192h456.32a96%2096%200%200%201%2096%2096v417.376a96%2096%200%200%201-96%2096H144a96%2096%200%200%201-96-96V288a96%2096%200%200%201%2096-96z'%20fill='%232c2c2c'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e",bs="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358492097'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4839'%20id='mx_n_1768358492097'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M106.912%20152.096A32%2032%200%201%201%20149.12%20103.904l768%20672a32%2032%200%200%201-42.176%2048.192l-768-672z'%20fill='%23ffffff'%20p-id='4840'%3e%3c/path%3e%3cpath%20d='M732.672%20462.4l-37.056-52.16%20172.416-122.432a64%2064%200%200%201%20101.056%2051.648l2.624%20302.592a63.904%2063.904%200%200%201-20.16%2047.2l-43.84-46.656-2.624-302.592-172.416%20122.432z%20m-34.72-54.016l35.616%2053.184c-10.752%207.2-24.32%2012.16-37.216%2012.16a64%2064%200%200%201-64-64V288a32%2032%200%200%200-32-32h-205.952V192h205.952a96%2096%200%200%201%2096%2096v121.28c0.416-0.224%201.088-0.544%201.6-0.896zM632.32%20608h64v97.376a96%2096%200%200%201-96%2096H144a96%2096%200%200%201-96-96V288a96%2096%200%200%201%2096-96h96v64h-96a32%2032%200%200%200-32%2032v417.376a32%2032%200%200%200%2032%2032h456.32a32%2032%200%200%200%2032-32V608z'%20fill='%23ffffff'%20p-id='4841'%3e%3c/path%3e%3c/svg%3e",ks=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},Es={key:0,class:"callkit-wrapper"},Ss={class:"call-label"},xs=["id"],Rs={class:"bottom-controls"},As={key:0,class:"operation-btn"},Bs=["src"],Ls={class:"operation-btn"},zs=["src"],Ts=["src"],Is={class:"operation-btn"},Ms=["src"],Ds=["src"],ma=ks({__name:"CallKit",emits:["notify","remote-user-status-change"],setup(t,{expose:e,emit:n}){const r=N.ref(""),a=N.ref(null),i=N.ref(null),s=N.ref([]),l=N.ref([]),h=N.reactive({}),o=N.ref(!1),c=N.ref(!1),u=N.ref(""),p=N.ref(""),f=N.ref(null),_=nt.create(),g=n;function d(D,O){try{g("notify",{type:D,text:O})}catch(W){console.warn("emit notify failed",W)}}const v=N.reactive({audio:!0,video:!0}),w=N.ref(!1),m=N.ref("1440p");let y=null;async function x(){if(!a.value||!i.value){d("error","缺少 sdkAppId 或 sdkSecretKey");return}try{const{userSig:D}=gs({userID:r.value,SDKAppID:a.value,SecretKey:i.value});console.log("🚀 ~ 当前用户:",r.value),await _.enterRoom({sdkAppId:a.value,userId:r.value,userSig:D,roomId:8888}),K(),await F(),H(),d("info","进入房间成功")}catch(D){d("error","进入房间失败: "+D)}}async function S({userId:D,sdkAppId:O,sdkSecretKey:W}={}){r.value=D||`user_${Math.floor(Math.random()*900+100)}`,a.value=O||a.value,i.value=W||i.value,await x()}function k(){o.value=!0}function E(){o.value=!1,c.value=!1,f.value=null,u.value="",p.value=""}async function B(){try{await _.exitRoom(),console.log("🚀 ~ 退出房间成功"),await R(),await j(),it(),Z()}catch(D){d("error","退出房间失败: "+D)}}async function b(){console.log("🚀 ~ 打开麦克风");try{await _.startLocalAudio(),v.audio=!0}catch(D){v.audio=!1,d("error","启动麦克风失败: "+D)}}async function R(){console.log("🚀 ~ 关闭麦克风"),await _.stopLocalAudio();try{await _.stopLocalAudio(),v.audio=!1}catch(D){d("error","关闭麦克风失败: "+D)}}async function C(){console.log("🚀 ~ 打开摄像头");try{const D="local-video",O=await nt.getCameraList();await _.startLocalVideo({view:D,option:{profile:m.value}}),O[1]&&await _.updateLocalVideo({option:{cameraId:O[1].deviceId}}),v.video=!0}catch(D){v.video=!1,d("error","打开摄像头失败: "+D)}}async function L(D){if(!(!D||m.value===D))try{try{await _.stopLocalVideo()}catch{}await _.startLocalVideo({view:"local-video",option:{profile:D}}),m.value=D,v.video=!0,d("info",`已将视频质量调整为 ${D}`)}catch(O){v.video=!1,d("error","调整视频质量失败:"+O)}}async function P(){try{let D=null;typeof _.getLocalStats=="function"&&(D=await _.getLocalStats());let O=!1,W="";if(D){const Y=D.uplinkKbps??D.sendKbps??D.txKbps??null,V=D.uplinkPacketLostRate??D.packetLostRate??D.sendPacketLostRate??null;W=`uplink:${Y??"n/a"}kbps loss:${V??"n/a"}`,(Y!==null&&Y<300||V!==null&&V>.05)&&(O=!0)}else if(typeof _.getNetworkQuality=="function"){const Y=await _.getNetworkQuality(),V=Y.uplinkQuality??Y.upQuality??null;W=`uplinkQuality:${V??"n/a"}`,V!==null&&V>=4&&(O=!0)}else return;O&&!w.value?(w.value=!0,d("warn",`网络不稳定:${W},已切换到低清 360p`),await L("360p")):!O&&w.value&&(w.value=!1,d("info",`网络已恢复:${W},恢复到高清`),await L("1440p"))}catch(D){console.warn("checkNetworkQuality error",D)}}function H(){Z(),y=setInterval(()=>{P()},5e3)}function Z(){y&&(clearInterval(y),y=null)}async function j(){console.log("🚀 ~ 关闭摄像头");try{await _.stopLocalVideo(),v.video=!1}catch(D){d("error","关闭摄像头失败: "+D)}}async function F(){console.log("🚀 ~ 打开扬声器");try{await _.setCurrentSpeaker(nt.TYPE.SPEAKER)}catch(D){d("error","打开扬声器失败:"+D)}}function K(){_.on(nt.EVENT.ERROR,T),_.on(nt.EVENT.REMOTE_VIDEO_AVAILABLE,z),_.on(nt.EVENT.REMOTE_VIDEO_UNAVAILABLE,I),_.on(nt.EVENT.VIDEO_SIZE_CHANGED,M),_.on(nt.EVENT.REMOTE_AUDIO_AVAILABLE,at),_.on(nt.EVENT.REMOTE_USER_ENTER,wt),_.on(nt.EVENT.REMOTE_USER_EXIT,gt),_.on(nt.EVENT.CUSTOM_MESSAGE,Ut)}function it(){_.off(nt.EVENT.ERROR,T),_.off(nt.EVENT.REMOTE_VIDEO_AVAILABLE,z),_.off(nt.EVENT.REMOTE_VIDEO_UNAVAILABLE,I),_.off(nt.EVENT.VIDEO_SIZE_CHANGED,M),_.off(nt.EVENT.REMOTE_AUDIO_AVAILABLE,at),_.off(nt.EVENT.REMOTE_USER_ENTER,wt),_.off(nt.EVENT.REMOTE_USER_EXIT,gt),_.off(nt.EVENT.CUSTOM_MESSAGE,Ut)}function T(D){console.error("🚀 ~ 错误 ~ error:",D),d("error","TRTC 错误:"+(D&&D.message?D.message:JSON.stringify(D)))}function M(D){console.log("🚀 ~ 远端视频尺寸变化 ~ event:",D);const{userId:O,streamType:W,newHeight:Y,newWidth:V}=D,ut=`${O}_${W}`;Y>0&&V>0&&(h[ut]=V/Y)}async function z(D){console.log("🚀 ~ 远端用户发布了视频 ~ event:",D);const{userId:O,streamType:W}=D,Y=`${O}_${W}`;try{if(W===nt.TYPE.STREAM_TYPE_MAIN){s.value.push(Y),await N.nextTick(),await _.startRemoteVideo({userId:O,streamType:W,view:Y});try{await _.startRemoteAudio({userId:O})}catch{}await F()}else{s.value.push(Y),await N.nextTick(),_.startRemoteVideo({userId:O,streamType:W,view:Y});try{await _.startRemoteAudio({userId:O})}catch{}}setTimeout(()=>{try{const V=document.getElementById(Y);if(V){const ut=V.querySelector("video");ut&&ut.videoWidth>0&&ut.videoHeight>0&&(h[Y]=ut.videoWidth/ut.videoHeight)}}catch(V){console.warn("Failed to get video element:",V)}},1e3)}catch(V){console.log("🚀 ~ handleRemoteVideoAvailable ~ error:",V),d("error","远端视频订阅失败:"+V)}}async function I(D){console.log("🚀 ~ 远端用户停止发布视频 ~ event:",D);const{userId:O,streamType:W}=D,Y=`${O}_${W}`;try{await _.stopRemoteVideo({userId:O,streamType:W})}catch{}const V=s.value.indexOf(Y);V!==-1&&s.value.splice(V,1),delete h[Y]}async function at(D){console.log("🚀 ~ 异步订阅音频 ~ event:",D);const{userId:O}=D;try{await _.startRemoteAudio({userId:O})}catch(W){console.warn("startRemoteAudio fail",W)}}function wt(D){const{userId:O}=D;if(console.log("🚀 ~ 远端用户进入/退出",O),!l.value.includes(O)){l.value.push(O),d("info",`用户 ${O} 进入房间`);try{g("remote-user-status-change",{userId:O,action:"enter",userList:[...l.value]})}catch(W){console.warn("emit remote-user-status-change failed",W)}}}async function gt(D){const{userId:O}=D;console.log("🚀 ~ 远端用户退出房间",O);try{await _.stopRemoteAudio({userId:O})}catch{}try{await _.stopRemoteVideo({userId:O,streamType:nt.TYPE.STREAM_TYPE_MAIN})}catch{}try{await _.stopRemoteVideo({userId:O,streamType:nt.TYPE.STREAM_TYPE_SUB})}catch{}["main","screen","sub"].forEach(Y=>{const V=`${O}_${Y}`,ut=s.value.indexOf(V);ut!==-1&&s.value.splice(ut,1),delete h[V]});const W=l.value.indexOf(O);W!==-1&&l.value.splice(W,1),d("info",`用户 ${O} 离开房间`);try{g("remote-user-status-change",{userId:O,action:"exit",userList:[...l.value]})}catch(Y){console.warn("emit remote-user-status-change failed",Y)}try{const Y=l.value.length;c.value&&Y===0&&u.value===O&&(d("info","对方已离开,正在自动结束本地通话"),await Rt())}catch(Y){console.warn("auto hangup on remote exit failed",Y)}}async function St(D,O=1){console.log("🚀 ~ 发送自定义信令(广播) ~ payload, cmdId:",D,O);try{const Y=new TextEncoder().encode(JSON.stringify(D)).buffer;await _.sendCustomMessage({cmdId:O,data:Y})}catch(W){console.warn("发送自定义信令(广播)",W),d("error","发送信令失败:"+W)}}async function Ut(D){console.log("🚀 ~ 收到自定义消息",D);let O=null;if(D.data instanceof ArrayBuffer?(O=D.data,D.userId||D.from):D.message&&D.message.data?(O=D.message.data,D.userId||D.message.userId):(D.userId&&D.cmdId&&D.data||D.userId&&D.data instanceof ArrayBuffer)&&(O=D.data,D.userId),!!O)try{const Y=new TextDecoder().decode(new Uint8Array(O)),V=JSON.parse(Y);if(console.log("🚀 ~ 收到自定义消息内容",V),!V||!V.type)return;V.type==="incoming_call"&&V.to===r.value?(f.value={from:V.from,callId:V.callId},o.value=!0,p.value=V.from):V.type==="call_response"&&V.to===r.value?V.accept?(d("info",`用户 ${V.from} 接听了呼叫`),await b(),await C(),c.value=!0,p.value=V.from):(d("info",`用户 ${V.from} 拒绝了呼叫`),E()):V.type==="hangup_call"&&V.to===r.value&&(await Rt(),d("info",`用户 ${V.from} 已挂断通话`))}catch(W){console.warn("parse custom message fail",W),d("error","接收广播消息异常: "+error.message)}}async function qe(D){console.log("🚀 ~ 发起呼叫");const O=D&&String(D).trim();if(!O){d("error","缺少呼叫目标,请传入目标用户ID");return}if(!l.value.includes(O)){d("error","用户不在线或未加入房间");return}o.value=!0,u.value=O,p.value=O;const W=`call_${Date.now()}_${Math.floor(Math.random()*1e4)}`,Y={type:"incoming_call",from:r.value,to:O,callId:W};await St(Y,1),d("info",`已向 ${O} 发起呼叫,等待应答`)}async function Rt(){try{await R(),await j();const D=`call_${Date.now()}_${Math.floor(Math.random()*1e4)}`,O={type:"hangup_call",from:r.value,to:u.value,callId:D};await St(O,3),E(),d("info","已挂断")}catch(D){console.warn("hangup fail",D),d("error","挂断失败:"+D)}}async function mt(){if(console.log("🚀 ~ 接听来电"),!f.value)return;const D={type:"call_response",from:r.value,to:f.value.from,callId:f.value.callId,accept:!0};await St(D,2),await b(),await C(),c.value=!0,u.value=f.value.from,p.value=f.value.from,f.value=null}async function vt(){if(console.log("🚀 ~ 拒绝来电"),f.value){const D={type:"call_response",from:r.value,to:f.value.from,callId:f.value.callId,accept:!1};await St(D,2),f.value=null,E();return}else Rt()}function Ae(){v.audio?R():b()}function ge(){v.video?j():C()}return e({handleCall:qe,init:S,show:k,hide:E,hangup:Rt}),N.onUnmounted(()=>{B()}),(D,O)=>(N.openBlock(),N.createBlock(N.Transition,{name:"callkit"},{default:N.withCtx(()=>[o.value?(N.openBlock(),N.createElementBlock("div",Es,[N.createElementVNode("div",Ss,N.toDisplayString(p.value),1),O[3]||(O[3]=N.createElementVNode("div",{class:"local-video",id:"local-video"},null,-1)),N.createElementVNode("div",{class:N.normalizeClass(["player-container",{single:s.value.length===1}])},[(N.openBlock(!0),N.createElementBlock(N.Fragment,null,N.renderList(s.value,W=>(N.openBlock(),N.createElementBlock("div",{key:W,class:"remote",id:W,style:N.normalizeStyle({aspectRatio:h[W]||"16/9"})},null,12,xs))),128))],2),N.createElementVNode("div",Rs,[c.value?(N.openBlock(),N.createElementBlock(N.Fragment,{key:1},[N.createElementVNode("div",{class:N.normalizeClass(["equipment-btn operation-btn",v.audio?"equipment-btn--open":"equipment-btn--close"])},[N.createElementVNode("img",{src:v.audio?N.unref(ws):N.unref(ms),onClick:Ae},null,8,Ts),N.createElementVNode("div",null,N.toDisplayString(v.audio?"麦克风已开":"麦克风已关"),1)],2),N.createElementVNode("div",Is,[N.createElementVNode("img",{src:N.unref(wa),onClick:Rt},null,8,Ms),O[2]||(O[2]=N.createElementVNode("div",null,"挂断",-1))]),N.createElementVNode("div",{class:N.normalizeClass(["equipment-btn operation-btn",v.video?"equipment-btn--open":"equipment-btn--close"])},[N.createElementVNode("img",{src:v.video?N.unref(ys):N.unref(bs),onClick:ge},null,8,Ds),N.createElementVNode("div",null,N.toDisplayString(v.video?"摄像头已开":"摄像头已关"),1)],2)],64)):(N.openBlock(),N.createElementBlock(N.Fragment,{key:0},[f.value?(N.openBlock(),N.createElementBlock("div",As,[N.createElementVNode("img",{src:N.unref(vs),onClick:mt},null,8,Bs),O[0]||(O[0]=N.createElementVNode("div",null,"接听",-1))])):N.createCommentVNode("",!0),N.createElementVNode("div",Ls,[N.createElementVNode("img",{src:N.unref(wa),onClick:vt},null,8,zs),O[1]||(O[1]=N.createElementVNode("div",null,"挂断",-1))])],64))])])):N.createCommentVNode("",!0)]),_:1}))}},[["__scopeId","data-v-7a5bd531"]]);It.CallKit=ma,It.default=ma,Object.defineProperties(It,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
@@ -0,0 +1 @@
1
+ export {}
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "bl-trtc-callkit",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "description": "A Vue 3 component for TRTC video call",
7
+ "main": "dist/bl-trtc-callkit.umd.js",
8
+ "module": "dist/bl-trtc-callkit.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/bl-trtc-callkit.js",
13
+ "require": "./dist/bl-trtc-callkit.umd.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "vue-tsc -b && vite build",
23
+ "preview": "vite preview"
24
+ },
25
+ "dependencies": {
26
+ "trtc-sdk-v5": "^5.14.1",
27
+ "vue": "^3.5.24"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^24.10.1",
31
+ "@vitejs/plugin-vue": "^6.0.1",
32
+ "@vue/tsconfig": "^0.8.1",
33
+ "typescript": "~5.9.3",
34
+ "vconsole": "^3.15.1",
35
+ "vite": "^7.2.4",
36
+ "vue-tsc": "^3.1.4"
37
+ },
38
+ "peerDependencies": {
39
+ "vue": "^3.0.0"
40
+ },
41
+ "engines": {
42
+ "node": ">=16.0.0"
43
+ }
44
+ }