!function(e,t){for(varrint)e[r]=t[r]}(exports,function(e){vart={};functionr(n){if(t[n])returnt[n].exports;vari=t[n]={i:n,l:!1,exports:{}};returne[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}returnr.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varn=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)r.d(n,i,function(t){returne[t]}.bind(null,i));returnn},r.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnr.d(t,"a",t),t},r.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}([function(e,t,r){varn;e.exports=(n=n||function(e,t){varn;if("undefined"!=typeofwindow&&window.crypto&&(n=window.crypto),"undefined"!=typeofself&&self.crypto&&(n=self.crypto),"undefined"!=typeofglobalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeofwindow&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeofglobal&&global.crypto&&(n=global.crypto),!n)try{n=r(2)}catch(e){}vari=function(){if(n){if("function"==typeofn.getRandomValues)try{returnn.getRandomValues(newUint32Array(1))[0]}catch(e){}if("function"==typeofn.randomBytes)try{returnn.randomBytes(4).readInt32LE()}catch(e){}}thrownewError("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){functione(){}returnfunction(t){varr;returne.prototype=t,r=newe,e.prototype=null,r}}(),a={},s=a.lib={},u=s.Base={extend:function(e){vart=o(this);returne&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){vare=this.extend();returne.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(vartine)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){returnthis.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){vart=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(varo=0;o<i;o++){vara=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}elsefor(vars=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];returnthis.sigBytes+=i,this},clamp:function(){vart=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){vare=u.clone.call(this);returne.words=this.words.slice(0),e},random:function(e){for(vart=[],r=0;r<e;r+=4)t.push(i());returnnewc.init(t,e)}}),f=a.enc={},l=f.Hex={stringify:function(e){for(vart=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){varo=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}returnn.join("")},parse:function(e){for(vart=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;returnnewc.init(r,t/2)}},h=f.Latin1={stringify:function(e){for(vart=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){varo=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}returnn.join("")},parse:function(e){for(vart=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;returnnewc.init(r,t)}},p=f.Utf8={stringify:function(e){try{returndecodeURIComponent(escape(h.stringify(e)))}catch(e){thrownewError("Malformed UTF-8 data")}},parse:function(e){returnh.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=newc.init,this._nDataBytes=0},_append:function(e){"string"==typeofe&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){varr,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,f=e.min(4*u,o);if(u){for(varl=0;l<u;l+=a)this._doProcessBlock(i,l);r=i.splice(0,u),n.sigBytes-=f}returnnewc.init(r,f)},clone:function(){vare=u.clone.call(this);returne._data=this._data.clone(),e},_minBufferSize:0}),y=(s.Hasher=d.extend({cfg:u.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){returnthis._append(e),this._process(),this},finalize:function(e){returne&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){returnfunction(t,r){returnnewe.init(r).finalize(t)}},_createHmacHelper:function(e){returnfunction(t,r){returnnewy.HMAC.init(e,r).finalize(t)}}}),a.algo={});returna}(Math),n)},function(e,t,r){varn,i,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w;e.exports=(n=r(0),r(4),void(n.lib.Cipher||(i=n,o=i.lib,a=o.Base,s=o.WordArray,u=o.BufferedBlockAlgorithm,c=i.enc,c.Utf8,f=c.Base64,l=i.algo.EvpKDF,h=o.Cipher=u.extend({cfg:a.extend(),createEncryptor:function(e,t){returnthis.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){returnthis.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(e){returnthis._append(e),this._process()},finalize:function(e){returne&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){functione(e){return"string"==typeofe?w:m}returnfunction(t){return{encrypt:function(r,n,i){returne(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){returne(n).decrypt(t,r,n,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){returnthis._process(!0)},blockSize:1}),p=i.mode={},d=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){returnthis.Encryptor.create(e,t)},createDecryptor:function(e,t){returnthis.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),y=p.CBC=function(){vare=d.extend();functiont(e,t,r){varn,i=this._iv;i?(n=i,this._iv=void0):n=this._prevBlock;for(varo=0;o<r;o++)e[t+o]^=n[o]}returne.Encryptor=e.extend({processBlock:function(e,r){varn=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){varn=this._cipher,i=n.blockSize,o=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=o}}),e}(),g=(i.pad={}).Pkcs7={pad:function(e,t){for(varr=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(i);varu=s.create(o,n);e.concat(u)},unpad:function(e){vart=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:y,padding:g}),reset:function(){vare;h.reset.call(this);vart=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){vare,t=this.cfg.padding;returnthis._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),_=(i.format={}).OpenSSL={stringify:function(e){vart=e.ciphertext,r=e.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(t):t).toString(f)},parse:function(e){vart,r=f.parse(e),n=r.words;return1398893684==n[0]&&1701076831==n[1]&&(t=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:t})}},m=o.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);vari=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;returnv.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){returnn=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeofe?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=s.random(8));vari=l.create({keySize:t+r}).compute(e,n),o=s.create(i.words.slice(t),4*r);returni.sigBytes=4*t,v.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){vari=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;varo=m.encrypt.call(this,e,t,i.key,n);returno.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);vari=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);returnn.iv=i.iv,m.decrypt.call(this,e,t,i.key,n)}}))))},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});varn={FormData:!0,UniCloudError:!0};Object.defineProperty(t,"FormData",{enumerable:!0,get:function(){returni.default}}),Object.defineProperty(t,"UniCloudError",{enumerable:!0,get:function(){returno.default}});vari=u(r(26)),o=u(r(27)),a=r(28);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||eint&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){returna[e]}}))}));vars=r(7);functionu(e){returne&&e.__esModule?e:{default:e}}Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||eint&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){returns[e]}}))}))},function(e,t,r){varn,i,o,a,s,u,c,f;e.exports=(f=r(0),r(11),r(12),i=(n=f).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(varr,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.length<u;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(varf=1;f<c;f++)r=i.finalize(r),i.reset();o.concat(r)}returno.sigBytes=4*u,o}}),n.EvpKDF=function(e,t,r){returnc.create(r).compute(e,t)},f.EvpKDF)},function(e,t,r){varn,i,o;e.exports=(o=r(0),i=(n=o).lib.WordArray,n.enc.Base64={stringify:function(e){vart=e.words,r=e.sigBytes,n=this._map;e.clamp();for(vari=[],o=0;o<r;o+=3)for(vara=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));varu=n.charAt(64);if(u)for(;i.length%4;)i.push(u);returni.join("")},parse:function(e){vart=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(varo=0;o<r.length;o++)n[r.charCodeAt(o)]=o}vara=r.charAt(64);if(a){vars=e.indexOf(a);-1!==s&&(t=s)}returnfunction(e,t,r){for(varn=[],o=0,a=0;a<t;a++)if(a%4){vars=r[e.charCodeAt(a-1)]<<a%4*2,u=r[e.charCodeAt(a)]>>>6-a%4*2,c=s|u;n[o>>>2]|=c<<24-o%4*8,o++}returni.create(n,o)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},function(e,t,r){varn;e.exports=(n=r(0),function(e){vart=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[];!function(){for(vart=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();varu=a.MD5=o.extend({_doReset:function(){this._hash=newi.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(varr=0;r<16;r++){varn=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}varo=this._hash.words,a=e[t+0],u=e[t+1],p=e[t+2],d=e[t+3],y=e[t+4],g=e[t+5],v=e[t+6],_=e[t+7],m=e[t+8],b=e[t+9],w=e[t+10],S=e[t+11],E=e[t+12],A=e[t+13],I=e[t+14],N=e[t+15],C=o[0],T=o[1],R=o[2],x=o[3];C=c(C,T,R,x,a,7,s[0]),x=c(x,C,T,R,u,12,s[1]),R=c(R,x,C,T,p,17,s[2]),T=c(T,R,x,C,d,22,s[3]),C=c(C,T,R,x,y,7,s[4]),x=c(x,C,T,R,g,12,s[5]),R=c(R,x,C,T,v,17,s[6]),T=c(T,R,x,C,_,22,s[7]),C=c(C,T,R,x,m,7,s[8]),x=c(x,C,T,R,b,12,s[9]),R=c(R,x,C,T,w,17,s[10]),T=c(T,R,x,C,S,22,s[11]),C=c(C,T,R,x,E,7,s[12]),x=c(x,C,T,R,A,12,s[13]),R=c(R,x,C,T,I,17,s[14]),C=f(C,T=c(T,R,x,C,N,22,s[15]),R,x,u,5,s[16]),x=f(x,C,T,R,v,9,s[17]),R=f(R,x,C,T,S,14,s[18]),T=f(T,R,x,C,a,20,s[19]),C=f(C,T,R,x,g,5,s[20]),x=f(x,C,T,R,w,9,s[21]),R=f(R,x,C,T,N,14,s[22]),T=f(T,R,x,C,y,20,s[23]),C=f(C,T,R,x,b,5,s[24]),x=f(x,C,T,R,I,9,s[25]),R=f(R,x,C,T,d,14,s[26]),T=f(T,R,x,C,m,20,s[27]),C=f(C,T,R,x,A,5,s[28]),x=f(x,C,T,R,p,9,s[29]),R=f(R,x,C,T,_,14,s[30]),C=l(C,T=f(T,R,x,C,E,20,s[31]),R,x,g,4,s[32]),x=l(x,C,T,R,m,11,s[33]),R=l(R,x,C,T,S,16,s[34]),T=l(T,R,x,C,I,23,s[35]),C=l(C,T,R,x,u,4,s[36]),x=l(x,C,T,R,y,11,s[37]),R=l(R,x,C,T,_,16,s[38]),T=l(T,R,x,C,w,23,s[39]),C=l(C,T,R,x,A,4,s[40]),x=l(x,C,T,R,a,11,s[41]),R=l(R,x,C,T,d,16,s[42]),T=l(T,R,x,C,v,23,s[43]),C=l(C,T,R,x,b,4,s[44]),x=l(x,C,T,R,E,11,s[45]),R=l(R,x,C,T,N,16,s[46]),C=h(C,T=l(T,R,x,C,p,23,s[47]),R,x,a,6,s[48]),x=h(x,C,T,R,_,10,s[49]),R=h(R,x,C,T,I,15,s[50]),T=h(T,R,x,C,g,21,s[51]),C=h(C,T,R,x,E,6,s[52]),x=h(x,C,T,R,d,10,s[53]),R=h(R,x,C,T,w,15,s[54]),T=h(T,R,x,C,u,21,s[55]),C=h(C,T,R,x,m,6,s[56]),x=h(x,C,T,R,N,10,s[57]),R=h(R,x,C,T,v,15,s[58]),T=h(T,R,x,C,A,21,s[59]),C=h(C,T,R,x,y,6,s[60]),x=h(x,C,T,R,S,10,s[61]),R=h(R,x,C,T,p,15,s[62]),T=h(T,R,x,C,b,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+T|0,o[2]=o[2]+R|0,o[3]=o[3]+x|0},_doFinalize:function(){vart=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;varo=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(vars=this._hash,u=s.words,c=0;c<4;c++){varf=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}returns},clone:function(){vare=o.clone.call(this);returne._hash=this._hash.clone(),e}});functionc(e,t,r,n,i,o,a){vars=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}functionf(e,t,r,n,i,o,a){vars=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}functionl(e,t,r,n,i,o,a){vars=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}functionh(e,t,r,n,i,o,a){vars=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accMul=function(e,t){if(isNaN(e)||isNaN(t))returnNaN;const{value:r,power:n}=y(e),{value:i,power:o}=y(t);returnr*i/Math.pow(10,n+o)},t.camel2snake=l,t.camel2snakeJson=function(e){returnh(e,"camel2snake")},t.deepClone=function(e){returnJSON.parse(JSON.stringify(e))},t.deleteObjectKey=functione(t,r){constn=t.shift();if(!n)return;e(t,r[n]),r[n]&&(Object.keys(r[n]).length<=0||"string"==typeofr[n])&&deleter[n]},t.getDateStr=p,t.getExtension=function(e){returns[e]},t.getFullTimeStr=function(e){returnp(e=e||newDate)+""+d(e)},t.getOffsetDate=function(e){returnnewDate(Date.now()+6e4*((newDate).getTimezoneOffset()+60*(e||0)))},t.getTimeStr=d,t.hasOwn=o,t.isFn=function(e){return"function"==typeofe},t.isPlainObject=a,t.log=function(){0},t.mime2ext=void0,t.snake2camel=f,t.snake2camelJson=function(e){returnh(e,"snake2camel")};constn=Object.prototype.toString,i=Object.prototype.hasOwnProperty;functiono(e,t){returni.call(e,t)}functiona(e){return"[object Object]"===n.call(e)}consts={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/svg+xml":"svg","image/bmp":"bmp","image/webp":"webp"};t.mime2ext=s;constu=/_(\w)/g,c=/[A-Z]/g;functionf(e){returne.replace(u,(e,t)=>t?t.toUpperCase():"")}functionl(e){returne.replace(c,e=>"_"+e.toLowerCase())}functionh(e,t){letr,n;switch(t){case"snake2camel":n=f,r=u;break;case"camel2snake":n=l,r=c}for(constiine)if(o(e,i)&&r.test(i)){constr=n(i);e[r]=e[i],deletee[i],a(e[r])?e[r]=h(e[r],t):Array.isArray(e[r])&&(e[r]=e[r].map(e=>h(e,t)))}returne}functionp(e,t="-"){e=e||newDate;constr=[];returnr.push(e.getFullYear()),r.push(("00"+(e.getMonth()+1)).substr(-2)),r.push(("00"+e.getDate()).substr(-2)),r.join(t)}functiond(e,t=":"){e=e||newDate;constr=[];returnr.push(("00"+e.getHours()).substr(-2)),r.push(("00"+e.getMinutes()).substr(-2)),r.push(("00"+e.getSeconds()).substr(-2)),r.join(t)}functiony(e){constt=e.toString().split("."),r=t[1]?t[1].length:0;return{value:Number(t.join("")),power:r}}},function(e,t,r){varn,i,o,a,s,u;e.exports=(u=r(0),i=(n=u).lib,o=i.Base,a=i.WordArray,(s=n.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(vare=this.words,t=e.length,r=[],n=0;n<t;n++){vari=e[n];r.push(i.high),r.push(i.low)}returna.create(r,this.sigBytes)},clone:function(){for(vare=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();returne}}),u)},function(e,t){e.exports=require("util")},function(e,t){e.exports=require("fs")},function(e,t,r){varn,i,o,a,s,u,c,f;e.exports=(f=r(0),i=(n=f).lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=newo.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(varr=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=0;c<80;c++){if(c<16)u[c]=0|e[t+c];else{varf=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=f<<1|f>>>31}varl=(n<<5|n>>>27)+s+u[c];l+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){vare=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;returnt[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){vare=a.clone.call(this);returne._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),f.SHA1)},function(e,t,r){varn,i,o,a;e.exports=(n=r(0),o=(i=n).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=newe.init,"string"==typeoft&&(t=a.parse(t));varr=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(vari=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,u=o.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){vare=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){returnthis._hasher.update(e),this},finalize:function(e){vart=this._hasher,r=t.finalize(e);returnt.reset(),t.finalize(this._oKey.clone().concat(r))}})))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(76);t.bytesFromIP=function(e){switch(n.isIP(e)){case4:returnBuffer.from(e.split(".").map(e=>parseInt(e,10)));case6:constt=e.split(":"),r=Buffer.alloc(16);letn=0;""===t[t.length-1]&&(t[t.length-1]="0");for(lete=0;e<t.length;e++)""!==t[e]?(r.writeUInt16BE(parseInt(t[e],16),n),n+=2):e+1<t.length&&""!==t[e+1]&&(n=16-2*(t.length-e-1));returnr;default:returnnull}},t.bytesToIP=function(e){switch(e.length){case4:return[e[0],e[1],e[2],e[3]].join(".");case16:constt=[];letr=-1,n=0,i=-1,o=0;for(leta=0;a<e.length;a+=2){consts=e[a]<<8|e[a+1];0===s?(n++,-1===r&&(r=t.length),n>o&&(o=n,i=r)):(r=-1,n=0),t.push(s.toString(16))}if(o>0){lete="";constr=t.slice(i+o);t.length=i,0===t.length&&(e+=":"),0===r.length&&(e+=":"),t.push(e,...r)}returnt.join(":");default:return""}};consti=Object.create(null),o=/^[0-9.]+$/;functiona(e,t){i[e]=t,i[t]=e}t.getOID=function(e){returno.test(e)&&""!==i[e]?e:null==i[e]?"":i[e]},t.getOIDName=function(e){returno.test(e)||""===i[e]?null==i[e]?e:i[e]:e},a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRsaEncryption"),a("1.2.840.113549.1.1.5","sha1WithRsaEncryption"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRsaEncryption"),a("1.2.840.113549.1.1.12","sha384WithRsaEncryption"),a("1.2.840.113549.1.1.13","sha512WithRsaEncryption"),a("1.2.840.10045.2.1","ecEncryption"),a("1.2.840.10045.4.1","ecdsaWithSha1"),a("1.2.840.10045.4.3.2","ecdsaWithSha256"),a("1.2.840.10045.4.3.3","ecdsaWithSha384"),a("1.2.840.10045.4.3.4","ecdsaWithSha512"),a("1.2.840.10040.4.3","dsaWithSha1"),a("2.16.840.1.101.3.4.3.2","dsaWithSha256"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.3.101.110","X25519"),a("1.3.101.111","X448"),a("1.3.101.112","Ed25519"),a("1.3.101.113","Ed448"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.2.7","hmacWithSha1"),a("1.2.840.113549.2.9","hmacWithSha256"),a("1.2.840.113549.2.10","hmacWithSha384"),a("1.2.840.113549.2.11","hmacWithSha512"),a("1.2.840.113549.3.7","3desCBC"),a("2.16.840.1.101.3.4.1.2","aesCBC128"),a("2.16.840.1.101.3.4.1.42","aesCBC256"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.15","businessCategory"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.2","keyAttributes"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionST"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionC"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping"),a("1.3.6.1.5.5.7.48.1","authorityInfoAccessOcsp"),a("1.3.6.1.5.5.7.48.2","authorityInfoAccessIssuers")},function(e,t,r){"use strict";constn=e=>!("object"!=typeofe||null===e||einstanceofRegExp||einstanceofError||einstanceofDate);e.exports=functione(t,r,i,o){if(i=Object.assign({deep:!1,target:{}},i),(o=o||newWeakMap).has(t))returno.get(t);o.set(t,i.target);consta=i.target;deletei.target;for(constsofObject.keys(t)){constu=t[s],c=r(s,u,t);letf=c[1];i.deep&&n(f)&&(f=Array.isArray(f)?f.map(t=>n(t)?e(t,r,i,o):t):e(f,r,i,o)),a[c[0]]=f}returna}},function(e,t,r){"use strict";varn=r(14),i=r(42);e.exports=function(e,t){returnt=Object.assign({deep:!0},t),n(e,(function(e,t){return[i(e),t]}),t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(2),i=r(45),o=r(46),a=r(15),s=r(47),u=r(72),c={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};functionf(e){return{iv:s.enc.Hex.parse(u.padEnd("",32,"0")),key:s.enc.Base64.parse(e)}}t.ALIPAY_ALGORITHM_MAPPING=c,t.aesDecrypt=function(e,t){const{iv:r,key:n}=f(t),i=s.AES.decrypt(e,n,{iv:r});returnJSON.parse(i.toString(s.enc.Utf8))},t.sign=function(e,t={},r){letl=Object.assign({method:e,appId:r.appId,charset:r.charset,version:r.version,signType:r.signType,timestamp:i().format("YYYY-MM-DD HH:mm:ss")},u.omit(t,["bizContent","needEncrypt"]));r.appCertSn&&r.alipayRootCertSn&&(l=Object.assign({appCertSn:r.appCertSn,alipayRootCertSn:r.alipayRootCertSn},l)),r.wsServiceUrl&&(l.wsServiceUrl=r.wsServiceUrl);consth=t.bizContent;if(h)if(t.needEncrypt){if(!r.encryptKey)thrownewError("请设置encryptKey参数");l.encryptType="AES",l.bizContent=function(e,t){const{iv:r,key:n}=f(t);returns.AES.encrypt(JSON.stringify(e),n,{iv:r}).toString()}(a(h),r.encryptKey)}elsel.bizContent=JSON.stringify(a(h));constp=a(l),d=Object.keys(p).sort().map(e=>{lett=p[e];return"[object String]"!==Array.prototype.toString.call(t)&&(t=JSON.stringify(t)),`${e}=${o.encode(t,r.charset)}`}).join("&"),y=n.createSign(c[r.signType]).update(d,"utf8").sign(r.privateKey,"base64");returnObject.assign(p,{sign:y})}},function(e,t,r){varn;e.exports=(n=r(0),function(e){vart=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[],u=[];!function(){functiont(t){for(varr=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}functionr(e){return4294967296*(e-(0|e))|0}for(varn=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();varc=[],f=a.SHA256=o.extend({_doReset:function(){this._hash=newi.init(s.slice(0))},_doProcessBlock:function(e,t){for(varr=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{vard=c[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=c[p-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=y+c[p-7]+v+c[p-16]}var_=n&i^n&o^i&o,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+u[p]+c[p];h=l,l=f,f=s,s=a+b|0,a=o,o=i,i=n,n=b+(m+_)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+f|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){vart=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;returnr[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){vare=o.clone.call(this);returne._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(f),t.HmacSHA256=o._createHmacHelper(f)}(Math),n.SHA256)},function(e,t,r){varn;e.exports=(n=r(0),r(8),function(){vare=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;functions(){returni.create.apply(i,arguments)}varu=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(vare=0;e<80;e++)c[e]=s()}();varf=a.SHA512=t.extend({_doReset:function(){this._hash=newo.init([newi.init(1779033703,4089235720),newi.init(3144134277,2227873595),newi.init(1013904242,4271175723),newi.init(2773480762,1595750129),newi.init(1359893119,2917565137),newi.init(2600822924,725511199),newi.init(528734635,4215389547),newi.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(varr=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=n.high,d=n.low,y=i.high,g=i.low,v=o.high,_=o.low,m=a.high,b=a.low,w=s.high,S=s.low,E=f.high,A=f.low,I=l.high,N=l.low,C=h.high,T=h.low,R=p,x=d,P=y,O=g,B=v,k=_,D=m,U=b,M=w,j=S,L=E,F=A,K=I,z=N,V=C,$=T,q=0;q<80;q++){varH,W,G=c[q];if(q<16)W=G.high=0|e[t+2*q],H=G.low=0|e[t+2*q+1];else{varJ=c[q-15],Y=J.high,Z=J.low,Q=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,X=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),ee=c[q-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[q-7],ae=oe.high,se=oe.low,ue=c[q-16],ce=ue.high,fe=ue.low;W=(W=(W=Q+ae+((H=X+se)>>>0<X>>>0?1:0))+ne+((H+=ie)>>>0<ie>>>0?1:0))+ce+((H+=fe)>>>0<fe>>>0?1:0),G.high=W,G.low=H}varle,he=M&L^~M&K,pe=j&F^~j&z,de=R&P^R&B^P&B,ye=x&O^x&k^O&k,ge=(R>>>28|x<<4)^(R<<30|x>>>2)^(R<<25|x>>>7),ve=(x>>>28|R<<4)^(x<<30|R>>>2)^(x<<25|R>>>7),_e=(M>>>14|j<<18)^(M>>>18|j<<14)^(M<<23|j>>>9),me=(j>>>14|M<<18)^(j>>>18|M<<14)^(j<<23|M>>>9),be=u[q],we=be.high,Se=be.low,Ee=V+_e+((le=$+me)>>>0<$>>>0?1:0),Ae=ve+ye;V=K,$=z,K=L,z=F,L=M,F=j,M=D+(Ee=(Ee=(Ee=Ee+he+((le+=pe)>>>0<pe>>>0?1:0))+we+((le+=Se)>>>0<Se>>>0?1:0))+W+((le+=H)>>>0<H>>>0?1:0))+((j=U+le|0)>>>0<U>>>0?1:0)|0,D=B,U=k,B=P,k=O,P=R,O=x,R=Ee+(ge+de+(Ae>>>0<ve>>>0?1:0))+((x=le+Ae|0)>>>0<le>>>0?1:0)|0}d=n.low=d+x,n.high=p+R+(d>>>0<x>>>0?1:0),g=i.low=g+O,i.high=y+P+(g>>>0<O>>>0?1:0),_=o.low=_+k,o.high=v+B+(_>>>0<k>>>0?1:0),b=a.low=b+U,a.high=m+D+(b>>>0<U>>>0?1:0),S=s.low=S+j,s.high=w+M+(S>>>0<j>>>0?1:0),A=f.low=A+F,f.high=E+L+(A>>>0<F>>>0?1:0),N=l.low=N+z,l.high=I+K+(N>>>0<z>>>0?1:0),T=h.low=T+$,h.high=C+V+(T>>>0<$>>>0?1:0)},_doFinalize:function(){vare=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;returnt[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){vare=t.clone.call(this);returne._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(f),e.HmacSHA512=t._createHmacHelper(f)}(),n.SHA512)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});varn=r(13);t.bytesFromIP=n.bytesFromIP,t.bytesToIP=n.bytesToIP,t.getOID=n.getOID,t.getOIDName=n.getOIDName;vari=r(20);t.PublicKey=i.PublicKey,t.PrivateKey=i.PrivateKey,t.RSAPublicKey=i.RSAPublicKey,t.RSAPrivateKey=i.RSAPrivateKey;varo=r(80);t.Certificate=o.Certificate,t.DistinguishedName=o.DistinguishedName},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(9),i=r(2),o=r(77),a=r(21),s=r(13);t.publicKeyValidator={name:"PublicKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"publicKeyInfo",value:[{name:"PublicKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PublicKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"publicKeyOID"}]},{name:"PublicKeyInfo.PublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.BITSTRING,capture:"publicKey"}]},t.privateKeyValidator={name:"PrivateKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"privateKeyInfo",value:[{name:"PrivateKeyInfo.Version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PrivateKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"privateKeyOID"}]},{name:"PrivateKeyInfo.PrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.OCTETSTRING,capture:"privateKey"}]};constu={name:"RSAPublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPublicKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyExponent"}]},c={name:"RSAPrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPrivateKey.version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyCoefficient"}]},f=[s.getOID("X25519"),s.getOID("X448"),s.getOID("Ed25519"),s.getOID("Ed448")];classl{constructor(e){constr={},n=e.validate(t.publicKeyValidator,r);if(null!=n)thrownewError("Cannot read X.509 public key: "+n.message);this.oid=a.ASN1.parseOID(r.publicKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=e,this._keyRaw=a.ASN1.parseBitString(r.publicKey.bytes).buf,this._finalKey=this._keyRaw,this._finalPEM=""}staticfromPEM(e){constt=a.PEM.parse(e)[0];if(t.procType.includes("ENCRYPTED"))thrownewError("Could not convert public key from PEM, PEM is encrypted.");constr=a.ASN1.fromDER(t.body,!0);switch(t.type){case"PUBLIC KEY":returnnewl(r);case"RSA PUBLIC KEY":conste=a.ASN1.Seq([a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),a.ASN1.BitString(r.DER)]);returnnewl(e);default:thrownewError("Could not convert public key from PEM, recommend PKCS#8 PEM")}}staticaddVerifier(e,t){if(""===(e=s.getOID(e)))thrownewError("Invalid object identifier: "+e);if(null!=l._verifiers[e])thrownewError(`Verifier ${e} exists`);l._verifiers[e]=t}getkeyRaw(){returnthis._finalKey}verify(e,t,r){constn=l._verifiers[this.oid];if(null!=n){consto=i.createHash(r).update(e).digest();returnn.call(this,o,t)}consto=i.createVerify(r);returno.update(e),o.verify(this.toPEM(),t)}getFingerprint(e,t="PublicKey"){letr;switch(t){case"PublicKeyInfo":r=this._pkcs8.DER;break;case"PublicKey":r=this._keyRaw;break;default:thrownewError(`Unknown fingerprint type "${t}".`)}constn=i.createHash(e);returnn.update(r),n.digest()}toASN1(){returnthis._pkcs8}toDER(){returnthis._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=newa.PEM("PUBLIC KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{oid:this.oid,algo:this.algo,publicKey:this._keyRaw}}[n.inspect.custom](e,t){return`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}l._verifiers=Object.create(null),t.PublicKey=l;classh{constructor(e){constr=Object.create(null),n=e.validate(t.privateKeyValidator,r);if(null!=n)thrownewError("Cannot read X.509 private key: "+n.message);if(this.version=a.ASN1.parseIntegerNum(r.privateKeyVersion.bytes)+1,this.oid=a.ASN1.parseOID(r.privateKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=e,this._keyRaw=r.privateKey.bytes,this._publicKeyRaw=null,this._finalKey=this._keyRaw,this._finalPEM="",f.includes(this.oid))if(this._finalKey=this._keyRaw=a.ASN1.parseDER(this._keyRaw,a.Class.UNIVERSAL,a.Tag.OCTETSTRING).bytes,"1.3.101.112"===this.oid){conste=o.sign.keyPair.fromSeed(this._keyRaw);this._publicKeyRaw=Buffer.from(e.publicKey),this._finalKey=Buffer.from(e.secretKey)}elseif(2===this.version)for(consttofe.mustCompound())t.class===a.Class.CONTEXT_SPECIFIC&&1===t.tag&&(this._publicKeyRaw=a.ASN1.parseBitString(t.bytes).buf,this._finalKey=Buffer.concat([this._keyRaw,this._publicKeyRaw]))}staticfromPEM(e){constt=a.PEM.parse(e)[0];if(t.procType.includes("ENCRYPTED"))thrownewError("Could not convert private key from PEM, PEM is encrypted.");letr=a.ASN1.fromDER(t.body,!0);switch(t.type){case"PRIVATE KEY":returnnewh(r);case"RSA PRIVATE KEY":returnr=a.ASN1.Seq([r.value[0],a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),newa.ASN1(a.Class.UNIVERSAL,a.Tag.OCTETSTRING,r.DER)]),newh(r);default:thrownewError("Could not convert private key from PEM, recommend PKCS#8 PEM")}}staticaddSigner(e,t){if(""===(e=s.getOID(e)))thrownewError("Invalid object identifier: "+e);if(null!=h._signers[e])thrownewError(`Signer ${e} exists`);h._signers[e]=t}getkeyRaw(){returnthis._finalKey}getpublicKeyRaw(){returnthis._publicKeyRaw}sign(e,t){constr=h._signers[this.oid];if(null!=r){constn=i.createHash(t).update(e).digest();returnr.call(this,n)}constn=i.createSign(t);returnn.update(e),n.sign(this.toPEM())}toASN1(){returnthis._pkcs8}toDER(){returnthis._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=newa.PEM("PRIVATE KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,privateKey:this._keyRaw,publicKey:this._publicKeyRaw}}[n.inspect.custom](e,t){return`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}h._signers=Object.create(null),t.PrivateKey=h;classpextendsl{staticfromPublicKey(e){returnnewp(e.toASN1())}constructor(e){if(super(e),s.getOID(this.oid)!==s.getOID("rsaEncryption"))thrownewError("Invalid RSA public key, unknown OID: "+this.oid);constt=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);constr=this._pkcs1.validate(u,t);if(null!=r)thrownewError("Cannot read RSA public key: "+r.message);this.modulus=a.ASN1.parseIntegerStr(t.publicKeyModulus.bytes),this.exponent=a.ASN1.parseIntegerNum(t.publicKeyExponent.bytes)}toASN1(){returnthis._pkcs1}toDER(){returnthis._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=newa.PEM("RSA PUBLIC KEY",this._keyRaw).toString()),this._finalPEM}toPublicKeyPEM(){returnnewa.PEM("PUBLIC KEY",this._pkcs8.DER).toString()}toJSON(){return{oid:this.oid,algo:this.algo,modulus:y(this.modulus),exponent:this.exponent}}[n.inspect.custom](e,t){return`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}t.RSAPublicKey=p;classdextendsh{staticfromPrivateKey(e){returnnewd(e.toASN1())}constructor(e){if(super(e),s.getOID(this.oid)!==s.getOID("rsaEncryption"))thrownewError("Invalid RSA private key, unknown OID: "+this.oid);constt=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);constr=this._pkcs1.validate(c,t);if(null!=r)thrownewError("Cannot read RSA private key: "+r.message);this.publicExponent=a.ASN1.parseIntegerNum(t.privateKeyPublicExponent.bytes),this.privateExponent=a.ASN1.parseIntegerStr(t.privateKeyPrivateExponent.bytes),this.modulus=a.ASN1.parseIntegerStr(t.privateKeyModulus.bytes),this.prime1=a.ASN1.parseIntegerStr(t.privateKeyPrime1.bytes),this.prime2=a.ASN1.parseIntegerStr(t.privateKeyPrime2.bytes),this.exponent1=a.ASN1.parseIntegerStr(t.privateKeyExponent1.bytes),this.exponent2=a.ASN1.parseIntegerStr(t.privateKeyExponent2.bytes),this.coefficient=a.ASN1.parseIntegerStr(t.privateKeyCoefficient.bytes)}toASN1(){returnthis._pkcs1}toDER(){returnthis._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=newa.PEM("RSA PRIVATE KEY",this._keyRaw).toString()),this._finalPEM}toPrivateKeyPEM(){returnnewa.PEM("PRIVATE KEY",this._pkcs8.DER).toString()}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,publicExponent:this.publicExponent,privateExponent:y(this.privateExponent),modulus:y(this.modulus),prime1:y(this.prime1),prime2:y(this.prime2),exponent1:y(this.exponent1),exponent2:y(this.exponent2),coefficient:y(this.coefficient)}}[n.inspect.custom](e,t){return`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}functiony(e){returne.length%8!=0&&e.startsWith("00")?e.slice(2):e}t.RSAPrivateKey=d,l.addVerifier(s.getOID("Ed25519"),(function(e,t){returno.sign.detached.verify(e,t,this.keyRaw)})),h.addSigner(s.getOID("Ed25519"),(function(e){constt=this.keyRaw;if(64!==t.length)thrownewError("Invalid signing key.");returnBuffer.from(o.sign.detached(e,t))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});varn=r(22);t.BufferVisitor=n.BufferVisitor;vari=r(78);t.PEM=i.PEM;varo=r(79);t.ASN1=o.ASN1,t.Class=o.Class,t.Tag=o.Tag,t.BitString=o.BitString},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BufferVisitor=class{constructor(e,t=0,r=0){this.start=t,this.end=r>t?r:t,this.buf=e}getlength(){returnthis.buf.length}reset(e=0,t=0){returnthis.start=e,t>=this.start?this.end=t:this.end<this.start&&(this.end=this.start),this}walk(e){returnthis.start=this.end,this.end+=e,this}mustHas(e,t="Too few bytes to parse."){constr=this.end+e;if(r>this.buf.length){conste=newError(t);throwe.available=this.buf.length,e.requested=r,e}returnthis.walk(0),this}mustWalk(e,t){returnthis.mustHas(e,t),this.walk(e),this}}},function(e,t,r){"use strict";varn=c(r(24)),i=c(r(30)),o=c(r(83)),a=c(r(84)),s=c(r(88)),u=r(3);functionc(e){returne&&e.__esModule?e:{default:e}}e.exports={initWeixin:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(n.default,e)),initAlipay:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(i.default,e)),initAppleIapPayment:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(o.default,e)),initWeixinV3:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(a.default,e)),initWeixinVirtualPayment:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(s.default,e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=a(r(25)),i=a(r(29)),o=r(3);functiona(e){returne&&e.__esModule?e:{default:e}}t.default=class{constructor(e={}){if(!e.appId)thrownewError("appId required");if(!e.mchId)thrownewError("mchId required");if(!e.key)thrownewError("key required");e.signType=e.signType||"MD5",this.options=Object.assign({},e),this._protocols=i.default,this.baseUrl="https://api.mch.weixin.qq.com",this.paths={unifiedOrder:"/pay/unifiedorder",orderQuery:"/pay/orderquery",closeOrder:"/pay/closeorder",refund:"/secapi/pay/refund",refundQuery:"/pay/refundquery",downloadBill:"/pay/downloadbill",downloadFundflow:"/pay/downloadfundflow",getsignkey:"/pay/getsignkey"}}_getSign(e,t){constr=n.default.getSignStr(e)+"&key="+this.options.key;switch(t){case"MD5":returnn.default.md5(r).toUpperCase();case"HMAC-SHA256":returnn.default.sha256(r,this.options.key).toUpperCase();default:thrownewError("signType Error")}}_normalizeResult(e,t){returne.returnMsg=e.returnMsg||("SUCCESS"===e.returnCode?"ok":"fail"),e.errMsg=`payment.${t}${e.returnMsg.toLowerCase()}`,e}_parse(e,t,r){consti=n.default.parseXML(e);if("FAIL"===i.return_code)thrownewError(""+i.return_msg);if("getSandboxKey"!==t){if(i.appid!==this.options.appId)thrownewError("appId不匹配");if(i.mch_id!==this.options.mchId)thrownewError("mchId不匹配");if(i.sign!==this._getSign(i,r))thrownewError("返回结果签名错误");i.app_id=i.appid,deletei.appid}if("FAIL"===i.result_code)thrownewError(`${i.err_code}${i.err_code_des}`);returnthis._normalizeResult((0,o.snake2camelJson)(i),t)}_parseBill(e,t){constr={};if(n.default.isXML(e)){constt=n.default.parseXML(e);if("FAIL"===t.return_code)thrownewError(""+t.return_msg);if("FAIL"===t.result_code)thrownewError(`${t.err_code}${t.err_code_des}`)}elser.returnCode="SUCCESS",r.content=e;returnthis._normalizeResult(r,t)}_getPublicParams(){const{appId:e,mchId:t,subAppId:r,subMchId:i}=this.options;returnr?{appid:e,mchId:t,nonceStr:n.default.getNonceStr(),subAppid:r,subMchId:i}:{appid:e,mchId:t,nonceStr:n.default.getNonceStr()}}async_requestWxpay(e,t,r=!1){if(r&&!this.options.pfx)thrownewError("此接口需要微信支付证书(请传入pfx字段)");"getSandboxKey"!==t&&awaitthis._initSandbox();consti=e.signType||this.options.signType;(e=(0,o.camel2snakeJson)(e)).sign=this._getSign(e,i);consta={method:"POST",dataType:"text",data:n.default.buildXML(e),timeout:this.options.timeout};r&&(a.pfx=this.options.pfx,a.passphrase=this.options.mchId);const{status:s,data:u}=awaituniCloud.httpclient.request(this.options.sandbox?`${this.baseUrl}/sandboxnew${this.paths[t]}`:`${this.baseUrl}${this.paths[t]}`,a);if(200!==s)thrownewError("request fail");return-1!==["downloadBill","downloadFundflow"].indexOf(t)?this._parseBill(u,t):this._parse(u,t,i)}asyncgetSandboxKey(){conste={mchId:this.options.mchId,nonceStr:n.default.getNonceStr()};returnawaitthis._requestWxpay(e,"getSandboxKey")}async_initSandbox(){this.options.sandbox&&!this.options.sandboxKey&&(this.options.key=this.options.sandboxKey=awaitthis.getSandboxKey().sandbox_signkey)}asyncunifiedOrder(e){lett;if(e.tradeType)t=e.tradeType;elseswitch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-weixin":default:t="JSAPI"}constr=this._getPublicParams();r.subAppid&&(e.sub_openid=e.openid),("JSAPI"!==t||r.subAppid)&&deletee.openid;constn={...e,...r,spbillCreateIp:e.spbillCreateIp||"127.0.0.1",tradeType:t};returnawaitthis._requestWxpay(n,"unifiedOrder")}_getPayParamsByPrepayId(e,t){letr;switch(this.options.clientType){case"app-plus":case"app":r={appid:this.options.subAppId?this.options.subAppId:this.options.appId,noncestr:n.default.getNonceStr(),package:"Sign=WXPay",partnerid:this.options.mchId,prepayid:e,timestamp:""+(Date.now()/1e3|0)},r.sign=this._getSign(r,t);break;case"mp-weixin":default:{consti=""+(Date.now()/1e3|0);r={appId:this.options.subAppId?this.options.subAppId:this.options.appId,nonceStr:n.default.getNonceStr(),package:"prepay_id="+e,timeStamp:i},r.signType=t,r.paySign=this._getSign(r,t),r.timestamp=i;break}}returnr}asyncgetOrderInfo(e){lett;if(e.tradeType)t=e.tradeType;elseswitch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-weixin":default:t="JSAPI"}"JSAPI"!==t&&deletee.openid,e.tradeType=t;constr=awaitthis.unifiedOrder(e);if("NATIVE"===t||"MWEB"===t)returnr;if(!r.prepayId)thrownewError(r.errMsg||"获取prepayId失败");returnthis._getPayParamsByPrepayId(r.prepayId,e.signType||this.options.signType)}asyncorderQuery(e){constt={...e,...this._getPublicParams()};returnawaitthis._requestWxpay(t,"orderQuery")}asynccloseOrder(e){constt={...e,...this._getPublicParams()};returnawaitthis._requestWxpay(t,"closeOrder")}asyncrefund(e){constt={...e,...this._getPublicParams()};returnawaitthis._requestWxpay(t,"refund",!0)}asyncrefundQuery(e){constt={...e,...this._getPublicParams()};returnawaitthis._requestWxpay(t,"refundQuery")}asyncdownloadBill(e){constt={...e,...this._getPublicParams(),billType:e.billType||"ALL"};returnawaitthis._requestWxpay(t,"downloadBill")}asyncdownloadFundflow(e){constt={...e,...this._getPublicParams(),signType:e.signType||"HMAC-SHA256",accountType:e.accountType||"Basic"};returnawaitthis._requestWxpay(t,"downloadFundflow",!0)}_getNotifyData(e){lett=e.body;returne.isBase64Encoded&&(t=Buffer.from(t,"base64").toString("utf-8")),n.default.parseXML(t)}_verifyNotify(e,t){constr=this._getNotifyData(e);if("FAIL"===r.return_code)thrownewError(`${r.return_code}${r.return_msg}`);if(r.appid!==this.options.appId)thrownewError("appId不匹配");if(r.mch_id!==this.options.mchId)thrownewError("mchId不匹配");if(t&&r.sign!==this._getSign(r,this.options.signType))thrownewError("通知验签未通过");constn=(0,o.snake2camelJson)(r);returnn.appId=n.appid,deleten.appid,n}verifyPaymentNotify(e){return"payment"===this.checkNotifyType(e)&&this._verifyNotify(e,!0)}verifyRefundNotify(e){if("refund"!==this.checkNotifyType(e))return!1;constt=this._verifyNotify(e,!1),r=(0,o.snake2camelJson)(n.default.parseXML(n.default.decryptData(t.reqInfo,n.default.md5(this.options.key))));returnObject.assign(t,r),deletet.reqInfo,t}checkNotifyType(e){constt=this._getNotifyData(e);return"total_fee"int?"payment":"req_info"int?"refund":"payment"}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn,i=(n=r(2))&&n.__esModule?n:{default:n},o=r(3);vara={decryptData:function(e,t,r=""){constn=i.default.createDecipheriv("aes-256-ecb",t,r);n.setAutoPadding(!0);leto=n.update(e,"base64","utf8");returno+=n.final("utf8"),o},md5:function(e,t="utf8"){returni.default.createHash("md5").update(e,t).digest("hex")},sha256:function(e,t,r="utf8"){returni.default.createHmac("sha256",t).update(e,r).digest("hex")},getSignStr:function(e){returnObject.keys(e).filter(t=>"sign"!==t&&void0!==e[t]&&""!==e[t]).sort().map(t=>t+"="+((0,o.isPlainObject)(e[t])?JSON.stringify(e[t]):e[t])).join("&")},getNonceStr:function(e=16){lett="";for(;t.length<e;)t+=Math.random().toString(32).substring(2);returnt.substring(0,e)},buildXML:function(e,t="xml"){return`<${t}>${Object.keys(e).map(t=>(0,o.isPlainObject)(e[t])?`<${t}><![CDATA[${JSON.stringify(e[t])}]]></${t}>`:`<${t}><![CDATA[${e[t]}]]></${t}>`).join("")}</${t}>`},parseXML:function(e){constt=/<(?:xml|root).*?>([\s|\S]*)<\/(?:xml|root)>/.exec(e)[1],r={},n=/<(.*?)>(?:<!\[CDATA\[){0,1}(.*?)(?:\]\]>){0,1}<\/.*?>/g;leti=null;for(;i=n.exec(t);)r[i[1]]=i[2];returnr},isXML:function(e){return/^(<\?xml.*\?>)?(\r?\n)*<xml>(.|\r?\n)*<\/xml>$/i.test(e.trim())}};t.default=a,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;t.default=class{constructor(){this._boundary="------FormDataBaseBoundary"+Math.random().toString(36).substring(2),this.dataList=[]}_addData(e){constt=this.dataList[this.dataList.length-1];"string"==typeofe&&"string"==typeoft?this.dataList[this.dataList.length-1]=t+"\r\n"+e:this.dataList.push(e)}append(e,t,r){this._addData("--"+this._boundary);letn=`Content-Disposition: form-data; name="${e}"`;switch(Buffer.isBuffer(t)){case!0:if(!r.filename||!r.contentType)thrownewError("filename and contentType required");n+=`; filename="${r.filename}"`,this._addData(n),this._addData("Content-Type: "+r.contentType),this._addData(""),this._addData(t);break;default:this._addData(""),this._addData(t)}}getHeaders(e){constt={"Content-Type":"multipart/form-data; boundary="+this._boundary};returnObject.assign(t,e)}getBuffer(){lete=Buffer.alloc(0);returnthis.dataList.forEach(t=>{e=Buffer.isBuffer(t)?Buffer.concat([e,t]):Buffer.concat([e,Buffer.from(""+t)]),e=Buffer.concat([e,Buffer.from("\r\n")])}),e=Buffer.concat([e,Buffer.from("--"+this._boundary+"--")]),e}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;classnextendsError{constructor(e){super(e.message),this.errMsg=e.message||"",this.errCode=e.code||"",Object.defineProperties(this,{message:{get(){return`errCode: ${this.errCode} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}t.default=n,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createApi=function(e,t){constr=newe(t);returnnewProxy(r,{get:function(e,t){if("function"==typeofe[t]&&0!==t.indexOf("_")&&e._protocols&&e._protocols[t]){constr=e._protocols[t];returnasyncfunction(n){n=i(n,r.args);leto=awaite[t](n);returno=i(o,r.returnValue),o}}returne[t]}})};varn=r(7);functioni(e={},t){if(!t||!e)returne;constr=["_pre","_purify","_post"];t._pre&&(e=t._pre(e));leti={shouldDelete:newSet([])};if(t._purify){conste=t._purify;for(consttine)e[t]=newSet(e[t]);i=Object.assign(i,e)}if((0,n.isPlainObject)(t))for(constoint){consta=t[o];if((0,n.isFn)(a)&&-1===r.indexOf(o))e[o]=a(e);elseif("string"==typeofa&&/\./g.test(a)){constt=a.split(".");e[o]=t.reduce((e,t)=>e[t],e)}elseif("string"==typeofa&&/\./g.test(o)){constt=o.split(".");letr=e;for(const[n,i]oft.entries())r[i]||(r[i]=n+1>=t.length?e[a]:{}),r=r[i]}else"string"==typeofa&&-1===r.indexOf(o)&&(e[o]=e[a]);o!==a&&"string"==typeofa&&i.shouldDelete.add(a)}else(0,n.isFn)(t)&&(e=t(e));if(i.shouldDelete)for(consttofi.shouldDelete)/\./g.test(t)?(0,n.deleteObjectKey)(t.split("."),e):deletee[t];returnt._post&&(e=t._post(e)),e}},function(e,t,r){"use strict";functionn(e,t){t.forEach(t=>{void0!==e[t]&&(e[t]=Number(e[t]))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;vari={unifiedOrder:{args:{_purify:{shouldDelete:["subject"]}}},getOrderInfo:{args:{_purify:{shouldDelete:["subject"]}}},orderQuery:{returnValue:function(e){n(e,["cashFee","totalFee","couponCount"]),e.couponList=[];constt=e.couponCount||0;for(letr=0;r<t;r++)e.couponList.push({couponId:e["couponId"+r],couponType:e["couponType"+r],couponFee:Number(e["couponFee"+r])}),deletee["couponId"+r],deletee["couponType"+r],deletee["couponFee"+r];returne}},refund:{returnValue:function(e){n(e,["refundFee","settlementRefundFee","totalFee","settlementTotalFee","cashFee","cashRefundFee","couponRefundFee","couponRefundCount"]),e.couponList=[];constt=e.couponRefundCount||0;for(letr=0;r<t;r++)e.couponList.push({couponRefundId:e["couponRefundId"+r],couponType:e["couponType"+r],couponRefundFee:Number(e["couponRefundFee"+r])}),deletee["couponRefundId"+r],deletee["couponType"+r],deletee["couponRefundFee"+r];returne}},refundQuery:{returnValue:function(e){n(e,["totalFee","refundFee","settlementTotalFee","cashFee","refundCount"]),e.refundList=[];for(lett=0;t<e.refundCount;t++){e["refundFee"+t]=Number(e["refundFee"+t]),e["couponRefundFee"+t]=Number(e["couponRefundFee"+t]),e["settlementRefundFee"+t]=Number(e["settlementRefundFee"+t]);constr=Number(e["couponRefundCount"+t])||0,n={outRefundNo:e["outRefundNo"+t],refundId:e["refundId"+t],refundChannel:e["refundChannel"+t],refundFee:Number(e["refundFee"+t]),settlementRefundFee:Number(e["settlementRefundFee"+t]),couponRefundFee:Number(e["couponRefundFee"+t]),couponRefundCount:r,refundStatus:e["refundStatus"+t],refundAccount:e["refundAccount"+t],refundRecvAccout:e["refundRecvAccout"+t],refundSuccessTime:e["refundSuccessTime"+t],couponList:[]};deletee["outRefundNo"+t],deletee["refundId"+t],deletee["refundChannel"+t],deletee["refundFee"+t],deletee["settlementRefundFee"+t],deletee["couponRefundFee"+t],deletee["couponRefundCount"+t],deletee["refundStatus"+t],deletee["refundAccount"+t],deletee["refundRecvAccout"+t],deletee["refundSuccessTime"+t];for(leti=0;i<r;i++)n.couponList.push({couponRefundId:e[`couponRefundId${t}${i}`],couponType:e[`couponType${t}${i}`],couponRefundFee:Number(e[`couponRefundId${t}${i}`])}),deletee[`couponRefundId${t}${i}`],deletee[`couponType${t}${i}`],deletee[`couponRefundFee${t}${i}`];e.refundList.push(n)}returne}},verifyPaymentNotify:{returnValue:function(e){n(e,["cashFee","totalFee","couponCount"]);constt=e.couponCount||0;e.couponList=[];for(letr=0;r<t;r++)e.couponList.push({couponId:e["couponId"+r],couponType:e["couponType"+r],couponFee:Number(e["couponFee"+r])}),deletee["couponId"+r],deletee["couponType"+r],deletee["couponFee"+r];returne}},verifyRefundNotify:{returnValue:function(e){returnn(e,["refundFee","settlementRefundFee","settlementTotalFee","totalFee"]),e}},downloadBill:{args:{billDate:e=>e.billDate.replace(/-/g,"")}},downloadFundflow:{args:{billDate:e=>e.billDate.replace(/-/g,"")}}};t.default=i,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=r(3),i=c(r(2)),o=c(r(31)),a=c(r(32)),s=c(r(82)),u=r(16);functionc(e){returne&&e.__esModule?e:{default:e}}constf={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};classlextendsa.default{constructor(e){e.sandbox&&(e.gateway="https://openapi.alipaydev.com/gateway.do"),super(e=Object.assign({gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:8,keyType:"PKCS8"},e)),this.options=e,this._protocols=s.default}async_request(e,t){constr={};t.notifyUrl&&(r.notifyUrl=t.notifyUrl,deletet.notifyUrl),r.bizContent=t;returnawaitthis.exec(e,r,{validateSign:!0})}asyncunifiedOrder(e){returnawaitthis._request("alipay.trade.create",Object.assign({sellerId:this.options.mchId},e))}_getSign(e,t){return(0,u.sign)(e,t,this.config)}formatUrl(e,t){letr=e;constn=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","appCertSn","alipayRootCertSn"];for(consteint)if(n.indexOf(e)>-1){constn=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,deletet[e]}return{execParams:t,url:r}}asyncgetOrderInfo(e){lett;if(e.tradeType)t=e.tradeType,deletee.tradeType;elseswitch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-alipay":default:t="JSAPI"}switch(t){case"APP":{deletee.buyerId;constt={};e.notifyUrl&&(t.notifyUrl=e.notifyUrl,deletee.notifyUrl),t.bizContent=e;constr=this._getSign("alipay.trade.app.pay",t),{url:n,execParams:i}=this.formatUrl("",r);return(n+"&biz_content="+encodeURIComponent(i.biz_content)).substr(1)}case"JSAPI":{constt=awaitthis.unifiedOrder(e);if(!t.tradeNo)thrownewError("获取支付宝交易号失败,详细信息为:"+JSON.stringify(t));returnt.tradeNo}case"NATIVE":returnawaitthis._request("alipay.trade.precreate",Object.assign({sellerId:this.options.mchId},e));default:thrownewError("不支持的支付类型,支付宝支付下单仅支持App、支付宝小程序、网站二维码支付")}}asyncorderQuery(e){returnawaitthis._request("alipay.trade.query",e)}asynccancelOrder(e){returnawaitthis._request("alipay.trade.cancel",e)}asynccloseOrder(e){returnawaitthis._request("alipay.trade.close",e)}asyncrefund(e){returnawaitthis._request("alipay.trade.refund",e)}asyncrefundQuery(e){returnawaitthis._request("alipay.trade.fastpay.refund.query",e)}notifyRSACheck(e,t,r){constn=Object.keys(e).sort().filter(e=>e).map(t=>{letr=e[t];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),`${t}=${r}`}).join("&");returni.default.createVerify(f[r]).update(n,"utf8").verify(this.config.alipayPublicKey,t,"base64")}_getNotifyData(e){if(!e.headers)thrownewError("通知格式不正确");lett;for(constrine.headers)"content-type"===r.toLowerCase()&&(t=e.headers[r]);if(!1!==e.isBase64Encoded&&-1===t.indexOf("application/x-www-form-urlencoded"))thrownewError("通知格式不正确");returno.default.parse(e.body)}_verifyNotify(e){constt=this._getNotifyData(e);return!!this.checkNotifySign(t)&&(0,n.snake2camelJson)(t)}verifyPaymentNotify(e){return"payment"===this.checkNotifyType(e)&&this._verifyNotify(e)}verifyRefundNotify(e){return"refund"===this.checkNotifyType(e)&&this._verifyNotify(e)}checkNotifyType(e){return"refund_fee"inthis._getNotifyData(e)?"refund":"payment"}}t.default=l,e.exports=t.default},function(e,t){e.exports=require("querystring")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(10),i=r(33),o=r(2),a=r(34),s=r(35),u=r(36),c=r(38),f=r(39),l=r(15),h=r(16),p=r(74),d=r(81);t.default=class{constructor(e){if(!e.appId)throwError("config.appId is required");if(!e.privateKey)throwError("config.privateKey is required");constt="PKCS8"===e.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";e.privateKey=this.formatKey(e.privateKey,t),e.appCertPath||e.appCertContent?(e.appCertSn=i.empty(e.appCertContent)?p.getSNFromPath(e.appCertPath,!1):p.getSN(e.appCertContent,!1),e.alipayCertSn=i.empty(e.alipayPublicCertContent)?p.getSNFromPath(e.alipayPublicCertPath,!1):p.getSN(e.alipayPublicCertContent,!1),e.alipayRootCertSn=i.empty(e.alipayRootCertContent)?p.getSNFromPath(e.alipayRootCertPath,!0):p.getSN(e.alipayRootCertContent,!0),e.alipayPublicKey=i.empty(e.alipayPublicCertContent)?p.loadPublicKeyFromPath(e.alipayPublicCertPath):p.loadPublicKey(e.alipayPublicCertContent),e.alipayPublicKey=this.formatKey(e.alipayPublicKey,"PUBLIC KEY")):e.alipayPublicKey&&(e.alipayPublicKey=this.formatKey(e.alipayPublicKey,"PUBLIC KEY")),this.config=Object.assign({urllib:a,gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,camelcase:!0,signType:"RSA2",charset:"utf-8",version:"1.0"},f(e,{deep:!0})),this.sdkVersion="alipay-sdk-nodejs-"+d.version}formatKey(e,t){constr=e.split("\n").map(e=>e.trim());returnr[0].includes(t)&&r.shift(),r[r.length-1].includes(t)&&r.pop(),`-----BEGIN ${t}-----\n${r.join("")}\n-----END ${t}-----`}formatUrl(e,t){letr=e;constn=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","ws_service_url"];for(consteint)if(n.indexOf(e)>-1){constn=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,deletet[e]}return{execParams:t,url:r}}multipartExec(e,t={}){constr=this.config;leto={},a={};constp=t.log&&i.fn(t.log.info)?t.log.info:null,d=t.log&&i.fn(t.log.error)?t.log.error:null;t.formData.getFields().forEach(e=>{o[e.name]=e.value,a[e.name]=e.value}),o=f(o,{deep:!0}),a=l(a),t.formData.getFiles().forEach(e=>{constt=c(e.fieldName);a[t]=u.isValid(e.path)?s(e.path):n.createReadStream(e.path)});consty=h.sign(e,o,r),{url:g}=this.formatUrl(r.gateway,y);returnp&&p("[AlipaySdk]start exec url: %s, method: %s, params: %s",g,e,JSON.stringify(o)),newPromise((n,i)=>{s.post({url:g,formData:a,json:!1,timeout:r.timeout,headers:{"user-agent":this.sdkVersion}},(o,a,s)=>{if(o)returno.message="[AlipaySdk]exec error",d&&d(o),i(o);p&&p("[AlipaySdk]exec response: %s",s);try{leto,a;constu=JSON.parse(s);if(a=e.replace(/\./g,"_")+"_response",o=u[a],o){return!t.validateSign||this.checkResponseSign(s,a)?n(r.camelcase?f(o,{deep:!0}):o):i({serverResult:s,errorMessage:"[AlipaySdk]验签失败"})}}catch(e){returni({serverResult:s,errorMessage:"[AlipaySdk]Response 格式错误"})}returni({serverResult:s,errorMessage:"[AlipaySdk]HTTP 请求错误"})})})}pageExec(e,t={}){letr={alipaySdk:this.sdkVersion};constn=this.config,o=t.log&&i.fn(t.log.info)?t.log.info:null;t.formData.getFields().forEach(e=>{r[e.name]=e.value}),r=f(r,{deep:!0});consta=h.sign(e,r,n),{url:s,execParams:u}=this.formatUrl(n.gateway,a);returno&&o("[AlipaySdk]start exec url: %s, method: %s, params: %s",s,e,JSON.stringify(r)),"get"===t.formData.getMethod()?newPromise(e=>{constt=Object.keys(u).map(e=>`${e}=${encodeURIComponent(u[e])}`);e(`${s}&${t.join("&")}`)}):newPromise(e=>{constt="alipaySDKSubmit"+Date.now();e(`\n <form action="${s}" method="post" name="${t}" id="${t}">\n ${Object.keys(u).map(e=>`<input type="hidden" name="${e}" value="${String(u[e]).replace(/\"/g,""")}" />`).join("")}\n </form>\n <script>document.forms["${t}"].submit();<\/script>\n `)})}notifyRSACheck(e,t,r,n){consti=Object.keys(e).sort().filter(e=>e).map(t=>{letr=e[t];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),n?`${t}=${r}`:`${t}=${decodeURIComponent(r)}`}).join("&");returno.createVerify(h.ALIPAY_ALGORITHM_MAPPING[r]).update(i,"utf8").verify(this.config.alipayPublicKey,t,"base64")}getSignStr(e,t){letr=e.trim();constn=e.indexOf(t+'"'),i=e.lastIndexOf('"sign"');returnr=r.substr(n+t.length+1),r=r.substr(0,i),r=r.replace(/^[^{]*{/g,"{"),r=r.replace(/\}([^}]*)$/g,"}"),r}exec(e,t={},r={}){if(r.formData)returnr.formData.getFiles().length>0?this.multipartExec(e,r):this.pageExec(e,r);constn=this.config,o=h.sign(e,t,n),{url:a,execParams:s}=this.formatUrl(n.gateway,o),u=r.log&&i.fn(r.log.info)?r.log.info:null,c=r.log&&i.fn(r.log.error)?r.log.error:null;returnu&&u("[AlipaySdk]start exec, url: %s, method: %s, params: %s",a,e,JSON.stringify(s)),newPromise((i,o)=>{n.urllib.request(a,{method:"POST",data:s,dataType:"text",timeout:n.timeout,headers:{"user-agent":this.sdkVersion}}).then(a=>{if(u&&u("[AlipaySdk]exec response: %s",a),200===a.status){lets,u;try{constt=JSON.parse(a.data);u=e.replace(/\./g,"_")+"_response",s=t[u]}catch(e){returno({serverResult:a,errorMessage:"[AlipaySdk]Response 格式错误"})}if(s){t.needEncrypt&&(s=h.aesDecrypt(s,n.encryptKey));return!r.validateSign||this.checkResponseSign(a.data,u)?i(n.camelcase?f(s,{deep:!0}):s):o({serverResult:a,errorMessage:"[AlipaySdk]验签失败"})}returno({serverResult:a,errorMessage:"[AlipaySdk]HTTP 请求错误"})}o({serverResult:a,errorMessage:"[AlipaySdk]HTTP 请求错误"})}).catch(e=>{e.message="[AlipaySdk]exec error",c&&c(e),o(e)})})}checkResponseSign(e,t){if(!this.config.alipayPublicKey||""===this.config.alipayPublicKey)returnconsole.warn("config.alipayPublicKey is empty"),!0;if(!e)return!1;constr=this.getSignStr(e,t),n=JSON.parse(e).sign,i=o.createVerify(h.ALIPAY_ALGORITHM_MAPPING[this.config.signType]);returni.update(r,"utf8"),i.verify(this.config.alipayPublicKey,n,"base64")}checkNotifySign(e,t){constr=e.sign;if(!this.config.alipayPublicKey||!r)return!1;constn=e.sign_type||this.config.signType||"RSA2",i=Object.assign({},e);deletei.sign,i.sign_type=n;return!!this.notifyRSACheck(i,r,n,t)||(deletei.sign_type,this.notifyRSACheck(i,r,n,t))}}},function(e,t,r){"use strict";/**! * is * the definitive JavaScript type testing library * * @copyright 2013-2014 Enrico Marino / Jordan Harband * @license MIT */varn,i,o=Object.prototype,a=o.hasOwnProperty,s=o.toString;"function"==typeofSymbol&&(n=Symbol.prototype.valueOf),"function"==typeofBigInt&&(i=BigInt.prototype.valueOf);varu=function(e){returne!=e},c={boolean:1,number:1,string:1,undefined:1},f=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/,l=/^[A-Fa-f0-9]+$/,h={};h.a=h.type=function(e,t){returntypeofe===t},h.defined=function(e){returnvoid0!==e},h.empty=function(e){vart,r=s.call(e);if("[object Array]"===r||"[object Arguments]"===r||"[object String]"===r)return0===e.length;if("[object Object]"===r){for(tine)if(a.call(e,t))return!1;return!0}return!e},h.equal=function(e,t){if(e===t)return!0;varr,n=s.call(e);if(n!==s.call(t))return!1;if("[object Object]"===n){for(rine)if(!h.equal(e[r],t[r])||!(rint))return!1;for(rint)if(!h.equal(e[r],t[r])||!(rine))return!1;return!0}if("[object Array]"===n){if((r=e.length)!==t.length)return!1;for(;r--;)if(!h.equal(e[r],t[r]))return!1;return!0}return"[object Function]"===n?e.prototype===t.prototype:"[object Date]"===n&&e.getTime()===t.getTime()},h.hosted=function(e,t){varr=typeoft[e];return"object"===r?!!t[e]:!c[r]},h.instance=h.instanceof=function(e,t){returneinstanceoft},h.nil=h.null=function(e){returnnull===e},h.undef=h.undefined=function(e){returnvoid0===e},h.args=h.arguments=function(e){vart="[object Arguments]"===s.call(e),r=!h.array(e)&&h.arraylike(e)&&h.object(e)&&h.fn(e.callee);returnt||r},h.array=Array.isArray||function(e){return"[object Array]"===s.call(e)},h.args.empty=function(e){returnh.args(e)&&0===e.length},h.array.empty=function(e){returnh.array(e)&&0===e.length},h.arraylike=function(e){return!!e&&!h.bool(e)&&a.call(e,"length")&&isFinite(e.length)&&h.number(e.length)&&e.length>=0},h.bool=h.boolean=function(e){return"[object Boolean]"===s.call(e)},h.false=function(e){returnh.bool(e)&&!1===Boolean(Number(e))},h.true=function(e){returnh.bool(e)&&!0===Boolean(Number(e))},h.date=function(e){return"[object Date]"===s.call(e)},h.date.valid=function(e){returnh.date(e)&&!isNaN(Number(e))},h.element=function(e){returnvoid0!==e&&"undefined"!=typeofHTMLElement&&einstanceofHTMLElement&&1===e.nodeType},h.error=function(e){return"[object Error]"===s.call(e)},h.fn=h.function=function(e){if("undefined"!=typeofwindow&&e===window.alert)return!0;vart=s.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t||"[object AsyncFunction]"===t},h.number=function(e){return"[object Number]"===s.call(e)},h.infinite=function(e){returne===1/0||e===-1/0},h.decimal=function(e){returnh.number(e)&&!u(e)&&!h.infinite(e)&&e%1!=0},h.divisibleBy=function(e,t){varr=h.infinite(e),n=h.infinite(t),i=h.number(e)&&!u(e)&&h.number(t)&&!u(t)&&0!==t;returnr||n||i&&e%t==0},h.integer=h.int=function(e){returnh.number(e)&&!u(e)&&e%1==0},h.maximum=function(e,t){if(u(e))thrownewTypeError("NaN is not a valid value");if(!h.arraylike(t))thrownewTypeError("second argument must be array-like");for(varr=t.length;--r>=0;)if(e<t[r])return!1;return!0},h.minimum=function(e,t){if(u(e))thrownewTypeError("NaN is not a valid value");if(!h.arraylike(t))thrownewTypeError("second argument must be array-like");for(varr=t.length;--r>=0;)if(e>t[r])return!1;return!0},h.nan=function(e){return!h.number(e)||e!=e},h.even=function(e){returnh.infinite(e)||h.number(e)&&e==e&&e%2==0},h.odd=function(e){returnh.infinite(e)||h.number(e)&&e==e&&e%2!=0},h.ge=function(e,t){if(u(e)||u(t))thrownewTypeError("NaN is not a valid value");return!h.infinite(e)&&!h.infinite(t)&&e>=t},h.gt=function(e,t){if(u(e)||u(t))thrownewTypeError("NaN is not a valid value");return!h.infinite(e)&&!h.infinite(t)&&e>t},h.le=function(e,t){if(u(e)||u(t))thrownewTypeError("NaN is not a valid value");return!h.infinite(e)&&!h.infinite(t)&&e<=t},h.lt=function(e,t){if(u(e)||u(t))thrownewTypeError("NaN is not a valid value");return!h.infinite(e)&&!h.infinite(t)&&e<t},h.within=function(e,t,r){if(u(e)||u(t)||u(r))thrownewTypeError("NaN is not a valid value");if(!h.number(e)||!h.number(t)||!h.number(r))thrownewTypeError("all arguments must be numbers");returnh.infinite(e)||h.infinite(t)||h.infinite(r)||e>=t&&e<=r},h.object=function(e){return"[object Object]"===s.call(e)},h.primitive=function(e){return!e||!("object"==typeofe||h.object(e)||h.fn(e)||h.array(e))},h.hash=function(e){returnh.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},h.regexp=function(e){return"[object RegExp]"===s.call(e)},h.string=function(e){return"[object String]"===s.call(e)},h.base64=function(e){returnh.string(e)&&(!e.length||f.test(e))},h.hex=function(e){returnh.string(e)&&(!e.length||l.test(e))},h.symbol=function(e){return"function"==typeofSymbol&&"[object Symbol]"===s.call(e)&&"symbol"==typeofn.call(e)},h.bigint=function(e){return"function"==typeofBigInt&&"[object BigInt]"===s.call(e)&&"bigint"==typeofi.call(e)},e.exports=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=uniCloud.httpclient;t.default=n,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;t.default={},e.exports=t.default},function(e,t,r){"use strict";varn=r(37);vari={Uri:{createUriRegex:function(e){if("object"!=typeof(e=e||{})||Array.isArray(e))thrownewError("options must be an object");vart="";if(e.scheme){if(Array.isArray(e.scheme)||(e.scheme=[e.scheme]),e.scheme.length<=0)thrownewError("scheme must have at least 1 scheme specified");for(varr=0;r<e.scheme.length;++r){vari=e.scheme[r];if(!(iinstanceofRegExp||"string"==typeofi))thrownewError("scheme must only contain Regular Expressions or Strings");if(t+=t?"|":"",iinstanceofRegExp)t+=i.source;else{if(!/[a-zA-Z][a-zA-Z0-9+-\.]*/.test(i))thrownewError("scheme at position "+r+" must be a valid scheme");t+=i.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}}}varo="(?:"+(t||n.scheme)+")";returnnewRegExp("^(?:"+o+":"+n.hierPart+")(?:\\?"+n.query+")?(?:#"+n.fragment+")?$")},uriRegex:newRegExp(n.uri)}};i.Uri.isValid=function(e){returni.Uri.uriRegex.test(e)},e.exports={createUriRegex:i.Uri.createUriRegex,uriRegex:i.Uri.uriRegex,isValid:i.Uri.isValid}},function(e,t,r){"use strict";varn={rfc3986:{},generate:function(){vare="|";n.rfc3986.cidr="[0-9]|[1-2][0-9]|3[0-2]";vart="!\\$&'\\(\\)\\*\\+,;=",r="a-zA-Z0-9-\\._~%0-9A-Fa-f"+t+":@",i="(?:0?0?[0-9]|0?[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";n.rfc3986.IPv4address="(?:"+i+"\\.){3}"+i;varo="[0-9A-Fa-f]{1,4}",a="(?:"+o+":"+o+"|"+n.rfc3986.IPv4address+")",s="(?:"+o+":){6}"+a,u="::(?:"+o+":){5}"+a,c="(?:"+o+")?::(?:"+o+":){4}"+a,f="(?:(?:"+o+":){0,1}"+o+")?::(?:"+o+":){3}"+a,l="(?:(?:"+o+":){0,2}"+o+")?::(?:"+o+":){2}"+a,h="(?:(?:"+o+":){0,3}"+o+")?::"+o+":"+a,p="(?:(?:"+o+":){0,4}"+o+")?::"+a;n.rfc3986.IPv6address="(?:"+s+e+u+e+c+e+f+e+l+e+h+e+p+"|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}"+"|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)",n.rfc3986.IPvFuture="v[0-9A-Fa-f]+\\.[a-zA-Z0-9-\\._~"+t+":]+",n.rfc3986.scheme="[a-zA-Z][a-zA-Z0-9+-\\.]*";n.rfc3986.IPLiteral="\\[(?:"+n.rfc3986.IPv6address+e+n.rfc3986.IPvFuture+")\\]";vard="(?:[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:]*@)?"+("(?:"+n.rfc3986.IPLiteral+e+n.rfc3986.IPv4address+"|[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=]{0,255})")+"(?::[0-9]*)?",y="(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*";n.rfc3986.hierPart="(?:(?:\\/\\/"+d+y+")"+"|\\/(?:[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]+(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*)?"+"|[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]+(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*)",n.rfc3986.query="["+r+"\\/\\?]*(?=#|$)",n.rfc3986.fragment="["+r+"\\/\\?]*",n.rfc3986.uri="^(?:"+n.rfc3986.scheme+":"+n.rfc3986.hierPart+")(?:\\?"+n.rfc3986.query+")?(?:#"+n.rfc3986.fragment+")?$"}};n.generate(),e.exports=n.rfc3986},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=r(7).camel2snake;t.default=n,e.exports=t.default},function(e,t,r){"use strict";constn=r(14),i=r(40),o=r(41),a=newo({maxSize:1e5}),s=(e,t)=>{constr=(t=Object.assign({deep:!1},t)).exclude;returnn(e,(e,t)=>{if(!r||!((e,t)=>e.some(e=>"string"==typeofe?e===t:e.test(t)))(r,e))if(a.has(e))e=a.get(e);else{constt=i(e);e.length<100&&a.set(e,t),e=t}return[e,t]},{deep:t.deep})};e.exports=(e,t)=>Array.isArray(e)?Object.keys(e).map(r=>s(e[r],t)):s(e,t)},function(e,t,r){"use strict";functionn(e){lett=!1,r=!1,n=!1;for(leti=0;i<e.length;i++){consto=e[i];t&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(e=e.substr(0,i)+"-"+e.substr(i),t=!1,n=r,r=!0,i++):r&&n&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(e=e.substr(0,i-1)+"-"+e.substr(i-1),n=r,r=!1,t=!0):(t=o.toLowerCase()===o,n=r,r=o.toUpperCase()===o)}returne}e.exports=function(e){if(0===(e=arguments.length>1?Array.from(arguments).map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)returne.toLowerCase();if(/^[a-z0-9]+$/.test(e))returne;constt=e!==e.toLowerCase();returnt&&(e=n(e)),e.replace(/^[_.\-]+/,"").toLowerCase().replace(/[_.\-]+(\w|$)/g,(e,t)=>t.toUpperCase())}},function(e,t,r){"use strict";classn{constructor(e){if(!((e=Object.assign({},e)).maxSize&&e.maxSize>0))thrownewTypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=newMap,this.oldCache=newMap,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=newMap)}get(e){if(this.cache.has(e))returnthis.cache.get(e);if(this.oldCache.has(e)){constt=this.oldCache.get(e);returnthis._set(e,t),t}}set(e,t){returnthis.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){returnthis.cache.has(e)||this.oldCache.has(e)}peek(e){returnthis.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void0}delete(e){this.cache.delete(e)&&this._size--,this.oldCache.delete(e)}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(consteofthis)yielde[0]}*values(){for(consteofthis)yielde[1]}*[Symbol.iterator](){for(consteofthis.cache)yielde;for(consteofthis.oldCache)this.cache.has(e[0])||(yielde)}getsize(){lete=0;for(consttofthis.oldCache)this.cache.has(t[0])||e++;returnthis._size+e}}e.exports=n},function(e,t,r){varn=r(43);e.exports=function(e){returnn(e).replace(/\s/g,"_")}},function(e,t,r){varn=r(44);e.exports=function(e){returnn(e).replace(/[\W_]+(.|$)/g,(function(e,t){returnt?""+t:""}))}},function(e,t){e.exports=function(e){if(r.test(e))returne.toLowerCase();i.test(e)&&(e=function(e){returne.replace(o,(function(e,t){returnt?""+t:""}))}(e));n.test(e)&&(e=function(e){returne.replace(a,(function(e,t,r){returnt+""+r.toLowerCase().split("").join("")}))}(e));returne.toLowerCase()};varr=/\s/,n=/[a-z][A-Z]/,i=/[\W_]/;varo=/[\W_]+(.|$)/g;vara=/(.)([A-Z]+)/g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{format:function(){return(0,n.getFullTimeStr)((0,n.getOffsetDate)(8))}}};varn=r(7);e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn={encode:e=>e};t.default=n,e.exports=t.default},function(e,t,r){varn;e.exports=(n=r(0),r(8),r(48),r(49),r(5),r(50),r(6),r(11),r(17),r(51),r(18),r(52),r(53),r(54),r(12),r(55),r(4),r(1),r(56),r(57),r(58),r(59),r(60),r(61),r(62),r(63),r(64),r(65),r(66),r(67),r(68),r(69),r(70),r(71),n)},function(e,t,r){varn;e.exports=(n=r(0),function(){if("function"==typeofArrayBuffer){vare=n.lib.WordArray,t=e.init;(e.init=function(e){if(einstanceofArrayBuffer&&(e=newUint8Array(e)),(einstanceofInt8Array||"undefined"!=typeofUint8ClampedArray&&einstanceofUint8ClampedArray||einstanceofInt16Array||einstanceofUint16Array||einstanceofInt32Array||einstanceofUint32Array||einstanceofFloat32Array||einstanceofFloat64Array)&&(e=newUint8Array(e.buffer,e.byteOffset,e.byteLength)),einstanceofUint8Array){for(varr=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}elset.apply(this,arguments)}).prototype=e}}(),n.lib.WordArray)},function(e,t,r){varn;e.exports=(n=r(0),function(){vare=n,t=e.lib.WordArray,r=e.enc;functioni(e){returne<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(vart=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){varo=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}returnn.join("")},parse:function(e){for(varr=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;returnt.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(vart=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){vara=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}returnn.join("")},parse:function(e){for(varr=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);returnt.create(n,2*r)}}}(),n.enc.Utf16)},function(e,t,r){varn,i,o;e.exports=(o=r(0),i=(n=o).lib.WordArray,n.enc.Base64url={stringify:function(e,t=!0){varr=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(varo=[],a=0;a<n;a+=3)for(vars=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u<n;u++)o.push(i.charAt(s>>>6*(3-u)&63));varc=i.charAt(64);if(c)for(;o.length%4;)o.push(c);returno.join("")},parse:function(e,t=!0){varr=e.length,n=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(vara=0;a<n.length;a++)o[n.charCodeAt(a)]=a}vars=n.charAt(64);if(s){varu=e.indexOf(s);-1!==u&&(r=u)}returnfunction(e,t,r){for(varn=[],o=0,a=0;a<t;a++)if(a%4){vars=r[e.charCodeAt(a-1)]<<a%4*2,u=r[e.charCodeAt(a)]>>>6-a%4*2,c=s|u;n[o>>>2]|=c<<24-o%4*8,o++}returni.create(n,o)}(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},o.enc.Base64url)},function(e,t,r){varn,i,o,a,s,u;e.exports=(u=r(0),r(17),i=(n=u).lib.WordArray,o=n.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=newi.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){vare=a._doFinalize.call(this);returne.sigBytes-=4,e}}),n.SHA224=a._createHelper(s),n.HmacSHA224=a._createHmacHelper(s),u.SHA224)},function(e,t,r){varn,i,o,a,s,u,c,f;e.exports=(f=r(0),r(8),r(18),i=(n=f).x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,c=s.SHA384=u.extend({_doReset:function(){this._hash=newa.init([newo.init(3418070365,3238371032),newo.init(1654270250,914150663),newo.init(2438529370,812702999),newo.init(355462360,4144912697),newo.init(1731405415,4290775857),newo.init(2394180231,1750603025),newo.init(3675008525,1694076839),newo.init(1203062813,3204075428)])},_doFinalize:function(){vare=u._doFinalize.call(this);returne.sigBytes-=16,e}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),f.SHA384)},function(e,t,r){varn;e.exports=(n=r(0),r(8),function(e){vart=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.x64.Word,s=t.algo,u=[],c=[],f=[];!function(){for(vare=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;varn=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(vari=1,o=0;o<24;o++){for(vars=0,l=0,h=0;h<7;h++){if(1&i){varp=(1<<h)-1;p<32?l^=1<<p:s^=1<<p-32}128&i?i=i<<1^113:i<<=1}f[o]=a.create(s,l)}}();varl=[];!function(){for(vare=0;e<25;e++)l[e]=a.create()}();varh=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(vare=this._state=[],t=0;t<25;t++)e[t]=newa.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(varr=this._state,n=this.blockSize/2,i=0;i<n;i++){varo=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=r[i]).high^=a,T.low^=o}for(vars=0;s<24;s++){for(varh=0;h<5;h++){for(varp=0,d=0,y=0;y<5;y++)p^=(T=r[h+5*y]).high,d^=T.low;varg=l[h];g.high=p,g.low=d}for(h=0;h<5;h++){varv=l[(h+4)%5],_=l[(h+1)%5],m=_.high,b=_.low;for(p=v.high^(m<<1|b>>>31),d=v.low^(b<<1|m>>>31),y=0;y<5;y++)(T=r[h+5*y]).high^=p,T.low^=d}for(varw=1;w<25;w++){varS=(T=r[w]).high,E=T.low,A=u[w];A<32?(p=S<<A|E>>>32-A,d=E<<A|S>>>32-A):(p=E<<A-32|S>>>64-A,d=S<<A-32|E>>>64-A);varI=l[c[w]];I.high=p,I.low=d}varN=l[0],C=r[0];for(N.high=C.high,N.low=C.low,h=0;h<5;h++)for(y=0;y<5;y++){varT=r[w=h+5*y],R=l[w],x=l[(h+1)%5+5*y],P=l[(h+2)%5+5*y];T.high=R.high^~x.high&P.high,T.low=R.low^~x.low&P.low}T=r[0];varO=f[s];T.high^=O.high,T.low^=O.low}},_doFinalize:function(){vart=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(vara=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],f=0;f<u;f++){varl=a[f],h=l.high,p=l.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}returnnewi.init(c,s)},clone:function(){for(vare=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();returne}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),n.SHA3)},function(e,t,r){varn;e.exports=(n=r(0),/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */function(e){vart=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(varr=0;r<16;r++){varn=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}varo,a,p,b,w,S,E,A,I,N,C,T=this._hash.words,R=l.words,x=h.words,P=s.words,O=u.words,B=c.words,k=f.words;for(S=o=T[0],E=a=T[1],A=p=T[2],I=b=T[3],N=w=T[4],r=0;r<80;r+=1)C=o+e[t+P[r]]|0,C+=r<16?d(a,p,b)+R[0]:r<32?y(a,p,b)+R[1]:r<48?g(a,p,b)+R[2]:r<64?v(a,p,b)+R[3]:_(a,p,b)+R[4],C=(C=m(C|=0,B[r]))+w|0,o=w,w=b,b=m(p,10),p=a,a=C,C=S+e[t+O[r]]|0,C+=r<16?_(E,A,I)+x[0]:r<32?v(E,A,I)+x[1]:r<48?g(E,A,I)+x[2]:r<64?y(E,A,I)+x[3]:d(E,A,I)+x[4],C=(C=m(C|=0,k[r]))+N|0,S=N,N=I,I=m(A,10),A=E,E=C;C=T[1]+p+I|0,T[1]=T[2]+b+N|0,T[2]=T[3]+w+S|0,T[3]=T[4]+o+E|0,T[4]=T[0]+a+A|0,T[0]=C},_doFinalize:function(){vare=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(vari=this._hash,o=i.words,a=0;a<5;a++){vars=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}returni},clone:function(){vare=o.clone.call(this);returne._hash=this._hash.clone(),e}});functiond(e,t,r){returne^t^r}functiony(e,t,r){returne&t|~e&r}functiong(e,t,r){return(e|~t)^r}functionv(e,t,r){returne&r|t&~r}function_(e,t,r){returne^(t|~r)}functionm(e,t){returne<<t|e>>>32-t}t.RIPEMD160=o._createHelper(p),t.HmacRIPEMD160=o._createHmacHelper(p)}(Math),n.RIPEMD160)},function(e,t,r){varn,i,o,a,s,u,c,f,l;e.exports=(l=r(0),r(11),r(12),i=(n=l).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.SHA1,c=s.HMAC,f=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(varr=this.cfg,n=c.create(r.hasher,e),i=a.create(),o=a.create([1]),s=i.words,u=o.words,f=r.keySize,l=r.iterations;s.length<f;){varh=n.update(t).finalize(o);n.reset();for(varp=h.words,d=p.length,y=h,g=1;g<l;g++){y=n.finalize(y),n.reset();for(varv=y.words,_=0;_<d;_++)p[_]^=v[_]}i.concat(h),u[0]++}returni.sigBytes=4*f,i}}),n.PBKDF2=function(e,t,r){returnf.create(r).compute(e,t)},l.PBKDF2)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.mode.CFB=function(){vare=n.lib.BlockCipherMode.extend();functiont(e,t,r,n){vari,o=this._iv;o?(i=o.slice(0),this._iv=void0):i=this._prevBlock,n.encryptBlock(i,0);for(vara=0;a<r;a++)e[t+a]^=i[a]}returne.Encryptor=e.extend({processBlock:function(e,r){varn=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){varn=this._cipher,i=n.blockSize,o=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=o}}),e}(),n.mode.CFB)},function(e,t,r){varn,i,o;e.exports=(o=r(0),r(1),o.mode.CTR=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(e,t){varr=this._cipher,n=r.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void0);vara=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(vars=0;s<n;s++)e[t+s]^=a[s]}}),n.Decryptor=i,n),o.mode.CTR)},function(e,t,r){varn;e.exports=(n=r(0),r(1),/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */n.mode.CTRGladman=function(){vare=n.lib.BlockCipherMode.extend();functiont(e){if(255==(e>>24&255)){vart=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}elsee+=1<<24;returne}varr=e.Encryptor=e.extend({processBlock:function(e,r){varn=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);vars=a.slice(0);n.encryptBlock(s,0);for(varu=0;u<i;u++)e[r+u]^=s[u]}});returne.Decryptor=r,e}(),n.mode.CTRGladman)},function(e,t,r){varn,i,o;e.exports=(o=r(0),r(1),o.mode.OFB=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(e,t){varr=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void0),r.encryptBlock(o,0);for(vara=0;a<n;a++)e[t+a]^=o[a]}}),n.Decryptor=i,n),o.mode.OFB)},function(e,t,r){varn,i;e.exports=(i=r(0),r(1),i.mode.ECB=((n=i.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),i.mode.ECB)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.pad.AnsiX923={pad:function(e,t){varr=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){vart=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.pad.Iso10126={pad:function(e,t){varr=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){vart=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.pad.ZeroPadding={pad:function(e,t){varr=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){vart=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},function(e,t,r){varn;e.exports=(n=r(0),r(1),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){varn,i,o,a;e.exports=(a=r(0),r(1),i=(n=a).lib.CipherParams,o=n.enc.Hex,n.format.Hex={stringify:function(e){returne.ciphertext.toString(o)},parse:function(e){vart=o.parse(e);returni.create({ciphertext:t})}},a.format.Hex)},function(e,t,r){varn;e.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){vare=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],f=[],l=[],h=[],p=[];!function(){for(vare=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;varr=0,n=0;for(t=0;t<256;t++){vard=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;vary=e[r],g=e[y],v=e[g],_=257*e[d]^16843008*d;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,u[r]=_<<8|_>>>24,c[r]=_,_=16843009*v^65537*g^257*y^16843008*r,f[d]=_<<24|_>>>8,l[d]=_<<16|_>>>16,h[d]=_<<8|_>>>24,p[d]=_,r?(r=y^e[e[e[v^y]]],n^=e[e[n]]):r=n=1}}();vard=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(vare=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=d[a/r|0]<<24),o[a]=o[a-r]^c);for(vars=this._invKeySchedule=[],u=0;u<n;u++){if(a=n-u,u%4)varc=o[a];elsec=o[a-4];s[u]=u<4||a<=4?c:f[i[c>>>24]]^l[i[c>>>16&255]]^h[i[c>>>8&255]]^p[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){varr=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,l,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(varu=this._nRounds,c=e[t]^r[0],f=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<u;d++){vary=n[c>>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&h]^r[p++],g=n[f>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&c]^r[p++],v=n[l>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&f]^r[p++],_=n[h>>>24]^i[c>>>16&255]^o[f>>>8&255]^a[255&l]^r[p++];c=y,f=g,l=v,h=_}y=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[p++],g=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[p++],v=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^r[p++],_=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[p++],e[t]=y,e[t+1]=g,e[t+2]=v,e[t+3]=_},keySize:8});e.AES=t._createHelper(y)}(),n.AES)},function(e,t,r){varn;e.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){vare=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=o.DES=i.extend({_doReset:function(){for(vare=this._key.words,t=[],r=0;r<56;r++){varn=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(vari=this._subKeys=[],o=0;o<16;o++){varc=i[o]=[],f=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+f)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+f)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}varl=this._invSubKeys=[];for(r=0;r<16;r++)l[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(varn=0;n<16;n++){for(vari=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&f[u])>>>0];this._lBlock=a,this._rBlock=o^s}varl=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});functionh(e,t){varr=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}functionp(e,t){varr=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(l);vard=o.TripleDES=i.extend({_doReset:function(){vare=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)thrownewError("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");vart=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=l.createEncryptor(r.create(t)),this._des2=l.createEncryptor(r.create(n)),this._des3=l.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(d)}(),n.TripleDES)},function(e,t,r){varn;e.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){vare=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(vare=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(varo=0;i<256;i++){vara=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;varu=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});functiono(){for(vare=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;varo=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}returnthis._i=t,this._j=r,n}e.RC4=t._createHelper(i);vara=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(vare=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),n.RC4)},function(e,t,r){varn;e.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){vare=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.Rabbit=t.extend({_doReset:function(){for(vare=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);varn=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){varo=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=c>>>16|4294901760&f,h=f<<16|65535&c;for(i[0]^=c,i[1]^=l,i[2]^=f,i[3]^=h,i[4]^=c,i[5]^=l,i[6]^=f,i[7]^=h,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){varr=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(varn=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});functionu(){for(vare=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){varn=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)},function(e,t,r){varn;e.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){vare=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.RabbitLegacy=t.extend({_doReset:function(){vare=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(vari=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){varo=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=c>>>16|4294901760&f,h=f<<16|65535&c;for(n[0]^=c,n[1]^=l,n[2]^=f,n[3]^=h,n[4]^=c,n[5]^=l,n[6]^=f,n[7]^=h,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){varr=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(varn=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});functionu(){for(vare=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){varn=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)},function(e,t,r){(function(e){varn;/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){vari="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",l="[object Error]",h="[object Function]",p="[object GeneratorFunction]",d="[object Map]",y="[object Number]",g="[object Object]",v="[object RegExp]",_="[object Set]",m="[object String]",b="[object Symbol]",w="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",N="[object Int8Array]",C="[object Int16Array]",T="[object Int32Array]",R="[object Uint8Array]",x="[object Uint16Array]",P="[object Uint32Array]",O=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|\b__t\))\+\n'';/g,D=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,M=RegExp(D.source),j=RegExp(U.source),L=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,H=RegExp(q.source),W=/^\s+/,G=/\s/,J=/\{(?:\n\/\*\[wrapped with .+\]\*\/)?\n?/,Y=/\{\n\/\*\[wrapped with (.+)\]\*/,Z=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,X=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,se=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",de="["+he+"]",ye="["+le+"]",ge="\\d+",ve="[\\u2700-\\u27bf]",_e="[a-z\\xdf-\\xf6\\xf8-\\xff]",me="[^\\ud800-\\udfff"+he+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",be="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ie="(?:"+_e+"|"+me+")",Ne="(?:"+Ae+"|"+me+")",Ce="(?:"+ye+"|"+be+")"+"?",Te="[\\ufe0e\\ufe0f]?"+Ce+("(?:\\u200d(?:"+[we,Se,Ee].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*"),Re="(?:"+[ve,Se,Ee].join("|")+")"+Te,xe="(?:"+[we+ye+"?",ye,Se,Ee,pe].join("|")+")",Pe=RegExp("['’]","g"),Oe=RegExp(ye,"g"),Be=RegExp(be+"(?="+be+")|"+xe+Te,"g"),ke=RegExp([Ae+"?"+_e+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[de,Ae,"$"].join("|")+")",Ne+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[de,Ae+Ie,"$"].join("|")+")",Ae+"?"+Ie+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ge,Re].join("|"),"g"),De=RegExp("[\\u200d\\ud800-\\udfff"+le+"\\ufe0e\\ufe0f]"),Ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Me=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],je=-1,Le={};Le[A]=Le[I]=Le[N]=Le[C]=Le[T]=Le[R]=Le["[object Uint8ClampedArray]"]=Le[x]=Le[P]=!0,Le[s]=Le[u]=Le[S]=Le[c]=Le[E]=Le[f]=Le[l]=Le[h]=Le[d]=Le[y]=Le[g]=Le[v]=Le[_]=Le[m]=Le[w]=!1;varFe={};Fe[s]=Fe[u]=Fe[S]=Fe[E]=Fe[c]=Fe[f]=Fe[A]=Fe[I]=Fe[N]=Fe[C]=Fe[T]=Fe[d]=Fe[y]=Fe[g]=Fe[v]=Fe[_]=Fe[m]=Fe[b]=Fe[R]=Fe["[object Uint8ClampedArray]"]=Fe[x]=Fe[P]=!0,Fe[l]=Fe[h]=Fe[w]=!1;varKe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,Ve=parseInt,$e="object"==typeofglobal&&global&&global.Object===Object&&global,qe="object"==typeofself&&self&&self.Object===Object&&self,He=$e||qe||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&"object"==typeofe&&e&&!e.nodeType&&e,Je=Ge&&Ge.exports===We,Ye=Je&&$e.process,Ze=function(){try{vare=Ge&&Ge.require&&Ge.require("util").types;returne||Ye&&Ye.binding&&Ye.binding("util")}catch(e){}}(),Qe=Ze&&Ze.isArrayBuffer,Xe=Ze&&Ze.isDate,et=Ze&&Ze.isMap,tt=Ze&&Ze.isRegExp,rt=Ze&&Ze.isSet,nt=Ze&&Ze.isTypedArray;functionit(e,t,r){switch(r.length){case0:returne.call(t);case1:returne.call(t,r[0]);case2:returne.call(t,r[0],r[1]);case3:returne.call(t,r[0],r[1],r[2])}returne.apply(t,r)}functionot(e,t,r,n){for(vari=-1,o=null==e?0:e.length;++i<o;){vara=e[i];t(n,a,r(a),e)}returnn}functionat(e,t){for(varr=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););returne}functionst(e,t){for(varr=null==e?0:e.length;r--&&!1!==t(e[r],r,e););returne}functionut(e,t){for(varr=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}functionct(e,t){for(varr=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){vara=e[r];t(a,r,e)&&(o[i++]=a)}returno}functionft(e,t){return!!(null==e?0:e.length)&&bt(e,t,0)>-1}functionlt(e,t,r){for(varn=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}functionht(e,t){for(varr=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);returni}functionpt(e,t){for(varr=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];returne}functiondt(e,t,r,n){vari=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);returnr}functionyt(e,t,r,n){vari=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);returnr}functiongt(e,t){for(varr=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}varvt=At("length");function_t(e,t,r){varn;returnr(e,(function(e,r,i){if(t(e,r,i))returnn=r,!1})),n}functionmt(e,t,r,n){for(vari=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))returno;return-1}functionbt(e,t,r){returnt==t?function(e,t,r){varn=r-1,i=e.length;for(;++n<i;)if(e[n]===t)returnn;return-1}(e,t,r):mt(e,St,r)}functionwt(e,t,r,n){for(vari=r-1,o=e.length;++i<o;)if(n(e[i],t))returni;return-1}functionSt(e){returne!=e}functionEt(e,t){varr=null==e?0:e.length;returnr?Ct(e,t)/r:NaN}functionAt(e){returnfunction(t){returnnull==t?void0:t[e]}}functionIt(e){returnfunction(t){returnnull==e?void0:e[t]}}functionNt(e,t,r,n,i){returni(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}functionCt(e,t){for(varr,n=-1,i=e.length;++n<i;){varo=t(e[n]);void0!==o&&(r=void0===r?o:r+o)}returnr}functionTt(e,t){for(varr=-1,n=Array(e);++r<e;)n[r]=t(r);returnn}functionRt(e){returne?e.slice(0,Wt(e)+1).replace(W,""):e}functionxt(e){returnfunction(t){returne(t)}}functionPt(e,t){returnht(t,(function(t){returne[t]}))}functionOt(e,t){returne.has(t)}functionBt(e,t){for(varr=-1,n=e.length;++r<n&&bt(t,e[r],0)>-1;);returnr}functionkt(e,t){for(varr=e.length;r--&&bt(t,e[r],0)>-1;);returnr}functionDt(e,t){for(varr=e.length,n=0;r--;)e[r]===t&&++n;returnn}varUt=It({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mt=It({"&":"&","<":"<",">":">",'"':""","'":"'"});functionjt(e){return"\\"+Ke[e]}functionLt(e){returnDe.test(e)}functionFt(e){vart=-1,r=Array(e.size);returne.forEach((function(e,n){r[++t]=[n,e]})),r}functionKt(e,t){returnfunction(r){returne(t(r))}}functionzt(e,t){for(varr=-1,n=e.length,i=0,a=[];++r<n;){vars=e[r];s!==t&&s!==o||(e[r]=o,a[i++]=r)}returna}functionVt(e){vart=-1,r=Array(e.size);returne.forEach((function(e){r[++t]=e})),r}function$t(e){vart=-1,r=Array(e.size);returne.forEach((function(e){r[++t]=[e,e]})),r}functionqt(e){returnLt(e)?function(e){vart=Be.lastIndex=0;for(;Be.test(e);)++t;returnt}(e):vt(e)}functionHt(e){returnLt(e)?function(e){returne.match(Be)||[]}(e):function(e){returne.split("")}(e)}functionWt(e){for(vart=e.length;t--&&G.test(e.charAt(t)););returnt}varGt=It({"&":"&","<":"<",">":">",""":'"',"'":"'"});varJt=functione(t){varr,n=(t=null==t?He:Jt.defaults(He.Object(),t,Jt.pick(He,Me))).Array,G=t.Date,le=t.Error,he=t.Function,pe=t.Math,de=t.Object,ye=t.RegExp,ge=t.String,ve=t.TypeError,_e=n.prototype,me=he.prototype,be=de.prototype,we=t["__core-js_shared__"],Se=me.toString,Ee=be.hasOwnProperty,Ae=0,Ie=(r=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ne=be.toString,Ce=Se.call(de),Te=He._,Re=ye("^"+Se.call(Ee).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=Je?t.Buffer:void0,Be=t.Symbol,De=t.Uint8Array,Ke=xe?xe.allocUnsafe:void0,$e=Kt(de.getPrototypeOf,de),qe=de.create,We=be.propertyIsEnumerable,Ge=_e.splice,Ye=Be?Be.isConcatSpreadable:void0,Ze=Be?Be.iterator:void0,vt=Be?Be.toStringTag:void0,It=function(){try{vare=eo(de,"defineProperty");returne({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==He.clearTimeout&&t.clearTimeout,Zt=G&&G.now!==He.Date.now&&G.now,Qt=t.setTimeout!==He.setTimeout&&t.setTimeout,Xt=pe.ceil,er=pe.floor,tr=de.getOwnPropertySymbols,rr=xe?xe.isBuffer:void0,nr=t.isFinite,ir=_e.join,or=Kt(de.keys,de),ar=pe.max,sr=pe.min,ur=G.now,cr=t.parseInt,fr=pe.random,lr=_e.reverse,hr=eo(t,"DataView"),pr=eo(t,"Map"),dr=eo(t,"Promise"),yr=eo(t,"Set"),gr=eo(t,"WeakMap"),vr=eo(de,"create"),_r=gr&&newgr,mr={},br=To(hr),wr=To(pr),Sr=To(dr),Er=To(yr),Ar=To(gr),Ir=Be?Be.prototype:void0,Nr=Ir?Ir.valueOf:void0,Cr=Ir?Ir.toString:void0;functionTr(e){if(qa(e)&&!ka(e)&&!(einstanceofOr)){if(einstanceofPr)returne;if(Ee.call(e,"__wrapped__"))returnRo(e)}returnnewPr(e)}varRr=function(){functione(){}returnfunction(t){if(!$a(t))return{};if(qe)returnqe(t);e.prototype=t;varr=newe;returne.prototype=void0,r}}();functionxr(){}functionPr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void0}functionOr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}functionBr(e){vart=-1,r=null==e?0:e.length;for(this.clear();++t<r;){varn=e[t];this.set(n[0],n[1])}}functionkr(e){vart=-1,r=null==e?0:e.length;for(this.clear();++t<r;){varn=e[t];this.set(n[0],n[1])}}functionDr(e){vart=-1,r=null==e?0:e.length;for(this.clear();++t<r;){varn=e[t];this.set(n[0],n[1])}}functionUr(e){vart=-1,r=null==e?0:e.length;for(this.__data__=newDr;++t<r;)this.add(e[t])}functionMr(e){vart=this.__data__=newkr(e);this.size=t.size}functionjr(e,t){varr=ka(e),n=!r&&Ba(e),i=!r&&!n&&ja(e),o=!r&&!n&&!i&&Xa(e),a=r||n||i||o,s=a?Tt(e.length,ge):[],u=s.length;for(varcine)!t&&!Ee.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||so(c,u))||s.push(c);returns}functionLr(e){vart=e.length;returnt?e[Mn(0,t-1)]:void0}functionFr(e,t){returnIo(_i(e),Jr(t,0,e.length))}functionKr(e){returnIo(_i(e))}functionzr(e,t,r){(void0!==r&&!xa(e[t],r)||void0===r&&!(tine))&&Wr(e,t,r)}functionVr(e,t,r){varn=e[t];Ee.call(e,t)&&xa(n,r)&&(void0!==r||tine)||Wr(e,t,r)}function$r(e,t){for(varr=e.length;r--;)if(xa(e[r][0],t))returnr;return-1}functionqr(e,t,r,n){returnen(e,(function(e,i,o){t(n,e,r(e),o)})),n}functionHr(e,t){returne&&mi(t,ws(t),e)}functionWr(e,t,r){"__proto__"==t&&It?It(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}functionGr(e,t){for(varr=-1,i=t.length,o=n(i),a=null==e;++r<i;)o[r]=a?void0:gs(e,t[r]);returno}functionJr(e,t,r){returne==e&&(void0!==r&&(e=e<=r?e:r),void0!==t&&(e=e>=t?e:t)),e}functionYr(e,t,r,n,i,o){vara,u=1&t,l=2&t,w=4&t;if(r&&(a=i?r(e,n,i,o):r(e)),void0!==a)returna;if(!$a(e))returne;varO=ka(e);if(O){if(a=function(e){vart=e.length,r=newe.constructor(t);t&&"string"==typeofe[0]&&Ee.call(e,"index")&&(r.index=e.index,r.input=e.input);returnr}(e),!u)return_i(e,a)}else{varB=no(e),k=B==h||B==p;if(ja(e))returnhi(e,u);if(B==g||B==s||k&&!i){if(a=l||k?{}:oo(e),!u)returnl?function(e,t){returnmi(e,ro(e),t)}(e,function(e,t){returne&&mi(t,Ss(t),e)}(a,e)):function(e,t){returnmi(e,to(e),t)}(e,Hr(a,e))}else{if(!Fe[B])returni?e:{};a=function(e,t,r){varn=e.constructor;switch(t){caseS:returnpi(e);casec:casef:returnnewn(+e);caseE:returnfunction(e,t){varr=t?pi(e.buffer):e.buffer;returnnewe.constructor(r,e.byteOffset,e.byteLength)}(e,r);caseA:caseI:caseN:caseC:caseT:caseR:case"[object Uint8ClampedArray]":casex:caseP:returndi(e,r);cased:returnnewn;casey:casem:returnnewn(e);casev:returnfunction(e){vart=newe.constructor(e.source,re.exec(e));returnt.lastIndex=e.lastIndex,t}(e);case_:returnnewn;caseb:returni=e,Nr?de(Nr.call(i)):{}}vari}(e,B,u)}}o||(o=newMr);varD=o.get(e);if(D)returnD;o.set(e,a),Ya(e)?e.forEach((function(n){a.add(Yr(n,t,r,n,e,o))})):Ha(e)&&e.forEach((function(n,i){a.set(i,Yr(n,t,r,i,e,o))}));varU=O?void0:(w?l?Wi:Hi:l?Ss:ws)(e);returnat(U||e,(function(n,i){U&&(n=e[i=n]),Vr(a,i,Yr(n,t,r,i,e,o))})),a}functionZr(e,t,r){varn=r.length;if(null==e)return!n;for(e=de(e);n--;){vari=r[n],o=t[i],a=e[i];if(void0===a&&!(iine)||!o(a))return!1}return!0}functionQr(e,t,r){if("function"!=typeofe)thrownewve(i);returnwo((function(){e.apply(void0,r)}),t)}functionXr(e,t,r,n){vari=-1,o=ft,a=!0,s=e.length,u=[],c=t.length;if(!s)returnu;r&&(t=ht(t,xt(r))),n?(o=lt,a=!1):t.length>=200&&(o=Ot,a=!1,t=newUr(t));e:for(;++i<s;){varf=e[i],l=null==r?f:r(f);if(f=n||0!==f?f:0,a&&l==l){for(varh=c;h--;)if(t[h]===l)continuee;u.push(f)}elseo(t,l,n)||u.push(f)}returnu}Tr.templateSettings={escape:L,evaluate:F,interpolate:K,variable:"",imports:{_:Tr}},Tr.prototype=xr.prototype,Tr.prototype.constructor=Tr,Pr.prototype=Rr(xr.prototype),Pr.prototype.constructor=Pr,Or.prototype=Rr(xr.prototype),Or.prototype.constructor=Or,Br.prototype.clear=function(){this.__data__=vr?vr(null):{},this.size=0},Br.prototype.delete=function(e){vart=this.has(e)&&deletethis.__data__[e];returnthis.size-=t?1:0,t},Br.prototype.get=function(e){vart=this.__data__;if(vr){varr=t[e];return"__lodash_hash_undefined__"===r?void0:r}returnEe.call(t,e)?t[e]:void0},Br.prototype.has=function(e){vart=this.__data__;returnvr?void0!==t[e]:Ee.call(t,e)},Br.prototype.set=function(e,t){varr=this.__data__;returnthis.size+=this.has(e)?0:1,r[e]=vr&&void0===t?"__lodash_hash_undefined__":t,this},kr.prototype.clear=function(){this.__data__=[],this.size=0},kr.prototype.delete=function(e){vart=this.__data__,r=$r(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ge.call(t,r,1),--this.size,!0)},kr.prototype.get=function(e){vart=this.__data__,r=$r(t,e);returnr<0?void0:t[r][1]},kr.prototype.has=function(e){return$r(this.__data__,e)>-1},kr.prototype.set=function(e,t){varr=this.__data__,n=$r(r,e);returnn<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:newBr,map:new(pr||kr),string:newBr}},Dr.prototype.delete=function(e){vart=Qi(this,e).delete(e);returnthis.size-=t?1:0,t},Dr.prototype.get=function(e){returnQi(this,e).get(e)},Dr.prototype.has=function(e){returnQi(this,e).has(e)},Dr.prototype.set=function(e,t){varr=Qi(this,e),n=r.size;returnr.set(e,t),this.size+=r.size==n?0:1,this},Ur.prototype.add=Ur.prototype.push=function(e){returnthis.__data__.set(e,"__lodash_hash_undefined__"),this},Ur.prototype.has=function(e){returnthis.__data__.has(e)},Mr.prototype.clear=function(){this.__data__=newkr,this.size=0},Mr.prototype.delete=function(e){vart=this.__data__,r=t.delete(e);returnthis.size=t.size,r},Mr.prototype.get=function(e){returnthis.__data__.get(e)},Mr.prototype.has=function(e){returnthis.__data__.has(e)},Mr.prototype.set=function(e,t){varr=this.__data__;if(rinstanceofkr){varn=r.__data__;if(!pr||n.length<199)returnn.push([e,t]),this.size=++r.size,this;r=this.__data__=newDr(n)}returnr.set(e,t),this.size=r.size,this};varen=Si(cn),tn=Si(fn,!0);functionrn(e,t){varr=!0;returnen(e,(function(e,n,i){returnr=!!t(e,n,i)})),r}functionnn(e,t,r){for(varn=-1,i=e.length;++n<i;){varo=e[n],a=t(o);if(null!=a&&(void0===s?a==a&&!Qa(a):r(a,s)))vars=a,u=o}returnu}functionon(e,t){varr=[];returnen(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}functionan(e,t,r,n,i){varo=-1,a=e.length;for(r||(r=ao),i||(i=[]);++o<a;){vars=e[o];t>0&&r(s)?t>1?an(s,t-1,r,n,i):pt(i,s):n||(i[i.length]=s)}returni}varsn=Ei(),un=Ei(!0);functioncn(e,t){returne&&sn(e,t,ws)}functionfn(e,t){returne&&un(e,t,ws)}functionln(e,t){returnct(t,(function(t){returnKa(e[t])}))}functionhn(e,t){for(varr=0,n=(t=ui(t,e)).length;null!=e&&r<n;)e=e[Co(t[r++])];returnr&&r==n?e:void0}functionpn(e,t,r){varn=t(e);returnka(e)?n:pt(n,r(e))}functiondn(e){returnnull==e?void0===e?"[object Undefined]":"[object Null]":vt&&vtinde(e)?function(e){vart=Ee.call(e,vt),r=e[vt];try{e[vt]=void0;varn=!0}catch(e){}vari=Ne.call(e);n&&(t?e[vt]=r:deletee[vt]);returni}(e):function(e){returnNe.call(e)}(e)}functionyn(e,t){returne>t}functiongn(e,t){returnnull!=e&&Ee.call(e,t)}functionvn(e,t){returnnull!=e&&tinde(e)}function_n(e,t,r){for(vari=r?lt:ft,o=e[0].length,a=e.length,s=a,u=n(a),c=1/0,f=[];s--;){varl=e[s];s&&t&&(l=ht(l,xt(t))),c=sr(l.length,c),u[s]=!r&&(t||o>=120&&l.length>=120)?newUr(s&&l):void0}l=e[0];varh=-1,p=u[0];e:for(;++h<o&&f.length<c;){vard=l[h],y=t?t(d):d;if(d=r||0!==d?d:0,!(p?Ot(p,y):i(f,y,r))){for(s=a;--s;){varg=u[s];if(!(g?Ot(g,y):i(e[s],y,r)))continuee}p&&p.push(y),f.push(d)}}returnf}functionmn(e,t,r){varn=null==(e=vo(e,t=ui(t,e)))?e:e[Co(Fo(t))];returnnull==n?void0:it(n,e,r)}functionbn(e){returnqa(e)&&dn(e)==s}functionwn(e,t,r,n,i){returne===t||(null==e||null==t||!qa(e)&&!qa(t)?e!=e&&t!=t:function(e,t,r,n,i,o){vara=ka(e),h=ka(t),p=a?u:no(e),w=h?u:no(t),A=(p=p==s?g:p)==g,I=(w=w==s?g:w)==g,N=p==w;if(N&&ja(e)){if(!ja(t))return!1;a=!0,A=!1}if(N&&!A)returno||(o=newMr),a||Xa(e)?$i(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){caseE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;caseS:return!(e.byteLength!=t.byteLength||!o(newDe(e),newDe(t)));casec:casef:casey:returnxa(+e,+t);casel:returne.name==t.name&&e.message==t.message;casev:casem:returne==t+"";cased:vars=Ft;case_:varu=1&n;if(s||(s=Vt),e.size!=t.size&&!u)return!1;varh=a.get(e);if(h)returnh==t;n|=2,a.set(e,t);varp=$i(s(e),s(t),n,i,o,a);returna.delete(e),p;caseb:if(Nr)returnNr.call(e)==Nr.call(t)}return!1}(e,t,p,r,n,i,o);if(!(1&r)){varC=A&&Ee.call(e,"__wrapped__"),T=I&&Ee.call(t,"__wrapped__");if(C||T){varR=C?e.value():e,x=T?t.value():t;returno||(o=newMr),i(R,x,r,n,o)}}if(!N)return!1;returno||(o=newMr),function(e,t,r,n,i,o){vara=1&r,s=Hi(e),u=s.length,c=Hi(t).length;if(u!=c&&!a)return!1;varf=u;for(;f--;){varl=s[f];if(!(a?lint:Ee.call(t,l)))return!1}varh=o.get(e),p=o.get(t);if(h&&p)returnh==t&&p==e;vard=!0;o.set(e,t),o.set(t,e);vary=a;for(;++f<u;){l=s[f];varg=e[l],v=t[l];if(n)var_=a?n(v,g,l,t,e,o):n(g,v,l,e,t,o);if(!(void0===_?g===v||i(g,v,r,n,o):_)){d=!1;break}y||(y="constructor"==l)}if(d&&!y){varm=e.constructor,b=t.constructor;m==b||!("constructor"ine)||!("constructor"int)||"function"==typeofm&&minstanceofm&&"function"==typeofb&&binstanceofb||(d=!1)}returno.delete(e),o.delete(t),d}(e,t,r,n,i,o)}(e,t,r,n,wn,i))}functionSn(e,t,r,n){vari=r.length,o=i,a=!n;if(null==e)return!o;for(e=de(e);i--;){vars=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]ine))return!1}for(;++i<o;){varu=(s=r[i])[0],c=e[u],f=s[1];if(a&&s[2]){if(void0===c&&!(uine))return!1}else{varl=newMr;if(n)varh=n(c,f,u,e,t,l);if(!(void0===h?wn(f,c,3,n,l):h))return!1}}return!0}functionEn(e){return!(!$a(e)||(t=e,Ie&&Ieint))&&(Ka(e)?Re:oe).test(To(e));vart}functionAn(e){return"function"==typeofe?e:null==e?Ws:"object"==typeofe?ka(e)?xn(e[0],e[1]):Rn(e):ru(e)}functionIn(e){if(!ho(e))returnor(e);vart=[];for(varrinde(e))Ee.call(e,r)&&"constructor"!=r&&t.push(r);returnt}functionNn(e){if(!$a(e))returnfunction(e){vart=[];if(null!=e)for(varrinde(e))t.push(r);returnt}(e);vart=ho(e),r=[];for(varnine)("constructor"!=n||!t&&Ee.call(e,n))&&r.push(n);returnr}functionCn(e,t){returne<t}functionTn(e,t){varr=-1,i=Ua(e)?n(e.length):[];returnen(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}functionRn(e){vart=Xi(e);return1==t.length&&t[0][2]?yo(t[0][0],t[0][1]):function(r){returnr===e||Sn(r,e,t)}}functionxn(e,t){returnco(e)&&po(t)?yo(Co(e),t):function(r){varn=gs(r,e);returnvoid0===n&&n===t?vs(r,e):wn(t,n,3)}}functionPn(e,t,r,n,i){e!==t&&sn(t,(function(o,a){if(i||(i=newMr),$a(o))!function(e,t,r,n,i,o,a){vars=mo(e,r),u=mo(t,r),c=a.get(u);if(c)returnvoidzr(e,r,c);varf=o?o(s,u,r+"",e,t,a):void0,l=void0===f;if(l){varh=ka(u),p=!h&&ja(u),d=!h&&!p&&Xa(u);f=u,h||p||d?ka(s)?f=s:Ma(s)?f=_i(s):p?(l=!1,f=hi(u,!0)):d?(l=!1,f=di(u,!0)):f=[]:Ga(u)||Ba(u)?(f=s,Ba(s)?f=ss(s):$a(s)&&!Ka(s)||(f=oo(u))):l=!1}l&&(a.set(u,f),i(f,u,n,o,a),a.delete(u));zr(e,r,f)}(e,t,a,r,Pn,n,i);else{vars=n?n(mo(e,a),o,a+"",e,t,i):void0;void0===s&&(s=o),zr(e,a,s)}}),Ss)}functionOn(e,t){varr=e.length;if(r)returnso(t+=t<0?r:0,r)?e[t]:void0}functionBn(e,t,r){t=t.length?ht(t,(function(e){returnka(e)?function(t){returnhn(t,1===e.length?e[0]:e)}:e})):[Ws];varn=-1;returnt=ht(t,xt(Zi())),function(e,t){varr=e.length;for(e.sort(t);r--;)e[r]=e[r].value;returne}(Tn(e,(function(e,r,i){return{criteria:ht(t,(function(t){returnt(e)})),index:++n,value:e}})),(function(e,t){returnfunction(e,t,r){varn=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;for(;++n<a;){varu=yi(i[n],o[n]);if(u){if(n>=s)returnu;varc=r[n];returnu*("desc"==c?-1:1)}}returne.index-t.index}(e,t,r)}))}functionkn(e,t,r){for(varn=-1,i=t.length,o={};++n<i;){vara=t[n],s=hn(e,a);r(s,a)&&zn(o,ui(a,e),s)}returno}functionDn(e,t,r,n){vari=n?wt:bt,o=-1,a=t.length,s=e;for(e===t&&(t=_i(t)),r&&(s=ht(e,xt(r)));++o<a;)for(varu=0,c=t[o],f=r?r(c):c;(u=i(s,f,u,n))>-1;)s!==e&&Ge.call(s,u,1),Ge.call(e,u,1);returne}functionUn(e,t){for(varr=e?t.length:0,n=r-1;r--;){vari=t[r];if(r==n||i!==o){varo=i;so(i)?Ge.call(e,i,1):ei(e,i)}}returne}functionMn(e,t){returne+er(fr()*(t-e+1))}functionjn(e,t){varr="";if(!e||t<1||t>9007199254740991)returnr;do{t%2&&(r+=e),(t=er(t/2))&&(e+=e)}while(t);returnr}functionLn(e,t){returnSo(go(e,t,Ws),e+"")}functionFn(e){returnLr(xs(e))}functionKn(e,t){varr=xs(e);returnIo(r,Jr(t,0,r.length))}functionzn(e,t,r,n){if(!$a(e))returne;for(vari=-1,o=(t=ui(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){varu=Co(t[i]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)returne;if(i!=a){varf=s[u];void0===(c=n?n(f,u,s):void0)&&(c=$a(f)?f:so(t[i+1])?[]:{})}Vr(s,u,c),s=s[u]}returne}varVn=_r?function(e,t){return_r.set(e,t),e}:Ws,$n=It?function(e,t){returnIt(e,"toString",{configurable:!0,enumerable:!1,value:$s(t),writable:!0})}:Ws;functionqn(e){returnIo(xs(e))}functionHn(e,t,r){vari=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(vara=n(o);++i<o;)a[i]=e[i+t];returna}functionWn(e,t){varr;returnen(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}functionGn(e,t,r){varn=0,i=null==e?n:e.length;if("number"==typeoft&&t==t&&i<=2147483647){for(;n<i;){varo=n+i>>>1,a=e[o];null!==a&&!Qa(a)&&(r?a<=t:a<t)?n=o+1:i=o}returni}returnJn(e,t,Ws,r)}functionJn(e,t,r,n){vari=0,o=null==e?0:e.length;if(0===o)return0;for(vara=(t=r(t))!=t,s=null===t,u=Qa(t),c=void0===t;i<o;){varf=er((i+o)/2),l=r(e[f]),h=void0!==l,p=null===l,d=l==l,y=Qa(l);if(a)varg=n||d;elseg=c?d&&(n||h):s?d&&h&&(n||!p):u?d&&h&&!p&&(n||!y):!p&&!y&&(n?l<=t:l<t);g?i=f+1:o=f}returnsr(o,4294967294)}functionYn(e,t){for(varr=-1,n=e.length,i=0,o=[];++r<n;){vara=e[r],s=t?t(a):a;if(!r||!xa(s,u)){varu=s;o[i++]=0===a?0:a}}returno}functionZn(e){return"number"==typeofe?e:Qa(e)?NaN:+e}functionQn(e){if("string"==typeofe)returne;if(ka(e))returnht(e,Qn)+"";if(Qa(e))returnCr?Cr.call(e):"";vart=e+"";return"0"==t&&1/e==-1/0?"-0":t}functionXn(e,t,r){varn=-1,i=ft,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=lt;elseif(o>=200){varc=t?null:ji(e);if(c)returnVt(c);a=!1,i=Ot,u=newUr}elseu=t?[]:s;e:for(;++n<o;){varf=e[n],l=t?t(f):f;if(f=r||0!==f?f:0,a&&l==l){for(varh=u.length;h--;)if(u[h]===l)continuee;t&&u.push(l),s.push(f)}elsei(u,l,r)||(u!==s&&u.push(l),s.push(f))}returns}functionei(e,t){returnnull==(e=vo(e,t=ui(t,e)))||deletee[Co(Fo(t))]}functionti(e,t,r,n){returnzn(e,t,r(hn(e,t)),n)}functionri(e,t,r,n){for(vari=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););returnr?Hn(e,n?0:o,n?o+1:i):Hn(e,n?o+1:0,n?i:o)}functionni(e,t){varr=e;returnrinstanceofOr&&(r=r.value()),dt(t,(function(e,t){returnt.func.apply(t.thisArg,pt([e],t.args))}),r)}functionii(e,t,r){vari=e.length;if(i<2)returni?Xn(e[0]):[];for(varo=-1,a=n(i);++o<i;)for(vars=e[o],u=-1;++u<i;)u!=o&&(a[o]=Xr(a[o]||s,e[u],t,r));returnXn(an(a,1),t,r)}functionoi(e,t,r){for(varn=-1,i=e.length,o=t.length,a={};++n<i;){vars=n<o?t[n]:void0;r(a,e[n],s)}returna}functionai(e){returnMa(e)?e:[]}functionsi(e){return"function"==typeofe?e:Ws}functionui(e,t){returnka(e)?e:co(e,t)?[e]:No(us(e))}varci=Ln;functionfi(e,t,r){varn=e.length;returnr=void0===r?n:r,!t&&r>=n?e:Hn(e,t,r)}varli=Yt||function(e){returnHe.clearTimeout(e)};functionhi(e,t){if(t)returne.slice();varr=e.length,n=Ke?Ke(r):newe.constructor(r);returne.copy(n),n}functionpi(e){vart=newe.constructor(e.byteLength);returnnewDe(t).set(newDe(e)),t}functiondi(e,t){varr=t?pi(e.buffer):e.buffer;returnnewe.constructor(r,e.byteOffset,e.length)}functionyi(e,t){if(e!==t){varr=void0!==e,n=null===e,i=e==e,o=Qa(e),a=void0!==t,s=null===t,u=t==t,c=Qa(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!i)return1;if(!n&&!o&&!c&&e<t||c&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!u)return-1}return0}functiongi(e,t,r,i){for(varo=-1,a=e.length,s=r.length,u=-1,c=t.length,f=ar(a-s,0),l=n(c+f),h=!i;++u<c;)l[u]=t[u];for(;++o<s;)(h||o<a)&&(l[r[o]]=e[o]);for(;f--;)l[u++]=e[o++];returnl}functionvi(e,t,r,i){for(varo=-1,a=e.length,s=-1,u=r.length,c=-1,f=t.length,l=ar(a-u,0),h=n(l+f),p=!i;++o<l;)h[o]=e[o];for(vard=o;++c<f;)h[d+c]=t[c];for(;++s<u;)(p||o<a)&&(h[d+r[s]]=e[o++]);returnh}function_i(e,t){varr=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];returnt}functionmi(e,t,r,n){vari=!r;r||(r={});for(varo=-1,a=t.length;++o<a;){vars=t[o],u=n?n(r[s],e[s],s,r,e):void0;void0===u&&(u=e[s]),i?Wr(r,s,u):Vr(r,s,u)}returnr}functionbi(e,t){returnfunction(r,n){vari=ka(r)?ot:qr,o=t?t():{};returni(r,e,Zi(n,2),o)}}functionwi(e){returnLn((function(t,r){varn=-1,i=r.length,o=i>1?r[i-1]:void0,a=i>2?r[2]:void0;for(o=e.length>3&&"function"==typeofo?(i--,o):void0,a&&uo(r[0],r[1],a)&&(o=i<3?void0:o,i=1),t=de(t);++n<i;){vars=r[n];s&&e(t,s,n,o)}returnt}))}functionSi(e,t){returnfunction(r,n){if(null==r)returnr;if(!Ua(r))returne(r,n);for(vari=r.length,o=t?i:-1,a=de(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););returnr}}functionEi(e){returnfunction(t,r,n){for(vari=-1,o=de(t),a=n(t),s=a.length;s--;){varu=a[e?s:++i];if(!1===r(o[u],u,o))break}returnt}}functionAi(e){returnfunction(t){varr=Lt(t=us(t))?Ht(t):void0,n=r?r[0]:t.charAt(0),i=r?fi(r,1).join(""):t.slice(1);returnn[e]()+i}}functionIi(e){returnfunction(t){returndt(Ks(Bs(t).replace(Pe,"")),e,"")}}functionNi(e){returnfunction(){vart=arguments;switch(t.length){case0:returnnewe;case1:returnnewe(t[0]);case2:returnnewe(t[0],t[1]);case3:returnnewe(t[0],t[1],t[2]);case4:returnnewe(t[0],t[1],t[2],t[3]);case5:returnnewe(t[0],t[1],t[2],t[3],t[4]);case6:returnnewe(t[0],t[1],t[2],t[3],t[4],t[5]);case7:returnnewe(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}varr=Rr(e.prototype),n=e.apply(r,t);return$a(n)?n:r}}functionCi(e){returnfunction(t,r,n){vari=de(t);if(!Ua(t)){varo=Zi(r,3);t=ws(t),r=function(e){returno(i[e],e,i)}}vara=e(t,r,n);returna>-1?i[o?t[a]:a]:void0}}functionTi(e){returnqi((function(t){varr=t.length,n=r,o=Pr.prototype.thru;for(e&&t.reverse();n--;){vara=t[n];if("function"!=typeofa)thrownewve(i);if(o&&!s&&"wrapper"==Ji(a))vars=newPr([],!0)}for(n=s?n:r;++n<r;){varu=Ji(a=t[n]),c="wrapper"==u?Gi(a):void0;s=c&&fo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Ji(c[0])].apply(s,c[3]):1==a.length&&fo(a)?s[u]():s.thru(a)}returnfunction(){vare=arguments,n=e[0];if(s&&1==e.length&&ka(n))returns.plant(n).value();for(vari=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);returno}}))}functionRi(e,t,r,i,o,a,s,u,c,f){varl=128&t,h=1&t,p=2&t,d=24&t,y=512&t,g=p?void0:Ni(e);returnfunctionv(){for(var_=arguments.length,m=n(_),b=_;b--;)m[b]=arguments[b];if(d)varw=Yi(v),S=Dt(m,w);if(i&&(m=gi(m,i,o,d)),a&&(m=vi(m,a,s,d)),_-=S,d&&_<f){varE=zt(m,w);returnUi(e,t,Ri,v.placeholder,r,m,E,u,c,f-_)}varA=h?r:this,I=p?A[e]:e;return_=m.length,u?m=_o(m,u):y&&_>1&&m.reverse(),l&&c<_&&(m.length=c),this&&this!==He&&thisinstanceofv&&(I=g||Ni(I)),I.apply(A,m)}}functionxi(e,t){returnfunction(r,n){returnfunction(e,t,r,n){returncn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}functionPi(e,t){returnfunction(r,n){vari;if(void0===r&&void0===n)returnt;if(void0!==r&&(i=r),void0!==n){if(void0===i)returnn;"string"==typeofr||"string"==typeofn?(r=Qn(r),n=Qn(n)):(r=Zn(r),n=Zn(n)),i=e(r,n)}returni}}functionOi(e){returnqi((function(t){returnt=ht(t,xt(Zi())),Ln((function(r){varn=this;returne(t,(function(e){returnit(e,n,r)}))}))}))}functionBi(e,t){varr=(t=void0===t?"":Qn(t)).length;if(r<2)returnr?jn(t,e):t;varn=jn(t,Xt(e/qt(t)));returnLt(t)?fi(Ht(n),0,e).join(""):n.slice(0,e)}functionki(e){returnfunction(t,r,i){returni&&"number"!=typeofi&&uo(t,r,i)&&(r=i=void0),t=ns(t),void0===r?(r=t,t=0):r=ns(r),function(e,t,r,i){for(varo=-1,a=ar(Xt((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;returns}(t,r,i=void0===i?t<r?1:-1:ns(i),e)}}functionDi(e){returnfunction(t,r){return"string"==typeoft&&"string"==typeofr||(t=as(t),r=as(r)),e(t,r)}}functionUi(e,t,r,n,i,o,a,s,u,c){varf=8&t;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);varl=[e,t,i,f?o:void0,f?a:void0,f?void0:o,f?void0:a,s,u,c],h=r.apply(void0,l);returnfo(e)&&bo(h,l),h.placeholder=n,Eo(h,e,t)}functionMi(e){vart=pe[e];returnfunction(e,r){if(e=as(e),(r=null==r?0:sr(is(r),292))&&nr(e)){varn=(us(e)+"e").split("e");return+((n=(us(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}returnt(e)}}varji=yr&&1/Vt(newyr([,-0]))[1]==1/0?function(e){returnnewyr(e)}:Qs;functionLi(e){returnfunction(t){varr=no(t);returnr==d?Ft(t):r==_?$t(t):function(e,t){returnht(t,(function(t){return[t,e[t]]}))}(t,e(t))}}functionFi(e,t,r,a,s,u,c,f){varl=2&t;if(!l&&"function"!=typeofe)thrownewve(i);varh=a?a.length:0;if(h||(t&=-97,a=s=void0),c=void0===c?c:ar(is(c),0),f=void0===f?f:is(f),h-=s?s.length:0,64&t){varp=a,d=s;a=s=void0}vary=l?void0:Gi(e),g=[e,t,r,a,s,p,d,u,c,f];if(y&&function(e,t){varr=e[1],n=t[1],i=r|n,a=i<131,s=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!a&&!s)returne;1&n&&(e[2]=t[2],i|=1&r?0:4);varu=t[3];if(u){varc=e[3];e[3]=c?gi(c,u,t[4]):u,e[4]=c?zt(e[3],o):t[4]}(u=t[5])&&(c=e[5],e[5]=c?vi(c,u,t[6]):u,e[6]=c?zt(e[5],o):t[6]);(u=t[7])&&(e[7]=u);128&n&&(e[8]=null==e[8]?t[8]:sr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(g,y),e=g[0],t=g[1],r=g[2],a=g[3],s=g[4],!(f=g[9]=void0===g[9]?l?0:e.length:ar(g[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,r){vari=Ni(e);returnfunctiono(){for(vara=arguments.length,s=n(a),u=a,c=Yi(o);u--;)s[u]=arguments[u];varf=a<3&&s[0]!==c&&s[a-1]!==c?[]:zt(s,c);if((a-=f.length)<r)returnUi(e,t,Ri,o.placeholder,void0,s,f,void0,void0,r-a);varl=this&&this!==He&&thisinstanceofo?i:e;returnit(l,this,s)}}(e,t,f):32!=t&&33!=t||s.length?Ri.apply(void0,g):function(e,t,r,i){varo=1&t,a=Ni(e);returnfunctiont(){for(vars=-1,u=arguments.length,c=-1,f=i.length,l=n(f+u),h=this&&this!==He&&thisinstanceoft?a:e;++c<f;)l[c]=i[c];for(;u--;)l[c++]=arguments[++s];returnit(h,o?r:this,l)}}(e,t,r,a);elsevarv=function(e,t,r){varn=1&t,i=Ni(e);returnfunctiont(){varo=this&&this!==He&&thisinstanceoft?i:e;returno.apply(n?r:this,arguments)}}(e,t,r);returnEo((y?Vn:bo)(v,g),e,t)}functionKi(e,t,r,n){returnvoid0===e||xa(e,be[r])&&!Ee.call(n,r)?t:e}functionzi(e,t,r,n,i,o){return$a(e)&&$a(t)&&(o.set(t,e),Pn(e,t,void0,zi,o),o.delete(t)),e}functionVi(e){returnGa(e)?void0:e}function$i(e,t,r,n,i,o){vara=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;varc=o.get(e),f=o.get(t);if(c&&f)returnc==t&&f==e;varl=-1,h=!0,p=2&r?newUr:void0;for(o.set(e,t),o.set(t,e);++l<s;){vard=e[l],y=t[l];if(n)varg=a?n(y,d,l,t,e,o):n(d,y,l,e,t,o);if(void0!==g){if(g)continue;h=!1;break}if(p){if(!gt(t,(function(e,t){if(!Ot(p,t)&&(d===e||i(d,e,r,n,o)))returnp.push(t)}))){h=!1;break}}elseif(d!==y&&!i(d,y,r,n,o)){h=!1;break}}returno.delete(e),o.delete(t),h}functionqi(e){returnSo(go(e,void0,Do),e+"")}functionHi(e){returnpn(e,ws,to)}functionWi(e){returnpn(e,Ss,ro)}varGi=_r?function(e){return_r.get(e)}:Qs;functionJi(e){for(vart=e.name+"",r=mr[t],n=Ee.call(mr,t)?r.length:0;n--;){vari=r[n],o=i.func;if(null==o||o==e)returni.name}returnt}functionYi(e){return(Ee.call(Tr,"placeholder")?Tr:e).placeholder}functionZi(){vare=Tr.iteratee||Gs;returne=e===Gs?An:e,arguments.length?e(arguments[0],arguments[1]):e}functionQi(e,t){varr,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeoft?"string":"hash"]:i.map}functionXi(e){for(vart=ws(e),r=t.length;r--;){varn=t[r],i=e[n];t[r]=[n,i,po(i)]}returnt}functioneo(e,t){varr=function(e,t){returnnull==e?void0:e[t]}(e,t);returnEn(r)?r:void0}varto=tr?function(e){returnnull==e?[]:(e=de(e),ct(tr(e),(function(t){returnWe.call(e,t)})))}:ou,ro=tr?function(e){for(vart=[];e;)pt(t,to(e)),e=$e(e);returnt}:ou,no=dn;functionio(e,t,r){for(varn=-1,i=(t=ui(t,e)).length,o=!1;++n<i;){vara=Co(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}returno||++n!=i?o:!!(i=null==e?0:e.length)&&Va(i)&&so(a,i)&&(ka(e)||Ba(e))}functionoo(e){return"function"!=typeofe.constructor||ho(e)?{}:Rr($e(e))}functionao(e){returnka(e)||Ba(e)||!!(Ye&&e&&e[Ye])}functionso(e,t){varr=typeofe;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&se.test(e))&&e>-1&&e%1==0&&e<t}functionuo(e,t,r){if(!$a(r))return!1;varn=typeoft;return!!("number"==n?Ua(r)&&so(t,r.length):"string"==n&&tinr)&&xa(r[t],e)}functionco(e,t){if(ka(e))return!1;varr=typeofe;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Qa(e))||(V.test(e)||!z.test(e)||null!=t&&einde(t))}functionfo(e){vart=Ji(e),r=Tr[t];if("function"!=typeofr||!(tinOr.prototype))return!1;if(e===r)return!0;varn=Gi(r);return!!n&&e===n[0]}(hr&&no(newhr(newArrayBuffer(1)))!=E||pr&&no(newpr)!=d||dr&&"[object Promise]"!=no(dr.resolve())||yr&&no(newyr)!=_||gr&&no(newgr)!=w)&&(no=function(e){vart=dn(e),r=t==g?e.constructor:void0,n=r?To(r):"";if(n)switch(n){casebr:returnE;casewr:returnd;caseSr:return"[object Promise]";caseEr:return_;caseAr:returnw}returnt});varlo=we?Ka:au;functionho(e){vart=e&&e.constructor;returne===("function"==typeoft&&t.prototype||be)}functionpo(e){returne==e&&!$a(e)}functionyo(e,t){returnfunction(r){returnnull!=r&&(r[e]===t&&(void0!==t||einde(r)))}}functiongo(e,t,r){returnt=ar(void0===t?e.length-1:t,0),function(){for(vari=arguments,o=-1,a=ar(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(varu=n(t+1);++o<t;)u[o]=i[o];returnu[t]=r(s),it(e,this,u)}}functionvo(e,t){returnt.length<2?e:hn(e,Hn(t,0,-1))}function_o(e,t){for(varr=e.length,n=sr(t.length,r),i=_i(e);n--;){varo=t[n];e[n]=so(o,r)?i[o]:void0}returne}functionmo(e,t){if(("constructor"!==t||"function"!=typeofe[t])&&"__proto__"!=t)returne[t]}varbo=Ao(Vn),wo=Qt||function(e,t){returnHe.setTimeout(e,t)},So=Ao($n);functionEo(e,t,r){varn=t+"";returnSo(e,function(e,t){varr=t.length;if(!r)returne;varn=r-1;returnt[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":""),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){returnat(a,(function(r){varn="_."+r[0];t&r[1]&&!ft(e,n)&&e.push(n)})),e.sort()}(function(e){vart=e.match(Y);returnt?t[1].split(Z):[]}(n),r)))}functionAo(e){vart=0,r=0;returnfunction(){varn=ur(),i=16-(n-r);if(r=n,i>0){if(++t>=800)returnarguments[0]}elset=0;returne.apply(void0,arguments)}}functionIo(e,t){varr=-1,n=e.length,i=n-1;for(t=void0===t?n:t;++r<t;){varo=Mn(r,i),a=e[o];e[o]=e[r],e[r]=a}returne.length=t,e}varNo=function(e){vart=Aa(e,(function(e){return500===r.size&&r.clear(),e})),r=t.cache;returnt}((function(e){vart=[];return46===e.charCodeAt(0)&&t.push(""),e.replace($,(function(e,r,n,i){t.push(n?i.replace(ee,"$1"):r||e)})),t}));functionCo(e){if("string"==typeofe||Qa(e))returne;vart=e+"";return"0"==t&&1/e==-1/0?"-0":t}functionTo(e){if(null!=e){try{returnSe.call(e)}catch(e){}try{returne+""}catch(e){}}return""}functionRo(e){if(einstanceofOr)returne.clone();vart=newPr(e.__wrapped__,e.__chain__);returnt.__actions__=_i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}varxo=Ln((function(e,t){returnMa(e)?Xr(e,an(t,1,Ma,!0)):[]})),Po=Ln((function(e,t){varr=Fo(t);returnMa(r)&&(r=void0),Ma(e)?Xr(e,an(t,1,Ma,!0),Zi(r,2)):[]})),Oo=Ln((function(e,t){varr=Fo(t);returnMa(r)&&(r=void0),Ma(e)?Xr(e,an(t,1,Ma,!0),void0,r):[]}));functionBo(e,t,r){varn=null==e?0:e.length;if(!n)return-1;vari=null==r?0:is(r);returni<0&&(i=ar(n+i,0)),mt(e,Zi(t,3),i)}functionko(e,t,r){varn=null==e?0:e.length;if(!n)return-1;vari=n-1;returnvoid0!==r&&(i=is(r),i=r<0?ar(n+i,0):sr(i,n-1)),mt(e,Zi(t,3),i,!0)}functionDo(e){return(null==e?0:e.length)?an(e,1):[]}functionUo(e){returne&&e.length?e[0]:void0}varMo=Ln((function(e){vart=ht(e,ai);returnt.length&&t[0]===e[0]?_n(t):[]})),jo=Ln((function(e){vart=Fo(e),r=ht(e,ai);returnt===Fo(r)?t=void0:r.pop(),r.length&&r[0]===e[0]?_n(r,Zi(t,2)):[]})),Lo=Ln((function(e){vart=Fo(e),r=ht(e,ai);return(t="function"==typeoft?t:void0)&&r.pop(),r.length&&r[0]===e[0]?_n(r,void0,t):[]}));functionFo(e){vart=null==e?0:e.length;returnt?e[t-1]:void0}varKo=Ln(zo);functionzo(e,t){returne&&e.length&&t&&t.length?Dn(e,t):e}varVo=qi((function(e,t){varr=null==e?0:e.length,n=Gr(e,t);returnUn(e,ht(t,(function(e){returnso(e,r)?+e:e})).sort(yi)),n}));function$o(e){returnnull==e?e:lr.call(e)}varqo=Ln((function(e){returnXn(an(e,1,Ma,!0))})),Ho=Ln((function(e){vart=Fo(e);returnMa(t)&&(t=void0),Xn(an(e,1,Ma,!0),Zi(t,2))})),Wo=Ln((function(e){vart=Fo(e);returnt="function"==typeoft?t:void0,Xn(an(e,1,Ma,!0),void0,t)}));functionGo(e){if(!e||!e.length)return[];vart=0;returne=ct(e,(function(e){if(Ma(e))returnt=ar(e.length,t),!0})),Tt(t,(function(t){returnht(e,At(t))}))}functionJo(e,t){if(!e||!e.length)return[];varr=Go(e);returnnull==t?r:ht(r,(function(e){returnit(t,void0,e)}))}varYo=Ln((function(e,t){returnMa(e)?Xr(e,t):[]})),Zo=Ln((function(e){returnii(ct(e,Ma))})),Qo=Ln((function(e){vart=Fo(e);returnMa(t)&&(t=void0),ii(ct(e,Ma),Zi(t,2))})),Xo=Ln((function(e){vart=Fo(e);returnt="function"==typeoft?t:void0,ii(ct(e,Ma),void0,t)})),ea=Ln(Go);varta=Ln((function(e){vart=e.length,r=t>1?e[t-1]:void0;returnr="function"==typeofr?(e.pop(),r):void0,Jo(e,r)}));functionra(e){vart=Tr(e);returnt.__chain__=!0,t}functionna(e,t){returnt(e)}varia=qi((function(e){vart=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){returnGr(t,e)};return!(t>1||this.__actions__.length)&&ninstanceofOr&&so(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void0}),newPr(n,this.__chain__).thru((function(e){returnt&&!e.length&&e.push(void0),e}))):this.thru(i)}));varoa=bi((function(e,t,r){Ee.call(e,r)?++e[r]:Wr(e,r,1)}));varaa=Ci(Bo),sa=Ci(ko);functionua(e,t){return(ka(e)?at:en)(e,Zi(t,3))}functionca(e,t){return(ka(e)?st:tn)(e,Zi(t,3))}varfa=bi((function(e,t,r){Ee.call(e,r)?e[r].push(t):Wr(e,r,[t])}));varla=Ln((function(e,t,r){vari=-1,o="function"==typeoft,a=Ua(e)?n(e.length):[];returnen(e,(function(e){a[++i]=o?it(t,e,r):mn(e,t,r)})),a})),ha=bi((function(e,t,r){Wr(e,r,t)}));functionpa(e,t){return(ka(e)?ht:Tn)(e,Zi(t,3))}varda=bi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));varya=Ln((function(e,t){if(null==e)return[];varr=t.length;returnr>1&&uo(e,t[0],t[1])?t=[]:r>2&&uo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,an(t,1),[])})),ga=Zt||function(){returnHe.Date.now()};functionva(e,t,r){returnt=r?void0:t,Fi(e,128,void0,void0,void0,void0,t=e&&null==t?e.length:t)}function_a(e,t){varr;if("function"!=typeoft)thrownewve(i);returne=is(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void0),r}}varma=Ln((function(e,t,r){varn=1;if(r.length){vari=zt(r,Yi(ma));n|=32}returnFi(e,n,t,r,i)})),ba=Ln((function(e,t,r){varn=3;if(r.length){vari=zt(r,Yi(ba));n|=32}returnFi(t,n,e,r,i)}));functionwa(e,t,r){varn,o,a,s,u,c,f=0,l=!1,h=!1,p=!0;if("function"!=typeofe)thrownewve(i);functiond(t){varr=n,i=o;returnn=o=void0,f=t,s=e.apply(i,r)}functiony(e){returnf=e,u=wo(v,t),l?d(e):s}functiong(e){varr=e-c;returnvoid0===c||r>=t||r<0||h&&e-f>=a}functionv(){vare=ga();if(g(e))return_(e);u=wo(v,function(e){varr=t-(e-c);returnh?sr(r,a-(e-f)):r}(e))}function_(e){returnu=void0,p&&n?d(e):(n=o=void0,s)}functionm(){vare=ga(),r=g(e);if(n=arguments,o=this,c=e,r){if(void0===u)returny(c);if(h)returnli(u),u=wo(v,t),d(c)}returnvoid0===u&&(u=wo(v,t)),s}returnt=as(t)||0,$a(r)&&(l=!!r.leading,a=(h="maxWait"inr)?ar(as(r.maxWait)||0,t):a,p="trailing"inr?!!r.trailing:p),m.cancel=function(){void0!==u&&li(u),f=0,n=c=o=u=void0},m.flush=function(){returnvoid0===u?s:_(ga())},m}varSa=Ln((function(e,t){returnQr(e,1,t)})),Ea=Ln((function(e,t,r){returnQr(e,as(t)||0,r)}));functionAa(e,t){if("function"!=typeofe||null!=t&&"function"!=typeoft)thrownewve(i);varr=function(){varn=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))returno.get(i);vara=e.apply(this,n);returnr.cache=o.set(i,a)||o,a};returnr.cache=new(Aa.Cache||Dr),r}functionIa(e){if("function"!=typeofe)thrownewve(i);returnfunction(){vart=arguments;switch(t.length){case0:return!e.call(this);case1:return!e.call(this,t[0]);case2:return!e.call(this,t[0],t[1]);case3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Aa.Cache=Dr;varNa=ci((function(e,t){varr=(t=1==t.length&&ka(t[0])?ht(t[0],xt(Zi())):ht(an(t,1),xt(Zi()))).length;returnLn((function(n){for(vari=-1,o=sr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);returnit(e,this,n)}))})),Ca=Ln((function(e,t){returnFi(e,32,void0,t,zt(t,Yi(Ca)))})),Ta=Ln((function(e,t){returnFi(e,64,void0,t,zt(t,Yi(Ta)))})),Ra=qi((function(e,t){returnFi(e,256,void0,void0,void0,t)}));functionxa(e,t){returne===t||e!=e&&t!=t}varPa=Di(yn),Oa=Di((function(e,t){returne>=t})),Ba=bn(function(){returnarguments}())?bn:function(e){returnqa(e)&&Ee.call(e,"callee")&&!We.call(e,"callee")},ka=n.isArray,Da=Qe?xt(Qe):function(e){returnqa(e)&&dn(e)==S};functionUa(e){returnnull!=e&&Va(e.length)&&!Ka(e)}functionMa(e){returnqa(e)&&Ua(e)}varja=rr||au,La=Xe?xt(Xe):function(e){returnqa(e)&&dn(e)==f};functionFa(e){if(!qa(e))return!1;vart=dn(e);returnt==l||"[object DOMException]"==t||"string"==typeofe.message&&"string"==typeofe.name&&!Ga(e)}functionKa(e){if(!$a(e))return!1;vart=dn(e);returnt==h||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}functionza(e){return"number"==typeofe&&e==is(e)}functionVa(e){return"number"==typeofe&&e>-1&&e%1==0&&e<=9007199254740991}function$a(e){vart=typeofe;returnnull!=e&&("object"==t||"function"==t)}functionqa(e){returnnull!=e&&"object"==typeofe}varHa=et?xt(et):function(e){returnqa(e)&&no(e)==d};functionWa(e){return"number"==typeofe||qa(e)&&dn(e)==y}functionGa(e){if(!qa(e)||dn(e)!=g)return!1;vart=$e(e);if(null===t)return!0;varr=Ee.call(t,"constructor")&&t.constructor;return"function"==typeofr&&rinstanceofr&&Se.call(r)==Ce}varJa=tt?xt(tt):function(e){returnqa(e)&&dn(e)==v};varYa=rt?xt(rt):function(e){returnqa(e)&&no(e)==_};functionZa(e){return"string"==typeofe||!ka(e)&&qa(e)&&dn(e)==m}functionQa(e){return"symbol"==typeofe||qa(e)&&dn(e)==b}varXa=nt?xt(nt):function(e){returnqa(e)&&Va(e.length)&&!!Le[dn(e)]};vares=Di(Cn),ts=Di((function(e,t){returne<=t}));functionrs(e){if(!e)return[];if(Ua(e))returnZa(e)?Ht(e):_i(e);if(Ze&&e[Ze])returnfunction(e){for(vart,r=[];!(t=e.next()).done;)r.push(t.value);returnr}(e[Ze]());vart=no(e);return(t==d?Ft:t==_?Vt:xs)(e)}functionns(e){returne?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}functionis(e){vart=ns(e),r=t%1;returnt==t?r?t-r:t:0}functionos(e){returne?Jr(is(e),0,4294967295):0}functionas(e){if("number"==typeofe)returne;if(Qa(e))returnNaN;if($a(e)){vart="function"==typeofe.valueOf?e.valueOf():e;e=$a(t)?t+"":t}if("string"!=typeofe)return0===e?e:+e;e=Rt(e);varr=ie.test(e);returnr||ae.test(e)?Ve(e.slice(2),r?2:8):ne.test(e)?NaN:+e}functionss(e){returnmi(e,Ss(e))}functionus(e){returnnull==e?"":Qn(e)}varcs=wi((function(e,t){if(ho(t)||Ua(t))mi(t,ws(t),e);elsefor(varrint)Ee.call(t,r)&&Vr(e,r,t[r])})),fs=wi((function(e,t){mi(t,Ss(t),e)})),ls=wi((function(e,t,r,n){mi(t,Ss(t),e,n)})),hs=wi((function(e,t,r,n){mi(t,ws(t),e,n)})),ps=qi(Gr);vards=Ln((function(e,t){e=de(e);varr=-1,n=t.length,i=n>2?t[2]:void0;for(i&&uo(t[0],t[1],i)&&(n=1);++r<n;)for(varo=t[r],a=Ss(o),s=-1,u=a.length;++s<u;){varc=a[s],f=e[c];(void0===f||xa(f,be[c])&&!Ee.call(e,c))&&(e[c]=o[c])}returne})),ys=Ln((function(e){returne.push(void0,zi),it(As,void0,e)}));functiongs(e,t,r){varn=null==e?void0:hn(e,t);returnvoid0===n?r:n}functionvs(e,t){returnnull!=e&&io(e,t,vn)}var_s=xi((function(e,t,r){null!=t&&"function"!=typeoft.toString&&(t=Ne.call(t)),e[t]=r}),$s(Ws)),ms=xi((function(e,t,r){null!=t&&"function"!=typeoft.toString&&(t=Ne.call(t)),Ee.call(e,t)?e[t].push(r):e[t]=[r]}),Zi),bs=Ln(mn);functionws(e){returnUa(e)?jr(e):In(e)}functionSs(e){returnUa(e)?jr(e,!0):Nn(e)}varEs=wi((function(e,t,r){Pn(e,t,r)})),As=wi((function(e,t,r,n){Pn(e,t,r,n)})),Is=qi((function(e,t){varr={};if(null==e)returnr;varn=!1;t=ht(t,(function(t){returnt=ui(t,e),n||(n=t.length>1),t})),mi(e,Wi(e),r),n&&(r=Yr(r,7,Vi));for(vari=t.length;i--;)ei(r,t[i]);returnr}));varNs=qi((function(e,t){returnnull==e?{}:function(e,t){returnkn(e,t,(function(t,r){returnvs(e,r)}))}(e,t)}));functionCs(e,t){if(null==e)return{};varr=ht(Wi(e),(function(e){return[e]}));returnt=Zi(t),kn(e,r,(function(e,r){returnt(e,r[0])}))}varTs=Li(ws),Rs=Li(Ss);functionxs(e){returnnull==e?[]:Pt(e,ws(e))}varPs=Ii((function(e,t,r){returnt=t.toLowerCase(),e+(r?Os(t):t)}));functionOs(e){returnFs(us(e).toLowerCase())}functionBs(e){return(e=us(e))&&e.replace(ue,Ut).replace(Oe,"")}varks=Ii((function(e,t,r){returne+(r?"-":"")+t.toLowerCase()})),Ds=Ii((function(e,t,r){returne+(r?"":"")+t.toLowerCase()})),Us=Ai("toLowerCase");varMs=Ii((function(e,t,r){returne+(r?"_":"")+t.toLowerCase()}));varjs=Ii((function(e,t,r){returne+(r?"":"")+Fs(t)}));varLs=Ii((function(e,t,r){returne+(r?"":"")+t.toUpperCase()})),Fs=Ai("toUpperCase");functionKs(e,t,r){returne=us(e),void0===(t=r?void0:t)?function(e){returnUe.test(e)}(e)?function(e){returne.match(ke)||[]}(e):function(e){returne.match(Q)||[]}(e):e.match(t)||[]}varzs=Ln((function(e,t){try{returnit(e,void0,t)}catch(e){returnFa(e)?e:newle(e)}})),Vs=qi((function(e,t){returnat(t,(function(t){t=Co(t),Wr(e,t,ma(e[t],e))})),e}));function$s(e){returnfunction(){returne}}varqs=Ti(),Hs=Ti(!0);functionWs(e){returne}functionGs(e){returnAn("function"==typeofe?e:Yr(e,1))}varJs=Ln((function(e,t){returnfunction(r){returnmn(r,e,t)}})),Ys=Ln((function(e,t){returnfunction(r){returnmn(e,r,t)}}));functionZs(e,t,r){varn=ws(t),i=ln(t,n);null!=r||$a(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=ln(t,ws(t)));varo=!($a(r)&&"chain"inr&&!r.chain),a=Ka(e);returnat(i,(function(r){varn=t[r];e[r]=n,a&&(e.prototype[r]=function(){vart=this.__chain__;if(o||t){varr=e(this.__wrapped__),i=r.__actions__=_i(this.__actions__);returni.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}returnn.apply(e,pt([this.value()],arguments))})})),e}functionQs(){}varXs=Oi(ht),eu=Oi(ut),tu=Oi(gt);functionru(e){returnco(e)?At(Co(e)):function(e){returnfunction(t){returnhn(t,e)}}(e)}varnu=ki(),iu=ki(!0);functionou(){return[]}functionau(){return!1}varsu=Pi((function(e,t){returne+t}),0),uu=Mi("ceil"),cu=Pi((function(e,t){returne/t}),1),fu=Mi("floor");varlu,hu=Pi((function(e,t){returne*t}),1),pu=Mi("round"),du=Pi((function(e,t){returne-t}),0);returnTr.after=function(e,t){if("function"!=typeoft)thrownewve(i);returne=is(e),function(){if(--e<1)returnt.apply(this,arguments)}},Tr.ary=va,Tr.assign=cs,Tr.assignIn=fs,Tr.assignInWith=ls,Tr.assignWith=hs,Tr.at=ps,Tr.before=_a,Tr.bind=ma,Tr.bindAll=Vs,Tr.bindKey=ba,Tr.castArray=function(){if(!arguments.length)return[];vare=arguments[0];returnka(e)?e:[e]},Tr.chain=ra,Tr.chunk=function(e,t,r){t=(r?uo(e,t,r):void0===t)?1:ar(is(t),0);vari=null==e?0:e.length;if(!i||t<1)return[];for(varo=0,a=0,s=n(Xt(i/t));o<i;)s[a++]=Hn(e,o,o+=t);returns},Tr.compact=function(e){for(vart=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){varo=e[t];o&&(i[n++]=o)}returni},Tr.concat=function(){vare=arguments.length;if(!e)return[];for(vart=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];returnpt(ka(r)?_i(r):[r],an(t,1))},Tr.cond=function(e){vart=null==e?0:e.length,r=Zi();returne=t?ht(e,(function(e){if("function"!=typeofe[1])thrownewve(i);return[r(e[0]),e[1]]})):[],Ln((function(r){for(varn=-1;++n<t;){vari=e[n];if(it(i[0],this,r))returnit(i[1],this,r)}}))},Tr.conforms=function(e){returnfunction(e){vart=ws(e);returnfunction(r){returnZr(r,e,t)}}(Yr(e,1))},Tr.constant=$s,Tr.countBy=oa,Tr.create=function(e,t){varr=Rr(e);returnnull==t?r:Hr(r,t)},Tr.curry=functione(t,r,n){vari=Fi(t,8,void0,void0,void0,void0,void0,r=n?void0:r);returni.placeholder=e.placeholder,i},Tr.curryRight=functione(t,r,n){vari=Fi(t,16,void0,void0,void0,void0,void0,r=n?void0:r);returni.placeholder=e.placeholder,i},Tr.debounce=wa,Tr.defaults=ds,Tr.defaultsDeep=ys,Tr.defer=Sa,Tr.delay=Ea,Tr.difference=xo,Tr.differenceBy=Po,Tr.differenceWith=Oo,Tr.drop=function(e,t,r){varn=null==e?0:e.length;returnn?Hn(e,(t=r||void0===t?1:is(t))<0?0:t,n):[]},Tr.dropRight=function(e,t,r){varn=null==e?0:e.length;returnn?Hn(e,0,(t=n-(t=r||void0===t?1:is(t)))<0?0:t):[]},Tr.dropRightWhile=function(e,t){returne&&e.length?ri(e,Zi(t,3),!0,!0):[]},Tr.dropWhile=function(e,t){returne&&e.length?ri(e,Zi(t,3),!0):[]},Tr.fill=function(e,t,r,n){vari=null==e?0:e.length;returni?(r&&"number"!=typeofr&&uo(e,t,r)&&(r=0,n=i),function(e,t,r,n){vari=e.length;for((r=is(r))<0&&(r=-r>i?0:i+r),(n=void0===n||n>i?i:is(n))<0&&(n+=i),n=r>n?0:os(n);r<n;)e[r++]=t;returne}(e,t,r,n)):[]},Tr.filter=function(e,t){return(ka(e)?ct:on)(e,Zi(t,3))},Tr.flatMap=function(e,t){returnan(pa(e,t),1)},Tr.flatMapDeep=function(e,t){returnan(pa(e,t),1/0)},Tr.flatMapDepth=function(e,t,r){returnr=void0===r?1:is(r),an(pa(e,t),r)},Tr.flatten=Do,Tr.flattenDeep=function(e){return(null==e?0:e.length)?an(e,1/0):[]},Tr.flattenDepth=function(e,t){return(null==e?0:e.length)?an(e,t=void0===t?1:is(t)):[]},Tr.flip=function(e){returnFi(e,512)},Tr.flow=qs,Tr.flowRight=Hs,Tr.fromPairs=function(e){for(vart=-1,r=null==e?0:e.length,n={};++t<r;){vari=e[t];n[i[0]]=i[1]}returnn},Tr.functions=function(e){returnnull==e?[]:ln(e,ws(e))},Tr.functionsIn=function(e){returnnull==e?[]:ln(e,Ss(e))},Tr.groupBy=fa,Tr.initial=function(e){return(null==e?0:e.length)?Hn(e,0,-1):[]},Tr.intersection=Mo,Tr.intersectionBy=jo,Tr.intersectionWith=Lo,Tr.invert=_s,Tr.invertBy=ms,Tr.invokeMap=la,Tr.iteratee=Gs,Tr.keyBy=ha,Tr.keys=ws,Tr.keysIn=Ss,Tr.map=pa,Tr.mapKeys=function(e,t){varr={};returnt=Zi(t,3),cn(e,(function(e,n,i){Wr(r,t(e,n,i),e)})),r},Tr.mapValues=function(e,t){varr={};returnt=Zi(t,3),cn(e,(function(e,n,i){Wr(r,n,t(e,n,i))})),r},Tr.matches=function(e){returnRn(Yr(e,1))},Tr.matchesProperty=function(e,t){returnxn(e,Yr(t,1))},Tr.memoize=Aa,Tr.merge=Es,Tr.mergeWith=As,Tr.method=Js,Tr.methodOf=Ys,Tr.mixin=Zs,Tr.negate=Ia,Tr.nthArg=function(e){returne=is(e),Ln((function(t){returnOn(t,e)}))},Tr.omit=Is,Tr.omitBy=function(e,t){returnCs(e,Ia(Zi(t)))},Tr.once=function(e){return_a(2,e)},Tr.orderBy=function(e,t,r,n){returnnull==e?[]:(ka(t)||(t=null==t?[]:[t]),ka(r=n?void0:r)||(r=null==r?[]:[r]),Bn(e,t,r))},Tr.over=Xs,Tr.overArgs=Na,Tr.overEvery=eu,Tr.overSome=tu,Tr.partial=Ca,Tr.partialRight=Ta,Tr.partition=da,Tr.pick=Ns,Tr.pickBy=Cs,Tr.property=ru,Tr.propertyOf=function(e){returnfunction(t){returnnull==e?void0:hn(e,t)}},Tr.pull=Ko,Tr.pullAll=zo,Tr.pullAllBy=function(e,t,r){returne&&e.length&&t&&t.length?Dn(e,t,Zi(r,2)):e},Tr.pullAllWith=function(e,t,r){returne&&e.length&&t&&t.length?Dn(e,t,void0,r):e},Tr.pullAt=Vo,Tr.range=nu,Tr.rangeRight=iu,Tr.rearg=Ra,Tr.reject=function(e,t){return(ka(e)?ct:on)(e,Ia(Zi(t,3)))},Tr.remove=function(e,t){varr=[];if(!e||!e.length)returnr;varn=-1,i=[],o=e.length;for(t=Zi(t,3);++n<o;){vara=e[n];t(a,n,e)&&(r.push(a),i.push(n))}returnUn(e,i),r},Tr.rest=function(e,t){if("function"!=typeofe)thrownewve(i);returnLn(e,t=void0===t?t:is(t))},Tr.reverse=$o,Tr.sampleSize=function(e,t,r){returnt=(r?uo(e,t,r):void0===t)?1:is(t),(ka(e)?Fr:Kn)(e,t)},Tr.set=function(e,t,r){returnnull==e?e:zn(e,t,r)},Tr.setWith=function(e,t,r,n){returnn="function"==typeofn?n:void0,null==e?e:zn(e,t,r,n)},Tr.shuffle=function(e){return(ka(e)?Kr:qn)(e)},Tr.slice=function(e,t,r){varn=null==e?0:e.length;returnn?(r&&"number"!=typeofr&&uo(e,t,r)?(t=0,r=n):(t=null==t?0:is(t),r=void0===r?n:is(r)),Hn(e,t,r)):[]},Tr.sortBy=ya,Tr.sortedUniq=function(e){returne&&e.length?Yn(e):[]},Tr.sortedUniqBy=function(e,t){returne&&e.length?Yn(e,Zi(t,2)):[]},Tr.split=function(e,t,r){returnr&&"number"!=typeofr&&uo(e,t,r)&&(t=r=void0),(r=void0===r?4294967295:r>>>0)?(e=us(e))&&("string"==typeoft||null!=t&&!Ja(t))&&!(t=Qn(t))&&Lt(e)?fi(Ht(e),0,r):e.split(t,r):[]},Tr.spread=function(e,t){if("function"!=typeofe)thrownewve(i);returnt=null==t?0:ar(is(t),0),Ln((function(r){varn=r[t],i=fi(r,0,t);returnn&&pt(i,n),it(e,this,i)}))},Tr.tail=function(e){vart=null==e?0:e.length;returnt?Hn(e,1,t):[]},Tr.take=function(e,t,r){returne&&e.length?Hn(e,0,(t=r||void0===t?1:is(t))<0?0:t):[]},Tr.takeRight=function(e,t,r){varn=null==e?0:e.length;returnn?Hn(e,(t=n-(t=r||void0===t?1:is(t)))<0?0:t,n):[]},Tr.takeRightWhile=function(e,t){returne&&e.length?ri(e,Zi(t,3),!1,!0):[]},Tr.takeWhile=function(e,t){returne&&e.length?ri(e,Zi(t,3)):[]},Tr.tap=function(e,t){returnt(e),e},Tr.throttle=function(e,t,r){varn=!0,o=!0;if("function"!=typeofe)thrownewve(i);return$a(r)&&(n="leading"inr?!!r.leading:n,o="trailing"inr?!!r.trailing:o),wa(e,t,{leading:n,maxWait:t,trailing:o})},Tr.thru=na,Tr.toArray=rs,Tr.toPairs=Ts,Tr.toPairsIn=Rs,Tr.toPath=function(e){returnka(e)?ht(e,Co):Qa(e)?[e]:_i(No(us(e)))},Tr.toPlainObject=ss,Tr.transform=function(e,t,r){varn=ka(e),i=n||ja(e)||Xa(e);if(t=Zi(t,4),null==r){varo=e&&e.constructor;r=i?n?newo:[]:$a(e)&&Ka(o)?Rr($e(e)):{}}return(i?at:cn)(e,(function(e,n,i){returnt(r,e,n,i)})),r},Tr.unary=function(e){returnva(e,1)},Tr.union=qo,Tr.unionBy=Ho,Tr.unionWith=Wo,Tr.uniq=function(e){returne&&e.length?Xn(e):[]},Tr.uniqBy=function(e,t){returne&&e.length?Xn(e,Zi(t,2)):[]},Tr.uniqWith=function(e,t){returnt="function"==typeoft?t:void0,e&&e.length?Xn(e,void0,t):[]},Tr.unset=function(e,t){returnnull==e||ei(e,t)},Tr.unzip=Go,Tr.unzipWith=Jo,Tr.update=function(e,t,r){returnnull==e?e:ti(e,t,si(r))},Tr.updateWith=function(e,t,r,n){returnn="function"==typeofn?n:void0,null==e?e:ti(e,t,si(r),n)},Tr.values=xs,Tr.valuesIn=function(e){returnnull==e?[]:Pt(e,Ss(e))},Tr.without=Yo,Tr.words=Ks,Tr.wrap=function(e,t){returnCa(si(t),e)},Tr.xor=Zo,Tr.xorBy=Qo,Tr.xorWith=Xo,Tr.zip=ea,Tr.zipObject=function(e,t){returnoi(e||[],t||[],Vr)},Tr.zipObjectDeep=function(e,t){returnoi(e||[],t||[],zn)},Tr.zipWith=ta,Tr.entries=Ts,Tr.entriesIn=Rs,Tr.extend=fs,Tr.extendWith=ls,Zs(Tr,Tr),Tr.add=su,Tr.attempt=zs,Tr.camelCase=Ps,Tr.capitalize=Os,Tr.ceil=uu,Tr.clamp=function(e,t,r){returnvoid0===r&&(r=t,t=void0),void0!==r&&(r=(r=as(r))==r?r:0),void0!==t&&(t=(t=as(t))==t?t:0),Jr(as(e),t,r)},Tr.clone=function(e){returnYr(e,4)},Tr.cloneDeep=function(e){returnYr(e,5)},Tr.cloneDeepWith=function(e,t){returnYr(e,5,t="function"==typeoft?t:void0)},Tr.cloneWith=function(e,t){returnYr(e,4,t="function"==typeoft?t:void0)},Tr.conformsTo=function(e,t){returnnull==t||Zr(e,t,ws(t))},Tr.deburr=Bs,Tr.defaultTo=function(e,t){returnnull==e||e!=e?t:e},Tr.divide=cu,Tr.endsWith=function(e,t,r){e=us(e),t=Qn(t);varn=e.length,i=r=void0===r?n:Jr(is(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Tr.eq=xa,Tr.escape=function(e){return(e=us(e))&&j.test(e)?e.replace(U,Mt):e},Tr.escapeRegExp=function(e){return(e=us(e))&&H.test(e)?e.replace(q,"\\$&"):e},Tr.every=function(e,t,r){varn=ka(e)?ut:rn;returnr&&uo(e,t,r)&&(t=void0),n(e,Zi(t,3))},Tr.find=aa,Tr.findIndex=Bo,Tr.findKey=function(e,t){return_t(e,Zi(t,3),cn)},Tr.findLast=sa,Tr.findLastIndex=ko,Tr.findLastKey=function(e,t){return_t(e,Zi(t,3),fn)},Tr.floor=fu,Tr.forEach=ua,Tr.forEachRight=ca,Tr.forIn=function(e,t){returnnull==e?e:sn(e,Zi(t,3),Ss)},Tr.forInRight=function(e,t){returnnull==e?e:un(e,Zi(t,3),Ss)},Tr.forOwn=function(e,t){returne&&cn(e,Zi(t,3))},Tr.forOwnRight=function(e,t){returne&&fn(e,Zi(t,3))},Tr.get=gs,Tr.gt=Pa,Tr.gte=Oa,Tr.has=function(e,t){returnnull!=e&&io(e,t,gn)},Tr.hasIn=vs,Tr.head=Uo,Tr.identity=Ws,Tr.includes=function(e,t,r,n){e=Ua(e)?e:xs(e),r=r&&!n?is(r):0;vari=e.length;returnr<0&&(r=ar(i+r,0)),Za(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&bt(e,t,r)>-1},Tr.indexOf=function(e,t,r){varn=null==e?0:e.length;if(!n)return-1;vari=null==r?0:is(r);returni<0&&(i=ar(n+i,0)),bt(e,t,i)},Tr.inRange=function(e,t,r){returnt=ns(t),void0===r?(r=t,t=0):r=ns(r),function(e,t,r){returne>=sr(t,r)&&e<ar(t,r)}(e=as(e),t,r)},Tr.invoke=bs,Tr.isArguments=Ba,Tr.isArray=ka,Tr.isArrayBuffer=Da,Tr.isArrayLike=Ua,Tr.isArrayLikeObject=Ma,Tr.isBoolean=function(e){return!0===e||!1===e||qa(e)&&dn(e)==c},Tr.isBuffer=ja,Tr.isDate=La,Tr.isElement=function(e){returnqa(e)&&1===e.nodeType&&!Ga(e)},Tr.isEmpty=function(e){if(null==e)return!0;if(Ua(e)&&(ka(e)||"string"==typeofe||"function"==typeofe.splice||ja(e)||Xa(e)||Ba(e)))return!e.length;vart=no(e);if(t==d||t==_)return!e.size;if(ho(e))return!In(e).length;for(varrine)if(Ee.call(e,r))return!1;return!0},Tr.isEqual=function(e,t){returnwn(e,t)},Tr.isEqualWith=function(e,t,r){varn=(r="function"==typeofr?r:void0)?r(e,t):void0;returnvoid0===n?wn(e,t,void0,r):!!n},Tr.isError=Fa,Tr.isFinite=function(e){return"number"==typeofe&&nr(e)},Tr.isFunction=Ka,Tr.isInteger=za,Tr.isLength=Va,Tr.isMap=Ha,Tr.isMatch=function(e,t){returne===t||Sn(e,t,Xi(t))},Tr.isMatchWith=function(e,t,r){returnr="function"==typeofr?r:void0,Sn(e,t,Xi(t),r)},Tr.isNaN=function(e){returnWa(e)&&e!=+e},Tr.isNative=function(e){if(lo(e))thrownewle("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");returnEn(e)},Tr.isNil=function(e){returnnull==e},Tr.isNull=function(e){returnnull===e},Tr.isNumber=Wa,Tr.isObject=$a,Tr.isObjectLike=qa,Tr.isPlainObject=Ga,Tr.isRegExp=Ja,Tr.isSafeInteger=function(e){returnza(e)&&e>=-9007199254740991&&e<=9007199254740991},Tr.isSet=Ya,Tr.isString=Za,Tr.isSymbol=Qa,Tr.isTypedArray=Xa,Tr.isUndefined=function(e){returnvoid0===e},Tr.isWeakMap=function(e){returnqa(e)&&no(e)==w},Tr.isWeakSet=function(e){returnqa(e)&&"[object WeakSet]"==dn(e)},Tr.join=function(e,t){returnnull==e?"":ir.call(e,t)},Tr.kebabCase=ks,Tr.last=Fo,Tr.lastIndexOf=function(e,t,r){varn=null==e?0:e.length;if(!n)return-1;vari=n;returnvoid0!==r&&(i=(i=is(r))<0?ar(n+i,0):sr(i,n-1)),t==t?function(e,t,r){for(varn=r+1;n--;)if(e[n]===t)returnn;returnn}(e,t,i):mt(e,St,i,!0)},Tr.lowerCase=Ds,Tr.lowerFirst=Us,Tr.lt=es,Tr.lte=ts,Tr.max=function(e){returne&&e.length?nn(e,Ws,yn):void0},Tr.maxBy=function(e,t){returne&&e.length?nn(e,Zi(t,2),yn):void0},Tr.mean=function(e){returnEt(e,Ws)},Tr.meanBy=function(e,t){returnEt(e,Zi(t,2))},Tr.min=function(e){returne&&e.length?nn(e,Ws,Cn):void0},Tr.minBy=function(e,t){returne&&e.length?nn(e,Zi(t,2),Cn):void0},Tr.stubArray=ou,Tr.stubFalse=au,Tr.stubObject=function(){return{}},Tr.stubString=function(){return""},Tr.stubTrue=function(){return!0},Tr.multiply=hu,Tr.nth=function(e,t){returne&&e.length?On(e,is(t)):void0},Tr.noConflict=function(){returnHe._===this&&(He._=Te),this},Tr.noop=Qs,Tr.now=ga,Tr.pad=function(e,t,r){e=us(e);varn=(t=is(t))?qt(e):0;if(!t||n>=t)returne;vari=(t-n)/2;returnBi(er(i),r)+e+Bi(Xt(i),r)},Tr.padEnd=function(e,t,r){e=us(e);varn=(t=is(t))?qt(e):0;returnt&&n<t?e+Bi(t-n,r):e},Tr.padStart=function(e,t,r){e=us(e);varn=(t=is(t))?qt(e):0;returnt&&n<t?Bi(t-n,r)+e:e},Tr.parseInt=function(e,t,r){returnr||null==t?t=0:t&&(t=+t),cr(us(e).replace(W,""),t||0)},Tr.random=function(e,t,r){if(r&&"boolean"!=typeofr&&uo(e,t,r)&&(t=r=void0),void0===r&&("boolean"==typeoft?(r=t,t=void0):"boolean"==typeofe&&(r=e,e=void0)),void0===e&&void0===t?(e=0,t=1):(e=ns(e),void0===t?(t=e,e=0):t=ns(t)),e>t){varn=e;e=t,t=n}if(r||e%1||t%1){vari=fr();returnsr(e+i*(t-e+ze("1e-"+((i+"").length-1))),t)}returnMn(e,t)},Tr.reduce=function(e,t,r){varn=ka(e)?dt:Nt,i=arguments.length<3;returnn(e,Zi(t,4),r,i,en)},Tr.reduceRight=function(e,t,r){varn=ka(e)?yt:Nt,i=arguments.length<3;returnn(e,Zi(t,4),r,i,tn)},Tr.repeat=function(e,t,r){returnt=(r?uo(e,t,r):void0===t)?1:is(t),jn(us(e),t)},Tr.replace=function(){vare=arguments,t=us(e[0]);returne.length<3?t:t.replace(e[1],e[2])},Tr.result=function(e,t,r){varn=-1,i=(t=ui(t,e)).length;for(i||(i=1,e=void0);++n<i;){varo=null==e?void0:e[Co(t[n])];void0===o&&(n=i,o=r),e=Ka(o)?o.call(e):o}returne},Tr.round=pu,Tr.runInContext=e,Tr.sample=function(e){return(ka(e)?Lr:Fn)(e)},Tr.size=function(e){if(null==e)return0;if(Ua(e))returnZa(e)?qt(e):e.length;vart=no(e);returnt==d||t==_?e.size:In(e).length},Tr.snakeCase=Ms,Tr.some=function(e,t,r){varn=ka(e)?gt:Wn;returnr&&uo(e,t,r)&&(t=void0),n(e,Zi(t,3))},Tr.sortedIndex=function(e,t){returnGn(e,t)},Tr.sortedIndexBy=function(e,t,r){returnJn(e,t,Zi(r,2))},Tr.sortedIndexOf=function(e,t){varr=null==e?0:e.length;if(r){varn=Gn(e,t);if(n<r&&xa(e[n],t))returnn}return-1},Tr.sortedLastIndex=function(e,t){returnGn(e,t,!0)},Tr.sortedLastIndexBy=function(e,t,r){returnJn(e,t,Zi(r,2),!0)},Tr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){varr=Gn(e,t,!0)-1;if(xa(e[r],t))returnr}return-1},Tr.startCase=js,Tr.startsWith=function(e,t,r){returne=us(e),r=null==r?0:Jr(is(r),0,e.length),t=Qn(t),e.slice(r,r+t.length)==t},Tr.subtract=du,Tr.sum=function(e){returne&&e.length?Ct(e,Ws):0},Tr.sumBy=function(e,t){returne&&e.length?Ct(e,Zi(t,2)):0},Tr.template=function(e,t,r){varn=Tr.templateSettings;r&&uo(e,t,r)&&(t=void0),e=us(e),t=ls({},t,n,Ki);vari,o,a=ls({},t.imports,n.imports,Ki),s=ws(a),u=Pt(a,s),c=0,f=t.interpolate||ce,l="__p += '",h=ye((t.escape||ce).source+"|"+f.source+"|"+(f===K?te:ce).source+"|"+(t.evaluate||ce).source+"|$","g"),p="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g,""):"lodash.templateSources["+++je+"]")+"\n";e.replace(h,(function(t,r,n,a,s,u){returnn||(n=a),l+=e.slice(c,u).replace(fe,jt),r&&(i=!0,l+="' +\n__e("+r+") +\n'"),s&&(o=!0,l+="';\n"+s+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),l+="';\n";vard=Ee.call(t,"variable")&&t.variable;if(d){if(X.test(d))thrownewle("Invalid `variable` option passed into `_.template`")}elsel="with (obj) {\n"+l+"\n}\n";l=(o?l.replace(O,""):l).replace(B,"$1").replace(k,"$1;"),l="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";vary=zs((function(){returnhe(s,p+"return "+l).apply(void0,u)}));if(y.source=l,Fa(y))throwy;returny},Tr.times=function(e,t){if((e=is(e))<1||e>9007199254740991)return[];varr=4294967295,n=sr(e,4294967295);e-=4294967295;for(vari=Tt(n,t=Zi(t));++r<e;)t(r);returni},Tr.toFinite=ns,Tr.toInteger=is,Tr.toLength=os,Tr.toLower=function(e){returnus(e).toLowerCase()},Tr.toNumber=as,Tr.toSafeInteger=function(e){returne?Jr(is(e),-9007199254740991,9007199254740991):0===e?e:0},Tr.toString=us,Tr.toUpper=function(e){returnus(e).toUpperCase()},Tr.trim=function(e,t,r){if((e=us(e))&&(r||void0===t))returnRt(e);if(!e||!(t=Qn(t)))returne;varn=Ht(e),i=Ht(t);returnfi(n,Bt(n,i),kt(n,i)+1).join("")},Tr.trimEnd=function(e,t,r){if((e=us(e))&&(r||void0===t))returne.slice(0,Wt(e)+1);if(!e||!(t=Qn(t)))returne;varn=Ht(e);returnfi(n,0,kt(n,Ht(t))+1).join("")},Tr.trimStart=function(e,t,r){if((e=us(e))&&(r||void0===t))returne.replace(W,"");if(!e||!(t=Qn(t)))returne;varn=Ht(e);returnfi(n,Bt(n,Ht(t))).join("")},Tr.truncate=function(e,t){varr=30,n="...";if($a(t)){vari="separator"int?t.separator:i;r="length"int?is(t.length):r,n="omission"int?Qn(t.omission):n}varo=(e=us(e)).length;if(Lt(e)){vara=Ht(e);o=a.length}if(r>=o)returne;vars=r-qt(n);if(s<1)returnn;varu=a?fi(a,0,s).join(""):e.slice(0,s);if(void0===i)returnu+n;if(a&&(s+=u.length-s),Ja(i)){if(e.slice(s).search(i)){varc,f=u;for(i.global||(i=ye(i.source,us(re.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)varl=c.index;u=u.slice(0,void0===l?s:l)}}elseif(e.indexOf(Qn(i),s)!=s){varh=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}returnu+n},Tr.unescape=function(e){return(e=us(e))&&M.test(e)?e.replace(D,Gt):e},Tr.uniqueId=function(e){vart=++Ae;returnus(e)+t},Tr.upperCase=Ls,Tr.upperFirst=Fs,Tr.each=ua,Tr.eachRight=ca,Tr.first=Uo,Zs(Tr,(lu={},cn(Tr,(function(e,t){Ee.call(Tr.prototype,t)||(lu[t]=e)})),lu),{chain:!1}),Tr.VERSION="4.17.21",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Tr[e].placeholder=Tr})),at(["drop","take"],(function(e,t){Or.prototype[e]=function(r){r=void0===r?1:ar(is(r),0);varn=this.__filtered__&&!t?newOr(this):this.clone();returnn.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,4294967295),type:e+(n.__dir__<0?"Right":"")}),n},Or.prototype[e+"Right"]=function(t){returnthis.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){varr=t+1,n=1==r||3==r;Or.prototype[e]=function(e){vart=this.clone();returnt.__iteratees__.push({iteratee:Zi(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),at(["head","last"],(function(e,t){varr="take"+(t?"Right":"");Or.prototype[e]=function(){returnthis[r](1).value()[0]}})),at(["initial","tail"],(function(e,t){varr="drop"+(t?"":"Right");Or.prototype[e]=function(){returnthis.__filtered__?newOr(this):this[r](1)}})),Or.prototype.compact=function(){returnthis.filter(Ws)},Or.prototype.find=function(e){returnthis.filter(e).head()},Or.prototype.findLast=function(e){returnthis.reverse().find(e)},Or.prototype.invokeMap=Ln((function(e,t){return"function"==typeofe?newOr(this):this.map((function(r){returnmn(r,e,t)}))})),Or.prototype.reject=function(e){returnthis.filter(Ia(Zi(e)))},Or.prototype.slice=function(e,t){e=is(e);varr=this;returnr.__filtered__&&(e>0||t<0)?newOr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),void0!==t&&(r=(t=is(t))<0?r.dropRight(-t):r.take(t-e)),r)},Or.prototype.takeRightWhile=function(e){returnthis.reverse().takeWhile(e).reverse()},Or.prototype.toArray=function(){returnthis.take(4294967295)},cn(Or.prototype,(function(e,t){varr=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Tr[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(Tr.prototype[t]=function(){vart=this.__wrapped__,a=n?[1]:arguments,s=tinstanceofOr,u=a[0],c=s||ka(t),f=function(e){vart=i.apply(Tr,pt([e],a));returnn&&l?t[0]:t};c&&r&&"function"==typeofu&&1!=u.length&&(s=c=!1);varl=this.__chain__,h=!!this.__actions__.length,p=o&&!l,d=s&&!h;if(!o&&c){t=d?t:newOr(this);vary=e.apply(t,a);returny.__actions__.push({func:na,args:[f],thisArg:void0}),newPr(y,l)}returnp&&d?e.apply(this,a):(y=this.thru(f),p?n?y.value()[0]:y.value():y)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){vart=_e[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Tr.prototype[e]=function(){vare=arguments;if(n&&!this.__chain__){vari=this.value();returnt.apply(ka(i)?i:[],e)}returnthis[r]((function(r){returnt.apply(ka(r)?r:[],e)}))}})),cn(Or.prototype,(function(e,t){varr=Tr[t];if(r){varn=r.name+"";Ee.call(mr,n)||(mr[n]=[]),mr[n].push({name:t,func:r})}})),mr[Ri(void0,2).name]=[{name:"wrapper",func:void0}],Or.prototype.clone=function(){vare=newOr(this.__wrapped__);returne.__actions__=_i(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_i(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_i(this.__views__),e},Or.prototype.reverse=function(){if(this.__filtered__){vare=newOr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;returne},Or.prototype.value=function(){vare=this.__wrapped__.value(),t=this.__dir__,r=ka(e),n=t<0,i=r?e.length:0,o=function(e,t,r){varn=-1,i=r.length;for(;++n<i;){varo=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=sr(t,e+a);break;case"takeRight":e=ar(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,f=this.__iteratees__,l=f.length,h=0,p=sr(u,this.__takeCount__);if(!r||!n&&i==u&&p==u)returnni(e,this.__actions__);vard=[];e:for(;u--&&h<p;){for(vary=-1,g=e[c+=t];++y<l;){varv=f[y],_=v.iteratee,m=v.type,b=_(g);if(2==m)g=b;elseif(!b){if(1==m)continuee;breake}}d[h++]=g}returnd},Tr.prototype.at=ia,Tr.prototype.chain=function(){returnra(this)},Tr.prototype.commit=function(){returnnewPr(this.value(),this.__chain__)},Tr.prototype.next=function(){void0===this.__values__&&(this.__values__=rs(this.value()));vare=this.__index__>=this.__values__.length;return{done:e,value:e?void0:this.__values__[this.__index__++]}},Tr.prototype.plant=function(e){for(vart,r=this;rinstanceofxr;){varn=Ro(r);n.__index__=0,n.__values__=void0,t?i.__wrapped__=n:t=n;vari=n;r=r.__wrapped__}returni.__wrapped__=e,t},Tr.prototype.reverse=function(){vare=this.__wrapped__;if(einstanceofOr){vart=e;returnthis.__actions__.length&&(t=newOr(this)),(t=t.reverse()).__actions__.push({func:na,args:[$o],thisArg:void0}),newPr(t,this.__chain__)}returnthis.thru($o)},Tr.prototype.toJSON=Tr.prototype.valueOf=Tr.prototype.value=function(){returnni(this.__wrapped__,this.__actions__)},Tr.prototype.first=Tr.prototype.head,Ze&&(Tr.prototype[Ze]=function(){returnthis}),Tr}();He._=Jt,void0===(n=function(){returnJt}.call(t,r,t,e))||(e.exports=n)}).call(this)}).call(this,r(73)(e))},function(e,t){e.exports=function(e){returne.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){returne.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){returne.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(10),i=r(75),o=r(2),a=r(19);functions(e,t=!1){constr="string"==typeofe?Buffer.from(e):e;if(t)returnfunction(e){constt=a.Certificate.fromPEMs(e);letr="";returnt.forEach(e=>{if(e.signatureOID.startsWith("1.2.840.113549.1.1")){constt=u(e);0===r.length?r+=t:r+="_"+t}}),r}(r);returnu(a.Certificate.fromPEM(r))}functionu(e){const{issuer:t,serialNumber:r}=e,n=t.attributes.reduceRight((e,t)=>{const{shortName:r,value:n}=t;return`${e}${r}=${n},`},"").slice(0,-1),a=newi.default(r,16).toString(10);returno.createHash("md5").update(n+a,"utf8").digest("hex")}t.loadPublicKeyFromPath=function(e){constt=n.readFileSync(e);returna.Certificate.fromPEM(t).publicKeyRaw.toString("base64")},t.loadPublicKey=function(e){constt="string"==typeofe?Buffer.from(e):e;returna.Certificate.fromPEM(t).publicKeyRaw.toString("base64")},t.getSNFromPath=function(e,t=!1){returns(n.readFileSync(e),t)},t.getSN=s},function(e,t,r){"use strict";r.r(t),r.d(t,"BigNumber",(function(){return_}));varn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",u=1e14,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e9;functionl(e){vart=0|e;returne>0||e===t?t:t-1}functionh(e){for(vart,r,n=1,i=e.length,o=e[0]+"";n<i;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););returno.slice(0,i+1||1)}functionp(e,t){varr,n,i=e.c,o=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)returnnull;if(r=i&&!i[0],n=o&&!o[0],r||n)returnr?n?0:-s:a;if(a!=s)returna;if(r=a<0,n=u==c,!i||!o)returnn?0:!i^r?1:-1;if(!n)returnu>c^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;a<s;a++)if(i[a]!=o[a])returni[a]>o[a]^r?1:-1;returnu==c?0:u>c^r?1:-1}functiond(e,t,r,n){if(e<t||e>r||e!==o(e))throwError(a+(n||"Argument")+("number"==typeofe?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}functiony(e){vart=e.c.length-1;returnl(e.e/14)==t&&e.c[t]%2!=0}functiong(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}functionv(e,t,r){varn,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}elseif(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}elset<n&&(e=e.slice(0,t)+"."+e.slice(t));returne}var_=functione(t){varr,_,m,b,w,S,E,A,I,N=F.prototype={constructor:F,toString:null,valueOf:null},C=newF(1),T=20,R=4,x=-7,P=21,O=-1e7,B=1e7,k=!1,D=1,U=0,M={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;functionF(e,t){varr,i,a,u,c,f,l,h,p=this;if(!(pinstanceofF))returnnewF(e,t);if(null==t){if(e&&!0===e._isBigNumber)returnp.s=e.s,void(!e.c||e.e>B?p.c=p.e=null:e.e<O?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((f="number"==typeofe)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,c=e;c>=10;c/=10,u++);returnvoid(u>B?p.c=p.e=null:(p.e=u,p.c=[e]))}h=String(e)}else{if(!n.test(h=String(e)))returnm(p,h,f);p.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(u=h.indexOf("."))>-1&&(h=h.replace(".","")),(c=h.search(/e/i))>0?(u<0&&(u=c),u+=+h.slice(c+1),h=h.substring(0,c)):u<0&&(u=h.length)}else{if(d(t,2,j.length,"Base"),10==t&&L)return$(p=newF(e),T+p.e+1,R);if(h=String(e),f="number"==typeofe){if(0*e!=0)returnm(p,h,f,t);if(p.s=1/e<0?(h=h.slice(1),-1):1,F.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throwError(s+e)}elsep.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=j.slice(0,t),u=c=0,l=h.length;c<l;c++)if(r.indexOf(i=h.charAt(c))<0){if("."==i){if(c>u){u=l;continue}}elseif(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,c=-1,u=0;continue}returnm(p,String(e),f,t)}f=!1,(u=(h=_(h,t,10,p.s)).indexOf("."))>-1?h=h.replace(".",""):u=h.length}for(c=0;48===h.charCodeAt(c);c++);for(l=h.length;48===h.charCodeAt(--l););if(h=h.slice(c,++l)){if(l-=c,f&&F.DEBUG&&l>15&&(e>9007199254740991||e!==o(e)))throwError(s+p.s*e);if((u=u-c-1)>B)p.c=p.e=null;elseif(u<O)p.c=[p.e=0];else{if(p.e=u,p.c=[],c=(u+1)%14,u<0&&(c+=14),c<l){for(c&&p.c.push(+h.slice(0,c)),l-=14;c<l;)p.c.push(+h.slice(c,c+=14));c=14-(h=h.slice(c)).length}elsec-=l;for(;c--;h+="0");p.c.push(+h)}}elsep.c=[p.e=0]}functionK(e,t,r,n){vari,o,a,s,u;if(null==r?r=R:d(r,0,8),!e.c)returne.toString();if(i=e.c[0],a=e.e,null==t)u=h(e.c),u=1==n||2==n&&(a<=x||a>=P)?g(u,a):v(u,a,"0");elseif(o=(e=$(newF(e),t,r)).e,s=(u=h(e.c)).length,1==n||2==n&&(t<=o||o<=x)){for(;s<t;u+="0",s++);u=g(u,o)}elseif(t-=a,u=v(u,o,"0"),o+1>s){if(--t>0)for(u+=".";t--;u+="0");}elseif((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");returne.s<0&&i?"-"+u:u}functionz(e,t){for(varr,n=1,i=newF(e[0]);n<e.length;n++){if(!(r=newF(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}returni}functionV(e,t,r){for(varn=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+14*r-1)>B?e.c=e.e=null:r<O?e.c=[e.e=0]:(e.e=r,e.c=t),e}function$(e,t,r,n){vara,s,f,l,h,p,d,y=e.c,g=c;if(y){e:{for(a=1,l=y[0];l>=10;l/=10,a++);if((s=t-a)<0)s+=14,f=t,d=(h=y[p=0])/g[a-f-1]%10|0;elseif((p=i((s+1)/14))>=y.length){if(!n)breake;for(;y.length<=p;y.push(0));h=d=0,a=1,f=(s%=14)-14+1}else{for(h=l=y[p],a=1;l>=10;l/=10,a++);d=(f=(s%=14)-14+a)<0?0:h/g[a-f-1]%10|0}if(n=n||t<0||null!=y[p+1]||(f<0?h:h%g[a-f-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(s>0?f>0?h/g[a-f]:0:y[p-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])returny.length=0,n?(t-=e.e+1,y[0]=g[(14-t%14)%14],e.e=-t||0):y[0]=e.e=0,e;if(0==s?(y.length=p,l=1,p--):(y.length=p+1,l=g[14-s],y[p]=f>0?o(h/g[a-f]%g[f])*l:0),n)for(;;){if(0==p){for(s=1,f=y[0];f>=10;f/=10,s++);for(f=y[0]+=l,l=1;f>=10;f/=10,l++);s!=l&&(e.e++,y[0]==u&&(y[0]=1));break}if(y[p]+=l,y[p]!=u)break;y[p--]=0,l=1}for(s=y.length;0===y[--s];y.pop());}e.e>B?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}returne}functionq(e){vart,r=e.e;returnnull===r?e.toString():(t=h(e.c),t=r<=x||r>=P?g(t,r):v(t,r,"0"),e.s<0?"-"+t:t)}returnF.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){vart,r;if(null!=e){if("object"!=typeofe)throwError(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(d(r=e[t],0,f,t),T=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(d(r=e[t],0,8,t),R=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(d(r[0],-f,0,t),d(r[1],0,f,t),x=r[0],P=r[1]):(d(r,-f,f,t),x=-(P=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)d(r[0],-f,-1,t),d(r[1],1,f,t),O=r[0],B=r[1];else{if(d(r,-f,f,t),!r)throwError(a+t+" cannot be zero: "+r);O=-(B=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throwError(a+t+" not true or false: "+r);if(r){if("undefined"==typeofcrypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throwk=!r,Error(a+"crypto unavailable");k=r}elsek=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(d(r=e[t],0,9,t),D=r),e.hasOwnProperty(t="POW_PRECISION")&&(d(r=e[t],0,f,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throwError(a+t+" not an object: "+r);M=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throwError(a+t+" invalid: "+r);L="0123456789"==r.slice(0,10),j=r}}return{DECIMAL_PLACES:T,ROUNDING_MODE:R,EXPONENTIAL_AT:[x,P],RANGE:[O,B],CRYPTO:k,MODULO_MODE:D,POW_PRECISION:U,FORMAT:M,ALPHABET:j}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;vart,r,n=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-f&&i<=f&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;breake}if((t=(i+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=u||r!==o(r))breake;if(0!==r)return!0}}}elseif(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throwError(a+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){returnz(arguments,N.lt)},F.minimum=F.min=function(){returnz(arguments,N.gt)},F.random=(b=9007199254740992*Math.random()&2097151?function(){returno(9007199254740992*Math.random())}:function(){return8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){vart,r,n,s,u,l=0,h=[],p=newF(C);if(null==e?e=T:d(e,0,f),s=i(e/14),k)if(crypto.getRandomValues){for(t=crypto.getRandomValues(newUint32Array(s*=2));l<s;)(u=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(newUint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(h.push(u%1e14),l+=2);l=s/2}else{if(!crypto.randomBytes)throwk=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(s*=7);l<s;)(u=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(h.push(u%1e14),l+=7);l=s/7}if(!k)for(;l<s;)(u=b())<9e15&&(h[l++]=u%1e14);for(e%=14,(s=h[--l])&&e&&(u=c[14-e],h[l]=o(s/u)*u);0===h[l];h.pop(),l--);if(l<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=14);for(l=1,u=h[0];u>=10;u/=10,l++);l<14&&(n-=14-l)}returnp.e=n,p.c=h,p}),F.sum=function(){for(vare=1,t=arguments,r=newF(t[0]);e<t.length;)r=r.plus(t[e++]);returnr},_=function(){functione(e,t,r,n){for(vari,o,a=[0],s=0,u=e.length;s<u;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}returna.reverse()}returnfunction(t,n,i,o,a){vars,u,c,f,l,p,d,y,g=t.indexOf("."),_=T,m=R;for(g>=0&&(f=U,U=0,t=t.replace(".",""),p=(y=newF(n)).pow(t.length-g),U=f,y.c=e(v(h(p.c),p.e,"0"),10,i,"0123456789"),y.e=y.c.length),c=f=(d=e(t,n,i,a?(s=j,"0123456789"):(s="0123456789",j))).length;0==d[--f];d.pop());if(!d[0])returns.charAt(0);if(g<0?--c:(p.c=d,p.e=c,p.s=o,d=(p=r(p,y,_,m,i)).c,l=p.r,c=p.e),g=d[u=c+_+1],f=i/2,l=l||u<0||null!=d[u+1],l=m<4?(null!=g||l)&&(0==m||m==(p.s<0?3:2)):g>f||g==f&&(4==m||l||6==m&&1&d[u-1]||m==(p.s<0?8:7)),u<1||!d[0])t=l?v(s.charAt(1),-_,s.charAt(0)):s.charAt(0);else{if(d.length=u,l)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(g=0,t="";g<=f;t+=s.charAt(d[g++]));t=v(t,c,s.charAt(0))}returnt}}(),r=function(){functione(e,t,r){varn,i,o,a,s=0,u=e.length,c=t%1e7,f=t/1e7|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%1e7)+(n=f*o+(a=e[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+f*a,e[u]=i%r;returns&&(e=[s].concat(e)),e}functiont(e,t,r,n){vari,o;if(r!=n)o=r>n?1:-1;elsefor(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}returno}functionr(e,t,r,n){for(vari=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}returnfunction(n,i,a,s,c){varf,h,p,d,y,g,v,_,m,b,w,S,E,A,I,N,C,T=n.s==i.s?1:-1,R=n.c,x=i.c;if(!(R&&R[0]&&x&&x[0]))returnnewF(n.s&&i.s&&(R?!x||R[0]!=x[0]:x)?R&&0==R[0]||!x?0*T:T/0:NaN);for(m=(_=newF(T)).c=[],T=a+(h=n.e-i.e)+1,c||(c=u,h=l(n.e/14)-l(i.e/14),T=T/14|0),p=0;x[p]==(R[p]||0);p++);if(x[p]>(R[p]||0)&&h--,T<0)m.push(1),d=!0;else{for(A=R.length,N=x.length,p=0,T+=2,(y=o(c/(x[0]+1)))>1&&(x=e(x,y,c),R=e(R,y,c),N=x.length,A=R.length),E=N,w=(b=R.slice(0,N)).length;w<N;b[w++]=0);C=x.slice(),C=[0].concat(C),I=x[0],x[1]>=c/2&&I++;do{if(y=0,(f=t(x,b,N,w))<0){if(S=b[0],N!=w&&(S=S*c+(b[1]||0)),(y=o(S/I))>1)for(y>=c&&(y=c-1),v=(g=e(x,y,c)).length,w=b.length;1==t(g,b,v,w);)y--,r(g,N<v?C:x,v,c),v=g.length,f=1;else0==y&&(f=y=1),v=(g=x.slice()).length;if(v<w&&(g=[0].concat(g)),r(b,g,w,c),w=b.length,-1==f)for(;t(x,b,N,w)<1;)y++,r(b,N<w?C:x,w,c),w=b.length}else0===f&&(y++,b=[0]);m[p++]=y,b[0]?b[w++]=R[E]||0:(b=[R[E]],w=1)}while((E++<A||null!=b[0])&&T--);d=null!=b[0],m[0]||m.splice(0,1)}if(c==u){for(p=1,T=m[0];T>=10;T/=10,p++);$(_,a+(_.e=p+14*h-1)+1,s,d)}else_.e=h,_.r=+d;return_}}(),w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,E=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,m=function(e,t,r,n){vari,o=r?t:t.replace(I,"");if(A.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(w,(function(e,t,r){returni="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(S,"$1").replace(E,"0.$1")),t!=o))returnnewF(o,i);if(F.DEBUG)throwError(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){vare=newF(this);returne.s<0&&(e.s=1),e},N.comparedTo=function(e,t){returnp(this,newF(e,t))},N.decimalPlaces=N.dp=function(e,t){varr,n,i,o=this;if(null!=e)returnd(e,0,f),null==t?t=R:d(t,0,8),$(newF(o),e+o.e+1,t);if(!(r=o.c))returnnull;if(n=14*((i=r.length-1)-l(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);returnn<0&&(n=0),n},N.dividedBy=N.div=function(e,t){returnr(this,newF(e,t),T,R)},N.dividedToIntegerBy=N.idiv=function(e,t){returnr(this,newF(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){varr,n,s,u,c,f,l,h,p=this;if((e=newF(e)).c&&!e.isInteger())throwError(a+"Exponent not an integer: "+q(e));if(null!=t&&(t=newF(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])returnh=newF(Math.pow(+q(p),c?2-y(e):+q(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)returnnewF(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))returnu=p.s<0&&y(e)?-0:0,p.e>-1&&(u=1/u),newF(f?1/u:u);U&&(u=i(U/14+2))}for(c?(r=newF(.5),f&&(e.s=1),l=y(e)):l=(s=Math.abs(+q(e)))%2,h=newF(C);;){if(l){if(!(h=h.times(p)).c)break;u?h.c.length>u&&(h.c.length=u):n&&(h=h.mod(t))}if(s){if(0===(s=o(s/2)))break;l=s%2}elseif($(e=e.times(r),e.e+1,1),e.e>14)l=y(e);else{if(0===(s=+q(e)))break;l=s%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):n&&(p=p.mod(t))}returnn?h:(f&&(h=C.div(h)),t?h.mod(t):u?$(h,U,R,void0):h)},N.integerValue=function(e){vart=newF(this);returnnull==e?e=R:d(e,0,8),$(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return0===p(this,newF(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){returnp(this,newF(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return1===(t=p(this,newF(e,t)))||0===t},N.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},N.isLessThan=N.lt=function(e,t){returnp(this,newF(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=p(this,newF(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){returnthis.s<0},N.isPositive=function(){returnthis.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){varr,n,i,o,a=this,s=a.s;if(t=(e=newF(e,t)).s,!s||!t)returnnewF(NaN);if(s!=t)returne.s=-t,a.plus(e);varc=a.e/14,f=e.e/14,h=a.c,p=e.c;if(!c||!f){if(!h||!p)returnh?(e.s=-t,e):newF(p?a:NaN);if(!h[0]||!p[0])returnp[0]?(e.s=-t,e):newF(h[0]?a:3==R?-0:0)}if(c=l(c),f=l(f),h=h.slice(),s=c-f){for((o=s<0)?(s=-s,i=h):(f=c,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}elsefor(n=(o=(s=h.length)<(t=p.length))?s:t,s=t=0;t<n;t++)if(h[t]!=p[t]){o=h[t]<p[t];break}if(o&&(i=h,h=p,p=i,e.s=-e.s),(t=(n=p.length)-(r=h.length))>0)for(;t--;h[r++]=0);for(t=u-1;n>s;){if(h[--n]<p[n]){for(r=n;r&&!h[--r];h[r]=t);--h[r],h[n]+=u}h[n]-=p[n]}for(;0==h[0];h.splice(0,1),--f);returnh[0]?V(e,h,f):(e.s=3==R?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){varn,i,o=this;returne=newF(e,t),!o.c||!e.s||e.c&&!e.c[0]?newF(NaN):!e.c||o.c&&!o.c[0]?newF(o):(9==D?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,D),(e=o.minus(n.times(e))).c[0]||1!=D||(e.s=o.s),e)},N.multipliedBy=N.times=function(e,t){varr,n,i,o,a,s,c,f,h,p,d,y,g,v,_=this,m=_.c,b=(e=newF(e,t)).c;if(!(m&&b&&m[0]&&b[0]))return!_.s||!e.s||m&&!m[0]&&!b||b&&!b[0]&&!m?e.c=e.e=e.s=null:(e.s*=_.s,m&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=l(_.e/14)+l(e.e/14),e.s*=_.s,(c=m.length)<(p=b.length)&&(g=m,m=b,b=g,i=c,c=p,p=i),i=c+p,g=[];i--;g.push(0));for(v=u,1e7,i=p;--i>=0;){for(r=0,d=b[i]%1e7,y=b[i]/1e7|0,o=i+(a=c);o>i;)r=((f=d*(f=m[--a]%1e7)+(s=y*f+(h=m[a]/1e7|0)*d)%1e7*1e7+g[o]+r)/v|0)+(s/1e7|0)+y*h,g[o--]=f%v;g[o]=r}returnr?++n:g.splice(0,1),V(e,g,n)},N.negated=function(){vare=newF(this);returne.s=-e.s||null,e},N.plus=function(e,t){varr,n=this,i=n.s;if(t=(e=newF(e,t)).s,!i||!t)returnnewF(NaN);if(i!=t)returne.s=-t,n.minus(e);varo=n.e/14,a=e.e/14,s=n.c,c=e.c;if(!o||!a){if(!s||!c)returnnewF(i/0);if(!s[0]||!c[0])returnc[0]?e:newF(s[0]?n:0*i)}if(o=l(o),a=l(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/u|0,s[t]=u===s[t]?0:s[t]%u;returni&&(s=[i].concat(s),++a),V(e,s,a)},N.precision=N.sd=function(e,t){varr,n,i,o=this;if(null!=e&&e!==!!e)returnd(e,1,f),null==t?t=R:d(t,0,8),$(newF(o),e,t);if(!(r=o.c))returnnull;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}returne&&o.e+1>n&&(n=o.e+1),n},N.shiftedBy=function(e){returnd(e,-9007199254740991,9007199254740991),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){vare,t,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=T+4,p=newF("0.5");if(1!==u||!s||!s[0])returnnewF(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+q(a)))||u==1/0?(((t=h(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=l((c+1)/2)-(c<0||c%2),n=newF(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=newF(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=p.times(o.plus(r(a,o,f,1))),h(o.c).slice(0,u)===(t=h(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($(n,n.e+T+2,1),e=!n.times(n).eq(a));break}if(!i&&($(o,o.e+T+2,0),o.times(o).eq(a))){n=o;break}f+=4,u+=4,i=1}return$(n,n.e+T+1,R,e)},N.toExponential=function(e,t){returnnull!=e&&(d(e,0,f),e++),K(this,e,t,1)},N.toFixed=function(e,t){returnnull!=e&&(d(e,0,f),e=e+this.e+1),K(this,e,t)},N.toFormat=function(e,t,r){varn,i=this;if(null==r)null!=e&&t&&"object"==typeoft?(r=t,t=null):e&&"object"==typeofe?(r=e,e=t=null):r=M;elseif("object"!=typeofr)throwError(a+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){varo,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",l=s[0],h=s[1],p=i.s<0,d=p?l.slice(1):l,y=d.length;if(c&&(o=u,u=c,c=o,y-=o),u>0&&y>0){for(o=y%u||u,l=d.substr(0,o);o<y;o+=u)l+=f+d.substr(o,u);c>0&&(l+=f+d.slice(o)),p&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(newRegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){vart,n,i,o,s,u,f,l,p,d,y,g,v=this,_=v.c;if(null!=e&&(!(f=newF(e)).isInteger()&&(f.c||1!==f.s)||f.lt(C)))throwError(a+"Argument "+(f.isInteger()?"out of range: ":"not an integer: ")+q(f));if(!_)returnnewF(v);for(t=newF(C),p=n=newF(C),i=l=newF(C),g=h(_),s=t.e=g.length-v.e-1,t.c[0]=c[(u=s%14)<0?14+u:u],e=!e||f.comparedTo(t)>0?s>0?t:p:f,u=B,B=1/0,f=newF(g),l.c[0]=0;d=r(f,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,p=l.plus(d.times(o=p)),l=o,t=f.minus(d.times(o=t)),f=o;returno=r(e.minus(n),i,0,1),l=l.plus(o.times(p)),n=n.plus(o.times(i)),l.s=p.s=v.s,y=r(p,i,s*=2,R).minus(v).abs().comparedTo(r(l,n,s,R).minus(v).abs())<1?[p,i]:[l,n],B=u,y},N.toNumber=function(){return+q(this)},N.toPrecision=function(e,t){returnnull!=e&&d(e,1,f),K(this,e,t,2)},N.toString=function(e){vart,r=this,n=r.s,i=r.e;returnnull===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=x||i>=P?g(h(r.c),i):v(h(r.c),i,"0"):10===e&&L?t=v(h((r=$(newF(r),T+i+1,R)).c),r.e,"0"):(d(e,2,j.length,"Base"),t=_(v(h(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){returnq(this)},N._isBigNumber=!0,N[Symbol.toStringTag]="BigNumber",N[Symbol.for("nodejs.util.inspect.custom")]=N.valueOf,null!=t&&F.set(t),F}();t.default=_},function(e,t){e.exports=require("net")},function(e,t,r){!function(e){"use strict";vart=function(e){vart,r=newFloat64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];returnr},n=function(){thrownewError("no PRNG")},i=newUint8Array(16),o=newUint8Array(32);o[0]=9;vara=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);functiond(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}functiony(e,t,r,n,i){varo,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}functiong(e,t,r,n){returny(e,t,r,n,16)}functionv(e,t,r,n){returny(e,t,r,n,32)}function_(e,t,r,n){!function(e,t,r,n){for(vari,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,_=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,S=a,E=s,A=u,I=c,N=f,C=l,T=h,R=p,x=d,P=y,O=g,B=v,k=_,D=m,U=b,M=0;M<20;M+=2)w^=(i=(B^=(i=(R^=(i=(I^=(i=w+B|0)<<7|i>>>25)+w|0)<<9|i>>>23)+I|0)<<13|i>>>19)+R|0)<<18|i>>>14,N^=(i=(S^=(i=(k^=(i=(x^=(i=N+S|0)<<7|i>>>25)+N|0)<<9|i>>>23)+x|0)<<13|i>>>19)+k|0)<<18|i>>>14,P^=(i=(C^=(i=(E^=(i=(D^=(i=P+C|0)<<7|i>>>25)+P|0)<<9|i>>>23)+D|0)<<13|i>>>19)+E|0)<<18|i>>>14,U^=(i=(O^=(i=(T^=(i=(A^=(i=U+O|0)<<7|i>>>25)+U|0)<<9|i>>>23)+A|0)<<13|i>>>19)+T|0)<<18|i>>>14,w^=(i=(A^=(i=(E^=(i=(S^=(i=w+A|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+E|0)<<18|i>>>14,N^=(i=(I^=(i=(T^=(i=(C^=(i=N+I|0)<<7|i>>>25)+N|0)<<9|i>>>23)+C|0)<<13|i>>>19)+T|0)<<18|i>>>14,P^=(i=(x^=(i=(R^=(i=(O^=(i=P+x|0)<<7|i>>>25)+P|0)<<9|i>>>23)+O|0)<<13|i>>>19)+R|0)<<18|i>>>14,U^=(i=(D^=(i=(k^=(i=(B^=(i=U+D|0)<<7|i>>>25)+U|0)<<9|i>>>23)+B|0)<<13|i>>>19)+k|0)<<18|i>>>14;w=w+o|0,S=S+a|0,E=E+s|0,A=A+u|0,I=I+c|0,N=N+f|0,C=C+l|0,T=T+h|0,R=R+p|0,x=x+d|0,P=P+y|0,O=O+g|0,B=B+v|0,k=k+_|0,D=D+m|0,U=U+b|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=I>>>0&255,e[17]=I>>>8&255,e[18]=I>>>16&255,e[19]=I>>>24&255,e[20]=N>>>0&255,e[21]=N>>>8&255,e[22]=N>>>16&255,e[23]=N>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=R>>>0&255,e[33]=R>>>8&255,e[34]=R>>>16&255,e[35]=R>>>24&255,e[36]=x>>>0&255,e[37]=x>>>8&255,e[38]=x>>>16&255,e[39]=x>>>24&255,e[40]=P>>>0&255,e[41]=P>>>8&255,e[42]=P>>>16&255,e[43]=P>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=B>>>0&255,e[49]=B>>>8&255,e[50]=B>>>16&255,e[51]=B>>>24&255,e[52]=k>>>0&255,e[53]=k>>>8&255,e[54]=k>>>16&255,e[55]=k>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=U>>>0&255,e[61]=U>>>8&255,e[62]=U>>>16&255,e[63]=U>>>24&255}(e,t,r,n)}functionm(e,t,r,n){!function(e,t,r,n){for(vari,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,_=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(v^=(i=(p^=(i=(c^=(i=o+v|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(a^=(i=(_^=(i=(d^=(i=f+a|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+_|0)<<18|i>>>14,y^=(i=(l^=(i=(s^=(i=(m^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+s|0)<<18|i>>>14,b^=(i=(g^=(i=(h^=(i=(u^=(i=b+g|0)<<7|i>>>25)+b|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,f^=(i=(c^=(i=(h^=(i=(l^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(g^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,b^=(i=(m^=(i=(_^=(i=(v^=(i=b+m|0)<<7|i>>>25)+b|0)<<9|i>>>23)+v|0)<<13|i>>>19)+_|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}varb=newUint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);functionw(e,t,r,n,i,o,a){vars,u,c=newUint8Array(16),f=newUint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(_(f,c,a,b),u=0;u<64;u++)e[t+u]=r[n+u]^f[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(_(f,c,a,b),u=0;u<i;u++)e[t+u]=r[n+u]^f[u];return0}functionS(e,t,r,n,i){varo,a,s=newUint8Array(16),u=newUint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(_(u,s,i,b),a=0;a<64;a++)e[t+a]=u[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(_(u,s,i,b),a=0;a<r;a++)e[t+a]=u[a];return0}functionE(e,t,r,n,i){varo=newUint8Array(32);m(o,n,i,b);for(vara=newUint8Array(8),s=0;s<8;s++)a[s]=n[s+16];returnS(e,t,r,a,o)}functionA(e,t,r,n,i,o,a){vars=newUint8Array(32);m(s,o,a,b);for(varu=newUint8Array(8),c=0;c<8;c++)u[c]=o[c+16];returnw(e,t,r,n,i,u,s)}varI=function(e){vart,r,n,i,o,a,s,u;this.buffer=newUint8Array(16),this.r=newUint16Array(10),this.h=newUint16Array(10),this.pad=newUint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};functionN(e,t,r,n,i,o){vara=newI(o);returna.update(r,n,i),a.finish(e,t),0}functionC(e,t,r,n,i,o){vara=newUint8Array(16);returnN(a,0,r,n,i,o),g(e,t,a,0)}functionT(e,t,r,n,i){varo;if(r<32)return-1;for(A(e,0,t,0,r,n,i),N(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return0}functionR(e,t,r,n,i){varo,a=newUint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(t,16,t,32,r-32,a))return-1;for(A(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return0}functionx(e,t){varr;for(r=0;r<16;r++)e[r]=0|t[r]}functionP(e){vart,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}functionO(e,t,r){for(varn,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}functionB(e,r){varn,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(P(s),P(s),P(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,O(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}functionk(e,t){varr=newUint8Array(32),n=newUint8Array(32);returnB(r,e),B(n,t),v(r,0,n,0)}functionD(e){vart=newUint8Array(32);returnB(t,e),1&t[0]}functionU(e,t){varr;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}functionM(e,t,r){for(varn=0;n<16;n++)e[n]=t[n]+r[n]}functionj(e,t,r){for(varn=0;n<16;n++)e[n]=t[n]-r[n]}functionL(e,t,r){varn,i,o=0,a=0,s=0,u=0,c=0,f=0,l=0,h=0,p=0,d=0,y=0,g=0,v=0,_=0,m=0,b=0,w=0,S=0,E=0,A=0,I=0,N=0,C=0,T=0,R=0,x=0,P=0,O=0,B=0,k=0,D=0,U=r[0],M=r[1],j=r[2],L=r[3],F=r[4],K=r[5],z=r[6],V=r[7],$=r[8],q=r[9],H=r[10],W=r[11],G=r[12],J=r[13],Y=r[14],Z=r[15];o+=(n=t[0])*U,a+=n*M,s+=n*j,u+=n*L,c+=n*F,f+=n*K,l+=n*z,h+=n*V,p+=n*$,d+=n*q,y+=n*H,g+=n*W,v+=n*G,_+=n*J,m+=n*Y,b+=n*Z,a+=(n=t[1])*U,s+=n*M,u+=n*j,c+=n*L,f+=n*F,l+=n*K,h+=n*z,p+=n*V,d+=n*$,y+=n*q,g+=n*H,v+=n*W,_+=n*G,m+=n*J,b+=n*Y,w+=n*Z,s+=(n=t[2])*U,u+=n*M,c+=n*j,f+=n*L,l+=n*F,h+=n*K,p+=n*z,d+=n*V,y+=n*$,g+=n*q,v+=n*H,_+=n*W,m+=n*G,b+=n*J,w+=n*Y,S+=n*Z,u+=(n=t[3])*U,c+=n*M,f+=n*j,l+=n*L,h+=n*F,p+=n*K,d+=n*z,y+=n*V,g+=n*$,v+=n*q,_+=n*H,m+=n*W,b+=n*G,w+=n*J,S+=n*Y,E+=n*Z,c+=(n=t[4])*U,f+=n*M,l+=n*j,h+=n*L,p+=n*F,d+=n*K,y+=n*z,g+=n*V,v+=n*$,_+=n*q,m+=n*H,b+=n*W,w+=n*G,S+=n*J,E+=n*Y,A+=n*Z,f+=(n=t[5])*U,l+=n*M,h+=n*j,p+=n*L,d+=n*F,y+=n*K,g+=n*z,v+=n*V,_+=n*$,m+=n*q,b+=n*H,w+=n*W,S+=n*G,E+=n*J,A+=n*Y,I+=n*Z,l+=(n=t[6])*U,h+=n*M,p+=n*j,d+=n*L,y+=n*F,g+=n*K,v+=n*z,_+=n*V,m+=n*$,b+=n*q,w+=n*H,S+=n*W,E+=n*G,A+=n*J,I+=n*Y,N+=n*Z,h+=(n=t[7])*U,p+=n*M,d+=n*j,y+=n*L,g+=n*F,v+=n*K,_+=n*z,m+=n*V,b+=n*$,w+=n*q,S+=n*H,E+=n*W,A+=n*G,I+=n*J,N+=n*Y,C+=n*Z,p+=(n=t[8])*U,d+=n*M,y+=n*j,g+=n*L,v+=n*F,_+=n*K,m+=n*z,b+=n*V,w+=n*$,S+=n*q,E+=n*H,A+=n*W,I+=n*G,N+=n*J,C+=n*Y,T+=n*Z,d+=(n=t[9])*U,y+=n*M,g+=n*j,v+=n*L,_+=n*F,m+=n*K,b+=n*z,w+=n*V,S+=n*$,E+=n*q,A+=n*H,I+=n*W,N+=n*G,C+=n*J,T+=n*Y,R+=n*Z,y+=(n=t[10])*U,g+=n*M,v+=n*j,_+=n*L,m+=n*F,b+=n*K,w+=n*z,S+=n*V,E+=n*$,A+=n*q,I+=n*H,N+=n*W,C+=n*G,T+=n*J,R+=n*Y,x+=n*Z,g+=(n=t[11])*U,v+=n*M,_+=n*j,m+=n*L,b+=n*F,w+=n*K,S+=n*z,E+=n*V,A+=n*$,I+=n*q,N+=n*H,C+=n*W,T+=n*G,R+=n*J,x+=n*Y,P+=n*Z,v+=(n=t[12])*U,_+=n*M,m+=n*j,b+=n*L,w+=n*F,S+=n*K,E+=n*z,A+=n*V,I+=n*$,N+=n*q,C+=n*H,T+=n*W,R+=n*G,x+=n*J,P+=n*Y,O+=n*Z,_+=(n=t[13])*U,m+=n*M,b+=n*j,w+=n*L,S+=n*F,E+=n*K,A+=n*z,I+=n*V,N+=n*$,C+=n*q,T+=n*H,R+=n*W,x+=n*G,P+=n*J,O+=n*Y,B+=n*Z,m+=(n=t[14])*U,b+=n*M,w+=n*j,S+=n*L,E+=n*F,A+=n*K,I+=n*z,N+=n*V,C+=n*$,T+=n*q,R+=n*H,x+=n*W,P+=n*G,O+=n*J,B+=n*Y,k+=n*Z,b+=(n=t[15])*U,a+=38*(S+=n*j),s+=38*(E+=n*L),u+=38*(A+=n*F),c+=38*(I+=n*K),f+=38*(N+=n*z),l+=38*(C+=n*V),h+=38*(T+=n*$),p+=38*(R+=n*q),d+=38*(x+=n*H),y+=38*(P+=n*W),g+=38*(O+=n*G),v+=38*(B+=n*J),_+=38*(k+=n*Y),m+=38*(D+=n*Z),o=(n=(o+=38*(w+=n*M))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=g,e[12]=v,e[13]=_,e[14]=m,e[15]=b}functionF(e,t){L(e,t,t)}functionK(e,r){varn,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&L(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}functionz(e,r){varn,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&L(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}functionV(e,r,n){vari,o,a=newUint8Array(32),s=newFloat64Array(80),c=t(),f=t(),l=t(),h=t(),p=t(),d=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,U(s,n),o=0;o<16;o++)f[o]=s[o],h[o]=c[o]=l[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)O(c,f,i=a[o>>>3]>>>(7&o)&1),O(l,h,i),M(p,c,l),j(c,c,l),M(l,f,h),j(f,f,h),F(h,p),F(d,c),L(c,l,c),L(l,f,p),M(p,c,l),j(c,c,l),F(f,c),j(l,h,d),L(c,l,u),M(c,c,h),L(l,l,c),L(c,h,d),L(h,f,s),F(f,p),O(c,f,i),O(l,h,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=l[o],s[o+48]=f[o],s[o+64]=h[o];vary=s.subarray(32),g=s.subarray(16);returnK(y,y),L(g,g,y),B(e,g),0}function$(e,t){returnV(e,t,o)}functionq(e,t){returnn(t,32),$(e,t)}functionH(e,t,r){varn=newUint8Array(32);returnV(n,r,t),m(e,i,n,b)}I.prototype.blocks=function(e,t,r){for(varn,i,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w,S=this.fin?0:2048,E=this.h[0],A=this.h[1],I=this.h[2],N=this.h[3],C=this.h[4],T=this.h[5],R=this.h[6],x=this.h[7],P=this.h[8],O=this.h[9],B=this.r[0],k=this.r[1],D=this.r[2],U=this.r[3],M=this.r[4],j=this.r[5],L=this.r[6],F=this.r[7],K=this.r[8],z=this.r[9];r>=16;)h=l=0,h+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*B,h+=(A+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*z),h+=(I+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*K),h+=(N+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),l=(h+=(C+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*L))>>>13,h&=8191,h+=(T+=s>>>1&8191)*(5*j),h+=(R+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),h+=(x+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*U),h+=(P+=8191&(c>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),p=l+=(h+=(O+=f>>>5|S)*(5*k))>>>13,p+=E*k,p+=A*B,p+=I*(5*z),p+=N*(5*K),l=(p+=C*(5*F))>>>13,p&=8191,p+=T*(5*L),p+=R*(5*j),p+=x*(5*M),p+=P*(5*U),l+=(p+=O*(5*D))>>>13,p&=8191,d=l,d+=E*D,d+=A*k,d+=I*B,d+=N*(5*z),l=(d+=C*(5*K))>>>13,d&=8191,d+=T*(5*F),d+=R*(5*L),d+=x*(5*j),d+=P*(5*M),y=l+=(d+=O*(5*U))>>>13,y+=E*U,y+=A*D,y+=I*k,y+=N*B,l=(y+=C*(5*z))>>>13,y&=8191,y+=T*(5*K),y+=R*(5*F),y+=x*(5*L),y+=P*(5*j),g=l+=(y+=O*(5*M))>>>13,g+=E*M,g+=A*U,g+=I*D,g+=N*k,l=(g+=C*B)>>>13,g&=8191,g+=T*(5*z),g+=R*(5*K),g+=x*(5*F),g+=P*(5*L),v=l+=(g+=O*(5*j))>>>13,v+=E*j,v+=A*M,v+=I*U,v+=N*D,l=(v+=C*k)>>>13,v&=8191,v+=T*B,v+=R*(5*z),v+=x*(5*K),v+=P*(5*F),_=l+=(v+=O*(5*L))>>>13,_+=E*L,_+=A*j,_+=I*M,_+=N*U,l=(_+=C*D)>>>13,_&=8191,_+=T*k,_+=R*B,_+=x*(5*z),_+=P*(5*K),m=l+=(_+=O*(5*F))>>>13,m+=E*F,m+=A*L,m+=I*j,m+=N*M,l=(m+=C*U)>>>13,m&=8191,m+=T*D,m+=R*k,m+=x*B,m+=P*(5*z),b=l+=(m+=O*(5*K))>>>13,b+=E*K,b+=A*F,b+=I*L,b+=N*j,l=(b+=C*M)>>>13,b&=8191,b+=T*U,b+=R*D,b+=x*k,b+=P*B,w=l+=(b+=O*(5*z))>>>13,w+=E*z,w+=A*K,w+=I*F,w+=N*L,l=(w+=C*j)>>>13,w&=8191,w+=T*M,w+=R*U,w+=x*D,w+=P*k,E=h=8191&(l=(l=((l+=(w+=O*B)>>>13)<<2)+l|0)+(h&=8191)|0),A=p+=l>>>=13,I=d&=8191,N=y&=8191,C=g&=8191,T=v&=8191,R=_&=8191,x=m&=8191,P=b&=8191,O=w&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=I,this.h[3]=N,this.h[4]=C,this.h[5]=T,this.h[6]=R,this.h[7]=x,this.h[8]=P,this.h[9]=O},I.prototype.finish=function(e,t){varr,n,i,o,a=newUint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},I.prototype.update=function(e,t,r){varn,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};varW=T,G=R;varJ=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];functionY(e,t,r,n){for(vari,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w,S,E,A,I,N,C,T,R,x=newInt32Array(16),P=newInt32Array(16),O=e[0],B=e[1],k=e[2],D=e[3],U=e[4],M=e[5],j=e[6],L=e[7],F=t[0],K=t[1],z=t[2],V=t[3],$=t[4],q=t[5],H=t[6],W=t[7],G=0;n>=128;){for(S=0;S<16;S++)E=8*S+G,x[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],P[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(S=0;S<80;S++)if(i=O,o=B,a=k,s=D,u=U,c=M,f=j,L,h=F,p=K,d=z,y=V,g=$,v=q,_=H,W,N=65535&(I=W),C=I>>>16,T=65535&(A=L),R=A>>>16,N+=65535&(I=($>>>14|U<<18)^($>>>18|U<<14)^(U>>>9|$<<23)),C+=I>>>16,T+=65535&(A=(U>>>14|$<<18)^(U>>>18|$<<14)^($>>>9|U<<23)),R+=A>>>16,N+=65535&(I=$&q^~$&H),C+=I>>>16,T+=65535&(A=U&M^~U&j),R+=A>>>16,N+=65535&(I=J[2*S+1]),C+=I>>>16,T+=65535&(A=J[2*S]),R+=A>>>16,A=x[S%16],C+=(I=P[S%16])>>>16,T+=65535&A,R+=A>>>16,T+=(C+=(N+=65535&I)>>>16)>>>16,N=65535&(I=w=65535&N|C<<16),C=I>>>16,T=65535&(A=b=65535&T|(R+=T>>>16)<<16),R=A>>>16,N+=65535&(I=(F>>>28|O<<4)^(O>>>2|F<<30)^(O>>>7|F<<25)),C+=I>>>16,T+=65535&(A=(O>>>28|F<<4)^(F>>>2|O<<30)^(F>>>7|O<<25)),R+=A>>>16,C+=(I=F&K^F&z^K&z)>>>16,T+=65535&(A=O&B^O&k^B&k),R+=A>>>16,l=65535&(T+=(C+=(N+=65535&I)>>>16)>>>16)|(R+=T>>>16)<<16,m=65535&N|C<<16,N=65535&(I=y),C=I>>>16,T=65535&(A=s),R=A>>>16,C+=(I=w)>>>16,T+=65535&(A=b),R+=A>>>16,B=i,k=o,D=a,U=s=65535&(T+=(C+=(N+=65535&I)>>>16)>>>16)|(R+=T>>>16)<<16,M=u,j=c,L=f,O=l,K=h,z=p,V=d,$=y=65535&N|C<<16,q=g,H=v,W=_,F=m,S%16==15)for(E=0;E<16;E++)A=x[E],N=65535&(I=P[E]),C=I>>>16,T=65535&A,R=A>>>16,A=x[(E+9)%16],N+=65535&(I=P[(E+9)%16]),C+=I>>>16,T+=65535&A,R+=A>>>16,b=x[(E+1)%16],N+=65535&(I=((w=P[(E+1)%16])>>>1|b<<31)^(w>>>8|b<<24)^(w>>>7|b<<25)),C+=I>>>16,T+=65535&(A=(b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7),R+=A>>>16,b=x[(E+14)%16],C+=(I=((w=P[(E+14)%16])>>>19|b<<13)^(b>>>29|w<<3)^(w>>>6|b<<26))>>>16,T+=65535&(A=(b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6),R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,x[E]=65535&T|R<<16,P[E]=65535&N|C<<16;N=65535&(I=F),C=I>>>16,T=65535&(A=O),R=A>>>16,A=e[0],C+=(I=t[0])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[0]=O=65535&T|R<<16,t[0]=F=65535&N|C<<16,N=65535&(I=K),C=I>>>16,T=65535&(A=B),R=A>>>16,A=e[1],C+=(I=t[1])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[1]=B=65535&T|R<<16,t[1]=K=65535&N|C<<16,N=65535&(I=z),C=I>>>16,T=65535&(A=k),R=A>>>16,A=e[2],C+=(I=t[2])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[2]=k=65535&T|R<<16,t[2]=z=65535&N|C<<16,N=65535&(I=V),C=I>>>16,T=65535&(A=D),R=A>>>16,A=e[3],C+=(I=t[3])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[3]=D=65535&T|R<<16,t[3]=V=65535&N|C<<16,N=65535&(I=$),C=I>>>16,T=65535&(A=U),R=A>>>16,A=e[4],C+=(I=t[4])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[4]=U=65535&T|R<<16,t[4]=$=65535&N|C<<16,N=65535&(I=q),C=I>>>16,T=65535&(A=M),R=A>>>16,A=e[5],C+=(I=t[5])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[5]=M=65535&T|R<<16,t[5]=q=65535&N|C<<16,N=65535&(I=H),C=I>>>16,T=65535&(A=j),R=A>>>16,A=e[6],C+=(I=t[6])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[6]=j=65535&T|R<<16,t[6]=H=65535&N|C<<16,N=65535&(I=W),C=I>>>16,T=65535&(A=L),R=A>>>16,A=e[7],C+=(I=t[7])>>>16,T+=65535&A,R+=A>>>16,R+=(T+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,e[7]=L=65535&T|R<<16,t[7]=W=65535&N|C<<16,G+=128,n-=128}returnn}functionZ(e,t,r){varn,i=newInt32Array(8),o=newInt32Array(8),a=newUint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,d(a,r-8,s/536870912|0,s<<3),Y(i,o,a,r),n=0;n<8;n++)d(e,8*n,i[n],o[n]);return0}functionQ(e,r){varn=t(),i=t(),o=t(),a=t(),s=t(),u=t(),c=t(),l=t(),h=t();j(n,e[1],e[0]),j(h,r[1],r[0]),L(n,n,h),M(i,e[0],e[1]),M(h,r[0],r[1]),L(i,i,h),L(o,e[3],r[3]),L(o,o,f),L(a,e[2],r[2]),M(a,a,a),j(s,i,n),j(u,a,o),M(c,a,o),M(l,i,n),L(e[0],s,u),L(e[1],l,c),L(e[2],c,u),L(e[3],s,l)}functionX(e,t,r){varn;for(n=0;n<4;n++)O(e[n],t[n],r)}functionee(e,r){varn=t(),i=t(),o=t();K(o,r[2]),L(n,r[0],o),L(i,r[1],o),B(e,i),e[31]^=D(n)<<7}functionte(e,t,r){varn,i;for(x(e[0],a),x(e[1],s),x(e[2],s),x(e[3],a),i=255;i>=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),X(e,t,n)}functionre(e,r){varn=[t(),t(),t(),t()];x(n[0],l),x(n[1],h),x(n[2],s),L(n[3],l,h),te(e,n,r)}functionne(e,r,i){varo,a=newUint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),Z(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),o=0;o<32;o++)r[o+32]=e[o];return0}varie=newFloat64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);functionoe(e,t){varr,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}functionae(e){vart,r=newFloat64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}functionse(e,r,n,i){varo,a,s=newUint8Array(64),u=newUint8Array(64),c=newUint8Array(64),f=newFloat64Array(64),l=[t(),t(),t(),t()];Z(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;varh=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(Z(c,e.subarray(32),n+32),ae(c),re(l,c),ee(e,l),o=32;o<64;o++)e[o]=i[o];for(Z(u,e,n+64),ae(u),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=c[o];for(o=0;o<32;o++)for(a=0;a<32;a++)f[o+a]+=u[o]*s[a];returnoe(e.subarray(32),f),h}functionue(e,r,n,i){varo,u=newUint8Array(32),f=newUint8Array(64),l=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){varn=t(),i=t(),o=t(),u=t(),f=t(),l=t(),h=t();returnx(e[2],s),U(e[1],r),F(o,e[1]),L(u,o,c),j(o,o,e[2]),M(u,e[2],u),F(f,u),F(l,f),L(h,l,f),L(n,h,o),L(n,n,u),z(n,n),L(n,n,o),L(n,n,u),L(n,n,u),L(e[0],n,u),F(i,e[0]),L(i,i,u),k(i,o)&&L(e[0],e[0],p),F(i,e[0]),L(i,i,u),k(i,o)?-1:(D(e[0])===r[31]>>7&&j(e[0],a,e[0]),L(e[3],e[0],e[1]),0)}(h,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(Z(f,e,n),ae(f),te(l,h,f),re(h,r.subarray(32)),Q(l,h),ee(u,l),n-=64,v(r,0,u,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];returnn}functionce(e,t){if(32!==e.length)thrownewError("bad key size");if(24!==t.length)thrownewError("bad nonce size")}functionfe(){for(vare=0;e<arguments.length;e++)if(!(arguments[e]instanceofUint8Array))thrownewTypeError("unexpected type, use Uint8Array")}functionle(e){for(vart=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:m,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:S,crypto_onetimeauth:N,crypto_onetimeauth_verify:C,crypto_verify_16:g,crypto_verify_32:v,crypto_secretbox:T,crypto_secretbox_open:R,crypto_scalarmult:V,crypto_scalarmult_base:$,crypto_box_beforenm:H,crypto_box_afternm:W,crypto_box:function(e,t,r,n,i,o){vara=newUint8Array(32);returnH(a,i,o),W(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){vara=newUint8Array(32);returnH(a,i,o),G(e,t,r,n,a)},crypto_box_keypair:q,crypto_hash:Z,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ie,pack25519:B,unpack25519:U,M:L,A:M,S:F,Z:j,pow2523:z,add:Q,set25519:x,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){vart=newUint8Array(e);returnn(t,e),t},e.secretbox=function(e,t,r){fe(e,t,r),ce(r,t);for(varn=newUint8Array(32+e.length),i=newUint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];returnT(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){fe(e,t,r),ce(r,t);for(varn=newUint8Array(16+e.length),i=newUint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];returnn.length<32||0!==R(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(fe(e,t),32!==e.length)thrownewError("bad n size");if(32!==t.length)thrownewError("bad p size");varr=newUint8Array(32);returnV(r,e,t),r},e.scalarMult.base=function(e){if(fe(e),32!==e.length)thrownewError("bad n size");vart=newUint8Array(32);return$(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){varo=e.box.before(n,i);returne.secretbox(t,r,o)},e.box.before=function(e,t){fe(e,t),function(e,t){if(32!==e.length)thrownewError("bad public key size");if(32!==t.length)thrownewError("bad secret key size")}(e,t);varr=newUint8Array(32);returnH(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){varo=e.box.before(n,i);returne.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){vare=newUint8Array(32),t=newUint8Array(32);returnq(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(fe(e),32!==e.length)thrownewError("bad secret key size");vart=newUint8Array(32);return$(t,e),{publicKey:t,secretKey:newUint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(fe(e,t),64!==t.length)thrownewError("bad secret key size");varr=newUint8Array(64+e.length);returnse(r,e,e.length,t),r},e.sign.open=function(e,t){if(fe(e,t),32!==t.length)thrownewError("bad public key size");varr=newUint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)returnnull;for(vari=newUint8Array(n),o=0;o<i.length;o++)i[o]=r[o];returni},e.sign.detached=function(t,r){for(varn=e.sign(t,r),i=newUint8Array(64),o=0;o<i.length;o++)i[o]=n[o];returni},e.sign.detached.verify=function(e,t,r){if(fe(e,t,r),64!==t.length)thrownewError("bad signature size");if(32!==r.length)thrownewError("bad public key size");varn,i=newUint8Array(64+e.length),o=newUint8Array(64+e.length);for(n=0;n<64;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+64]=e[n];returnue(o,i,i.length,r)>=0},e.sign.keyPair=function(){vare=newUint8Array(32),t=newUint8Array(64);returnne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(fe(e),64!==e.length)thrownewError("bad secret key size");for(vart=newUint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:newUint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(fe(e),32!==e.length)thrownewError("bad seed size");for(vart=newUint8Array(32),r=newUint8Array(64),n=0;n<32;n++)r[n]=e[n];returnne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){fe(e);vart=newUint8Array(64);returnZ(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){returnfe(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){vart="undefined"!=typeofself?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){varn,i=newUint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];le(i)}))}else(t=r(2))&&t.randomBytes&&e.setPRNG((function(e,r){varn,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];le(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(9);classi{staticparse(e){constt=[],r=e.toString("utf8").split("\n").map(e=>e.trim()).filter(e=>""!==e&&!e.startsWith("#"));for(;r.length>0;)t.push(o(r));if(0===t.length)thrownewError("PEM: no block");returnt}constructor(e,t){this.type=e,this.body=t,this.headers=Object.create(null)}getprocType(){returnthis.getHeader("Proc-Type")}getHeader(e){constt=this.headers[e];returnnull==t?"":t}setHeader(e,t){if(e.includes(":"))thrownewError("pem: cannot encode a header key that contains a colon");if(""===e||""===t)thrownewError("pem: invalid header key or value");this.headers[e]=t}toString(){lete="-----BEGIN "+this.type+"-----\n";constt=Object.keys(this.headers);if(t.length>0){constr=this.procType;""!==r&&(e+=`Proc-Type: ${r}\n`),t.sort();for(constroft)"Proc-Type"!==r&&(e+=`${r}: ${this.headers[r]}\n`);e+="\n"}constr=this.body.toString("base64");letn=0;for(;n<r.length;)e+=r.slice(n,n+64)+"\n",n+=64;returne+="-----END "+this.type+"-----\n",e}toBuffer(){returnBuffer.from(this.toString(),"utf8")}valueOf(){returnthis.body}toJSON(){return{type:this.type,body:this.body,headers:this.headers}}[n.inspect.custom](e,t){return`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}functiono(e){lett=e.shift();if(null==t||!t.startsWith("-----BEGIN ")||!t.endsWith("-----"))thrownewError("pem: invalid BEGIN line");constr=t.slice("-----BEGIN ".length,t.length-"-----".length);if(""===r)thrownewError("pem: invalid type");constn=[];for(t=e.shift();null!=t&&t.includes(": ");){constr=t.split(": ");if(2!==r.length||""===r[0]||""===r[1])thrownewError("pem: invalid Header line");n.push(r),t=e.shift()}leto="";for(;null!=t&&!t.startsWith("-----END ");)o+=t,t=e.shift();if(null==t||t!==`-----END ${r}-----`)thrownewError("pem: invalid END line");consta=newi(r,Buffer.from(o,"base64"));if(""===o||a.body.toString("base64")!==o)thrownewError("pem: invalid base64 body");for(consteofn)a.setHeader(e[0],e[1]);returna}t.PEM=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(9),i=r(22);varo,a;!function(e){e[e.UNIVERSAL=0]="UNIVERSAL",e[e.APPLICATION=64]="APPLICATION",e[e.CONTEXT_SPECIFIC=128]="CONTEXT_SPECIFIC",e[e.PRIVATE=192]="PRIVATE"}(o=t.Class||(t.Class={})),function(e){e[e.NONE=0]="NONE",e[e.BOOLEAN=1]="BOOLEAN",e[e.INTEGER=2]="INTEGER",e[e.BITSTRING=3]="BITSTRING",e[e.OCTETSTRING=4]="OCTETSTRING",e[e.NULL=5]="NULL",e[e.OID=6]="OID",e[e.ENUMERATED=10]="ENUMERATED",e[e.UTF8=12]="UTF8",e[e.SEQUENCE=16]="SEQUENCE",e[e.SET=17]="SET",e[e.NUMERICSTRING=18]="NUMERICSTRING",e[e.PRINTABLESTRING=19]="PRINTABLESTRING",e[e.T61STRING=20]="T61STRING",e[e.IA5STRING=22]="IA5STRING",e[e.UTCTIME=23]="UTCTIME",e[e.GENERALIZEDTIME=24]="GENERALIZEDTIME",e[e.GENERALSTRING=27]="GENERALSTRING"}(a=t.Tag||(t.Tag={}));classs{constructor(e,t){this.buf=e,this.bitLen=t}at(e){if(e<0||e>=this.bitLen||!Number.isInteger(e))return0;constt=Math.floor(e/8),r=7-e%8;returnthis.buf[t]>>r&1}rightAlign(){conste=8-this.bitLen%8;if(8===e||0===this.buf.length)returnthis.buf;constt=Buffer.alloc(this.buf.length);t[0]=this.buf[0]>>e;for(letr=1;r<this.buf.length;r++)t[r]=this.buf[r-1]<<8-e,t[r]|=this.buf[r]>>e;returnt}}t.BitString=s;classu{staticBool(e){constt=newu(o.UNIVERSAL,a.BOOLEAN,Buffer.from([e?255:0]));returnt._value=e,t}staticparseBool(e){if(!(einstanceofBuffer)||1!==e.length)thrownewError("ASN1 syntax error: invalid boolean");switch(e[0]){case0:return!1;case255:return!0;default:thrownewError("ASN1 syntax error: invalid boolean")}}staticInteger(e){if(einstanceofBuffer){constt=newu(o.UNIVERSAL,a.INTEGER,e);returnt._value=e.toString("hex"),t}if(!Number.isSafeInteger(e))thrownewError("ASN1 syntax error: invalid integer");lett;if(e>=-128&&e<128)t=Buffer.alloc(1),t.writeInt8(e,0);elseif(e>=-32768&&e<32768)t=Buffer.alloc(2),t.writeIntBE(e,0,2);elseif(e>=-8388608&&e<8388608)t=Buffer.alloc(3),t.writeIntBE(e,0,3);elseif(e>=-2147483648&&e<2147483648)t=Buffer.alloc(4),t.writeIntBE(e,0,4);elseif(e>=-549755813888&&e<549755813888)t=Buffer.alloc(5),t.writeIntBE(e,0,5);else{if(!(e>=-0x800000000000&&e<0x800000000000))thrownewError("ASN1 syntax error: invalid Integer");t=Buffer.alloc(6),t.writeIntBE(e,0,6)}constr=newu(o.UNIVERSAL,a.INTEGER,t);returnr._value=e,r}staticparseInteger(e){if(!(einstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid Integer");returne.length>6?e.toString("hex"):e.readIntBE(0,e.length)}staticparseIntegerNum(e){constt=u.parseInteger(e);if("number"!=typeoft)thrownewError("ASN1 syntax error: invalid Integer number");returnt}staticparseIntegerStr(e){constt=u.parseInteger(e);return"number"==typeoft?t.toString(16):t}staticBitString(e){einstanceofBuffer&&(e=news(e,8*e.length));constt=8*e.buf.length-e.bitLen,r=Buffer.alloc(e.buf.length+1);returnr.writeInt8(t,0),e.buf.copy(r,1),newu(o.UNIVERSAL,a.BITSTRING,r)}staticparseBitString(e){if(!(einstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid BitString");constt=e[0];if(t>7||1===e.length&&t>0||0!=(e[e.length-1]&(1<<e[0])-1))thrownewError("ASN1 syntax error: invalid padding bits in BIT STRING");returnnews(e.slice(1),8*(e.length-1)-t)}staticNull(){conste=newu(o.UNIVERSAL,a.NULL,Buffer.alloc(0));returne._value=null,e}staticparseNull(e){if(!(einstanceofBuffer)||0!==e.length)thrownewError("ASN1 syntax error: invalid null");returnnull}staticOID(e){constt=e.split(".");if(0===t.length)thrownewError("ASN1 syntax error: invalid Object Identifier");constr=[];r.push(40*l(t[0])+l(t[1]));constn=[];for(lete=2;e<t.length;++e){leti=l(t[e]);for(n.length=0,n.push(127&i);i>127;)i>>>=7,n.unshift(127&i|128);r.push(...n)}consti=newu(o.UNIVERSAL,a.OID,Buffer.from(r));returni._value=e,i}staticparseOID(e){if(!(einstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid OID");lett=Math.floor(e[0]/40)+"."+e[0]%40,r=0;for(letn=1;n<e.length;n++)e[n]>=128?(r+=127&e[n],r<<=7):(t+="."+(r+e[n]),r=0);returnt}staticUTF8(e){constt=newu(o.UNIVERSAL,a.UTF8,Buffer.from(e,"utf8"));returnt._value=e,t}staticparseUTF8(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");returne.toString("utf8")}staticNumericString(e){if(!c(e))thrownewError("ASN1 syntax error: invalid NumericString");constt=newu(o.UNIVERSAL,a.NUMERICSTRING,Buffer.from(e,"utf8"));returnt._value=e,t}staticparseNumericString(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");constt=e.toString("utf8");if(!c(t))thrownewError("ASN1 syntax error: invalid NumericString");returnt}staticPrintableString(e){constt=newu(o.UNIVERSAL,a.PRINTABLESTRING,Buffer.from(e,"utf8"));returnt._value=e,t}staticparsePrintableString(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");returne.toString("utf8")}staticIA5String(e){if(!f(e))thrownewError("ASN1 syntax error: invalid IA5String");constt=newu(o.UNIVERSAL,a.IA5STRING,Buffer.from(e,"utf8"));returnt._value=e,t}staticparseIA5String(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");constt=e.toString("utf8");if(!f(t))thrownewError("ASN1 syntax error: invalid IA5String");returnt}staticT61String(e){constt=newu(o.UNIVERSAL,a.T61STRING,Buffer.from(e,"utf8"));returnt._value=e,t}staticparseT61String(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");returne.toString("utf8")}staticGeneralString(e){constt=newu(o.UNIVERSAL,a.GENERALSTRING,Buffer.from(e,"utf8"));returnt._value=e,t}staticparseGeneralString(e){if(!(einstanceofBuffer))thrownewError("parse ASN1 error: invalid Buffer");returne.toString("utf8")}staticUTCTime(e){lett="";constr=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(consteofr)e.length<2&&(t+="0"),t+=e;t+="Z";constn=newu(o.UNIVERSAL,a.UTCTIME,Buffer.from(t,"utf8"));returnn._value=e,n}staticparseUTCTime(e){if(!(einstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid UTC Time");constt=e.toString("utf8"),r=newDate;letn=l(t.substr(0,2));n=n>=50?1900+n:2e3+n;consti=l(t.substr(2,2))-1,o=l(t.substr(4,2)),a=l(t.substr(6,2)),s=l(t.substr(8,2));letu=0,c=0,f="";if(t.length>11&&(c=10,f=t.charAt(c),"+"!==f&&"-"!==f&&(u=l(t.substr(10,2)),c+=2)),r.setUTCFullYear(n,i,o),r.setUTCHours(a,s,u,0),c>0&&(f=t.charAt(c),"+"===f||"-"===f)){lete=60*l(t.substr(c+1,2))+l(t.substr(c+4,2));e*=6e4,"+"===f?r.setTime(+r-e):r.setTime(+r+e)}returnr}staticGeneralizedTime(e){lett="";constr=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(consteofr)e.length<2&&(t+="0"),t+=e;t+="Z";constn=newu(o.UNIVERSAL,a.GENERALIZEDTIME,Buffer.from(t,"utf8"));returnn._value=e,n}staticparseGeneralizedTime(e){if(!(einstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid Generalized Time");constt=e.toString("utf8"),r=newDate,n=l(t.substr(0,4)),i=l(t.substr(4,2))-1,o=l(t.substr(6,2)),a=l(t.substr(8,2)),s=l(t.substr(10,2)),u=l(t.substr(12,2));letc=0,f=0,h=!1;"Z"===t.charAt(t.length-1)&&(h=!0);constp=t.length-5,d=t.charAt(p);if("+"===d||"-"===d){f=60*l(t.substr(p+1,2))+l(t.substr(p+4,2)),f*=6e4,"+"===d&&(f*=-1),h=!0}return"."===t.charAt(14)&&(c=1e3*parseFloat(t.substr(14))),h?(r.setUTCFullYear(n,i,o),r.setUTCHours(a,s,u,c),r.setTime(+r+f)):(r.setFullYear(n,i,o),r.setHours(a,s,u,c)),r}staticparseTime(e,t){switch(e){casea.UTCTIME:returnu.parseUTCTime(t);casea.GENERALIZEDTIME:returnu.parseGeneralizedTime(t);default:thrownewError("Invalid ASN1 time tag")}}staticSet(e){constt=newu(o.UNIVERSAL,a.SET,Buffer.concat(e.map(e=>e.toDER())));returnt._value=e,t}staticSeq(e){constt=newu(o.UNIVERSAL,a.SEQUENCE,Buffer.concat(e.map(e=>e.toDER())));returnt._value=e,t}staticSpec(e,t,r=!0){constn=Array.isArray(t)?Buffer.concat(t.map(e=>e.toDER())):t.toDER();Array.isArray(t)&&(r=!0);consti=newu(o.CONTEXT_SPECIFIC,e,n,r);returni._value=t,i}staticfromDER(e,t=!1){returnu._fromDER(newi.BufferVisitor(e),t)}staticparseDER(e,t,r){constn=u._fromDER(newi.BufferVisitor(e),!1);if(n.class!==t&&n.tag!==r)thrownewError(`invalid ASN.1 DER for class ${t} and tag ${r}`);returnn}staticparseDERWithTemplate(e,t){constr=u._fromDER(newi.BufferVisitor(e),!0),n={},o=r.validate(t,n);if(null!=o)throwo.data=r,o;returnn}static_parseCompound(e,t){constr=[],n=e.length,o=newi.BufferVisitor(e);leta=0;for(;a<n;){conste=o.end;r.push(u._fromDER(o,t)),a+=o.end-e}returnr}static_fromDER(e,t){if(!(e.bufinstanceofBuffer)||0===e.length)thrownewError("ASN1 syntax error: invalid Generalized Time");e.mustWalk(1,"Too few bytes to read ASN.1 tag.");constr=e.start,n=e.buf[r],i=192&n,o=31&n,s=function(e){e.mustWalk(1,"Too few bytes to read ASN.1 value length.");constt=e.buf[e.start];if(0==(128&t))returnt;constr=127&t;returne.mustWalk(r,"Too few bytes to read ASN.1 value length."),e.buf.readUIntBE(e.start,r)}(e);if(e.mustHas(s),0!==s&&o===a.NULL)thrownewError("invalid value length or NULL tag.");e.mustWalk(s);constc=32==(32&n),f=newu(i,o,e.buf.slice(e.start,e.end),c);returnc&&t&&(f._value=u._parseCompound(f.bytes,t)),f._der=e.buf.slice(r,e.end),f}constructor(e,t,r,n=!1){this.class=e,this.tag=t,this.bytes=r,this.isCompound=n||t===a.SEQUENCE||t===a.SET,this._value=void0,this._der=null}getvalue(){returnvoid0===this._value&&(this._value=this.valueOf()),this._value}getDER(){returnnull==this._der&&(this._der=this.toDER()),this._der}mustCompound(e="asn1 object value is not compound"){if(!this.isCompound||!Array.isArray(this.value)){constt=newError(e);throwt.data=this.toJSON(),t}returnthis.value}equals(e){returneinstanceofu&&(this.class===e.class&&this.tag===e.tag&&this.isCompound===e.isCompound&&!!this.bytes.equals(e.bytes))}toDER(){lete=this.class|this.tag;this.isCompound&&(e|=32);constt=function(e){if(e<=127)return0;if(e<=255)return1;if(e<=65535)return2;if(e<=16777215)return3;if(e<=4294967295)return4;if(e<=0xffffffffff)return5;if(e<=0xffffffffffff)return6;thrownewError("invalid value length")}(this.bytes.length),r=Buffer.allocUnsafe(2+t+this.bytes.length);returnr.writeInt8(e,0),0===t?(r.writeUInt8(this.bytes.length,1),this.bytes.copy(r,2)):(r.writeUInt8(128|t,1),r.writeUIntBE(this.bytes.length,2,t),this.bytes.copy(r,2+t)),r}valueOf(){if(this.isCompound)returnu._parseCompound(this.bytes,!1);if(this.class!==o.UNIVERSAL)returnthis.bytes;switch(this.tag){casea.BOOLEAN:returnu.parseBool(this.bytes);casea.INTEGER:returnu.parseInteger(this.bytes);casea.BITSTRING:returnu.parseBitString(this.bytes);casea.NULL:returnu.parseNull(this.bytes);casea.OID:returnu.parseOID(this.bytes);casea.UTF8:returnu.parseUTF8(this.bytes);casea.NUMERICSTRING:returnu.parseNumericString(this.bytes);casea.PRINTABLESTRING:returnu.parsePrintableString(this.bytes);casea.T61STRING:returnu.parseT61String(this.bytes);casea.IA5STRING:returnu.parseIA5String(this.bytes);casea.GENERALSTRING:returnu.parseGeneralString(this.bytes);casea.UTCTIME:returnu.parseUTCTime(this.bytes);casea.GENERALIZEDTIME:returnu.parseGeneralizedTime(this.bytes);default:returnthis.bytes}}validate(e,t={}){if(this.class!==e.class)returnnewError(`ASN.1 object validate failure for ${e.name} : error class ${o[this.class]}`);if(!(Array.isArray(e.tag)?e.tag:[e.tag]).includes(this.tag))returnnewError(`ASN.1 object validate failure for ${e.name}: error tag ${a[this.tag]}`);if(null!=e.capture&&(t[e.capture]=this),Array.isArray(e.value)){constr=this.mustCompound(e.name+" need compound ASN1 value");for(letn=0,i=0;n<e.value.length;n++)if(null!=r[i]){consto=r[i].validate(e.value[n],t);if(null==o)i++;elseif(!0!==e.value[n].optional)returno}elseif(!0!==e.value[n].optional)returnnewError(`ASN.1 object validate failure for ${e.value[n].name}: not exists`)}elseif(null!=e.value){constr=this.tag===a.BITSTRING?this.bytes.slice(1):this.bytes;returnu.fromDER(r).validate(e.value,t)}returnnull}toJSON(){lete=this.value;returnArray.isArray(e)&&(e=e.map(e=>e.toJSON())),{class:o[this.class],tag:this.class===o.UNIVERSAL?a[this.tag]:this.tag,value:e}}[n.inspect.custom](e,t){returnt.depth<=2&&(t.depth=10),`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}functionc(e){for(consttofe){conste=t.charCodeAt(0);if(32!==e&&(e<48||e>57))return!1}return!0}functionf(e){for(consttofe)if(t.charCodeAt(0)>=128)return!1;return!0}functionl(e,t=10){constr=parseInt(e,t);if(Number.isNaN(r))thrownewError(`Invalid numeric string "${e}" in radix ${t}.`);returnr}t.ASN1=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});constn=r(9),i=r(2),o=r(21),a=r(13),s=r(20),u=Object.create(null);u.CN=a.getOID("commonName"),u.commonName="CN",u.C=a.getOID("countryName"),u.countryName="C",u.L=a.getOID("localityName"),u.localityName="L",u.ST=a.getOID("stateOrProvinceName"),u.stateOrProvinceName="ST",u.O=a.getOID("organizationName"),u.organizationName="O",u.OU=a.getOID("organizationalUnitName"),u.organizationalUnitName="OU",u.E=a.getOID("emailAddress"),u.emailAddress="E";constc={name:"Certificate",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.NONE,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",class:o.Class.UNIVERSAL,tag:o.Tag.INTEGER,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",class:o.Class.UNIVERSAL,tag:o.Tag.INTEGER,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate.signature.algorithm",class:o.Class.UNIVERSAL,tag:o.Tag.OID,capture:"certinfoSignatureOID"},{name:"Certificate.TBSCertificate.signature.parameters",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,optional:!0,capture:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"certIssuer"},{name:"Certificate.TBSCertificate.validity",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate.validity.notBefore",class:o.Class.UNIVERSAL,tag:[o.Tag.UTCTIME,o.Tag.GENERALIZEDTIME],capture:"certValidityNotBefore"},{name:"Certificate.TBSCertificate.validity.notAfter",class:o.Class.UNIVERSAL,tag:[o.Tag.UTCTIME,o.Tag.GENERALIZEDTIME],capture:"certValidityNotAfter"}]},{name:"Certificate.TBSCertificate.subject",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"certSubject"},s.publicKeyValidator,{name:"Certificate.TBSCertificate.issuerUniqueID",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.BOOLEAN,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.INTEGER,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.BITSTRING,capture:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.signatureAlgorithm.algorithm",class:o.Class.UNIVERSAL,tag:o.Tag.OID,capture:"certSignatureOID"},{name:"Certificate.TBSCertificate.signature.parameters",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,optional:!0,capture:"certSignatureParams"}]},{name:"Certificate.signatureValue",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certSignature"}]};classf{constructor(){this.attributes=[],this.uniqueId=null}getcommonName(){returnthis.getFieldValue("commonName")}getorganizationName(){returnthis.getFieldValue("organizationName")}getorganizationalUnitName(){returnthis.getFieldValue("organizationalUnitName")}getcountryName(){returnthis.getFieldValue("countryName")}getlocalityName(){returnthis.getFieldValue("localityName")}getserialName(){returnthis.getFieldValue("serialName")}getHash(){conste=i.createHash("sha1");for(consttofthis.attributes)e.update(t.oid),e.update(t.value);returne.digest()}getField(e){for(consttofthis.attributes)if(e===t.oid||e===t.name||e===t.shortName)returnt;returnnull}addField(e){v([e]),this.attributes.push(e)}setAttrs(e){v(e),this.attributes=e}toJSON(){conste={};for(consttofthis.attributes){constr=t.shortName;"string"==typeofr&&""!==r&&(e[r]=t.value)}returne.uniqueId=this.uniqueId,e.attributes=this.attributes,e}getFieldValue(e){constt=this.getField(e);returnnull!=t?t.value:""}}t.DistinguishedName=f;classl{staticfromPEMs(e){constt=[],r=o.PEM.parse(e);for(consteofr){if("CERTIFICATE"!==e.type&&"X509 CERTIFICATE"!==e.type&&"TRUSTED CERTIFICATE"!==e.type)thrownewError("Could not convert certificate from PEM: invalid type");if(e.procType.includes("ENCRYPTED"))thrownewError("Could not convert certificate from PEM: PEM is encrypted.");constr=o.ASN1.fromDER(e.body);t.push(newl(r))}if(0===t.length)thrownewError("No Certificate");returnt}staticfromPEM(e){returnl.fromPEMs(e)[0]}constructor(e){constt=Object.create(null),r=e.validate(c,t);if(null!=r)thrownewError("Cannot read X.509 certificate: "+r.message);if(this.raw=e.DER,this.version=null==t.certVersion?0:o.ASN1.parseIntegerNum(t.certVersion.bytes)+1,this.serialNumber=o.ASN1.parseIntegerStr(t.certSerialNumber.bytes),this.signatureOID=o.ASN1.parseOID(t.certSignatureOID.bytes),this.signatureAlgorithm=a.getOIDName(this.signatureOID),this.infoSignatureOID=o.ASN1.parseOID(t.certinfoSignatureOID.bytes),this.signature=o.ASN1.parseBitString(t.certSignature.bytes).buf,this.validFrom=o.ASN1.parseTime(t.certValidityNotBefore.tag,t.certValidityNotBefore.bytes),this.validTo=o.ASN1.parseTime(t.certValidityNotAfter.tag,t.certValidityNotAfter.bytes),this.issuer=newf,this.issuer.setAttrs(_(t.certIssuer)),null!=t.certIssuerUniqueId&&(this.issuer.uniqueId=o.ASN1.parseBitString(t.certIssuerUniqueId.bytes)),this.subject=newf,this.subject.setAttrs(_(t.certSubject)),null!=t.certSubjectUniqueId&&(this.subject.uniqueId=o.ASN1.parseBitString(t.certSubjectUniqueId.bytes)),this.extensions=[],this.subjectKeyIdentifier="",this.authorityKeyIdentifier="",this.ocspServer="",this.issuingCertificateURL="",this.isCA=!1,this.maxPathLen=-1,this.basicConstraintsValid=!1,this.keyUsage=0,this.dnsNames=[],this.emailAddresses=[],this.ipAddresses=[],this.uris=[],null!=t.certExtensions){this.extensions=function(e){constt=[];for(constrofe.mustCompound())for(consteofr.mustCompound())t.push(h(e));returnt}(t.certExtensions);for(consteofthis.extensions)if("string"==typeofe.subjectKeyIdentifier&&(this.subjectKeyIdentifier=e.subjectKeyIdentifier),"string"==typeofe.authorityKeyIdentifier&&(this.authorityKeyIdentifier=e.authorityKeyIdentifier),"string"==typeofe.authorityInfoAccessOcsp&&(this.ocspServer=e.authorityInfoAccessOcsp),"string"==typeofe.authorityInfoAccessIssuers&&(this.issuingCertificateURL=e.authorityInfoAccessIssuers),"boolean"==typeofe.basicConstraintsValid&&(this.isCA=e.isCA,this.maxPathLen=e.maxPathLen,this.basicConstraintsValid=e.basicConstraintsValid),"number"==typeofe.keyUsage&&(this.keyUsage=e.keyUsage),Array.isArray(e.altNames))for(consttofe.altNames)null!=t.dnsName&&this.dnsNames.push(t.dnsName),null!=t.email&&this.emailAddresses.push(t.email),null!=t.ip&&this.ipAddresses.push(t.ip),null!=t.uri&&this.uris.push(t.uri)}this.publicKey=news.PublicKey(t.publicKeyInfo),this.publicKeyRaw=this.publicKey.toDER(),this.tbsCertificate=t.tbsCertificate}getExtension(e,t=""){for(constrofthis.extensions)if(e===r.oid||e===r.name)return""===t?r:r[t];returnnull}checkSignature(e){if(3===this.version&&!this.basicConstraintsValid||this.basicConstraintsValid&&!this.isCA)returnnewError("The parent constraint violation error");if(!0!==this.getExtension("keyUsage","keyCertSign"))returnnewError("The parent constraint violation error");if(!e.isIssuer(this))returnnewError("The parent certificate did not issue the given child certificate");constt=function(e){switch(a.getOIDName(e)){case"sha1WithRsaEncryption":return"sha1";case"md5WithRsaEncryption":return"md5";case"sha256WithRsaEncryption":return"sha256";case"sha384WithRsaEncryption":return"sha384";case"sha512WithRsaEncryption":return"sha512";case"RSASSA-PSS":return"sha256";case"ecdsaWithSha1":return"sha1";case"ecdsaWithSha256":return"sha256";case"ecdsaWithSha384":return"sha384";case"ecdsaWithSha512":return"sha512";case"dsaWithSha1":return"sha1";case"dsaWithSha256":return"sha256";default:return""}}(e.signatureOID);if(""===t)returnnewError("Unknown child signature OID.");return!1===this.publicKey.verify(e.tbsCertificate.DER,e.signature,t)?newError("Child signature not matched"):null}isIssuer(e){returnthis.issuer.getHash().equals(e.subject.getHash())}verifySubjectKeyIdentifier(){returnthis.publicKey.getFingerprint("sha1","PublicKey").toString("hex")===this.subjectKeyIdentifier}toJSON(){conste={};for(consttofObject.keys(this))e[t]=m(this[t]);returndeletee.tbsCertificate,e}[n.inspect.custom](e,t){returnt.depth<=2&&(t.depth=10),`<${this.constructor.name}${n.inspect(this.toJSON(),t)}>`}}functionh(e){constt={};switch(t.oid=o.ASN1.parseOID(e.value[0].bytes),t.critical=!1,e.value[1].tag===o.Tag.BOOLEAN?(t.critical=o.ASN1.parseBool(e.value[1].bytes),t.value=e.value[2].bytes):t.value=e.value[1].bytes,t.name=a.getOIDName(t.oid),t.name){case"keyUsage":!function(e){constt=o.ASN1.parseBitString(o.ASN1.fromDER(e.value).bytes);letr=0,n=0;e.keyUsage=0;for(letr=0;r<9;r++)0!==t.at(r)&&(e.keyUsage|=1<<r);t.buf.length>0&&(r=t.buf[0],n=t.buf.length>1?t.buf[1]:0);e.digitalSignature=128==(128&r),e.nonRepudiation=64==(64&r),e.keyEncipherment=32==(32&r),e.dataEncipherment=16==(16&r),e.keyAgreement=8==(8&r),e.keyCertSign=4==(4&r),e.cRLSign=2==(2&r),e.encipherOnly=1==(1&r),e.decipherOnly=128==(128&n)}(t);break;case"basicConstraints":!function(e){constt=o.ASN1.fromDER(e.value).mustCompound();t.length>0&&t[0].tag===o.Tag.BOOLEAN?e.isCA=o.ASN1.parseBool(t[0].bytes):e.isCA=!1;letr=null;t.length>0&&t[0].tag===o.Tag.INTEGER?r=t[0].bytes:t.length>1&&(r=t[1].bytes);e.maxPathLen=null!==r?o.ASN1.parseInteger(r):-1;e.basicConstraintsValid=!0}(t);break;case"extKeyUsage":!function(e){constt=o.ASN1.fromDER(e.value).mustCompound();for(constroft)e[a.getOIDName(o.ASN1.parseOID(r.bytes))]=!0}(t);break;case"nsCertType":!function(e){constt=o.ASN1.parseBitString(o.ASN1.fromDER(e.value).bytes);letr=0;t.buf.length>0&&(r=t.buf[0]);e.client=128==(128&r),e.server=64==(64&r),e.email=32==(32&r),e.objsign=16==(16&r),e.reserved=8==(8&r),e.sslCA=4==(4&r),e.emailCA=2==(2&r),e.objCA=1==(1&r)}(t);break;case"subjectAltName":case"issuerAltName":p(t);break;case"subjectKeyIdentifier":!function(e){constt=o.ASN1.parseDERWithTemplate(e.value,d);e.subjectKeyIdentifier=t.subjectKeyIdentifier.bytes.toString("hex")}(t);break;case"authorityKeyIdentifier":!function(e){constt=o.ASN1.parseDERWithTemplate(e.value,y);e.authorityKeyIdentifier=t.authorityKeyIdentifier.bytes.toString("hex")}(t);break;case"authorityInfoAccess":!function(e){constt=o.ASN1.parseDERWithTemplate(e.value,g);null!=t.authorityInfoAccessOcsp&&(e.authorityInfoAccessOcsp=t.authorityInfoAccessOcsp.bytes.toString());null!=t.authorityInfoAccessIssuers&&(e.authorityInfoAccessIssuers=t.authorityInfoAccessIssuers.bytes.toString())}(t)}returnt}functionp(e){e.altNames=[];constt=o.ASN1.fromDER(e.value).mustCompound();for(constroft){constt={tag:r.tag,value:r.bytes};switch(e.altNames.push(t),r.tag){case1:t.email=r.bytes.toString();break;case2:t.dnsName=r.bytes.toString();break;case6:t.uri=r.bytes.toString();break;case7:t.ip=a.bytesToIP(r.bytes);break;case8:t.oid=o.ASN1.parseOID(r.bytes)}}}t.Certificate=l;constd={name:"subjectKeyIdentifier",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,capture:"subjectKeyIdentifier"};consty={name:"authorityKeyIdentifier",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"authorityKeyIdentifier.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.NONE,capture:"authorityKeyIdentifier"}]};constg={name:"authorityInfoAccess",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"authorityInfoAccess.authorityInfoAccessOcsp",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,optional:!0,value:[{name:"authorityInfoAccess.authorityInfoAccessOcsp.oid",class:o.Class.UNIVERSAL,tag:o.Tag.OID},{name:"authorityInfoAccess.authorityInfoAccessOcsp.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.OID,capture:"authorityInfoAccessOcsp"}]},{name:"authorityInfoAccess.authorityInfoAccessIssuers",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,optional:!0,value:[{name:"authorityInfoAccess.authorityInfoAccessIssuers.oid",class:o.Class.UNIVERSAL,tag:o.Tag.OID},{name:"authorityInfoAccess.authorityInfoAccessIssuers.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.OID,capture:"authorityInfoAccessIssuers"}]}]};functionv(e){for(consttofe){if(null!=t.name&&""!==t.name||(null!=t.oid&&(t.name=a.getOIDName(t.oid)),""===t.name&&null!=t.shortName&&(t.name=a.getOIDName(u[t.shortName]))),null==t.oid||""===t.oid){if(""===t.name)thrownewError("Attribute oid not specified.");t.oid=a.getOID(t.name)}if(null!=t.shortName&&""!==t.shortName||(t.shortName=null==u[t.name]?"":u[t.name]),null==t.value)thrownewError("Attribute value not specified.")}}function_(e){constt=[];for(constnofe.mustCompound())for(consteofn.mustCompound()){constn=e.mustCompound(),i={};i.oid=o.ASN1.parseOID(n[0].bytes),i.value=n[1].value,i.valueTag=n[1].tag,i.name=a.getOIDName(i.oid),i.shortName=(r=i.name,null==u[r]?"":u[r]),t.push(i)}varr;returnt}functionm(e){returnnull==e||einstanceofBuffer||"function"!=typeofe.toJSON?e:e.toJSON()}},function(e){e.exports=JSON.parse('{"name":"alipay-sdk","version":"3.2.0","description":"蚂蚁金服开放平台 node sdk","main":"lib/alipay.js","scripts":{"build":"npm run tsc","tsc":"tsc -p ./tsconfig.json","tsc:watch":"tsc -w","lint":"tslint -p ./tsconfig.json --fix","lint:no-fix":"tslint -p ./tsconfig.json","test":"npm run build && mocha","ci":"npm run tsc && npm run lint:no-fix && nyc mocha -t 6000","prepublishOnly":"npm run tsc && npm run test"},"author":"dersoncheng","homepage":"https://github.com/ali-sdk/alipay-sdk","bugs":"https://github.com/ali-sdk/alipay-sdk/issues","license":"ISC","publishConfig":{"registry":"https://registry.npmjs.org"},"dependencies":{"@fidm/x509":"^1.2.1","@types/node":"^9.6.0","bignumber.js":"^9.0.0","camelcase-keys":"^4.2.0","crypto-js":"^4.0.0","decamelize":"^2.0.0","is":"^3.2.1","is-json":"^2.0.1","isuri":"^2.0.3","lodash":"^4.17.20","moment":"^2.16.0","request":"^2.86.0","snakecase-keys":"^1.1.1","urllib":"^2.17.0"},"nyc":{"extends":"@istanbuljs/nyc-config-typescript","include":["lib"],"extension":[".ts"],"check-coverage":true,"reporter":["text-summary","json","html"],"sourceMap":true},"ci":{"version":"8, 10, 12, 14"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^0.1.3","mocha":"^3.1.2","nyc":"^14.1.1","query-string":"^6.5.0","should":"^11.1.1","sinon":"^1.17.7","tslint":"^5.8.0","tslint-config-airbnb":"^5.4.2","typescript":"3.5.1"}}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=r(3);functioni(e,t,r){t.forEach(t=>{void0!==e[t]&&(e[t]=(0,n.accMul)(Number(e[t]),r))})}functiono(e,t){t.forEach(t=>{void0!==e[t]&&(e[t]=e[t].replace(/[-+:\s]/g,""))})}vara={unifiedOrder:{args:{_pre:e=>(i(e,["totalFee"],.01),e),totalAmount:"totalFee",buyerId:"openid"},returnValue:{transactionId:"tradeNo"}},getOrderInfo:{args:{_pre:e=>(i(e,["totalFee"],.01),e),buyerId:"openid",totalAmount:"totalFee"},returnValue:e=>("object"==typeofe&&e.qrCode&&(e.codeUrl=e.qrCode,deletee.qrCode),e)},orderQuery:{args:{tradeNo:"transactionId"},returnValue:{_pre:e=>(i(e,["totalAmount","settleAmount","buyerPayAmount","payAmount","pointAmount","invoiceAmount","receiptAmount","chargeAmount","mdiscountAmount","discountAmount"],100),o(e,["sendPayDate"]),e),transactionId:"tradeNo",openid:"buyerUserId",tradeState:function(e){switch(e.tradeStatus){case"WAIT_BUYER_PAY":return"USERPAYING";case"TRADE_CLOSED":return"CLOSED";case"TRADE_SUCCESS":return"SUCCESS";case"TRADE_FINISHED":return"FINISHED";default:returne.tradeStatus}},totalFee:"totalAmount",settlementTotalFee:"settleAmount",feeType:"transCurrency",cashFeeType:"payCurrency",cashFee:"buyerPayAmount",fundBillList:function(e){returne.fundBillList?e.fundBillList.map(e=>(e.amount=100*Number(e.amount),e.realAmount=100*Number(e.realAmount),e)):[]},tradeSettleDetailList:function(e){returne.tradeSettleDetailList?e.tradeSettleDetailList.map(e=>(e.amount=100*Number(e.amount),e)):[]},timeEnd:"sendPayDate",_purify:{shouldDelete:["tradeStatus"]}}},cancelOrder:{args:{tradeNo:"transactionId"},returnValue:{transactionId:"tradeNo"}},closeOrder:{args:{tradeNo:"transactionId"},returnValue:{transactionId:"tradeNo"}},refund:{args:{_pre:e=>(i(e,["refundFee","sendBackFee"],.01),e),tradeNo:"transactionId",refundAmount:"refundFee",outRequestNo:"outRefundNo",refundCurrency:"refundFeeType",refundReason:"refundDesc",goodsDetail:function(e){returne.goodsDetail?e.goodsDetail.map(e=>(e.price=Number(e.price)/100,e)):[]},refundRoyaltyParameters:function(e){returne.refundRoyaltyParameters?e.refundRoyaltyParameters.map(e=>(e.amount=Number(e.amount)/100,e)):[]}},returnValue:{_pre:e=>(i(e,["refundFee","presentRefundBuyerAmount","presentRefundDiscountAmount","presentRefundMdiscountAmount"],100),e),transactionId:"tradeNo",openid:"buyerUserId",cashRefundFee:"presentRefundBuyerAmount",refundId:"refundSettlementId",cashFeeType:"refundCurrency",refundDetailItemList:function(e){returne.refundDetailItemList?e.refundDetailItemList.map(e=>(e.amount=100*Number(e.amount),e.realAmount=100*Number(e.realAmount),e)):[]},refundPresetPaytoolList:function(e){returne.refundPresetPaytoolList?e.refundPresetPaytoolList.map(e=>(e.amount=100*Number(e.amount),e)):[]}}},refundQuery:{args:{tradeNo:"transactionId",outRequestNo:"outRefundNo"},returnValue:{_pre:e=>(i(e,["totalAmount","refundAmount","sendBackFee","presentRefundBuyerAmount","presentRefundBuyerAmount","presentRefundMdiscountAmount"],100),e),transactionId:"tradeNo",outRefundNo:"outRequestNo",totalFee:"totalAmount",refundFee:"refundAmount",refundDesc:"refundReason",refundId:"refundSettlementId",refundSuccessTime:"gmtRefundPay",refundRoyaltys:function(e){returne.refundRoyaltys?e.refundRoyaltys.map(e=>(e.refundAmount=100*Number(e.refundAmount),e)):[]},refundDetailItemList:function(e){returne.refundDetailItemList?e.refundDetailItemList.map(e=>(e.amount=100*Number(e.amount),e.realAmount=100*Number(e.realAmount),e)):[]}}},verifyPaymentNotify:{returnValue:{_pre:e=>(i(e,["invoiceAmount","receiptAmount","buyerPayAmount","totalAmount","pointAmount"],100),o(e,["gmtPayment"]),e),openid:"buyerId",transactionId:"tradeNo",totalFee:"totalAmount",cashFee:"buyerPayAmount",timeEnd:"gmtPayment",resultCode:function(e){returne.tradeStatus.replace("TRADE_","")},fundBillList:function(e){returne.fundBillList?JSON.parse(e.fundBillList).map(e=>(e.amount=100*Number(e.amount),e)):[]}}},verifyRefundNotify:{returnValue:{_pre:e=>(i(e,["totalAmount","refundFee"],100),e),openid:"buyerId",outRefundNo:"outBizNo",transactionId:"tradeNo",totalFee:"totalAmount",successTime:function(e){e.successTime=e.gmtRefund.replace("+","").split(".")[0]},resultCode:function(e){returne.tradeStatus.replace("TRADE_","")},fundBillList:function(e){returne.fundBillList?JSON.parse(e.fundBillList).map(e=>(e.amount=100*Number(e.amount),e)):[]},_purify:{shouldDelete:["gmtRefund"]}}}};t.default=a,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;t.default=class{constructor(e){e.sandbox&&(e.gateway="https://sandbox.itunes.apple.com/verifyReceipt"),e=Object.assign({gateway:"https://buy.itunes.apple.com/verifyReceipt",timeout:5e3,password:""},e),this.options=e}async_request(e){constt={method:"POST",contentType:"json",dataType:"json",data:e,timeout:this.options.timeout},{status:r,data:n}=awaituniCloud.httpclient.request(this.options.gateway,t);if(200!==r)thrownewError("request fail");returnthis._parse(n)}_parse(e){constt=this._tradeState(e.status);return0===e.status?{transactionId:e.receipt.transaction_id,receipt:e.receipt,...t}:t}_tradeState(e){lett="PAYERROR",r="";switch(e){case-1:t="NOTPAY";break;case0:t="SUCCESS";break;default:r="Error status ["+e+"]"}return{tradeState:t,errMsg:r}}asyncverifyReceipt(e){constt=(e={"receipt-data":e.receiptData}).password||this.options.password;t&&(e.password=t);returnawaitthis._request(e)}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=function(e,t){if(!t&&e&&e.__esModule)returne;if(null===e||"object"!=typeofe&&"function"!=typeofe)return{default:e};varr=u(t);if(r&&r.has(e))returnr.get(e);varn={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(varoine)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){vara=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);returnn}(r(85)),i=s(r(86)),o=s(r(87)),a=r(3);functions(e){returne&&e.__esModule?e:{default:e}}functionu(e){if("function"!=typeofWeakMap)returnnull;vart=newWeakMap,r=newWeakMap;return(u=function(e){returne?r:t})(e)}varc=classextendsclass{constructor(e){if(this.options=e,!e.appId)thrownewError("appId required");if(!e.mchId)thrownewError("mchId required");if(!e.v3Key)thrownewError("v3Key required");if(!e.appPrivateKeyPath&&!e.appPrivateKeyContent)thrownewError("missing appPrivateKeyPath or appPrivateKeyContent");if(!e.appCertPath&&!e.appCertContent)thrownewError("missing appCertPath or appCertContent");this._protocols=o.default,this.platformCertificate=[],this._baseURL="https://api.mch.weixin.qq.com",this._cert=e.appCertPath?i.default.loadCertFromPath(e.appCertPath):i.default.loadCertFromContent(i.default.formatKey(e.appCertContent,"CERTIFICATE")),this._privateKey=e.appPrivateKeyPath?i.default.loadPrivateKeyFromPath(e.appPrivateKeyPath):i.default.loadPrivateKeyFromContent(i.default.formatKey(e.appPrivateKeyContent,"PRIVATE KEY"))}_getAuthorization(e="GET",t="",r={}){constn=i.default.getNonceStr(),o=Date.parse(newDate)/1e3,a=[e,"GET"===e&&Object.keys(r).length>0?`${t}?${i.default.getQueryStr(r)}`:t,o,n,"GET"===e?"":JSON.stringify(r)].reduce((e,t)=>e+=t+"\n",""),s=i.default.rsaPrivateKeySign(this._privateKey.toPEM(),a).toString("base64"),u=this._cert.serialNumber.toUpperCase();return`WECHATPAY2-SHA256-RSA2048 mchid="${this.options.mchId}",nonce_str="${n}",signature="${s}",timestamp="${o}",serial_no="${u}"`}async_request(e,t,r="GET",n=200){t=(0,a.camel2snakeJson)(t);consti=this._getAuthorization(r,e,t);let{status:o,data:s={},headers:u}=awaituniCloud.httpclient.request(`${this._baseURL}${e}`,{method:r,data:t,headers:{Accept:"application/json","content-type":"application/json",Authorization:i},dataType:"json",timeout:this.options.timeout});if(o!==n)thrownewa.UniCloudError({code:s.code,message:s.message});returns||(s={}),awaitthis._verifyResponseSign(u,s),s.appid&&(s.appId=s.appid),s.mchid&&(s.mchId=s.mchid),(0,a.snake2camelJson)(s)}_publicParams(e){constt={appid:this.options.appId,mchid:this.options.mchId};returnObject.assign(t,e)}_getPayParamsByPrepayId(e,t){letr;switch(t){case"APP":r={appid:this.options.subAppId?this.options.subAppId:this.options.appId,partnerid:this.options.mchId,prepayid:e,package:"Sign=WXPay",noncestr:i.default.getNonceStr(),timestamp:""+(Date.now()/1e3|0)},r.sign=this._clientPaySign(r,t);break;case"JSAPI":default:{constn=""+(Date.now()/1e3|0);r={appId:this.options.subAppId?this.options.subAppId:this.options.appId,nonceStr:i.default.getNonceStr(),package:"prepay_id="+e,timeStamp:n},r.signType="RSA",r.paySign=this._clientPaySign(r,t),r.timestamp=n;break}}returnr}_clientPaySign(e,t){constr=[e.appid||e.appId,e.timestamp||e.timeStamp,e.noncestr||e.nonceStr,"JSAPI"===t?e.package:e.prepayid].reduce((e,t)=>e+=t+"\n","");returni.default.rsaPrivateKeySign(this._privateKey.toPEM(),r).toString("base64")}async_getPlatformCert(){if(this.platformCertificate.length<=0){vare,t;constr="/v3/certificates",{status:n,data:o}=awaituniCloud.httpclient.request(`${this._baseURL}${r}`,{method:"GET",headers:{Accept:"application/json","content-type":"application/json",Authorization:this._getAuthorization("GET",r)},dataType:"json",timeout:this.options.timeout});if(200!==n)thrownewError("request fail");this.platformCertificate=null!==(e=null===(t=o.data)||void0===t?void0:t.reduce((e,t)=>{if(t.encrypt_certificate){const{nonce:e,associated_data:r,ciphertext:n}=t.encrypt_certificate,o=i.default.decryptCiphertext(n,this.options.v3Key,e,r);t.certificate=i.default.loadCertFromContent(o)}returne.push(t),e},[]))&&void0!==e?e:[]}returnthis.platformCertificate=this.platformCertificate.filter(e=>newDate(e.expire_time).getTime()>Date.now()),this.platformCertificate[0]}async_verifyResponseSign(e,t={}){constr=awaitthis._getPlatformCert(),{"wechatpay-timestamp":n,"wechatpay-nonce":o,"wechatpay-signature":a}=e,s=[n,o,Object.keys(t).length?JSON.stringify(t):""].reduce((e,t)=>e+=t+"\n","");if(!i.default.rsaPublicKeyVerifySign(r.certificate.publicKey.toPEM(),s,a))thrownewError("response signature verification failed")}_downloadFile(e){constt=n.parse(e);returnuniCloud.httpclient.request(e,{method:"GET",headers:{Accept:"application/json","content-type":"application/json",Authorization:this._getAuthorization("GET",t.path)},dataType:"text",timeout:this.options.timeout})}}{asyncgetOrderInfo(e){if((e=this._publicParams(e)).sceneInfo.payerClientIp=e.sceneInfo.payerClientIp||"127.0.0.1","JSAPI"!==e.tradeType&&deletee.openid,!e.tradeType)thrownewError("tradeType required");const{tradeType:t,...r}=e,n=awaitthis._request("/v3/pay/transactions/"+("MWEB"===e.tradeType?"h5":e.tradeType.toLowerCase()),r,"POST");if("NATIVE"===e.tradeType||"MWEB"===e.tradeType)returnn;if(!n.prepayId)thrownewError(n.errMsg||"获取prepayId失败");returnthis._getPayParamsByPrepayId(n.prepayId,e.tradeType)}asyncorderQuery(e){vart;constr=awaitthis._request(e.transactionId?"/v3/pay/transactions/id/"+e.transactionId:"/v3/pay/transactions/out-trade-no/"+e.outTradeNo,{mchid:this.options.mchId});if(r.settlementTotalFee=0,(null===(t=r.promotion_detail)||void0===t?void0:t.length)>0){conste=r.promotion_detail.reduce((e,t)=>("NOCASH"===t.type&&(e+=t.amount),e),0);r.settlementTotalFeeres=r.amount.total-e}returnr}asynccloseOrder(e){returnawaitthis._request(`/v3/pay/transactions/out-trade-no/${e.outTradeNo}/close`,{mchid:this.options.mchId},"POST",204)}asyncrefund(e){returnawaitthis._request("/v3/refund/domestic/refunds",e,"POST")}asyncrefundQuery(e){returnawaitthis._request("/v3/refund/domestic/refunds/"+e.outRefundNo)}asyncdownloadBill(e){returnthis._request("/v3/bill/tradebill",e).then(e=>this._downloadFile(e.downloadUrl)).then(e=>Promise.resolve({content:e.data}))}asyncdownloadFundflow(e){returnthis._request("/v3/bill/fundflowbill",e).then(e=>this._downloadFile(e.downloadUrl)).then(e=>Promise.resolve({content:e.data}))}asynccheckNotifyType(e){const{headers:t}=e,r="string"==typeofe.body?JSON.parse(e.body):e.body;awaitthis._verifyResponseSign(t,r);const{resource:n}=r;switch(null==n?void0:n.original_type){case"transaction":default:return"payment";case"refund":return"refund"}}asyncverifyPaymentNotify(e){const{headers:t}=e,r="string"==typeofe.body?JSON.parse(e.body):e.body;awaitthis._verifyResponseSign(t,r);const{resource:n}=r,o=i.default.decryptCiphertext(n.ciphertext,this.options.v3Key,n.nonce,n.associated_data);return(0,a.snake2camelJson)(JSON.parse(o))}asyncverifyRefundNotify(e){const{headers:t}=e,r="string"==typeofe.body?JSON.parse(e.body):e.body;awaitthis._verifyResponseSign(t,r);const{resource:n}=r,o=i.default.decryptCiphertext(n.ciphertext,this.options.v3Key,n.nonce,n.associated_data);return(0,a.snake2camelJson)(JSON.parse(o))}};t.default=c,e.exports=t.default},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn,i=(n=r(2))&&n.__esModule?n:{default:n},o=function(e,t){if(!t&&e&&e.__esModule)returne;if(null===e||"object"!=typeofe&&"function"!=typeofe)return{default:e};varr=u(t);if(r&&r.has(e))returnr.get(e);varn={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(varoine)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){vara=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);returnn}(r(10)),a=r(19),s=r(3);functionu(e){if("function"!=typeofWeakMap)returnnull;vart=newWeakMap,r=newWeakMap;return(u=function(e){returne?r:t})(e)}varc={decryptData:function(e,t,r=""){constn=i.default.createDecipheriv("aes-256-ecb",t,r);n.setAutoPadding(!0);leto=n.update(e,"base64","utf8");returno+=n.final("utf8"),o},md5:function(e,t="utf8"){returni.default.createHash("md5").update(e,t).digest("hex")},sha256:function(e,t,r="utf8"){returni.default.createHmac("sha256",t).update(e,r).digest("hex")},getQueryStr:function(e){returnObject.keys(e).map(t=>t+"="+((0,s.isPlainObject)(e[t])?JSON.stringify(e[t]):e[t])).join("&")},getNonceStr:function(e=16){lett="";for(;t.length<e;)t+=Math.random().toString(32).substring(2);returnt.substring(0,e)},decodeBase64:function(e){returnBuffer.from(e,"base64").toString("utf-8")},decryptCiphertext:function(e,t,r,n){consto=Buffer.from(e,"base64"),a=i.default.createDecipheriv("aes-256-gcm",t,r);returna.setAuthTag(o.slice(-16)),a.setAAD(Buffer.from(n)),Buffer.concat([a.update(o.slice(0,-16)),a.final()]).toString()},loadCertFromPath:function(e){returna.Certificate.fromPEM(o.readFileSync(e))},loadCertFromContent:function(e){return"string"==typeofe&&(e=Buffer.from(e)),a.Certificate.fromPEM(e)},loadPrivateKeyFromPath:function(e){returna.PrivateKey.fromPEM(o.readFileSync(e))},loadPrivateKeyFromContent:function(e){return"string"==typeofe&&(e=Buffer.from(e)),a.PrivateKey.fromPEM(e)},rsaPrivateKeySign:function(e,t,r="base64"){returni.default.createSign("RSA-SHA256").update(Buffer.from(t),"utf8").sign(e)},rsaPublicKeyVerifySign:function(e,t,r){returni.default.createVerify("RSA-SHA256").update(t,"utf8").verify(e,r,"base64")},rsaPublicKeyEncryptData:function(e,t){returni.default.publicEncrypt({key:t,padding:i.default.constants.RSA_PKCS1_OAEP_PADDING},Buffer.from(e))},rsaPrivateKeyDecryptData:function(e,t){return"string"==typeofe&&(e=Buffer.from(e)),i.default.privateDecrypt({key:t,padding:i.default.constants.RSA_PKCS1_OAEP_PADDING},e).toString()},formatKey:function(e,t){return`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`}};t.default=c,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;t.default={getOrderInfo:{args:{_purify:{shouldDelete:["subject"]},"amount.total":"totalFee","payer.openid":"openid",description:"body","sceneInfo.payerClientIp":"spbillCreateIp"}},orderQuery:{returnValue:{_purify:{shouldDelete:["appid","mchid","sceneInfo","promotionDetail"]},totalFee:"amount.total",cashFee:"amount.payer_total"}},refund:{args:{"amount.total":"totalFee","amount.refund":"refundFee","amount.currency":"refundFeeType",reason:"refundDesc"},returnValue:{refundFee:"amount.refund",cashRefundFee:"amount.payer_refund"}},refundQuery:{args:{shouldDelete:["outTradeNo","transactionId","refundId"]},returnValue:{totalFee:"amount.total",refundFee:"amount.refund"}},downloadFundflow:{args:{accountType:e=>e.accountType.toUpperCase()}},verifyPaymentNotify:{returnValue:{totalFee:"amount.total",cashFee:"amount.payer_total",feeType:"amount.currency",timeEnd:"success_time",openid:"payer.openid",returnCode:"trade_state"}},verifyRefundNotify:{returnValue:{totalFee:"amount.total",refundFee:"amount.refund",settlementTotalFee:"amount.payer_total",settlementRefundFee:"amount.payer_refund",refundRecvAccout:"user_received_account"}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn=s(r(89)),i=s(r(90)),o=r(3),a=s(r(91));functions(e){returne&&e.__esModule?e:{default:e}}varu=classextendsclass{constructor(e){if(this.options={currencyType:"CNY",rate:100,timeout:1e4,...e},!e.appId)thrownewError("appId required");if(!e.mchId)thrownewError("mchId required");if(!e.sandbox&&!e.appKey)thrownewError("appKey required");if(e.sandbox&&!e.sandboxAppKey)thrownewError("sandboxAppKey required");if(!e.offerId)thrownewError("offerId required");if(!e.accessToken)thrownewError("accessToken required");if(!e.token)thrownewError("token required");if(!e.encodingAESKey)thrownewError("encodingAESKey required");this.appKey=e.sandbox?e.sandboxAppKey:e.appKey,this._protocols=i.default,this._baseURL="https://api.weixin.qq.com",this._wxCrypto=newa.default({appId:e.appId,encodingAESKey:e.encodingAESKey,token:e.token})}async_request(e,t,r="GET",i=200){t=this._publicParams(t),t=(0,o.camel2snakeJson)(t),t=JSON.parse(JSON.stringify(t)),this.options.debug&&console.log("params",t);consta=JSON.stringify(t),s=this.appKey,u=n.default.getPaySig(e,a,s),c=this.options.accessToken;letf=`${this._baseURL}${e}?access_token=${c}&pay_sig=${u}`;if(t.session_key){f+="&signature="+n.default.getSignature(a,t.session_key)}const{status:l,data:h={}}=awaituniCloud.httpclient.request(f,{method:r,data:t,headers:{"content-type":"application/json"},dataType:"json",timeout:this.options.timeout});if(l!==i)thrownewo.UniCloudError({code:h.code,message:h.message});if(h.errcode&&(h.errCode=h.errcode),h.errmsg&&(h.errMsg=h.errmsg),deleteh.errcode,deleteh.errmsg,h.errCode||(h.errCode=0),h.code=h.errCode,h.errMsg&&(h.msg=h.errMsg),h.errCode)thrownewo.UniCloudError({code:h.errCode,message:h.errMsg});constp=(0,o.snake2camelJson)(h);returnp.appId||(p.appId=this.options.appId),p.mchId||(p.mchId=this.options.mchId),this.options.debug&&console.log("res",p),p}_publicParams(e){constt={env:this.options.sandbox?1:0};returnObject.assign(t,e)}async_verifyResponseSign(e){const{queryStringParameters:t={}}=e,{signature:r,timestamp:n,nonce:i}=t;returnthis._wxCrypto.verifyResponseSign({signature:r,timestamp:n,nonce:i})}async_decrypt(e={}){const{msgSignature:t,timestamp:r,nonce:n,body:i={}}=e,{Encrypt:o}=i,a=this._wxCrypto;if(!a.verifyMsgSign({timestamp:r,nonce:n,encrypt:o,msg_signature:t}))returnnull;if(!o)returni;consts=a.decrypt(o);returnthis.options.appId!==s.appId?null:s.value}}{asyncgetOrderInfo(e){e=this._publicParams(e);const{sessionKey:t,mode:r,outTradeNo:i,buyQuantity:o,productId:a,goodsPrice:s,attach:u}=e;if(!r)thrownewError("mode required");if("short_series_goods"===r){if(!a)thrownewError("productId required");if(!s)thrownewError("goodsPrice required")}if(!t)thrownewError("sessionKey required");if(!i)thrownewError("outTradeNo required");if(!o)thrownewError("buyQuantity required");constc=JSON.stringify({offerId:this.options.offerId,env:this.options.sandbox?1:0,currencyType:this.options.currencyType,buyQuantity:o,outTradeNo:i,productId:a,goodsPrice:s,attach:u}),f=this.appKey;return{signData:c,mode:r,paySig:n.default.getPaySig("requestVirtualPayment",c,f),signature:n.default.getSignature(c,t)}}asyncorderQuery(e){returnawaitthis._request("/xpay/query_order",e,"POST")}asynccloseOrder(e){return{}}asyncrefund(e){constt=awaitthis._request("/xpay/refund_order",e,"POST");return"OK"===t.errMsg&&(t.refundFee=e.refundFee),t}asyncrefundQuery(e){returnawaitthis._request("/xpay/query_order",e,"POST")}checkNotifyType(e){let{body:t={},queryStringParameters:r={}}=e;if(e.isBase64Encoded&&(t=Buffer.from(t,"base64").toString("utf-8")),t&&"string"==typeoft)try{t=JSON.parse(t)}catch(e){t={}}const{Event:n}=t;return!n&&r.echostr?"token":["xpay_coin_pay_notify","xpay_goods_deliver_notify"].indexOf(n)>-1?"payment":["xpay_refund_notify"].indexOf(n)>-1?"refund":"unknown"}asyncverifyTokenNotify(e){const{queryStringParameters:t={}}=e,{echostr:r}=t;if(!awaitthis._verifyResponseSign(e))returnnull;return{appId:this.options.appId,mchId:this.options.mchId,echostr:r}}async_verifyNotify(e){let{body:t={}}=e;if(e.isBase64Encoded&&(t=Buffer.from(t,"base64").toString("utf-8")),"string"==typeoft)try{t=JSON.parse(t)}catch(e){}if(!awaitthis._verifyResponseSign(e))returnnull;const{queryStringParameters:r={}}=e,{msg_signature:n,timestamp:i,nonce:a}=r,s=this._decrypt({msgSignature:n,timestamp:i,nonce:a,body:t}),u=(0,o.snake2camelJson)(s);returnu.appId=this.options.appId,u.mchId=this.options.mchId,u}asyncverifyPaymentNotify(e){return"payment"===this.checkNotifyType(e)&&awaitthis._verifyNotify(e)}asyncverifyRefundNotify(e){return"refund"===this.checkNotifyType(e)&&awaitthis._verifyNotify(e)}asyncnotifyProvideGoods(e){returnawaitthis._request("/xpay/notify_provide_goods",e,"POST")}asyncqueryUserBalance(e){if(!e.openid)thrownewError("参数 openid 必填");if(!e.userIp)thrownewError("参数 userIp 必填");returnawaitthis._request("/xpay/query_user_balance",e,"POST")}asynccurrencyPay(e){if(!e.sessionKey)thrownewError("接口 currencyPay 的参数 sessionKey 必填");if(!e.openid)thrownewError("参数 openid 必填");if(!e.userIp)thrownewError("参数 userIp 必填");if(!e.amount)thrownewError("参数 amount 必填");if(!e.orderId)thrownewError("参数 outTradeNo 必填");if(!e.deviceType)thrownewError("参数 deviceType 必填");returnawaitthis._request("/xpay/currency_pay",e,"POST")}asynccancelCurrencyPay(e){if(!e.openid)thrownewError("参数 openid 必填");if(!e.userIp)thrownewError("参数 userIp 必填");if(!e.amount)thrownewError("参数 amount 必填");if(!e.payOrderId)thrownewError("参数 outTradeNo 必填");if(!e.orderId)thrownewError("参数 outRefundNo 必填");if(!e.deviceType)thrownewError("参数 deviceType 必填");returnawaitthis._request("/xpay/cancel_currency_pay",e,"POST")}asyncpresentCurrency(e){if(!e.openid)thrownewError("参数 openid 必填");if(!e.userIp)thrownewError("参数 userIp 必填");if(!e.orderId)thrownewError("参数 outTradeNo 必填");if(!e.amount)thrownewError("参数 amount 必填");if(!e.deviceType)thrownewError("参数 deviceType 必填");returnawaitthis._request("/xpay/present_currency",e,"POST")}};t.default=u,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn,i=(n=r(2))&&n.__esModule?n:{default:n};functiono(e,t,r="utf8"){returni.default.createHmac("sha256",t).update(e,r).digest("hex")}vara={sha256:o,getPaySig:function(e,t,r){returno(e+"&"+t,r)},getSignature:function(e,t){returno(e,t)}};t.default=a,e.exports=t.default},function(e,t,r){"use strict";functionn(e,t="Asia/Shanghai"){constr=function(e){constt=(newDate).getTimezoneOffset();return"UTC"===e?0:-t}(t),n=newDate(e+60*r*1e3);return`${n.getUTCFullYear()}${(n.getUTCMonth()+1).toString().padStart(2,"0")}${n.getUTCDate().toString().padStart(2,"0")}${n.getUTCHours().toString().padStart(2,"0")}${n.getUTCMinutes().toString().padStart(2,"0")}${n.getUTCSeconds().toString().padStart(2,"0")}`}functioni(e){constt={};returnObject.keys(e).forEach(r=>{constn=r.charAt(0).toLowerCase()+r.slice(1);t[n]=e[r]}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varo={getOrderInfo:{args:{_purify:{shouldDelete:["subject","tradeType"]}}},orderQuery:{args:{orderId:"outTradeNo",wxOrderId:"transactionId"},returnValue:{_pre(e){constt=JSON.parse(JSON.stringify(e.order));letr="",n="";[0,1].indexOf(t.status)>-1?(r="NOTPAY",n="未支付"):[6].indexOf(t.status)>-1?(r="PAYERROR",n="支付失败"):[2,3,4].indexOf(t.status)>-1?(r="SUCCESS",n="支付成功"):[5,8,9,10].indexOf(t.status)>-1?(r="REFUND",n="订单发生过退款"):[7].indexOf(t.status)>-1?(r="REFUNDRROR",n="订单退款失败"):(r="NOTPAY",n="未支付");leti={outTradeNo:t.order_id,transactionId:t.wx_order_id,totalFee:t.order_fee,cashFee:t.paid_fee,leftFee:t.left_fee,couponFee:t.coupon_fee,tradeState:r,tradeStateDesc:n,refundFee:t.refund_fee,originalResult:t};returni=JSON.parse(JSON.stringify(i)),i}}},refund:{args:{_purify:{shouldDelete:["totalFee","refundFeeType","refundDesc"]},orderId:"outTradeNo",wxOrderId:"transactionId",refundOrderId:"outRefundNo",refundFee:"refundFee"},returnValue:{}},refundQuery:{args:{orderId:"outRefundNo",wxOrderId:"transactionId"},returnValue:{_pre(e){constt=JSON.parse(JSON.stringify(e.order));letr="",n="";[0,1].indexOf(t.status)>-1?(r="NOTPAY",n="未支付"):[6].indexOf(t.status)>-1?(r="PAYERROR",n="支付失败"):[2,3,4].indexOf(t.status)>-1?(r="SUCCESS",n="支付成功"):[5,8,9,10].indexOf(t.status)>-1?(r="REFUND",n="订单发生过退款"):[7].indexOf(t.status)>-1?(r="REFUNDRROR",n="订单退款失败"):(r="NOTPAY",n="未支付");leti={outTradeNo:t.order_id,transactionId:t.wx_order_id,totalFee:t.order_fee,cashFee:t.paid_fee,couponFee:t.coupon_fee,tradeState:r,tradeStateDesc:n,refundFee:t.refund_fee,originalResult:t};returni=JSON.parse(JSON.stringify(i)),i}}},verifyPaymentNotify:{returnValue:{_pre(e){constt=e.OutTradeNo,r=e.WeChatPayInfo?1e3*e.WeChatPayInfo.PaidTime:Date.now(),o=e.WeChatPayInfo?e.WeChatPayInfo.MchOrderNo:void0,a=e.OpenId,s=e.appId,u=e.Env;return"xpay_goods_deliver_notify"===e.Event?{outTradeNo:t,transactionId:o,tradeState:"SUCCESS",openid:a,appId:s,totalFee:e.GoodsInfo.Quantity*e.GoodsInfo.OrigPrice,cashFee:e.GoodsInfo.Quantity*e.GoodsInfo.ActualPrice,attach:e.GoodsInfo.Attach,timeEnd:n(r),goodsInfo:i(e.GoodsInfo),weChatPayInfo:i(e.WeChatPayInfo),env:u}:"xpay_coin_pay_notify"===e.Event?{outTradeNo:t,transactionId:o,tradeState:"SUCCESS",openid:a,appId:s,totalFee:e.CoinInfo.Quantity*e.CoinInfo.OrigPrice,cashFee:e.CoinInfo.Quantity*e.CoinInfo.ActualPrice,attach:e.CoinInfo.Attach,timeEnd:n(r),coinInfo:i(e.CoinInfo),weChatPayInfo:i(e.WeChatPayInfo),env:u}:void0}}},verifyRefundNotify:{returnValue:{_pre:e=>({outTradeNo:e.MchOrderId,transactionId:e.WxpayRefundTransactionId,openid:e.OpenId,appId:e.appId,refundFee:e.RefundFee,outRefundNo:e.MchRefundId,refundStatus:0===e.RetCode?"SUCCESS":"CHANGE",retMsg:e.RetMsg,retryCount:e.RetryTimes})}},notifyProvideGoods:{args:{orderId:"outTradeNo",wxOrderId:"transactionId"},returnValue:{}},currencyPay:{args:{orderId:"outTradeNo"},returnValue:{outTradeNo:"orderId"}},cancelCurrencyPay:{args:{payOrderId:"outTradeNo",orderId:"outRefundNo"},returnValue:{outRefundNo:"orderId"}},presentCurrency:{args:{orderId:"outTradeNo"},returnValue:{outTradeNo:"orderId"}}};t.default=o,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varn,i=(n=r(2))&&n.__esModule?n:{default:n};varo=class{constructor(e={}){const{appId:t,encodingAESKey:r,token:n}=e,i=Buffer.from(r+"=","base64"),o=i.slice(0,16);this.data={appId:t,token:n,key:i,iv:o}}encrypt(e){"string"!=typeofe&&(e=JSON.stringify(e));const{appId:t,key:r,iv:n}=this.data,o=i.default.randomBytes(16),a=Buffer.alloc(4);a.writeUInt32BE(Buffer.byteLength(e),0);consts=Buffer.from(e),u=Buffer.from(t);letc=Buffer.concat([o,a,s,u]);constf=i.default.createCipheriv("aes-256-cbc",r,n);f.setAutoPadding(!1),c=this.PKCS7Encode(c);returnBuffer.concat([f.update(c),f.final()]).toString("base64")}decrypt(e){const{key:t,iv:r}=this.data,n=Buffer.from(e,"base64"),o=i.default.createDecipheriv("aes-256-cbc",t,r);o.setAutoPadding(!1);leta=Buffer.concat([o.update(n),o.final()]);a=this.PKCS7Decode(a);consts=20+a.readUInt32BE(16),u=a.slice(20,s),c=a.slice(s),f=u.toString(),l=c.toString();leth;try{h=JSON.parse(f)}catch(e){h=f}return{value:h,text:f,appId:l}}getMsgSign(e){const{token:t}=this.data,{timestamp:r,nonce:n,encrypt:o}=e,a=[t,r,n,o].sort().join("");returni.default.createHash("sha1").update(a).digest("hex")}verifyMsgSign(e){returnthis.getMsgSign(e)===e.msg_signature}getVerifyResponseSign(e){const{token:t}=this.data,{timestamp:r,nonce:n}=e,o=[t,r,n];o.sort((e,t)=>e.localeCompare(t));consta=o.join("");returni.default.createHash("sha1").update(a).digest("hex")}verifyResponseSign(e){returnthis.getVerifyResponseSign(e)===e.signature}PKCS7Decode(e){constt=e[e.length-1];returne.slice(0,e.length-t)}PKCS7Encode(e){constt=32-e.length%32,r=t,n=Buffer.alloc(t,r);returnBuffer.concat([e,n])}};t.default=o,e.exports=t.default}]));