MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / JO4

Function JO4

package/cli.js:854–854  ·  view source on GitHub ↗
(q,K,_)

Source from the content-addressed store, hash-verified

852`,_=_.substr(K)}return z+=_,z};e8.binary.base64.decode=function(q,K,_){var z=K;if(!z)z=new Uint8Array(Math.ceil(q.length/4)*3);q=q.replace(/[^A-Za-z0-9\+\/\=]/g,""),_=_||0;var Y,$,A,O,w=0,j=_;while(w<q.length)if(Y=R76[q.charCodeAt(w++)-43],$=R76[q.charCodeAt(w++)-43],A=R76[q.charCodeAt(w++)-43],O=R76[q.charCodeAt(w++)-43],z[j++]=Y<<2|$>>4,A!==64){if(z[j++]=($&15)<<4|A>>2,O!==64)z[j++]=(A&3)<<6|O}return K?j-_:z.subarray(0,j)};e8.binary.base58.encode=function(q,K){return e8.binary.baseN.encode(q,tA4,K)};e8.binary.base58.decode=function(q,K){return e8.binary.baseN.decode(q,tA4,K)};e8.text={utf8:{},utf16:{}};e8.text.utf8.encode=function(q,K,_){q=e8.encodeUtf8(q);var z=K;if(!z)z=new Uint8Array(q.length);_=_||0;var Y=_;for(var $=0;$<q.length;++$)z[Y++]=q.charCodeAt($);return K?Y-_:z};e8.text.utf8.decode=function(q){return e8.decodeUtf8(String.fromCharCode.apply(null,q))};e8.text.utf16.encode=function(q,K,_){var z=K;if(!z)z=new Uint8Array(q.length*2);var Y=new Uint16Array(z.buffer);_=_||0;var $=_,A=_;for(var O=0;O<q.length;++O)Y[A++]=q.charCodeAt(O),$+=2;return K?$-_:z};e8.text.utf16.decode=function(q){return String.fromCharCode.apply(null,new Uint16Array(q.buffer))};e8.deflate=function(q,K,_){if(K=e8.decode64(q.deflate(e8.encode64(K)).rval),_){var z=2,Y=K.charCodeAt(1);if(Y&32)z=6;K=K.substring(z,K.length-4)}return K};e8.inflate=function(q,K,_){var z=q.inflate(e8.encode64(K)).rval;return z===null?null:e8.decode64(z)};var Kb1=function(q,K,_){if(!q)throw Error("WebStorage not available.");var z;if(_===null)z=q.removeItem(K);else _=e8.encode64(JSON.stringify(_)),z=q.setItem(K,_);if(typeof z<"u"&&z.rval!==!0){var Y=Error(z.error.message);throw Y.id=z.error.id,Y.name=z.error.name,Y}},_b1=function(q,K){if(!q)throw Error("WebStorage not available.");var _=q.getItem(K);if(q.init)if(_.rval===null){if(_.error){var z=Error(_.error.message);throw z.id=_.error.id,z.name=_.error.name,z}_=null}else _=_.rval;if(_!==null)_=JSON.parse(e8.decode64(_));return _},_B_=function(q,K,_,z){var Y=_b1(q,K);if(Y===null)Y={};Y[_]=z,Kb1(q,K,Y)},zB_=function(q,K,_){var z=_b1(q,K);if(z!==null)z=_ in z?z[_]:null;return z},YB_=function(q,K,_){var z=_b1(q,K);if(z!==null&&_ in z){delete z[_];var Y=!0;for(var $ in z){Y=!1;break}if(Y)z=null;Kb1(q,K,z)}},$B_=function(q,K){Kb1(q,K,null)},Zv8=function(q,K,_){var z=null;if(typeof _>"u")_=["web","flash"];var Y,$=!1,A=null;for(var O in _){Y=_[O];try{if(Y==="flash"||Y==="both"){if(K[0]===null)throw Error("Flash local storage not available.");z=q.apply(this,K),$=Y==="flash"}if(Y==="web"||Y==="both")K[0]=localStorage,z=q.apply(this,K),$=!0}catch(w){A=w}if($)break}if(!$)throw A;return z};e8.setItem=function(q,K,_,z,Y){Zv8(_B_,arguments,Y)};e8.getItem=function(q,K,_,z){return Zv8(zB_,arguments,z)};e8.removeItem=function(q,K,_,z){Zv8(YB_,arguments,z)};e8.clearItems=function(q,K,_){Zv8($B_,arguments,_)};e8.isEmpty=function(q){for(var K in q)if(q.hasOwnProperty(K))return!1;return!0};e8.format=function(q){var K=/%./g,_,z,Y=0,$=[],A=0;while(_=K.exec(q)){if(z=q.substring(A,K.lastIndex-2),z.length>0)$.push(z);A=K.lastIndex;var O=_[0][1];switch(O){case"s":case"o":if(Y<arguments.length)$.push(arguments[Y+++1]);else $.push("<?>");break;case"%":$.push("%");break;default:$.push("<%"+O+"?>")}}return $.push(q.substring(A)),$.join("")};e8.formatNumber=function(q,K,_,z){var Y=q,$=isNaN(K=Math.abs(K))?2:K,A=_===void 0?",":_,O=z===void 0?".":z,w=Y<0?"-":"",j=parseInt(Y=Math.abs(+Y||0).toFixed($),10)+"",H=j.length>3?j.length%3:0;return w+(H?j.substr(0,H)+O:"")+j.substr(H).replace(/(\d{3})(?=\d)/g,"$1"+O)+($?A+Math.abs(Y-j).toFixed($).slice(2):"")};e8.formatSize=function(q){if(q>=1073741824)q=e8.formatNumber(q/1073741824,2,".","")+" GiB";else if(q>=1048576)q=e8.formatNumber(q/1048576,2,".","")+" MiB";else if(q>=1024)q=e8.formatNumber(q/1024,0)+" KiB";else q=e8.formatNumber(q,0)+" bytes";return q};e8.bytesFromIP=function(q){if(q.indexOf(".")!==-1)return e8.bytesFromIPv4(q);if(q.indexOf(":")!==-1)return e8.bytesFromIPv6(q);return null};e8.bytesFromIPv4=function(q){if(q=q.split("."),q.length!==4)return null;var K=e8.createBuffer();for(var _=0;_<q.length;++_){var z=parseInt(q[_],10);if(isNaN(z))return null;K.putByte(z)}return K.getBytes()};e8.bytesFromIPv6=function(q){var K=0;q=q.split(":").filter(function(A){if(A.length===0)++K;return!0});var _=(8-q.length+K)*2,z=e8.createBuffer();for(var Y=0;Y<8;++Y){if(!q[Y]||q[Y].length===0){z.fillWithByte(0,_),_=0;continue}var $=e8.hexToBytes(q[Y]);if($.length<2)z.putByte(0);z.putBytes($)}return z.getBytes()};e8.bytesToIP=function(q){if(q.length===4)return e8.bytesToIPv4(q);if(q.length===16)return e8.bytesToIPv6(q);return null};e8.bytesToIPv4=function(q){if(q.length!==4)return null;var K=[];for(var _=0;_<q.length;++_)K.push(q.charCodeAt(_));return K.join(".")};e8.bytesToIPv6=function(q){if(q.length!==16)return null;var K=[],_=[],z=0;for(var Y=0;Y<q.length;Y+=2){var $=e8.bytesToHex(q[Y]+q[Y+1]);while($[0]==="0"&&$!=="0")$=$.substr(1);if($==="0"){var A=_[_.length-1],O=K.length;if(!A||O!==A.end+1)_.push({start:O,end:O});else if(A.end=O,A.end-A.start>_[z].end-_[z].start)z=_.length-1}K.push($)}if(_.length>0){var w=_[z];if(w.end-w.start>0){if(K.splice(w.start,w.end-w.start+1,""),w.start===0)K.unshift("");if(w.end===7)K.push("")}}return K.join(":")};e8.estimateCores=function(q,K){if(typeof q==="function")K=q,q={};if(q=q||{},"cores"in e8&&!q.update)return K(null,e8.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return e8.cores=navigator.hardwareConcurrency,K(null,e8.cores);if(typeof Worker>"u")return e8.cores=1,K(null,e8.cores);if(typeof Blob>"u")return e8.cores=2,K(null,e8.cores);var _=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(A){var O=Date.now(),w=O+4;while(Date.now()<w);self.postMessage({st:O,et:w})})}.toString(),")()"],{type:"application/javascript"}));z([],5,16);function z(A,O,w){if(O===0){var j=Math.floor(A.reduce(function(H,J){return H+J},0)/A.length);return e8.cores=Math.max(1,j),URL.revokeObjectURL(_),K(null,e8.cores)}Y(w,function(H,J){A.push($(w,J)),z(A,O-1,w)})}function Y(A,O){var w=[],j=[];for(var H=0;H<A;++H){var J=new Worker(_);J.addEventListener("message",function(M){if(j.push(M.data),j.length===A){for(var X=0;X<A;++X)w[X].terminate();O(null,j)}}),w.push(J)}for(var H=0;H<A;++H)w[H].postMessage(H)}function $(A,O){var w=[];for(var j=0;j<A;++j){var H=O[j],J=w[j]=[];for(var M=0;M<A;++M){if(j===M)continue;var X=O[M];if(H.st>X.st&&H.st<X.et||X.st>H.st&&X.st<H.et)J.push(M)}}return w.reduce(function(P,W){return Math.max(P,W.length)},0)}}});var Gv8=m((icA,qO4)=>{var YD=E_();_$();qO4.exports=YD.cipher=YD.cipher||{};YD.cipher.algorithms=YD.cipher.algorithms||{};YD.cipher.createCipher=function(q,K){var _=q;if(typeof _==="string"){if(_=YD.cipher.getAlgorithm(_),_)_=_()}if(!_)throw Error("Unsupported algorithm: "+q);return new YD.cipher.BlockCipher({algorithm:_,key:K,decrypt:!1})};YD.cipher.createDecipher=function(q,K){var _=q;if(typeof _==="string"){if(_=YD.cipher.getAlgorithm(_),_)_=_()}if(!_)throw Error("Unsupported algorithm: "+q);return new YD.cipher.BlockCipher({algorithm:_,key:K,decrypt:!0})};YD.cipher.registerAlgorithm=function(q,K){q=q.toUpperCase(),YD.cipher.algorithms[q]=K};YD.cipher.getAlgorithm=function(q){if(q=q.toUpperCase(),q in YD.cipher.algorithms)return YD.cipher.algorithms[q];return null};var zb1=YD.cipher.BlockCipher=function(q){this.algorithm=q.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=q.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=q.decrypt,this.algorithm.initialize(q)};zb1.prototype.start=function(q){q=q||{};var K={};for(var _ in q)K[_]=q[_];K.decrypt=this._decrypt,this._finish=!1,this._input=YD.util.createBuffer(),this.output=q.output||YD.util.createBuffer(),this.mode.start(K)};zb1.prototype.update=function(q){if(q)this._input.putBuffer(q);while(!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish);this._input.compact()};zb1.prototype.finish=function(q){if(q&&(this.mode.name==="ECB"||this.mode.name==="CBC"))this.mode.pad=function(_){return q(this.blockSize,_,!1)},this.mode.unpad=function(_){return q(this.blockSize,_,!0)};var K={};if(K.decrypt=this._decrypt,K.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad){if(!this.mode.pad(this._input,K))return!1}if(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad){if(!this.mode.unpad(this.output,K))return!1}if(this.mode.afterFinish){if(!this.mode.afterFinish(this.output,K))return!1}return!0}});var $b1=m((rcA,KO4)=>{var $D=E_();_$();$D.cipher=$D.cipher||{};var Vz=KO4.exports=$D.cipher.modes=$D.cipher.modes||{};Vz.ecb=function(q){q=q||{},this.name="ECB",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};Vz.ecb.prototype.start=function(q){};Vz.ecb.prototype.encrypt=function(q,K,_){if(q.length()<this.blockSize&&!(_&&q.length()>0))return!0;for(var z=0;z<this._ints;++z)this._inBlock[z]=q.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var z=0;z<this._ints;++z)K.putInt32(this._outBlock[z])};Vz.ecb.prototype.decrypt=function(q,K,_){if(q.length()<this.blockSize&&!(_&&q.length()>0))return!0;for(var z=0;z<this._ints;++z)this._inBlock[z]=q.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var z=0;z<this._ints;++z)K.putInt32(this._outBlock[z])};Vz.ecb.prototype.pad=function(q,K){var _=q.length()===this.blockSize?this.blockSize:this.blockSize-q.length();return q.fillWithByte(_,_),!0};Vz.ecb.prototype.unpad=function(q,K){if(K.overflow>0)return!1;var _=q.length(),z=q.at(_-1);if(z>this.blockSize<<2)return!1;return q.truncate(z),!0};Vz.cbc=function(q){q=q||{},this.name="CBC",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};Vz.cbc.prototype.start=function(q){if(q.iv===null){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if(!("iv"in q))throw Error("Invalid IV parameter.");else this._iv=Tv8(q.iv,this.blockSize),this._prev=this._iv.slice(0)};Vz.cbc.prototype.encrypt=function(q,K,_){if(q.length()<this.blockSize&&!(_&&q.length()>0))return!0;for(var z=0;z<this._ints;++z)this._inBlock[z]=this._prev[z]^q.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var z=0;z<this._ints;++z)K.putInt32(this._outBlock[z]);this._prev=this._outBlock};Vz.cbc.prototype.decrypt=function(q,K,_){if(q.length()<this.blockSize&&!(_&&q.length()>0))return!0;for(var z=0;z<this._ints;++z)this._inBlock[z]=q.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var z=0;z<this._ints;++z)K.putInt32(this._prev[z]^this._outBlock[z]);this._prev=this._inBlock.slice(0)};Vz.cbc.prototype.pad=function(q,K){var _=q.length()===this.blockSize?this.blockSize:this.blockSize-q.length();return q.fillWithByte(_,_),!0};Vz.cbc.prototype.unpad=function(q,K){if(K.overflow>0)return!1;var _=q.length(),z=q.at(_-1);if(z>this.blockSize<<2)return!1;return q.truncate(z),!0};Vz.cfb=function(q){q=q||{},this.name="CFB",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialBlock=Array(this._ints),this._partialOutput=$D.util.createBuffer(),this._partialBytes=0};Vz.cfb.prototype.start=function(q){if(!("iv"in q))throw Error("Invalid IV parameter.");this._iv=Tv8(q.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Vz.cfb.prototype.encrypt=function(q,K,_){var z=q.length();if(z===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&z>=this.blockSize){for(var Y=0;Y<this._ints;++Y)this._inBlock[Y]=q.getInt32()^this._outBlock[Y],K.putInt32(this._inBlock[Y]);return}var $=(this.blockSize-z)%this.blockSize;if($>0)$=this.blockSize-$;this._partialOutput.clear();for(var Y=0;Y<this._ints;++Y)this._partialBlock[Y]=q.getInt32()^this._outBlock[Y],this._partialOutput.putInt32(this._partialBlock[Y]);if($>0)q.read-=this.blockSize;else for(var Y=0;Y<this._ints;++Y)this._inBlock[Y]=this._partialBlock[Y];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if($>0&&!_)return K.putBytes(this._partialOutput.getBytes($-this._partialBytes)),this._partialBytes=$,!0;K.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=0};Vz.cfb.prototype.decrypt=function(q,K,_){var z=q.length();if(z===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&z>=this.blockSize){for(var Y=0;Y<this._ints;++Y)this._inBlock[Y]=q.getInt32(),K.putInt32(this._inBlock[Y]^this._outBlock[Y]);return}var $=(this.blockSize-z)%this.blockSize;if($>0)$=this.blockSize-$;this._partialOutput.clear();for(var Y=0;Y<this._ints;++Y)this._partialBlock[Y]=q.getInt32(),this._partialOutput.putInt32(this._partialBlock[Y]^this._outBlock[Y]);if($>0)q.read-=this.blockSize;else for(var Y=0;Y<this._ints;++Y)this._inBlock[Y]=this._partialBlock[Y];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if($>0&&!_)return K.putBytes(this._partialOutput.getBytes($-this._partialBytes)),this._partialBytes=$,!0;K.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=0};Vz.ofb=function(q){q=q||{},this.name="OFB",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=$D.util.createBuffer(),this._partialBytes=0};Vz.ofb.prototype.start=function(q){if(!("iv"in q))throw Error("Invalid IV parameter.");this._iv=Tv8(q.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Vz.ofb.prototype.encrypt=function(q,K,_){var z=q.length();if(q.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&z>=this.blockSize){for(var Y=0;Y<this._ints;++Y)K.putInt32(q.getInt32()^this._outBlock[Y]),this._inBlock[Y]=this._outBlock[Y];return}var $=(this.blockSize-z)%this.blockSize;if($>0)$=this.blockSize-$;this._partialOutput.clear();for(var Y=0;Y<this._ints;++Y)this._partialOutput.putInt32(q.getInt32()^this._outBlock[Y]);if($>0)q.read-=this.blockSize;else for(var Y=0;Y<this._ints;++Y)this._inBlock[Y]=this._outBlock[Y];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if($>0&&!_)return K.putBytes(this._partialOutput.getBytes($-this._partialBytes)),this._partialBytes=$,!0;K.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=0};Vz.ofb.prototype.decrypt=Vz.ofb.prototype.encrypt;Vz.ctr=function(q){q=q||{},this.name="CTR",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=$D.util.createBuffer(),this._partialBytes=0};Vz.ctr.prototype.start=function(q){if(!("iv"in q))throw Error("Invalid IV parameter.");this._iv=Tv8(q.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Vz.ctr.prototype.encrypt=function(q,K,_){var z=q.length();if(z===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&z>=this.blockSize)for(var Y=0;Y<this._ints;++Y)K.putInt32(q.getInt32()^this._outBlock[Y]);else{var $=(this.blockSize-z)%this.blockSize;if($>0)$=this.blockSize-$;this._partialOutput.clear();for(var Y=0;Y<this._ints;++Y)this._partialOutput.putInt32(q.getInt32()^this._outBlock[Y]);if($>0)q.read-=this.blockSize;if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if($>0&&!_)return K.putBytes(this._partialOutput.getBytes($-this._partialBytes)),this._partialBytes=$,!0;K.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=0}vv8(this._inBlock)};Vz.ctr.prototype.decrypt=Vz.ctr.prototype.encrypt;Vz.gcm=function(q){q=q||{},this.name="GCM",this.cipher=q.cipher,this.blockSize=q.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints),this._partialOutput=$D.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Vz.gcm.prototype.start=function(q){if(!("iv"in q))throw Error("Invalid IV parameter.");var K=$D.util.createBuffer(q.iv);this._cipherLength=0;var _;if("additionalData"in q)_=$D.util.createBuffer(q.additionalData);else _=$D.util.createBuffer();if("tagLength"in q)this._tagLength=q.tagLength;else this._tagLength=128;if(this._tag=null,q.decrypt){if(this._tag=$D.util.createBuffer(q.tag).getBytes(),this._tag.length!==this._tagLength/8)throw Error("Authentication tag does not match tag length.")}this._hashBlock=Array(this._ints),this.tag=null,this._hashSubkey=Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var z=K.length();if(z===12)this._j0=[K.getInt32(),K.getInt32(),K.getInt32(),1];else{this._j0=[0,0,0,0];while(K.length()>0)this._j0=this.ghash(this._hashSubkey,this._j0,[K.getInt32(),K.getInt32(),K.getInt32(),K.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Yb1(z*8)))}this._inBlock=this._j0.slice(0),vv8(this._inBlock),this._partialBytes=0,_=$D.util.createBuffer(_),this._aDataLength=Yb1(_.length()*8);var Y=_.length()%this.blockSize;if(Y)_.fillWithByte(0,this.blockSize-Y);this._s=[0,0,0,0];while(_.length()>0)this._s=this.ghash(this._hashSubkey,this._s,[_.getInt32(),_.getInt32(),_.getInt32(),_.getInt32()])};Vz.gcm.prototype.encrypt=function(q,K,_){var z=q.length();if(z===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&z>=this.blockSize){for(var Y=0;Y<this._ints;++Y)K.putInt32(this._outBlock[Y]^=q.getInt32());this._cipherLength+=this.blockSize}else{var $=(this.blockSize-z)%this.blockSize;if($>0)$=this.blockSize-$;this._partialOutput.clear();for(var Y=0;Y<this._ints;++Y)this._partialOutput.putInt32(q.getInt32()^this._outBlock[Y]);if($<=0||_){if(_){var A=z%this.blockSize;this._cipherLength+=A,this._partialOutput.truncate(this.blockSize-A)}else this._cipherLength+=this.blockSize;for(var Y=0;Y<this._ints;++Y)this._outBlock[Y]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if($>0&&!_)return q.read-=this.blockSize,K.putBytes(this._partialOutput.getBytes($-this._partialBytes)),this._partialBytes=$,!0;K.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),vv8(this._inBlock)};Vz.gcm.prototype.decrypt=function(q,K,_){var z=q.length();if(z<this.blockSize&&!(_&&z>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),vv8(this._inBlock),this._hashBlock[0]=q.getInt32(),this._hashBlock[1]=q.getInt32(),this._hashBlock[2]=q.getInt32(),this._hashBlock[3]=q.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var Y=0;Y<this._ints;++Y)K.putInt32(this._outBlock[Y]^this._hashBlock[Y]);if(z<this.blockSize)this._cipherLength+=z%this.blockSize;else this._cipherLength+=this.blockSize};Vz.gcm.prototype.afterFinish=function(q,K){var _=!0;if(K.decrypt&&K.overflow)q.truncate(this.blockSize-K.overflow);this.tag=$D.util.createBuffer();var z=this._aDataLength.concat(Yb1(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,z);var Y=[];this.cipher.encrypt(this._j0,Y);for(var $=0;$<this._ints;++$)this.tag.putInt32(this._s[$]^Y[$]);if(this.tag.truncate(this.tag.length()%(this._tagLength/8)),K.decrypt&&this.tag.bytes()!==this._tag)_=!1;return _};Vz.gcm.prototype.multiply=function(q,K){var _=[0,0,0,0],z=K.slice(0);for(var Y=0;Y<128;++Y){var $=q[Y/32|0]&1<<31-Y%32;if($)_[0]^=z[0],_[1]^=z[1],_[2]^=z[2],_[3]^=z[3];this.pow(z,z)}return _};Vz.gcm.prototype.pow=function(q,K){var _=q[3]&1;for(var z=3;z>0;--z)K[z]=q[z]>>>1|(q[z-1]&1)<<31;if(K[0]=q[0]>>>1,_)K[0]^=this._R};Vz.gcm.prototype.tableMultiply=function(q){var K=[0,0,0,0];for(var _=0;_<32;++_){var z=_/8|0,Y=q[z]>>>(7-_%8)*4&15,$=this._m[_][Y];K[0]^=$[0],K[1]^=$[1],K[2]^=$[2],K[3]^=$[3]}return K};Vz.gcm.prototype.ghash=function(q,K,_){return K[0]^=_[0],K[1]^=_[1],K[2]^=_[2],K[3]^=_[3],this.tableMultiply(K)};Vz.gcm.prototype.generateHashTable=function(q,K){var _=8/K,z=4*_,Y=16*_,$=Array(Y);for(var A=0;A<Y;++A){var O=[0,0,0,0],w=A/z|0,j=(z-1-A%z)*K;O[w]=1<<K-1<<j,$[A]=this.generateSubHashTable(this.multiply(O,q),K)}return $};Vz.gcm.prototype.generateSubHashTable=function(q,K){var _=1<<K,z=_>>>1,Y=Array(_);Y[z]=q.slice(0);var $=z>>>1;while($>0)this.pow(Y[2*$],Y[$]=[]),$>>=1;$=2;while($<z){for(var A=1;A<$;++A){var O=Y[$],w=Y[A];Y[$+A]=[O[0]^w[0],O[1]^w[1],O[2]^w[2],O[3]^w[3]]}$*=2}Y[0]=[0,0,0,0];for($=z+1;$<_;++$){var j=Y[$^z];Y[$]=[q[0]^j[0],q[1]^j[1],q[2]^j[2],q[3]^j[3]]}return Y};function Tv8(q,K){if(typeof q==="string")q=$D.util.createBuffer(q);if($D.util.isArray(q)&&q.length>4){var _=q;q=$D.util.createBuffer();for(var z=0;z<_.length;++z)q.putByte(_[z])}if(q.length()<K)throw Error("Invalid IV length; got "+q.length()+" bytes and expected "+K+" bytes.");if(!$D.util.isArray(q)){var Y=[],$=K/4;for(var z=0;z<$;++z)Y.push(q.getInt32());q=Y}return q}function vv8(q){q[q.length-1]=q[q.length-1]+1&4294967295}function Yb1(q){return[q/4294967296|0,q&4294967295]}});var h76=m((ocA,$O4)=>{var aw=E_();Gv8();$b1();_$();$O4.exports=aw.aes=aw.aes||{};aw.aes.startEncrypting=function(q,K,_,z){var Y=kv8({key:q,output:_,decrypt:!1,mode:z});return Y.start(K),Y};aw.aes.createEncryptionCipher=function(q,K){return kv8({key:q,output:null,decrypt:!1,mode:K})};aw.aes.startDecrypting=function(q,K,_,z){var Y=kv8({key:q,output:_,decrypt:!0,mode:z});return Y.start(K),Y};aw.aes.createDecryptionCipher=function(q,K){return kv8({key:q,output:null,decrypt:!0,mode:K})};aw.aes.Algorithm=function(q,K){if(!wb1)zO4();var _=this;_.name=q,_.mode=new K({blockSize:16,cipher:{encrypt:function(z,Y){return Ob1(_._w,z,Y,!1)},decrypt:function(z,Y){return Ob1(_._w,z,Y,!0)}}}),_._init=!1};aw.aes.Algorithm.prototype.initialize=function(q){if(this._init)return;var K=q.key,_;if(typeof K==="string"&&(K.length===16||K.length===24||K.length===32))K=aw.util.createBuffer(K);else if(aw.util.isArray(K)&&(K.length===16||K.length===24||K.length===32)){_=K,K=aw.util.createBuffer();for(var z=0;z<_.length;++z)K.putByte(_[z])}if(!aw.util.isArray(K)){_=K,K=[];var Y=_.length();if(Y===16||Y===24||Y===32){Y=Y>>>2;for(var z=0;z<Y;++z)K.push(_.getInt32())}}if(!aw.util.isArray(K)||!(K.length===4||K.length===6||K.length===8))throw Error("Invalid key parameter.");var $=this.mode.name,A=["CFB","OFB","CTR","GCM"].indexOf($)!==-1;this._w=YO4(K,q.decrypt&&!A),this._init=!0};aw.aes._expandKey=function(q,K){if(!wb1)zO4();return YO4(q,K)};aw.aes._updateBlock=Ob1;zk6("AES-ECB",aw.cipher.modes.ecb);zk6("AES-CBC",aw.cipher.modes.cbc);zk6("AES-CFB",aw.cipher.modes.cfb);zk6("AES-OFB",aw.cipher.modes.ofb);zk6("AES-CTR",aw.cipher.modes.ctr);zk6("AES-GCM",aw.cipher.modes.gcm);function zk6(q,K){var _=function(){return new aw.aes.Algorithm(q,K)};aw.cipher.registerAlgorithm(q,_)}var wb1=!1,_k6=4,bv,Ab1,_O4,HO6,xu;function zO4(){wb1=!0,_O4=[0,1,2,4,8,16,32,64,128,27,54];var q=Array(256);for(var K=0;K<128;++K)q[K]=K<<1,q[K+128]=K+128<<1^283;bv=Array(256),Ab1=Array(256),HO6=[,,,,],xu=[,,,,];for(var K=0;K<4;++K)HO6[K]=Array(256),xu[K]=Array(256);var _=0,z=0,Y,$,A,O,w,j,H;for(var K=0;K<256;++K){O=z^z<<1^z<<2^z<<3^z<<4,O=O>>8^O&255^99,bv[_]=O,Ab1[O]=_,w=q[O],Y=q[_],$=q[Y],A=q[$],j=w<<24^O<<16^O<<8^(O^w),H=(Y^$^A)<<24^(_^A)<<16^(_^$^A)<<8^(_^Y^A);for(var J=0;J<4;++J)HO6[J][_]=j,xu[J][O]=H,j=j<<24|j>>>8,H=H<<24|H>>>8;if(_===0)_=z=1;else _=Y^q[q[q[Y^A]]],z^=q[q[z]]}}function YO4(q,K){var _=q.slice(0),z,Y=1,$=_.length,A=$+6+1,O=_k6*A;for(var w=$;w<O;++w){if(z=_[w-1],w%$===0)z=bv[z>>>16&255]<<24^bv[z>>>8&255]<<16^bv[z&255]<<8^bv[z>>>24]^_O4[Y]<<24,Y++;else if($>6&&w%$===4)z=bv[z>>>24]<<24^bv[z>>>16&255]<<16^bv[z>>>8&255]<<8^bv[z&255];_[w]=_[w-$]^z}if(K){var j,H=xu[0],J=xu[1],M=xu[2],X=xu[3],P=_.slice(0);O=_.length;for(var w=0,W=O-_k6;w<O;w+=_k6,W-=_k6)if(w===0||w===O-_k6)P[w]=_[W],P[w+1]=_[W+3],P[w+2]=_[W+2],P[w+3]=_[W+1];else for(var D=0;D<_k6;++D)j=_[W+D],P[w+(3&-D)]=H[bv[j>>>24]]^J[bv[j>>>16&255]]^M[bv[j>>>8&255]]^X[bv[j&255]];_=P}return _}function Ob1(q,K,_,z){var Y=q.length/4-1,$,A,O,w,j;if(z)$=xu[0],A=xu[1],O=xu[2],w=xu[3],j=Ab1;else $=HO6[0],A=HO6[1],O=HO6[2],w=HO6[3],j=bv;var H,J,M,X,P,W,D;H=K[0]^q[0],J=K[z?3:1]^q[1],M=K[2]^q[2],X=K[z?1:3]^q[3];var f=3;for(var G=1;G<Y;++G)P=$[H>>>24]^A[J>>>16&255]^O[M>>>8&255]^w[X&255]^q[++f],W=$[J>>>24]^A[M>>>16&255]^O[X>>>8&255]^w[H&255]^q[++f],D=$[M>>>24]^A[X>>>16&255]^O[H>>>8&255]^w[J&255]^q[++f],X=$[X>>>24]^A[H>>>16&255]^O[J>>>8&255]^w[M&255]^q[++f],H=P,J=W,M=D;_[0]=j[H>>>24]<<24^j[J>>>16&255]<<16^j[M>>>8&255]<<8^j[X&255]^q[++f],_[z?3:1]=j[J>>>24]<<24^j[M>>>16&255]<<16^j[X>>>8&255]<<8^j[H&255]^q[++f],_[2]=j[M>>>24]<<24^j[X>>>16&255]<<16^j[H>>>8&255]<<8^j[J&255]^q[++f],_[z?1:3]=j[X>>>24]<<24^j[H>>>16&255]<<16^j[J>>>8&255]<<8^j[M&255]^q[++f]}function kv8(q){q=q||{};var K=(q.mode||"CBC").toUpperCase(),_="AES-"+K,z;if(q.decrypt)z=aw.cipher.createDecipher(_,q.key);else z=aw.cipher.createCipher(_,q.key);var Y=z.start;return z.start=function($,A){var O=null;if(A instanceof aw.util.ByteBuffer)O=A,A={};A=A||{},A.output=O,A.iv=$,Y.call(z,A)},z}});var S76=m((acA,AO4)=>{var Vi6=E_();Vi6.pki=Vi6.pki||{};var jb1=AO4.exports=Vi6.pki.oids=Vi6.oids=Vi6.oids||{};function a7(q,K){jb1[q]=K,jb1[K]=q}function NA(q,K){jb1[q]=K}a7("1.2.840.113549.1.1.1","rsaEncryption");a7("1.2.840.113549.1.1.4","md5WithRSAEncryption");a7("1.2.840.113549.1.1.5","sha1WithRSAEncryption");a7("1.2.840.113549.1.1.7","RSAES-OAEP");a7("1.2.840.113549.1.1.8","mgf1");a7("1.2.840.113549.1.1.9","pSpecified");a7("1.2.840.113549.1.1.10","RSASSA-PSS");a7("1.2.840.113549.1.1.11","sha256WithRSAEncryption");a7("1.2.840.113549.1.1.12","sha384WithRSAEncryption");a7("1.2.840.113549.1.1.13","sha512WithRSAEncryption");a7("1.3.101.112","EdDSA25519");a7("1.2.840.10040.4.3","dsa-with-sha1");a7("1.3.14.3.2.7","desCBC");a7("1.3.14.3.2.26","sha1");a7("1.3.14.3.2.29","sha1WithRSASignature");a7("2.16.840.1.101.3.4.2.1","sha256");a7("2.16.840.1.101.3.4.2.2","sha384");a7("2.16.840.1.101.3.4.2.3","sha512");a7("2.16.840.1.101.3.4.2.4","sha224");a7("2.16.840.1.101.3.4.2.5","sha512-224");a7("2.16.840.1.101.3.4.2.6","sha512-256");a7("1.2.840.113549.2.2","md2");a7("1.2.840.113549.2.5","md5");a7("1.2.840.113549.1.7.1","data");a7("1.2.840.113549.1.7.2","signedData");a7("1.2.840.113549.1.7.3","envelopedData");a7("1.2.840.113549.1.7.4","signedAndEnvelopedData");a7("1.2.840.113549.1.7.5","digestedData");a7("1.2.840.113549.1.7.6","encryptedData");a7("1.2.840.113549.1.9.1","emailAddress");a7("1.2.840.113549.1.9.2","unstructuredName");a7("1.2.840.113549.1.9.3","contentType");a7("1.2.840.113549.1.9.4","messageDigest");a7("1.2.840.113549.1.9.5","signingTime");a7("1.2.840.113549.1.9.6","counterSignature");a7("1.2.840.113549.1.9.7","challengePassword");a7("1.2.840.113549.1.9.8","unstructuredAddress");a7("1.2.840.113549.1.9.14","extensionRequest");a7("1.2.840.113549.1.9.20","friendlyName");a7("1.2.840.113549.1.9.21","localKeyId");a7("1.2.840.113549.1.9.22.1","x509Certificate");a7("1.2.840.113549.1.12.10.1.1","keyBag");a7("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");a7("1.2.840.113549.1.12.10.1.3","certBag");a7("1.2.840.113549.1.12.10.1.4","crlBag");a7("1.2.840.113549.1.12.10.1.5","secretBag");a7("1.2.840.113549.1.12.10.1.6","safeContentsBag");a7("1.2.840.113549.1.5.13","pkcs5PBES2");a7("1.2.840.113549.1.5.12","pkcs5PBKDF2");a7("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");a7("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");a7("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");a7("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");a7("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");a7("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");a7("1.2.840.113549.2.7","hmacWithSHA1");a7("1.2.840.113549.2.8","hmacWithSHA224");a7("1.2.840.113549.2.9","hmacWithSHA256");a7("1.2.840.113549.2.10","hmacWithSHA384");a7("1.2.840.113549.2.11","hmacWithSHA512");a7("1.2.840.113549.3.7","des-EDE3-CBC");a7("2.16.840.1.101.3.4.1.2","aes128-CBC");a7("2.16.840.1.101.3.4.1.22","aes192-CBC");a7("2.16.840.1.101.3.4.1.42","aes256-CBC");a7("2.5.4.3","commonName");a7("2.5.4.4","surname");a7("2.5.4.5","serialNumber");a7("2.5.4.6","countryName");a7("2.5.4.7","localityName");a7("2.5.4.8","stateOrProvinceName");a7("2.5.4.9","streetAddress");a7("2.5.4.10","organizationName");a7("2.5.4.11","organizationalUnitName");a7("2.5.4.12","title");a7("2.5.4.13","description");a7("2.5.4.15","businessCategory");a7("2.5.4.17","postalCode");a7("2.5.4.42","givenName");a7("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");a7("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");a7("2.16.840.1.113730.1.1","nsCertType");a7("2.16.840.1.113730.1.13","nsComment");NA("2.5.29.1","authorityKeyIdentifier");NA("2.5.29.2","keyAttributes");NA("2.5.29.3","certificatePolicies");NA("2.5.29.4","keyUsageRestriction");NA("2.5.29.5","policyMapping");NA("2.5.29.6","subtreesConstraint");NA("2.5.29.7","subjectAltName");NA("2.5.29.8","issuerAltName");NA("2.5.29.9","subjectDirectoryAttributes");NA("2.5.29.10","basicConstraints");NA("2.5.29.11","nameConstraints");NA("2.5.29.12","policyConstraints");NA("2.5.29.13","basicConstraints");a7("2.5.29.14","subjectKeyIdentifier");a7("2.5.29.15","keyUsage");NA("2.5.29.16","privateKeyUsagePeriod");a7("2.5.29.17","subjectAltName");a7("2.5.29.18","issuerAltName");a7("2.5.29.19","basicConstraints");NA("2.5.29.20","cRLNumber");NA("2.5.29.21","cRLReason");NA("2.5.29.22","expirationDate");NA("2.5.29.23","instructionCode");NA("2.5.29.24","invalidityDate");NA("2.5.29.25","cRLDistributionPoints");NA("2.5.29.26","issuingDistributionPoint");NA("2.5.29.27","deltaCRLIndicator");NA("2.5.29.28","issuingDistributionPoint");NA("2.5.29.29","certificateIssuer");NA("2.5.29.30","nameConstraints");a7("2.5.29.31","cRLDistributionPoints");a7("2.5.29.32","certificatePolicies");NA("2.5.29.33","policyMappings");NA("2.5.29.34","policyConstraints");a7("2.5.29.35","authorityKeyIdentifier");NA("2.5.29.36","policyConstraints");a7("2.5.29.37","extKeyUsage");NA("2.5.29.46","freshestCRL");NA("2.5.29.54","inhibitAnyPolicy");a7("1.3.6.1.4.1.11129.2.4.2","timestampList");a7("1.3.6.1.5.5.7.1.1","authorityInfoAccess");a7("1.3.6.1.5.5.7.3.1","serverAuth");a7("1.3.6.1.5.5.7.3.2","clientAuth");a7("1.3.6.1.5.5.7.3.3","codeSigning");a7("1.3.6.1.5.5.7.3.4","emailProtection");a7("1.3.6.1.5.5.7.3.8","timeStamping")});var Iu=m((scA,wO4)=>{var b2=E_();_$();S76();var P4=wO4.exports=b2.asn1=b2.asn1||{};P4.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};P4.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};P4.maxDepth=256;P4.create=function(q,K,_,z,Y){if(b2.util.isArray(z)){var $=[];for(var A=0;A<z.length;++A)if(z[A]!==void 0)$.push(z[A]);z=$}var O={tagClass:q,type:K,constructed:_,composed:_||b2.util.isArray(z),value:z};if(Y&&"bitStringContents"in Y)O.bitStringContents=Y.bitStringContents,O.original=P4.copy(O);return O};P4.copy=function(q,K){var _;if(b2.util.isArray(q)){_=[];for(var z=0;z<q.length;++z)_.push(P4.copy(q[z],K));return _}if(typeof q==="string")return q;if(_={tagClass:q.tagClass,type:q.type,constructed:q.constructed,composed:q.composed,value:P4.copy(q.value,K)},K&&!K.excludeBitStringContents)_.bitStringContents=q.bitStringContents;return _};P4.equals=function(q,K,_){if(b2.util.isArray(q)){if(!b2.util.isArray(K))return!1;if(q.length!==K.length)return!1;for(var z=0;z<q.length;++z)if(!P4.equals(q[z],K[z]))return!1;return!0}if(typeof q!==typeof K)return!1;if(typeof q==="string")return q===K;var Y=q.tagClass===K.tagClass&&q.type===K.type&&q.constructed===K.constructed&&q.composed===K.composed&&P4.equals(q.value,K.value);if(_&&_.includeBitStringContents)Y=Y&&q.bitStringContents===K.bitStringContents;return Y};P4.getBerValueLength=function(q){var K=q.getByte();if(K===128)return;var _,z=K&128;if(!z)_=K;else _=q.getInt((K&127)<<3);return _};function Ni6(q,K,_){if(_>K){var z=Error("Too few bytes to parse DER.");throw z.available=q.length(),z.remaining=K,z.requested=_,z}}var AB_=function(q,K){var _=q.getByte();if(K--,_===128)return;var z,Y=_&128;if(!Y)z=_;else{var $=_&127;Ni6(q,K,$),z=q.getInt($<<3)}if(z<0)throw Error("Negative length: "+z);return z};P4.fromDer=function(q,K){if(K===void 0)K={strict:!0,parseAllBytes:!0,decodeBitStrings:!0};if(typeof K==="boolean")K={strict:K,parseAllBytes:!0,decodeBitStrings:!0};if(!("strict"in K))K.strict=!0;if(!("parseAllBytes"in K))K.parseAllBytes=!0;if(!("decodeBitStrings"in K))K.decodeBitStrings=!0;if(!("maxDepth"in K))K.maxDepth=P4.maxDepth;if(typeof q==="string")q=b2.util.createBuffer(q);var _=q.length(),z=Vv8(q,q.length(),0,K);if(K.parseAllBytes&&q.length()!==0){var Y=Error("Unparsed DER bytes remain after ASN.1 parsing.");throw Y.byteCount=_,Y.remaining=q.length(),Y}return z};function Vv8(q,K,_,z){if(_>=z.maxDepth)throw Error("ASN.1 parsing error: Max depth exceeded.");var Y;Ni6(q,K,2);var $=q.getByte();K--;var A=$&192,O=$&31;Y=q.length();var w=AB_(q,K);if(K-=Y-q.length(),w!==void 0&&w>K){if(z.strict){var j=Error("Too few bytes to read ASN.1 value.");throw j.available=q.length(),j.remaining=K,j.requested=w,j}w=K}var H,J,M=($&32)===32;if(M)if(H=[],w===void 0)for(;;){if(Ni6(q,K,2),q.bytes(2)===String.fromCharCode(0,0)){q.getBytes(2),K-=2;break}Y=q.length(),H.push(Vv8(q,K,_+1,z)),K-=Y-q.length()}else while(w>0)Y=q.length(),H.push(Vv8(q,w,_+1,z)),K-=Y-q.length(),w-=Y-q.length();if(H===void 0&&A===P4.Class.UNIVERSAL&&O===P4.Type.BITSTRING)J=q.bytes(w);if(H===void 0&&z.decodeBitStrings&&A===P4.Class.UNIVERSAL&&O===P4.Type.BITSTRING&&w>1){var X=q.read,P=K,W=0;if(O===P4.Type.BITSTRING)Ni6(q,K,1),W=q.getByte(),K--;if(W===0)try{Y=q.length();var D={strict:!0,decodeBitStrings:!0},f=Vv8(q,K,_+1,D),G=Y-q.length();if(K-=G,O==P4.Type.BITSTRING)G++;var Z=f.tagClass;if(G===w&&(Z===P4.Class.UNIVERSAL||Z===P4.Class.CONTEXT_SPECIFIC))H=[f]}catch(v){}if(H===void 0)q.read=X,K=P}if(H===void 0){if(w===void 0){if(z.strict)throw Error("Non-constructed ASN.1 object of indefinite length.");w=K}if(O===P4.Type.BMPSTRING){H="";for(;w>0;w-=2)Ni6(q,K,2),H+=String.fromCharCode(q.getInt16()),K-=2}else H=q.getBytes(w),K-=w}var T=J===void 0?null:{bitStringContents:J};return P4.create(A,O,M,H,T)}P4.toDer=function(q){var K=b2.util.createBuffer(),_=q.tagClass|q.type,z=b2.util.createBuffer(),Y=!1;if("bitStringContents"in q){if(Y=!0,q.original)Y=P4.equals(q,q.original)}if(Y)z.putBytes(q.bitStringContents);else if(q.composed){if(q.constructed)_|=32;else z.putByte(0);for(var $=0;$<q.value.length;++$)if(q.value[$]!==void 0)z.putBuffer(P4.toDer(q.value[$]))}else if(q.type===P4.Type.BMPSTRING)for(var $=0;$<q.value.length;++$)z.putInt16(q.value.charCodeAt($));else if(q.type===P4.Type.INTEGER&&q.value.length>1&&(q.value.charCodeAt(0)===0&&(q.value.charCodeAt(1)&128)===0||q.value.charCodeAt(0)===255&&(q.value.charCodeAt(1)&128)===128))z.putBytes(q.value.substr(1));else z.putBytes(q.value);if(K.putByte(_),z.length()<=127)K.putByte(z.length()&127);else{var A=z.length(),O="";do O+=String.fromCharCode(A&255),A=A>>>8;while(A>0);K.putByte(O.length|128);for(var $=O.length-1;$>=0;--$)K.putByte(O.charCodeAt($))}return K.putBuffer(z),K};P4.oidToDer=function(q){var K=q.split("."),_=b2.util.createBuffer();_.putByte(40*parseInt(K[0],10)+parseInt(K[1],10));var z,Y,$,A;for(var O=2;O<K.length;++O){if(z=!0,Y=[],$=parseInt(K[O],10),$>4294967295)throw Error("OID value too large; max is 32-bits.");do{if(A=$&127,$=$>>>7,!z)A|=128;Y.push(A),z=!1}while($>0);for(var w=Y.length-1;w>=0;--w)_.putByte(Y[w])}return _};P4.derToOid=function(q){var K;if(typeof q==="string")q=b2.util.createBuffer(q);var _=q.getByte();K=Math.floor(_/40)+"."+_%40;var z=0;while(q.length()>0){if(z>70368744177663)throw Error("OID value too large; max is 53-bits.");if(_=q.getByte(),z=z*128,_&128)z+=_&127;else K+="."+(z+_),z=0}return K};P4.utcTimeToDate=function(q){var K=new Date,_=parseInt(q.substr(0,2),10);_=_>=50?1900+_:2000+_;var z=parseInt(q.substr(2,2),10)-1,Y=parseInt(q.substr(4,2),10),$=parseInt(q.substr(6,2),10),A=parseInt(q.substr(8,2),10),O=0;if(q.length>11){var w=q.charAt(10),j=10;if(w!=="+"&&w!=="-")O=parseInt(q.substr(10,2),10),j+=2}if(K.setUTCFullYear(_,z,Y),K.setUTCHours($,A,O,0),j){if(w=q.charAt(j),w==="+"||w==="-"){var H=parseInt(q.substr(j+1,2),10),J=parseInt(q.substr(j+4,2),10),M=H*60+J;if(M*=60000,w==="+")K.setTime(+K-M);else K.setTime(+K+M)}}return K};P4.generalizedTimeToDate=function(q){var K=new Date,_=parseInt(q.substr(0,4),10),z=parseInt(q.substr(4,2),10)-1,Y=parseInt(q.substr(6,2),10),$=parseInt(q.substr(8,2),10),A=parseInt(q.substr(10,2),10),O=parseInt(q.substr(12,2),10),w=0,j=0,H=!1;if(q.charAt(q.length-1)==="Z")H=!0;var J=q.length-5,M=q.charAt(J);if(M==="+"||M==="-"){var X=parseInt(q.substr(J+1,2),10),P=parseInt(q.substr(J+4,2),10);if(j=X*60+P,j*=60000,M==="+")j*=-1;H=!0}if(q.charAt(14)===".")w=parseFloat(q.substr(14),10)*1000;if(H)K.setUTCFullYear(_,z,Y),K.setUTCHours($,A,O,w),K.setTime(+K+j);else K.setFullYear(_,z,Y),K.setHours($,A,O,w);return K};P4.dateToUtcTime=function(q){if(typeof q==="string")return q;var K="",_=[];_.push((""+q.getUTCFullYear()).substr(2)),_.push(""+(q.getUTCMonth()+1)),_.push(""+q.getUTCDate()),_.push(""+q.getUTCHours()),_.push(""+q.getUTCMinutes()),_.push(""+q.getUTCSeconds());for(var z=0;z<_.length;++z){if(_[z].length<2)K+="0";K+=_[z]}return K+="Z",K};P4.dateToGeneralizedTime=function(q){if(typeof q==="string")return q;var K="",_=[];_.push(""+q.getUTCFullYear()),_.push(""+(q.getUTCMonth()+1)),_.push(""+q.getUTCDate()),_.push(""+q.getUTCHours()),_.push(""+q.getUTCMinutes()),_.push(""+q.getUTCSeconds());for(var z=0;z<_.length;++z){if(_[z].length<2)K+="0";K+=_[z]}return K+="Z",K};P4.integerToDer=function(q){var K=b2.util.createBuffer();if(q>=-128&&q<128)return K.putSignedInt(q,8);if(q>=-32768&&q<32768)return K.putSignedInt(q,16);if(q>=-8388608&&q<8388608)return K.putSignedInt(q,24);if(q>=-2147483648&&q<2147483648)return K.putSignedInt(q,32);var _=Error("Integer too large; max is 32-bits.");throw _.integer=q,_};P4.derToInteger=function(q){if(typeof q==="string")q=b2.util.createBuffer(q);var K=q.length()*8;if(K>32)throw Error("Integer too large; max is 32-bits.");return q.getSignedInt(K)};P4.validate=function(q,K,_,z){var Y=!1;if((q.tagClass===K.tagClass||typeof K.tagClass>"u")&&(q.type===K.type||typeof K.type>"u")){if(q.constructed===K.constructed||typeof K.constructed>"u"){if(Y=!0,K.value&&b2.util.isArray(K.value)){var $=0;for(var A=0;Y&&A<K.value.length;++A){var O=K.value[A];Y=!!O.optional;var w=q.value[$];if(!w){if(!O.optional){if(Y=!1,z)z.push("["+K.name+'] Missing required element. Expected tag class "'+O.tagClass+'", type "'+O.type+'"')}continue}var j=typeof O.tagClass<"u"&&typeof O.type<"u";if(j&&(w.tagClass!==O.tagClass||w.type!==O.type))if(O.optional){Y=!0;continue}else{if(Y=!1,z)z.push("["+K.name+"] Tag mismatch. Expected ("+O.tagClass+","+O.type+"), got ("+w.tagClass+","+w.type+")");break}var H=P4.validate(w,O,_,z);if(H)++$,Y=!0;else if(O.optional)Y=!0;else{Y=!1;break}}}if(Y&&_){if(K.capture)_[K.capture]=q.value;if(K.captureAsn1)_[K.captureAsn1]=q;if(K.captureBitStringContents&&"bitStringContents"in q)_[K.captureBitStringContents]=q.bitStringContents;if(K.captureBitStringValue&&"bitStringContents"in q){var J;if(q.bitStringContents.length<2)_[K.captureBitStringValue]="";else{var M=q.bitStringContents.charCodeAt(0);if(M!==0)throw Error("captureBitStringValue only supported for zero unused bits");_[K.captureBitStringValue]=q.bitStringContents.slice(1)}}}}else if(z)z.push("["+K.name+'] Expected constructed "'+K.constructed+'", got "'+q.constructed+'"')}else if(z){if(q.tagClass!==K.tagClass)z.push("["+K.name+'] Expected tag class "'+K.tagClass+'", got "'+q.tagClass+'"');if(q.type!==K.type)z.push("["+K.name+'] Expected type "'+K.type+'", got "'+q.type+'"')}return Y};var OO4=/[^\\u0000-\\u00ff]/;P4.prettyPrint=function(q,K,_){var z="";if(K=K||0,_=_||2,K>0)z+=`
853`;var Y="";for(var $=0;$<K*_;++$)Y+=" ";switch(z+=Y+"Tag: ",q.tagClass){case P4.Class.UNIVERSAL:z+="Universal:";break;case P4.Class.APPLICATION:z+="Application:";break;case P4.Class.CONTEXT_SPECIFIC:z+="Context-Specific:";break;case P4.Class.PRIVATE:z+="Private:";break}if(q.tagClass===P4.Class.UNIVERSAL)switch(z+=q.type,q.type){case P4.Type.NONE:z+=" (None)";break;case P4.Type.BOOLEAN:z+=" (Boolean)";break;case P4.Type.INTEGER:z+=" (Integer)";break;case P4.Type.BITSTRING:z+=" (Bit string)";break;case P4.Type.OCTETSTRING:z+=" (Octet string)";break;case P4.Type.NULL:z+=" (Null)";break;case P4.Type.OID:z+=" (Object Identifier)";break;case P4.Type.ODESC:z+=" (Object Descriptor)";break;case P4.Type.EXTERNAL:z+=" (External or Instance of)";break;case P4.Type.REAL:z+=" (Real)";break;case P4.Type.ENUMERATED:z+=" (Enumerated)";break;case P4.Type.EMBEDDED:z+=" (Embedded PDV)";break;case P4.Type.UTF8:z+=" (UTF8)";break;case P4.Type.ROID:z+=" (Relative Object Identifier)";break;case P4.Type.SEQUENCE:z+=" (Sequence)";break;case P4.Type.SET:z+=" (Set)";break;case P4.Type.PRINTABLESTRING:z+=" (Printable String)";break;case P4.Type.IA5String:z+=" (IA5String (ASCII))";break;case P4.Type.UTCTIME:z+=" (UTC time)";break;case P4.Type.GENERALIZEDTIME:z+=" (Generalized time)";break;case P4.Type.BMPSTRING:z+=" (BMP String)";break}else z+=q.type;if(z+=`
854`,z+=Y+"Constructed: "+q.constructed+`
855`,q.composed){var A=0,O="";for(var $=0;$<q.value.length;++$)if(q.value[$]!==void 0){if(A+=1,O+=P4.prettyPrint(q.value[$],K+1,_),$+1<q.value.length)O+=","}z+=Y+"Sub values: "+A+O}else{if(z+=Y+"Value: ",q.type===P4.Type.OID){var w=P4.derToOid(q.value);if(z+=w,b2.pki&&b2.pki.oids){if(w in b2.pki.oids)z+=" ("+b2.pki.oids[w]+") "}}if(q.type===P4.Type.INTEGER)try{z+=P4.derToInteger(q.value)}catch(H){z+="0x"+b2.util.bytesToHex(q.value)}else if(q.type===P4.Type.BITSTRING){if(q.value.length>1)z+="0x"+b2.util.bytesToHex(q.value.slice(1));else z+="(none)";if(q.value.length>0){var j=q.value.charCodeAt(0);if(j==1)z+=" (1 unused bit shown)";else if(j>1)z+=" ("+j+" unused bits shown)"}}else if(q.type===P4.Type.OCTETSTRING){if(!OO4.test(q.value))z+="("+q.value+") ";z+="0x"+b2.util.bytesToHex(q.value)}else if(q.type===P4.Type.UTF8)try{z+=b2.util.decodeUtf8(q.value)}catch(H){if(H.message==="URI malformed")z+="0x"+b2.util.bytesToHex(q.value)+" (malformed UTF8)";else throw H}else if(q.type===P4.Type.PRINTABLESTRING||q.type===P4.Type.IA5String)z+=q.value;else if(OO4.test(q.value))z+="0x"+b2.util.bytesToHex(q.value);else if(q.value.length===0)z+="[null]";else z+=q.value}return z}});var IF=m((tcA,jO4)=>{var Nv8=E_();jO4.exports=Nv8.md=Nv8.md||{};Nv8.md.algorithms=Nv8.md.algorithms||{}});var Yk6=m((ecA,HO4)=>{var Yr=E_();IF();_$();var OB_=HO4.exports=Yr.hmac=Yr.hmac||{};OB_.create=function(){var q=null,K=null,_=null,z=null,Y={};return Y.start=function($,A){if($!==null)if(typeof $==="string")if($=$.toLowerCase(),$ in Yr.md.algorithms)K=Yr.md.algorithms[$].create();else throw Error('Unknown hash algorithm "'+$+'"');else K=$;if(A===null)A=q;else{if(typeof A==="string")A=Yr.util.createBuffer(A);else if(Yr.util.isArray(A)){var O=A;A=Yr.util.createBuffer();for(var w=0;w<O.length;++w)A.putByte(O[w])}var j=A.length();if(j>K.blockLength)K.start(),K.update(A.bytes()),A=K.digest();_=Yr.util.createBuffer(),z=Yr.util.createBuffer(),j=A.length();for(var w=0;w<j;++w){var O=A.at(w);_.putByte(54^O),z.putByte(92^O)}if(j<K.blockLength){var O=K.blockLength-j;for(var w=0;w<O;++w)_.putByte(54),z.putByte(92)}q=A,_=_.bytes(),z=z.bytes()}K.start(),K.update(_)},Y.update=function($){K.update($)},Y.getMac=function(){var $=K.digest().bytes();return K.start(),K.update(z),K.update($),K.digest()},Y.digest=Y.getMac,Y}});var Ev8=m((qlA,PO4)=>{var uF=E_();IF();_$();var MO4=PO4.exports=uF.md5=uF.md5||{};uF.md.md5=uF.md.algorithms.md5=MO4;MO4.create=function(){if(!XO4)wB_();var q=null,K=uF.util.createBuffer(),_=Array(16),z={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return z.start=function(){z.messageLength=0,z.fullMessageLength=z.messageLength64=[];var Y=z.messageLengthSize/4;for(var $=0;$<Y;++$)z.fullMessageLength.push(0);return K=uF.util.createBuffer(),q={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},z},z.start(),z.update=function(Y,$){if($==="utf8")Y=uF.util.encodeUtf8(Y);var A=Y.length;z.messageLength+=A,A=[A/4294967296>>>0,A>>>0];for(var O=z.fullMessageLength.length-1;O>=0;--O)z.fullMessageLength[O]+=A[1],A[1]=A[0]+(z.fullMessageLength[O]/4294967296>>>0),z.fullMessageLength[O]=z.fullMessageLength[O]>>>0,A[0]=A[1]/4294967296>>>0;if(K.putBytes(Y),JO4(q,_,K),K.read>2048||K.length()===0)K.compact();return z},z.digest=function(){var Y=uF.util.createBuffer();Y.putBytes(K.bytes());var $=z.fullMessageLength[z.fullMessageLength.length-1]+z.messageLengthSize,A=$&z.blockLength-1;Y.putBytes(Hb1.substr(0,z.blockLength-A));var O,w=0;for(var j=z.fullMessageLength.length-1;j>=0;--j)O=z.fullMessageLength[j]*8+w,w=O/4294967296>>>0,Y.putInt32Le(O>>>0);var H={h0:q.h0,h1:q.h1,h2:q.h2,h3:q.h3};JO4(H,_,Y);var J=uF.util.createBuffer();return J.putInt32Le(H.h0),J.putInt32Le(H.h1),J.putInt32Le(H.h2),J.putInt32Le(H.h3),J},z};var Hb1=null,yv8=null,yi6=null,$k6=null,XO4=!1;function wB_(){Hb1=String.fromCharCode(128),Hb1+=uF.util.fillString(String.fromCharCode(0),64),yv8=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],yi6=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],$k6=Array(64);for(var q=0;q<64;++q)$k6[q]=Math.floor(Math.abs(Math.sin(q+1))*4294967296);XO4=!0}function JO4(q,K,_){var z,Y,$,A,O,w,j,H,J=_.length();while(J>=64){Y=q.h0,$=q.h1,A=q.h2,O=q.h3;for(H=0;H<16;++H)K[H]=_.getInt32Le(),w=O^$&(A^O),z=Y+w+$k6[H]+K[H],j=yi6[H],Y=O,O=A,A=$,$+=z<<j|z>>>32-j;for(;H<32;++H)w=A^O&($^A),z=Y+w+$k6[H]+K[yv8[H]],j=yi6[H],Y=O,O=A,A=$,$+=z<<j|z>>>32-j;for(;H<48;++H)w=$^A^O,z=Y+w+$k6[H]+K[yv8[H]],j=yi6[H],Y=O,O=A,A=$,$+=z<<j|z>>>32-j;for(;H<64;++H)w=A^($|~O),z=Y+w+$k6[H]+K[yv8[H]],j=yi6[H],Y=O,O=A,A=$,$+=z<<j|z>>>32-j;q.h0=q.h0+Y|0,q.h1=q.h1+$|0,q.h2=q.h2+A|0,q.h3=q.h3+O|0,J-=64}}});var JO6=m((KlA,DO4)=>{var Rv8=E_();_$();var WO4=DO4.exports=Rv8.pem=Rv8.pem||{};WO4.encode=function(q,K){K=K||{};var _="-----BEGIN "+q.type+`-----\r
856`,z;if(q.procType)z={name:"Proc-Type",values:[String(q.procType.version),q.procType.type]},_+=Lv8(z);if(q.contentDomain)z={name:"Content-Domain",values:[q.contentDomain]},_+=Lv8(z);if(q.dekInfo){if(z={name:"DEK-Info",values:[q.dekInfo.algorithm]},q.dekInfo.parameters)z.values.push(q.dekInfo.parameters);_+=Lv8(z)}if(q.headers)for(var Y=0;Y<q.headers.length;++Y)_+=Lv8(q.headers[Y]);if(q.procType)_+=`\r
857`;return _+=Rv8.util.encode64(q.body,K.maxline||64)+`\r

Callers 1

cli.jsFile · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected